@ferrule-io/ok-fine 0.3.6 → 0.3.8

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 (68) hide show
  1. package/README.md +5 -4
  2. package/dist/auth/discovery.js +11 -0
  3. package/dist/auth/verifier.js +44 -1
  4. package/dist/cli-options.js +1 -1
  5. package/dist/cli.js +12 -14
  6. package/dist/config.js +130 -6
  7. package/dist/data-dir-lock.js +58 -19
  8. package/dist/http/rest.js +1 -1
  9. package/dist/http/ui.js +118 -0
  10. package/dist/local-host.js +157 -0
  11. package/dist/mcp/server.js +5 -4
  12. package/dist/okf/lint.js +20 -0
  13. package/dist/server.js +138 -29
  14. package/dist/stdio-proxy.js +349 -0
  15. package/dist/store/fs-util.js +59 -4
  16. package/dist/store/git-backend.js +208 -59
  17. package/dist/store/git.js +92 -19
  18. package/dist/ui/assets/bash-BiGZg9Om.js +1 -0
  19. package/dist/ui/assets/css-BGIxQoYs.js +1 -0
  20. package/dist/ui/assets/css-DUjzNfgv.js +1 -0
  21. package/dist/ui/assets/diff-woXpYk--.js +1 -0
  22. package/dist/ui/assets/dockerfile-IyjqRm3v.js +1 -0
  23. package/dist/ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  24. package/dist/ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  25. package/dist/ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  26. package/dist/ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  27. package/dist/ui/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  28. package/dist/ui/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  29. package/dist/ui/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  30. package/dist/ui/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  31. package/dist/ui/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  32. package/dist/ui/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  33. package/dist/ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  34. package/dist/ui/assets/github-dark-default-DXG-b-1a.js +1 -0
  35. package/dist/ui/assets/github-light-default-BXViO-2h.js +1 -0
  36. package/dist/ui/assets/go-rLFTqkRN.js +1 -0
  37. package/dist/ui/assets/highlight-CW19vWvw.js +153 -0
  38. package/dist/ui/assets/html-BMn1ogTm.js +1 -0
  39. package/dist/ui/assets/html-BlpXnbzK.js +1 -0
  40. package/dist/ui/assets/index-0b2NNRC5.js +127 -0
  41. package/dist/ui/assets/index-CFuTAZQM.css +1 -0
  42. package/dist/ui/assets/java-BtIQNnN0.js +1 -0
  43. package/dist/ui/assets/java-DxlWrXwe.js +1 -0
  44. package/dist/ui/assets/javascript-BzbQS41l.js +1 -0
  45. package/dist/ui/assets/javascript-Yelw-5ZN.js +1 -0
  46. package/dist/ui/assets/json-qhed-kSA.js +1 -0
  47. package/dist/ui/assets/jsx-D3KKoC5L.js +1 -0
  48. package/dist/ui/assets/jsx-hEbJ82HF.js +1 -0
  49. package/dist/ui/assets/markdown-BYOwaDjH.js +1 -0
  50. package/dist/ui/assets/python-gzcpVVnB.js +1 -0
  51. package/dist/ui/assets/ruby-Di5fYh6S.js +1 -0
  52. package/dist/ui/assets/rust-DpiIf5JO.js +1 -0
  53. package/dist/ui/assets/shellscript-CqHdAlCp.js +1 -0
  54. package/dist/ui/assets/sql-BOsskAmu.js +1 -0
  55. package/dist/ui/assets/sql-CNu3Or2W.js +1 -0
  56. package/dist/ui/assets/toml-CcmNWLt0.js +1 -0
  57. package/dist/ui/assets/tsx-5f3ulCja.js +1 -0
  58. package/dist/ui/assets/tsx-BOvsFOI6.js +1 -0
  59. package/dist/ui/assets/typescript-Utq2Cl8c.js +1 -0
  60. package/dist/ui/assets/typescript-j_1H8WHN.js +1 -0
  61. package/dist/ui/assets/yaml-CxbubiML.js +1 -0
  62. package/dist/ui/assets/yaml-DijMHRDA.js +1 -0
  63. package/dist/ui/favicon.svg +11 -0
  64. package/dist/ui/index.html +16 -0
  65. package/dist/ui/theme-init.js +10 -0
  66. package/dist/version.js +1 -1
  67. package/package.json +25 -4
  68. package/dist/store/repo.js +0 -471
@@ -0,0 +1,127 @@
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),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 ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function ne(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 re(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,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),re(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(A,`$&/`)+`/`)+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+te(a,u),c+=re(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+te(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(ne(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 ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(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 oe=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 se(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,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(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 se(ce.bind(null,e))}var j={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(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=j,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=ce,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:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,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.0`})),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!==ee(o,t.options))return!1}else if(!te(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(A(t.options.mutationKey)!==A(a))return!1}else if(!te(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ee(e,t){return(t?.queryKeyHashFn||A)(e)}function A(e){return JSON.stringify(e,(e,t)=>oe(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function te(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(!te(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!te(e[r],t[r]))return!1;return!0}return!1}var ne=Object.prototype.hasOwnProperty;function re(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ae(e)&&ae(t);if(!r&&!(oe(e)&&oe(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:ne.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=re(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ie(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ae(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oe(e){if(!se(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!(!se(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function se(e){return Object.prototype.toString.call(e)===`[object Object]`}function ce(e){return new Promise(t=>{b.setTimeout(t,e)})}function j(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:re(e,t)}function le(e){return e}function ue(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function de(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fe=Symbol();function pe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===fe?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function me(e,t){return typeof e==`function`?e(...t):!!e}function he(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ge=()=>S,M=()=>ge(),N=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(){}},_e=new class extends N{#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`}},P=x;function ve(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=P,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 F=ve(),ye=new class extends N{#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 be(e){return Math.min(1e3*2**e,3e4)}function xe(e){return(e??`online`)!==`online`||ye.isOnline()}var Se=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ce(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 Se(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>_e.isFocused()&&(e.networkMode===`always`||ye.isOnline())&&e.canRun(),p=()=>xe(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(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??(M()?0:3),a=e.retryDelay??be,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),ce(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var we=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??(M()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function Te(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=e=>{he(e,()=>t.signal,()=>n=!0)},u=pe(t.options,t.fetchOptions),d=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 l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?de:ue;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?De:Ee,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ee(r,s);if(c>0&&e==null)break;s=await d(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 Ee(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 De(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Oe=class extends we{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=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.#o,...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=j(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({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===fe||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return 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.#s||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.#c({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)return this.#a.continueRetry(),this.#a.promise}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.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=pe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!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`?Te(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Ce({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Se&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();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 Se){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({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.scheduleGc()}}#c(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),F.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:xe(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 N{#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&&!ie(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 ie(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().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!M()&&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||_e.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=j(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=j(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=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),ie(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)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();F.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 we{#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||ze(),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=Ce({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})}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),F.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ze(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Be=class extends N{#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 Re({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=Ve(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=Ve(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=Ve(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=Ve(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}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){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return F.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function Ve(e){return e.options.scope?.id}var He=class extends N{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??ee(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(){F.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){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ue=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new He,this.#t=e.mutationCache||new Be,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=_e.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ye.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 F.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;F.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return F.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=F.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return F.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=F.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(C)),e.state.fetchStatus===`paused`?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 ye.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(A(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{te(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(A(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{te(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||=ee(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===fe&&(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()}},We=m.createContext(!1),Ge=()=>m.useContext(We);We.Provider;function Ke(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qe=m.createContext(Ke()),Je=()=>m.useContext(qe),Ye=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?me(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Xe=e=>{m.useEffect(()=>{e.clearReset()},[e])},Ze=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||me(n,[e.error,r])),Qe=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))}},$e=(e,t)=>e?.suspense&&t.isPending,et=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tt(e,t,n){let r=Ge(),i=Je(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Qe(o),Ye(o,i,s),Xe(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(F.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),$e(o,u))throw et(o,l,i);if(Ze({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function nt(e,t){return tt(e,Me,t)}var rt=(0,m.createContext)({});function it(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var at=typeof window<`u`?m.useLayoutEffect:m.useEffect,ot=(0,m.createContext)(null);function st(e,t){e.indexOf(t)===-1&&e.push(t)}function ct(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var lt=(e,t,n)=>n>t?t:n<e?e:n,ut={},dt=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ft=e=>typeof e==`object`&&!!e,pt=e=>/^0[^.\s]+$/u.test(e);function mt(e){let t;return()=>(t===void 0&&(t=e()),t)}var ht=e=>e,gt=(...e)=>e.reduce((e,t)=>n=>t(e(n))),_t=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},vt=class{constructor(){this.subscriptions=[]}add(e){return st(this.subscriptions,e),()=>this.remove(e)}remove(e){ct(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}},yt=e=>e*1e3,bt=e=>e/1e3,xt=(e,t)=>t?1e3/t*e:0,St=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ct=1e-7,wt=12;function Tt(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=St(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Ct&&++s<wt);return o}function Et(e,t,n,r){if(e===t&&n===r)return ht;let i=t=>Tt(t,0,1,e,n);return e=>e===0||e===1?e:St(i(e),t,r)}var Dt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ot=e=>t=>1-e(1-t),kt=Et(.33,1.53,.69,.99),At=Ot(kt),jt=Dt(At),Mt=e=>e>=1?1:(e*=2)<1?.5*At(e):.5*(2-2**(-10*(e-1))),Nt=e=>1-Math.sin(Math.acos(e)),Pt=Ot(Nt),Ft=Dt(Nt),It=Et(.42,0,1,1),Lt=Et(0,0,.58,1),Rt=Et(.42,0,.58,1),zt=e=>Array.isArray(e)&&typeof e[0]!=`number`,Bt=e=>Array.isArray(e)&&typeof e[0]==`number`,Vt={linear:ht,easeIn:It,easeInOut:Rt,easeOut:Lt,circIn:Nt,circInOut:Ft,circOut:Pt,backIn:At,backInOut:jt,backOut:kt,anticipate:Mt},Ht=e=>typeof e==`string`,Ut=e=>{if(Bt(e)){e.length;let[t,n,r,i]=e;return Et(t,n,r,i)}return Ht(e)?(Vt[e],`${e}`,Vt[e]):e},Wt={delta:0,timestamp:0,isProcessing:!1},Gt;function Kt(){Gt=void 0}var I={now:()=>(Gt===void 0&&I.set(Wt.isProcessing||ut.useManualTiming?Wt.timestamp:performance.now()),Gt),set:e=>{Gt=e,queueMicrotask(Kt)}},qt=e=>Math.round(e*1e5)/1e5,Jt=e=>t=>typeof t==`string`&&t.startsWith(e),Yt=Jt(`--`),Xt=Jt(`var(--`),Zt=e=>Xt(e)?Qt.test(e.split(`/*`)[0].trim()):!1,Qt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $t(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var en={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},tn={...en,transform:e=>lt(0,1,e)},nn={...en,default:1},rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function an(e){return e==null}var on=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sn=(e,t)=>n=>!!(typeof n==`string`&&on.test(n)&&n.startsWith(e)||t&&!an(n)&&Object.prototype.hasOwnProperty.call(n,t)),cn=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(rn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ln=e=>lt(0,255,e),un={...en,transform:e=>Math.round(ln(e))},dn={test:sn(`rgb`,`red`),parse:cn(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+un.transform(e)+`, `+un.transform(t)+`, `+un.transform(n)+`, `+qt(tn.transform(r))+`)`};function fn(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var pn={test:sn(`#`),parse:fn,transform:dn.transform},mn=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hn=mn(`deg`),gn=mn(`%`),L=mn(`px`),_n=mn(`vh`),vn=mn(`vw`),yn={...gn,parse:e=>gn.parse(e)/100,transform:e=>gn.transform(e*100)},bn={test:sn(`hsl`,`hue`),parse:cn(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+gn.transform(qt(t))+`, `+gn.transform(qt(n))+`, `+qt(tn.transform(r))+`)`},xn={test:e=>dn.test(e)||pn.test(e)||bn.test(e),parse:e=>dn.test(e)?dn.parse(e):bn.test(e)?bn.parse(e):pn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?dn.transform(e):bn.transform(e),getAnimatableNone:e=>{let t=xn.parse(e);return t.alpha=0,xn.transform(t)}},Sn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Cn=new RegExp(rn.source),wn=new RegExp(Sn.source,`i`);function Tn(e){return isNaN(e)&&typeof e==`string`&&(Cn.test(e)||wn.test(e))}var En=`number`,Dn=`color`,On=`var`,kn=`var(`,An="${}",jn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mn(e){let t=e.toString();return Cn.test(t)||wn.test(t)}function Nn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(jn,e=>(xn.test(e)?(r.color.push(a),i.push(Dn),n.push(xn.parse(e))):e.startsWith(kn)?(r.var.push(a),i.push(On),n.push(e)):(r.number.push(a),i.push(En),n.push(parseFloat(e))),++a,An)).split(An),indexes:r,types:i}}function Pn(e){return Nn(e).values}function Fn({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===En?qt(r[a]):e===Dn?xn.transform(r[a]):r[a]}return i}}function In(e){return Fn(Nn(e))}var Ln=e=>typeof e==`number`?0:xn.test(e)?xn.getAnimatableNone(e):e,Rn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Ln(e);function zn(e){let t=Nn(e);return Fn(t)(t.values.map((e,n)=>Rn(e,t.split[n])))}var Bn={test:Tn,parse:Pn,createTransformer:In,getAnimatableNone:zn};function Vn(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 Hn({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=Vn(s,r,e+1/3),a=Vn(s,r,e),o=Vn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Un(e,t){return n=>n>0?t:e}var R=(e,t,n)=>e+(t-e)*n,Wn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Gn=[pn,dn,bn],Kn=e=>Gn.find(t=>t.test(e));function qn(e){let t=Kn(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===bn&&(n=Hn(n)),n}var Jn=(e,t)=>{let n=qn(e),r=qn(t);if(!n||!r)return Un(e,t);let i={...n};return e=>(i.red=Wn(n.red,r.red,e),i.green=Wn(n.green,r.green,e),i.blue=Wn(n.blue,r.blue,e),i.alpha=R(n.alpha,r.alpha,e),dn.transform(i))},Yn=new Set([`none`,`hidden`]);function Xn(e,t){return Yn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zn(e,t){return n=>R(e,t,n)}function Qn(e){return typeof e==`number`?Zn:typeof e==`string`?Zt(e)?Un:xn.test(e)?Jn:nr:Array.isArray(e)?$n:typeof e==`object`?xn.test(e)?Jn:er:Un}function $n(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Qn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function er(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function tr(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 nr=(e,t)=>{let n=Bn.createTransformer(t),r=Nn(e),i=Nn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yn.has(e)&&!i.values.length||Yn.has(t)&&!r.values.length?Xn(e,t):gt($n(tr(r,i),i.values),n):(`${e}${t}`,Un(e,t))},rr=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ir(e,t){let n=rr.exec(e);if(!n)return;let r=rr.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>qt(R(a,o,e))+i}function ar(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return R(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=ir(e,t);if(n)return n}return Qn(e)(e,t)}var or=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function sr(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var cr=40;function lr(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=or.reduce((e,t)=>(e[t]=sr(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ut.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,cr),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:or.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<or.length;t++)o[or[t]].cancel(e)},state:n,steps:o}}var{schedule:ur,cancel:dr,steps:fr}=lr(typeof requestAnimationFrame<`u`?requestAnimationFrame:ht,!0,Wt),pr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ur.update(t,e),stop:()=>dr(t),now:()=>Wt.isProcessing?Wt.timestamp:I.now()}},mr=(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)})`},hr=2e4;function gr(e,t=50,n=hr,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 _r(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(gr(r),hr);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:bt(i)}}var vr={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},yr=e=>e<0?1/Math.max(1+e,vr.minDamping):Math.max(1-e,vr.minDamping);function br(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 Cr(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function xr(e,t){return e*Math.sqrt(1-t*t)}var Sr=12;function Cr(e,t,n){let r=n;for(let n=1;n<Sr;n++)r-=e(r)/t(r);return r}var wr=.001;function Tr({duration:e=vr.duration,bounce:t=vr.bounce}){let n,r;vr.maxDuration;let i=yr(t);e=lt(vr.minDuration,vr.maxDuration,bt(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=xr(t,i),o=Math.exp(-r);return wr-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=xr(t*t,i);return(-n(t)+wr>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=Cr(n,r,a),s=o*br(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:yt(e)}}var Er=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Dr(e,t){if(Er(e,t))return e}function Or(e){let t=Dr(e.stiffness),n=Dr(e.damping,!0),r=Dr(e.mass),i={...e,stiffness:t??vr.stiffness,damping:n??vr.damping,mass:r??vr.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=yr(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*br(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Tr(i)),i.isResolvedFromDuration=!0;(!Er(i.stiffness)||!Er(i.damping,!0))&&(i.stiffness=vr.stiffness,i.damping=vr.damping)}return i}function kr(e=vr.visualDuration,t=vr.bounce){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}=Or({...n}),f=e=>d?0:-bt(e),p=s/(2*Math.sqrt(o*c)),m=bt(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?vr.restSpeed.granular:vr.restSpeed.default),g.restDelta=n.restDelta||(e?vr.restDelta.granular:vr.restDelta.default)};_();let v,y,b;if(p<1){let e=xr(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=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-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=>yt(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=yt(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(gr(S),hr),t=mr(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}kr.applyToOptions=e=>{let t=_r(e,100,kr);return e.ease=t.ease,e.duration=yt(t.duration),e.type=`keyframes`,e};function Ar({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===void 0?g:o(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?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=kr({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 jr(e,t,n){let r=[],i=n||ut.mix||ar,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=gt(Array.isArray(t)?t[n]||ht:t,a)),r.push(a)}return r}function Mr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,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=jr(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=_t(e[r],e[r+1],n);return s[r](i)};return n?t=>l(lt(e[0],e[a-1],t)):l}function Nr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=_t(0,t,r);e.push(R(n,1,i))}}function Pr(e){let t=[0];return Nr(t,e.length-1),t}function Fr(e,t){return e.map(e=>e*t)}function Ir(e,t){return e.map(()=>t||Rt).splice(0,e.length-1)}function Lr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=zt(r)?r.map(Ut):Ut(r)||Rt,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(ut.mix||ar)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?lt(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Mr(Fr(n&&n.length===t.length?n:Pr(t),e),t,{ease:Array.isArray(i)?i:Ir(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Rr=5;function zr(e,t,n){let r=Math.max(t-Rr,0);return xt(n-e(r),t-r)}function Br(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):zr(t=>e.next(t).value,t,e.next(t).value)}var Vr=e=>e!==null;function Hr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Vr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ur={decay:Ar,inertia:Ar,tween:Lr,keyframes:Lr,spring:kr};function Wr(e){typeof e.type==`string`&&(e.type=Ur[e.type])}function Gr(e,t){return{kind:e,animation:t,timestamp:I.now(),frameTimestamp:Wt.timestamp,frameIsProcessing:Wt.isProcessing}}function Kr(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Gr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function qr(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Gr(`layout-animation-start`,e),node:t})}catch{}}var Jr=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)}},Yr=e=>e/100,Xr=class extends Jr{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;e&&e.updatedAt!==I.now()&&this.tick(I.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Kr(this,this.options)}initAnimation(){let{options:e}=this;Wr(e);let{type:t=Lr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Lr;s!==Lr&&typeof o[0]!=`number`&&(this.mixKeyframes=gt(Yr,ar(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=gr(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;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 g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=lt(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Ar&&(b.value=Hr(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return bt(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+bt(e)}get time(){return bt(this.currentTime)}set time(e){e=yt(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 Br(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(I.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=bt(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=pr,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??n:this.startTime=n-this.holdTime,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(I.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Zr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Qr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(rn)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Zr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var $r=/\b([a-z-]*)\(.*?\)/gu,ei={...Bn,getAnimatableNone:e=>{let t=e.match($r);return t?t.map(Qr).join(` `):e}},ti={...Bn,getAnimatableNone:e=>{let t=Bn.parse(e);return Bn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ni={...en,transform:Math.round},ri={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:hn,pathRotation:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scale:nn,scaleX:nn,scaleY:nn,scaleZ:nn,skew:hn,skewX:hn,skewY:hn,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:tn,originX:yn,originY:yn,originZ:L,zIndex:ni,fillOpacity:tn,strokeOpacity:tn,numOctaves:ni},ii={...ri,color:xn,backgroundColor:xn,outlineColor:xn,fill:xn,stroke:xn,borderColor:xn,borderTopColor:xn,borderRightColor:xn,borderBottomColor:xn,borderLeftColor:xn,filter:ei,WebkitFilter:ei,mask:ti,WebkitMask:ti},ai=e=>ii[e],oi=new Set([ei,ti]);function si(e,t){let n=ai(e);return oi.has(n)||(n=Bn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function ci(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var li=e=>e*180/Math.PI,ui=e=>fi(li(Math.atan2(e[1],e[0]))),di={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ui,rotateZ:ui,skewX:e=>li(Math.atan(e[1])),skewY:e=>li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fi=e=>(e%=360,e<0&&(e+=360),e),pi=ui,mi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),hi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mi,scaleY:hi,scale:e=>(mi(e)+hi(e))/2,rotateX:e=>fi(li(Math.atan2(e[6],e[5]))),rotateY:e=>fi(li(Math.atan2(-e[2],e[0]))),rotateZ:pi,rotate:pi,skewX:e=>li(Math.atan(e[4])),skewY:e=>li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _i(e){return+!!e.includes(`scale`)}function vi(e,t){if(!e||e===`none`)return _i(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=gi,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=di,i=t}if(!i)return _i(t);let a=r[t],o=i[1].split(`,`).map(bi);return typeof a==`function`?a(o):o[a]}var yi=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return vi(n,t)};function bi(e){return parseFloat(e.trim())}var xi=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Si=new Set([...xi,`pathRotation`]),Ci=e=>e===en||e===L,wi=new Set([`x`,`y`,`z`]),Ti=xi.filter(e=>!wi.has(e));function Ei(e){let t=[];return Ti.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 Di=new Set([`bottom`,`right`]);function Oi(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 ki={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Oi(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Oi(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:({transform:e})=>vi(e,`x`),y:({transform:e})=>vi(e,`y`)};ki.translateX=ki.x,ki.translateY=ki.y;var Ai=new Set,ji=!1,Mi=!1,Ni=!1;function Pi(){if(Mi){let e=[],t=new Set,n=new Set;Ai.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Di.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Ei(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)})}Mi=!1,ji=!1,Ai.forEach(e=>e.complete(Ni)),Ai.clear()}function Fi(){Ai.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mi=!0)})}function Ii(){Ni=!0,Fi(),Pi(),Ni=!1}function Li(e,t,n){if(typeof e==`string`){if(dt(e)||pt(e))return parseFloat(e);if(!Bn.test(e)&&Bn.test(n))return si(t,n)}return e??void 0}var Ri=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?(Ai.add(this),ji||(ji=!0,ur.read(Fi),ur.resolveKeyframes(Pi))):(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=Li(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])}ci(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ai.delete(this)}cancel(){this.state===`scheduled`&&(Ai.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},zi=e=>e.startsWith(`--`);function Bi(e,t,n){zi(t)?e.style.setProperty(t,n):e.style[t]=n}var Vi={};function Hi(e,t){let n=mt(e);return()=>Vi[t]??n()}var Ui=Hi(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Wi=Hi(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ki={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gi([0,.65,.55,1]),circOut:Gi([.55,0,1,.45]),backIn:Gi([.31,.01,.66,-.59]),backOut:Gi([.33,1.53,.69,.99])};function qi(e,t){if(e)return typeof e==`function`?Wi()?mr(e,t):`ease-out`:Bt(e)?Gi(e):Array.isArray(e)?e.map(e=>qi(e,t)||Ki.easeOut):Ki[e]}function Ji(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=qi(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 Yi(e){return typeof e==`function`&&`applyToOptions`in e}function Xi({type:e,...t}){return Yi(e)&&Wi()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Zi=class extends Jr{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,e.type;let c=Xi(e);this.animation=Ji(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Hr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Bi(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Kr(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(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 bt(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+bt(e)}get time(){return bt(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=yt(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?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=null,e&&Ui()?(this.animation.timeline=e,t?.(this.animation),ht):n(this)}},Qi={anticipate:Mt,backInOut:jt,circInOut:Ft};function $i(e){return e in Qi}function ea(e){typeof e.ease==`string`&&$i(e.ease)&&(e.ease=Qi[e.ease])}var ta=10,na=class extends Zi{constructor(e){ea(e),Wr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Xr({...a,autoplay:!1}),s=Math.max(ta,I.now()-this.startTime),c=lt(0,ta,s-ta),l=o.sample(s).value,{name:u}=this.options;i&&u&&Bi(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ra=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Bn.test(e)||e===`0`)&&!e.startsWith(`url(`));function z(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 ia(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=ra(i,t),s=ra(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):z(e)||(n===`spring`||Yi(n))&&r}function aa(e){e.duration=0,e.type=`keyframes`}var oa=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),sa=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ca(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&sa.test(e[t]))return!0;return!1}var la=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ua=mt(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function da(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(oa.has(n)||la.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 ua()&&(oa.has(n)||la.has(n)&&ca(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var fa=40,pa=class extends Jr{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.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||Ri;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=I.now();let u=!0;ia(e,i,a,o)||(u=!1,(ut.instantAnimations||!s)&&l?.(Hr(e,n,t)),e[0]=e[e.length-1],aa(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>fa?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&da(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new na(n)}catch{m=new Xr(n)}}else m=new Xr(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(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ii()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function ma(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 ha=30,ga=e=>!isNaN(parseFloat(e)),_a={current:void 0},va=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=I.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),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=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ga(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 vt)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new vt,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(){ur.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){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _a.current&&_a.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ha)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ha);return xt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ya(e,t){return new va(e,t)}function ba(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function xa(e,t){let n=e?.[t]??e?.default??e;return n===e?n:ba(n,e)}var Sa={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ca=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wa={type:`keyframes`,duration:.8},Ta={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Ea=(e,{keyframes:t})=>t.length>2?wa:Si.has(e)?e.startsWith(`scale`)?Ca(t[1]):Sa:Ta,Da=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Oa(e){for(let t in e)if(!Da.has(t))return!0;return!1}var ka=(e,t,n,r={},i,a)=>o=>{let s=xa(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=yt(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};Oa(s)||Object.assign(u,Ea(e,u)),u.duration&&=yt(u.duration),u.repeatDelay&&=yt(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(aa(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,aa(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Hr(u.keyframes,s);if(e!==void 0){ur.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Xr(u):new pa(u)},Aa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ja(e){let t=Aa.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ma(e,t,n=1){`${e}`;let[r,i]=ja(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return dt(e)?parseFloat(e):e}return Zt(i)?Ma(i,t,n+1):i}function Na(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pa(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Na(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Fa(e,t,n){return Pa(e.getProps(),t,n,e)}var Ia=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,La=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...xi]),Ra=e=>Array.isArray(e);function za(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ya(n))}function Ba(e){return Ra(e)?e[e.length-1]||0:e}function Va(e,t){let{transitionEnd:n={},transition:r={},...i}=Fa(e,t)||{};i={...i,...n};for(let t in i)za(e,t,Ba(i[t]))}var Ha=e=>!!(e&&e.getVelocity);function Ua(e){return!!(Ha(e)&&e.add)}function Wa(e,t){let n=e.getValue(`willChange`);if(Ua(n))return n.add(t);if(!n&&ut.WillChange){let n=new ut.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ga(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ka=`data-`+Ga(`framerAppearId`);function qa(e){return e.props[Ka]}var Ja=typeof window<`u`;function Ya({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Xa(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?ba(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.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&&Ya(f,t))continue;let o={delay:n,...xa(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ur.update(()=>r.set(i));continue}let p=!1;if(Ja&&window.MotionHandoffAnimation){let n=qa(e);if(n){let e=window.MotionHandoffAnimation(n,t,ur);e!==null&&(o.startTime=e,p=!0)}}Wa(e,t);let m=l??e.shouldReduceMotion;r.start(ka(t,r,i,m&&La.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ur.update(()=>{o&&Va(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Za(e,t,n={}){let r=Fa(e,t,Ia(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Xa(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(Za(e,t,{...n,delay:r+(typeof o==`function`?0:o)+ma(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 Qa(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Za(e,t,n))):typeof t==`string`?Za(e,t,n):Promise.all(Xa(e,Fa(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var $a={test:e=>e===`auto`,parse:e=>e},eo=e=>t=>t.test(e),to=[en,L,gn,hn,vn,_n,$a],no=e=>to.find(eo(e));function ro(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||pt(e)}var io=new Set([`auto`,`none`,`0`]);function ao(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!io.has(t)&&Mn(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=si(n,i))}var oo=class extends Ri{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Zt(r))){let i=Ma(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!La.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=no(r),o=no(i);if($t(r)!==$t(i)&&ki[n]){this.needsMeasurement=!0;return}if(a!==o){if(Ci(a)&&Ci(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ki[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ro(e[t]))&&n.push(t);n.length&&ao(e,n,t)}measure(){let{element:e,name:t}=this;return ki[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!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||!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.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},so=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function co(e){return ft(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function lo(e){return ft(e)&&`ownerSVGElement`in e}var uo=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function fo(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var po={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},mo=xi.length;function ho(e,t,n){let r=``,i=!0;for(let a=0;a<mo;a++){let o=xi[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=uo(s,ri[o]);if(!c){i=!1;let t=po[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${uo(a,ri.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function go(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(Si.has(e)){o=!0;continue}if(Yt(e)){i[e]=n;continue}{let t=uo(n,ri[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ho(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 _o={offset:`stroke-dashoffset`,array:`stroke-dasharray`},vo={offset:`strokeDashoffset`,array:`strokeDasharray`};function yo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?_o:vo;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var bo=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function xo(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(go(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 bo)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&&yo(d,i,a,o,!1)}function So({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Co({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function wo(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 To(e){return e===void 0||e===1}function Eo({scale:e,scaleX:t,scaleY:n}){return!To(e)||!To(t)||!To(n)}function Do(e){return Eo(e)||Oo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Oo(e){return ko(e.x)||ko(e.y)}function ko(e){return e&&e!==`0%`}function Ao(e,t,n){return n+t*(e-n)}function jo(e,t,n,r,i){return i!==void 0&&(e=Ao(e,i,r)),Ao(e,n,r)+t}function Mo(e,t=0,n=1,r,i){e.min=jo(e.min,t,n,r,i),e.max=jo(e.max,t,n,r,i)}function No(e,{x:t,y:n}){Mo(e.x,t.translate,t.scale,t.originPoint),Mo(e.y,n.translate,n.scale,n.originPoint)}var Po=.999999999999,Fo=1.0000000000001;function Io(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;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Lo(e.x,-a.scroll.offset.x),Lo(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,No(e,o)),r&&Do(a.latestValues)&&Bo(e,a.latestValues,a.layout?.layoutBox))}t.x<Fo&&t.x>Po&&(t.x=1),t.y<Fo&&t.y>Po&&(t.y=1)}function Lo(e,t){e.min+=t,e.max+=t}function Ro(e,t,n,r,i=.5){Mo(e,t,n,R(e.min,e.max,i),r)}function zo(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Bo(e,t,n){let r=n??e;Ro(e.x,zo(t.x,r.x),t.scaleX,t.scale,t.originX),Ro(e.y,zo(t.y,r.y),t.scaleY,t.scale,t.originY)}function Vo(e,t){return So(wo(e.getBoundingClientRect(),t))}function B(e,t,n){let r=Vo(e,n),{scroll:i}=t;return i&&(Lo(r.x,i.offset.x),Lo(r.y,i.offset.y)),r}var{schedule:Ho,cancel:Uo}=lr(queueMicrotask,!1),Wo={x:!1,y:!1};function Go(){return Wo.x||Wo.y}function Ko(e){return e===`x`||e===`y`?Wo[e]?null:(Wo[e]=!0,()=>{Wo[e]=!1}):Wo.x||Wo.y?null:(Wo.x=Wo.y=!0,()=>{Wo.x=Wo.y=!1})}function qo(e,t){let n=fo(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Jo(e){return!(e.pointerType===`touch`||Go())}function Yo(e,t,n={}){let[r,i,a]=qo(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=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Jo(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 Xo=(e,t)=>t?e===t||Xo(e,t.parentElement):!1,Zo=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Qo=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function $o(e){return Qo.has(e.tagName)||e.isContentEditable===!0}var es=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ts(e){return es.has(e.tagName)||e.isContentEditable===!0}var ns=new WeakSet;function rs(e){return t=>{t.key===`Enter`&&e(t)}}function is(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var as=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=rs(()=>{if(ns.has(n))return;is(n,`down`);let e=rs(()=>{is(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>is(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function os(e){return Zo(e)&&!Go()}var ss=new WeakSet;function cs(e,t,n={}){let[r,i,a]=qo(e,n),o=e=>{let r=e.currentTarget;if(!os(e)||ss.has(e))return;ns.add(r),n.stopPropagation&&ss.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),ns.has(r)&&ns.delete(r),os(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Xo(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),co(e)&&(e.addEventListener(`focus`,e=>as(e,i)),!$o(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ls=new WeakMap,us,ds=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:lo(r)&&`getBBox`in r?r.getBBox()[t]:r[n],fs=ds(`inline`,`width`,`offsetWidth`),ps=ds(`block`,`height`,`offsetHeight`);function ms({target:e,borderBoxSize:t}){ls.get(e)?.forEach(n=>{n(e,{get width(){return fs(e,t)},get height(){return ps(e,t)}})})}function hs(e){e.forEach(ms)}function gs(){typeof ResizeObserver<`u`&&(us=new ResizeObserver(hs))}function _s(e,t){us||gs();let n=fo(e);return n.forEach(e=>{let n=ls.get(e);n||(n=new Set,ls.set(e,n)),n.add(t),us?.observe(e)}),()=>{n.forEach(e=>{let n=ls.get(e);n?.delete(t),n?.size||us?.unobserve(e)})}}var vs=new Set,ys;function bs(){ys=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};vs.forEach(t=>t(e))},window.addEventListener(`resize`,ys)}function xs(e){return vs.add(e),ys||bs(),()=>{vs.delete(e),!vs.size&&typeof ys==`function`&&(window.removeEventListener(`resize`,ys),ys=void 0)}}function Ss(e,t){return typeof e==`function`?xs(e):_s(e,t)}var Cs={value:null,addProjectionMetrics:null};function ws(e){return lo(e)&&e.tagName===`svg`}var Ts=e=>typeof e==`number`?e:parseFloat(e),Es=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ds=()=>({x:Es(),y:Es()}),Os=()=>({min:0,max:0}),ks=()=>({x:Os(),y:Os()}),As=new WeakMap;function js(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Ms(e){return typeof e==`string`||Array.isArray(e)}var Ns=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ps=[`initial`,...Ns];function Fs(e){if(js(e.animate))return!0;for(let t=0;t<Ps.length;t++)if(Ms(e[Ps[t]]))return!0;return!1}function Is(e){return!!(Fs(e)||e.variants)}function Ls(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Ha(i))e.addValue(r,i);else if(Ha(a))e.addValue(r,ya(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,ya(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Rs={current:null},zs={current:!1},Bs=typeof window<`u`;function Vs(){if(zs.current=!0,Bs){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Rs.current=e.matches;e.addEventListener(`change`,t),t()}else Rs.current=!1}}var Hs=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Us={};function Ws(e){Us=e}function Gs(){return Us}var Ks=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=Ri,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=I.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ur.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=Fs(t),this.isVariantNode=Is(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&&Ha(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,As.set(e,this),this.projection&&!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:(zs.current||Vs(),this.shouldReduceMotion=Rs.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&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,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&oa.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Zi({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:yt(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Si.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ur.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&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 Us){let t=Us[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):ks()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Hs.length;t++){let n=Hs[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Ls(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}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);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=ya(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`&&(dt(n)||pt(n))?n=parseFloat(n):typeof n!=`number`&&!Bn.test(n)&&Bn.test(t)&&(n=si(e,t)),this.setBaseTarget(e,Ha(n)?n.get():n)),Ha(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new vt),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Ho.render(this.render)}},qs=class extends Ks{constructor(){super(...arguments),this.KeyframeResolver=oo}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;Ha(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Js=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ys(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])}var Xs={};function Zs(e,{layout:t,layoutId:n}){return Si.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Xs[e]||e===`opacity`)}function Qs(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Ha(r[t])||i&&Ha(i[t])||Zs(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function $s(e){return window.getComputedStyle(e)}var ec=class extends qs{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ys}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Si.has(t))return this.projection?.isProjecting?_i(t):yi(e,t);{let n=$s(e),r=(Yt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Vo(e,t)}build(e,t,n){go(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Qs(e,t,n)}},tc=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`]),nc=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function rc(e,t,n,r){Ys(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(tc.has(n)?n:Ga(n),t.attrs[n])}function ic(e,t,n){let r=Qs(e,t,n);for(let n in e)if(Ha(e[n])||Ha(t[n])){let t=xi.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var ac=class extends qs{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=ks}getBaseTargetFromProps(e,t){return Si.has(t)?super.getBaseTargetFromProps(e,t)??_i(t):e[t]}getDefaultValue(e){return Si.has(e)?this.latestValues[e]??_i(e):void 0}readValueFromInstance(e,t){if(Si.has(t)){let e=ai(t);return e&&e.default||0}if(bo.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=tc.has(t)?t:Ga(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ic(e,t,n)}build(e,t,n){xo(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){rc(e,t,n,r)}mount(e){this.isSVGTag=nc(e.tagName),super.mount(e)}};function oc(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 sc=[...Ns].reverse();function cc(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Qa(e,t,n))),n=uc(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(sc.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Ms(g)||g===!1?g:void 0:h,v=Ms(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||js(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=lc(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=Fa(e,n,Ia(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!oc(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Fa(s,n)?.transition?.delayChildren;r.delay=ma(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Fa(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Ha(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):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=uc(),i=!0}}}function lc(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!oc(t,e):!1}function uc(){let e={};for(let t of Ns)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function dc(e,t){e.min=t.min,e.max=t.max}function fc(e,t){dc(e.x,t.x),dc(e.y,t.y)}function pc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var mc=.9999,hc=1.0001,gc=-.01,_c=.01;function vc(e){return e.max-e.min}function yc(e,t,n){return Math.abs(e-t)<=n}function bc(e,t,n,r=.5){e.origin=r,e.originPoint=R(t.min,t.max,e.origin),e.scale=vc(n)/vc(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=mc&&e.scale<=hc||isNaN(e.scale))&&(e.scale=1),(e.translate>=gc&&e.translate<=_c||isNaN(e.translate))&&(e.translate=0)}function xc(e,t,n,r){bc(e.x,t.x,n.x,r?r.originX:void 0),bc(e.y,t.y,n.y,r?r.originY:void 0)}function Sc(e,t,n,r=0){e.min=(r?R(n.min,n.max,r):n.min)+t.min,e.max=e.min+vc(t)}function Cc(e,t,n,r){Sc(e.x,t.x,n.x,r?.x),Sc(e.y,t.y,n.y,r?.y)}function wc(e,t,n,r=0){let i=r?R(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+vc(t)}function Tc(e,t,n,r){wc(e.x,t.x,n.x,r?.x),wc(e.y,t.y,n.y,r?.y)}function Ec(e,t,n,r,i){return e-=t,e=Ao(e,1/n,r),i!==void 0&&(e=Ao(e,1/i,r)),e}function Dc(e,t=0,n=1,r=.5,i,a=e,o=e){if(gn.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=R(a.min,a.max,r);e===a&&(s-=t),e.min=Ec(e.min,t,n,s,i),e.max=Ec(e.max,t,n,s,i)}function Oc(e,t,[n,r,i],a,o){Dc(e,t[n],t[r],t[i],t.scale,a,o)}var kc=[`x`,`scaleX`,`originX`],Ac=[`y`,`scaleY`,`originY`];function jc(e,t,n,r){Oc(e.x,t,kc,n?n.x:void 0,r?r.x:void 0),Oc(e.y,t,Ac,n?n.y:void 0,r?r.y:void 0)}function Mc(e){return e.translate===0&&e.scale===1}function Nc(e){return Mc(e.x)&&Mc(e.y)}function Pc(e,t){return e.min===t.min&&e.max===t.max}function Fc(e,t){return Pc(e.x,t.x)&&Pc(e.y,t.y)}function Ic(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lc(e,t){return Ic(e.x,t.x)&&Ic(e.y,t.y)}function Rc(e){return vc(e.x)/vc(e.y)}function zc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Bc(e){return[e(`x`),e(`y`)]}function Vc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Hc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(L.test(e))e=parseFloat(e);else return e}return`${Vc(e,t.target.x)}% ${Vc(e,t.target.y)}%`}},Uc={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Bn.parse(e);if(i.length>5)return r;let a=Bn.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=R(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 Wc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Gc=so.length,Kc=e=>typeof e==`number`||L.test(e);function qc(e,t,n,r,i,a){i?(e.opacity=R(0,n.opacity??1,Yc(r)),e.opacityExit=R(t.opacity??1,0,Xc(r))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,r));for(let i=0;i<Gc;i++){let a=so[i],o=Jc(t,a),s=Jc(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Kc(o)===Kc(s)?(e[a]=Math.max(R(Ts(o),Ts(s),r),0),(gn.test(s)||gn.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,r))}function Jc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Yc=Zc(0,.5,Pt),Xc=Zc(.5,.95,ht);function Zc(e,t,n){return r=>r<e?0:r>t?1:n(_t(e,t,r))}function Qc(e,t,n){let r=Ha(e)?e:ya(e);return r.start(ka(``,r,t,n)),r.animation}function $c(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var el=(e,t)=>e.depth-t.depth,tl=class{constructor(){this.children=[],this.isDirty=!1}add(e){st(this.children,e),this.isDirty=!0}remove(e){ct(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(el),this.isDirty=!1,this.children.forEach(e)}};function nl(e,t){let n=I.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(dr(r),e(a-t))};return ur.setup(r,!0),()=>dr(r)}function rl(e){return Ha(e)?e.get():e}var il=class{constructor(){this.members=[]}add(e){st(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&&(ct(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(ct(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)}},al={borderRadius:{...Hc,applyTo:[...so]},borderTopLeftRadius:Hc,borderTopRightRadius:Hc,borderBottomLeftRadius:Hc,borderBottomRightRadius:Hc,boxShadow:Uc},ol={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Xs,{...al,...Xs});var sl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cl=[``,`X`,`Y`,`Z`],ll=1e3,ul=0;function dl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=qa(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ur,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fl(r)}function pl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=ul++,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,Cs.value&&(sl.nodes=sl.calculatedTargetDeltas=sl.calculatedProjections=0),this.nodes.forEach(gl),this.nodes.forEach(El),this.nodes.forEach(Dl),this.nodes.forEach(_l),Cs.addProjectionMetrics&&Cs.addProjectionMetrics(sl)},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 tl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new vt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=lo(t)&&!ws(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&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ur.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=nl(i,250),ol.hasAnimatedSinceResize&&(ol.hasAnimatedSinceResize=!1,this.nodes.forEach(Tl)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Pl,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Lc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...xa(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Tl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ol),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&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}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(bl),this.nodes.forEach(yl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Sl),this.nodes.forEach(Cl),this.nodes.forEach(wl),this.nodes.forEach(ml),this.nodes.forEach(hl)):this.nodes.forEach(xl),this.clearAllSnapshots();let e=I.now();Wt.delta=lt(0,1e3/60,e-Wt.timestamp),Wt.timestamp=e,Wt.isProcessing=!0,fr.update.process(Wt),fr.preRender.process(Wt),fr.render.process(Wt),Wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ho.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vl),this.sharedNodes.forEach(kl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ur.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ur.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!vc(this.snapshot.measuredBox.x)&&!vc(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||=ks(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Nc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Do(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)),Rl(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return ks();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Bl))){let{scroll:e}=this.root;e&&(Lo(t.x,e.offset.x),Lo(t.y,e.offset.y))}return t}removeElementScroll(e){let t=ks();if(fc(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&&fc(t,e),Lo(t.x,i.offset.x),Lo(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||ks();fc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Lo(r.x,-n.scroll.offset.x),Lo(r.y,-n.scroll.offset.y)),Do(n.latestValues)&&Bo(r,n.latestValues,n.layout?.layoutBox)}return Do(this.latestValues)&&Bo(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=ks();fc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Do(n.latestValues))continue;let r;n.instance&&(Eo(n.latestValues)&&n.updateSnapshot(),r=ks(),fc(r,n.measurePageBox())),jc(t,n.latestValues,n.snapshot?.layoutBox,r)}return Do(this.latestValues)&&jc(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}}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!==Wt.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=Wt.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=ks(),this.targetWithTransforms=ks()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):fc(this.target,this.layout.layoutBox),No(this.target,this.targetDelta)):fc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Cs.value&&sl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Eo(this.parent.latestValues)||Oo(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=ks(),this.relativeTargetOrigin=ks(),Tc(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),fc(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===Wt.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;fc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Io(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=ks());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pc(this.prevProjectionDelta.x,this.projectionDelta.x),pc(this.prevProjectionDelta.y,this.projectionDelta.y)),xc(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!zc(this.projectionDelta.x,this.prevProjectionDelta.x)||!zc(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Cs.value&&sl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ds(),this.projectionDelta=Ds(),this.projectionDeltaWithTransform=Ds()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=ks(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Nl));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=R(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=R(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Al(o.x,e.x,n),Al(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ml(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Fc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=ks(),fc(f,this.relativeTarget)),c&&(this.animationValues=a,qc(a,i,this.latestValues,n,d,u)),r&&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&&=(dr(this.pendingAnimation),void 0),this.pendingAnimation=ur.update(()=>{ol.hasAnimatedSinceResize=!0,this.motionValue||=ya(0),this.motionValue.jump(0,!1),this.currentAnimation=Qc(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()}}),qr(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&&this.mixTargetDelta(ll),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&&zl(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||ks();let t=vc(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=vc(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}fc(t,i),Bo(t,r),xc(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new il),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&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}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&dl(`z`,e,r,this.animationValues);for(let t=0;t<cl.length;t++)dl(`rotate${cl[t]}`,e,r,this.animationValues),dl(`skew${cl[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=rl(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=rl(t?.pointerEvents)||``),this.hasProjected&&!Do(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Wc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Xs){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Xs[t],c=a===`none`?i[t]:n(i[t],r);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=r===this?rl(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(yl),this.root.sharedNodes.clear()}}}function ml(e){e.updateLayout()}function hl(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;if(i===`size`)Bc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=vc(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;dc(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else zl(i,t.layoutBox,n)&&Bc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=vc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ds();xc(o,n,t.layoutBox);let s=Ds();a?xc(s,e.applyTransform(r,!0),t.measuredBox):xc(s,n,t.layoutBox);let c=!Nc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=ks();Tc(s,t.layoutBox,i.layoutBox,o);let c=ks();Tc(c,n,a.layoutBox,o),Lc(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gl(e){Cs.value&&sl.nodes++,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 _l(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vl(e){e.clearSnapshot()}function yl(e){e.clearMeasurements()}function bl(e){e.isLayoutDirty=!0,e.updateLayout()}function xl(e){e.isLayoutDirty=!1}function Sl(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Cl(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function wl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Tl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function El(e){e.resolveTargetDelta()}function Dl(e){e.calcProjection()}function Ol(e){e.resetSkewAndRotation()}function kl(e){e.removeLeadSnapshot()}function Al(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jl(e,t,n,r){e.min=R(t.min,n.min,r),e.max=R(t.max,n.max,r)}function Ml(e,t,n,r){jl(e.x,t.x,n.x,r),jl(e.y,t.y,n.y,r)}function Nl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Pl={duration:.45,ease:[.4,0,.1,1]},Fl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Il=Fl(`applewebkit/`)&&!Fl(`chrome/`)?Math.round:ht;function Ll(e){e.min=Il(e.min),e.max=Il(e.max)}function Rl(e){Ll(e.x),Ll(e.y)}function zl(e,t,n){return e===`position`||e===`preserve-aspect`&&!yc(Rc(t),Rc(n),.2)}function Bl(e){return e!==e.root&&e.scroll?.wasRoot}var Vl=pl({attachResizeListener:(e,t)=>$c(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Hl={current:void 0},Ul=pl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hl.current){let e=new Vl({});e.mount(window),e.setOptions({layoutScroll:!0}),Hl.current=e}return Hl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Wl=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Gl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Kl(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gl(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():Gl(e[t],null)}}}}function ql(...e){return m.useCallback(Kl(...e),e)}var Jl=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(co(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=co(e)&&e.offsetWidth||0,r=co(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}return null}componentDidUpdate(){}render(){return this.props.children}};function Yl({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(Wl),u=ql(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
2
+ [data-motion-pop-id="${o}"] {
3
+ position: absolute !important;
4
+ width: ${e}px !important;
5
+ height: ${u}px !important;
6
+ ${_}px !important;
7
+ ${v}px !important;
8
+ }
9
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,h.jsx)(Jl,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var Xl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=it(Zl),d=(0,m.useId)(),f=(0,m.useRef)(n),p=(0,m.useRef)(r);at(()=>{f.current=n,p.current=r});let g=!0,_=(0,m.useMemo)(()=>(g=!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=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&g&&(_={..._}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,h.jsx)(Yl,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,h.jsx)(ot.Provider,{value:_,children:e})};function Zl(){return new Map}function Ql(e=!0){let t=(0,m.useContext)(ot);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 $l=e=>e.key||``;function eu(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var tu=({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]=Ql(o),f=(0,m.useMemo)(()=>eu(e),[e]),p=o&&!u?[]:f.map($l),g=(0,m.useRef)(!0),_=it(()=>new Map),v=(0,m.useRef)(new Set),[y,b]=(0,m.useState)(f),[x,S]=(0,m.useState)(f);at(()=>{o&&!u&&!x.length&&d?.()},[u,o,x.length,d]),at(()=>{g.current=!1;for(let e=0;e<x.length;e++){let t=$l(x[e]);p.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==y){let e=[...f],t=0;for(let n of x){let r=p.indexOf($l(n));r===-1?(e.splice(t++,0,n),C.push(n)):t=r+C.length+1}return C.every(e=>_.get($l(e)))?e=f:a===`wait`&&(e=C),S(eu(e)),b(f),null}let{forceRender:w}=(0,m.useContext)(rt);return(0,h.jsx)(h.Fragment,{children:x.map(e=>{let m=$l(e),y=o&&!u?!1:f===x||p.includes(m);return(0,h.jsx)(Xl,{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&&(w?.(),b([]),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},m)})})},nu=(0,m.createContext)({strict:!1}),ru={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},iu=!1;function au(){if(iu)return;let e={};for(let t in ru)e[t]={isEnabled:e=>ru[t].some(t=>!!e[t])};Ws(e),iu=!0}function ou(){return au(),Gs()}function su(e){let t=ou();for(let n in e)t[n]={...t[n],...e[n]};Ws(t)}function cu({children:e,...t}){let n=(0,m.useContext)(Wl);t={...n,...t},t.transition=ba(t.transition,n.transition),t.isStatic=it(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,h.jsx)(Wl.Provider,{value:r,children:e})}var lu=(0,m.createContext)({});function uu(e,t){if(Fs(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ms(t)?t:void 0,animate:Ms(n)?n:void 0}}return e.inherit===!1?{}:t}function du(e){let{initial:t,animate:n}=uu(e,(0,m.useContext)(lu));return(0,m.useMemo)(()=>({initial:t,animate:n}),[fu(t),fu(n)])}function fu(e){return Array.isArray(e)?e.join(` `):e}var pu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mu(e,t,n){for(let r in t)!Ha(t[r])&&!Zs(r,n)&&(e[r]=t[r])}function hu({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=pu();return go(n,t,e),Object.assign({},n.vars,n.style)},[t])}function gu(e,t){let n=e.style||{},r={};return mu(r,n,e),Object.assign(r,hu(e,t)),r}function _u(e,t){let n={},r=gu(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 vu=()=>({...pu(),attrs:{}});function yu(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=vu();return xo(n,t,nc(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};mu(t,e.style,e),i.style={...t,...i.style}}return i}var bu=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.propagate.ignoreStrict.viewport`.split(`.`));function xu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||bu.has(e)}function Su(e,t){return e.startsWith(`on`)?!xu(e):t?.(e)??!xu(e)}function Cu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(Ha(e[a])||(Su(a,r)||n===!0&&xu(a)||!t&&!xu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var wu=[`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 Tu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(wu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Eu(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Tu(e)?yu:_u)(t,r,i,e),l=Cu(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>Ha(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function Du({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ou(n,r,i,e),renderState:t()}}function Ou(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=rl(a[e]);let{initial:o,animate:s}=e,c=Fs(e),l=Is(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`&&!js(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Pa(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 ku=e=>(t,n)=>{let r=(0,m.useContext)(lu),i=(0,m.useContext)(ot),a=()=>Du(e,t,r,i);return n?a():it(a)},Au=ku({scrapeMotionValuesFromProps:Qs,createRenderState:pu}),ju=ku({scrapeMotionValuesFromProps:ic,createRenderState:vu}),Mu=Symbol.for(`motionComponentSymbol`);function Nu(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 Pu=(0,m.createContext)({});function Fu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Iu(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(lu),s=(0,m.useContext)(nu),c=(0,m.useContext)(ot),l=(0,m.useContext)(Wl),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)(Pu);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&Lu(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[Ka],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return at(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),at(()=>{p.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Lu(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ru(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Fu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ru(e){if(e)return e.options.allowProjection===!1?Ru(e.parent):e.projection}function zu(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&su(r);let a=n?n===`svg`:Tu(e),o=a?ju:Au;function s(n,s){let c,l={...(0,m.useContext)(Wl),...n,layoutId:Bu(n)},{isStatic:u,isValidProp:d}=l,f=du(n),p=o(n,u);if(!u&&typeof window<`u`){Vu(l,r);let t=Hu(l);c=t.MeasureLayout,f.visualElement=Iu(e,p,l,i,t.ProjectionNode,a)}return(0,h.jsxs)(lu.Provider,{value:f,children:[c&&f.visualElement?(0,h.jsx)(c,{visualElement:f.visualElement,...l}):null,Eu(e,n,Nu(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[Mu]=e,c}function Bu({layoutId:e}){let t=(0,m.useContext)(rt).id;return t&&e!==void 0?t+`-`+e:e}function Vu(e,t){(0,m.useContext)(nu).strict}function Hu(e){let{drag:t,layout:n}=ou();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Uu(e,t){if(typeof Proxy>`u`)return zu;let n=new Map,r=(n,r)=>zu(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,zu(a,void 0,e,t)),n.get(a))})}var Wu=(e,t)=>t.isSVG??Tu(e)?new ac(t):new ec(t,{allowProjection:e!==m.Fragment}),Gu=class extends Js{constructor(e){super(e),e.animationState||=cc(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();js(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ku=0,qu={animation:{Feature:Gu},exit:{Feature:class extends Js{constructor(){super(...arguments),this.id=Ku++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Fa(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Ju(e){return{point:{x:e.pageX,y:e.pageY}}}var Yu=e=>t=>Zo(t)&&e(t,Ju(t));function Xu(e,t,n,r){return $c(e,t,Yu(n),r)}var Zu=({current:e})=>e?e.ownerDocument.defaultView:null,Qu=(e,t)=>Math.abs(e-t);function $u(e,t){let n=Qu(e.x,t.x),r=Qu(e.y,t.y);return Math.sqrt(n**2+r**2)}var ed=new Set([`auto`,`scroll`]),td=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=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=nd(this.lastRawMoveEventInfo,this.transformPagePoint));let e=rd(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=$u(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:I.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=nd(t,this.transformPagePoint),this.hasPendingMove=!0,ur.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&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=rd(e.type===`pointercancel`?this.lastMoveEventInfo:nd(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Zo(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=nd(Ju(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Wt;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,rd(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=gt(Xu(this.contextWindow,`pointermove`,this.handlePointerMove,d),Xu(this.contextWindow,`pointerup`,this.handlePointerUp,d),Xu(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ed.has(e.overflowX)||ed.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},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),ur.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),dr(this.updatePoint)}};function nd(e,t){return t?{point:t(e.point)}:e}function V(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rd({point:e},t){return{point:e,delta:V(e,U(t)),offset:V(e,H(t)),velocity:id(t,.1)}}function H(e){return e[0]}function U(e){return e[e.length-1]}function id(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=U(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>yt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>yt(t)*2&&(r=e[1]);let a=bt(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}function ad(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?R(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?R(n,e,r.max):Math.min(e,n)),e}function od(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 sd(e,{top:t,left:n,bottom:r,right:i}){return{x:od(e.x,n,i),y:od(e.y,t,r)}}function cd(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 ld(e,t){return{x:cd(e.x,t.x),y:cd(e.y,t.y)}}function ud(e,t){let n=.5,r=vc(e),i=vc(t);return i>r?n=_t(t.min,t.max-r,e.min):r>i&&(n=_t(e.min,e.max-i,t.min)),lt(0,1,n)}function dd(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 fd=.35;function pd(e=fd){return e===!1?e=0:e===!0&&(e=fd),{x:md(e,`left`,`right`),y:md(e,`top`,`bottom`)}}function md(e,t,n){return{min:hd(e,t),max:hd(e,n)}}function hd(e,t){return typeof e==`number`?e:e[t]||0}var gd=new WeakMap,_d=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ks(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ko(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(gn.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=vc(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ur.update(()=>i(e,t),!1,!0),Wa(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(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){this.currentDirection=xd(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&ur.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new td(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Zu(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&ur.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!bd(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ad(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Fu(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?sd(n.layoutBox,e):!1,this.elastic=pd(t),r!==this.constraints&&!Fu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Bc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=dd(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Fu(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=B(n,r.root,this.visualElement.getTransformPagePoint()),a=ld(r.layout.layoutBox,i);if(t){let e=t(Co(a));this.hasMutatedConstraints=!!e,e&&(a=So(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Bc(o=>{if(!bd(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Wa(this.visualElement,e),n.start(ka(e,n,0,t,this.visualElement,!1))}stopAnimation(){Bc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[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();Bc(e=>{if(!bd(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-R(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Fu(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Bc(e=>{let t=this.getAxisMotionValue(e).get();i[e]=ud({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Bc(t=>{let n=this.getAxisMotionValue(t);if(!bd(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(R(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;gd.set(this.visualElement,this);let e=this.visualElement.current,t=Xu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ts(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Fu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=yd(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ur.read(r);let o=$c(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Bc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=fd,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function vd(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function yd(e,t,n){let r=Ss(e,vd(n)),i=Ss(t,vd(n));return()=>{r(),i()}}function bd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xd(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Sd=class extends Js{constructor(e){super(e),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new _d(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Cd=e=>(t,n)=>{e&&ur.update(()=>e(t,n),!1,!0)},wd=class extends Js{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(e){this.session=new td(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zu(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Cd(e),onStart:Cd(t),onMove:Cd(n),onEnd:(e,t)=>{delete this.session,r&&ur.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Xu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Td=!1,Ed=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Td&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ol.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Td=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ur.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Ho.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Td=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Dd(e){let[t,n]=Ql(),r=(0,m.useContext)(rt);return(0,h.jsx)(Ed,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(Pu),isPresent:t,safeToRemove:n})}var Od={pan:{Feature:wd},drag:{Feature:Sd,ProjectionNode:Ul,MeasureLayout:Dd}};function kd(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ur.postRender(()=>i(t,Ju(t)))}var Ad=class extends Js{mount(){let{current:e}=this.node;e&&(this.unmount=Yo(e,(e,t)=>(kd(this.node,t,`Start`),e=>kd(this.node,e,`End`))))}unmount(){}},jd=class extends Js{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=gt($c(this.node.current,`focus`,()=>this.onFocus()),$c(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Md(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&ur.postRender(()=>i(t,Ju(t)))}var Nd=class extends Js{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=cs(e,(e,t)=>(Md(this.node,t,`Start`),(e,{success:t})=>Md(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Pd=new WeakMap,Fd=new WeakMap,Id=e=>{let t=Pd.get(e.target);t&&t(e)},Ld=e=>{e.forEach(Id)};function Rd({root:e,...t}){let n=e||document;Fd.has(n)||Fd.set(n,{});let r=Fd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ld,{root:e,...t})),r[i]}function zd(e,t,n){let r=Rd(t);return Pd.set(e,n),r.observe(e),()=>{Pd.delete(e),r.unobserve(e)}}var Bd={some:0,all:1},Vd=class extends Js{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:Bd[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=zd(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(Hd(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Hd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ud={inView:{Feature:Vd},tap:{Feature:Nd},focus:{Feature:jd},hover:{Feature:Ad}},Wd={layout:{ProjectionNode:Ul,MeasureLayout:Dd}},Gd=Uu({...qu,...Ud,...Od,...Wd},Wu),Kd=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&&A(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&&A(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,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(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,A(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}}}})),qd=o(((e,t)=>{t.exports=Kd()})),Jd=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.0`})),Yd=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=Jd()})),Xd=o((e=>{var t=qd(),n=d(),r=Yd();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`),ee=Symbol.for(`react.strict_mode`),A=Symbol.for(`react.profiler`),te=Symbol.for(`react.consumer`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),ie=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),j=Symbol.for(`react.legacy_hidden`),le=Symbol.for(`react.memo_cache_sentinel`),ue=Symbol.for(`react.view_transition`),de=Symbol.for(`react.recoverable`),fe=Symbol.iterator;function pe(e){return typeof e!=`object`||!e?null:(e=fe&&e[fe]||e[`@@iterator`],typeof e==`function`?e:null)}var me=Symbol.for(`react.client.reference`);function he(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case A:return`Profiler`;case ee:return`StrictMode`;case ie:return`Suspense`;case ae:return`SuspenseList`;case ce:return`Activity`;case ue:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case ne:return e.displayName||`Context`;case te:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?he(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var ge=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e={pending:!1,data:null,method:null,action:null},P=[],ve=-1;function F(e){return{current:e}}function ye(e){0>ve||(e.current=P[ve],P[ve]=null,ve--)}function be(e,t){ve++,P[ve]=e.current,e.current=t}var xe=F(null),Se=F(null),Ce=F(null),we=F(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gp(t),e=_p(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){var t=e.memoizedState;t!==null&&(ph._currentValue=t.memoizedState,be(we,e)),t=xe.current;var n=_p(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function Oe(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),ph._currentValue=_e)}var ke,Ae;function je(e){if(ke===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ke=t&&t[1]||``,Ae=-1<e.stack.indexOf(`
10
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
11
+ `+ke+e+Ae}var Me=!1;function Ne(e,t){if(!e||Me)return``;Me=!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(`
12
+ `),l=s.split(`
13
+ `);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=`
14
+ `+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{Me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?je(n):``}function Pe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je(`Lazy`);case 13:return e.child!==t&&t!==null?je(`Suspense Fallback`):je(`Suspense`);case 19:return je(`SuspenseList`);case 0:case 15:return Ne(e.type,!1);case 11:return Ne(e.type.render,!1);case 1:return Ne(e.type,!0);case 31:return je(`Activity`);case 30:return je(`ViewTransition`);default:return``}}function Fe(e){try{var t=``,n=null;do t+=Pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
15
+ Error generating stack: `+e.message+`
16
+ `+e.stack}}var Ie=Object.prototype.hasOwnProperty,Le=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,ze=t.unstable_shouldYield,Be=t.unstable_requestPaint,Ve=t.unstable_now,He=t.unstable_getCurrentPriorityLevel,Ue=t.unstable_ImmediatePriority,We=t.unstable_UserBlockingPriority,Ge=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,qe=t.unstable_IdlePriority,Je=t.log,Ye=t.unstable_setDisableYieldValue,Xe=null,Ze=null;function Qe(e){if(typeof Je==`function`&&Ye(e),Ze&&typeof Ze.setStrictMode==`function`)try{Ze.setStrictMode(Xe,e)}catch{}}var $e=Math.clz32?Math.clz32:nt,et=Math.log,tt=Math.LN2;function nt(e){return e>>>=0,e===0?32:31-(et(e)/tt|0)|0}var rt=256,it=262144,at=4194304;function ot(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 st(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=ot(n))):i=ot(o):i=ot(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ot(n))):i=ot(o)):i=ot(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 ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lt(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-$e(n),i=1<<r;t|=e[r],n&=~i}return t}function ut(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 dt(){var e=at;return at<<=1,!(at&62914560)&&(at=4194304),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mt(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-$e(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&&ht(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ht(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-$e(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$e(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function _t(e,t){var n=t&-t;return n=n&42?1:vt(n),(n&(e.suspendedLanes|t))===0?n:0}function vt(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 yt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:kh(e.type)):e}function xt(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var St=Math.random().toString(36).slice(2),Ct=`__reactFiber$`+St,wt=`__reactProps$`+St,Tt=`__reactContainer$`+St,Et=`__reactEvents$`+St,Dt=`__reactListeners$`+St,Ot=`__reactHandles$`+St,kt=`__reactResources$`+St,At=`__reactMarker$`+St,jt=`__reactLoad$`+St;function Mt(e){delete e[Ct],delete e[wt],delete e[Dt],delete e[Ot]}function Nt(e){var t;if(t=e[Ct])return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vm(e);e!==null;){if(n=e[Ct])return n;e=vm(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[Ct]||e[Tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function It(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Lt(e){e[At]=!0}function Rt(e){e[jt]=void 0}var zt=new Set,Bt={};function Vt(e,t){Ht(e,t),Ht(e+`Capture`,t)}function Ht(e,t){for(Bt[e]=t,e=0;e<t.length;e++)zt.add(t[e])}var Ut=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]*$`),Wt={},Gt={};function Kt(e){return Ie.call(Gt,e)?!0:Ie.call(Wt,e)?!1:Ut.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var I=!1;function qt(){var e=I;return I=!1,e}function Jt(e,t,n){if(Kt(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 Yt(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 Xt(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 Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function $t(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 en(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=$t(e,t,``+e[t])}}function tn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var nn=/[\n"\\]/g;function rn(e){return e.replace(nn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function an(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=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):sn(e,Zt(n)):o===`number`&&e.value==t?sn(e,Zt(e.value)):sn(e,Zt(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=``+Zt(s):e.removeAttribute(`name`)}function on(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)){en(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(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),en(e)}function sn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function cn(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=``+Zt(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 ln(e,t,n){if(t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Zt(n)}function un(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ge(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),en(e)}function dn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fn=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 pn(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||fn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function mn(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]=``,I=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(pn(e,a,r),I=!0)}else for(var o in t)t.hasOwnProperty(o)&&pn(e,o,t[o])}function hn(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 gn=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`]]),L=/^[\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 _n(e){return L.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function vn(){}var yn=null;function bn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,Sn=null;function Cn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(an(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="`+rn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[wt]||null;if(!a)throw Error(i(90));an(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&&tn(r)}break a;case`textarea`:ln(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}}}var wn=!1;function Tn(e,t,n){if(wn)return e(t,n);wn=!0;try{return e(t)}finally{if(wn=!1,(xn!==null||Sn!==null)&&(Wd(),xn&&(t=xn,e=Sn,Sn=xn=null,Cn(t),e)))for(t=0;t<e.length;t++)Cn(e[t])}}function En(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wt]||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 Dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var An=null,jn=null,Mn=null;function Nn(){if(Mn)return Mn;var e,t=jn,n=t.length,r,i=`value`in An?An.value:An.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 Mn=i.slice(e,1<r?1-r:void 0)}function Pn(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 Fn(){return!0}function In(){return!1}function Ln(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)?Fn:In,this.isPropagationStopped=In,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=Fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Fn)},persist:function(){},isPersistent:Fn}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zn=Ln(Rn),Bn=T({},Rn,{view:0,detail:0}),Vn=Ln(Bn),Hn,Un,R,Wn=T({},Bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==R&&(R&&e.type===`mousemove`?(Hn=e.screenX-R.screenX,Un=e.screenY-R.screenY):Un=Hn=0,R=e),Hn)},movementY:function(e){return`movementY`in e?e.movementY:Un}}),Gn=Ln(Wn),Kn=Ln(T({},Wn,{dataTransfer:0})),qn=Ln(T({},Bn,{relatedTarget:0})),Jn=Ln(T({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=Ln(T({},Rn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=Ln(T({},Rn,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=Ln(T({},Bn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=Ln(T({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=Ln(T({},Rn,{submitter:0})),ar=Ln(T({},Bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=Ln(T({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=Ln(T({},Wn,{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})),cr=Ln(T({},Rn,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=Dn&&`CompositionEvent`in window,dr=null;Dn&&`documentMode`in document&&(dr=document.documentMode);var fr=Dn&&`TextEvent`in window&&!dr,pr=Dn&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Nn(),Mn=jn=An=null,vr=!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 pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={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 Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){xn?Sn?Sn.push(r):Sn=[r]:xn=r,t=ep(t,`onChange`),0<t.length&&(n=new zn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){qf(e,0)}function Dr(e){if(tn(Ft(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(Dn){var Ar;if(Dn){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,bn(e)),Tn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Ie.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(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 Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=Dn&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=ep(Xr,`onSelect`),0<r.length&&(t=new zn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};Dn&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`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(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),Vt(t,[e])}var hi=0;function gi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Td.identifierPrefix;var n=hi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function _i(e){if(e==null||typeof e==`string`)return e;var t=null,n=Nd;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 vi(e,t){return e=_i(e),t=_i(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var yi=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)},bi=[],xi=0,Si=0;function Ci(){for(var e=xi,t=Si=xi=0;t<e;){var n=bi[t];bi[t++]=null;var r=bi[t];bi[t++]=null;var i=bi[t];bi[t++]=null;var a=bi[t];if(bi[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&&Di(n,i,a)}}function wi(e,t,n,r){bi[xi++]=e,bi[xi++]=t,bi[xi++]=n,bi[xi++]=r,Si|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ti(e,t,n,r){return wi(e,t,n,r),Oi(e)}function Ei(e,t){return wi(e,null,null,t),Oi(e)}function Di(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-$e(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Oi(e){if(50<Pd)throw Pd=0,Fd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ki={};function Ai(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 ji(e,t,n,r){return new Ai(e,t,n,r)}function Mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ni(e,t){var n=e.alternate;return n===null?(n=ji(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 Pi(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 Fi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Mi(r)&&(s=1);else if(typeof r==`string`)s=$m(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=ji(31,n,t,a),e.elementType=ce,e.lanes=o,e;case k:return Ii(n.children,a,o,t);case ee:s=8,a|=24;break;case A:return e=ji(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case ie:return e=ji(13,n,t,a),e.elementType=ie,e.lanes=o,e;case ae:return e=ji(19,n,t,a),e.elementType=ae,e.lanes=o,e;case j:case ue:return e=a|32,e=ji(30,n,t,e),e.elementType=ue,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ne:s=10;break a;case te:s=9;break a;case re:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ji(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ii(e,t,n,r){return e=ji(7,e,r,t),e.lanes=n,e}function Li(e,t,n){return e=ji(6,e,null,t),e.lanes=n,e}function Ri(e){var t=ji(18,null,null,0);return t.stateNode=e,t}function zi(e,t,n){return t=ji(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bi=new WeakMap;function Vi(e,t){if(typeof e==`object`&&e){var n=Bi.get(e);return n===void 0?(t={value:e,source:t,stack:Fe(t)},Bi.set(e,t),t):n}return{value:e,source:t,stack:Fe(t)}}var Hi=[],Ui=0,Wi=null,Gi=0,Ki=[],qi=0,Ji=null,Yi=1,Xi=``;function Zi(e,t){Hi[Ui++]=Gi,Hi[Ui++]=Wi,Wi=e,Gi=t}function Qi(e,t,n){Ki[qi++]=Yi,Ki[qi++]=Xi,Ki[qi++]=Ji,Ji=e;var r=Yi;e=Xi;var i=32-$e(r)-1;r&=~(1<<i),n+=1;var a=32-$e(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Yi=1<<32-$e(t)+i|n<<i|r,Xi=a+e}else Yi=1<<a|n<<i|r,Xi=e}function $i(e){e.return!==null&&(Zi(e,1),Qi(e,1,0))}function ea(e){for(;e===Wi;)Wi=Hi[--Ui],Hi[Ui]=null,Gi=Hi[--Ui],Hi[Ui]=null;for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Xi=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null}function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Xi,Ki[qi++]=Ji,Yi=t.id,Xi=t.overflow,Ji=e}var na=null,ra=null,z=!1,ia=null,aa=!1,oa=Error(i(519));function sa(e){throw pa(Vi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),oa}function ca(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[wt]=r,n){case`dialog`:K(`cancel`,t),K(`close`,t);break;case`iframe`:case`object`:case`embed`:K(`load`,t);break;case`video`:case`audio`:for(n=0;n<Gf.length;n++)K(Gf[n],t);break;case`source`:K(`error`,t);break;case`img`:case`image`:case`link`:K(`error`,t),K(`load`,t);break;case`details`:K(`toggle`,t);break;case`input`:K(`invalid`,t),on(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:K(`invalid`,t);break;case`textarea`:K(`invalid`,t),un(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||op(t.textContent,n)?(r.popover!=null&&(K(`beforetoggle`,t),K(`toggle`,t)),r.onScroll!=null&&K(`scroll`,t),r.onScrollEnd!=null&&K(`scrollend`,t),r.onClick!=null&&(t.onclick=vn),t=!0):t=!1,t||sa(e,!0)}function la(e){for(na=e.return;na;)switch(na.tag){case 5:case 31:case 13:aa=!1;return;case 27:case 3:aa=!0;return;default:na=na.return}}function ua(e){if(e!==na)return!1;if(!z)return la(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||yp(e.type,e.memoizedProps)),n=!n),n&&ra&&sa(e),la(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=_m(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=_m(e)}else t===27?(t=ra,Op(e.type)?(e=gm,gm=null,ra=e):ra=t):ra=na?hm(e.stateNode.nextSibling):null;return!0}function da(){ra=na=null,z=!1}function fa(){var e=ia;return e!==null&&(_d===null?_d=e:_d.push.apply(_d,e),ia=null),e}function pa(e){ia===null?ia=[e]:ia.push(e)}var ma=F(null),ha=null,ga=null;function _a(e,t,n){be(ma,t._currentValue),t._currentValue=n}function va(e){e._currentValue=ma.current,ye(ma)}function ya(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 ba(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),ya(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),ya(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),ya(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 xa(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;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ph]:e.push(ph))}a=a.return}return e!==null&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){ha=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(ha,e)}function Ta(e,t){return ha===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(i(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var Da=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()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(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 Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=Bf(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(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 Ua=M.S;M.S=function(e,t){if(bd=Ve(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=Ef;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=Ef;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=F(null);function Ga(){var e=Wa.current;return e===null?rd.pooledCache:e}function Ka(e,t){t===null?be(Wa,Wa.current):be(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(i(460)),Ya=Error(i(474)),Xa=Error(i(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(vn,vn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(vn,vn);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,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(i(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(i(483))}var io=null,ao=0;function oo(e){var t=ao;return ao+=1,io===null&&(io=[]),$a(io,e,t)}function so(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function co(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 lo(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=Ni(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=Li(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),so(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&eo(i)===t.type)?(t=a(t,n.props),so(t,n),t.return=e,t):(t=Fi(n.type,n.key,n.props,null,e.mode,r),so(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=zi(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=Ii(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=Li(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Fi(t.type,t.key,t.props,null,e.mode,n),so(n,t),n.return=e,n;case O:return t=zi(t,e.mode,n),t.return=e,t;case se:return t=eo(t),f(e,t,n)}if(ge(t)||pe(t))return t=Ii(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,oo(t),n);if(t.$$typeof===ne)return f(e,Ta(e,t),n);co(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 se:return n=eo(n),p(e,t,n,r)}if(ge(n)||pe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,oo(n),r);if(n.$$typeof===ne)return p(e,t,Ta(e,n),r);co(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 se:return r=eo(r),m(e,t,n,r,i)}if(ge(r)||pe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,oo(r),i);if(r.$$typeof===ne)return m(e,t,n,Ta(t,r),i);co(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),z&&Zi(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 z&&Zi(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)}),z&&Zi(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),z&&Zi(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 z&&Zi(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)}),z&&Zi(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),so(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&eo(l)===r.type){n(e,r.sibling),c=a(r,o.props),so(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ii(o.props.children,e.mode,c,o.key),so(c,o),c.return=e,e=c):(c=Fi(o.type,o.key,o.props,null,e.mode,c),so(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=zi(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=eo(o),_(e,r,o,c)}if(ge(o))return h(e,r,o,c);if(pe(o)){if(l=pe(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,oo(o),c);if(o.$$typeof===ne)return _(e,r,Ta(e,o),c);co(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=Li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=ji(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(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 go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,V&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Oi(e),Di(e,null,n),t}return wi(e,r,t,n),Oi(e)}function vo(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,gt(e,n)}}function yo(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;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!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?(U&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!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:po=!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),dd|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=F(null),Eo=F(0);function Do(e,t){e=ld,be(Eo,e),be(To,t),ld=e|t.baseLanes}function Oo(){be(Eo,ld),be(To,To.current)}function ko(){ld=Eo.current,ye(To),ye(Eo)}var Ao=F(null),jo=null;function Mo(e){var t=e.alternate;be(Lo,Lo.current&1),be(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){be(Lo,Lo.current),be(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(be(Lo,Lo.current),be(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){be(Lo,Lo.current),be(Ao,Ao.current)}function Io(e){ye(Ao),jo===e&&(jo=null),ye(Lo)}var Lo=F(0);function Ro(e,t){be(Ao,Ao.current),be(Lo,t)}function zo(e){ye(Lo),ye(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||fm(n)||pm(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 Vo=0,B=null,Ho=null,Uo=null,Wo=!1,Go=!1,Ko=!1,qo=0,Jo=0,Yo=null,Xo=0;function Zo(){throw Error(i(321))}function Qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function $o(e,t,n,r,i,a){return Vo=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?gc:_c,Ko=!1,a=n(r,i),Ko=!1,Go&&(a=ts(t,n,r,i)),es(e),a}function es(e){M.H=hc;var t=Ho!==null&&Ho.next!==null;if(Vo=0,Uo=Ho=B=null,Wo=!1,Jo=0,Yo=null,t)throw Error(i(300));e===null||Pc||(e=e.dependencies,e!==null&&Sa(e)&&(Pc=!0))}function ts(e,t,n,r){B=e;var a=0;do{if(Go&&(Yo=null),Jo=0,Go=!1,25<=a)throw Error(i(301));if(a+=1,Uo=Ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=vc,o=t(n,r)}while(Go);return o}function ns(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?ls(t):t,e=e.useState()[0],(Ho===null?null:Ho.memoizedState)!==e&&(B.flags|=1024),t}function rs(){var e=qo!==0;return qo=0,e}function is(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function as(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Vo=0,Uo=Ho=B=null,Go=!1,Jo=qo=0,Yo=null}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?B.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function ss(){if(Ho===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?B.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?B.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ls(e){var t=Jo;return Jo+=1,Yo===null&&(Yo=[]),e=$a(Yo,e,t),t=B,(Uo===null?t.memoizedState:Uo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?gc:_c),e}function us(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ls(e);if(e.$$typeof===de)return;if(e.$$typeof===ne)return wa(e)}throw Error(i(438,String(e)))}function ds(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.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=cs(),B.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]=le;return t.index++,n}function fs(e,t){return typeof t==`function`?t(e):t}function ps(e){return ms(ss(),Ho,e)}function ms(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?(Vo&f)===f:(U&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===Ra&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ra&&(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,B.lanes|=p,dd|=p;f=u.action,Ko&&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,B.lanes|=f,dd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(Pc=!0,d&&(n=za,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 hs(e){var t=ss(),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);Br(o,t.memoizedState)||(Pc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function gs(e,t,n){var r=B,a=ss(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((Ho||a).memoizedState,n);if(s&&(a.memoizedState=n,Pc=!0),a=a.queue,Vs(ys.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Uo!==null&&!!(Uo.memoizedState.tag&1),Is(e?9:8,{destroy:void 0},vs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,rd===null)throw Error(i(349));o||Vo&127||_s(r,t,n)}return n}function _s(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=cs(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vs(e,t,n,r){t.value=n,t.getSnapshot=r,bs(t)&&xs(e)}function ys(e,t,n){return n(function(){bs(t)&&xs(e)})}function bs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function xs(e){var t=Ei(e,2);t!==null&&zd(t,e,2)}function Ss(e){var t=os();if(typeof e==`function`){var n=e;if(e=n(),Ko){Qe(!0);try{n()}finally{Qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:e},t}function Cs(e,t,n,r){return e.baseState=n,ms(e,Ho,typeof r==`function`?r:fs)}function ws(e,t,n,r,a){if(fc(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)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ts(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ts(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Es(e,t,s)}catch(n){Os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Es(e,t,a)}catch(n){Os(e,t,n)}}function Es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ds(e,t,n)},function(n){return Os(e,t,n)}):Ds(e,t,n)}function Ds(e,t,n){t.status=`fulfilled`,t.value=n,ks(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ts(e,n)))}function Os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ks(t),t=t.next;while(t!==r)}e.action=null}function ks(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function As(e,t){return t}function js(e,t){if(z){var n=rd.formState;if(n!==null){a:{var r=B;if(z){if(ra){b:{for(var i=ra,a=aa;i.nodeType!==8;){if(!a){i=null;break b}if(i=hm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ra=hm(i.nextSibling),r=i.data===`F!`;break a}}sa(r)}r=!1}r&&(t=n[0])}}return n=os(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:t},n.queue=r,n=lc.bind(null,B,r),r.dispatch=n,r=Ss(!1),a=dc.bind(null,B,!1,r.queue),r=os(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ws.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ms(e){return Ns(ss(),Ho,e)}function Ns(e,t,n){if(t=ms(e,t,As)[0],e=ps(fs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ls(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=ss();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,Is(9,{destroy:void 0},Ps.bind(null,i,n),null)),[r,a,e]}function Ps(e,t){e.action=t}function Fs(e){var t=ss(),n=Ho;if(n!==null)return Ns(t,n,e);ss(),t=t.memoizedState,n=ss();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=cs(),B.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 Ls(){return ss().memoizedState}function Rs(e,t,n,r){var i=os();B.flags|=e,i.memoizedState=Is(1|t,{destroy:void 0},n,r===void 0?null:r)}function zs(e,t,n,r){var i=ss();r=r===void 0?null:r;var a=i.memoizedState.inst;Ho!==null&&r!==null&&Qo(r,Ho.memoizedState.deps)?i.memoizedState=Is(t,a,n,r):(B.flags|=e,i.memoizedState=Is(1|t,a,n,r))}function Bs(e,t){Rs(8390656,8,e,t)}function Vs(e,t){zs(2048,8,e,t)}function Hs(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=cs(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Us(e){var t=ss().memoizedState;return Hs({ref:t,nextImpl:e}),function(){if(V&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ws(e,t){return zs(4,2,e,t)}function Gs(e,t){return zs(4,4,e,t)}function Ks(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 qs(e,t,n){n=n==null?null:n.concat([e]),zs(4,4,Ks.bind(null,t,e),n)}function Js(){}function Ys(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Qo(t,r[1]))return r[0];if(r=e(),Ko){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r}function Zs(e,t,n){return n===void 0||Vo&1073741824&&!(U&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ld(),B.lanes|=e,dd|=e,n)}function Qs(e,t,n,r){return Br(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(U&261930)?(Pc=!0,e.memoizedState=n):(e=Ld(),B.lanes|=e,dd|=e,t):(e=Zs(e,n,r),Br(e,t)||(Pc=!0),e)}function $s(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,dc(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?uc(e,t,Ha(c,r),Id(e)):uc(e,t,r,Id(e))}catch(n){uc(e,t,{then:function(){},status:`rejected`,reason:n},Id())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function ec(){}function tc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=nc(e).queue;$s(e,a,t,_e,n===null?ec:function(){return rc(e),n(r)})}function nc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_e,baseState:_e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:_e},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rc(e){var t=nc(e);t.next===null&&(t=e.alternate.memoizedState),uc(e,t.next.queue,{},Id())}function ic(){return wa(ph)}function ac(){return ss().memoizedState}function oc(){return ss().memoizedState}function sc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Id();e=go(n);var r=_o(t,e,n);r!==null&&(zd(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function cc(e,t,n){var r=Id();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?pc(t,n):(n=Ti(e,t,n,r),n!==null&&(zd(n,e,r),mc(n,t,r)))}function lc(e,t,n){uc(e,t,n,Id())}function uc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(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,Br(s,o))return wi(e,t,i,0),rd===null&&Ci(),!1}catch{}if(n=Ti(e,t,i,r),n!==null)return zd(n,e,r),mc(n,t,r),!0}return!1}function dc(e,t,n,r){if(r={lane:2,revertLane:Bf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(i(479))}else t=Ti(e,n,r,2),t!==null&&zd(t,e,2)}function fc(e){var t=e.alternate;return e===B||t!==null&&t===B}function pc(e,t){Go=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}var hc={readContext:wa,use:us,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo,useEffectEvent:Zo},gc={readContext:wa,use:us,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Bs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Rs(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=os();t=t===void 0?null:t;var r=e();if(Ko){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=os();if(n!==void 0){var i=n(t);if(Ko){Qe(!0);try{n(t)}finally{Qe(!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=cc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:function(e){e=Ss(e);var t=e.queue,n=lc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Js,useDeferredValue:function(e,t){return Zs(os(),e,t)},useTransition:function(){var e=Ss(!1);return e=$s.bind(null,B,e.queue,!0,!1),os().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=os();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),rd===null)throw Error(i(349));U&127||_s(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Bs(ys.bind(null,r,o,e),[e]),r.flags|=2048,Is(9,{destroy:void 0},vs.bind(null,r,o,n,t),null),n},useId:function(){var e=os(),t=rd.identifierPrefix;if(z){var n=Xi,r=Yi;n=(r&~(1<<32-$e(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=qo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ic,useFormState:js,useActionState:js,useOptimistic:function(e){var t=os();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=dc.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:ds,useCacheRefresh:function(){return os().memoizedState=sc.bind(null,B)},useEffectEvent:function(e){var t=os(),n={impl:e};return t.memoizedState=n,function(){if(V&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},_c={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:ps,useRef:Ls,useState:function(){return ps(fs)},useDebugValue:Js,useDeferredValue:function(e,t){return Qs(ss(),Ho.memoizedState,e,t)},useTransition:function(){var e=ps(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){return Cs(ss(),Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us},vc={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:hs,useRef:Ls,useState:function(){return hs(fs)},useDebugValue:Js,useDeferredValue:function(e,t){var n=ss();return Ho===null?Zs(n,e,t):Qs(n,Ho.memoizedState,e,t)},useTransition:function(){var e=hs(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Fs,useActionState:Fs,useOptimistic:function(e,t){var n=ss();return Ho===null?(n.baseState=e,[e,n.queue.dispatch]):Cs(n,Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us};function yc(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 bc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Id(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(zd(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Id(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(zd(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Id(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(zd(t,e,n),vo(t,e,n))}};function xc(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?!Vr(n,r)||!Vr(i,a):!0}function Sc(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&&bc.enqueueReplaceState(t,t.state,null)}function Cc(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 wc(e){yi(e)}function Tc(e){console.error(e)}function Ec(e){yi(e)}function Dc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Oc(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 kc(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){Dc(e,t)},n}function Ac(e){return e=go(e),e.tag=3,e}function jc(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(){Oc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Oc(t,n,r),typeof i!=`function`&&(Cd===null?Cd=new Set([this]):Cd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Mc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,a,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?$d():n.alternate===null&&ud===0&&(ud=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),bf(e,r,a)),!1;case 22:return n.flags|=65536,r===Za?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)),bf(e,r,a)),!1}throw Error(i(435,n.tag))}return bf(e,r,a),$d(),!1}if(z)return t=Ao.current,t===null?(r!==oa&&(t=Error(i(423),{cause:r}),pa(Vi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Vi(r,n),a=kc(e.stateNode,r,a),yo(e,a),ud!==4&&(ud=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==oa&&(e=Error(i(422),{cause:r}),pa(Vi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Vi(o,n),gd===null?gd=[o]:gd.push(o),ud!==4&&(ud=2),t===null)return!0;r=Vi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=kc(n.stateNode,r,e),yo(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`&&(Cd===null||!Cd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ac(a),jc(a,e,n,r),yo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Nc=Error(i(461)),Pc=!1;function Fc(e,t,n,r){t.child=e===null?fo(t,null,n,r):uo(t,e.child,n,r)}function Ic(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 Ca(t),r=$o(e,t,n,o,a,i),s=rs(),e!==null&&!Pc?(is(e,t,i),ul(e,t,i)):(z&&s&&$i(t),t.flags|=1,Fc(e,t,r,i),t.child)}function Lc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Mi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Rc(e,t,a,r,i)):(e=Fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!dl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return ul(e,t,i)}return t.flags|=1,e=Ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function Rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(Pc=!1,t.pendingProps=r=a,dl(e,i))e.flags&131072&&(Pc=!0);else return t.lanes=e.lanes,ul(e,t,i)}}return Kc(e,t,n,r,i)}function zc(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 Vc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Vc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Oo(),Fo()):(Ka(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Fc(e,t,i,n),t.child}function Bc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Oo(),Po(t),e!==null&&xa(e,t,r,!0),t.childLanes=i,null}function Hc(e,t){return t=tl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Uc(e,t,n){return uo(t,e.child,null,n),e=Hc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Wc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=Hc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Bc(null,e);if(No(t),(e=ra)?(e=dm(e,aa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ji===null?null:{id:Yi,overflow:Xi},retryLane:536870912,hydrationErrors:null},n=Ri(e),n.return=t,t.child=n,na=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=536870912,null}return Hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),a){if(t.flags&256)t.flags&=-257,t=Uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Pc||xa(e,t,n,!1),a=(n&e.childLanes)!==0,Pc||a){if(To.current===null){if(r=rd,r!==null&&(s=_t(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ei(e,s),zd(r,e,s),Nc;$d()}t=Uc(e,t,n)}else e=o.treeContext,ra=hm(s.nextSibling),na=t,z=!0,ia=null,aa=!1,e!==null&&ta(t,e),t=Hc(t,r),t.flags|=134221824;return t}return e=Ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gc(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 Kc(e,t,n,r,i){return Ca(t),n=$o(e,t,n,r,void 0,i),r=rs(),e!==null&&!Pc?(is(e,t,i),ul(e,t,i)):(z&&r&&$i(t),t.flags|=1,Fc(e,t,n,i),t.child)}function qc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=ts(t,r,n,i),es(e),r=rs(),e!==null&&!Pc?(is(e,t,a),ul(e,t,a)):(z&&r&&$i(t),t.flags|=1,Fc(e,t,n,a),t.child)}function Jc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ki,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},mo(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):ki,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(yc(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&&bc.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),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=Cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ki,typeof u==`object`&&u&&(o=wa(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)&&Sc(t,a,r,o),po=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||po?(typeof d==`function`&&(yc(t,n,d,r),l=t.memoizedState),(c=po||xc(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,ho(e,t),o=t.memoizedProps,u=Cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ki,typeof l==`object`&&l&&(c=wa(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)&&Sc(t,a,r,c),po=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||po||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(yc(t,n,s,r),p=t.memoizedState),(u=po||xc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(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,Gc(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=uo(t,e.child,null,i),t.child=uo(t,null,n,i)):Fc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ul(e,t,i),e}function Yc(e,t,n,r){return da(),t.flags|=256,Fc(e,t,n,r),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zc(e){return{baseLanes:e,cachePool:qa()}}function Qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=md),e}function $c(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?Mo(t):Fo(),(e=ra)?(e=dm(e,aa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ji===null?null:{id:Yi,overflow:Xi},retryLane:536870912,hydrationErrors:null},n=Ri(e),n.return=t,t.child=n,na=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=pm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=tl({mode:`hidden`,children:a},i),r=Ii(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Zc(n),r.childLanes=Qc(e,o,n),t.memoizedState=Xc,Bc(null,r)):(Mo(t),el(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return rl(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ni(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ii(i,a,n,null),i.flags|=2):i=Ni(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Bc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Zc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Qc(e,o,n),t.memoizedState=Xc,Bc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Ni(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 el(e,t){return t=tl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function tl(e,t){return e=ji(22,e,null,t),e.lanes=0,e}function nl(e,t,n){return uo(t,e.child,null,n),e=el(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,nl(e,t,c)):t.memoizedState===null?(Fo(),o=a.fallback,s=t.mode,a=tl({mode:`visible`,children:a.children},s),o=Ii(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,uo(t,e.child,null,c),a=t.child,a.memoizedState=Zc(c),a.childLanes=Qc(e,r,c),t.memoizedState=Xc,Bc(null,a)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),pm(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,pa({value:a,source:null,stack:null})),nl(e,t,c)}if(Pc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Pc||r){if(To.current!==null)return nl(e,t,c);if(r=rd,r!==null&&(a=_t(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ei(e,a),zd(r,e,a),Nc;return fm(o)||$d(),nl(e,t,c)}return fm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ra=hm(o.nextSibling),na=t,z=!0,ia=null,aa=!1,e!==null&&ta(t,e),t=el(t,a.children),t.flags|=134221824,t)}function il(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ya(e.return,t,n)}function al(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function ol(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 sl(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 cl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(sl(e),Fc(e,t,r,n),sl(e)):Fc(e,t,r,n),r=z?Gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&il(e,n,t);else if(e.tag===19)il(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=al(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,sl(t)),ol(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&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ol(t,!0,n,null,a,r);break;case`together`:ol(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=al(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ol(t,!1,i,n,a,r)}return t.child}function ll(e,t,n){var r=t.pendingProps;return _a(t,t.type,r.value),Fc(e,t,r.children,n),t.child}function ul(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(xa(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=Ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function fl(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),_a(t,Aa,e.memoizedState.cache),da();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?$c(e,t,n):(Mo(t),e=ul(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return cl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return cl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,zc(e,t,n,t.pendingProps);case 24:_a(t,Aa,e.memoizedState.cache)}return ul(e,t,n)}function pl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Pc=!0;else{if(!dl(e,n)&&!(t.flags&128))return Pc=!1,fl(e,t,n);Pc=!!(e.flags&131072)}}else Pc=!1,z&&t.flags&1048576&&Qi(t,Gi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Mi(e)?(r=Cc(e,r),t.tag=1,t=Jc(null,t,e,r,n)):(t.tag=0,t=Kc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===re){t.tag=11,t=Ic(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=Lc(null,t,e,r,n);break a}if(a===ne){t.tag=10,t.type=e,t=ll(null,t,n);break a}}throw t=he(e)||e,Error(i(306,t,``))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Cc(r,t.pendingProps),Jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ho(e,t),So(t,r,null,n);var s=t.memoizedState;if(r=s.cache,_a(t,Aa,r),r!==o.cache&&ba(t,[Aa],n,!0),xo(),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=Yc(e,t,r,n);break a}if(r!==a){a=Vi(Error(i(424)),t),pa(a),t=Yc(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(ra=hm(e.firstChild),na=t,z=!0,ia=null,aa=!0,n=fo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(da(),r===a){t=ul(e,t,n);break a}Fc(e,t,r,n)}t=t.child}return t;case 26:return Gc(e,t),e===null?(n=zm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=vp(t.type,t.pendingProps,Ce.current,t)):t.memoizedState=zm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&z&&(r=t.stateNode=xm(t.type,t.pendingProps,Ce.current),na=t,aa=!0,a=ra,Op(t.type)?(gm=a,ra=hm(r.firstChild)):ra=a),Fc(e,t,t.pendingProps.children,n),Gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=ra)&&(r=lm(r,t.type,t.pendingProps,aa),r===null?a=!1:(t.stateNode=r,na=t,ra=hm(r.firstChild),aa=!1,a=!0)),a||sa(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,yp(a,o)?r=null:s!==null&&yp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=$o(e,t,ns,null,null,n),ph._currentValue=a),Gc(e,t),Fc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=ra)&&(n=um(n,t.pendingProps,aa),n===null?e=!1:(t.stateNode=n,na=t,ra=null,e=!0)),e||sa(t)),null;case 13:return $c(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):Fc(e,t,r,n),t.child;case 11:return Ic(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Gc(e,t),Fc(e,t,r,n),t.child;case 8:return Fc(e,t,t.pendingProps.children,n),t.child;case 12:return Fc(e,t,t.pendingProps.children,n),t.child;case 10:return ll(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ca(t),a=wa(a),r=r(a),t.flags|=1,Fc(e,t,r,n),t.child;case 14:return Lc(e,t,t.type,t.pendingProps,n);case 15:return Rc(e,t,t.type,t.pendingProps,n);case 19:return cl(e,t,n);case 31:return Wc(e,t,n);case 22:return zc(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(a=Ga(),a===null&&(a=rd,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},mo(t),_a(t,Aa,a)):((e.lanes&n)!==0&&(ho(e,t),So(t,null,null,n),xo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,_a(t,Aa,r),r!==a.cache&&ba(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),_a(t,Aa,r))),Fc(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:z&&$i(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Gc(e,t),Fc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ml(e){e.flags|=4}function hl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?eh(t,r):eh(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(Xd())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function gl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!th(t)){if(Xd())e.flags|=8192;else throw to=Za,Ya}}function _l(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:dt(),e.lanes|=t,hd|=t)}function vl(e,t){if(!z)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 yl(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 bl(e,t,n){var r=t.pendingProps;switch(ea(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yl(t),null;case 1:return yl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),va(Aa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ua(t)?ml(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fa())),yl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ml(t),o===null?(yl(t),hl(t,a,null,r,n)):(yl(t),gl(t,o))):o?o===e.memoizedState?(yl(t),t.flags&=-16777217):(ml(t),yl(t),gl(t,o)):(e=e.memoizedProps,e!==r&&ml(t),yl(t),hl(t,a,e,r,n)),null;case 27:if(Oe(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return yl(t),t.subtreeFlags&=-33554433,null}e=xe.current,ua(t)?ca(t,e):(e=xm(a,r,n),t.stateNode=e,ml(t))}return yl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return yl(t),t.subtreeFlags&=-33554433,null}if(o=xe.current,ua(t))ca(t,o);else{var s=hp(Ce.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[Ct]=t,o[wt]=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(cp(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&&ml(t)}}return yl(t),t.subtreeFlags&=-33554433,hl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ua(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=na,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||op(e.nodeValue,n)),e||sa(t,!0)}else e=hp(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return yl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ua(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[Ct]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yl(t),e=!1}else n=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(i(558))}return yl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ua(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[Ct]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yl(t),a=!1}else a=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(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),_l(t,t.updateQueue),yl(t),null);case 4:return Ee(),e===null&&Xf(t.stateNode.containerInfo),t.flags|=67108864,yl(t),null;case 10:return va(t.type),yl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return yl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)vl(r,!1);else{if(ud!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,vl(r,!1),e=o.updateQueue,t.updateQueue=e,_l(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),z&&Zi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ve()>xd&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,_l(t,e),vl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return yl(t),null}else 2*Ve()-r.renderingStartTime>xd&&n!==536870912&&(t.flags|=128,a=!0,vl(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=Ve(),e.sibling=null,o=Lo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Ro(t,o):(n=o,be(Ao,t),be(Lo,n),jo===null&&(jo=t)),z&&Zi(t,r.treeForkCount),e}return yl(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(yl(t),t.subtreeFlags&6&&(t.flags|=8192)):yl(t),n=t.updateQueue,n!==null&&_l(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&&ye(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),yl(t),null;case 25:return null;case 30:return t.flags|=33554432,yl(t),null}throw Error(i(156,t.tag))}function xl(e,t){switch(ea(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(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 Ee(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&ye(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function Sl(e,t){switch(ea(t),t.tag){case 3:va(Aa),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&ye(Wa);break;case 24:va(Aa)}}function Cl(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){G(t,t.return,e)}}function wl(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){G(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){G(t,t.return,e)}}function Tl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){G(e,e.return,t)}}}function El(e,t,n){n.props=Cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){G(e,t,n)}}function Dl(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=gi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Bp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Vp(e);p(e.child,!1,im,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){G(e,t,n)}}function Ol(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){G(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){G(e,t,n)}else n.current=null}}function kl(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++)om(e.stateNode,t[n])}function Al(e){for(var t=e.return;t!==null&&(Nl(t)&&om(e.stateNode,t.stateNode),!Ml(t));)t=t.return}function jl(e){for(var t=e.return;t!==null&&(Nl(t)&&sm(e.stateNode,t.stateNode),!Ml(t));)t=t.return}function Ml(e){return e.tag===5||e.tag===3||e.tag===27}function Nl(e){return e&&e.tag===7&&e.stateNode!==null}function Pl(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){G(e,e.return,t)}}function Fl(e,t,n){try{var r=e.stateNode;up(r,e.type,n,t),r[wt]=t}catch(t){G(e,e.return,t)}}function Il(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Op(e.type)||e.tag===4}function Ll(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Il(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&&Op(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 Rl(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=vn)),kl(e,r),I=!0;else if(i!==4&&(i===27&&(kl(e,r),r=null,Op(e.type)&&(n=e.stateNode,t=null)),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,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),kl(e,r),I=!0;else if(i!==4&&(i===27&&(kl(e,r),r=null,Op(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(zl(e,t,n,r),e=e.sibling;e!==null;)zl(e,t,n,r),e=e.sibling}function Bl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);cp(t,r,n),t[Ct]=e,t[wt]=n}catch(t){G(e,e.return,t)}}var Vl=!1,Hl=null;function Ul(e){(e.tag===30||e.subtreeFlags&33554432)&&(Vl=!0)}var Wl=null;function Gl(){var e=Wl;return Wl=null,e}var Kl=0;function ql(e,t,n,r,i){return Kl=0,Jl(e.child,t,n,r,i)}function Jl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Pp(o);r.push(s),s.view&&(a=!0)}else a||Pp(o).view&&(a=!0);Vl=!0,jp(o,Kl===0?t:t+`_`+Kl,n),Kl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Jl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Yl(e,t){for(;e!==null;)e.tag===5?Mp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Yl(e.child,t)),e=e.sibling}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xl(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=vi(t.default,t.share),t!==`none`&&(ql(e,n,t,null,!1)||Yl(e.child,!1))}e=e.sibling}}function Zl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=gi(r,n),a=vi(r.default,n.paired?r.share:r.enter);a===`none`?Xl(e):ql(e,i,a,null,!1)?(Xl(e),n.paired||t||Rd(e,r.onEnter)):Yl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e,t),e=e.sibling;else Xl(e)}function Ql(e){if(Hl!==null&&Hl.size!==0){var t=Hl;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=vi(n.default,n.share);if(a!==`none`&&(ql(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Rd(e,n.onShare)):Yl(e.child,!1)),t.delete(r),t.size===0)break}}}Ql(e)}e=e.sibling}}}function $l(e){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode),r=Hl===null?void 0:Hl.get(n),i=vi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(ql(e,n,i,null,!1)?r===void 0?Rd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Hl.delete(n),Rd(e,t.onShare)):Yl(e.child,!1)),Hl!==null&&Ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Hl!==null&&Ql(e)}function eu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode);t=vi(t.default,t.update),e.flags&=-5,t!==`none`&&ql(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&eu(e);e=e.sibling}}function tu(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,Yl(e.child,!1))}tu(e)}e=e.sibling}}function nu(e){if(e.tag===30)e.stateNode.paired=null,Yl(e.child,!1),tu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)nu(e),e=e.sibling;else tu(e)}function ru(e){for(e=e.child;e!==null;)e.tag===30?Yl(e.child,!1):e.subtreeFlags&33554432&&ru(e),e=e.sibling}function iu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Kl<a.length){var l=a[Kl],u=Pp(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&&jp(c,Kl===0?n:n+`_`+Kl,i),s&&e.flags&4||(Wl===null&&(Wl=[]),Wl.push(c,Kl===0?r:r+`_`+Kl,t.memoizedProps)),Kl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:iu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function au(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=gi(n,r),a=vi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Fp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Kl=0,i=iu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Rd(e,n.onUpdate))}else e.subtreeFlags&33554432&&au(e,t);e=e.sibling}}var ou=!1,su=!1,cu=!1,lu=!1,uu=typeof WeakSet==`function`?WeakSet:Set,du=null,fu=!1,pu=!1,mu=!1,hu=!1;function gu(e,t,n){if(e=e.containerInfo,pp=Sh,e=Kr(e),qr(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(mp={focusedElem:e,selectionRange:r},Sh=!1,n=(n&335544064)===n,du=t,t=n?9270:1024;du!==null;){if(e=du,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&$l(r[a]);if(e.alternate===null&&e.flags&2)n&&Ul(e),_u(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&$l(r),_u(n);continue}if(r!==null&&r.memoizedState!==null){n&&Ul(e),_u(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,du=r):(n&&eu(e),_u(n))}}Hl=null}function _u(e){for(;du!==null;){var t=du,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=Cc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){G(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)cm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:cm(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=gi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=vi(a.default,a.update),a!==`none`&&ql(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,du=r;break}du=t.return}}function vu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ru(e,n),r&4&&Cl(5,n);break;case 1:if(Ru(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){G(n,n.return,e)}else{var i=Cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){G(n,n.return,e)}}}r&64&&Tl(n),r&512&&Dl(n,n.return);break;case 3:if(Ru(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{wo(e,t)}catch(e){G(n,n.return,e)}}break;case 27:t===null&&r&4&&Bl(n);case 26:case 5:Ru(e,n),t===null&&r&4&&Pl(n),r&512&&Dl(n,n.return);break;case 12:Ru(e,n);break;case 31:Ru(e,n),r&4&&Du(e,n);break;case 13:Ru(e,n),r&4&&Ou(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Cf.bind(null,n),mm(e,n))));break;case 22:if(r=n.memoizedState!==null||ou,!r){var a=t!==null&&t.memoizedState!==null||su;t=ou,i=su,ou=r,(su=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Bu(e,n,r)):Ru(e,n),ou=t,su=i}break;case 30:Ru(e,n),r&512&&Dl(n,n.return);break;case 7:r&512&&Dl(n,n.return);default:Ru(e,n)}}function yu(e,t){for(e=e.child;e!==null;)bu(e,t),e=e.sibling}function bu(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){G(e,e.return,t)}xu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,I=!0}catch(t){G(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ap(s,!0):Ap(e.stateNode,!1)}catch(t){G(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&yu(e,t);break;default:yu(e,t)}}function xu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:bu(n,r);break a;case 22:n.memoizedState===null&&xu(n,r);break a;default:xu(n,r)}}e=e.sibling}}function Su(e){var t=e.alternate;t!==null&&(e.alternate=null,Su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mt(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 Cu=null,wu=!1;function Tu(e,t,n){for(n=n.child;n!==null;)Eu(e,t,n),n=n.sibling}function Eu(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount==`function`)try{Ze.onCommitFiberUnmount(Xe,n)}catch{}switch(n.tag){case 26:su||Ol(n,t),Tu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!su&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:su||Ol(n,t),jl(n);var r=Cu,i=wu;Op(n.type)&&(Cu=n.stateNode,wu=!1),Tu(e,t,n),Sm(n.stateNode,n.type,n.memoizedProps),Cu=r,wu=i;break;case 5:su||Ol(n,t),jl(n);case 6:if(n.tag===6&&jl(n),r=Cu,i=wu,Cu=null,Tu(e,t,n),Cu=r,wu=i,Cu!==null){if(wu)try{(Cu.nodeType===9?Cu.body:Cu.nodeName===`HTML`?Cu.ownerDocument.body:Cu).removeChild(n.stateNode),I=!0}catch(e){G(n,t,e)}else try{Cu.removeChild(n.stateNode),I=!0}catch(e){G(n,t,e)}}break;case 18:Cu!==null&&(wu?(e=Cu,kp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Jh(e)):kp(Cu,n.stateNode));break;case 4:r=Cu,i=wu,Cu=n.stateNode.containerInfo,wu=!0,Tu(e,t,n),Cu=r,wu=i;break;case 0:case 11:case 14:case 15:wl(2,n,t),su||wl(4,n,t),Tu(e,t,n);break;case 1:su||(Ol(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&El(n,t,r)),Tu(e,t,n);break;case 21:Tu(e,t,n);break;case 22:su=(r=su)||n.memoizedState!==null,Tu(e,t,n),su=r;break;case 30:Ol(n,t),Tu(e,t,n);break;case 7:su||Ol(n,t),Tu(e,t,n);break;default:Tu(e,t,n)}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Jh(e)}catch(e){G(t,t.return,e)}}}function Ou(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Jh(e)}catch(e){G(t,t.return,e)}}function ku(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uu),t;default:throw Error(i(435,e.tag))}}function Au(e,t){var n=ku(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=wf.bind(null,e,t);t.then(r,r)}})}function ju(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(Op(l.type)){Cu=l.stateNode,wu=!1;break a}break;case 5:Cu=l.stateNode,wu=!1;break a;case 3:case 4:Cu=l.stateNode.containerInfo,wu=!0;break a}l=l.return}if(Cu===null)throw Error(i(160));Eu(s,c,o),Cu=null,wu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nu(t,e,n),t=t.sibling}var Mu=null;function Nu(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}ju(t,e,n),Pu(e),a&4&&(wl(3,e,e.return),Cl(3,e),wl(5,e,e.return));break;case 1:ju(t,e,n),Pu(e),a&512&&(su||r===null||Ol(r,r.return)),a&64&&ou&&(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=Mu,ju(t,e,n),Pu(e),a&512&&(su||r===null||Ol(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(ou)e.stateNode=vp(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[At]||r[Ct]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),cp(r,t,n),r[Ct]=e,Lt(r),t=r;break a;case`link`:if(o=Zm(`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),cp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Zm(`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),cp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ct]=e,Lt(r),t=r}e.stateNode=t}}else ou||Qm(o,e.type,e.stateNode)}else e.stateNode=Km(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Fl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||su||t.parentNode.removeChild(t)):a.count--,n===null?ou||Qm(o,e.type,e.stateNode):Km(o,n,e.memoizedProps))}break;case 27:ju(t,e,n),Pu(e),a&512&&(su||r===null||Ol(r,r.return)),r!==null&&a&4&&Fl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=cu,cu=!1,ju(t,e,n),cu=o,Pu(e),a&512&&(su||r===null||Ol(r,r.return)),e.flags&32){t=e.stateNode;try{dn(t,``),I=!0}catch(t){G(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Fl(e,t,r===null?t:r.memoizedProps)),a&1024&&(lu=!0);break;case 6:if(ju(t,e,n),Pu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,I=!0}catch(t){G(e,e.return,t)}}break;case 3:if(I=!1,Xm=null,o=Mu,Mu=Em(t.containerInfo),ju(t,e,n),Mu=o,Pu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Jh(t.containerInfo)}catch(t){G(e,e.return,t)}lu&&(lu=!1,Fu(e)),I=!1;break;case 4:a=cu,cu=ou,r=qt(),o=Mu,Mu=Em(e.stateNode.containerInfo),ju(t,e,n),Pu(e),Mu=o,I&&pu&&(mu=!0),I=r,cu=a;break;case 12:ju(t,e,n),Pu(e);break;case 31:ju(t,e,n),Pu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 13:ju(t,e,n),Pu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yd=Ve()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ou,l=su,u=cu;ou=c||o,cu=u||o,su=l||s,ju(t,e,n),su=l,cu=u,ou=c,Pu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ou||su||(t=s||su,n=ou,r=su,ou=o||ou,su=t,zu(e,2),ou=n,su=r),!o&&cu||yu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Au(e,n))));break;case 19:ju(t,e,n),Pu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Au(e,t)));break;case 30:a&512&&(su||r===null||Ol(r,r.return)),a=qt(),o=pu,s=(n&335544064)===n,c=e.memoizedProps,pu=s&&vi(c.default,c.update)!==`none`,ju(t,e,n),Pu(e),s&&r!==null&&I&&(e.flags|=4),pu=o,I=a;break;case 21:break;case 7:a&512&&(su||r===null||Ol(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ju(t,e,n),Pu(e)}}function Pu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Il(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Nl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ml(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;zl(e,Ll(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(dn(l,``),n.flags&=-33),zl(e,Ll(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Rl(e,Ll(e),u,s);break;default:throw Error(i(161))}}catch(t){G(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Sh=!0,t.reset(),Sh=!1),e=e.sibling}}function Iu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Lu(t,e),t=t.sibling;else au(t,!1)}function Lu(e,t){var n=e.alternate;if(n===null)Zl(e,!1);else switch(e.tag){case 3:if(hu=fu=!1,Gl(),Iu(t,e),!fu&&!mu){if(e=Wl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Mp(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`})),hu=!0}Wl=null;break;case 5:Iu(t,e);break;case 4:r=fu,fu=!1,Iu(t,e),fu&&(mu=!0),fu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Iu(t,e):Zl(e,!1));break;case 30:r=fu,i=Gl(),fu=!1,Iu(t,e),fu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=gi(a,o),o=gi(n.memoizedProps,o);var s=vi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Kl=0,t=iu(e,n,t,o,s,a,!0),Kl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Rd(e,e.memoizedProps.onUpdate),Wl=i):i!==null&&(i.push.apply(i,Wl),Wl=i),fu=e.flags&32?!0:r;break;default:Iu(t,e)}}function Ru(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vu(e,t.alternate,t),t=t.sibling}function zu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:wl(4,n,n.return),zu(n,r);break;case 1:Ol(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&El(n,n.return,i),zu(n,r);break;case 27:r&2&&Sm(n.stateNode,n.type,n.memoizedProps);case 5:Ol(n,n.return),n.tag!==5&&n.tag!==27||jl(n),zu(n,r);break;case 6:jl(n);break;case 26:Ol(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||su||i.parentNode.removeChild(i),zu(n,r);break;case 22:n.memoizedState===null&&zu(n,r);break;case 30:Ol(n,n.return),zu(n,r);break;case 7:Ol(n,n.return);default:zu(n,r)}e=e.sibling}}function Bu(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:Bu(i,a,n),Cl(4,a);break;case 1:if(Bu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){G(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++)Co(l[i],c)}catch(e){G(r,r.return,e)}}s&&o&64&&Tl(a),Dl(a,a.return);break;case 27:n&2&&Bl(a);case 5:a.tag!==5&&a.tag!==27||Al(a),Bu(i,a,n),s&&r===null&&o&4&&Pl(a),Dl(a,a.return);break;case 6:Al(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ou||Qm(Em(c.ownerDocument),a.type,c),Bu(i,a,n),s&&r===null&&o&4&&Pl(a),Dl(a,a.return);break;case 12:Bu(i,a,n);break;case 31:Bu(i,a,n),s&&o&4&&Du(i,a);break;case 13:Bu(i,a,n),s&&o&4&&Ou(i,a);break;case 22:a.memoizedState===null&&Bu(i,a,n),Dl(a,a.return);break;case 30:Bu(i,a,n),Dl(a,a.return);break;case 7:Dl(a,a.return);default:Bu(i,a,n)}t=t.sibling}}function Vu(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&&Ma(n))}function Hu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Uu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Wu(e,t,n,r),t=t.sibling;else i&&ru(t)}function Wu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&nu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Uu(e,t,n,r),a&2048&&Cl(9,t);break;case 1:Uu(e,t,n,r);break;case 3:Uu(e,t,n,r),i&&hu&&(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&&Ma(a)));break;case 12:if(a&2048){Uu(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){G(t,t.return,e)}}else Uu(e,t,n,r);break;case 31:Uu(e,t,n,r);break;case 13:Uu(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&&nu(t),o._visibility&2?Uu(e,t,n,r):(o._visibility|=2,Gu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&nu(s),o._visibility&2?Uu(e,t,n,r):Ku(e,t)),a&2048&&Vu(s,t);break;case 24:Uu(e,t,n,r),a&2048&&Hu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Yl(a.child,!0),Yl(t.child,!0))),Uu(e,t,n,r);break;default:Uu(e,t,n,r)}}function Gu(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:Gu(a,o,s,c,i),Cl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Gu(a,o,s,c,i)):u._visibility&2?Gu(a,o,s,c,i):Ku(a,o),i&&l&2048&&Vu(o.alternate,o);break;case 24:Gu(a,o,s,c,i),i&&l&2048&&Hu(o.alternate,o);break;default:Gu(a,o,s,c,i)}t=t.sibling}}function Ku(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:Ku(n,r),i&2048&&Vu(r.alternate,r);break;case 24:Ku(n,r),i&2048&&Hu(r.alternate,r);break;default:Ku(n,r)}t=t.sibling}}var qu=8192;function Ju(e,t,n){if(e.subtreeFlags&qu)for(e=e.child;e!==null;)Yu(e,t,n),e=e.sibling}function Yu(e,t,n){switch(e.tag){case 26:Ju(e,t,n),e.flags&qu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&rh(n,e)):ih(n,Mu,e.memoizedState,e.memoizedProps));break;case 5:Ju(e,t,n),e.flags&qu&&(e=e.stateNode,(t&335544128)===t&&rh(n,e));break;case 3:case 4:var r=Mu;Mu=Em(e.stateNode.containerInfo),Ju(e,t,n),Mu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=qu,qu=16777216,Ju(e,t,n),qu=r):Ju(e,t,n));break;case 30:if((e.flags&qu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Hl===null&&(Hl=new Map),Hl.set(r,i)}Ju(e,t,n);break;default:Ju(e,t,n)}}function Xu(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 Zu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,ed(r,e)}Xu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qu(e),e=e.sibling}function Qu(e){switch(e.tag){case 0:case 11:case 15:Zu(e),e.flags&2048&&wl(9,e,e.return);break;case 3:Zu(e);break;case 12:Zu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$u(e)):Zu(e);break;default:Zu(e)}}function $u(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,ed(r,e)}Xu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wl(8,t,t.return),$u(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,$u(t));break;default:$u(t)}e=e.sibling}}function ed(e,t){for(;du!==null;){var n=du;switch(n.tag){case 0:case 11:case 15:wl(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:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,du=r;else a:for(n=e;du!==null;){r=du;var i=r.sibling,a=r.return;if(Su(r),r===n){du=null;break a}if(i!==null){i.return=a,du=i;break a}du=a}}}var td={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},nd=typeof WeakMap==`function`?WeakMap:Map,V=0,rd=null,H=null,U=0,id=0,ad=null,od=!1,sd=!1,cd=!1,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=null,_d=null,vd=!1,yd=0,bd=0,xd=1/0,Sd=null,Cd=null,wd=0,Td=null,Ed=null,Dd=0,Od=0,kd=null,Ad=null,jd=null,Md=null,Nd=null,Pd=0,Fd=null;function Id(){return V&2&&U!==0?U&-U:M.T===null?bt():Bf()}function Ld(){if(md===0){if(!(U&536870912)||z){var e=it;it<<=1,!(it&3932160)&&(it=262144),md=e}else md=536870912}return e=Ao.current,e!==null&&(e.flags|=32),md}function Rd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Bp(gi(e.memoizedProps,n))),Md===null&&(Md=[]),Md.push(t.bind(null,r))}}function zd(e,t,n){(e===rd&&(id===2||id===9)||e.cancelPendingCommit!==null)&&(Kd(e,0),Ud(e,U,md,!1)),pt(e,n),(!(V&2)||e!==rd)&&(e===rd&&(!(V&2)&&(fd|=n),ud===4&&Ud(e,U,md,!1)),Mf(e))}function Bd(e,t,n){if(V&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ct(e,t),a=r?nf(e,t):ef(e,t,!0),o=r;do{if(a===0){sd&&!r&&Ud(e,t,0,!1);break}if(n=e.current.alternate,o&&!Hd(n)){a=ef(e,t,!1),o=!1;continue}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=gd;var l=c.current.memoizedState.isDehydrated;if(l&&(Kd(c,s).flags|=256),s=ef(c,s,!1),s!==2&&s!==6){if(cd&&!l){c.errorRecoveryDisabledLanes|=o,fd|=o,a=4;break a}o=_d,_d=a,o!==null&&(_d===null?_d=o:_d.push.apply(_d,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Kd(e,0),Ud(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:Ud(r,t,md,!od);break a;case 2:_d=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=yd+300-Ve(),10<a)){if(Ud(r,t,md,!od),st(r,0,!0)!==0)break a;Dd=t,r.timeoutHandle=Sp(Vd.bind(null,r,n,_d,Sd,vd,t,md,fd,hd,od,o,`Throttled`,-0,0),a);break a}Vd(r,n,_d,Sd,vd,t,md,fd,hd,od,o,null,-0,0)}break}while(1);Mf(e)}function Vd(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;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vn},Hl=null,Yu(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=ch.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?yd-Ve():(a&4194048)===a?bd-Ve():0,m=oh(d,m),m!==null)){Dd=a,e.cancelPendingCommit=m(lf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ud(e,a,o,!l);return}lf(e,t,a,n,r,i,o,s,c,l,u,d)}function Hd(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(!Br(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 Ud(e,t,n,r){t=lt(e,t),t&=~pd,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-$e(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ht(e,n,t)}function Wd(){return V&6?!0:(Nf(0,!1),!1)}function Gd(){if(H!==null){if(id===0)var e=H.return;else e=H,ga=ha=null,as(e),io=null,ao=0,e=H;for(;e!==null;)Sl(e.alternate,e),e=e.return;H=null}}function Kd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Cp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Dd=0,Gd(),rd=e,H=n=Ni(e.current,null),U=t,id=0,ad=null,od=!1,sd=ct(e,t),cd=!1,hd=md=pd=fd=dd=ud=0,_d=gd=null,vd=!1,ld=lt(e,t),Ci(),n}function Jd(e,t){B=null,M.H=hc,t===Ja||t===Xa?(t=no(),id=3):t===Ya?(t=no(),id=4):id=t===Nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ad=t,H===null&&(ud=1,Dc(e,Vi(t,e.current)))}function Xd(){var e=Ao.current;return e===null?!0:(U&4194048)===U?jo===null:(U&62914560)===U||U&536870912?e===jo:!1}function Zd(){var e=M.H;return M.H=hc,e===null?hc:e}function Qd(){var e=M.A;return M.A=td,e}function $d(){ud=4,od||(U&4194048)!==U&&Ao.current!==null||(sd=!0),!(dd&134217727)&&!(fd&134217727)||rd===null||Ud(rd,U,md,!1)}function ef(e,t,n){var r=V;V|=2;var i=Zd(),a=Qd();(rd!==e||U!==t)&&(Sd=null,Kd(e,t)),t=!1;var o=ud;a:do try{if(id!==0&&H!==null){var s=H,c=ad;switch(id){case 8:Gd(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=id;if(id=0,ad=null,of(e,s,c,l),n&&sd){o=0;break a}break;default:l=id,id=0,ad=null,of(e,s,c,l)}}tf(),o=ud;break}catch(t){Jd(e,t)}while(1);return t&&e.shellSuspendCounter++,ga=ha=null,V=r,M.H=i,M.A=a,H===null&&(rd=null,U=0,Ci()),o}function tf(){for(;H!==null;)W(H)}function nf(e,t){var n=V;V|=2;var r=Zd(),a=Qd();rd!==e||U!==t?(Sd=null,xd=Ve()+500,Kd(e,t)):sd=ct(e,t);a:do try{if(id!==0&&H!==null){t=H;var o=ad;b:switch(id){case 1:id=0,ad=null,of(e,t,o,1);break;case 2:case 9:if(Qa(o)){id=0,ad=null,af(t);break}t=function(){id!==2&&id!==9||rd!==e||(id=7),Mf(e)},o.then(t,t);break a;case 3:id=7;break a;case 4:id=5;break a;case 7:Qa(o)?(id=0,ad=null,af(t)):(id=0,ad=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?th(s):c.stateNode.complete){id=0,ad=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}}id=0,ad=null,of(e,t,o,5);break;case 6:id=0,ad=null,of(e,t,o,6);break;case 8:Gd(),ud=6;break a;default:throw Error(i(462))}}rf();break}catch(t){Jd(e,t)}while(1);return ga=ha=null,M.H=r,M.A=a,V=n,H===null?(rd=null,U=0,Ci(),ud):0}function rf(){for(;H!==null&&!ze();)W(H)}function W(e){var t=pl(e.alternate,e,ld);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=qc(n,t,t.pendingProps,t.type,void 0,U);break;case 11:t=qc(n,t,t.pendingProps,t.type.render,t.ref,U);break;case 5:as(t);var r=t;r===na&&(z?(la(r),r.tag===5&&r.stateNode!=null&&(ra=r.stateNode)):(la(r),z=!0));default:Sl(n,t),t=H=Pi(t,ld),t=pl(n,t,ld)}e.memoizedProps=e.pendingProps,t===null?sf(e):H=t}function of(e,t,n,r){ga=ha=null,as(t),io=null,ao=0;var i=t.return;try{if(Mc(e,i,t,n,U)){ud=1,Dc(e,Vi(n,e.current)),H=null;return}}catch(t){if(i!==null)throw H=i,t;ud=1,Dc(e,Vi(n,e.current)),H=null;return}t.flags&32768?(z||r===1?e=!0:sd||U&536870912?e=!1:(od=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.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,od);return}e=t.return;var n=bl(t.alternate,t,ld);if(n!==null){H=n;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);ud===0&&(ud=5)}function cf(e,t){do{var n=xl(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);ud=6,H=null}function lf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do _f();while(wd!==0);if(V&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===rd&&(H=rd=null,U=0),Ed=t,Td=e,Dd=n,kd=a,Ad=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(Od=s,s|=Si,mt(e,n,s,r,i,a),Md=null,(n&335544064)===n?(Nd=Fa(e),r=10262):(Nd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Tf(Ge,function(){return vf(),null})):(e.callbackNode=null,e.callbackPriority=0),Vl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=N.p,N.p=2,a=V,V|=4;try{gu(e,t,n)}finally{V=a,N.p=i,M.T=r}}wd=1,Vl?jd=Rp(o,e.containerInfo,Nd,pf,mf,ff,hf,vf,df,null,null):(pf(),mf(),hf())}function df(e){if(wd!==0){var t=Td.onRecoverableError;t(e,{componentStack:null})}}function ff(){wd===3&&(wd=0,Lu(Ed,Td),wd=4)}function pf(){if(wd===1){wd=0;var e=Td,t=Ed,n=Dd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=N.p;N.p=2;var a=V;V|=4;try{pu=mu=!1,Nu(t,e,n),n=mp;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(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 _=Wr(s,h),v=Wr(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}}Sh=!!pp,mp=pp=null}finally{V=a,N.p=i,M.T=r}}e.current=t,wd=2}}function mf(){if(wd===2){wd=0;var e=Td,t=Ed,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=V;V|=4;try{vu(e,t.alternate,t)}finally{V=i,N.p=r,M.T=n}}wd=3}}function hf(){if(wd===4||wd===3){wd=0;var e=jd;jd=null,Be();var t=Td,n=Ed,r=Dd,i=Ad,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?wd=5:(wd=0,Ed=Td=null,gf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Cd=null),yt(r),n=n.stateNode,Ze&&typeof Ze.onCommitFiberRoot==`function`)try{Ze.onCommitFiberRoot(Xe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=N.p,N.p=2,M.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{M.T=n,N.p=a}}if(i=Md,o=Nd,Nd=null,i!==null&&(Md=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);Dd&3&&_f(),Mf(t),a=t.pendingLanes,r&261930&&a&42?t===Fd?Pd++:(Pd=0,Fd=t):(Pd=0,Fd=null),Nf(0,!1)}}function gf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function _f(){return jd!==null&&(jd.skipTransition(),jd=null),pf(),mf(),hf(),vf()}function vf(){if(wd!==5)return!1;var e=Td,t=Od;Od=0;var n=yt(Dd),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=kd,kd=null;var o=Td,s=Dd;if(wd=0,Ed=Td=null,Dd=0,V&6)throw Error(i(331));var c=V;if(V|=4,Qu(o.current),Wu(o,o.current,s,n),V=c,Nf(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot==`function`)try{Ze.onPostCommitFiberRoot(Xe,o)}catch{}return!0}finally{N.p=a,M.T=r,gf(e,t)}}function yf(e,t,n){t=Vi(n,t),t=kc(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(pt(e,2),Mf(e))}function G(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`&&(Cd===null||!Cd.has(r))){e=Vi(n,e),n=Ac(2),r=_o(t,n,2),r!==null&&(jc(n,r,t,e),pt(r,2),Mf(r));break}}t=t.return}}function bf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nd;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)||(cd=!0,i.add(n),e=xf.bind(null,e,t,n),t.then(e,e))}function xf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rd===e&&(U&n)===n&&(ud===4||ud===3&&(U&62914560)===U&&300>Ve()-yd?V&2?pd|=n:Kd(e,0):pd|=n,hd===U&&(hd=0)),Mf(e)}function Sf(e,t){t===0&&(t=dt()),e=Ei(e,t),e!==null&&(pt(e,t),Mf(e))}function Cf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sf(e,n)}function wf(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),Sf(e,n)}function Tf(e,t){return Le(e,t)}var Ef=null,Df=null,Of=!1,kf=!1,Af=!1,jf=0;function Mf(e){e!==Df&&e.next===null&&(Df===null?Ef=Df=e:Df=Df.next=e),kf=!0,Of||(Of=!0,zf())}function Nf(e,t){if(!Af&&kf){Af=!0;do for(var n=!1,r=Ef;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-$e(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Rf(r,a))}else a=U,a=st(r,r===rd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ct(r,a)||(n=!0,Rf(r,a))}r=r.next}while(n);Af=!1}}function Pf(){Ff()}function Ff(){kf=Of=!1;var e=0;jf!==0&&xp()&&(e=jf);for(var t=Ve(),n=null,r=Ef;r!==null;){var i=r.next,a=If(r,t);a===0?(r.next=null,n===null?Ef=i:n.next=i,i===null&&(Df=n)):(n=r,(e!==0||a&3)&&(kf=!0)),r=i}wd!==0&&wd!==5||Nf(e,!1),jf!==0&&(jf=0)}function If(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-$e(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ut(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=rd,n=U,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(id===2||id===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Re(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ct(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Re(r),yt(n)){case 2:case 8:n=We;break;case 32:n=Ge;break;case 268435456:n=qe;break;default:n=Ge}return r=Lf.bind(null,e),n=Le(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Re(r),e.callbackPriority=2,e.callbackNode=null,2}function Lf(e,t){if(wd!==0&&wd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(_f()&&e.callbackNode!==n)return null;var r=U;return r=st(e,e===rd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Bd(e,r,t),If(e,Ve()),e.callbackNode!=null&&e.callbackNode===n?Lf.bind(null,e):null)}function Rf(e,t){if(_f())return null;Bd(e,t,!0)}function zf(){Ep(function(){V&6?Le(Ue,Pf):Ff()})}function Bf(){if(jf===0){var e=Ra;e===0&&(e=rt,rt<<=1,!(rt&261888)&&(rt=256)),jf=e}return jf}function Vf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:_n(e)}function Hf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Vf((i[wt]||null).action),o=r.submitter;o&&(t=(t=o[wt]||null)?Vf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new zn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(jf!==0){var e=new FormData(i,o);tc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),tc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Uf=0;Uf<pi.length;Uf++){var Wf=pi[Uf];mi(Wf.toLowerCase(),`on`+(Wf[0].toUpperCase()+Wf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Ht(`onMouseEnter`,[`mouseout`,`mouseover`]),Ht(`onMouseLeave`,[`mouseout`,`mouseover`]),Ht(`onPointerEnter`,[`pointerout`,`pointerover`]),Ht(`onPointerLeave`,[`pointerout`,`pointerover`]),Vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Gf=`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(` `),Kf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Gf));function qf(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){yi(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){yi(e)}i.currentTarget=null,a=c}}}}function K(e,t){var n=t[Et];n===void 0&&(n=t[Et]=new Set);var r=e+`__bubble`;n.has(r)||(Zf(t,e,2,!1),n.add(r))}function Jf(e,t,n){var r=0;t&&(r|=4),Zf(n,e,r,t)}var Yf=`_reactListening`+Math.random().toString(36).slice(2);function Xf(e){if(!e[Yf]){e[Yf]=!0,zt.forEach(function(t){t!==`selectionchange`&&(Kf.has(t)||Jf(t,!1,e),Jf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yf]||(t[Yf]=!0,Jf(`selectionchange`,!1,t))}}function Zf(e,t,n,r){switch(kh(t)){case 2:var i=Ch;break;case 8:i=wh;break;default:i=Th}n=i.bind(null,t,n,e),i=void 0,!On||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 Qf(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=Nt(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}Tn(function(){var r=a,i=bn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=zn,u=e;switch(e){case`keypress`:if(Pn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Vn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}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=En(m,p),g!=null&&d.push($f(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!==yn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Tt]))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?Nt(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=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ft(c),h=l==null?u:Ft(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Nt(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,tp):null,c!==null&&np(s,u,c,d,!1),l!==null&&f!==null&&np(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&hn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)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 vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Nn()):(An=i,jn=`value`in An?An.value:An.textContent,vr=!0)),v=ep(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=ep(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Hf(s,e,r,n,i)}qf(s,t)})}function $f(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ep(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=En(e,n),i!=null&&r.unshift($f(e,i,a)),i=En(e,t),i!=null&&r.push($f(e,i,a))),e.tag===3)return r;e=e.return}return[]}function tp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function np(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=En(n,a),l!=null&&o.unshift($f(n,l,c))):i||(l=En(n,a),l!=null&&o.push($f(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var rp=/\r\n?/g,ip=/\u0000|\uFFFD/g;function ap(e){return(typeof e==`string`?e:``+e).replace(rp,`
17
+ `).replace(ip,``)}function op(e,t){return t=ap(t),ap(e)===t}function q(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&dn(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:mn(e,r,o);return;case`data`:if(t!==`object`){Yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=_n(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`&&q(e,t,`name`,a.name,a,null),q(e,t,`formEncType`,a.formEncType,a,null),q(e,t,`formMethod`,a.formMethod,a,null),q(e,t,`formTarget`,a.formTarget,a,null)):(q(e,t,`encType`,a.encType,a,null),q(e,t,`method`,a.method,a,null),q(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=_n(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=vn);return;case`onScroll`:r!=null&&K(`scroll`,e);return;case`onScrollEnd`:r!=null&&K(`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=_n(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`:K(`beforetoggle`,e),K(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(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=gn.get(n)||n,Jt(e,n,r);else return}I=!0}function sp(e,t,n,r,a,o){switch(n){case`style`:mn(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`)dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)dn(e,``+r);else return;break;case`onScroll`:r!=null&&K(`scroll`,e);return;case`onScrollEnd`:r!=null&&K(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=vn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Bt.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[wt]||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}I=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}I=!0}function cp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:K(`error`,e),K(`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:q(e,t,o,s,n,null)}}a&&q(e,t,`srcSet`,n.srcSet,n,null),r&&q(e,t,`src`,n.src,n,null);return;case`input`:K(`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:q(e,t,r,d,n,null)}}on(e,o,c,l,u,s,a,!1);return;case`select`:for(a in K(`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:q(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&cn(e,!!r,n,!0):cn(e,!!r,t,!1);return;case`textarea`:for(s in K(`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:q(e,t,s,c,n,null)}un(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:q(e,t,l,r,n,null)}return;case`dialog`:K(`beforetoggle`,e),K(`toggle`,e),K(`cancel`,e),K(`close`,e);break;case`iframe`:case`object`:K(`load`,e);break;case`video`:case`audio`:for(r=0;r<Gf.length;r++)K(Gf[r],e);break;case`image`:K(`error`,e),K(`load`,e);break;case`details`:K(`toggle`,e);break;case`embed`:case`source`:case`link`:K(`error`,e),K(`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:q(e,t,u,r,n,null)}return;default:if(hn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&sp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&q(e,t,c,r,n,null))}var lp={};function up(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)||q(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&&(I=!0),o=m;break;case`name`:m!==f&&(I=!0),a=m;break;case`checked`:m!==f&&(I=!0),u=m;break;case`defaultChecked`:m!==f&&(I=!0),d=m;break;case`value`:m!==f&&(I=!0),s=m;break;case`defaultValue`:m!==f&&(I=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&q(e,t,p,m,r,f)}}an(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)||q(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&&(I=!0),p=o;break;case`defaultValue`:o!==l&&(I=!0),c=o;break;case`multiple`:o!==l&&(I=!0),s=o;default:o!==l&&q(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?cn(e,!!n,n?[]:``,!1):cn(e,!!n,t,!0)):cn(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:q(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&&(I=!0),p=a;break;case`defaultValue`:a!==o&&(I=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&q(e,t,s,a,r,o)}ln(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:q(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&&(I=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:q(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)&&q(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:q(e,t,u,p,r,m)}return;default:if(hn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&sp(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||sp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&q(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||q(e,t,f,p,r,m)}function dp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function fp(){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&&dp(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&&dp(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 pp=null,mp=null;function hp(e){return e.nodeType===9?e:e.ownerDocument}function gp(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 _p(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 vp(e,t,n,r){return n=hp(n).createElement(e),n[Ct]=r,n[wt]=t,cp(n,e,t),Lt(n),n}function yp(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 bp=null;function xp(){var e=window.event;return e&&e.type===`popstate`?e!==bp&&(bp=e,!0):(bp=null,!1)}var Sp=typeof setTimeout==`function`?setTimeout:void 0,Cp=typeof clearTimeout==`function`?clearTimeout:void 0,wp=typeof Promise==`function`?Promise:void 0,Tp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Sp,Ep=typeof queueMicrotask==`function`?queueMicrotask:wp===void 0?Sp:function(e){return wp.resolve(null).then(e).catch(Dp)};function Dp(e){setTimeout(function(){throw e})}function Op(e){return e===`head`}function kp(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),Jh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[At]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cm(e.ownerDocument.body)}n=i}while(n);Jh(t)}function Ap(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 jp(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 Mp(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 Np(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 Pp(e){return Np(e.getBoundingClientRect(),getComputedStyle(e),e)}function Fp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Np(t,n,e)}function Ip(e){return e.documentElement.clientHeight}function Lp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Rp(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`&&(Ip(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+=nh(f),u>ah){s.length=o;break}f=new Promise(Lp.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 zp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}zp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},zp.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},zp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Bp(e){return{name:e,group:new zp(`group`,e),imagePair:new zp(`image-pair`,e),old:new zp(`old`,e),new:new zp(`new`,e)}}function Vp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Vp.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(Kp(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=Wp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Hp,e,s,r)}this._eventListeners=a}};function Hp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Vp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Kp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Wp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Up,e,n,i),r.splice(t,1),a!==null&&a()}};function Up(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Wp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Gp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Kp(e,t,n,r){if(e.length===0)return-1;r=Gp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Gp(a.optionsOrUseCapture)===r)return i}return-1}Vp.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,Wp(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,Wp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Vp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,qp,e,void 0,void 0)};function qp(e,t){return e.tag!==6&&(e=v(e),ym(e,t))}Vp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Jp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!qp(t[n],e);n--);};function Jp(e,t){return t.push(e),!1}Vp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=hp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0))};function Yp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Vp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0)};function Xp(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Vp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Zp,e,void 0,void 0);for(var n=t=0;n<Qp.length;n++){var r=Qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Qp[t++]=r}Qp.length=t}};function Zp(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var Qp=[],$p=!1;function em(e,t,n){Qp.push({fragmentInstance:e,observer:t,instance:n}),$p||($p=!0,bm(function(){$p=!1;var e=Qp;Qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Vp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,tm,e,void 0,void 0),e};function tm(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}Vp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Vp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Jp,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||nm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function nm(e,t,n,r,i){var a=Nt(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 rm(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)}Vp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Jp,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),rm(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),rm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function im(e,t){return e=v(e),am(e,t),!1}function am(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function om(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,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Qp.length;i++){var a=Qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Qp[r++]=a)}Qp.length=r,n.observe(e)}),am(e,t))}function sm(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,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?em(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function cm(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`:cm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lm(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[At])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=hm(e.nextSibling),e===null)break}return null}function um(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hm(e.nextSibling),e===null))return null;return e}function dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hm(e.nextSibling),e===null))return null;return e}function fm(e){return e.data===`$?`||e.data===`$~`}function pm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mm(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 hm(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 gm=null;function _m(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vm(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 ym(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 bm(e){Tp(function(){Tp(function(t){return e(t)})})}function xm(e,t,n){switch(t=hp(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 Sm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&q(e,t,r,null,lp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===vn&&(e.onclick=null),Mt(e)}function Cm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var wm=new Map,Tm=new Set;function Em(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 Dm=N.d;N.d={f:Om,r:km,D:Mm,C:Nm,L:Pm,m:Fm,X:Lm,S:Im,M:Rm};function Om(){var e=Dm.f(),t=Wd();return e||t}function km(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?rc(t):Dm.r(e)}var Am=typeof document>`u`?null:document;function jm(e,t,n){var r=Am;if(r&&typeof t==`string`&&t){var i=rn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tm.has(i)||(Tm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),cp(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Mm(e){Dm.D(e),jm(`dns-prefetch`,e,null)}function Nm(e,t){Dm.C(e,t),jm(`preconnect`,e,t)}function Pm(e,t,n){Dm.L(e,t,n);var r=Am;if(r&&e&&t){var i=`link[rel="preload"][as="`+rn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+rn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+rn(n.imageSizes)+`"]`)):i+=`[href="`+rn(e)+`"]`;var a=i;switch(t){case`style`:a=Bm(e);break;case`script`:a=Wm(e)}if(!(wm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vm(a))||t===`script`&&r.querySelector(Gm(a))))){var o=r.createElement(`link`);cp(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function Fm(e,t){Dm.m(e,t);var n=Am;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+rn(r)+`"][href="`+rn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wm(e)}if(!wm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),wm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gm(a)))return}r=n.createElement(`link`),cp(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function Im(e,t,n){Dm.S(e,t,n);var r=Am;if(r&&e){var i=It(r).hoistableStyles,a=Bm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wm.get(a))&&Jm(e,n);var c=o=r.createElement(`link`);Lt(c),cp(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,qm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lm(e,t){Dm.X(e,t);var n=Am;if(n&&e){var r=It(n).hoistableScripts,i=Wm(e),a=r.get(i);a||(a=n.querySelector(Gm(i)),a||(e=T({src:e,async:!0},t),(t=wm.get(i))&&Ym(e,t),a=n.createElement(`script`),Lt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rm(e,t){Dm.M(e,t);var n=Am;if(n&&e){var r=It(n).hoistableScripts,i=Wm(e),a=r.get(i);a||(a=n.querySelector(Gm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=wm.get(i))&&Ym(e,t),a=n.createElement(`script`),Lt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zm(e,t,n,r){var a=(a=Ce.current)?Em(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=Bm(n.href),t=It(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=Bm(n.href);var o=It(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(Vm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=wm.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},wm.set(e,o)),Um(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=Wm(n),t=It(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 Bm(e){return`href="`+rn(e)+`"`}function Vm(e){return`link[rel="stylesheet"][`+e+`]`}function Hm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Um(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Rt.bind(null,t),cp(t,`link`,n),Lt(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 Wm(e){return`[src="`+rn(e)+`"]`}function Gm(e){return`script[async]`+e}function Km(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+rn(n.href)+`"]`);if(r)return t.instance=r,Lt(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`),Lt(r),cp(r,`style`,a),qm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bm(n.href);var o=e.querySelector(Vm(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Hm(n),(a=wm.get(a))&&Jm(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),cp(o,`link`,r),t.state.loading|=4,qm(o,n.precedence,e),t.instance=o;case`script`:return o=Wm(n.src),(a=e.querySelector(Gm(o)))?(t.instance=a,Lt(a),a):(r=n,(a=wm.get(o))&&(r=T({},n),Ym(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),cp(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,qm(r,n.precedence,e));return t.instance}function qm(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 Jm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Ym(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xm=null;function Zm(e,t,n){if(Xm===null){var r=new Map,i=Xm=new Map;i.set(n,r)}else i=Xm,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[At]||a[Ct]||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 Qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $m(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 eh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function th(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function nh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function rh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=nh(t),e.suspenseyImages.push(t)),e=lh.bind(e),t.decode().then(e,e))}function ih(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=Bm(r.href),a=t.querySelector(Vm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ch.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Hm(r),(i=wm.get(i))&&Jm(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),cp(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=ch.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ah=0;function oh(e,t){return e.stylesheets&&e.count===0&&dh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&dh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ah===0&&(ah=62500*fp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ah?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)dh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ch(){this.count--,sh(this)}function lh(){this.imgCount--,sh(this)}var uh=null;function dh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,uh=new Map,t.forEach(fh,e),uh=null,ch.call(e))}function fh(e,t){if(!(t.state.loading&4)){var n=uh.get(e);if(n)var r=n.get(null);else{n=new Map,uh.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=ch.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 ph={$$typeof:ne,Provider:null,Consumer:null,_currentValue:_e,_currentValue2:_e,_threadCount:0};function mh(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=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(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 hh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new mh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ji(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},mo(a),e}function gh(e){return e?(e=ki,e):ki}function _h(e,t,n,r,i,a){i=gh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(zd(n,e,t),vo(n,e,t))}function vh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yh(e,t){vh(e,t),(e=e.alternate)&&vh(e,t)}function bh(e){if(e.tag===13||e.tag===31){var t=Ei(e,67108864);t!==null&&zd(t,e,67108864),yh(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=Id();t=vt(t);var n=Ei(e,t);n!==null&&zd(n,e,t),yh(e,t)}}var Sh=!0;function Ch(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,Th(e,t,n,r)}finally{N.p=a,M.T=i}}function wh(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,Th(e,t,n,r)}finally{N.p=a,M.T=i}}function Th(e,t,n,r){if(Sh){var i=Eh(r);if(i===null)Qf(e,t,r,Dh,n),Rh(e,r);else if(Bh(i,e,t,n,r))r.stopPropagation();else if(Rh(e,r),t&4&&-1<Lh.indexOf(e)){for(;i!==null;){var a=Pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ot(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-$e(o);s.entanglements[1]|=c,o&=~c}Mf(a),!(V&6)&&(xd=Ve()+500,Nf(0,!1))}}break;case 31:case 13:s=Ei(a,2),s!==null&&zd(s,a,2),Wd(),yh(a,2)}if(a=Eh(r),a===null&&Qf(e,t,r,Dh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Qf(e,t,r,null,n)}}function Eh(e){return e=bn(e),Oh(e)}var Dh=null;function Oh(e){if(Dh=null,e=Nt(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 Dh=e,null}function kh(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(He()){case Ue:return 2;case We:return 8;case Ge:case Ke:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Ah=!1,jh=null,Mh=null,Nh=null,Ph=new Map,Fh=new Map,Ih=[],Lh=`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 Rh(e,t){switch(e){case`focusin`:case`focusout`:jh=null;break;case`dragenter`:case`dragleave`:Mh=null;break;case`mouseover`:case`mouseout`:Nh=null;break;case`pointerover`:case`pointerout`:Ph.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Fh.delete(t.pointerId)}}function zh(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=Pt(t),t!==null&&bh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Bh(e,t,n,r,i){switch(t){case`focusin`:return jh=zh(jh,e,t,n,r,i),!0;case`dragenter`:return Mh=zh(Mh,e,t,n,r,i),!0;case`mouseover`:return Nh=zh(Nh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ph.set(a,zh(Ph.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Fh.set(a,zh(Fh.get(a)||null,e,t,n,r,i)),!0}return!1}function Vh(e){var t=Nt(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,xt(e.priority,function(){xh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,xt(e.priority,function(){xh(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 Hh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yn=r,n.target.dispatchEvent(r),yn=null}else return t=Pt(n),t!==null&&bh(t),e.blockedOn=n,!1;t.shift()}return!0}function Uh(e,t,n){Hh(e)&&n.delete(t)}function Wh(){Ah=!1,jh!==null&&Hh(jh)&&(jh=null),Mh!==null&&Hh(Mh)&&(Mh=null),Nh!==null&&Hh(Nh)&&(Nh=null),Ph.forEach(Uh),Fh.forEach(Uh)}function Gh(e,n){e.blockedOn===n&&(e.blockedOn=null,Ah||(Ah=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Wh)))}var Kh=null;function qh(e){Kh!==e&&(Kh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Kh===e&&(Kh=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(Oh(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,tc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Jh(e){function t(t){return Gh(t,e)}jh!==null&&Gh(jh,e),Mh!==null&&Gh(Mh,e),Nh!==null&&Gh(Nh,e),Ph.forEach(t),Fh.forEach(t);for(var n=0;n<Ih.length;n++){var r=Ih[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ih.length&&(n=Ih[0],n.blockedOn===null);)Vh(n),n.blockedOn===null&&Ih.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[wt]||null;if(typeof a==`function`)o||qh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[wt]||null)s=o.formAction;else if(Oh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),qh(n)}}}function Yh(){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 Xh(e){this._internalRoot=e}Zh.prototype.render=Xh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;_h(n,Id(),e,t,null,null)},Zh.prototype.unmount=Xh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_h(e.current,2,null,e,null,null),Wd(),t[Tt]=null}};function Zh(e){this._internalRoot=e}Zh.prototype.unstable_scheduleHydration=function(e){if(e){var t=bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ih.length&&t!==0&&t<Ih[n].priority;n++);Ih.splice(n,0,e),n===0&&Vh(e)}};var Qh=n.version;if(Qh!==`19.3.0`)throw Error(i(527,Qh,`19.3.0`));N.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 $h={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var eg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eg.isDisabled&&eg.supportsFiber)try{Xe=eg.inject($h),Ze=eg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=wc,s=Tc,c=Ec;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=hh(e,1,!1,null,null,n,r,null,o,s,c,Yh),e[Tt]=t.current,Xf(e),new Xh(t)}})),Zd=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=Xd()})),Qd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,$d=/^[\\/]{2}/;function ef(e,t){return t+e.replace(/\\/g,`/`)}var tf=`popstate`;function nf(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function rf(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return cf(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:lf(t)}return df(t,n,null,e)}function W(e,t){if(e===!1||e==null)throw Error(t)}function af(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function of(){return Math.random().toString(36).substring(2,10)}function sf(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function cf(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?uf(t):t,state:n,key:t&&t.key||r||of(),mask:i}}function lf({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function uf(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function df(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=nf(e)?e:cf(h.location,e,t);n&&n(r,e),l=u()+1;let d=sf(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=nf(e)?e:cf(h.location,e,t);n&&n(r,e),l=u();let i=sf(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ff(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(tf,d),c=e,()=>{i.removeEventListener(tf,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ff(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),W(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:lf(t);return i=i.replace(/ $/,`%20`),!n&&$d.test(i)&&(i=r+i),new URL(i,r)}var pf=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},mf=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function hf(e){return mf.has(e)}var gf=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function _f(e){return gf.has(e)}function vf(e){return e.index===!0}function yf(e){let t={};return e.Component&&Object.assign(t,{element:m.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:m.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function G(e,t=yf,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(W(e.index!==!0||!e.children,`Cannot specify children on an index route`),W(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),vf(e)){let n={...e,id:s};return r[s]=bf(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=bf(n,t(n)),e.children&&(n.children=G(e.children,t,o,r,i)),n}})}function bf(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function xf(e,t,n=`/`){return Sf(e,t,n,!1)}function Sf(e,t,n,r,i){let a=Wf((typeof t==`string`?uf(t):t).pathname||`/`,n);if(a==null)return null;let o=i??wf(e),s=null,c=Uf(a);for(let e=0;s==null&&e<o.length;++e)s=zf(o[e],c,r);return s}function Cf(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function wf(e){let t=Tf(e);return Df(t),t}function Tf(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;W(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=$f([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(W(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Tf(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Lf(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Hf(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Ef(e.path))a(e,t,!0,n)}),t}function Ef(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Ef(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Df(e){e.sort((e,t)=>e.score===t.score?Rf(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Of=/^:[\w-]+$/,kf=/^:[\w-]+/,Af=3.5,jf=3,Mf=2,Nf=1,Pf=10,Ff=-2,If=e=>e===`*`;function Lf(e,t){let n=e.split(`/`),r=n.length;return n.some(If)&&(r+=Ff),t&&(r+=Mf),n.filter(e=>!If(e)).reduce((e,t)=>e+(Of.test(t)?jf:kf.test(t)?Af:t===``?Nf:Pf),r)}function Rf(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function zf(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Vf(u,l,s.matcher,s.compiledParams):Bf(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Bf({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:$f([a,d.pathname]),pathnameBase:tp($f([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=$f([a,d.pathnameBase]))}return o}function Bf(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Hf(e.path,e.caseSensitive,e.end);return Vf(e,t,n,r)}function Vf(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=ep(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=ep(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Hf(e,t=!1,n=!0){af(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Uf(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return af(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wf(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Gf({basename:e,pathname:t}){return t===`/`?e:$f([e,t])}var Kf=e=>Qd.test(e);function qf(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?uf(e):e,a;return n?(n=Qf(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?K(n.substring(1),`/`):K(n,t)):a=t,{pathname:a,search:np(r),hash:rp(i)}}function K(e,t){let n=ep(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Jf(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Yf(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Xf(e){let t=Yf(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Zf(e,t,n,r=!1){let i;typeof e==`string`?i=uf(e):(i={...e},W(!i.pathname||!i.pathname.includes(`?`),Jf(`?`,`pathname`,`search`,i)),W(!i.pathname||!i.pathname.includes(`#`),Jf(`#`,`pathname`,`hash`,i)),W(!i.search||!i.search.includes(`#`),Jf(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=qf(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Qf=e=>e.replace(/[\\/]{2,}/g,`/`),$f=e=>Qf(e.join(`/`));function ep(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var tp=e=>ep(e).replace(/^\/*/,`/`),np=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,rp=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ip=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],ap=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function op(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function q(e){return $f(e.map(e=>e.route.path).filter(Boolean))||`/`}function sp(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?uf(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var cp=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function lp(e,t){let n=e;if(typeof n!=`string`||!Qd.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(cp)try{let e=new URL(window.location.href),r=$d.test(n)?new URL(ef(n,e.protocol)):new URL(n),a=Wf(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{af(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var up=Symbol(`Uninstrumented`),dp=new WeakMap;function fp(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>vp(await yp(n.lazy,void 0,()=>e(...t),bp))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>vp(await yp(n[`lazy.middleware`],void 0,()=>t(...e),bp))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>vp(await yp(n[`lazy.loader`],void 0,()=>t(...e),bp))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>vp(await yp(n[`lazy.action`],void 0,()=>t(...e),bp))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=mp(t.loader),i=async(...t)=>vp(await yp(n.loader,xp(t[0]),()=>e(...t),bp));e.hydrate===!0&&(i.hydrate=!0),hp(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=mp(t.action),i=async(...t)=>vp(await yp(n.action,xp(t[0]),()=>e(...t),bp));hp(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=mp(e),r=async(...e)=>vp(await yp(n.middleware,xp(e[0]),()=>t(...e),bp));return hp(r,t),r})),r}function pp(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=mp(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?lf(i):`.`,...Sp(e,a??{})};return vp(await yp(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=gp(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...bp(e),meta:o})))};hp(r,t),e.navigate=r}if(n.fetch.length>0){let t=mp(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return vp(await yp(n.fetch,{href:o??`.`,fetcherKey:i,...Sp(e,s??{})},async()=>{let n=gp(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...bp(e),meta:c})))};hp(r,t),e.fetch=r}return e}function mp(e){return e[up]??e}function hp(e,t){e[up]=t}function gp(e,t){return dp.set(e,t),()=>{dp.get(e)===t&&dp.delete(e)}}function _p(e){let t=dp.get(e);return dp.delete(e),t}function vp(e){if(e.type===`error`)throw e.value;return e.value}async function yp(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=yp(e,t,n,r,i,a-1),await s,W(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function bp(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function xp(e){let{request:t,context:n,params:r}=e;return{...e,request:Cp(t),params:{...r},context:wp(n)}}function Sp(e,t){return{currentUrl:lf(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Cp(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function wp(e){return{get:t=>e.get(t)}}var Tp=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=wf(e)}match(e,t=!1){return Sf(this.#e,e,this.#n,t,this.#t)}},Ep=new URL(`http://localhost`);function Dp(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Ep)}catch{return Ep}}function Op(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function kp(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Ap(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Op(i,n),s=!Op(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!kp(e,i)||!Op(i,a)))throw Error(`External navigation is not allowed`)}var jp=[`POST`,`PUT`,`PATCH`,`DELETE`],Mp=new Set(jp),Np=[`GET`,...jp],Pp=new Set(Np),Fp=new Set([301,302,303,307,308]),Ip=new Set([307,308]),Lp={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rp={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},zp={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Bp=`remix-router-transitions`,Vp=Symbol(`ResetLoaderData`);function Hp(e,t){return e.unstable_routePatternMatching?(W(void 0,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new(void 0)(t)):new Tp(t)}var Up=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}};function Wp(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;W(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...fp(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=Hp(o,s),l={},u=new Up(G(e.routes,a,void 0,l),c),d=e.dataStrategy||sm,f=null,p=new Set,m=null,h=null,g=null,_=null,v=e.hydrationData!=null,y=c.match(e.history.location),b=!1,x=null,S,C;if(y==null&&!e.patchRoutesOnNavigation){let t=jm(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Am(u.activeRoutes);S=!0,C=!S,y=n,x={[r.id]:t}}else if(y&&!e.hydrationData&&Ye(y,e.history.location.pathname).active&&(y=null),!y){S=!1,C=!S,y=[];let t=Ye(null,e.history.location.pathname);t.active&&t.matches&&(b=!0,y=t.matches)}else if(y.some(e=>e.route.lazy))S=!1,C=!S;else if(!y.some(e=>Yp(e.route)))S=!0,C=!S;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=y;if(n){let e=y.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}C=!1,S=!0,r.forEach(e=>{let r=Xp(e.route,t,n);C||=r.renderFallback,S&&=!r.shouldLoad})}let w,T={historyAction:e.history.action,location:e.history.location,matches:y,initialized:S,renderFallback:C,navigation:Lp,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},E=`POP`,D=null,O=!1,k,ee=!1,A=new Map,te=null,ne=!1,re=!1,ie=new Set,ae=new Map,oe=0,se=-1,ce=new Map,j=new Set,le=new Map,ue=new Map,de=new Set,fe=new Map,pe,me=null;function he(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(pe){pe(),pe=void 0;return}af(fe.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ue({currentLocation:T.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{pe=e});e.history.go(r*-1),He(i,{state:`blocked`,location:n,proceed(){He(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(T.blockers);e.set(i,zp),N({blockers:e})}}),D?.resolve(),D=null;return}return F(t,n)}),n){nh(t,A);let e=()=>rh(t,A);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return T.initialized||F(`POP`,T.location,{initialHydration:!0}),w}function ge(){f&&f(),te&&te(),p.clear(),k&&k.abort(),T.fetchers.forEach((e,t)=>Pe(T.fetchers,t)),T.blockers.forEach((e,t)=>Ve(t))}function M(e){if(p.add(e),m){let{newErrors:t}=m;m=null,e(T,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(e)}function N(e,t={}){e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),T={...T,...e};let n=[],r=[];T.fetchers.forEach((e,t)=>{e.state===`idle`&&(de.has(t)?n.push(t):r.push(t))}),de.forEach(e=>{!T.fetchers.has(e)&&!ae.has(e)&&n.push(e)}),p.size===0&&(m={newErrors:e.errors??null}),[...p].forEach(r=>r(T,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Pe(T.fetchers,e)),r.forEach(e=>T.fetchers.delete(e))}function _e(t,n,{flushSync:r}={}){let i=T.actionData!=null&&T.navigation.formMethod!=null&&Km(T.navigation.formMethod)&&T.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?T.actionData:null;let o=n.loaderData?Dm(T.loaderData,n.loaderData,n.matches||[],n.errors):T.loaderData,s=T.blockers;s.size>0&&!ne&&(s=new Map(s),s.forEach((e,t)=>s.set(t,zp)));let c=!ne&&Je(t,n.matches||T.matches),l=O===!0||T.navigation.formMethod!=null&&Km(T.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),ne||E===`POP`||(E===`PUSH`?e.history.push(t,t.state):E===`REPLACE`&&e.history.replace(t,t.state));let d;if(E===`POP`&&!ne&&t!==T.location){let e=A.get(T.location.pathname);e&&e.has(t.pathname)?d={currentLocation:T.location,nextLocation:t}:A.has(t.pathname)&&(d={currentLocation:t,nextLocation:T.location})}else if(ee){let e=A.get(T.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(T.location.pathname,e)),d={currentLocation:T.location,nextLocation:t}}N({...n,actionData:a,loaderData:o,historyAction:E,location:t,initialized:!0,renderFallback:!1,navigation:Lp,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),E=`POP`,O=!1,ee=!1,ne=!1,re=!1,D?.resolve(),D=null,me?.resolve(),me=null}async function P(t,n){if(D?.resolve(),D=null,typeof t==`number`){D||=ih();let n=D.promise;return e.history.go(t),n}let r=_p(w),{path:i,submission:a,error:o}=qp(!1,Kp(T.location,T.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?uf(n.mask):{...T.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},$d.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),Ap(typeof n.mask==`string`?n.mask:lf(n.mask),lf(c),e.history.createURL(`/`),`reject`)}let l=T.location,u=cf(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},Ap(t==null?e.history.createHref(T.location):typeof t==`string`?t:lf(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Km(a.formMethod)&&a.formAction===T.location.pathname+T.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Ue({currentLocation:l,nextLocation:u,historyAction:f});if(h){He(h,{state:`blocked`,location:u,proceed(){He(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),P(t,n)},reset(){let e=new Map(T.blockers);e.set(h,zp),N({blockers:e})}});return}await F(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function ve(){me||=ih(),ke(),N({revalidation:`loading`});let e=me.promise;return T.navigation.state===`submitting`?e:T.navigation.state===`idle`?(F(T.historyAction,T.location,{startUninterruptedRevalidation:!0}),e):(F(E||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:ee===!0}),e)}async function F(t,n,r){k&&k.abort(),k=null,E=t,ne=(r&&r.startUninterruptedRevalidation)===!0,qe(T.location,T.matches),O=(r&&r.preventScrollReset)===!0,ee=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&T.matches&&T.matches.length>0&&!b?T.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&T.initialized&&!re&&Pm(T.location,n)&&!(r&&r.submission&&Km(r.submission.formMethod))){_e(n,{matches:i},{flushSync:a});return}let o=Ye(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=Ym(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=We(n.pathname);_e(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;k=new AbortController;let l=Sm(e.history,n,k.signal,r&&r.submission),u=e.getContext?await e.getContext():new pf,d;if(r&&r.pendingError)d=[km(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Km(r.submission.formMethod)){let c=await ye(l,n,r.submission,i,t,u,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(zm(t)&&op(t.error)&&t.error.status===404){k=null,_e(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,d=c.pendingActionResult,s=Zm(n,i,t,r.submission),a=!1,o.active=!1,l=Sm(e.history,l.url,l.signal)}let{shortCircuited:f,matches:p,loaderData:m,errors:h,workingFetchers:g}=await be(l,n,i,t,u,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,d,r&&r.callSiteDefaultShouldRevalidate);f||(k=null,_e(n,{matches:p||i,...Om(d),loaderData:m,errors:h,...g?{fetchers:g}:{}}))}async function ye(t,n,i,o,c,d,f,p,m={}){if(ke(),N({navigation:Qm(n,o,c,i)},{flushSync:m.flushSync===!0}),f){let e=await Xe(o,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Am(u.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=km(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)o=e.matches;else{let{notFoundMatches:e,error:t,route:r}=We(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Jm(o,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:jm(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await De(t,n,pm(a,l,t,n,o,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of o)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Bm(h)){let n;return n=m&&m.replace!=null?m.replace:xm(h.response.headers.get(`Location`),new URL(t.url),s,e.history)===T.location.pathname+T.location.search,await Ee(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(zm(h)){let e=km(o,g.route.id);return(m&&m.replace)!==!0&&(E=`PUSH`),{matches:o,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:o,pendingActionResult:[g.route.id,h]}}async function be(t,n,i,o,s,d,f,p,m,h,g,_,v,y){let b=f||Zm(n,i,o,p),x=p||m||Xm(b),S=!ne&&!g;if(d){if(S){let e=xe(v);N({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Xe(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Am(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=km(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=We(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let{dsMatches:C,revalidatingFetchers:w}=Jp(t,s,a,l,e.history,T,i,x,n,g?[]:r,g===!0,re,ie,de,le,j,c,v,y);if(se=++oe,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=new Map(T.fetchers),t=Re(e);return _e(n,{matches:i,loaderData:{},errors:v&&zm(v[1])?{[v[0]]:v[1].error}:null,...Om(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=xe(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Se(w)),N(e,{flushSync:_})}w.forEach(e=>{Ie(e.key),e.controller&&ae.set(e.key,e.controller)});let E=()=>w.forEach(e=>Ie(e.key));k&&k.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await Oe(C,w,t,n,s);if(t.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener(`abort`,E),w.forEach(e=>ae.delete(e.key));let ee=Mm(D);if(ee)return await Ee(t,ee.result,!0,{replace:h}),{shortCircuited:!0};if(ee=Mm(O),ee)return j.add(ee.key),await Ee(t,ee.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(T.fetchers),{loaderData:te,errors:ce}=Em(T,i,D,v,w,O,A);g&&T.errors&&(ce={...T.errors,...ce});let ue=Re(A),fe=ze(se,A),pe=ue||fe||w.length>0;return{matches:i,loaderData:te,errors:ce,...pe?{workingFetchers:A}:{}}}function xe(e){if(e&&!zm(e[1]))return{[e[0]]:e[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function Se(e){let t=new Map(T.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=$m(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ce(t,n,r,i){Ie(t);let a=(i&&i.flushSync)===!0,o=_p(w),l=Kp(T.location,T.matches,s,r,n,i?.relative),u=c.match(l),d=Ye(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(Ym(e.history,l,u)),!u){je(t,n,jm(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=qp(!0,l,i);if(m){je(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new pf,g=(i&&i.preventScrollReset)===!0;if(p&&Km(p.formMethod)){await we(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};le.set(t,_),await Te(t,_,u,h,a,g,p)}async function we(t,n,i,o,s,u,d,f,p,m){ke(),le.delete(t),Ae(t,eh(p,T.fetchers.get(t)),{flushSync:d});let h=new AbortController,g=Sm(e.history,i,h.signal,p);if(u){let e=await Xe(o,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){je(t,n,e.error,{flushSync:d});return}if(e.matches)o=e.matches;else{je(t,n,jm(404,{pathname:i}),{flushSync:d});return}}let _=Jm(o,i);if(!_.route.action&&!_.route.lazy){je(t,n,jm(405,{method:p.formMethod,pathname:i,routeId:n}),{flushSync:d});return}ae.set(t,h);let v=oe,y=pm(a,l,g,i,o,_,r,s),b=await De(g,i,y,s,t),x=b[_.route.id];if(!x){for(let e of y)if(b[e.route.id]){x=b[e.route.id];break}}if(g.signal.aborted){ae.get(t)===h&&ae.delete(t);return}if(de.has(t)){if(Bm(x)||zm(x)){Ae(t,th(void 0));return}}else{if(Bm(x)){if(ae.delete(t),se>v){Ae(t,th(void 0));return}return j.add(t),Ae(t,$m(p)),Ee(g,x,!1,{fetcherSubmission:p,preventScrollReset:f})}if(zm(x)){je(t,n,x.error);return}}let S=T.navigation.location||T.location,C=Sm(e.history,S,h.signal),w=T.navigation.state===`idle`?T.matches:c.match(T.navigation.location);W(w,`Didn't find any matches after fetcher action`);let D=++oe;ce.set(t,D);let{dsMatches:O,revalidatingFetchers:ee}=Jp(C,s,a,l,e.history,T,w,p,S,r,!1,re,ie,de,le,j,c,[_.route.id,x],m),A=$m(p,x.data),te=new Map(T.fetchers);te.set(t,A),ee.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=te.get(t),r=$m(void 0,n?n.data:void 0);te.set(t,r),Ie(t),e.controller&&ae.set(t,e.controller)}),N({fetchers:te});let ne=()=>ee.forEach(e=>Ie(e.key));h.signal.addEventListener(`abort`,ne);let{loaderResults:ue,fetcherResults:fe}=await Oe(O,ee,C,S,s);if(h.signal.aborted){ce.get(t)===D&&ce.delete(t);return}h.signal.removeEventListener(`abort`,ne),ce.delete(t),ae.delete(t),ee.forEach(e=>ae.delete(e.key));let pe=T.fetchers.has(t),me=e=>{if(!pe)return e;let n=new Map(e.fetchers);return n.set(t,th(x.data)),{...e,fetchers:n}},he=Mm(ue);if(he)return T=me(T),Ee(C,he.result,!1,{preventScrollReset:f});if(he=Mm(fe),he)return j.add(he.key),T=me(T),Ee(C,he.result,!1,{preventScrollReset:f});let ge=new Map(T.fetchers);pe&&ge.set(t,th(x.data));let{loaderData:M,errors:P}=Em(T,w,ue,void 0,ee,fe,ge);ze(D,ge),T.navigation.state===`loading`&&D>se?(W(E,`Expected pending action`),k&&k.abort(),_e(T.navigation.location,{matches:w,loaderData:M,errors:P,fetchers:ge})):(N({errors:P,loaderData:Dm(T.loaderData,M,w,P),fetchers:ge}),re=!1)}async function Te(t,n,i,o,s,c,u){let{routeId:d,path:f}=n,p=T.fetchers.get(t);Ae(t,$m(u,p?p.data:void 0),{flushSync:s});let m=new AbortController,h=Sm(e.history,f,m.signal);if(n.isDiscovering){let e=await Xe(i,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){je(t,d,e.error,{flushSync:s});return}if(e.matches)i=e.matches,n.isDiscovering=!1;else{je(t,d,jm(404,{pathname:f}),{flushSync:s});return}}let g=Jm(i,f);ae.set(t,m);let _=oe,v=await De(h,f,pm(a,l,h,f,i,g,r,o),o,t),y=v[g.route.id];if(!y){for(let e of i)if(v[e.route.id]){y=v[e.route.id];break}}if(ae.get(t)===m&&ae.delete(t),!h.signal.aborted){if(de.has(t)){Ae(t,th(void 0));return}if(Bm(y)){if(se>_){Ae(t,th(void 0));return}j.add(t),await Ee(h,y,!1,{preventScrollReset:c});return}if(zm(y)){je(t,d,y.error);return}Ae(t,th(y.data))}}async function Ee(r,i,a,{submission:o,fetcherSubmission:c,preventScrollReset:l,replace:u}={}){a||(D?.resolve(),D=null),i.response.headers.has(`X-Remix-Revalidate`)&&(re=!0);let d=i.response.headers.get(`Location`);W(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=xm(d,p,s,e.history),Ap(f,d,p,`allow-explicit`);let m=cf(T.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Kf(d)){let n=ff(t,d,!0);e=n.origin!==t.location.origin||Wf(n.pathname,s)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}k=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=T.navigation;!o&&!c&&g&&_&&v&&(o=Xm(T.navigation));let y=o||c;Ip.has(i.response.status)&&y&&Km(y.formMethod)?await F(h,m,{submission:{...y,formAction:d},preventScrollReset:l||O,enableViewTransition:a?ee:void 0}):await F(h,m,{overrideNavigation:Zm(m,[],h,o),fetcherSubmission:c,preventScrollReset:l||O,enableViewTransition:a?ee:void 0})}async function De(e,t,n,r,i){let a,o={};try{a=await mm(d,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Km(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!T.loaderData.hasOwnProperty(e.route.id)&&(!T.errors||!T.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Rm(r)){let i=r.result;o[t]={type:`redirect`,response:vm(i,e,t,n,s)}}else o[t]=await _m(r);return o}async function Oe(e,t,n,r,i){let a=De(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await De(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:jm(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function ke(){re=!0,le.forEach((e,t)=>{ae.has(t)&&ie.add(t),Ie(t)})}function Ae(e,t,n={}){let r=new Map(T.fetchers);r.set(e,t),N({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function je(e,t,n,r={}){let i=km(T.matches,t),a=new Map(T.fetchers);Pe(a,e),N({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Me(e){return ue.set(e,(ue.get(e)||0)+1),de.has(e)&&de.delete(e),T.fetchers.get(e)||Rp}function Ne(e,t){Ie(e,t?.reason),Ae(e,th(null))}function Pe(e,t){let n=T.fetchers.get(t);ae.has(t)&&!(n&&n.state===`loading`&&ce.has(t))&&Ie(t),le.delete(t),ce.delete(t),j.delete(t),de.delete(t),ie.delete(t),e.delete(t)}function Fe(e){let t=(ue.get(e)||0)-1;t<=0?(ue.delete(e),de.add(e)):ue.set(e,t),N({fetchers:new Map(T.fetchers)})}function Ie(e,t){let n=ae.get(e);n&&(n.abort(t),ae.delete(e))}function Le(e,t){for(let n of e){let e=t.get(n);W(e,`Expected fetcher: ${n}`);let r=th(e.data);t.set(n,r)}}function Re(e){let t=[],n=!1;for(let r of j){let i=e.get(r);W(i,`Expected fetcher: ${r}`),i.state===`loading`&&(j.delete(r),t.push(r),n=!0)}return Le(t,e),n}function ze(e,t){let n=[];for(let[r,i]of ce)if(i<e){let e=t.get(r);W(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ie(r),ce.delete(r),n.push(r))}return Le(n,t),n.length>0}function Be(e,t){let n=T.blockers.get(e)||zp;return fe.get(e)!==t&&fe.set(e,t),n}function Ve(e){T.blockers.delete(e),fe.delete(e)}function He(e,t){let n=T.blockers.get(e)||zp;W(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(T.blockers);r.set(e,t),N({blockers:r})}function Ue({currentLocation:e,nextLocation:t,historyAction:n}){if(fe.size===0)return;fe.size>1&&af(!1,`A router only supports one blocker at a time`);let r=Array.from(fe.entries()),[i,a]=r[r.length-1],o=T.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function We(e){let t=jm(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=Am(n);return{notFoundMatches:r,route:i,error:t}}function Ge(e,t,n){if(h=e,_=t,g=n||null,!v&&T.navigation===Lp){v=!0;let e=Je(T.location,T.matches);e!=null&&N({restoreScrollPosition:e})}return()=>{h=null,_=null,g=null}}function Ke(e,t){return g&&g(e,t.map(e=>Cf(e,T.loaderData)))||e.key}function qe(e,t){if(h&&_){let n=Ke(e,t);h[n]=_()}}function Je(e,t){if(h){let n=Ke(e,t),r=h[n];if(typeof r==`number`)return r}return null}function Ye(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function Xe(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let o=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:o,fetcherKey:i,patch:(e,n)=>{r.aborted||em(e,n,u,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:o}}if(r.aborted)return{type:`aborted`};let s=c.match(n),d=null;if(s&&(Object.keys(s[0].params).length===0||(d=c.match(n,!0),!(d&&o.length<d.length&&Ze(o,d.slice(0,o.length))))))return{type:`success`,matches:s};if(d||=c.match(n,!0),!d||Ze(o,d))return{type:`success`,matches:null};o=d}}function Ze(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Qe(e){l={},u.setHmrRoutes(G(e,a,void 0,l))}function $e(e,t,n=!1){em(e,t,u,l,a,n),u.hasHMRRoutes||N({})}return w={get basename(){return s},get future(){return o},get state(){return T},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:he,subscribe:M,enableScrollRestoration:Ge,navigate:P,fetch:Ce,revalidate:ve,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Me,resetFetcher:Ne,deleteFetcher:Fe,dispose:ge,getBlocker:Be,deleteBlocker:Ve,patchRoutes:$e,_internalFetchControllers:ae,_internalSetRoutes:Qe,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){N(e)}},e.instrumentations&&(w=pp(w,e.instrumentations.map(e=>e.router).filter(Boolean))),w}function Gp(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Kp(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Zf(r||`.`,Xf(o),Wf(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=qm(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Gf({basename:n,pathname:c.pathname})),lf(c)}function qp(e,t,n){if(!n||!Gp(n))return{path:t};if(n.formMethod&&!Gm(n.formMethod))return{path:t,error:jm(405,{method:n.formMethod})};let r=()=>({path:t,error:jm(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Nm(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Km(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Km(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}W(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Cm(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Cm(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=wm(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=wm(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Km(c.formMethod))return{path:t,submission:c};let l=uf(t);return e&&l.search&&qm(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:lf(l),submission:c}}function Jp(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?zm(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&zm(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=q(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!Yp(s))f=!1;else if(u){let{shouldLoad:e}=Xp(s,a.loaderData,a.errors);f=e}else Zp(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return fm(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?Qp(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return fm(n,r,e,c,E,i,l,t,$p(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=Jm(_,e.path),b=new AbortController,x=Sm(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=pm(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=pm(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:!w&&d;let a={...T,defaultShouldRevalidate:i};$p(y,a)&&(S=pm(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function Yp(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xp(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Yp(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Zp(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Qp(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function $p(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function em(e,t,n,r,i,a){let o;if(e){let t=r[e];W(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>tm(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=G(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=G([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function tm(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>tm(e,t)))??!1}var nm=new WeakMap,rm=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(W(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=nm.get(i);o||(o={},nm.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=hf(e),n=i[e]!==void 0;if(t)af(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)af(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},im=new WeakMap;function am(e,t,n,r,i){let a=n[e.id];if(W(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=im.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{W(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=_f(e),o=a[e]!==void 0;i?af(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?af(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return im.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=rm({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function om(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function sm(e){return e.matches.some(e=>e.route.middleware)?cm(e,()=>om(e)):om(e)}function cm(e,t){return lm(e,t,e=>{if(Wm(e))throw e;return e},Im,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[km(r,a).route.id]:{type:`error`,result:t}}}}}async function lm(e,t,n,r,i){let{matches:a,...o}=e;return await um(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function um(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await um(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function dm(e,t,n,r,i){let a=rm({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=am(r.route,Km(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function fm(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=dm(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?$p(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?$p(a,{...l,defaultShouldRevalidate:e}):$p(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Km(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Km(n.method)||!p)?hm({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function pm(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?fm(e,t,n,r,q(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:dm(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function mm(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:sp(t,n),pattern:q(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return cm(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function hm({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Km(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:sp(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw jm(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw jm(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function gm(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function _m(e){let{result:t,type:n}=e;if(Hm(t)){let e;try{e=await gm(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new ap(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Vm(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Fm(t),statusCode:op(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:op(t)?t.status:void 0}:Vm(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function vm(e,t,n,r,i){let a=e.headers.get(`Location`);if(W(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Kf(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Kp(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var ym=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function bm(e){try{return ym.includes(new URL(e).protocol)}catch{return!1}}function xm(e,t,n,r){if(Kf(e)){let r=e,i=$d.test(r)?new URL(ef(r,t.protocol)):new URL(r);if(bm(i.toString()))throw Error(`Invalid redirect location`);let a=Wf(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Qf(i.pathname)+i.search+i.hash}try{if(bm(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Sm(e,t,n,r){let i=e.createURL(Nm(t)).toString(),a={signal:n};if(r&&Km(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Cm(r.formData):r.formData}return new Request(i,a)}function Cm(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function wm(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Tm(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&zm(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(W(!Bm(f),`Cannot handle redirect results in processLoaderData`),zm(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=km(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Vp),c||(c=!0,s=op(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Em(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Tm(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(W(s,`Did not find corresponding fetcher result`),zm(s)){let t=km(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Bm(s))W(!1,`Unhandled fetcher revalidation redirect`);else{let e=th(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Dm(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Vp).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function Om(e){return e?zm(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function km(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Am(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function jm(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new ap(e||500,o,Error(s),!0)}function Mm(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Bm(r))return{key:n,result:r}}}function Nm(e){return lf({...typeof e==`string`?uf(e):e,hash:``})}function Pm(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Fm(e){return new ap(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Im(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Lm(t))}function Lm(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Rm(e){return Hm(e.result)&&Fp.has(e.result.status)}function zm(e){return e.type===`error`}function Bm(e){return(e&&e.type)===`redirect`}function Vm(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Hm(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Um(e){return Fp.has(e)}function Wm(e){return Hm(e)&&Um(e.status)&&e.headers.has(`Location`)}function Gm(e){return Pp.has(e.toUpperCase())}function Km(e){return Mp.has(e.toUpperCase())}function qm(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Jm(e,t){let n=typeof t==`string`?uf(t).search:t.search;if(e[e.length-1].route.index&&qm(n||``))return e[e.length-1];let r=Yf(e);return r[r.length-1]}function Ym(e,t,n){return{url:sp(e.createURL(t),t),pattern:n?q(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Xm(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Zm(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qm(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function $m(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eh(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function th(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function nh(e,t){try{let n=e.sessionStorage.getItem(Bp);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function rh(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Bp,JSON.stringify(n))}catch(e){af(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ih(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ah=m.createContext(null);ah.displayName=`DataRouter`;var oh=m.createContext(null);oh.displayName=`DataRouterState`;var sh=m.createContext(null);sh.displayName=`DataRouterData`;var ch=m.createContext(null);ch.displayName=`DataRouterNavigation`;var lh=m.createContext(!1);function uh(){return m.useContext(lh)}var dh=m.createContext({isTransitioning:!1});dh.displayName=`ViewTransition`;var fh=m.createContext(null);fh.displayName=`Fetchers`;var ph=m.createContext(null);ph.displayName=`Await`;var mh=m.createContext(null);mh.displayName=`Navigation`;var hh=m.createContext(null);hh.displayName=`Location`;var gh=m.createContext({outlet:null,matches:[],isDataRoute:!1});gh.displayName=`Route`;var _h=m.createContext(!1);_h.displayName=`IsDataRoute`;var vh=m.createContext(void 0);vh.displayName=`RouteId`;var yh=m.createContext(null);yh.displayName=`RouteError`;var bh=`REACT_ROUTER_ERROR`,xh=`REDIRECT`,Sh=`ROUTE_ERROR_RESPONSE`;function Ch(e){if(e.startsWith(`${bh}:${xh}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function wh(e){if(e.startsWith(`${bh}:${Sh}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ap(t.status,t.statusText,t.data)}catch{}}function Th(e,{relative:t}={}){W(Eh(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=m.useContext(mh),{hash:i,pathname:a,search:o}=Ph(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:$f([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Eh(){return m.useContext(hh)!=null}function Dh(){return W(Eh(),`useLocation() may be used only in the context of a <Router> component.`),m.useContext(hh).location}var Oh=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function kh(){return m.useContext(_h)?Yh():Ah()}function Ah(){W(Eh(),`useNavigate() may be used only in the context of a <Router> component.`);let e=m.useContext(ah),{basename:t,navigator:n}=m.useContext(mh),{matches:r}=m.useContext(gh),{pathname:i}=Dh(),a=JSON.stringify(Xf(r)),o=m.useRef(!1);return m.useLayoutEffect(()=>{o.current=!0}),m.useCallback((r,s={})=>{if(af(o.current,Oh),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Zf(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:$f([t,c.pathname])),Ap(typeof r==`string`?r:lf(r),n.createHref(c),Dp(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var jh=m.createContext(null);function Mh(e){let t=m.useContext(gh).outlet;return m.useMemo(()=>t&&m.createElement(jh.Provider,{value:e},t),[t,e])}function Nh(){let{matches:e}=m.useContext(gh);return e[e.length-1]?.params??{}}function Ph(e,{relative:t}={}){let{matches:n}=m.useContext(gh),{pathname:r}=Dh(),i=JSON.stringify(Xf(n));return m.useMemo(()=>Zf(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Fh(e,t,n){W(Eh(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=m.useContext(mh),{matches:i}=m.useContext(gh),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Dh(),l;if(t){let e=typeof t==`string`?uf(t):t;W(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):xf(e,{pathname:d});let p=Hh(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:$f([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:$f([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?m.createElement(hh.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Ih(){let e=Jh(),t=op(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return m.createElement(m.Fragment,null,m.createElement(`h2`,null,`Unexpected Application Error!`),m.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?m.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Lh=m.createElement(Ih,null),Rh=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=lh;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=wh(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:m.createElement(gh.Provider,{value:this.props.routeContext},m.createElement(_h.Provider,{value:this.props.routeContext.isDataRoute},m.createElement(vh.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},m.createElement(yh.Provider,{value:e,children:this.props.component}))));return this.context?m.createElement(Bh,{error:e},t):t}},zh=new WeakMap;function Bh({children:e,error:t}){let{basename:n,navigator:r}=m.useContext(mh);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ch(t.digest);if(e){let i=zh.get(t);if(i)throw i;let a=lp(e.location,n),o=a.absoluteURL||a.to;if(Ap(e.location,o,Dp(r),`allow-explicit`),bm(o))throw Error(`Invalid redirect location`);if(cp&&!zh.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw zh.set(t,n),n}}return m.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Vh({routeContext:e,match:t,children:n}){let r=m.useContext(ah);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(gh.Provider,{value:e},m.createElement(_h.Provider,{value:e.isDataRoute},m.createElement(vh.Provider,{value:t.route.id},n)))}function Hh(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);W(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:q(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Lh,o&&(s<0&&c===0?(Zh(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?m.createElement(n.route.Component,null):n.route.element?n.route.element:e,m.createElement(Vh,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?m.createElement(Rh,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function Uh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wh(e){let t=m.useContext(ah);return W(t,Uh(e)),t}function Gh(e){let t=m.useContext(oh);return W(t,Uh(e)),t}function Kh(e){let t=m.useContext(sh);return W(t,Uh(e)),t}function qh(e){let t=m.useContext(vh);return W(t,`${e} can only be used on routes that contain a unique "id"`),t}function Jh(){let e=m.useContext(yh),t=Kh(`useRouteError`),n=qh(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Yh(){let{router:e}=Wh(`useNavigate`),t=qh(`useNavigate`),n=m.useRef(!1);return m.useLayoutEffect(()=>{n.current=!0}),m.useCallback(async(r,i={})=>{af(n.current,Oh),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Xh={};function Zh(e,t,n){!t&&!Xh[e]&&(Xh[e]=!0,af(!1,n))}var Qh={};function $h(e,t){!e&&!Qh[t]&&(Qh[t]=!0,console.warn(t))}var eg=[`HydrateFallback`,`hydrateFallbackElement`],tg=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ng({router:e,flushSync:t,onError:n,useTransitions:r}){r=uh()||r;let[i,a]=m.useState(e.state),[o,s]=(0,m.useOptimistic)(i),[c,l]=m.useState(),[u,d]=m.useState({isTransitioning:!1}),[f,p]=m.useState(),[h,g]=m.useState(),[_,v]=m.useState(),y=m.useRef(new Map),b=m.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:q(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),$h(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if($h(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b){t&&u?t(()=>a(i)):r===!1?a(i):m.startTransition(()=>{r===!0&&s(e=>rg(e,i)),a(i)});return}if(t&&u){t(()=>{h&&(f?.resolve(),h.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>g(n));return}h?(f?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,f,r,s,n]);m.useLayoutEffect(()=>e.subscribe(b),[e,b]),m.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new tg)},[u]),m.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):m.startTransition(()=>{r===!0&&s(e=>rg(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})}),g(i)}},[c,f,e.window,r,s]),m.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,h,o.location,c]),m.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let x=m.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=m.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]),w=m.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),T=m.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),E=m.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),D=m.useMemo(()=>({fetchers:o.fetchers,fetcherData:y.current}),[o.fetchers]);return m.createElement(m.Fragment,null,m.createElement(ah.Provider,{value:C},m.createElement(oh.Provider,{value:w},m.createElement(ch.Provider,{value:T},m.createElement(sh.Provider,{value:E},m.createElement(fh.Provider,{value:D},m.createElement(dh.Provider,{value:u},m.createElement(sg,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},m.createElement(ig,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function rg(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var ig=m.memo(ag);function ag({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=m.useContext(ah);return W(a,`You must render this element inside a <DataRouterContext.Provider> element`),Fh(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function og(e){return Mh(e.context)}function sg({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){W(!Eh(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=m.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=uf(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:h}=n,g=m.useMemo(()=>{let e=Wf(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:h},navigationType:r}},[s,l,u,d,f,p,r,h]);return af(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(mh.Provider,{value:c},m.createElement(hh.Provider,{children:t,value:g}))}m.Component;var cg=`application/x-www-form-urlencoded`;function lg(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ug(e){return lg(e)&&e.tagName.toLowerCase()===`button`}function dg(e){return lg(e)&&e.tagName.toLowerCase()===`form`}function fg(e){return lg(e)&&e.tagName.toLowerCase()===`input`}function pg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mg(e,t){return e.button===0&&(!t||t===`_self`)&&!pg(e)}function hg(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function gg(e,t){let n=hg(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var _g=null;function vg(){if(_g===null)try{new FormData(document.createElement(`form`),0),_g=!1}catch{_g=!0}return _g}var yg=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function bg(e){return e!=null&&!yg.has(e)?(af(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cg}"`),null):e}function xg(e,t){let n,r,i,a,o;if(dg(e)){let o=e.getAttribute(`action`);r=o?Wf(o,t):null,n=e.getAttribute(`method`)||`get`,i=bg(e.getAttribute(`enctype`))||cg,a=new FormData(e)}else if(ug(e)||fg(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Wf(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=bg(e.getAttribute(`formenctype`))||bg(o.getAttribute(`enctype`))||cg,a=new FormData(o,e),!vg()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(lg(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=cg,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Sg(e,t){if(e===!1||e==null)throw Error(t)}function Cg(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var wg=l(Yd(),1),Tg=Zd(),Eg=`modulepreload`,Dg=function(e){return`/ui/`+e},Og={},kg=function(e){return e.pathname.endsWith(`.css`)},Ag=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=Dg(t,n);let r=s(t);if(r.href in Og)return;Og[r.href]=!0;let i=kg(r);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 o=document.createElement(`link`);if(o.rel=i?`stylesheet`:Eg,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).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)})};async function jg(e,t){if(e.id in t)return t[e.id];try{let n=await Ag(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mg(e){return e!=null&&typeof e.page==`string`}function Ng(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Pg(e,t,n){return zg((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await jg(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ng).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Fg(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ig(e,t,{includeHydrateFallback:n}={}){return Lg(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Lg(e){return[...new Set(e)]}function Rg(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function zg(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Mg(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Rg(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var Bg=m.createContext(void 0);Bg.displayName=`FrameworkContext`;function Vg(){let e=m.useContext(Bg);return Sg(e,`You must render this element inside a <HydratedRouter> element`),e}function Hg(e,t){let n=m.useContext(Bg),[r,i]=m.useState(!1),[a,o]=m.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=m.useRef(null);m.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),m.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ug(s,p),onBlur:Ug(c,h),onMouseEnter:Ug(l,p),onMouseLeave:Ug(u,h),onTouchStart:Ug(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ug(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Wg({page:e,...t}){let n=uh(),{nonce:r}=Vg(),{router:i}=Wh(`PrefetchPageLinks`),a=m.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?m.createElement(Kg,{page:e,matches:a,...t}):m.createElement(qg,{page:e,matches:a,...t})):null}function Gg(e){let{manifest:t,routeModules:n}=Vg(),[r,i]=m.useState([]);return m.useEffect(()=>{let r=!1;return Pg(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Kg({page:e,matches:t,...n}){let r=Dh(),i=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Cg(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return m.createElement(m.Fragment,null,i.map(e=>m.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function qg({page:e,matches:t,...n}){let r=Dh(),{manifest:i,routeModules:a}=Vg(),{matches:o}=Gh(`PrefetchPageLinks`),{loaderData:s}=Kh(`PrefetchPageLinks`),c=m.useMemo(()=>Fg(e,t,o,i,r,`data`),[e,t,o,i,r]),l=m.useMemo(()=>Fg(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=Cg(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=m.useMemo(()=>Ig(l,i),[l,i]),f=Gg(l);return m.createElement(m.Fragment,null,u.map(e=>m.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>m.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>m.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Jg(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Yg=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Yg&&(window.__reactRouterVersion=`8`)}catch{}function Xg(e,t){return Wp({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:rf({window:t?.window}),hydrationData:t?.hydrationData||Zg(),routes:e,mapRouteProperties:yf,hydrationRouteProperties:eg,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Zg(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Qg(e.errors)}),e}function Qg(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new ap(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&ip.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var $g=m.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},h){let{basename:g,navigator:_,useTransitions:v}=m.useContext(mh),y=typeof l==`string`&&Qd.test(l),b=lp(l,g);l=b.to;let x=Th(l,{relative:r}),S=Dh(),C=null;if(o){let e=Zf(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:$f([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Hg(n,p),D=n_(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),ee=m.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Jg(h,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?m.createElement(m.Fragment,null,ee,m.createElement(Wg,{page:x})):ee});$g.displayName=`Link`;var e_=m.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Ph(a,{relative:c.relative}),d=Dh(),f=m.useContext(ch),{navigator:p,basename:h}=m.useContext(mh),g=f!=null&&c_(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f?.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Wf(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(b)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return m.createElement($g,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});e_.displayName=`NavLink`;var t_=m.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},h)=>{let{useTransitions:g}=m.useContext(mh),_=o_(),v=s_(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Qd.test(s);return m.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?m.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});t_.displayName=`Form`;function n_(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=kh(),d=Dh(),f=Ph(e,{relative:o});return m.useCallback(p=>{if(mg(p,t)){p.preventDefault();let t=n===void 0?lf(d)===lf(f):n,h=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?m.startTransition(()=>h()):h()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function r_(e){af(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(hg(e)),n=m.useRef(!1),r=Dh(),i=m.useMemo(()=>gg(r.search,n.current?null:t.current),[r.search]),a=kh();return[i,m.useCallback((e,t)=>{let r=hg(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var i_=0,a_=()=>`__${String(++i_)}__`;function o_(){let{router:e}=Wh(`useSubmit`),{basename:t}=m.useContext(mh),n=qh(`useSubmit`),r=e.fetch,i=e.navigate;return m.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=xg(e,t);a.navigate===!1?await r(a.fetcherKey||a_(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function s_(e,{relative:t}={}){let{basename:n}=m.useContext(mh),r=m.useContext(gh);W(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ph(e||`.`,{relative:t})},o=Dh();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:$f([n,a.pathname])),lf(a)}function c_(e,{relative:t}={}){let n=m.useContext(dh);W(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Wh(`useViewTransitionState`),i=Ph(e,{relative:t});if(!n.isTransitioning)return!1;let a=Wf(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Wf(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Bf(i.pathname,o)!=null||Bf(i.pathname,a)!=null}function l_(e){return m.createElement(ng,{flushSync:wg.flushSync,...e})}var u_=class extends Error{status;code;constructor(e,t,n){super(n),this.name=`ApiError`,this.status=e,this.code=t}},d_={getToken:()=>null,onUnauthorized:()=>{},onForbidden:()=>{}};function f_(e){d_=e}async function p_(e,t){let n=new Headers(t?.headers),r=d_.getToken();r&&!n.has(`authorization`)&&n.set(`authorization`,`Bearer ${r}`);let i=e.startsWith(`/`)||/^https?:\/\//i.test(e)?e:`/${e}`,a=await fetch(i,{...t,headers:n});if(!a.ok){if(a.status===401)throw d_.onUnauthorized(),new u_(401,`unauthorized`,`unauthorized`);if(a.status===403&&(a.headers.get(`www-authenticate`)??``).includes(`insufficient_scope`))throw d_.onForbidden(),new u_(403,`insufficient_scope`,`insufficient scope`);let e=`http_${a.status}`,t=a.statusText||`HTTP ${a.status}`;try{let n=await a.json();n?.error&&(typeof n.error.code==`string`&&(e=n.error.code),typeof n.error.message==`string`&&(t=n.error.message))}catch{}throw new u_(a.status,e,t)}return a}async function m_(){let e=await fetch(`/ui/config.json`);if(!e.ok){let t=`http_${e.status}`,n=e.statusText||`HTTP ${e.status}`;try{let r=await e.json();r?.error?.code&&(t=r.error.code),r?.error?.message&&(n=r.error.message)}catch{}throw new u_(e.status,t,n)}return await e.json()}async function h_(){return(await(await p_(`/api/v1/projects`)).json()).projects}async function g_(e){return await(await p_(`/api/v1/projects/${encodeURIComponent(e)}`)).json()}async function __(e,t){let n=t?`?path=${encodeURIComponent(t)}`:``;return(await(await p_(`/api/v1/projects/${encodeURIComponent(e)}/index${n}`)).json()).entries}async function v_(e,t){let n=(t.startsWith(`/`)?t.slice(1):t).split(`/`).map(encodeURIComponent).join(`/`);return await(await p_(`/api/v1/projects/${encodeURIComponent(e)}/concepts/${n}`,{headers:{accept:`application/json`}})).json()}async function y_(e,t){let n=(t.startsWith(`/`)?t.slice(1):t).split(`/`).map(encodeURIComponent).join(`/`),r=await p_(`/api/v1/projects/${encodeURIComponent(e)}/files/${n}`),i=await r.text(),a=r.headers.get(`etag`),o=null;if(a){let e=a.replace(/^W\//,``).replace(/^"|"$/g,``);o=e.length>0?e:null}return{content:i,revision:o}}async function b_(e,t){let n=new URLSearchParams;t?.id&&n.set(`id`,t.id),t?.limit!==void 0&&n.set(`limit`,String(t.limit));let r=n.toString();return(await(await p_(`/api/v1/projects/${encodeURIComponent(e)}/history${r?`?${r}`:``}`)).json()).commits}async function x_(e){return(await(await p_(`/api/v1/projects/${encodeURIComponent(e)}/lint`)).json()).issues}async function S_(e){let t=new URLSearchParams;if(e.q!==void 0&&e.q.trim()!==``&&t.set(`q`,e.q.trim()),e.project&&t.set(`project`,e.project),e.type&&t.set(`type`,e.type),e.tag&&e.tag.length>0)for(let n of e.tag)n&&t.append(`tag`,n);e.status&&t.set(`status`,e.status),e.trustTier&&t.set(`trustTier`,e.trustTier),typeof e.stale==`boolean`&&t.set(`stale`,e.stale?`true`:`false`),typeof e.limit==`number`&&t.set(`limit`,String(e.limit));let n=t.toString();return(await(await p_(`/api/v1/search${n?`?${n}`:``}`)).json()).results}async function C_(){return await(await p_(`/api/v1/sync`)).json()}async function w_(e){let t=await(await p_(`/api/v1/projects/${encodeURIComponent(e)}/archive`)).blob();if(typeof window<`u`&&typeof document<`u`&&typeof URL.createObjectURL==`function`){let n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`${e}.tar.gz`,r.style.display=`none`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}}var T_=new Ue({defaultOptions:{queries:{staleTime:3e4,retry:(e,t)=>t instanceof u_&&t.status<500?!1:e<2}}}),E_={projects:()=>[`projects`],project:e=>[`project`,e],index:(e,t)=>[`index`,e,t],concept:(e,t)=>[`concept`,e,t],file:(e,t)=>[`file`,e,t],history:(e,t,n)=>[`history`,e,t??null,n],lint:e=>[`lint`,e],search:e=>[`search`,e],sync:()=>[`sync`]};function D_(){return nt({queryKey:E_.projects(),queryFn:h_})}function O_(e){return nt({queryKey:E_.project(e),queryFn:()=>g_(e),enabled:!!e})}function k_(e,t,n=!0){return nt({queryKey:E_.index(e,t),queryFn:()=>__(e,t),enabled:!!e&&n})}function A_(e,t){return nt({queryKey:E_.concept(e,t),queryFn:()=>v_(e,t),enabled:!!(e&&t)})}function j_(e,t){return nt({queryKey:E_.file(e,t),queryFn:()=>y_(e,t),enabled:!!(e&&t)})}function M_(e,t){let n=t?.id??null,r=t?.limit??20;return nt({queryKey:E_.history(e,n,r),queryFn:()=>b_(e,{id:n??void 0,limit:r}),enabled:!!e})}function N_(e){return nt({queryKey:E_.lint(e),queryFn:()=>x_(e),enabled:!!e})}function P_(e,t=!0){return nt({queryKey:E_.search(e),queryFn:()=>S_(e),placeholderData:le,enabled:t})}function F_(){return nt({queryKey:E_.sync(),queryFn:C_,refetchInterval:6e4})}var I_;(typeof navigator>`u`||!navigator.userAgent?.startsWith?.(`Mozilla/5.0 `))&&(I_=`oauth4webapi/v3.8.8`);function L_(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}var R_=`ERR_INVALID_ARG_VALUE`,z_=`ERR_INVALID_ARG_TYPE`;function B_(e,t,n){let r=TypeError(e,{cause:n});return Object.assign(r,{code:t}),r}var V_=Symbol(),H_=Symbol(),U_=Symbol(),W_=Symbol(),G_=Symbol(),K_=new TextEncoder,q_=new TextDecoder;function J_(e){return typeof e==`string`?K_.encode(e):q_.decode(e)}var Y_;if(Uint8Array.prototype.toBase64)Y_=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:`base64url`,omitPadding:!0}));else{let e=32768;Y_=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));let n=[];for(let r=0;r<t.byteLength;r+=e)n.push(String.fromCharCode.apply(null,t.subarray(r,r+e)));return btoa(n.join(``)).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`)}}var X_=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:`base64url`})}catch(e){throw B_(`The input to be decoded is not correctly encoded.`,R_,e)}}:e=>{try{let t=atob(e.replace(/-/g,`+`).replace(/_/g,`/`).replace(/\s/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch(e){throw B_(`The input to be decoded is not correctly encoded.`,R_,e)}};function Z_(e){return typeof e==`string`?X_(e):Y_(e)}var Q_=class extends Error{code;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=uy,Error.captureStackTrace?.(this,this.constructor)}},$_=class extends Error{code;constructor(e,t){super(e,t),this.name=this.constructor.name,t?.code&&(this.code=t?.code),Error.captureStackTrace?.(this,this.constructor)}};function J(e,t,n){return new $_(e,{code:t,cause:n})}function ev(e){return!(typeof e!=`object`||!e||Array.isArray(e))}function tv(e){L_(e,Headers)&&(e=Object.fromEntries(e.entries()));let t=new Headers(e??{});if(I_&&!t.has(`user-agent`)&&t.set(`user-agent`,I_),t.has(`authorization`))throw B_(`"options.headers" must not include the "authorization" header name`,R_);return t}function nv(e,t){if(t!==void 0){if(typeof t==`function`&&(t=t(e.href)),!(t instanceof AbortSignal))throw B_(`"options.signal" must return or be an instance of AbortSignal`,z_);return t}}function rv(e,t,n,r,i){try{if(typeof e!=`number`||!Number.isFinite(e))throw B_(`${n} must be a number`,z_,i);if(e>0)return;if(t){if(e!==0)throw B_(`${n} must be a non-negative number`,R_,i);return}throw B_(`${n} must be a positive number`,R_,i)}catch(e){throw r?J(e.message,r,i):e}}function iv(e,t,n,r){try{if(typeof e!=`string`)throw B_(`${t} must be a string`,z_,r);if(e.length===0)throw B_(`${t} must not be empty`,R_,r)}catch(e){throw n?J(e.message,n,r):e}}async function av(e,t){let n=e;if(!(n instanceof URL)&&n!==My)throw B_(`"expectedIssuerIdentifier" must be an instance of URL`,z_);if(!L_(t,Response))throw B_(`"response" must be an instance of Response`,z_);if(t.status!==200)throw J(`"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)`,my,t);Sy(t);let r=await jy(t);if(iv(r.issuer,`"response" body "issuer" property`,Y,{body:r}),n!==My&&new URL(r.issuer).href!==n.href)throw J(`"response" body "issuer" property does not match the expected value`,yy,{expected:n.href,body:r,attribute:`issuer`});return r}function ov(e){cv(e,`application/json`)}function sv(e,...t){let n=`"response" content-type must be `;if(t.length>2){let e=t.pop();n+=`${t.join(`, `)}, or ${e}`}else t.length===2?n+=`${t[0]} or ${t[1]}`:n+=t[0];return J(n,py,e)}function cv(e,t){if(Pv(e)!==t)throw sv(e,t)}function lv(){return Z_(crypto.getRandomValues(new Uint8Array(32)))}function uv(){return lv()}function dv(){return lv()}async function fv(e){return iv(e,`codeVerifier`),Z_(await crypto.subtle.digest(`SHA-256`,J_(e)))}function pv(e){let t=e?.[H_];return typeof t==`number`&&Number.isFinite(t)?t:0}function mv(e){let t=e?.[U_];return typeof t==`number`&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function hv(){return Math.floor(Date.now()/1e3)}function gv(e){if(typeof e!=`object`||!e)throw B_(`"as" must be an object`,z_);iv(e.issuer,`"as.issuer"`)}function _v(e){if(typeof e!=`object`||!e)throw B_(`"client" must be an object`,z_);iv(e.client_id,`"client.client_id"`)}function vv(){return(e,t,n,r)=>{n.set(`client_id`,t.client_id)}}var yv=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch{return null}};function bv(e,t){if(t&&e.protocol!==`https:`)throw J(`only requests to HTTPS are allowed`,hy,e);if(e.protocol!==`https:`&&e.protocol!==`http:`)throw J(`only HTTP and HTTPS requests are allowed`,gy,e)}function xv(e,t,n,r){let i;if(typeof e!=`string`||!(i=yv(e)))throw J(`authorization server metadata does not contain a valid ${n?`"as.mtls_endpoint_aliases.${t}"`:`"as.${t}"`}`,e===void 0?by:xy,{attribute:n?`mtls_endpoint_aliases.${t}`:t});return bv(i,r),i}function Sv(e,t,n,r){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?xv(e.mtls_endpoint_aliases[t],t,n,r):xv(e[t],t,n,r)}var Cv=class extends Error{cause;code;error;status;error_description;response;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=ly,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),Error.captureStackTrace?.(this,this.constructor)}},wv=class extends Error{cause;code;error;error_description;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=dy,this.cause=t.cause,this.error=t.cause.get(`error`),this.error_description=t.cause.get(`error_description`)??void 0,Error.captureStackTrace?.(this,this.constructor)}},Tv=class extends Error{cause;code;response;status;constructor(e,t){super(e,t),this.name=this.constructor.name,this.code=cy,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),Error.captureStackTrace?.(this,this.constructor)}},Ev=RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)"),Dv=RegExp(`^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_\`\\|~]+)\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"[,\\s]*(.*)`),Ov=RegExp("^[,\\s]*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)\\s*=\\s*([a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+)[,\\s]*(.*)"),kv=RegExp(`^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)`);function Av(e){if(!L_(e,Response))throw B_(`"response" must be an instance of Response`,z_);let t=e.headers.get(`www-authenticate`);if(t===null)return;let n=[],r=t;for(;r;){let e=r.match(Ev),t=e?.[`1`].toLowerCase();if(!t)return;let i=r.substring(e[0].length);if(i&&!i.match(/^[\s,]/))return;let a=i.match(/^\s+(.*)$/),o=!!a;r=a?a[1]:void 0;let s={},c;if(o)for(;r;){let t,n;if(e=r.match(Dv)){[,t,n,r]=e,n.includes(`\\`)&&(n=n.replace(/\\([\s\S])/g,`$1`)),s[t.toLowerCase()]=n;continue}if(e=r.match(Ov)){[,t,n,r]=e,s[t.toLowerCase()]=n;continue}if(e=r.match(kv)){if(Object.keys(s).length)break;[,c,r]=e;break}return}else r=i||void 0;let l={scheme:t,parameters:s};c&&(l.token68=c),n.push(l)}if(n.length)return n}async function jv(e){if(e.status>399&&e.status<500){Sy(e),ov(e);try{let t=await e.clone().json();if(ev(t)&&typeof t.error==`string`&&t.error.length)return t}catch{}}}async function Mv(e,t,n){if(e.status!==t){Vv(e);let t;throw(t=await jv(e))?(await e.body?.cancel(),new Cv(`server responded with an error in the response body`,{cause:t,response:e})):J(`"response" is not a conform ${n} response (unexpected HTTP status code)`,my,e)}}function Nv(e){if(!Wv.has(e))throw B_(`"options.DPoP" is not a valid DPoPHandle`,R_)}function Pv(e){return e.headers.get(`content-type`)?.split(`;`)[0]}async function Fv(e,t,n,r,i,a,o){return await n(e,t,i,a),a.set(`content-type`,`application/x-www-form-urlencoded;charset=UTF-8`),(o?.[W_]||fetch)(r.href,{body:i,headers:Object.fromEntries(a.entries()),method:`POST`,redirect:`manual`,signal:nv(r,o?.signal)})}async function Iv(e,t,n,r,i,a){let o=Sv(e,`token_endpoint`,t.use_mtls_endpoint_aliases,a?.[V_]!==!0);i.set(`grant_type`,r);let s=tv(a?.headers);s.set(`accept`,`application/json`),a?.DPoP!==void 0&&(Nv(a.DPoP),await a.DPoP.addProof(o,s,`POST`));let c=await Fv(e,t,n,o,i,s,a);return a?.DPoP?.cacheNonce(c,o),c}var Lv=new WeakMap,Rv=new WeakMap;function zv(e){if(!e.id_token)return;let t=Lv.get(e);if(!t)throw B_(`"ref" was already garbage collected or did not resolve from the proper sources`,R_);return t}async function Bv(e,t,n,r,i,a){if(gv(e),_v(t),!L_(n,Response))throw B_(`"response" must be an instance of Response`,z_);await Mv(n,200,`Token Endpoint`),Sy(n);let o=await jy(n);if(iv(o.access_token,`"response" body "access_token" property`,Y,{body:o}),iv(o.token_type,`"response" body "token_type" property`,Y,{body:o}),o.token_type=o.token_type.toLowerCase(),o.expires_in!==void 0){let e=typeof o.expires_in==`number`?o.expires_in:parseFloat(o.expires_in);rv(e,!0,`"response" body "expires_in" property`,Y,{body:o}),o.expires_in=e}if(o.refresh_token!==void 0&&iv(o.refresh_token,`"response" body "refresh_token" property`,Y,{body:o}),o.scope!==void 0&&typeof o.scope!=`string`)throw J(`"response" body "scope" property must be a string`,Y,{body:o});if(o.id_token!==void 0){iv(o.id_token,`"response" body "id_token" property`,Y,{body:o});let a=[];t.require_auth_time===!0&&a.push(`auth_time`),t.default_max_age!==void 0&&(rv(t.default_max_age,!0,`"client.default_max_age"`),a.push(`auth_time`)),r?.length&&a.push(...r);let{claims:s,jwt:c}=await Zv(e,t,o.id_token,a,i);ny(t,s),$v(s),Rv.set(n,c),Lv.set(o,s)}if(a?.[o.token_type]!==void 0)a[o.token_type](n,o);else if(o.token_type!==`dpop`&&o.token_type!==`bearer`)throw new Q_("unsupported `token_type` value",{cause:{body:o}});return o}function Vv(e){let t;if(t=Av(e))throw new Tv(`server responded with a challenge in the WWW-Authenticate HTTP Header`,{cause:t,response:e})}function Hv(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw J(`unexpected JWT "aud" (audience) claim value`,vy,{expected:e,claims:t.claims,claim:`aud`})}else if(t.claims.aud!==e)throw J(`unexpected JWT "aud" (audience) claim value`,vy,{expected:e,claims:t.claims,claim:`aud`});return t}function Uv(e,t){let n=e[Ny]?.(t)??e.issuer;if(t.claims.iss!==n)throw J(`unexpected JWT "iss" (issuer) claim value`,vy,{expected:n,claims:t.claims,claim:`iss`});return t}var Wv=new WeakSet;function Gv(e){return Wv.add(e),e}var Kv=Symbol();async function qv(e,t,n,r,i,a,o){if(gv(e),_v(t),!Wv.has(r))throw B_(`"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()`,R_);iv(i,`"redirectUri"`);let s=Ty(r,`code`);if(!s)throw J(`no authorization code in "callbackParameters"`,Y);let c=new URLSearchParams(o?.additionalParameters);return c.set(`redirect_uri`,i),c.set(`code`,s),a!==Kv&&(iv(a,`"codeVerifier"`),c.set(`code_verifier`,a)),Iv(e,t,n,`authorization_code`,c,o)}var Jv={aud:`audience`,c_hash:`code hash`,client_id:`client id`,exp:`expiration time`,iat:`issued at`,iss:`issuer`,jti:`jwt id`,nonce:`nonce`,s_hash:`state hash`,sub:`subject`,ath:`access token hash`,htm:`http method`,htu:`http uri`,cnf:`confirmation`,auth_time:`authentication time`};function Yv(e,t){for(let n of e)if(t.claims[n]===void 0)throw J(`JWT "${n}" (${Jv[n]}) claim missing`,Y,{claims:t.claims});return t}function Xv(e,t){if(typeof t.claims[e]!=`string`)throw J(`unexpected JWT "${e}" (${Jv[e]}) claim type`,Y,{claims:t.claims});return t}function Zv(e,t,n,r,i){return Cy(n,wy.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,`RS256`),pv(t),mv(t),i).then(Yv.bind(void 0,[`aud`,`exp`,`iat`,`iss`,`sub`,...r])).then(Uv.bind(void 0,e)).then(Hv.bind(void 0,t.client_id)).then(Xv.bind(void 0,`sub`))}function Qv(e,t){if(t===iy)return t;let n=t===void 0;return n&&(t=e.default_max_age),t===void 0?iy:(rv(t,!0,n?`"client.default_max_age"`:`"maxAge" argument`),t)}function $v(e){e.auth_time!==void 0&&rv(e.auth_time,!0,`ID Token "auth_time" (authentication time)`,Y,{claims:e})}function ey(e,t,n){if(n===iy)return;let r=hv()+pv(e),i=mv(e);if(t.auth_time+n<r-i)throw J(`too much time has elapsed since the last End-User authentication`,_y,{claims:t,now:r,tolerance:i,claim:`auth_time`})}function ty(e,t){let n=t===ry?void 0:t;if(e.nonce!==n)throw J(`unexpected ID Token "nonce" claim value`,vy,{expected:n,claims:e,claim:`nonce`})}function ny(e,t){if(Array.isArray(t.aud)&&t.aud.length!==1){if(t.azp===void 0)throw J(`ID Token "aud" (audience) claim includes additional untrusted audiences`,vy,{claims:t,claim:`aud`});if(t.azp!==e.client_id)throw J(`unexpected ID Token "azp" (authorized party) claim value`,vy,{expected:e.client_id,claims:t,claim:`azp`})}}var ry=Symbol(),iy=Symbol();async function ay(e,t,n,r){return typeof r?.expectedNonce==`string`||typeof r?.maxAge==`number`||r?.requireIdToken?oy(e,t,n,r.expectedNonce,r.maxAge,r[G_],r.recognizedTokenTypes):sy(e,t,n,r?.maxAge,r?.[G_],r?.recognizedTokenTypes)}async function oy(e,t,n,r,i,a,o){let s=[];switch(r){case void 0:r=ry;break;case ry:break;default:iv(r,`"expectedNonce" argument`),s.push(`nonce`)}i=Qv(t,i),i!==iy&&s.push(`auth_time`);let c=await Bv(e,t,n,s,a,o);iv(c.id_token,`"response" body "id_token" property`,Y,{body:c});let l=zv(c);return ey(t,l,i),ty(l,r),c}async function sy(e,t,n,r,i,a){let o=await Bv(e,t,n,void 0,i,a),s=zv(o);return s&&(ey(t,s,Qv(t,r)),ty(s,ry)),o}var cy=`OAUTH_WWW_AUTHENTICATE_CHALLENGE`,ly=`OAUTH_RESPONSE_BODY_ERROR`,uy=`OAUTH_UNSUPPORTED_OPERATION`,dy=`OAUTH_AUTHORIZATION_RESPONSE_ERROR`,fy=`OAUTH_PARSE_ERROR`,Y=`OAUTH_INVALID_RESPONSE`,py=`OAUTH_RESPONSE_IS_NOT_JSON`,my=`OAUTH_RESPONSE_IS_NOT_CONFORM`,hy=`OAUTH_HTTP_REQUEST_FORBIDDEN`,gy=`OAUTH_REQUEST_PROTOCOL_FORBIDDEN`,_y=`OAUTH_JWT_TIMESTAMP_CHECK_FAILED`,vy=`OAUTH_JWT_CLAIM_COMPARISON_FAILED`,yy=`OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED`,by=`OAUTH_MISSING_SERVER_METADATA`,xy=`OAUTH_INVALID_SERVER_METADATA`;function Sy(e){if(e.bodyUsed)throw B_(`"response" body has been used already`,R_)}async function Cy(e,t,n,r,i){let{0:a,1:o,length:s}=e.split(`.`);if(s===5){if(i!==void 0)e=await i(e),{0:a,1:o,length:s}=e.split(`.`);else throw new Q_(`JWE decryption is not configured`,{cause:e})}if(s!==3)throw J(`Invalid JWT`,Y,e);let c;try{c=JSON.parse(J_(Z_(a)))}catch(e){throw J(`failed to parse JWT Header body as base64url encoded JSON`,fy,e)}if(!ev(c))throw J(`JWT Header must be a top level object`,Y,e);if(t(c),c.crit!==void 0)throw new Q_(`no JWT "crit" header parameter extensions are supported`,{cause:{header:c}});let l;try{l=JSON.parse(J_(Z_(o)))}catch(e){throw J(`failed to parse JWT Payload body as base64url encoded JSON`,fy,e)}if(!ev(l))throw J(`JWT Payload must be a top level object`,Y,e);let u=hv()+n;if(l.exp!==void 0){if(typeof l.exp!=`number`)throw J(`unexpected JWT "exp" (expiration time) claim type`,Y,{claims:l});if(l.exp<=u-r)throw J(`unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp`,_y,{claims:l,now:u,tolerance:r,claim:`exp`})}if(l.iat!==void 0&&typeof l.iat!=`number`)throw J(`unexpected JWT "iat" (issued at) claim type`,Y,{claims:l});if(l.iss!==void 0&&typeof l.iss!=`string`)throw J(`unexpected JWT "iss" (issuer) claim type`,Y,{claims:l});if(l.nbf!==void 0){if(typeof l.nbf!=`number`)throw J(`unexpected JWT "nbf" (not before) claim type`,Y,{claims:l});if(l.nbf>u+r)throw J(`unexpected JWT "nbf" (not before) claim value`,_y,{claims:l,now:u,tolerance:r,claim:`nbf`})}if(l.aud!==void 0&&typeof l.aud!=`string`&&!Array.isArray(l.aud))throw J(`unexpected JWT "aud" (audience) claim type`,Y,{claims:l});return{header:c,claims:l,jwt:e}}function wy(e,t,n,r){if(e!==void 0){if(typeof e==`string`?r.alg!==e:!e.includes(r.alg))throw J(`unexpected JWT "alg" header parameter`,Y,{header:r,expected:e,reason:`client configuration`});return}if(Array.isArray(t)){if(!t.includes(r.alg))throw J(`unexpected JWT "alg" header parameter`,Y,{header:r,expected:t,reason:`authorization server metadata`});return}if(n!==void 0){if(typeof n==`string`?r.alg!==n:typeof n==`function`?!n(r.alg):!n.includes(r.alg))throw J(`unexpected JWT "alg" header parameter`,Y,{header:r,expected:n,reason:`default value`});return}throw J(`missing client or server configuration to verify used JWT "alg" header parameter`,void 0,{client:e,issuer:t,fallback:n})}function Ty(e,t){let{0:n,length:r}=e.getAll(t);if(r>1)throw J(`"${t}" parameter must be provided only once`,Y);return n}var Ey=Symbol(),Dy=Symbol();function Oy(e,t,n,r){if(gv(e),_v(t),n instanceof URL&&(n=n.searchParams),!(n instanceof URLSearchParams))throw B_(`"parameters" must be an instance of URLSearchParams, or URL`,z_);if(Ty(n,`response`))throw J(`"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()`,Y,{parameters:n});let i=Ty(n,`iss`),a=Ty(n,`state`);if(!i&&e.authorization_response_iss_parameter_supported)throw J(`response parameter "iss" (issuer) missing`,Y,{parameters:n});if(i&&i!==e.issuer)throw J(`unexpected "iss" (issuer) response parameter value`,Y,{expected:e.issuer,parameters:n});switch(r){case void 0:case Dy:if(a!==void 0)throw J(`unexpected "state" response parameter encountered`,Y,{expected:void 0,parameters:n});break;case Ey:break;default:if(iv(r,`"expectedState" argument`),a!==r)throw J(a===void 0?`response parameter "state" missing`:`unexpected "state" response parameter value`,Y,{expected:r,parameters:n})}if(Ty(n,`error`))throw new wv(`authorization response from the server is an error`,{cause:n});let o=Ty(n,`id_token`),s=Ty(n,`token`);if(o!==void 0||s!==void 0)throw new Q_(`implicit and hybrid flows are not supported`);return Gv(new URLSearchParams(n))}async function ky(e,t,n){gv(e);let r=Sv(e,`registration_endpoint`,t.use_mtls_endpoint_aliases,n?.[V_]!==!0),i=tv(n?.headers);i.set(`accept`,`application/json`),i.set(`content-type`,`application/json`);let a=`POST`;n?.DPoP&&(Nv(n.DPoP),await n.DPoP.addProof(r,i,a,n.initialAccessToken)),n?.initialAccessToken&&i.set(`authorization`,`${i.has(`dpop`)?`DPoP`:`Bearer`} ${n.initialAccessToken}`);let o=await(n?.[W_]||fetch)(r.href,{body:JSON.stringify(t),headers:Object.fromEntries(i.entries()),method:a,redirect:`manual`,signal:nv(r,n?.signal)});return n?.DPoP?.cacheNonce(o,r),o}async function Ay(e){if(!L_(e,Response))throw B_(`"response" must be an instance of Response`,z_);await Mv(e,201,`Dynamic Client Registration Endpoint`),Sy(e);let t=await jy(e);return iv(t.client_id,`"response" body "client_id" property`,Y,{body:t}),t.client_secret!==void 0&&iv(t.client_secret,`"response" body "client_secret" property`,Y,{body:t}),t.client_secret&&rv(t.client_secret_expires_at,!0,`"response" body "client_secret_expires_at" property`,Y,{body:t}),t}async function jy(e,t=ov){let n;try{n=await e.json()}catch(n){throw t(e),J(`failed to parse "response" body as JSON`,fy,n)}if(!ev(n))throw J(`"response" body must be a top level object`,Y,{body:n});return n}var My=Symbol(),Ny=Symbol();function Py(e){if(typeof e!=`object`||!e||!(`resource`in e)||typeof e.resource!=`string`||!(`authorization_servers`in e)||!Array.isArray(e.authorization_servers)||e.authorization_servers.length===0)throw Error(`invalid protected resource metadata`);let t=e.authorization_servers[0];if(typeof t!=`string`)throw Error(`invalid protected resource metadata`);return{resource:e.resource,primaryServer:t}}async function Fy(e){let t=`${e.replace(/\/+$/,``)}/.well-known/oauth-protected-resource/mcp`,n=await fetch(t);if(!n.ok)throw Error(`invalid protected resource metadata`);let r;try{r=await n.json()}catch{throw Error(`invalid protected resource metadata`)}let{resource:i,primaryServer:a}=Py(r),o=`${e.replace(/\/+$/,``)}/.well-known/oauth-authorization-server`,s=await fetch(o),c=await av(new URL(a),s);return{as:c,resource:i,insecure:new URL(c.token_endpoint??c.issuer).protocol===`http:`}}function Iy(e,t){return t.oauthClientId!==null||typeof e.as.registration_endpoint==`string`}async function Ly(e,t,n,r){if(t.oauthClientId)return t.oauthClientId;let i=`okf.oauth.client:${e.as.issuer}:${n}`,a=r.getItem(i);if(a)return a;if(typeof e.as.registration_endpoint!=`string`)throw Error(`sign-in is not configured`);let o=await Ay(await ky(e.as,{client_name:`ok-fine web`,redirect_uris:[n],grant_types:[`authorization_code`],response_types:[`code`],token_endpoint_auth_method:`none`,scope:t.scope},{[V_]:e.insecure}));return r.setItem(i,o.client_id),o.client_id}function Ry(e,t,n){let r=`okf.oauth.client:${e.as.issuer}:${t}`;n.removeItem(r)}async function zy(e,t,n,r,i){let a=uv(),o=await fv(a),s=dv();if(!e.as.authorization_endpoint)throw Error(`missing authorization endpoint in authorization server metadata`);let c=new URL(e.as.authorization_endpoint);return c.searchParams.set(`client_id`,t),c.searchParams.set(`redirect_uri`,n),c.searchParams.set(`response_type`,`code`),c.searchParams.set(`scope`,r),c.searchParams.set(`code_challenge`,o),c.searchParams.set(`code_challenge_method`,`S256`),c.searchParams.set(`state`,s),c.searchParams.set(`resource`,e.resource),{url:c,pending:{state:s,codeVerifier:a,clientId:t,redirectUri:n,returnTo:i}}}async function By(e,t,n){let r={client_id:t.clientId},i=Oy(e.as,r,n,t.state),a=await qv(e.as,r,vv(),i,t.redirectUri,t.codeVerifier,{additionalParameters:{resource:e.resource},[V_]:e.insecure}),o=await ay(e.as,r,a);return{accessToken:o.access_token,expiresAt:o.expires_in?Date.now()+o.expires_in*1e3:null}}function Vy(e,t=Date.now()){return e.accessToken.length>0&&(e.expiresAt===null||e.expiresAt-3e4>t)}function Hy(e){try{let t=e.split(`.`)[1];if(!t)return null;let n=t.replace(/-/g,`+`).replace(/_/g,`/`);for(;n.length%4!=0;)n+=`=`;let r=atob(n),i=Uint8Array.from(r,e=>e.charCodeAt(0)),a=new TextDecoder().decode(i),o=JSON.parse(a);return typeof o!=`object`||!o?null:`email`in o&&typeof o.email==`string`&&o.email.trim().length>0?o.email.trim():`preferred_username`in o&&typeof o.preferred_username==`string`&&o.preferred_username.trim().length>0?o.preferred_username.trim():`name`in o&&typeof o.name==`string`&&o.name.trim().length>0?o.name.trim():`sub`in o&&typeof o.sub==`string`&&o.sub.trim().length>0?o.sub.trim():null}catch{return null}}var Uy=(0,m.createContext)(null);function Wy({children:e}){let t=_(),[n,r]=(0,m.useState)({status:`loading`}),i=(0,m.useRef)(n);i.current=n;let a=(0,m.useRef)(new Map);(0,m.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await m_();if(!e)return;if(t.authMode===`none`){r({status:`open`,config:t});return}let n=await Fy(window.location.origin);if(!e)return;if(!Iy(n,t)){r({status:`unconfigured`,config:t,discovery:n,redirectUri:`${window.location.origin}/ui/callback`});return}let i=window.sessionStorage.getItem(`okf.oauth.token`);if(i)try{let e=JSON.parse(i);if(typeof e==`object`&&e&&`accessToken`in e&&typeof e.accessToken==`string`){let i=`expiresAt`in e&&typeof e.expiresAt==`number`?e.expiresAt:null,a={accessToken:e.accessToken,expiresAt:i};if(Vy(a)){let e=Hy(a.accessToken);r({status:`signed-in`,config:t,discovery:n,token:a,identity:e});return}}}catch{}r({status:`signed-out`,config:t,discovery:n,reason:`initial`})}catch(t){if(!e)return;let n=t instanceof Error?t.message:`Failed to initialize authentication`;r({status:`error`,message:n})}})(),()=>{e=!1}},[]),(0,m.useEffect)(()=>{f_({getToken:()=>{let e=i.current;return e.status===`signed-in`?e.token.accessToken:null},onUnauthorized:()=>{window.sessionStorage.removeItem(`okf.oauth.token`),t.clear();let e=i.current;`config`in e&&`discovery`in e&&r({status:`signed-out`,config:e.config,discovery:e.discovery,reason:`expired`})},onForbidden:()=>{let e=i.current;`config`in e&&`discovery`in e&&r({status:`forbidden`,config:e.config,discovery:e.discovery,scope:e.config.scope})}})},[t]),(0,m.useEffect)(()=>{if(n.status!==`signed-in`||n.token.expiresAt===null)return;let e=n.token.expiresAt-3e4-Date.now();if(e<=0){window.sessionStorage.removeItem(`okf.oauth.token`),t.clear(),r({status:`signed-out`,config:n.config,discovery:n.discovery,reason:`expired`});return}let i=setTimeout(()=>{window.sessionStorage.removeItem(`okf.oauth.token`),t.clear(),r({status:`signed-out`,config:n.config,discovery:n.discovery,reason:`expired`})},e);return()=>{clearTimeout(i)}},[n,t]);let o={state:n,login:(0,m.useCallback)(async e=>{let t,n,r=i.current;`config`in r&&`discovery`in r?(t=r.config,n=r.discovery):(t=await m_(),n=await Fy(window.location.origin));let a=`${window.location.origin}/ui/callback`,o=await Ly(n,t,a,window.localStorage),{url:s,pending:c}=await zy(n,o,a,t.scope,e);window.sessionStorage.setItem(`okf.oauth.pending`,JSON.stringify(c)),window.location.assign(s.href)},[]),completeLogin:(0,m.useCallback)(async e=>{let t=a.current.get(e.href);if(t)return t;let n=(async()=>{let t,n,a=i.current;`config`in a&&`discovery`in a?(t=a.config,n=a.discovery):(t=await m_(),n=await Fy(window.location.origin));let o=window.sessionStorage.getItem(`okf.oauth.pending`);if(window.sessionStorage.removeItem(`okf.oauth.pending`),!o)throw Error(`Sign-in session expired; try again`);let s;try{let e=JSON.parse(o);if(typeof e!=`object`||!e||!(`state`in e)||!(`codeVerifier`in e)||!(`clientId`in e)||!(`redirectUri`in e)||!(`returnTo`in e)||typeof e.state!=`string`||typeof e.codeVerifier!=`string`||typeof e.clientId!=`string`||typeof e.redirectUri!=`string`||typeof e.returnTo!=`string`)throw Error(`Invalid pending login session`);s={state:e.state,codeVerifier:e.codeVerifier,clientId:e.clientId,redirectUri:e.redirectUri,returnTo:e.returnTo}}catch(e){throw Error(`Sign-in session expired; try again`,{cause:e})}try{let i=await By(n,s,e);window.sessionStorage.setItem(`okf.oauth.token`,JSON.stringify(i));let a=Hy(i.accessToken);return r({status:`signed-in`,config:t,discovery:n,token:i,identity:a}),s.returnTo}catch(e){if(e instanceof wv||e instanceof Cv){(e.error===`invalid_client`||e.error===`unauthorized_client`)&&Ry(n,s.redirectUri,window.localStorage);let i=e.error_description?`${e.error}: ${e.error_description}`:e.error;r({status:`signed-out`,config:t,discovery:n,reason:`signed-out`,error:i})}throw e}})();return a.current.set(e.href,n),n},[]),logout:(0,m.useCallback)(()=>{window.sessionStorage.removeItem(`okf.oauth.token`),t.clear();let e=i.current;`config`in e&&`discovery`in e&&r({status:`signed-out`,config:e.config,discovery:e.discovery,reason:`signed-out`})},[t])};return(0,h.jsx)(Uy.Provider,{value:o,children:e})}function Gy(){let e=(0,m.useContext)(Uy);if(!e)throw Error(`useAuth must be used within an AuthProvider`);return e}var Ky=`okf.theme`,qy=new Set;function Jy(){for(let e of qy)e()}function Yy(e){return qy.add(e),()=>{qy.delete(e)}}function Xy(e){if(typeof document>`u`)return;let t=typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches,n=e===`dark`||e===`system`&&!!t;document.documentElement.classList.toggle(`dark`,n),document.documentElement.style.colorScheme=n?`dark`:`light`}function Zy(){try{if(typeof localStorage<`u`){let e=localStorage.getItem(Ky);if(e===`light`||e===`dark`||e===`system`)return e}}catch{}return`system`}function Qy(e){try{typeof localStorage<`u`&&localStorage.setItem(Ky,e)}catch{}Xy(e),Jy()}var $y=!1;function eb(){$y||($y=!0,Xy(Zy()),typeof window<`u`&&window.matchMedia&&(window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,()=>{Zy()===`system`&&(Xy(`system`),Jy())}),window.addEventListener(`storage`,e=>{e.key===Ky&&(Xy(Zy()),Jy())})))}function tb(){return[(0,m.useSyncExternalStore)(Yy,Zy,()=>`system`),Qy]}function nb(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=nb(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function X(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nb(e))&&(r&&(r+=` `),r+=t);return r}var rb=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ib(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:rb(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ab=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},ob=e=>{let t=ab(e);return t.charAt(0).toUpperCase()+t.slice(1)},sb=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),cb={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 lb(e){return e!=null}function ub(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??cb.width,a=e.size??e.height??cb.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?sb(...c):sb(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??cb[`stroke-width`])*Number(e.size??e.width??cb.width)/Number(t.size??t.width??cb.width):t.strokeWidth??cb[`stroke-width`];return[`svg`,{...Object.entries(cb).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&lb(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&lb(t.width)&&{[r(`width`)]:t.width},...`height`in t&&lb(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 db(e,t={}){return ub(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var fb=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},pb=(0,m.createContext)({}),mb=()=>(0,m.useContext)(pb),hb=(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=``}=mb()??{},b=!!c||fb(d),[x,S,C=[]]=db(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:sb(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 Z(e,t=[],n=[]){let r=typeof e==`string`?ib(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(hb,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=ob(r.name)),i}var gb={name:`badge-check`,size:24,node:[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`verified`]};gb.node;var _b=Z(gb),vb={name:`book-a`,size:24,node:[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`m8 13 4-7 4 7`,key:`4rari8`}],[`path`,{d:`M9.1 11h5.7`,key:`1gkovt`}]]};vb.node;var yb=Z(vb),bb={name:`book-open-check`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`m16 12 2 2 4-4`,key:`mdajum`}],[`path`,{d:`M22 6V5a2 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-2h4.001A2 2 0 0022 17v-1.344`,key:`144kbk`}]]};bb.node;var xb=Z(bb),Sb={name:`bookmark`,size:24,node:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]};Sb.node;var Cb=Z(Sb),wb={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`}]]};wb.node;var Tb=Z(wb),Eb={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};Eb.node;var Db=Z(Eb),Ob={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Ob.node;var kb=Z(Ob),Ab={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Ab.node;var jb=Z(Ab),Mb={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Mb.node;var Nb=Z(Mb),Pb={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};Pb.node;var Fb=Z(Pb),Ib={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Ib.node;var Lb=Z(Ib),Rb={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`]};Rb.node;var zb=Z(Rb),Bb={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};Bb.node;var Vb=Z(Bb),Hb={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Hb.node;var Ub=Z(Hb),Wb={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Wb.node;var Gb=Z(Wb),Kb={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`}]]};Kb.node;var qb=Z(Kb),Jb={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`}]]};Jb.node;var Yb=Z(Jb),Xb={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`}]]};Xb.node;var Zb=Z(Xb),Qb={name:`file-code`,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:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]};Qb.node;var $b=Z(Qb),ex={name:`file-question-mark`,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:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]],aliases:[`file-question`]};ex.node;var tx=Z(ex),nx={name:`file-text`,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:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};nx.node;var rx=Z(nx),ix={name:`folder-kanban`,size:24,node:[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]};ix.node;var ax=Z(ix),ox={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};ox.node;var sx=Z(ox),cx={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};cx.node;var lx=Z(cx),ux={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};ux.node;var dx=Z(ux),fx={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};fx.node;var px=Z(fx),mx={name:`heart-pulse`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`auskq0`}]]};mx.node;var hx=Z(mx),gx={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};gx.node;var _x=Z(gx),vx={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`}]]};vx.node;var yx=Z(vx),bx={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};bx.node;var xx=Z(bx),Sx={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`}]]};Sx.node;var Cx=Z(Sx),wx={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};wx.node;var Tx=Z(wx),Ex={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`}]]};Ex.node;var Dx=Z(Ex),Ox={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`}]]};Ox.node;var kx=Z(Ox),Ax={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};Ax.node;var jx=Z(Ax),Mx={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};Mx.node;var Nx=Z(Mx),Px={name:`rotate-ccw-clock`,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`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Px.node;var Fx=Z(Px),Ix={name:`ruler`,size:24,node:[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]};Ix.node;var Lx=Z(Ix),Rx={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`}]]};Rx.node;var zx=Z(Rx),Bx={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Bx.node;var Vx=Z(Bx),Hx={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`}]]};Hx.node;var Ux=Z(Hx),Wx={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`}]]};Wx.node;var Gx=Z(Wx),Kx={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`}]]};Kx.node;var qx=Z(Kx),Jx={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};Jx.node;var Yx=Z(Jx),Xx={name:`triangle-alert`,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`]};Xx.node;var Zx=Z(Xx),Qx={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`}]]};Qx.node;var $x=Z(Qx),eS={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};eS.node;var tS=Z(eS);function nS({icon:e,title:t,hint:n,action:r,className:i}){return(0,h.jsxs)(`div`,{className:X(`flex flex-col items-center justify-center p-8 text-center rounded-2xl border border-border bg-surface/50`,i),children:[e&&(0,h.jsx)(`div`,{className:`mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-surface-2 ring-1 ring-border text-muted`,children:(0,h.jsx)(e,{size:24})}),(0,h.jsx)(`h3`,{className:`text-base font-medium text-fg`,children:t}),n&&(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted max-w-sm`,children:n}),r&&(0,h.jsx)(`div`,{className:`mt-4`,children:r})]})}function rS({error:e,onRetry:t,fullScreen:n=!1,className:r}){let i=e instanceof u_&&(e.code===`project_not_found`||e.code===`not_found`),a=e instanceof Error?e.message:typeof e==`string`?e:`An unexpected error occurred.`,o=i?(0,h.jsx)(nS,{icon:tx,title:`Not found`,hint:`The requested project, concept, or file could not be found.`,action:(0,h.jsx)($g,{to:`/`,className:`inline-flex items-center justify-center rounded-lg bg-accent-500 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-accent-600 focus-visible:outline-2 outline-accent-500`,children:`Back to all projects`})}):(0,h.jsxs)(`div`,{className:`flex flex-col items-center justify-center p-8 text-center rounded-2xl border border-rose-500/20 bg-rose-500/5 max-w-lg mx-auto`,children:[(0,h.jsx)(`div`,{className:`mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-rose-500/10 text-rose-600 dark:text-rose-400 ring-1 ring-rose-500/20`,children:(0,h.jsx)(Lb,{size:24})}),(0,h.jsx)(`h3`,{className:`text-base font-medium text-fg`,children:`Something went wrong`}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted break-words max-w-sm`,children:a}),t&&(0,h.jsx)(`button`,{type:`button`,onClick:t,className:`mt-4 inline-flex items-center justify-center rounded-lg border border-border bg-surface px-4 py-2 text-sm font-medium text-fg transition-colors hover:bg-surface-2 focus-visible:outline-2 outline-accent-500`,children:`Retry`})]});return n?(0,h.jsx)(`div`,{className:X(`flex min-h-[60vh] items-center justify-center p-6`,r),children:(0,h.jsx)(`div`,{className:`w-full max-w-md`,children:o})}):(0,h.jsx)(`div`,{className:r,children:o})}function iS({size:e=24,className:t}){let n=(0,m.useId)();return(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:e,height:e,className:X(`shrink-0`,t),"aria-hidden":`true`,children:[(0,h.jsx)(`defs`,{children:(0,h.jsxs)(`linearGradient`,{id:n,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,h.jsx)(`stop`,{offset:`0`,stopColor:`#8b5cf6`}),(0,h.jsx)(`stop`,{offset:`1`,stopColor:`#22d3ee`})]})}),(0,h.jsx)(`rect`,{width:`24`,height:`24`,rx:`7`,fill:`url(#${n})`}),(0,h.jsx)(`path`,{d:`M7 12.5l3.2 3.2L17 8.8`,fill:`none`,stroke:`#ffffff`,strokeWidth:`2.25`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function aS({className:e,size:t=24}){return(0,h.jsxs)(`div`,{className:X(`inline-flex items-center gap-2 font-semibold tracking-tight text-fg`,e),children:[(0,h.jsx)(iS,{size:t}),(0,h.jsx)(`span`,{children:`ok-fine`})]})}function oS({title:e,className:t,children:n}){return(0,m.useEffect)(()=>{document.title=`${e} · ok-fine`},[e]),(0,h.jsx)(Gd.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.18,ease:`easeOut`},className:t,children:n})}function sS(){let{state:e,logout:t}=Gy(),n=e.status===`forbidden`?e.scope:`config`in e?e.config.scope:`okf:read`;return(0,h.jsx)(oS,{title:`Forbidden`,className:`min-h-screen flex items-center justify-center p-6 bg-bg`,children:(0,h.jsxs)(`div`,{className:`w-full max-w-md rounded-2xl border border-border-strong bg-surface p-8 shadow-[0_30px_80px_-20px_rgb(139_92_246/0.35)] ring-1 ring-border-strong text-center flex flex-col items-center`,children:[(0,h.jsx)(iS,{size:44,className:`mb-3`}),(0,h.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg`,children:`ok-fine`}),(0,h.jsx)(`h2`,{className:`mt-2 text-base font-medium text-fg`,children:`Access denied`}),(0,h.jsxs)(`p`,{className:`mt-3 text-sm text-muted`,children:[`Your account can't read this knowledge base (needs`,` `,(0,h.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 font-mono text-xs text-fg`,children:n}),`).`]}),(0,h.jsx)(`button`,{type:`button`,onClick:t,className:`mt-6 w-full rounded-xl border border-border bg-surface px-4 py-2.5 text-sm font-medium text-fg transition hover:bg-surface-2 focus-visible:outline-2 outline-accent-500 cursor-pointer`,children:`Sign out`}),(0,h.jsx)(`p`,{className:`mt-4 text-xs text-subtle`,children:`Sign in with an account that has read permissions.`})]})})}function cS({value:e,label:t,className:n}){let[r,i]=(0,m.useState)(!1),a=(0,m.useRef)(void 0);return(0,m.useEffect)(()=>()=>{clearTimeout(a.current)},[]),(0,h.jsxs)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(e),i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>i(!1),1500)}catch{}},"aria-label":r?`Copied`:t??`Copy to clipboard`,title:r?`Copied`:t??`Copy`,className:X(`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface/80 px-2 py-1 text-xs font-medium text-muted backdrop-blur-xs transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-2 outline-accent-500`,n),children:[r?(0,h.jsx)(kb,{size:14,className:`text-emerald-500 shrink-0`}):(0,h.jsx)(qb,{size:14,className:`shrink-0 text-muted`}),t&&(0,h.jsx)(`span`,{children:r?`Copied`:t})]})}function lS(){let{state:e}=Gy(),t=typeof window<`u`?window.location.origin:``,n=e.status===`unconfigured`?e.redirectUri:`${t}/ui/callback`,r=`config`in e?e.config.scope:`okf:read`,i=`discovery`in e?e.discovery.resource:`${t}/mcp`;return(0,h.jsx)(oS,{title:`Sign-in not configured`,className:`min-h-screen flex items-center justify-center p-6 bg-bg`,children:(0,h.jsxs)(`div`,{className:`w-full max-w-lg rounded-2xl border border-border-strong bg-surface p-8 shadow-[0_30px_80px_-20px_rgb(139_92_246/0.35)] ring-1 ring-border-strong flex flex-col items-center`,children:[(0,h.jsx)(iS,{size:44,className:`mb-3`}),(0,h.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg`,children:`ok-fine`}),(0,h.jsx)(`h2`,{className:`mt-2 text-base font-medium text-fg`,children:`Sign-in isn't configured`}),(0,h.jsxs)(`p`,{className:`mt-2 text-sm text-muted text-center`,children:[`The web UI needs a public OAuth 2.0 client. Set`,` `,(0,h.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 font-mono text-xs text-fg`,children:`OAUTH_UI_CLIENT_ID`}),` (Helm`,` `,(0,h.jsx)(`code`,{className:`rounded bg-surface-2 px-1.5 py-0.5 font-mono text-xs text-fg`,children:`oauth.uiClientId`}),`) with these parameters:`]}),(0,h.jsxs)(`div`,{className:`mt-6 w-full space-y-3 text-left`,children:[(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface-2 p-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:`Redirect URI`}),(0,h.jsx)(cS,{value:n})]}),(0,h.jsx)(`div`,{className:`mt-1 font-mono text-xs text-fg break-all`,children:n})]}),(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface-2 p-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:`Web origin`}),(0,h.jsx)(cS,{value:t})]}),(0,h.jsx)(`div`,{className:`mt-1 font-mono text-xs text-fg break-all`,children:t})]}),(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface-2 p-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:`Scope`}),(0,h.jsx)(cS,{value:r})]}),(0,h.jsx)(`div`,{className:`mt-1 font-mono text-xs text-fg break-all`,children:r})]}),(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface-2 p-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:`Resource`}),(0,h.jsx)(cS,{value:i})]}),(0,h.jsx)(`div`,{className:`mt-1 font-mono text-xs text-fg break-all`,children:i})]})]}),(0,h.jsx)(`p`,{className:`mt-6 text-xs text-subtle text-center`,children:`Alternatively, your identity provider must advertise dynamic client registration.`})]})})}function uS(){let e=typeof window<`u`?window.location.pathname:`/`,t=typeof window<`u`?window.location.search:``,n=typeof window<`u`?window.location.hash:``,r=e.replace(/^\/ui(?:\/|$)/,`/`);return r.startsWith(`/`)||(r=`/${r}`),`${r}${t}${n}`}function dS({error:e}){let{state:t,login:n}=Gy(),[r,i]=(0,m.useState)(!1),a=`identity provider`;if(t.status===`signed-out`)try{a=new URL(t.discovery.as.issuer).host}catch{a=t.discovery.as.issuer}let o=e??(t.status===`signed-out`?t.error:void 0);return(0,h.jsx)(oS,{title:`Sign in`,className:`min-h-screen flex items-center justify-center p-6 bg-bg`,children:(0,h.jsxs)(`div`,{className:`w-full max-w-md rounded-2xl border border-border-strong bg-surface p-8 shadow-[0_30px_80px_-20px_rgb(139_92_246/0.35)] ring-1 ring-border-strong text-center flex flex-col items-center`,children:[(0,h.jsx)(iS,{size:44,className:`mb-3`}),(0,h.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg`,children:`ok-fine`}),(0,h.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:`Shared knowledge for your agents and your team.`}),o?(0,h.jsx)(`div`,{className:`mt-6 w-full rounded-xl border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-left text-sm text-rose-600 dark:text-rose-400 break-words`,children:o}):t.status===`signed-out`&&t.reason===`expired`?(0,h.jsx)(`div`,{className:`mt-6 w-full rounded-xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-600 dark:text-amber-400`,children:`Your session expired.`}):t.status===`signed-out`&&t.reason===`signed-out`?(0,h.jsx)(`div`,{className:`mt-6 w-full rounded-xl border border-border bg-surface-2 px-4 py-3 text-sm text-muted`,children:`You've signed out.`}):null,(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{try{i(!0),await n(uS())}catch{i(!1)}},disabled:r,className:`mt-6 w-full rounded-xl bg-gradient-to-r from-accent-500 to-accent-600 px-4 py-3 text-sm font-medium text-white shadow-sm transition hover:from-accent-600 hover:to-accent-700 focus-visible:outline-2 outline-accent-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,children:r?`Redirecting…`:`Continue with ${a}`}),(0,h.jsx)(`p`,{className:`mt-4 text-xs text-subtle`,children:`Read-only view · signs in through your organization's identity provider`})]})})}function fS(){let{state:e}=Gy();return e.status===`loading`?(0,h.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center bg-bg`,children:(0,h.jsx)(Gd.div,{animate:{opacity:[.3,1,.3]},transition:{duration:1.2,repeat:1/0,ease:`easeInOut`},children:(0,h.jsx)(iS,{size:48})})}):e.status===`open`||e.status===`signed-in`?(0,h.jsx)(og,{}):e.status===`signed-out`?(0,h.jsx)(dS,{error:e.error}):e.status===`unconfigured`?(0,h.jsx)(lS,{}):e.status===`forbidden`?(0,h.jsx)(sS,{}):e.status===`error`?(0,h.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center bg-bg p-6`,children:(0,h.jsx)(rS,{error:e.message,onRetry:()=>window.location.reload(),fullScreen:!0})}):null}var pS=1,mS=.9,hS=.8,gS=.17,_S=.1,vS=.999,yS=.9999,bS=.99,xS=/[\\\/_+.#"@\[\(\{&]/,SS=/[\\\/_+.#"@\[\(\{&]/g,CS=/[\s-]/,wS=/[\s-]/g;function TS(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?pS:bS;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=TS(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=pS:xS.test(e.charAt(l-1))?(d*=hS,p=e.slice(i,l-1).match(SS),p&&i>0&&(d*=vS**+p.length)):CS.test(e.charAt(l-1))?(d*=mS,m=e.slice(i,l-1).match(wS),m&&i>0&&(d*=vS**+m.length)):(d*=gS,i>0&&(d*=vS**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=yS)),(d<_S&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=TS(e,t,n,r,l+1,a+2,o),f*_S>d&&(d=f*_S)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ES(e){return e.toLowerCase().replace(wS,` `)}function DS(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,TS(e,t,ES(e),ES(t),0,0,{})}var OS=Object.defineProperty,kS=(e,t)=>OS(e,`name`,{value:t,configurable:!0}),AS=!!(typeof window<`u`&&window.document&&window.document.createElement);function jS(e,t,{checkForDefaultPrevented:n=!0}={}){return kS(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}kS(jS,`composeEventHandlers`);function MS(e){if(!AS)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}kS(MS,`getOwnerWindow`);function NS(e){if(!AS)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}kS(NS,`getOwnerDocument`);function PS(e,t=!1){let{activeElement:n}=NS(e);if(!n?.nodeName)return null;if(FS(n)&&n.contentDocument)return PS(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=NS(n).getElementById(e);if(t)return t}}return n}kS(PS,`getActiveElement`);function FS(e){return e.tagName===`IFRAME`}kS(FS,`isFrame`);var IS=Object.defineProperty,LS=(e,t)=>IS(e,`name`,{value:t,configurable:!0});function RS(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}LS(RS,`setRef`);function zS(...e){return t=>{let n=!1,r=e.map(e=>{let r=RS(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():RS(e[t],null)}}}}LS(zS,`composeRefs`);function BS(...e){return m.useCallback(zS(...e),e)}LS(BS,`useComposedRefs`);var VS=Object.defineProperty,HS=(e,t)=>VS(e,`name`,{value:t,configurable:!0});function US(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=HS(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 HS(i,`useContext`),[r,i]}HS(US,`createContext`);function WS(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=HS(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 HS(s,`useContext`),[o,s]}HS(r,`createContext`);let i=HS(()=>{let t=n.map(e=>m.createContext(e));return HS(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,GS(i,...t)]}HS(WS,`createContextScope`);function GS(...e){let t=e[0];if(e.length===1)return t;let n=HS(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return HS(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}HS(GS,`composeContextScopes`);var KS=globalThis?.document?m.useLayoutEffect:()=>{},qS=Object.defineProperty,JS=(e,t)=>qS(e,`name`,{value:t,configurable:!0}),YS=m.useId||(()=>void 0),XS=0;function ZS(e){let[t,n]=m.useState(YS());return KS(()=>{e||n(e=>e??String(XS++))},[e]),e||(t?`radix-${t}`:``)}JS(ZS,`useId`);var QS=Object.defineProperty,$S=(e,t)=>QS(e,`name`,{value:t,configurable:!0}),eC=m.useEffectEvent,tC=m.useInsertionEffect;function nC(e){if(typeof eC==`function`)return eC(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof tC==`function`?tC(()=>{t.current=e}):KS(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}$S(nC,`useEffectEvent`);var rC=Object.defineProperty,iC=(e,t)=>rC(e,`name`,{value:t,configurable:!0}),aC=m.useInsertionEffect||KS;function oC({prop:e,defaultProp:t,onChange:n=iC(()=>{},`onChange`),caller:r}){let[i,a,o]=sC({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=cC(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}iC(oC,`useControllableState`);function sC({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return aC(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}iC(sC,`useUncontrolledState`);function cC(e){return typeof e==`function`}iC(cC,`isFunction`);var lC=Symbol(`RADIX:SYNC_STATE`);function uC(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=nC(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===lC)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:lC,state:i})},[i,d.state,c]),[g,f]}iC(uC,`useControllableStateReducer`);var dC=Object.defineProperty,fC=(e,t)=>dC(e,`name`,{value:t,configurable:!0});function pC(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];xC(r)&&typeof TC==`function`&&(r=TC(r._payload)),m.Children.forEach(r,e=>{if(yC(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;xC(n)&&typeof TC==`function`&&(n=TC(n._payload)),a=gC(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?vC(a):void 0,l=BS(n,c);if(!a){if(r||r===0)throw Error(o?wC(e):CC(e));return r}let u=_C(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}fC(pC,`createSlot`);var mC=Symbol.for(`radix.slottable`);function hC(e){let t=fC(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=mC,t}fC(hC,`createSlottable`);var gC=fC((e,t)=>{if(`child`in e.props){let t=e.props.child;return m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null}return m.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function _C(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(` `))}return{...e,...n}}fC(_C,`mergeProps`);function vC(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)}fC(vC,`getElementRef`);function yC(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===mC}fC(yC,`isSlottable`);var bC=Symbol.for(`react.lazy`);function xC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===bC&&`_payload`in e&&SC(e._payload)}fC(xC,`isLazyComponent`);function SC(e){return typeof e==`object`&&!!e&&`then`in e}fC(SC,`isPromiseLike`);var CC=fC(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),wC=fC(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),TC=m.use,EC=Object.defineProperty,DC=(e,t)=>EC(e,`name`,{value:t,configurable:!0}),OC=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=pC(`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 kC(e,t){e&&wg.flushSync(()=>e.dispatchEvent(t))}DC(kC,`dispatchDiscreteCustomEvent`);var AC=Object.defineProperty,jC=(e,t)=>AC(e,`name`,{value:t,configurable:!0});function MC(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}jC(MC,`useCallbackRef`);var NC=Object.defineProperty,PC=(e,t)=>NC(e,`name`,{value:t,configurable:!0}),FC=`dismissableLayer.update`,IC=`dismissableLayer.pointerDownOutside`,LC=`dismissableLayer.focusOutside`,RC,zC=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),BC=m.forwardRef(PC(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(zC),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=m.useState({}),_=BS(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=UC(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=WC(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=MC(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&&(RC=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),GC(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=RC))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),GC())},[d,u]),m.useEffect(()=>{let e=PC(()=>g({}),`handleUpdate`);return document.addEventListener(FC,e),()=>document.removeEventListener(FC,e)},[]),(0,h.jsx)(OC.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:jS(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jS(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jS(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function VC(){let e=m.useContext(zC),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}PC(VC,`useDismissableLayerSurface`);var HC=PC(()=>!0,`IS_TRUE`);function UC(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=HC}=t,s=MC(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()}PC(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}PC(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)}PC(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}PC(p,`handleInteractionBubble`);let m=PC(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||KC(IC,s,p,{discrete:!0})};if(PC(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:PC(()=>c.current=!0,`onPointerDownCapture`)}}PC(UC,`usePointerDownOutside`);function WC(e,t=globalThis?.document){let n=MC(e),r=m.useRef(!1);return m.useEffect(()=>{let e=PC(e=>{e.target&&!r.current&&KC(LC,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:PC(()=>r.current=!0,`onFocusCapture`),onBlurCapture:PC(()=>r.current=!1,`onBlurCapture`)}}PC(WC,`useFocusOutside`);function GC(){let e=new CustomEvent(FC);document.dispatchEvent(e)}PC(GC,`dispatchUpdate`);function KC(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?kC(i,a):i.dispatchEvent(a)}PC(KC,`handleAndDispatchCustomEvent`);var qC=Object.defineProperty,JC=(e,t)=>qC(e,`name`,{value:t,configurable:!0}),YC=`focusScope.autoFocusOnMount`,XC=`focusScope.autoFocusOnUnmount`,ZC={bubbles:!1,cancelable:!0},QC=m.forwardRef(JC(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=MC(i),u=MC(a),d=m.useRef(null),f=BS(t,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:aw(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||aw(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&aw(s)};JC(e,`handleFocusIn`),JC(t,`handleFocusOut`),JC(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){ow.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(YC,ZC);s.addEventListener(YC,l),s.dispatchEvent(t),t.defaultPrevented||($C(lw(tw(s)),{select:!0}),document.activeElement===e&&aw(s))}return()=>{s.removeEventListener(YC,l),setTimeout(()=>{let t=new CustomEvent(XC,ZC);s.addEventListener(XC,u),s.dispatchEvent(t),t.defaultPrevented||aw(e??document.body,{select:!0}),s.removeEventListener(XC,u),ow.remove(p)},0)}}},[s,l,u,p]);let g=m.useCallback(e=>{if(!n&&!r||p.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]=ew(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&aw(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&aw(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,h.jsx)(OC.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})},`FocusScope`));function $C(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(aw(r,{select:t}),document.activeElement!==n)return}JC($C,`focusFirst`);function ew(e){let t=tw(e);return[nw(t,e),nw(t.reverse(),e)]}JC(ew,`getTabbableEdges`);function tw(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:JC(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}JC(tw,`getTabbableCandidates`);function nw(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):rw(r,{upTo:t})))return r}JC(nw,`findVisible`);function rw(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}JC(rw,`isHidden`);function iw(e){return e instanceof HTMLInputElement&&`select`in e}JC(iw,`isSelectableInput`);function aw(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iw(e)&&t&&e.select()}}JC(aw,`focus`);var ow=sw();function sw(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=cw(e,t),e.unshift(t)},remove(t){e=cw(e,t),e[0]?.resume()}}}JC(sw,`createFocusScopesStack`);function cw(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}JC(cw,`arrayRemove`);function lw(e){return e.filter(e=>e.tagName!==`A`)}JC(lw,`removeLinks`);var uw=Object.defineProperty,dw=m.forwardRef(((e,t)=>uw(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);KS(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?wg.createPortal((0,h.jsx)(OC.div,{...r,ref:t}),o):null},`Portal`)),fw=Object.defineProperty,pw=(e,t)=>fw(e,`name`,{value:t,configurable:!0});function mw(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}pw(mw,`useStateMachine`);var hw=pw(e=>{let{present:t,children:n}=e,r=gw(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=vw(r.ref,bw(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function gw(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]=mw(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??yw(r.current),o.current=void 0):a.current=`none`},[s]),KS(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=yw(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]),KS(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=pw(a=>{let o=yw(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=pw(e=>{e.target===t&&(a.current=yw(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=yw(t)}else r.current=null;n(e)},[])}}pw(gw,`usePresence`);function _w(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}pw(_w,`setRef`);function vw(...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=_w(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():_w(n[e],null)}}},[])}pw(vw,`useStableComposedRefs`);function yw(e){return e?.animationName||`none`}pw(yw,`getAnimationName`);function bw(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)}pw(bw,`getElementRef`);var xw=Object.defineProperty,Sw=(e,t)=>xw(e,`name`,{value:t,configurable:!0}),Cw=0,ww=null;function Tw(e){return Ew(),e.children}Sw(Tw,`FocusGuards`);function Ew(){m.useEffect(()=>{ww||={start:Dw(),end:Dw()};let{start:e,end:t}=ww;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Cw++,()=>{Cw===1&&(ww?.start.remove(),ww?.end.remove(),ww=null),Cw=Math.max(0,Cw-1)}},[])}Sw(Ew,`useFocusGuards`);function Dw(){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}Sw(Dw,`createFocusGuard`);var Ow=function(){return Ow=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},Ow.apply(this,arguments)};function kw(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 Aw(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 jw=`right-scroll-bar-position`,Mw=`width-before-scroll-bar`,Nw=`with-scroll-bars-hidden`,Pw=`--removed-body-scroll-bar-size`;function Fw(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Iw(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 Lw=typeof window<`u`?m.useLayoutEffect:m.useEffect,Rw=new WeakMap;function zw(e,t){var n=Iw(t||null,function(t){return e.forEach(function(e){return Fw(e,t)})});return Lw(function(){var t=Rw.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Fw(e,null)}),i.forEach(function(e){r.has(e)||Fw(e,a)})}Rw.set(n,e)},[e]),n}function Bw(e){return e}function Vw(e,t){t===void 0&&(t=Bw);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 Hw(e){e===void 0&&(e={});var t=Vw(null);return t.options=Ow({async:!0,ssr:!1},e),t}var Uw=function(e){var t=e.sideCar,n=kw(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,Ow({},n))};Uw.isSideCarExport=!0;function Ww(e,t){return e.useMedium(t),Uw}var Gw=Hw(),Kw=function(){},qw=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Kw,onWheelCapture:Kw,onTouchMoveCapture:Kw}),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=kw(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=zw([n,t]),w=Ow(Ow({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Gw,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Ow(Ow({},w),{ref:C})):m.createElement(y,Ow({},w,{className:c,ref:C}),s))});qw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qw.classNames={fullWidth:Mw,zeroRight:jw};var Jw=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Yw(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Jw();return t&&e.setAttribute(`nonce`,t),e}function Xw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Zw(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Qw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Yw())&&(Xw(t,n),Zw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$w=function(){var e=Qw();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eT=function(){var e=$w();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},tT={left:0,top:0,right:0,gap:0},nT=function(e){return parseInt(e||``,10)||0},rT=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[nT(n),nT(r),nT(i)]},iT=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return tT;var t=rT(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])}},aT=eT(),oT=`data-scroll-locked`,sT=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
18
+ .${Nw} {
19
+ overflow: hidden ${r};
20
+ padding-right: ${s}px ${r};
21
+ }
22
+ body[${oT}] {
23
+ overflow: hidden ${r};
24
+ overscroll-behavior: contain;
25
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
26
+ padding-left: ${i}px;
27
+ padding-top: ${a}px;
28
+ padding-right: ${o}px;
29
+ margin-left:0;
30
+ margin-top:0;
31
+ margin-right: ${s}px ${r};
32
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
33
+ }
34
+
35
+ .${jw} {
36
+ right: ${s}px ${r};
37
+ }
38
+
39
+ .${Mw} {
40
+ margin-right: ${s}px ${r};
41
+ }
42
+
43
+ .${jw} .${jw} {
44
+ right: 0 ${r};
45
+ }
46
+
47
+ .${Mw} .${Mw} {
48
+ margin-right: 0 ${r};
49
+ }
50
+
51
+ body[${oT}] {
52
+ ${Pw}: ${s}px;
53
+ }
54
+ `},cT=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},lT=function(){m.useEffect(function(){return document.body.setAttribute(oT,(cT()+1).toString()),function(){var e=cT()-1;e<=0?document.body.removeAttribute(oT):document.body.setAttribute(oT,e.toString())}},[])},uT=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;lT();var a=m.useMemo(function(){return iT(i)},[i]);return m.createElement(aT,{styles:sT(a,!t,i,n?``:`!important`)})},dT=!1;if(typeof window<`u`)try{var fT=Object.defineProperty({},"passive",{get:function(){return dT=!0,!0}});window.addEventListener(`test`,fT,fT),window.removeEventListener(`test`,fT,fT)}catch{dT=!1}var pT=dT?{passive:!1}:!1,mT=function(e){return e.tagName===`TEXTAREA`},hT=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!mT(e)&&n[t]===`visible`)},gT=function(e){return hT(e,`overflowY`)},_T=function(e){return hT(e,`overflowX`)},vT=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),xT(e,r)){var i=ST(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yT=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},bT=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},xT=function(e,t){return e===`v`?gT(t):_T(t)},ST=function(e,t){return e===`v`?yT(t):bT(t)},CT=function(e,t){return e===`h`&&t===`rtl`?-1:1},wT=function(e,t,n,r,i){var a=CT(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=ST(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&xT(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},TT=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ET=function(e){return[e.deltaX,e.deltaY]},DT=function(e){return e&&`current`in e?e.current:e},OT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kT=function(e){return`
55
+ .block-interactivity-${e} {pointer-events: none;}
56
+ .allow-interactivity-${e} {pointer-events: all;}
57
+ `},AT=0,jT=[];function MT(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(AT++)[0],a=m.useState(eT)[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=Aw([e.lockRef.current],(e.shards||[]).map(DT),!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=TT(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=vT(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=vT(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 wT(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(jT.length&&jT[jT.length-1]===a){var r=`deltaY`in n?ET(n):TT(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&OT(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(DT).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:NT(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=TT(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,ET(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,TT(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return jT.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,pT),document.addEventListener(`touchmove`,c,pT),document.addEventListener(`touchstart`,u,pT),function(){jT=jT.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,pT),document.removeEventListener(`touchmove`,c,pT),document.removeEventListener(`touchstart`,u,pT)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:kT(i)}):null,p?m.createElement(uT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var PT=Ww(Gw,MT),FT=m.forwardRef(function(e,t){return m.createElement(qw,Ow({},e,{ref:t,sideCar:PT}))});FT.classNames=qw.classNames;var IT=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},LT=new WeakMap,RT=new WeakMap,zT={},BT=0,VT=function(e){return e&&(e.host||VT(e.parentNode))},HT=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=VT(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})},UT=function(e,t,n,r){var i=HT(t,Array.isArray(e)?e:[e]);zT[n]||(zT[n]=new WeakMap);var a=zT[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=(LT.get(e)||0)+1,l=(a.get(e)||0)+1;LT.set(e,c),a.set(e,l),o.push(e),c===1&&i&&RT.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(),BT++,function(){o.forEach(function(e){var t=LT.get(e)-1,i=a.get(e)-1;LT.set(e,t),a.set(e,i),t||(RT.has(e)||e.removeAttribute(r),RT.delete(e)),i||e.removeAttribute(n)}),BT--,BT||(LT=new WeakMap,LT=new WeakMap,RT=new WeakMap,zT={})}},WT=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||IT(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),UT(r,i,n,`aria-hidden`)):function(){return null}},GT=Object.defineProperty,KT=(e,t)=>GT(e,`name`,{value:t,configurable:!0}),qT=`Dialog`,[JT,YT]=WS(qT),[XT,ZT]=JT(qT),QT=KT(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=m.useRef(null),c=m.useRef(null),[l,u]=oC({prop:r,defaultProp:i??!1,onChange:a,caller:qT}),[d,f]=m.useState(0),[p,g]=m.useState(0);return(0,h.jsx)(XT,{scope:t,triggerRef:s,contentRef:c,contentId:ZS(),titleId:ZS(),descriptionId:ZS(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:g,open:l,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),$T=`DialogPortal`,[eE,tE]=JT($T,{forceMount:void 0}),nE=KT(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ZT($T,t);return(0,h.jsx)(eE,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,h.jsx)(hw,{present:n||a.open,children:(0,h.jsx)(dw,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),rE=`DialogOverlay`,iE=m.forwardRef(KT(function(e,t){let n=tE(rE,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ZT(rE,e.__scopeDialog);return a.modal?(0,h.jsx)(hw,{present:r||a.open,children:(0,h.jsx)(oE,{...i,ref:t})}):null},`DialogOverlay`)),aE=pC(`DialogOverlay.RemoveScroll`),oE=m.forwardRef(KT(function(e,t){let{__scopeDialog:n,...r}=e,i=ZT(rE,n),a=BS(t,VC());return(0,h.jsx)(FT,{as:aE,allowPinchZoom:!0,shards:[i.contentRef],children:(0,h.jsx)(OC.div,{"data-state":fE(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),sE=`DialogContent`,cE=m.forwardRef(KT(function(e,t){let n=tE(sE,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ZT(sE,e.__scopeDialog);return(0,h.jsx)(hw,{present:r||a.open,children:a.modal?(0,h.jsx)(lE,{...i,ref:t}):(0,h.jsx)(uE,{...i,ref:t})})},`DialogContent`)),lE=m.forwardRef(KT(function(e,t){let n=ZT(sE,e.__scopeDialog),r=m.useRef(null),i=BS(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return WT(e)},[]),(0,h.jsx)(dE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:jS(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:jS(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:jS(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),uE=m.forwardRef(KT(function(e,t){let n=ZT(sE,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,h.jsx)(dE,{...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`)),dE=m.forwardRef(KT(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ZT(sE,n);return Ew(),(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(QC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,h.jsx)(BC,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":fE(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function fE(e){return e?`open`:`closed`}KT(fE,`getState`);var pE=`[cmdk-group=""]`,mE=`[cmdk-group-items=""]`,hE=`[cmdk-group-heading=""]`,gE=`[cmdk-item=""]`,_E=`${gE}:not([aria-disabled="true"])`,vE=`cmdk-item-select`,yE=`data-value`,bE=(e,t,n)=>DS(e,t,n),xE=m.createContext(void 0),SE=()=>m.useContext(xE),CE=m.createContext(void 0),wE=()=>m.useContext(CE),TE=m.createContext(void 0),EE=m.forwardRef((e,t)=>{let n=BE(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=BE(()=>new Set),i=BE(()=>new Map),a=BE(()=>new Map),o=BE(()=>new Set),s=RE(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=ZS(),b=ZS(),x=ZS(),S=m.useRef(null),C=UE();zE(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),zE(()=>{C(6,ee)},[]);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=A()?.id,w.emit()}),r||C(5,ee),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=A();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??bE;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;te().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(mE);t?t.appendChild(e.parentElement===t?e:e.closest(`${mE} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${mE} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${pE}[${yE}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=te().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(yE);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 ee(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(pE)?.querySelector(hE))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return S.current?.querySelector(`${gE}[aria-selected="true"]`)}function te(){return Array.from(S.current?.querySelectorAll(_E)||[])}function ne(e){let t=te()[e];t&&w.setState(`value`,t.getAttribute(yE))}function re(e){var t;let n=A(),r=te(),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(yE))}function ie(e){let t=A()?.closest(pE),n;for(;t&&!n;)t=e>0?IE(t,pE):LE(t,pE),n=t?.querySelector(_E);n?w.setState(`value`,n.getAttribute(yE)):re(e)}let ae=()=>ne(te().length-1),oe=e=>{e.preventDefault(),e.metaKey?ae():e.altKey?ie(1):re(1)},se=e=>{e.preventDefault(),e.metaKey?ne(0):e.altKey?ie(-1):re(-1)};return m.createElement(OC.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&&oe(e);break;case`ArrowDown`:oe(e);break;case`p`:case`k`:_&&e.ctrlKey&&se(e);break;case`ArrowUp`:se(e);break;case`Home`:e.preventDefault(),ne(0);break;case`End`:e.preventDefault(),ae();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(vE);t.dispatchEvent(e)}}}}},m.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:KE},c),GE(e,e=>m.createElement(CE.Provider,{value:w},m.createElement(xE.Provider,{value:T},e))))}),DE=m.forwardRef((e,t)=>{let n=ZS(),r=m.useRef(null),i=m.useContext(TE),a=SE(),o=RE(e),s=o.current?.forceMount??i?.forceMount;zE(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=HE(n,r,[e.value,e.children,r],e.keywords),l=wE(),u=VE(e=>e.value&&e.value===c.current),d=VE(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(vE,f),()=>t.removeEventListener(vE,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(OC.div,{ref:zS(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)}),OE=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=ZS(),s=m.useRef(null),c=m.useRef(null),l=ZS(),u=SE(),d=VE(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));zE(()=>u.group(o),[]),HE(o,s,[e.value,e.heading,c]);let f=m.useMemo(()=>({id:o,forceMount:i}),[i]);return m.createElement(OC.div,{ref:zS(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),GE(e,e=>m.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},m.createElement(TE.Provider,{value:f},e))))}),kE=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=m.useRef(null),a=VE(e=>!e.search);return!n&&!a?null:m.createElement(OC.div,{ref:zS(i,t),...r,"cmdk-separator":``,role:`separator`})}),AE=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=wE(),o=VE(e=>e.search),s=VE(e=>e.selectedItemId),c=SE();return m.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),m.createElement(OC.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)}})}),jE=m.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=m.useRef(null),o=m.useRef(null),s=VE(e=>e.selectedItemId),c=SE();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(OC.div,{ref:zS(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},GE(e,e=>m.createElement(`div`,{ref:zS(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),ME=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return m.createElement(QT,{open:n,onOpenChange:r},m.createElement(nE,{container:o},m.createElement(iE,{"cmdk-overlay":``,className:i}),m.createElement(cE,{"aria-label":e.label,"cmdk-dialog":``,className:a},m.createElement(EE,{ref:t,...s}))))}),NE=m.forwardRef((e,t)=>VE(e=>e.filtered.count===0)?m.createElement(OC.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),PE=m.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return m.createElement(OC.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},GE(e,e=>m.createElement(`div`,{"aria-hidden":!0},e)))}),FE=Object.assign(EE,{List:jE,Item:DE,Input:AE,Group:OE,Separator:kE,Dialog:ME,Empty:NE,Loading:PE});function IE(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function LE(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function RE(e){let t=m.useRef(e);return zE(()=>{t.current=e}),t}var zE=typeof window>`u`?m.useEffect:m.useLayoutEffect;function BE(e){let t=m.useRef();return t.current===void 0&&(t.current=e()),t}function VE(e){let t=wE(),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function HE(e,t,n,r=[]){let i=m.useRef(),a=SE();return zE(()=>{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(yE,s),i.current=s}),i}var UE=()=>{let[e,t]=m.useState(),n=BE(()=>new Map);return zE(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function WE(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function GE({asChild:e,children:t},n){return e&&m.isValidElement(t)?m.cloneElement(WE(t),{ref:t.ref},n(t.props.children)):n(t)}var KE={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},qE=/^[a-z][a-z0-9+.-]*:/i;function JE(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47,r=e.split(`/`),i=[];for(let e=0;e<r.length;e++){let n=r[e];n&&n!==`.`&&(n===`..`?i.length>0&&i[i.length-1]!==`..`?i.pop():t||i.push(`..`):i.push(n))}let a=i.join(`/`);return t&&(a=`/${a}`),a.length===0?t?`/`:`.`:(n&&!a.endsWith(`/`)&&(a+=`/`),a)}function YE(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===47){if(!r){n=t;break}}else r=!1;return n===-1?t?`/`:`.`:e.slice(0,n)}function XE(e){if(e.length===0)return``;let t=0,n=-1,r=!0;for(let i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!r){t=i+1;break}}else n===-1&&(r=!1,n=i+1);return n===-1?``:e.slice(t,n)}function ZE(e,t){if(!e)return{kind:`invalid`};if(e.startsWith(`#`))return{kind:`anchor`,hash:e};if(e.startsWith(`//`)||qE.test(e))return{kind:`external`,href:e};let n=e;try{n=decodeURI(e)}catch{}let r=``,i=n.indexOf(`#`);i!==-1&&(r=n.slice(i),n=n.slice(0,i));let a=n.indexOf(`?`);a!==-1&&(n=n.slice(0,a));let o;if(n.startsWith(`/`))o=JE(n.slice(1));else{let e=YE(t),r=e===`.`?``:e;o=JE(r?`${r}/${n}`:n)}if(o===`..`||o.startsWith(`../`)||n.endsWith(`/`))return{kind:`invalid`};if(o.endsWith(`.md`)){let e=XE(o);return e===`index.md`||e===`log.md`?{kind:`invalid`}:{kind:`concept`,id:o.slice(0,-3),hash:r}}return{kind:`file`,path:o,hash:r}}function QE(e,t){let n=t.startsWith(`/`)?t.slice(1):t;return`/p/${encodeURIComponent(e)}/c/${n}`}function $E(e,t){let n=t.startsWith(`/`)?t.slice(1):t;return`/p/${encodeURIComponent(e)}/f/${n}`}var eD=`okf.recent`,tD=8;function nD(e){return!!(e&&typeof e==`object`&&`project`in e&&typeof e.project==`string`&&`id`in e&&typeof e.id==`string`&&`title`in e&&typeof e.title==`string`&&`type`in e&&(e.type===null||typeof e.type==`string`))}function rD(){try{if(typeof localStorage>`u`)return[];let e=localStorage.getItem(eD);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(nD).slice(0,tD):[]}catch{return[]}}function iD(e){try{if(typeof localStorage>`u`)return;let t=[e,...rD().filter(t=>t.project!==e.project||t.id!==e.id)].slice(0,tD);localStorage.setItem(eD,JSON.stringify(t))}catch{}}function aD({text:e,query:t,className:n}){if(!e)return null;if(!t?.trim())return(0,h.jsx)(`span`,{className:n,children:e});let r=t.trim().split(/\s+/).map(e=>e.trim()).filter(e=>e.length>0),i=[],a={};for(let e of r){let t=e.toLowerCase();a[t]||(a[t]=!0,i.push(e))}if(i.sort((e,t)=>t.length-e.length),i.length===0)return(0,h.jsx)(`span`,{className:n,children:e});let o=i.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)),s=RegExp(`(${o.join(`|`)})`,`gi`),c=e.split(s);return(0,h.jsx)(`span`,{className:n,children:c.map((e,t)=>i.some(t=>t.toLowerCase()===e.toLowerCase())?(0,h.jsx)(`mark`,{className:`rounded-xs bg-amber-400/25 px-0.5 font-medium text-fg dark:bg-amber-400/35`,children:e},t):e)})}var oD=[`Project`,`Decision`,`Convention`,`Architecture`,`Component`,`Playbook`,`Interface`,`Reference`,`Glossary Term`],sD={project:`text-accent-500`,decision:`text-violet-600 dark:text-violet-400`,convention:`text-sky-600 dark:text-sky-400`,architecture:`text-cyan-600 dark:text-cyan-400`,component:`text-cyan-600 dark:text-cyan-400`,playbook:`text-emerald-600 dark:text-emerald-400`,interface:`text-amber-600 dark:text-amber-400`,reference:`text-zinc-600 dark:text-zinc-400`,"glossary term":`text-pink-600 dark:text-pink-400`};function cD(e){return e?sD[e.trim().toLowerCase()]??`text-zinc-600 dark:text-zinc-400`:`text-zinc-600 dark:text-zinc-400`}function lD({type:e,className:t,size:n=16}){let r=e?e.trim().toLowerCase():``,i=X(`shrink-0`,cD(e),t);switch(r){case`project`:return(0,h.jsx)(ax,{size:n,className:i});case`decision`:return(0,h.jsx)(zx,{size:n,className:i});case`convention`:return(0,h.jsx)(Lx,{size:n,className:i});case`architecture`:return(0,h.jsx)(jx,{size:n,className:i});case`component`:return(0,h.jsx)(Db,{size:n,className:i});case`playbook`:return(0,h.jsx)(xb,{size:n,className:i});case`interface`:return(0,h.jsx)(Nx,{size:n,className:i});case`reference`:return(0,h.jsx)(Cb,{size:n,className:i});case`glossary term`:return(0,h.jsx)(yb,{size:n,className:i});default:return(0,h.jsx)(rx,{size:n,className:i})}}function uD({open:e=!1,className:t,size:n=16}){let r=X(`shrink-0 text-muted`,t);return e?(0,h.jsx)(sx,{size:n,className:r}):(0,h.jsx)(lx,{size:n,className:r})}function dD({className:e,size:t=16}){return(0,h.jsx)($b,{size:t,className:X(`shrink-0 text-muted`,e)})}var fD=(0,m.createContext)(null);function pD(){let e=(0,m.useContext)(fD);if(!e)throw Error(`useCommandPalette must be used within CommandPaletteContext.Provider`);return e}function mD(e){let t=e?.toLowerCase();return t===`human-reviewed`?`bg-emerald-500`:t===`machine-confirmed`?`bg-sky-500`:`bg-zinc-400 dark:bg-zinc-600`}function hD({open:e,onOpenChange:t,currentProject:n}){let r=kh(),[i,a]=(0,m.useState)(``),[o,s]=(0,m.useState)(``),[c,l]=(0,m.useState)(!!n),[u,d]=(0,m.useState)(``);(0,m.useEffect)(()=>{l(!!n)},[n]),(0,m.useEffect)(()=>{let e=setTimeout(()=>{s(i)},150);return()=>clearTimeout(e)},[i]),(0,m.useEffect)(()=>{function n(n){if((n.metaKey||n.ctrlKey)&&n.key===`k`){n.preventDefault(),t(!e);return}if(n.key===`/`&&!e){let e=n.target;e&&(e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`||e.isContentEditable||e.closest(`input, textarea, select, [contenteditable]`))||(n.preventDefault(),t(!0))}}return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]);let f=D_(),p=e?rD():[],g=o.trim().length>=2,_=c&&n?n:void 0,v=P_({q:o.trim(),project:_,limit:20},g&&e),y=g?v.data?.[0]:void 0,b=p[0],x=f.data?.[0],S=``;y?S=`hit-${y.project}-${y.id}`:o.trim().length>0?S=`search-all-results`:b?S=`recent-${b.project}-${b.id}`:x&&(S=`proj-${x.project}`),(0,m.useEffect)(()=>{d(S)},[S]);let C=e=>{t(!1),a(``),r(e)};return(0,h.jsxs)(FE.Dialog,{value:u,onValueChange:d,open:e,onOpenChange:e=>{t(e),e||a(``)},label:`Search concepts, projects…`,shouldFilter:!1,overlayClassName:`fixed inset-0 bg-black/60 backdrop-blur-xs z-50 animate-[okf-fade-in_120ms_ease-out]`,contentClassName:`fixed left-1/2 top-[15%] -translate-x-1/2 w-full max-w-xl z-50 p-3 outline-none`,className:`w-full bg-surface border border-border-strong rounded-2xl shadow-2xl overflow-hidden flex flex-col max-h-[70vh] text-fg animate-[okf-scale-in_120ms_ease-out]`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 px-3 border-b border-border`,children:[(0,h.jsx)(Vx,{size:16,className:`text-muted shrink-0`}),(0,h.jsx)(FE.Input,{value:i,onValueChange:a,placeholder:`Search concepts, projects…`,className:`w-full bg-transparent py-3 text-sm text-fg placeholder:text-muted outline-none`}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>{n&&l(e=>!e)},disabled:!n,className:X(`shrink-0 text-xs px-2.5 py-1 rounded-md font-medium transition-colors select-none`,n?c?`bg-accent-500/10 text-accent-500 ring-1 ring-accent-500/20 hover:bg-accent-500/20 cursor-pointer`:`bg-surface-2 text-muted ring-1 ring-border hover:text-fg cursor-pointer`:`bg-surface-2 text-muted/60 ring-1 ring-border cursor-default`),title:n?`Click to toggle search scope`:void 0,children:c&&n?`This project`:`All projects`})]}),(0,h.jsxs)(FE.List,{className:`overflow-y-auto max-h-[380px] p-2 space-y-1`,children:[g&&v.isLoading&&(0,h.jsx)(FE.Loading,{className:`px-4 py-8 text-center text-xs text-subtle`,children:`Searching...`}),g&&!v.isLoading&&v.data&&v.data.length===0&&(0,h.jsx)(FE.Empty,{className:`px-4 py-8 text-center text-xs text-subtle`,children:`No matching concepts or files`}),g&&v.data&&v.data.length>0&&(0,h.jsx)(FE.Group,{heading:`Concepts & Files`,className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-subtle [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider`,children:v.data.map(e=>(0,h.jsxs)(FE.Item,{value:`hit-${e.project}-${e.id}`,onSelect:()=>C(QE(e.project,e.id)),className:`flex flex-col gap-1 px-2.5 py-2 rounded-lg text-xs cursor-pointer data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg transition-colors`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,h.jsx)(lD,{type:e.type,size:14}),(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:e.title}),(0,h.jsxs)(`span`,{className:`font-mono text-[11px] text-subtle truncate`,children:[e.project,`/`,e.id]}),(0,h.jsx)(`span`,{className:X(`ml-auto h-2 w-2 rounded-full shrink-0`,mD(e.trustTier)),title:e.trustTier})]}),e.snippet&&(0,h.jsx)(`div`,{className:`text-[11px] text-muted truncate pl-5`,children:(0,h.jsx)(aD,{text:e.snippet,query:o})})]},`${e.project}/${e.id}`))}),!g&&(0,h.jsxs)(h.Fragment,{children:[p.length>0&&(0,h.jsx)(FE.Group,{heading:`Recent`,className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-subtle [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider`,children:p.map(e=>(0,h.jsxs)(FE.Item,{value:`recent-${e.project}-${e.id}`,onSelect:()=>C(QE(e.project,e.id)),className:`flex items-center gap-2 px-2.5 py-2 rounded-lg text-xs cursor-pointer data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg transition-colors`,children:[(0,h.jsx)(lD,{type:e.type,size:14}),(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:e.title}),(0,h.jsxs)(`span`,{className:`ml-auto font-mono text-[11px] text-subtle shrink-0`,children:[e.project,`/`,e.id]})]},`recent-${e.project}-${e.id}`))}),f.data&&f.data.length>0&&(0,h.jsx)(FE.Group,{heading:`Projects`,className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-subtle [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider`,children:f.data.map(e=>(0,h.jsxs)(FE.Item,{value:`proj-${e.project}`,onSelect:()=>C(`/p/${encodeURIComponent(e.project)}`),className:`flex items-center gap-2 px-2.5 py-2 rounded-lg text-xs cursor-pointer data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg transition-colors`,children:[(0,h.jsx)(ax,{size:14,className:`text-accent-500 shrink-0`}),(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:e.title}),(0,h.jsx)(`span`,{className:`ml-auto font-mono text-[11px] text-subtle shrink-0`,children:e.project})]},`proj-${e.project}`))})]}),o.trim().length>0&&(0,h.jsx)(FE.Group,{className:`pt-1 border-t border-border mt-1`,children:(0,h.jsxs)(FE.Item,{value:`search-all-results`,onSelect:()=>{let e=new URLSearchParams;e.set(`q`,o.trim()),c&&n&&e.set(`project`,n),C(`/search?${e.toString()}`)},className:`flex items-center gap-2 px-2.5 py-2 rounded-lg text-xs cursor-pointer text-muted hover:text-fg data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg transition-colors`,children:[(0,h.jsx)(Vx,{size:14,className:`shrink-0 text-muted`}),(0,h.jsxs)(`span`,{children:[`Search all results for “`,(0,h.jsx)(`strong`,{className:`text-fg font-medium`,children:o.trim()}),`”`]})]})})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-2 border-t border-border text-[11px] text-subtle bg-surface-2/40 select-none`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`kbd`,{className:`font-mono bg-surface px-1 py-0.2 rounded border border-border`,children:`↑↓`}),` navigate`]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`kbd`,{className:`font-mono bg-surface px-1 py-0.2 rounded border border-border`,children:`↵`}),` open`]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`kbd`,{className:`font-mono bg-surface px-1 py-0.2 rounded border border-border`,children:`esc`}),` close`]})]})]})}function Q({className:e}){return(0,h.jsx)(`div`,{className:X(`animate-shimmer rounded-md bg-surface-2`,e),"aria-hidden":`true`})}var gD=(0,m.createContext)(null);function _D(){let e=(0,m.useContext)(gD);if(!e)throw Error(`useTreeState must be used within a TreeStateContext.Provider`);return e}function vD(e,t){let n=[],r=[],i=[];for(let a of e)if(a.kind===`directory`)n.push(a);else if(a.kind===`concept`){if(t&&a.id===`overview`)continue;r.push(a)}else a.kind===`file`&&i.push(a);return n.sort((e,t)=>e.path.localeCompare(t.path)),r.sort((e,t)=>e.title.localeCompare(t.title)),i.sort((e,t)=>e.path.localeCompare(t.path)),[...n,...r,...i]}function yD({project:e,dir:t,depth:n,activeConceptId:r,activeFilePath:i}){let{data:a,isLoading:o}=k_(e,t,!0),{expanded:s,toggle:c}=_D(),l=(0,m.useMemo)(()=>a?vD(a,t===``):[],[a,t]);return o?(0,h.jsxs)(`div`,{className:`py-1 space-y-1`,style:{paddingLeft:`${n*12+12}px`},children:[(0,h.jsx)(Q,{className:`h-5 w-3/4 rounded-md`}),(0,h.jsx)(Q,{className:`h-5 w-1/2 rounded-md`})]}):l.length===0?(0,h.jsx)(`div`,{className:`py-1 text-[11px] text-subtle italic select-none`,style:{paddingLeft:`${n*12+16}px`},children:`Empty directory`}):(0,h.jsx)(`div`,{className:`space-y-0.5`,children:l.map(t=>{if(t.kind===`directory`){let a=s.has(t.path),o=t.path.split(`/`).pop()??t.path;return(0,h.jsxs)(`div`,{"data-tree-path":t.path,children:[(0,h.jsxs)(`button`,{type:`button`,onClick:()=>c(t.path),className:`group flex w-full items-center gap-1.5 py-1 pr-2 rounded-md text-xs font-medium text-muted hover:text-fg hover:bg-surface-2 transition-colors cursor-pointer text-left`,style:{paddingLeft:`${n*12+6}px`},children:[(0,h.jsx)(Nb,{size:12,className:X(`text-subtle transition-transform duration-150 shrink-0`,a&&`rotate-90`)}),(0,h.jsx)(uD,{open:a,size:14}),(0,h.jsx)(`span`,{className:`truncate flex-1`,children:o}),(0,h.jsx)(`span`,{className:`ml-auto text-[11px] text-subtle font-mono tabular-nums`,children:t.conceptCount})]}),(0,h.jsx)(tu,{initial:!1,children:a&&(0,h.jsx)(Gd.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.15,ease:`easeInOut`},className:`overflow-hidden`,children:(0,h.jsx)(yD,{project:e,dir:t.path,depth:n+1,activeConceptId:r,activeFilePath:i})})})]},`dir-${t.path}`)}if(t.kind===`concept`){let i=r===t.id;return(0,h.jsx)(`div`,{"data-tree-path":t.id,children:(0,h.jsxs)($g,{to:QE(e,t.id),className:X(`group flex items-center gap-2 py-1 pr-2 rounded-md text-xs transition-colors`,i?`border-l-2 border-accent-500 bg-surface-2 text-fg font-medium pl-[calc(var(--tree-pad)-2px)]`:`border-l-2 border-transparent text-muted hover:text-fg hover:bg-surface-2`),style:{"--tree-pad":`${n*12+20}px`,paddingLeft:i?`${n*12+18}px`:`${n*12+20}px`},children:[(0,h.jsx)(lD,{type:t.type,size:14}),(0,h.jsx)(`span`,{className:`truncate`,children:t.title})]})},`concept-${t.id}`)}if(t.kind===`file`){let r=i===t.path,a=t.path.split(`/`).pop()??t.path;return(0,h.jsx)(`div`,{"data-tree-path":t.path,children:(0,h.jsxs)($g,{to:$E(e,t.path),className:X(`group flex items-center gap-2 py-1 pr-2 rounded-md text-xs transition-colors`,r?`border-l-2 border-accent-500 bg-surface-2 text-fg font-medium font-mono`:`border-l-2 border-transparent text-muted hover:text-fg hover:bg-surface-2 font-mono`),style:{paddingLeft:r?`${n*12+18}px`:`${n*12+20}px`},children:[(0,h.jsx)(dD,{size:14}),(0,h.jsx)(`span`,{className:`truncate`,children:a})]})},`file-${t.path}`)}return null})})}function bD({project:e}){let t=Nh(),n=Dh(),r=t[`*`]??null,i=n.pathname.includes(`/c/`)&&r!==null,a=n.pathname.includes(`/f/`)&&r!==null,o=i?r:null,s=a?r:null,{expanded:c,toggle:l}=_D();return(0,m.useEffect)(()=>{let e=o??s;if(!e)return;let t=e.split(`/`);if(t.length<=1)return;let n=``;for(let e=0;e<t.length-1;e++){let r=t[e];r&&(n=n?`${n}/${r}`:r,c.has(n)||l(n))}},[o,s,c,l]),(0,h.jsx)(`div`,{className:`py-1`,children:(0,h.jsx)(yD,{project:e,dir:``,depth:0,activeConceptId:o,activeFilePath:s})})}var xD=new Intl.RelativeTimeFormat(`en`,{numeric:`auto`}),SD=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function CD(e){let t=new Date(e).getTime();if(Number.isNaN(t))return e;let n=Math.round((t-Date.now())/1e3);if(Math.abs(n)<60)return xD.format(n,`second`);let r=Math.round(n/60);if(Math.abs(r)<60)return xD.format(r,`minute`);let i=Math.round(r/60);if(Math.abs(i)<24)return xD.format(i,`hour`);let a=Math.round(i/24);if(Math.abs(a)<7)return xD.format(a,`day`);let o=Math.round(a/7);if(Math.abs(o)<5)return xD.format(o,`week`);let s=Math.round(a/30);if(Math.abs(s)<12)return xD.format(s,`month`);let c=Math.round(a/365);return xD.format(c,`year`)}function wD(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:SD.format(t)}function TD(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return Math.abs(t)%360}function ED(e){let t=e.startsWith(`human:`)?e.slice(6):e,n=t.indexOf(`@`);n!==-1&&(t=t.slice(0,n));let r=t.match(/[A-Za-z0-9]+/g);return!r||r.length===0?``:r.slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}function DD(e){return e.startsWith(`human:`)?`human`:`agent`}function OD(e){return e.slice(0,7)}function kD({className:e}){let{data:t,isLoading:n}=F_();if(n||!t)return(0,h.jsxs)(`span`,{className:X(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-zinc-500/10 text-zinc-500 ring-1 ring-inset ring-zinc-500/20`,e),children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-zinc-400 animate-pulse`}),(0,h.jsx)(`span`,{children:`Syncing...`})]});if(t.remote===null)return(0,h.jsxs)(`span`,{className:X(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-zinc-500/10 text-zinc-600 dark:text-zinc-400 ring-1 ring-inset ring-zinc-500/20`,e),children:[(0,h.jsx)(px,{size:12,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`Local only`})]});if(t.lastError)return(0,h.jsxs)(`span`,{title:t.lastError,className:X(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-rose-500/10 text-rose-600 dark:text-rose-400 ring-1 ring-inset ring-rose-500/20`,e),children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-rose-500 shrink-0`}),(0,h.jsx)(`span`,{className:`truncate max-w-[120px]`,children:`Sync error`})]});if(t.ahead>0||t.behind>0)return(0,h.jsx)(`span`,{className:X(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-amber-500/10 text-amber-600 dark:text-amber-400 ring-1 ring-inset ring-amber-500/20 font-mono`,e),children:(0,h.jsxs)(`span`,{children:[`↑`,t.ahead,` ↓`,t.behind]})});let r=t.lastSyncAt?CD(t.lastSyncAt):`just now`;return(0,h.jsxs)(`span`,{className:X(`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 ring-1 ring-inset ring-emerald-500/20`,e),children:[(0,h.jsxs)(`span`,{className:`relative flex h-2 w-2 shrink-0`,children:[(0,h.jsx)(`span`,{className:`absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75`}),(0,h.jsx)(`span`,{className:`relative inline-flex h-2 w-2 rounded-full bg-emerald-500`})]}),(0,h.jsxs)(`span`,{children:[`Synced `,r]})]})}var AD={system:`light`,light:`dark`,dark:`system`};function jD({className:e}){let[t,n]=tb();return(0,h.jsxs)(`button`,{type:`button`,onClick:()=>{n(AD[t])},className:e??`inline-flex h-8 w-8 items-center justify-center rounded-lg text-muted hover:bg-surface-2 hover:text-fg transition-colors`,"aria-label":`Toggle theme (current: ${t})`,title:`Theme: ${t} (click to switch to ${AD[t]})`,children:[t===`system`&&(0,h.jsx)(Dx,{size:16}),t===`light`&&(0,h.jsx)(qx,{size:16}),t===`dark`&&(0,h.jsx)(kx,{size:16})]})}function MD({actor:e,size:t=28,className:n}){let r=TD(e),i=ED(e),a=DD(e),o=Math.max(10,Math.round(t*.42)),s=Math.max(10,Math.round(t*.4));return(0,h.jsxs)(`div`,{className:X(`relative inline-flex shrink-0 select-none`,n),style:{width:t,height:t},title:e,children:[(0,h.jsx)(`div`,{className:`flex h-full w-full items-center justify-center rounded-full font-medium text-white shadow-xs`,style:{background:`linear-gradient(135deg, hsl(${r} 70% 55%), hsl(${(r+40)%360} 70% 45%))`,fontSize:s},children:i}),(0,h.jsx)(`div`,{className:`absolute -bottom-0.5 -right-0.5 flex items-center justify-center rounded-full bg-surface text-muted ring-1 ring-border`,style:{width:o+4,height:o+4},children:a===`human`?(0,h.jsx)($x,{size:o}):(0,h.jsx)(Tb,{size:o})})]})}function ND({className:e}){let{state:t,logout:n}=Gy(),[r,i]=(0,m.useState)(!1),a=(0,m.useRef)(null);if((0,m.useEffect)(()=>{if(!r)return;function e(e){a.current&&!a.current.contains(e.target)&&i(!1)}function t(e){e.key===`Escape`&&i(!1)}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]),t.status===`loading`)return(0,h.jsx)(`div`,{className:X(`h-7 w-24 rounded-md bg-surface-2 animate-pulse`,e)});let o=t.status===`open`,s=t.status===`signed-in`,c=`config`in t?t.config.version:null,l=s?t.identity:null;return(0,h.jsxs)(`div`,{ref:a,className:X(`relative inline-block`,e),children:[o?(0,h.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium bg-amber-500/10 text-amber-600 dark:text-amber-400 ring-1 ring-inset ring-amber-500/20 hover:bg-amber-500/20 transition-colors`,title:`Running in local mode without authentication`,"aria-expanded":r,children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-amber-500`}),(0,h.jsx)(`span`,{children:`Local mode · auth off`})]}):s?(0,h.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`flex items-center gap-2 rounded-lg p-1 text-left hover:bg-surface-2 transition-colors max-w-[200px]`,"aria-expanded":r,children:[(0,h.jsx)(MD,{actor:l??`User`,size:26}),(0,h.jsx)(`span`,{className:`truncate text-xs font-medium text-fg`,children:l??`Signed in`})]}):null,r&&(0,h.jsxs)(`div`,{role:`menu`,className:`absolute bottom-full left-0 mb-2 w-56 rounded-xl border border-border bg-surface p-1.5 shadow-xl z-50 text-xs`,children:[l&&(0,h.jsxs)(`div`,{className:`px-2.5 py-1.5 border-b border-border mb-1`,children:[(0,h.jsx)(`div`,{className:`font-medium text-fg truncate`,children:l}),(0,h.jsx)(`div`,{className:`text-[11px] text-muted truncate`,children:`Identity provider session`})]}),c&&(0,h.jsxs)(`div`,{className:`px-2.5 py-1 text-[11px] text-muted font-mono`,children:[`ok-fine v`,c]}),s&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`div`,{className:`my-1 border-t border-border`}),(0,h.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{i(!1),n()},className:`flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-xs font-medium text-rose-600 dark:text-rose-400 hover:bg-rose-500/10 transition-colors cursor-pointer`,children:[(0,h.jsx)(Cx,{size:13,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`Sign out`})]})]})]})]})}function PD({project:e,drawerOpen:t,onCloseDrawer:n}){let r=kh(),i=D_(),[a,o]=(0,m.useState)(!1),s=(0,m.useRef)(null),c=i.data?.find(t=>t.project===e)?.title??e??`All projects`;(0,m.useEffect)(()=>{if(!a)return;function e(e){s.current&&!s.current.contains(e.target)&&o(!1)}function t(e){e.key===`Escape`&&o(!1)}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[a]);let l=e=>{o(!1),n(),r(e?`/p/${encodeURIComponent(e)}`:`/`)};return(0,h.jsxs)(h.Fragment,{children:[t&&(0,h.jsx)(`button`,{type:`button`,"aria-label":`Close sidebar`,onClick:n,className:`fixed inset-0 z-40 bg-black/50 backdrop-blur-xs lg:hidden animate-[fade-in_150ms_ease-out] cursor-default border-none p-0`}),(0,h.jsxs)(`aside`,{className:X(`fixed inset-y-0 left-0 z-50 w-[272px] bg-surface border-r border-border flex flex-col h-full shadow-2xl lg:shadow-none transition-transform duration-200 ease-out lg:static lg:z-auto lg:translate-x-0`,t?`translate-x-0`:`-translate-x-full lg:translate-x-0`),children:[(0,h.jsxs)(`div`,{className:`h-14 border-b border-border flex items-center justify-between px-4 shrink-0`,children:[(0,h.jsx)($g,{to:`/`,onClick:n,className:`hover:opacity-90 transition-opacity`,title:`ok-fine home`,children:(0,h.jsx)(aS,{size:22})}),(0,h.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close sidebar`,className:`lg:hidden p-1.5 rounded-lg text-muted hover:text-fg hover:bg-surface-2 transition-colors cursor-pointer`,children:(0,h.jsx)(tS,{size:18})})]}),(0,h.jsxs)(`div`,{ref:s,className:`relative p-2 border-b border-border shrink-0`,children:[(0,h.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-expanded":a,className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 rounded-lg bg-surface-2 hover:bg-surface border border-border text-xs font-medium text-fg transition-colors cursor-pointer text-left`,children:[(0,h.jsx)(`span`,{className:`truncate`,children:c}),(0,h.jsx)(Fb,{size:14,className:`text-subtle shrink-0`})]}),a&&(0,h.jsxs)(`div`,{role:`menu`,className:`absolute left-2 right-2 top-full mt-1 rounded-xl border border-border bg-surface p-1 shadow-xl z-50 text-xs space-y-0.5 max-h-64 overflow-y-auto`,children:[(0,h.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>l(),className:X(`flex w-full items-center justify-between px-2.5 py-1.5 rounded-lg text-left transition-colors cursor-pointer`,e?`text-muted hover:text-fg hover:bg-surface-2`:`bg-accent-500/10 text-accent-500 font-medium`),children:[(0,h.jsx)(`span`,{children:`All projects`}),!e&&(0,h.jsx)(kb,{size:14,className:`shrink-0`})]}),(0,h.jsx)(`div`,{className:`my-1 border-t border-border`}),i.data?.map(t=>{let n=t.project===e;return(0,h.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>l(t.project),className:X(`flex w-full items-center justify-between px-2.5 py-1.5 rounded-lg text-left transition-colors cursor-pointer`,n?`bg-accent-500/10 text-accent-500 font-medium`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsxs)(`div`,{className:`truncate pr-2`,children:[(0,h.jsx)(`div`,{className:`font-medium truncate`,children:t.title}),(0,h.jsx)(`div`,{className:`font-mono text-[10px] text-subtle truncate`,children:t.project})]}),n&&(0,h.jsx)(kb,{size:14,className:`shrink-0`})]},t.project)})]})]}),(0,h.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 flex flex-col p-2 space-y-4`,children:e?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`nav`,{"aria-label":`Project sections`,className:`space-y-0.5`,children:[(0,h.jsxs)(e_,{to:`/p/${encodeURIComponent(e)}`,end:!0,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(yx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Overview`})]}),(0,h.jsxs)(e_,{to:`/p/${encodeURIComponent(e)}/activity`,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(Fx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Activity`})]}),(0,h.jsxs)(e_,{to:`/p/${encodeURIComponent(e)}/health`,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(hx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Health`})]}),(0,h.jsxs)(e_,{to:`/search?project=${encodeURIComponent(e)}`,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(Vx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Search`})]})]}),(0,h.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:[(0,h.jsx)(`div`,{className:`px-2 pb-1 text-[11px] font-medium uppercase tracking-wider text-subtle select-none`,children:`Knowledge`}),(0,h.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,h.jsx)(bD,{project:e})})]})]}):(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsxs)(`nav`,{"aria-label":`Global navigation`,className:`space-y-0.5`,children:[(0,h.jsxs)(e_,{to:`/`,end:!0,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(yx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Projects`})]}),(0,h.jsxs)(e_,{to:`/search`,onClick:n,className:({isActive:e})=>X(`flex items-center gap-2.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors`,e?`bg-surface-2 text-fg`:`text-muted hover:text-fg hover:bg-surface-2`),children:[(0,h.jsx)(Vx,{size:14,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Search`})]})]}),i.data&&i.data.length>0&&(0,h.jsxs)(`div`,{className:`pt-2`,children:[(0,h.jsx)(`div`,{className:`px-2 pb-1 text-[11px] font-medium uppercase tracking-wider text-subtle select-none`,children:`Projects`}),(0,h.jsx)(`div`,{className:`space-y-0.5`,children:i.data.map(e=>(0,h.jsxs)($g,{to:`/p/${encodeURIComponent(e.project)}`,onClick:n,className:`flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-xs text-muted hover:text-fg hover:bg-surface-2 transition-colors`,children:[(0,h.jsx)(ax,{size:14,className:`text-accent-500 shrink-0`}),(0,h.jsx)(`span`,{className:`truncate`,children:e.title})]},e.project))})]})]})}),(0,h.jsxs)(`div`,{className:`p-3 border-t border-border flex flex-col gap-2.5 mt-auto bg-surface shrink-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(kD,{}),(0,h.jsx)(jD,{})]}),(0,h.jsx)(`div`,{className:`flex items-center justify-between gap-2`,children:(0,h.jsx)(ND,{})})]})]})]})}function FD({className:e}){let t=Nh(),n=Dh(),r=t.project,i=t[`*`],a=O_(r??``).data?.title??r,o=n.pathname.includes(`/c/`)&&!!i,s=n.pathname.includes(`/f/`)&&!!i,c=n.pathname.endsWith(`/activity`),l=n.pathname.endsWith(`/health`),u=n.pathname===`/search`,d=A_(r??``,o?i??``:``).data?.derived?.title??(i?i.split(`/`).pop():``),f=i?i.split(`/`):[],p=f.slice(0,-1),m=f[f.length-1]??``,g=(0,h.jsx)(`span`,{className:`text-subtle/50 select-none mx-0.5`,children:`/`});return(0,h.jsxs)(`nav`,{"aria-label":`Breadcrumbs`,className:X(`flex items-center gap-1 text-xs overflow-hidden whitespace-nowrap min-w-0`,e),children:[(0,h.jsx)($g,{to:`/`,className:X(`transition-colors shrink-0`,!r&&!u?`font-medium text-fg`:`text-muted hover:text-fg`),children:`Projects`}),u&&(0,h.jsxs)(h.Fragment,{children:[g,(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:`Search`})]}),r&&(0,h.jsxs)(h.Fragment,{children:[g,!o&&!s&&!c&&!l?(0,h.jsx)(`span`,{className:`font-medium text-fg truncate max-w-[200px]`,title:a,children:a}):(0,h.jsx)($g,{to:`/p/${encodeURIComponent(r)}`,className:`text-muted hover:text-fg transition-colors truncate max-w-[160px] shrink-0`,title:a,children:a})]}),c&&(0,h.jsxs)(h.Fragment,{children:[g,(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:`Activity`})]}),l&&(0,h.jsxs)(h.Fragment,{children:[g,(0,h.jsx)(`span`,{className:`font-medium text-fg truncate`,children:`Health`})]}),(o||s)&&(0,h.jsxs)(h.Fragment,{children:[p.map((e,t)=>{let n=p.slice(0,t+1).join(`/`);return(0,h.jsxs)(`span`,{className:`flex items-center gap-1 shrink-0`,children:[g,(0,h.jsx)(`span`,{className:`text-subtle select-none max-w-[120px] truncate`,title:e,children:e})]},n)}),g,o?(0,h.jsx)(`span`,{className:`font-medium text-fg truncate max-w-[220px]`,title:d,children:d}):(0,h.jsx)(`span`,{className:`font-medium font-mono text-fg truncate max-w-[220px]`,title:m,children:m})]})]})}function ID({onMenuClick:e}){let{open:t}=pD();return(0,h.jsxs)(`header`,{className:`sticky top-0 z-30 h-14 bg-bg/70 backdrop-blur-xl border-b border-border flex items-center justify-between px-4 gap-4 shrink-0`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,h.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`Open sidebar menu`,className:`lg:hidden p-1.5 -ml-1 rounded-lg text-muted hover:text-fg hover:bg-surface-2 transition-colors cursor-pointer shrink-0`,children:(0,h.jsx)(Tx,{size:18})}),(0,h.jsx)(FD,{})]}),(0,h.jsxs)(`button`,{type:`button`,onClick:t,className:`inline-flex items-center gap-2 px-2.5 py-1 rounded-lg bg-surface-2 hover:bg-surface border border-border hover:border-border-strong text-xs transition-colors cursor-pointer shrink-0`,title:`Search knowledge base (⌘K or /)`,children:[(0,h.jsx)(Vx,{size:13,className:`text-muted shrink-0`}),(0,h.jsx)(`span`,{className:`text-muted hidden sm:inline`,children:`Search knowledge…`}),(0,h.jsx)(`kbd`,{className:`hidden sm:inline-block font-mono text-[10px] text-subtle bg-surface px-1.5 py-0.5 rounded border border-border`,children:`⌘K`})]})]})}function LD(){let{project:e}=Nh(),[t,n]=(0,m.useState)(()=>new Set),[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(!1),s=(0,m.useRef)(e);(0,m.useEffect)(()=>{s.current!==e&&(s.current=e,n(new Set))},[e]);let{pathname:c}=Dh();(0,m.useEffect)(()=>{c&&i(!1)},[c]);let l=(0,m.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),u=(0,m.useCallback)(e=>{n(t=>{let n=new Set(t),r=e.split(`/`),i=``;for(let e of r)e&&(i=i?`${i}/${e}`:e,n.add(i));return n}),i(!0),requestAnimationFrame(()=>{try{document.querySelector(`[data-tree-path="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`,behavior:`smooth`})}catch{document.querySelector(`[data-tree-path]`)?.scrollIntoView({block:`nearest`,behavior:`smooth`})}})},[]),d=(0,m.useMemo)(()=>({expanded:t,toggle:l,reveal:u}),[t,l,u]),f=(0,m.useMemo)(()=>({open:()=>o(!0)}),[]);return(0,h.jsx)(gD.Provider,{value:d,children:(0,h.jsxs)(fD.Provider,{value:f,children:[(0,h.jsxs)(`div`,{className:`flex h-screen w-screen overflow-hidden text-fg`,children:[(0,h.jsx)(PD,{project:e,drawerOpen:r,onCloseDrawer:()=>i(!1)}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col min-w-0 h-full overflow-hidden`,children:[(0,h.jsx)(ID,{onMenuClick:()=>i(!0)}),(0,h.jsx)(`main`,{className:`flex-1 overflow-y-auto min-h-0`,children:(0,h.jsx)(og,{})})]})]}),(0,h.jsx)(hD,{open:a,onOpenChange:o,currentProject:e})]})})}var RD=new Intl.DateTimeFormat(void 0,{dateStyle:`full`});function zD(){let e=Nh().project??``,{data:t}=O_(e),{data:n,isLoading:r,isError:i,error:a,refetch:o}=M_(e,{limit:100}),s=(0,m.useMemo)(()=>{if(!n||n.length===0)return[];let e=[],t=``,r=[];for(let i of n){let n=RD.format(new Date(i.at));n===t?r.push(i):(r.length>0&&e.push({day:t,entries:r}),t=n,r=[i])}return r.length>0&&e.push({day:t,entries:r}),e},[n]),c=t?.title?`${t.title} Activity`:`Activity`;return r?(0,h.jsxs)(oS,{title:c,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(Q,{className:`h-4 w-32 rounded-md`}),(0,h.jsx)(Q,{className:`h-8 w-48 rounded-lg`})]}),(0,h.jsx)(`div`,{className:`mt-8 space-y-8`,children:Array.from({length:2}).map((e,t)=>(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsx)(Q,{className:`h-5 w-40 rounded-md`}),(0,h.jsx)(`div`,{className:`rounded-xl border border-border bg-surface divide-y divide-border p-4 space-y-3`,children:Array.from({length:3}).map((e,t)=>(0,h.jsxs)(`div`,{className:`flex items-center justify-between pt-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(Q,{className:`h-7 w-7 rounded-full shrink-0`}),(0,h.jsxs)(`div`,{className:`space-y-1`,children:[(0,h.jsx)(Q,{className:`h-4 w-48`}),(0,h.jsx)(Q,{className:`h-3 w-32`})]})]}),(0,h.jsx)(Q,{className:`h-6 w-16 rounded-md`})]},t))})]},t))})]}):i?(0,h.jsx)(oS,{title:c,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:(0,h.jsx)(rS,{error:a,onRetry:()=>void o()})}):!n||n.length===0?(0,h.jsxs)(oS,{title:c,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`mb-6`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:[(0,h.jsx)($g,{to:`/p/${encodeURIComponent(e)}`,className:`transition-colors hover:text-fg`,children:t?.title??e}),(0,h.jsx)(`span`,{children:`/`}),(0,h.jsx)(`span`,{className:`text-fg`,children:`Activity`})]}),(0,h.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:`Activity`})]}),(0,h.jsx)(nS,{icon:Fx,title:`No activity recorded`,hint:`Changes to concepts and files in this project will appear here.`,className:`mt-8 py-16`})]}):(0,h.jsxs)(oS,{title:c,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`mb-8`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:[(0,h.jsx)($g,{to:`/p/${encodeURIComponent(e)}`,className:`transition-colors hover:text-fg`,children:t?.title??e}),(0,h.jsx)(`span`,{children:`/`}),(0,h.jsx)(`span`,{className:`text-fg`,children:`Activity`})]}),(0,h.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight text-fg`,children:`Activity`}),(0,h.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`History of commits and updates for `,t?.title??e]})]}),(0,h.jsx)(`div`,{className:`space-y-8`,children:s.map(e=>(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(`h2`,{className:`text-xs font-semibold uppercase tracking-wider text-muted`,children:e.day}),(0,h.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-surface divide-y divide-border`,children:e.entries.map(e=>{let t=e.actor.startsWith(`human:`),n=t?e.actor.slice(6):e.actor;return(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-start gap-3 min-w-0`,children:[(0,h.jsx)(MD,{actor:e.actor,size:28,className:`mt-0.5 shrink-0`}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`p`,{className:`text-sm font-medium text-fg break-words`,children:e.subject}),(0,h.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2 text-xs text-muted`,children:[(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-subtle`,children:[t?(0,h.jsx)($x,{size:12,className:`shrink-0 text-muted`}):(0,h.jsx)(Tb,{size:12,className:`shrink-0 text-muted`}),(0,h.jsx)(`span`,{className:`truncate max-w-[200px]`,children:n})]}),e.principal&&(0,h.jsxs)(`span`,{className:`font-mono text-xs text-subtle truncate max-w-[200px]`,children:[`(`,e.principal,`)`]}),(0,h.jsx)(`span`,{children:`·`}),(0,h.jsx)(`span`,{title:wD(e.at),children:CD(e.at)})]})]})]}),(0,h.jsx)(`div`,{className:`flex items-center gap-2 self-end sm:self-center shrink-0`,children:(0,h.jsx)(cS,{value:e.sha,label:OD(e.sha),className:`font-mono text-xs`})})]},e.sha)})})]},e.day))})]})}function BD(){let{completeLogin:e}=Gy(),t=kh(),[n,r]=(0,m.useState)(null),i=(0,m.useRef)(!1);return(0,m.useEffect)(()=>{if(i.current)return;i.current=!0;let n=new URL(window.location.href);e(n).then(e=>{t(e,{replace:!0})}).catch(e=>{r(e instanceof Error?e.message:String(e))})},[e,t]),n===null?(0,h.jsx)(oS,{title:`Signing in`,className:`min-h-screen flex items-center justify-center p-6 bg-bg`,children:(0,h.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3`,children:[(0,h.jsx)(xx,{size:36,className:`animate-spin text-accent-500`}),(0,h.jsx)(`p`,{className:`text-sm font-medium text-muted`,children:`Signing you in…`})]})}):(0,h.jsx)(dS,{error:n})}function VD({className:e,children:t}){return(0,h.jsx)(`span`,{className:X(`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium ring-1 ring-inset`,e),children:t})}function HD({status:e,className:t}){let n=e.toLowerCase(),r=`bg-zinc-500/10 text-zinc-600 dark:text-zinc-400 ring-zinc-500/20`;return n===`draft`?r=`bg-amber-500/10 text-amber-600 dark:text-amber-400 ring-amber-500/20`:n===`stable`?r=`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 ring-emerald-500/20`:n===`deprecated`&&(r=`bg-rose-500/10 text-rose-600 dark:text-rose-400 ring-rose-500/20`),(0,h.jsx)(VD,{className:X(r,t),children:e})}function UD({tier:e,className:t}){let n=e.toLowerCase();return n===`human-reviewed`?(0,h.jsxs)(VD,{className:X(`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 ring-emerald-500/20`,t),children:[(0,h.jsx)(Ux,{size:12,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`human-reviewed`})]}):n===`machine-confirmed`?(0,h.jsxs)(VD,{className:X(`bg-sky-500/10 text-sky-600 dark:text-sky-400 ring-sky-500/20`,t),children:[(0,h.jsx)(_b,{size:12,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`machine-confirmed`})]}):(0,h.jsxs)(VD,{className:X(`bg-zinc-500/10 text-zinc-600 dark:text-zinc-400 ring-zinc-500/20`,t),children:[(0,h.jsx)(Vb,{size:12,className:`shrink-0`}),(0,h.jsx)(`span`,{children:e||`unverified`})]})}function WD({className:e}){return(0,h.jsxs)(VD,{className:X(`bg-orange-500/10 text-orange-600 dark:text-orange-400 ring-orange-500/20`,e),children:[(0,h.jsx)(Ub,{size:12,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`Stale`})]})}function GD({type:e,className:t}){return(0,h.jsxs)(VD,{className:X(`bg-surface-2 text-fg ring-border`,t),children:[(0,h.jsx)(lD,{type:e,size:12}),(0,h.jsx)(`span`,{children:e||`Concept`})]})}function KD({code:e,lang:t,lineNumbers:n=!1,className:r}){let[i,a]=(0,m.useState)(null);(0,m.useEffect)(()=>{let n=!1;if(!t){a(null);return}return Ag(async()=>{let{highlight:e}=await import(`./highlight-CW19vWvw.js`);return{highlight:e}},[]).then(({highlight:n})=>n(e,t)).then(e=>{n||a(e)}).catch(()=>{n||a(null)}),()=>{n=!0}},[e,t]);let o=e.split(`
58
+ `);return(0,h.jsxs)(`div`,{className:X(`relative group`,r),children:[(0,h.jsx)(`div`,{className:`absolute top-2.5 right-2.5 z-10 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity`,children:(0,h.jsx)(cS,{value:e})}),i?(0,h.jsx)(`div`,{className:X(n&&`okf-lines`),dangerouslySetInnerHTML:{__html:i}}):(0,h.jsx)(`pre`,{className:X(`okf-code overflow-x-auto`,n&&`okf-lines`),children:(0,h.jsx)(`code`,{children:n?o.map((e,t)=>(0,h.jsxs)(`span`,{className:`line`,children:[e,t<o.length-1?`
59
+ `:``]},t)):e})})]})}var qD=14;function JD({project:e,conceptId:t,inbound:n,outbound:r,className:i}){let a=kh();if(n.length===0&&r.length===0)return(0,h.jsx)(`div`,{className:X(`rounded-xl border border-border bg-surface-2/40 p-4 text-center text-xs text-muted italic`,i),children:`No connections yet`});let o=n.slice(0,6),s=n.length-o.length,c=r.slice(0,6),l=r.length-c.length,u=t.split(`/`).pop()??t,d=u.length>qD?`${u.slice(0,13)}…`:u,f=(e,t)=>t===1?110:24+e*172/(t-1),p=(e,t)=>t===1?110:24+e*172/(t-1);return(0,h.jsxs)(`div`,{className:X(`rounded-xl border border-border bg-surface-2/30 p-2.5`,i),children:[(0,h.jsx)(`div`,{className:`mb-2 px-1 text-xs font-semibold uppercase tracking-wider text-muted`,children:`Connections`}),(0,h.jsxs)(`svg`,{viewBox:`0 0 280 220`,className:`w-full h-auto overflow-visible select-none text-[11px]`,"aria-label":`Connections graph`,children:[(0,h.jsxs)(`defs`,{children:[(0,h.jsxs)(`linearGradient`,{id:`okf-grad-inbound`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,children:[(0,h.jsx)(`stop`,{offset:`0%`,stopColor:`#22d3ee`}),(0,h.jsx)(`stop`,{offset:`100%`,stopColor:`#8b5cf6`})]}),(0,h.jsxs)(`linearGradient`,{id:`okf-grad-outbound`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,children:[(0,h.jsx)(`stop`,{offset:`0%`,stopColor:`#8b5cf6`}),(0,h.jsx)(`stop`,{offset:`100%`,stopColor:`#22d3ee`})]}),(0,h.jsx)(`marker`,{id:`okf-arrow-in`,viewBox:`0 0 8 8`,refX:`6`,refY:`4`,markerWidth:`5`,markerHeight:`5`,orient:`auto`,children:(0,h.jsx)(`path`,{d:`M 0 1 L 6 4 L 0 7`,fill:`none`,stroke:`#8b5cf6`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,h.jsx)(`marker`,{id:`okf-arrow-out`,viewBox:`0 0 8 8`,refX:`6`,refY:`4`,markerWidth:`5`,markerHeight:`5`,orient:`auto`,children:(0,h.jsx)(`path`,{d:`M 0 1 L 6 4 L 0 7`,fill:`none`,stroke:`#22d3ee`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),o.map((e,t)=>{let n=f(t,o.length),r=`M 70 ${n} C 85 ${n}, 85 110, 100 110`;return(0,h.jsx)(Gd.path,{d:r,fill:`none`,stroke:`url(#okf-grad-inbound)`,strokeWidth:`1.5`,markerEnd:`url(#okf-arrow-in)`,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.4,delay:t*.04,ease:`easeOut`}},`edge-in-${o[t]}`)}),c.map((e,t)=>{let n=p(t,c.length),r=`M 180 110 C 195 110, 195 ${n}, 210 ${n}`;return(0,h.jsx)(Gd.path,{d:r,fill:`none`,stroke:`url(#okf-grad-outbound)`,strokeWidth:`1.5`,markerEnd:`url(#okf-arrow-out)`,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.4,delay:(o.length+t)*.04,ease:`easeOut`}},`edge-out-${e.id}`)}),(0,h.jsxs)(`g`,{className:`cursor-default`,children:[(0,h.jsx)(`rect`,{x:`100`,y:`98`,width:`80`,height:`24`,rx:`6`,className:`fill-surface stroke-accent-500/50 stroke-1.5`}),(0,h.jsx)(`text`,{x:`140`,y:`110`,textAnchor:`middle`,dominantBaseline:`central`,className:`fill-fg font-medium`,children:d}),(0,h.jsx)(`title`,{children:t})]}),o.map((t,n)=>{let r=f(n,o.length),i=t.split(`/`).pop()??t,s=i.length>qD?`${i.slice(0,13)}…`:i;return(0,h.jsxs)(`g`,{className:`cursor-pointer`,onClick:()=>a(QE(e,t)),children:[(0,h.jsx)(`rect`,{x:`2`,y:r-10,width:`68`,height:`20`,rx:`5`,className:`fill-surface stroke-border hover:stroke-accent-500 hover:fill-surface-2 transition-colors stroke-1`}),(0,h.jsx)(`text`,{x:`36`,y:r,textAnchor:`middle`,dominantBaseline:`central`,className:`fill-muted hover:fill-fg text-[10px] pointer-events-none`,children:s}),(0,h.jsx)(`title`,{children:t})]},`in-${t}`)}),s>0&&(0,h.jsxs)(`text`,{x:`36`,y:`212`,textAnchor:`middle`,className:`fill-subtle text-[10px] font-mono`,children:[`+`,s,` more`]}),c.map((t,n)=>{let r=p(n,c.length),i=t.id.split(`/`).pop()??t.id,o=i.length>qD?`${i.slice(0,13)}…`:i,s=t.exists!==!1;return(0,h.jsxs)(`g`,{className:s?`cursor-pointer`:`cursor-not-allowed`,onClick:()=>{s&&a(QE(e,t.id))},children:[(0,h.jsx)(`rect`,{x:`210`,y:r-10,width:`68`,height:`20`,rx:`5`,strokeDasharray:t.exists===!1?`3 2`:void 0,className:t.exists===!1?`fill-surface stroke-rose-500/80 stroke-1`:`fill-surface stroke-border hover:stroke-accent-500 hover:fill-surface-2 transition-colors stroke-1`}),(0,h.jsx)(`text`,{x:`244`,y:r,textAnchor:`middle`,dominantBaseline:`central`,className:t.exists===!1?`fill-rose-500 text-[10px] pointer-events-none`:`fill-muted hover:fill-fg text-[10px] pointer-events-none`,children:o}),(0,h.jsxs)(`title`,{children:[t.id,t.exists===!1?` (missing)`:``]})]},`out-${t.id}`)}),l>0&&(0,h.jsxs)(`text`,{x:`244`,y:`212`,textAnchor:`middle`,className:`fill-subtle text-[10px] font-mono`,children:[`+`,l,` more`]})]})]})}function YD(e,t){this.v=e,this.k=t}function XD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZD(e){if(Array.isArray(e))return e}function QD(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function $D(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
60
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eO(e,t){return ZD(e)||QD(e,t)||tO(e,t)||$D()}function tO(e,t){if(e){if(typeof e==`string`)return XD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XD(e,t):void 0}}function nO(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof YD;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}nO.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},nO.prototype.next=function(e){return this._invoke(`next`,e)},nO.prototype.throw=function(e){return this._invoke(`throw`,e)},nO.prototype.return=function(e){return this._invoke(`return`,e)};var rO=Object.entries,iO=Object.setPrototypeOf,aO=Object.isFrozen,oO=Object.getPrototypeOf,sO=Object.getOwnPropertyDescriptor,cO=Object.freeze,lO=Object.seal,uO=Object.create,dO=typeof Reflect<`u`&&Reflect,fO=dO.apply,pO=dO.construct;cO||=function(e){return e},lO||=function(e){return e},fO||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},pO||=function(e){return new e(...[...arguments].slice(1))};var mO=PO(Array.prototype.forEach);Array.prototype.indexOf;var hO=PO(Array.prototype.lastIndexOf),gO=PO(Array.prototype.pop),_O=PO(Array.prototype.push);Array.prototype.slice;var vO=PO(Array.prototype.splice),yO=Array.isArray,bO=PO(String.prototype.toLowerCase),xO=PO(String.prototype.toString),SO=PO(String.prototype.match),CO=PO(String.prototype.replace),wO=PO(String.prototype.indexOf),TO=PO(String.prototype.trim),EO=PO(Number.prototype.toString),DO=PO(Boolean.prototype.toString),OO=typeof BigInt>`u`?null:PO(BigInt.prototype.toString),kO=typeof Symbol>`u`?null:PO(Symbol.prototype.toString),AO=PO(Object.prototype.hasOwnProperty),jO=PO(Object.prototype.toString),MO=PO(RegExp.prototype.test),NO=FO(TypeError);function PO(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return fO(e,t,n)}}function FO(e){return function(){return pO(e,[...arguments])}}function IO(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bO;if(iO&&iO(e,null),!yO(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(aO(t)||(t[r]=e),i=e)}e[i]=!0}return e}function LO(e){for(let t=0;t<e.length;t++)AO(e,t)||(e[t]=null);return e}function RO(e){let t=uO(null);for(let r of rO(e)){var n=eO(r,2);let i=n[0],a=n[1];AO(e,i)&&(t[i]=yO(a)?LO(a):a&&typeof a==`object`&&a.constructor===Object?RO(a):a)}return t}function zO(e){switch(typeof e){case`string`:return e;case`number`:return EO(e);case`boolean`:return DO(e);case`bigint`:return OO?OO(e):`0`;case`symbol`:return kO?kO(e):`Symbol()`;case`undefined`:return jO(e);case`function`:case`object`:{if(e===null)return jO(e);let t=e,n=BO(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:jO(e)}return jO(e)}default:return jO(e)}}function BO(e,t){for(;e!==null;){let n=sO(e,t);if(n){if(n.get)return PO(n.get);if(typeof n.value==`function`)return PO(n.value)}e=oO(e)}function n(){return null}return n}function VO(e){try{return MO(e,``),!0}catch{return!1}}var HO=cO(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),UO=cO(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),WO=cO([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),GO=cO([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),KO=cO(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),qO=cO([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),JO=cO([`#text`]),YO=cO(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),XO=cO(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ZO=cO(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),QO=cO([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),$O=lO(/{{[\w\W]*|^[\w\W]*}}/g),ek=lO(/<%[\w\W]*|^[\w\W]*%>/g),tk=lO(/\${[\w\W]*/g),nk=lO(/^data-[\-\w.\u00B7-\uFFFF]+$/),rk=lO(/^aria-[\-\w]+$/),ik=lO(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ak=lO(/^(?:\w+script|data):/i),ok=lO(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sk=lO(/^html$/i),ck=lO(/^[a-z][.\w]*(-[.\w]+)+$/i),lk=lO(/<[/\w!]/g),uk=lO(/<[/\w]/g),dk=lO(/<\/no(script|embed|frames)/i),fk=lO(/\/>/i),pk={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},mk=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],hk=cO(IO({},mk)),gk=function(){let e={};return mO(mk,t=>{e[t]=lO(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),cO(e)}(),_k=function(){return typeof window>`u`?null:window},vk=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},yk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},bk=function(e,t,n,r){return AO(e,t)&&yO(e[t])?IO(r.base?RO(r.base):{},e[t],r.transform):n},xk=function(e,t,n){let r=AO(e,t)?e[t]:void 0;return r&&typeof r==`object`?RO(r):n()};function Sk(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_k(),t=e=>Sk(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==pk.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=BO(d,`cloneNode`),p=BO(d,`remove`),m=BO(d,`removeAttributeNode`),h=BO(d,`nextSibling`),g=BO(d,`childNodes`),_=BO(d,`parentNode`),v=BO(d,`shadowRoot`),y=BO(d,`attributes`),b=o&&o.prototype?BO(o.prototype,`nodeType`):null,x=o&&o.prototype?BO(o.prototype,`nodeName`):null,S=o&&o.prototype?BO(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,O=!1,k=0,ee=function(){if(k>0)throw NO(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},A=function(e){ee(),k++;try{return T.createHTML(e)}finally{k--}},te=function(e){ee(),k++;try{return T.createScriptURL(e)}finally{k--}},ne=function(){return O||=(D=vk(u,i),!0),D},re=n,ie=re.implementation,ae=re.createNodeIterator,oe=re.createDocumentFragment,se=re.getElementsByTagName,ce=r.importNode,j=yk();t.isSupported=typeof rO==`function`&&typeof _==`function`&&ie&&ie.createHTMLDocument!==void 0;let le=$O,ue=ek,de=tk,fe=nk,pe=rk,me=ak,he=ok,ge=ck,M=ik,N=null,_e=IO({},[...HO,...UO,...WO,...KO,...JO]),P=null,ve=IO({},[...YO,...XO,...ZO,...QO]),F=Object.seal(uO(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ye=null,be=null,xe=Object.seal(uO(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Se=!0,Ce=!0,we=!1,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!1,Ae=null,je=null,Me=!1,Ne=!1,Pe=!1,Fe=!1,Ie=!0,Le=!1,Re=`user-content-`,ze=!0,Be=!1,Ve={},He=null,Ue=IO({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),We=null,Ge=IO({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ke=null,qe=IO({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Je=`http://www.w3.org/1998/Math/MathML`,Ye=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=IO({},[Je,Ye,Xe],xO),tt=cO([`mi`,`mo`,`mn`,`ms`,`mtext`]),nt=IO({},tt),rt=cO([`annotation-xml`]),it=IO({},rt),at=IO({},[`title`,`style`,`font`,`a`,`script`]),ot=null,st=[`application/xhtml+xml`,`text/html`],ct=null,lt=null,ut=n.createElement(`form`),dt=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(lt&&lt===e)return;(!e||typeof e!=`object`)&&(e={}),e=RO(e),ot=st.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ct=ot===`application/xhtml+xml`?xO:bO,N=bk(e,`ALLOWED_TAGS`,_e,{transform:ct}),P=bk(e,`ALLOWED_ATTR`,ve,{transform:ct}),$e=bk(e,`ALLOWED_NAMESPACES`,et,{transform:xO}),Ke=bk(e,`ADD_URI_SAFE_ATTR`,qe,{transform:ct,base:qe}),We=bk(e,`ADD_DATA_URI_TAGS`,Ge,{transform:ct,base:Ge}),He=bk(e,`FORBID_CONTENTS`,Ue,{transform:ct}),ye=bk(e,`FORBID_TAGS`,RO({}),{transform:ct}),be=bk(e,`FORBID_ATTR`,RO({}),{transform:ct}),Ve=AO(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?RO(e.USE_PROFILES):e.USE_PROFILES:!1,Se=e.ALLOW_ARIA_ATTR!==!1,Ce=e.ALLOW_DATA_ATTR!==!1,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ee=e.SAFE_FOR_TEMPLATES||!1,De=e.SAFE_FOR_XML!==!1,Oe=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Ie=e.SANITIZE_DOM!==!1,Le=e.SANITIZE_NAMED_PROPS||!1,ze=e.KEEP_CONTENT!==!1,Be=e.IN_PLACE||!1,M=VO(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ik,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,nt=xk(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>IO({},tt)),it=xk(e,`HTML_INTEGRATION_POINTS`,()=>IO({},rt));let t=xk(e,`CUSTOM_ELEMENT_HANDLING`,()=>uO(null));if(F=uO(null),AO(t,`tagNameCheck`)&&dt(t.tagNameCheck)&&(F.tagNameCheck=t.tagNameCheck),AO(t,`attributeNameCheck`)&&dt(t.attributeNameCheck)&&(F.attributeNameCheck=t.attributeNameCheck),AO(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(F.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),lO(F),Ee&&(Ce=!1),Pe&&(Ne=!0),Ve&&(N=IO({},JO),P=uO(null),Ve.html===!0&&(IO(N,HO),IO(P,YO)),Ve.svg===!0&&(IO(N,UO),IO(P,XO),IO(P,QO)),Ve.svgFilters===!0&&(IO(N,WO),IO(P,XO),IO(P,QO)),Ve.mathMl===!0&&(IO(N,KO),IO(P,ZO),IO(P,QO))),xe.tagCheck=null,xe.attributeCheck=null,AO(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?xe.tagCheck=e.ADD_TAGS:yO(e.ADD_TAGS)&&(N===_e&&(N=RO(N)),IO(N,e.ADD_TAGS,ct))),AO(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?xe.attributeCheck=e.ADD_ATTR:yO(e.ADD_ATTR)&&(P===ve&&(P=RO(P)),IO(P,e.ADD_ATTR,ct))),AO(e,`ADD_FORBID_CONTENTS`)&&yO(e.ADD_FORBID_CONTENTS)&&(He===Ue&&(He=RO(He)),IO(He,e.ADD_FORBID_CONTENTS,ct)),ze&&(N[`#text`]=!0),Oe&&IO(N,[`html`,`head`,`body`]),N.table&&(IO(N,[`tbody`]),delete ye.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw NO(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw NO(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=A(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=A(``)));cO&&cO(e),lt=e},pt=IO({},[...UO,...WO,...GO]),mt=IO({},[...KO,...qO]),ht=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===Je?e===`svg`&&(n===`annotation-xml`||nt[n]):!!pt[e]},gt=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===Ye?e===`math`&&it[n]:!!mt[e]},_t=function(e,t,n){return t.namespaceURI===Ye&&!it[n]||t.namespaceURI===Je&&!nt[n]?!1:!mt[e]&&(at[e]||!pt[e])},vt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=bO(e.tagName),r=bO(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===Ye?ht(n,t,r):e.namespaceURI===Je?gt(n,t,r):e.namespaceURI===Xe?_t(n,t,r):!!(ot===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},yt=function(e){_O(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw NO(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},bt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},xt=function(e){wt(e);let t=g(e);if(t){let e=[];mO(t,t=>{_O(e,t)}),mO(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&bt(e,r,i)}},St=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}_O(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Ne||Pe)try{yt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Ct=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||P[ct(i)]||bt(e,r,i)}},wt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===pk.element&&Ct(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Tt=function(e,t){return De?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Et=function(e){if(!De)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===pk.processingInstruction||n===pk.comment&&MO(uk,e.data)){try{p(e)}catch{}continue}if(n===pk.element){let t=e,n=ct(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Tt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Dt=function(e){let t=null,r=null;if(Me)e=`<remove></remove>`+e;else{let t=SO(e,/^[\r\n\t ]+/);r=t&&t[0]}ot===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?A(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,ot)}catch{}if(!t||!t.documentElement){t=ie.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?se.call(t,Oe?`html`:`body`)[0]:Oe?t.documentElement:a},Ot=function(e){let t=S?S(e):e.ownerDocument;return ae.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},kt=function(e){return e=CO(e,le,` `),e=CO(e,ue,` `),e=CO(e,de,` `),e},At=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ae.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=kt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&mO(i,e=>{Mt(e.content)&&At(e.content)})},jt=function(e){let t=x?x(e):null;return typeof t!=`string`||ct(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===pk.documentFragment}catch{return!1}},Nt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Pt(e,n,r){e.length!==0&&mO(e,e=>{e.call(t,n,r,lt)})}let Ft=function(e,t){return!!(De&&e.hasChildNodes()&&!Nt(e.firstElementChild)&&MO(lk,e.textContent)&&MO(lk,e.innerHTML)||De&&e.namespaceURI===Xe&&hk[t]&&(Nt(e.firstElementChild)||typeof e.textContent==`string`&&MO(gk[t],e.textContent))||e.nodeType===pk.processingInstruction||De&&e.nodeType===pk.comment&&MO(uk,e.data))},It=function(e,t){return e instanceof RegExp?MO(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Lt=function(e,t,n){if(!ye[t]&&Ut(t)&&It(F.tagNameCheck,t))return!1;if(ze&&!He[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return yt(e),!0},Rt=function(e,t,n,r){return e.length===0?t:t===n||t===r?RO(t):t},zt=function(e,t){return e===t||_(e)!==null?!1:(Be&&wt(e),!0)},Bt=function(e,n){if(Pt(j.beforeSanitizeElements,e,null),zt(e,n))return!0;if(jt(e))return yt(e),!0;let r=ct(w(e));if(N=Rt(j.uponSanitizeElement,N,_e,Ae),Pt(j.uponSanitizeElement,e,{tagName:r,allowedTags:N}),zt(e,n))return!0;if(Ft(e,r))return yt(e),!0;if(ye[r]||!(xe.tagCheck instanceof Function&&xe.tagCheck(r))&&!N[r]){let t=Lt(e,r,n);return t===!1&&(Pt(j.afterSanitizeElements,e,null),zt(e,n))?!0:t}if(C(e)===pk.element&&!vt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&MO(dk,e.innerHTML))return yt(e),!0;if(Ee&&e.nodeType===pk.text){let n=kt(e.textContent);e.textContent!==n&&(_O(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Pt(j.afterSanitizeElements,e,null),zt(e,n)},Vt=function(e,t,r){if(be[t]||Tt(t,e)||Ie&&(t===`id`||t===`name`)&&(r in n||r in ut))return!1;let i=P[t]||xe.attributeCheck instanceof Function&&xe.attributeCheck(t,e);return Ce&&MO(fe,t)||Se&&MO(pe,t)?!0:i?Ke[t]||MO(M,CO(r,he,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&wO(r,`data:`)===0&&We[e]||we&&!MO(me,CO(r,he,``))?!0:!r:Ut(e)&&It(F.tagNameCheck,e)&&It(F.attributeNameCheck,t,e)||t===`is`&&F.allowCustomizedBuiltInElements&&It(F.tagNameCheck,r)},Ht=IO({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ut=function(e){return!Ht[bO(e)]&&MO(ge,e)},Wt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return A(r);case`TrustedScriptURL`:return te(r)}return r},Gt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!jt(e)||(yt(e),!1)}catch{return St(t,e),!1}},Kt=function(e,n){if(Pt(j.beforeSanitizeAttributes,e,null),zt(e,n))return;let r=e.attributes;if(!r||jt(e))return;P=Rt(j.uponSanitizeAttribute,P,ve,je);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:P,forceKeepAttr:void 0},a=r.length,o=ct(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=ct(s),d=l,f=s===`value`?d:TO(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Pt(j.uponSanitizeAttribute,e,i),f=i.attrValue,Le&&(u===`id`||u===`name`)&&wO(f,Re)!==0&&(St(s,e,n),f=Re+f,p=!0),De&&MO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){St(s,e,n);continue}if(u===`attributename`&&SO(f,`href`)){St(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){St(s,e,n);continue}if(!Te&&MO(fk,f)){St(s,e,n);continue}if(Ee&&(f=kt(f)),!Vt(o,u,f)){St(s,e,n);continue}f=Wt(o,u,c,f),f!==d&&Gt(e,s,c,f)&&p&&gO(t.removed)}}Pt(j.afterSanitizeAttributes,e,null),zt(e,n)},I=function(e){let t=null,n=Ot(e);for(Pt(j.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Pt(j.uponSanitizeShadowNode,t,null),Bt(t,e),Kt(t,e),Mt(t.content)&&I(t.content),C(t)===pk.element){let e=v(t);Mt(e)&&(qt(e),I(e))}Pt(j.afterSanitizeShadowDOM,e,null)},qt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){I(e.shadow);continue}let n=e.node,r=C(n)===pk.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&ct(e)===`template`){let e=n.content;Mt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Mt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!Nt(e)&&(e=zO(e),typeof e!=`string`))throw NO(`dirty is not a string, aborting`);if(!t.isSupported)return e;ke?(N=Ae,P=je):ft(n),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(N=RO(N)),j.uponSanitizeAttribute.length>0&&(P=RO(P)),t.removed=[];let c=Be&&typeof e!=`string`&&Nt(e);if(c){Et(e);let t=w(e);if(typeof t==`string`){let n=ct(t);if(!N[n]||ye[n])throw xt(e),NO(`root node is forbidden and cannot be sanitized in-place`)}if(jt(e))throw xt(e),NO(`root node is clobbered and cannot be sanitized in-place`);try{qt(e)}catch(t){throw xt(e),t}}else if(Nt(e))i=Dt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===pk.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),qt(i);else{if(!Ne&&!Ee&&!Oe&&e.indexOf(`<`)===-1)return T&&Fe?A(e):e;if(i=Dt(e),!i)return Ne?null:Fe?E:``}i&&Me&&yt(i.firstChild);let l=c?e:i;try{let e=Ot(l);for(;o=e.nextNode();)Bt(o,l),Kt(o,l),Mt(o.content)&&I(o.content)}catch(n){throw c&&(xt(e),mO(t.removed,e=>{e.element&&wt(e.element)})),n}if(c){let n=!1;if(mO(t.removed,t=>{t.element&&(t.element===e&&(n=!0),wt(t.element))}),n)throw NO(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Ee&&At(e),e}if(Ne){if(Ee&&At(i),Pe)for(s=oe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(P.shadowroot||P.shadowrootmode)&&(s=ce.call(r,s,!0)),s}let u=Oe?i.outerHTML:i.innerHTML;return Oe&&N[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&MO(sk,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
61
+ `+u),Ee&&(u=kt(u)),T&&Fe?A(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(e),ke=!0,Ae=N,je=P},t.clearConfig=function(){lt=null,ke=!1,Ae=null,je=null,T=D,E=``},t.isValidAttribute=function(e,t,n){lt||ft({});let r=ct(e),i=ct(t);return Vt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&AO(j,e)&&_O(j[e],t)},t.removeHook=function(e,t){if(AO(j,e)){if(t!==void 0){let n=hO(j[e],t);return n===-1?void 0:vO(j[e],n,1)[0]}return gO(j[e])}},t.removeHooks=function(e){AO(j,e)&&(j[e]=[])},t.removeAllHooks=function(){j=yk()},t}var Ck=Sk();function wk(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tk=wk();function Ek(e){Tk=e}var Dk={exec:()=>null};function Ok(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function $(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Ak.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var kk=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Ak={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ok(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ok(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ok(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ok(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ok(e=>RegExp(`^ {0,${e}}(?:</?(?:${Gk})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:Ok(e=>RegExp(`^ {0,${e}}>`))},jk=/^(?:[ \t]*(?:\n|$))+/,Mk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pk=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ik=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Lk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rk=$(Lk).replace(/bull/g,Ik).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),zk=$(Lk).replace(/bull/g,Ik).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bk=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Vk=/^[^\n]+/,Hk=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Uk=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Hk).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Wk=$(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ik).getRegex(),Gk=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Kk=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qk=$(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Kk).replace(`tag`,Gk).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jk=e=>$(Bk).replace(`hr`,Pk).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Gk).getRegex(),Yk=Jk(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Xk=Jk(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Zk={blockquote:$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Xk).getRegex(),code:Mk,def:Uk,fences:Nk,heading:Fk,hr:Pk,html:qk,lheading:Rk,list:Wk,newline:jk,paragraph:Yk,table:Dk,text:Vk},Qk=$(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Pk).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Gk).getRegex(),$k={...Zk,lheading:zk,table:Qk,paragraph:$(Bk).replace(`hr`,Pk).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Qk).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Gk).getRegex()},eA={...Zk,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Kk).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Dk,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(Bk).replace(`hr`,Pk).replace(`heading`,` *#{1,6} *[^
62
+ ]`).replace(`lheading`,Rk).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},tA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rA=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,iA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,aA=/[\p{P}\p{S}]/u,oA=/[\s\p{P}\p{S}]/u,sA=/[^\s\p{P}\p{S}]/u,cA=$(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,oA).getRegex(),lA=/[\p{Pi}\p{Ps}"']/u,uA=/(?!~)[\p{P}\p{S}]/u,dA=/(?!~)[\s\p{P}\p{S}]/u,fA=/(?:[^\s\p{P}\p{S}]|~)/u,pA=$(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,kk?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),mA=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,hA=$(mA,`u`).replace(/punct/g,aA).getRegex(),gA=$(mA,`u`).replace(/punct/g,uA).getRegex(),_A=$(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,lA).replace(/punct/g,aA).getRegex(),vA=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,yA=$(vA,`gu`).replace(/notPunctSpace/g,sA).replace(/punctSpace/g,oA).replace(/punct/g,aA).getRegex(),bA=$(vA,`gu`).replace(/notPunctSpace/g,fA).replace(/punctSpace/g,dA).replace(/punct/g,uA).getRegex(),xA=$(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,sA).replace(/punctSpace/g,oA).replace(/punct/g,aA).getRegex(),SA=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,sA).replace(/punctSpace/g,oA).replace(/punct/g,aA).getRegex(),CA=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,sA).replace(/punctSpace/g,oA).replace(/punct/g,aA).getRegex(),wA=$(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,aA).getRegex(),TA=$(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,sA).replace(/punctSpace/g,oA).replace(/punct/g,aA).getRegex(),EA=$(/\\(punct)/,`gu`).replace(/punct/g,aA).getRegex(),DA=$(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),OA=$(Kk).replace(`(?:-->|$)`,`-->`).getRegex(),kA=$(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,OA).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),AA=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,jA=$(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,AA).getRegex(),MA=$(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,jA).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),NA=$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,jA).replace(`ref`,Hk).getRegex(),PA=$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Hk).getRegex(),FA=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,IA=$(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,AA).getRegex(),LA=$(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,IA).replace(`ref`,FA).getRegex()).replace(`nolink`,$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,FA).getRegex()).getRegex(),RA=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,zA=$(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),BA={_backpedal:Dk,anyPunctuation:EA,autolink:DA,blockSkip:pA,br:rA,code:nA,del:Dk,delLDelim:Dk,delRDelim:Dk,emStrongLDelim:hA,emStrongRDelimAst:yA,emStrongRDelimUnd:SA,escape:tA,link:MA,nolink:PA,punctuation:cA,reflink:NA,reflinkSearch:LA,tag:kA,text:iA,url:Dk},VA={...BA,emStrongLDelim:_A,emStrongRDelimAst:xA,emStrongRDelimUnd:CA,link:$(/^!?\[(label)\]\((.*?)\)/).replace(`label`,jA).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,jA).getRegex()},HA={...BA,emStrongRDelimAst:bA,emStrongLDelim:gA,delLDelim:wA,delRDelim:TA,url:$(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,zA).replace(`protocol`,RA).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,RA).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},UA={...HA,br:$(rA).replace(`{2,}`,`*`).getRegex(),text:$(HA.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},WA={normal:Zk,gfm:$k,pedantic:eA},GA={normal:BA,gfm:HA,breaks:UA,pedantic:VA},KA={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},qA=e=>KA[e];function JA(e,t){if(t){if(Ak.escapeTest.test(e))return e.replace(Ak.escapeReplace,qA)}else if(Ak.escapeTestNoEncode.test(e))return e.replace(Ak.escapeReplaceNoEncode,qA);return e}function YA(e){return e.replace(Ak.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function XA(e){try{e=encodeURI(e).replace(Ak.percentDecode,`%`)}catch{return null}return e}function ZA(e,t){let n=e.replace(Ak.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Ak.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Ak.slashPipe,`|`);return n}function QA(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function $A(e){let t=e.split(`
63
+ `),n=t.length-1;for(;n>=0&&Ak.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
64
+ `)}function ej(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function tj(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function nj(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function rj(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function ij(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
65
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
66
+ `)}function aj(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var oj=class{options;rules;lexer;constructor(e){this.options=e||Tk}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:$A(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=ij(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=QA(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:QA(t[0],`
67
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:QA(t[0],`
68
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=QA(t[0],`
69
+ `).split(`
70
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
71
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
72
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
73
+ ${s}`:s,r=r?`${r}
74
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
75
+ `),o=t.raw+`
76
+ `+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
77
+ `).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
78
+ ${d.join(`
79
+ `)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
80
+ `+e.join(`
81
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
82
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
83
+ `,1)[0],l=t[1].length,u=this.options.pedantic?nj(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>nj(e,l)),d=e.split(`
84
+ `,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
85
+ `,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
86
+ `,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
87
+ `+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
88
+ `+d}f=!d.trim(),r+=l+`
89
+ `,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=$A(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&tj(t[2],`()`)!==-1)return;let e=ej(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:QA(t[0],`
90
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ZA(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
91
+ `):[],a={type:`table`,raw:QA(t[0],`
92
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(ZA(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:QA(t[0],`
93
+ `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
94
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&aj(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=QA(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=tj(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),rj(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&aj(e,n[1],r,this.rules))return;let i=t[ej((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return rj(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:YA(t[0]),escaped:e}}}},sj=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Tk,this.options.tokenizer=this.options.tokenizer||new oj,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Ak,block:WA.normal,inline:GA.normal};this.options.pedantic?(t.block=WA.pedantic,t.inline=GA.pedantic):this.options.gfm&&(t.block=WA.gfm,t.inline=this.options.breaks?GA.breaks:GA.gfm),this.tokenizer.rules=t}static get rules(){return{block:WA,inline:GA}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Ak.carriageReturn,`
95
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Ak.tabCharGlobal,` `).replace(Ak.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
96
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
97
+ `)?``:`
98
+ `)+i.raw,n.text+=`
99
+ `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
100
+ `)?``:`
101
+ `)+i.raw,n.text+=`
102
+ `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
103
+ `)?``:`
104
+ `)+i.raw,r.text+=`
105
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
106
+ `)?``:`
107
+ `)+i.raw,n.text+=`
108
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,ej(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,ej(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},cj=class{options;parser;constructor(e){this.options=e||Tk}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Ak.notSpaceStart)?.[0],i=e?e.replace(Ak.endingNewline,``)+`
109
+ `:``;return r?`<pre><code class="language-`+JA(r)+`">`+(n?i:JA(i,!0))+`</code></pre>
110
+ `:`<pre><code>`+(n?i:JA(i,!0))+`</code></pre>
111
+ `}blockquote({tokens:e}){return`<blockquote>
112
+ ${this.parser.parse(e)}</blockquote>
113
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
114
+ `}hr(e){return`<hr>
115
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
116
+ `+r+`</`+i+`>
117
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
118
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
119
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
120
+ <thead>
121
+ `+t+`</thead>
122
+ `+r+`</table>
123
+ `}tablerow({text:e}){return`<tr>
124
+ ${e}</tr>
125
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
126
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${JA(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?JA(n,!0):this.parser.parseInline(r),o=XA(e);if(o===null)return a;e=JA(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+JA(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=XA(e);if(i===null)return JA(n);e=i;let a=`<img src="${JA(e)}" alt="${JA(n)}"`;return t&&(a+=` title="${JA(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:JA(e.text)}},lj=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},uj=class e{options;renderer;textRenderer;constructor(e){this.options=e||Tk,this.options.renderer=this.options.renderer||new cj,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new lj}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},dj=class{options;block;constructor(e){this.options=e||Tk}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?sj.lex:sj.lexInline}provideParser(e=this.block){return e?uj.parse:uj.parseInline}},fj=class{defaults=wk();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=uj;Renderer=cj;TextRenderer=lj;Lexer=sj;Tokenizer=oj;Hooks=dj;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new cj(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new oj(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new dj;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=dj.passThroughHooks.has(n)?e=>{if(this.defaults.async&&dj.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return sj.lex(e,t??this.defaults)}parser(e,t){return uj.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?sj.lex:sj.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?uj.parse:uj.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?sj.lex:sj.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?uj.parse:uj.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
127
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+JA(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},pj=new fj;function mj(e,t){return pj.parse(e,t)}mj.options=mj.setOptions=function(e){return pj.setOptions(e),mj.defaults=pj.defaults,Ek(mj.defaults),mj},mj.getDefaults=wk,mj.defaults=Tk;function hj(...e){return pj.use(...e),mj.defaults=pj.defaults,Ek(mj.defaults),mj}mj.use=hj,mj.walkTokens=function(e,t){return pj.walkTokens(e,t)},mj.parseInline=pj.parseInline,mj.Parser=uj,mj.parser=uj.parse,mj.Renderer=cj,mj.TextRenderer=lj,mj.Lexer=sj,mj.lexer=sj.lex,mj.Tokenizer=oj,mj.Hooks=dj,mj.parse=mj,mj.options,mj.setOptions,mj.walkTokens,mj.parseInline,uj.parse,sj.lex;function gj(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function _j(e){if(!e||e.length===0)return``;let t=``;for(let n of e)`tokens`in n&&Array.isArray(n.tokens)?t+=_j(n.tokens):`text`in n&&typeof n.text==`string`&&(t+=n.text);return t}function vj(e,t){let n=[],r=[],i=new Set,a=new Map,o=new fj({gfm:!0});o.use({extensions:[{name:`citation`,level:`inline`,start(e){return e.indexOf(`[^`)},tokenizer(e){let t=/^\[\^([^\]\s]+)\](?!:)/.exec(e);if(t?.[1])return{type:`citation`,raw:t[0],label:t[1]}},renderer(e){if(!(`label`in e)||typeof e.label!=`string`)return``;let n=e.label,i=t.sources.find(e=>e.id===n||e.id.toLowerCase()===n.toLowerCase()),o=i?i.id:n,s=r.indexOf(o)+1;if(s===0&&(r.push(o),s=r.length),i)return`<sup class="okf-cite"><a href="#source-${encodeURIComponent(i.id)}" data-okf-cite="${gj(i.id)}">${s}</a></sup>`;let c=a.get(n.toLowerCase());return c?.href?`<sup class="okf-cite"><a href="${gj(c.href)}" target="_blank" rel="noopener noreferrer">${s}</a></sup>`:`<sup class="okf-cite"><span class="okf-cite-missing" title="Unknown source">${s}</span></sup>`}}],renderer:{heading(e){let t=e.depth,r=_j(e.tokens).trim(),a=r.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`heading`,o=a,s=1;for(;i.has(o);)s++,o=`${a}-${s}`;i.add(o),(t===2||t===3)&&n.push({id:o,text:r,depth:t});let c=this.parser.parseInline(e.tokens);return`<h${t} id="${o}"><a class="okf-anchor" href="#${o}" aria-hidden="true">#</a>${c}</h${t}>\n`},code(e){return`<pre class="okf-code" data-lang="${gj((e.lang||``).match(/^\S*/)?.[0]??``)}"><code>${gj(e.text)}</code></pre>\n`},link(e){let n=e.href,r=e.title?` title="${gj(e.title)}"`:``,i=this.parser.parseInline(e.tokens),a=ZE(n,t.conceptId);if(a.kind===`concept`){let e=t.outbound.find(e=>e.id===a.id),n=!e||e.exists,o=gj(`/ui${QE(t.project,a.id)}${a.hash}`),s=gj(a.id);return n?`<a href="${o}" data-okf-internal data-okf-concept="${s}"${r}>${i}</a>`:`<a href="${o}" data-okf-internal data-okf-concept="${s}" class="okf-broken" title="Missing concept">${i}</a>`}return a.kind===`file`?`<a href="${gj(`/ui${$E(t.project,a.path)}${a.hash}`)}" data-okf-internal${r}>${i}</a>`:a.kind===`anchor`?`<a href="${gj(n)}"${r}>${i}</a>`:a.kind===`external`?`<a href="${gj(n)}" target="_blank" rel="noopener noreferrer" class="okf-external"${r}>${i}</a>`:`<span class="okf-broken" title="Broken link">${i}</span>`},image(e){let t=e.href,n=gj(e.text),r=e.title?` title="${gj(e.title)}"`:``;return t.startsWith(`http://`)||t.startsWith(`https://`)||t.startsWith(`//`)||t.startsWith(`data:`)?`<img src="${gj(t)}" alt="${n}"${r}>`:`<span class="okf-image-missing">${n}</span>`}}});let s=o.lexer(e);if(s.links)for(let[e,t]of Object.entries(s.links))e.startsWith(`^`)&&t&&typeof t.href==`string`&&a.set(e.slice(1).toLowerCase(),{href:t.href,title:typeof t.title==`string`?t.title:void 0});for(let e=0;e<s.length;e++){let n=s[e];if(!(n&&n.type===`space`)){n&&n.type===`heading`&&n.depth===1&&(`text`in n&&typeof n.text==`string`?n.text.trim():``).toLowerCase()===t.title.trim().toLowerCase()&&s.splice(e,1);break}}return{html:Ck.sanitize(o.parser(s),{ADD_ATTR:[`target`],FORBID_TAGS:[`style`,`form`,`input`,`button`,`iframe`,`object`,`embed`],FORBID_ATTR:[`style`]}),headings:n,citations:r}}var yj=/^github\.com\/([^/]+)\/([^/]+)\/(.+)$/,bj=/^gitlab\.com\/([^/]+)\/([^/]+)\/(.+)$/,xj=/^(github|gitlab)\.com\/[^/]+\/[^/]+$/,Sj=/^https?:\/\//,Cj={type:!0,title:!0,description:!0,tags:!0,status:!0,generated:!0,verified:!0,sources:!0,stale_after:!0};function wj(e){if(!e||typeof e!=`object`)return[];let t=e.sources;if(!Array.isArray(t))return[];let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(!r||typeof r!=`object`||!(`resource`in r)||typeof r.resource!=`string`)continue;let i=r.resource.trim();if(i.length===0)continue;let a=`id`in r&&typeof r.id==`string`&&r.id.trim().length>0?r.id.trim():`source-${e+1}`,o=`commit`in r&&typeof r.commit==`string`&&r.commit.trim().length>0?r.commit.trim():void 0,s=null,c=i;if(Sj.test(i))s=i;else{let e=yj.exec(i);if(e?.[1]&&e[2]&&e[3])s=`https://github.com/${e[1]}/${e[2]}/blob/${o??`HEAD`}/${e[3]}`,c=e[3];else{let e=bj.exec(i);e?.[1]&&e[2]&&e[3]?(s=`https://gitlab.com/${e[1]}/${e[2]}/-/blob/${o??`HEAD`}/${e[3]}`,c=e[3]):xj.test(i)&&(s=`https://${i}`)}}n.push({id:a,resource:i,...o===void 0?{}:{commit:o},url:s,label:c})}return n}function Tj(e){if(!e||typeof e!=`object`)return[];let t=e.verified;if(t==null)return[];let n=Array.isArray(t)?t:[t],r=[];for(let e of n)if(e&&typeof e==`object`&&`by`in e&&typeof e.by==`string`&&e.by.length>0){let t=`at`in e&&typeof e.at==`string`?e.at:void 0;r.push(t===void 0?{by:e.by}:{by:e.by,at:t})}return r}function Ej(e){return!e||typeof e!=`object`?[]:Object.entries(e).filter(([e])=>!(e in Cj))}function Dj({concept:e,conceptId:t,targetRect:n,onMouseEnter:r,onMouseLeave:i}){let a=n.bottom+6,o=Math.max(12,Math.min(n.left,window.innerWidth-332));return(0,h.jsx)(`div`,{role:`tooltip`,style:{top:a,left:o},onMouseEnter:r,onMouseLeave:i,className:`fixed z-50 w-80 max-w-[calc(100vw-24px)] rounded-xl border border-border-strong bg-surface/95 p-3.5 shadow-xl backdrop-blur-md transition-all duration-150`,children:e?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,h.jsx)(lD,{type:e.derived?.type??null,className:`mt-0.5 shrink-0`,size:16}),(0,h.jsx)(`div`,{className:`min-w-0 flex-1 font-medium text-sm text-fg line-clamp-2 leading-snug`,children:e.derived?.title??e.id})]}),e.derived?.description&&(0,h.jsx)(`p`,{className:`mt-1.5 text-xs text-muted line-clamp-2 leading-relaxed`,children:e.derived.description}),(0,h.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-1.5 pt-1.5 border-t border-border/50`,children:[e.derived?.status&&(0,h.jsx)(HD,{status:e.derived.status}),e.derived?.trustTier&&(0,h.jsx)(UD,{tier:e.derived.trustTier}),e.derived?.stale&&(0,h.jsx)(WD,{})]})]}):(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(`div`,{className:`font-mono text-xs text-muted truncate`,children:t}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(Q,{className:`h-4 w-4 rounded-full`}),(0,h.jsx)(Q,{className:`h-4 w-40 rounded-sm`})]}),(0,h.jsx)(Q,{className:`h-3 w-full rounded-sm`}),(0,h.jsx)(Q,{className:`h-3 w-3/4 rounded-sm`}),(0,h.jsxs)(`div`,{className:`flex gap-1 pt-1`,children:[(0,h.jsx)(Q,{className:`h-4 w-12 rounded-full`}),(0,h.jsx)(Q,{className:`h-4 w-16 rounded-full`})]})]})})}function Oj({project:e,concept:t,onHeadings:n,onCitations:r,className:i}){let a=kh(),o=(0,m.useRef)(null),[s,c]=(0,m.useState)(null),l=(0,m.useRef)(void 0),u=(0,m.useRef)(!1),d=(0,m.useMemo)(()=>vj(t.body,{project:e,conceptId:t.id,title:t.derived?.title??t.id,sources:wj(t.frontmatter),outbound:t.links.outbound}),[t,e]);return(0,m.useEffect)(()=>{n?.(d.headings),r?.(d.citations)},[d,n,r]),(0,m.useEffect)(()=>{let e=o.current;if(!e)return;let t=!1;return(async()=>{let n=Array.from(e.querySelectorAll(`pre.okf-code`));if(n.length===0)return;let{highlight:r}=await Ag(async()=>{let{highlight:e}=await import(`./highlight-CW19vWvw.js`);return{highlight:e}},[]);if(!t)for(let e of n){if(t)break;if(e.getAttribute(`data-okf-processed`)===`true`)continue;e.setAttribute(`data-okf-processed`,`true`);let n=e.getAttribute(`data-lang`)??``,i=e.querySelector(`code`)?.textContent??e.textContent??``,a=null;if(n)try{a=await r(i,n)}catch{}if(t)break;let o=document.createElement(`div`);if(o.className=`relative group not-prose my-4`,a){o.innerHTML=a;let e=o.querySelector(`pre`);e&&e.classList.add(`overflow-x-auto`)}else{let t=e.cloneNode(!0);o.appendChild(t)}let s=document.createElement(`button`);s.type=`button`,s.setAttribute(`aria-label`,`Copy code`),s.title=`Copy code`,s.className=`absolute top-2.5 right-2.5 z-10 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity inline-flex items-center gap-1 rounded-md border border-border bg-surface/80 px-2 py-1 text-xs font-medium text-muted backdrop-blur-xs hover:bg-surface-2 hover:text-fg focus-visible:outline-2 outline-accent-500 cursor-pointer select-none`,s.innerHTML=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,s.addEventListener(`click`,async e=>{e.stopPropagation();try{await navigator.clipboard.writeText(i),s.innerHTML=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-emerald-500 shrink-0"><polyline points="20 6 9 17 4 12"/></svg>`,setTimeout(()=>{s.innerHTML=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="shrink-0"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`},1500)}catch{}}),o.appendChild(s),e.parentNode?.replaceChild(o,e)}})(),()=>{t=!0}},[d.html]),(0,m.useEffect)(()=>{let e=()=>{clearTimeout(l.current),c(null)};return window.addEventListener(`scroll`,e,{passive:!0}),()=>{window.removeEventListener(`scroll`,e),clearTimeout(l.current)}},[]),(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(`div`,{ref:o,onClick:e=>{let t=e.target;if(!t)return;let n=t.closest(`a[data-okf-cite]`);if(n){e.preventDefault();let t=n.getAttribute(`data-okf-cite`);if(t){let e=document.getElementById(`source-${t}`);e&&(e.scrollIntoView({behavior:`smooth`}),e.classList.remove(`okf-flash`),e.offsetWidth,e.classList.add(`okf-flash`),setTimeout(()=>{e.classList.remove(`okf-flash`)},1600))}return}let r=t.closest(`a[data-okf-internal]`);if(r){if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)return;e.preventDefault();let t=r.getAttribute(`href`);if(t){let e=t;e.startsWith(`/ui`)&&(e=e.slice(3)||`/`),a(e)}}},onMouseOver:t=>{let n=t.target;if(!n)return;let r=n.closest(`a[data-okf-concept]`);if(!r)return;let i=r.getAttribute(`data-okf-concept`);i&&s?.targetEl!==r&&(clearTimeout(l.current),l.current=window.setTimeout(async()=>{let t=r.getBoundingClientRect();try{let n=await T_.fetchQuery({queryKey:E_.concept(e,i),queryFn:()=>v_(e,i)});c({conceptId:i,concept:n,rect:t,targetEl:r})}catch{}},250))},onMouseOut:e=>{let t=e.target;if(!t)return;let n=t.closest(`a[data-okf-concept]`);n&&(clearTimeout(l.current),setTimeout(()=>{u.current||c(e=>e?.targetEl===n?null:e)},100))},className:X(`prose prose-zinc dark:prose-invert max-w-3xl`,i),dangerouslySetInnerHTML:{__html:d.html}}),s&&(0,h.jsx)(Dj,{concept:s.concept,conceptId:s.conceptId,targetRect:s.rect,onMouseEnter:()=>{u.current=!0},onMouseLeave:()=>{u.current=!1,c(null)}})]})}function kj({headings:e,className:t}){let[n,r]=(0,m.useState)(e[0]?.id??``);if((0,m.useEffect)(()=>{if(e.length<3)return;let t=e.map(e=>document.getElementById(e.id)).filter(e=>e!==null);if(t.length===0)return;let n=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&r(t.target.id)},{rootMargin:`0px 0px -70% 0px`,threshold:[0,1]});for(let e of t)n.observe(e);return()=>{n.disconnect()}},[e]),e.length<3)return null;let i=(e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),r(t),window.history.replaceState(null,``,`#${t}`))};return(0,h.jsxs)(`nav`,{"aria-label":`Table of contents`,className:X(`space-y-2`,t),children:[(0,h.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wider text-muted`,children:`On this page`}),(0,h.jsx)(`ul`,{className:`space-y-1 border-l border-border text-xs`,children:e.map(e=>{let t=n===e.id;return(0,h.jsx)(`li`,{className:e.depth===3?`pl-5`:`pl-3`,children:(0,h.jsx)(`a`,{href:`#${e.id}`,onClick:t=>i(t,e.id),className:X(`block py-0.5 transition-colors line-clamp-1`,t?`-ml-px border-l-2 border-accent-500 pl-1 font-medium text-accent-500`:`text-muted hover:text-fg`),children:e.text})},e.id)})})]})}function Aj(){let e=Nh(),t=e.project??``,n=e[`*`]??``,{data:r,isLoading:i,error:a,refetch:o}=A_(t,n),{data:s}=M_(t,{id:n,limit:10}),[c,l]=(0,m.useState)([]),[u,d]=(0,m.useState)([]),[f,p]=(0,m.useState)(!1);(0,m.useEffect)(()=>{r&&iD({project:t,id:r.id,title:r.derived?.title??r.id,type:r.derived?.type??null})},[r,t]);let g=(0,m.useMemo)(()=>{if(!r)return[];let e=wj(r.frontmatter),t=new Map;for(let n of e)t.set(n.id,n);let n=[],i=new Set;for(let e of u){let r=t.get(e);r&&!i.has(r.id)&&(n.push(r),i.add(r.id))}for(let t of e)i.has(t.id)||(n.push(t),i.add(t.id));return n},[r,u]),_=r?.derived?.title??(n||`Concept`);if(i)return(0,h.jsxs)(oS,{title:_,className:`max-w-7xl mx-auto px-4 sm:px-6 py-6 space-y-6`,children:[(0,h.jsxs)(`div`,{className:`space-y-3 border-b border-border pb-6`,children:[(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsx)(Q,{className:`h-5 w-20 rounded-full`}),(0,h.jsx)(Q,{className:`h-5 w-16 rounded-full`})]}),(0,h.jsx)(Q,{className:`h-9 w-96 rounded-md`}),(0,h.jsx)(Q,{className:`h-5 w-full max-w-xl rounded-md`})]}),(0,h.jsxs)(`div`,{className:`flex flex-col xl:flex-row gap-8`,children:[(0,h.jsxs)(`div`,{className:`flex-1 space-y-4`,children:[(0,h.jsx)(Q,{className:`h-32 w-full rounded-xl`}),(0,h.jsx)(Q,{className:`h-48 w-full rounded-xl`})]}),(0,h.jsxs)(`div`,{className:`w-full xl:w-72 space-y-4`,children:[(0,h.jsx)(Q,{className:`h-40 w-full rounded-xl`}),(0,h.jsx)(Q,{className:`h-40 w-full rounded-xl`})]})]})]});if(a)return(0,h.jsx)(oS,{title:_,className:`max-w-7xl mx-auto px-4 sm:px-6 py-6`,children:(0,h.jsx)(rS,{error:a,onRetry:o,fullScreen:!0})});if(!r)return(0,h.jsx)(oS,{title:_,className:`max-w-7xl mx-auto px-4 sm:px-6 py-6`,children:(0,h.jsx)(nS,{title:`Concept not found`,hint:`Could not find concept "${n}" in project "${t}".`})});let v=r.derived?.status?.toLowerCase()===`deprecated`,y=Tj(r.frontmatter),b=Ej(r.frontmatter);return(0,h.jsxs)(oS,{title:`${_} · ${t}`,className:`max-w-7xl mx-auto px-4 sm:px-6 py-6`,children:[(0,h.jsxs)(`header`,{className:`space-y-4 border-b border-border pb-6`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(GD,{type:r.derived?.type??null}),r.derived?.status&&(0,h.jsx)(HD,{status:r.derived.status}),r.derived?.trustTier&&(0,h.jsx)(UD,{tier:r.derived.trustTier}),r.derived?.stale&&(0,h.jsx)(WD,{})]}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h1`,{className:X(`text-3xl font-semibold tracking-tight text-fg`,v&&`line-through opacity-70`),children:r.derived?.title??r.id}),r.derived?.description&&(0,h.jsx)(`p`,{className:`mt-2 text-lg text-muted leading-relaxed`,children:r.derived.description})]}),r.derived?.tags&&r.derived.tags.length>0&&(0,h.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5 pt-1`,children:r.derived.tags.map(e=>(0,h.jsxs)($g,{to:`/search?project=${encodeURIComponent(t)}&tag=${encodeURIComponent(e)}`,className:`inline-flex items-center rounded-md bg-surface-2 px-2 py-0.5 text-xs font-medium text-muted hover:text-fg hover:bg-border transition-colors`,children:[`#`,e]},e))}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-2`,children:[(0,h.jsx)(cS,{value:typeof window<`u`?window.location.href:``,label:`Copy link`}),(0,h.jsx)(cS,{value:r.id,label:`Copy ID`}),(0,h.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),"aria-label":`Toggle markdown source`,className:X(`inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:outline-2 outline-accent-500 cursor-pointer`,f?`bg-accent-500/10 text-accent-500 border-accent-500/30`:`bg-surface text-muted hover:bg-surface-2 hover:text-fg`),children:[(0,h.jsx)(Gb,{size:14,className:`shrink-0`}),(0,h.jsx)(`span`,{children:`Source`})]})]})]}),(0,h.jsxs)(`div`,{className:`mt-8 flex flex-col xl:flex-row xl:items-start gap-8`,children:[(0,h.jsx)(`div`,{className:`min-w-0 flex-1`,children:f?(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:`Raw Markdown`}),(0,h.jsx)(cS,{value:r.markdown,label:`Copy markdown`})]}),(0,h.jsx)(KD,{code:r.markdown,lang:`markdown`,lineNumbers:!0,className:`rounded-xl border border-border bg-surface-2 shadow-xs`})]}):(0,h.jsx)(Oj,{project:t,concept:r,onHeadings:l,onCitations:d})}),(0,h.jsxs)(`aside`,{className:`w-full xl:w-72 xl:sticky xl:top-20 shrink-0 space-y-6`,children:[c.length>=3&&(0,h.jsx)(kj,{headings:c}),(0,h.jsxs)(`div`,{className:`space-y-3 rounded-xl border border-border bg-surface-2/30 p-3.5 text-xs`,children:[(0,h.jsx)(`div`,{className:`font-semibold uppercase tracking-wider text-muted`,children:`Details`}),r.derived?.generatedAt&&(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-muted shrink-0`,children:`Generated`}),(0,h.jsxs)(`span`,{className:`text-fg text-right font-mono text-[11px]`,title:wD(r.derived.generatedAt),children:[CD(r.derived.generatedAt),r.derived.generatedBy&&` by ${r.derived.generatedBy}`]})]}),(0,h.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,h.jsx)(`span`,{className:`text-muted block`,children:`Verified`}),y.length>0?(0,h.jsx)(`div`,{className:`space-y-1.5 pl-1`,children:y.map((e,t)=>(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-fg`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,h.jsx)(MD,{actor:e.by,size:18}),(0,h.jsx)(`span`,{className:`truncate font-mono text-[11px]`,children:e.by})]}),e.at&&(0,h.jsx)(`span`,{className:`text-muted text-[10px] shrink-0`,title:wD(e.at),children:CD(e.at)})]},`${e.by}-${e.at??t}`))}):(0,h.jsx)(`div`,{className:`text-subtle italic pl-1`,children:`Unverified`})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-muted`,children:`Stale after`}),(0,h.jsx)(`span`,{className:X(`font-mono text-[11px]`,r.derived?.stale?`text-orange-500 font-semibold`:`text-fg`),children:r.derived?.staleAfter?r.derived.staleAfter.split(`T`)[0]:`—`})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-muted`,children:`Revision`}),(0,h.jsx)(`span`,{className:`font-mono text-[11px] text-muted`,children:r.revision.slice(0,8)})]})]}),g.length>0&&(0,h.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border bg-surface-2/30 p-3.5 text-xs`,children:[(0,h.jsxs)(`div`,{className:`font-semibold uppercase tracking-wider text-muted`,children:[`Sources (`,g.length,`)`]}),(0,h.jsx)(`ol`,{className:`space-y-2`,children:g.map((e,t)=>(0,h.jsxs)(`li`,{id:`source-${e.id}`,className:`rounded-lg p-2 transition-colors border border-transparent hover:border-border hover:bg-surface-2/50`,children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,h.jsxs)(`span`,{className:`font-mono text-muted text-[10px] shrink-0`,children:[t+1,`.`]}),(0,h.jsx)(`span`,{className:`font-mono text-fg text-xs truncate`,title:e.label,children:e.label})]}),e.commit&&(0,h.jsx)(`span`,{className:`font-mono text-[10px] px-1.5 py-0.5 rounded bg-surface border border-border text-muted shrink-0`,title:`Commit ${e.commit}`,children:OD(e.commit)})]}),e.url&&(0,h.jsx)(`div`,{className:`mt-1 pl-4`,children:(0,h.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[11px] text-accent-500 hover:text-accent-400 hover:underline truncate max-w-full`,children:[(0,h.jsx)(`span`,{className:`truncate`,children:e.resource}),(0,h.jsx)(Zb,{size:10,className:`shrink-0`})]})})]},e.id))})]}),(0,h.jsx)(JD,{project:t,conceptId:r.id,inbound:r.links.inbound,outbound:r.links.outbound}),(0,h.jsxs)(`div`,{className:`space-y-3 rounded-xl border border-border bg-surface-2/30 p-3.5 text-xs`,children:[(0,h.jsx)(`div`,{className:`font-semibold uppercase tracking-wider text-muted`,children:`History`}),s&&s.length>0?(0,h.jsx)(`div`,{className:`relative pl-4 space-y-4 before:absolute before:left-1.5 before:top-2 before:bottom-2 before:w-px before:bg-border`,children:s.map(e=>(0,h.jsxs)(`div`,{className:`relative space-y-1`,children:[(0,h.jsx)(`div`,{className:`absolute -left-4 top-1.5 h-2 w-2 rounded-full bg-accent-500 ring-2 ring-surface`}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-1 text-[11px]`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,h.jsx)(MD,{actor:e.actor,size:16}),(0,h.jsx)(`span`,{className:`truncate font-mono text-fg`,children:e.actor})]}),(0,h.jsx)(`span`,{className:`text-muted shrink-0 text-[10px]`,title:wD(e.at),children:CD(e.at)})]}),(0,h.jsx)(`p`,{className:`text-fg text-xs break-words`,children:e.subject}),(0,h.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,h.jsx)(cS,{value:e.sha,label:OD(e.sha),className:`px-1.5 py-0.5 text-[10px] font-mono`})})]},e.sha))}):(0,h.jsx)(`div`,{className:`text-subtle italic`,children:`No history available`})]}),r.issues&&r.issues.length>0&&(0,h.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border bg-surface-2/30 p-3.5 text-xs`,children:[(0,h.jsxs)(`div`,{className:`font-semibold uppercase tracking-wider text-muted`,children:[`Lint issues (`,r.issues.length,`)`]}),(0,h.jsx)(`div`,{className:`space-y-2`,children:r.issues.map(e=>(0,h.jsxs)(`div`,{className:`flex items-start gap-2 p-2 rounded-lg bg-surface border border-border/60`,children:[e.severity===`error`?(0,h.jsx)(Lb,{size:14,className:`text-rose-500 shrink-0 mt-0.5`}):e.severity===`warning`?(0,h.jsx)(Zx,{size:14,className:`text-amber-500 shrink-0 mt-0.5`}):(0,h.jsx)(_x,{size:14,className:`text-sky-500 shrink-0 mt-0.5`}),(0,h.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[(0,h.jsx)(`div`,{className:`font-mono font-semibold text-[11px] text-fg`,children:e.code}),(0,h.jsx)(`p`,{className:`text-muted text-[11px] leading-tight break-words`,children:e.message})]})]},`${e.code}-${e.path}-${e.message}`))})]}),b.length>0&&(0,h.jsxs)(`details`,{className:`group rounded-xl border border-border bg-surface-2/30 p-3.5 text-xs`,children:[(0,h.jsxs)(`summary`,{className:`cursor-pointer font-semibold uppercase tracking-wider text-muted hover:text-fg flex items-center justify-between select-none`,children:[(0,h.jsxs)(`span`,{children:[`Extra frontmatter (`,b.length,`)`]}),(0,h.jsx)(jb,{size:14,className:`transition-transform group-open:rotate-180`})]}),(0,h.jsx)(`div`,{className:`mt-2 space-y-1 overflow-x-auto rounded-lg bg-surface p-2 font-mono text-[11px] border border-border/50`,children:b.map(([e,t])=>(0,h.jsxs)(`div`,{className:`break-all`,children:[(0,h.jsx)(`span`,{className:`text-accent-500`,children:e}),`:`,` `,(0,h.jsx)(`span`,{className:`text-muted`,children:JSON.stringify(t)})]},e))})]})]})]})]})}var jj={ts:`typescript`,tsx:`tsx`,js:`javascript`,jsx:`jsx`,json:`json`,yaml:`yaml`,yml:`yaml`,sh:`bash`,bash:`bash`,py:`python`,go:`go`,rs:`rust`,sql:`sql`,md:`markdown`,diff:`diff`,patch:`diff`,toml:`toml`,html:`html`,css:`css`,java:`java`,rb:`ruby`,dockerfile:`dockerfile`};function Mj(e){let t=e.split(`/`).pop()??e;if(t.toLowerCase()===`dockerfile`)return`dockerfile`;let n=t.lastIndexOf(`.`);return n===-1?null:jj[t.slice(n+1).toLowerCase()]??null}function Nj(){let e=Nh(),t=e.project??``,n=e[`*`]??``,{data:r,isLoading:i,error:a,refetch:o}=j_(t,n),s=n.split(`/`).pop()??n,c=s?`${s} · ${t}`:`File`;if(i)return(0,h.jsxs)(oS,{title:c,className:`max-w-6xl mx-auto px-4 sm:px-6 py-6 space-y-6`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between border-b border-border pb-4`,children:[(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(Q,{className:`h-6 w-64 rounded-md`}),(0,h.jsx)(Q,{className:`h-4 w-28 rounded-md`})]}),(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsx)(Q,{className:`h-8 w-24 rounded-md`}),(0,h.jsx)(Q,{className:`h-8 w-28 rounded-md`})]})]}),(0,h.jsx)(Q,{className:`h-96 w-full rounded-xl`})]});if(a)return(0,h.jsx)(oS,{title:c,className:`max-w-6xl mx-auto px-4 sm:px-6 py-6`,children:(0,h.jsx)(rS,{error:a,onRetry:o,fullScreen:!0})});if(!r)return(0,h.jsx)(oS,{title:c,className:`max-w-6xl mx-auto px-4 sm:px-6 py-6`,children:(0,h.jsx)(nS,{title:`File not found`,hint:`Could not find file "${n}" in project "${t}".`})});let l=()=>{let e=new Blob([r.content],{type:`text/plain;charset=utf-8`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=s||`file`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)},u=Mj(n);return(0,h.jsxs)(oS,{title:c,className:`max-w-6xl mx-auto px-4 sm:px-6 py-6 space-y-6`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between border-b border-border pb-4`,children:[(0,h.jsxs)(`div`,{className:`space-y-1.5 min-w-0`,children:[(0,h.jsx)(`h1`,{className:`font-mono text-xl font-semibold text-fg break-all`,children:n}),r.revision&&(0,h.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,h.jsxs)(`span`,{className:`font-mono text-xs px-2 py-0.5 rounded-md bg-surface-2 border border-border text-muted`,children:[`rev: `,r.revision.slice(0,8)]})})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,h.jsx)(cS,{value:r.content,label:`Copy content`}),(0,h.jsxs)(`button`,{type:`button`,onClick:l,"aria-label":`Download file`,className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface px-2.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-2 outline-accent-500 cursor-pointer`,children:[(0,h.jsx)(Yb,{size:14,className:`shrink-0 text-muted`}),(0,h.jsx)(`span`,{children:`Download`})]})]})]}),(0,h.jsx)(KD,{code:r.content,lang:u,lineNumbers:!0,className:`rounded-xl border border-border bg-surface-2 overflow-hidden shadow-xs`})]})}function Pj(){let e=Nh().project??``,{data:t}=O_(e),n=N_(e),r=P_({project:e,stale:!0,limit:100}),i=P_({project:e,trustTier:`unverified`,limit:100}),a=n.isLoading||r.isLoading||i.isLoading,o=n.isError||r.isError||i.isError,s=n.error||r.error||i.error,c=()=>{n.refetch(),r.refetch(),i.refetch()},l=(0,m.useMemo)(()=>{if(!n.data)return{errors:[],warnings:[],infos:[]};let e=[],t=[],r=[];for(let i of n.data)i.severity===`error`?e.push(i):i.severity===`warning`?t.push(i):r.push(i);return{errors:e,warnings:t,infos:r}},[n.data]),u=t?.title?`${t.title} Health`:`Health`;if(a)return(0,h.jsxs)(oS,{title:u,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(Q,{className:`h-4 w-32 rounded-md`}),(0,h.jsx)(Q,{className:`h-8 w-48 rounded-lg`})]}),(0,h.jsx)(`div`,{className:`mt-8 space-y-10`,children:Array.from({length:3}).map((e,t)=>(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsx)(Q,{className:`h-7 w-48 rounded-md`}),(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface p-4 space-y-3`,children:[(0,h.jsx)(Q,{className:`h-12 w-full rounded-lg`}),(0,h.jsx)(Q,{className:`h-12 w-full rounded-lg`})]})]},t))})]});if(o)return(0,h.jsx)(oS,{title:u,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:(0,h.jsx)(rS,{error:s,onRetry:c})});let d=n.data??[],f=r.data??[],p=i.data??[],g=l.errors.length;return(0,h.jsxs)(oS,{title:u,className:`mx-auto max-w-5xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`mb-8`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted`,children:[(0,h.jsx)($g,{to:`/p/${encodeURIComponent(e)}`,className:`transition-colors hover:text-fg`,children:t?.title??e}),(0,h.jsx)(`span`,{children:`/`}),(0,h.jsx)(`span`,{className:`text-fg`,children:`Health`})]}),(0,h.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center justify-between gap-4`,children:(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg`,children:`Knowledge Base Health`}),(0,h.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[`Lint diagnostics, staleness, and verification status for `,t?.title??e]})]})})]}),(0,h.jsxs)(`div`,{className:`space-y-10`,children:[(0,h.jsxs)(`section`,{className:`space-y-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border pb-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-fg`,children:`Specification Conformance`}),g===0?(0,h.jsxs)(VD,{className:`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 ring-emerald-500/20`,children:[(0,h.jsx)(zb,{size:13}),(0,h.jsx)(`span`,{children:`Conformant`})]}):(0,h.jsxs)(VD,{className:`bg-rose-500/10 text-rose-600 dark:text-rose-400 ring-rose-500/20`,children:[(0,h.jsx)(Lb,{size:13}),(0,h.jsxs)(`span`,{children:[g,` `,g===1?`error`:`errors`]})]})]}),(0,h.jsxs)(`span`,{className:`text-xs text-muted`,children:[`(`,d.length,`)`]})]}),d.length===0?(0,h.jsx)(nS,{icon:zb,title:`All concepts and files conform`,hint:`No lint or specification issues found in this project.`,className:`py-10`}):(0,h.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-surface divide-y divide-border`,children:[...l.errors,...l.warnings,...l.infos].map((t,n)=>{let r=t.path.endsWith(`.md`)?`/p/${encodeURIComponent(e)}/c/${t.path.slice(0,-3)}`:`/p/${encodeURIComponent(e)}/f/${t.path}`,i=_x,a=`text-sky-500 bg-sky-500/10 ring-sky-500/20`;return t.severity===`error`?(i=Lb,a=`text-rose-600 dark:text-rose-400 bg-rose-500/10 ring-rose-500/20`):t.severity===`warning`&&(i=Zx,a=`text-amber-600 dark:text-amber-400 bg-amber-500/10 ring-amber-500/20`),(0,h.jsx)(`div`,{className:`flex flex-col gap-2 p-4 sm:flex-row sm:items-center sm:justify-between`,children:(0,h.jsxs)(`div`,{className:`flex items-start gap-3 min-w-0`,children:[(0,h.jsx)(`div`,{className:X(`mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full ring-1`,a),children:(0,h.jsx)(i,{size:14})}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono text-xs font-semibold text-fg`,children:t.code}),(0,h.jsx)(`span`,{className:`text-xs text-muted`,children:`on`}),(0,h.jsx)($g,{to:r,className:`font-mono text-xs text-accent-500 hover:text-accent-600 transition-colors truncate max-w-sm`,title:`Navigate to ${t.path}`,children:t.path})]}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted break-words`,children:t.message})]})]})},n)})})]}),(0,h.jsxs)(`section`,{className:`space-y-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border pb-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-fg`,children:`Stale Concepts`}),f.length>0&&(0,h.jsx)(WD,{})]}),(0,h.jsxs)(`span`,{className:`text-xs text-muted`,children:[`(`,f.length,`)`]})]}),f.length===0?(0,h.jsx)(nS,{icon:Ub,title:`No stale concepts`,hint:`All concepts are within their defined freshness interval.`,className:`py-10`}):(0,h.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-surface divide-y divide-border`,children:f.map(t=>(0,h.jsxs)($g,{to:`/p/${encodeURIComponent(e)}/c/${t.id}`,className:`group flex flex-col gap-3 p-4 transition-colors hover:bg-surface-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,h.jsx)(lD,{type:t.type,size:18}),(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-sm font-semibold tracking-tight text-fg transition-colors group-hover:text-accent-500 truncate`,children:t.title}),(0,h.jsx)(`span`,{className:`font-mono text-xs text-subtle shrink-0`,children:t.id})]}),t.description&&(0,h.jsx)(`p`,{className:`mt-0.5 line-clamp-1 text-xs text-muted`,children:t.description})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 self-end sm:self-center`,children:[(0,h.jsx)(HD,{status:t.status}),(0,h.jsx)(UD,{tier:t.trustTier}),(0,h.jsx)(WD,{})]})]},t.id))})]}),(0,h.jsxs)(`section`,{className:`space-y-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border pb-3`,children:[(0,h.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,h.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight text-fg`,children:`Unverified Concepts`})}),(0,h.jsxs)(`span`,{className:`text-xs text-muted`,children:[`(`,p.length,`)`]})]}),p.length===0?(0,h.jsx)(nS,{icon:zb,title:`All concepts verified`,hint:`Every concept has been machine-confirmed or human-reviewed.`,className:`py-10`}):(0,h.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-surface divide-y divide-border`,children:p.map(t=>(0,h.jsxs)($g,{to:`/p/${encodeURIComponent(e)}/c/${t.id}`,className:`group flex flex-col gap-3 p-4 transition-colors hover:bg-surface-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,h.jsx)(lD,{type:t.type,size:18}),(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-sm font-semibold tracking-tight text-fg transition-colors group-hover:text-accent-500 truncate`,children:t.title}),(0,h.jsx)(`span`,{className:`font-mono text-xs text-subtle shrink-0`,children:t.id})]}),t.description&&(0,h.jsx)(`p`,{className:`mt-0.5 line-clamp-1 text-xs text-muted`,children:t.description})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 self-end sm:self-center`,children:[(0,h.jsx)(HD,{status:t.status}),(0,h.jsx)(UD,{tier:t.trustTier}),t.stale&&(0,h.jsx)(WD,{})]})]},t.id))})]})]})]})}function Fj(){return(0,h.jsxs)(oS,{title:`Page not found`,className:`flex min-h-[70vh] flex-col items-center justify-center p-8 text-center`,children:[(0,h.jsx)(`div`,{className:`text-8xl font-black tracking-tighter bg-gradient-to-br from-accent-500 via-accent-400 to-glow bg-clip-text text-transparent select-none`,children:`404`}),(0,h.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold tracking-tight text-fg`,children:`Nothing here`}),(0,h.jsx)(`p`,{className:`mt-2 text-sm text-muted max-w-sm`,children:`The page you're looking for doesn't exist, has been moved, or you don't have access to it.`}),(0,h.jsx)($g,{to:`/`,className:`mt-6 inline-flex items-center justify-center rounded-lg bg-surface-2 px-4 py-2 text-xs font-medium text-fg ring-1 ring-border hover:bg-surface hover:ring-border-strong transition-colors`,children:`Back to projects`})]})}function Ij({label:e,icon:t,value:n,tone:r=`default`,to:i,children:a,className:o}){let s=r===`warn`,c=X(`rounded-xl border p-4 transition-all`,s?`border-orange-500/30 bg-orange-500/5 dark:border-orange-500/20`:`border-border bg-surface`,i&&`block hover:-translate-y-px hover:border-border-strong`,o),l=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wider text-muted`,children:e}),t&&(0,h.jsx)(t,{size:16,className:s?`text-orange-600 dark:text-orange-400`:`text-muted shrink-0`})]}),n!==void 0&&(0,h.jsx)(`div`,{className:X(`mt-2 text-2xl font-semibold tracking-tight`,s?`text-orange-600 dark:text-orange-400`:`text-fg`),children:n}),a&&(0,h.jsx)(`div`,{className:`mt-3`,children:a})]});return i?(0,h.jsx)($g,{to:i,className:c,children:l}):(0,h.jsx)(`div`,{className:c,children:l})}function Lj(){let e=Nh().project??``,t=_D(),[n,r]=(0,m.useState)(!1),{data:i,isLoading:a,isError:o,error:s,refetch:c}=O_(e),l=A_(e,`overview`),u=k_(e,``),d=M_(e,{limit:8}),f=(0,m.useMemo)(()=>u.data?u.data.filter(e=>e.kind===`directory`).sort((e,t)=>e.path.localeCompare(t.path)):[],[u.data]),p=(0,m.useMemo)(()=>i?.typeCounts?Object.entries(i.typeCounts).sort(([,e],[,t])=>t-e).slice(0,5):[],[i?.typeCounts]),g=(0,m.useMemo)(()=>{if(!i?.trustTierCounts)return{total:0,human:0,machine:0,unverified:0};let e=i.trustTierCounts[`human-reviewed`]??0,t=i.trustTierCounts[`machine-confirmed`]??0,n=i.trustTierCounts.unverified??0;return{total:e+t+n,human:e,machine:t,unverified:n}},[i?.trustTierCounts]);return a?(0,h.jsxs)(oS,{title:e||`Project`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(Q,{className:`h-9 w-64 rounded-lg`}),(0,h.jsx)(Q,{className:`h-5 w-96 rounded-md`})]}),(0,h.jsx)(`div`,{className:`mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:Array.from({length:4}).map((e,t)=>(0,h.jsx)(Q,{className:`h-32 rounded-xl`},t))}),(0,h.jsxs)(`div`,{className:`mt-8 grid grid-cols-1 gap-8 lg:grid-cols-12`,children:[(0,h.jsx)(`div`,{className:`lg:col-span-7 xl:col-span-8`,children:(0,h.jsx)(Q,{className:`h-96 rounded-xl`})}),(0,h.jsxs)(`div`,{className:`lg:col-span-5 xl:col-span-4 space-y-6`,children:[(0,h.jsx)(Q,{className:`h-64 rounded-xl`}),(0,h.jsx)(Q,{className:`h-48 rounded-xl`})]})]})]}):o?(0,h.jsx)(oS,{title:e||`Project`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:(0,h.jsx)(rS,{error:s,onRetry:()=>void c()})}):i?(0,h.jsxs)(oS,{title:i.title,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col justify-between gap-4 border-b border-border pb-6 sm:flex-row sm:items-start`,children:[(0,h.jsxs)(`div`,{className:`max-w-3xl`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(`h1`,{className:`text-3xl font-semibold tracking-tight text-fg`,children:i.title}),(0,h.jsx)(`span`,{className:`font-mono text-xs text-subtle`,children:i.project})]}),i.description&&(0,h.jsx)(`p`,{className:`mt-2 text-base text-muted`,children:i.description}),i.repositories&&i.repositories.length>0&&(0,h.jsx)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:i.repositories.map(e=>{let t=e.indexOf(`/`),n=t===-1?e:e.slice(t+1);return(0,h.jsxs)(`a`,{href:`https://${e}`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface-2 px-2 py-1 font-mono text-xs text-muted transition-colors hover:border-border-strong hover:text-fg`,title:`View ${e}`,children:[(0,h.jsx)(dx,{size:13,className:`shrink-0 text-subtle`}),(0,h.jsx)(`span`,{children:n})]},e)})})]}),(0,h.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:(0,h.jsxs)(`button`,{type:`button`,onClick:async()=>{try{r(!0),await w_(e)}catch{}finally{r(!1)}},disabled:n,className:`inline-flex items-center gap-1.5 rounded-lg border border-border bg-surface px-3 py-2 text-sm font-medium text-fg shadow-xs transition-colors hover:bg-surface-2 hover:border-border-strong disabled:opacity-50 focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(Yb,{size:15,className:`shrink-0 text-muted`}),(0,h.jsx)(`span`,{children:n?`Exporting…`:`Export .tar.gz`})]})})]}),(0,h.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,h.jsx)(Ij,{label:`Concepts`,icon:rx,value:i.conceptCount,to:`/search?project=${encodeURIComponent(e)}`}),(0,h.jsx)(Ij,{label:`Stale`,icon:Ub,value:i.staleCount,tone:i.staleCount>0?`warn`:`default`,to:`/p/${encodeURIComponent(e)}/health`}),(0,h.jsx)(Ij,{label:`Trust`,icon:Ux,children:(0,h.jsxs)(`div`,{className:`mt-1`,children:[(0,h.jsx)(`div`,{className:`flex h-2 w-full overflow-hidden rounded-full bg-surface-2`,children:g.total>0?(0,h.jsxs)(h.Fragment,{children:[g.human>0&&(0,h.jsx)(`div`,{style:{width:`${g.human/g.total*100}%`},className:`bg-emerald-500`,title:`Human-reviewed: ${g.human}`}),g.machine>0&&(0,h.jsx)(`div`,{style:{width:`${g.machine/g.total*100}%`},className:`bg-sky-500`,title:`Machine-confirmed: ${g.machine}`}),g.unverified>0&&(0,h.jsx)(`div`,{style:{width:`${g.unverified/g.total*100}%`},className:`bg-zinc-400 dark:bg-zinc-600`,title:`Unverified: ${g.unverified}`})]}):(0,h.jsx)(`div`,{className:`w-full bg-surface-2`})}),(0,h.jsxs)(`div`,{className:`mt-2.5 flex items-center justify-between text-[11px] text-muted`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-500`}),(0,h.jsxs)(`span`,{children:[g.human,` human`]})]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-sky-500`}),(0,h.jsxs)(`span`,{children:[g.machine,` auto`]})]}),(0,h.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-zinc-400 dark:bg-zinc-600`}),(0,h.jsxs)(`span`,{children:[g.unverified,` unverified`]})]})]})]})}),(0,h.jsx)(Ij,{label:`Types`,icon:Db,children:p.length>0?(0,h.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:p.map(([t,n])=>(0,h.jsxs)($g,{to:`/search?project=${encodeURIComponent(e)}&type=${encodeURIComponent(t)}`,className:`inline-flex items-center gap-1 rounded-md bg-surface-2 px-1.5 py-0.5 text-xs text-muted transition-colors hover:bg-surface hover:text-fg ring-1 ring-border/50`,children:[(0,h.jsx)(lD,{type:t,size:12}),(0,h.jsx)(`span`,{children:t}),(0,h.jsx)(`span`,{className:`font-mono text-[10px] text-subtle`,children:n})]},t))}):(0,h.jsx)(`p`,{className:`mt-2 text-xs text-muted`,children:`No types recorded`})})]}),(0,h.jsxs)(`div`,{className:`mt-8 grid grid-cols-1 gap-8 lg:grid-cols-12`,children:[(0,h.jsxs)(`div`,{className:`lg:col-span-7 xl:col-span-8`,children:[l.isLoading&&(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface p-6 space-y-4`,children:[(0,h.jsx)(Q,{className:`h-7 w-48 rounded-md`}),(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-5/6`}),(0,h.jsx)(Q,{className:`h-4 w-4/6`})]}),l.data&&(0,h.jsx)(`div`,{className:`rounded-xl border border-border bg-surface p-6 sm:p-8`,children:(0,h.jsx)(Oj,{project:e,concept:l.data})})]}),(0,h.jsxs)(`div`,{className:`space-y-6 lg:col-span-5 xl:col-span-4`,children:[(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface p-5`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between pb-3 border-b border-border`,children:[(0,h.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold tracking-tight text-fg`,children:[(0,h.jsx)(Fx,{size:16,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Recent activity`})]}),(0,h.jsx)($g,{to:`/p/${encodeURIComponent(e)}/activity`,className:`text-xs font-medium text-accent-500 transition-colors hover:text-accent-600`,children:`View all`})]}),(0,h.jsxs)(`div`,{className:`mt-3 divide-y divide-border/50`,children:[d.isLoading&&(0,h.jsx)(`div`,{className:`space-y-3 py-2`,children:Array.from({length:4}).map((e,t)=>(0,h.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,h.jsx)(Q,{className:`h-6 w-6 rounded-full shrink-0`}),(0,h.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,h.jsx)(Q,{className:`h-3.5 w-3/4`}),(0,h.jsx)(Q,{className:`h-3 w-1/2`})]})]},t))}),d.data&&d.data.length>0?d.data.map(e=>{let t=e.actor.startsWith(`human:`)?e.actor.slice(6):e.actor;return(0,h.jsxs)(`div`,{className:`flex items-start gap-3 py-2.5 first:pt-1 last:pb-1`,children:[(0,h.jsx)(MD,{actor:e.actor,size:22,className:`mt-0.5`}),(0,h.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`p`,{className:`truncate text-xs font-medium text-fg`,title:e.subject,children:e.subject}),(0,h.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5 text-[11px] text-muted`,children:[(0,h.jsx)(`span`,{className:`truncate font-mono text-subtle max-w-[120px]`,children:t}),(0,h.jsx)(`span`,{children:`·`}),(0,h.jsx)(`span`,{title:wD(e.at),children:CD(e.at)})]})]})]},e.sha)}):!d.isLoading&&(0,h.jsx)(`p`,{className:`py-4 text-center text-xs text-muted`,children:`No recent activity`})]})]}),(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface p-5`,children:[(0,h.jsx)(`div`,{className:`pb-3 border-b border-border`,children:(0,h.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold tracking-tight text-fg`,children:[(0,h.jsx)(lx,{size:16,className:`text-muted`}),(0,h.jsx)(`span`,{children:`Browse`})]})}),(0,h.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[u.isLoading&&(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(Q,{className:`h-10 w-full rounded-lg`}),(0,h.jsx)(Q,{className:`h-10 w-full rounded-lg`}),(0,h.jsx)(Q,{className:`h-10 w-full rounded-lg`})]}),f.length>0?f.map(e=>(0,h.jsxs)(`button`,{type:`button`,onClick:()=>t.reveal(e.path),className:`group flex w-full items-center justify-between rounded-lg border border-border bg-surface-2/50 p-2.5 text-left transition-colors hover:border-border-strong hover:bg-surface-2 focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,h.jsx)(lx,{size:16,className:`shrink-0 text-accent-500`}),(0,h.jsx)(`span`,{className:`truncate text-xs font-medium text-fg transition-colors group-hover:text-accent-500`,children:e.path})]}),(0,h.jsxs)(`span`,{className:`ml-2 shrink-0 text-[11px] text-muted`,children:[e.conceptCount,` `,e.conceptCount===1?`concept`:`concepts`]})]},e.path)):!u.isLoading&&(0,h.jsx)(`p`,{className:`py-4 text-center text-xs text-muted`,children:`No directories`})]})]})]})]})]}):null}function Rj(){let{data:e,isLoading:t,isError:n,error:r,refetch:i}=D_(),[a,o]=(0,m.useState)(``),s=(0,m.useMemo)(()=>e?e.reduce((e,t)=>e+t.conceptCount,0):0,[e]),c=(0,m.useMemo)(()=>{if(!e)return[];let t=a.trim().toLowerCase();return[...t?e.filter(e=>e.title.toLowerCase().includes(t)||e.project.toLowerCase().includes(t)||!!e.description?.toLowerCase().includes(t)):e].sort((e,t)=>!e.updatedAt&&!t.updatedAt?0:e.updatedAt?t.updatedAt?new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime():-1:1)},[e,a]);return t?(0,h.jsxs)(oS,{title:`Projects`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(Q,{className:`h-9 w-64 rounded-lg`}),(0,h.jsx)(Q,{className:`h-5 w-48 rounded-md`})]}),(0,h.jsx)(`div`,{className:`mt-6`,children:(0,h.jsx)(Q,{className:`h-10 w-full max-w-sm rounded-lg`})}),(0,h.jsx)(`div`,{className:`mt-8 grid gap-4 sm:grid-cols-2 xl:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,h.jsxs)(`div`,{className:`flex flex-col justify-between rounded-xl border border-border bg-surface p-5`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(Q,{className:`h-5 w-32`}),(0,h.jsx)(Q,{className:`h-4 w-20`})]}),(0,h.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-3/4`})]})]}),(0,h.jsxs)(`div`,{className:`mt-6 border-t border-border pt-4 flex items-center justify-between`,children:[(0,h.jsx)(Q,{className:`h-4 w-28`}),(0,h.jsx)(Q,{className:`h-4 w-20`})]})]},t))})]}):n?(0,h.jsx)(oS,{title:`Projects`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:(0,h.jsx)(rS,{error:r,onRetry:()=>void i()})}):!e||e.length===0?(0,h.jsxs)(oS,{title:`Projects`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`mb-8`,children:[(0,h.jsx)(`h1`,{className:`bg-gradient-to-r from-fg to-muted bg-clip-text text-3xl font-semibold tracking-tight text-transparent`,children:`Knowledge base`}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:`0 projects · 0 concepts`})]}),(0,h.jsx)(nS,{icon:ax,title:`No projects yet`,hint:`Agents create them with create_project, or POST /api/v1/projects.`,className:`mt-6 py-16`})]}):(0,h.jsxs)(oS,{title:`Projects`,className:`mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h1`,{className:`bg-gradient-to-r from-fg to-muted bg-clip-text text-3xl font-semibold tracking-tight text-transparent`,children:`Knowledge base`}),(0,h.jsxs)(`p`,{className:`mt-1 text-sm text-muted`,children:[e.length,` `,e.length===1?`project`:`projects`,` · `,s,` `,s===1?`concept`:`concepts`]})]}),(0,h.jsx)(`div`,{className:`mt-6`,children:(0,h.jsxs)(`div`,{className:`relative max-w-sm`,children:[(0,h.jsx)(Vx,{size:16,className:`absolute left-3 top-1/2 -translate-y-1/2 text-subtle`}),(0,h.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter projects…`,className:`w-full rounded-lg border border-border bg-surface py-2 pl-9 pr-3 text-sm text-fg placeholder:text-muted transition-colors focus-visible:outline-2 outline-accent-500`})]})}),c.length===0?(0,h.jsx)(nS,{icon:Vx,title:`No matching projects`,hint:`No projects match "${a}". Try adjusting your filter.`,className:`mt-8 py-12`}):(0,h.jsx)(`div`,{className:`mt-8 grid gap-4 sm:grid-cols-2 xl:grid-cols-3`,children:c.map(e=>(0,h.jsxs)($g,{to:`/p/${encodeURIComponent(e.project)}`,className:`group flex flex-col justify-between rounded-xl border border-border bg-surface p-5 transition-all duration-150 hover:-translate-y-px hover:border-border-strong hover:shadow-[0_8px_30px_-12px_rgb(139_92_246/0.35)]`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,h.jsx)(`h2`,{className:`text-base font-semibold tracking-tight text-fg transition-colors group-hover:text-accent-500 truncate`,children:e.title}),(0,h.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-subtle`,children:e.project})]}),(0,h.jsx)(`p`,{className:`mt-2 line-clamp-2 text-sm text-muted min-h-[2.5rem]`,children:e.description||`No description provided.`})]}),(0,h.jsxs)(`div`,{className:`mt-5 border-t border-border pt-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted`,children:[(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,h.jsx)(rx,{size:14,className:`shrink-0 text-subtle`}),(0,h.jsx)(`span`,{children:e.conceptCount})]}),(0,h.jsxs)(`span`,{className:X(`inline-flex items-center gap-1.5`,e.staleCount>0?`font-medium text-orange-600 dark:text-orange-400`:`text-muted`),children:[(0,h.jsx)(Ub,{size:14,className:`shrink-0`}),(0,h.jsxs)(`span`,{children:[e.staleCount,` stale`]})]}),(0,h.jsx)(`span`,{className:`ml-auto text-subtle truncate`,children:e.updatedAt?`Updated ${CD(e.updatedAt)}`:`Never updated`})]}),e.repositories&&e.repositories.length>0&&(0,h.jsx)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-1.5`,children:e.repositories.map(e=>{let t=e.indexOf(`/`),n=t===-1?e:e.slice(t+1);return(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-muted ring-1 ring-border/50`,title:e,children:[(0,h.jsx)(dx,{size:11,className:`shrink-0 text-subtle`}),(0,h.jsx)(`span`,{className:`truncate max-w-[140px]`,children:n})]},e)})})]})]},e.project))})]})}function zj(){let[e,t]=r_(),n=e.get(`q`)??``,r=e.get(`project`)??``,i=e.get(`type`)??``,a=e.getAll(`tag`),o=e.get(`status`)??``,s=e.get(`trustTier`)??``,c=e.get(`stale`)??``,[l,u]=(0,m.useState)(``),{data:d}=D_(),{data:f}=O_(r),p=(0,m.useMemo)(()=>{if(r&&f?.typeCounts){let e=Object.keys(f.typeCounts);if(e.length>0)return e}return oD},[r,f?.typeCounts]),{data:g,isLoading:_,isError:v,error:y,refetch:b}=P_((0,m.useMemo)(()=>{let e={limit:50};return n.trim()&&(e.q=n.trim()),r&&(e.project=r),i&&(e.type=i),a.length>0&&(e.tag=a),o&&(e.status=o),s&&(e.trustTier=s),c===`true`&&(e.stale=!0),c===`false`&&(e.stale=!1),e},[n,r,i,a,o,s,c])),x=(n,r)=>{let i=new URLSearchParams(e);r?i.set(n,r):i.delete(n),t(i,{replace:!0})},S=n=>{let r=n.trim();if(!r||a.includes(r))return;let i=new URLSearchParams(e);i.append(`tag`,r),t(i,{replace:!0}),u(``)},C=n=>{let r=new URLSearchParams(e);r.delete(`tag`);for(let e of a)e!==n&&r.append(`tag`,e);t(r,{replace:!0})},w=e=>{e.preventDefault(),S(l)},T=!!(r||i||a.length>0||o||s||c);return(0,h.jsxs)(oS,{title:`Search`,className:`mx-auto max-w-6xl px-4 py-8 sm:px-6 lg:px-8`,children:[(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-fg`,children:`Search Knowledge Base`}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:`Find concepts, decisions, conventions, and architectural records across projects.`})]}),(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(Vx,{size:20,className:`absolute left-4 top-1/2 -translate-y-1/2 text-subtle`}),(0,h.jsx)(`input`,{type:`text`,value:n,onChange:e=>x(`q`,e.target.value),placeholder:`Search concepts by keyword, text, title…`,className:`w-full rounded-xl border border-border bg-surface py-3.5 pl-12 pr-4 text-base text-fg shadow-xs placeholder:text-muted transition-colors focus-visible:outline-2 outline-accent-500`})]})]}),(0,h.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center gap-2.5 rounded-xl border border-border bg-surface p-3 sm:gap-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-medium text-muted`,children:[(0,h.jsx)(Gx,{size:14,className:`text-subtle`}),(0,h.jsx)(`span`,{children:`Filter:`})]}),(0,h.jsxs)(`select`,{value:r,onChange:e=>x(`project`,e.target.value),className:`rounded-lg border border-border bg-surface-2 px-2.5 py-1.5 text-xs text-fg transition-colors hover:border-border-strong focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(`option`,{value:``,children:`All projects`}),d?.map(e=>(0,h.jsx)(`option`,{value:e.project,children:e.title},e.project))]}),(0,h.jsxs)(`select`,{value:i,onChange:e=>x(`type`,e.target.value),className:`rounded-lg border border-border bg-surface-2 px-2.5 py-1.5 text-xs text-fg transition-colors hover:border-border-strong focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(`option`,{value:``,children:`All types`}),p.map(e=>(0,h.jsx)(`option`,{value:e,children:e},e))]}),(0,h.jsxs)(`select`,{value:o,onChange:e=>x(`status`,e.target.value),className:`rounded-lg border border-border bg-surface-2 px-2.5 py-1.5 text-xs text-fg transition-colors hover:border-border-strong focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(`option`,{value:``,children:`Any status`}),(0,h.jsx)(`option`,{value:`draft`,children:`Draft`}),(0,h.jsx)(`option`,{value:`stable`,children:`Stable`}),(0,h.jsx)(`option`,{value:`deprecated`,children:`Deprecated`})]}),(0,h.jsxs)(`select`,{value:s,onChange:e=>x(`trustTier`,e.target.value),className:`rounded-lg border border-border bg-surface-2 px-2.5 py-1.5 text-xs text-fg transition-colors hover:border-border-strong focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(`option`,{value:``,children:`Any trust`}),(0,h.jsx)(`option`,{value:`human-reviewed`,children:`Human-reviewed`}),(0,h.jsx)(`option`,{value:`machine-confirmed`,children:`Machine-confirmed`}),(0,h.jsx)(`option`,{value:`unverified`,children:`Unverified`})]}),(0,h.jsxs)(`select`,{value:c,onChange:e=>x(`stale`,e.target.value),className:`rounded-lg border border-border bg-surface-2 px-2.5 py-1.5 text-xs text-fg transition-colors hover:border-border-strong focus-visible:outline-2 outline-accent-500`,children:[(0,h.jsx)(`option`,{value:``,children:`Any staleness`}),(0,h.jsx)(`option`,{value:`true`,children:`Stale`}),(0,h.jsx)(`option`,{value:`false`,children:`Fresh`})]}),(0,h.jsx)(`form`,{onSubmit:w,className:`flex items-center`,children:(0,h.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:`+ tag…`,className:`w-20 rounded-lg border border-border bg-surface-2 px-2 py-1.5 text-xs text-fg placeholder:text-subtle transition-colors focus-visible:outline-2 outline-accent-500`})}),T&&(0,h.jsx)(`button`,{type:`button`,onClick:()=>{let e=new URLSearchParams;n&&e.set(`q`,n),t(e,{replace:!0})},className:`ml-auto text-xs font-medium text-accent-500 hover:text-accent-600 transition-colors`,children:`Clear filters`})]}),a.length>0&&(0,h.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[(0,h.jsxs)(`span`,{className:`text-xs text-muted flex items-center gap-1`,children:[(0,h.jsx)(Yx,{size:12,className:`text-subtle`}),(0,h.jsx)(`span`,{children:`Tags:`})]}),a.map(e=>(0,h.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-accent-500/20 bg-accent-500/10 px-2 py-0.5 font-mono text-xs text-accent-600 dark:text-accent-400`,children:[(0,h.jsxs)(`span`,{children:[`#`,e]}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>C(e),className:`hover:text-fg transition-colors`,title:`Remove tag ${e}`,children:(0,h.jsx)(tS,{size:12})})]},e))]}),(0,h.jsxs)(`div`,{className:`mt-8`,children:[_&&(0,h.jsx)(`div`,{className:`space-y-4`,children:Array.from({length:4}).map((e,t)=>(0,h.jsxs)(`div`,{className:`rounded-xl border border-border bg-surface p-5 space-y-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(Q,{className:`h-5 w-40`}),(0,h.jsx)(Q,{className:`h-5 w-20`})]}),(0,h.jsx)(Q,{className:`h-5 w-24`})]}),(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-3/4`})]},t))}),v&&(0,h.jsx)(rS,{error:y,onRetry:()=>void b()}),!_&&!v&&g&&g.length===0&&(0,h.jsx)(nS,{icon:Vx,title:`No matches`,hint:`Try adjusting your keywords, expanding your project scope, or clearing filters.`,className:`py-16`}),!_&&!v&&g&&g.length>0&&(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(`div`,{className:`flex items-center justify-between text-xs text-muted pb-1`,children:(0,h.jsxs)(`span`,{children:[`Found `,g.length,` `,g.length===1?`result`:`results`]})}),g.map(e=>(0,h.jsxs)($g,{to:`/p/${encodeURIComponent(e.project)}/c/${e.id}`,className:`group block rounded-xl border border-border bg-surface p-5 transition-all duration-150 hover:-translate-y-px hover:border-border-strong hover:shadow-[0_8px_30px_-12px_rgb(139_92_246/0.35)]`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,h.jsx)(`h2`,{className:`text-base font-semibold tracking-tight text-fg transition-colors group-hover:text-accent-500`,children:(0,h.jsx)(aD,{text:e.title,query:n})}),(0,h.jsx)(GD,{type:e.type}),(0,h.jsxs)(`span`,{className:`font-mono text-xs text-subtle`,children:[e.project,`/`,e.id]})]}),(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,h.jsx)(HD,{status:e.status}),(0,h.jsx)(UD,{tier:e.trustTier}),e.stale&&(0,h.jsx)(WD,{})]})]}),e.snippet?(0,h.jsx)(`p`,{className:`mt-2.5 text-sm text-muted break-words line-clamp-2`,children:(0,h.jsx)(aD,{text:e.snippet,query:n})}):e.description&&(0,h.jsx)(`p`,{className:`mt-2.5 text-sm text-muted break-words line-clamp-2`,children:(0,h.jsx)(aD,{text:e.description,query:n})}),e.tags&&e.tags.length>0&&(0,h.jsx)(`div`,{className:`mt-3.5 flex flex-wrap items-center gap-1.5 pt-1`,children:e.tags.map(e=>(0,h.jsxs)(`span`,{className:`rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-muted ring-1 ring-border/50`,children:[`#`,e]},e))})]},`${e.project}/${e.id}`))]})]})]})}var Bj=Xg([{path:`/callback`,element:(0,h.jsx)(BD,{})},{element:(0,h.jsx)(fS,{}),children:[{element:(0,h.jsx)(LD,{}),children:[{index:!0,element:(0,h.jsx)(Rj,{})},{path:`search`,element:(0,h.jsx)(zj,{})},{path:`p/:project`,element:(0,h.jsx)(Lj,{})},{path:`p/:project/activity`,element:(0,h.jsx)(zD,{})},{path:`p/:project/health`,element:(0,h.jsx)(Pj,{})},{path:`p/:project/c/*`,element:(0,h.jsx)(Aj,{})},{path:`p/:project/f/*`,element:(0,h.jsx)(Nj,{})},{path:`*`,element:(0,h.jsx)(Fj,{})}]}]}],{basename:`/ui`});eb();var Vj=document.getElementById(`root`);Vj&&(0,Tg.createRoot)(Vj).render((0,h.jsx)(m.StrictMode,{children:(0,h.jsx)(v,{client:T_,children:(0,h.jsx)(Wy,{children:(0,h.jsx)(cu,{reducedMotion:`user`,children:(0,h.jsx)(l_,{router:Bj})})})})}));export{s as n,Ag as t};