@elonzh/fafa 0.1.0 → 0.2.1

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.
@@ -0,0 +1,25 @@
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,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},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function O(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 k(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,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=k(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(O(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 A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=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)},ie={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=d.createContext(!1),p=()=>d.useContext(f);f.Provider;var m=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})),h=o(((e,t)=>{t.exports=m()}))(),g=d.createContext(void 0),_=e=>{let t=d.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})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t}));function y(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var b=d.createContext(y()),x=()=>d.useContext(b),S=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(){}},C=new class extends S{#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`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;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 E(e){setTimeout(e,0)}var ee=typeof window>`u`||`Deno`in globalThis;function D(){}function te(e,t){return typeof e==`function`?e(t):e}function ne(e){return typeof e==`number`&&e>=0&&e!==1/0}function re(e,t){return Math.max(e+(t||0)-Date.now(),0)}function O(e,t){return typeof e==`function`?e(t):e}function k(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==j(o,t.options))return!1}else if(!ie(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 A(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(M(t.options.mutationKey)!==M(a))return!1}else if(!ie(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function j(e,t){return(t?.queryKeyHashFn||M)(e)}function M(e){return JSON.stringify(e,(e,t)=>F(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ie(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))return!1;if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!ie(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!ie(e[r],t[r]))return!1;return!0}return!1}var ae=Object.prototype.hasOwnProperty;function oe(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=P(e)&&P(t);if(!r&&!(F(e)&&F(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:ae.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=oe(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function N(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!ae.call(t,n)||e[n]!==t[n])return!1;return!0}function P(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function F(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=>{T.setTimeout(t,e)})}function le(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:oe(e,t)}function ue(e){return e}function de(e,t,n,r){let i=r?[t,...e]:[...e,t];return n&&i.length>n?r?i.slice(0,n):i.slice(-n):i}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 I(e,t){return typeof e==`function`?e(...t):!!e}var L=Symbol();function me(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[L]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i?a:(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0}),a))}}),e}var he=()=>ee,ge=()=>he();function _e(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{me(e,()=>t.signal,()=>n=!0,l[L])},d=pe(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options;return{pages:de(e.pages,o,s,i),pageParams:de(e.pageParams,r,s,i)}};if(i&&a.length){let e=i===`backward`,t=e?ye:ve,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:ve(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ve(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 ye(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var be=E;function xe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=be,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 Se=xe(),Ce=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ne(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ge()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}},we=new class extends S{#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 Te(e){return Math.min(1e3*2**e,3e4)}function Ee(e){return(e??`online`)!==`online`||we.isOnline()}var De=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Oe(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(D);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new De(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>C.isFocused()&&(e.networkMode===`always`||we.isOnline())&&e.canRun(),p=()=>Ee(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(ge()?0:3),a=e.retryDelay??Te,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(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var ke=class extends Ce{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Me(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Me(this.options);e.data!==void 0&&(this.setState(je(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=le(this.state.data,e,this.options);return this.#u({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#u({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(D).catch(D):Promise.resolve()}destroy(){this.cancel({silent:!0}),super.destroy()}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>O(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.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>O(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:!re(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.#l()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#u({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[L]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!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.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?_e(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#u({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Oe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof De&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#u({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#u({type:`pause`})},onContinue:()=>{this.#u({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof De){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}else if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#u({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.#l()}})();return this.#o=s,o.start(),s}#l(){this.#r.get(this.queryHash)===this&&this.scheduleGc()}#u(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,...Ae(t.data,this.options),fetchMeta:e.meta??null};case`success`:{let n={...t,...je(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 n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`,isInvalidated:!0}}case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Se.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ae(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ee(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function je(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Me(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 Ne=class extends S{#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.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Fe(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ie(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ie(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 O(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&&!N(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Le(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||O(this.options.enabled,this.#t)!==O(t.enabled,this.#t)||O(this.options.staleTime,this.#t)!==O(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||O(this.options.enabled,this.#t)!==O(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 N(this.getCurrentResult(),n)||(this.#r=n,this.#i=e),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(D)),t}#h(e){return!ge()&&O(this.options.enabled,this.#t)!==!1&&ne(e)}#g(){this.#b();let e=O(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=re(this.#r.dataUpdatedAt,e)+1;this.#u=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return O(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(T.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(T.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=e===n?this.#n:e.state,{state:s}=e,c={...s},l=!1,u;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Fe(e,t),o=i&&Le(e,n,t,r);(a||o)&&(c={...c,...Ae(s.data,e.options)}),t._optimisticResults===`isRestoring`&&(c.fetchStatus=`idle`)}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(t.placeholderData!==void 0&&u===void 0&&p===`pending`){let e,n=i?.isPlaceholderData&&t.placeholderData===a?.placeholderData;n?(e=i.data,m=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,(n||e!==void 0)&&(p=`success`,u=le(t.select&&!m?this.#s:i?.data,e,t),l=!0)}if(t.select&&u!==void 0&&!m)if(u===this.#s&&t.select===this.#o)u=this.#c;else try{this.#o=t.select,this.#s=u,u=t.select(u),u=le(i?.data,u,t),this.#c=u,this.#a=null}catch(e){this.#a=e}else u===void 0&&(this.#s=void 0,this.#a=null);this.#a&&(d=this.#a,u=this.#c,f=i?.error===d?i.errorUpdatedAt:Date.now(),p=`error`,l=!1);let h=c.fetchStatus===`fetching`,g=p===`pending`,_=p===`error`,v=g&&h,y=u!==void 0;return{status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:p===`success`,isError:_,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>o.dataUpdateCount||c.errorUpdateCount>o.errorUpdateCount,isFetching:h,isRefetching:h&&!g,isLoadingError:_&&!y,isPaused:c.fetchStatus===`paused`,isPlaceholderData:l,isRefetchError:_&&y,isStale:Re(e,t),refetch:this.refetch,isEnabled:O(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.options,this.#t.state.data!==void 0&&(this.#l=this.#t),N(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();Se.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 Pe(e,t){return O(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&O(t.retryOnMount,e)===!1)}function Fe(e,t){return Pe(e,t)||e.state.data!==void 0&&Ie(e,t,t.refetchOnMount)}function Ie(e,t,n){if(O(t.enabled,e)!==!1&&O(t.staleTime,e)!==`static`){let r=O(n,e);return r===`always`||r!==!1&&Re(e,t)}return!1}function Le(e,t,n,r){return(e!==t||O(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Re(e,n)}function Re(e,t){return O(t.enabled,e)!==!1&&e.isStaleByTime(O(t.staleTime,e))}var ze=class extends Ce{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Be(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.#n.has(this)&&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=Oe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Se.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Be(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ve=class extends S{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new ze({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){e.destroy();let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}has(e){return this.#e.has(e)}canRun(e){let t=He(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=He(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Se.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>e.destroy()),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>A(t,e))}findAll(e={}){return this.getAll().filter(t=>A(e,t))}notify(e){Se.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Se.batch(()=>Promise.all(e.map(e=>e.continue().catch(D))))}};function He(e){return e.options.scope?.id}var Ue=class extends S{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??j(r,t),a=this.get(i);return a||(a=new ke({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(){Se.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=>k(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>k(e,t)):t}notify(e){Se.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Se.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Se.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},We=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ue,this.#t=e.mutationCache||new Ve,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=we.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(O(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=te(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Se.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;Se.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Se.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=Se.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(D).catch(D)}invalidateQueries(e,t={}){return Se.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=Se.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(D)),r?Promise.resolve():t}));return Promise.all(r).then(D)}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(O(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(O(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(D).catch(D)}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(D).catch(D)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return we.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(M(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ie(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(M(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ie(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||=j(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()}},Ge=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?I(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ke=e=>{d.useEffect(()=>{e.clearReset()},[e])},qe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||I(n,[e.error,r])),Je=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))}},Ye=(e,t)=>e?.suspense&&t.isPending,Xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ze(e,t,n){let r=p(),i=x(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Je(o),Ge(o,i,s),Ke(i);let[l]=d.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);d.useEffect(()=>{l.setOptions(o)},[o,l]);let f=!r&&c;if(d.useSyncExternalStore(d.useCallback(e=>{let t=f?l.subscribe(Se.batchCalls(e)):D;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Ye(o,u))throw Xe(o,l,i);if(qe({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Qe(e,t){return Ze(e,Ne,t)}var $e=d.useLayoutEffect;function et(e){return e[e.length-1]}function tt(e,t){return typeof e==`function`?e(t):e}var nt=Object.prototype.hasOwnProperty;function rt(e){for(let t in e)if(nt.call(e,t))return!0;return!1}var it=()=>Object.create(null),at=(e,t)=>ot(e,t,!0);function ot(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(st(e)&&st(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&et(a)!==`${o-1}`||c&&et(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?ot(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?ot(d,o,n,r):o,i&&=u===d&&(a[l]===f||nt.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?it():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?ot(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function st(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function ct(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!ct(a,o,n,r))return!1}return!0}if(st(e)&&st(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!ct(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!ct(e[a],t[a],n,r)))return!1;return i===0}return!1}var lt=/[\x00-\x1f\x7f"<>`{}]/g;function ut(e){return e.replace(lt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function dt(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return ut(t)}var ft=[`http:`,`https:`,`mailto:`,`tel:`];function pt(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var mt=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function ht(e,t){if(!e)return!1;if(mt.test(e))return!0;let n=pt(e);return n?!t.has(n):!1}function gt(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=dt(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=dt(r?e.slice(r):e)}return t}function _t(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function vt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yt(){throw Error(`Invariant failed`)}function bt(e){return e.replace(/\/{2,}/g,`/`)}function xt(e){return e===`/`?e:e.replace(/^\/+/,``)}function St(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Ct(e){return St(xt(e))}function wt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Tt(e,t,n=`never`,r){if(t.includes(`//`)&&(t=bt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=bt(e)),o=e.split(`/`);o.length>1&&et(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(et(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?bt(s):s)||`/`;return a&&r&&r.set(a,c),c}function Et(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Dt(e){return e==null||e===``}function Ot(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function kt(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(!(t===3&&f==null)){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Dt(f)){if(c===`/`&&!d)continue;f=``}o+=c+Ot(s,f,r)+(d||``)}}return o+a||`/`}function At(e){return e?.isNotFound===!0}function jt(){try{return sessionStorage}catch{return}}var Mt=`tsr-scroll-restoration-v1_3`,Nt=jt();function Pt(){try{return JSON.parse(Nt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var Ft=Pt(),It=`data-scroll-restoration-id`,Lt=e=>e.state.__TSR_key||e.href;function Rt(e){let t=e.getAttribute(It);if(t)return`[${It}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var zt=!1,Bt=`window`;function Vt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ht(e){let t=new Set;for(let n of e){if(n===Bt)continue;let e=Vt(n);e&&t.add(e)}return t}function Ut(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Lt,a=new Set,o=e=>{let t=Ft[e]||={};for(let e of a)e===document?t[Bt]={scrollX,scrollY}:e.isConnected&&(t[Rt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,zt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{zt||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Nt?.setItem(Mt,JSON.stringify(Ft))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=Ft[d];if(e){let t=Ft[u];for(let n in e){if(n===Bt){if(s)continue}else{let e=Vt(n);if(!e||s&&o&&(l??=Ht(o),l.has(e)))continue}t||=Ft[u]={},t[n]??=e[n]}}}zt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ht(o));let t=e&&i&&c,s=r.e?Ft[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Bt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Vt(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{zt=!1}}))}function Wt(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Gt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Kt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Gt(r):Array.isArray(t)?t.push(Gt(r)):n[e]=[t,Gt(r)]}return n}var qt=/^(?:\s|["[{\d-]|fa|nu|tr)/,Jt=Xt(JSON.parse),Yt=Zt(JSON.stringify,JSON.parse);function Xt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Kt(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!qt.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Zt(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!qt.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Wt(e,r);return t?`?${t}`:``}}var Qt=`__root__`;function $t(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function en(e){return e instanceof Response&&!!e.options}function tn(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var nn=4,rn=5;function an(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function on(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function sn(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=et(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=on(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=ln(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=ln(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=ln(r,rn);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=ln(r,nn);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function cn(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ln(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function un(e,t){let n=ln(),r=[];function i(e,t,n,a){let[o,s,c]=sn(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(cn);t.masksTree=n,t.flatCache=tn(1e3)}function dn(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=hn(e,t.masksTree);return t.flatCache.set(e,r),r}function fn(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ln(),sn(t,{from:e},1,o),i.singleCache.set(a,o)),hn(r,o,n)}function pn(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=hn(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=_n(a.route)),t.matchCache.set(r,a),a}function mn(e,t=!1){let n=ln(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&yt(),i[e.id]=e,o!==0&&e.path){let t=St(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=sn(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(cn);return{processedTree:{segmentTree:n,singleCache:tn(1e3),matchCache:tn(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function hn(e,t,n=!1){let r=e.split(`/`),i=yn(e,r,t,n);if(!i)return null;let[a]=gn(e,r,i);return{route:i.node.route,rawParams:a}}function gn(e,t,n){let r=vn(n.node),i=n.node.data&&an(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===nn)break;if(u.kind===rn){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function _n(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function vn(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function yn(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!et(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Cn(l,n))continue;if(i.parse){if(!Sn(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==nn&&Cn(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===nn||i.kind===2)&&Cn(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Sn(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&xn(f,o))return n;Cn(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+bn(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+bn(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+bn(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+bn(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function bn(e,t){return 2**(e-t-1)}function xn(e,t){return e===2**(t-1)-1}function Sn(e,t,n){let r,i;try{[r,i]=gn(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Cn(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===nn)>(e.node.kind===nn)||t.node.kind===nn==(e.node.kind===nn)&&t.node.depth>e.node.depth)))}function wn(e,t,n){let r=Ct(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=bt(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Tn(n,s.input({url:e})),output:({url:e})=>s.output({url:En(n,e)})}:s}function Tn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function En(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Dn(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{vt(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var On=`__TSR_index`,kn=`popstate`,An=`beforeunload`,jn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Mn(e){let t=jn.exec(e);return t?`/`+e.slice(t[0].length):e}function Nn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
2
+ \r`.includes(e)?``:encodeURIComponent(e))),Mn(e)}function Pn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=Ln(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[On];i=Fn(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[On];i=Fn(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[On]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Fn(e,t){let n=Rn();return{...t,key:n,__TSR_key:n,[On]:e}}function In(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Nn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Ln(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Rn();t.history.replaceState({[On]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Ln(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[On]-l.state[On],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Pn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(An,x,{capture:!0}),t.removeEventListener(kn,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(An,x,{capture:!0}),t.addEventListener(kn,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Ln(e,t){let n=Nn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Rn();t={[On]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Rn(){return(Math.random()+1).toString(36).slice(7)}function zn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Bn(e){return e.pathname+e.search+e.hash}function Vn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Hn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Un({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Wn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Gn(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Kn=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=In()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`);let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Ct(n)?wn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Dn(this.latestLocation,e),Ut(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=mn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&un(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:tn(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:gt(e),external:!1,searchStr:o,search:at(t?.search,i),hash:gt(r.slice(1)),state:ot(t?.state,a)}}let o=Tn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:gt(Mn(o.pathname)),external:!!this.rewrite&&zn(o,this.origin),searchStr:c,search:at(t?.search,s),hash:gt(o.hash.slice(1)),state:ot(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=pn(St(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Ln(n.href,{});n={...n,to:Tn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=Tt(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[St(c)],u=c.includes(`$`),d;if(l)d=l._branch??=_n(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??sn(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Zn(n.params,e),!rt(p))break;p===e&&(p=Object.assign(it(),p));try{Object.assign(p,t(p))}catch{}}}p??=Zn(n.params,Qn(n.params,f)?o()[3]:$n);let m=e.leaveParams?c:Mn(gt(f?kt(c,f,p,this.pathParamsDecoder):c)),h=er(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Xn(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?tr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||$n,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:$n,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=En(this.rewrite,e);C=Bn(e),zn(n,t)?(w=n.href,T=!0):w=Mn(Bn(n))}else C=_t(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=dn(r.pathname,this.processedTree);if(t){let i=Object.assign(it(),t.rawParams),{from:a,params:o,...s}=t.route,c=Zn(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return qn(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=St(this.latestLocation.href)===St(n.href)&&ct(Un(n.state),Un(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?pt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return qn(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Jr(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Hn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Vn(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(mt.test(n)||(r=pt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:zn(e,this.origin)||(n=Bn(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=or,this.preloadRoute=e=>Yr(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Tt(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=fn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!ct(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?ct(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Et(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Yt,parseSearch:e.parseSearch??Jt,protocolAllowlist:e.protocolAllowlist??ft}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=sn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:St(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?nr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Xn(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof Jn||(r=new Jn(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=it(),_=i._interpolation?kt(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{rr(i,d)}catch(e){if(x=At(e)||en(e)?e:new Yn(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:at(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Vn(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?at(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?ot(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?at(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=et(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=et(a),c={...e.search};for(let e of a)try{Object.assign(c,Xn(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{rr(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function qn(e,t,{replace:n,ignoreBlocker:r}){if(!ht(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Jn=class extends Error{},Yn=class extends Error{};function Xn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Jn(`Async validation not supported`);if(n.issues)throw new Jn(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Zn(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Qn(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!nt.call(e,t[1]))}var $n=Object.freeze({});function er(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Xn(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function tr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=tt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function nr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Qt}function rr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function ir(e,t){return e.options[t]?.preload?.()}function ar(e,t){let n=ir(e,`component`),r=ir(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function or(e,t,n){let r=()=>t===!1?void 0:t?ir(e,t):ar(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function sr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function cr(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var lr=0,ur=1,dr=2,fr=3,pr=[4];function mr(e){return typeof e[0]==`number`}function hr(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function gr(e,t){return e.routesById[t.routeId]}function _r(e,t,n){return en(e)?[fr,e]:At(e)?(e.routeId||=n,[dr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[ur,e]):[lr,e]}function vr(e,t){let n=_r(t,!0,e.id);if(n[0]!==ur)return n;try{e.options.onError?.(n[1])}catch(t){n=_r(t,!0,e.id)}return n}function yr(e,t,n,r,i){return i[0].signal.aborted?pr:Fr(e,t,n,vr(n,r),i)}async function br(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=gr(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Sr(e,r),[i,yr(e,t,u,a,n)]}if(c.aborted)return[i,pr];let p=r.paramsError??r.searchError;if(p!==void 0)return Sr(e,r),[i,yr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Tr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?hr(a,c):a);if(c.aborted)return[i,pr];let s=Fr(e,t,u,_r(o,!1,u.id),n);if(s[0]!==lr)return Sr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Sr(e,r),[i,yr(e,t,u,a,n)]}finally{r.status=h,Tr(e,r,!1,n[0])}}i()}function xr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Sr(e,t){let n=t._flight;t._flight=void 0,xr(e,t,n)?.abort()}function Cr(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=xr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function wr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Tr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Er(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Dr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return pr;if(!i)return[lr,void 0];let l=n._flight;Tr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Er(e,t,n,r,s,a,!!o[3]))).then(e=>_r(e,!1,r.id),e=>_r(e,!0,r.id)).then(t=>(t[0]!==lr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===ur&&l[2]?vr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Fr(e,t,r,await hr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Sr(e,n),pr}finally{Tr(e,n,!1,s)}}function Or(e,t,n){t[0]!==fr&&(e.status=`success`,e.error=void 0,t[0]===lr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function kr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Sr(e,r)}function Ar(e,t){return t[0]===ur||t[0]===dr?{...e,status:t[0]===ur?`error`:`notFound`,error:t[1],_flight:void 0}:e}function jr(e,t,n,r,i,a,o){let s=t[1][n],c=gr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Er(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=pr)),!p)if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}catch(n){s.invalid=!0,Sr(e,s),p=yr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!!(m&&f&&s.status===`success`&&!l&&!a[4]&&((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,xr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Dr(e,t,s,c,g,i,a).then(t=>(Or(s,t,l),t[0]===lr&&(m&&!a[0].signal.aborted&&kr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[lr,s.loaderData]),T=(async()=>{try{let e=or(c,void 0,C);e&&await hr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,yr(e,t,c,r,a)]}let r=await w;x&&r[0]===lr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Ar(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ee=Dr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Or(E,e,!1),e));return(t[2]??=[]).push([n,ee,T,E]),ee.then(e=>Ar(E,e))}async function Mr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=gr(e,t[n]);try{let e=or(i,!1);e&&await hr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Nr(e,t){t[2]&&=(Cr(e,t[2].map(e=>e[3])),void 0)}async function Pr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=fr)throw[a,t];!i&&t[0]!==lr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===fr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Fr(e,t,n,r,i,a){for(;r[0]===fr;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[fr,t]:[fr,t,a]}return[fr,o,n]}catch(e){r=a?[ur,e]:vr(n,e),a=!0}}return r}async function Ir(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===dr?Mr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=fr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==lr&&t[0]<fr&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=fr){let n=s[1];if(n[0]!==fr||n[1].options.reloadDocument||n[2])return Nr(e,t),n;c=!0,s=[0,[ur,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===ur?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=gr(e,u);try{await hr(i?Promise.resolve().then(()=>or(m,l===ur?`errorComponent`:`notFoundComponent`)):Promise.all([or(m),or(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Nr(e,t),pr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Nr(e,t),Cr(e,o),p()):u.status=`success`}return t}async function Lr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=gr(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await hr(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Rr(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Mr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=jr(e,i,t,u,f,r,l)},m=await br(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===dr){let t=await Mr(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=fr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Ir(e,i,u,r[0],Pr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Pr(i[2],void 0,void 0,h.then(e=>mr(e)?0:sr(n).length,()=>0))),o=await h}catch(t){if(Nr(e,i),t===a&&a.aborted)return pr;throw t}return mr(o)?o:Lr(e,o,a,r[6]===n.length?r[6]:0)}function zr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=gr(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>zr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Br(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Vr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!sr(t[3]).some(e=>e.id===n[1]))return;let i;try{await hr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Hr(e,t){e._committed=t,e.stores.setMatches(t)}function Ur(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=sr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=gr(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Wn(n);Hr(e,n),Cr(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Gn(e,i,n,a,l,t)}async function Wr(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Gr(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Kr(e,t,n,r,i){let a=n.map(e=>({...e}));wr(a);for(let t of r)Sr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ir(e,o,r,t[0],i)}catch(t){throw Cr(e,a),t}if(mr(s)){Cr(e,a),s[0]===fr&&e._tx===t&&e._committed===n&&await Gr(e,t,s);return}if(await Lr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Cr(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Sr(e,n))}Hr(e,a),Cr(e,n,a)}async function qr(e,t,n,r,i,a){let o=await Rr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(mr(o)){let n=o[0]===fr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Br(e,t),Cr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Br(e,t);return}await Gr(e,t,o);return}let s=o[1];if(e._tx===t&&await Vr(e,t),e._tx!==t){Br(e,t),Cr(e,s),Nr(e,o);return}let c=t[2],l=Hn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Vr(e,t),e._tx!==t){Br(e,t),Cr(e,s),Nr(e,o);return}let n=await e.startTransition(()=>{Br(e,t),Ur(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Nr(e,o);return}u?.length&&Kr(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Jr(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Hn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Wr(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});wr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Cr(e,m),await Wr(e,n);return}e._preflight=void 0;let g,_=()=>qr(e,y,f,()=>zr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Wr(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Tr(e,t,!1)}n[0].abort(),Cr(e,n[3],y[3],!0)}if(e._tx!==y){Cr(e,y[3]),y[3]=[],g?.(),await Wr(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&zr(e,y),g?.(_()),await y[5]}async function Yr(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),wr(a),o=(e._preloads??=new Map).set(i,a),s=await Rr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Cr(e,a)),i.abort()}if(!mr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){At(e)||console.error(e);return}}}var Xr=`Error preloading route! ☝️`,Zr=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Qt:this.parentRoute||yt();let r=n?Qt:t?.path;r&&r!==`/`&&(r=xt(r));let i=t?.id||r,a=n?Qt:bt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:bt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=St(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>$t({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Qr=class extends Zr{constructor(e){super(e)}},$r=class extends d.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?d.createElement(this.props.errorComponent??ei,{error:e[0],reset:this.reset}):this.props.children}};function ei({error:e}){let[t,n]=d.useState(!1);return(0,h.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,h.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,h.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,h.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,h.jsx)(`div`,{children:(0,h.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,h.jsx)(`code`,{children:e.message}):null})}):null]})}var ti=()=>!0,ni=()=>!1;function ri({children:e,fallback:t=null}){return(0,h.jsx)(d.Fragment,{children:ii()?e:t})}function ii(e=!0){return d.useSyncExternalStore(ai,ti,e?ni:ti)}function ai(){return()=>{}}var oi=d.createContext(null);function si(e){return d.useContext(oi)}function ci(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{cr(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var li=d.createContext(void 0),ui=d.createContext(void 0);function di({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function fi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var pi=[],mi=0,{link:hi,unlink:gi,propagate:_i,checkDirty:vi,shallowPropagate:yi}=di({update(e){return e._update()},notify(e){pi[xi++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Ti(e))}}),bi=0,xi=0,Si,Ci=0;function wi(e){try{++Ci,e()}finally{--Ci||Ei()}}function Ti(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=gi(n,e)}function Ei(){if(!(Ci>0)){for(;bi<xi;){let e=pi[bi];pi[bi++]=void 0,e.notify()}bi=0,xi=0}}function Di(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return Si!==void 0&&hi(i,Si,mi),i._snapshot},subscribe(e){let t=fi(e),n={current:!1},r=Oi(()=>{i.get(),n.current?(Si=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Si,o=t?.compare??Object.is;if(n)Si=i,++mi,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Si=a,n&&(i.flags&=-5),Ti(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&vi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&yi(e)}}else e&32&&(i.flags=e&-33);return Si!==void 0&&hi(i,Si,mi),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(_i(e),yi(e),Ei())}},i}function Oi(e){let t=()=>{let t=Si;Si=n,++mi,n.depsTail=void 0,n.flags=6;try{return e()}finally{Si=t,n.flags&=-5,Ti(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&vi(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Ti(this)}};return t(),n}var ki=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ai=o(((e,t)=>{t.exports=ki()})),ji=o((e=>{var t=u(),n=Ai();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Mi=o(((e,t)=>{t.exports=ji()}))();function Ni(e,t){return e===t}function R(e,t=e=>e,n){let r=n?.compare??Ni,i=(0,d.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,d.useCallback)(()=>e.get(),[e]);return(0,Mi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Pi={};function Fi(e,t){let n=d.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ot(n.current,i):i}}function Ii(e){let t=si(),n=d.useContext(e.from?ui:li),r=e.from??n,i=t.stores.getMatchStore(r),a=Fi(e,t),o=R(i,e=>e?a(e):Pi);if(o!==Pi)return o;(e.shouldThrow??!0)&&yt()}function Li(e){return Ii({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ri(e){let{select:t,...n}=e;return Ii({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function zi(e){return Ii({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Bi(e){return Ii({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Vi(e){let t=si();return d.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Hi(e){return Ii({...e,select:t=>e.select?e.select(t.context):t.context})}function Ui(...e){let t=d.useRef(e),n=t.current;return e.forEach((e,t)=>{ct(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Wi(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Xr)})}function Gi(e,t){let n=typeof e==`string`&&pt(e);if(n)return t.has(n)?e:null}function Ki(e,t,n,r){let i=wt(e.pathname,r),a=wt(t.pathname,r);return(n?.exact?i!==a:!(i.startsWith(a)&&(i.length===a.length||i[a.length]===`/`)))||(n?.includeSearch??!0)&&!ct(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function qi(e,t,n){let r=si(),i=d.useRef(null),a=d.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:v}=e,[y,b,x]=Ui(e.search,e.params,o),S=d.useContext(li),C=(r.stores._linkScopes??={})[S]??=ci(r,S),[w,T,E]=d.useMemo(()=>{let t=Gi(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=C[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=ta(t,r,u),s=u||o&&!pt(o)?Ki(e,t,x,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,x?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,C,e.from,e.hash,e.href,s,y,b,e.state,e.mask,e.unsafeRelative,x,u]),[ee,D]=d.useSyncExternalStore(C[1],T,E||T),te=D===void 0&&ee,ne=u||ee===void 0,re=d.useRef(!1),O=e.reloadDocument||te||ne?!1:c??r.options.defaultPreload,k=l??r.options.defaultPreloadDelay??0,A=d.useCallback(e=>{let t=e?.isIntersecting;if(!(t??O===`intent`)){t===!1&&$i(i);return}if(!k){Wi(r,w);return}i.t??=setTimeout(()=>{i.t=void 0,Wi(r,w)},k)},[r,w,i,O,k]);d.useEffect(()=>{if(!O)return;O===`render`&&!re.current&&(re.current=!0,Wi(r,w));let e=!0,t;return O===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&A(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),$i(i)}},[r,w,O,A,i]);let j=Zi(e,n);if(j.ref=t?a:i,te)return j.href=te,j;let M=t=>{let n=f??t.currentTarget.getAttribute(`target`);!ne&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),$i(i),r.navigate({...e,_fromLocation:w._fromLocation}))},ie=()=>{O===`intent`&&Wi(r,w)},ae=()=>{O===`intent`&&$i(i)};return j.onClick=ea(p,M),j.onBlur=ea(m,ae),j.onFocus=ea(h,A),j.onMouseEnter=ea(g,A),j.onMouseLeave=ea(_,ae),j.onTouchStart=ea(v,ie),Qi(j,e,D,ee,ne,n)}var Ji={},Yi={className:`active`},Xi=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Zi(e,t){let n={};for(let r in e)Xi.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Qi(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=tt(n?o:s,{})??(n?Yi:Ji);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var $i=e=>{clearTimeout(e.t),e.t=void 0},ea=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ta(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!((r.external||i!==r.publicHref)&&ht(i,t.protocolAllowlist)))return i}var na=d.memo(d.forwardRef((e,t)=>{let n=e._asChild||`a`,r=qi(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return d.createElement(n,r,i)}),ra);function ra(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Xi.has(r)||!ct(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ia=class extends Zr{constructor(e){super(e),this.useMatch=e=>Ii({...e,from:this.id}),this.useRouteContext=e=>Hi({...e,from:this.id}),this.useSearch=e=>Bi({...e,from:this.id}),this.useParams=e=>zi({...e,from:this.id}),this.useLoaderDeps=e=>Ri({...e,from:this.id}),this.useLoaderData=e=>Li({...e,from:this.id}),this.useNavigate=()=>Vi({from:this.fullPath}),this.Link=d.forwardRef((e,t)=>(0,h.jsx)(na,{ref:t,from:this.fullPath,...e}))}};function aa(e){return new ia(e)}var oa=class extends Qr{constructor(e){super(e),this.useMatch=e=>Ii({...e,from:this.id}),this.useRouteContext=e=>Hi({...e,from:this.id}),this.useSearch=e=>Bi({...e,from:this.id}),this.useParams=e=>zi({...e,from:this.id}),this.useLoaderDeps=e=>Ri({...e,from:this.id}),this.useLoaderData=e=>Li({...e,from:this.id}),this.useNavigate=()=>Vi({from:this.fullPath}),this.Link=d.forwardRef((e,t)=>(0,h.jsx)(na,{ref:t,from:this.fullPath,...e}))}};function sa(e){return new oa(e)}function ca(e){let t=si(),n=`not-found-${R(t.stores.location,e=>e.pathname)}-${R(t.stores.status)}`;return(0,h.jsx)($r,{getResetKey:()=>n,onCatch:(t,n)=>{if(At(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(At(t))return e.fallback?.(t);throw t},children:e.children})}function la(){return(0,h.jsx)(`p`,{children:`Not Found`})}function ua(e,t,n){return t.options.notFoundComponent?(0,h.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,h.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,h.jsx)(la,{})}function da(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,h.jsx)(n,{}):null}var fa=(e,t)=>e[0]===t[0]&&e[1]===t[1],pa=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,ma=d.memo(function({routeId:e}){let t=si();return ha(t,R(t.stores.getMatchStore(e)))});function ha(e,t){let n=e.routesById[t.routeId],r=da(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=pa(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,h.jsx)(ga,{match:t});s&&(l=(0,h.jsx)(ri,{fallback:r,children:l})),o&&(l=(0,h.jsx)(ca,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return d.createElement(o,e)},children:l})),i&&(l=(0,h.jsx)($r,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(At(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,h.jsx)(d.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,h.jsx)(li.Provider,{value:t.routeId,children:(0,h.jsxs)(u,{children:[l,null]})}):(0,h.jsxs)(li.Provider,{value:t.routeId,children:[l,null]})}var ga=d.memo(function({match:e}){let t=si(),n=e.routeId,r=t.routesById[n],i=d.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=d.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,h.jsx)(e,{},i):(0,h.jsx)(_a,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!pa(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return da(t,r)}if(e.status===`notFound`)return ua(t,r,e.error);if(e.status===`error`)throw e.error;return a}),_a=d.memo(function(){let e=si(),t=d.useContext(li),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=R(a,e=>[!!e._notFound,e.error],{compare:fa}),i=R(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ua(e,e.routesById[t],r);if(!i)return null;let a=(0,h.jsx)(ma,{routeId:i});return t===`__root__`?(0,h.jsx)(d.Suspense,{fallback:da(e),children:a}):a});function va(e,t){let n=e[1];e.length=0,n?.(t)}function ya({t:e}){let t=si(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{va(n,!1),n.push(i,a),e(t),d.startTransition(r)}),$e(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(St(r.publicHref)!==St(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Hn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ba(){let e=si(),t=e.routesById[Qt],n=da(e,t),r=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ya,{t:d.useState()[1]}),e.ssr?(0,h.jsx)(xa,{}):(0,h.jsx)(d.Suspense,{fallback:n,children:(0,h.jsx)(xa,{})})]});return e.options.InnerWrap?(0,h.jsx)(e.options.InnerWrap,{children:r}):r}function xa(){let e=si(),t=e._rendered,n=R(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;$e(()=>{t[0]===n&&va(t,!0)},[t,n]);let a=i?(0,h.jsx)(ma,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,h.jsx)($r,{getResetKey:()=>r,onCatch:void 0,children:a})}var Sa=e=>({createMutableStore:Di,createReadonlyStore:Di,batch:wi}),Ca=e=>new wa(e),wa=class extends Kn{constructor(e){super(e,Sa)}};function Ta({router:e,children:t,...n}){rt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,h.jsx)(oi.Provider,{value:e,children:t});return e.options.Wrap?(0,h.jsx)(e.options.Wrap,{children:r}):r}function Ea({router:e,...t}){return(0,h.jsx)(Ta,{router:e,...t,children:(0,h.jsx)(ba,{})})}function Da(e){let t=si();return R(t.stores.location,Fi(e,t))}var Oa=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,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){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&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function re(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,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),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}}}})),ka=o(((e,t)=>{t.exports=Oa()})),Aa=o((e=>{var t=u();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`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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.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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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})}}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=c(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=c(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})}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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),ja=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=Aa()})),Ma=o((e=>{var t=ka(),n=u(),r=ja();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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n: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 d(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}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function O(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?O(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}var k=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},ie=[],ae=-1;function oe(e){return{current:e}}function N(e){0>ae||(e.current=ie[ae],ie[ae]=null,ae--)}function P(e,t){ae++,ie[ae]=e.current,e.current=t}var F=oe(null),se=oe(null),ce=oe(null),le=oe(null);function ue(e,t){switch(P(ce,t),P(se,e),P(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(F),P(F,e)}function de(){N(F),N(se),N(ce)}function fe(e){e.memoizedState!==null&&P(le,e);var t=F.current,n=Hd(t,e.type);t!==n&&(P(se,e),P(F,n))}function pe(e){se.current===e&&(N(F),N(se)),le.current===e&&(N(le),Qf._currentValue=M)}var I,L;function me(e){if(I===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||``,L=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+I+e+L}var he=!1;function ge(e,t){if(!e||he)return``;he=!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}e.call(n.prototype)}}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(`
5
+ `),l=s.split(`
6
+ `);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=`
7
+ `+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{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,ke=t.unstable_LowPriority,Ae=t.unstable_IdlePriority,je=t.log,Me=t.unstable_setDisableYieldValue,Ne=null,Pe=null;function Fe(e){if(typeof je==`function`&&Me(e),Pe&&typeof Pe.setStrictMode==`function`)try{Pe.setStrictMode(Ne,e)}catch{}}var Ie=Math.clz32?Math.clz32:ze,Le=Math.log,Re=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(Le(e)/Re|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(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&261888;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 We(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=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(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 Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(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 qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(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-Ie(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&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ie(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(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 tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=j.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function rt(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[at])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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={},Tt={};function Et(e){return ye.call(Tt,e)?!0:ye.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(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 Ot(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 kt(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 At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(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 Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ft(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(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=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(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=``+At(s):e.removeAttribute(`name`)}function zt(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)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(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),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(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=``+At(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 Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(k(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(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||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(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 Yt=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`],[`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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(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="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(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&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(yu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||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 cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.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 pn=i.slice(e,1<r?1-r:void 0)}function hn(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 gn(){return!0}function _n(){return!1}function vn(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)?gn:_n,this.isPropagationStopped=_n,this}return p(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=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=p({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=p({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(p({},En,{dataTransfer:0})),kn=vn(p({},xn,{relatedTarget:0})),An=vn(p({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(p({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(p({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(p({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(p({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(p({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(p({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(p({},En,{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})),Un=vn(p({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!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 Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Td(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){vd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(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(!ye.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(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=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(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=Ft(e.document)}return t}function Dr(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 Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(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}),jr&&Sr(jr,r)||(jr=r,r=Td(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};cn&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function Rr(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var zr=Rr(`animationend`),Br=Rr(`animationiteration`),Vr=Rr(`animationstart`),Hr=Rr(`transitionrun`),Ur=Rr(`transitionstart`),Wr=Rr(`transitioncancel`),Gr=Rr(`transitionend`),Kr=new Map,qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(` `);qr.push(`scrollEnd`);function Jr(e,t){Kr.set(e,t),xt(t,[e])}var Yr=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)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[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&&ri(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(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-Ie(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ai={};function oi(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 si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(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&65011712,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 ui(e,t){e.flags&=65011714;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 di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,F.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=si(31,n,t,a),e.elementType=ee,e.lanes=o,e;case _:return fi(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=si(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case C:return e=si(13,n,t,a),e.elementType=C,e.lanes=o,e;case w:return e=si(19,n,t,a),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Ie(r)-1;r&=~(1<<i),n+=1;var a=32-Ie(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Ie(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,R=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ut(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:Mi=Mi.return}}function Bi(e){if(e!==Mi)return!1;if(!R)return zi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Ni&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=uf(e)}else t===27?(t=Ni,Zd(e.type)?(e=lf,lf=null,Ni=e):Ni=t):Ni=Mi?cf(e.stateNode.nextSibling):null;return!0}function Vi(){Ni=Mi=null,R=!1}function Hi(){var e=Pi;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=oe(null),Gi=null,Ki=null;function qi(e,t,n){P(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,N(Wi)}function Yi(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 Xi(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),Yi(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),Yi(s,n,e),s=null}else 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 Zi(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;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=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()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=ud(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=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 ga=A.S;A.S=function(e,t){$l=we(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=oe(null);function va(){var e=_a.current;return e===null?J.pooledCache:e}function ya(e,t){t===null?P(_a,_a.current):P(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ma(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=J,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,Ma(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function Aa(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Ma(e){if(e===xa||e===Ca)throw Error(i(483))}var Na=null,Pa=0;function Fa(e){var t=Pa;return Pa+=1,Na===null&&(Na=[]),Ea(Na,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function La(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ra(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=li(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|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=pi(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===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&Da(i)===t.type)?(t=a(t,n.props),Ia(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Ia(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=hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=di(t.type,t.key,t.props,null,e.mode,n),Ia(n,t),n.return=e,n;case g:return t=hi(t,e.mode,n),t.return=e,t;case E:return t=Da(t),f(e,t,n)}if(k(t)||ne(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Fa(t),n);if(t.$$typeof===x)return f(e,ta(e,t),n);La(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 h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=Da(n),p(e,t,n,r)}if(k(n)||ne(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Fa(n),r);if(n.$$typeof===x)return p(e,t,ta(e,n),r);La(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 h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=Da(r),m(e,t,n,r,i)}if(k(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Fa(r),i);if(r.$$typeof===x)return m(e,t,n,ta(t,r),i);La(t,r)}return null}function v(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),R&&Di(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 R&&Di(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(g.key===null?h:g.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)}),R&&Di(i,h),l}function y(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),R&&Di(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 R&&Di(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(v.key===null?g:v.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)}),R&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ia(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Ia(c,o),c.return=e,e=c)}return s(e);case g: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=hi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Da(o),b(e,r,o,c)}if(k(o))return v(e,r,o,c);if(ne(o)){if(l=ne(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Fa(o),c);if(o.$$typeof===x)return b(e,r,ta(e,o),c);La(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=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(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 Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Ka(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,Qe(e,n)}}function qa(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 Ja=!1;function Ya(){if(Ja){var e=fa;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!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,m=f!==s.lane;if(m?(X&f)===f:(r&f)===f){f!==0&&f===da&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Wl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=oe(null),eo=oe(0);function z(e,t){e=Hl,P(eo,e),P($a,t),Hl=e|t.baseLanes}function to(){P(eo,Hl),P($a,$a.current)}function no(){Hl=eo.current,N($a),N(eo)}var ro=oe(null),io=null;function ao(e){var t=e.alternate;P(uo,uo.current&1),P(ro,e),io===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){P(uo,uo.current),P(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(P(uo,uo.current),P(ro,e),io===null&&(io=e)):co(e)}function co(){P(uo,uo.current),P(ro,ro.current)}function lo(e){N(ro),io===e&&(io=null),N(uo)}var uo=oe(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 po=0,B=null,V=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return po=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){A.H=Bs;var t=V!==null&&V.next!==null;if(po=0,mo=V=B=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&Qi(e)&&(ac=!0))}function Eo(e,t,n,r){B=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=V=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(V===null?null:V.memoizedState)!==e&&(B.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}po=0,mo=V=B=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?B.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=mo===null?B.memoizedState:mo.next;if(t!==null)mo=t,V=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},mo===null?B.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=B,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===x)return ea(e)}throw Error(i(438,String(e)))}function Io(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=No(),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]=D;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),V,e)}function zo(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?(po&f)===f:(X&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===da&&(d=!0);else if((po&p)===p){u=u.next,p===da&&(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,Wl|=p;f=u.action,_o&&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,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(ac=!0,d&&(n=fa,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 Bo(e){var t=Mo(),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);xr(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=B,a=Mo(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((V||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),J===null)throw Error(i(349));o||po&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=No(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function Ko(e){var t=ni(e,2);t!==null&&mu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Fe(!0);try{n()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,V,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,a){if(Ls(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)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(R){var n=J.formState;if(n!==null){a:{var r=B;if(R){if(Ni){b:{for(var i=Ni,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=cf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,B,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,B,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),V,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===xa?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=V;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=No(),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 cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();B.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;V!==null&&r!==null&&Co(r,V.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(B.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=No(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(q&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(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 vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||po&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),B.lanes|=e,Wl|=e,n)}function Cs(e,t,n,r){return xr(n,t)?n:$a.current===null?!(po&42)||po&1073741824&&!(X&261930)?(ac=!0,e.memoizedState=n):(e=pu(),B.lanes|=e,Wl|=e,t):(e=Ss(e,n,r),xr(e,t)||(ac=!0),e)}function ws(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,Is(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ha(c,r),fu(e)):Fs(e,t,r,fu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,M,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:M},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},fu())}function ks(){return ea(Qf)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(mu(r,t,n),Ka(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ti(e,t,n,r),n!==null&&(mu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,fu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(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,xr(s,o))return ei(e,t,i,0),J===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return mu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&mu(t,e,2)}function Ls(e){var t=e.alternate;return e===B||t!==null&&t===B}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Bs={readContext:ea,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ea,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Fe(!0);try{e()}finally{Fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Fe(!0);try{n(t)}finally{Fe(!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=Ns.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,B,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=jo();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),J===null)throw Error(i(349));X&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=J.identifierPrefix;if(R){var n=Ei,r=Ti;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,B)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),V.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),V,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return V===null?Ss(n,e,t):Cs(n,V.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return V===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,V,e,t)},useMemoCache:Io,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Wa(r);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(mu(t,e,r),Ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Wa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(mu(t,e,r),Ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Wa(n);r.tag=2,t!=null&&(r.callback=t),t=Ga(e,r,n),t!==null&&(mu(t,e,n),Ka(t,e,n))}};function Ks(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?!Sr(n,r)||!Sr(i,a):!0}function qs(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&&Gs.enqueueReplaceState(t,t.state,null)}function Js(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=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){Yr(e)}function Xs(e){console.error(e)}function Zs(e){Yr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(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 ec(e,t,n){return n=Wa(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Wa(e),e.tag=3,e}function nc(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(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(R)return t=ro.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=ec(e.stateNode,r,a),qa(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ec(n.stateNode,r,e),qa(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`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),qa(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?Ba(t,null,n,r):za(t,e.child,n,r)}function sc(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 $i(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ac?(ko(e,t,i),Ac(e,t,i)):(R&&s&&ki(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return _c(e,t,n,r,i)}function uc(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 fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?to():z(t,a),so(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),to(),co(t)):(ya(t,a.cachePool),z(t,a),co(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),to(),so(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return za(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(oo(t),(e=Ni)?(e=rf(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=J,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),mu(r,e,s),ic;Eu(),t=mc(e,t,n)}else e=o.treeContext,Ni=cf(s.nextSibling),Mi=t,R=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=pc(t,r),t.flags|=4096;return t}return e=li(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 _c(e,t,n,r,i){return $i(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ac?(ko(e,t,i),Ac(e,t,i)):(R&&r&&ki(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ac?(ko(e,t,a),Ac(e,t,a)):(R&&r&&ki(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if($i(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ha(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(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&&Gs.enqueueReplaceState(a,a.state,null),Xa(t,r,a,i),Ya(),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=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=ea(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)&&qs(t,a,r,o),Va=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Va?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=Va||Ks(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,Ua(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=ea(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)&&qs(t,a,r,c),Va=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Va||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=Va||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(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)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=za(t,e.child,null,i),t.child=za(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function bc(e,t,n,r){return Vi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function H(e){return{baseLanes:e,cachePool:ba()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function Cc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(a?ao(t):co(t),(e=Ni)?(e=rf(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Tc({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=H(n),r.childLanes=Sc(e,s,n),t.memoizedState=xc,dc(null,r)):(ao(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Tc({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,za(t,e.child,null,n),r=t.child,r.memoizedState=H(n),r.childLanes=Sc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ac||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=J,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),mu(s,e,r),ic;af(c)||Eu(),t=Ec(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=cf(c.nextSibling),Mi=t,R=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=wc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=H(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return za(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function Oc(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 kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,P(uo,o),oc(e,t,r,n),r=R?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(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`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zi(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=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Qi(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(uo,uo.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!jc(e,n)&&!(t.flags&128))return ac=!1,Mc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,R&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===S){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===T){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=O(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ua(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),Ya(),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=bc(e,t,r,n);break a}else if(r!==a){a=_i(Error(i(424)),t),Ui(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=cf(e.firstChild),Mi=t,R=!0,Pi=null,Fi=!0,n=Ba(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=Ac(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Bd(ce.current).createElement(n),r[at]=t,r[ot]=e,Pd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&R&&(r=t.stateNode=ff(t.type,t.pendingProps,ce.current),Mi=t,Fi=!0,a=Ni,Zd(t.type)?(lf=a,Ni=cf(r.firstChild)):Ni=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=Ni)&&(r=tf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=cf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),Qf._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=Ni)&&(n=nf(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Li(t)),null;case 13:return Cc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=J,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ha(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Ua(e,t),Xa(t,null,null,n),Ya()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function U(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw Oa=wa,Sa}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,Jl|=t)}function Lc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var 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}}function Rc(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&65011712,r|=i.flags&65011712,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 zc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?U(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(U(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(U(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&U(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(pe(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&U(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=F.current,Bi(t)?Ri(t,e):(e=ff(a,r,n),t.stateNode=e,U(t))}return Rc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&U(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=F.current,Bi(t))Ri(t,o);else{var s=Bd(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[at]=t,o[ot]=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(Pd(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&&U(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&U(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Li(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(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[at]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(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[at]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(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),Ic(t,t.updateQueue),Rc(t),null);case 4:return de(),e===null&&xd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ji(t.type),Rc(t),null;case 19:if(N(uo),r=t.memoizedState,r===null)return Rc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return P(uo,uo.current&1|2),R&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>eu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return Rc(t),null}else 2*we()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Lc(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)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=uo.current,P(uo,a?n&1|2:n&1),R&&Di(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(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&&N(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(uo),null;case 4:return de(),null;case 10:return Ji(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&N(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ai(t),t.tag){case 3:Ji(oa),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:N(uo);break;case 10:Ji(t.type);break;case 22:case 23:lo(t),no(),e!==null&&N(_a);break;case 24:Ji(oa)}}function W(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){Q(t,t.return,e)}}function Hc(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){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Q(e,e.return,t)}}}function Wc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Gc(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:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Q(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){Q(e,t,n)}else n.current=null}function qc(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){Q(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Q(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(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&&Zd(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 Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[at]=e,t[ot]=n}catch(t){Q(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Er(e),Dr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&W(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(bl(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{Qa(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:bl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),el=i,tl=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(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 G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Pe&&typeof Pe.onCommitFiberUnmount==`function`)try{Pe.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:tl||Kc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null)if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Q(n,t,e)}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ll(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ll(e,t,n),tl=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Q(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Hc(3,e,e.return),W(3,e),Hc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,hl(t,e),tl=d,el=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),xl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Kc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),W(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Gc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&ca(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&W(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Q(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:Dl(a,o,s,c,i),W(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(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:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var K={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,J=null,Y=null,X=0,Z=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return q&2&&X!==0?X&-X:A.T===null?nt():ud()}function pu(){if(ql===0)if(!(X&536870912)||R){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),ql=e}else ql=536870912;return e=ro.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===J&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,X,ql,!1)),Ye(e,n),(!(q&2)||e!==J)&&(e===J&&(!(q&2)&&(Gl|=n),Ul===4&&vu(e,X,ql,!1)),nd(e))}function hu(e,t,n){if(q&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(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=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(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)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-we(),10<a)){if(vu(r,t,ql,!zl),We(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},jl(t,a,d);var m=(a&62914560)===a?Ql-we():(a&4194048)===a?$l-we():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(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(!xr(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 vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ie(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function yu(){return q&6?!0:(rd(0,!1),!1)}function bu(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,Ki=Gi=null,Ao(e),Na=null,Pa=0,e=Y;for(;e!==null;)Vc(e.alternate,e),e=e.return;Y=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),J=e,Y=n=li(e.current,null),X=t,Z=0,Rl=null,zl=!1,Bl=Ge(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ie(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,$r(),n}function Su(e,t){B=null,A.H=Bs,t===xa||t===Ca?(t=Aa(),Z=3):t===Sa?(t=Aa(),Z=4):Z=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Y===null&&(Ul=1,Qs(e,_i(t,e.current)))}function Cu(){var e=ro.current;return e===null?!0:(X&4194048)===X?io===null:(X&62914560)===X||X&536870912?e===io:!1}function wu(){var e=A.H;return A.H=Bs,e===null?Bs:e}function Tu(){var e=A.A;return A.A=K,e}function Eu(){Ul=4,zl||(X&4194048)!==X&&ro.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||J===null||vu(J,X,ql,!1)}function Du(e,t,n){var r=q;q|=2;var i=wu(),a=Tu();(J!==e||X!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Z!==0&&Y!==null){var s=Y,c=Rl;switch(Z){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Z;if(Z=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Z,Z=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,q=r,A.H=i,A.A=a,Y===null&&(J=null,X=0,$r()),o}function Ou(){for(;Y!==null;)ju(Y)}function ku(e,t){var n=q;q|=2;var r=wu(),a=Tu();J!==e||X!==t?(tu=null,eu=we()+500,xu(e,t)):Bl=Ge(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=Rl;b:switch(Z){case 1:Z=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Z=0,Rl=null,Mu(t);break}t=function(){Z!==2&&Z!==9||J!==e||(Z=7),nd(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:Ta(o)?(Z=0,Rl=null,Mu(t)):(Z=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Wf(s):c.stateNode.complete){Z=0,Rl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Pu(u))}break b}}Z=0,Rl=null,Nu(e,t,o,5);break;case 6:Z=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Ki=Gi=null,A.H=r,A.A=a,q=n,Y===null?(J=null,X=0,$r(),Ul):0}function Au(){for(;Y!==null&&!Se();)ju(Y)}function ju(e){var t=Nc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:Ao(t);default:Vc(n,t),t=Y=ui(t,Hl),t=Nc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Nu(e,t,n,r){Ki=Gi=null,Ao(t),Na=null,Pa=0;var i=t.return;try{if(rc(e,i,t,n,X)){Ul=1,Qs(e,_i(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Ul=1,Qs(e,_i(n,e.current)),Y=null;return}t.flags&32768?(R||r===1?e=!0:Bl||X&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=zc(t.alternate,t,Hl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Ul=6,Y=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(q&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,Xe(e,n,o,s,c,l),e===J&&(Y=J=null,X=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Oe,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=A.T,A.T=null,a=j.p,j.p=2,s=q,q|=4;try{al(e,t,n)}finally{q=s,j.p=a,A.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=q;q|=4;try{_l(t,e);var a=zd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(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}}sp=!!Rd,zd=Rd=null}finally{q=i,j.p=r,A.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=q;q|=4;try{ol(e,t.alternate,t)}finally{q=i,j.p=r,A.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,Ce();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),tt(n),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot==`function`)try{Pe.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=j.p,j.p=2,A.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{A.T=t,j.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=tt(ou),r=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,q&6)throw Error(i(331));var c=q;if(q|=4,Pl(o.current),El(o,o.current,s,n),q=c,rd(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot==`function`)try{Pe.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{j.p=a,A.T=r,Bu(e,t)}}function Uu(e,t,n){t=_i(n,t),t=ec(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Ye(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=_i(n,e),n=tc(2),r=Ga(t,n,2),r!==null&&(nc(n,r,t,e),Ye(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;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)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,J===e&&(X&n)===n&&(Ul===4||Ul===3&&(X&62914560)===X&&300>we()-Ql?!(q&2)&&xu(e,0):Kl|=n,Jl===X&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=qe()),e=ni(e,t),e!==null&&(Ye(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return be(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-Ie(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=X,a=We(r,r===J?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=we(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ie(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=J,n=X,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),tt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Ae;break;default:n=Oe}return r=sd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=X;return r=We(e,e===J?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,we()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){q&6?be(Ee,id):ad()})}function ud(){if(td===0){var e=da;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<qr.length;md++){var hd=qr[md];Jr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Jr(zr,`onAnimationEnd`),Jr(Br,`onAnimationIteration`),Jr(Vr,`onAnimationStart`),Jr(`dblclick`,`onDoubleClick`),Jr(`focusin`,`onFocus`),Jr(`focusout`,`onBlur`),Jr(Hr,`onTransitionRun`),Jr(Ur,`onTransitionStart`),Jr(Wr,`onTransitionCancel`),Jr(Gr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;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){Yr(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){Yr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,yt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!ln||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 Cd(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=mt(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}on(function(){var r=a,i=en(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case zr:case Br:case Vr:l=An;break;case Gr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,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=sn(m,p),g!=null&&d.push(wd(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(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c))if(ur)v=yr;else{v=_r;var y=gr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Td(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(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=sn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=sn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(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=sn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10
+ `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(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=Zt(``+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}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;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));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=Zt(``+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`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`:$(`beforetoggle`,e),$(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:qt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ot]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Dt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`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:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`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:Md(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:Md(e,t,s,c,n,null)}Ut(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:Md(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(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)||Md(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`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Rt(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)||Md(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(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:Md(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Ht(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:Md(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`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(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||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[ft])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=j.d;j.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);vt(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ce.current)?gf(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`?(t=Af(n.href),n=_t(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,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=Af(n.href);var o=_t(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,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`?(t=Pf(n),n=_t(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Lt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),vt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,vt(a),a):(r=n,(a=mf.get(o))&&(r=p({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[ft]||a[at]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function $f(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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ha(a),e}function tp(e){return e?(e=ai,e):ai}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Wa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ga(e,r,t),n!==null&&(mu(n,e,t),Ka(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=et(t);var n=ni(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,up(e,t,n,r)}finally{j.p=a,A.T=i}}function lp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,up(e,t,n,r)}finally{j.p=a,A.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ie(o);s.entanglements[1]|=c,o&=~c}nd(a),!(q&6)&&(eu=we()+500,rd(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=en(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=mt(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 fp=e,null}function mp(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`resize`: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`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`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Te()){case Ee:return 2;case De:return 8;case Oe:case ke:return 32;case Ae:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=ht(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=mt(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,rt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[ot]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[st]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));j.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=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ne=zp.inject(Rp),Pe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ys,s=Xs,c=Zs;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[st]=t.current,xd(e),new Fp(t)}})),Na=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=Ma()}))(),Pa=new We({defaultOptions:{queries:{staleTime:1e4,retry:1,refetchOnWindowFocus:!1},mutations:{retry:0}}}),Fa=`fafa.web.theme`,Ia=(0,d.createContext)(null);function La(){try{let e=globalThis.localStorage?.getItem(Fa);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}function Ra(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-color-scheme: dark)`).matches}function za(e){if(typeof document>`u`)return;let t=e===`dark`;document.documentElement.classList.toggle(`dark`,t),document.documentElement.style.colorScheme=t?`dark`:`light`;let n=document.querySelector(`meta[name="theme-color"]`);n&&(n.content=t?`#0e1013`:`#fafafa`)}function Ba({children:e}){let[t,n]=(0,d.useState)(()=>La()),[r,i]=(0,d.useState)(()=>Ra());(0,d.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>{i(e.matches)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let a=t===`system`?r?`dark`:`light`:t;(0,d.useEffect)(()=>{za(a)},[a]);let o=(0,d.useCallback)(e=>{n(e);try{globalThis.localStorage?.setItem(Fa,e)}catch{}},[]),s=(0,d.useMemo)(()=>({theme:t,resolvedTheme:a,setTheme:o}),[t,a,o]);return(0,h.jsx)(Ia.Provider,{value:s,children:e})}function Va(){let e=(0,d.useContext)(Ia);if(!e)throw Error(`useTheme must be used inside ThemeProvider`);return e}var Ha=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join(`-`).toLowerCase();function Ua(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Ha(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Wa=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},Ga=e=>{let t=Wa(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ka=(...e)=>{let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of n.split(/\s+/))e&&t.add(e);return[...t].join(` `)},qa={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 Ja(e){return e!=null}function Ya(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??qa.width,a=e.size??e.height??qa.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?Ka(...c):Ka(`lucide`,...s,...c),u=t.strokeWidth??qa[`stroke-width`];if(t.absoluteStrokeWidth){let n=Number(u)*Number(e.size??e.width??qa.width)/Number(t.size??t.width??qa.width);Number.isFinite(n)&&(u=n)}return[`svg`,{...Object.entries(qa).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ja(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ja(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ja(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 Xa(e,t={}){return Ya(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Za=e=>{if(typeof e!=`object`||!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith(`aria-`)||t===`role`||t===`title`)&&e[t]!=null)return!0;return!1},Qa=(0,d.createContext)({}),$a=()=>(0,d.useContext)(Qa),eo=(0,d.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},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=$a()??{},b=Za(f),[x,S,C=[]]=Xa(u,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Ka(y,s),hasA11yProp:b,attributes:f});return(0,d.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,d.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function z(e,t=[],n=[]){let r=typeof e==`string`?Ua(e,t,n):e,i=(0,d.forwardRef)(({className:e,...t},n)=>(0,d.createElement)(eo,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ga(r.name)),i}var to={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};to.node;var no=z(to),ro={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ro.node;var io=z(ro),ao={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ao.node;var oo=z(ao),so={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};so.node;var co=z(so),lo={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};lo.node;var uo=z(lo),fo={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`}]]};fo.node;var po=z(fo),B={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`]};B.node;var V=z(B),mo={name:`circle-exclamation-point`,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`,`circle-alert`]};mo.node;var ho=z(mo),go={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`}]]};go.node;var _o=z(go),vo={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`}]]};vo.node;var yo=z(vo),bo={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`}]]};bo.node;var xo=z(bo),So={name:`folder-check`,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`}],[`path`,{d:`m9 13 2 2 4-4`,key:`6343dt`}]]};So.node;var Co=z(So),wo={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`}]]};wo.node;var To=z(wo),Eo={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`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`}]]};Eo.node;var Do=z(Eo),Oo={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`}]]};Oo.node;var ko=z(Oo),Ao={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Ao.node;var jo=z(Ao),Mo={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`}]]};Mo.node;var No=z(Mo),Po={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};Po.node;var Fo=z(Po),Io={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Io.node;var Lo=z(Io),Ro={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Ro.node;var zo=z(Ro),Bo={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`}]]};Bo.node;var Vo=z(Bo),Ho={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`}]]};Ho.node;var Uo=z(Ho),Wo={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Wo.node;var Go=z(Wo),Ko={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};Ko.node;var qo=z(Ko),Jo={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Jo.node;var Yo=z(Jo),Xo={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Xo.node;var Zo=z(Xo),Qo={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Qo.node;var $o=z(Qo),es={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`]};es.node;var ts=z(es),ns={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};ns.node;var rs=z(ns),is={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};is.node;var as=z(is),os={name:`send`,size:24,node:[[`path`,{d:`M10.03 15.76a3 3 0 0 0-1.8-1.8l-5.71-2.08a1 1 0 0 1 .1-1.8l17-7a1 1 0 0 1 1.3 1.3l-7 17a1 1 0 0 1-1.86-.04z`,key:`16rpl6`}],[`path`,{d:`M20.7 3.3 9.34 14.66`,key:`zlf921`}]]};os.node;var ss=z(os),cs={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`}]]};cs.node;var ls=z(cs),us={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`}]]};us.node;var ds=z(us),fs={name:`smartphone`,size:24,node:[[`rect`,{x:`6`,y:`2`,width:`12`,height:`20`,rx:`2`,ry:`2`,key:`681lq1`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};fs.node;var ps=z(fs),ms={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`}]]};ms.node;var hs=z(ms),gs={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};gs.node;var _s=z(gs),vs={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};vs.node;var ys=z(vs),bs={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};bs.node;var xs=z(bs),Ss=class extends Error{status;code;constructor(e,t,n){super(n),this.status=e,this.code=t,this.name=`ApiError`}};async function Cs(e,t={}){let n=t.method??`GET`,r={};n!==`GET`&&n!==`HEAD`&&(r[`x-fafa-requested-with`]=`web`),t.body!==void 0&&(r[`content-type`]=`application/json`);let i=await fetch(e,{method:n,credentials:`same-origin`,headers:r,...t.body===void 0?{}:{body:JSON.stringify(t.body)}}),a=await i.json().catch(()=>({}));if(!i.ok||!a.ok)throw new Ss(i.status,a.error?.code??`REQUEST_FAILED`,a.error?.message??`HTTP ${i.status}`);return a.data}var ws={bootstrap(e){return Cs(`/api/bootstrap?locale=${encodeURIComponent(e)}`)},browseDirectories(e){return Cs(`/api/fs/browse${e?`?path=${encodeURIComponent(e)}`:``}`)},registerLibrary(e){return Cs(`/api/libraries`,{method:`POST`,body:e})},removeLibrary(e){return Cs(`/api/libraries/${encodeURIComponent(e)}`,{method:`DELETE`})},getLibraryArticles(e){return Cs(`/api/libraries/${encodeURIComponent(e)}/articles`)},refreshLibrary(e){return Cs(`/api/libraries/${encodeURIComponent(e)}/refresh`,{method:`POST`})},getPreview(e,t,n,r=!1){let i=new URLSearchParams({path:t,locale:n,...r?{fresh:`1`}:{}});return Cs(`/api/libraries/${encodeURIComponent(e)}/preview?${i.toString()}`)},checkArticle(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/check`,{method:`POST`,body:{articlePath:t}})},setProjectDefaults(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/defaults`,{method:`PATCH`,body:t})},setArticleOption(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/article-options`,{method:`PATCH`,body:t})},exportArticle(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/export`,{method:`POST`,body:t})},installBrowser(){return Cs(`/api/browser/install`,{method:`POST`})},planDraft(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/draft/plan`,{method:`POST`,body:t})},pushDraft(e,t){return Cs(`/api/libraries/${encodeURIComponent(e)}/draft/push`,{method:`POST`,body:t})},listOperations(e,t=50){return Cs(`/api/libraries/${encodeURIComponent(e)}/operations?limit=${t}`)},upsertAccount(e){return Cs(`/api/accounts`,{method:`POST`,body:e})},removeAccount(e){return Cs(`/api/accounts/${encodeURIComponent(e)}`,{method:`DELETE`})},probeAccount(e){return Cs(`/api/accounts/${encodeURIComponent(e)}/probe`,{method:`POST`})}};function Ts(e,t){let n=new EventSource(`/api/events?libraryId=${encodeURIComponent(e)}`,{withCredentials:!0}),r=e=>{try{let n=JSON.parse(e.data);t.onEvent(n)}catch{}},i=()=>{t.onError?.()};return n.addEventListener(`message`,r),n.addEventListener(`error`,i),()=>{n.removeEventListener(`message`,r),n.removeEventListener(`error`,i),n.close()}}function Es(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=Es(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ds(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Es(e))&&(r&&(r+=` `),r+=t);return r}var Os=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ks=Ds,As=(e,t)=>n=>{if(t?.variants==null)return ks(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Os(t)||Os(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return ks(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},js=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ms=(e,t)=>({classGroupId:e,validator:t}),Ns=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ps=`-`,Fs=[],Is=`arbitrary..`,Ls=e=>{let t=Bs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return zs(e);let n=e.split(Ps);return Rs(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?js(i,t):t:i||Fs}return n[e]||Fs}}},Rs=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Rs(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ps):e.slice(t).join(Ps),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},zs=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Is+r:void 0})(),Bs=e=>{let{theme:t,classGroups:n}=e;return Vs(n,t)},Vs=(e,t)=>{let n=Ns();for(let r in e){let i=e[r];Hs(i,n,r,t)}return n},Hs=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Us(i,t,n,r)}},Us=(e,t,n,r)=>{if(typeof e==`string`){Ws(e,t,n);return}if(typeof e==`function`){Gs(e,t,n,r);return}Ks(e,t,n,r)},Ws=(e,t,n)=>{let r=e===``?t:qs(t,e);r.classGroupId=n},Gs=(e,t,n,r)=>{if(Js(e)){Hs(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ms(n,e))},Ks=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Hs(o,qs(t,a),n,r)}},qs=(e,t)=>{let n=e,r=t.split(Ps),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ns(),n.nextPart.set(t,i)),n=i}return n},Js=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ys=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Xs=`!`,Zs=`:`,Qs=[],$s=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ec=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let c=e[s];if(n===0&&r===0){if(c===Zs){t.push(e.slice(i,s)),i=s+1;continue}if(c===`/`){a=s;continue}}if(c===`[`)n++;else if(c===`]`)n--;else if(c===`(`)r++;else if(c===`)`)r--;else if(c===`\\`)s++;else if(c===`"`||c===`'`)for(;++s<o;){let t=e[s];if(t===`\\`)s++;else if(t===c)break}}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Xs)?(c=s.slice(0,-1),l=!0):s.startsWith(Xs)&&(c=s.slice(1),l=!0);let u=l&&s.startsWith(Xs)?1:0,d=a&&a>i?a-i-u:void 0;return $s(t,l,c,d)};if(t){let e=t+Zs,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):$s(Qs,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},tc=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},nc=e=>({cache:Ys(e.cacheSize),parseClassName:ec(e),sortModifiers:tc(e),postfixLookupClassGroupIds:rc(e),...Ls(e)}),rc=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ic=/\s+/,ac=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ic),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Xs:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},oc=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=sc(n))&&(i&&(i+=` `),i+=r);return i},sc=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=sc(e[r]))&&(n&&(n+=` `),n+=t);return n},cc=(e,...t)=>{let n,r,i,a,o=o=>(n=nc(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=ac(e,n);return i(e,a),a};return a=o,(...e)=>a(oc(...e))},lc=[],uc=e=>{let t=t=>t[e]||lc;return t.isThemeGetter=!0,t.themeKey=e,t},dc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,gc=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,_c=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,vc=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,yc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xc=e=>pc.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Sc=e=>!!e&&Number.isInteger(Number(e)),Cc=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),wc=e=>mc.test(e),Tc=()=>!0,Ec=e=>(hc.test(e)||gc.test(e))&&!_c.test(e),Dc=e=>vc.test(e)&&!_c.test(e),Oc=()=>!1,kc=e=>yc.test(e),Ac=e=>bc.test(e),jc=e=>!U(e)&&!W(e),Mc=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Nc=e=>Xc(e,el,Oc),U=e=>dc.test(e),Pc=e=>Xc(e,tl,Ec),Fc=e=>Xc(e,nl,Dc),Ic=e=>Xc(e,rl,H),Lc=e=>Xc(e,al,Tc),Rc=e=>Xc(e,il,Oc),zc=e=>Xc(e,Qc,Oc),Bc=e=>Xc(e,$c,Ac),Vc=e=>Xc(e,ol,kc),W=e=>fc.test(e),Hc=e=>Zc(e,tl),Uc=e=>Zc(e,nl,!0),Wc=e=>Zc(e,il),Gc=e=>Zc(e,Qc),Kc=e=>Zc(e,el),qc=e=>Zc(e,$c),Jc=e=>Zc(e,ol,!0),Yc=e=>Zc(e,al,!0),Xc=(e,t,n)=>{let r=dc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zc=(e,t,n=!1)=>{let r=fc.exec(e);return r?r[1]?t(r[1]):n:!1},Qc=e=>e===`position`||e===`percentage`,$c=e=>e===`image`||e===`url`,el=e=>e===`length`||e===`size`||e===`bg-size`,tl=e=>e===`length`,nl=e=>e!==`color`,rl=e=>e===`number`,il=e=>e===`family-name`,al=e=>e===`number`||e===`weight`,ol=e=>e===`shadow`,sl=cc(()=>{let e=uc(`color`),t=uc(`font`),n=uc(`text`),r=uc(`font-weight`),i=uc(`tracking`),a=uc(`leading`),o=uc(`breakpoint`),s=uc(`container`),c=uc(`spacing`),l=uc(`radius`),u=uc(`shadow`),d=uc(`inset-shadow`),f=uc(`text-shadow`),p=uc(`drop-shadow`),m=uc(`blur`),h=uc(`perspective`),g=uc(`aspect`),_=uc(`ease`),v=uc(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[xc,`full`,`auto`,...w()],E=()=>[Sc,`none`,`subgrid`,W,U],ee=()=>[`auto`,{span:[`full`,Sc,W,U]},Sc,W,U],D=()=>[Sc,`auto`,W,U],te=()=>[`auto`,`min`,`max`,`fr`,H,W,U],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],O=()=>[`auto`,...w()],k=()=>[xc,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[s,xc,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],j=()=>[xc,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,W,U],ie=()=>[...b(),Gc,zc,{position:[W,U]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,Kc,Nc,{size:[W,U]}],N=()=>[Cc,Hc,Pc],P=()=>[``,`none`,`full`,l,W,U],F=()=>[``,H,Hc,Pc],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],le=()=>[H,Cc,Uc,Fc],ue=()=>[``,`none`,m,W,U],de=()=>[`none`,H,W,U],fe=()=>[`none`,H,W,U],pe=()=>[H,W,U],I=()=>[xc,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[wc],breakpoint:[wc],color:[Tc],container:[wc],"drop-shadow":[wc],ease:[`in`,`out`,`in-out`],font:[jc],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[wc],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[wc],shadow:[wc],spacing:[`px`,H],text:[wc],"text-shadow":[wc],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,xc,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Mc],columns:[{columns:[H,`auto`,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`],"not-sr":[`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],contain:[{contain:[`none`,`content`,`strict`,W,U]}],"contain-size":[{contain:[`size`,`inline-size`]}],"contain-layout":[`contain-layout`],"contain-paint":[`contain-paint`],"contain-style":[`contain-style`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Sc,`auto`,W,U]}],basis:[{basis:[xc,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,xc,`auto`,`initial`,`none`,W,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Sc,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:k()}],"inline-size":[{inline:[`auto`,...A()]}],"min-inline-size":[{"min-inline":[`auto`,...A()]}],"max-inline-size":[{"max-inline":[`none`,...A()]}],"block-size":[{block:[`auto`,...j()]}],"min-block-size":[{"min-block":[`auto`,...j()]}],"max-block-size":[{"max-block":[`none`,...j()]}],w:[{w:[s,`screen`,...k()]}],"min-w":[{"min-w":[s,`screen`,`none`,...k()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...k()]}],h:[{h:[`screen`,`lh`,...k()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...k()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...k()]}],"font-size":[{text:[`base`,n,Hc,Pc]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Yc,Lc]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Cc,W,U]}],"font-family":[{font:[Wc,Rc,t]}],"font-features":[{"font-features":[W,U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,U]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,Hc,Gc,Pc]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`text-ellipsis`,`text-clip`],truncate:[`truncate`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Sc,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Sc,W,U],radial:[``,W,U],conic:[``,Sc,W,U]},qc,Bc]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,Hc,Pc]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`inner`,`none`,u,Jc,Vc]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,Jc,Vc]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[H,Pc]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,Jc,Vc]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H,W,U]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{mask:[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[H,W,U]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:ue()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Jc,Vc]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],"transform-box":[{transform:[`content`,`border`,`fill`,`stroke`,`view`]}],translate:[{translate:I()}],"translate-x":[{"translate-x":I()}],"translate-y":[{"translate-y":I()}],"translate-z":[{"translate-z":I()}],"translate-none":[`translate-none`],"translate-3d":[`translate-3d`],zoom:[{zoom:[Sc,W,U]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[H,Hc,Pc,Ic]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],"place-content":[`align-content`,`justify-content`],"place-items":[`align-items`,`justify-items`],"place-self":[`align-self`,`justify-self`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],truncate:[`text-overflow`,`overflow`,`overflow-x`,`overflow-y`,`whitespace`],sr:`not-sr.position.size.w.h.p.px.py.ps.pe.pbs.pbe.pt.pr.pb.pl.m.mx.my.ms.me.mbs.mbe.mt.mr.mb.ml.overflow.overflow-x.overflow-y.whitespace`.split(`.`),"not-sr":[`sr`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],"mask-image-x-from-pos":[`mask-image-r-from-pos`,`mask-image-l-from-pos`],"mask-image-x-to-pos":[`mask-image-r-to-pos`,`mask-image-l-to-pos`],"mask-image-x-from-color":[`mask-image-r-from-color`,`mask-image-l-from-color`],"mask-image-x-to-color":[`mask-image-r-to-color`,`mask-image-l-to-color`],"mask-image-y-from-pos":[`mask-image-t-from-pos`,`mask-image-b-from-pos`],"mask-image-y-to-pos":[`mask-image-t-to-pos`,`mask-image-b-to-pos`],"mask-image-y-from-color":[`mask-image-t-from-color`,`mask-image-b-from-color`],"mask-image-y-to-color":[`mask-image-t-to-color`,`mask-image-b-to-color`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`,`translate-3d`],"translate-x":[`translate-none`],"translate-y":[`translate-none`],"translate-z":[`translate-none`],"translate-3d":[`translate-none`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],contain:[`contain-size`,`contain-layout`,`contain-paint`,`contain-style`],"contain-size":[`contain`],"contain-layout":[`contain`],"contain-paint":[`contain`],"contain-style":[`contain`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function G(...e){return sl(Ds(e))}var cl=As(`flex items-start gap-2.5 rounded-[10px] border px-3.5 py-2.5 text-xs leading-relaxed animate-panel-reveal`,{variants:{variant:{default:`border-border bg-card text-foreground`,success:`border-status-ok-border bg-status-ok-bg text-status-ok-fg`,warning:`border-status-warn-border bg-status-warn-bg text-status-warn-fg`,destructive:`border-status-err-border bg-status-err-bg text-status-err-fg`}},defaultVariants:{variant:`default`}}),ll={default:No,success:V,warning:ys,destructive:ho};function ul({className:e,variant:t=`default`,children:n,onDismiss:r,dismissLabel:i}){let a=ll[t??`default`];return(0,h.jsxs)(`div`,{className:G(cl({variant:t}),e),children:[(0,h.jsx)(a,{className:`mt-0.5 size-3.5 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`div`,{className:`min-w-0 flex-1 space-y-1.5`,children:n}),r?(0,h.jsx)(`button`,{type:`button`,onClick:r,"aria-label":i??`Close`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded opacity-70 transition-opacity hover:opacity-100`,children:(0,h.jsx)(xs,{className:`size-3.5`,"aria-hidden":`true`})}):null]})}var dl=As(`inline-flex items-center justify-center gap-1 rounded-md border px-2 py-0.5 text-[11px] leading-4 font-medium w-fit whitespace-nowrap shrink-0 transition-colors`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground`,accent:`border-brand/25 bg-brand-subtle text-brand-foreground`,secondary:`border-border bg-surface-subtle text-secondary-foreground`,outline:`border-border bg-transparent text-muted-foreground`,success:`border-status-ok-border bg-status-ok-bg text-status-ok-fg`,warning:`border-status-warn-border bg-status-warn-bg text-status-warn-fg`,destructive:`border-status-err-border bg-status-err-bg text-status-err-fg`}},defaultVariants:{variant:`secondary`}});function fl({className:e,variant:t,...n}){return(0,h.jsx)(`span`,{"data-slot":`badge`,className:G(dl({variant:t}),e),...n})}var pl=Object.defineProperty,ml=(e,t)=>pl(e,`name`,{value:t,configurable:!0});function hl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ml(hl,`setRef`);function gl(...e){return t=>{let n=!1,r=e.map(e=>{let r=hl(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():hl(e[t],null)}}}}ml(gl,`composeRefs`);function _l(...e){return d.useCallback(gl(...e),e)}ml(_l,`useComposedRefs`);var vl=Object.defineProperty,yl=(e,t)=>vl(e,`name`,{value:t,configurable:!0});function bl(e){let t=d.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=jl(r),d.Children.forEach(r,e=>{if(Dl(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;kl(n)&&typeof Fl==`function`;)n=Fl(n._payload);a=wl(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=d.cloneElement(a,void 0,s):!o&&d.Children.count(r)===1&&d.isValidElement(r)&&(a=r);let c=a?El(a):void 0,l=_l(n,c);if(!a){if(r||r===0)throw Error(o?Pl(e):Nl(e));return r}let u=Tl(i,a.props??{});return a.type!==d.Fragment&&(u.ref=n?l:c),d.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}yl(bl,`createSlot`);var xl=bl(`Slot`),Sl=Symbol.for(`radix.slottable`);function Cl(e){let t=yl(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Sl,t}yl(Cl,`createSlottable`);var wl=yl((e,t)=>`child`in e.props?d.isValidElement(t)?d.cloneElement(t,void 0,e.props.children(t.props.children)):null:d.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function Tl(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Ml(a,i))}return{...e,...n}}yl(Tl,`mergeProps`);function El(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)}yl(El,`getElementRef`);function Dl(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Sl}yl(Dl,`isSlottable`);var Ol=Symbol.for(`react.lazy`);function kl(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ol&&`_payload`in e&&Al(e._payload)}yl(kl,`isLazyComponent`);function Al(e){return typeof e==`object`&&!!e&&`then`in e}yl(Al,`isPromiseLike`);function jl(e){let t=e;for(;kl(t)&&typeof Fl==`function`;)t=Fl(t._payload);return t}yl(jl,`useUnwrappedLazy`);function Ml(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}yl(Ml,`concatAriaDescribedby`);var Nl=yl(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Pl=yl(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Fl=d.use,Il=As(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors duration-150 disabled:pointer-events-none disabled:opacity-45 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5 shrink-0 cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:opacity-90 active:opacity-85`,accent:`bg-brand text-white hover:bg-brand-hover dark:text-[#0e1013]`,destructive:`bg-destructive text-destructive-foreground hover:opacity-90 active:opacity-85`,outline:`border border-input bg-card text-foreground hover:border-border-strong hover:bg-surface-hover`,secondary:`bg-secondary text-secondary-foreground hover:bg-surface-hover`,ghost:`text-muted-foreground hover:bg-surface-hover hover:text-foreground`,link:`text-brand-foreground underline-offset-4 hover:underline`},size:{default:`h-9 px-3.5 text-sm`,sm:`h-8 rounded-md px-2.5 text-xs`,xs:`h-7 rounded px-2 text-xs`,lg:`h-10 rounded-md px-5 text-sm`,icon:`size-9`,"icon-sm":`size-8`}},defaultVariants:{variant:`default`,size:`default`}});function K({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,h.jsx)(r?xl:`button`,{"data-slot":`button`,className:G(Il({variant:t,size:n,className:e})),...i})}function Ll({open:e,title:t,description:n,confirmLabel:r,cancelLabel:i,closeLabel:a,variant:o=`destructive`,pending:s=!1,onConfirm:c,onCancel:l}){return(0,d.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!s&&l()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,s,l]),e?(0,h.jsxs)(`dialog`,{open:!0,"aria-modal":`true`,"aria-label":t,className:`fixed inset-0 z-50 m-0 flex h-dvh w-screen max-w-none items-center justify-center border-0 bg-transparent p-4 text-foreground`,children:[(0,h.jsx)(`button`,{type:`button`,"aria-label":a,onClick:()=>{s||l()},className:`fixed inset-0 cursor-default bg-black/45`}),(0,h.jsxs)(`div`,{className:`relative z-10 w-full max-w-sm rounded-xl border border-border bg-card text-card-foreground shadow-[0_18px_40px_-14px_rgba(0,0,0,0.28)] animate-panel-reveal`,children:[(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-3 px-5 pt-5 pb-3`,children:[(0,h.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[o===`destructive`?(0,h.jsx)(ys,{className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":`true`}):null,(0,h.jsxs)(`div`,{className:`space-y-1`,children:[(0,h.jsx)(`h2`,{className:`text-sm font-semibold tracking-[-0.01em] text-foreground`,children:t}),n?(0,h.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground text-pretty`,children:n}):null]})]}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:l,disabled:s,"aria-label":a,children:(0,h.jsx)(xs,{className:`size-4`})})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-end gap-2 rounded-b-xl border-t border-border bg-surface-subtle/60 px-5 py-3`,children:[(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,onClick:l,disabled:s,children:i}),(0,h.jsx)(K,{type:`button`,variant:o===`destructive`?`destructive`:`default`,size:`sm`,onClick:c,disabled:s,children:r})]})]})]}):null}function q({open:e,title:t,subtitle:n,closeLabel:r,onClose:i,size:a=`lg`,bodyClassName:o,footer:s,children:c}){return(0,d.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&i()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,i]),e?(0,h.jsxs)(`dialog`,{open:!0,"aria-modal":`true`,"aria-label":t,className:`fixed inset-0 z-50 m-0 flex h-dvh w-screen max-w-none items-center justify-center border-0 bg-transparent p-4 text-foreground`,children:[(0,h.jsx)(`button`,{type:`button`,"aria-label":r,onClick:i,className:`fixed inset-0 cursor-default bg-black/45`}),(0,h.jsxs)(`div`,{className:G(`relative z-10 flex max-h-[86dvh] w-full flex-col rounded-xl border border-border bg-card text-card-foreground shadow-[0_18px_40px_-14px_rgba(0,0,0,0.28)] animate-panel-reveal`,a===`sm`?`max-w-sm`:a===`md`?`max-w-lg`:`max-w-2xl`),children:[(0,h.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 border-b border-border px-5 py-4`,children:[(0,h.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[(0,h.jsx)(`h2`,{className:`truncate text-[15px] font-semibold tracking-[-0.015em] text-foreground`,children:t}),n?(0,h.jsx)(`p`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:n}):null]}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:i,"aria-label":r,className:`-mt-1 -mr-1.5`,children:(0,h.jsx)(xs,{className:`size-4`})})]}),(0,h.jsx)(`div`,{className:G(`min-h-0 flex-1 overflow-y-auto`,o??`px-5 py-4`),children:c}),s?(0,h.jsx)(`div`,{className:`flex shrink-0 items-center justify-end gap-2 rounded-b-xl border-t border-border bg-surface-subtle/60 px-5 py-3`,children:s}):null]})]}):null}function J({label:e,htmlFor:t,hint:n,required:r,action:i,className:a,children:o}){return(0,h.jsxs)(`div`,{className:G(`space-y-1.5`,a),children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsxs)(`label`,{htmlFor:t,className:`text-xs font-medium text-foreground`,children:[e,r?(0,h.jsx)(`span`,{className:`ml-0.5 text-destructive`,"aria-hidden":`true`,children:`*`}):null]}),i?(0,h.jsx)(`div`,{className:`flex items-center gap-1.5`,children:i}):null]}),o,n?(0,h.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground text-pretty`,children:n}):null]})}function Y({className:e,type:t,...n}){return(0,h.jsx)(`input`,{type:t,"data-slot":`input`,className:G(`flex h-9 w-full min-w-0 rounded-md border border-input bg-card px-3 py-1.5 text-sm text-foreground transition-colors duration-150 placeholder:text-muted-foreground hover:border-border-strong focus-visible:border-foreground focus-visible:ring-2 focus-visible:ring-ring/20 focus-visible:outline-none disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:opacity-60`,e),...n})}function X({checked:e,disabled:t,id:n,onCheckedChange:r,"aria-label":i}){return(0,h.jsx)(`button`,{id:n,type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,disabled:t,onClick:()=>r(!e),className:G(`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-45`,e?`border-brand bg-brand`:`border-switch-off-border bg-switch-off-bg`),children:(0,h.jsx)(`span`,{className:G(`pointer-events-none block size-3.5 rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,0.22)] transition-transform duration-150`,e?`translate-x-[18px]`:`translate-x-[2px]`)})})}function Z({open:e,t,accounts:n,onClose:r,onAccountsUpdated:i}){let[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)(null),[l,u]=(0,d.useState)(!1),[f,p]=(0,d.useState)(null);function m(){o({mode:`add`,id:``,name:``,appId:``,appSecret:``,test:!1}),p(null)}function g(e){o({mode:`edit`,id:e.id,name:e.name,appId:e.appId,appSecret:``,test:e.test}),p(null)}async function _(e){if(e.preventDefault(),a){u(!0),p(null);try{i(await ws.upsertAccount({id:a.id.trim(),name:a.name.trim(),appId:a.appId.trim(),...a.appSecret.trim()?{appSecret:a.appSecret.trim()}:{},test:a.test})),o(null)}catch(e){p({tone:`destructive`,text:e instanceof Error?e.message:String(e)})}finally{u(!1)}}}async function v(e){u(!0),p(null);try{let n=await ws.probeAccount(e);p({tone:`success`,text:t(`accounts.probeOk`,{name:n.name,time:n.checkedAt})})}catch(e){p({tone:`destructive`,text:e instanceof Error?e.message:String(e)})}finally{u(!1)}}async function y(){if(s){u(!0),p(null);try{i(await ws.removeAccount(s.id)),c(null)}catch(e){p({tone:`destructive`,text:e instanceof Error?e.message:String(e)})}finally{u(!1)}}}return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(q,{open:e,title:a?a.mode===`edit`?t(`accounts.editTitle`):t(`accounts.add`):t(`accounts.title`),...a?.mode===`edit`?{subtitle:a.id}:{},closeLabel:t(`common.close`),size:`md`,bodyClassName:a?`px-5 py-4`:`p-0`,onClose:()=>{o(null),r()},footer:a?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,disabled:l,onClick:()=>{o(null),p(null)},children:t(`common.cancel`)}),(0,h.jsx)(K,{type:`submit`,form:`fafa-account-form`,variant:`default`,size:`sm`,disabled:l,children:t(`accounts.save`)})]}):(0,h.jsxs)(K,{type:`button`,variant:`default`,size:`sm`,disabled:l,onClick:m,children:[(0,h.jsx)(Zo,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:t(`accounts.add`)})]}),children:[f?(0,h.jsx)(`div`,{className:a?`mb-4`:`px-5 pt-4`,children:(0,h.jsx)(ul,{variant:f.tone,onDismiss:()=>p(null),dismissLabel:t(`common.close`),children:f.text})}):null,a?(0,h.jsxs)(`form`,{id:`fafa-account-form`,onSubmit:e=>void _(e),className:`space-y-3.5 animate-panel-reveal`,children:[(0,h.jsxs)(`div`,{className:`grid gap-3.5 sm:grid-cols-2`,children:[(0,h.jsx)(J,{label:t(`accounts.id`),htmlFor:`account-id-input`,required:!0,children:(0,h.jsx)(Y,{id:`account-id-input`,value:a.id,disabled:l||a.mode===`edit`,placeholder:t(`accounts.idPlaceholder`),onChange:e=>o({...a,id:e.target.value}),required:!0,className:`font-mono text-xs`})}),(0,h.jsx)(J,{label:t(`accounts.name`),htmlFor:`account-name-input`,required:!0,children:(0,h.jsx)(Y,{id:`account-name-input`,value:a.name,disabled:l,placeholder:t(`accounts.namePlaceholder`),onChange:e=>o({...a,name:e.target.value}),required:!0})})]}),(0,h.jsx)(J,{label:t(`accounts.appId`),htmlFor:`account-appid-input`,required:!0,children:(0,h.jsx)(Y,{id:`account-appid-input`,value:a.appId,disabled:l,onChange:e=>o({...a,appId:e.target.value}),required:!0,className:`font-mono text-xs`})}),(0,h.jsx)(J,{label:t(`accounts.appSecret`),htmlFor:`account-secret-input`,required:a.mode===`add`,children:(0,h.jsx)(Y,{id:`account-secret-input`,type:`password`,value:a.appSecret,disabled:l,placeholder:a.mode===`edit`?t(`accounts.appSecretKeep`):t(`accounts.appSecretPlaceholder`),onChange:e=>o({...a,appSecret:e.target.value}),required:a.mode===`add`,className:`font-mono text-xs`})}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[(0,h.jsx)(`label`,{htmlFor:`account-test-switch`,className:`cursor-pointer text-xs font-medium text-foreground`,children:t(`accounts.test`)}),(0,h.jsx)(X,{id:`account-test-switch`,checked:a.test,disabled:l,onCheckedChange:e=>o({...a,test:e})})]})]}):n.items.length===0?(0,h.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-6 py-10 text-center`,children:[(0,h.jsx)(`div`,{className:`mb-2.5 flex size-9 items-center justify-center rounded-lg border border-border bg-surface-subtle text-muted-foreground`,children:(0,h.jsx)(ls,{className:`size-4`})}),(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`accounts.empty`)})]}):(0,h.jsx)(`ul`,{className:`divide-y divide-border`,children:n.items.map(e=>(0,h.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-3 px-5 py-3.5 transition-colors hover:bg-surface-subtle/50`,children:[(0,h.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,h.jsx)(`span`,{className:`truncate text-[13px] font-semibold text-foreground`,children:e.name}),n.defaultAccount===e.id?(0,h.jsx)(fl,{variant:`accent`,children:t(`accounts.default`)}):null,(0,h.jsx)(fl,{variant:e.test?`warning`:`success`,children:e.test?t(`accounts.test`):t(`accounts.production`)})]}),(0,h.jsxs)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:[e.id,` · `,e.appId]})]}),(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`xs`,disabled:l,onClick:()=>void v(e.id),children:[(0,h.jsx)(no,{className:`size-3`}),(0,h.jsx)(`span`,{children:t(`accounts.probe`)})]}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:l,"aria-label":`${t(`accounts.edit`)} ${e.name}`,title:t(`accounts.edit`),onClick:()=>g(e),children:(0,h.jsx)(Yo,{className:`size-3.5`})}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:l,"aria-label":`${t(`accounts.remove`)} ${e.name}`,title:t(`accounts.remove`),onClick:()=>c(e),className:`text-muted-foreground hover:text-destructive`,children:(0,h.jsx)(_s,{className:`size-3.5`})})]})]},e.id))})]}),(0,h.jsx)(Ll,{open:!!s,title:t(`accounts.confirmRemove`),description:s?t(`accounts.removeDescription`,{name:s.name}):``,confirmLabel:t(`accounts.confirmRemove`),cancelLabel:t(`common.cancel`),closeLabel:t(`common.close`),pending:l,onConfirm:()=>void y(),onCancel:()=>c(null)})]})}function Rl({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:G(`size-5 shrink-0`,e),children:[(0,h.jsx)(`rect`,{x:`3.25`,y:`2.75`,width:`17.5`,height:`18.5`,rx:`3`,stroke:`currentColor`,strokeWidth:`1.75`}),(0,h.jsx)(`path`,{d:`M7.5 8h9M7.5 12h6.5M7.5 16h4`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`}),(0,h.jsx)(`circle`,{cx:`15.75`,cy:`16`,r:`2`,fill:`var(--brand)`})]})}function zl({label:e,className:t}){return(0,h.jsxs)(`span`,{className:G(`inline-flex items-center gap-2 select-none`,t),children:[(0,h.jsx)(Rl,{className:`text-foreground`}),(0,h.jsx)(`span`,{className:`text-[15px] leading-none font-semibold tracking-[-0.02em] text-foreground`,children:e})]})}function Bl({t:e,className:t}){let{theme:n,setTheme:r}=Va(),i=[{mode:`light`,label:e(`theme.light`),icon:hs},{mode:`system`,label:e(`theme.system`),icon:Vo},{mode:`dark`,label:e(`theme.dark`),icon:Uo}];return(0,h.jsxs)(`fieldset`,{"aria-label":e(`theme.label`),className:G(`grid grid-cols-3 rounded-lg border border-border bg-background p-0.5`,t),children:[(0,h.jsx)(`legend`,{className:`sr-only`,children:e(`theme.label`)}),i.map(({mode:e,label:t,icon:i})=>{let a=n===e;return(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":a,onClick:()=>r(e),className:G(`inline-flex h-7 cursor-pointer items-center justify-center gap-1 rounded-md px-1.5 text-[11px] font-medium whitespace-nowrap transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,a?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:[(0,h.jsx)(i,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:t})]},e)})]})}var Vl={ok:`bg-status-ok-dot`,warn:`bg-status-warn-dot`,err:`bg-status-err-dot`,idle:`bg-muted-foreground/50`,loading:`bg-status-warn-dot animate-pulse`};function Hl({tone:e,size:t=`default`,className:n}){return(0,h.jsx)(`span`,{"aria-hidden":`true`,className:G(`inline-block shrink-0 rounded-full`,t===`sm`?`size-1.5`:`size-2`,Vl[e],n)})}function Ul(e){let t=e,n=e.label,r=e.key;for(;t.articles.length===0&&t.folders.size===1;){let e=[...t.folders.values()][0];n=`${n}/${e.label}`,r=e.key,t=e}let i=[...t.folders.values()].sort((e,t)=>e.label.localeCompare(t.label)).map(Ul),a=[...t.articles].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({kind:`article`,key:e.path,article:e})),o=a.length+i.reduce((e,t)=>e+t.count,0);return{kind:`folder`,key:r,label:n,children:[...i,...a],count:o}}function Wl(e){let t={key:``,label:``,folders:new Map,articles:[]};for(let n of e){let e=n.path.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).slice(0,-1),r=t,i=``;for(let t of e){i=i?`${i}/${t}`:t;let e=r.folders.get(t);e||(e={key:i,label:t,folders:new Map,articles:[]},r.folders.set(t,e)),r=e}r.articles.push(n)}let n=[...t.folders.values()].sort((e,t)=>e.label.localeCompare(t.label)).map(Ul),r=[...t.articles].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({kind:`article`,key:e.path,article:e}));return[...n,...r]}function Gl(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.name.toLowerCase().includes(n)||e.path.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)):[...e]}function Kl({t:e,activeLibrary:t,snapshot:n,selectedArticlePath:r,syncStatus:i,accountCount:a,localeLabel:o,onSelectArticle:s,onPrefetchArticle:c,onOpenLibraries:l,onOpenAccounts:u,onOpenOperations:f,onToggleLocale:p,onCloseMobile:m}){let[g,_]=(0,d.useState)(``),[v,y]=(0,d.useState)({}),b=(0,d.useMemo)(()=>n?.articles??[],[n?.articles]),x=(0,d.useMemo)(()=>Gl(b,g),[b,g]),S=(0,d.useMemo)(()=>Wl(x),[x]),C=g.trim().length>0,w=t?i===`connected`?`ok`:i===`connecting`?`loading`:`err`:`idle`;function T(e){y(t=>({...t,[e]:!t[e]}))}function E(e,t=0){return e.map(e=>{if(e.kind===`folder`){let n=!C&&!!v[e.key];return(0,h.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,h.jsxs)(`button`,{type:`button`,"aria-expanded":!n,onClick:()=>T(e.key),style:{paddingLeft:`${8+t*12}px`},className:`group flex w-full cursor-pointer items-center justify-between gap-2 rounded-md py-1.5 pr-2 text-left text-xs font-medium text-muted-foreground transition-colors duration-150 hover:bg-surface-hover/80 hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[n?(0,h.jsx)(uo,{className:`size-3.5 shrink-0 text-muted-foreground/80`}):(0,h.jsx)(co,{className:`size-3.5 shrink-0 text-muted-foreground/80`}),(0,h.jsx)(ko,{className:`size-3.5 shrink-0 text-muted-foreground/80 group-hover:text-foreground`}),(0,h.jsx)(`span`,{className:`truncate`,title:e.label,children:e.label})]}),(0,h.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] tabular-nums text-muted-foreground`,children:e.count})]}),n?null:(0,h.jsx)(`div`,{className:`space-y-0.5`,children:E(e.children,t+1)})]},e.key)}let n=e.article.path===r;return(0,h.jsxs)(`button`,{type:`button`,"aria-current":n?`page`:void 0,title:e.article.path,onMouseEnter:()=>c?.(e.article.path),onFocus:()=>c?.(e.article.path),onClick:()=>{s(e.article.path),m?.()},style:{paddingLeft:`${10+t*12}px`},className:G(`group flex w-full cursor-pointer items-center gap-2 rounded-md py-1.5 pr-2.5 text-left text-[13px] transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,n?`bg-card font-medium text-foreground ring-1 ring-border`:`text-muted-foreground hover:bg-surface-hover/80 hover:text-foreground`),children:[(0,h.jsx)(xo,{className:G(`size-3.5 shrink-0 transition-colors`,n?`text-brand`:`text-muted-foreground/80 group-hover:text-foreground`),"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.article.name})]},e.key)})}return(0,h.jsxs)(`div`,{className:`flex h-full flex-col bg-surface-subtle`,children:[(0,h.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center justify-between border-b border-border px-3.5`,children:[(0,h.jsx)(zl,{label:e(`app.name`)}),m?(0,h.jsx)(`button`,{type:`button`,onClick:m,"aria-label":e(`nav.closeMenu`),className:`inline-flex size-7 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-surface-hover hover:text-foreground lg:hidden`,children:(0,h.jsx)(xs,{className:`size-4`})}):null]}),(0,h.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border p-2.5`,children:[(0,h.jsxs)(`button`,{type:`button`,onClick:l,"aria-label":e(`nav.manageLibraries`),title:t?.root??e(`nav.manageLibraries`),className:`flex h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-border bg-card px-2.5 text-left transition-colors duration-150 hover:border-border-strong hover:bg-surface-hover/60 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,h.jsx)(To,{className:`size-4 shrink-0 text-brand`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`truncate text-[13px] font-medium text-foreground`,children:t?t.name:e(`nav.selectLibrary`)})]}),(0,h.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,h.jsx)(Hl,{tone:w,size:`sm`}),(0,h.jsx)(po,{className:`size-3.5 text-muted-foreground`,"aria-hidden":`true`})]})]}),n?(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(as,{className:`pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`}),(0,h.jsx)(Y,{type:`text`,value:g,onChange:e=>_(e.target.value),"aria-label":e(`article.searchPlaceholder`),placeholder:e(`article.searchPlaceholder`),className:`h-8 pr-7 pl-8 text-xs`}),g?(0,h.jsx)(`button`,{type:`button`,onClick:()=>_(``),"aria-label":e(`article.clearSearch`),className:`absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground`,children:(0,h.jsx)(xs,{className:`size-3`})}):null]}):null]}),(0,h.jsx)(`nav`,{"aria-label":e(`nav.sidebar`),className:`min-h-0 flex-1 space-y-0.5 overflow-y-auto p-2`,children:n?b.length===0?(0,h.jsxs)(`div`,{className:`space-y-1 px-2.5 py-6 text-center`,children:[(0,h.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:e(`article.emptyTitle`)}),(0,h.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground text-pretty`,children:e(`article.emptyDescription`)})]}):x.length===0?(0,h.jsxs)(`div`,{className:`space-y-2 px-2.5 py-6 text-center`,children:[(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`article.noMatch`)}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>_(``),className:`cursor-pointer text-xs font-medium text-brand-foreground hover:underline`,children:e(`article.clearSearch`)})]}):E(S):(0,h.jsx)(`div`,{className:`px-2.5 py-6 text-center text-xs text-muted-foreground`,children:e(t?`common.loading`:`library.emptyTitle`)})}),(0,h.jsxs)(`div`,{className:`shrink-0 space-y-2 border-t border-border p-2.5`,children:[(0,h.jsx)(Bl,{t:e}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,h.jsxs)(`button`,{type:`button`,onClick:u,className:`inline-flex h-8 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-border bg-card px-2 text-xs font-medium text-muted-foreground transition-colors hover:border-border-strong hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsx)(ls,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:e(`nav.accounts`)}),a>0?(0,h.jsx)(`span`,{className:`font-mono text-[11px] tabular-nums text-foreground`,children:a}):null]}),(0,h.jsxs)(`button`,{type:`button`,onClick:f,disabled:!n,className:`inline-flex h-8 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-border bg-card px-2 text-xs font-medium text-muted-foreground transition-colors hover:border-border-strong hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-45`,children:[(0,h.jsx)(ts,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:e(`nav.operations`)})]}),(0,h.jsxs)(`button`,{type:`button`,onClick:p,"aria-label":e(`nav.language`),className:`inline-flex h-8 cursor-pointer items-center justify-center gap-1 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:border-border-strong hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsx)(Fo,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:o})]})]})]})]})}function ql({className:e,children:t,...n}){return(0,h.jsxs)(`div`,{className:`relative`,children:[(0,h.jsx)(`select`,{"data-slot":`select`,className:G(`flex h-9 w-full appearance-none rounded-md border border-input bg-card pr-8 pl-3 text-sm text-foreground transition-colors duration-150 hover:border-border-strong focus-visible:border-foreground focus-visible:ring-2 focus-visible:ring-ring/20 focus-visible:outline-none disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:opacity-60`,e),...n,children:t}),(0,h.jsx)(co,{className:`pointer-events-none absolute top-1/2 right-2.5 size-3.5 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`})]})}function Jl({tabs:e,value:t,onChange:n,className:r}){return(0,h.jsx)(`div`,{className:G(`flex items-center gap-1 border-b border-border px-4`,r),children:e.map(e=>{let r=e.id===t;return(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>n(e.id),className:G(`-mb-px inline-flex cursor-pointer items-center gap-1.5 border-b-2 px-2.5 py-2.5 text-[13px] font-medium whitespace-nowrap transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,r?`border-foreground text-foreground`:`border-transparent text-muted-foreground hover:border-border-strong hover:text-foreground`),children:[e.icon?(0,h.jsx)(`span`,{className:G(r?`text-brand`:`text-muted-foreground`),children:e.icon}):null,(0,h.jsx)(`span`,{children:e.label}),e.count===void 0?null:(0,h.jsx)(`span`,{className:G(`rounded px-1.5 py-0.5 font-mono text-[11px] leading-none tabular-nums`,r?`bg-surface-hover text-foreground`:`bg-surface-subtle text-muted-foreground`),children:e.count})]},e.id)})})}function Yl(e,t,n){let r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)i[e]=r.charCodeAt(e);let a=new Blob([i],{type:t}),o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=e,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(o),1e3)}function Xl({t:e,locale:t,snapshot:n,preview:r,presets:i,accounts:a,appearance:o,activeTab:s,onTabChange:c,onPreviewUpdated:l,onSnapshotUpdated:u,onOpenAccounts:f,onToast:p,onCloseMobile:m}){let[g,_]=(0,d.useState)(!1),[v,y]=(0,d.useState)(``),[b,x]=(0,d.useState)(null),[S,C]=(0,d.useState)(`html`),[w,T]=(0,d.useState)(!1),[E,ee]=(0,d.useState)(null),[D,te]=(0,d.useState)(!1),[ne,re]=(0,d.useState)(a.defaultAccount??a.items[0]?.id??``),[O,k]=(0,d.useState)(null);(0,d.useEffect)(()=>{x(null),k(null),ee(null),te(!1),y(``)},[n.library.id,r?.articlePath]),(0,d.useEffect)(()=>{(!ne||!a.items.some(e=>e.id===ne))&&re(a.defaultAccount??a.items[0]?.id??``)},[a,ne]);let A=r?.theme.reference??n.project.theme,j=r?.codeTheme.id??n.project.codeTheme,M=r?.imageCaption??n.project.imageCaption,ie=i.themes.some(e=>e.id===A)?i.themes:[{id:A,name:A},...i.themes],ae=b?.diagnostics??r?.diagnostics??[],oe=ae.filter(e=>e.severity===`error`).length,N=ae.filter(e=>e.severity===`warning`).length;async function P(e,i){if(r){_(!0);try{let a=await ws.setArticleOption(n.library.id,{articlePath:r.articlePath,field:e,value:i,locale:t});k(null),l(a)}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}}async function F(e){_(!0);try{u(await ws.setProjectDefaults(n.library.id,{...e,locale:t})),k(null)}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}async function se(){if(r){_(!0);try{let t=await ws.checkArticle(n.library.id,r.articlePath);x(t),p(t.ok?`success`:`danger`,t.ok?e(`inspector.checkPassed`,{warnings:t.warningCount}):e(`inspector.checkFailed`,{errors:t.errorCount,warnings:t.warningCount}))}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}}async function ce(){if(r){_(!0),ee(null),te(!1);try{let t=await ws.exportArticle(n.library.id,{articlePath:r.articlePath,format:S,appearance:o,saveToDisk:w});if(t.status===`missingBrowser`){ee(t.errorMessage??e(`export.missingBrowser`));return}t.contentBase64&&t.filename&&t.mimeType&&Yl(t.filename,t.mimeType,t.contentBase64),p(`success`,t.outputPath?e(`export.succeededDisk`,{path:t.outputPath}):e(`export.succeeded`,{filename:t.filename??``}))}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}}async function le(){_(!0);try{let t=await ws.installBrowser();ee(null),te(!0),p(`success`,e(`export.browserInstalled`,{source:t.browser.source}))}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}async function ue(){if(r){_(!0);try{let e=await ws.planDraft(n.library.id,{articlePath:r.articlePath,...ne?{accountId:ne}:{}});k(e)}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}}async function de(){if(O){_(!0);try{let t=await ws.pushDraft(n.library.id,{articlePath:O.articlePath,accountId:O.accountId,expectedBuildHash:O.buildHash,confirmed:!0});k(null),p(`success`,e(`draft.pushSucceeded`,{action:t.action===`created`?e(`draft.actionCreated`):e(`draft.actionUpdated`),mediaId:t.mediaId}))}catch(e){p(`danger`,e instanceof Error?e.message:String(e))}finally{_(!1)}}}let fe=[{id:`html`,label:e(`export.formatHtml`)},{id:`pdf`,label:e(`export.formatPdf`)},{id:`png`,label:e(`export.formatPng`)}];return(0,h.jsxs)(`div`,{className:`flex h-full flex-col bg-card text-card-foreground`,children:[(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border pr-2`,children:[(0,h.jsx)(Jl,{className:`flex-1 border-b-0`,value:s,onChange:c,tabs:[{id:`style`,label:e(`inspector.tabStyle`),icon:(0,h.jsx)(Go,{className:`size-3.5`})},{id:`deliver`,label:e(`inspector.tabDeliver`),icon:(0,h.jsx)(ss,{className:`size-3.5`}),...oe>0?{count:oe}:{}}]}),m?(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:m,"aria-label":e(`common.close`),children:(0,h.jsx)(xs,{className:`size-4`})}):null]}),(0,h.jsx)(`div`,{className:`min-h-0 flex-1 divide-y divide-border overflow-y-auto`,children:s===`style`?(0,h.jsxs)(h.Fragment,{children:[r?(0,h.jsxs)(`section`,{className:`space-y-4 p-4`,children:[(0,h.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,h.jsx)(`h2`,{className:`text-[13px] font-semibold text-foreground`,children:e(`inspector.overrides`)}),(0,h.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:e(`inspector.overridesHint`)})]}),(0,h.jsxs)(`div`,{className:`space-y-2`,children:[(0,h.jsx)(J,{label:e(`inspector.theme`),htmlFor:`inspector-theme-select`,action:r.overrides.theme?(0,h.jsxs)(`button`,{type:`button`,disabled:g,onClick:()=>void P(`theme`,null),className:`inline-flex cursor-pointer items-center gap-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-45`,children:[(0,h.jsx)(rs,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`inspector.resetDefault`)})]}):void 0,children:(0,h.jsx)(ql,{id:`inspector-theme-select`,value:A,disabled:g,onChange:e=>void P(`theme`,e.target.value),className:`h-8 text-xs`,children:ie.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})}),(0,h.jsxs)(`form`,{className:`flex items-center gap-1.5`,onSubmit:e=>{e.preventDefault(),v.trim()&&(P(`theme`,v.trim()),y(``))},children:[(0,h.jsx)(Y,{value:v,disabled:g,placeholder:e(`inspector.customThemePlaceholder`),onChange:e=>y(e.target.value),className:`h-8 font-mono text-xs`}),(0,h.jsx)(K,{type:`submit`,variant:`outline`,size:`sm`,disabled:g||!v.trim(),children:e(`inspector.applyCustomTheme`)})]})]}),(0,h.jsx)(J,{label:e(`inspector.codeTheme`),htmlFor:`inspector-code-theme-select`,action:r.overrides.codeTheme?(0,h.jsxs)(`button`,{type:`button`,disabled:g,onClick:()=>void P(`codeTheme`,null),className:`inline-flex cursor-pointer items-center gap-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-45`,children:[(0,h.jsx)(rs,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`inspector.resetDefault`)})]}):void 0,children:(0,h.jsx)(ql,{id:`inspector-code-theme-select`,value:j,disabled:g,onChange:e=>void P(`codeTheme`,e.target.value),className:`h-8 text-xs`,children:i.codeThemes.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})}),(0,h.jsx)(J,{label:e(`inspector.imageCaption`),htmlFor:`inspector-caption-select`,action:r.overrides.imageCaption?(0,h.jsxs)(`button`,{type:`button`,disabled:g,onClick:()=>void P(`imageCaption`,null),className:`inline-flex cursor-pointer items-center gap-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-45`,children:[(0,h.jsx)(rs,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`inspector.resetDefault`)})]}):void 0,children:(0,h.jsx)(ql,{id:`inspector-caption-select`,value:M,disabled:g,onChange:e=>void P(`imageCaption`,e.target.value),className:`h-8 text-xs`,children:i.imageCaptions.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]}):null,(0,h.jsxs)(`section`,{className:`space-y-3.5 p-4`,children:[(0,h.jsxs)(`h2`,{className:`flex items-center gap-2 text-[13px] font-semibold text-foreground`,children:[(0,h.jsx)(ds,{className:`size-3.5 text-muted-foreground`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:e(`library.defaults`)})]}),(0,h.jsx)(J,{label:e(`library.defaultTheme`),htmlFor:`default-theme-select`,children:(0,h.jsx)(ql,{id:`default-theme-select`,value:n.project.theme,disabled:g,onChange:e=>void F({theme:e.target.value}),className:`h-8 text-xs`,children:i.themes.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})}),(0,h.jsx)(J,{label:e(`library.defaultCodeTheme`),htmlFor:`default-code-theme-select`,children:(0,h.jsx)(ql,{id:`default-code-theme-select`,value:n.project.codeTheme,disabled:g,onChange:e=>void F({codeTheme:e.target.value}),className:`h-8 text-xs`,children:i.codeThemes.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})}),(0,h.jsx)(J,{label:e(`library.defaultImageCaption`),htmlFor:`default-caption-select`,children:(0,h.jsx)(ql,{id:`default-caption-select`,value:n.project.imageCaption,disabled:g,onChange:e=>void F({imageCaption:e.target.value}),className:`h-8 text-xs`,children:i.imageCaptions.map(e=>(0,h.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]})]}):r?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`section`,{className:`space-y-3 p-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(Hl,{tone:oe>0?`err`:N>0?`warn`:`ok`}),(0,h.jsx)(`h2`,{className:`text-[13px] font-semibold text-foreground`,children:e(`inspector.diagnostics`)})]}),(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`xs`,disabled:g,onClick:()=>void se(),children:[(0,h.jsx)(V,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`inspector.checkNow`)})]})]}),ae.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`inspector.noDiagnostics`)}):(0,h.jsx)(`ul`,{className:`divide-y divide-border border-t border-border pt-1`,children:ae.map(e=>(0,h.jsxs)(`li`,{className:`space-y-1 py-2 text-xs leading-relaxed`,children:[(0,h.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,h.jsxs)(fl,{variant:e.severity===`error`?`destructive`:e.severity===`warning`?`warning`:`secondary`,className:`font-mono`,children:[e.line===void 0?``:`L${e.line} `,e.code]})}),(0,h.jsx)(`p`,{className:`text-foreground text-pretty`,children:e.message})]},`${e.code}-${e.line??0}-${e.severity}-${e.message}`))})]}),(0,h.jsxs)(`section`,{className:`space-y-3.5 p-4`,children:[(0,h.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,h.jsx)(`h2`,{className:`text-[13px] font-semibold text-foreground`,children:e(`draft.title`)}),(0,h.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:e(`draft.boundary`)})]}),a.items.length===0?(0,h.jsx)(ul,{variant:`warning`,children:(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{children:e(`draft.noAccount`)}),(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`xs`,onClick:f,children:[(0,h.jsx)(ls,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`draft.manageAccounts`)})]})]})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(J,{label:e(`draft.account`),htmlFor:`draft-account-select`,children:(0,h.jsx)(ql,{id:`draft-account-select`,value:ne,disabled:g,onChange:e=>{re(e.target.value),k(null)},className:`h-8 text-xs`,children:a.items.map(t=>(0,h.jsxs)(`option`,{value:t.id,children:[t.name,` (`,t.test?e(`accounts.test`):e(`accounts.production`),`)`]},t.id))})}),O?(0,h.jsxs)(`div`,{className:`overflow-hidden rounded-[10px] border border-brand/35 bg-brand-subtle/40 animate-panel-reveal`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3.5 py-2.5`,children:[(0,h.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:e(`draft.confirmTitle`)}),(0,h.jsx)(fl,{variant:`accent`,children:O.action===`create`?e(`draft.create`):e(`draft.update`)})]}),(0,h.jsxs)(`dl`,{className:`divide-y divide-border px-3.5 text-xs`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 py-2`,children:[(0,h.jsx)(`dt`,{className:`text-muted-foreground`,children:e(`draft.account`)}),(0,h.jsx)(`dd`,{className:`truncate font-medium text-foreground`,children:O.accountName})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 py-2`,children:[(0,h.jsx)(`dt`,{className:`text-muted-foreground`,children:e(`draft.hashLabel`)}),(0,h.jsx)(`dd`,{className:`font-mono text-[11px] tabular-nums text-foreground`,children:O.buildHash.slice(0,10)})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2 py-2`,children:[(0,h.jsx)(`dt`,{className:`text-muted-foreground`,children:e(`draft.uploadsLabel`)}),(0,h.jsx)(`dd`,{className:`font-mono text-[11px] tabular-nums text-foreground`,children:e(`draft.uploadsValue`,{uploads:O.uploads,reused:O.reusedUploads})})]})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-border bg-card/70 px-3.5 py-2.5`,children:[(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`xs`,disabled:g,onClick:()=>k(null),children:e(`draft.cancel`)}),(0,h.jsx)(K,{type:`button`,variant:`accent`,size:`xs`,disabled:g,onClick:()=>void de(),children:e(`draft.confirmPush`)})]})]}):(0,h.jsxs)(K,{type:`button`,variant:`default`,size:`sm`,disabled:g,onClick:()=>void ue(),className:`w-full`,children:[(0,h.jsx)(ss,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:e(`draft.plan`)})]})]})]}),(0,h.jsxs)(`section`,{className:`space-y-3.5 p-4`,children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,h.jsx)(`h2`,{className:`text-[13px] font-semibold text-foreground`,children:e(`export.title`)}),(0,h.jsx)(fl,{variant:`secondary`,children:e(o===`night`?`preview.night`:`preview.day`)})]}),(0,h.jsxs)(`fieldset`,{"aria-label":e(`export.format`),className:`grid grid-cols-3 rounded-lg border border-border bg-background p-0.5`,children:[(0,h.jsx)(`legend`,{className:`sr-only`,children:e(`export.format`)}),fe.map(e=>{let t=S===e.id;return(0,h.jsx)(`button`,{type:`button`,"aria-pressed":t,disabled:g,onClick:()=>C(e.id),className:G(`inline-flex h-7 cursor-pointer items-center justify-center rounded-md text-xs font-medium transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,t?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:e.label},e.id)})]}),(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,h.jsx)(`label`,{htmlFor:`export-save-disk-switch`,className:`cursor-pointer text-xs text-foreground`,children:e(`export.saveToDisk`)}),(0,h.jsx)(X,{id:`export-save-disk-switch`,checked:w,disabled:g,onCheckedChange:T})]}),(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`sm`,disabled:g,onClick:()=>void ce(),className:`w-full`,children:[(0,h.jsx)(yo,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:e(D?`export.retry`:`export.run`)})]}),E?(0,h.jsxs)(ul,{variant:`warning`,children:[(0,h.jsx)(`p`,{children:E}),(0,h.jsx)(K,{type:`button`,variant:`default`,size:`xs`,disabled:g,onClick:()=>void le(),children:e(`export.installBrowser`)})]}):null]})]}):(0,h.jsx)(`div`,{className:`p-6 text-center text-xs text-muted-foreground`,children:e(`article.selectPrompt`)})})]})}function Zl({open:e,t,libraries:n,activeLibraryId:r,onClose:i,onSelectLibrary:a,onLibrariesChanged:o}){let[s,c]=(0,d.useState)(null),[l,u]=(0,d.useState)(``),[f,p]=(0,d.useState)(!0),[m,g]=(0,d.useState)(!1),[_,v]=(0,d.useState)(null),[y,b]=(0,d.useState)(null),x=(0,d.useCallback)(async e=>{p(!0),v(null);try{let t=await ws.browseDirectories(e);c(t),u(t.currentPath)}catch(e){v(e instanceof Error?e.message:String(e))}finally{p(!1)}},[]);(0,d.useEffect)(()=>{e&&x()},[e,x]);async function S(e){if(s){g(!0),v(null);try{await o((await ws.registerLibrary({root:s.currentPath,initialize:e})).library.id),i()}catch(e){v(e instanceof Error?e.message:String(e))}finally{g(!1)}}}async function C(){if(y){g(!0),v(null);try{let e=await ws.removeLibrary(y.id);b(null),await o(e.lastActiveLibraryId)}catch(e){v(e instanceof Error?e.message:String(e))}finally{g(!1)}}}return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(q,{open:e,title:t(`library.modalTitle`),closeLabel:t(`common.close`),size:`lg`,bodyClassName:`p-0 divide-y divide-border`,onClose:i,children:[(0,h.jsxs)(`section`,{children:[(0,h.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2 px-5 pt-4 pb-2.5`,children:[(0,h.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:t(`library.registered`)}),(0,h.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:t(`library.removeNote`)})]}),n.length===0?(0,h.jsx)(`div`,{className:`px-5 py-6 text-center text-xs text-muted-foreground`,children:t(`library.noneRegistered`)}):(0,h.jsx)(`ul`,{className:`divide-y divide-border border-t border-border`,children:n.map(e=>{let n=e.id===r;return(0,h.jsxs)(`li`,{className:G(`flex items-center justify-between gap-3 px-5 py-2.5 transition-colors`,n?`bg-brand-subtle/50`:`hover:bg-surface-subtle/60`),children:[(0,h.jsxs)(`button`,{type:`button`,onClick:()=>{a(e.id),i()},className:`flex min-w-0 flex-1 cursor-pointer items-center gap-2.5 text-left focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsx)(`span`,{className:G(`flex size-7 shrink-0 items-center justify-center rounded-md border`,n?`border-brand/30 bg-card text-brand`:`border-border bg-surface-subtle text-muted-foreground`),children:n?(0,h.jsx)(oo,{className:`size-3.5`}):(0,h.jsx)(ko,{className:`size-3.5`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,h.jsx)(`span`,{className:`truncate text-[13px] font-medium text-foreground`,children:e.name}),n?(0,h.jsx)(fl,{variant:`accent`,children:t(`library.activeBadge`)}):null,e.hasConfig?(0,h.jsx)(fl,{variant:`success`,children:t(`library.hasConfigBadge`)}):null]}),(0,h.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-muted-foreground`,children:e.root})]})]}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:m,"aria-label":`${t(`library.remove`)} ${e.name}`,title:t(`library.remove`),onClick:()=>b(e),className:`text-muted-foreground hover:text-destructive`,children:(0,h.jsx)(_s,{className:`size-3.5`})})]},e.id)})})]}),(0,h.jsxs)(`section`,{children:[(0,h.jsxs)(`div`,{className:`space-y-2.5 px-5 pt-4 pb-3`,children:[(0,h.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:t(`library.browseTitle`)}),(0,h.jsxs)(`form`,{className:`flex items-center gap-1.5`,onSubmit:e=>{e.preventDefault(),x(l)},children:[(0,h.jsx)(Y,{type:`text`,"aria-label":t(`library.pathInput`),placeholder:t(`library.pathPlaceholder`),value:l,onChange:e=>u(e.target.value),className:`h-8 flex-1 font-mono text-xs`}),(0,h.jsx)(K,{type:`submit`,variant:`outline`,size:`sm`,disabled:f||m,children:t(`library.go`)}),(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`icon-sm`,title:t(`library.up`),"aria-label":t(`library.up`),disabled:f||m||!s?.parentPath,onClick:()=>s?.parentPath&&void x(s.parentPath),children:(0,h.jsx)(io,{className:`size-3.5`})}),(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`icon-sm`,title:t(`library.home`),"aria-label":t(`library.home`),disabled:f||m||!s?.homePath,onClick:()=>s?.homePath&&void x(s.homePath),children:(0,h.jsx)(jo,{className:`size-3.5`})})]}),_?(0,h.jsx)(ul,{variant:`destructive`,children:_}):null]}),s?(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-y border-border bg-surface-subtle/60 px-5 py-2.5`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,h.jsx)(`code`,{className:`truncate font-mono text-xs text-foreground`,children:s.currentPath}),s.hasConfig?(0,h.jsx)(fl,{variant:`success`,children:t(`library.hasConfigBadge`)}):null]}),(0,h.jsxs)(K,{type:`button`,variant:`default`,size:`xs`,disabled:m,onClick:()=>void S(!s.hasConfig),children:[(0,h.jsx)(Do,{className:`size-3`}),(0,h.jsx)(`span`,{children:s.hasConfig?t(`library.addCurrent`):t(`library.initAndAdd`)})]})]}):null,(0,h.jsx)(`div`,{className:`max-h-60 divide-y divide-border overflow-y-auto`,"aria-busy":f,children:f?(0,h.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-8 text-xs text-muted-foreground`,children:[(0,h.jsx)(Lo,{className:`size-3.5 animate-spin`}),(0,h.jsx)(`span`,{children:t(`common.loading`)})]}):s&&s.entries.length>0?s.entries.map(e=>(0,h.jsxs)(`button`,{type:`button`,onClick:()=>void x(e.path),className:`flex w-full cursor-pointer items-center justify-between gap-2 px-5 py-2 text-left text-[13px] text-foreground transition-colors hover:bg-surface-subtle/70 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,h.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e.hasConfig?(0,h.jsx)(Co,{className:`size-3.5 shrink-0 text-status-ok-fg`}):(0,h.jsx)(ko,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,h.jsx)(`span`,{className:`truncate`,children:e.name})]}),e.hasConfig?(0,h.jsx)(fl,{variant:`success`,children:t(`library.hasConfigBadge`)}):null]},e.path)):(0,h.jsx)(`div`,{className:`py-8 text-center text-xs text-muted-foreground`,children:t(`library.emptyDir`)})})]})]}),(0,h.jsx)(Ll,{open:!!y,title:t(`library.removeTitle`),description:y?`${y.name} (${y.root}) · ${t(`library.removeNote`)}`:``,confirmLabel:t(`library.removeConfirm`),cancelLabel:t(`common.cancel`),closeLabel:t(`common.close`),pending:m,onConfirm:()=>void C(),onCancel:()=>b(null)})]})}function Ql({open:e,t,libraryId:n,libraryName:r,onClose:i}){let a=Qe({queryKey:[`library`,n,`operations`],queryFn:()=>ws.listOperations(n,50),enabled:e&&!!n}),o=a.data?.operations??[];return(0,h.jsx)(q,{open:e,title:t(`operations.title`),subtitle:r,closeLabel:t(`common.close`),size:`md`,bodyClassName:`p-0`,onClose:i,footer:(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`sm`,disabled:a.isFetching,onClick:()=>void a.refetch(),children:[(0,h.jsx)($o,{className:a.isFetching?`size-3.5 animate-spin`:`size-3.5`}),(0,h.jsx)(`span`,{children:t(`nav.refresh`)})]}),children:a.error?(0,h.jsx)(`div`,{className:`p-5`,children:(0,h.jsx)(ul,{variant:`destructive`,children:a.error instanceof Error?a.error.message:String(a.error)})}):a.isPending?(0,h.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-10 text-xs text-muted-foreground`,children:[(0,h.jsx)(Lo,{className:`size-4 animate-spin`}),(0,h.jsx)(`span`,{children:t(`common.loading`)})]}):o.length===0?(0,h.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-6 py-10 text-center`,children:[(0,h.jsx)(`div`,{className:`mb-2.5 flex size-9 items-center justify-center rounded-lg border border-border bg-surface-subtle text-muted-foreground`,children:(0,h.jsx)(ts,{className:`size-4`})}),(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`operations.empty`)})]}):(0,h.jsx)(`ul`,{className:`divide-y divide-border`,children:o.map(e=>(0,h.jsxs)(`li`,{className:`space-y-1.5 px-5 py-3.5`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,h.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(fl,{variant:e.status===`succeeded`?`success`:e.status===`failed`?`destructive`:`warning`,children:e.status===`succeeded`?t(`operations.succeeded`):e.status===`failed`?t(`operations.failed`):t(`operations.running`)}),(0,h.jsx)(`span`,{className:`font-mono text-xs font-medium text-foreground`,children:e.type})]}),(0,h.jsx)(`time`,{className:`font-mono text-[11px] tabular-nums text-muted-foreground`,children:new Date(e.startedAt).toLocaleString()})]}),e.articleId||e.accountId?(0,h.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:[e.articleId,e.accountId].filter(Boolean).join(` · `)}):null,e.errorMessage?(0,h.jsxs)(ul,{variant:`destructive`,children:[e.errorCode?`[${e.errorCode}] `:``,e.errorMessage]}):null]},e.id))})})}function $l({icon:e,title:t,description:n,action:r,className:i}){return(0,h.jsxs)(`div`,{className:G(`flex flex-col items-center justify-center rounded-[10px] border border-dashed border-border-strong bg-card px-6 py-8 text-center`,i),children:[e?(0,h.jsx)(`div`,{className:`mb-3 flex size-9 items-center justify-center rounded-lg border border-border bg-surface-subtle text-muted-foreground`,children:e}):null,(0,h.jsx)(`h2`,{className:`text-[15px] font-semibold tracking-[-0.015em] text-foreground text-balance`,children:t}),n?(0,h.jsx)(`p`,{className:`mt-1.5 max-w-sm text-xs leading-relaxed text-muted-foreground text-pretty`,children:n}):null,r?(0,h.jsx)(`div`,{className:`mt-4 flex items-center gap-2`,children:r}):null]})}function eu(e,t){let n=t===`mobile`?`20px`:`32px`,r=e.getElementById(`fafa-web-viewport-style`);r||(r=e.createElement(`style`),r.id=`fafa-web-viewport-style`,e.head?.appendChild(r)),r.textContent=`
11
+ html, body {
12
+ margin: 0 !important;
13
+ padding: 0 !important;
14
+ background: #ffffff !important;
15
+ overflow: hidden !important;
16
+ }
17
+ .shell {
18
+ box-sizing: border-box !important;
19
+ max-width: none !important;
20
+ margin: 0 !important;
21
+ padding: ${n} !important;
22
+ box-shadow: none !important;
23
+ background: #ffffff !important;
24
+ }
25
+ `}function tu({t:e,preview:t,targetArticlePath:n,loading:r,device:i,appearance:a,syncStatus:o,lastSyncedTime:s,error:c,onRetry:l}){let u=(0,d.useRef)(null),f=(0,d.useRef)(null),p=(0,d.useRef)(null),m=(0,d.useRef)(null),g=(0,d.useRef)(0),[_,v]=(0,d.useState)(!0),y=!!(n&&t&&t.articlePath!==n);(0,d.useLayoutEffect)(()=>{let e=u.current;if(!(!e||!t))if(m.current===t.articlePath)g.current=e.scrollTop;else{let e=m.current!==null;g.current=0,m.current=t.articlePath,e&&v(!1)}},[t]),(0,d.useEffect)(()=>()=>{p.current?.disconnect()},[]),(0,d.useEffect)(()=>{let e=f.current;if(!e?.contentDocument)return;eu(e.contentDocument,i);let t=requestAnimationFrame(()=>{let t=e.contentDocument;if(!t)return;let n=Math.max(t.body?.scrollHeight??0,t.documentElement?.scrollHeight??0);n>0&&(e.style.height=`${Math.max(n+16,480)}px`)});return()=>cancelAnimationFrame(t)},[i]);function b(){let e=f.current,t=u.current,n=e?.contentDocument;if(!e||!n)return;eu(n,i);let r=()=>{let t=e.contentDocument;if(!t)return;let n=Math.max(t.body?.scrollHeight??0,t.documentElement?.scrollHeight??0);n>0&&(e.style.height=`${Math.max(n+16,480)}px`)};if(r(),t&&(t.scrollTop=g.current>0?g.current:0),p.current?.disconnect(),typeof ResizeObserver<`u`&&n.body){let e=new ResizeObserver(()=>r());e.observe(n.body),p.current=e}requestAnimationFrame(()=>{r(),v(!0)})}let x=a===`night`,S=e(i===`mobile`?`preview.mobileWidth`:`preview.desktopWidth`),C=r?`loading`:o===`connected`?`ok`:o===`connecting`?`loading`:`err`,w=s&&o===`connected`?e(`sync.syncedAt`,{time:s}):e(o===`connected`?`sync.connected`:o===`connecting`?`sync.connecting`:`sync.disconnected`),T=x?`proof-pill-night`:`proof-pill`,E=x?`proof-pill-night-muted`:`proof-pill-muted`,ee=r||y,D=_?y?`opacity-60`:`opacity-100`:`opacity-0`;return(0,h.jsx)(`div`,{ref:u,"data-appearance":a,className:G(`min-h-0 flex-1 overflow-y-auto px-4 py-5 transition-colors duration-200 sm:px-6 lg:px-8`,x?`proof-mat-night`:`proof-mat-day`),children:(0,h.jsxs)(`div`,{className:G(`mx-auto w-full transition-[max-width] duration-200`,i===`mobile`?`max-w-[390px]`:`max-w-[760px]`),children:[c?(0,h.jsx)(`div`,{className:`mb-4`,children:(0,h.jsx)(ul,{variant:`destructive`,children:(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,h.jsx)(`span`,{children:c}),l?(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`xs`,onClick:l,children:[(0,h.jsx)($o,{className:`size-3`}),(0,h.jsx)(`span`,{children:e(`preview.retry`)})]}):null]})})}):null,!t&&r?(0,h.jsxs)(`div`,{className:`flex min-h-[360px] flex-col items-center justify-center gap-3 rounded-[10px] border border-border bg-card px-6 py-12 text-center`,children:[(0,h.jsx)(Lo,{className:`size-5 animate-spin text-brand`,"aria-hidden":`true`}),(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`preview.loading`)})]}):t?(0,h.jsxs)(`div`,{className:G(`proof-frame flex flex-col`,x&&`proof-frame-night`),children:[(0,h.jsxs)(`div`,{className:G(`proof-ruler relative px-4 py-2.5`,x&&`proof-ruler-night`),children:[(0,h.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,h.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-[14px] font-semibold tracking-[-0.015em]`,title:t.title,children:t.title}),(0,h.jsxs)(`span`,{className:G(`inline-flex shrink-0 items-center gap-1.5 rounded px-1.5 py-0.5 font-mono text-[11px] leading-none tabular-nums`,E),children:[(0,h.jsx)(Hl,{tone:C,size:`sm`}),(0,h.jsx)(`span`,{children:w})]})]}),(0,h.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-1.5`,children:[(0,h.jsx)(`span`,{className:G(`hidden items-center rounded px-1.5 py-0.5 font-mono text-[11px] leading-none tabular-nums sm:inline-flex`,T),children:S}),(0,h.jsx)(`span`,{className:G(`inline-flex items-center rounded px-1.5 py-0.5 text-[11px] leading-none font-medium`,T),children:t.theme.name}),(0,h.jsx)(`span`,{className:G(`inline-flex items-center rounded px-1.5 py-0.5 font-mono text-[11px] leading-none`,E),children:t.codeTheme.name}),(0,h.jsx)(`span`,{className:G(`inline-flex items-center rounded px-1.5 py-0.5 font-mono text-[11px] leading-none tabular-nums`,E),title:t.buildHash,children:e(`preview.hash`,{hash:t.buildHash.slice(0,8)})}),x?(0,h.jsxs)(`span`,{title:e(`preview.nightNotice`),className:G(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] leading-none`,E),children:[(0,h.jsx)(Uo,{className:`proof-night-accent size-3 shrink-0`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{children:e(`preview.nightBadge`)})]}):null]}),(0,h.jsx)(`div`,{"aria-hidden":`true`,className:G(`pointer-events-none absolute inset-x-0 bottom-0 h-[2px] overflow-hidden bg-brand/15 transition-opacity duration-150`,ee?`opacity-100`:`opacity-0`),children:ee?(0,h.jsx)(`div`,{className:`h-full w-1/3 bg-brand animate-sync-shimmer`}):null})]}),(0,h.jsx)(`div`,{className:`bg-white`,children:(0,h.jsx)(`iframe`,{ref:f,id:`fafa-preview-frame`,title:t.title||`WeChat Preview`,sandbox:`allow-same-origin`,srcDoc:t.previewHtml,onLoad:b,className:G(`block min-h-[480px] w-full border-0 bg-white transition-opacity duration-150 ease-out`,D)})})]}):(0,h.jsx)(`div`,{className:`py-12`,children:(0,h.jsx)($l,{icon:c?(0,h.jsx)(ho,{className:`size-4`}):(0,h.jsx)(xo,{className:`size-4`}),title:e(c?`preview.retry`:`article.selectPrompt`),action:c&&l?(0,h.jsxs)(K,{type:`button`,variant:`outline`,size:`sm`,onClick:l,children:[(0,h.jsx)($o,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:e(`preview.retry`)})]}):void 0})})]})})}function nu(e,t=`zh-CN`){let n=e?.trim().replaceAll(`_`,`-`).toLowerCase();return n?n===`zh`||n.startsWith(`zh-`)?`zh-CN`:`en`:t}function ru(e,t={}){return e.replaceAll(/\{([a-zA-Z0-9_]+)\}/g,(e,n)=>{let r=t[n];return r===void 0?e:String(r)})}function iu(e,t){let n=t[e];return(e,t)=>ru(n[e],t)}var au={"zh-CN":{"app.name":`发发 FaFa`,"app.subtitle":`本地微信公众号排版与草稿工作台`,"theme.label":`界面外观`,"theme.light":`浅色`,"theme.system":`系统`,"theme.dark":`深色`,"theme.toggle":`切换深浅色`,"nav.libraries":`内容库`,"nav.selectLibrary":`选择内容库`,"nav.manageLibraries":`管理内容库`,"nav.addLibrary":`添加内容库`,"nav.accounts":`账号`,"nav.operations":`记录`,"nav.refresh":`刷新`,"nav.inspector":`检查器`,"nav.sidebar":`文章列表`,"nav.language":`界面语言`,"nav.openMenu":`打开侧边栏`,"nav.closeMenu":`关闭侧边栏`,"nav.resizeSidebar":`调整侧边栏宽度`,"nav.resizeSidebarHint":`左右拖动调整宽度,双击恢复默认`,"sync.connected":`实时同步`,"sync.connecting":`连接中`,"sync.disconnected":`已断开`,"sync.syncedAt":`{time}`,"sync.reloading":`同步中`,"library.emptyTitle":`尚未添加内容库`,"library.emptyDescription":`选择一个包含 fafa.config.yaml 的本地目录,或直接在任意写作目录初始化新的 FaFa 内容库。`,"library.missingTitle":`内容库目录不可用`,"library.missingDescription":`路径 {root} 不存在或缺少配置文件,请检查目录或重新添加。`,"library.modalTitle":`本地内容库`,"library.registered":`已添加`,"library.noneRegistered":`暂无已添加的内容库。`,"library.remove":`移出`,"library.removeTitle":`移出内容库`,"library.removeConfirm":`移出列表`,"library.removeNote":`仅解除工作台登记,不会删除磁盘中的任何文件。`,"library.browseTitle":`浏览本地目录`,"library.pathInput":`目录路径`,"library.pathPlaceholder":`输入本地绝对路径,例如 /Users/you/workspace/blog`,"library.go":`进入`,"library.home":`主目录`,"library.up":`上一级`,"library.hasConfigBadge":`已初始化`,"library.activeBadge":`当前`,"library.addCurrent":`添加目录`,"library.initAndAdd":`初始化并添加`,"library.emptyDir":`此目录下没有子文件夹。`,"library.defaults":`内容库默认配置`,"library.defaultTheme":`默认主题`,"library.defaultCodeTheme":`默认代码高亮`,"library.defaultImageCaption":`默认图片图注`,"article.searchPlaceholder":`搜索文章或路径...`,"article.clearSearch":`清空搜索`,"article.emptyTitle":`暂无可排版文章`,"article.emptyDescription":`在内容目录下创建带 title front matter 的 Markdown 文件,保存后列表会自动同步。`,"article.noMatch":`未找到匹配的文章`,"article.selectPrompt":`从左侧选择一篇文章以预览微信公众号排版效果。`,"article.count":`{count} 篇`,"preview.viewportLabel":`预览宽度`,"preview.appearanceLabel":`阅读环境`,"preview.desktop":`桌面`,"preview.mobile":`手机`,"preview.desktopWidth":`760px`,"preview.mobileWidth":`390px`,"preview.day":`日间`,"preview.night":`夜间`,"preview.copyWechat":`复制正文`,"preview.copiedShort":`已复制`,"preview.copied":`已复制微信公众号富文本,可直接粘贴到公众号后台`,"preview.copyFailed":`复制失败:{message}`,"preview.loading":`正在渲染微信排版...`,"preview.retry":`重试`,"preview.nightBadge":`暗色诊断 · 正文原色`,"preview.nightNotice":`暗色诊断环境:正文容器保持浅色原样,不改写文章主题色,也不反色图片、Mermaid 与 LaTeX。`,"preview.hash":`#{hash}`,"preview.cached":`缓存`,"inspector.tabStyle":`排版`,"inspector.tabDeliver":`投递`,"inspector.overrides":`单篇样式`,"inspector.overridesHint":`写入单篇 front matter,重置即继承默认。`,"inspector.inherited":`默认`,"inspector.overridden":`覆盖`,"inspector.resetDefault":`恢复默认`,"inspector.theme":`文章主题`,"inspector.customThemePlaceholder":`自定义 CSS,如 themes/brand.css`,"inspector.applyCustomTheme":`应用`,"inspector.codeTheme":`代码高亮`,"inspector.imageCaption":`图片图注`,"inspector.diagnostics":`离线校验`,"inspector.checkNow":`校验`,"inspector.checkPassed":`通过 · {warnings} 警告`,"inspector.checkFailed":`{errors} 错误 · {warnings} 警告`,"inspector.noDiagnostics":`无错误或警告。`,"export.title":`导出文档`,"export.format":`格式`,"export.formatHtml":`HTML`,"export.formatPdf":`PDF`,"export.formatPng":`PNG`,"export.appearanceHint":`使用当前「{appearance}」预览外观`,"export.saveToDisk":`同步保存到文章同目录`,"export.run":`导出`,"export.retry":`重新导出`,"export.succeeded":`已导出 {filename}`,"export.succeededDisk":`已保存到 {path}`,"export.missingBrowser":`未检测到可用于 PDF/PNG 导出的 Chromium 浏览器。`,"export.installBrowser":`安装受控 Chromium`,"export.browserInstalled":`导出浏览器已就绪({source}),可重新导出。`,"draft.title":`公众号草稿箱`,"draft.boundary":`仅写入草稿箱,不执行正式发布;请在公众号后台人工审核发布。`,"draft.account":`目标账号`,"draft.noAccount":`尚未配置公众号账号。`,"draft.manageAccounts":`配置账号`,"draft.plan":`预检草稿`,"draft.create":`新建草稿`,"draft.update":`原位更新`,"draft.actionLabel":`操作`,"draft.hashLabel":`构建哈希`,"draft.uploadsLabel":`素材上传`,"draft.uploadsValue":`新传 {uploads} / 复用 {reused}`,"draft.confirmTitle":`预检通过,待确认写入`,"draft.confirmBody":`即将以账号「{account}」执行「{action}」(构建哈希 {hash},新上传 {uploads} 个素材,复用 {reused} 个)。仅保存为草稿,不会正式发布。`,"draft.confirmPush":`确认写入`,"draft.cancel":`取消`,"draft.pushSucceeded":`草稿已{action}(media_id: {mediaId})`,"draft.actionCreated":`创建`,"draft.actionUpdated":`更新`,"accounts.title":`微信公众号账号`,"accounts.add":`新增账号`,"accounts.editTitle":`编辑公众号账号`,"accounts.edit":`编辑`,"accounts.probe":`探测`,"accounts.remove":`删除`,"accounts.confirmRemove":`确认删除`,"accounts.removeDescription":`将从本地配置移除账号「{name}」及其凭据,不影响公众号后台已有草稿。`,"accounts.id":`账号 ID`,"accounts.idPlaceholder":`小写字母、数字和连字符,例如 main-wechat`,"accounts.name":`显示名称`,"accounts.namePlaceholder":`例如 主公众号`,"accounts.appId":`AppID`,"accounts.appSecret":`AppSecret`,"accounts.appSecretPlaceholder":`输入公众号 AppSecret`,"accounts.appSecretKeep":`留空则保留已有 AppSecret`,"accounts.test":`测试号`,"accounts.production":`正式号`,"accounts.default":`默认`,"accounts.save":`保存`,"accounts.empty":`尚未配置任何微信公众号账号。`,"accounts.probeOk":`账号「{name}」Token 与草稿接口探测正常({time})`,"operations.title":`操作记录`,"operations.empty":`当前内容库暂无本地操作记录。`,"operations.succeeded":`成功`,"operations.failed":`失败`,"operations.running":`进行中`,"common.close":`关闭`,"common.cancel":`取消`,"common.loading":`加载中...`},en:{"app.name":`FaFa`,"app.subtitle":`Local WeChat Layout & Draft Workbench`,"theme.label":`Appearance`,"theme.light":`Light`,"theme.system":`System`,"theme.dark":`Dark`,"theme.toggle":`Toggle theme`,"nav.libraries":`Libraries`,"nav.selectLibrary":`Select library`,"nav.manageLibraries":`Manage libraries`,"nav.addLibrary":`Add Library`,"nav.accounts":`Accounts`,"nav.operations":`History`,"nav.refresh":`Refresh`,"nav.inspector":`Inspector`,"nav.sidebar":`Articles`,"nav.language":`Language`,"nav.openMenu":`Open sidebar`,"nav.closeMenu":`Close sidebar`,"nav.resizeSidebar":`Resize sidebar width`,"nav.resizeSidebarHint":`Drag to resize sidebar; double-click to reset`,"sync.connected":`Live`,"sync.connecting":`Syncing`,"sync.disconnected":`Offline`,"sync.syncedAt":`{time}`,"sync.reloading":`Syncing`,"library.emptyTitle":`No content library added`,"library.emptyDescription":`Pick a local folder containing fafa.config.yaml or initialize a new FaFa library in any writing directory.`,"library.missingTitle":`Library folder unavailable`,"library.missingDescription":`Path {root} is missing or uninitialized. Check the folder or register another library.`,"library.modalTitle":`Local Libraries`,"library.registered":`Registered`,"library.noneRegistered":`No libraries registered yet.`,"library.remove":`Remove`,"library.removeTitle":`Remove library`,"library.removeConfirm":`Remove`,"library.removeNote":`Unregisters the folder from FaFa Workbench without deleting disk files.`,"library.browseTitle":`Browse Local Folders`,"library.pathInput":`Folder path`,"library.pathPlaceholder":`Absolute path, e.g. /Users/you/workspace/blog`,"library.go":`Go`,"library.home":`Home`,"library.up":`Up`,"library.hasConfigBadge":`Ready`,"library.activeBadge":`Active`,"library.addCurrent":`Add Folder`,"library.initAndAdd":`Init & Add`,"library.emptyDir":`No subfolders in this directory.`,"library.defaults":`Library Defaults`,"library.defaultTheme":`Default theme`,"library.defaultCodeTheme":`Default code theme`,"library.defaultImageCaption":`Default image caption`,"article.searchPlaceholder":`Filter articles or paths...`,"article.clearSearch":`Clear filter`,"article.emptyTitle":`No articles found`,"article.emptyDescription":`Add a Markdown file with title front matter; saving refreshes this list automatically.`,"article.noMatch":`No matching articles`,"article.selectPrompt":`Select an article from the sidebar to preview its WeChat layout.`,"article.count":`{count} articles`,"preview.viewportLabel":`Preview width`,"preview.appearanceLabel":`Reading canvas`,"preview.desktop":`Desktop`,"preview.mobile":`Mobile`,"preview.desktopWidth":`760px`,"preview.mobileWidth":`390px`,"preview.day":`Day`,"preview.night":`Night`,"preview.copyWechat":`Copy HTML`,"preview.copiedShort":`Copied`,"preview.copied":`Copied WeChat-ready rich HTML to clipboard`,"preview.copyFailed":`Copy failed: {message}`,"preview.loading":`Rendering WeChat preview...`,"preview.retry":`Retry`,"preview.nightBadge":`Night mat · Light sheet`,"preview.nightNotice":`Night diagnostic canvas: article sheet remains light with original theme colors and unaltered media.`,"preview.hash":`#{hash}`,"preview.cached":`cached`,"inspector.tabStyle":`Style`,"inspector.tabDeliver":`Deliver`,"inspector.overrides":`Article Style`,"inspector.overridesHint":`Saved to article front matter; reset to inherit defaults.`,"inspector.inherited":`Default`,"inspector.overridden":`Override`,"inspector.resetDefault":`Reset`,"inspector.theme":`Article theme`,"inspector.customThemePlaceholder":`Custom CSS, e.g. themes/brand.css`,"inspector.applyCustomTheme":`Apply`,"inspector.codeTheme":`Code highlight`,"inspector.imageCaption":`Image caption`,"inspector.diagnostics":`Offline Check`,"inspector.checkNow":`Check`,"inspector.checkPassed":`Passed · {warnings} warnings`,"inspector.checkFailed":`{errors} errors · {warnings} warnings`,"inspector.noDiagnostics":`No errors or warnings.`,"export.title":`Export`,"export.format":`Format`,"export.formatHtml":`HTML`,"export.formatPdf":`PDF`,"export.formatPng":`PNG`,"export.appearanceHint":`Uses current {appearance} preview appearance`,"export.saveToDisk":`Also save beside article`,"export.run":`Export`,"export.retry":`Retry Export`,"export.succeeded":`Exported {filename}`,"export.succeededDisk":`Saved to {path}`,"export.missingBrowser":`No Chromium runtime found for PDF/PNG export.`,"export.installBrowser":`Install Chromium`,"export.browserInstalled":`Browser ready ({source}). You can retry export.`,"draft.title":`WeChat Draft Box`,"draft.boundary":`Saves to the WeChat draft box only and never publishes directly.`,"draft.account":`Account`,"draft.noAccount":`No WeChat account configured.`,"draft.manageAccounts":`Add Account`,"draft.plan":`Preflight`,"draft.create":`Create draft`,"draft.update":`Update draft`,"draft.actionLabel":`Action`,"draft.hashLabel":`Build hash`,"draft.uploadsLabel":`Media`,"draft.uploadsValue":`{uploads} new / {reused} reused`,"draft.confirmTitle":`Preflight passed`,"draft.confirmBody":`Ready to "{action}" via "{account}" (hash {hash}, {uploads} new uploads, {reused} reused). Saves as draft only.`,"draft.confirmPush":`Push Draft`,"draft.cancel":`Cancel`,"draft.pushSucceeded":`Draft {action} (media_id: {mediaId})`,"draft.actionCreated":`created`,"draft.actionUpdated":`updated`,"accounts.title":`WeChat Accounts`,"accounts.add":`Add Account`,"accounts.editTitle":`Edit WeChat Account`,"accounts.edit":`Edit`,"accounts.probe":`Probe`,"accounts.remove":`Delete`,"accounts.confirmRemove":`Delete`,"accounts.removeDescription":`Removes "{name}" and its local credentials without affecting existing drafts on WeChat.`,"accounts.id":`Account ID`,"accounts.idPlaceholder":`Lowercase letters, digits, hyphens (e.g. main-wechat)`,"accounts.name":`Display name`,"accounts.namePlaceholder":`e.g. Main Official Account`,"accounts.appId":`AppID`,"accounts.appSecret":`AppSecret`,"accounts.appSecretPlaceholder":`Enter WeChat AppSecret`,"accounts.appSecretKeep":`Leave blank to keep existing secret`,"accounts.test":`Test`,"accounts.production":`Production`,"accounts.default":`Default`,"accounts.save":`Save`,"accounts.empty":`No WeChat accounts configured yet.`,"accounts.probeOk":`Account "{name}" draft capability verified ({time})`,"operations.title":`Operation History`,"operations.empty":`No local operations recorded for this library yet.`,"operations.succeeded":`Succeeded`,"operations.failed":`Failed`,"operations.running":`Running`,"common.close":`Close`,"common.cancel":`Cancel`,"common.loading":`Loading...`}},ou=`fafa.web.locale`;function su(){try{let e=globalThis.localStorage?.getItem(ou);if(e)return nu(e,`zh-CN`)}catch{}return`zh-CN`}function cu(e){try{globalThis.localStorage?.setItem(ou,e)}catch{}}function lu(e){return iu(nu(e,`zh-CN`),au)}var uu=`fafa.web.sidebarWidth`;function du(e,t){let n=t&&t>0?Math.max(220,Math.floor(t*.45)):480,r=Math.min(480,n),i=Math.round(e);return Number.isFinite(i)?Math.min(r,Math.max(220,i)):264}function fu(e){try{let t=globalThis.localStorage?.getItem(uu);if(t){let n=Number.parseInt(t,10);if(Number.isFinite(n))return du(n,e)}}catch{}return 264}function pu(e){try{globalThis.localStorage?.setItem(uu,String(du(e)))}catch{}}async function mu(e){if(navigator.clipboard&&typeof ClipboardItem<`u`){let t=new Blob([e],{type:`text/html`}),n=new DOMParser().parseFromString(e,`text/html`).body.innerText,r=new Blob([n],{type:`text/plain`});await navigator.clipboard.write([new ClipboardItem({"text/html":t,"text/plain":r})]);return}await navigator.clipboard.writeText(e)}function hu(e){let t=e.match(/^\/libraries\/([^/]+)/);return t?.[1]?decodeURIComponent(t[1]):null}function gu(){let e=_(),t=Da(),n=Vi(),[r,i]=(0,d.useState)(()=>su()),a=(0,d.useMemo)(()=>lu(r),[r]),o=r===`zh-CN`?`EN`:`中文`,s=hu(t.pathname),c=t.search,l=typeof c?.article==`string`&&c.article.length>0?c.article:null,u=c?.tab===`deliver`?`deliver`:`style`,[f,p]=(0,d.useState)(`desktop`),[m,g]=(0,d.useState)(`day`),[v,y]=(0,d.useState)(`connecting`),[b,x]=(0,d.useState)(null),[S,C]=(0,d.useState)(!1),[w,T]=(0,d.useState)(()=>fu(typeof window<`u`?window.innerWidth:void 0)),[E,ee]=(0,d.useState)(!1),[D,te]=(0,d.useState)(!0),[ne,re]=(0,d.useState)(!1),[O,k]=(0,d.useState)(!1),[A,j]=(0,d.useState)(null),[M,ie]=(0,d.useState)(null),ae=(0,d.useRef)(r);ae.current=r;let oe=(0,d.useRef)(l);oe.current=l;let N=(0,d.useRef)(w);N.current=w;let P=(0,d.useRef)(null),F=(0,d.useCallback)((e,t)=>{ie({tone:e,text:t})},[]);(0,d.useEffect)(()=>{if(!M)return;let e=setTimeout(()=>ie(null),4e3);return()=>clearTimeout(e)},[M]),(0,d.useEffect)(()=>{document.documentElement.lang=r},[r]),(0,d.useEffect)(()=>{if(!S&&!ne)return;let e=e=>{e.key===`Escape`&&(C(!1),re(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S,ne]),(0,d.useEffect)(()=>{let e=()=>{T(e=>du(e,window.innerWidth))};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,d.useEffect)(()=>{if(!E)return;let e=document.body.style.cursor,t=document.body.style.userSelect;return document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,()=>{document.body.style.cursor=e,document.body.style.userSelect=t}},[E]);let se=(0,d.useCallback)(e=>{e.button===0&&(e.preventDefault(),P.current={startX:e.clientX,startWidth:N.current},e.currentTarget.setPointerCapture(e.pointerId),ee(!0))},[]),ce=(0,d.useCallback)(e=>{if(!P.current)return;let t=du(P.current.startWidth+(e.clientX-P.current.startX),window.innerWidth);T(t)},[]),le=(0,d.useCallback)(e=>{P.current&&(P.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),ee(!1),pu(N.current))},[]),de=(0,d.useCallback)(()=>{T(264),pu(264)},[]),fe=(0,d.useCallback)(e=>{let t=e.shiftKey?40:16;if(e.key===`ArrowLeft`){e.preventDefault();let n=du(N.current-t,window.innerWidth);T(n),pu(n)}else if(e.key===`ArrowRight`){e.preventDefault();let n=du(N.current+t,window.innerWidth);T(n),pu(n)}else e.key===`Home`&&(e.preventDefault(),de())},[de]),pe=Qe({queryKey:[`bootstrap`,r],queryFn:()=>ws.bootstrap(r)}),I=pe.data??null,L=(0,d.useMemo)(()=>!I||s&&I.libraries.some(e=>e.id===s)?s:I.lastActiveLibraryId&&I.libraries.some(e=>e.id===I.lastActiveLibraryId)?I.lastActiveLibraryId:I.libraries[0]?.id??null,[I,s]),me=(0,d.useMemo)(()=>I?.libraries.find(e=>e.id===L)??null,[I,L]);(0,d.useEffect)(()=>{I&&(L&&s!==L?n({to:`/libraries/$libraryId`,params:{libraryId:L},search:u===`deliver`?{tab:`deliver`}:{},replace:!0}):!L&&t.pathname!==`/`&&n({to:`/`,replace:!0}))},[I,L,s,u,t.pathname,n]);let he=!!(L&&me?.exists&&me?.hasConfig),ge=Qe({queryKey:[`library`,L,`snapshot`],queryFn:()=>ws.getLibraryArticles(L),enabled:he}),_e=ge.data??null,ve=(0,d.useMemo)(()=>!_e||l&&_e.articles.some(e=>e.path===l)?l:_e.articles[0]?.path??null,[_e,l]);oe.current=ve,(0,d.useEffect)(()=>{!L||!_e||ve&&ve!==l&&n({to:`/libraries/$libraryId`,params:{libraryId:L},search:{article:ve,...u===`deliver`?{tab:`deliver`}:{}},replace:!0})},[L,_e,ve,l,u,n]);let ye=Qe({queryKey:[`library`,L,`preview`,ve,r],queryFn:()=>ws.getPreview(L,ve,r,!1),enabled:he&&!!ve,staleTime:3e4,placeholderData:ue}),be=(0,d.useCallback)(t=>{!L||!he||e.prefetchQuery({queryKey:[`library`,L,`preview`,t,r],queryFn:()=>ws.getPreview(L,t,r,!1),staleTime:3e4})},[L,he,r,e]),xe=ye.data&&ye.data.articlePath===ve?ye.data:ye.isPlaceholderData?ye.data??null:null;(0,d.useEffect)(()=>{if(!he||!L)return;y(`connecting`);let t=Ts(L,{onEvent(t){if(t.type===`connected`){y(`connected`);return}if(t.type===`library.removed`){e.invalidateQueries({queryKey:[`bootstrap`]}),n({to:`/`,replace:!0});return}if(t.type===`config.changed`){x(new Date().toLocaleTimeString()),e.invalidateQueries({queryKey:[`library`,L]});return}if(t.type===`articles.changed`){x(new Date().toLocaleTimeString()),e.invalidateQueries({queryKey:[`library`,L,`snapshot`]});return}if(t.type===`article.updated`){x(new Date().toLocaleTimeString());let n=oe.current;if(n&&(t.invalidateAll||t.paths.includes(n))){let t=ae.current;ws.getPreview(L,n,t,!0).then(r=>{e.setQueryData([`library`,L,`preview`,n,t],r)}).catch(()=>{e.invalidateQueries({queryKey:[`library`,L,`preview`,n,t]})})}}},onError(){y(`disconnected`)}});return()=>{t()}},[L,he,n,e]);function Se(e){e!==L&&n({to:`/libraries/$libraryId`,params:{libraryId:e},search:{}})}function Ce(e){L&&n({to:`/libraries/$libraryId`,params:{libraryId:L},search:{article:e,...u===`deliver`?{tab:`deliver`}:{}}})}function we(e){L&&n({to:`/libraries/$libraryId`,params:{libraryId:L},search:{...ve?{article:ve}:{},...e===`deliver`?{tab:`deliver`}:{}},replace:!0})}async function Te(){if(!L){await e.invalidateQueries({queryKey:[`bootstrap`]});return}try{let t=await ws.refreshLibrary(L);e.setQueryData([`library`,L,`snapshot`],t);let n=oe.current,i=n&&t.articles.some(e=>e.path===n)?n:t.articles[0]?.path??null;if(i){let t=await ws.getPreview(L,i,r,!0);e.setQueryData([`library`,L,`preview`,i,r],t)}x(new Date().toLocaleTimeString())}catch(e){F(`danger`,e instanceof Error?e.message:String(e))}}async function Ee(){if(xe)try{await mu(xe.wechatHtml),k(!0),setTimeout(()=>k(!1),1800),F(`success`,a(`preview.copied`))}catch(e){F(`danger`,a(`preview.copyFailed`,{message:e instanceof Error?e.message:String(e)}))}}function De(){let e=r===`zh-CN`?`en`:`zh-CN`;i(e),cu(e)}function Oe(){typeof window<`u`&&window.innerWidth>=1280?te(e=>!e):re(e=>!e)}let ke=(0,d.useCallback)(t=>{if(e.setQueryData([`library`,t.library.id,`snapshot`],t),oe.current){let n=ae.current;ws.getPreview(t.library.id,oe.current,n,!0).then(r=>{e.setQueryData([`library`,t.library.id,`preview`,r.articlePath,n],r)}).catch(()=>{})}},[e]);if(pe.isPending)return(0,h.jsxs)(`div`,{className:`flex min-h-dvh flex-col items-center justify-center gap-3 bg-background text-foreground`,children:[(0,h.jsx)(Lo,{className:`size-5 animate-spin text-brand`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a(`common.loading`)})]});let Ae=ge.isFetching||ye.isFetching,je=ye.error?ye.error instanceof Error?ye.error.message:String(ye.error):ge.error?ge.error instanceof Error?ge.error.message:String(ge.error):null,Me=(0,h.jsx)(Kl,{t:a,activeLibrary:me,snapshot:_e,selectedArticlePath:ve,syncStatus:v,accountCount:I?.accounts.items.length??0,localeLabel:o,onSelectArticle:Ce,onPrefetchArticle:be,onOpenLibraries:()=>j(`libraries`),onOpenAccounts:()=>j(`accounts`),onOpenOperations:()=>j(`operations`),onToggleLocale:De,onCloseMobile:()=>C(!1)}),Ne=_e&&I?(0,h.jsx)(Xl,{t:a,locale:r,snapshot:_e,preview:xe,presets:I.presets,accounts:I.accounts,appearance:m,activeTab:u,onTabChange:we,onPreviewUpdated:t=>{e.setQueryData([`library`,_e.library.id,`preview`,t.articlePath,r],t)},onSnapshotUpdated:ke,onOpenAccounts:()=>j(`accounts`),onToast:F}):null;return(0,h.jsxs)(`div`,{className:`flex min-h-dvh bg-background text-foreground lg:h-dvh lg:overflow-hidden`,children:[(0,h.jsxs)(`aside`,{style:{width:`${w}px`},className:`relative hidden h-full shrink-0 border-r border-border lg:block`,children:[Me,(0,h.jsx)(`button`,{type:`button`,"aria-label":a(`nav.resizeSidebar`),title:a(`nav.resizeSidebarHint`),onPointerDown:se,onPointerMove:ce,onPointerUp:le,onPointerCancel:le,onDoubleClick:de,onKeyDown:fe,className:`group absolute inset-y-0 -right-[4px] z-30 w-[9px] cursor-col-resize bg-transparent p-0 focus-visible:outline-none`,children:(0,h.jsx)(`span`,{"aria-hidden":`true`,className:G(`pointer-events-none absolute inset-y-0 left-1/2 w-[2px] -translate-x-1/2 transition-colors duration-150`,E?`bg-brand`:`bg-transparent group-hover:bg-brand/70 group-focus-visible:bg-brand`)})})]}),S?(0,h.jsxs)(`dialog`,{open:!0,"aria-modal":`true`,"aria-label":a(`nav.sidebar`),className:`fixed inset-0 z-40 m-0 flex h-dvh w-screen max-w-none border-0 bg-transparent p-0 text-foreground lg:hidden`,children:[(0,h.jsx)(`button`,{type:`button`,"aria-label":a(`nav.closeMenu`),onClick:()=>C(!1),className:`fixed inset-0 cursor-default bg-black/40`}),(0,h.jsx)(`aside`,{className:`relative z-10 h-full w-[276px] max-w-[84vw] border-r border-border shadow-xl`,children:Me})]}):null,(0,h.jsxs)(`div`,{className:G(`flex min-w-0 flex-1 flex-col lg:h-full lg:overflow-hidden`,E&&`pointer-events-none`),children:[(0,h.jsxs)(`header`,{className:`sticky top-0 z-20 flex h-12 shrink-0 items-center justify-between gap-2 border-b border-border bg-background/95 px-3 sm:px-4 lg:static`,children:[(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>C(!0),"aria-label":a(`nav.openMenu`),className:`lg:hidden`,children:(0,h.jsx)(zo,{className:`size-4`})}),(0,h.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:me?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{title:me.root,className:G(`max-w-[160px] truncate`,ve?`font-medium text-foreground sm:font-normal sm:text-muted-foreground`:`font-medium text-foreground`),children:me.name}),ve?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:`hidden text-border-strong sm:inline`,children:`/`}),(0,h.jsx)(`span`,{title:ve,className:`hidden max-w-[360px] truncate font-mono text-[11px] font-medium text-foreground sm:inline lg:max-w-[440px]`,children:ve})]}):null]}):(0,h.jsx)(`span`,{className:`truncate font-medium text-foreground`,children:a(`nav.libraries`)})}),(0,h.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>void Te(),"aria-label":a(`nav.refresh`),title:a(`nav.refresh`),children:(0,h.jsx)($o,{className:G(`size-3.5`,Ae&&`animate-spin`)})})]}),(0,h.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 sm:gap-2`,children:[(0,h.jsxs)(`fieldset`,{"aria-label":a(`preview.viewportLabel`),className:`hidden items-center rounded-lg border border-border bg-surface-subtle p-0.5 sm:inline-flex`,children:[(0,h.jsx)(`legend`,{className:`sr-only`,children:a(`preview.viewportLabel`)}),(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":f===`desktop`,onClick:()=>p(`desktop`),title:`${a(`preview.desktop`)} ${a(`preview.desktopWidth`)}`,className:G(`inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,f===`desktop`?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:[(0,h.jsx)(Vo,{className:`size-3.5`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`hidden md:inline`,children:a(`preview.desktop`)})]}),(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":f===`mobile`,onClick:()=>p(`mobile`),title:`${a(`preview.mobile`)} ${a(`preview.mobileWidth`)}`,className:G(`inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,f===`mobile`?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:[(0,h.jsx)(ps,{className:`size-3.5`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`hidden md:inline`,children:a(`preview.mobile`)})]})]}),(0,h.jsxs)(`fieldset`,{"aria-label":a(`preview.appearanceLabel`),className:`inline-flex items-center rounded-lg border border-border bg-surface-subtle p-0.5`,children:[(0,h.jsx)(`legend`,{className:`sr-only`,children:a(`preview.appearanceLabel`)}),(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":m===`day`,onClick:()=>g(`day`),title:a(`preview.day`),className:G(`inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,m===`day`?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:[(0,h.jsx)(hs,{className:`size-3.5`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`hidden md:inline`,children:a(`preview.day`)})]}),(0,h.jsxs)(`button`,{type:`button`,"aria-pressed":m===`night`,onClick:()=>g(`night`),title:a(`preview.night`),className:G(`inline-flex h-7 cursor-pointer items-center gap-1 rounded-md px-2 text-xs font-medium transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-ring`,m===`night`?`bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.06)] ring-1 ring-border`:`text-muted-foreground hover:text-foreground`),children:[(0,h.jsx)(Uo,{className:`size-3.5`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`hidden md:inline`,children:a(`preview.night`)})]})]}),xe?(0,h.jsx)(K,{type:`button`,variant:`default`,size:`sm`,onClick:()=>void Ee(),children:O?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oo,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:a(`preview.copiedShort`)})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(_o,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:a(`preview.copyWechat`)})]})}):null,_e?(0,h.jsx)(K,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":a(`nav.inspector`),title:a(`nav.inspector`),"aria-pressed":D||ne,onClick:Oe,children:(0,h.jsx)(qo,{className:`size-3.5`})}):null]})]}),(0,h.jsx)(`div`,{className:`flex min-h-0 flex-1 overflow-hidden`,children:!I||I.libraries.length===0?(0,h.jsx)(`main`,{className:`flex flex-1 items-center justify-center p-6`,children:(0,h.jsx)($l,{className:`w-full max-w-md`,icon:(0,h.jsx)(Do,{className:`size-4`}),title:a(`library.emptyTitle`),description:a(`library.emptyDescription`),action:(0,h.jsxs)(K,{type:`button`,variant:`default`,size:`sm`,onClick:()=>j(`libraries`),children:[(0,h.jsx)(Do,{className:`size-3.5`}),(0,h.jsx)(`span`,{children:a(`nav.addLibrary`)})]})})}):me&&(!me.exists||!me.hasConfig)?(0,h.jsx)(`main`,{className:`flex flex-1 items-center justify-center p-6`,children:(0,h.jsx)($l,{className:`w-full max-w-md`,icon:(0,h.jsx)(To,{className:`size-4`}),title:a(`library.missingTitle`),description:a(`library.missingDescription`,{root:me.root}),action:(0,h.jsx)(K,{type:`button`,variant:`default`,size:`sm`,onClick:()=>j(`libraries`),children:(0,h.jsx)(`span`,{children:a(`nav.manageLibraries`)})})})}):_e?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`main`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,h.jsx)(tu,{t:a,preview:xe,targetArticlePath:ve,loading:ye.isFetching,device:f,appearance:m,syncStatus:v,lastSyncedTime:b,error:je,onRetry:()=>void Te()})}),D?(0,h.jsx)(`aside`,{"aria-label":a(`nav.inspector`),className:`hidden h-full w-[320px] shrink-0 border-l border-border xl:block`,children:Ne}):null,ne?(0,h.jsxs)(`dialog`,{open:!0,"aria-modal":`true`,"aria-label":a(`nav.inspector`),className:`fixed inset-0 z-40 m-0 flex h-dvh w-screen max-w-none justify-end border-0 bg-transparent p-0 text-foreground xl:hidden`,children:[(0,h.jsx)(`button`,{type:`button`,"aria-label":a(`common.close`),onClick:()=>re(!1),className:`fixed inset-0 cursor-default bg-black/40`}),(0,h.jsx)(`aside`,{className:`relative z-10 h-full w-[340px] max-w-[90vw] border-l border-border shadow-xl`,children:(0,h.jsx)(Xl,{t:a,locale:r,snapshot:_e,preview:xe,presets:I.presets,accounts:I.accounts,appearance:m,activeTab:u,onTabChange:we,onPreviewUpdated:t=>{e.setQueryData([`library`,_e.library.id,`preview`,t.articlePath,r],t)},onSnapshotUpdated:ke,onOpenAccounts:()=>{re(!1),j(`accounts`)},onToast:F,onCloseMobile:()=>re(!1)})})]}):null]}):(0,h.jsxs)(`main`,{className:`flex flex-1 flex-col items-center justify-center gap-3 p-6`,children:[(0,h.jsx)(Lo,{className:`size-5 animate-spin text-brand`,"aria-hidden":`true`}),(0,h.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a(`common.loading`)})]})})]}),M?(0,h.jsx)(`output`,{className:G(`fixed right-4 bottom-4 z-50 max-w-sm rounded-[10px] border px-3.5 py-2.5 text-xs font-medium shadow-[0_12px_28px_-10px_rgba(0,0,0,0.28)] animate-panel-reveal`,M.tone===`success`?`border-status-ok-border bg-status-ok-bg text-status-ok-fg`:M.tone===`danger`?`border-status-err-border bg-status-err-bg text-status-err-fg`:`border-border bg-card text-foreground`),children:M.text}):null,I?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Zl,{open:A===`libraries`,t:a,libraries:I.libraries,activeLibraryId:L,onClose:()=>j(null),onSelectLibrary:Se,onLibrariesChanged:async t=>{await e.invalidateQueries({queryKey:[`bootstrap`]}),n(t?{to:`/libraries/$libraryId`,params:{libraryId:t},search:{}}:{to:`/`,replace:!0})}}),(0,h.jsx)(Z,{open:A===`accounts`,t:a,accounts:I.accounts,onClose:()=>j(null),onAccountsUpdated:t=>{e.setQueryData([`bootstrap`,r],e=>e&&{...e,accounts:t})}})]}):null,_e?(0,h.jsx)(Ql,{open:A===`operations`,t:a,libraryId:_e.library.id,libraryName:_e.library.name,onClose:()=>j(null)}):null]})}var _u=sa({component:gu}),vu=aa({getParentRoute:()=>_u,path:`/`,component:()=>null}),yu=aa({getParentRoute:()=>_u,path:`/libraries/$libraryId`,validateSearch:e=>({...typeof e.article==`string`&&e.article.length>0?{article:e.article}:{},...e.tab===`deliver`?{tab:`deliver`}:{}}),component:()=>null}),bu=Ca({routeTree:_u.addChildren([vu,yu]),defaultNotFoundComponent:()=>null}),xu=document.getElementById(`root`);xu&&(0,Na.createRoot)(xu).render((0,h.jsx)(d.StrictMode,{children:(0,h.jsx)(Ba,{children:(0,h.jsx)(v,{client:Pa,children:(0,h.jsx)(Ea,{router:bu})})})}));