wgts-report 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(n,i,s)=>(fd(n,i,"read from private field"),s?s.call(n):i.get(n)),ce=(n,i,s)=>i.has(n)?Kv("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,s),J=(n,i,s,o)=>(fd(n,i,"write to private field"),o?o.call(n,s):i.set(n,s),s),we=(n,i,s)=>(fd(n,i,"access private method"),s);var uu=(n,i,s,o)=>({set _(u){J(n,i,u,s)},get _(){return z(n,i,o)}});function bb(n,i){for(var s=0;s<i.length;s++){const o=i[s];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const f=Object.getOwnPropertyDescriptor(o,u);f&&Object.defineProperty(n,u,f.get?f:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(u){if(u.ep)return;u.ep=!0;const f=s(u);fetch(u.href,f)}})();function Cb(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var dd={exports:{}},no={};/**
1
+ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(n,s,i)=>(Rd(n,s,"read from private field"),i?i.call(n):s.get(n)),pe=(n,s,i)=>s.has(n)?Av("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),oe=(n,s,i,r)=>(Rd(n,s,"write to private field"),r?r.call(n,i):s.set(n,i),i),De=(n,s,i)=>(Rd(n,s,"access private method"),i);var Cu=(n,s,i,r)=>({set _(u){oe(n,s,u,i)},get _(){return L(n,s,r)}});function a2(n,s){for(var i=0;i<s.length;i++){const r=s[i];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(r,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=i(u);fetch(u.href,d)}})();function s2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Td={exports:{}},br={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Zv;function Eb(){if(Zv)return no;Zv=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(o,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var g in u)g!=="key"&&(f[g]=u[g])}else f=u;return u=f.ref,{$$typeof:n,type:o,key:d,ref:u!==void 0?u:null,props:f}}return no.Fragment=i,no.jsx=s,no.jsxs=s,no}var Pv;function wb(){return Pv||(Pv=1,dd.exports=Eb()),dd.exports}var h=wb(),hd={exports:{}},me={};/**
9
+ */var Ov;function i2(){if(Ov)return br;Ov=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var m in u)m!=="key"&&(d[m]=u[m])}else d=u;return u=d.ref,{$$typeof:n,type:r,key:h,ref:u!==void 0?u:null,props:d}}return br.Fragment=s,br.jsx=i,br.jsxs=i,br}var zv;function r2(){return zv||(zv=1,Td.exports=i2()),Td.exports}var f=r2(),Ad={exports:{}},we={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Jv;function _b(){if(Jv)return me;Jv=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),C=Symbol.iterator;function E(A){return A===null||typeof A!="object"?null:(A=C&&A[C]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function j(A,Q,te){this.props=A,this.context=Q,this.refs=w,this.updater=te||N}j.prototype.isReactComponent={},j.prototype.setState=function(A,Q){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,Q,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=j.prototype;function G(A,Q,te){this.props=A,this.context=Q,this.refs=w,this.updater=te||N}var B=G.prototype=new O;B.constructor=G,_(B,j.prototype),B.isPureReactComponent=!0;var K=Array.isArray;function q(){}var Z={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function oe(A,Q,te){var se=te.ref;return{$$typeof:n,type:A,key:Q,ref:se!==void 0?se:null,props:te}}function Se(A,Q){return oe(A.type,Q,A.props)}function ae(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function Xe(A){var Q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(te){return Q[te]})}var et=/\/+/g;function He(A,Q){return typeof A=="object"&&A!==null&&A.key!=null?Xe(""+A.key):Q.toString(36)}function Y(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(q,q):(A.status="pending",A.then(function(Q){A.status==="pending"&&(A.status="fulfilled",A.value=Q)},function(Q){A.status==="pending"&&(A.status="rejected",A.reason=Q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function I(A,Q,te,se,_e){var Re=typeof A;(Re==="undefined"||Re==="boolean")&&(A=null);var je=!1;if(A===null)je=!0;else switch(Re){case"bigint":case"string":case"number":je=!0;break;case"object":switch(A.$$typeof){case n:case i:je=!0;break;case y:return je=A._init,I(je(A._payload),Q,te,se,_e)}}if(je)return _e=_e(A),je=se===""?"."+He(A,0):se,K(_e)?(te="",je!=null&&(te=je.replace(et,"$&/")+"/"),I(_e,Q,te,"",function(_t){return _t})):_e!=null&&(ae(_e)&&(_e=Se(_e,te+(_e.key==null||A&&A.key===_e.key?"":(""+_e.key).replace(et,"$&/")+"/")+je)),Q.push(_e)),1;je=0;var ne=se===""?".":se+":";if(K(A))for(var ue=0;ue<A.length;ue++)se=A[ue],Re=ne+He(se,ue),je+=I(se,Q,te,Re,_e);else if(ue=E(A),typeof ue=="function")for(A=ue.call(A),ue=0;!(se=A.next()).done;)se=se.value,Re=ne+He(se,ue++),je+=I(se,Q,te,Re,_e);else if(Re==="object"){if(typeof A.then=="function")return I(Y(A),Q,te,se,_e);throw Q=String(A),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return je}function ie(A,Q,te){if(A==null)return A;var se=[],_e=0;return I(A,se,"","",function(Re){return Q.call(te,Re,_e++)}),se}function Me(A){if(A._status===-1){var Q=A._result,te=Q();te.then(function(se){(A._status===0||A._status===-1)&&(A._status=1,A._result=se,te.status===void 0&&(te.status="fulfilled",te.value=se))},function(se){(A._status===0||A._status===-1)&&(A._status=2,A._result=se,te.status===void 0&&(te.status="rejected",te.reason=se))}),A._status===-1&&(A._status=0,A._result=te)}if(A._status===1)return A._result.default;throw A._result}var ye=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function Bt(A){var Q=Z.T,te={};te.types=Q!==null?Q.types:null,Z.T=te;try{var se=A(),_e=Z.S;_e!==null&&_e(te,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(q,ye)}catch(Re){ye(Re)}finally{Q!==null&&te.types!==null&&(Q.types=te.types),Z.T=Q}}function jt(A){var Q=Z.T;if(Q!==null){var te=Q.types;te===null?Q.types=[A]:te.indexOf(A)===-1&&te.push(A)}else Bt(jt.bind(null,A))}var At={map:ie,forEach:function(A,Q,te){ie(A,function(){Q.apply(this,arguments)},te)},count:function(A){var Q=0;return ie(A,function(){Q++}),Q},toArray:function(A){return ie(A,function(Q){return Q})||[]},only:function(A){if(!ae(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return me.Activity=v,me.Children=At,me.Component=j,me.Fragment=s,me.Profiler=u,me.PureComponent=G,me.StrictMode=o,me.Suspense=p,me.ViewTransition=b,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,me.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},me.addTransitionType=jt,me.cache=function(A){return function(){return A.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(A,Q,te){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var se=_({},A.props),_e=A.key;if(Q!=null)for(Re in Q.key!==void 0&&(_e=""+Q.key),Q)!W.call(Q,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&Q.ref===void 0||(se[Re]=Q[Re]);var Re=arguments.length-2;if(Re===1)se.children=te;else if(1<Re){for(var je=Array(Re),ne=0;ne<Re;ne++)je[ne]=arguments[ne+2];se.children=je}return oe(A.type,_e,se)},me.createContext=function(A){return A={$$typeof:d,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},me.createElement=function(A,Q,te){var se,_e={},Re=null;if(Q!=null)for(se in Q.key!==void 0&&(Re=""+Q.key),Q)W.call(Q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(_e[se]=Q[se]);var je=arguments.length-2;if(je===1)_e.children=te;else if(1<je){for(var ne=Array(je),ue=0;ue<je;ue++)ne[ue]=arguments[ue+2];_e.children=ne}if(A&&A.defaultProps)for(se in je=A.defaultProps,je)_e[se]===void 0&&(_e[se]=je[se]);return oe(A,Re,_e)},me.createRef=function(){return{current:null}},me.forwardRef=function(A){return{$$typeof:g,render:A}},me.isValidElement=ae,me.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:Me}},me.memo=function(A,Q){return{$$typeof:S,type:A,compare:Q===void 0?null:Q}},me.startTransition=Bt,me.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},me.use=function(A){return Z.H.use(A)},me.useActionState=function(A,Q,te){return Z.H.useActionState(A,Q,te)},me.useCallback=function(A,Q){return Z.H.useCallback(A,Q)},me.useContext=function(A){return Z.H.useContext(A)},me.useDebugValue=function(){},me.useDeferredValue=function(A,Q){return Z.H.useDeferredValue(A,Q)},me.useEffect=function(A,Q){return Z.H.useEffect(A,Q)},me.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},me.useId=function(){return Z.H.useId()},me.useImperativeHandle=function(A,Q,te){return Z.H.useImperativeHandle(A,Q,te)},me.useInsertionEffect=function(A,Q){return Z.H.useInsertionEffect(A,Q)},me.useLayoutEffect=function(A,Q){return Z.H.useLayoutEffect(A,Q)},me.useMemo=function(A,Q){return Z.H.useMemo(A,Q)},me.useOptimistic=function(A,Q){return Z.H.useOptimistic(A,Q)},me.useReducer=function(A,Q,te){return Z.H.useReducer(A,Q,te)},me.useRef=function(A){return Z.H.useRef(A)},me.useState=function(A){return Z.H.useState(A)},me.useSyncExternalStore=function(A,Q,te){return Z.H.useSyncExternalStore(A,Q,te)},me.useTransition=function(){return Z.H.useTransition()},me.version="19.3.1",me}var Wv;function mh(){return Wv||(Wv=1,hd.exports=_b()),hd.exports}var T=mh();const Rb=Cb(T),Tb=bb({__proto__:null,default:Rb},[T]);var md={exports:{}},lo={},gd={exports:{}},pd={};/**
17
+ */var Dv;function o2(){if(Dv)return we;Dv=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),w=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=w&&A[w]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function j(A,V,W){this.props=A,this.context=V,this.refs=R,this.updater=W||N}j.prototype.isReactComponent={},j.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,V,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function F(){}F.prototype=j.prototype;function T(A,V,W){this.props=A,this.context=V,this.refs=R,this.updater=W||N}var H=T.prototype=new F;H.constructor=T,M(H,j.prototype),H.isPureReactComponent=!0;var D=Array.isArray;function z(){}var Y={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function k(A,V,W){var se=W.ref;return{$$typeof:n,type:A,key:V,ref:se!==void 0?se:null,props:W}}function ne(A,V){return k(A.type,V,A.props)}function ie(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function Ce(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(W){return V[W]})}var X=/\/+/g;function ee(A,V){return typeof A=="object"&&A!==null&&A.key!=null?Ce(""+A.key):V.toString(36)}function P(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(z,z):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function J(A,V,W,se,he){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var be=!1;if(A===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(A.$$typeof){case n:case s:be=!0;break;case x:return be=A._init,J(be(A._payload),V,W,se,he)}}if(be)return he=he(A),be=se===""?"."+ee(A,0):se,D(he)?(W="",be!=null&&(W=be.replace(X,"$&/")+"/"),J(he,V,W,"",function(rt){return rt})):he!=null&&(ie(he)&&(he=ne(he,W+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(X,"$&/")+"/")+be)),V.push(he)),1;be=0;var re=se===""?".":se+":";if(D(A))for(var me=0;me<A.length;me++)se=A[me],ye=re+ee(se,me),be+=J(se,V,W,ye,he);else if(me=C(A),typeof me=="function")for(A=me.call(A),me=0;!(se=A.next()).done;)se=se.value,ye=re+ee(se,me++),be+=J(se,V,W,ye,he);else if(ye==="object"){if(typeof A.then=="function")return J(P(A),V,W,se,he);throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return be}function ue(A,V,W){if(A==null)return A;var se=[],he=0;return J(A,se,"","",function(ye){return V.call(W,ye,he++)}),se}function Ee(A){if(A._status===-1){var V=A._result,W=V();W.then(function(se){(A._status===0||A._status===-1)&&(A._status=1,A._result=se,W.status===void 0&&(W.status="fulfilled",W.value=se))},function(se){(A._status===0||A._status===-1)&&(A._status=2,A._result=se,W.status===void 0&&(W.status="rejected",W.reason=se))}),A._status===-1&&(A._status=0,A._result=W)}if(A._status===1)return A._result.default;throw A._result}var je=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function $e(A){var V=Y.T,W={};W.types=V!==null?V.types:null,Y.T=W;try{var se=A(),he=Y.S;he!==null&&he(W,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(z,je)}catch(ye){je(ye)}finally{V!==null&&W.types!==null&&(V.types=W.types),Y.T=V}}function Ie(A){var V=Y.T;if(V!==null){var W=V.types;W===null?V.types=[A]:W.indexOf(A)===-1&&W.push(A)}else $e(Ie.bind(null,A))}var We={map:ue,forEach:function(A,V,W){ue(A,function(){V.apply(this,arguments)},W)},count:function(A){var V=0;return ue(A,function(){V++}),V},toArray:function(A){return ue(A,function(V){return V})||[]},only:function(A){if(!ie(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return we.Activity=v,we.Children=We,we.Component=j,we.Fragment=i,we.Profiler=u,we.PureComponent=T,we.StrictMode=r,we.Suspense=p,we.ViewTransition=b,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,we.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Y.H.useMemoCache(A)}},we.addTransitionType=Ie,we.cache=function(A){return function(){return A.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(A,V,W){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var se=M({},A.props),he=A.key;if(V!=null)for(ye in V.key!==void 0&&(he=""+V.key),V)!te.call(V,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&V.ref===void 0||(se[ye]=V[ye]);var ye=arguments.length-2;if(ye===1)se.children=W;else if(1<ye){for(var be=Array(ye),re=0;re<ye;re++)be[re]=arguments[re+2];se.children=be}return k(A.type,he,se)},we.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},we.createElement=function(A,V,W){var se,he={},ye=null;if(V!=null)for(se in V.key!==void 0&&(ye=""+V.key),V)te.call(V,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(he[se]=V[se]);var be=arguments.length-2;if(be===1)he.children=W;else if(1<be){for(var re=Array(be),me=0;me<be;me++)re[me]=arguments[me+2];he.children=re}if(A&&A.defaultProps)for(se in be=A.defaultProps,be)he[se]===void 0&&(he[se]=be[se]);return k(A,ye,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(A){return{$$typeof:m,render:A}},we.isValidElement=ie,we.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:Ee}},we.memo=function(A,V){return{$$typeof:y,type:A,compare:V===void 0?null:V}},we.startTransition=$e,we.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},we.use=function(A){return Y.H.use(A)},we.useActionState=function(A,V,W){return Y.H.useActionState(A,V,W)},we.useCallback=function(A,V){return Y.H.useCallback(A,V)},we.useContext=function(A){return Y.H.useContext(A)},we.useDebugValue=function(){},we.useDeferredValue=function(A,V){return Y.H.useDeferredValue(A,V)},we.useEffect=function(A,V){return Y.H.useEffect(A,V)},we.useEffectEvent=function(A){return Y.H.useEffectEvent(A)},we.useId=function(){return Y.H.useId()},we.useImperativeHandle=function(A,V,W){return Y.H.useImperativeHandle(A,V,W)},we.useInsertionEffect=function(A,V){return Y.H.useInsertionEffect(A,V)},we.useLayoutEffect=function(A,V){return Y.H.useLayoutEffect(A,V)},we.useMemo=function(A,V){return Y.H.useMemo(A,V)},we.useOptimistic=function(A,V){return Y.H.useOptimistic(A,V)},we.useReducer=function(A,V,W){return Y.H.useReducer(A,V,W)},we.useRef=function(A){return Y.H.useRef(A)},we.useState=function(A){return Y.H.useState(A)},we.useSyncExternalStore=function(A,V,W){return Y.H.useSyncExternalStore(A,V,W)},we.useTransition=function(){return Y.H.useTransition()},we.version="19.3.1",we}var Hv;function Ih(){return Hv||(Hv=1,Ad.exports=o2()),Ad.exports}var E=Ih();const u2=s2(E),c2=a2({__proto__:null,default:u2},[E]);var Od={exports:{}},wr={},zd={exports:{}},Dd={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var e0;function Nb(){return e0||(e0=1,(function(n){function i(Y,I){var ie=Y.length;Y.push(I);e:for(;0<ie;){var Me=ie-1>>>1,ye=Y[Me];if(0<u(ye,I))Y[Me]=I,Y[ie]=ye,ie=Me;else break e}}function s(Y){return Y.length===0?null:Y[0]}function o(Y){if(Y.length===0)return null;var I=Y[0],ie=Y.pop();if(ie!==I){Y[0]=ie;e:for(var Me=0,ye=Y.length,Bt=ye>>>1;Me<Bt;){var jt=2*(Me+1)-1,At=Y[jt],A=jt+1,Q=Y[A];if(0>u(At,ie))A<ye&&0>u(Q,At)?(Y[Me]=Q,Y[A]=ie,Me=A):(Y[Me]=At,Y[jt]=ie,Me=jt);else if(A<ye&&0>u(Q,ie))Y[Me]=Q,Y[A]=ie,Me=A;else break e}}return I}function u(Y,I){var ie=Y.sortIndex-I.sortIndex;return ie!==0?ie:Y.id-I.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,g=d.now();n.unstable_now=function(){return d.now()-g}}var p=[],S=[],y=1,v=null,b=3,C=!1,E=!1,N=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function G(Y){for(var I=s(S);I!==null;){if(I.callback===null)o(S);else if(I.startTime<=Y)o(S),I.sortIndex=I.expirationTime,i(p,I);else break;I=s(S)}}function B(Y){if(N=!1,G(Y),!E)if(s(p)!==null)E=!0,K||(K=!0,ae());else{var I=s(S);I!==null&&He(B,I.startTime-Y)}}var K=!1,q=-1,Z=5,W=-1;function oe(){return _?!0:!(n.unstable_now()-W<Z)}function Se(){if(_=!1,K){var Y=n.unstable_now();W=Y;var I=!0;try{e:{E=!1,N&&(N=!1,j(q),q=-1),C=!0;var ie=b;try{t:{for(G(Y),v=s(p);v!==null&&!(v.expirationTime>Y&&oe());){var Me=v.callback;if(typeof Me=="function"){v.callback=null,b=v.priorityLevel;var ye=Me(v.expirationTime<=Y);if(Y=n.unstable_now(),typeof ye=="function"){v.callback=ye,G(Y),I=!0;break t}v===s(p)&&o(p),G(Y)}else o(p);v=s(p)}if(v!==null)I=!0;else{var Bt=s(S);Bt!==null&&He(B,Bt.startTime-Y),I=!1}}break e}finally{v=null,b=ie,C=!1}I=void 0}}finally{I?ae():K=!1}}}var ae;if(typeof O=="function")ae=function(){O(Se)};else if(typeof MessageChannel<"u"){var Xe=new MessageChannel,et=Xe.port2;Xe.port1.onmessage=Se,ae=function(){et.postMessage(null)}}else ae=function(){w(Se,0)};function He(Y,I){q=w(function(){Y(n.unstable_now())},I)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(Y){switch(b){case 1:case 2:case 3:var I=3;break;default:I=b}var ie=b;b=I;try{return Y()}finally{b=ie}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(Y,I){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ie=b;b=Y;try{return I()}finally{b=ie}},n.unstable_scheduleCallback=function(Y,I,ie){var Me=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Me+ie:Me):ie=Me,Y){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ie+ye,Y={id:y++,callback:I,priorityLevel:Y,startTime:ie,expirationTime:ye,sortIndex:-1},ie>Me?(Y.sortIndex=ie,i(S,Y),s(p)===null&&Y===s(S)&&(N?(j(q),q=-1):N=!0,He(B,ie-Me))):(Y.sortIndex=ye,i(p,Y),E||C||(E=!0,K||(K=!0,ae()))),Y},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(Y){var I=b;return function(){var ie=b;b=I;try{return Y.apply(this,arguments)}finally{b=ie}}}})(pd)),pd}var t0;function Mb(){return t0||(t0=1,gd.exports=Nb()),gd.exports}var vd={exports:{}},Ct={};/**
25
+ */var Lv;function f2(){return Lv||(Lv=1,(function(n){function s(P,J){var ue=P.length;P.push(J);e:for(;0<ue;){var Ee=ue-1>>>1,je=P[Ee];if(0<u(je,J))P[Ee]=J,P[ue]=je,ue=Ee;else break e}}function i(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var J=P[0],ue=P.pop();if(ue!==J){P[0]=ue;e:for(var Ee=0,je=P.length,$e=je>>>1;Ee<$e;){var Ie=2*(Ee+1)-1,We=P[Ie],A=Ie+1,V=P[A];if(0>u(We,ue))A<je&&0>u(V,We)?(P[Ee]=V,P[A]=ue,Ee=A):(P[Ee]=We,P[Ie]=ue,Ee=Ie);else if(A<je&&0>u(V,ue))P[Ee]=V,P[A]=ue,Ee=A;else break e}}return J}function u(P,J){var ue=P.sortIndex-J.sortIndex;return ue!==0?ue:P.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var p=[],y=[],x=1,v=null,b=3,w=!1,C=!1,N=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function T(P){for(var J=i(y);J!==null;){if(J.callback===null)r(y);else if(J.startTime<=P)r(y),J.sortIndex=J.expirationTime,s(p,J);else break;J=i(y)}}function H(P){if(N=!1,T(P),!C)if(i(p)!==null)C=!0,D||(D=!0,ie());else{var J=i(y);J!==null&&ee(H,J.startTime-P)}}var D=!1,z=-1,Y=5,te=-1;function k(){return M?!0:!(n.unstable_now()-te<Y)}function ne(){if(M=!1,D){var P=n.unstable_now();te=P;var J=!0;try{e:{C=!1,N&&(N=!1,j(z),z=-1),w=!0;var ue=b;try{t:{for(T(P),v=i(p);v!==null&&!(v.expirationTime>P&&k());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,b=v.priorityLevel;var je=Ee(v.expirationTime<=P);if(P=n.unstable_now(),typeof je=="function"){v.callback=je,T(P),J=!0;break t}v===i(p)&&r(p),T(P)}else r(p);v=i(p)}if(v!==null)J=!0;else{var $e=i(y);$e!==null&&ee(H,$e.startTime-P),J=!1}}break e}finally{v=null,b=ue,w=!1}J=void 0}}finally{J?ie():D=!1}}}var ie;if(typeof F=="function")ie=function(){F(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,X=Ce.port2;Ce.port1.onmessage=ne,ie=function(){X.postMessage(null)}}else ie=function(){R(ne,0)};function ee(P,J){z=R(function(){P(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(P){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var ue=b;b=J;try{return P()}finally{b=ue}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(P,J){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ue=b;b=P;try{return J()}finally{b=ue}},n.unstable_scheduleCallback=function(P,J,ue){var Ee=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Ee+ue:Ee):ue=Ee,P){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ue+je,P={id:x++,callback:J,priorityLevel:P,startTime:ue,expirationTime:je,sortIndex:-1},ue>Ee?(P.sortIndex=ue,s(y,P),i(p)===null&&P===i(y)&&(N?(j(z),z=-1):N=!0,ee(H,ue-Ee))):(P.sortIndex=je,s(p,P),C||w||(C=!0,D||(D=!0,ie()))),P},n.unstable_shouldYield=k,n.unstable_wrapCallback=function(P){var J=b;return function(){var ue=b;b=J;try{return P.apply(this,arguments)}finally{b=ue}}}})(Dd)),Dd}var Uv;function d2(){return Uv||(Uv=1,zd.exports=f2()),zd.exports}var Hd={exports:{}},Vt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var n0;function jb(){if(n0)return Ct;n0=1;var n=mh();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function g(y,v,b){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:C==null?null:C===d?d:""+C,children:y,containerInfo:v,implementation:b}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ct.browser=function(y){return{$$typeof:f,_reason:y}},Ct.createPortal=function(y,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return g(y,v,null,b)},Ct.flushSync=function(y){var v=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=v,o.p=b,o.d.f()}},Ct.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(y,v))},Ct.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},Ct.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var b=v.as,C=S(b,v.crossOrigin),E=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?o.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:C,integrity:E,fetchPriority:N}):b==="script"&&o.d.X(y,{crossOrigin:C,integrity:E,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Ct.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=S(v.as,v.crossOrigin);o.d.M(y,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&o.d.M(y)},Ct.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,C=S(b,v.crossOrigin);o.d.L(y,b,{crossOrigin:C,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Ct.preloadModule=function(y,v){if(typeof y=="string")if(v){var b=S(v.as,v.crossOrigin);o.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else o.d.m(y)},Ct.requestFormReset=function(y){o.d.r(y)},Ct.unstable_batchedUpdates=function(y,v){return y(v)},Ct.useFormState=function(y,v,b){return p.H.useFormState(y,v,b)},Ct.useFormStatus=function(){return p.H.useHostTransitionStatus()},Ct.version="19.3.1",Ct}var l0;function ay(){if(l0)return vd.exports;l0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),vd.exports=jb(),vd.exports}/**
33
+ */var Vv;function h2(){if(Vv)return Vt;Vv=1;var n=Ih();function s(x){var v="https://react.dev/errors/"+x;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal"),d=Symbol.for("react.recoverable"),h=Symbol.for("react.optimistic_key");function m(x,v,b){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:w==null?null:w===h?h:""+w,children:x,containerInfo:v,implementation:b}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,v){if(x==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Vt.browser=function(x){return{$$typeof:d,_reason:x}},Vt.createPortal=function(x,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(s(299));return m(x,v,null,b)},Vt.flushSync=function(x){var v=p.T,b=r.p;try{if(p.T=null,r.p=2,x)return x()}finally{p.T=v,r.p=b,r.d.f()}},Vt.preconnect=function(x,v){typeof x=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(x,v))},Vt.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},Vt.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var b=v.as,w=y(b,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?r.d.S(x,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:w,integrity:C,fetchPriority:N}):b==="script"&&r.d.X(x,{crossOrigin:w,integrity:C,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Vt.preinitModule=function(x,v){if(typeof x=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=y(v.as,v.crossOrigin);r.d.M(x,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&r.d.M(x)},Vt.preload=function(x,v){if(typeof x=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,w=y(b,v.crossOrigin);r.d.L(x,b,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Vt.preloadModule=function(x,v){if(typeof x=="string")if(v){var b=y(v.as,v.crossOrigin);r.d.m(x,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else r.d.m(x)},Vt.requestFormReset=function(x){r.d.r(x)},Vt.unstable_batchedUpdates=function(x,v){return x(v)},Vt.useFormState=function(x,v,b){return p.H.useFormState(x,v,b)},Vt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Vt.version="19.3.1",Vt}var $v;function Iy(){if($v)return Hd.exports;$v=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Hd.exports=h2(),Hd.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@ var Kv=n=>{throw TypeError(n)};var fd=(n,i,s)=>i.has(n)||Kv("Cannot "+s);var z=(
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var a0;function Ab(){if(a0)return lo;a0=1;var n=Mb(),i=mh(),s=ay();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function d(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 g(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 p(e){if(f(e)!==e)throw Error(o(188))}function S(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var r=l.return;if(r===null)break;var c=r.alternate;if(c===null){if(a=r.return,a!==null){l=a;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===l)return p(r),e;if(c===a)return p(r),t;c=c.sibling}throw Error(o(188))}if(l.return!==a.return)l=r,a=c;else{for(var m=!1,x=r.child;x;){if(x===l){m=!0,l=r,a=c;break}if(x===a){m=!0,a=r,l=c;break}x=x.sibling}if(!m){for(x=c.child;x;){if(x===l){m=!0,l=c,a=r;break}if(x===a){m=!0,a=c,l=r;break}x=x.sibling}if(!m)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}function v(e,t,l,a,r,c){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,a,r,c)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,a,r,c))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function C(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function E(e){var t=[null,null],l=b(e);return l===null||N(t,e,l.child,{foundSelf:!1}),t}function N(e,t,l,a){for(;l!==null;){if(l===t)a.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(a.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&N(e,t,l.child,a))return!0;l=l.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(o(559))}}var w=null,j=null;function O(e,t,l){return e===l?!0:e===t?(w=e,!0):!1}function G(e,t,l){return e===l?(j=e,!1):e===t?(j!==null&&(w=e),!0):!1}function B(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function K(e,t,l){for(var a=0,r=e;r;r=l(r))a++;r=0;for(var c=t;c;c=l(c))r++;for(;0<a-r;)e=l(e),a--;for(;0<r-a;)t=l(t),r--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var q=Object.assign,Z=Symbol.for("react.element"),W=Symbol.for("react.transitional.element"),oe=Symbol.for("react.portal"),Se=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),Xe=Symbol.for("react.profiler"),et=Symbol.for("react.consumer"),He=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),Me=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),Bt=Symbol.for("react.activity"),jt=Symbol.for("react.legacy_hidden"),At=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),Q=Symbol.for("react.recoverable"),te=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Symbol.for("react.client.reference");function Re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Se:return"Fragment";case Xe:return"Profiler";case ae:return"StrictMode";case I:return"Suspense";case ie:return"SuspenseList";case Bt:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case oe:return"Portal";case He:return e.displayName||"Context";case et:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Me:return t=e.displayName||null,t!==null?t:Re(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return Re(e(t))}catch{}}return null}var je=Array.isArray,ne=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_t={pending:!1,data:null,method:null,action:null},ls=[],dl=-1;function Gt(e){return{current:e}}function Ie(e){0>dl||(e.current=ls[dl],ls[dl]=null,dl--)}function ze(e,t){dl++,ls[dl]=e.current,e.current=t}var Kt=Gt(null),aa=Gt(null),sn=Gt(null),ia=Gt(null);function hl(e,t){switch(ze(sn,t),ze(aa,e),ze(Kt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?av(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=av(t),e=iv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ie(Kt),ze(Kt,e)}function on(){Ie(Kt),Ie(aa),Ie(sn)}function as(e){var t=e.memoizedState;t!==null&&(Di._currentValue=t.memoizedState,ze(ia,e)),t=Kt.current;var l=iv(t,e.type);t!==l&&(ze(aa,e),ze(Kt,l))}function ka(e){aa.current===e&&(Ie(Kt),Ie(aa)),ia.current===e&&(Ie(ia),Di._currentValue=_t)}var ml,is;function Nn(e){if(ml===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ml=t&&t[1]||"",is=-1<l.stack.indexOf(`
41
+ */var Fv;function m2(){if(Fv)return wr;Fv=1;var n=d2(),s=Ih(),i=Iy();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function h(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 m(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 p(e){if(d(e)!==e)throw Error(r(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var o=l.return;if(o===null)break;var c=o.alternate;if(c===null){if(a=o.return,a!==null){l=a;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===l)return p(o),e;if(c===a)return p(o),t;c=c.sibling}throw Error(r(188))}if(l.return!==a.return)l=o,a=c;else{for(var g=!1,S=o.child;S;){if(S===l){g=!0,l=o,a=c;break}if(S===a){g=!0,a=o,l=c;break}S=S.sibling}if(!g){for(S=c.child;S;){if(S===l){g=!0,l=c,a=o;break}if(S===a){g=!0,a=c,l=o;break}S=S.sibling}if(!g)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function v(e,t,l,a,o,c){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,a,o,c)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,a,o,c))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function w(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function C(e){var t=[null,null],l=b(e);return l===null||N(t,e,l.child,{foundSelf:!1}),t}function N(e,t,l,a){for(;l!==null;){if(l===t)a.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(a.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&N(e,t,l.child,a))return!0;l=l.sibling}return!1}function M(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var R=null,j=null;function F(e,t,l){return e===l?!0:e===t?(R=e,!0):!1}function T(e,t,l){return e===l?(j=e,!1):e===t?(j!==null&&(R=e),!0):!1}function H(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function D(e,t,l){for(var a=0,o=e;o;o=l(o))a++;o=0;for(var c=t;c;c=l(c))o++;for(;0<a-o;)e=l(e),a--;for(;0<o-a;)t=l(t),o--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var z=Object.assign,Y=Symbol.for("react.element"),te=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Ce=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),je=Symbol.for("react.lazy"),$e=Symbol.for("react.activity"),Ie=Symbol.for("react.legacy_hidden"),We=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),W=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ne:return"Fragment";case Ce:return"Profiler";case ie:return"StrictMode";case J:return"Suspense";case ue:return"SuspenseList";case $e:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case ee:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,re=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt={pending:!1,data:null,method:null,action:null},Bt=[],zn=-1;function Nt(e){return{current:e}}function ot(e){0>zn||(e.current=Bt[zn],Bt[zn]=null,zn--)}function Ge(e,t){zn++,Bt[zn]=e.current,e.current=t}var pt=Nt(null),cl=Nt(null),At=Nt(null),nn=Nt(null);function qn(e,t){switch(Ge(At,t),Ge(cl,e),Ge(pt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?F0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=F0(t),e=B0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ot(pt),Ge(pt,e)}function ut(){ot(pt),ot(cl),ot(At)}function fl(e){var t=e.memoizedState;t!==null&&(ei._currentValue=t.memoizedState,Ge(nn,e)),t=pt.current;var l=B0(t,e.type);t!==l&&(Ge(cl,e),Ge(pt,l))}function It(e){cl.current===e&&(ot(pt),ot(cl)),nn.current===e&&(ot(nn),ei._currentValue=rt)}var kt,zl;function Gt(e){if(kt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);kt=t&&t[1]||"",zl=-1<l.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ml+e+is}var sa=!1;function yn(e,t){if(!e||sa)return"";sa=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(X){var D=X}Reflect.construct(e,[],$)}else{try{$.call()}catch(X){D=X}$=!1;try{var V=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),$=!0,new e}finally{$&&(V!==void 0?Object.defineProperty(e.prototype,"props",V):delete e.prototype.props)}}}else{try{throw Error()}catch(X){D=X}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(X){if(X&&D&&typeof X.stack=="string")return[X.stack,D.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),m=c[0],x=c[1];if(m&&x){var R=m.split(`
44
- `),H=x.split(`
45
- `);for(r=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;r<H.length&&!H[r].includes("DetermineComponentFrameRoot");)r++;if(a===R.length||r===H.length)for(a=R.length-1,r=H.length-1;1<=a&&0<=r&&R[a]!==H[r];)r--;for(;1<=a&&0<=r;a--,r--)if(R[a]!==H[r]){if(a!==1||r!==1)do if(a--,r--,0>r||R[a]!==H[r]){var F=`
46
- `+R[a].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=a&&0<=r);break}}}finally{sa=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Nn(l):""}function Ao(e,t){switch(e.tag){case 26:case 27:case 5:return Nn(e.type);case 16:return Nn("Lazy");case 13:return e.child!==t&&t!==null?Nn("Suspense Fallback"):Nn("Suspense");case 19:return Nn("SuspenseList");case 0:case 15:return yn(e.type,!1);case 11:return yn(e.type.render,!1);case 1:return yn(e.type,!0);case 31:return Nn("Activity");case 30:return Nn("ViewTransition");default:return""}}function ss(e){try{var t="",l=null;do t+=Ao(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
43
+ `+kt+e+zl}var Qn=!1;function ln(e,t){if(!e||Qn)return"";Qn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(ae){var U=ae}Reflect.construct(e,[],K)}else{try{K.call()}catch(ae){U=ae}K=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),K=!0,new e}finally{K&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(ae){U=ae}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(ae){if(ae&&U&&typeof ae.stack=="string")return[ae.stack,U.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),g=c[0],S=c[1];if(g&&S){var _=g.split(`
44
+ `),B=S.split(`
45
+ `);for(o=a=0;a<_.length&&!_[a].includes("DetermineComponentFrameRoot");)a++;for(;o<B.length&&!B[o].includes("DetermineComponentFrameRoot");)o++;if(a===_.length||o===B.length)for(a=_.length-1,o=B.length-1;1<=a&&0<=o&&_[a]!==B[o];)o--;for(;1<=a&&0<=o;a--,o--)if(_[a]!==B[o]){if(a!==1||o!==1)do if(a--,o--,0>o||_[a]!==B[o]){var Q=`
46
+ `+_[a].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=a&&0<=o);break}}}finally{Qn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Gt(l):""}function Z(e,t){switch(e.tag){case 26:case 27:case 5:return Gt(e.type);case 16:return Gt("Lazy");case 13:return e.child!==t&&t!==null?Gt("Suspense Fallback"):Gt("Suspense");case 19:return Gt("SuspenseList");case 0:case 15:return ln(e.type,!1);case 11:return ln(e.type.render,!1);case 1:return ln(e.type,!0);case 31:return Gt("Activity");case 30:return Gt("ViewTransition");default:return""}}function le(e){try{var t="",l=null;do t+=Z(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}var $a=Object.prototype.hasOwnProperty,Qa=n.unstable_scheduleCallback,Ya=n.unstable_cancelCallback,Oo=n.unstable_shouldYield,zo=n.unstable_requestPaint,Rt=n.unstable_now,Do=n.unstable_getCurrentPriorityLevel,os=n.unstable_ImmediatePriority,rs=n.unstable_UserBlockingPriority,oa=n.unstable_NormalPriority,Uo=n.unstable_LowPriority,us=n.unstable_IdlePriority,Ho=n.log,P=n.unstable_setDisableYieldValue,Fe=null,Ke=null;function Mn(e){if(typeof Ho=="function"&&P(e),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(Fe,e)}catch{}}var Ot=Math.clz32?Math.clz32:Lo,Uu=Math.log,Hu=Math.LN2;function Lo(e){return e>>>=0,e===0?32:31-(Uu(e)/Hu|0)|0}var Ia=256,Vo=262144,Fo=4194304;function ra(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bo(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var r=0,c=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~c,a!==0?r=ra(a):(m&=x,m!==0?r=ra(m):l||(l=x&~e,l!==0&&(r=ra(l))))):(x=a&~c,x!==0?r=ra(x):m!==0?r=ra(m):l||(l=a&~e,l!==0&&(r=ra(l)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:r}function cs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jh(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Ot(l),r=1<<a;t|=e[a],l&=~r}return t}function U1(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 Ah(){var e=Fo;return Fo<<=1,(Fo&62914560)===0&&(Fo=4194304),e}function Lu(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function fs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function H1(e,t,l,a,r,c){var m=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var x=e.entanglements,R=e.expirationTimes,H=e.hiddenUpdates;for(l=m&~l;0<l;){var F=31-Ot(l),$=1<<F;x[F]=0,R[F]=-1;var D=H[F];if(D!==null)for(H[F]=null,F=0;F<D.length;F++){var V=D[F];V!==null&&(V.lane&=-536870913)}l&=~$}a!==0&&Oh(e,a,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(m&~t))}function Oh(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ot(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function zh(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Ot(l),r=1<<a;r&t|e[a]&t&&(e[a]|=t),l&=~r}}function Dh(e,t){var l=t&-t;return l=(l&42)!==0?1:Vu(l),(l&(e.suspendedLanes|t))!==0?0:l}function Vu(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 Fu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Uh(){var e=ue.p;return e!==0?e:(e=window.event,e===void 0?32:qv(e.type))}function Hh(e,t){var l=ue.p;try{return ue.p=e,t()}finally{ue.p=l}}var In=Math.random().toString(36).slice(2),pt="__reactFiber$"+In,qt="__reactProps$"+In,Xa="__reactContainer$"+In,Lh="__reactEvents$"+In,L1="__reactListeners$"+In,V1="__reactHandles$"+In,Vh="__reactResources$"+In,ds="__reactMarker$"+In,Go="__reactLoad$"+In;function qo(e){delete e[pt],delete e[qt],delete e[L1],delete e[V1]}function ua(e){var t;if(t=e[pt])return t;for(var l=e.parentNode;l;){if(t=l[Xa]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Cv(e);e!==null;){if(l=e[pt])return l;e=Cv(e)}return t}e=l,l=e.parentNode}return null}function Ka(e){if(e=e[pt]||e[Xa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function hs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Za(e){var t=e[Vh];return t||(t=e[Vh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[ds]=!0}function Fh(e){e[Go]=void 0}var Bh=new Set,Gh={};function ca(e,t){Pa(e,t),Pa(e+"Capture",t)}function Pa(e,t){for(Gh[e]=t,e=0;e<t.length;e++)Bh.add(t[e])}var F1=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]*$"),qh={},kh={};function B1(e){return $a.call(kh,e)?!0:$a.call(qh,e)?!1:F1.test(e)?kh[e]=!0:(qh[e]=!0,!1)}var Ae=!1;function $h(){var e=Ae;return Ae=!1,e}function ko(e,t,l){if(B1(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function $o(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function Xn(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G1(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){l=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bu(e){if(!e._valueTracker){var t=Qh(e)?"checked":"value";e._valueTracker=G1(e,t,""+e[t])}}function Yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Qh(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var q1=/[\n"\\]/g;function rn(e){return e.replace(q1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,l,a,r,c,m,x){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?m==="number"&&e.value==t?qu(e,Zt(e.value)):qu(e,Zt(t)):l!=null?qu(e,Zt(l)):a!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Zt(x):e.removeAttribute("name")}function Ih(e,t,l,a,r,c,m,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Bu(e);return}l=l!=null?""+Zt(l):"",t=t!=null?""+Zt(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Bu(e)}function qu(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ja(e,t,l,a){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Zt(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Xh(e,t,l){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Zt(l):""}function Kh(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(je(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Zt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Bu(e)}function Wa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var k1=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 Zh(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||k1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ph(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Ae=!0);for(var r in t)a=t[r],t.hasOwnProperty(r)&&l[r]!==a&&(Zh(e,r,a),Ae=!0)}else for(var c in t)t.hasOwnProperty(c)&&Zh(e,c,t[c])}function ku(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 $1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Q1=/^[\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 Qo(e){return Q1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function jn(){}var $u=null;function Qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ei=null,ti=null;function Jh(e){var t=Ka(e);if(t&&(e=t.stateNode)){var l=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+rn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var r=a[qt]||null;if(!r)throw Error(o(90));Gu(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Yh(a)}break e;case"textarea":Xh(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ja(e,!!l.multiple,t,!1)}}}var Yu=!1;function Wh(e,t,l){if(Yu)return e(t,l);Yu=!0;try{var a=e(t);return a}finally{if(Yu=!1,(ei!==null||ti!==null)&&(Qr(),ei&&(t=ei,e=ti,ti=ei=null,Jh(t),e)))for(t=0;t<e.length;t++)Jh(e[t])}}function ms(e,t){var l=e.stateNode;if(l===null)return null;var a=l[qt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iu=!1;if(Kn)try{var gs={};Object.defineProperty(gs,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",gs,gs),window.removeEventListener("test",gs,gs)}catch{Iu=!1}var gl=null,Xu=null,Yo=null;function em(){if(Yo)return Yo;var e,t=Xu,l=t.length,a,r="value"in gl?gl.value:gl.textContent,c=r.length;for(e=0;e<l&&t[e]===r[e];e++);var m=l-e;for(a=1;a<=m&&t[l-a]===r[c-a];a++);return Yo=r.slice(e,1<a?1-a:void 0)}function Io(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 Xo(){return!0}function tm(){return!1}function zt(e){function t(l,a,r,c,m){this._reactName=l,this._targetInst=r,this.type=a,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(c):c[x]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Xo:tm,this.isPropagationStopped=tm,this}return q(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Xo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),t}var pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ko=zt(pl),ps=q({},pl,{view:0,detail:0}),Y1=zt(ps),Ku,Zu,vs,Zo=q({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==vs&&(vs&&e.type==="mousemove"?(Ku=e.screenX-vs.screenX,Zu=e.screenY-vs.screenY):Zu=Ku=0,vs=e),Ku)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),nm=zt(Zo),I1=q({},Zo,{dataTransfer:0}),X1=zt(I1),K1=q({},ps,{relatedTarget:0}),Pu=zt(K1),Z1=q({},pl,{animationName:0,elapsedTime:0,pseudoElement:0}),P1=zt(Z1),J1=q({},pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),W1=zt(J1),eS=q({},pl,{data:0}),lm=zt(eS),tS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nS={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"},lS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lS[e])?!!t[e]:!1}function Ju(){return aS}var iS=q({},ps,{key:function(e){if(e.key){var t=tS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sS=zt(iS),oS=q({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),am=zt(oS),rS=q({},pl,{submitter:0}),uS=zt(rS),cS=q({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),fS=zt(cS),dS=q({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),hS=zt(dS),mS=q({},Zo,{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}),gS=zt(mS),pS=q({},pl,{newState:0,oldState:0,source:0}),vS=zt(pS),yS=[9,13,27,32],Wu=Kn&&"CompositionEvent"in window,ys=null;Kn&&"documentMode"in document&&(ys=document.documentMode);var SS=Kn&&"TextEvent"in window&&!ys,im=Kn&&(!Wu||ys&&8<ys&&11>=ys),sm=" ",om=!1;function rm(e,t){switch(e){case"keyup":return yS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function um(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function xS(e,t){switch(e){case"compositionend":return um(t);case"keypress":return t.which!==32?null:(om=!0,sm);case"textInput":return e=t.data,e===sm&&om?null:e;default:return null}}function bS(e,t){if(ni)return e==="compositionend"||!Wu&&rm(e,t)?(e=em(),Yo=Xu=gl=null,ni=!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 im&&t.locale!=="ko"?null:t.data;default:return null}}var CS={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 cm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!CS[e.type]:t==="textarea"}function fm(e,t,l,a){ei?ti?ti.push(a):ti=[a]:ei=a,t=Pr(t,"onChange"),0<t.length&&(l=new Ko("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ss=null,xs=null;function ES(e){Jp(e,0)}function Po(e){var t=hs(e);if(Yh(t))return e}function dm(e,t){if(e==="change")return t}var hm=!1;if(Kn){var ec;if(Kn){var tc="oninput"in document;if(!tc){var mm=document.createElement("div");mm.setAttribute("oninput","return;"),tc=typeof mm.oninput=="function"}ec=tc}else ec=!1;hm=ec&&(!document.documentMode||9<document.documentMode)}function gm(){Ss&&(Ss.detachEvent("onpropertychange",pm),xs=Ss=null)}function pm(e){if(e.propertyName==="value"&&Po(xs)){var t=[];fm(t,xs,e,Qu(e)),Wh(ES,t)}}function wS(e,t,l){e==="focusin"?(gm(),Ss=t,xs=l,Ss.attachEvent("onpropertychange",pm)):e==="focusout"&&gm()}function _S(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Po(xs)}function RS(e,t){if(e==="click")return Po(t)}function TS(e,t){if(e==="input"||e==="change")return Po(t)}function NS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:NS;function bs(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var r=l[a];if(!$a.call(t,r)||!Pt(e[r],t[r]))return!1}return!0}function nc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ym(e,t){var l=vm(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=vm(l)}}function Sm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=nc(e.document)}return t}function lc(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 MS=Kn&&"documentMode"in document&&11>=document.documentMode,li=null,ac=null,Cs=null,ic=!1;function bm(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ic||li==null||li!==nc(a)||(a=li,"selectionStart"in a&&lc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Cs&&bs(Cs,a)||(Cs=a,a=Pr(ac,"onSelect"),0<a.length&&(t=new Ko("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=li)))}function fa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ai={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},sc={},Cm={};Kn&&(Cm=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function da(e){if(sc[e])return sc[e];if(!ai[e])return e;var t=ai[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Cm)return sc[e]=t[l];return e}var Em=da("animationend"),wm=da("animationiteration"),_m=da("animationstart"),jS=da("transitionrun"),AS=da("transitionstart"),OS=da("transitioncancel"),Rm=da("transitionend"),Tm=new Map,oc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");oc.push("scrollEnd");function Sn(e,t){Tm.set(e,t),ca(t,[e])}var zS=0;function Zn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=En.identifierPrefix;var l=zS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Nm(e){if(e==null||typeof e=="string")return e;var t=null,l=wi;if(l!==null)for(var a=0;a<l.length;a++){var r=e[l[a]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function Pn(e,t){return e=Nm(e),t=Nm(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Jo=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!==null&&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)},un=[],ii=0,rc=0;function Wo(){for(var e=ii,t=rc=ii=0;t<e;){var l=un[t];un[t++]=null;var a=un[t];un[t++]=null;var r=un[t];un[t++]=null;var c=un[t];if(un[t++]=null,a!==null&&r!==null){var m=a.pending;m===null?r.next=r:(r.next=m.next,m.next=r),a.pending=r}c!==0&&Mm(l,r,c)}}function er(e,t,l,a){un[ii++]=e,un[ii++]=t,un[ii++]=l,un[ii++]=a,rc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function uc(e,t,l,a){return er(e,t,l,a),tr(e)}function ha(e,t){return er(e,null,null,t),tr(e)}function Mm(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var r=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-Ot(l),e=c.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=l|536870912),c):null}function tr(e){if(50<$s)throw $s=0,$r=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function DS(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,l,a){return new DS(e,t,l,a)}function cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jn(e,t){var l=e.alternate;return l===null?(l=kt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function jm(e,t){e.flags&=1206910978;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function nr(e,t,l,a,r,c){var m=0;if(a=e,typeof a=="function")cc(a)&&(m=1);else if(typeof a=="string")m=rb(e,l,Kt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case Bt:return e=kt(31,l,t,r),e.elementType=Bt,e.lanes=c,e;case Se:return ma(l.children,r,c,t);case ae:m=8,r|=24;break;case Xe:return e=kt(12,l,t,r|2),e.elementType=Xe,e.lanes=c,e;case I:return e=kt(13,l,t,r),e.elementType=I,e.lanes=c,e;case ie:return e=kt(19,l,t,r),e.elementType=ie,e.lanes=c,e;case jt:case A:return e=r|32,e=kt(30,l,t,e),e.elementType=A,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case He:m=10;break e;case et:m=9;break e;case Y:m=11;break e;case Me:m=14;break e;case ye:m=16,a=null;break e}m=29,l=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=kt(m,l,t,r),t.elementType=e,t.type=a,t.lanes=c,t}function ma(e,t,l,a){return e=kt(7,e,a,t),e.lanes=l,e}function fc(e,t,l){return e=kt(6,e,null,t),e.lanes=l,e}function Am(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function dc(e,t,l){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Om=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var l=Om.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ss(t)},Om.set(e,t),t)}return{value:e,source:t,stack:ss(t)}}var oi=[],ri=0,lr=null,Es=0,fn=[],dn=0,vl=null,An=1,On="";function Wn(e,t){oi[ri++]=Es,oi[ri++]=lr,lr=e,Es=t}function zm(e,t,l){fn[dn++]=An,fn[dn++]=On,fn[dn++]=vl,vl=e;var a=An;e=On;var r=32-Ot(a)-1;a&=~(1<<r),l+=1;var c=32-Ot(t)+r;if(30<c){var m=r-r%5;c=(a&(1<<m)-1).toString(32),a>>=m,r-=m,An=1<<32-Ot(t)+r|l<<r|a,On=c+e}else An=1<<c|l<<r|a,On=e}function ar(e){e.return!==null&&(Wn(e,1),zm(e,1,0))}function hc(e){for(;e===lr;)lr=oi[--ri],oi[ri]=null,Es=oi[--ri],oi[ri]=null;for(;e===vl;)vl=fn[--dn],fn[dn]=null,On=fn[--dn],fn[dn]=null,An=fn[--dn],fn[dn]=null}function Dm(e,t){fn[dn++]=An,fn[dn++]=On,fn[dn++]=vl,An=t.id,On=t.overflow,vl=e}var dt=null,Qe=null,ve=!1,yl=null,hn=!1,mc=Error(o(519));function Sl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ws(cn(t,e)),mc}function Um(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[pt]=e,t[qt]=a,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<Ys.length;l++)be(Ys[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),Ih(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),Kh(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||nv(t.textContent,l)?(a.popover!=null&&(be("beforetoggle",t),be("toggle",t)),a.onScroll!=null&&be("scroll",t),a.onScrollEnd!=null&&be("scrollend",t),a.onClick!=null&&(t.onclick=jn),t=!0):t=!1,t||Sl(e,!0)}function ir(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:dt=dt.return}}function ui(e){if(e!==dt)return!1;if(!ve)return ir(e),ve=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Qf(e.type,e.memoizedProps)),l=!l),l&&Qe&&Sl(e),ir(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Qe=bv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Qe=bv(e)}else t===27?(t=Qe,Ul(e.type)?(e=ed,ed=null,Qe=e):Qe=t):Qe=dt?gn(e.stateNode.nextSibling):null;return!0}function ga(){Qe=dt=null,ve=!1}function gc(){var e=yl;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),yl=null),e}function ws(e){yl===null?yl=[e]:yl.push(e)}var pc=Gt(null),pa=null,el=null;function xl(e,t,l){ze(pc,t._currentValue),t._currentValue=l}function tl(e){e._currentValue=pc.current,Ie(pc)}function sr(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function vc(e,t,l,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var m=r.child;c=c.firstContext;e:for(;c!==null;){var x=c;c=r;for(var R=0;R<t.length;R++)if(x.context===t[R]){c.lanes|=l,x=c.alternate,x!==null&&(x.lanes|=l),sr(c.return,l,e),a||(m=null);break e}c=x.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(o(341));m.lanes|=l,c=m.alternate,c!==null&&(c.lanes|=l),sr(m,l,e),m=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=l,m=r.alternate,m!==null&&(m.lanes|=l),sr(r.return,l,e),m=r.child,m=m!==null?m.sibling:null):m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function va(e,t,l,a){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var x=r.type;Pt(r.pendingProps.value,m.value)||(e!==null?e.push(x):e=[x])}}else if(r===ia.current){if(m=r.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Di):e=[Di])}r=r.return}return e!==null&&vc(t,e,l,a),t.flags|=262144,e!==null}function or(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){pa=e,el=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Hm(pa,e)}function rr(e,t){return pa===null&&ya(e),Hm(e,t)}function Hm(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},el===null){if(e===null)throw Error(o(308));el=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else el=el.next=t;return l}var US=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},HS=n.unstable_scheduleCallback,LS=n.unstable_NormalPriority,at={$$typeof:He,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new US,data:new Map,refCount:0}}function _s(e){e.refCount--,e.refCount===0&&HS(LS,function(){e.controller.abort()})}function Lm(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Rs=null;function VS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ts=null,Sc=0,Sa=0,ci=null;function FS(e,t){if(Ts===null){var l=Ts=[];Sc=0,Sa=Hf(),ci={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Sc++,t.then(Vm,Vm),t}function Vm(){if(--Sc===0&&(Rs=null,Ts!==null)){ci!==null&&(ci.status="fulfilled");var e=Ts;Ts=null,Sa=0,ci=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function BS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),a}var Fm=ne.S;ne.S=function(e,t){if(Ap=Rt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&FS(e,t),Rs!==null)for(var l=Ni;l!==null;)Lm(l,Rs),l=l.next;if(l=e.types,l!==null){for(var a=Ni;a!==null;)Lm(a,l),a=a.next;if(Sa!==0){a=Rs,a===null&&(a=Rs=[]);for(var r=0;r<l.length;r++){var c=l[r];a.indexOf(c)===-1&&a.push(c)}}}Fm!==null&&Fm(e,t)};var xa=Gt(null);function xc(){var e=xa.current;return e!==null?e:$e.pooledCache}function ur(e,t){t===null?ze(xa,xa.current):ze(xa,t.pool)}function Bm(){var e=xc();return e===null?null:{parent:at._currentValue,pool:e}}var fi=Error(o(460)),bc=Error(o(474)),cr=Error(o(542)),fr={then:function(){}};function Gm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qm(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(jn,jn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$m(e),e===void 0&&!("reason"in t)?Error(o(600)):e;default:if(typeof t.status=="string")t.then(jn,jn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,$m(e),e}throw Ca=t,fi}}function ba(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ca=l,fi):l}}var Ca=null;function km(){if(Ca===null)throw Error(o(459));var e=Ca;return Ca=null,e}function $m(e){if(e===fi||e===cr)throw Error(o(483))}var di=null,Ns=0;function dr(e){var t=Ns;return Ns+=1,di===null&&(di=[]),qm(di,e,t)}function bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hr(e,t){throw t.$$typeof===Z?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qm(e){function t(U,M){if(e){var L=U.deletions;L===null?(U.deletions=[M],U.flags|=16):L.push(M)}}function l(U,M){if(!e)return null;for(;M!==null;)t(U,M),M=M.sibling;return null}function a(U){for(var M=new Map;U!==null;)U.key===null?M.set(U.index,U):M.set(U.key,U),U=U.sibling;return M}function r(U,M){return U=Jn(U,M),U.index=0,U.sibling=null,U}function c(U,M,L){return U.index=L,e?(L=U.alternate,L!==null?(L=L.index,L<M?(U.flags|=2,M):L):(U.flags|=134217730,M)):(U.flags|=1048576,M)}function m(U){return e&&U.alternate===null&&(U.flags|=134217730),U}function x(U,M,L,k){return M===null||M.tag!==6?(M=fc(L,U.mode,k),M.return=U,M):(M=r(M,L),M.return=U,M)}function R(U,M,L,k){var ee=L.type;return ee===Se?(U=F(U,M,L.props.children,k,L.key),bl(U,L),U):M!==null&&(M.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ye&&ba(ee)===M.type)?(M=r(M,L.props),bl(M,L),M.return=U,M):(M=nr(L.type,L.key,L.props,null,U.mode,k),bl(M,L),M.return=U,M)}function H(U,M,L,k){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=dc(L,U.mode,k),M.return=U,M):(M=r(M,L.children||[]),M.return=U,M)}function F(U,M,L,k,ee){return M===null||M.tag!==7?(M=ma(L,U.mode,k,ee),M.return=U,M):(M=r(M,L),M.return=U,M)}function $(U,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fc(""+M,U.mode,L),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case W:return L=nr(M.type,M.key,M.props,null,U.mode,L),bl(L,M),L.return=U,L;case oe:return M=dc(M,U.mode,L),M.return=U,M;case ye:return M=ba(M),$(U,M,L)}if(je(M)||se(M))return M=ma(M,U.mode,L,null),M.return=U,M;if(typeof M.then=="function")return $(U,dr(M),L);if(M.$$typeof===He)return $(U,rr(U,M),L);hr(U,M)}return null}function D(U,M,L,k){var ee=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ee!==null?null:x(U,M,""+L,k);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case W:return L.key===ee?R(U,M,L,k):null;case oe:return L.key===ee?H(U,M,L,k):null;case ye:return L=ba(L),D(U,M,L,k)}if(je(L)||se(L))return ee!==null?null:F(U,M,L,k,null);if(typeof L.then=="function")return D(U,M,dr(L),k);if(L.$$typeof===He)return D(U,M,rr(U,L),k);hr(U,L)}return null}function V(U,M,L,k,ee){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return U=U.get(L)||null,x(M,U,""+k,ee);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case W:return U=U.get(k.key===null?L:k.key)||null,R(M,U,k,ee);case oe:return U=U.get(k.key===null?L:k.key)||null,H(M,U,k,ee);case ye:return k=ba(k),V(U,M,L,k,ee)}if(je(k)||se(k))return U=U.get(L)||null,F(M,U,k,ee,null);if(typeof k.then=="function")return V(U,M,L,dr(k),ee);if(k.$$typeof===He)return V(U,M,L,rr(M,k),ee);hr(M,k)}return null}function X(U,M,L,k){for(var ee=null,Ee=null,re=M,fe=M=0,ot=null;re!==null&&fe<L.length;fe++){re.index>fe?(ot=re,re=null):ot=re.sibling;var Ne=D(U,re,L[fe],k);if(Ne===null){re===null&&(re=ot);break}e&&re&&Ne.alternate===null&&t(U,re),M=c(Ne,M,fe),Ee===null?ee=Ne:Ee.sibling=Ne,Ee=Ne,re=ot}if(fe===L.length)return l(U,re),ve&&Wn(U,fe),ee;if(re===null){for(;fe<L.length;fe++)re=$(U,L[fe],k),re!==null&&(M=c(re,M,fe),Ee===null?ee=re:Ee.sibling=re,Ee=re);return ve&&Wn(U,fe),ee}for(re=a(re);fe<L.length;fe++)ot=V(re,U,fe,L[fe],k),ot!==null&&(e&&(Ne=ot.alternate,Ne!==null&&re.delete(Ne.key===null?fe:Ne.key)),M=c(ot,M,fe),Ee===null?ee=ot:Ee.sibling=ot,Ee=ot);return e&&re.forEach(function(Bl){return t(U,Bl)}),ve&&Wn(U,fe),ee}function le(U,M,L,k){if(L==null)throw Error(o(151));for(var ee=null,Ee=null,re=M,fe=M=0,ot=null,Ne=L.next();re!==null&&!Ne.done;fe++,Ne=L.next()){re.index>fe?(ot=re,re=null):ot=re.sibling;var Bl=D(U,re,Ne.value,k);if(Bl===null){re===null&&(re=ot);break}e&&re&&Bl.alternate===null&&t(U,re),M=c(Bl,M,fe),Ee===null?ee=Bl:Ee.sibling=Bl,Ee=Bl,re=ot}if(Ne.done)return l(U,re),ve&&Wn(U,fe),ee;if(re===null){for(;!Ne.done;fe++,Ne=L.next())Ne=$(U,Ne.value,k),Ne!==null&&(M=c(Ne,M,fe),Ee===null?ee=Ne:Ee.sibling=Ne,Ee=Ne);return ve&&Wn(U,fe),ee}for(re=a(re);!Ne.done;fe++,Ne=L.next())Ne=V(re,U,fe,Ne.value,k),Ne!==null&&(e&&(ot=Ne.alternate,ot!==null&&re.delete(ot.key===null?fe:ot.key)),M=c(Ne,M,fe),Ee===null?ee=Ne:Ee.sibling=Ne,Ee=Ne);return e&&re.forEach(function(xb){return t(U,xb)}),ve&&Wn(U,fe),ee}function pe(U,M,L,k){if(typeof L=="object"&&L!==null&&L.type===Se&&L.key===null&&L.props.ref===void 0&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case W:e:{for(var ee=L.key;M!==null;){if(M.key===ee){if(ee=L.type,ee===Se){if(M.tag===7){l(U,M.sibling),k=r(M,L.props.children),bl(k,L),k.return=U,U=k;break e}}else if(M.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ye&&ba(ee)===M.type){l(U,M.sibling),k=r(M,L.props),bl(k,L),k.return=U,U=k;break e}l(U,M);break}else t(U,M);M=M.sibling}L.type===Se?(k=ma(L.props.children,U.mode,k,L.key),bl(k,L),k.return=U,U=k):(k=nr(L.type,L.key,L.props,null,U.mode,k),bl(k,L),k.return=U,U=k)}return m(U);case oe:e:{for(ee=L.key;M!==null;){if(M.key===ee)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){l(U,M.sibling),k=r(M,L.children||[]),k.return=U,U=k;break e}else{l(U,M);break}else t(U,M);M=M.sibling}k=dc(L,U.mode,k),k.return=U,U=k}return m(U);case ye:return L=ba(L),pe(U,M,L,k)}if(je(L))return X(U,M,L,k);if(se(L)){if(ee=se(L),typeof ee!="function")throw Error(o(150));return L=ee.call(L),le(U,M,L,k)}if(typeof L.then=="function")return pe(U,M,dr(L),k);if(L.$$typeof===He)return pe(U,M,rr(U,L),k);hr(U,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(l(U,M.sibling),k=r(M,L),k.return=U,U=k):(l(U,M),k=fc(L,U.mode,k),k.return=U,U=k),m(U)):l(U,M)}return function(U,M,L,k){try{Ns=0;var ee=pe(U,M,L,k);return di=null,ee}catch(re){if(re===fi||re===cr)throw re;var Ee=kt(29,re,null,U.mode);return Ee.lanes=k,Ee.return=U,Ee}finally{}}}var Ea=Qm(!0),Ym=Qm(!1),Cl=!1;function Cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(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 El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(De&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=tr(e),Mm(e,null,l),t}return er(e,a,t,l),tr(e)}function Ms(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,zh(e,l)}}function wc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var r=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var m={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?r=c=m:c=c.next=m,l=l.next}while(l!==null);c===null?r=c=t:c=c.next=t}else r=c=t;l={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var _c=!1;function js(){if(_c){var e=ci;if(e!==null)throw e}}function As(e,t,l,a){_c=!1;var r=e.updateQueue;Cl=!1;var c=r.firstBaseUpdate,m=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var R=x,H=R.next;R.next=null,m===null?c=H:m.next=H,m=R;var F=e.alternate;F!==null&&(F=F.updateQueue,x=F.lastBaseUpdate,x!==m&&(x===null?F.firstBaseUpdate=H:x.next=H,F.lastBaseUpdate=R))}if(c!==null){var $=r.baseState;m=0,F=H=R=null,x=c;do{var D=x.lane&-536870913,V=D!==x.lane;if(V?(Ce&D)===D:(a&D)===D){D!==0&&D===Sa&&(_c=!0),F!==null&&(F=F.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var X=e,le=x;D=t;var pe=l;switch(le.tag){case 1:if(X=le.payload,typeof X=="function"){$=X.call(pe,$,D);break e}$=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=le.payload,D=typeof X=="function"?X.call(pe,$,D):X,D==null)break e;$=q({},$,D);break e;case 2:Cl=!0}}D=x.callback,D!==null&&(e.flags|=64,V&&(e.flags|=8192),V=r.callbacks,V===null?r.callbacks=[D]:V.push(D))}else V={lane:D,tag:x.tag,payload:x.payload,callback:x.callback,next:null},F===null?(H=F=V,R=$):F=F.next=V,m|=D;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;V=x,x=V.next,V.next=null,r.lastBaseUpdate=V,r.shared.pending=null}}while(!0);F===null&&(R=$),r.baseState=R,r.firstBaseUpdate=H,r.lastBaseUpdate=F,c===null&&(r.shared.lanes=0),Al|=m,e.lanes=m,e.memoizedState=$}}function Im(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Xm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Im(l[e],t)}var _l=Gt(null),mr=Gt(0);function Km(e,t){e=sl,ze(mr,e),ze(_l,t),sl=e|t.baseLanes}function Rc(){ze(mr,sl),ze(_l,_l.current)}function Tc(){sl=mr.current,Ie(_l),Ie(mr)}var yt=Gt(null),Tt=null;function Rl(e){var t=e.alternate;ze(St,St.current&1),ze(yt,e),Tt===null&&(t===null||_l.current!==null||t.memoizedState!==null)&&(Tt=e)}function Nc(e){ze(St,St.current),ze(yt,e),Tt===null&&(Tt=e)}function Zm(e){e.tag===22?(ze(St,St.current),ze(yt,e),Tt===null&&(Tt=e)):Tl()}function Tl(){ze(St,St.current),ze(yt,yt.current)}function Jt(e){Ie(yt),Tt===e&&(Tt=null),Ie(St)}var St=Gt(0);function Os(e,t){ze(yt,yt.current),ze(St,t)}function Mc(e){Ie(St),Ie(yt),Tt===e&&(Tt=null)}function gr(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Jf(l)||Wf(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 nl=0,ge=null,ke=null,it=null,pr=!1,hi=!1,wa=!1,vr=0,zs=0,mi=null,GS=0;function tt(){throw Error(o(321))}function jc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Pt(e[l],t[l]))return!1;return!0}function Ac(e,t,l,a,r,c){return nl=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ne.H=e===null||e.memoizedState===null?zg:Dg,wa=!1,c=l(a,r),wa=!1,hi&&(c=Jm(t,l,a,r)),Pm(e),c}function Pm(e){ne.H=wr;var t=ke!==null&&ke.next!==null;if(nl=0,it=ke=ge=null,pr=!1,zs=0,mi=null,t)throw Error(o(300));e===null||st||(e=e.dependencies,e!==null&&or(e)&&(st=!0))}function Jm(e,t,l,a){ge=e;var r=0;do{if(hi&&(mi=null),zs=0,hi=!1,25<=r)throw Error(o(301));if(r+=1,it=ke=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}ne.H=KS,c=t(l,a)}while(hi);return c}function qS(){var e=ne.H,t=e.useState()[0];return t=typeof t.then=="function"?Ds(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ge.flags|=1024),t}function Oc(){var e=vr!==0;return vr=0,e}function zc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Dc(e){if(pr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}pr=!1}nl=0,it=ke=ge=null,hi=!1,zs=vr=0,mi=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?ge.memoizedState=it=e:it=it.next=e,it}function lt(){if(ke===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=it===null?ge.memoizedState:it.next;if(t!==null)it=t,ke=e;else{if(e===null)throw ge.alternate===null?Error(o(467)):Error(o(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},it===null?ge.memoizedState=it=e:it=it.next=e}return it}function yr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ds(e){var t=zs;return zs+=1,mi===null&&(mi=[]),e=qm(mi,e,t),t=ge,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,ne.H=t===null||t.memoizedState===null?zg:Dg),e}function Sr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ds(e);if(e.$$typeof===Q)return;if(e.$$typeof===He)return vt(e)}throw Error(o(438,String(e)))}function Uc(e){var t=null,l=ge.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ge.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=yr(),ge.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=At;return t.index++,l}function ll(e,t){return typeof t=="function"?t(e):t}function xr(e){var t=lt();return Hc(t,ke,e)}function Hc(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var r=e.baseQueue,c=a.pending;if(c!==null){if(r!==null){var m=r.next;r.next=c.next,c.next=m}t.baseQueue=r=c,a.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var x=m=null,R=null,H=t,F=!1;do{var $=H.lane&-536870913;if($!==H.lane?(Ce&$)===$:(nl&$)===$){var D=H.revertLane;if(D===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),$===Sa&&(F=!0);else if((nl&D)===D){H=H.next,D===Sa&&(F=!0);continue}else $={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(x=R=$,m=c):R=R.next=$,ge.lanes|=D,Al|=D;$=H.action,wa&&l(c,$),c=H.hasEagerState?H.eagerState:l(c,$)}else D={lane:$,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(x=R=D,m=c):R=R.next=D,ge.lanes|=$,Al|=$;H=H.next}while(H!==null&&H!==t);if(R===null?m=c:R.next=x,!Pt(c,e.memoizedState)&&(st=!0,F&&(l=ci,l!==null)))throw l;e.memoizedState=c,e.baseState=m,e.baseQueue=R,a.lastRenderedState=c}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Lc(e){var t=lt(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,r=l.pending,c=t.memoizedState;if(r!==null){l.pending=null;var m=r=r.next;do c=e(c,m.action),m=m.next;while(m!==r);Pt(c,t.memoizedState)||(st=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Wm(e,t,l){var a=ge,r=lt(),c=ve;if(c){if(l===void 0)throw Error(o(407));l=l()}else l=t();var m=!Pt((ke||r).memoizedState,l);if(m&&(r.memoizedState=l,st=!0),r=r.queue,Bc(ng.bind(null,a,r,e),[e]),e=r.getSnapshot!==t||m||it!==null&&(it.memoizedState.tag&1)!==0,gi(e?9:8,{destroy:void 0},tg.bind(null,a,r,l,t),null),e){if(a.flags|=2048,$e===null)throw Error(o(349));c||(nl&127)!==0||eg(a,t,l)}return l}function eg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ge.updateQueue,t===null?(t=yr(),ge.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function tg(e,t,l,a){t.value=l,t.getSnapshot=a,lg(t)&&ag(e)}function ng(e,t,l){return l(function(){lg(t)&&ag(e)})}function lg(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Pt(e,l)}catch{return!0}}function ag(e){var t=ha(e,2);t!==null&&It(t,e,2)}function Vc(e){var t=Dt();if(typeof e=="function"){var l=e;if(e=l(),wa){Mn(!0);try{l()}finally{Mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:e},t}function ig(e,t,l,a){return e.baseState=l,Hc(e,ke,typeof a=="function"?a:ll)}function kS(e,t,l,a,r){if(Er(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};ne.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,sg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function sg(e,t){var l=t.action,a=t.payload,r=e.state;if(t.isTransition){var c=ne.T,m={};m.types=c!==null?c.types:null,ne.T=m;try{var x=l(r,a),R=ne.S;R!==null&&R(m,x),og(e,t,x)}catch(H){Fc(e,t,H)}finally{c!==null&&m.types!==null&&(c.types=m.types),ne.T=c}}else try{c=l(r,a),og(e,t,c)}catch(H){Fc(e,t,H)}}function og(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){rg(e,t,a)},function(a){return Fc(e,t,a)}):rg(e,t,l)}function rg(e,t,l){t.status="fulfilled",t.value=l,ug(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,sg(e,l)))}function Fc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,ug(t),t=t.next;while(t!==a)}e.action=null}function ug(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cg(e,t){return t}function fg(e,t){if(ve){var l=$e.formState;if(l!==null){e:{var a=ge;if(ve){if(Qe){t:{for(var r=Qe,c=hn;r.nodeType!==8;){if(!c){r=null;break t}if(r=gn(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){Qe=gn(r.nextSibling),a=r.data==="F!";break e}}Sl(a)}a=!1}a&&(t=l[0])}}return l=Dt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cg,lastRenderedState:t},l.queue=a,l=jg.bind(null,ge,a),a.dispatch=l,a=Vc(!1),c=Qc.bind(null,ge,!1,a.queue),a=Dt(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,l=kS.bind(null,ge,r,c,l),r.dispatch=l,a.memoizedState=e,[t,l,!1]}function dg(e){var t=lt();return hg(t,ke,e)}function hg(e,t,l){if(t=Hc(e,t,cg)[0],e=xr(ll)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ds(t)}catch(m){throw m===fi?cr:m}else a=t;t=lt();var r=t.queue,c=r.dispatch;return l!==t.memoizedState&&(ge.flags|=2048,gi(9,{destroy:void 0},$S.bind(null,r,l),null)),[a,c,e]}function $S(e,t){e.action=t}function mg(e){var t=lt(),l=ke;if(l!==null)return hg(t,l,e);lt(),t=t.memoizedState,l=lt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function gi(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ge.updateQueue,t===null&&(t=yr(),ge.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function gg(){return lt().memoizedState}function br(e,t,l,a){var r=Dt();ge.flags|=e,r.memoizedState=gi(1|t,{destroy:void 0},l,a===void 0?null:a)}function Cr(e,t,l,a){var r=lt();a=a===void 0?null:a;var c=r.memoizedState.inst;ke!==null&&a!==null&&jc(a,ke.memoizedState.deps)?r.memoizedState=gi(t,c,l,a):(ge.flags|=e,r.memoizedState=gi(1|t,c,l,a))}function pg(e,t){br(8390656,8,e,t)}function Bc(e,t){Cr(2048,8,e,t)}function QS(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=yr(),ge.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function vg(e){var t=lt().memoizedState;return QS({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function yg(e,t){return Cr(4,2,e,t)}function Sg(e,t){return Cr(4,4,e,t)}function xg(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bg(e,t,l){l=l!=null?l.concat([e]):null,Cr(4,4,xg.bind(null,t,e),l)}function Gc(){}function Cg(e,t){var l=lt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&jc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Eg(e,t){var l=lt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&jc(t,a[1]))return a[0];if(a=e(),wa){Mn(!0);try{e()}finally{Mn(!1)}}return l.memoizedState=[a,t],a}function qc(e,t,l){return l===void 0||(nl&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=zp(),ge.lanes|=e,Al|=e,l)}function wg(e,t,l,a){return Pt(l,t)?l:_l.current!==null?(e=qc(e,l,a),Pt(e,t)||(st=!0),e):(nl&106)===0||(nl&1073741824)!==0&&(Ce&261930)===0?(st=!0,e.memoizedState=l):(e=zp(),ge.lanes|=e,Al|=e,t)}function _g(e,t,l,a,r){var c=ue.p;ue.p=c!==0&&8>c?c:8;var m=ne.T,x={};x.types=m!==null?m.types:null,ne.T=x,Qc(e,!1,t,l);try{var R=r(),H=ne.S;if(H!==null&&H(x,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=BS(R,a);Us(e,t,F,nn(e))}else Us(e,t,a,nn(e))}catch($){Us(e,t,{then:function(){},status:"rejected",reason:$},nn())}finally{ue.p=c,m!==null&&x.types!==null&&(m.types=x.types),ne.T=m}}function YS(){}function kc(e,t,l,a){if(e.tag!==5)throw Error(o(476));var r=Rg(e).queue;_g(e,r,t,_t,l===null?YS:function(){return Tg(e),l(a)})}function Rg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_t,baseState:_t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:_t},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tg(e){var t=Rg(e);t.next===null&&(t=e.alternate.memoizedState),Us(e,t.next.queue,{},nn())}function $c(){return vt(Di)}function Ng(){return lt().memoizedState}function Mg(){return lt().memoizedState}function IS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=nn();e=El(l);var a=wl(t,e,l);a!==null&&(It(a,t,l),Ms(a,t,l)),t={cache:yc()},e.payload=t;return}t=t.return}}function XS(e,t,l){var a=nn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Er(e)?Ag(t,l):(l=uc(e,t,l,a),l!==null&&(It(l,e,a),Og(l,t,a)))}function jg(e,t,l){var a=nn();Us(e,t,l,a)}function Us(e,t,l,a){var r={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Er(e))Ag(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,x=c(m,l);if(r.hasEagerState=!0,r.eagerState=x,Pt(x,m))return er(e,t,r,0),$e===null&&Wo(),!1}catch{}finally{}if(l=uc(e,t,r,a),l!==null)return It(l,e,a),Og(l,t,a),!0}return!1}function Qc(e,t,l,a){if(a={lane:2,revertLane:Hf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Er(e)){if(t)throw Error(o(479))}else t=uc(e,l,a,2),t!==null&&It(t,e,2)}function Er(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Ag(e,t){hi=pr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Og(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,zh(e,l)}}var wr={readContext:vt,use:Sr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt,useEffectEvent:tt},zg={readContext:vt,use:Sr,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:pg,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,br(4194308,4,xg.bind(null,t,e),l)},useLayoutEffect:function(e,t){return br(4194308,4,e,t)},useInsertionEffect:function(e,t){br(4,2,e,t)},useMemo:function(e,t){var l=Dt();t=t===void 0?null:t;var a=e();if(wa){Mn(!0);try{e()}finally{Mn(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Dt();if(l!==void 0){var r=l(t);if(wa){Mn(!0);try{l(t)}finally{Mn(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=XS.bind(null,ge,e),[a.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Vc(e);var t=e.queue,l=jg.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Gc,useDeferredValue:function(e,t){var l=Dt();return qc(l,e,t)},useTransition:function(){var e=Vc(!1);return e=_g.bind(null,ge,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ge,r=Dt();if(ve){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),$e===null)throw Error(o(349));(Ce&127)!==0||eg(a,t,l)}r.memoizedState=l;var c={value:l,getSnapshot:t};return r.queue=c,pg(ng.bind(null,a,c,e),[e]),a.flags|=2048,gi(9,{destroy:void 0},tg.bind(null,a,c,l,t),null),l},useId:function(){var e=Dt(),t=$e.identifierPrefix;if(ve){var l=On,a=An;l=(a&~(1<<32-Ot(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=vr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=GS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$c,useFormState:fg,useActionState:fg,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Qc.bind(null,ge,!0,l),l.dispatch=t,[e,t]},useMemoCache:Uc,useCacheRefresh:function(){return Dt().memoizedState=IS.bind(null,ge)},useEffectEvent:function(e){var t=Dt(),l={impl:e};return t.memoizedState=l,function(){if((De&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Dg={readContext:vt,use:Sr,useCallback:Cg,useContext:vt,useEffect:Bc,useImperativeHandle:bg,useInsertionEffect:yg,useLayoutEffect:Sg,useMemo:Eg,useReducer:xr,useRef:gg,useState:function(){return xr(ll)},useDebugValue:Gc,useDeferredValue:function(e,t){var l=lt();return wg(l,ke.memoizedState,e,t)},useTransition:function(){var e=xr(ll)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:Ds(e),t]},useSyncExternalStore:Wm,useId:Ng,useHostTransitionStatus:$c,useFormState:dg,useActionState:dg,useOptimistic:function(e,t){var l=lt();return ig(l,ke,e,t)},useMemoCache:Uc,useCacheRefresh:Mg,useEffectEvent:vg},KS={readContext:vt,use:Sr,useCallback:Cg,useContext:vt,useEffect:Bc,useImperativeHandle:bg,useInsertionEffect:yg,useLayoutEffect:Sg,useMemo:Eg,useReducer:Lc,useRef:gg,useState:function(){return Lc(ll)},useDebugValue:Gc,useDeferredValue:function(e,t){var l=lt();return ke===null?qc(l,e,t):wg(l,ke.memoizedState,e,t)},useTransition:function(){var e=Lc(ll)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:Ds(e),t]},useSyncExternalStore:Wm,useId:Ng,useHostTransitionStatus:$c,useFormState:mg,useActionState:mg,useOptimistic:function(e,t){var l=lt();return ke!==null?ig(l,ke,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Uc,useCacheRefresh:Mg,useEffectEvent:vg};function Yc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:q({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ic={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=nn(),r=El(a);r.payload=t,l!=null&&(r.callback=l),t=wl(e,r,a),t!==null&&(It(t,e,a),Ms(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=nn(),r=El(a);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=wl(e,r,a),t!==null&&(It(t,e,a),Ms(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=nn(),a=El(l);a.tag=2,t!=null&&(a.callback=t),t=wl(e,a,l),t!==null&&(It(t,e,l),Ms(t,e,l))}};function Ug(e,t,l,a,r,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,m):t.prototype&&t.prototype.isPureReactComponent?!bs(l,a)||!bs(r,c):!0}function Hg(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Ic.enqueueReplaceState(t,t.state,null)}function _a(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=q({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function Lg(e){Jo(e)}function Vg(e){console.error(e)}function Fg(e){Jo(e)}function _r(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Bg(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Xc(e,t,l){return l=El(l),l.tag=3,l.payload={element:null},l.callback=function(){_r(e,t)},l}function Gg(e){return e=El(e),e.tag=3,e}function qg(e,t,l,a){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var c=a.value;e.payload=function(){return r(c)},e.callback=function(){Bg(t,l,a)}}var m=l.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){Bg(t,l,a),typeof r!="function"&&(Ol===null?Ol=new Set([this]):Ol.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function ZS(e,t,l,a,r){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&va(t,l,r,!0),l=yt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Tt===null?Yr():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=r,a===fr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),zf(e,a,r)),!1;case 22:return l.flags|=65536,a===fr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),zf(e,a,r)),!1}throw Error(o(435,l.tag))}return zf(e,a,r),Yr(),!1}if(ve)return t=yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==mc&&(e=Error(o(422),{cause:a}),ws(cn(e,l)))):(a!==mc&&(t=Error(o(423),{cause:a}),ws(cn(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=cn(a,l),r=Xc(e.stateNode,a,r),wc(e,r),nt!==4&&(nt=2)),!1;var c=Error(o(520),{cause:a});if(c=cn(c,l),ks===null?ks=[c]:ks.push(c),nt!==4&&(nt=2),t===null)return!0;a=cn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=Xc(l.stateNode,a,e),wc(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ol===null||!Ol.has(c))))return l.flags|=65536,r&=-r,l.lanes|=r,r=Gg(r),qg(r,e,l,a),wc(l,r),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Kc=Error(o(461)),st=!1;function ut(e,t,l,a){t.child=e===null?Ym(t,null,l,a):Ea(t,e.child,l,a)}function kg(e,t,l,a,r){l=l.render;var c=t.ref;if("ref"in a){var m={};for(var x in a)x!=="ref"&&(m[x]=a[x])}else m=a;return ya(t),a=Ac(e,t,l,m,c,r),x=Oc(),e!==null&&!st?(zc(e,t,r),al(e,t,r)):(ve&&x&&ar(t),t.flags|=1,ut(e,t,a,r),t.child)}function $g(e,t,l,a,r){if(e===null){var c=l.type;return typeof c=="function"&&!cc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Qg(e,t,c,a,r)):(e=nr(l.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!lf(e,r)){var m=c.memoizedProps;if(l=l.compare,l=l!==null?l:bs,l(m,a)&&e.ref===t.ref)return al(e,t,r)}return t.flags|=1,e=Jn(c,a),e.ref=t.ref,e.return=t,t.child=e}function Qg(e,t,l,a,r){if(e!==null){var c=e.memoizedProps;if(bs(c,a)&&e.ref===t.ref)if(st=!1,t.pendingProps=a=c,lf(e,r))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,al(e,t,r)}return Zc(e,t,l,a,r)}function Yg(e,t,l,a){var r=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,r=0;a!==null;)r=r|a.lanes|a.childLanes,a=a.sibling;a=r&~c}else a=0,t.child=null;return Ig(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ur(t,c!==null?c.cachePool:null),c!==null?Km(t,c):Rc(),Zm(t);else return a=t.lanes=536870912,Ig(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(ur(t,c.cachePool),Km(t,c),Tl(),t.memoizedState=null):(e!==null&&ur(t,null),Rc(),Tl());return ut(e,t,r,l),t.child}function Hs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ig(e,t,l,a,r){var c=xc();return c=c===null?null:{parent:at._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&ur(t,null),Rc(),Zm(t),e!==null&&va(e,t,a,!0),t.childLanes=r,null}function Rr(e,t){return t=Tr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xg(e,t,l){return Ea(t,e.child,null,l),e=Rr(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function PS(e,t,l){var a=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ve){if(a.mode==="hidden")return e=Rr(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hs(null,e);if(Nc(t),(e=Qe)?(e=xv(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vl!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},l=Am(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Sl(t);return t.lanes=536870912,null}return Rr(t,a)}var c=e.memoizedState;if(c!==null){var m=c.dehydrated;if(Nc(t),r)if(t.flags&256)t.flags&=-257,t=Xg(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(st||va(e,t,l,!1),r=(l&e.childLanes)!==0,st||r){if(_l.current===null){if(a=$e,a!==null&&(m=Dh(a,l),m!==0&&m!==c.retryLane))throw c.retryLane=m,ha(e,m),It(a,e,m),Kc;Yr()}t=Xg(e,t,l)}else e=c.treeContext,Qe=gn(m.nextSibling),dt=t,ve=!0,yl=null,hn=!1,e!==null&&Dm(t,e),t=Rr(t,a),t.flags|=134221824;return t}return e=Jn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pi(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Zc(e,t,l,a,r){return ya(t),l=Ac(e,t,l,a,void 0,r),a=Oc(),e!==null&&!st?(zc(e,t,r),al(e,t,r)):(ve&&a&&ar(t),t.flags|=1,ut(e,t,l,r),t.child)}function Kg(e,t,l,a,r,c){return ya(t),t.updateQueue=null,l=Jm(t,a,l,r),Pm(e),a=Oc(),e!==null&&!st?(zc(e,t,c),al(e,t,c)):(ve&&a&&ar(t),t.flags|=1,ut(e,t,l,c),t.child)}function Zg(e,t,l,a,r){if(ya(t),t.stateNode===null){var c=si,m=l.contextType;typeof m=="object"&&m!==null&&(c=vt(m)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ic,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Cc(t),m=l.contextType,c.context=typeof m=="object"&&m!==null?vt(m):si,c.state=t.memoizedState,m=l.getDerivedStateFromProps,typeof m=="function"&&(Yc(t,l,m,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&Ic.enqueueReplaceState(c,c.state,null),As(t,a,c,r),js(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var x=t.memoizedProps,R=_a(l,x);c.props=R;var H=c.context,F=l.contextType;m=si,typeof F=="object"&&F!==null&&(m=vt(F));var $=l.getDerivedStateFromProps;F=typeof $=="function"||typeof c.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,F||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x||H!==m)&&Hg(t,c,a,m),Cl=!1;var D=t.memoizedState;c.state=D,As(t,a,c,r),js(),H=t.memoizedState,x||D!==H||Cl?(typeof $=="function"&&(Yc(t,l,$,a),H=t.memoizedState),(R=Cl||Ug(t,l,R,a,D,H,m))?(F||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=H),c.props=a,c.state=H,c.context=m,a=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Ec(e,t),m=t.memoizedProps,F=_a(l,m),c.props=F,$=t.pendingProps,D=c.context,H=l.contextType,R=si,typeof H=="object"&&H!==null&&(R=vt(H)),x=l.getDerivedStateFromProps,(H=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==$||D!==R)&&Hg(t,c,a,R),Cl=!1,D=t.memoizedState,c.state=D,As(t,a,c,r),js();var V=t.memoizedState;m!==$||D!==V||Cl||e!==null&&e.dependencies!==null&&or(e.dependencies)?(typeof x=="function"&&(Yc(t,l,x,a),V=t.memoizedState),(F=Cl||Ug(t,l,F,a,D,V,R)||e!==null&&e.dependencies!==null&&or(e.dependencies))?(H||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,V,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,V,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=V),c.props=a,c.state=V,c.context=R,a=F):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,pi(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=Ea(t,e.child,null,r),t.child=Ea(t,null,l,r)):ut(e,t,l,r),t.memoizedState=c.state,e=t.child):e=al(e,t,r),e}function Pg(e,t,l,a){return ga(),t.flags|=256,ut(e,t,l,a),t.child}var Pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Bm()}}function Wc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=tn),e}function Jg(e,t,l){var a=t.pendingProps,r=!1,c=(t.flags&128)!==0,m;if((m=c)||(m=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(ve){if(r?Rl(t):Tl(),(e=Qe)?(e=xv(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vl!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},l=Am(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Sl(t);return Wf(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,r?(Tl(),r=t.mode,c=Tr({mode:"hidden",children:c},r),a=ma(a,r,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=Jc(l),a.childLanes=Wc(e,m,l),t.memoizedState=Pc,Hs(null,a)):(Rl(t),ef(t,c))}var x=e.memoizedState;if(x!==null){var R=x.dehydrated;if(R!==null)return JS(e,t,c,m,a,R,x,l)}return r?(Tl(),r=a.fallback,c=t.mode,x=e.child,R=x.sibling,a=Jn(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&1206910976,R!==null?r=Jn(R,r):(r=ma(r,c,l,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,Hs(null,a),a=t.child,r=e.child.memoizedState,r===null?r=Jc(l):(c=r.cachePool,c!==null?(x=at._currentValue,c=c.parent!==x?{parent:x,pool:x}:c):c=Bm(),r={baseLanes:r.baseLanes|l,cachePool:c}),a.memoizedState=r,a.childLanes=Wc(e,m,l),t.memoizedState=Pc,Hs(e.child,a)):(Rl(t),l=e.child,e=l.sibling,l=Jn(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=l,t.memoizedState=null,l)}function ef(e,t){return t=Tr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Tr(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function Nr(e,t,l){return Ea(t,e.child,null,l),e=ef(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function JS(e,t,l,a,r,c,m,x){if(l)return t.flags&256?(Rl(t),t.flags&=-257,Nr(e,t,x)):t.memoizedState!==null?(Tl(),t.child=e.child,t.flags|=128,null):(Tl(),c=r.fallback,m=t.mode,r=Tr({mode:"visible",children:r.children},m),c=ma(c,m,x,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,x),r=t.child,r.memoizedState=Jc(x),r.childLanes=Wc(e,a,x),t.memoizedState=Pc,Hs(null,r));if(Rl(t),Wf(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var R=a.dgst;return a=R,a!==""&&(r=Error(o(419)),r.stack="",r.digest=a,ws({value:r,source:null,stack:null})),Nr(e,t,x)}if(st||va(e,t,x,!1),a=(x&e.childLanes)!==0,st||a){if(_l.current!==null)return Nr(e,t,x);if(a=$e,a!==null&&(r=Dh(a,x),r!==0&&r!==m.retryLane))throw m.retryLane=r,ha(e,r),It(a,e,r),Kc;return Jf(c)||Yr(),Nr(e,t,x)}return Jf(c)?(t.flags|=192,t.child=e.child,null):(e=m.treeContext,Qe=gn(c.nextSibling),dt=t,ve=!0,yl=null,hn=!1,e!==null&&Dm(t,e),t=ef(t,r.children),t.flags|=134221824,t)}function Wg(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),sr(e.return,t,l)}function ep(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&gr(l)===null&&(t=e),e=e.sibling}return t}function Mr(e,t,l,a,r,c){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:r,treeForkCount:c}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=a,m.tail=l,m.tailMode=r,m.treeForkCount=c)}function tf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function nf(e,t,l){var a=t.pendingProps,r=a.revealOrder,c=a.tail;a=a.children;var m=St.current;if(t.flags&128)return Os(t,m),null;var x=(m&2)!==0;if(x?(m=m&1|2,t.flags|=128):m&=1,Os(t,m),r==="backwards"&&e!==null?(tf(e),ut(e,t,a,l),tf(e)):ut(e,t,a,l),a=ve?Es:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wg(e,l,t);else if(e.tag===19)Wg(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"backwards":l=ep(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null,tf(t)),Mr(t,!0,r,null,c,a);break;case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&gr(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}Mr(t,!0,l,null,c,a);break;case"together":Mr(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=ep(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),Mr(t,!1,r,l,c,a)}return t.child}function tp(e,t,l){var a=t.pendingProps;return xl(t,t.type,a.value),ut(e,t,a.children,l),t.child}function al(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Al|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Jn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Jn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function lf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&or(e)))}function WS(e,t,l){switch(t.tag){case 3:hl(t,t.stateNode.containerInfo),xl(t,at,e.memoizedState.cache),ga();break;case 27:case 5:as(t);break;case 4:hl(t,t.stateNode.containerInfo);break;case 10:xl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Rl(t),t.flags|=128,null;a=va(e,t,l,!1);var r=t.child.childLanes;return a||(l&r)!==0?Jg(e,t,l):(Rl(t),e=al(e,t,l),e!==null?e.sibling:null)}Rl(t);break;case 19:if(t.flags&128)return nf(e,t,l);if(r=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(va(e,t,l,!1),a=(l&t.childLanes)!==0),r){if(a)return nf(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Os(t,St.current),a)break;return null;case 22:return t.lanes=0,Yg(e,t,l,t.pendingProps);case 24:xl(t,at,e.memoizedState.cache)}return al(e,t,l)}function np(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!lf(e,l)&&(t.flags&128)===0)return st=!1,WS(e,t,l);st=(e.flags&131072)!==0}else st=!1,ve&&(t.flags&1048576)!==0&&zm(t,Es,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e=="function")cc(e)?(a=_a(e,a),t.tag=1,t=Zg(null,t,e,a,l)):(t.tag=0,t=Zc(null,t,e,a,l));else{if(e!=null){var r=e.$$typeof;if(r===Y){t.tag=11,t=kg(null,t,e,a,l);break e}else if(r===Me){t.tag=14,t=$g(null,t,e,a,l);break e}else if(r===He){t.tag=10,t.type=e,t=tp(null,t,l);break e}}throw t=Re(e)||e,Error(o(306,t,""))}}return t;case 0:return Zc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,r=_a(a,t.pendingProps),Zg(e,t,a,r,l);case 3:e:{if(hl(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var c=t.memoizedState;r=c.element,Ec(e,t),As(t,a,null,l);var m=t.memoizedState;if(a=m.cache,xl(t,at,a),a!==c.cache&&vc(t,[at],l,!0),js(),a=m.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Pg(e,t,a,l);break e}else if(a!==r){r=cn(Error(o(424)),t),ws(r),t=Pg(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=gn(e.firstChild),dt=t,ve=!0,yl=null,hn=!0,l=Ym(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(ga(),a===r){t=al(e,t,l);break e}ut(e,t,a,l)}t=t.child}return t;case 26:return pi(e,t),e===null?(l=Tv(t.type,null,t.pendingProps,null))?t.memoizedState=l:ve||(t.stateNode=sv(t.type,t.pendingProps,sn.current,t)):t.memoizedState=Tv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return as(t),e===null&&ve&&(a=t.stateNode=Ev(t.type,t.pendingProps,sn.current),dt=t,hn=!0,r=Qe,Ul(t.type)?(ed=r,Qe=gn(a.firstChild)):Qe=r),ut(e,t,t.pendingProps.children,l),pi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ve&&((r=a=Qe)&&(a=Ix(a,t.type,t.pendingProps,hn),a!==null?(t.stateNode=a,dt=t,Qe=gn(a.firstChild),hn=!1,r=!0):r=!1),r||Sl(t)),as(t),r=t.type,c=t.pendingProps,m=e!==null?e.memoizedProps:null,a=c.children,Qf(r,c)?a=null:m!==null&&Qf(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=Ac(e,t,qS,null,null,l),Di._currentValue=r),pi(e,t),ut(e,t,a,l),t.child;case 6:return e===null&&ve&&((e=l=Qe)&&(l=Xx(l,t.pendingProps,hn),l!==null?(t.stateNode=l,dt=t,Qe=null,e=!0):e=!1),e||Sl(t)),null;case 13:return Jg(e,t,l);case 4:return hl(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ea(t,null,a,l):ut(e,t,a,l),t.child;case 11:return kg(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,pi(e,t),ut(e,t,a,l),t.child;case 8:return ut(e,t,t.pendingProps.children,l),t.child;case 12:return ut(e,t,t.pendingProps.children,l),t.child;case 10:return tp(e,t,l);case 9:return r=t.type._context,a=t.pendingProps.children,ya(t),r=vt(r),a=a(r),t.flags|=1,ut(e,t,a,l),t.child;case 14:return $g(e,t,t.type,t.pendingProps,l);case 15:return Qg(e,t,t.type,t.pendingProps,l);case 19:return nf(e,t,l);case 31:return PS(e,t,l);case 22:return Yg(e,t,l,t.pendingProps);case 24:return ya(t),a=vt(at),e===null?(r=xc(),r===null&&(r=$e,c=yc(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=l),r=c),t.memoizedState={parent:a,cache:r},Cc(t),xl(t,at,r)):((e.lanes&l)!==0&&(Ec(e,t),As(t,null,null,l),js()),r=e.memoizedState,c=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),xl(t,at,a)):(a=c.cache,xl(t,at,a),a!==r.cache&&vc(t,[at],l,!0))),ut(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:ve&&ar(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:pi(e,t),ut(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function il(e){e.flags|=4}function af(e,t,l,a,r){var c;if((c=(e.mode&32)!==0)&&(c=l===null?Av(t,a):Av(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Lp())e.flags|=8192;else throw Ca=fr,bc}else e.flags&=-16777217}function lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ov(t))if(Lp())e.flags|=8192;else throw Ca=fr,bc}function jr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ah():536870912,e.lanes|=t,bi|=t)}function Ls(e,t){if(!ve)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,a|=r.subtreeFlags&1206910976,a|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function ex(e,t,l){var a=t.pendingProps;switch(hc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),tl(at),on(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ui(t)?il(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gc())),Ye(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(il(t),c!==null?(Ye(t),lp(t,c)):(Ye(t),af(t,r,null,a,l))):c?c!==e.memoizedState?(il(t),Ye(t),lp(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&il(t),Ye(t),af(t,r,e,a,l)),null;case 27:if(ka(t),l=sn.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ye(t),t.subtreeFlags&=-33554433,null}e=Kt.current,ui(t)?Um(t):(e=Ev(r,a,l),t.stateNode=e,il(t))}return Ye(t),t.subtreeFlags&=-33554433,null;case 5:if(ka(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ye(t),t.subtreeFlags&=-33554433,null}if(c=Kt.current,ui(t))Um(t);else{var m=Xs(sn.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?m.createElement("select",{is:a.is}):m.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?m.createElement(r,{is:a.is}):m.createElement(r)}}c[pt]=t,c[qt]=a;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=c;e:switch(bt(c,r,a),r){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&il(t)}}return Ye(t),t.subtreeFlags&=-33554433,af(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=sn.current,ui(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,r=dt,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||nv(e.nodeValue,l)),e||Sl(t,!0)}else e=Xs(e).createTextNode(a),e[pt]=t,t.stateNode=e}return Ye(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ui(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[pt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else l=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ye(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ui(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[pt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),r=!1}else r=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),jr(t,t.updateQueue),Ye(t),null);case 4:return on(),e===null&&Bf(t.stateNode.containerInfo),t.flags|=67108864,Ye(t),null;case 10:return tl(t.type),Ye(t),null;case 19:if(Mc(t),a=t.memoizedState,a===null)return Ye(t),null;if(r=(t.flags&128)!==0,c=a.rendering,c===null)if(r)Ls(a,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=gr(e),c!==null){for(t.flags|=128,Ls(a,!1),e=c.updateQueue,t.updateQueue=e,jr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)jm(l,e),l=l.sibling;return Os(t,St.current&1|2),ve&&Wn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Rt()>qr&&(t.flags|=128,r=!0,Ls(a,!1),t.lanes=4194304)}else{if(!r)if(e=gr(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,jr(t,e),Ls(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!ve)return Ye(t),null}else 2*Rt()-a.renderingStartTime>qr&&l!==536870912&&(t.flags|=128,r=!0,Ls(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Rt(),e.sibling=null,c=St.current,c=r?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||ve?Os(t,c):(l=c,ze(yt,t),ze(St,l),Tt===null&&(Tt=t)),ve&&Wn(t,a.treeForkCount),e}return Ye(t),null;case 22:case 23:return Jt(t),Tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),l=t.updateQueue,l!==null&&jr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&Ie(xa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),tl(at),Ye(t),null;case 25:return null;case 30:return t.flags|=33554432,Ye(t),null}throw Error(o(156,t.tag))}function tx(e,t){switch(hc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tl(at),on(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ka(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return on(),null;case 10:return tl(t.type),null;case 22:case 23:return Jt(t),Tc(),e!==null&&Ie(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return tl(at),null;case 25:return null;default:return null}}function ap(e,t){switch(hc(t),t.tag){case 3:tl(at),on();break;case 26:case 27:case 5:ka(t);break;case 4:on();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:Mc(t);break;case 10:tl(t.type);break;case 22:case 23:Jt(t),Tc(),e!==null&&Ie(xa);break;case 24:tl(at)}}function Vs(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var r=a.next;l=r;do{if((l.tag&e)===e){a=void 0;var c=l.create,m=l.inst;a=c(),m.destroy=a}l=l.next}while(l!==r)}}catch(x){Ge(t,t.return,x)}}function Nl(e,t,l){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var c=r.next;a=c;do{if((a.tag&e)===e){var m=a.inst,x=m.destroy;if(x!==void 0){m.destroy=void 0,r=t;var R=l,H=x;try{H()}catch(F){Ge(r,R,F)}}}a=a.next}while(a!==c)}}catch(F){Ge(t,t.return,F)}}function ip(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Xm(t,l)}catch(a){Ge(e,e.return,a)}}}function sp(e,t,l){l.props=_a(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ge(e,t,a)}}function zn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var r=e.stateNode,c=Zn(e.memoizedProps,r);(r.ref===null||r.ref.name!==c)&&(r.ref=hv(c)),a=r.ref;break;case 7:if(e.stateNode===null){var m=new ln(e);v(e.child,!1,Qx,m,void 0,void 0),e.stateNode=m}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(x){Ge(e,t,x)}}function xt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(r){Ge(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){Ge(e,t,r)}else l.current=null}function Ar(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)Sv(e.stateNode,t[l])}function op(e){for(var t=e.return;t!==null&&(of(t)&&Sv(e.stateNode,t.stateNode),!sf(t));)t=t.return}function Fs(e){for(var t=e.return;t!==null&&(of(t)&&Yx(e.stateNode,t.stateNode),!sf(t));)t=t.return}function sf(e){return e.tag===5||e.tag===3||e.tag===27}function of(e){return e&&e.tag===7&&e.stateNode!==null}function rf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(r){Ge(e,e.return,r)}}function uf(e,t,l){try{var a=e.stateNode;Tx(a,e.type,l,t),a[qt]=t}catch(r){Ge(e,e.return,r)}}function rp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function cf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rp(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&&Ul(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ff(e,t,l,a){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(r),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=jn)),Ar(e,a),Ae=!0;else if(r!==4&&(r===27&&(Ar(e,a),a=null,Ul(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(ff(e,t,l,a),e=e.sibling;e!==null;)ff(e,t,l,a),e=e.sibling}function Or(e,t,l,a){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?l.insertBefore(r,t):l.appendChild(r),Ar(e,a),Ae=!0;else if(r!==4&&(r===27&&(Ar(e,a),a=null,Ul(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Or(e,t,l,a),e=e.sibling;e!==null;)Or(e,t,l,a),e=e.sibling}function up(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);bt(t,a,l),t[pt]=e,t[qt]=l}catch(c){Ge(e,e.return,c)}}var zr=!1,Wt=null;function cp(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(zr=!0)}var Dn=null;function fp(){var e=Dn;return Dn=null,e}var $t=0;function vi(e,t,l,a,r){return $t=0,dp(e.child,t,l,a,r)}function dp(e,t,l,a,r){for(var c=!1;e!==null;){if(e.tag===5){var m=e.stateNode;if(a!==null){var x=Xf(m);a.push(x),x.view&&(c=!0)}else c||Xf(m).view&&(c=!0);zr=!0,fv(m,$t===0?t:t+"_"+$t,l),$t++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||dp(e.child,t,l,a,r)&&(c=!0));e=e.sibling}return c}function Un(e,t){for(;e!==null;)e.tag===5?dv(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Un(e.child,t)),e=e.sibling}function Dr(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Dr(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(o(544));var l=t.name;t=Pn(t.default,t.share),t!=="none"&&(vi(e,l,t,null,!1)||Un(e.child,!1))}e=e.sibling}}function df(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,r=Zn(a,l),c=Pn(a.default,l.paired?a.share:a.enter);c!=="none"?vi(e,r,c,null,!1)?(Dr(e),l.paired||t||_i(e,a.onEnter)):Un(e.child,!1):Dr(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)df(e,t),e=e.sibling;else Dr(e)}function hf(e){if(Wt!==null&&Wt.size!==0){var t=Wt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var r=t.get(a);if(r!==void 0){var c=Pn(l.default,l.share);if(c!=="none"&&(vi(e,a,c,null,!1)?(c=e.stateNode,r.paired=c,c.paired=r,_i(e,l.onShare)):Un(e.child,!1)),t.delete(a),t.size===0)break}}}hf(e)}e=e.sibling}}}function mf(e){if(e.tag===30){var t=e.memoizedProps,l=Zn(t,e.stateNode),a=Wt!==null?Wt.get(l):void 0,r=Pn(t.default,a!==void 0?t.share:t.exit);r!=="none"&&(vi(e,l,r,null,!1)?a!==void 0?(r=e.stateNode,a.paired=r,r.paired=a,Wt.delete(l),_i(e,t.onShare)):_i(e,t.onExit):Un(e.child,!1)),Wt!==null&&hf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)mf(e),e=e.sibling;else Wt!==null&&hf(e)}function hp(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Zn(t,e.stateNode);t=Pn(t.default,t.update),e.flags&=-5,t!=="none"&&vi(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&hp(e);e=e.sibling}}function gf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Un(e.child,!1))}gf(e)}e=e.sibling}}function Ur(e){if(e.tag===30)e.stateNode.paired=null,Un(e.child,!1),gf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ur(e),e=e.sibling;else gf(e)}function mp(e){for(e=e.child;e!==null;)e.tag===30?Un(e.child,!1):(e.subtreeFlags&33554432)!==0&&mp(e),e=e.sibling}function pf(e,t,l,a,r,c,m){for(var x=!1;t!==null;){if(t.tag===5){var R=t.stateNode;if(c!==null&&$t<c.length){var H=c[$t],F=Xf(R);(H.view||F.view)&&(x=!0);var $;if($=(e.flags&4)===0)if(F.clip)$=!0;else{$=H.rect;var D=F.rect;$=$.y!==D.y||$.x!==D.x||$.height!==D.height||$.width!==D.width}$&&(e.flags|=4),F.abs?F=!H.abs:(H=H.rect,F=F.rect,F=H.height!==F.height||H.width!==F.width),F&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&fv(R,$t===0?l:l+"_"+$t,r),x&&(e.flags&4)!==0||(Dn===null&&(Dn=[]),Dn.push(R,$t===0?a:a+"_"+$t,t.memoizedProps)),$t++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&m?e.flags|=t.flags&32:pf(e,t.child,l,a,r,c,m)&&(x=!0));t=t.sibling}return x}function gp(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,r=Zn(l,a),c=Pn(l.default,l.update),m;m=e.memoizedState,e.memoizedState=null,a=e;var x=e.child;$t=0,r=pf(a,x,r,r,c,m,!1),(e.flags&4)!==0&&r&&_i(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&gp(e);e=e.sibling}}var ht=!1,Le=!1,Hn=!1,vf=!1,pp=typeof WeakSet=="function"?WeakSet:Set,mt=null,Ln=!1,Bs=!1,Hr=!1,yf=!1;function nx(e,t,l){if(e=e.containerInfo,kf=Ui,e=xm(e),lc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var c=r.anchorOffset,m=r.focusNode;r=r.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var x=0,R=-1,H=-1,F=0,$=0,D=e,V=null;t:for(;;){for(var X;D!==a||c!==0&&D.nodeType!==3||(R=x+c),D!==m||r!==0&&D.nodeType!==3||(H=x+r),D.nodeType===3&&(x+=D.nodeValue.length),(X=D.firstChild)!==null;)V=D,D=X;for(;;){if(D===e)break t;if(V===a&&++F===c&&(R=x),V===m&&++$===r&&(H=x),(X=D.nextSibling)!==null)break;D=V,V=D.parentNode}D=X}a=R===-1||H===-1?null:{start:R,end:H}}else a=null}a=a||{start:0,end:0}}else a=null;for($f={focusedElem:e,selectionRange:a},Ui=!1,l=(l&335544064)===l,mt=t,t=l?9270:1024;mt!==null;){if(e=mt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&mf(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&cp(e),Lr(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&mf(a),Lr(l);continue}else if(a!==null&&a.memoizedState!==null){l&&cp(e),Lr(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,mt=a):(l&&hp(e),Lr(l))}}Wt=null}function Lr(e){for(;mt!==null;){var t=mt,l=e,a=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((r&1024)!==0&&a!==null){l=void 0,r=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var m=_a(t.type,r);l=c.getSnapshotBeforeUpdate(m,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(x){Ge(t,t.return,x)}}break;case 3:if((r&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)Pf(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Pf(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=Zn(a.memoizedProps,a.stateNode),r=t.memoizedProps,r=Pn(r.default,r.update),r!=="none"&&vi(a,l,r,a.memoizedState=[],!0));break;default:if((r&1024)!==0)throw Error(o(163))}if(a=t.sibling,a!==null){a.return=t.return,mt=a;break}mt=t.return}}function vp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Vn(e,l),a&4&&Vs(5,l);break;case 1:if(Vn(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(m){Ge(l,l.return,m)}else{var r=_a(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){Ge(l,l.return,m)}}a&64&&ip(l),a&512&&zn(l,l.return);break;case 3:if(Vn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Xm(e,t)}catch(m){Ge(l,l.return,m)}}break;case 27:t===null&&a&4&&up(l);case 26:case 5:Vn(e,l),t===null&&a&4&&rf(l),a&512&&zn(l,l.return);break;case 12:Vn(e,l);break;case 31:Vn(e,l),a&4&&bp(e,l);break;case 13:Vn(e,l),a&4&&Cp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=mx.bind(null,l),Kx(e,l))));break;case 22:if(a=l.memoizedState!==null||ht,!a){var c=t!==null&&t.memoizedState!==null||Le;t=ht,r=Le,ht=a,(Le=c)&&!r?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Cn(e,l,a)):Vn(e,l),ht=t,Le=r}break;case 30:Vn(e,l),a&512&&zn(l,l.return);break;case 7:a&512&&zn(l,l.return);default:Vn(e,l)}}function Sf(e,t){for(e=e.child;e!==null;)yp(e,t),e=e.sibling}function yp(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var r=e.stateNode,c=e.memoizedProps.style,m=c!=null&&c.hasOwnProperty("display")?c.display:null;r.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(R){Ge(e,e.return,R)}xf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ae=!0}catch(R){Ge(e,e.return,R)}break;case 18:try{var x=e.stateNode;t?cv(x,!0):cv(e.stateNode,!1)}catch(R){Ge(e,e.return,R)}break;case 22:case 23:e.memoizedState===null&&Sf(e,t);break;default:Sf(e,t)}}function xf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:yp(l,a);break e;case 22:l.memoizedState===null&&xf(l,a);break e;default:xf(l,a)}}e=e.sibling}}function Sp(e){var t=e.alternate;t!==null&&(e.alternate=null,Sp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qo(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 Ze=null,Qt=!1;function xn(e,t,l){for(l=l.child;l!==null;)xp(e,t,l),l=l.sibling}function xp(e,t,l){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(Fe,l)}catch{}switch(l.tag){case 26:Le||xt(l,t),xn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Le&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Le||xt(l,t),Fs(l);var a=Ze,r=Qt;Ul(l.type)&&(Ze=l.stateNode,Qt=!1),xn(e,t,l),wv(l.stateNode,l.type,l.memoizedProps),Ze=a,Qt=r;break;case 5:Le||xt(l,t),Fs(l);case 6:if(l.tag===6&&Fs(l),a=Ze,r=Qt,Ze=null,xn(e,t,l),Ze=a,Qt=r,Ze!==null)if(Qt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(l.stateNode),Ae=!0}catch(c){Ge(l,t,c)}else try{Ze.removeChild(l.stateNode),Ae=!0}catch(c){Ge(l,t,c)}break;case 18:Ze!==null&&(Qt?(e=Ze,uv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Hi(e)):uv(Ze,l.stateNode));break;case 4:a=Ze,r=Qt,Ze=l.stateNode.containerInfo,Qt=!0,xn(e,t,l),Ze=a,Qt=r;break;case 0:case 11:case 14:case 15:Nl(2,l,t),Le||Nl(4,l,t),xn(e,t,l);break;case 1:Le||(xt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&sp(l,t,a)),xn(e,t,l);break;case 21:xn(e,t,l);break;case 22:Le=(a=Le)||l.memoizedState!==null,xn(e,t,l),Le=a;break;case 30:xt(l,t),xn(e,t,l);break;case 7:Le||xt(l,t),xn(e,t,l);break;default:xn(e,t,l)}}function bp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hi(e)}catch(l){Ge(t,t.return,l)}}}function Cp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hi(e)}catch(l){Ge(t,t.return,l)}}function lx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pp),t;default:throw Error(o(435,e.tag))}}function Vr(e,t){var l=lx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var r=gx.bind(null,e,a);a.then(r,r)}})}function Ut(e,t,l){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var c=a[r],m=e,x=t,R=x;e:for(;R!==null;){switch(R.tag){case 27:if(Ul(R.type)){Ze=R.stateNode,Qt=!1;break e}break;case 5:Ze=R.stateNode,Qt=!1;break e;case 3:case 4:Ze=R.stateNode.containerInfo,Qt=!0;break e}R=R.return}if(Ze===null)throw Error(o(160));xp(m,x,c),Ze=null,Qt=!1,m=c.alternate,m!==null&&(m.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ep(t,e,l),t=t.sibling}var bn=null;function Ep(e,t,l){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var m=a[c];m.ref.impl=m.nextImpl}Ut(t,e,l),Ht(e),r&4&&(Nl(3,e,e.return),Vs(3,e),Nl(5,e,e.return));break;case 1:Ut(t,e,l),Ht(e),r&512&&(Le||a===null||xt(a,a.return)),r&64&&ht&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=bn,Ut(t,e,l),Ht(e),r&512&&(Le||a===null||xt(a,a.return)),r&4)if(r=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(ht)e.stateNode=sv(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,r=c.ownerDocument||c;t:switch(t){case"title":a=r.getElementsByTagName("title")[0],(!a||a[ds]||a[pt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=r.createElement(t),r.head.insertBefore(a,r.querySelector("head > title"))),bt(a,t,l),a[pt]=e,ft(a),t=a;break e;case"link":if(c=jv("link","href",r).get(t+(l.href||""))){for(m=0;m<c.length;m++)if(a=c[m],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(m,1);break t}}a=r.createElement(t),bt(a,t,l),r.head.appendChild(a);break;case"meta":if(c=jv("meta","content",r).get(t+(l.content||""))){for(m=0;m<c.length;m++)if(a=c[m],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(m,1);break t}}a=r.createElement(t),bt(a,t,l),r.head.appendChild(a);break;default:throw Error(o(468,t))}a[pt]=e,ft(a),t=a}e.stateNode=t}else ht||ad(c,e.type,e.stateNode);else e.stateNode=Mv(c,l,e.memoizedProps);else r!==l?(r===null?(t=a.stateNode,t===null||Le||t.parentNode.removeChild(t)):r.count--,l===null?ht||ad(c,e.type,e.stateNode):Mv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&uf(e,e.memoizedProps,a.memoizedProps);break;case 27:Ut(t,e,l),Ht(e),r&512&&(Le||a===null||xt(a,a.return)),a!==null&&r&4&&uf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=Hn,Hn=!1,Ut(t,e,l),Hn=c,Ht(e),r&512&&(Le||a===null||xt(a,a.return)),e.flags&32){t=e.stateNode;try{Wa(t,""),Ae=!0}catch(F){Ge(e,e.return,F)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,uf(e,t,a!==null?a.memoizedProps:t)),r&1024&&(vf=!0);break;case 6:if(Ut(t,e,l),Ht(e),r&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Ae=!0}catch(F){Ge(e,e.return,F)}}break;case 3:if(Ae=!1,Wr=null,c=bn,bn=Ks(t.containerInfo),Ut(t,e,l),bn=c,Ht(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Hi(t.containerInfo)}catch(F){Ge(e,e.return,F)}vf&&(vf=!1,wp(e)),Ae=!1;break;case 4:r=Hn,Hn=ht,a=$h(),c=bn,bn=Ks(e.stateNode.containerInfo),Ut(t,e,l),Ht(e),bn=c,Ae&&Bs&&(Hr=!0),Ae=a,Hn=r;break;case 12:Ut(t,e,l),Ht(e);break;case 31:Ut(t,e,l),Ht(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vr(e,t)));break;case 13:Ut(t,e,l),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gr=Rt()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vr(e,t)));break;case 22:c=e.memoizedState!==null,m=a!==null&&a.memoizedState!==null;var x=ht,R=Le,H=Hn;ht=x||c,Hn=H||c,Le=R||m,Ut(t,e,l),Le=R,Hn=H,ht=x,Ht(e),r&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||m||ht||Le||(t=m||Le,l=ht,a=Le,ht=c||ht,Le=t,Ml(e,2),ht=l,Le=a),!c&&Hn||Sf(e,c)),r&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Vr(e,l))));break;case 19:Ut(t,e,l),Ht(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vr(e,t)));break;case 30:r&512&&(Le||a===null||xt(a,a.return)),r=$h(),c=Bs,m=(l&335544064)===l,x=e.memoizedProps,Bs=m&&Pn(x.default,x.update)!=="none",Ut(t,e,l),Ht(e),m&&a!==null&&Ae&&(e.flags|=4),Bs=c,Ae=r;break;case 21:break;case 7:r&512&&(Le||a===null||xt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Ut(t,e,l),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(rp(a)){l=a;break}a=a.return}a=null;for(var r=e.return;r!==null;){if(of(r)){var c=r.stateNode;a===null?a=[c]:a.push(c)}if(sf(r))break;r=r.return}var m=a;if(l==null)throw Error(o(160));switch(l.tag){case 27:var x=l.stateNode,R=cf(e);Or(e,R,x,m);break;case 5:var H=l.stateNode;l.flags&32&&(Wa(H,""),l.flags&=-33);var F=cf(e);Or(e,F,H,m);break;case 3:case 4:var $=l.stateNode.containerInfo,D=cf(e);ff(e,D,$,m);break;default:throw Error(o(161))}}catch(V){Ge(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wp(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ui=!0,t.reset(),Ui=!1),e=e.sibling}}function yi(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)_p(t,e),t=t.sibling;else gp(t)}function _p(e,t){var l=e.alternate;if(l===null)df(e,!1);else switch(e.tag){case 3:if(yf=Ln=!1,fp(),yi(t,e),!Ln&&!Hr){if(e=Dn,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var r=e[a+1];dv(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),yf=!0}Dn=null;break;case 5:yi(t,e);break;case 4:a=Ln,Ln=!1,yi(t,e),Ln&&(Hr=!0),Ln=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?df(e,!1):yi(t,e));break;case 30:a=Ln,r=fp(),Ln=!1,yi(t,e),Ln&&(e.flags|=4);var c=e.memoizedProps,m=e.stateNode;t=Zn(c,m),m=Zn(l.memoizedProps,m);var x=Pn(c.default,c.update);x==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,$t=0,t=pf(e,l,t,m,x,c,!0),$t!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(_i(e,e.memoizedProps.onUpdate),Dn=r):r!==null&&(r.push.apply(r,Dn),Dn=r),Ln=(e.flags&32)!==0?!0:a;break;default:yi(t,e)}}function Vn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vp(e,t.alternate,t),t=t.sibling}function Ml(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Nl(4,l,l.return),Ml(l,a);break;case 1:xt(l,l.return);var r=l.stateNode;typeof r.componentWillUnmount=="function"&&sp(l,l.return,r),Ml(l,a);break;case 27:(a&2)!==0&&wv(l.stateNode,l.type,l.memoizedProps);case 5:xt(l,l.return),l.tag!==5&&l.tag!==27||Fs(l),Ml(l,a);break;case 6:Fs(l);break;case 26:xt(l,l.return),r=l.stateNode,l.memoizedState!==null||r===null||Le||r.parentNode.removeChild(r),Ml(l,a);break;case 22:l.memoizedState===null&&Ml(l,a);break;case 30:xt(l,l.return),Ml(l,a);break;case 7:xt(l,l.return);default:Ml(l,a)}e=e.sibling}}function Cn(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,r=e,c=t,m=c.flags,x=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Cn(r,c,l),Vs(4,c);break;case 1:if(Cn(r,c,l),a=c,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(F){Ge(a,a.return,F)}if(a=c,r=a.updateQueue,r!==null){var R=a.stateNode;try{var H=r.shared.hiddenCallbacks;if(H!==null)for(r.shared.hiddenCallbacks=null,r=0;r<H.length;r++)Im(H[r],R)}catch(F){Ge(a,a.return,F)}}x&&m&64&&ip(c),zn(c,c.return);break;case 27:(l&2)!==0&&up(c);case 5:c.tag!==5&&c.tag!==27||op(c),Cn(r,c,l),x&&a===null&&m&4&&rf(c),zn(c,c.return);break;case 6:op(c);break;case 26:R=c.stateNode,c.memoizedState!==null||R===null||ht||ad(Ks(R.ownerDocument),c.type,R),Cn(r,c,l),x&&a===null&&m&4&&rf(c),zn(c,c.return);break;case 12:Cn(r,c,l);break;case 31:Cn(r,c,l),x&&m&4&&bp(r,c);break;case 13:Cn(r,c,l),x&&m&4&&Cp(r,c);break;case 22:c.memoizedState===null&&Cn(r,c,l),zn(c,c.return);break;case 30:Cn(r,c,l),zn(c,c.return);break;case 7:zn(c,c.return);default:Cn(r,c,l)}t=t.sibling}}function bf(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&_s(l))}function Cf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_s(e))}function mn(e,t,l,a){var r=(l&335544064)===l;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)Rp(e,t,l,a),t=t.sibling;else r&&mp(t)}function Rp(e,t,l,a){var r=(l&335544064)===l;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ur(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:mn(e,t,l,a),c&2048&&Vs(9,t);break;case 1:mn(e,t,l,a);break;case 3:mn(e,t,l,a),r&&yf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&_s(c)));break;case 12:if(c&2048){mn(e,t,l,a),c=t.stateNode;try{var m=t.memoizedProps,x=m.id,R=m.onPostCommit;typeof R=="function"&&R(x,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(H){Ge(t,t.return,H)}}else mn(e,t,l,a);break;case 31:mn(e,t,l,a);break;case 13:mn(e,t,l,a);break;case 23:break;case 22:m=t.stateNode,x=t.alternate,t.memoizedState!==null?(r&&x!==null&&x.memoizedState===null&&Ur(x),m._visibility&2?mn(e,t,l,a):Gs(e,t)):(r&&x!==null&&x.memoizedState!==null&&Ur(t),m._visibility&2?mn(e,t,l,a):(m._visibility|=2,Si(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&bf(x,t);break;case 24:mn(e,t,l,a),c&2048&&Cf(t.alternate,t);break;case 30:r&&(c=t.alternate,c!==null&&(Un(c.child,!0),Un(t.child,!0))),mn(e,t,l,a);break;default:mn(e,t,l,a)}}function Si(e,t,l,a,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,m=t,x=l,R=a,H=m.flags;switch(m.tag){case 0:case 11:case 15:Si(c,m,x,R,r),Vs(8,m);break;case 23:break;case 22:var F=m.stateNode;m.memoizedState!==null?F._visibility&2?Si(c,m,x,R,r):Gs(c,m):(F._visibility|=2,Si(c,m,x,R,r)),r&&H&2048&&bf(m.alternate,m);break;case 24:Si(c,m,x,R,r),r&&H&2048&&Cf(m.alternate,m);break;default:Si(c,m,x,R,r)}t=t.sibling}}function Gs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,r=a.flags;switch(a.tag){case 22:Gs(l,a),r&2048&&bf(a.alternate,a);break;case 24:Gs(l,a),r&2048&&Cf(a.alternate,a);break;default:Gs(l,a)}t=t.sibling}}var Ra=8192;function Ta(e,t,l){if(e.subtreeFlags&Ra)for(e=e.child;e!==null;)Tp(e,t,l),e=e.sibling}function Tp(e,t,l){switch(e.tag){case 26:Ta(e,t,l),e.flags&Ra&&(e.memoizedState!==null?ub(l,bn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Dv(l,e)));break;case 5:Ta(e,t,l),e.flags&Ra&&(e=e.stateNode,(t&335544128)===t&&Dv(l,e));break;case 3:case 4:var a=bn;bn=Ks(e.stateNode.containerInfo),Ta(e,t,l),bn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ra,Ra=16777216,Ta(e,t,l),Ra=a):Ta(e,t,l));break;case 30:if((e.flags&Ra)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var r=e.stateNode;r.paired=null,Wt===null&&(Wt=new Map),Wt.set(a,r)}Ta(e,t,l);break;default:Ta(e,t,l)}}function Np(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 qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];mt=a,jp(a,e)}Np(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mp(e),e=e.sibling}function Mp(e){switch(e.tag){case 0:case 11:case 15:qs(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:qs(e);break;case 12:qs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fr(e)):qs(e);break;default:qs(e)}}function Fr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];mt=a,jp(a,e)}Np(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nl(8,t,t.return),Fr(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Fr(t));break;default:Fr(t)}e=e.sibling}}function jp(e,t){for(;mt!==null;){var l=mt;switch(l.tag){case 0:case 11:case 15:Nl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:_s(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,mt=a;else e:for(l=e;mt!==null;){a=mt;var r=a.sibling,c=a.return;if(Sp(a),a===l){mt=null;break e}if(r!==null){r.return=c,mt=r;break e}mt=c}}}var ax={getCacheForType:function(e){var t=vt(at),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return vt(at).controller.signal}},ix=typeof WeakMap=="function"?WeakMap:Map,De=0,$e=null,xe=null,Ce=0,Be=0,en=null,jl=!1,xi=!1,Ef=!1,sl=0,nt=0,Al=0,Na=0,Br=0,tn=0,bi=0,ks=null,Yt=null,wf=!1,Gr=0,Ap=0,qr=1/0,kr=null,Ol=null,Je=0,En=null,Ma=null,Fn=0,_f=0,Rf=null,Op=null,Ci=null,Ei=null,wi=null,$s=0,$r=null;function nn(){return(De&2)!==0&&Ce!==0?Ce&-Ce:ne.T!==null?Hf():Uh()}function zp(){if(tn===0)if((Ce&536870912)===0||ve){var e=Vo;Vo<<=1,(Vo&3932160)===0&&(Vo=262144),tn=e}else tn=536870912;return e=yt.current,e!==null&&(e.flags|=32),tn}function _i(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=hv(Zn(e.memoizedProps,l))),Ei===null&&(Ei=[]),Ei.push(t.bind(null,a))}}function It(e,t,l){(e===$e&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Ri(e,0),zl(e,Ce,tn,!1)),fs(e,l),((De&2)===0||e!==$e)&&(e===$e&&((De&2)===0&&(Na|=l),nt===4&&zl(e,Ce,tn,!1)),Bn(e))}function Dp(e,t,l){if((De&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||cs(e,t),r=a?rx(e,t):Nf(e,t,!0),c=a;do{if(r===0){xi&&!a&&zl(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!sx(l)){r=Nf(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var x=e;r=ks;var R=x.current.memoizedState.isDehydrated;if(R&&(Ri(x,m).flags|=256),m=Nf(x,m,!1),m!==2&&m!==6){if(Ef&&!R){x.errorRecoveryDisabledLanes|=c,Na|=c,r=4;break e}c=Yt,Yt=r,c!==null&&(Yt===null?Yt=c:Yt.push.apply(Yt,c))}r=m}if(c=!1,r!==2)continue}}if(r===1){Ri(e,0),zl(e,t,0,!0);break}e:{switch(a=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:zl(a,t,tn,!jl);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=Gr+300-Rt(),10<r)){if(zl(a,t,tn,!jl),Bo(a,0,!0)!==0)break e;Fn=t,a.timeoutHandle=If(Up.bind(null,a,l,Yt,kr,wf,t,tn,Na,bi,jl,c,"Throttled",-0,0),r);break e}Up(a,l,Yt,kr,wf,t,tn,Na,bi,jl,c,null,-0,0)}}break}while(!0);Bn(e)}function Up(e,t,l,a,r,c,m,x,R,H,F,$,D,V){e.timeoutHandle=-1;var X=t.subtreeFlags,le=(c&335544064)===c;if($=null,(le||X&8192||(X&16785408)===16785408)&&($={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},Wt=null,Tp(t,c,$),le&&(X=$,le=e.containerInfo,le=(le.nodeType===9?le:le.ownerDocument).__reactViewTransition,le!=null&&(X.count++,X.waitingForViewTransition=!0,X=Js.bind(X),le.finished.then(X,X))),X=(c&62914560)===c?Gr-Rt():(c&4194048)===c?Ap-Rt():0,X=cb($,X),X!==null)){Fn=c,e.cancelPendingCommit=X(kp.bind(null,e,t,c,l,a,r,m,x,R,H,F,$,null,D,V)),zl(e,c,m,!H);return}kp(e,t,c,l,a,r,m,x,R,H,F,$)}function sx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var r=l[a],c=r.getSnapshot;r=r.value;try{if(!Pt(c(),r))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 zl(e,t,l,a){t=jh(e,t),t&=~Br,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var c=31-Ot(r),m=1<<c;a[c]=-1,r&=~m}l!==0&&Oh(e,l,t)}function Qr(){return(De&6)===0?(Qs(0),!1):!0}function Tf(){if(xe!==null){if(Be===0)var e=xe.return;else e=xe,el=pa=null,Dc(e),di=null,Ns=0,e=xe;for(;e!==null;)ap(e.alternate,e),e=e.return;xe=null}}function Ri(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,jx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Fn=0,Tf(),$e=e,xe=l=Jn(e.current,null),Ce=t,Be=0,en=null,jl=!1,xi=cs(e,t),Ef=!1,bi=tn=Br=Na=Al=nt=0,Yt=ks=null,wf=!1,sl=jh(e,t),Wo(),l}function Hp(e,t){ge=null,ne.H=wr,t===fi||t===cr?(t=km(),Be=3):t===bc?(t=km(),Be=4):Be=t===Kc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,en=t,xe===null&&(nt=1,_r(e,cn(t,e.current)))}function Lp(){var e=yt.current;return e===null?!0:(Ce&4194048)===Ce?Tt===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===Tt:!1}function Vp(){var e=ne.H;return ne.H=wr,e===null?wr:e}function Fp(){var e=ne.A;return ne.A=ax,e}function Yr(){nt=4,jl||(Ce&4194048)!==Ce&&yt.current!==null||(xi=!0),(Al&134217727)===0&&(Na&134217727)===0||$e===null||zl($e,Ce,tn,!1)}function Nf(e,t,l){var a=De;De|=2;var r=Vp(),c=Fp();($e!==e||Ce!==t)&&(kr=null,Ri(e,t)),t=!1;var m=nt;e:do try{if(Be!==0&&xe!==null){var x=xe,R=en;switch(Be){case 8:Tf(),m=6;break e;case 3:case 2:case 9:case 6:yt.current===null&&(t=!0);var H=Be;if(Be=0,en=null,Ti(e,x,R,H),l&&xi){m=0;break e}break;default:H=Be,Be=0,en=null,Ti(e,x,R,H)}}ox(),m=nt;break}catch(F){Hp(e,F)}while(!0);return t&&e.shellSuspendCounter++,el=pa=null,De=a,ne.H=r,ne.A=c,xe===null&&($e=null,Ce=0,Wo()),m}function ox(){for(;xe!==null;)Bp(xe)}function rx(e,t){var l=De;De|=2;var a=Vp(),r=Fp();$e!==e||Ce!==t?(kr=null,qr=Rt()+500,Ri(e,t)):xi=cs(e,t);e:do try{if(Be!==0&&xe!==null){t=xe;var c=en;t:switch(Be){case 1:Be=0,en=null,Ti(e,t,c,1);break;case 2:case 9:if(Gm(c)){Be=0,en=null,Gp(t);break}t=function(){Be!==2&&Be!==9||$e!==e||(Be=7),Bn(e)},c.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Gm(c)?(Be=0,en=null,Gp(t)):(Be=0,en=null,Ti(e,t,c,7));break;case 5:var m=null;switch(xe.tag){case 26:m=xe.memoizedState;case 5:case 27:var x=xe;if(m?Ov(m):x.stateNode.complete){Be=0,en=null;var R=x.sibling;if(R!==null)xe=R;else{var H=x.return;H!==null?(xe=H,Ir(H)):xe=null}break t}}Be=0,en=null,Ti(e,t,c,5);break;case 6:Be=0,en=null,Ti(e,t,c,6);break;case 8:Tf(),nt=6;break e;default:throw Error(o(462))}}ux();break}catch(F){Hp(e,F)}while(!0);return el=pa=null,ne.H=a,ne.A=r,De=l,xe!==null?0:($e=null,Ce=0,Wo(),nt)}function ux(){for(;xe!==null&&!Oo();)Bp(xe)}function Bp(e){var t=np(e.alternate,e,sl);e.memoizedProps=e.pendingProps,t===null?Ir(e):xe=t}function Gp(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Kg(l,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=Kg(l,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:Dc(t);var a=t;a===dt&&(ve?(ir(a),a.tag===5&&a.stateNode!=null&&(Qe=a.stateNode)):(ir(a),ve=!0));default:ap(l,t),t=xe=jm(t,sl),t=np(l,t,sl)}e.memoizedProps=e.pendingProps,t===null?Ir(e):xe=t}function Ti(e,t,l,a){el=pa=null,Dc(t),di=null,Ns=0;var r=t.return;try{if(ZS(e,r,t,l,Ce)){nt=1,_r(e,cn(l,e.current)),xe=null;return}}catch(c){if(r!==null)throw xe=r,c;nt=1,_r(e,cn(l,e.current)),xe=null;return}t.flags&32768?(ve||a===1?e=!0:xi||(Ce&536870912)!==0?e=!1:(jl=e=!0,(a===2||a===9||a===3||a===6)&&(a=yt.current,a!==null&&a.tag===13&&(a.flags|=16384))),qp(t,e)):Ir(t)}function Ir(e){var t=e;do{if((t.flags&32768)!==0){qp(t,jl);return}e=t.return;var l=ex(t.alternate,t,sl);if(l!==null){xe=l;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);nt===0&&(nt=5)}function qp(e,t){do{var l=tx(e.alternate,e);if(l!==null){l.flags&=32767,xe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=l}while(e!==null);nt=6,xe=null}function kp(e,t,l,a,r,c,m,x,R,H,F,$){e.cancelPendingCommit=null;do Xr();while(Je!==0);if((De&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===$e&&(xe=$e=null,Ce=0),Ma=t,En=e,Fn=l,Rf=r,Op=a,cx(e,t,l,m,x,R,$)}}function cx(e,t,l,a,r,c,m){var x=t.lanes|t.childLanes;if(_f=x,x|=rc,H1(e,l,x,a,r,c),Ei=null,(l&335544064)===l?(wi=VS(e),a=10262):(wi=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,px(oa,function(){return Of(),null})):(e.callbackNode=null,e.callbackPriority=0),zr=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ne.T,ne.T=null,r=ue.p,ue.p=2,c=De,De|=4;try{nx(e,t,l)}finally{De=c,ue.p=r,ne.T=a}}Je=1,zr?Ci=Hx(m,e.containerInfo,wi,Mf,jf,dx,Af,Of,fx):(Mf(),jf(),Af())}function fx(e){if(Je!==0){var t=En.onRecoverableError;t(e,{componentStack:null})}}function dx(){Je===3&&(Je=0,_p(Ma,En),Je=4)}function Mf(){if(Je===1){Je=0;var e=En,t=Ma,l=Fn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=ne.T,ne.T=null;var r=ue.p;ue.p=2;var c=De;De|=4;try{Bs=Hr=!1,Ep(t,e,l),l=$f;var m=xm(e.containerInfo),x=l.focusedElem,R=l.selectionRange;if(m!==x&&x&&x.ownerDocument&&Sm(x.ownerDocument.documentElement,x)){if(R!==null&&lc(x)){var H=R.start,F=R.end;if(F===void 0&&(F=H),"selectionStart"in x)x.selectionStart=H,x.selectionEnd=Math.min(F,x.value.length);else{var $=x.ownerDocument||document,D=$&&$.defaultView||window;if(D.getSelection){var V=D.getSelection(),X=x.textContent.length,le=Math.min(R.start,X),pe=R.end===void 0?le:Math.min(R.end,X);!V.extend&&le>pe&&(m=pe,pe=le,le=m);var U=ym(x,le),M=ym(x,pe);if(U&&M&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var L=$.createRange();L.setStart(U.node,U.offset),V.removeAllRanges(),le>pe?(V.addRange(L),V.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),V.addRange(L))}}}}for($=[],V=x;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<$.length;x++){var k=$[x];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Ui=!!kf,$f=kf=null}finally{De=c,ue.p=r,ne.T=a}}e.current=t,Je=2}}function jf(){if(Je===2){Je=0;var e=En,t=Ma,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=ne.T,ne.T=null;var a=ue.p;ue.p=2;var r=De;De|=4;try{vp(e,t.alternate,t)}finally{De=r,ue.p=a,ne.T=l}}Je=3}}function Af(){if(Je===4||Je===3){Je=0;var e=Ci;Ci=null,zo();var t=En,l=Ma,a=Fn,r=Op,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?Je=5:(Je=0,Ma=En=null,$p(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Ol=null),Fu(a),l=l.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(Fe,l,void 0,(l.current.flags&128)===128)}catch{}if(r!==null){l=ne.T,c=ue.p,ue.p=2,ne.T=null;try{for(var m=t.onRecoverableError,x=0;x<r.length;x++){var R=r[x];m(R.value,{componentStack:R.stack})}}finally{ne.T=l,ue.p=c}}if(r=Ei,m=wi,wi=null,r!==null&&(Ei=null,m===null&&(m=[]),e!==null))for(R=0;R<r.length;R++)l=(0,r[R])(m),l!==void 0&&e.finished.finally(l);(Fn&3)!==0&&Xr(),Bn(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===$r?$s++:($s=0,$r=t):($s=0,$r=null),Qs(0)}}function $p(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_s(t)))}function Xr(){return Ci!==null&&(Ci.skipTransition(),Ci=null),Mf(),jf(),Af(),Of()}function Of(){if(Je!==5)return!1;var e=En,t=_f;_f=0;var l=Fu(Fn),a=ne.T,r=ue.p;try{ue.p=32>l?32:l,ne.T=null,l=Rf,Rf=null;var c=En,m=Fn;if(Je=0,Ma=En=null,Fn=0,(De&6)!==0)throw Error(o(331));var x=De;if(De|=4,Mp(c.current),Rp(c,c.current,m,l),De=x,Qs(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(Fe,c)}catch{}return!0}finally{ue.p=r,ne.T=a,$p(e,t)}}function Qp(e,t,l){t=cn(l,t),t=Xc(e.stateNode,t,2),e=wl(e,t,2),e!==null&&(fs(e,2),Bn(e))}function Ge(e,t,l){if(e.tag===3)Qp(e,e,l);else for(;t!==null;){if(t.tag===3){Qp(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ol===null||!Ol.has(a))){e=cn(l,e),l=Gg(2),a=wl(t,l,2),a!==null&&(qg(l,a,t,e),fs(a,2),Bn(a));break}}t=t.return}}function zf(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new ix;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(l)||(Ef=!0,r.add(l),e=hx.bind(null,e,t,l),t.then(e,e))}function hx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Ce&l)===l&&((nt===4||nt===3&&(Ce&62914560)===Ce&&300>Rt()-Gr)&&(De&2)===0?Ri(e,0):Br|=l,bi===Ce&&(bi=0)),Bn(e)}function Yp(e,t){t===0&&(t=Ah()),e=ha(e,t),e!==null&&(fs(e,t),Bn(e))}function mx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Yp(e,l)}function gx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Yp(e,l)}function px(e,t){return Qa(e,t)}var Ni=null,Mi=null,Df=!1,Kr=!1,Uf=!1,Dl=0;function Bn(e){e!==Mi&&e.next===null&&(Mi===null?Ni=Mi=e:Mi=Mi.next=e),Kr=!0,Df||(Df=!0,yx())}function Qs(e,t){if(!Uf&&Kr){Uf=!0;do for(var l=!1,a=Ni;a!==null;){if(e!==0){var r=a.pendingLanes;if(r===0)var c=0;else{var m=a.suspendedLanes,x=a.pingedLanes;c=(1<<31-Ot(42|e)+1)-1,c&=r&~(m&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,Zp(a,c))}else c=Ce,c=Bo(a,a===$e?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||cs(a,c)||(l=!0,Zp(a,c));a=a.next}while(l);Uf=!1}}function vx(){Ip()}function Ip(){Kr=Df=!1;var e=0;Dl!==0&&Mx()&&(e=Dl);for(var t=Rt(),l=null,a=Ni;a!==null;){var r=a.next,c=Xp(a,t);c===0?(a.next=null,l===null?Ni=r:l.next=r,r===null&&(Mi=l)):(l=a,(e!==0||(c&3)!==0)&&(Kr=!0)),a=r}Je!==0&&Je!==5||Qs(e),Dl!==0&&(Dl=0)}function Xp(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var m=31-Ot(c),x=1<<m,R=r[m];R===-1?((x&l)===0||(x&a)!==0)&&(r[m]=U1(x,t)):R<=t&&(e.expiredLanes|=x),c&=~x}if(t=$e,l=Ce,l=Bo(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ya(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||cs(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ya(a),Fu(l)){case 2:case 8:l=rs;break;case 32:l=oa;break;case 268435456:l=us;break;default:l=oa}return a=Kp.bind(null,e),l=Qa(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ya(a),e.callbackPriority=2,e.callbackNode=null,2}function Kp(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Xr()&&e.callbackNode!==l)return null;var a=Ce;return a=Bo(e,e===$e?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Dp(e,a,t),Xp(e,Rt()),e.callbackNode!=null&&e.callbackNode===l?Kp.bind(null,e):null)}function Zp(e,t){if(Xr())return null;Dp(e,t,!0)}function yx(){Ax(function(){(De&6)!==0?Qa(os,vx):Ip()})}function Hf(){if(Dl===0){var e=Sa;e===0&&(e=Ia,Ia<<=1,(Ia&261888)===0&&(Ia=256)),Dl=e}return Dl}function Pp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Qo(e)}function Sx(e,t,l,a,r){if(t==="submit"&&l&&l.stateNode===r){var c=Pp((r[qt]||null).action),m=a.submitter;m&&(t=(t=m[qt]||null)?Pp(t.formAction):m.getAttribute("formAction"),t!==null&&(c=t,m=null));var x=new Ko("action","action",null,a,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Dl!==0){var R=new FormData(r,m);kc(l,{pending:!0,data:R,method:r.method,action:c},null,R)}}else typeof c=="function"&&(x.preventDefault(),R=new FormData(r,m),kc(l,{pending:!0,data:R,method:r.method,action:c},c,R))},currentTarget:r}]})}}for(var Lf=0;Lf<oc.length;Lf++){var Vf=oc[Lf],xx=Vf.toLowerCase(),bx=Vf[0].toUpperCase()+Vf.slice(1);Sn(xx,"on"+bx)}Sn(Em,"onAnimationEnd"),Sn(wm,"onAnimationIteration"),Sn(_m,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(jS,"onTransitionRun"),Sn(AS,"onTransitionStart"),Sn(OS,"onTransitionCancel"),Sn(Rm,"onTransitionEnd"),Pa("onMouseEnter",["mouseout","mouseover"]),Pa("onMouseLeave",["mouseout","mouseover"]),Pa("onPointerEnter",["pointerout","pointerover"]),Pa("onPointerLeave",["pointerout","pointerover"]),ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),Cx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function Jp(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],r=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var m=a.length-1;0<=m;m--){var x=a[m],R=x.instance,H=x.currentTarget;if(x=x.listener,R!==c&&r.isPropagationStopped())break e;c=x,r.currentTarget=H;try{c(r)}catch(F){Jo(F)}r.currentTarget=null,c=R}else for(m=0;m<a.length;m++){if(x=a[m],R=x.instance,H=x.currentTarget,x=x.listener,R!==c&&r.isPropagationStopped())break e;c=x,r.currentTarget=H;try{c(r)}catch(F){Jo(F)}r.currentTarget=null,c=R}}}}function be(e,t){var l=t[Lh];l===void 0&&(l=t[Lh]=new Set);var a=e+"__bubble";l.has(a)||(Wp(t,e,2,!1),l.add(a))}function Ff(e,t,l){var a=0;t&&(a|=4),Wp(l,e,a,t)}var Zr="_reactListening"+Math.random().toString(36).slice(2);function Bf(e){if(!e[Zr]){e[Zr]=!0,Bh.forEach(function(l){l!=="selectionchange"&&(Cx.has(l)||Ff(l,!1,e),Ff(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zr]||(t[Zr]=!0,Ff("selectionchange",!1,t))}}function Wp(e,t,l,a){switch(qv(t)){case 2:var r=mb;break;case 8:r=gb;break;default:r=sd}l=r.bind(null,t,l,e),r=void 0,!Iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function Gf(e,t,l,a,r){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var m=a.tag;if(m===3||m===4){var x=a.stateNode.containerInfo;if(x===r)break;if(m===4)for(m=a.return;m!==null;){var R=m.tag;if((R===3||R===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;x!==null;){if(m=ua(x),m===null)return;if(R=m.tag,R===5||R===6||R===26||R===27){a=c=m;continue e}x=x.parentNode}}a=a.return}Wh(function(){var H=c,F=Qu(l),$=[];e:{var D=Tm.get(e);if(D!==void 0){var V=Ko,X=e;switch(e){case"keypress":if(Io(l)===0)break e;case"keydown":case"keyup":V=sS;break;case"focusin":X="focus",V=Pu;break;case"focusout":X="blur",V=Pu;break;case"beforeblur":case"afterblur":V=Pu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=nm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=fS;break;case Em:case wm:case _m:V=P1;break;case Rm:V=hS;break;case"scroll":case"scrollend":V=Y1;break;case"wheel":V=gS;break;case"copy":case"cut":case"paste":V=W1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=am;break;case"submit":V=uS;break;case"toggle":case"beforetoggle":V=vS}var le=(t&4)!==0,pe=!le&&(e==="scroll"||e==="scrollend"),U=le?D!==null?D+"Capture":null:D;le=[];for(var M=H,L;M!==null;){var k=M;if(L=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||L===null||U===null||(k=ms(M,U),k!=null&&le.push(Is(M,k,L))),pe)break;M=M.return}0<le.length&&(D=new V(D,X,null,l,F),$.push({event:D,listeners:le}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",V&&l!==$u&&(X=l.relatedTarget||l.fromElement)&&(ua(X)||X[Xa]))break e;(D||V)&&(X=F.window===F?F:(V=F.ownerDocument)?V.defaultView||V.parentWindow:window,D?(V=l.relatedTarget||l.toElement,D=H,V=V?ua(V):null,V!==null&&(pe=f(V),le=V.tag,V!==pe||le!==5&&le!==27&&le!==6)&&(V=null)):(D=null,V=H),D!==V&&(le=nm,k="onMouseLeave",U="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(le=am,k="onPointerLeave",U="onPointerEnter",M="pointer"),pe=D==null?X:hs(D),L=V==null?X:hs(V),X=new le(k,M+"leave",D,l,F),X.target=pe,X.relatedTarget=L,k=null,ua(F)===H&&(le=new le(U,M+"enter",V,l,F),le.target=L,le.relatedTarget=pe,k=le),pe=k,le=D&&V?K(D,V,Ex):null,D!==null&&ev($,X,D,le,!1),V!==null&&pe!==null&&ev($,pe,V,le,!0)))}e:{if(D=H?hs(H):window,V=D.nodeName&&D.nodeName.toLowerCase(),V==="select"||V==="input"&&D.type==="file")var ee=dm;else if(cm(D))if(hm)ee=TS;else{ee=_S;var Ee=wS}else V=D.nodeName,!V||V.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?H&&ku(H.elementType)&&(ee=dm):ee=RS;if(ee&&(ee=ee(e,H))){fm($,ee,l,F);break e}Ee&&Ee(e,D,H)}switch(Ee=H?hs(H):window,e){case"focusin":(cm(Ee)||Ee.contentEditable==="true")&&(li=Ee,ac=H,Cs=null);break;case"focusout":Cs=ac=li=null;break;case"mousedown":ic=!0;break;case"contextmenu":case"mouseup":case"dragend":ic=!1,bm($,l,F);break;case"selectionchange":if(MS)break;case"keydown":case"keyup":bm($,l,F)}var re;if(Wu)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else ni?rm(e,l)&&(fe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(fe="onCompositionStart");fe&&(im&&l.locale!=="ko"&&(ni||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&ni&&(re=em()):(gl=F,Xu="value"in gl?gl.value:gl.textContent,ni=!0)),Ee=Pr(H,fe),0<Ee.length&&(fe=new lm(fe,e,null,l,F),$.push({event:fe,listeners:Ee}),re?fe.data=re:(re=um(l),re!==null&&(fe.data=re)))),(re=SS?xS(e,l):bS(e,l))&&(fe=Pr(H,"onBeforeInput"),0<fe.length&&(Ee=new lm("onBeforeInput","beforeinput",null,l,F),$.push({event:Ee,listeners:fe}),Ee.data=re)),Sx($,e,H,l,F)}Jp($,t)})}function Is(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Pr(e,t){for(var l=t+"Capture",a=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=ms(e,l),r!=null&&a.unshift(Is(e,r,c)),r=ms(e,t),r!=null&&a.push(Is(e,r,c))),e.tag===3)return a;e=e.return}return[]}function Ex(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ev(e,t,l,a,r){for(var c=t._reactName,m=[];l!==null&&l!==a;){var x=l,R=x.alternate,H=x.stateNode;if(x=x.tag,R!==null&&R===a)break;x!==5&&x!==26&&x!==27||H===null||(R=H,r?(H=ms(l,c),H!=null&&m.unshift(Is(l,H,R))):r||(H=ms(l,c),H!=null&&m.push(Is(l,H,R)))),l=l.return}m.length!==0&&e.push({event:t,listeners:m})}var wx=/\r\n?/g,_x=/\u0000|\uFFFD/g;function tv(e){return(typeof e=="string"?e:""+e).replace(wx,`
49
- `).replace(_x,"")}function nv(e,t){return t=tv(t),tv(e)===t}function qe(e,t,l,a,r,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||Wa(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&Wa(e,""+a);else return;break;case"className":$o(e,"class",a);break;case"tabIndex":$o(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":$o(e,l,a);break;case"style":Ph(e,a,c);return;case"data":if(t!=="object"){$o(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Qo(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 c=="function"&&(l==="formAction"?(t!=="input"&&qe(e,t,"name",r.name,r,null),qe(e,t,"formEncType",r.formEncType,r,null),qe(e,t,"formMethod",r.formMethod,r,null),qe(e,t,"formTarget",r.formTarget,r,null)):(qe(e,t,"encType",r.encType,r,null),qe(e,t,"method",r.method,r,null),qe(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Qo(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=jn);return;case"onScroll":a!=null&&be("scroll",e);return;case"onScrollEnd":a!=null&&be("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(r.children!=null)throw Error(o(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Qo(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":be("beforetoggle",e),be("toggle",e),ko(e,"popover",a);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ko(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=$1.get(l)||l,ko(e,l,a);else return}Ae=!0}function qf(e,t,l,a,r,c){switch(l){case"style":Ph(e,a,c);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(r.children!=null)throw Error(o(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")Wa(e,a);else if(typeof a=="number"||typeof a=="bigint")Wa(e,""+a);else return;break;case"onScroll":a!=null&&be("scroll",e);return;case"onScrollEnd":a!=null&&be("scrollend",e);return;case"onClick":a!=null&&(e.onclick=jn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Gh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),c=l.slice(2,r?l.length-7:void 0),t=e[qt]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,r),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,r);break e}Ae=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):ko(e,l,a)}return}Ae=!0}function bt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var a=!1,r=!1,c;for(c in l)if(l.hasOwnProperty(c)){var m=l[c];if(m!=null)switch(c){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,c,m,l,null)}}r&&qe(e,t,"srcSet",l.srcSet,l,null),a&&qe(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var x=c=m=r=null,R=null,H=null;for(a in l)if(l.hasOwnProperty(a)){var F=l[a];if(F!=null)switch(a){case"name":r=F;break;case"type":m=F;break;case"checked":R=F;break;case"defaultChecked":H=F;break;case"value":c=F;break;case"defaultValue":x=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(o(137,t));break;default:qe(e,t,a,F,l,null)}}Ih(e,c,x,R,H,m,r,!1);return;case"select":be("invalid",e),a=m=c=null;for(r in l)if(l.hasOwnProperty(r)&&(x=l[r],x!=null))switch(r){case"value":c=x;break;case"defaultValue":m=x;break;case"multiple":a=x;default:qe(e,t,r,x,l,null)}t=c,l=m,e.multiple=!!a,t!=null?Ja(e,!!a,t,!1):l!=null&&Ja(e,!!a,l,!0);return;case"textarea":be("invalid",e),c=r=a=null;for(m in l)if(l.hasOwnProperty(m)&&(x=l[m],x!=null))switch(m){case"value":a=x;break;case"defaultValue":r=x;break;case"children":c=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:qe(e,t,m,x,l,null)}Kh(e,a,r,c);return;case"option":for(R in l)if(l.hasOwnProperty(R)&&(a=l[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:qe(e,t,R,a,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(a=0;a<Ys.length;a++)be(Ys[a],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("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(H in l)if(l.hasOwnProperty(H)&&(a=l[H],a!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,H,a,l,null)}return;default:if(ku(t)){for(F in l)l.hasOwnProperty(F)&&(a=l[F],a!==void 0&&qf(e,t,F,a,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(a=l[x],a!=null&&qe(e,t,x,a,l,null))}var Rx={};function Tx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,m=null,x=null,R=null,H=null,F=null;for(V in l){var $=l[V];if(l.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":R=$;default:a.hasOwnProperty(V)||qe(e,t,V,null,a,$)}}for(var D in a){var V=a[D];if($=l[D],a.hasOwnProperty(D)&&(V!=null||$!=null))switch(D){case"type":V!==$&&(Ae=!0),c=V;break;case"name":V!==$&&(Ae=!0),r=V;break;case"checked":V!==$&&(Ae=!0),H=V;break;case"defaultChecked":V!==$&&(Ae=!0),F=V;break;case"value":V!==$&&(Ae=!0),m=V;break;case"defaultValue":V!==$&&(Ae=!0),x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==$&&qe(e,t,D,V,a,$)}}Gu(e,m,x,R,H,F,c,r);return;case"select":V=m=x=D=null;for(c in l)if(R=l[c],l.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":V=R;default:a.hasOwnProperty(c)||qe(e,t,c,null,a,R)}for(r in a)if(c=a[r],R=l[r],a.hasOwnProperty(r)&&(c!=null||R!=null))switch(r){case"value":c!==R&&(Ae=!0),D=c;break;case"defaultValue":c!==R&&(Ae=!0),x=c;break;case"multiple":c!==R&&(Ae=!0),m=c;default:c!==R&&qe(e,t,r,c,a,R)}t=x,l=m,a=V,D!=null?Ja(e,!!l,D,!1):!!a!=!!l&&(t!=null?Ja(e,!!l,t,!0):Ja(e,!!l,l?[]:"",!1));return;case"textarea":V=D=null;for(x in l)if(r=l[x],l.hasOwnProperty(x)&&r!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:qe(e,t,x,null,a,r)}for(m in a)if(r=a[m],c=l[m],a.hasOwnProperty(m)&&(r!=null||c!=null))switch(m){case"value":r!==c&&(Ae=!0),D=r;break;case"defaultValue":r!==c&&(Ae=!0),V=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&qe(e,t,m,r,a,c)}Xh(e,D,V);return;case"option":for(var X in l)if(D=l[X],l.hasOwnProperty(X)&&D!=null&&!a.hasOwnProperty(X))switch(X){case"selected":e.selected=!1;break;default:qe(e,t,X,null,a,D)}for(R in a)if(D=a[R],V=l[R],a.hasOwnProperty(R)&&D!==V&&(D!=null||V!=null))switch(R){case"selected":D!==V&&(Ae=!0),e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:qe(e,t,R,D,a,V)}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 le in l)D=l[le],l.hasOwnProperty(le)&&D!=null&&!a.hasOwnProperty(le)&&qe(e,t,le,null,a,D);for(H in a)if(D=a[H],V=l[H],a.hasOwnProperty(H)&&D!==V&&(D!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,t));break;default:qe(e,t,H,D,a,V)}return;default:if(ku(t)){for(var pe in l)D=l[pe],l.hasOwnProperty(pe)&&D!==void 0&&!a.hasOwnProperty(pe)&&qf(e,t,pe,void 0,a,D);for(F in a)D=a[F],V=l[F],!a.hasOwnProperty(F)||D===V||D===void 0&&V===void 0||qf(e,t,F,D,a,V);return}}for(var U in l)D=l[U],l.hasOwnProperty(U)&&D!=null&&!a.hasOwnProperty(U)&&qe(e,t,U,null,a,D);for($ in a)D=a[$],V=l[$],!a.hasOwnProperty($)||D===V||D==null&&V==null||qe(e,t,$,D,a,V)}function lv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Nx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var r=l[a],c=r.transferSize,m=r.initiatorType,x=r.duration;if(c&&x&&lv(m)){for(m=0,x=r.responseEnd,a+=1;a<l.length;a++){var R=l[a],H=R.startTime;if(H>x)break;var F=R.transferSize,$=R.initiatorType;F&&lv($)&&(R=R.responseEnd,m+=F*(R<x?1:(x-H)/(R-H)))}if(--a,t+=8*(c+m)/(r.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 kf=null,$f=null;function Xs(e){return e.nodeType===9?e:e.ownerDocument}function av(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 iv(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 sv(e,t,l,a){return l=Xs(l).createElement(e),l[pt]=a,l[qt]=t,bt(l,e,t),ft(l),l}function Qf(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 Yf=null;function Mx(){var e=window.event;return e&&e.type==="popstate"?e===Yf?!1:(Yf=e,!0):(Yf=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,jx=typeof clearTimeout=="function"?clearTimeout:void 0,ov=typeof Promise=="function"?Promise:void 0,rv=typeof requestAnimationFrame=="function"?requestAnimationFrame:If,Ax=typeof queueMicrotask=="function"?queueMicrotask:typeof ov<"u"?function(e){return ov.resolve(null).then(e).catch(Ox)}:If;function Ox(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function uv(e,t){var l=t,a=0;do{var r=l.nextSibling;if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(r),Hi(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")td(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,td(l);for(var c=l.firstChild;c;){var m=c.nextSibling,x=c.nodeName;c[ds]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=m}}else l==="body"&&td(e.ownerDocument.body);l=r}while(l);Hi(t)}function cv(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function fv(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var r=a=0;r<t.length;r++){var c=t[r];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function dv(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function zx(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Xf(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return zx(t,l,e)}function Dx(e){return e.documentElement.clientHeight}function Ux(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Hx(e,t,l,a,r,c,m,x,R){var H=t.nodeType===9?t:t.ownerDocument;try{var F=H.startViewTransition({update:function(){var D=H.defaultView,V=D.navigation&&D.navigation.transition,X=H.fonts.status;a();var le=[];if(X==="loaded"&&(Dx(H),H.fonts.status==="loading"&&le.push(H.fonts.ready)),X=le.length,e!==null)for(var pe=e.suspenseyImages,U=0,M=0;M<pe.length;M++){var L=pe[M];if(!L.complete){var k=L.getBoundingClientRect();if(0<k.bottom&&0<k.right&&k.top<D.innerHeight&&k.left<D.innerWidth){if(U+=zv(L),U>eu){le.length=X;break}L=new Promise(Ux.bind(L)),le.push(L)}}}if(0<le.length)return D=Promise.race([Promise.all(le),new Promise(function(ee){return setTimeout(ee,500)})]).then(r,r),(V?Promise.allSettled([V.finished,D]):D).then(c,c);if(r(),V)return V.finished.then(c,c);c()},types:l});H.__reactViewTransition=F;var $=[];return F.ready.then(function(){for(var D=H.documentElement.getAnimations({subtree:!0}),V=0;V<D.length;V++){var X=D[V],le=X.effect,pe=le.pseudoElement;if(pe!=null&&pe.startsWith("::view-transition")){$.push(X),X=le.getKeyframes();for(var U=pe=void 0,M=!0,L=0;L<X.length;L++){var k=X[L],ee=k.width;if(pe===void 0)pe=ee;else if(pe!==ee){M=!1;break}if(ee=k.height,U===void 0)U=ee;else if(U!==ee){M=!1;break}delete k.width,delete k.height,k.transform==="none"&&delete k.transform}M&&pe!==void 0&&U!==void 0&&(le.setKeyframes(X),M=getComputedStyle(le.target,le.pseudoElement),M.width!==pe||M.height!==U)&&(M=X[0],M.width=pe,M.height=U,M=X[X.length-1],M.width=pe,M.height=U,le.setKeyframes(X))}}m()},function(D){H.__reactViewTransition===F&&(H.__reactViewTransition=null);try{if(typeof D=="object"&&D!==null)switch(D.name){case"InvalidStateError":(D.message==="View transition was skipped because document visibility state is hidden."||D.message==="Skipping view transition because document visibility state has become hidden."||D.message==="Skipping view transition because viewport size changed."||D.message==="Transition was aborted because of invalid state")&&(D=null)}D!==null&&R(D)}finally{a(),r(),m()}}),F.finished.finally(function(){for(var D=0;D<$.length;D++)$[D].cancel();H.__reactViewTransition===F&&(H.__reactViewTransition=null),x()}),F}catch{return a(),r(),m(),null}}function ja(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ja.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:q({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},ja.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],r=0;r<l.length;r++){var c=l[r].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[r])}return a},ja.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function hv(e){return{name:e,group:new ja("group",e),imagePair:new ja("image-pair",e),old:new ja("old",e),new:new ja("new",e)}}function ln(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ln.prototype.addEventListener=function(e,t,l){var a=null,r=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(gv(c,e,t,l)===-1){var m=this,x=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(x=function(R){m.removeEventListener(e,t,l),typeof t=="function"?t.call(this,R):t.handleEvent(R)}),a!==null&&(r=m.removeEventListener.bind(m,e,t,l),a.addEventListener("abort",r,{once:!0}),r=a.removeEventListener.bind(a,"abort",r)),a=ji(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:x,cleanup:r}),v(this._fragmentFiber.child,!1,Lx,e,x,a)}this._eventListeners=c}};function Lx(e,t,l,a){return _(e).addEventListener(t,l,a),!1}ln.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=gv(a,e,t,l),t!==-1)){var r=a[t];l=r.attachedListener;var c=r.cleanup;r=ji(r.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Vx,e,l,r),a.splice(t,1),c!==null&&c()}};function Vx(e,t,l,a){return _(e).removeEventListener(t,l,a),!1}function ji(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function mv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function gv(e,t,l,a){if(e.length===0)return-1;a=mv(a);for(var r=0;r<e.length;r++){var c=e[r];if(c.type===t&&c.listener===l&&mv(c.optionsOrUseCapture)===a)return r}return-1}ln.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=_(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var r=0;r<l.length;r++){var c=l[r];a.addEventListener(c.type,c.attachedListener,ji(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(r=0;r<l.length;r++)c=l[r],a.removeEventListener(c.type,c.attachedListener,ji(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},ln.prototype.focus=function(e){v(this._fragmentFiber.child,!0,pv,e,void 0,void 0)};function pv(e,t){return e.tag===6?!1:(e=_(e),Zx(e,t))}ln.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,Kf,t,void 0,void 0);for(var l=t.length-1;0<=l&&!pv(t[l],e);l--);};function Kf(e,t){return t.push(e),!1}ln.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=_(e),e=Xs(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,Fx,e,void 0,void 0))};function Fx(e,t){return e.tag===6?!1:(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ln.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Bx,e,void 0,void 0)};function Bx(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}ln.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,Gx,e,void 0,void 0);for(var l=t=0;l<wn.length;l++){var a=wn[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):wn[t++]=a}wn.length=t}};function Gx(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var wn=[],Zf=!1;function qx(e,t,l){wn.push({fragmentInstance:e,observer:t,instance:l}),Zf||(Zf=!0,Px(function(){Zf=!1;var a=wn;wn=[];for(var r=0;r<a.length;r++){var c=a[r];c.observer.unobserve(c.instance)}}))}ln.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,kx,e,void 0,void 0),e};function kx(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}ln.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},ln.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,Kf,l,void 0,void 0);var a=_(t);if(l.length===0){if(l=a,C(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var r=a=l.compareDocumentPosition(e);return l===e?r=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=E(t)[1],l===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=_(l).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(l[0]),r=_(l[l.length-1]);var c=C(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var m=t.compareDocumentPosition(e),x=r.compareDocumentPosition(e),R=m&Node.DOCUMENT_POSITION_CONTAINED_BY||x&Node.DOCUMENT_POSITION_CONTAINED_BY;return x=a&&c&&m&Node.DOCUMENT_POSITION_FOLLOWING&&x&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&r===e||R||x?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:m,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$x(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $x(e,t,l,a,r){var c=ua(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=r.ownerDocument,r===c||r===c.documentElement||r===c.body;e:{for(c=t,t=b(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=K(l,c,B),t===null?t=!1:(v(t,!0,O,c,l),c=w,w=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=K(a,c,B),t===null?t=!1:(v(t,!0,G,c,a),c=w,j=w=null,t=c!==null)),t):!1}function vv(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ln.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(o(566));var t=[];v(this._fragmentFiber.child,!1,Kf,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=E(this._fragmentFiber);if(a=l?a[1]||a[0]||b(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=_(a),vv(e,l);return}if(a=_(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var r=t[a];r.tag===6?(r=_(r),vv(r,l)):_(r).scrollIntoView(e),a+=l?-1:1}};function Qx(e,t){return e=_(e),yv(e,t),!1}function yv(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Sv(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var r=l[a];e.addEventListener(r.type,r.attachedListener,ji(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var m=0,x=0;x<wn.length;x++){var R=wn[x];(R.fragmentInstance!==t||R.observer!==c||R.instance!==e)&&(wn[m++]=R)}wn.length=m,c.observe(e)}),yv(e,t))}function Yx(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var r=l[a];e.removeEventListener(r.type,r.attachedListener,ji(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?qx(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Pf(l),qo(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Ix(e,t,l,a){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ds])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function Xx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=gn(e.nextSibling),e===null))return null;return e}function xv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gn(e.nextSibling),e===null))return null;return e}function Jf(e){return e.data==="$?"||e.data==="$~"}function Wf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Kx(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function gn(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 ed=null;function bv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return gn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Cv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Zx(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Px(e){rv(function(){rv(function(t){return e(t)})})}function Ev(e,t,l){switch(t=Xs(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function wv(e,t,l){for(var a in l){var r=l[a];l.hasOwnProperty(a)&&r!=null&&qe(e,t,a,null,Rx,r)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===jn&&(e.onclick=null),qo(e)}function td(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qo(e)}var pn=new Map,_v=new Set;function Ks(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ol=ue.d;ue.d={f:Jx,r:Wx,D:eb,C:tb,L:nb,m:lb,X:ib,S:ab,M:sb};function Jx(){var e=ol.f(),t=Qr();return e||t}function Wx(e){var t=Ka(e);t!==null&&t.tag===5&&t.type==="form"?Tg(t):ol.r(e)}var Ai=typeof document>"u"?null:document;function Rv(e,t,l){var a=Ai;if(a&&typeof t=="string"&&t){var r=rn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),_v.has(r)||(_v.add(r),e={rel:e,crossOrigin:l,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),bt(t,"link",e),ft(t),a.head.appendChild(t)))}}function eb(e){ol.D(e),Rv("dns-prefetch",e,null)}function tb(e,t){ol.C(e,t),Rv("preconnect",e,t)}function nb(e,t,l){ol.L(e,t,l);var a=Ai;if(a&&e&&t){var r='link[rel="preload"][as="'+rn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+rn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+rn(l.imageSizes)+'"]')):r+='[href="'+rn(e)+'"]';var c=r;switch(t){case"style":c=Oi(e);break;case"script":c=zi(e)}if(!(pn.has(c)||(e=q({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),pn.set(c,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(Zs(c))||t==="script"&&a.querySelector(Ps(c))))){var m=a.createElement("link");bt(m,"link",e),t==="style"&&(m[Go]=!0,m.onload=m.onerror=function(){Fh(m)}),ft(m),a.head.appendChild(m)}}}function lb(e,t){ol.m(e,t);var l=Ai;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+rn(a)+'"][href="'+rn(e)+'"]',c=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=zi(e)}if(!pn.has(c)&&(e=q({rel:"modulepreload",href:e},t),pn.set(c,e),l.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ps(c)))return}a=l.createElement("link"),bt(a,"link",e),ft(a),l.head.appendChild(a)}}}function ab(e,t,l){ol.S(e,t,l);var a=Ai;if(a&&e){var r=Za(a).hoistableStyles,c=Oi(e);t=t||"default";var m=r.get(c);if(!m){var x={loading:0,preload:null};if(m=a.querySelector(Zs(c)))x.loading=5;else{e=q({rel:"stylesheet",href:e,"data-precedence":t},l),(l=pn.get(c))&&nd(e,l);var R=m=a.createElement("link");ft(R),bt(R,"link",e),R._p=new Promise(function(H,F){R.onload=H,R.onerror=F}),R.addEventListener("load",function(){x.loading|=1}),R.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Jr(m,t,a)}m={type:"stylesheet",instance:m,count:1,state:x},r.set(c,m)}}}function ib(e,t){ol.X(e,t);var l=Ai;if(l&&e){var a=Za(l).hoistableScripts,r=zi(e),c=a.get(r);c||(c=l.querySelector(Ps(r)),c||(e=q({src:e,async:!0},t),(t=pn.get(r))&&ld(e,t),c=l.createElement("script"),ft(c),bt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(r,c))}}function sb(e,t){ol.M(e,t);var l=Ai;if(l&&e){var a=Za(l).hoistableScripts,r=zi(e),c=a.get(r);c||(c=l.querySelector(Ps(r)),c||(e=q({src:e,async:!0,type:"module"},t),(t=pn.get(r))&&ld(e,t),c=l.createElement("script"),ft(c),bt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(r,c))}}function Tv(e,t,l,a){var r=(r=sn.current)?Ks(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Oi(l.href),t=Za(r).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Oi(l.href);var c=Za(r).hoistableStyles,m=c.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,m),(c=r.querySelector(Zs(e)))?c._p||(m.instance=c,m.state.loading=5):(c=pn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pn.set(e,c)),ob(r,e,c,m.state))),t&&a===null)throw Error(o(528,""));return m}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=zi(l),t=Za(r).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Oi(e){return'href="'+rn(e)+'"'}function Zs(e){return'link[rel="stylesheet"]['+e+"]"}function Nv(e){return q({},e,{"data-precedence":e.precedence,precedence:null})}function ob(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Go]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[Go]=!0,t.onload=t.onerror=Fh.bind(null,t),bt(t,"link",l),ft(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function zi(e){return'[src="'+rn(e)+'"]'}function Ps(e){return"script[async]"+e}function Mv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+rn(l.href)+'"]');if(a)return t.instance=a,ft(a),a;var r=q({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ft(a),bt(a,"style",r),Jr(a,l.precedence,e),t.instance=a;case"stylesheet":r=Oi(l.href);var c=e.querySelector(Zs(r));if(c)return t.state.loading|=4,t.instance=c,ft(c),c;a=Nv(l),(r=pn.get(r))&&nd(a,r),c=(e.ownerDocument||e).createElement("link"),ft(c);var m=c;return m._p=new Promise(function(x,R){m.onload=x,m.onerror=R}),bt(c,"link",a),t.state.loading|=4,Jr(c,l.precedence,e),t.instance=c;case"script":return c=zi(l.src),(r=e.querySelector(Ps(c)))?(t.instance=r,ft(r),r):(a=l,(r=pn.get(c))&&(a=q({},l),ld(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),ft(r),bt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Jr(a,l.precedence,e));return t.instance}function Jr(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,c=r,m=0;m<a.length;m++){var x=a[m];if(x.dataset.precedence===t)c=x;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function nd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ld(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wr=null;function jv(e,t,l){if(Wr===null){var a=new Map,r=Wr=new Map;r.set(l,a)}else r=Wr,a=r.get(l),a||(a=new Map,r.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var c=l[r];if(!(c[ds]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(t)||"";m=e+m;var x=a.get(m);x?x.push(c):a.set(m,[c])}}return a}function ad(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function rb(e,t,l){if(l===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 Av(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Ov(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Dv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=zv(t),e.suspenseyImages.push(t)),e=fb.bind(e),t.decode().then(e,e))}function ub(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=Oi(a.href),c=t.querySelector(Zs(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Js.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,ft(c);return}c=t.ownerDocument||t,a=Nv(a),(r=pn.get(r))&&nd(a,r),c=c.createElement("link"),ft(c);var m=c;m._p=new Promise(function(x,R){m.onload=x,m.onerror=R}),bt(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Js.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var eu=0;function cb(e,t){return e.stylesheets&&e.count===0&&nu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&nu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&eu===0&&(eu=62500*Nx());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&nu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>eu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(r)}}:null}function Uv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)nu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Js(){this.count--,Uv(this)}function fb(){this.imgCount--,Uv(this)}var tu=null;function nu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tu=new Map,t.forEach(db,e),tu=null,Js.call(e))}function db(e,t){if(!(t.state.loading&4)){var l=tu.get(e);if(l)var a=l.get(null);else{l=new Map,tu.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var m=r[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(l.set(m.dataset.precedence,m),a=m)}a&&l.set(null,a)}r=t.instance,m=r.getAttribute("data-precedence"),c=l.get(m)||a,c===a&&l.set(null,r),l.set(m,r),this.count++,a=Js.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Di={$$typeof:He,Provider:null,Consumer:null,_currentValue:_t,_currentValue2:_t,_threadCount:0};function hb(e,t,l,a,r,c,m,x,R){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=Lu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lu(0),this.hiddenUpdates=Lu(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.transitionTypes=null,this.incompleteTransitions=new Map}function Hv(e,t,l,a,r,c,m,x,R,H,F,$){return e=new hb(e,t,l,m,R,H,F,$,x),t=1,c===!0&&(t|=24),c=kt(3,null,null,t),e.current=c,c.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Cc(c),e}function Lv(e){return e?(e=si,e):si}function Vv(e,t,l,a,r,c){r=Lv(r),a.context===null?a.context=r:a.pendingContext=r,a=El(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=wl(e,a,t),l!==null&&(It(l,e,t),Ms(l,e,t))}function Fv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function id(e,t){Fv(e,t),(e=e.alternate)&&Fv(e,t)}function Bv(e){if(e.tag===13||e.tag===31){var t=ha(e,67108864);t!==null&&It(t,e,67108864),id(e,67108864)}}function Gv(e){if(e.tag===13||e.tag===31){var t=nn();t=Vu(t);var l=ha(e,t);l!==null&&It(l,e,t),id(e,t)}}var Ui=!0;function mb(e,t,l,a){var r=ne.T;ne.T=null;var c=ue.p;try{ue.p=2,sd(e,t,l,a)}finally{ue.p=c,ne.T=r}}function gb(e,t,l,a){var r=ne.T;ne.T=null;var c=ue.p;try{ue.p=8,sd(e,t,l,a)}finally{ue.p=c,ne.T=r}}function sd(e,t,l,a){if(Ui){var r=od(a);if(r===null)Gf(e,t,a,lu,l),kv(e,a);else if(vb(r,e,t,l,a))a.stopPropagation();else if(kv(e,a),t&4&&-1<pb.indexOf(e)){for(;r!==null;){var c=Ka(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=ra(c.pendingLanes);if(m!==0){var x=c;for(x.pendingLanes|=2,x.entangledLanes|=2;m;){var R=1<<31-Ot(m);x.entanglements[1]|=R,m&=~R}Bn(c),(De&6)===0&&(qr=Rt()+500,Qs(0))}}break;case 31:case 13:x=ha(c,2),x!==null&&It(x,c,2),Qr(),id(c,2)}if(c=od(a),c===null&&Gf(e,t,a,lu,l),c===r)break;r=c}r!==null&&a.stopPropagation()}else Gf(e,t,a,null,l)}}function od(e){return e=Qu(e),rd(e)}var lu=null;function rd(e){if(lu=null,e=ua(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=g(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lu=e,null}function qv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Do()){case os:return 2;case rs:return 8;case oa:case Uo:return 32;case us:return 268435456;default:return 32}default:return 32}}var ud=!1,Hl=null,Ll=null,Vl=null,Ws=new Map,eo=new Map,Fl=[],pb="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 kv(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":Ws.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":eo.delete(t.pointerId)}}function to(e,t,l,a,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[r]},t!==null&&(t=Ka(t),t!==null&&Bv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function vb(e,t,l,a,r){switch(t){case"focusin":return Hl=to(Hl,e,t,l,a,r),!0;case"dragenter":return Ll=to(Ll,e,t,l,a,r),!0;case"mouseover":return Vl=to(Vl,e,t,l,a,r),!0;case"pointerover":var c=r.pointerId;return Ws.set(c,to(Ws.get(c)||null,e,t,l,a,r)),!0;case"gotpointercapture":return c=r.pointerId,eo.set(c,to(eo.get(c)||null,e,t,l,a,r)),!0}return!1}function $v(e){var t=ua(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,Hh(e.priority,function(){Gv(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,Hh(e.priority,function(){Gv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function au(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=od(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);$u=a,l.target.dispatchEvent(a),$u=null}else return t=Ka(l),t!==null&&Bv(t),e.blockedOn=l,!1;t.shift()}return!0}function Qv(e,t,l){au(e)&&l.delete(t)}function yb(){ud=!1,Hl!==null&&au(Hl)&&(Hl=null),Ll!==null&&au(Ll)&&(Ll=null),Vl!==null&&au(Vl)&&(Vl=null),Ws.forEach(Qv),eo.forEach(Qv)}function iu(e,t){e.blockedOn===t&&(e.blockedOn=null,ud||(ud=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,yb)))}var su=null;function Yv(e){su!==e&&(su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){su===e&&(su=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(rd(a||l)===null)continue;break}var c=Ka(l);c!==null&&(e.splice(t,3),t-=3,kc(c,{pending:!0,data:r,method:l.method,action:a},a,r))}}))}function Hi(e){function t(R){return iu(R,e)}Hl!==null&&iu(Hl,e),Ll!==null&&iu(Ll,e),Vl!==null&&iu(Vl,e),Ws.forEach(t),eo.forEach(t);for(var l=0;l<Fl.length;l++){var a=Fl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Fl.length&&(l=Fl[0],l.blockedOn===null);)$v(l),l.blockedOn===null&&Fl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var r=l[a],c=l[a+1],m=r[qt]||null;if(typeof c=="function")m||Yv(l);else if(m){var x=null;if(c&&c.hasAttribute("formAction")){if(r=c,m=c[qt]||null)x=m.formAction;else if(rd(r)!==null)continue}else x=m.action;typeof x=="function"?l[a+1]=x:(l.splice(a,3),a-=3),Yv(l)}}}function Iv(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function cd(e){this._internalRoot=e}ou.prototype.render=cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=nn();Vv(l,a,e,t,null,null)},ou.prototype.unmount=cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vv(e.current,2,null,e,null,null),Qr(),t[Xa]=null}};function ou(e){this._internalRoot=e}ou.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uh();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Fl.length&&t!==0&&t<Fl[l].priority;l++);Fl.splice(l,0,e),l===0&&$v(e)}};var Xv=i.version;if(Xv!=="19.3.1")throw Error(o(527,Xv,"19.3.1"));ue.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=S(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Sb={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ne,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{Fe=ru.inject(Sb),Ke=ru}catch{}}return lo.createRoot=function(e,t){if(!u(e))throw Error(o(299));var l=!1,a="",r=Lg,c=Vg,m=Fg;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=Hv(e,1,!1,null,null,l,a,null,r,c,m,Iv),e[Xa]=t.current,Bf(e),new cd(t)},lo.hydrateRoot=function(e,t,l){if(!u(e))throw Error(o(299));var a=!1,r="",c=Lg,m=Vg,x=Fg,R=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(m=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(R=l.formState)),t=Hv(e,1,!0,t,l??null,a,r,R,c,m,x,Iv),t.context=Lv(null),l=t.current,a=nn(),a=Vu(a),r=El(a),r.callback=null,wl(l,r,a),l=a,t.current.lanes=l,fs(t,l),Bn(t),e[Xa]=t.current,Bf(e),new ou(t)},lo.version="19.3.1",lo}var i0;function Ob(){if(i0)return md.exports;i0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),md.exports=Ab(),md.exports}var zb=Ob();const iy=T.createContext(void 0),sy=n=>{const i=T.useContext(iy);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},Db=({client:n,children:i})=>(T.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),h.jsx(iy.Provider,{value:n,children:i})),Ub={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)};var ql,hh,X0,Hb=(X0=class{constructor(){ce(this,ql,Ub);ce(this,hh,!1)}setTimeoutProvider(n){J(this,ql,n)}setTimeout(n,i){return z(this,ql).setTimeout(n,i)}clearTimeout(n){z(this,ql).clearTimeout(n)}setInterval(n,i){return z(this,ql).setInterval(n,i)}clearInterval(n){z(this,ql).clearInterval(n)}},ql=new WeakMap,hh=new WeakMap,X0);const Oa=new Hb;function Lb(n){setTimeout(n,0)}const Vb=typeof window>"u"||"Deno"in globalThis;function Xt(){}function Fb(n,i){return typeof n=="function"?n(i):n}function oy(n){return typeof n=="number"&&n>=0&&n!==1/0}function ry(n,i){return Math.max(n+(i||0)-Date.now(),0)}function Pe(n,i){return typeof n=="function"?n(i):n}function s0(n,i){const{type:s="all",exact:o,fetchStatus:u,predicate:f,queryKey:d,stale:g}=n;if(d){if(o){if(i.queryHash!==gh(d,i.options))return!1}else if(!es(i.queryKey,d))return!1}if(s!=="all"){const p=i.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof g=="boolean"&&i.isStale()!==g||u&&u!==i.state.fetchStatus||f&&!f(i))}function o0(n,i){const{exact:s,status:o,predicate:u,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(s){if(mo(i.options.mutationKey)!==mo(f))return!1}else if(!es(i.options.mutationKey,f))return!1}return!(o&&i.state.status!==o||u&&!u(i))}function gh(n,i){return((i==null?void 0:i.queryKeyHashFn)||mo)(n)}function mo(n){return JSON.stringify(n,(i,s)=>Ud(s)?Object.keys(s).sort().reduce((o,u)=>(o[u]=s[u],o),{}):s)}function es(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)&&Array.isArray(i)){if(i.length>n.length)return!1;for(let o=0;o<i.length;o++)if(!es(n[o],i[o]))return!1;return!0}const s=Object.keys(i);for(const o of s)if(!es(n[o],i[o]))return!1;return!0}return!1}const Bb=Object.prototype.hasOwnProperty;function uy(n,i,s=0){if(n===i)return n;if(s>500)return i;const o=r0(n)&&r0(i);if(!o&&!(Ud(n)&&Ud(i)))return i;const u=(o?n:Object.keys(n)).length,f=o?i:Object.keys(i),d=f.length,g=o?new Array(d):{};let p=0;for(let S=0;S<d;S++){const y=o?S:f[S],v=n[y],b=i[y];if(v===b){g[y]=v,(o?S<u:Bb.call(n,y))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){g[y]=b;continue}const C=uy(v,b,s+1);g[y]=C,C===v&&p++}return u===d&&p===u?n:g}function yd(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const s in n)if(n[s]!==i[s])return!1;return!0}function r0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!u0(n))return!1;const i=Object.getPrototypeOf(n),s=i==null?void 0:i.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const o=s.prototype;return!(!u0(o)||!o.hasOwnProperty("isPrototypeOf")||i!==Object.prototype)}function u0(n){return Object.prototype.toString.call(n)==="[object Object]"}function Gb(n){return new Promise(i=>{Oa.setTimeout(i,n)})}function Hd(n,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,i):s.structuralSharing!==!1?uy(n,i):i}function cy(n){return n}function qb(n,i,s=0){const o=[...n,i];return s&&o.length>s?o.slice(1):o}function kb(n,i,s=0){const o=[i,...n];return s&&o.length>s?o.slice(0,-1):o}const ph=Symbol();function fy(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===ph?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function dy(n,i){return typeof n=="function"?n(...i):!!n}function $b(n,i,s){let o=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=i()),o||(o=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}let Qb=()=>Vb;const vh=()=>Qb();var Eo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},za,kl,Gi,K0,Yb=(K0=class extends Eo{constructor(){super();ce(this,za);ce(this,kl);ce(this,Gi);J(this,Gi,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){z(this,kl)||this.setEventListener(z(this,Gi))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,kl))==null||i.call(this),J(this,kl,void 0))}setEventListener(i){var s;J(this,Gi,i),(s=z(this,kl))==null||s.call(this),J(this,kl,i(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(i){z(this,za)!==i&&(J(this,za,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(s=>{s(i)})}isFocused(){var i;return typeof z(this,za)=="boolean"?z(this,za):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},za=new WeakMap,kl=new WeakMap,Gi=new WeakMap,K0);const yh=new Yb,Ib=Lb;function Xb(){let n=[],i=0,s=g=>{g()},o=g=>{g()},u=Ib;const f=g=>{i?n.push(g):u(()=>{s(g)})},d=()=>{const g=n;n=[],g.length&&u(()=>{o(()=>{g.forEach(p=>{s(p)})})})};return{batch:g=>{let p;i++;try{p=g()}finally{i--,i||d()}return p},batchCalls:g=>(...p)=>{f(()=>{g(...p)})},schedule:f,setNotifyFunction:g=>{s=g},setBatchNotifyFunction:g=>{o=g},setScheduler:g=>{u=g}}}const Et=Xb();var qi,$l,ki,Z0,Kb=(Z0=class extends Eo{constructor(){super();ce(this,qi,!0);ce(this,$l);ce(this,ki);J(this,ki,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i(!0),o=()=>i(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){z(this,$l)||this.setEventListener(z(this,ki))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,$l))==null||i.call(this),J(this,$l,void 0))}setEventListener(i){var s;J(this,ki,i),(s=z(this,$l))==null||s.call(this),J(this,$l,i(this.setOnline.bind(this)))}setOnline(i){z(this,qi)!==i&&(J(this,qi,i),this.listeners.forEach(s=>{s(i)}))}isOnline(){return z(this,qi)}},qi=new WeakMap,$l=new WeakMap,ki=new WeakMap,Z0);const pu=new Kb;function Zb(n){return Math.min(1e3*2**n,3e4)}function hy(n){return(n??"online")==="online"?pu.isOnline():!0}var Ld=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function my(n){let i=!1,s=0,o,u="pending",f,d;const g=new Promise((j,O)=>{f=j,d=O});g.catch(Xt);const p=()=>u!=="pending",S=j=>{var O;if(!p()){const G=new Ld(j);N(G),(O=n.onCancel)==null||O.call(n,G)}},y=()=>{i=!0},v=()=>{i=!1},b=()=>yh.isFocused()&&(n.networkMode==="always"||pu.isOnline())&&n.canRun(),C=()=>hy(n.networkMode)&&n.canRun(),E=j=>{p()||(o==null||o(),u="resolved",f(j))},N=j=>{p()||(o==null||o(),u="rejected",d(j))},_=j=>new Promise(O=>{var G;o=B=>{(p()||j())&&O(B)},(G=n.onPause)==null||G.call(n)}).then(()=>{var O;o=void 0,p()||(O=n.onContinue)==null||O.call(n)}),w=()=>{if(p())return;let j;const O=s===0?n.initialPromise:void 0;try{j=O??n.fn()}catch(G){j=Promise.reject(G)}Promise.resolve(j).then(E).catch(G=>{var W;if(p())return;const B=n.retry??(vh()?0:3),K=n.retryDelay??Zb,q=typeof K=="function"?K(s,G):K,Z=B===!0||typeof B=="number"&&s<B||typeof B=="function"&&B(s,G);if(i||!Z){N(G);return}s++,(W=n.onFail)==null||W.call(n,s,G),Gb(q).then(()=>b()?void 0:_(b)).then(()=>{i?N(G):w()})})};return{promise:g,status:()=>u,cancel:S,continue:()=>(o==null||o(),g),cancelRetry:y,continueRetry:v,canStart:C,start:()=>(C()?w():_(C).then(w),g)}}var Da,P0,gy=(P0=class{constructor(){ce(this,Da)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),oy(this.gcTime)&&J(this,Da,Oa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(vh()?1/0:3e5))}clearGcTimeout(){z(this,Da)!==void 0&&(Oa.clearTimeout(z(this,Da)),J(this,Da,void 0))}},Da=new WeakMap,P0);function Pb(n){return{onFetch:(i,s)=>{var y,v,b,C,E;const o=i.options,u=(b=(v=(y=i.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,f=((C=i.state.data)==null?void 0:C.pages)||[],d=((E=i.state.data)==null?void 0:E.pageParams)||[];let g={pages:[],pageParams:[]},p=0;const S=async()=>{let N=!1;const _=O=>{$b(O,()=>i.signal,()=>N=!0)},w=fy(i.options,i.fetchOptions),j=async(O,G,B)=>{if(N)return Promise.reject(i.signal.reason);if(G==null&&O.pages.length)return Promise.resolve(O);const q=(()=>{const Se={client:i.client,queryKey:i.queryKey,pageParam:G,direction:B?"backward":"forward",meta:i.options.meta};return _(Se),Se})(),Z=await w(q),{maxPages:W}=i.options,oe=B?kb:qb;return{pages:oe(O.pages,Z,W),pageParams:oe(O.pageParams,G,W)}};if(u&&f.length){const O=u==="backward",G=O?py:Vd,B={pages:f,pageParams:d};g=await j(B,G(o,B),O)}else{const O=n??f.length;do{const G=p===0?d[0]===void 0?o.initialPageParam:d[0]:Vd(o,g);if(p>0&&G==null)break;g=await j(g,G),p++}while(p<O)}return g};i.options.persister?i.fetchFn=()=>{var N,_;return(_=(N=i.options).persister)==null?void 0:_.call(N,S,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s)}:i.fetchFn=S}}}function Vd(n,{pages:i,pageParams:s}){const o=i.length-1;return i.length>0?n.getNextPageParam(i[o],i,s[o],s):void 0}function py(n,{pages:i,pageParams:s}){var o;return i.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,i[0],i,s[0],s):void 0}function Jb(n,i){return i?Vd(n,i)!=null:!1}function Wb(n,i){return!i||!n.getPreviousPageParam?!1:py(n,i)!=null}var $i,Ua,Qi,vn,Ha,ct,yo,La,_n,rl,J0,e2=(J0=class extends gy{constructor(i){super();ce(this,_n);ce(this,$i);ce(this,Ua);ce(this,Qi);ce(this,vn);ce(this,Ha);ce(this,ct);ce(this,yo);ce(this,La);J(this,La,!1),J(this,yo,i.defaultOptions),this.setOptions(i.options),this.observers=[],J(this,Ha,i.client),J(this,vn,z(this,Ha).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,J(this,Ua,f0(this.options)),this.state=i.state??z(this,Ua),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,$i)}get promise(){var i;return(i=z(this,ct))==null?void 0:i.promise}setOptions(i){if(this.options={...z(this,yo),...i},i!=null&&i._type&&J(this,$i,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=f0(this.options);s.data!==void 0&&(this.setState(c0(s.data,s.dataUpdatedAt)),J(this,Ua,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,vn).remove(this)}setData(i,s){const o=Hd(this.state.data,i,this.options);return we(this,_n,rl).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(i){we(this,_n,rl).call(this,{type:"setState",state:i})}cancel(i){var o,u;const s=(o=z(this,ct))==null?void 0:o.promise;return(u=z(this,ct))==null||u.cancel(i),s?s.then(Xt).catch(Xt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,Ua)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>Pe(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ph||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>Pe(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!ry(this.state.dataUpdatedAt,i)}onFocus(){var i,s;(i=this.observers.find(o=>o.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(s=z(this,ct))==null||s.continue()}onOnline(){var i,s;(i=this.observers.find(o=>o.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(s=z(this,ct))==null||s.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),z(this,vn).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const s=this.observers.indexOf(i);s!==-1&&(this.observers.splice(s,1),this.observers.length||(z(this,ct)&&(z(this,La)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?z(this,ct).cancel({revert:!0}):z(this,ct).cancelRetry()),this.scheduleGc()),z(this,vn).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||we(this,_n,rl).call(this,{type:"invalidate"})}async fetch(i,s){var S,y,v,b,C,E,N,_,w,j,O,G;if(this.state.fetchStatus!=="idle"&&((S=z(this,ct))==null?void 0:S.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(z(this,ct))return z(this,ct).continueRetry(),z(this,ct).promise}if(i&&this.setOptions(i),!this.options.queryFn){const B=this.observers.find(K=>K.options.queryFn);B&&this.setOptions(B.options)}const o=new AbortController,u=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(J(this,La,!0),o.signal)})},f=()=>{const B=fy(this.options,s),q=(()=>{const Z={client:z(this,Ha),queryKey:this.queryKey,meta:this.meta};return u(Z),Z})();return J(this,La,!1),this.options.persister?this.options.persister(B,q,this):B(q)},g=(()=>{const B={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:z(this,Ha),state:this.state,fetchFn:f};return u(B),B})();(y=z(this,$i)==="infinite"?Pb(this.options.pages):this.options.behavior)==null||y.onFetch(g,this),J(this,Qi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=g.fetchOptions)==null?void 0:v.meta))&&we(this,_n,rl).call(this,{type:"fetch",meta:(b=g.fetchOptions)==null?void 0:b.meta});const p=J(this,ct,my({initialPromise:s==null?void 0:s.initialPromise,fn:g.fetchFn,onCancel:B=>{B instanceof Ld&&B.revert&&this.setState({...z(this,Qi),fetchStatus:"idle"}),o.abort()},onFail:(B,K)=>{we(this,_n,rl).call(this,{type:"failed",failureCount:B,error:K})},onPause:()=>{we(this,_n,rl).call(this,{type:"pause"})},onContinue:()=>{we(this,_n,rl).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const B=await p.start();if(B===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(B),(E=(C=z(this,vn).config).onSuccess)==null||E.call(C,B,this),(_=(N=z(this,vn).config).onSettled)==null||_.call(N,B,this.state.error,this),B}catch(B){if(B instanceof Ld){if(B.silent)return z(this,ct).promise;if(B.revert){if(this.state.data===void 0)throw B;return this.state.data}}throw we(this,_n,rl).call(this,{type:"error",error:B}),(j=(w=z(this,vn).config).onError)==null||j.call(w,B,this),(G=(O=z(this,vn).config).onSettled)==null||G.call(O,this.state.data,B,this),B}finally{z(this,ct)===p&&J(this,ct,void 0),this.scheduleGc()}}},$i=new WeakMap,Ua=new WeakMap,Qi=new WeakMap,vn=new WeakMap,Ha=new WeakMap,ct=new WeakMap,yo=new WeakMap,La=new WeakMap,_n=new WeakSet,rl=function(i){const s=o=>{switch(i.type){case"failed":return{...o,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...vy(o.data,this.options),fetchMeta:i.meta??null};case"success":const u={...o,...c0(i.data,i.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,Qi,i.manual?u:void 0),u;case"error":const f=i.error;return{...o,error:f,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...i.state}}};this.state=s(this.state),Et.batch(()=>{this.observers.slice().forEach(o=>{o.onQueryUpdate()}),z(this,vn).notify({query:this,type:"updated",action:i})})},J0);function vy(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hy(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function c0(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function f0(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,s=i!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Vt,Te,So,Ft,Va,Yi,cl,xo,Ii,Xi,Fa,Ba,Ql,Ki,Ue,ro,Fd,Bd,Gd,qd,kd,$d,Qd,Yd,W0,yy=(W0=class extends Eo{constructor(i,s){super();ce(this,Ue);ce(this,Vt);ce(this,Te);ce(this,So);ce(this,Ft);ce(this,Va);ce(this,Yi);ce(this,cl);ce(this,xo);ce(this,Ii);ce(this,Xi);ce(this,Fa);ce(this,Ba);ce(this,Ql);ce(this,Ki,new Set);this.options=s,J(this,Vt,i),J(this,cl,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,Te).addObserver(this),d0(z(this,Te),this.options)?we(this,Ue,ro).call(this):this.updateResult(),we(this,Ue,kd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Id(z(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Id(z(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,we(this,Ue,$d).call(this),we(this,Ue,Qd).call(this),z(this,Te).removeObserver(this)}setOptions(i){const s=this.options,o=z(this,Te);if(this.options=z(this,Vt).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pe(this.options.enabled,z(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");we(this,Ue,Yd).call(this),z(this,Te).setOptions(this.options),s._defaulted&&!yd(this.options,s)&&z(this,Vt).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,Te),observer:this});const u=this.hasListeners();u&&h0(z(this,Te),o,this.options,s)&&we(this,Ue,ro).call(this),this.updateResult(),u&&(z(this,Te)!==o||Pe(this.options.enabled,z(this,Te))!==Pe(s.enabled,z(this,Te))||Pe(this.options.staleTime,z(this,Te))!==Pe(s.staleTime,z(this,Te)))&&we(this,Ue,Bd).call(this);const f=we(this,Ue,Gd).call(this);u&&(z(this,Te)!==o||Pe(this.options.enabled,z(this,Te))!==Pe(s.enabled,z(this,Te))||f!==z(this,Ql))&&we(this,Ue,qd).call(this,f)}getOptimisticResult(i){const s=z(this,Vt).getQueryCache().build(z(this,Vt),i),o=this.createResult(s,i);return yd(this.getCurrentResult(),o)||(J(this,Ft,o),J(this,Yi,this.options),J(this,Va,z(this,Te).state)),o}getCurrentResult(){return z(this,Ft)}trackResult(i,s){return new Proxy(i,{get:(o,u)=>(this.trackProp(u),s==null||s(u),Reflect.get(o,u))})}trackProp(i){z(this,Ki).add(i)}getCurrentQuery(){return z(this,Te)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const s=z(this,Vt).defaultQueryOptions(i),o=z(this,Vt).getQueryCache().build(z(this,Vt),s);let u=()=>{},f;const d=new Promise(g=>{f=g,u=z(this,Vt).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===o.queryHash&&o.state.data!==void 0&&(u(),g(this.createResult(o,s)))})});return Promise.race([o.fetch(s).then(()=>{const g=this.createResult(o,s);return f==null||f(g),g}).finally(()=>{u()}),d])}fetch(i){return we(this,Ue,ro).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Ft)))}createResult(i,s){var K;const o=z(this,Te),u=this.options,f=z(this,Ft),d=z(this,Va),g=z(this,Yi),p=i!==o?i.state:z(this,So),{state:S}=i;let y={...S},v=!1,b;if(s._optimisticResults){const q=this.hasListeners(),Z=!q&&d0(i,s),W=q&&h0(i,o,s,u);(Z||W)&&(y={...y,...vy(S.data,i.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:E,status:N}=y;b=y.data;let _=!1;if(s.placeholderData!==void 0&&b===void 0&&N==="pending"){let q;f!=null&&f.isPlaceholderData&&s.placeholderData===(g==null?void 0:g.placeholderData)?(q=f.data,_=!0):q=typeof s.placeholderData=="function"?s.placeholderData((K=z(this,Xi))==null?void 0:K.state.data,z(this,Xi)):s.placeholderData,q!==void 0&&(N="success",b=Hd(f==null?void 0:f.data,q,s),v=!0)}if(s.select&&b!==void 0&&!_)if(f&&b===(d==null?void 0:d.data)&&s.select===z(this,xo))b=z(this,Ii);else try{J(this,xo,s.select),b=s.select(b),b=Hd(f==null?void 0:f.data,b,s),J(this,Ii,b),J(this,cl,null)}catch(q){J(this,cl,q)}else b===void 0&&J(this,cl,null);z(this,cl)&&(C=z(this,cl),b=z(this,Ii),E=Date.now(),N="error",v=!1);const w=y.fetchStatus==="fetching",j=N==="pending",O=N==="error",G=j&&w,B=b!==void 0;return{status:N,fetchStatus:y.fetchStatus,isPending:j,isSuccess:N==="success",isError:O,isInitialLoading:G,isLoading:G,data:b,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:E,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:w,isRefetching:w&&!j,isLoadingError:O&&!B,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&B,isStale:Sh(i,s),refetch:this.refetch,isEnabled:Pe(s.enabled,i)!==!1}}updateResult(){const i=z(this,Ft),s=this.createResult(z(this,Te),this.options);if(J(this,Va,z(this,Te).state),J(this,Yi,this.options),z(this,Va).data!==void 0&&J(this,Xi,z(this,Te)),yd(s,i))return;J(this,Ft,s);const u=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!z(this,Ki).size)return!0;const g=new Set(d??z(this,Ki));return this.options.throwOnError&&g.add("error"),Object.keys(z(this,Ft)).some(p=>{const S=p;return z(this,Ft)[S]!==i[S]&&g.has(S)})})();Et.batch(()=>{u&&this.listeners.forEach(f=>{f(z(this,Ft))}),z(this,Vt).getQueryCache().notify({query:z(this,Te),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&we(this,Ue,kd).call(this)}},Vt=new WeakMap,Te=new WeakMap,So=new WeakMap,Ft=new WeakMap,Va=new WeakMap,Yi=new WeakMap,cl=new WeakMap,xo=new WeakMap,Ii=new WeakMap,Xi=new WeakMap,Fa=new WeakMap,Ba=new WeakMap,Ql=new WeakMap,Ki=new WeakMap,Ue=new WeakSet,ro=function(i){we(this,Ue,Yd).call(this);let s=z(this,Te).fetch(this.options,i);return i!=null&&i.throwOnError||(s=s.catch(Xt)),s},Fd=function(i){return!vh()&&Pe(this.options.enabled,z(this,Te))!==!1&&oy(i)},Bd=function(){we(this,Ue,$d).call(this);const i=Pe(this.options.staleTime,z(this,Te));if(z(this,Ft).isStale||!we(this,Ue,Fd).call(this,i))return;const s=ry(z(this,Ft).dataUpdatedAt,i)+1;J(this,Fa,Oa.setTimeout(()=>{z(this,Ft).isStale||this.updateResult()},s))},Gd=function(){return Pe(this.options.refetchInterval,z(this,Te))??!1},qd=function(i){we(this,Ue,Qd).call(this),J(this,Ql,i),!(z(this,Ql)===0||!we(this,Ue,Fd).call(this,z(this,Ql)))&&J(this,Ba,Oa.setInterval(()=>{(this.options.refetchIntervalInBackground||yh.isFocused())&&we(this,Ue,ro).call(this)},z(this,Ql)))},kd=function(){we(this,Ue,Bd).call(this),we(this,Ue,qd).call(this,we(this,Ue,Gd).call(this))},$d=function(){z(this,Fa)!==void 0&&(Oa.clearTimeout(z(this,Fa)),J(this,Fa,void 0))},Qd=function(){z(this,Ba)!==void 0&&(Oa.clearInterval(z(this,Ba)),J(this,Ba,void 0))},Yd=function(){const i=z(this,Vt).getQueryCache().build(z(this,Vt),this.options);if(i===z(this,Te))return;const s=z(this,Te);J(this,Te,i),J(this,So,i.state),this.hasListeners()&&(s==null||s.removeObserver(this),i.addObserver(this))},W0);function t2(n,i){return Pe(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Pe(i.retryOnMount,n)===!1)}function d0(n,i){return t2(n,i)||n.state.data!==void 0&&Id(n,i,i.refetchOnMount)}function Id(n,i,s){if(Pe(i.enabled,n)!==!1&&Pe(i.staleTime,n)!=="static"){const o=Pe(s,n);return o==="always"||o!==!1&&Sh(n,i)}return!1}function h0(n,i,s,o){return(n!==i||Pe(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&Sh(n,s)}function Sh(n,i){return Pe(i.enabled,n)!==!1&&n.isStaleByTime(Pe(i.staleTime,n))}var n2=class extends yy{constructor(n,i){super(n,i)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,i){var C,E;const{state:s}=n,o=super.createResult(n,i),{isFetching:u,isRefetching:f,isError:d,isRefetchError:g}=o,p=(E=(C=s.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:E.direction,S=d&&p==="forward",y=u&&p==="forward",v=d&&p==="backward",b=u&&p==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Jb(i,s.data),hasPreviousPage:Wb(i,s.data),isFetchNextPageError:S,isFetchingNextPage:y,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:g&&!S&&!v,isRefetching:f&&!y&&!b}}},bo,Gn,Mt,Ga,qn,Gl,ey,l2=(ey=class extends gy{constructor(i){super();ce(this,qn);ce(this,bo);ce(this,Gn);ce(this,Mt);ce(this,Ga);J(this,bo,i.client),this.mutationId=i.mutationId,J(this,Mt,i.mutationCache),J(this,Gn,[]),this.state=i.state||a2(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){z(this,Gn).includes(i)||(z(this,Gn).push(i),this.clearGcTimeout(),z(this,Mt).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){J(this,Gn,z(this,Gn).filter(s=>s!==i)),this.scheduleGc(),z(this,Mt).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){z(this,Gn).length||(this.state.status==="pending"?this.scheduleGc():z(this,Mt).remove(this))}continue(){var i;return((i=z(this,Ga))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var g,p,S,y,v,b,C,E,N,_,w,j,O,G,B,K,q,Z;const s=()=>{we(this,qn,Gl).call(this,{type:"continue"})},o={client:z(this,bo),meta:this.options.meta,mutationKey:this.options.mutationKey},u=J(this,Ga,my({fn:()=>this.options.mutationFn?this.options.mutationFn(i,o):Promise.reject(new Error("No mutationFn found")),onFail:(W,oe)=>{we(this,qn,Gl).call(this,{type:"failed",failureCount:W,error:oe})},onPause:()=>{we(this,qn,Gl).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,Mt).canRun(this)})),f=this.state.status==="pending",d=!u.canStart();try{if(f)s();else{we(this,qn,Gl).call(this,{type:"pending",variables:i,isPaused:d}),z(this,Mt).config.onMutate&&await z(this,Mt).config.onMutate(i,this,o);const oe=await((p=(g=this.options).onMutate)==null?void 0:p.call(g,i,o));oe!==this.state.context&&we(this,qn,Gl).call(this,{type:"pending",context:oe,variables:i,isPaused:d})}const W=await u.start();return await((y=(S=z(this,Mt).config).onSuccess)==null?void 0:y.call(S,W,i,this.state.context,this,o)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,W,i,this.state.context,o)),await((E=(C=z(this,Mt).config).onSettled)==null?void 0:E.call(C,W,null,this.state.variables,this.state.context,this,o)),await((_=(N=this.options).onSettled)==null?void 0:_.call(N,W,null,i,this.state.context,o)),we(this,qn,Gl).call(this,{type:"success",data:W}),W}catch(W){try{await((j=(w=z(this,Mt).config).onError)==null?void 0:j.call(w,W,i,this.state.context,this,o))}catch(oe){Promise.reject(oe)}try{await((G=(O=this.options).onError)==null?void 0:G.call(O,W,i,this.state.context,o))}catch(oe){Promise.reject(oe)}try{await((K=(B=z(this,Mt).config).onSettled)==null?void 0:K.call(B,void 0,W,this.state.variables,this.state.context,this,o))}catch(oe){Promise.reject(oe)}try{await((Z=(q=this.options).onSettled)==null?void 0:Z.call(q,void 0,W,i,this.state.context,o))}catch(oe){Promise.reject(oe)}throw we(this,qn,Gl).call(this,{type:"error",error:W}),W}finally{z(this,Ga)===u&&J(this,Ga,void 0),z(this,Mt).runNext(this)}}},bo=new WeakMap,Gn=new WeakMap,Mt=new WeakMap,Ga=new WeakMap,qn=new WeakSet,Gl=function(i){const s=o=>{switch(i.type){case"failed":return{...o,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...o,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:i.error,failureCount:o.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Et.batch(()=>{z(this,Gn).forEach(o=>{o.onMutationUpdate(i)}),z(this,Mt).notify({mutation:this,type:"updated",action:i})})},ey);function a2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yl,Rn,Co,ty,i2=(ty=class extends Eo{constructor(i={}){super();ce(this,Yl);ce(this,Rn);ce(this,Co);this.config=i,J(this,Yl,new Set),J(this,Rn,new Map),J(this,Co,0)}build(i,s,o){const u=new l2({client:i,mutationCache:this,mutationId:++uu(this,Co)._,options:i.defaultMutationOptions(s),state:o});return this.add(u),u}add(i){z(this,Yl).add(i);const s=cu(i);if(typeof s=="string"){const o=z(this,Rn).get(s);o?o.push(i):z(this,Rn).set(s,[i])}this.notify({type:"added",mutation:i})}remove(i){if(z(this,Yl).delete(i)){const s=cu(i);if(typeof s=="string"){const o=z(this,Rn).get(s);if(o)if(o.length>1){const u=o.indexOf(i);u!==-1&&o.splice(u,1)}else o[0]===i&&z(this,Rn).delete(s)}}this.notify({type:"removed",mutation:i})}canRun(i){var o;const s=cu(i);if(typeof s=="string"){const u=(o=z(this,Rn).get(s))==null?void 0:o.find(f=>f.state.status==="pending");return!u||u===i}else return!0}runNext(i){var o,u;const s=cu(i);return typeof s=="string"?((u=(o=z(this,Rn).get(s))==null?void 0:o.find(f=>f!==i&&f.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){Et.batch(()=>{const i=this.getAll();z(this,Yl).clear(),z(this,Rn).clear(),i.forEach(s=>{this.notify({type:"removed",mutation:s})})})}getAll(){return Array.from(z(this,Yl))}find(i){const s={exact:!0,...i};return this.getAll().find(o=>o0(s,o))}findAll(i={}){return this.getAll().filter(s=>o0(i,s))}notify(i){Et.batch(()=>{this.listeners.forEach(s=>{s(i)})})}resumePausedMutations(){const i=this.getAll().filter(s=>s.state.isPaused);return Et.batch(()=>Promise.all(i.map(s=>s.continue().catch(Xt))))}},Yl=new WeakMap,Rn=new WeakMap,Co=new WeakMap,ty);function cu(n){var i;return(i=n.options.scope)==null?void 0:i.id}var kn,ny,s2=(ny=class extends Eo{constructor(i={}){super();ce(this,kn);this.config=i,J(this,kn,new Map)}build(i,s,o){const u=s.queryKey,f=s.queryHash??gh(u,s);let d=this.get(f);return d||(d=new e2({client:i,queryKey:u,queryHash:f,options:i.defaultQueryOptions(s),state:o,defaultOptions:i.getQueryDefaults(u)}),this.add(d)),d}add(i){z(this,kn).has(i.queryHash)||(z(this,kn).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){z(this,kn).get(i.queryHash)===i&&(i.destroy(),z(this,kn).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Et.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return z(this,kn).get(i)}getAll(){return[...z(this,kn).values()]}find(i){const s={exact:!0,...i};return this.getAll().find(o=>s0(s,o))}findAll(i={}){const s=this.getAll();return Object.keys(i).length>0?s.filter(o=>s0(i,o)):s}notify(i){Et.batch(()=>{this.listeners.forEach(s=>{s(i)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},kn=new WeakMap,ny),We,Il,Xl,Zi,Pi,Kl,Ji,Wi,ly,o2=(ly=class{constructor(n={}){ce(this,We);ce(this,Il);ce(this,Xl);ce(this,Zi);ce(this,Pi);ce(this,Kl);ce(this,Ji);ce(this,Wi);J(this,We,n.queryCache||new s2),J(this,Il,n.mutationCache||new i2),J(this,Xl,n.defaultOptions||{}),J(this,Zi,new Map),J(this,Pi,new Map),J(this,Kl,0)}mount(){uu(this,Kl)._++,z(this,Kl)===1&&(J(this,Ji,yh.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,We).onFocus())})),J(this,Wi,pu.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,We).onOnline())})))}unmount(){var n,i;uu(this,Kl)._--,z(this,Kl)===0&&((n=z(this,Ji))==null||n.call(this),J(this,Ji,void 0),(i=z(this,Wi))==null||i.call(this),J(this,Wi,void 0))}isFetching(n){return z(this,We).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return z(this,Il).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=z(this,We).get(i.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),s=z(this,We).build(this,i),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Pe(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(o))}getQueriesData(n){return z(this,We).findAll(n).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(n,i,s){var d;const o=this.defaultQueryOptions({queryKey:n}),u=(d=z(this,We).get(o.queryHash))==null?void 0:d.state.data,f=Fb(i,u);if(f!==void 0)return z(this,We).build(this,o).setData(f,{...s,manual:!0})}setQueriesData(n,i,s){return Et.batch(()=>z(this,We).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,i,s)]))}getQueryState(n){var s;const i=this.defaultQueryOptions({queryKey:n});return(s=z(this,We).get(i.queryHash))==null?void 0:s.state}removeQueries(n){const i=z(this,We);Et.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(n,i){const s=z(this,We);return Et.batch(()=>{const o=s.findAll(n),u=new Set(o);return o.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>u.has(f)},i)})}cancelQueries(n,i={}){const s={revert:!0,...i},o=Et.batch(()=>z(this,We).findAll(n).map(u=>u.cancel(s)));return Promise.all(o).then(Xt).catch(Xt)}invalidateQueries(n,i={}){return Et.batch(()=>(z(this,We).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},o=Et.batch(()=>z(this,We).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,s);return s.throwOnError||(f=f.catch(Xt)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(o).then(Xt)}async query(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const s=z(this,We).build(this,i),o=s.isStaleByTime(Pe(i.staleTime,s))?await s.fetch(i):s.state.data,u=i.select;return u?u(o):o}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const s=z(this,We).build(this,i);return s.isStaleByTime(Pe(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Xt).catch(Xt)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Xt).catch(Xt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return pu.isOnline()?z(this,Il).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,We)}getMutationCache(){return z(this,Il)}getDefaultOptions(){return z(this,Xl)}setDefaultOptions(n){J(this,Xl,n)}setQueryDefaults(n,i){z(this,Zi).set(mo(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...z(this,Zi).values()],s={};return i.forEach(o=>{es(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,i){z(this,Pi).set(mo(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...z(this,Pi).values()],s={};return i.forEach(o=>{es(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const i={...z(this,Xl).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=gh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===ph&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...z(this,Xl).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){z(this,We).clear(),z(this,Il).clear()}},We=new WeakMap,Il=new WeakMap,Xl=new WeakMap,Zi=new WeakMap,Pi=new WeakMap,Kl=new WeakMap,Ji=new WeakMap,Wi=new WeakMap,ly);const Sy=T.createContext(!1),r2=()=>T.useContext(Sy);Sy.Provider;function u2(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const c2=T.createContext(u2()),f2=()=>T.useContext(c2),d2=(n,i,s)=>{const o=(s==null?void 0:s.state.status)==="error"&&typeof n.throwOnError=="function"?dy(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||o)&&(i.isReset()||(n.retryOnMount=!1))},h2=n=>{T.useEffect(()=>{n.clearReset()},[n])},m2=({result:n,errorResetBoundary:i,throwOnError:s,query:o,suspense:u})=>n.isError&&!i.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||dy(s,[n.error,o])),g2=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>s(o(...u)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},p2=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,v2=(n,i,s)=>i.fetchOptimistic(n).catch(()=>{s.clearReset()});function xy(n,i,s){const o=r2(),u=f2(),f=sy(),d=f.defaultQueryOptions(n),g=f.getQueryCache().get(d.queryHash),p=n.subscribed!==!1;d._optimisticResults=o?"isRestoring":p?"optimistic":void 0,g2(d),d2(d,u,g),h2(u);const[S]=T.useState(()=>new i(f,d)),y=S.getOptimisticResult(d),v=!o&&p;if(T.useSyncExternalStore(T.useCallback(b=>{const C=v?S.subscribe(Et.batchCalls(b)):Xt;return S.updateResult(),C},[S,v]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),T.useEffect(()=>{S.setOptions(d)},[d,S]),p2(d,y))throw v2(d,S,u);if(m2({result:y,errorResetBoundary:u,throwOnError:d.throwOnError,query:g,suspense:d.suspense}))throw y.error;return d.notifyOnChangeProps?y:S.trackResult(y)}function ta(n,i){return xy(n,yy)}function y2(n,i){return xy(n,n2)}var by=ay();/**
48
+ `+a.stack}}var Me=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,Ct=n.unstable_shouldYield,st=n.unstable_requestPaint,et=n.unstable_now,Yn=n.unstable_getCurrentPriorityLevel,Dl=n.unstable_ImmediatePriority,ja=n.unstable_UserBlockingPriority,Ea=n.unstable_NormalPriority,Jr=n.unstable_LowPriority,Mi=n.unstable_IdlePriority,Wr=n.log,fe=n.unstable_setDisableYieldValue,Pe=null,nt=null;function bn(e){if(typeof Wr=="function"&&fe(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Pe,e)}catch{}}var Xt=Math.clz32?Math.clz32:In,ec=Math.log,Ri=Math.LN2;function In(e){return e>>>=0,e===0?32:31-(ec(e)/Ri|0)|0}var Na=256,_a=262144,Ma=4194304;function dl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var o=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=a&134217727;return S!==0?(a=S&~c,a!==0?o=dl(a):(g&=S,g!==0?o=dl(g):l||(l=S&~e,l!==0&&(o=dl(l))))):(S=a&~c,S!==0?o=dl(S):g!==0?o=dl(g):l||(l=a&~e,l!==0&&(o=dl(l)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:o}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dm(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Xt(l),o=1<<a;t|=e[a],l&=~o}return t}function yx(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 hm(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function tc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ti(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xx(e,t,l,a,o,c){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(l=g&~l;0<l;){var Q=31-Xt(l),K=1<<Q;S[Q]=0,_[Q]=-1;var U=B[Q];if(U!==null)for(B[Q]=null,Q=0;Q<U.length;Q++){var q=U[Q];q!==null&&(q.lane&=-536870913)}l&=~K}a!==0&&mm(e,a,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function mm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function gm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Xt(l),o=1<<a;o&t|e[a]&t&&(e[a]|=t),l&=~o}}function pm(e,t){var l=t&-t;return l=(l&42)!==0?1:nc(l),(l&(e.suspendedLanes|t))!==0?0:l}function nc(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 lc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vm(){var e=me.p;return e!==0?e:(e=window.event,e===void 0?32:jv(e.type))}function ym(e,t){var l=me.p;try{return me.p=e,t()}finally{me.p=l}}var hl=Math.random().toString(36).slice(2),Ot="__reactFiber$"+hl,an="__reactProps$"+hl,ms="__reactContainer$"+hl,xm="__reactEvents$"+hl,Sx="__reactListeners$"+hl,bx="__reactHandles$"+hl,Sm="__reactResources$"+hl,Ai="__reactMarker$"+hl,eo="__reactLoad$"+hl;function to(e){delete e[Ot],delete e[an],delete e[Sx],delete e[bx]}function Ta(e){var t;if(t=e[Ot])return t;for(var l=e.parentNode;l;){if(t=l[ms]||l[Ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=av(e);e!==null;){if(l=e[Ot])return l;e=av(e)}return t}e=l,l=e.parentNode}return null}function gs(e){if(e=e[Ot]||e[ms]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ps(e){var t=e[Sm];return t||(t=e[Sm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Ai]=!0}function bm(e){e[eo]=void 0}var wm=new Set,Cm={};function Aa(e,t){vs(e,t),vs(e+"Capture",t)}function vs(e,t){for(Cm[e]=t,e=0;e<t.length;e++)wm.add(t[e])}var wx=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]*$"),jm={},Em={};function Cx(e){return Me.call(Em,e)?!0:Me.call(jm,e)?!1:wx.test(e)?Em[e]=!0:(jm[e]=!0,!1)}var Be=!1;function Nm(){var e=Be;return Be=!1,e}function no(e,t,l){if(Cx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function lo(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function ml(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ac(e){if(!e._valueTracker){var t=_m(e)?"checked":"value";e._valueTracker=jx(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=_m(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var Ex=/[\n"\\]/g;function wn(e){return e.replace(Ex,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sc(e,t,l,a,o,c,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?g==="number"&&e.value==t?ic(e,dn(e.value)):ic(e,dn(t)):l!=null?ic(e,dn(l)):a!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+dn(S):e.removeAttribute("name")}function Rm(e,t,l,a,o,c,g,S){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ac(e);return}l=l!=null?""+dn(l):"",t=t!=null?""+dn(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=S?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ac(e)}function ic(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ys(e,t,l,a){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&a&&(e[l].defaultSelected=!0)}else{for(l=""+dn(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Tm(e,t,l){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+dn(l):""}function Am(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(be(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=dn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ac(e)}function xs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nx=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 Om(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Nx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zm(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Be=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&l[o]!==a&&(Om(e,o,a),Be=!0)}else for(var c in t)t.hasOwnProperty(c)&&Om(e,c,t[c])}function rc(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 _x=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Mx=/^[\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 ao(e){return Mx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var oc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ss=null,bs=null;function Dm(e){var t=gs(e);if(t&&(e=t.stateNode)){var l=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(sc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var o=a[an]||null;if(!o)throw Error(r(90));sc(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Mm(a)}break e;case"textarea":Tm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ys(e,!!l.multiple,t,!1)}}}var cc=!1;function Hm(e,t,l){if(cc)return e(t,l);cc=!0;try{var a=e(t);return a}finally{if(cc=!1,(Ss!==null||bs!==null)&&(su(),Ss&&(t=Ss,e=bs,bs=Ss=null,Dm(t),e)))for(t=0;t<e.length;t++)Dm(e[t])}}function zi(e,t){var l=e.stateNode;if(l===null)return null;var a=l[an]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(gl)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{fc=!1}var Ll=null,dc=null,so=null;function Lm(){if(so)return so;var e,t=dc,l=t.length,a,o="value"in Ll?Ll.value:Ll.textContent,c=o.length;for(e=0;e<l&&t[e]===o[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===o[c-a];a++);return so=o.slice(e,1<a?1-a:void 0)}function io(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 ro(){return!0}function Um(){return!1}function Kt(e){function t(l,a,o,c,g){this._reactName=l,this._targetInst=o,this.type=a,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ro:Um,this.isPropagationStopped=Um,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Kt(Ul),Hi=z({},Ul,{view:0,detail:0}),Rx=Kt(Hi),hc,mc,Li,uo=z({},Hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Li&&(Li&&e.type==="mousemove"?(hc=e.screenX-Li.screenX,mc=e.screenY-Li.screenY):mc=hc=0,Li=e),hc)},movementY:function(e){return"movementY"in e?e.movementY:mc}}),Vm=Kt(uo),Tx=z({},uo,{dataTransfer:0}),Ax=Kt(Tx),Ox=z({},Hi,{relatedTarget:0}),gc=Kt(Ox),zx=z({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Kt(zx),Hx=z({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lx=Kt(Hx),Ux=z({},Ul,{data:0}),$m=Kt(Ux),Vx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$x={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"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fx[e])?!!t[e]:!1}function pc(){return Bx}var kx=z({},Hi,{key:function(e){if(e.key){var t=Vx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gx=Kt(kx),qx=z({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=Kt(qx),Qx=z({},Ul,{submitter:0}),Yx=Kt(Qx),Ix=z({},Hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Xx=Kt(Ix),Kx=z({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zx=Kt(Kx),Px=z({},uo,{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}),Jx=Kt(Px),Wx=z({},Ul,{newState:0,oldState:0,source:0}),eS=Kt(Wx),tS=[9,13,27,32],vc=gl&&"CompositionEvent"in window,Ui=null;gl&&"documentMode"in document&&(Ui=document.documentMode);var nS=gl&&"TextEvent"in window&&!Ui,Bm=gl&&(!vc||Ui&&8<Ui&&11>=Ui),km=" ",Gm=!1;function qm(e,t){switch(e){case"keyup":return tS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function lS(e,t){switch(e){case"compositionend":return Qm(t);case"keypress":return t.which!==32?null:(Gm=!0,km);case"textInput":return e=t.data,e===km&&Gm?null:e;default:return null}}function aS(e,t){if(ws)return e==="compositionend"||!vc&&qm(e,t)?(e=Lm(),so=dc=Ll=null,ws=!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 Bm&&t.locale!=="ko"?null:t.data;default:return null}}var sS={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 Ym(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sS[e.type]:t==="textarea"}function Im(e,t,l,a){Ss?bs?bs.push(a):bs=[a]:Ss=a,t=fu(t,"onChange"),0<t.length&&(l=new oo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Vi=null,$i=null;function iS(e){D0(e,0)}function co(e){var t=Oi(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var Km=!1;if(gl){var yc;if(gl){var xc="oninput"in document;if(!xc){var Zm=document.createElement("div");Zm.setAttribute("oninput","return;"),xc=typeof Zm.oninput=="function"}yc=xc}else yc=!1;Km=yc&&(!document.documentMode||9<document.documentMode)}function Pm(){Vi&&(Vi.detachEvent("onpropertychange",Jm),$i=Vi=null)}function Jm(e){if(e.propertyName==="value"&&co($i)){var t=[];Im(t,$i,e,uc(e)),Hm(iS,t)}}function rS(e,t,l){e==="focusin"?(Pm(),Vi=t,$i=l,Vi.attachEvent("onpropertychange",Jm)):e==="focusout"&&Pm()}function oS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co($i)}function uS(e,t){if(e==="click")return co(t)}function cS(e,t){if(e==="input"||e==="change")return co(t)}function fS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:fS;function Fi(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var o=l[a];if(!Me.call(t,o)||!hn(e[o],t[o]))return!1}return!0}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eg(e,t){var l=Wm(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wm(l)}}function tg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ng(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Sc(e.document)}return t}function bc(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 dS=gl&&"documentMode"in document&&11>=document.documentMode,Cs=null,wc=null,Bi=null,Cc=!1;function lg(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cc||Cs==null||Cs!==Sc(a)||(a=Cs,"selectionStart"in a&&bc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bi&&Fi(Bi,a)||(Bi=a,a=fu(wc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Cs)))}function Oa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var js={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},jc={},ag={};gl&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function za(e){if(jc[e])return jc[e];if(!js[e])return e;var t=js[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ag)return jc[e]=t[l];return e}var sg=za("animationend"),ig=za("animationiteration"),rg=za("animationstart"),hS=za("transitionrun"),mS=za("transitionstart"),gS=za("transitioncancel"),og=za("transitionend"),ug=new Map,Ec="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ec.push("scrollEnd");function Dn(e,t){ug.set(e,t),Aa(t,[e])}var pS=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Vn.identifierPrefix;var l=pS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function cg(e){if(e==null||typeof e=="string")return e;var t=null,l=qs;if(l!==null)for(var a=0;a<l.length;a++){var o=e[l[a]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function vl(e,t){return e=cg(e),t=cg(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var fo=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!==null&&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)},Cn=[],Es=0,Nc=0;function ho(){for(var e=Es,t=Nc=Es=0;t<e;){var l=Cn[t];Cn[t++]=null;var a=Cn[t];Cn[t++]=null;var o=Cn[t];Cn[t++]=null;var c=Cn[t];if(Cn[t++]=null,a!==null&&o!==null){var g=a.pending;g===null?o.next=o:(o.next=g.next,g.next=o),a.pending=o}c!==0&&fg(l,o,c)}}function mo(e,t,l,a){Cn[Es++]=e,Cn[Es++]=t,Cn[Es++]=l,Cn[Es++]=a,Nc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function _c(e,t,l,a){return mo(e,t,l,a),go(e)}function Da(e,t){return mo(e,null,null,t),go(e)}function fg(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var o=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Xt(l),e=c.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=l|536870912),c):null}function go(e){if(50<ur)throw ur=0,au=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ns={};function vS(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,l,a){return new vS(e,t,l,a)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=sn(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function dg(e,t){e.flags&=1206910978;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,l,a,o,c){var g=0;if(a=e,typeof a=="function")Mc(a)&&(g=1);else if(typeof a=="string")g=Qb(e,l,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case $e:return e=sn(31,l,t,o),e.elementType=$e,e.lanes=c,e;case ne:return Ha(l.children,o,c,t);case ie:g=8,o|=24;break;case Ce:return e=sn(12,l,t,o|2),e.elementType=Ce,e.lanes=c,e;case J:return e=sn(13,l,t,o),e.elementType=J,e.lanes=c,e;case ue:return e=sn(19,l,t,o),e.elementType=ue,e.lanes=c,e;case Ie:case A:return e=o|32,e=sn(30,l,t,e),e.elementType=A,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case ee:g=10;break e;case X:g=9;break e;case P:g=11;break e;case Ee:g=14;break e;case je:g=16,a=null;break e}g=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=sn(g,l,t,o),t.elementType=e,t.type=a,t.lanes=c,t}function Ha(e,t,l,a){return e=sn(7,e,a,t),e.lanes=l,e}function Rc(e,t,l){return e=sn(6,e,null,t),e.lanes=l,e}function hg(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,l){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mg=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var l=mg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:le(t)},mg.set(e,t),t)}return{value:e,source:t,stack:le(t)}}var _s=[],Ms=0,vo=null,ki=0,En=[],Nn=0,Vl=null,Kn=1,Zn="";function xl(e,t){_s[Ms++]=ki,_s[Ms++]=vo,vo=e,ki=t}function gg(e,t,l){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Vl=e;var a=Kn;e=Zn;var o=32-Xt(a)-1;a&=~(1<<o),l+=1;var c=32-Xt(t)+o;if(30<c){var g=o-o%5;c=(a&(1<<g)-1).toString(32),a>>=g,o-=g,Kn=1<<32-Xt(t)+o|l<<o|a,Zn=c+e}else Kn=1<<c|l<<o|a,Zn=e}function yo(e){e.return!==null&&(xl(e,1),gg(e,1,0))}function Ac(e){for(;e===vo;)vo=_s[--Ms],_s[Ms]=null,ki=_s[--Ms],_s[Ms]=null;for(;e===Vl;)Vl=En[--Nn],En[Nn]=null,Zn=En[--Nn],En[Nn]=null,Kn=En[--Nn],En[Nn]=null}function pg(e,t){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Kn=t.id,Zn=t.overflow,Vl=e}var Mt=null,lt=null,Re=!1,$l=null,_n=!1,Oc=Error(r(519));function Fl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(jn(t,e)),Oc}function vg(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ot]=e,t[an]=a,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<fr.length;l++)Ae(fr[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Rm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Am(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||V0(t.textContent,l)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Fl(e,!0)}function xo(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Mt=Mt.return}}function Rs(e){if(e!==Mt)return!1;if(!Re)return xo(e),Re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ud(e.type,e.memoizedProps)),l=!l),l&&lt&&Fl(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else t===27?(t=lt,na(e.type)?(e=yd,yd=null,lt=e):lt=t):lt=Mt?Rn(e.stateNode.nextSibling):null;return!0}function La(){lt=Mt=null,Re=!1}function zc(){var e=$l;return e!==null&&(un===null?un=e:un.push.apply(un,e),$l=null),e}function Gi(e){$l===null?$l=[e]:$l.push(e)}var Dc=Nt(null),Ua=null,Sl=null;function Bl(e,t,l){Ge(Dc,t._currentValue),t._currentValue=l}function bl(e){e._currentValue=Dc.current,ot(Dc)}function So(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Hc(e,t,l,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var g=o.child;c=c.firstContext;e:for(;c!==null;){var S=c;c=o;for(var _=0;_<t.length;_++)if(S.context===t[_]){c.lanes|=l,S=c.alternate,S!==null&&(S.lanes|=l),So(c.return,l,e),a||(g=null);break e}c=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=l,c=g.alternate,c!==null&&(c.lanes|=l),So(g,l,e),g=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,g=o.alternate,g!==null&&(g.lanes|=l),So(o.return,l,e),g=o.child,g=g!==null?g.sibling:null):g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Va(e,t,l,a){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;hn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===nn.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}o=o.return}return e!==null&&Hc(t,e,l,a),t.flags|=262144,e!==null}function bo(e){for(e=e.firstContext;e!==null;){if(!hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Ua=e,Sl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return yg(Ua,e)}function wo(e,t){return Ua===null&&$a(e),yg(e,t)}function yg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Sl===null){if(e===null)throw Error(r(308));Sl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sl=Sl.next=t;return l}var yS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},xS=n.unstable_scheduleCallback,SS=n.unstable_NormalPriority,yt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new yS,data:new Map,refCount:0}}function qi(e){e.refCount--,e.refCount===0&&xS(SS,function(){e.controller.abort()})}function xg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Qi=null;function bS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Yi=null,Uc=0,Fa=0,Ts=null;function wS(e,t){if(Yi===null){var l=Yi=[];Uc=0,Fa=ed(),Ts={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Uc++,t.then(Sg,Sg),t}function Sg(){if(--Uc===0&&(Qi=null,Yi!==null)){Ts!==null&&(Ts.status="fulfilled");var e=Yi;Yi=null,Fa=0,Ts=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),a}var bg=re.S;re.S=function(e,t){if(h0=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wS(e,t),Qi!==null)for(var l=Xs;l!==null;)xg(l,Qi),l=l.next;if(l=e.types,l!==null){for(var a=Xs;a!==null;)xg(a,l),a=a.next;if(Fa!==0){a=Qi,a===null&&(a=Qi=[]);for(var o=0;o<l.length;o++){var c=l[o];a.indexOf(c)===-1&&a.push(c)}}}bg!==null&&bg(e,t)};var Ba=Nt(null);function Vc(){var e=Ba.current;return e!==null?e:tt.pooledCache}function Co(e,t){t===null?Ge(Ba,Ba.current):Ge(Ba,t.pool)}function wg(){var e=Vc();return e===null?null:{parent:yt._currentValue,pool:e}}var As=Error(r(460)),$c=Error(r(474)),jo=Error(r(542)),Eo={then:function(){}};function Cg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Xn,Xn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e}throw Ga=t,As}}function ka(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ga=l,As):l}}var Ga=null;function Eg(){if(Ga===null)throw Error(r(459));var e=Ga;return Ga=null,e}function Ng(e){if(e===As||e===jo)throw Error(r(483))}var Os=null,Ii=0;function No(e){var t=Ii;return Ii+=1,Os===null&&(Os=[]),jg(Os,e,t)}function kl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===Y?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _g(e){function t($,O){if(e){var G=$.deletions;G===null?($.deletions=[O],$.flags|=16):G.push(O)}}function l($,O){if(!e)return null;for(;O!==null;)t($,O),O=O.sibling;return null}function a($){for(var O=new Map;$!==null;)$.key===null?O.set($.index,$):O.set($.key,$),$=$.sibling;return O}function o($,O){return $=yl($,O),$.index=0,$.sibling=null,$}function c($,O,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<O?($.flags|=2,O):G):($.flags|=134217730,O)):($.flags|=1048576,O)}function g($){return e&&$.alternate===null&&($.flags|=134217730),$}function S($,O,G,I){return O===null||O.tag!==6?(O=Rc(G,$.mode,I),O.return=$,O):(O=o(O,G),O.return=$,O)}function _($,O,G,I){var ce=G.type;return ce===ne?($=Q($,O,G.props.children,I,G.key),kl($,G),$):O!==null&&(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type)?(O=o(O,G.props),kl(O,G),O.return=$,O):(O=po(G.type,G.key,G.props,null,$.mode,I),kl(O,G),O.return=$,O)}function B($,O,G,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==G.containerInfo||O.stateNode.implementation!==G.implementation?(O=Tc(G,$.mode,I),O.return=$,O):(O=o(O,G.children||[]),O.return=$,O)}function Q($,O,G,I,ce){return O===null||O.tag!==7?(O=Ha(G,$.mode,I,ce),O.return=$,O):(O=o(O,G),O.return=$,O)}function K($,O,G){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Rc(""+O,$.mode,G),O.return=$,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case te:return G=po(O.type,O.key,O.props,null,$.mode,G),kl(G,O),G.return=$,G;case k:return O=Tc(O,$.mode,G),O.return=$,O;case je:return O=ka(O),K($,O,G)}if(be(O)||se(O))return O=Ha(O,$.mode,G,null),O.return=$,O;if(typeof O.then=="function")return K($,No(O),G);if(O.$$typeof===ee)return K($,wo($,O),G);_o($,O)}return null}function U($,O,G,I){var ce=O!==null?O.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return ce!==null?null:S($,O,""+G,I);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case te:return G.key===ce?_($,O,G,I):null;case k:return G.key===ce?B($,O,G,I):null;case je:return G=ka(G),U($,O,G,I)}if(be(G)||se(G))return ce!==null?null:Q($,O,G,I,null);if(typeof G.then=="function")return U($,O,No(G),I);if(G.$$typeof===ee)return U($,O,wo($,G),I);_o($,G)}return null}function q($,O,G,I,ce){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return $=$.get(G)||null,S(O,$,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case te:return $=$.get(I.key===null?G:I.key)||null,_(O,$,I,ce);case k:return $=$.get(I.key===null?G:I.key)||null,B(O,$,I,ce);case je:return I=ka(I),q($,O,G,I,ce)}if(be(I)||se(I))return $=$.get(G)||null,Q(O,$,I,ce,null);if(typeof I.then=="function")return q($,O,G,No(I),ce);if(I.$$typeof===ee)return q($,O,G,wo(O,I),ce);_o(O,I)}return null}function ae($,O,G,I){for(var ce=null,ze=null,ge=O,ve=O=0,bt=null;ge!==null&&ve<G.length;ve++){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var Le=U($,ge,G[ve],I);if(Le===null){ge===null&&(ge=bt);break}e&&ge&&Le.alternate===null&&t($,ge),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le,ge=bt}if(ve===G.length)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;ve<G.length;ve++)ge=K($,G[ve],I),ge!==null&&(O=c(ge,O,ve),ze===null?ce=ge:ze.sibling=ge,ze=ge);return Re&&xl($,ve),ce}for(ge=a(ge);ve<G.length;ve++)bt=q(ge,$,ve,G[ve],I),bt!==null&&(e&&(Le=bt.alternate,Le!==null&&ge.delete(Le.key===null?ve:Le.key)),O=c(bt,O,ve),ze===null?ce=bt:ze.sibling=bt,ze=bt);return e&&ge.forEach(function(ra){return t($,ra)}),Re&&xl($,ve),ce}function de($,O,G,I){if(G==null)throw Error(r(151));for(var ce=null,ze=null,ge=O,ve=O=0,bt=null,Le=G.next();ge!==null&&!Le.done;ve++,Le=G.next()){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var ra=U($,ge,Le.value,I);if(ra===null){ge===null&&(ge=bt);break}e&&ge&&ra.alternate===null&&t($,ge),O=c(ra,O,ve),ze===null?ce=ra:ze.sibling=ra,ze=ra,ge=bt}if(Le.done)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;!Le.done;ve++,Le=G.next())Le=K($,Le.value,I),Le!==null&&(O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return Re&&xl($,ve),ce}for(ge=a(ge);!Le.done;ve++,Le=G.next())Le=q(ge,$,ve,Le.value,I),Le!==null&&(e&&(bt=Le.alternate,bt!==null&&ge.delete(bt.key===null?ve:bt.key)),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return e&&ge.forEach(function(l2){return t($,l2)}),Re&&xl($,ve),ce}function _e($,O,G,I){if(typeof G=="object"&&G!==null&&G.type===ne&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case te:e:{for(var ce=G.key;O!==null;){if(O.key===ce){if(ce=G.type,ce===ne){if(O.tag===7){l($,O.sibling),I=o(O,G.props.children),kl(I,G),I.return=$,$=I;break e}}else if(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type){l($,O.sibling),I=o(O,G.props),kl(I,G),I.return=$,$=I;break e}l($,O);break}else t($,O);O=O.sibling}G.type===ne?(I=Ha(G.props.children,$.mode,I,G.key),kl(I,G),I.return=$,$=I):(I=po(G.type,G.key,G.props,null,$.mode,I),kl(I,G),I.return=$,$=I)}return g($);case k:e:{for(ce=G.key;O!==null;){if(O.key===ce)if(O.tag===4&&O.stateNode.containerInfo===G.containerInfo&&O.stateNode.implementation===G.implementation){l($,O.sibling),I=o(O,G.children||[]),I.return=$,$=I;break e}else{l($,O);break}else t($,O);O=O.sibling}I=Tc(G,$.mode,I),I.return=$,$=I}return g($);case je:return G=ka(G),_e($,O,G,I)}if(be(G))return ae($,O,G,I);if(se(G)){if(ce=se(G),typeof ce!="function")throw Error(r(150));return G=ce.call(G),de($,O,G,I)}if(typeof G.then=="function")return _e($,O,No(G),I);if(G.$$typeof===ee)return _e($,O,wo($,G),I);_o($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,O!==null&&O.tag===6?(l($,O.sibling),I=o(O,G),I.return=$,$=I):(l($,O),I=Rc(G,$.mode,I),I.return=$,$=I),g($)):l($,O)}return function($,O,G,I){try{Ii=0;var ce=_e($,O,G,I);return Os=null,ce}catch(ge){if(ge===As||ge===jo)throw ge;var ze=sn(29,ge,null,$.mode);return ze.lanes=I,ze.return=$,ze}finally{}}}var qa=_g(!0),Mg=_g(!1),Gl=!1;function Fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(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 ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(qe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=go(e),fg(e,null,l),t}return mo(e,a,t,l),go(e)}function Xi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}function kc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var o=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?o=c=g:c=c.next=g,l=l.next}while(l!==null);c===null?o=c=t:c=c.next=t}else o=c=t;l={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Gc=!1;function Ki(){if(Gc){var e=Ts;if(e!==null)throw e}}function Zi(e,t,l,a){Gc=!1;var o=e.updateQueue;Gl=!1;var c=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var _=S,B=_.next;_.next=null,g===null?c=B:g.next=B,g=_;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==g&&(S===null?Q.firstBaseUpdate=B:S.next=B,Q.lastBaseUpdate=_))}if(c!==null){var K=o.baseState;g=0,Q=B=_=null,S=c;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(Oe&U)===U:(a&U)===U){U!==0&&U===Fa&&(Gc=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,de=S;U=t;var _e=l;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(_e,K,U);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,U=typeof ae=="function"?ae.call(_e,K,U):ae,U==null)break e;K=z({},K,U);break e;case 2:Gl=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=q,_=K):Q=Q.next=q,g|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);Q===null&&(_=K),o.baseState=_,o.firstBaseUpdate=B,o.lastBaseUpdate=Q,c===null&&(o.shared.lanes=0),Jl|=g,e.lanes=g,e.memoizedState=K}}function Rg(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Tg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Rg(l[e],t)}var Yl=Nt(null),Mo=Nt(0);function Ag(e,t){e=Nl,Ge(Mo,e),Ge(Yl,t),Nl=e|t.baseLanes}function qc(){Ge(Mo,Nl),Ge(Yl,Yl.current)}function Qc(){Nl=Mo.current,ot(Yl),ot(Mo)}var Dt=Nt(null),qt=null;function Il(e){var t=e.alternate;Ge(Ht,Ht.current&1),Ge(Dt,e),qt===null&&(t===null||Yl.current!==null||t.memoizedState!==null)&&(qt=e)}function Yc(e){Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)}function Og(e){e.tag===22?(Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)):Xl()}function Xl(){Ge(Ht,Ht.current),Ge(Dt,Dt.current)}function mn(e){ot(Dt),qt===e&&(qt=null),ot(Ht)}var Ht=Nt(0);function Pi(e,t){Ge(Dt,Dt.current),Ge(Ht,t)}function Ic(e){ot(Ht),ot(Dt),qt===e&&(qt=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pd(l)||vd(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 wl=0,Ne=null,Je=null,xt=null,To=!1,zs=!1,Qa=!1,Ao=0,Ji=0,Ds=null,jS=0;function mt(){throw Error(r(321))}function Xc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!hn(e[l],t[l]))return!1;return!0}function Kc(e,t,l,a,o,c){return wl=c,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?gp:pp,Qa=!1,c=l(a,o),Qa=!1,zs&&(c=Dg(t,l,a,o)),zg(e),c}function zg(e){re.H=Vo;var t=Je!==null&&Je.next!==null;if(wl=0,xt=Je=Ne=null,To=!1,Ji=0,Ds=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&bo(e)&&(St=!0))}function Dg(e,t,l,a){Ne=e;var o=0;do{if(zs&&(Ds=null),Ji=0,zs=!1,25<=o)throw Error(r(301));if(o+=1,xt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}re.H=OS,c=t(l,a)}while(zs);return c}function ES(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Zc(){var e=Ao!==0;return Ao=0,e}function Pc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Jc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}wl=0,xt=Je=Ne=null,zs=!1,Ji=Ao=0,Ds=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ne.memoizedState=xt=e:xt=xt.next=e,xt}function vt(){if(Je===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=xt===null?Ne.memoizedState:xt.next;if(t!==null)xt=t,Je=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},xt===null?Ne.memoizedState=xt=e:xt=xt.next=e}return xt}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Ji;return Ji+=1,Ds===null&&(Ds=[]),e=jg(Ds,e,t),t=Ne,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?gp:pp),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return zt(e)}throw Error(r(438,String(e)))}function Wc(e){var t=null,l=Ne.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Oo(),Ne.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=We;return t.index++,l}function Cl(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=vt();return ef(t,Je,e)}function ef(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var o=e.baseQueue,c=a.pending;if(c!==null){if(o!==null){var g=o.next;o.next=c.next,c.next=g}t.baseQueue=o=c,a.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var S=g=null,_=null,B=t,Q=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(wl&K)===K){var U=B.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Fa&&(Q=!0);else if((wl&U)===U){B=B.next,U===Fa&&(Q=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=K,g=c):_=_.next=K,Ne.lanes|=U,Jl|=U;K=B.action,Qa&&l(c,K),c=B.hasEagerState?B.eagerState:l(c,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=U,g=c):_=_.next=U,Ne.lanes|=K,Jl|=K;B=B.next}while(B!==null&&B!==t);if(_===null?g=c:_.next=S,!hn(c,e.memoizedState)&&(St=!0,Q&&(l=Ts,l!==null)))throw l;e.memoizedState=c,e.baseState=g,e.baseQueue=_,a.lastRenderedState=c}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function tf(e){var t=vt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,o=l.pending,c=t.memoizedState;if(o!==null){l.pending=null;var g=o=o.next;do c=e(c,g.action),g=g.next;while(g!==o);hn(c,t.memoizedState)||(St=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Hg(e,t,l){var a=Ne,o=vt(),c=Re;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var g=!hn((Je||o).memoizedState,l);if(g&&(o.memoizedState=l,St=!0),o=o.queue,af(Vg.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||g||xt!==null&&(xt.memoizedState.tag&1)!==0,Hs(e?9:8,{destroy:void 0},Ug.bind(null,a,o,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(wl&127)!==0||Lg(a,t,l)}return l}function Lg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ne.updateQueue,t===null?(t=Oo(),Ne.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ug(e,t,l,a){t.value=l,t.getSnapshot=a,$g(t)&&Fg(e)}function Vg(e,t,l){return l(function(){$g(t)&&Fg(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!hn(e,l)}catch{return!0}}function Fg(e){var t=Da(e,2);t!==null&&cn(t,e,2)}function nf(e){var t=Zt();if(typeof e=="function"){var l=e;if(e=l(),Qa){bn(!0);try{l()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:e},t}function Bg(e,t,l,a){return e.baseState=l,ef(e,Je,typeof a=="function"?a:Cl)}function NS(e,t,l,a,o){if(Uo(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};re.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,kg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function kg(e,t){var l=t.action,a=t.payload,o=e.state;if(t.isTransition){var c=re.T,g={};g.types=c!==null?c.types:null,re.T=g;try{var S=l(o,a),_=re.S;_!==null&&_(g,S),Gg(e,t,S)}catch(B){lf(e,t,B)}finally{c!==null&&g.types!==null&&(c.types=g.types),re.T=c}}else try{c=l(o,a),Gg(e,t,c)}catch(B){lf(e,t,B)}}function Gg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){qg(e,t,a)},function(a){return lf(e,t,a)}):qg(e,t,l)}function qg(e,t,l){t.status="fulfilled",t.value=l,Qg(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,kg(e,l)))}function lf(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qg(t),t=t.next;while(t!==a)}e.action=null}function Qg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yg(e,t){return t}function Ig(e,t){if(Re){var l=tt.formState;if(l!==null){e:{var a=Ne;if(Re){if(lt){t:{for(var o=lt,c=_n;o.nodeType!==8;){if(!c){o=null;break t}if(o=Rn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){lt=Rn(o.nextSibling),a=o.data==="F!";break e}}Fl(a)}a=!1}a&&(t=l[0])}}return l=Zt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yg,lastRenderedState:t},l.queue=a,l=dp.bind(null,Ne,a),a.dispatch=l,a=nf(!1),c=cf.bind(null,Ne,!1,a.queue),a=Zt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,l=NS.bind(null,Ne,o,c,l),o.dispatch=l,a.memoizedState=e,[t,l,!1]}function Xg(e){var t=vt();return Kg(t,Je,e)}function Kg(e,t,l){if(t=ef(e,t,Yg)[0],e=Do(Cl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Wi(t)}catch(g){throw g===As?jo:g}else a=t;t=vt();var o=t.queue,c=o.dispatch;return l!==t.memoizedState&&(Ne.flags|=2048,Hs(9,{destroy:void 0},_S.bind(null,o,l),null)),[a,c,e]}function _S(e,t){e.action=t}function Zg(e){var t=vt(),l=Je;if(l!==null)return Kg(t,l,e);vt(),t=t.memoizedState,l=vt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Hs(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Oo(),Ne.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Pg(){return vt().memoizedState}function Ho(e,t,l,a){var o=Zt();Ne.flags|=e,o.memoizedState=Hs(1|t,{destroy:void 0},l,a===void 0?null:a)}function Lo(e,t,l,a){var o=vt();a=a===void 0?null:a;var c=o.memoizedState.inst;Je!==null&&a!==null&&Xc(a,Je.memoizedState.deps)?o.memoizedState=Hs(t,c,l,a):(Ne.flags|=e,o.memoizedState=Hs(1|t,c,l,a))}function Jg(e,t){Ho(8390656,8,e,t)}function af(e,t){Lo(2048,8,e,t)}function MS(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Oo(),Ne.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Wg(e){var t=vt().memoizedState;return MS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ep(e,t){return Lo(4,2,e,t)}function tp(e,t){return Lo(4,4,e,t)}function np(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lp(e,t,l){l=l!=null?l.concat([e]):null,Lo(4,4,np.bind(null,t,e),l)}function sf(){}function ap(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Xc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function sp(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Xc(t,a[1]))return a[0];if(a=e(),Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a}function rf(e,t,l){return l===void 0||(wl&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=g0(),Ne.lanes|=e,Jl|=e,l)}function ip(e,t,l,a){return hn(l,t)?l:Yl.current!==null?(e=rf(e,l,a),hn(e,t)||(St=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(Oe&261930)===0?(St=!0,e.memoizedState=l):(e=g0(),Ne.lanes|=e,Jl|=e,t)}function rp(e,t,l,a,o){var c=me.p;me.p=c!==0&&8>c?c:8;var g=re.T,S={};S.types=g!==null?g.types:null,re.T=S,cf(e,!1,t,l);try{var _=o(),B=re.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=CS(_,a);er(e,t,Q,yn(e))}else er(e,t,a,yn(e))}catch(K){er(e,t,{then:function(){},status:"rejected",reason:K},yn())}finally{me.p=c,g!==null&&S.types!==null&&(g.types=S.types),re.T=g}}function RS(){}function of(e,t,l,a){if(e.tag!==5)throw Error(r(476));var o=op(e).queue;rp(e,o,t,rt,l===null?RS:function(){return up(e),l(a)})}function op(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function up(e){var t=op(e);t.next===null&&(t=e.alternate.memoizedState),er(e,t.next.queue,{},yn())}function uf(){return zt(ei)}function cp(){return vt().memoizedState}function fp(){return vt().memoizedState}function TS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=yn();e=ql(l);var a=Ql(t,e,l);a!==null&&(cn(a,t,l),Xi(a,t,l)),t={cache:Lc()},e.payload=t;return}t=t.return}}function AS(e,t,l){var a=yn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Uo(e)?hp(t,l):(l=_c(e,t,l,a),l!==null&&(cn(l,e,a),mp(l,t,a)))}function dp(e,t,l){var a=yn();er(e,t,l,a)}function er(e,t,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Uo(e))hp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,S=c(g,l);if(o.hasEagerState=!0,o.eagerState=S,hn(S,g))return mo(e,t,o,0),tt===null&&ho(),!1}catch{}finally{}if(l=_c(e,t,o,a),l!==null)return cn(l,e,a),mp(l,t,a),!0}return!1}function cf(e,t,l,a){if(a={lane:2,revertLane:ed(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uo(e)){if(t)throw Error(r(479))}else t=_c(e,l,a,2),t!==null&&cn(t,e,2)}function Uo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function hp(e,t){zs=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function mp(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}var Vo={readContext:zt,use:zo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt,useEffectEvent:mt},gp={readContext:zt,use:zo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Jg,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ho(4194308,4,np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var l=Zt();t=t===void 0?null:t;var a=e();if(Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Zt();if(l!==void 0){var o=l(t);if(Qa){bn(!0);try{l(t)}finally{bn(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=AS.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=nf(e);var t=e.queue,l=dp.bind(null,Ne,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:sf,useDeferredValue:function(e,t){var l=Zt();return rf(l,e,t)},useTransition:function(){var e=nf(!1);return e=rp.bind(null,Ne,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ne,o=Zt();if(Re){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),tt===null)throw Error(r(349));(Oe&127)!==0||Lg(a,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,Jg(Vg.bind(null,a,c,e),[e]),a.flags|=2048,Hs(9,{destroy:void 0},Ug.bind(null,a,c,l,t),null),l},useId:function(){var e=Zt(),t=tt.identifierPrefix;if(Re){var l=Zn,a=Kn;l=(a&~(1<<32-Xt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ao++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=jS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uf,useFormState:Ig,useActionState:Ig,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=cf.bind(null,Ne,!0,l),l.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return Zt().memoizedState=TS.bind(null,Ne)},useEffectEvent:function(e){var t=Zt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},pp={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Do,useRef:Pg,useState:function(){return Do(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=Do(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,t){var l=vt();return Bg(l,Je,e,t)},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg},OS={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:tf,useRef:Pg,useState:function(){return tf(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return Je===null?rf(l,e,t):ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=tf(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Zg,useActionState:Zg,useOptimistic:function(e,t){var l=vt();return Je!==null?Bg(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg};function ff(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:z({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var df={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=yn(),a=ql(l);a.tag=2,t!=null&&(a.callback=t),t=Ql(e,a,l),t!==null&&(cn(t,e,l),Xi(t,e,l))}};function vp(e,t,l,a,o,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,g):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,a)||!Fi(o,c):!0}function yp(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&df.enqueueReplaceState(t,t.state,null)}function Ya(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=z({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function xp(e){fo(e)}function Sp(e){console.error(e)}function bp(e){fo(e)}function $o(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function wp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function hf(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){$o(e,t)},l}function Cp(e){return e=ql(e),e.tag=3,e}function jp(e,t,l,a){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var c=a.value;e.payload=function(){return o(c)},e.callback=function(){wp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){wp(t,l,a),typeof o!="function"&&(Wl===null?Wl=new Set([this]):Wl.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function zS(e,t,l,a,o){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Va(t,l,o,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qt===null?iu():l.alternate===null&&gt===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Pf(e,a,o)),!1;case 22:return l.flags|=65536,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Pf(e,a,o)),!1}throw Error(r(435,l.tag))}return Pf(e,a,o),iu(),!1}if(Re)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Oc&&(e=Error(r(422),{cause:a}),Gi(jn(e,l)))):(a!==Oc&&(t=Error(r(423),{cause:a}),Gi(jn(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=jn(a,l),o=hf(e.stateNode,a,o),kc(e,o),gt!==4&&(gt=2)),!1;var c=Error(r(520),{cause:a});if(c=jn(c,l),or===null?or=[c]:or.push(c),gt!==4&&(gt=2),t===null)return!0;a=jn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=hf(l.stateNode,a,e),kc(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Wl===null||!Wl.has(c))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Cp(o),jp(o,e,l,a),kc(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var mf=Error(r(461)),St=!1;function jt(e,t,l,a){t.child=e===null?Mg(t,null,l,a):qa(t,e.child,l,a)}function Ep(e,t,l,a,o){l=l.render;var c=t.ref;if("ref"in a){var g={};for(var S in a)S!=="ref"&&(g[S]=a[S])}else g=a;return $a(t),a=Kc(e,t,l,g,c,o),S=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&S&&yo(t),t.flags|=1,jt(e,t,a,o),t.child)}function Np(e,t,l,a,o){if(e===null){var c=l.type;return typeof c=="function"&&!Mc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,_p(e,t,c,a,o)):(e=po(l.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!wf(e,o)){var g=c.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(g,a)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,e=yl(c,a),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,l,a,o){if(e!==null){var c=e.memoizedProps;if(Fi(c,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=c,wf(e,o))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,jl(e,t,o)}return gf(e,t,l,a,o)}function Mp(e,t,l,a){var o=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~c}else a=0,t.child=null;return Rp(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Co(t,c!==null?c.cachePool:null),c!==null?Ag(t,c):qc(),Og(t);else return a=t.lanes=536870912,Rp(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Co(t,c.cachePool),Ag(t,c),Xl(),t.memoizedState=null):(e!==null&&Co(t,null),qc(),Xl());return jt(e,t,o,l),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rp(e,t,l,a,o){var c=Vc();return c=c===null?null:{parent:yt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Co(t,null),qc(),Og(t),e!==null&&Va(e,t,a,!0),t.childLanes=o,null}function Fo(e,t){return t=Bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,l){return qa(t,e.child,null,l),e=Fo(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function DS(e,t,l){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(a.mode==="hidden")return e=Fo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},tr(null,e);if(Yc(t),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return t.lanes=536870912,null}return Fo(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Yc(t),o)if(t.flags&256)t.flags&=-257,t=Tp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||Va(e,t,l,!1),o=(l&e.childLanes)!==0,St||o){if(Yl.current===null){if(a=tt,a!==null&&(g=pm(a,l),g!==0&&g!==c.retryLane))throw c.retryLane=g,Da(e,g),cn(a,e,g),mf;iu()}t=Tp(e,t,l)}else e=c.treeContext,lt=Rn(g.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=Fo(t,a),t.flags|=134221824;return t}return e=yl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function gf(e,t,l,a,o){return $a(t),l=Kc(e,t,l,a,void 0,o),a=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,o),t.child)}function Ap(e,t,l,a,o,c){return $a(t),t.updateQueue=null,l=Dg(t,a,l,o),zg(e),a=Zc(),e!==null&&!St?(Pc(e,t,c),jl(e,t,c)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,c),t.child)}function Op(e,t,l,a,o){if($a(t),t.stateNode===null){var c=Ns,g=l.contextType;typeof g=="object"&&g!==null&&(c=zt(g)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=df,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Fc(t),g=l.contextType,c.context=typeof g=="object"&&g!==null?zt(g):Ns,c.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(ff(t,l,g,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&df.enqueueReplaceState(c,c.state,null),Zi(t,a,c,o),Ki(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var S=t.memoizedProps,_=Ya(l,S);c.props=_;var B=c.context,Q=l.contextType;g=Ns,typeof Q=="object"&&Q!==null&&(g=zt(Q));var K=l.getDerivedStateFromProps;Q=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||B!==g)&&yp(t,c,a,g),Gl=!1;var U=t.memoizedState;c.state=U,Zi(t,a,c,o),Ki(),B=t.memoizedState,S||U!==B||Gl?(typeof K=="function"&&(ff(t,l,K,a),B=t.memoizedState),(_=Gl||vp(t,l,_,a,U,B,g))?(Q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=B),c.props=a,c.state=B,c.context=g,a=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Bc(e,t),g=t.memoizedProps,Q=Ya(l,g),c.props=Q,K=t.pendingProps,U=c.context,B=l.contextType,_=Ns,typeof B=="object"&&B!==null&&(_=zt(B)),S=l.getDerivedStateFromProps,(B=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==K||U!==_)&&yp(t,c,a,_),Gl=!1,U=t.memoizedState,c.state=U,Zi(t,a,c,o),Ki();var q=t.memoizedState;g!==K||U!==q||Gl||e!==null&&e.dependencies!==null&&bo(e.dependencies)?(typeof S=="function"&&(ff(t,l,S,a),q=t.memoizedState),(Q=Gl||vp(t,l,Q,a,U,q,_)||e!==null&&e.dependencies!==null&&bo(e.dependencies))?(B||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,q,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,q,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=q),c.props=a,c.state=q,c.context=_,a=Q):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Ls(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=qa(t,e.child,null,o),t.child=qa(t,null,l,o)):jt(e,t,l,o),t.memoizedState=c.state,e=t.child):e=jl(e,t,o),e}function zp(e,t,l,a){return La(),t.flags|=256,jt(e,t,l,a),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(e){return{baseLanes:e,cachePool:wg()}}function yf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=vn),e}function Dp(e,t,l){var a=t.pendingProps,o=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ht.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Il(t):Xl(),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return vd(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,o?(Xl(),o=t.mode,c=Bo({mode:"hidden",children:c},o),a=Ha(a,o,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=vf(l),a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(null,a)):(Il(t),xf(t,c))}var S=e.memoizedState;if(S!==null){var _=S.dehydrated;if(_!==null)return HS(e,t,c,g,a,_,S,l)}return o?(Xl(),o=a.fallback,c=t.mode,S=e.child,_=S.sibling,a=yl(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&1206910976,_!==null?o=yl(_,o):(o=Ha(o,c,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,tr(null,a),a=t.child,o=e.child.memoizedState,o===null?o=vf(l):(c=o.cachePool,c!==null?(S=yt._currentValue,c=c.parent!==S?{parent:S,pool:S}:c):c=wg(),o={baseLanes:o.baseLanes|l,cachePool:c}),a.memoizedState=o,a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(e.child,a)):(Il(t),l=e.child,e=l.sibling,l=yl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function xf(e,t){return t=Bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bo(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function ko(e,t,l){return qa(t,e.child,null,l),e=xf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HS(e,t,l,a,o,c,g,S){if(l)return t.flags&256?(Il(t),t.flags&=-257,ko(e,t,S)):t.memoizedState!==null?(Xl(),t.child=e.child,t.flags|=128,null):(Xl(),c=o.fallback,g=t.mode,o=Bo({mode:"visible",children:o.children},g),c=Ha(c,g,S,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,qa(t,e.child,null,S),o=t.child,o.memoizedState=vf(S),o.childLanes=yf(e,a,S),t.memoizedState=pf,tr(null,o));if(Il(t),vd(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var _=a.dgst;return a=_,a!==""&&(o=Error(r(419)),o.stack="",o.digest=a,Gi({value:o,source:null,stack:null})),ko(e,t,S)}if(St||Va(e,t,S,!1),a=(S&e.childLanes)!==0,St||a){if(Yl.current!==null)return ko(e,t,S);if(a=tt,a!==null&&(o=pm(a,S),o!==0&&o!==g.retryLane))throw g.retryLane=o,Da(e,o),cn(a,e,o),mf;return pd(c)||iu(),ko(e,t,S)}return pd(c)?(t.flags|=192,t.child=e.child,null):(e=g.treeContext,lt=Rn(c.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=xf(t,o.children),t.flags|=134221824,t)}function Hp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),So(e.return,t,l)}function Lp(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ro(l)===null&&(t=e),e=e.sibling}return t}function Go(e,t,l,a,o,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:o,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=o,g.treeForkCount=c)}function Sf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function bf(e,t,l){var a=t.pendingProps,o=a.revealOrder,c=a.tail;a=a.children;var g=Ht.current;if(t.flags&128)return Pi(t,g),null;var S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,Pi(t,g),o==="backwards"&&e!==null?(Sf(e),jt(e,t,a,l),Sf(e)):jt(e,t,a,l),a=Re?ki:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,l,t);else if(e.tag===19)Hp(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Sf(t)),Go(t,!0,o,null,c,a);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ro(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Go(t,!0,l,null,c,a);break;case"together":Go(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Go(t,!1,o,l,c,a)}return t.child}function Up(e,t,l){var a=t.pendingProps;return Bl(t,t.type,a.value),jt(e,t,a.children,l),t.child}function jl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function wf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bo(e)))}function LS(e,t,l){switch(t.tag){case 3:qn(t,t.stateNode.containerInfo),Bl(t,yt,e.memoizedState.cache),La();break;case 27:case 5:fl(t);break;case 4:qn(t,t.stateNode.containerInfo);break;case 10:Bl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Il(t),t.flags|=128,null;a=Va(e,t,l,!1);var o=t.child.childLanes;return a||(l&o)!==0?Dp(e,t,l):(Il(t),e=jl(e,t,l),e!==null?e.sibling:null)}Il(t);break;case 19:if(t.flags&128)return bf(e,t,l);if(o=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(Va(e,t,l,!1),a=(l&t.childLanes)!==0),o){if(a)return bf(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Pi(t,Ht.current),a)break;return null;case 22:return t.lanes=0,Mp(e,t,l,t.pendingProps);case 24:Bl(t,yt,e.memoizedState.cache)}return jl(e,t,l)}function Vp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!wf(e,l)&&(t.flags&128)===0)return St=!1,LS(e,t,l);St=(e.flags&131072)!==0}else St=!1,Re&&(t.flags&1048576)!==0&&gg(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")Mc(e)?(a=Ya(e,a),t.tag=1,t=Op(null,t,e,a,l)):(t.tag=0,t=gf(null,t,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===P){t.tag=11,t=Ep(null,t,e,a,l);break e}else if(o===Ee){t.tag=14,t=Np(null,t,e,a,l);break e}else if(o===ee){t.tag=10,t.type=e,t=Up(null,t,l);break e}}throw t=ye(e)||e,Error(r(306,t,""))}}return t;case 0:return gf(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,o=Ya(a,t.pendingProps),Op(e,t,a,o,l);case 3:e:{if(qn(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;o=c.element,Bc(e,t),Zi(t,a,null,l);var g=t.memoizedState;if(a=g.cache,Bl(t,yt,a),a!==c.cache&&Hc(t,[yt],l,!0),Ki(),a=g.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=zp(e,t,a,l);break e}else if(a!==o){o=jn(Error(r(424)),t),Gi(o),t=zp(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(lt=Rn(e.firstChild),Mt=t,Re=!0,$l=null,_n=!0,l=Mg(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(La(),a===o){t=jl(e,t,l);break e}jt(e,t,a,l)}t=t.child}return t;case 26:return Ls(e,t),e===null?(l=uv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Re||(t.stateNode=k0(t.type,t.pendingProps,At.current,t)):t.memoizedState=uv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fl(t),e===null&&Re&&(a=t.stateNode=sv(t.type,t.pendingProps,At.current),Mt=t,_n=!0,o=lt,na(t.type)?(yd=o,lt=Rn(a.firstChild)):lt=o),jt(e,t,t.pendingProps.children,l),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=lt)&&(a=Tb(a,t.type,t.pendingProps,_n),a!==null?(t.stateNode=a,Mt=t,lt=Rn(a.firstChild),_n=!1,o=!0):o=!1),o||Fl(t)),fl(t),o=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,ud(o,c)?a=null:g!==null&&ud(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Kc(e,t,ES,null,null,l),ei._currentValue=o),Ls(e,t),jt(e,t,a,l),t.child;case 6:return e===null&&Re&&((e=l=lt)&&(l=Ab(l,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,lt=null,e=!0):e=!1),e||Fl(t)),null;case 13:return Dp(e,t,l);case 4:return qn(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=qa(t,null,a,l):jt(e,t,a,l),t.child;case 11:return Ep(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Ls(e,t),jt(e,t,a,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return Up(e,t,l);case 9:return o=t.type._context,a=t.pendingProps.children,$a(t),o=zt(o),a=a(o),t.flags|=1,jt(e,t,a,l),t.child;case 14:return Np(e,t,t.type,t.pendingProps,l);case 15:return _p(e,t,t.type,t.pendingProps,l);case 19:return bf(e,t,l);case 31:return DS(e,t,l);case 22:return Mp(e,t,l,t.pendingProps);case 24:return $a(t),a=zt(yt),e===null?(o=Vc(),o===null&&(o=tt,c=Lc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=l),o=c),t.memoizedState={parent:a,cache:o},Fc(t),Bl(t,yt,o)):((e.lanes&l)!==0&&(Bc(e,t),Zi(t,null,null,l),Ki()),o=e.memoizedState,c=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Bl(t,yt,a)):(a=c.cache,Bl(t,yt,a),a!==o.cache&&Hc(t,[yt],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Re&&yo(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Ls(e,t),jt(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function El(e){e.flags|=4}function Cf(e,t,l,a,o){var c;if((c=(e.mode&32)!==0)&&(c=l===null?hv(t,a):hv(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(x0())e.flags|=8192;else throw Ga=Eo,$c}else e.flags&=-16777217}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mv(t))if(x0())e.flags|=8192;else throw Ga=Eo,$c}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hm():536870912,e.lanes|=t,Bs|=t)}function nr(e,t){if(!Re)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags&1206910976,a|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function US(e,t,l){var a=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),bl(yt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?El(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zc())),at(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(El(t),c!==null?(at(t),$p(t,c)):(at(t),Cf(t,o,null,a,l))):c?c!==e.memoizedState?(El(t),at(t),$p(t,c)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&El(t),at(t),Cf(t,o,e,a,l)),null;case 27:if(It(t),l=At.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}e=pt.current,Rs(t)?vg(t):(e=sv(o,a,l),t.stateNode=e,El(t))}return at(t),t.subtreeFlags&=-33554433,null;case 5:if(It(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}if(c=pt.current,Rs(t))vg(t);else{var g=hr(At.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?g.createElement(o,{is:a.is}):g.createElement(o)}}c[Ot]=t,c[an]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Ut(c,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&El(t)}}return at(t),t.subtreeFlags&=-33554433,Cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=At.current,Rs(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,o=Mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||V0(e.nodeValue,l)),e||Fl(t,!0)}else e=hr(e).createTextNode(a),e[Ot]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rs(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Rs(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else o=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),qo(t,t.updateQueue),at(t),null);case 4:return ut(),e===null&&ad(t.stateNode.containerInfo),t.flags|=67108864,at(t),null;case 10:return bl(t.type),at(t),null;case 19:if(Ic(t),a=t.memoizedState,a===null)return at(t),null;if(o=(t.flags&128)!==0,c=a.rendering,c===null)if(o)nr(a,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ro(e),c!==null){for(t.flags|=128,nr(a,!1),e=c.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dg(l,e),l=l.sibling;return Pi(t,Ht.current&1|2),Re&&xl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&et()>nu&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ro(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),nr(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Re)return at(t),null}else 2*et()-a.renderingStartTime>nu&&l!==536870912&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=et(),e.sibling=null,c=Ht.current,c=o?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Re?Pi(t,c):(l=c,Ge(Dt,t),Ge(Ht,l),qt===null&&(qt=t)),Re&&xl(t,a.treeForkCount),e}return at(t),null;case 22:case 23:return mn(t),Qc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),l=t.updateQueue,l!==null&&qo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&ot(Ba),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),bl(yt),at(t),null;case 25:return null;case 30:return t.flags|=33554432,at(t),null}throw Error(r(156,t.tag))}function VS(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(yt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ic(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ut(),null;case 10:return bl(t.type),null;case 22:case 23:return mn(t),Qc(),e!==null&&ot(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return bl(yt),null;case 25:return null;default:return null}}function Fp(e,t){switch(Ac(t),t.tag){case 3:bl(yt),ut();break;case 26:case 27:case 5:It(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:Ic(t);break;case 10:bl(t.type);break;case 22:case 23:mn(t),Qc(),e!==null&&ot(Ba);break;case 24:bl(yt)}}function lr(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var o=a.next;l=o;do{if((l.tag&e)===e){a=void 0;var c=l.create,g=l.inst;a=c(),g.destroy=a}l=l.next}while(l!==o)}}catch(S){Ke(t,t.return,S)}}function Kl(e,t,l){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var c=o.next;a=c;do{if((a.tag&e)===e){var g=a.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=l,B=S;try{B()}catch(Q){Ke(o,_,Q)}}}a=a.next}while(a!==c)}}catch(Q){Ke(t,t.return,Q)}}function Bp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Tg(t,l)}catch(a){Ke(e,e.return,a)}}}function kp(e,t,l){l.props=Ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ke(e,t,a)}}function Pn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var o=e.stateNode,c=pl(e.memoizedProps,o);(o.ref===null||o.ref.name!==c)&&(o.ref=K0(c)),a=o.ref;break;case 7:if(e.stateNode===null){var g=new xn(e);v(e.child,!1,Mb,g,void 0,void 0),e.stateNode=g}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(S){Ke(e,t,S)}}function Lt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Ke(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){Ke(e,t,o)}else l.current=null}function Qo(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)tv(e.stateNode,t[l])}function Gp(e){for(var t=e.return;t!==null&&(Ef(t)&&tv(e.stateNode,t.stateNode),!jf(t));)t=t.return}function ar(e){for(var t=e.return;t!==null&&(Ef(t)&&Rb(e.stateNode,t.stateNode),!jf(t));)t=t.return}function jf(e){return e.tag===5||e.tag===3||e.tag===27}function Ef(e){return e&&e.tag===7&&e.stateNode!==null}function Nf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(o){Ke(e,e.return,o)}}function _f(e,t,l){try{var a=e.stateNode;cb(a,e.type,l,t),a[an]=t}catch(o){Ke(e,e.return,o)}}function qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&na(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qp(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&&na(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rf(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Xn)),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Rf(e,t,l,a),e=e.sibling;e!==null;)Rf(e,t,l,a),e=e.sibling}function Yo(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Yo(e,t,l,a),e=e.sibling;e!==null;)Yo(e,t,l,a),e=e.sibling}function Qp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ut(t,a,l),t[Ot]=e,t[an]=l}catch(c){Ke(e,e.return,c)}}var Io=!1,gn=null;function Yp(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Io=!0)}var Jn=null;function Ip(){var e=Jn;return Jn=null,e}var rn=0;function Us(e,t,l,a,o){return rn=0,Xp(e.child,t,l,a,o)}function Xp(e,t,l,a,o){for(var c=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(a!==null){var S=dd(g);a.push(S),S.view&&(c=!0)}else c||dd(g).view&&(c=!0);Io=!0,I0(g,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Xp(e.child,t,l,a,o)&&(c=!0));e=e.sibling}return c}function Wn(e,t){for(;e!==null;)e.tag===5?X0(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Xo(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xo(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=vl(t.default,t.share),t!=="none"&&(Us(e,l,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function Tf(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,o=pl(a,l),c=vl(a.default,l.paired?a.share:a.enter);c!=="none"?Us(e,o,c,null,!1)?(Xo(e),l.paired||t||Qs(e,a.onEnter)):Wn(e.child,!1):Xo(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Tf(e,t),e=e.sibling;else Xo(e)}function Af(e){if(gn!==null&&gn.size!==0){var t=gn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var o=t.get(a);if(o!==void 0){var c=vl(l.default,l.share);if(c!=="none"&&(Us(e,a,c,null,!1)?(c=e.stateNode,o.paired=c,c.paired=o,Qs(e,l.onShare)):Wn(e.child,!1)),t.delete(a),t.size===0)break}}}Af(e)}e=e.sibling}}}function Of(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),a=gn!==null?gn.get(l):void 0,o=vl(t.default,a!==void 0?t.share:t.exit);o!=="none"&&(Us(e,l,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,gn.delete(l),Qs(e,t.onShare)):Qs(e,t.onExit):Wn(e.child,!1)),gn!==null&&Af(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Of(e),e=e.sibling;else gn!==null&&Af(e)}function Kp(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode);t=vl(t.default,t.update),e.flags&=-5,t!=="none"&&Us(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Kp(e);e=e.sibling}}function zf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}zf(e)}e=e.sibling}}function Ko(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),zf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ko(e),e=e.sibling;else zf(e)}function Zp(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Zp(e),e=e.sibling}function Df(e,t,l,a,o,c,g){for(var S=!1;t!==null;){if(t.tag===5){var _=t.stateNode;if(c!==null&&rn<c.length){var B=c[rn],Q=dd(_);(B.view||Q.view)&&(S=!0);var K;if(K=(e.flags&4)===0)if(Q.clip)K=!0;else{K=B.rect;var U=Q.rect;K=K.y!==U.y||K.x!==U.x||K.height!==U.height||K.width!==U.width}K&&(e.flags|=4),Q.abs?Q=!B.abs:(B=B.rect,Q=Q.rect,Q=B.height!==Q.height||B.width!==Q.width),Q&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&I0(_,rn===0?l:l+"_"+rn,o),S&&(e.flags&4)!==0||(Jn===null&&(Jn=[]),Jn.push(_,rn===0?a:a+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&g?e.flags|=t.flags&32:Df(e,t.child,l,a,o,c,g)&&(S=!0));t=t.sibling}return S}function Pp(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,o=pl(l,a),c=vl(l.default,l.update),g;g=e.memoizedState,e.memoizedState=null,a=e;var S=e.child;rn=0,o=Df(a,S,o,o,c,g,!1),(e.flags&4)!==0&&o&&Qs(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Pp(e);e=e.sibling}}var Rt=!1,Ye=!1,el=!1,Hf=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,Tt=null,tl=!1,sr=!1,Zo=!1,Lf=!1;function $S(e,t,l){if(e=e.containerInfo,rd=ti,e=ng(e),bc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var c=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,_=-1,B=-1,Q=0,K=0,U=e,q=null;t:for(;;){for(var ae;U!==a||c!==0&&U.nodeType!==3||(_=S+c),U!==g||o!==0&&U.nodeType!==3||(B=S+o),U.nodeType===3&&(S+=U.nodeValue.length),(ae=U.firstChild)!==null;)q=U,U=ae;for(;;){if(U===e)break t;if(q===a&&++Q===c&&(_=S),q===g&&++K===o&&(B=S),(ae=U.nextSibling)!==null)break;U=q,q=U.parentNode}U=ae}a=_===-1||B===-1?null:{start:_,end:B}}else a=null}a=a||{start:0,end:0}}else a=null;for(od={focusedElem:e,selectionRange:a},ti=!1,l=(l&335544064)===l,Tt=t,t=l?9270:1024;Tt!==null;){if(e=Tt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&Of(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&Yp(e),Po(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&Of(a),Po(l);continue}else if(a!==null&&a.memoizedState!==null){l&&Yp(e),Po(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Tt=a):(l&&Kp(e),Po(l))}}gn=null}function Po(e){for(;Tt!==null;){var t=Tt,l=e,a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&a!==null){l=void 0,o=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var g=Ya(t.type,o);l=c.getSnapshotBeforeUpdate(g,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(S){Ke(t,t.return,S)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)gd(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":gd(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=pl(a.memoizedProps,a.stateNode),o=t.memoizedProps,o=vl(o.default,o.update),o!=="none"&&Us(a,l,o,a.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Tt=a;break}Tt=t.return}}function Wp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:nl(e,l),a&4&&lr(5,l);break;case 1:if(nl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Ke(l,l.return,g)}else{var o=Ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ke(l,l.return,g)}}a&64&&Bp(l),a&512&&Pn(l,l.return);break;case 3:if(nl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Tg(e,t)}catch(g){Ke(l,l.return,g)}}break;case 27:t===null&&a&4&&Qp(l);case 26:case 5:nl(e,l),t===null&&a&4&&Nf(l),a&512&&Pn(l,l.return);break;case 12:nl(e,l);break;case 31:nl(e,l),a&4&&l0(e,l);break;case 13:nl(e,l),a&4&&a0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=PS.bind(null,l),Ob(e,l))));break;case 22:if(a=l.memoizedState!==null||Rt,!a){var c=t!==null&&t.memoizedState!==null||Ye;t=Rt,o=Ye,Rt=a,(Ye=c)&&!o?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Un(e,l,a)):nl(e,l),Rt=t,Ye=o}break;case 30:nl(e,l),a&512&&Pn(l,l.return);break;case 7:a&512&&Pn(l,l.return);default:nl(e,l)}}function Uf(e,t){for(e=e.child;e!==null;)e0(e,t),e=e.sibling}function e0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var o=e.stateNode,c=e.memoizedProps.style,g=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(_){Ke(e,e.return,_)}Vf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(_){Ke(e,e.return,_)}break;case 18:try{var S=e.stateNode;t?Y0(S,!0):Y0(e.stateNode,!1)}catch(_){Ke(e,e.return,_)}break;case 22:case 23:e.memoizedState===null&&Uf(e,t);break;default:Uf(e,t)}}function Vf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:e0(l,a);break e;case 22:l.memoizedState===null&&Vf(l,a);break e;default:Vf(l,a)}}e=e.sibling}}function t0(e){var t=e.alternate;t!==null&&(e.alternate=null,t0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&to(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 ct=null,on=!1;function Hn(e,t,l){for(l=l.child;l!==null;)n0(e,t,l),l=l.sibling}function n0(e,t,l){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Pe,l)}catch{}switch(l.tag){case 26:Ye||Lt(l,t),Hn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ye&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ye||Lt(l,t),ar(l);var a=ct,o=on;na(l.type)&&(ct=l.stateNode,on=!1),Hn(e,t,l),iv(l.stateNode,l.type,l.memoizedProps),ct=a,on=o;break;case 5:Ye||Lt(l,t),ar(l);case 6:if(l.tag===6&&ar(l),a=ct,o=on,ct=null,Hn(e,t,l),ct=a,on=o,ct!==null)if(on)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}else try{ct.removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}break;case 18:ct!==null&&(on?(e=ct,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ni(e)):Q0(ct,l.stateNode));break;case 4:a=ct,o=on,ct=l.stateNode.containerInfo,on=!0,Hn(e,t,l),ct=a,on=o;break;case 0:case 11:case 14:case 15:Kl(2,l,t),Ye||Kl(4,l,t),Hn(e,t,l);break;case 1:Ye||(Lt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&kp(l,t,a)),Hn(e,t,l);break;case 21:Hn(e,t,l);break;case 22:Ye=(a=Ye)||l.memoizedState!==null,Hn(e,t,l),Ye=a;break;case 30:Lt(l,t),Hn(e,t,l);break;case 7:Ye||Lt(l,t),Hn(e,t,l);break;default:Hn(e,t,l)}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ni(e)}catch(l){Ke(t,t.return,l)}}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ni(e)}catch(l){Ke(t,t.return,l)}}function FS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jp),t;default:throw Error(r(435,e.tag))}}function Jo(e,t){var l=FS(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var o=JS.bind(null,e,a);a.then(o,o)}})}function Pt(e,t,l){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var c=a[o],g=e,S=t,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(na(_.type)){ct=_.stateNode,on=!1;break e}break;case 5:ct=_.stateNode,on=!1;break e;case 3:case 4:ct=_.stateNode.containerInfo,on=!0;break e}_=_.return}if(ct===null)throw Error(r(160));n0(g,S,c),ct=null,on=!1,g=c.alternate,g!==null&&(g.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e,l),t=t.sibling}var Ln=null;function s0(e,t,l){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var g=a[c];g.ref.impl=g.nextImpl}Pt(t,e,l),Jt(e),o&4&&(Kl(3,e,e.return),lr(3,e),Kl(5,e,e.return));break;case 1:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=Ln,Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&4)if(o=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=k0(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=c.ownerDocument||c;t:switch(t){case"title":a=o.getElementsByTagName("title")[0],(!a||a[Ai]||a[Ot]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Ut(a,t,l),a[Ot]=e,_t(a),t=a;break e;case"link":if(c=dv("link","href",o).get(t+(l.href||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;case"meta":if(c=dv("meta","content",o).get(t+(l.content||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;default:throw Error(r(468,t))}a[Ot]=e,_t(a),t=a}e.stateNode=t}else Rt||wd(c,e.type,e.stateNode);else e.stateNode=fv(c,l,e.memoizedProps);else o!==l?(o===null?(t=a.stateNode,t===null||Ye||t.parentNode.removeChild(t)):o.count--,l===null?Rt||wd(c,e.type,e.stateNode):fv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_f(e,e.memoizedProps,a.memoizedProps);break;case 27:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),a!==null&&o&4&&_f(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=el,el=!1,Pt(t,e,l),el=c,Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),e.flags&32){t=e.stateNode;try{xs(t,""),Be=!0}catch(Q){Ke(e,e.return,Q)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,_f(e,t,a!==null?a.memoizedProps:t)),o&1024&&(Hf=!0);break;case 6:if(Pt(t,e,l),Jt(e),o&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(Q){Ke(e,e.return,Q)}}break;case 3:if(Be=!1,hu=null,c=Ln,Ln=mr(t.containerInfo),Pt(t,e,l),Ln=c,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ni(t.containerInfo)}catch(Q){Ke(e,e.return,Q)}Hf&&(Hf=!1,i0(e)),Be=!1;break;case 4:o=el,el=Rt,a=Nm(),c=Ln,Ln=mr(e.stateNode.containerInfo),Pt(t,e,l),Jt(e),Ln=c,Be&&sr&&(Zo=!0),Be=a,el=o;break;case 12:Pt(t,e,l),Jt(e);break;case 31:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 13:Pt(t,e,l),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(tu=et()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 22:c=e.memoizedState!==null,g=a!==null&&a.memoizedState!==null;var S=Rt,_=Ye,B=el;Rt=S||c,el=B||c,Ye=_||g,Pt(t,e,l),Ye=_,el=B,Rt=S,Jt(e),o&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||g||Rt||Ye||(t=g||Ye,l=Rt,a=Ye,Rt=c||Rt,Ye=t,Zl(e,2),Rt=l,Ye=a),!c&&el||Uf(e,c)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Jo(e,l))));break;case 19:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 30:o&512&&(Ye||a===null||Lt(a,a.return)),o=Nm(),c=sr,g=(l&335544064)===l,S=e.memoizedProps,sr=g&&vl(S.default,S.update)!=="none",Pt(t,e,l),Jt(e),g&&a!==null&&Be&&(e.flags|=4),sr=c,Be=o;break;case 21:break;case 7:o&512&&(Ye||a===null||Lt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Pt(t,e,l),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(qp(a)){l=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Ef(o)){var c=o.stateNode;a===null?a=[c]:a.push(c)}if(jf(o))break;o=o.return}var g=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var S=l.stateNode,_=Mf(e);Yo(e,_,S,g);break;case 5:var B=l.stateNode;l.flags&32&&(xs(B,""),l.flags&=-33);var Q=Mf(e);Yo(e,Q,B,g);break;case 3:case 4:var K=l.stateNode.containerInfo,U=Mf(e);Rf(e,U,K,g);break;default:throw Error(r(161))}}catch(q){Ke(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;i0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ti=!0,t.reset(),ti=!1),e=e.sibling}}function Vs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)r0(t,e),t=t.sibling;else Pp(t)}function r0(e,t){var l=e.alternate;if(l===null)Tf(e,!1);else switch(e.tag){case 3:if(Lf=tl=!1,Ip(),Vs(t,e),!tl&&!Zo){if(e=Jn,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var o=e[a+1];X0(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Lf=!0}Jn=null;break;case 5:Vs(t,e);break;case 4:a=tl,tl=!1,Vs(t,e),tl&&(Zo=!0),tl=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Tf(e,!1):Vs(t,e));break;case 30:a=tl,o=Ip(),tl=!1,Vs(t,e),tl&&(e.flags|=4);var c=e.memoizedProps,g=e.stateNode;t=pl(c,g),g=pl(l.memoizedProps,g);var S=vl(c.default,c.update);S==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Df(e,l,t,g,S,c,!0),rn!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Qs(e,e.memoizedProps.onUpdate),Jn=o):o!==null&&(o.push.apply(o,Jn),Jn=o),tl=(e.flags&32)!==0?!0:a;break;default:Vs(t,e)}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wp(e,t.alternate,t),t=t.sibling}function Zl(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Kl(4,l,l.return),Zl(l,a);break;case 1:Lt(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&kp(l,l.return,o),Zl(l,a);break;case 27:(a&2)!==0&&iv(l.stateNode,l.type,l.memoizedProps);case 5:Lt(l,l.return),l.tag!==5&&l.tag!==27||ar(l),Zl(l,a);break;case 6:ar(l);break;case 26:Lt(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ye||o.parentNode.removeChild(o),Zl(l,a);break;case 22:l.memoizedState===null&&Zl(l,a);break;case 30:Lt(l,l.return),Zl(l,a);break;case 7:Lt(l,l.return);default:Zl(l,a)}e=e.sibling}}function Un(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,o=e,c=t,g=c.flags,S=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Un(o,c,l),lr(4,c);break;case 1:if(Un(o,c,l),a=c,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(Q){Ke(a,a.return,Q)}if(a=c,o=a.updateQueue,o!==null){var _=a.stateNode;try{var B=o.shared.hiddenCallbacks;if(B!==null)for(o.shared.hiddenCallbacks=null,o=0;o<B.length;o++)Rg(B[o],_)}catch(Q){Ke(a,a.return,Q)}}S&&g&64&&Bp(c),Pn(c,c.return);break;case 27:(l&2)!==0&&Qp(c);case 5:c.tag!==5&&c.tag!==27||Gp(c),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 6:Gp(c);break;case 26:_=c.stateNode,c.memoizedState!==null||_===null||Rt||wd(mr(_.ownerDocument),c.type,_),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 12:Un(o,c,l);break;case 31:Un(o,c,l),S&&g&4&&l0(o,c);break;case 13:Un(o,c,l),S&&g&4&&a0(o,c);break;case 22:c.memoizedState===null&&Un(o,c,l),Pn(c,c.return);break;case 30:Un(o,c,l),Pn(c,c.return);break;case 7:Pn(c,c.return);default:Un(o,c,l)}t=t.sibling}}function $f(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&qi(l))}function Ff(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qi(e))}function Mn(e,t,l,a){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)o0(e,t,l,a),t=t.sibling;else o&&Zp(t)}function o0(e,t,l,a){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ko(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,l,a),c&2048&&lr(9,t);break;case 1:Mn(e,t,l,a);break;case 3:Mn(e,t,l,a),o&&Lf&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&qi(c)));break;case 12:if(c&2048){Mn(e,t,l,a),c=t.stateNode;try{var g=t.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(B){Ke(t,t.return,B)}}else Mn(e,t,l,a);break;case 31:Mn(e,t,l,a);break;case 13:Mn(e,t,l,a);break;case 23:break;case 22:g=t.stateNode,S=t.alternate,t.memoizedState!==null?(o&&S!==null&&S.memoizedState===null&&Ko(S),g._visibility&2?Mn(e,t,l,a):ir(e,t)):(o&&S!==null&&S.memoizedState!==null&&Ko(t),g._visibility&2?Mn(e,t,l,a):(g._visibility|=2,$s(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&$f(S,t);break;case 24:Mn(e,t,l,a),c&2048&&Ff(t.alternate,t);break;case 30:o&&(c=t.alternate,c!==null&&(Wn(c.child,!0),Wn(t.child,!0))),Mn(e,t,l,a);break;default:Mn(e,t,l,a)}}function $s(e,t,l,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,g=t,S=l,_=a,B=g.flags;switch(g.tag){case 0:case 11:case 15:$s(c,g,S,_,o),lr(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?$s(c,g,S,_,o):ir(c,g):(Q._visibility|=2,$s(c,g,S,_,o)),o&&B&2048&&$f(g.alternate,g);break;case 24:$s(c,g,S,_,o),o&&B&2048&&Ff(g.alternate,g);break;default:$s(c,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,o=a.flags;switch(a.tag){case 22:ir(l,a),o&2048&&$f(a.alternate,a);break;case 24:ir(l,a),o&2048&&Ff(a.alternate,a);break;default:ir(l,a)}t=t.sibling}}var Ia=8192;function Xa(e,t,l){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)u0(e,t,l),e=e.sibling}function u0(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&Ia&&(e.memoizedState!==null?Yb(l,Ln,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&pv(l,e)));break;case 5:Xa(e,t,l),e.flags&Ia&&(e=e.stateNode,(t&335544128)===t&&pv(l,e));break;case 3:case 4:var a=Ln;Ln=mr(e.stateNode.containerInfo),Xa(e,t,l),Ln=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ia,Ia=16777216,Xa(e,t,l),Ia=a):Xa(e,t,l));break;case 30:if((e.flags&Ia)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var o=e.stateNode;o.paired=null,gn===null&&(gn=new Map),gn.set(a,o)}Xa(e,t,l);break;default:Xa(e,t,l)}}function c0(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 rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)f0(e),e=e.sibling}function f0(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&Kl(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):rr(e);break;default:rr(e)}}function Wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kl(8,t,t.return),Wo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function d0(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:Kl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:qi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var o=a.sibling,c=a.return;if(t0(a),a===l){Tt=null;break e}if(o!==null){o.return=c,Tt=o;break e}Tt=c}}}var BS={getCacheForType:function(e){var t=zt(yt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return zt(yt).controller.signal}},kS=typeof WeakMap=="function"?WeakMap:Map,qe=0,tt=null,Te=null,Oe=0,Xe=0,pn=null,Pl=!1,Fs=!1,Bf=!1,Nl=0,gt=0,Jl=0,Ka=0,eu=0,vn=0,Bs=0,or=null,un=null,kf=!1,tu=0,h0=0,nu=1/0,lu=null,Wl=null,dt=0,Vn=null,Za=null,ll=0,Gf=0,qf=null,m0=null,ks=null,Gs=null,qs=null,ur=0,au=null;function yn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:re.T!==null?ed():vm()}function g0(){if(vn===0)if((Oe&536870912)===0||Re){var e=_a;_a<<=1,(_a&3932160)===0&&(_a=262144),vn=e}else vn=536870912;return e=Dt.current,e!==null&&(e.flags|=32),vn}function Qs(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=K0(pl(e.memoizedProps,l))),Gs===null&&(Gs=[]),Gs.push(t.bind(null,a))}}function cn(e,t,l){(e===tt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),ea(e,Oe,vn,!1)),Ti(e,l),((qe&2)===0||e!==tt)&&(e===tt&&((qe&2)===0&&(Ka|=l),gt===4&&ea(e,Oe,vn,!1)),al(e))}function p0(e,t,l){if((qe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),o=a?QS(e,t):Yf(e,t,!0),c=a;do{if(o===0){Fs&&!a&&ea(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!GS(l)){o=Yf(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=or;var _=S.current.memoizedState.isDehydrated;if(_&&(Ys(S,g).flags|=256),g=Yf(S,g,!1),g!==2&&g!==6){if(Bf&&!_){S.errorRecoveryDisabledLanes|=c,Ka|=c,o=4;break e}c=un,un=o,c!==null&&(un===null?un=c:un.push.apply(un,c))}o=g}if(c=!1,o!==2)continue}}if(o===1){Ys(e,0),ea(e,t,0,!0);break}e:{switch(a=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ea(a,t,vn,!Pl);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=tu+300-et(),10<o)){if(ea(a,t,vn,!Pl),Ra(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=fd(v0.bind(null,a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,"Throttled",-0,0),o);break e}v0(a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,null,-0,0)}}break}while(!0);al(e)}function v0(e,t,l,a,o,c,g,S,_,B,Q,K,U,q){e.timeoutHandle=-1;var ae=t.subtreeFlags,de=(c&335544064)===c;if(K=null,(de||ae&8192||(ae&16785408)===16785408)&&(K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},gn=null,u0(t,c,K),de&&(ae=K,de=e.containerInfo,de=(de.nodeType===9?de:de.ownerDocument).__reactViewTransition,de!=null&&(ae.count++,ae.waitingForViewTransition=!0,ae=vr.bind(ae),de.finished.then(ae,ae))),ae=(c&62914560)===c?tu-et():(c&4194048)===c?h0-et():0,ae=Ib(K,ae),ae!==null)){ll=c,e.cancelPendingCommit=ae(E0.bind(null,e,t,c,l,a,o,g,S,_,B,Q,K,null,U,q)),ea(e,c,g,!B);return}E0(e,t,c,l,a,o,g,S,_,B,Q,K)}function GS(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var o=l[a],c=o.getSnapshot;o=o.value;try{if(!hn(c(),o))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 ea(e,t,l,a){t=dm(e,t),t&=~eu,t&=~Ka,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var c=31-Xt(o),g=1<<c;a[c]=-1,o&=~g}l!==0&&mm(e,l,t)}function su(){return(qe&6)===0?(cr(0),!1):!0}function Qf(){if(Te!==null){if(Xe===0)var e=Te.return;else e=Te,Sl=Ua=null,Jc(e),Os=null,Ii=0,e=Te;for(;e!==null;)Fp(e.alternate,e),e=e.return;Te=null}}function Ys(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,hb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Qf(),tt=e,Te=l=yl(e.current,null),Oe=t,Xe=0,pn=null,Pl=!1,Fs=Hl(e,t),Bf=!1,Bs=vn=eu=Ka=Jl=gt=0,un=or=null,kf=!1,Nl=dm(e,t),ho(),l}function y0(e,t){Ne=null,re.H=Vo,t===As||t===jo?(t=Eg(),Xe=3):t===$c?(t=Eg(),Xe=4):Xe=t===mf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,Te===null&&(gt=1,$o(e,jn(t,e.current)))}function x0(){var e=Dt.current;return e===null?!0:(Oe&4194048)===Oe?qt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===qt:!1}function S0(){var e=re.H;return re.H=Vo,e===null?Vo:e}function b0(){var e=re.A;return re.A=BS,e}function iu(){gt=4,Pl||(Oe&4194048)!==Oe&&Dt.current!==null||(Fs=!0),(Jl&134217727)===0&&(Ka&134217727)===0||tt===null||ea(tt,Oe,vn,!1)}function Yf(e,t,l){var a=qe;qe|=2;var o=S0(),c=b0();(tt!==e||Oe!==t)&&(lu=null,Ys(e,t)),t=!1;var g=gt;e:do try{if(Xe!==0&&Te!==null){var S=Te,_=pn;switch(Xe){case 8:Qf(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var B=Xe;if(Xe=0,pn=null,Is(e,S,_,B),l&&Fs){g=0;break e}break;default:B=Xe,Xe=0,pn=null,Is(e,S,_,B)}}qS(),g=gt;break}catch(Q){y0(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Sl=Ua=null,qe=a,re.H=o,re.A=c,Te===null&&(tt=null,Oe=0,ho()),g}function qS(){for(;Te!==null;)w0(Te)}function QS(e,t){var l=qe;qe|=2;var a=S0(),o=b0();tt!==e||Oe!==t?(lu=null,nu=et()+500,Ys(e,t)):Fs=Hl(e,t);e:do try{if(Xe!==0&&Te!==null){t=Te;var c=pn;t:switch(Xe){case 1:Xe=0,pn=null,Is(e,t,c,1);break;case 2:case 9:if(Cg(c)){Xe=0,pn=null,C0(t);break}t=function(){Xe!==2&&Xe!==9||tt!==e||(Xe=7),al(e)},c.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Cg(c)?(Xe=0,pn=null,C0(t)):(Xe=0,pn=null,Is(e,t,c,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?mv(g):S.stateNode.complete){Xe=0,pn=null;var _=S.sibling;if(_!==null)Te=_;else{var B=S.return;B!==null?(Te=B,ru(B)):Te=null}break t}}Xe=0,pn=null,Is(e,t,c,5);break;case 6:Xe=0,pn=null,Is(e,t,c,6);break;case 8:Qf(),gt=6;break e;default:throw Error(r(462))}}YS();break}catch(Q){y0(e,Q)}while(!0);return Sl=Ua=null,re.H=a,re.A=o,qe=l,Te!==null?0:(tt=null,Oe=0,ho(),gt)}function YS(){for(;Te!==null&&!Ct();)w0(Te)}function w0(e){var t=Vp(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function C0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ap(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Ap(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Jc(t);var a=t;a===Mt&&(Re?(xo(a),a.tag===5&&a.stateNode!=null&&(lt=a.stateNode)):(xo(a),Re=!0));default:Fp(l,t),t=Te=dg(t,Nl),t=Vp(l,t,Nl)}e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function Is(e,t,l,a){Sl=Ua=null,Jc(t),Os=null,Ii=0;var o=t.return;try{if(zS(e,o,t,l,Oe)){gt=1,$o(e,jn(l,e.current)),Te=null;return}}catch(c){if(o!==null)throw Te=o,c;gt=1,$o(e,jn(l,e.current)),Te=null;return}t.flags&32768?(Re||a===1?e=!0:Fs||(Oe&536870912)!==0?e=!1:(Pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),j0(t,e)):ru(t)}function ru(e){var t=e;do{if((t.flags&32768)!==0){j0(t,Pl);return}e=t.return;var l=US(t.alternate,t,Nl);if(l!==null){Te=l;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);gt===0&&(gt=5)}function j0(e,t){do{var l=VS(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);gt=6,Te=null}function E0(e,t,l,a,o,c,g,S,_,B,Q,K){e.cancelPendingCommit=null;do ou();while(dt!==0);if((qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===tt&&(Te=tt=null,Oe=0),Za=t,Vn=e,ll=l,qf=o,m0=a,IS(e,t,l,g,S,_,K)}}function IS(e,t,l,a,o,c,g){var S=t.lanes|t.childLanes;if(Gf=S,S|=Nc,xx(e,l,S,a,o,c),Gs=null,(l&335544064)===l?(qs=bS(e),a=10262):(qs=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,WS(Ea,function(){return Zf(),null})):(e.callbackNode=null,e.callbackPriority=0),Io=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null,o=me.p,me.p=2,c=qe,qe|=4;try{$S(e,t,l)}finally{qe=c,me.p=o,re.T=a}}dt=1,Io?ks=xb(g,e.containerInfo,qs,If,Xf,KS,Kf,Zf,XS):(If(),Xf(),Kf())}function XS(e){if(dt!==0){var t=Vn.onRecoverableError;t(e,{componentStack:null})}}function KS(){dt===3&&(dt=0,r0(Za,Vn),dt=4)}function If(){if(dt===1){dt=0;var e=Vn,t=Za,l=ll,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null;var o=me.p;me.p=2;var c=qe;qe|=4;try{sr=Zo=!1,s0(t,e,l),l=od;var g=ng(e.containerInfo),S=l.focusedElem,_=l.selectionRange;if(g!==S&&S&&S.ownerDocument&&tg(S.ownerDocument.documentElement,S)){if(_!==null&&bc(S)){var B=_.start,Q=_.end;if(Q===void 0&&(Q=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Q,S.value.length);else{var K=S.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var q=U.getSelection(),ae=S.textContent.length,de=Math.min(_.start,ae),_e=_.end===void 0?de:Math.min(_.end,ae);!q.extend&&de>_e&&(g=_e,_e=de,de=g);var $=eg(S,de),O=eg(S,_e);if($&&O&&(q.rangeCount!==1||q.anchorNode!==$.node||q.anchorOffset!==$.offset||q.focusNode!==O.node||q.focusOffset!==O.offset)){var G=K.createRange();G.setStart($.node,$.offset),q.removeAllRanges(),de>_e?(q.addRange(G),q.extend(O.node,O.offset)):(G.setEnd(O.node,O.offset),q.addRange(G))}}}}for(K=[],q=S;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var I=K[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ti=!!rd,od=rd=null}finally{qe=c,me.p=o,re.T=a}}e.current=t,dt=2}}function Xf(){if(dt===2){dt=0;var e=Vn,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=re.T,re.T=null;var a=me.p;me.p=2;var o=qe;qe|=4;try{Wp(e,t.alternate,t)}finally{qe=o,me.p=a,re.T=l}}dt=3}}function Kf(){if(dt===4||dt===3){dt=0;var e=ks;ks=null,st();var t=Vn,l=Za,a=ll,o=m0,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?dt=5:(dt=0,Za=Vn=null,N0(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Wl=null),lc(a),l=l.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Pe,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=re.T,c=me.p,me.p=2,re.T=null;try{for(var g=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];g(_.value,{componentStack:_.stack})}}finally{re.T=l,me.p=c}}if(o=Gs,g=qs,qs=null,o!==null&&(Gs=null,g===null&&(g=[]),e!==null))for(_=0;_<o.length;_++)l=(0,o[_])(g),l!==void 0&&e.finished.finally(l);(ll&3)!==0&&ou(),al(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===au?ur++:(ur=0,au=t):(ur=0,au=null),cr(0)}}function N0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,qi(t)))}function ou(){return ks!==null&&(ks.skipTransition(),ks=null),If(),Xf(),Kf(),Zf()}function Zf(){if(dt!==5)return!1;var e=Vn,t=Gf;Gf=0;var l=lc(ll),a=re.T,o=me.p;try{me.p=32>l?32:l,re.T=null,l=qf,qf=null;var c=Vn,g=ll;if(dt=0,Za=Vn=null,ll=0,(qe&6)!==0)throw Error(r(331));var S=qe;if(qe|=4,f0(c.current),o0(c,c.current,g,l),qe=S,cr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Pe,c)}catch{}return!0}finally{me.p=o,re.T=a,N0(e,t)}}function _0(e,t,l){t=jn(l,t),t=hf(e.stateNode,t,2),e=Ql(e,t,2),e!==null&&(Ti(e,2),al(e))}function Ke(e,t,l){if(e.tag===3)_0(e,e,l);else for(;t!==null;){if(t.tag===3){_0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Wl===null||!Wl.has(a))){e=jn(l,e),l=Cp(2),a=Ql(t,l,2),a!==null&&(jp(l,a,t,e),Ti(a,2),al(a));break}}t=t.return}}function Pf(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new kS;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(l)||(Bf=!0,o.add(l),e=ZS.bind(null,e,t,l),t.then(e,e))}function ZS(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Oe&l)===l&&((gt===4||gt===3&&(Oe&62914560)===Oe&&300>et()-tu)&&(qe&2)===0?Ys(e,0):eu|=l,Bs===Oe&&(Bs=0)),al(e)}function M0(e,t){t===0&&(t=hm()),e=Da(e,t),e!==null&&(Ti(e,t),al(e))}function PS(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),M0(e,l)}function JS(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),M0(e,l)}function WS(e,t){return Ve(e,t)}var Xs=null,Ks=null,Jf=!1,uu=!1,Wf=!1,ta=0;function al(e){e!==Ks&&e.next===null&&(Ks===null?Xs=Ks=e:Ks=Ks.next=e),uu=!0,Jf||(Jf=!0,tb())}function cr(e,t){if(!Wf&&uu){Wf=!0;do for(var l=!1,a=Xs;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var c=0;else{var g=a.suspendedLanes,S=a.pingedLanes;c=(1<<31-Xt(42|e)+1)-1,c&=o&~(g&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,O0(a,c))}else c=Oe,c=Ra(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Hl(a,c)||(l=!0,O0(a,c));a=a.next}while(l);Wf=!1}}function eb(){R0()}function R0(){uu=Jf=!1;var e=0;ta!==0&&db()&&(e=ta);for(var t=et(),l=null,a=Xs;a!==null;){var o=a.next,c=T0(a,t);c===0?(a.next=null,l===null?Xs=o:l.next=o,o===null&&(Ks=l)):(l=a,(e!==0||(c&3)!==0)&&(uu=!0)),a=o}dt!==0&&dt!==5||cr(e),ta!==0&&(ta=0)}function T0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-Xt(c),S=1<<g,_=o[g];_===-1?((S&l)===0||(S&a)!==0)&&(o[g]=yx(S,t)):_<=t&&(e.expiredLanes|=S),c&=~S}if(t=tt,l=Oe,l=Ra(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Fe(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Hl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Fe(a),lc(l)){case 2:case 8:l=ja;break;case 32:l=Ea;break;case 268435456:l=Mi;break;default:l=Ea}return a=A0.bind(null,e),l=Ve(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Fe(a),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ou()&&e.callbackNode!==l)return null;var a=Oe;return a=Ra(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(p0(e,a,t),T0(e,et()),e.callbackNode!=null&&e.callbackNode===l?A0.bind(null,e):null)}function O0(e,t){if(ou())return null;p0(e,t,!0)}function tb(){mb(function(){(qe&6)!==0?Ve(Dl,eb):R0()})}function ed(){if(ta===0){var e=Fa;e===0&&(e=Na,Na<<=1,(Na&261888)===0&&(Na=256)),ta=e}return ta}function z0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(e)}function nb(e,t,l,a,o){if(t==="submit"&&l&&l.stateNode===o){var c=z0((o[an]||null).action),g=a.submitter;g&&(t=(t=g[an]||null)?z0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var S=new oo("action","action",null,a,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ta!==0){var _=new FormData(o,g);of(l,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(S.preventDefault(),_=new FormData(o,g),of(l,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var td=0;td<Ec.length;td++){var nd=Ec[td],lb=nd.toLowerCase(),ab=nd[0].toUpperCase()+nd.slice(1);Dn(lb,"on"+ab)}Dn(sg,"onAnimationEnd"),Dn(ig,"onAnimationIteration"),Dn(rg,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(hS,"onTransitionRun"),Dn(mS,"onTransitionStart"),Dn(gS,"onTransitionCancel"),Dn(og,"onTransitionEnd"),vs("onMouseEnter",["mouseout","mouseover"]),vs("onMouseLeave",["mouseout","mouseover"]),vs("onPointerEnter",["pointerout","pointerover"]),vs("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function D0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],o=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var g=a.length-1;0<=g;g--){var S=a[g],_=S.instance,B=S.currentTarget;if(S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}else for(g=0;g<a.length;g++){if(S=a[g],_=S.instance,B=S.currentTarget,S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}}}}function Ae(e,t){var l=t[xm];l===void 0&&(l=t[xm]=new Set);var a=e+"__bubble";l.has(a)||(H0(t,e,2,!1),l.add(a))}function ld(e,t,l){var a=0;t&&(a|=4),H0(l,e,a,t)}var cu="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[cu]){e[cu]=!0,wm.forEach(function(l){l!=="selectionchange"&&(sb.has(l)||ld(l,!1,e),ld(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cu]||(t[cu]=!0,ld("selectionchange",!1,t))}}function H0(e,t,l,a){switch(jv(t)){case 2:var o=Pb;break;case 8:o=Jb;break;default:o=jd}l=o.bind(null,t,l,e),o=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function sd(e,t,l,a,o){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var S=a.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=a.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Ta(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){a=c=g;continue e}S=S.parentNode}}a=a.return}Hm(function(){var B=c,Q=uc(l),K=[];e:{var U=ug.get(e);if(U!==void 0){var q=oo,ae=e;switch(e){case"keypress":if(io(l)===0)break e;case"keydown":case"keyup":q=Gx;break;case"focusin":ae="focus",q=gc;break;case"focusout":ae="blur",q=gc;break;case"beforeblur":case"afterblur":q=gc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Ax;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Xx;break;case sg:case ig:case rg:q=Dx;break;case og:q=Zx;break;case"scroll":case"scrollend":q=Rx;break;case"wheel":q=Jx;break;case"copy":case"cut":case"paste":q=Lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Fm;break;case"submit":q=Yx;break;case"toggle":case"beforetoggle":q=eS}var de=(t&4)!==0,_e=!de&&(e==="scroll"||e==="scrollend"),$=de?U!==null?U+"Capture":null:U;de=[];for(var O=B,G;O!==null;){var I=O;if(G=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||G===null||$===null||(I=zi(O,$),I!=null&&de.push(dr(O,I,G))),_e)break;O=O.return}0<de.length&&(U=new q(U,ae,null,l,Q),K.push({event:U,listeners:de}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",q&&l!==oc&&(ae=l.relatedTarget||l.fromElement)&&(Ta(ae)||ae[ms]))break e;(U||q)&&(ae=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,U?(q=l.relatedTarget||l.toElement,U=B,q=q?Ta(q):null,q!==null&&(_e=d(q),de=q.tag,q!==_e||de!==5&&de!==27&&de!==6)&&(q=null)):(U=null,q=B),U!==q&&(de=Vm,I="onMouseLeave",$="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(de=Fm,I="onPointerLeave",$="onPointerEnter",O="pointer"),_e=U==null?ae:Oi(U),G=q==null?ae:Oi(q),ae=new de(I,O+"leave",U,l,Q),ae.target=_e,ae.relatedTarget=G,I=null,Ta(Q)===B&&(de=new de($,O+"enter",q,l,Q),de.target=G,de.relatedTarget=_e,I=de),_e=I,de=U&&q?D(U,q,ib):null,U!==null&&L0(K,ae,U,de,!1),q!==null&&_e!==null&&L0(K,_e,q,de,!0)))}e:{if(U=B?Oi(B):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var ce=Xm;else if(Ym(U))if(Km)ce=cS;else{ce=oS;var ze=rS}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&rc(B.elementType)&&(ce=Xm):ce=uS;if(ce&&(ce=ce(e,B))){Im(K,ce,l,Q);break e}ze&&ze(e,U,B)}switch(ze=B?Oi(B):window,e){case"focusin":(Ym(ze)||ze.contentEditable==="true")&&(Cs=ze,wc=B,Bi=null);break;case"focusout":Bi=wc=Cs=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,lg(K,l,Q);break;case"selectionchange":if(dS)break;case"keydown":case"keyup":lg(K,l,Q)}var ge;if(vc)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ws?qm(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Bm&&l.locale!=="ko"&&(ws||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ws&&(ge=Lm()):(Ll=Q,dc="value"in Ll?Ll.value:Ll.textContent,ws=!0)),ze=fu(B,ve),0<ze.length&&(ve=new $m(ve,e,null,l,Q),K.push({event:ve,listeners:ze}),ge?ve.data=ge:(ge=Qm(l),ge!==null&&(ve.data=ge)))),(ge=nS?lS(e,l):aS(e,l))&&(ve=fu(B,"onBeforeInput"),0<ve.length&&(ze=new $m("onBeforeInput","beforeinput",null,l,Q),K.push({event:ze,listeners:ve}),ze.data=ge)),nb(K,e,B,l,Q)}D0(K,t)})}function dr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function fu(e,t){for(var l=t+"Capture",a=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=zi(e,l),o!=null&&a.unshift(dr(e,o,c)),o=zi(e,t),o!=null&&a.push(dr(e,o,c))),e.tag===3)return a;e=e.return}return[]}function ib(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,l,a,o){for(var c=t._reactName,g=[];l!==null&&l!==a;){var S=l,_=S.alternate,B=S.stateNode;if(S=S.tag,_!==null&&_===a)break;S!==5&&S!==26&&S!==27||B===null||(_=B,o?(B=zi(l,c),B!=null&&g.unshift(dr(l,B,_))):o||(B=zi(l,c),B!=null&&g.push(dr(l,B,_)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var rb=/\r\n?/g,ob=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(rb,`
49
+ `).replace(ob,"")}function V0(e,t){return t=U0(t),U0(e)===t}function Ze(e,t,l,a,o,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||xs(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&xs(e,""+a);else return;break;case"className":lo(e,"class",a);break;case"tabIndex":lo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":lo(e,l,a);break;case"style":zm(e,a,c);return;case"data":if(t!=="object"){lo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 c=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",o.name,o,null),Ze(e,t,"formEncType",o.formEncType,o,null),Ze(e,t,"formMethod",o.formMethod,o,null),Ze(e,t,"formTarget",o.formTarget,o,null)):(Ze(e,t,"encType",o.encType,o,null),Ze(e,t,"method",o.method,o,null),Ze(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Xn);return;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ao(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),no(e,"popover",a);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":no(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=_x.get(l)||l,no(e,l,a);else return}Be=!0}function id(e,t,l,a,o,c){switch(l){case"style":zm(e,a,c);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")xs(e,a);else if(typeof a=="number"||typeof a=="bigint")xs(e,""+a);else return;break;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"onClick":a!=null&&(e.onclick=Xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Cm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),c=l.slice(2,o?l.length-7:void 0),t=e[an]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,o),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,o);break e}Be=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):no(e,l,a)}return}Be=!0}function Ut(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,o=!1,c;for(c in l)if(l.hasOwnProperty(c)){var g=l[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,c,g,l,null)}}o&&Ze(e,t,"srcSet",l.srcSet,l,null),a&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var S=c=g=o=null,_=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var Q=l[a];if(Q!=null)switch(a){case"name":o=Q;break;case"type":g=Q;break;case"checked":_=Q;break;case"defaultChecked":B=Q;break;case"value":c=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,t));break;default:Ze(e,t,a,Q,l,null)}}Rm(e,c,S,_,B,g,o,!1);return;case"select":Ae("invalid",e),a=g=c=null;for(o in l)if(l.hasOwnProperty(o)&&(S=l[o],S!=null))switch(o){case"value":c=S;break;case"defaultValue":g=S;break;case"multiple":a=S;default:Ze(e,t,o,S,l,null)}t=c,l=g,e.multiple=!!a,t!=null?ys(e,!!a,t,!1):l!=null&&ys(e,!!a,l,!0);return;case"textarea":Ae("invalid",e),c=o=a=null;for(g in l)if(l.hasOwnProperty(g)&&(S=l[g],S!=null))switch(g){case"value":a=S;break;case"defaultValue":o=S;break;case"children":c=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ze(e,t,g,S,l,null)}Am(e,a,o,c);return;case"option":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ze(e,t,_,a,l,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<fr.length;a++)Ae(fr[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,B,a,l,null)}return;default:if(rc(t)){for(Q in l)l.hasOwnProperty(Q)&&(a=l[Q],a!==void 0&&id(e,t,Q,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Ze(e,t,S,a,l,null))}var ub={};function cb(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,g=null,S=null,_=null,B=null,Q=null;for(q in l){var K=l[q];if(l.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":_=K;default:a.hasOwnProperty(q)||Ze(e,t,q,null,a,K)}}for(var U in a){var q=a[U];if(K=l[U],a.hasOwnProperty(U)&&(q!=null||K!=null))switch(U){case"type":q!==K&&(Be=!0),c=q;break;case"name":q!==K&&(Be=!0),o=q;break;case"checked":q!==K&&(Be=!0),B=q;break;case"defaultChecked":q!==K&&(Be=!0),Q=q;break;case"value":q!==K&&(Be=!0),g=q;break;case"defaultValue":q!==K&&(Be=!0),S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:q!==K&&Ze(e,t,U,q,a,K)}}sc(e,g,S,_,B,Q,c,o);return;case"select":q=g=S=U=null;for(c in l)if(_=l[c],l.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":q=_;default:a.hasOwnProperty(c)||Ze(e,t,c,null,a,_)}for(o in a)if(c=a[o],_=l[o],a.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":c!==_&&(Be=!0),U=c;break;case"defaultValue":c!==_&&(Be=!0),S=c;break;case"multiple":c!==_&&(Be=!0),g=c;default:c!==_&&Ze(e,t,o,c,a,_)}t=S,l=g,a=q,U!=null?ys(e,!!l,U,!1):!!a!=!!l&&(t!=null?ys(e,!!l,t,!0):ys(e,!!l,l?[]:"",!1));return;case"textarea":q=U=null;for(S in l)if(o=l[S],l.hasOwnProperty(S)&&o!=null&&!a.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,t,S,null,a,o)}for(g in a)if(o=a[g],c=l[g],a.hasOwnProperty(g)&&(o!=null||c!=null))switch(g){case"value":o!==c&&(Be=!0),U=o;break;case"defaultValue":o!==c&&(Be=!0),q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ze(e,t,g,o,a,c)}Tm(e,U,q);return;case"option":for(var ae in l)if(U=l[ae],l.hasOwnProperty(ae)&&U!=null&&!a.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ze(e,t,ae,null,a,U)}for(_ in a)if(U=a[_],q=l[_],a.hasOwnProperty(_)&&U!==q&&(U!=null||q!=null))switch(_){case"selected":U!==q&&(Be=!0),e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ze(e,t,_,U,a,q)}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 de in l)U=l[de],l.hasOwnProperty(de)&&U!=null&&!a.hasOwnProperty(de)&&Ze(e,t,de,null,a,U);for(B in a)if(U=a[B],q=l[B],a.hasOwnProperty(B)&&U!==q&&(U!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ze(e,t,B,U,a,q)}return;default:if(rc(t)){for(var _e in l)U=l[_e],l.hasOwnProperty(_e)&&U!==void 0&&!a.hasOwnProperty(_e)&&id(e,t,_e,void 0,a,U);for(Q in a)U=a[Q],q=l[Q],!a.hasOwnProperty(Q)||U===q||U===void 0&&q===void 0||id(e,t,Q,U,a,q);return}}for(var $ in l)U=l[$],l.hasOwnProperty($)&&U!=null&&!a.hasOwnProperty($)&&Ze(e,t,$,null,a,U);for(K in a)U=a[K],q=l[K],!a.hasOwnProperty(K)||U===q||U==null&&q==null||Ze(e,t,K,U,a,q)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var o=l[a],c=o.transferSize,g=o.initiatorType,S=o.duration;if(c&&S&&$0(g)){for(g=0,S=o.responseEnd,a+=1;a<l.length;a++){var _=l[a],B=_.startTime;if(B>S)break;var Q=_.transferSize,K=_.initiatorType;Q&&$0(K)&&(_=_.responseEnd,g+=Q*(_<S?1:(S-B)/(_-B)))}if(--a,t+=8*(c+g)/(o.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,od=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function F0(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 B0(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 k0(e,t,l,a){return l=hr(l).createElement(e),l[Ot]=a,l[an]=t,Ut(l,e,t),_t(l),l}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 cd=null;function db(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var fd=typeof setTimeout=="function"?setTimeout:void 0,hb=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,q0=typeof requestAnimationFrame=="function"?requestAnimationFrame:fd,mb=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(gb)}:fd;function gb(e){setTimeout(function(){throw e})}function na(e){return e==="head"}function Q0(e,t){var l=t,a=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(o),ni(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")xd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,xd(l);for(var c=l.firstChild;c;){var g=c.nextSibling,S=c.nodeName;c[Ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=g}}else l==="body"&&xd(e.ownerDocument.body);l=o}while(l);ni(t)}function Y0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function I0(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var o=a=0;o<t.length;o++){var c=t[o];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function X0(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function pb(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function dd(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return pb(t,l,e)}function vb(e){return e.documentElement.clientHeight}function yb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function xb(e,t,l,a,o,c,g,S,_){var B=t.nodeType===9?t:t.ownerDocument;try{var Q=B.startViewTransition({update:function(){var U=B.defaultView,q=U.navigation&&U.navigation.transition,ae=B.fonts.status;a();var de=[];if(ae==="loaded"&&(vb(B),B.fonts.status==="loading"&&de.push(B.fonts.ready)),ae=de.length,e!==null)for(var _e=e.suspenseyImages,$=0,O=0;O<_e.length;O++){var G=_e[O];if(!G.complete){var I=G.getBoundingClientRect();if(0<I.bottom&&0<I.right&&I.top<U.innerHeight&&I.left<U.innerWidth){if($+=gv(G),$>mu){de.length=ae;break}G=new Promise(yb.bind(G)),de.push(G)}}}if(0<de.length)return U=Promise.race([Promise.all(de),new Promise(function(ce){return setTimeout(ce,500)})]).then(o,o),(q?Promise.allSettled([q.finished,U]):U).then(c,c);if(o(),q)return q.finished.then(c,c);c()},types:l});B.__reactViewTransition=Q;var K=[];return Q.ready.then(function(){for(var U=B.documentElement.getAnimations({subtree:!0}),q=0;q<U.length;q++){var ae=U[q],de=ae.effect,_e=de.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){K.push(ae),ae=de.getKeyframes();for(var $=_e=void 0,O=!0,G=0;G<ae.length;G++){var I=ae[G],ce=I.width;if(_e===void 0)_e=ce;else if(_e!==ce){O=!1;break}if(ce=I.height,$===void 0)$=ce;else if($!==ce){O=!1;break}delete I.width,delete I.height,I.transform==="none"&&delete I.transform}O&&_e!==void 0&&$!==void 0&&(de.setKeyframes(ae),O=getComputedStyle(de.target,de.pseudoElement),O.width!==_e||O.height!==$)&&(O=ae[0],O.width=_e,O.height=$,O=ae[ae.length-1],O.width=_e,O.height=$,de.setKeyframes(ae))}}g()},function(U){B.__reactViewTransition===Q&&(B.__reactViewTransition=null);try{if(typeof U=="object"&&U!==null)switch(U.name){case"InvalidStateError":(U.message==="View transition was skipped because document visibility state is hidden."||U.message==="Skipping view transition because document visibility state has become hidden."||U.message==="Skipping view transition because viewport size changed."||U.message==="Transition was aborted because of invalid state")&&(U=null)}U!==null&&_(U)}finally{a(),o(),g()}}),Q.finished.finally(function(){for(var U=0;U<K.length;U++)K[U].cancel();B.__reactViewTransition===Q&&(B.__reactViewTransition=null),S()}),Q}catch{return a(),o(),g(),null}}function Pa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Pa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:z({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],o=0;o<l.length;o++){var c=l[o].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[o])}return a},Pa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function K0(e){return{name:e,group:new Pa("group",e),imagePair:new Pa("image-pair",e),old:new Pa("old",e),new:new Pa("new",e)}}function xn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xn.prototype.addEventListener=function(e,t,l){var a=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(P0(c,e,t,l)===-1){var g=this,S=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(S=function(_){g.removeEventListener(e,t,l),typeof t=="function"?t.call(this,_):t.handleEvent(_)}),a!==null&&(o=g.removeEventListener.bind(g,e,t,l),a.addEventListener("abort",o,{once:!0}),o=a.removeEventListener.bind(a,"abort",o)),a=Zs(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:S,cleanup:o}),v(this._fragmentFiber.child,!1,Sb,e,S,a)}this._eventListeners=c}};function Sb(e,t,l,a){return M(e).addEventListener(t,l,a),!1}xn.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=P0(a,e,t,l),t!==-1)){var o=a[t];l=o.attachedListener;var c=o.cleanup;o=Zs(o.optionsOrUseCapture),v(this._fragmentFiber.child,!1,bb,e,l,o),a.splice(t,1),c!==null&&c()}};function bb(e,t,l,a){return M(e).removeEventListener(t,l,a),!1}function Zs(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Z0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function P0(e,t,l,a){if(e.length===0)return-1;a=Z0(a);for(var o=0;o<e.length;o++){var c=e[o];if(c.type===t&&c.listener===l&&Z0(c.optionsOrUseCapture)===a)return o}return-1}xn.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var c=l[o];a.addEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(o=0;o<l.length;o++)c=l[o],a.removeEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},xn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,J0,e,void 0,void 0)};function J0(e,t){return e.tag===6?!1:(e=M(e),zb(e,t))}xn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,hd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!J0(t[l],e);l--);};function hd(e,t){return t.push(e),!1}xn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=M(e),e=hr(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,wb,e,void 0,void 0))};function wb(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Cb,e,void 0,void 0)};function Cb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}xn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,jb,e,void 0,void 0);for(var l=t=0;l<$n.length;l++){var a=$n[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):$n[t++]=a}$n.length=t}};function jb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var $n=[],md=!1;function Eb(e,t,l){$n.push({fragmentInstance:e,observer:t,instance:l}),md||(md=!0,Db(function(){md=!1;var a=$n;$n=[];for(var o=0;o<a.length;o++){var c=a[o];c.observer.unobserve(c.instance)}}))}xn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Nb,e,void 0,void 0),e};function Nb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=M(e),t.push.apply(t,e.getClientRects());return!1}xn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},xn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,hd,l,void 0,void 0);var a=M(t);if(l.length===0){if(l=a,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=a=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=C(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),o=M(l[l.length-1]);var c=w(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var g=t.compareDocumentPosition(e),S=o.compareDocumentPosition(e),_=g&Node.DOCUMENT_POSITION_CONTAINED_BY||S&Node.DOCUMENT_POSITION_CONTAINED_BY;return S=a&&c&&g&Node.DOCUMENT_POSITION_FOLLOWING&&S&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&o===e||_||S?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:g,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||_b(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _b(e,t,l,a,o){var c=Ta(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=o.ownerDocument,o===c||o===c.documentElement||o===c.body;e:{for(c=t,t=b(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=D(l,c,H),t===null?t=!1:(v(t,!0,F,c,l),c=R,R=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=D(a,c,H),t===null?t=!1:(v(t,!0,T,c,a),c=R,j=R=null,t=c!==null)),t):!1}function W0(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];v(this._fragmentFiber.child,!1,hd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=C(this._fragmentFiber);if(a=l?a[1]||a[0]||b(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=M(a),W0(e,l);return}if(a=M(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var o=t[a];o.tag===6?(o=M(o),W0(o,l)):M(o).scrollIntoView(e),a+=l?-1:1}};function Mb(e,t){return e=M(e),ev(e,t),!1}function ev(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function tv(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.addEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var g=0,S=0;S<$n.length;S++){var _=$n[S];(_.fragmentInstance!==t||_.observer!==c||_.instance!==e)&&($n[g++]=_)}$n.length=g,c.observe(e)}),ev(e,t))}function Rb(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.removeEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?Eb(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function gd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":gd(l),to(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Tb(e,t,l,a){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function Ab(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Rn(e.nextSibling),e===null))return null;return e}function nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Rn(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ob(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Rn(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 yd=null;function lv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Rn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function zb(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Db(e){q0(function(){q0(function(t){return e(t)})})}function sv(e,t,l){switch(t=hr(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function iv(e,t,l){for(var a in l){var o=l[a];l.hasOwnProperty(a)&&o!=null&&Ze(e,t,a,null,ub,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Xn&&(e.onclick=null),to(e)}function xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);to(e)}var Tn=new Map,rv=new Set;function mr(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var _l=me.d;me.d={f:Hb,r:Lb,D:Ub,C:Vb,L:$b,m:Fb,X:kb,S:Bb,M:Gb};function Hb(){var e=_l.f(),t=su();return e||t}function Lb(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?up(t):_l.r(e)}var Ps=typeof document>"u"?null:document;function ov(e,t,l){var a=Ps;if(a&&typeof t=="string"&&t){var o=wn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),rv.has(o)||(rv.add(o),e={rel:e,crossOrigin:l,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Ut(t,"link",e),_t(t),a.head.appendChild(t)))}}function Ub(e){_l.D(e),ov("dns-prefetch",e,null)}function Vb(e,t){_l.C(e,t),ov("preconnect",e,t)}function $b(e,t,l){_l.L(e,t,l);var a=Ps;if(a&&e&&t){var o='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+wn(l.imageSizes)+'"]')):o+='[href="'+wn(e)+'"]';var c=o;switch(t){case"style":c=Js(e);break;case"script":c=Ws(e)}if(!(Tn.has(c)||(e=z({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Tn.set(c,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(gr(c))||t==="script"&&a.querySelector(pr(c))))){var g=a.createElement("link");Ut(g,"link",e),t==="style"&&(g[eo]=!0,g.onload=g.onerror=function(){bm(g)}),_t(g),a.head.appendChild(g)}}}function Fb(e,t){_l.m(e,t);var l=Ps;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+wn(a)+'"][href="'+wn(e)+'"]',c=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ws(e)}if(!Tn.has(c)&&(e=z({rel:"modulepreload",href:e},t),Tn.set(c,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pr(c)))return}a=l.createElement("link"),Ut(a,"link",e),_t(a),l.head.appendChild(a)}}}function Bb(e,t,l){_l.S(e,t,l);var a=Ps;if(a&&e){var o=ps(a).hoistableStyles,c=Js(e);t=t||"default";var g=o.get(c);if(!g){var S={loading:0,preload:null};if(g=a.querySelector(gr(c)))S.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Tn.get(c))&&Sd(e,l);var _=g=a.createElement("link");_t(_),Ut(_,"link",e),_._p=new Promise(function(B,Q){_.onload=B,_.onerror=Q}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,du(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(c,g)}}}function kb(e,t){_l.X(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function Gb(e,t){_l.M(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0,type:"module"},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function uv(e,t,l,a){var o=(o=At.current)?mr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Js(l.href),t=ps(o).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Js(l.href);var c=ps(o).hoistableStyles,g=c.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=o.querySelector(gr(e)))?c._p||(g.instance=c,g.state.loading=5):(c=Tn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Tn.set(e,c)),qb(o,e,c,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ws(l),t=ps(o).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Js(e){return'href="'+wn(e)+'"'}function gr(e){return'link[rel="stylesheet"]['+e+"]"}function cv(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qb(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[eo]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[eo]=!0,t.onload=t.onerror=bm.bind(null,t),Ut(t,"link",l),_t(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Ws(e){return'[src="'+wn(e)+'"]'}function pr(e){return"script[async]"+e}function fv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(a)return t.instance=a,_t(a),a;var o=z({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),_t(a),Ut(a,"style",o),du(a,l.precedence,e),t.instance=a;case"stylesheet":o=Js(l.href);var c=e.querySelector(gr(o));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;a=cv(l),(o=Tn.get(o))&&Sd(a,o),c=(e.ownerDocument||e).createElement("link"),_t(c);var g=c;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),t.state.loading|=4,du(c,l.precedence,e),t.instance=c;case"script":return c=Ws(l.src),(o=e.querySelector(pr(c)))?(t.instance=o,_t(o),o):(a=l,(o=Tn.get(c))&&(a=z({},l),bd(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),_t(o),Ut(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,du(a,l.precedence,e));return t.instance}function du(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,c=o,g=0;g<a.length;g++){var S=a[g];if(S.dataset.precedence===t)c=S;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function dv(e,t,l){if(hu===null){var a=new Map,o=hu=new Map;o.set(l,a)}else o=hu,a=o.get(l),a||(a=new Map,o.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var c=l[o];if(!(c[Ai]||c[Ot]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var S=a.get(g);S?S.push(c):a.set(g,[c])}}return a}function wd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Qb(e,t,l){if(l===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 hv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function mv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function pv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=gv(t),e.suspenseyImages.push(t)),e=Xb.bind(e),t.decode().then(e,e))}function Yb(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Js(a.href),c=t.querySelector(gr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,_t(c);return}c=t.ownerDocument||t,a=cv(a),(o=Tn.get(o))&&Sd(a,o),c=c.createElement("link"),_t(c);var g=c;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=vr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var mu=0;function Ib(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&mu===0&&(mu=62500*fb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)pu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vr(){this.count--,vv(this)}function Xb(){this.imgCount--,vv(this)}var gu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gu=new Map,t.forEach(Kb,e),gu=null,vr.call(e))}function Kb(e,t){if(!(t.state.loading&4)){var l=gu.get(e);if(l)var a=l.get(null);else{l=new Map,gu.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var g=o[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}o=t.instance,g=o.getAttribute("data-precedence"),c=l.get(g)||a,c===a&&l.set(null,o),l.set(g,o),this.count++,a=vr.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function Zb(e,t,l,a,o,c,g,S,_){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=tc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tc(0),this.hiddenUpdates=tc(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.transitionTypes=null,this.incompleteTransitions=new Map}function yv(e,t,l,a,o,c,g,S,_,B,Q,K){return e=new Zb(e,t,l,g,_,B,Q,K,S),t=1,c===!0&&(t|=24),c=sn(3,null,null,t),e.current=c,c.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Fc(c),e}function xv(e){return e?(e=Ns,e):Ns}function Sv(e,t,l,a,o,c){o=xv(o),a.context===null?a.context=o:a.pendingContext=o,a=ql(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Ql(e,a,t),l!==null&&(cn(l,e,t),Xi(l,e,t))}function bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Cd(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function wv(e){if(e.tag===13||e.tag===31){var t=Da(e,67108864);t!==null&&cn(t,e,67108864),Cd(e,67108864)}}function Cv(e){if(e.tag===13||e.tag===31){var t=yn();t=nc(t);var l=Da(e,t);l!==null&&cn(l,e,t),Cd(e,t)}}var ti=!0;function Pb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=2,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function Jb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=8,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function jd(e,t,l,a){if(ti){var o=Ed(a);if(o===null)sd(e,t,a,vu,l),Ev(e,a);else if(e2(o,e,t,l,a))a.stopPropagation();else if(Ev(e,a),t&4&&-1<Wb.indexOf(e)){for(;o!==null;){var c=gs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=dl(c.pendingLanes);if(g!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-Xt(g);S.entanglements[1]|=_,g&=~_}al(c),(qe&6)===0&&(nu=et()+500,cr(0))}}break;case 31:case 13:S=Da(c,2),S!==null&&cn(S,c,2),su(),Cd(c,2)}if(c=Ed(a),c===null&&sd(e,t,a,vu,l),c===o)break;o=c}o!==null&&a.stopPropagation()}else sd(e,t,a,null,l)}}function Ed(e){return e=uc(e),Nd(e)}var vu=null;function Nd(e){if(vu=null,e=Ta(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vu=e,null}function jv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yn()){case Dl:return 2;case ja:return 8;case Ea:case Jr:return 32;case Mi:return 268435456;default:return 32}default:return 32}}var _d=!1,la=null,aa=null,sa=null,yr=new Map,xr=new Map,ia=[],Wb="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 Ev(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xr.delete(t.pointerId)}}function Sr(e,t,l,a,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[o]},t!==null&&(t=gs(t),t!==null&&wv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function e2(e,t,l,a,o){switch(t){case"focusin":return la=Sr(la,e,t,l,a,o),!0;case"dragenter":return aa=Sr(aa,e,t,l,a,o),!0;case"mouseover":return sa=Sr(sa,e,t,l,a,o),!0;case"pointerover":var c=o.pointerId;return yr.set(c,Sr(yr.get(c)||null,e,t,l,a,o)),!0;case"gotpointercapture":return c=o.pointerId,xr.set(c,Sr(xr.get(c)||null,e,t,l,a,o)),!0}return!1}function Nv(e){var t=Ta(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ed(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);oc=a,l.target.dispatchEvent(a),oc=null}else return t=gs(l),t!==null&&wv(t),e.blockedOn=l,!1;t.shift()}return!0}function _v(e,t,l){yu(e)&&l.delete(t)}function t2(){_d=!1,la!==null&&yu(la)&&(la=null),aa!==null&&yu(aa)&&(aa=null),sa!==null&&yu(sa)&&(sa=null),yr.forEach(_v),xr.forEach(_v)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,_d||(_d=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t2)))}var Su=null;function Mv(e){Su!==e&&(Su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Nd(a||l)===null)continue;break}var c=gs(l);c!==null&&(e.splice(t,3),t-=3,of(c,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function ni(e){function t(_){return xu(_,e)}la!==null&&xu(la,e),aa!==null&&xu(aa,e),sa!==null&&xu(sa,e),yr.forEach(t),xr.forEach(t);for(var l=0;l<ia.length;l++){var a=ia[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ia.length&&(l=ia[0],l.blockedOn===null);)Nv(l),l.blockedOn===null&&ia.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var o=l[a],c=l[a+1],g=o[an]||null;if(typeof c=="function")g||Mv(l);else if(g){var S=null;if(c&&c.hasAttribute("formAction")){if(o=c,g=c[an]||null)S=g.formAction;else if(Nd(o)!==null)continue}else S=g.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Mv(l)}}}function Rv(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Md(e){this._internalRoot=e}bu.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=yn();Sv(l,a,e,t,null,null)},bu.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sv(e.current,2,null,e,null,null),su(),t[ms]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ia.length&&t!==0&&t<ia[l].priority;l++);ia.splice(l,0,e),l===0&&Nv(e)}};var Tv=s.version;if(Tv!=="19.3.1")throw Error(r(527,Tv,"19.3.1"));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var n2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{Pe=wu.inject(n2),nt=wu}catch{}}return wr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var l=!1,a="",o=xp,c=Sp,g=bp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=yv(e,1,!1,null,null,l,a,null,o,c,g,Rv),e[ms]=t.current,ad(e),new Md(t)},wr.hydrateRoot=function(e,t,l){if(!u(e))throw Error(r(299));var a=!1,o="",c=xp,g=Sp,S=bp,_=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(_=l.formState)),t=yv(e,1,!0,t,l??null,a,o,_,c,g,S,Rv),t.context=xv(null),l=t.current,a=yn(),a=nc(a),o=ql(a),o.callback=null,Ql(l,o,a),l=a,t.current.lanes=l,Ti(t,l),al(t),e[ms]=t.current,ad(e),new bu(t)},wr.version="19.3.1",wr}var Bv;function g2(){if(Bv)return Od.exports;Bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Od.exports=m2(),Od.exports}var p2=g2();const Xy=E.createContext(void 0),Ky=n=>{const s=E.useContext(Xy);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},v2=({client:n,children:s})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Xy.Provider,{value:n,children:s})),y2={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)};var fa,Yh,Uy,x2=(Uy=class{constructor(){pe(this,fa,y2);pe(this,Yh,!1)}setTimeoutProvider(n){oe(this,fa,n)}setTimeout(n,s){return L(this,fa).setTimeout(n,s)}clearTimeout(n){L(this,fa).clearTimeout(n)}setInterval(n,s){return L(this,fa).setInterval(n,s)}clearInterval(n){L(this,fa).clearInterval(n)}},fa=new WeakMap,Yh=new WeakMap,Uy);const ts=new x2;function S2(n){setTimeout(n,0)}const b2=typeof window>"u"||"Deno"in globalThis;function fn(){}function w2(n,s){return typeof n=="function"?n(s):n}function Zy(n){return typeof n=="number"&&n>=0&&n!==1/0}function Py(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ft(n,s){return typeof n=="function"?n(s):n}function kv(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(r){if(s.queryHash!==Xh(h,s.options))return!1}else if(!ji(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||u&&u!==s.state.fetchStatus||d&&!d(s))}function Gv(n,s){const{exact:i,status:r,predicate:u,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(Ur(s.options.mutationKey)!==Ur(d))return!1}else if(!ji(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function Xh(n,s){return((s==null?void 0:s.queryKeyHashFn)||Ur)(n)}function Ur(n){return JSON.stringify(n,(s,i)=>hh(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function ji(n,s){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(Array.isArray(n)&&Array.isArray(s)){if(s.length>n.length)return!1;for(let r=0;r<s.length;r++)if(!ji(n[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!ji(n[r],s[r]))return!1;return!0}return!1}const C2=Object.prototype.hasOwnProperty;function Jy(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=qv(n)&&qv(s);if(!r&&!(hh(n)&&hh(s)))return s;const u=(r?n:Object.keys(n)).length,d=r?s:Object.keys(s),h=d.length,m=r?new Array(h):{};let p=0;for(let y=0;y<h;y++){const x=r?y:d[y],v=n[x],b=s[x];if(v===b){m[x]=v,(r?y<u:C2.call(n,x))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){m[x]=b;continue}const w=Jy(v,b,i+1);m[x]=w,w===v&&p++}return u===h&&p===u?n:m}function Ld(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function qv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function hh(n){if(!Qv(n))return!1;const s=Object.getPrototypeOf(n),i=s==null?void 0:s.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const r=i.prototype;return!(!Qv(r)||!r.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function Qv(n){return Object.prototype.toString.call(n)==="[object Object]"}function j2(n){return new Promise(s=>{ts.setTimeout(s,n)})}function mh(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Jy(n,s):s}function Wy(n){return n}function E2(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function N2(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}const Kh=Symbol();function e1(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===Kh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function t1(n,s){return typeof n=="function"?n(...s):!!n}function _2(n,s,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=s()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let M2=()=>b2;const Zh=()=>M2();var Ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ns,da,fi,Vy,R2=(Vy=class extends Ir{constructor(){super();pe(this,ns);pe(this,da);pe(this,fi);oe(this,fi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){L(this,da)||this.setEventListener(L(this,fi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,da))==null||s.call(this),oe(this,da,void 0))}setEventListener(s){var i;oe(this,fi,s),(i=L(this,da))==null||i.call(this),oe(this,da,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){L(this,ns)!==s&&(oe(this,ns,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof L(this,ns)=="boolean"?L(this,ns):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ns=new WeakMap,da=new WeakMap,fi=new WeakMap,Vy);const Ph=new R2,T2=S2;function A2(){let n=[],s=0,i=m=>{m()},r=m=>{m()},u=T2;const d=m=>{s?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;s++;try{p=m()}finally{s--,s||h()}return p},batchCalls:m=>(...p)=>{d(()=>{m(...p)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}const $t=A2();var di,ha,hi,$y,O2=($y=class extends Ir{constructor(){super();pe(this,di,!0);pe(this,ha);pe(this,hi);oe(this,hi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ha)||this.setEventListener(L(this,hi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ha))==null||s.call(this),oe(this,ha,void 0))}setEventListener(s){var i;oe(this,hi,s),(i=L(this,ha))==null||i.call(this),oe(this,ha,s(this.setOnline.bind(this)))}setOnline(s){L(this,di)!==s&&(oe(this,di,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return L(this,di)}},di=new WeakMap,ha=new WeakMap,hi=new WeakMap,$y);const Ou=new O2;function z2(n){return Math.min(1e3*2**n,3e4)}function n1(n){return(n??"online")==="online"?Ou.isOnline():!0}var gh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function l1(n){let s=!1,i=0,r,u="pending",d,h;const m=new Promise((j,F)=>{d=j,h=F});m.catch(fn);const p=()=>u!=="pending",y=j=>{var F;if(!p()){const T=new gh(j);N(T),(F=n.onCancel)==null||F.call(n,T)}},x=()=>{s=!0},v=()=>{s=!1},b=()=>Ph.isFocused()&&(n.networkMode==="always"||Ou.isOnline())&&n.canRun(),w=()=>n1(n.networkMode)&&n.canRun(),C=j=>{p()||(r==null||r(),u="resolved",d(j))},N=j=>{p()||(r==null||r(),u="rejected",h(j))},M=j=>new Promise(F=>{var T;r=H=>{(p()||j())&&F(H)},(T=n.onPause)==null||T.call(n)}).then(()=>{var F;r=void 0,p()||(F=n.onContinue)==null||F.call(n)}),R=()=>{if(p())return;let j;const F=i===0?n.initialPromise:void 0;try{j=F??n.fn()}catch(T){j=Promise.reject(T)}Promise.resolve(j).then(C).catch(T=>{var te;if(p())return;const H=n.retry??(Zh()?0:3),D=n.retryDelay??z2,z=typeof D=="function"?D(i,T):D,Y=H===!0||typeof H=="number"&&i<H||typeof H=="function"&&H(i,T);if(s||!Y){N(T);return}i++,(te=n.onFail)==null||te.call(n,i,T),j2(z).then(()=>b()?void 0:M(b)).then(()=>{s?N(T):R()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(r==null||r(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?R():M(w).then(R),m)}}var ls,Fy,a1=(Fy=class{constructor(){pe(this,ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zy(this.gcTime)&&oe(this,ls,ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zh()?1/0:3e5))}clearGcTimeout(){L(this,ls)!==void 0&&(ts.clearTimeout(L(this,ls)),oe(this,ls,void 0))}},ls=new WeakMap,Fy);function D2(n){return{onFetch:(s,i)=>{var x,v,b,w,C;const r=s.options,u=(b=(v=(x=s.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,d=((w=s.state.data)==null?void 0:w.pages)||[],h=((C=s.state.data)==null?void 0:C.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let N=!1;const M=F=>{_2(F,()=>s.signal,()=>N=!0)},R=e1(s.options,s.fetchOptions),j=async(F,T,H)=>{if(N)return Promise.reject(s.signal.reason);if(T==null&&F.pages.length)return Promise.resolve(F);const z=(()=>{const ne={client:s.client,queryKey:s.queryKey,pageParam:T,direction:H?"backward":"forward",meta:s.options.meta};return M(ne),ne})(),Y=await R(z),{maxPages:te}=s.options,k=H?N2:E2;return{pages:k(F.pages,Y,te),pageParams:k(F.pageParams,T,te)}};if(u&&d.length){const F=u==="backward",T=F?s1:ph,H={pages:d,pageParams:h};m=await j(H,T(r,H),F)}else{const F=n??d.length;do{const T=p===0?h[0]===void 0?r.initialPageParam:h[0]:ph(r,m);if(p>0&&T==null)break;m=await j(m,T),p++}while(p<F)}return m};s.options.persister?s.fetchFn=()=>{var N,M;return(M=(N=s.options).persister)==null?void 0:M.call(N,y,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=y}}}function ph(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function s1(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}function H2(n,s){return s?ph(n,s)!=null:!1}function L2(n,s){return!s||!n.getPreviousPageParam?!1:s1(n,s)!=null}var mi,as,gi,An,ss,Et,kr,is,Fn,Rl,By,U2=(By=class extends a1{constructor(s){super();pe(this,Fn);pe(this,mi);pe(this,as);pe(this,gi);pe(this,An);pe(this,ss);pe(this,Et);pe(this,kr);pe(this,is);oe(this,is,!1),oe(this,kr,s.defaultOptions),this.setOptions(s.options),this.observers=[],oe(this,ss,s.client),oe(this,An,L(this,ss).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,oe(this,as,Iv(this.options)),this.state=s.state??L(this,as),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,mi)}get promise(){var s;return(s=L(this,Et))==null?void 0:s.promise}setOptions(s){if(this.options={...L(this,kr),...s},s!=null&&s._type&&oe(this,mi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Iv(this.options);i.data!==void 0&&(this.setState(Yv(i.data,i.dataUpdatedAt)),oe(this,as,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,An).remove(this)}setData(s,i){const r=mh(this.state.data,s,this.options);return De(this,Fn,Rl).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){De(this,Fn,Rl).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=L(this,Et))==null?void 0:r.promise;return(u=L(this,Et))==null||u.cancel(s),i?i.then(fn).catch(fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,as)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>ft(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ft(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Py(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),L(this,An).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){const i=this.observers.indexOf(s);i!==-1&&(this.observers.splice(i,1),this.observers.length||(L(this,Et)&&(L(this,is)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Et).cancel({revert:!0}):L(this,Et).cancelRetry()),this.scheduleGc()),L(this,An).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Fn,Rl).call(this,{type:"invalidate"})}async fetch(s,i){var y,x,v,b,w,C,N,M,R,j,F,T;if(this.state.fetchStatus!=="idle"&&((y=L(this,Et))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(L(this,Et))return L(this,Et).continueRetry(),L(this,Et).promise}if(s&&this.setOptions(s),!this.options.queryFn){const H=this.observers.find(D=>D.options.queryFn);H&&this.setOptions(H.options)}const r=new AbortController,u=H=>{Object.defineProperty(H,"signal",{enumerable:!0,get:()=>(oe(this,is,!0),r.signal)})},d=()=>{const H=e1(this.options,i),z=(()=>{const Y={client:L(this,ss),queryKey:this.queryKey,meta:this.meta};return u(Y),Y})();return oe(this,is,!1),this.options.persister?this.options.persister(H,z,this):H(z)},m=(()=>{const H={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:L(this,ss),state:this.state,fetchFn:d};return u(H),H})();(x=L(this,mi)==="infinite"?D2(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),oe(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Fn,Rl).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta});const p=oe(this,Et,l1({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:H=>{H instanceof gh&&H.revert&&this.setState({...L(this,gi),fetchStatus:"idle"}),r.abort()},onFail:(H,D)=>{De(this,Fn,Rl).call(this,{type:"failed",failureCount:H,error:D})},onPause:()=>{De(this,Fn,Rl).call(this,{type:"pause"})},onContinue:()=>{De(this,Fn,Rl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const H=await p.start();if(H===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(H),(C=(w=L(this,An).config).onSuccess)==null||C.call(w,H,this),(M=(N=L(this,An).config).onSettled)==null||M.call(N,H,this.state.error,this),H}catch(H){if(H instanceof gh){if(H.silent)return L(this,Et).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw De(this,Fn,Rl).call(this,{type:"error",error:H}),(j=(R=L(this,An).config).onError)==null||j.call(R,H,this),(T=(F=L(this,An).config).onSettled)==null||T.call(F,this.state.data,H,this),H}finally{L(this,Et)===p&&oe(this,Et,void 0),this.scheduleGc()}}},mi=new WeakMap,as=new WeakMap,gi=new WeakMap,An=new WeakMap,ss=new WeakMap,Et=new WeakMap,kr=new WeakMap,is=new WeakMap,Fn=new WeakSet,Rl=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i1(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...Yv(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,gi,s.manual?u:void 0),u;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),$t.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),L(this,An).notify({query:this,type:"updated",action:s})})},By);function i1(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Yv(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Iv(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var en,He,Gr,tn,rs,pi,Al,qr,vi,yi,os,us,ma,xi,Qe,Ar,vh,yh,xh,Sh,bh,wh,Ch,jh,ky,r1=(ky=class extends Ir{constructor(s,i){super();pe(this,Qe);pe(this,en);pe(this,He);pe(this,Gr);pe(this,tn);pe(this,rs);pe(this,pi);pe(this,Al);pe(this,qr);pe(this,vi);pe(this,yi);pe(this,os);pe(this,us);pe(this,ma);pe(this,xi,new Set);this.options=i,oe(this,en,s),oe(this,Al,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),Xv(L(this,He),this.options)?De(this,Qe,Ar).call(this):this.updateResult(),De(this,Qe,bh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eh(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eh(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,wh).call(this),De(this,Qe,Ch).call(this),L(this,He).removeObserver(this)}setOptions(s){const i=this.options,r=L(this,He);if(this.options=L(this,en).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ft(this.options.enabled,L(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,jh).call(this),L(this,He).setOptions(this.options),i._defaulted&&!Ld(this.options,i)&&L(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const u=this.hasListeners();u&&Kv(L(this,He),r,this.options,i)&&De(this,Qe,Ar).call(this),this.updateResult(),u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||ft(this.options.staleTime,L(this,He))!==ft(i.staleTime,L(this,He)))&&De(this,Qe,yh).call(this);const d=De(this,Qe,xh).call(this);u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||d!==L(this,ma))&&De(this,Qe,Sh).call(this,d)}getOptimisticResult(s){const i=L(this,en).getQueryCache().build(L(this,en),s),r=this.createResult(i,s);return Ld(this.getCurrentResult(),r)||(oe(this,tn,r),oe(this,pi,this.options),oe(this,rs,L(this,He).state)),r}getCurrentResult(){return L(this,tn)}trackResult(s,i){return new Proxy(s,{get:(r,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(r,u))})}trackProp(s){L(this,xi).add(s)}getCurrentQuery(){return L(this,He)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=L(this,en).defaultQueryOptions(s),r=L(this,en).getQueryCache().build(L(this,en),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=L(this,en).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===r.queryHash&&r.state.data!==void 0&&(u(),m(this.createResult(r,i)))})});return Promise.race([r.fetch(i).then(()=>{const m=this.createResult(r,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(s){return De(this,Qe,Ar).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,tn)))}createResult(s,i){var D;const r=L(this,He),u=this.options,d=L(this,tn),h=L(this,rs),m=L(this,pi),p=s!==r?s.state:L(this,Gr),{state:y}=s;let x={...y},v=!1,b;if(i._optimisticResults){const z=this.hasListeners(),Y=!z&&Xv(s,i),te=z&&Kv(s,r,i,u);(Y||te)&&(x={...x,...i1(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:C,status:N}=x;b=x.data;let M=!1;if(i.placeholderData!==void 0&&b===void 0&&N==="pending"){let z;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(z=d.data,M=!0):z=typeof i.placeholderData=="function"?i.placeholderData((D=L(this,yi))==null?void 0:D.state.data,L(this,yi)):i.placeholderData,z!==void 0&&(N="success",b=mh(d==null?void 0:d.data,z,i),v=!0)}if(i.select&&b!==void 0&&!M)if(d&&b===(h==null?void 0:h.data)&&i.select===L(this,qr))b=L(this,vi);else try{oe(this,qr,i.select),b=i.select(b),b=mh(d==null?void 0:d.data,b,i),oe(this,vi,b),oe(this,Al,null)}catch(z){oe(this,Al,z)}else b===void 0&&oe(this,Al,null);L(this,Al)&&(w=L(this,Al),b=L(this,vi),C=Date.now(),N="error",v=!1);const R=x.fetchStatus==="fetching",j=N==="pending",F=N==="error",T=j&&R,H=b!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:j,isSuccess:N==="success",isError:F,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:C,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!j,isLoadingError:F&&!H,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:F&&H,isStale:Jh(s,i),refetch:this.refetch,isEnabled:ft(i.enabled,s)!==!1}}updateResult(){const s=L(this,tn),i=this.createResult(L(this,He),this.options);if(oe(this,rs,L(this,He).state),oe(this,pi,this.options),L(this,rs).data!==void 0&&oe(this,yi,L(this,He)),Ld(i,s))return;oe(this,tn,i);const u=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!L(this,xi).size)return!0;const m=new Set(h??L(this,xi));return this.options.throwOnError&&m.add("error"),Object.keys(L(this,tn)).some(p=>{const y=p;return L(this,tn)[y]!==s[y]&&m.has(y)})})();$t.batch(()=>{u&&this.listeners.forEach(d=>{d(L(this,tn))}),L(this,en).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,bh).call(this)}},en=new WeakMap,He=new WeakMap,Gr=new WeakMap,tn=new WeakMap,rs=new WeakMap,pi=new WeakMap,Al=new WeakMap,qr=new WeakMap,vi=new WeakMap,yi=new WeakMap,os=new WeakMap,us=new WeakMap,ma=new WeakMap,xi=new WeakMap,Qe=new WeakSet,Ar=function(s){De(this,Qe,jh).call(this);let i=L(this,He).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(fn)),i},vh=function(s){return!Zh()&&ft(this.options.enabled,L(this,He))!==!1&&Zy(s)},yh=function(){De(this,Qe,wh).call(this);const s=ft(this.options.staleTime,L(this,He));if(L(this,tn).isStale||!De(this,Qe,vh).call(this,s))return;const i=Py(L(this,tn).dataUpdatedAt,s)+1;oe(this,os,ts.setTimeout(()=>{L(this,tn).isStale||this.updateResult()},i))},xh=function(){return ft(this.options.refetchInterval,L(this,He))??!1},Sh=function(s){De(this,Qe,Ch).call(this),oe(this,ma,s),!(L(this,ma)===0||!De(this,Qe,vh).call(this,L(this,ma)))&&oe(this,us,ts.setInterval(()=>{(this.options.refetchIntervalInBackground||Ph.isFocused())&&De(this,Qe,Ar).call(this)},L(this,ma)))},bh=function(){De(this,Qe,yh).call(this),De(this,Qe,Sh).call(this,De(this,Qe,xh).call(this))},wh=function(){L(this,os)!==void 0&&(ts.clearTimeout(L(this,os)),oe(this,os,void 0))},Ch=function(){L(this,us)!==void 0&&(ts.clearInterval(L(this,us)),oe(this,us,void 0))},jh=function(){const s=L(this,en).getQueryCache().build(L(this,en),this.options);if(s===L(this,He))return;const i=L(this,He);oe(this,He,s),oe(this,Gr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},ky);function V2(n,s){return ft(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ft(s.retryOnMount,n)===!1)}function Xv(n,s){return V2(n,s)||n.state.data!==void 0&&Eh(n,s,s.refetchOnMount)}function Eh(n,s,i){if(ft(s.enabled,n)!==!1&&ft(s.staleTime,n)!=="static"){const r=ft(i,n);return r==="always"||r!==!1&&Jh(n,s)}return!1}function Kv(n,s,i,r){return(n!==s||ft(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Jh(n,i)}function Jh(n,s){return ft(s.enabled,n)!==!1&&n.isStaleByTime(ft(s.staleTime,n))}var $2=class extends r1{constructor(n,s){super(n,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,s){var w,C;const{state:i}=n,r=super.createResult(n,s),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=r,p=(C=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:C.direction,y=h&&p==="forward",x=u&&p==="forward",v=h&&p==="backward",b=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:H2(s,i.data),hasPreviousPage:L2(s,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!b}}},Qr,sl,Yt,cs,il,oa,Gy,F2=(Gy=class extends a1{constructor(s){super();pe(this,il);pe(this,Qr);pe(this,sl);pe(this,Yt);pe(this,cs);oe(this,Qr,s.client),this.mutationId=s.mutationId,oe(this,Yt,s.mutationCache),oe(this,sl,[]),this.state=s.state||B2(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){L(this,sl).includes(s)||(L(this,sl).push(s),this.clearGcTimeout(),L(this,Yt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){oe(this,sl,L(this,sl).filter(i=>i!==s)),this.scheduleGc(),L(this,Yt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){L(this,sl).length||(this.state.status==="pending"?this.scheduleGc():L(this,Yt).remove(this))}continue(){var s;return((s=L(this,cs))==null?void 0:s.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(s){var m,p,y,x,v,b,w,C,N,M,R,j,F,T,H,D,z,Y;const i=()=>{De(this,il,oa).call(this,{type:"continue"})},r={client:L(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=oe(this,cs,l1({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(te,k)=>{De(this,il,oa).call(this,{type:"failed",failureCount:te,error:k})},onPause:()=>{De(this,il,oa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Yt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,il,oa).call(this,{type:"pending",variables:s,isPaused:h}),L(this,Yt).config.onMutate&&await L(this,Yt).config.onMutate(s,this,r);const k=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,s,r));k!==this.state.context&&De(this,il,oa).call(this,{type:"pending",context:k,variables:s,isPaused:h})}const te=await u.start();return await((x=(y=L(this,Yt).config).onSuccess)==null?void 0:x.call(y,te,s,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,te,s,this.state.context,r)),await((C=(w=L(this,Yt).config).onSettled)==null?void 0:C.call(w,te,null,this.state.variables,this.state.context,this,r)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,te,null,s,this.state.context,r)),De(this,il,oa).call(this,{type:"success",data:te}),te}catch(te){try{await((j=(R=L(this,Yt).config).onError)==null?void 0:j.call(R,te,s,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((T=(F=this.options).onError)==null?void 0:T.call(F,te,s,this.state.context,r))}catch(k){Promise.reject(k)}try{await((D=(H=L(this,Yt).config).onSettled)==null?void 0:D.call(H,void 0,te,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((Y=(z=this.options).onSettled)==null?void 0:Y.call(z,void 0,te,s,this.state.context,r))}catch(k){Promise.reject(k)}throw De(this,il,oa).call(this,{type:"error",error:te}),te}finally{L(this,cs)===u&&oe(this,cs,void 0),L(this,Yt).runNext(this)}}},Qr=new WeakMap,sl=new WeakMap,Yt=new WeakMap,cs=new WeakMap,il=new WeakSet,oa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),$t.batch(()=>{L(this,sl).forEach(r=>{r.onMutationUpdate(s)}),L(this,Yt).notify({mutation:this,type:"updated",action:s})})},Gy);function B2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ga,Bn,Yr,qy,k2=(qy=class extends Ir{constructor(s={}){super();pe(this,ga);pe(this,Bn);pe(this,Yr);this.config=s,oe(this,ga,new Set),oe(this,Bn,new Map),oe(this,Yr,0)}build(s,i,r){const u=new F2({client:s,mutationCache:this,mutationId:++Cu(this,Yr)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){L(this,ga).add(s);const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);r?r.push(s):L(this,Bn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(L(this,ga).delete(s)){const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);if(r)if(r.length>1){const u=r.indexOf(s);u!==-1&&r.splice(u,1)}else r[0]===s&&L(this,Bn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var r;const i=ju(s);if(typeof i=="string"){const u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d.state.status==="pending");return!u||u===s}else return!0}runNext(s){var r,u;const i=ju(s);return typeof i=="string"?((u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){$t.batch(()=>{const s=this.getAll();L(this,ga).clear(),L(this,Bn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(L(this,ga))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Gv(i,r))}findAll(s={}){return this.getAll().filter(i=>Gv(s,i))}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return $t.batch(()=>Promise.all(s.map(i=>i.continue().catch(fn))))}},ga=new WeakMap,Bn=new WeakMap,Yr=new WeakMap,qy);function ju(n){var s;return(s=n.options.scope)==null?void 0:s.id}var rl,Qy,G2=(Qy=class extends Ir{constructor(s={}){super();pe(this,rl);this.config=s,oe(this,rl,new Map)}build(s,i,r){const u=i.queryKey,d=i.queryHash??Xh(u,i);let h=this.get(d);return h||(h=new U2({client:s,queryKey:u,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(h)),h}add(s){L(this,rl).has(s.queryHash)||(L(this,rl).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){L(this,rl).get(s.queryHash)===s&&(s.destroy(),L(this,rl).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){$t.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return L(this,rl).get(s)}getAll(){return[...L(this,rl).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>kv(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>kv(s,r)):i}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},rl=new WeakMap,Qy),ht,pa,va,Si,bi,ya,wi,Ci,Yy,q2=(Yy=class{constructor(n={}){pe(this,ht);pe(this,pa);pe(this,va);pe(this,Si);pe(this,bi);pe(this,ya);pe(this,wi);pe(this,Ci);oe(this,ht,n.queryCache||new G2),oe(this,pa,n.mutationCache||new k2),oe(this,va,n.defaultOptions||{}),oe(this,Si,new Map),oe(this,bi,new Map),oe(this,ya,0)}mount(){Cu(this,ya)._++,L(this,ya)===1&&(oe(this,wi,Ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),oe(this,Ci,Ou.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var n,s;Cu(this,ya)._--,L(this,ya)===0&&((n=L(this,wi))==null||n.call(this),oe(this,wi,void 0),(s=L(this,Ci))==null||s.call(this),oe(this,Ci,void 0))}isFetching(n){return L(this,ht).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,pa).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=L(this,ht).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ft(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return L(this,ht).findAll(n).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(n,s,i){var h;const r=this.defaultQueryOptions({queryKey:n}),u=(h=L(this,ht).get(r.queryHash))==null?void 0:h.state.data,d=w2(s,u);if(d!==void 0)return L(this,ht).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return $t.batch(()=>L(this,ht).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=L(this,ht);$t.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=L(this,ht);return $t.batch(()=>{const r=i.findAll(n),u=new Set(r);return r.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},s)})}cancelQueries(n,s={}){const i={revert:!0,...s},r=$t.batch(()=>L(this,ht).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(fn).catch(fn)}invalidateQueries(n,s={}){return $t.batch(()=>(L(this,ht).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=$t.batch(()=>L(this,ht).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(fn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(fn)}async query(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s),r=i.isStaleByTime(ft(s.staleTime,i))?await i.fetch(s):i.state.data,u=s.select;return u?u(r):r}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s);return i.isStaleByTime(ft(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(fn).catch(fn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(fn).catch(fn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Ou.isOnline()?L(this,pa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,pa)}getDefaultOptions(){return L(this,va)}setDefaultOptions(n){oe(this,va,n)}setQueryDefaults(n,s){L(this,Si).set(Ur(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...L(this,Si).values()],i={};return s.forEach(r=>{ji(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){L(this,bi).set(Ur(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...L(this,bi).values()],i={};return s.forEach(r=>{ji(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...L(this,va).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=Xh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Kh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,va).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,pa).clear()}},ht=new WeakMap,pa=new WeakMap,va=new WeakMap,Si=new WeakMap,bi=new WeakMap,ya=new WeakMap,wi=new WeakMap,Ci=new WeakMap,Yy);const o1=E.createContext(!1),Q2=()=>E.useContext(o1);o1.Provider;function Y2(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const I2=E.createContext(Y2()),X2=()=>E.useContext(I2),K2=(n,s,i)=>{const r=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?t1(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||r)&&(s.isReset()||(n.retryOnMount=!1))},Z2=n=>{E.useEffect(()=>{n.clearReset()},[n])},P2=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||t1(i,[n.error,r])),J2=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},W2=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,ew=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function u1(n,s,i){const r=Q2(),u=X2(),d=Ky(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,J2(h),K2(h,u,m),Z2(u);const[y]=E.useState(()=>new s(d,h)),x=y.getOptimisticResult(h),v=!r&&p;if(E.useSyncExternalStore(E.useCallback(b=>{const w=v?y.subscribe($t.batchCalls(b)):fn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),W2(h,x))throw ew(h,y,u);if(P2({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Ol(n,s){return u1(n,r1)}function tw(n,s){return u1(n,$2)}var Wh=Iy();/**
50
50
  * @remix-run/router v1.23.4
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+a.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function go(){return go=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var o in s)({}).hasOwnProperty.call(s,o)&&(n[o]=s[o])}return n},go.apply(null,arguments)}var Zl;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Zl||(Zl={}));const m0="popstate";function S2(n){n===void 0&&(n={});function i(o,u){let{pathname:f,search:d,hash:g}=o.location;return Xd("",{pathname:f,search:d,hash:g},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function s(o,u){return typeof u=="string"?u:vu(u)}return b2(i,s,null,n)}function rt(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Cy(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function x2(){return Math.random().toString(36).substr(2,8)}function g0(n,i){return{usr:n.state,key:n.key,idx:i}}function Xd(n,i,s,o){return s===void 0&&(s=null),go({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof i=="string"?ns(i):i,{state:s,key:i&&i.key||o||x2()})}function vu(n){let{pathname:i="/",search:s="",hash:o=""}=n;return s&&s!=="?"&&(i+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(i+=o.charAt(0)==="#"?o:"#"+o),i}function ns(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substr(s),n=n.substr(0,s));let o=n.indexOf("?");o>=0&&(i.search=n.substr(o),n=n.substr(0,o)),n&&(i.pathname=n)}return i}function b2(n,i,s,o){o===void 0&&(o={});let{window:u=document.defaultView,v5Compat:f=!1}=o,d=u.history,g=Zl.Pop,p=null,S=y();S==null&&(S=0,d.replaceState(go({},d.state,{idx:S}),""));function y(){return(d.state||{idx:null}).idx}function v(){g=Zl.Pop;let _=y(),w=_==null?null:_-S;S=_,p&&p({action:g,location:N.location,delta:w})}function b(_,w){g=Zl.Push;let j=Xd(N.location,_,w);S=y()+1;let O=g0(j,S),G=N.createHref(j);try{d.pushState(O,"",G)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;u.location.assign(G)}f&&p&&p({action:g,location:N.location,delta:1})}function C(_,w){g=Zl.Replace;let j=Xd(N.location,_,w);S=y();let O=g0(j,S),G=N.createHref(j);d.replaceState(O,"",G),f&&p&&p({action:g,location:N.location,delta:0})}function E(_){let w=u.location.origin!=="null"?u.location.origin:u.location.href,j=typeof _=="string"?_:vu(_);return j=j.replace(/ $/,"%20"),rt(w,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,w)}let N={get action(){return g},get location(){return n(u,d)},listen(_){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(m0,v),p=_,()=>{u.removeEventListener(m0,v),p=null}},createHref(_){return i(u,_)},createURL:E,encodeLocation(_){let w=E(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:b,replace:C,go(_){return d.go(_)}};return N}var p0;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(p0||(p0={}));function C2(n,i,s){return s===void 0&&(s="/"),E2(n,i,s)}function E2(n,i,s,o){let u=typeof i=="string"?ns(i):i,f=xh(u.pathname||"/",s);if(f==null)return null;let d=Ey(n);w2(d);let g=null,p=H2(f);for(let S=0;g==null&&S<d.length;++S)g=z2(d[S],p);return g}function Ey(n,i,s,o){i===void 0&&(i=[]),s===void 0&&(s=[]),o===void 0&&(o="");let u=(f,d,g)=>{let p={relativePath:g===void 0?f.path||"":g,caseSensitive:f.caseSensitive===!0,childrenIndex:d,route:f};p.relativePath.startsWith("/")&&(rt(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let S=Jl([o,p.relativePath]),y=s.concat(p);f.children&&f.children.length>0&&(rt(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+S+'".')),Ey(f.children,i,y,S)),!(f.path==null&&!f.index)&&i.push({path:S,score:A2(S,f.index),routesMeta:y})};return n.forEach((f,d)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))u(f,d);else for(let p of wy(f.path))u(f,d,p)}),i}function wy(n){let i=n.split("/");if(i.length===0)return[];let[s,...o]=i,u=s.endsWith("?"),f=s.replace(/\?$/,"");if(o.length===0)return u?[f,""]:[f];let d=wy(o.join("/")),g=[];return g.push(...d.map(p=>p===""?f:[f,p].join("/"))),u&&g.push(...d),g.map(p=>n.startsWith("/")&&p===""?"/":p)}function w2(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:O2(i.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const _2=/^:[\w-]+$/,R2=3,T2=2,N2=1,M2=10,j2=-2,v0=n=>n==="*";function A2(n,i){let s=n.split("/"),o=s.length;return s.some(v0)&&(o+=j2),i&&(o+=T2),s.filter(u=>!v0(u)).reduce((u,f)=>u+(_2.test(f)?R2:f===""?N2:M2),o)}function O2(n,i){return n.length===i.length&&n.slice(0,-1).every((o,u)=>o===i[u])?n[n.length-1]-i[i.length-1]:0}function z2(n,i,s){let{routesMeta:o}=n,u={},f="/",d=[];for(let g=0;g<o.length;++g){let p=o[g],S=g===o.length-1,y=f==="/"?i:i.slice(f.length)||"/",v=D2({path:p.relativePath,caseSensitive:p.caseSensitive,end:S},y),b=p.route;if(!v)return null;Object.assign(u,v.params),d.push({params:u,pathname:Jl([f,v.pathname]),pathnameBase:F2(Jl([f,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(f=Jl([f,v.pathnameBase]))}return d}function D2(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,o]=U2(n.path,n.caseSensitive,n.end),u=i.match(s);if(!u)return null;let f=u[0],d=f.replace(/(.)\/+$/,"$1"),g=u.slice(1);return{params:o.reduce((S,y,v)=>{let{paramName:b,isOptional:C}=y;if(b==="*"){let N=g[v]||"";d=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const E=g[v];return C&&!E?S[b]=void 0:S[b]=(E||"").replace(/%2F/g,"/"),S},{}),pathname:f,pathnameBase:d,pattern:n}}function U2(n,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0),Cy(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let o=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,g,p)=>(o.push({paramName:g,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,i?void 0:"i"),o]}function H2(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Cy(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+i+").")),n}}function xh(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}function L2(n,i){i===void 0&&(i="/");let{pathname:s,search:o="",hash:u=""}=typeof n=="string"?ns(n):n,f;return s?(s=Ty(s),s.startsWith("/")?f=y0(s.substring(1),"/"):f=y0(s,i)):f=i,{pathname:f,search:B2(o),hash:G2(u)}}function y0(n,i){let s=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Sd(n,i,s,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+i+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function V2(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function _y(n,i){let s=V2(n);return i?s.map((o,u)=>u===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function Ry(n,i,s,o){o===void 0&&(o=!1);let u;typeof n=="string"?u=ns(n):(u=go({},n),rt(!u.pathname||!u.pathname.includes("?"),Sd("?","pathname","search",u)),rt(!u.pathname||!u.pathname.includes("#"),Sd("#","pathname","hash",u)),rt(!u.search||!u.search.includes("#"),Sd("#","search","hash",u)));let f=n===""||u.pathname==="",d=f?"/":u.pathname,g;if(d==null)g=s;else{let v=i.length-1;if(!o&&d.startsWith("..")){let b=d.split("/");for(;b[0]==="..";)b.shift(),v-=1;u.pathname=b.join("/")}g=v>=0?i[v]:"/"}let p=L2(u,g),S=d&&d!=="/"&&d.endsWith("/"),y=(f||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(S||y)&&(p.pathname+="/"),p}const Ty=n=>n.replace(/\/\/+/g,"/"),Jl=n=>Ty(n.join("/")),F2=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),B2=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,G2=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function q2(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Ny=["post","put","patch","delete"];new Set(Ny);const k2=["get",...Ny];new Set(k2);/**
58
+ */function Vr(){return Vr=Object.assign?Object.assign.bind():function(n){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var r in i)({}).hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},Vr.apply(null,arguments)}var xa;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(xa||(xa={}));const Zv="popstate";function nw(n){n===void 0&&(n={});function s(r,u){let{pathname:d,search:h,hash:m}=r.location;return Nh("",{pathname:d,search:h,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(r,u){return typeof u=="string"?u:f1(u)}return aw(s,i,null,n)}function wt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function c1(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function lw(){return Math.random().toString(36).substr(2,8)}function Pv(n,s){return{usr:n.state,key:n.key,idx:s}}function Nh(n,s,i,r){return i===void 0&&(i=null),Vr({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof s=="string"?_i(s):s,{state:i,key:s&&s.key||r||lw()})}function f1(n){let{pathname:s="/",search:i="",hash:r=""}=n;return i&&i!=="?"&&(s+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function _i(n){let s={};if(n){let i=n.indexOf("#");i>=0&&(s.hash=n.substr(i),n=n.substr(0,i));let r=n.indexOf("?");r>=0&&(s.search=n.substr(r),n=n.substr(0,r)),n&&(s.pathname=n)}return s}function aw(n,s,i,r){r===void 0&&(r={});let{window:u=document.defaultView,v5Compat:d=!1}=r,h=u.history,m=xa.Pop,p=null,y=x();y==null&&(y=0,h.replaceState(Vr({},h.state,{idx:y}),""));function x(){return(h.state||{idx:null}).idx}function v(){m=xa.Pop;let M=x(),R=M==null?null:M-y;y=M,p&&p({action:m,location:N.location,delta:R})}function b(M,R){m=xa.Push;let j=Nh(N.location,M,R);y=x()+1;let F=Pv(j,y),T=N.createHref(j);try{h.pushState(F,"",T)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;u.location.assign(T)}d&&p&&p({action:m,location:N.location,delta:1})}function w(M,R){m=xa.Replace;let j=Nh(N.location,M,R);y=x();let F=Pv(j,y),T=N.createHref(j);h.replaceState(F,"",T),d&&p&&p({action:m,location:N.location,delta:0})}function C(M){let R=u.location.origin!=="null"?u.location.origin:u.location.href,j=typeof M=="string"?M:f1(M);return j=j.replace(/ $/,"%20"),wt(R,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,R)}let N={get action(){return m},get location(){return n(u,h)},listen(M){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Zv,v),p=M,()=>{u.removeEventListener(Zv,v),p=null}},createHref(M){return s(u,M)},createURL:C,encodeLocation(M){let R=C(M);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:w,go(M){return h.go(M)}};return N}var Jv;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Jv||(Jv={}));function sw(n,s,i){return i===void 0&&(i="/"),iw(n,s,i)}function iw(n,s,i,r){let u=typeof s=="string"?_i(s):s,d=p1(u.pathname||"/",i);if(d==null)return null;let h=d1(n);rw(h);let m=null,p=g1(d);for(let y=0;m==null&&y<h.length;++y)m=pw(h[y],p);return m}function d1(n,s,i,r){s===void 0&&(s=[]),i===void 0&&(i=[]),r===void 0&&(r="");let u=(d,h,m)=>{let p={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};p.relativePath.startsWith("/")&&(wt(p.relativePath.startsWith(r),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(r.length));let y=fs([r,p.relativePath]),x=i.concat(p);d.children&&d.children.length>0&&(wt(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),d1(d.children,s,x,y)),!(d.path==null&&!d.index)&&s.push({path:y,score:mw(y,d.index),routesMeta:x})};return n.forEach((d,h)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,h);else for(let p of h1(d.path))u(d,h,p)}),s}function h1(n){let s=n.split("/");if(s.length===0)return[];let[i,...r]=s,u=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return u?[d,""]:[d];let h=h1(r.join("/")),m=[];return m.push(...h.map(p=>p===""?d:[d,p].join("/"))),u&&m.push(...h),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function rw(n){n.sort((s,i)=>s.score!==i.score?i.score-s.score:gw(s.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}const ow=/^:[\w-]+$/,uw=3,cw=2,fw=1,dw=10,hw=-2,Wv=n=>n==="*";function mw(n,s){let i=n.split("/"),r=i.length;return i.some(Wv)&&(r+=hw),s&&(r+=cw),i.filter(u=>!Wv(u)).reduce((u,d)=>u+(ow.test(d)?uw:d===""?fw:dw),r)}function gw(n,s){return n.length===s.length&&n.slice(0,-1).every((r,u)=>r===s[u])?n[n.length-1]-s[s.length-1]:0}function pw(n,s,i){let{routesMeta:r}=n,u={},d="/",h=[];for(let m=0;m<r.length;++m){let p=r[m],y=m===r.length-1,x=d==="/"?s:s.slice(d.length)||"/",v=m1({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},x),b=p.route;if(!v)return null;Object.assign(u,v.params),h.push({params:u,pathname:fs([d,v.pathname]),pathnameBase:ww(fs([d,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(d=fs([d,v.pathnameBase]))}return h}function m1(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=vw(n.path,n.caseSensitive,n.end),u=s.match(i);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:r.reduce((y,x,v)=>{let{paramName:b,isOptional:w}=x;if(b==="*"){let N=m[v]||"";h=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const C=m[v];return w&&!C?y[b]=void 0:y[b]=(C||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:h,pattern:n}}function vw(n,s,i){s===void 0&&(s=!1),i===void 0&&(i=!0),c1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,p)=>(r.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,s?void 0:"i"),r]}function g1(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return c1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),n}}function p1(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let i=s.endsWith("/")?s.length-1:s.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}function yw(n,s){s===void 0&&(s="/");let{pathname:i,search:r="",hash:u=""}=typeof n=="string"?_i(n):n,d;return i?(i=v1(i),i.startsWith("/")?d=ey(i.substring(1),"/"):d=ey(i,s)):d=s,{pathname:d,search:Cw(r),hash:jw(u)}}function ey(n,s){let i=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Ud(n,s,i,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xw(n){return n.filter((s,i)=>i===0||s.route.path&&s.route.path.length>0)}function Sw(n,s){let i=xw(n);return s?i.map((r,u)=>u===i.length-1?r.pathname:r.pathnameBase):i.map(r=>r.pathnameBase)}function bw(n,s,i,r){r===void 0&&(r=!1);let u;typeof n=="string"?u=_i(n):(u=Vr({},n),wt(!u.pathname||!u.pathname.includes("?"),Ud("?","pathname","search",u)),wt(!u.pathname||!u.pathname.includes("#"),Ud("#","pathname","hash",u)),wt(!u.search||!u.search.includes("#"),Ud("#","search","hash",u)));let d=n===""||u.pathname==="",h=d?"/":u.pathname,m;if(h==null)m=i;else{let v=s.length-1;if(!r&&h.startsWith("..")){let b=h.split("/");for(;b[0]==="..";)b.shift(),v-=1;u.pathname=b.join("/")}m=v>=0?s[v]:"/"}let p=yw(u,m),y=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||x)&&(p.pathname+="/"),p}const v1=n=>n.replace(/\/\/+/g,"/"),fs=n=>v1(n.join("/")),ww=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Cw=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,jw=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ew(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const y1=["post","put","patch","delete"];new Set(y1);const Nw=["get",...y1];new Set(Nw);/**
59
59
  * React Router v6.30.6
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+a.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function po(){return po=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var o in s)({}).hasOwnProperty.call(s,o)&&(n[o]=s[o])}return n},po.apply(null,arguments)}const bh=T.createContext(null),$2=T.createContext(null),qa=T.createContext(null),_u=T.createContext(null),na=T.createContext({outlet:null,matches:[],isDataRoute:!1}),My=T.createContext(null);function Q2(n,i){let{relative:s}=i===void 0?{}:i;wo()||rt(!1);let{basename:o,navigator:u}=T.useContext(qa),{hash:f,pathname:d,search:g}=Ay(n,{relative:s}),p=d;return o!=="/"&&(p=d==="/"?o:Jl([o,d])),u.createHref({pathname:p,search:g,hash:f})}function wo(){return T.useContext(_u)!=null}function _o(){return wo()||rt(!1),T.useContext(_u).location}function jy(n){T.useContext(qa).static||T.useLayoutEffect(n)}function Ru(){let{isDataRoute:n}=T.useContext(na);return n?iC():Y2()}function Y2(){wo()||rt(!1);let n=T.useContext(bh),{basename:i,future:s,navigator:o}=T.useContext(qa),{matches:u}=T.useContext(na),{pathname:f}=_o(),d=JSON.stringify(_y(u,s.v7_relativeSplatPath)),g=T.useRef(!1);return jy(()=>{g.current=!0}),T.useCallback(function(S,y){if(y===void 0&&(y={}),!g.current)return;if(typeof S=="number"){o.go(S);return}let v=Ry(S,JSON.parse(d),f,y.relative==="path");n==null&&i!=="/"&&(v.pathname=v.pathname==="/"?i:Jl([i,v.pathname])),(y.replace?o.replace:o.push)(v,y.state,y)},[i,o,d,f,n])}function I2(){let{matches:n}=T.useContext(na),i=n[n.length-1];return i?i.params:{}}function Ay(n,i){let{relative:s}=i===void 0?{}:i,{future:o}=T.useContext(qa),{matches:u}=T.useContext(na),{pathname:f}=_o(),d=JSON.stringify(_y(u,o.v7_relativeSplatPath));return T.useMemo(()=>Ry(n,JSON.parse(d),f,s==="path"),[n,d,f,s])}function X2(n,i){return K2(n,i)}function K2(n,i,s,o){wo()||rt(!1);let{navigator:u}=T.useContext(qa),{matches:f}=T.useContext(na),d=f[f.length-1],g=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let S=_o(),y;if(i){var v;let _=typeof i=="string"?ns(i):i;p==="/"||(v=_.pathname)!=null&&v.startsWith(p)||rt(!1),y=_}else y=S;let b=y.pathname||"/",C=b;if(p!=="/"){let _=p.replace(/^\//,"").split("/");C="/"+b.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=C2(n,{pathname:C}),N=eC(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},g,_.params),pathname:Jl([p,u.encodeLocation?u.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?p:Jl([p,u.encodeLocation?u.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),f,s,o);return i&&N?T.createElement(_u.Provider,{value:{location:po({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:Zl.Pop}},N):N}function Z2(){let n=aC(),i=q2(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},i),s?T.createElement("pre",{style:u},s):null,null)}const P2=T.createElement(Z2,null);class J2 extends T.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,s){return s.location!==i.location||s.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:s.error,location:s.location,revalidation:i.revalidation||s.revalidation}}componentDidCatch(i,s){console.error("React Router caught the following error during render",i,s)}render(){return this.state.error!==void 0?T.createElement(na.Provider,{value:this.props.routeContext},T.createElement(My.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function W2(n){let{routeContext:i,match:s,children:o}=n,u=T.useContext(bh);return u&&u.static&&u.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=s.route.id),T.createElement(na.Provider,{value:i},o)}function eC(n,i,s,o){var u;if(i===void 0&&(i=[]),s===void 0&&(s=null),o===void 0&&(o=null),n==null){var f;if(!s)return null;if(s.errors)n=s.matches;else if((f=o)!=null&&f.v7_partialHydration&&i.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,g=(u=s)==null?void 0:u.errors;if(g!=null){let y=d.findIndex(v=>v.route.id&&(g==null?void 0:g[v.route.id])!==void 0);y>=0||rt(!1),d=d.slice(0,Math.min(d.length,y+1))}let p=!1,S=-1;if(s&&o&&o.v7_partialHydration)for(let y=0;y<d.length;y++){let v=d[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(S=y),v.route.id){let{loaderData:b,errors:C}=s,E=v.route.loader&&b[v.route.id]===void 0&&(!C||C[v.route.id]===void 0);if(v.route.lazy||E){p=!0,S>=0?d=d.slice(0,S+1):d=[d[0]];break}}}return d.reduceRight((y,v,b)=>{let C,E=!1,N=null,_=null;s&&(C=g&&v.route.id?g[v.route.id]:void 0,N=v.route.errorElement||P2,p&&(S<0&&b===0?(sC("route-fallback"),E=!0,_=null):S===b&&(E=!0,_=v.route.hydrateFallbackElement||null)));let w=i.concat(d.slice(0,b+1)),j=()=>{let O;return C?O=N:E?O=_:v.route.Component?O=T.createElement(v.route.Component,null):v.route.element?O=v.route.element:O=y,T.createElement(W2,{match:v,routeContext:{outlet:y,matches:w,isDataRoute:s!=null},children:O})};return s&&(v.route.ErrorBoundary||v.route.errorElement||b===0)?T.createElement(J2,{location:s.location,revalidation:s.revalidation,component:N,error:C,children:j(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):j()},null)}var Oy=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Oy||{}),zy=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(zy||{});function tC(n){let i=T.useContext(bh);return i||rt(!1),i}function nC(n){let i=T.useContext($2);return i||rt(!1),i}function lC(n){let i=T.useContext(na);return i||rt(!1),i}function Dy(n){let i=lC(),s=i.matches[i.matches.length-1];return s.route.id||rt(!1),s.route.id}function aC(){var n;let i=T.useContext(My),s=nC(),o=Dy();return i!==void 0?i:(n=s.errors)==null?void 0:n[o]}function iC(){let{router:n}=tC(Oy.UseNavigateStable),i=Dy(zy.UseNavigateStable),s=T.useRef(!1);return jy(()=>{s.current=!0}),T.useCallback(function(u,f){f===void 0&&(f={}),s.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,po({fromRouteId:i},f)))},[n,i])}const S0={};function sC(n,i,s){S0[n]||(S0[n]=!0)}function oC(n,i){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Kd(n){rt(!1)}function rC(n){let{basename:i="/",children:s=null,location:o,navigationType:u=Zl.Pop,navigator:f,static:d=!1,future:g}=n;wo()&&rt(!1);let p=i.replace(/^\/*/,"/"),S=T.useMemo(()=>({basename:p,navigator:f,static:d,future:po({v7_relativeSplatPath:!1},g)}),[p,g,f,d]);typeof o=="string"&&(o=ns(o));let{pathname:y="/",search:v="",hash:b="",state:C=null,key:E="default"}=o,N=T.useMemo(()=>{let _=xh(y,p);return _==null?null:{location:{pathname:_,search:v,hash:b,state:C,key:E},navigationType:u}},[p,y,v,b,C,E,u]);return N==null?null:T.createElement(qa.Provider,{value:S},T.createElement(_u.Provider,{children:s,value:N}))}function uC(n){let{children:i,location:s}=n;return X2(Zd(i),s)}new Promise(()=>{});function Zd(n,i){i===void 0&&(i=[]);let s=[];return T.Children.forEach(n,(o,u)=>{if(!T.isValidElement(o))return;let f=[...i,u];if(o.type===T.Fragment){s.push.apply(s,Zd(o.props.children,f));return}o.type!==Kd&&rt(!1),!o.props.index||!o.props.children||rt(!1);let d={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Zd(o.props.children,f)),s.push(d)}),s}/**
67
+ */function $r(){return $r=Object.assign?Object.assign.bind():function(n){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var r in i)({}).hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},$r.apply(null,arguments)}const em=E.createContext(null),_w=E.createContext(null),Bu=E.createContext(null),ku=E.createContext(null),hs=E.createContext({outlet:null,matches:[],isDataRoute:!1}),x1=E.createContext(null);function Xr(){return E.useContext(ku)!=null}function Gu(){return Xr()||wt(!1),E.useContext(ku).location}function Mw(n){Xr()||wt(!1);let{pathname:s}=Gu();return E.useMemo(()=>m1(n,g1(s)),[s,n])}function S1(n){E.useContext(Bu).static||E.useLayoutEffect(n)}function tm(){let{isDataRoute:n}=E.useContext(hs);return n?kw():Rw()}function Rw(){Xr()||wt(!1);let n=E.useContext(em),{basename:s,future:i,navigator:r}=E.useContext(Bu),{matches:u}=E.useContext(hs),{pathname:d}=Gu(),h=JSON.stringify(Sw(u,i.v7_relativeSplatPath)),m=E.useRef(!1);return S1(()=>{m.current=!0}),E.useCallback(function(y,x){if(x===void 0&&(x={}),!m.current)return;if(typeof y=="number"){r.go(y);return}let v=bw(y,JSON.parse(h),d,x.relative==="path");n==null&&s!=="/"&&(v.pathname=v.pathname==="/"?s:fs([s,v.pathname])),(x.replace?r.replace:r.push)(v,x.state,x)},[s,r,h,d,n])}function Tw(){let{matches:n}=E.useContext(hs),s=n[n.length-1];return s?s.params:{}}function Aw(n,s){return Ow(n,s)}function Ow(n,s,i,r){Xr()||wt(!1);let{navigator:u}=E.useContext(Bu),{matches:d}=E.useContext(hs),h=d[d.length-1],m=h?h.params:{};h&&h.pathname;let p=h?h.pathnameBase:"/";h&&h.route;let y=Gu(),x;if(s){var v;let M=typeof s=="string"?_i(s):s;p==="/"||(v=M.pathname)!=null&&v.startsWith(p)||wt(!1),x=M}else x=y;let b=x.pathname||"/",w=b;if(p!=="/"){let M=p.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(M.length).join("/")}let C=sw(n,{pathname:w}),N=Uw(C&&C.map(M=>Object.assign({},M,{params:Object.assign({},m,M.params),pathname:fs([p,u.encodeLocation?u.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:fs([p,u.encodeLocation?u.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),d,i,r);return s&&N?E.createElement(ku.Provider,{value:{location:$r({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:xa.Pop}},N):N}function zw(){let n=Bw(),s=Ew(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},s),i?E.createElement("pre",{style:u},i):null,null)}const Dw=E.createElement(zw,null);class Hw extends E.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,i){return i.location!==s.location||i.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:i.error,location:i.location,revalidation:s.revalidation||i.revalidation}}componentDidCatch(s,i){console.error("React Router caught the following error during render",s,i)}render(){return this.state.error!==void 0?E.createElement(hs.Provider,{value:this.props.routeContext},E.createElement(x1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Lw(n){let{routeContext:s,match:i,children:r}=n,u=E.useContext(em);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(hs.Provider,{value:s},r)}function Uw(n,s,i,r){var u;if(s===void 0&&(s=[]),i===void 0&&(i=null),r===void 0&&(r=null),n==null){var d;if(!i)return null;if(i.errors)n=i.matches;else if((d=r)!=null&&d.v7_partialHydration&&s.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let h=n,m=(u=i)==null?void 0:u.errors;if(m!=null){let x=h.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);x>=0||wt(!1),h=h.slice(0,Math.min(h.length,x+1))}let p=!1,y=-1;if(i&&r&&r.v7_partialHydration)for(let x=0;x<h.length;x++){let v=h[x];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(y=x),v.route.id){let{loaderData:b,errors:w}=i,C=v.route.loader&&b[v.route.id]===void 0&&(!w||w[v.route.id]===void 0);if(v.route.lazy||C){p=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}return h.reduceRight((x,v,b)=>{let w,C=!1,N=null,M=null;i&&(w=m&&v.route.id?m[v.route.id]:void 0,N=v.route.errorElement||Dw,p&&(y<0&&b===0?(Gw("route-fallback"),C=!0,M=null):y===b&&(C=!0,M=v.route.hydrateFallbackElement||null)));let R=s.concat(h.slice(0,b+1)),j=()=>{let F;return w?F=N:C?F=M:v.route.Component?F=E.createElement(v.route.Component,null):v.route.element?F=v.route.element:F=x,E.createElement(Lw,{match:v,routeContext:{outlet:x,matches:R,isDataRoute:i!=null},children:F})};return i&&(v.route.ErrorBoundary||v.route.errorElement||b===0)?E.createElement(Hw,{location:i.location,revalidation:i.revalidation,component:N,error:w,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):j()},null)}var b1=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(b1||{}),w1=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(w1||{});function Vw(n){let s=E.useContext(em);return s||wt(!1),s}function $w(n){let s=E.useContext(_w);return s||wt(!1),s}function Fw(n){let s=E.useContext(hs);return s||wt(!1),s}function C1(n){let s=Fw(),i=s.matches[s.matches.length-1];return i.route.id||wt(!1),i.route.id}function Bw(){var n;let s=E.useContext(x1),i=$w(),r=C1();return s!==void 0?s:(n=i.errors)==null?void 0:n[r]}function kw(){let{router:n}=Vw(b1.UseNavigateStable),s=C1(w1.UseNavigateStable),i=E.useRef(!1);return S1(()=>{i.current=!0}),E.useCallback(function(u,d){d===void 0&&(d={}),i.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,$r({fromRouteId:s},d)))},[n,s])}const ty={};function Gw(n,s,i){ty[n]||(ty[n]=!0)}function qw(n,s){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function _h(n){wt(!1)}function Qw(n){let{basename:s="/",children:i=null,location:r,navigationType:u=xa.Pop,navigator:d,static:h=!1,future:m}=n;Xr()&&wt(!1);let p=s.replace(/^\/*/,"/"),y=E.useMemo(()=>({basename:p,navigator:d,static:h,future:$r({v7_relativeSplatPath:!1},m)}),[p,m,d,h]);typeof r=="string"&&(r=_i(r));let{pathname:x="/",search:v="",hash:b="",state:w=null,key:C="default"}=r,N=E.useMemo(()=>{let M=p1(x,p);return M==null?null:{location:{pathname:M,search:v,hash:b,state:w,key:C},navigationType:u}},[p,x,v,b,w,C,u]);return N==null?null:E.createElement(Bu.Provider,{value:y},E.createElement(ku.Provider,{children:i,value:N}))}function Yw(n){let{children:s,location:i}=n;return Aw(Mh(s),i)}new Promise(()=>{});function Mh(n,s){s===void 0&&(s=[]);let i=[];return E.Children.forEach(n,(r,u)=>{if(!E.isValidElement(r))return;let d=[...s,u];if(r.type===E.Fragment){i.push.apply(i,Mh(r.props.children,d));return}r.type!==_h&&wt(!1),!r.props.index||!r.props.children||wt(!1);let h={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(h.children=Mh(r.props.children,d)),i.push(h)}),i}/**
68
68
  * React Router DOM v6.30.6
69
69
  *
70
70
  * Copyright (c) Remix Software Inc.
@@ -73,189 +73,198 @@ Error generating stack: `+a.message+`
73
73
  * LICENSE.md file in the root directory of this source tree.
74
74
  *
75
75
  * @license MIT
76
- */function Pd(){return Pd=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var o in s)({}).hasOwnProperty.call(s,o)&&(n[o]=s[o])}return n},Pd.apply(null,arguments)}function cC(n,i){if(n==null)return{};var s={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(i.indexOf(o)!==-1)continue;s[o]=n[o]}return s}function fC(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function dC(n,i){return n.button===0&&(!i||i==="_self")&&!fC(n)}function Jd(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,s)=>{let o=n[s];return i.concat(Array.isArray(o)?o.map(u=>[s,u]):[[s,o]])},[]))}function hC(n,i){let s=Jd(n);return i&&i.forEach((o,u)=>{s.has(u)||i.getAll(u).forEach(f=>{s.append(u,f)})}),s}const mC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gC="6";try{window.__reactRouterVersion=gC}catch{}const pC="startTransition",x0=Tb[pC];function vC(n){let{basename:i,children:s,future:o,window:u}=n,f=T.useRef();f.current==null&&(f.current=S2({window:u,v5Compat:!0}));let d=f.current,[g,p]=T.useState({action:d.action,location:d.location}),{v7_startTransition:S}=o||{},y=T.useCallback(v=>{S&&x0?x0(()=>p(v)):p(v)},[p,S]);return T.useLayoutEffect(()=>d.listen(y),[d,y]),T.useEffect(()=>oC(o),[o]),T.createElement(rC,{basename:i,children:s,location:g.location,navigationType:g.action,navigator:d,future:o})}const yC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xC=T.forwardRef(function(i,s){let{onClick:o,relative:u,reloadDocument:f,replace:d,state:g,target:p,to:S,preventScrollReset:y,viewTransition:v}=i,b=cC(i,mC),{basename:C}=T.useContext(qa),E,N=!1;if(typeof S=="string"&&SC.test(S)&&(E=S,yC))try{let O=new URL(window.location.href),G=S.startsWith("//")?new URL(O.protocol+S):new URL(S),B=xh(G.pathname,C);G.origin===O.origin&&B!=null?S=B+G.search+G.hash:N=!0}catch{}let _=Q2(S,{relative:u}),w=bC(S,{replace:d,state:g,target:p,preventScrollReset:y,relative:u,viewTransition:v});function j(O){o&&o(O),O.defaultPrevented||w(O)}return T.createElement("a",Pd({},b,{href:E||_,onClick:N||f?o:j,ref:s,target:p}))});var b0;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(b0||(b0={}));var C0;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(C0||(C0={}));function bC(n,i){let{target:s,replace:o,state:u,preventScrollReset:f,relative:d,viewTransition:g}=i===void 0?{}:i,p=Ru(),S=_o(),y=Ay(n,{relative:d});return T.useCallback(v=>{if(dC(v,s)){v.preventDefault();let b=o!==void 0?o:vu(S)===vu(y);p(n,{replace:b,state:u,preventScrollReset:f,relative:d,viewTransition:g})}},[S,p,y,o,u,s,n,f,d,g])}function CC(n){let i=T.useRef(Jd(n)),s=T.useRef(!1),o=_o(),u=T.useMemo(()=>hC(o.search,s.current?null:i.current),[o.search]),f=Ru(),d=T.useCallback((g,p)=>{const S=Jd(typeof g=="function"?g(u):g);s.current=!0,f("?"+S,p)},[f,u]);return[u,d]}function EC(n){const i=n.replace(/^\/+/,"").replace(/\/+$/,"");return i?`/${i}`:""}const Lt=typeof window>"u"?void 0:window.$isabl,Yn={apiHost:((Lt==null?void 0:Lt.apiHost)??"").replace(/\/$/,""),basePath:EC((Lt==null?void 0:Lt.basePath)??"/wgts"),theme:(Lt==null?void 0:Lt.theme)==="sand"?"th-sand":(Lt==null?void 0:Lt.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((Lt==null?void 0:Lt.isablUiUrl)??"/beta").replace(/\/+$/,"")};function Uy(n){return`${Yn.isablUiUrl}/explorer?r=analyses:${n}`}const Wd="user-token";/**
76
+ */function Rh(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((s,i)=>{let r=n[i];return s.concat(Array.isArray(r)?r.map(u=>[i,u]):[[i,r]])},[]))}function Iw(n,s){let i=Rh(n);return s&&s.forEach((r,u)=>{i.has(u)||s.getAll(u).forEach(d=>{i.append(u,d)})}),i}const Xw="6";try{window.__reactRouterVersion=Xw}catch{}const Kw="startTransition",ny=c2[Kw];function Zw(n){let{basename:s,children:i,future:r,window:u}=n,d=E.useRef();d.current==null&&(d.current=nw({window:u,v5Compat:!0}));let h=d.current,[m,p]=E.useState({action:h.action,location:h.location}),{v7_startTransition:y}=r||{},x=E.useCallback(v=>{y&&ny?ny(()=>p(v)):p(v)},[p,y]);return E.useLayoutEffect(()=>h.listen(x),[h,x]),E.useEffect(()=>qw(r),[r]),E.createElement(Qw,{basename:s,children:i,location:m.location,navigationType:m.action,navigator:h,future:r})}var ly;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(ly||(ly={}));var ay;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(ay||(ay={}));function Pw(n){let s=E.useRef(Rh(n)),i=E.useRef(!1),r=Gu(),u=E.useMemo(()=>Iw(r.search,i.current?null:s.current),[r.search]),d=tm(),h=E.useCallback((m,p)=>{const y=Rh(typeof m=="function"?m(u):m);i.current=!0,d("?"+y,p)},[d,u]);return[u,h]}function Jw(n){const s=n.replace(/^\/+/,"").replace(/\/+$/,"");return s?`/${s}`:""}const Wt=typeof window>"u"?void 0:window.$isabl,Gn={apiHost:((Wt==null?void 0:Wt.apiHost)??"").replace(/\/$/,""),basePath:Jw((Wt==null?void 0:Wt.basePath)??"/wgts"),theme:(Wt==null?void 0:Wt.theme)==="sand"?"th-sand":(Wt==null?void 0:Wt.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((Wt==null?void 0:Wt.isablUiUrl)??"/beta").replace(/\/+$/,"")};function j1(n){return`${Gn.isablUiUrl}/explorer?r=analyses:${n}`}const Th="user-token";/**
77
77
  * @license lucide-react v0.468.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const wC=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hy=(...n)=>n.filter((i,s,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===s).join(" ").trim();/**
81
+ */const Ww=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E1=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
82
82
  * @license lucide-react v0.468.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */var _C={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
86
+ */var eC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
87
87
  * @license lucide-react v0.468.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const RC=T.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:u="",children:f,iconNode:d,...g},p)=>T.createElement("svg",{ref:p,..._C,width:i,height:i,stroke:n,strokeWidth:o?Number(s)*24/Number(i):s,className:Hy("lucide",u),...g},[...d.map(([S,y])=>T.createElement(S,y)),...Array.isArray(f)?f:[f]]));/**
91
+ */const tC=E.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:u="",children:d,iconNode:h,...m},p)=>E.createElement("svg",{ref:p,...eC,width:s,height:s,stroke:n,strokeWidth:r?Number(i)*24/Number(s):i,className:E1("lucide",u),...m},[...h.map(([y,x])=>E.createElement(y,x)),...Array.isArray(d)?d:[d]]));/**
92
92
  * @license lucide-react v0.468.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const Oe=(n,i)=>{const s=T.forwardRef(({className:o,...u},f)=>T.createElement(RC,{ref:f,iconNode:i,className:Hy(`lucide-${wC(n)}`,o),...u}));return s.displayName=`${n}`,s};/**
96
+ */const Ue=(n,s)=>{const i=E.forwardRef(({className:r,...u},d)=>E.createElement(tC,{ref:d,iconNode:s,className:E1(`lucide-${Ww(n)}`,r),...u}));return i.displayName=`${n}`,i};/**
97
97
  * @license lucide-react v0.468.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const TC=Oe("Activity",[["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"}]]);/**
101
+ */const nC=Ue("Activity",[["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"}]]);/**
102
102
  * @license lucide-react v0.468.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const yu=Oe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
106
+ */const zu=Ue("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
107
107
  * @license lucide-react v0.468.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const NC=Oe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
111
+ */const lC=Ue("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
112
112
  * @license lucide-react v0.468.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const Ly=Oe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
116
+ */const N1=Ue("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
117
117
  * @license lucide-react v0.468.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const MC=Oe("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/**
121
+ */const aC=Ue("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/**
122
122
  * @license lucide-react v0.468.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const jC=Oe("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
126
+ */const sC=Ue("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
127
127
  * @license lucide-react v0.468.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const AC=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
131
+ */const _1=Ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
132
132
  * @license lucide-react v0.468.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const Ch=Oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
136
+ */const M1=Ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
137
137
  * @license lucide-react v0.468.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const OC=Oe("CircleAlert",[["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"}]]);/**
141
+ */const nm=Ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
142
142
  * @license lucide-react v0.468.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const zC=Oe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
146
+ */const iC=Ue("CircleAlert",[["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"}]]);/**
147
147
  * @license lucide-react v0.468.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const DC=Oe("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
151
+ */const rC=Ue("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
152
152
  * @license lucide-react v0.468.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const Vy=Oe("Copy",[["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"}]]);/**
156
+ */const oC=Ue("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
157
157
  * @license lucide-react v0.468.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const UC=Oe("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
161
+ */const R1=Ue("Copy",[["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"}]]);/**
162
162
  * @license lucide-react v0.468.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const eh=Oe("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
166
+ */const Ah=Ue("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
167
167
  * @license lucide-react v0.468.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Tu=Oe("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
171
+ */const qu=Ue("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
172
172
  * @license lucide-react v0.468.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const HC=Oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
176
+ */const T1=Ue("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
177
177
  * @license lucide-react v0.468.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const Fy=Oe("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
181
+ */const uC=Ue("FolderOpen",[["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"}]]);/**
182
182
  * @license lucide-react v0.468.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const LC=Oe("History",[["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"}]]);/**
186
+ */const cC=Ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
187
187
  * @license lucide-react v0.468.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const VC=Oe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
191
+ */const fC=Ue("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
192
192
  * @license lucide-react v0.468.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const FC=Oe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
196
+ */const dC=Ue("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
197
197
  * @license lucide-react v0.468.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const BC=Oe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
201
+ */const hC=Ue("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
202
202
  * @license lucide-react v0.468.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const GC=Oe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
206
+ */const mC=Ue("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
207
207
  * @license lucide-react v0.468.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const qC=Oe("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
211
+ */const gC=Ue("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
212
212
  * @license lucide-react v0.468.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const kC=Oe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
216
+ */const pC=Ue("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
217
217
  * @license lucide-react v0.468.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const Nu=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
221
+ */const vC=Ue("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
222
222
  * @license lucide-react v0.468.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const $C=Oe("Shield",[["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"}]]);/**
226
+ */const Du=Ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
227
227
  * @license lucide-react v0.468.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const QC=Oe("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/**
231
+ */const yC=Ue("Shield",[["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"}]]);/**
232
232
  * @license lucide-react v0.468.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const By=Oe("TriangleAlert",[["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"}]]);/**
236
+ */const xC=Ue("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/**
237
237
  * @license lucide-react v0.468.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const Gy=Oe("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
241
+ */const A1=Ue("TriangleAlert",[["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"}]]);/**
242
242
  * @license lucide-react v0.468.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const YC=Oe("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
246
+ */const SC=Ue("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
247
247
  * @license lucide-react v0.468.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const Eh=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
251
+ */const bC=Ue("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
252
252
  * @license lucide-react v0.468.0 - ISC
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const IC=Oe("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function XC(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function KC(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const ZC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function PC(n){if(!n)return"";const i=new Date(n);return Number.isNaN(i.getTime())?"":ZC.format(i)}function wh(n,i){return n.startsWith(`${i}_`)?n.slice(i.length+1):n}function th(n){return n==null?"–":n.toFixed(2)}const E0={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function JC(n,i){const s=(n??i??"").split("&")[0];if(!s)return"–";if(E0[s])return E0[s];const o=s.replace(/_/g," ");return o.charAt(0).toUpperCase()+o.slice(1)}function vo(n,i){return`chr${n}:${i.toLocaleString("en-US")}`}const Qn=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],nh=.0025,WC=Qn.reduce((n,[,i])=>n+i,0),eE=1-nh*Qn.length,Mu=(()=>{const n={};let i=nh/2;for(const[s,o]of Qn){const u=o/WC*eE;n[s]=[i,i+u],i+=u+nh}return n})(),w0=Object.fromEntries(Qn);function Su(n,i){const s=n.replace(/^chr/,""),o=Mu[s];if(!o)return null;const u=Math.min(Math.max(i,0),w0[s]);return o[0]+u/w0[s]*(o[1]-o[0])}function _0(n,i,s,o){const u=o*2*Math.PI-Math.PI/2;return[n+s*Math.cos(u),i+s*Math.sin(u)]}function xd(n,i,s,o,u){const[f,d]=_0(n,i,s,o),[g,p]=_0(n,i,s,u),S=u-o>.5?1:0;return`M${f.toFixed(2)},${d.toFixed(2)} A${s},${s} 0 ${S} 1 ${g.toFixed(2)},${p.toFixed(2)}`}function R0(n,i="start"){let s=null;for(const f of Qn){const[d,g]=f,[p,S]=Mu[d];if(n<p&&i==="end"&&s)return{chrom:s[0],pos:s[1]};if(n<=S)return{chrom:d,pos:Math.round(Math.max(0,(n-p)/(S-p))*g)};s=f}const[o,u]=Qn[Qn.length-1];return{chrom:o,pos:u}}function uo(n,i){const s=i>=1e6?0:i>=1e5?1:2;return`${(n/1e6).toFixed(s)} Mb`}const tE={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},T0=.004,N0=.003;function nE(n,i,s){const o=Su(n,i),u=Su(n,s);return o===null||u===null?null:u-o<T0?[o,o+T0]:[o,u]}function bd(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function lE(n,i,s){return n===1?`one ${i}`:`${n} ${s}`}function qy(n){const s=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([d,g,p])=>{const S=n.events.filter(E=>E.kind===d);if(S.length===0)return[];const y=[...new Set(S.map(E=>E.chrom))],v=y.length>6?[...y.slice(0,6),`${y.length-6} more`]:y,b=y.length===1?`chromosome ${y[0]}`:`chromosomes ${bd(v)}`,C=d==="amp"&&S.length===1&&S[0].total_cn!==null?` (${Math.round(S[0].total_cn)} copies)`:"";return[`${lE(S.length,g,p)} on ${b}${C}`]}),o=s.length?bd(s):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(d=>d.gene).filter(d=>!!d))].sort(),f=u.length?`Drivers in ${bd(u)}.`:"No drivers.";return`${o.charAt(0).toUpperCase()}${o.slice(1)}. ${f}`}function ju({fingerprint:n,size:i,title:s,subtitle:o,className:u}){const f=tE[i],d=f.box/2,g=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],S=n?`Genome fingerprint: ${qy(n)}`:"No copy-number data";return h.jsxs("svg",{viewBox:`0 0 ${f.box} ${f.box}`,role:i==="mini"?void 0:"img","aria-label":i==="mini"?void 0:S,"aria-hidden":i==="mini"?!0:void 0,className:u,children:[h.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(Mu).map(([y,[v,b]])=>h.jsx("path",{className:"r-neu",strokeWidth:f.ringW,d:xd(d,d,f.ring,v,b)},y)),g.map((y,v)=>{const b=nE(y.chrom,y.start,y.end);if(!b)return null;const C=y.kind==="loss"?f.loss:y.kind==="amp"?f.amp:f.gain,E=y.kind==="loss"?f.lossW:y.kind==="amp"?f.ampW:f.gainW;return h.jsx("path",{className:`r-${y.kind}`,strokeWidth:E,d:xd(d,d,C,b[0],b[1])},`${y.chrom}-${y.start}-${v}`)}),f.drvW>0&&p.map((y,v)=>{const b=Su(y.chrom,y.pos);return b===null?null:h.jsx("path",{className:"r-drv",strokeWidth:f.drvW,d:xd(d,d,f.drv,b-N0/2,b+N0/2)},`${y.gene}-${y.pos}-${v}`)})]}),i==="hero"&&s&&h.jsxs(h.Fragment,{children:[h.jsx("text",{className:"t-ink",x:d,y:d-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:s}),o&&h.jsx("text",{className:"t-faint",x:d,y:d+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:o})]})]})}const aE={"DNA|WG":{label:"WGS",icon:Tu},"RNA|WT":{label:"RNA",icon:MC}};function M0({children:n}){return h.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function iE({sex:n}){const i=n==null?void 0:n.toUpperCase();return i==="MALE"?h.jsxs(M0,{children:[h.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),h.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),h.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),h.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):i==="FEMALE"?h.jsxs(M0,{children:[h.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),h.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),h.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):h.jsx(Gy,{size:16,"aria-hidden":!0})}const ky="wgts-patient-root";function sE(n,i){const s=n.getBoundingClientRect(),o=n.closest(".topbar"),u=o==null?void 0:o.parentElement,f=o&&u?u.getBoundingClientRect().top-o.getBoundingClientRect().top:0;return{x:s.left-i.left+s.width/2,y:s.top+f-i.top+s.height/2}}const $y=8;function Cd(n,i,s,o){const u=s>=n.x?1:-1,f=Math.min($y,Math.abs(s-n.x)/2,(i-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${i-f}`,`Q${n.x},${i} ${n.x+u*f},${i}`,`H${s-u*f}`,`Q${s},${i} ${s},${i+f}`,`V${o}`].join(" ")}function oE(n,i,s){const o=s.x>i.x?1:-1,u=Math.min($y,Math.abs(s.x-i.x)/2,(i.top-n)/2);return[`M${i.x},${i.top}`,`V${n+u}`,`Q${i.x},${n} ${i.x+o*u},${n}`,`H${s.x-o*u}`,`Q${s.x},${n} ${s.x},${n+u}`,`V${s.top}`].join(" ")}function rE(n,i,s){const o=i.left+i.width/2,u=s.left+s.width/2,f=n-7,g=(n-31-.25*f)/.75;return`M${o},${f} C${o},${g} ${u},${g} ${u},${f}`}function uE(n,i){var o,u;const s=n.samples.find(f=>f.id===i);for(const f of(s==null?void 0:s.experiments)??[]){const d=(o=n.experiments[f])==null?void 0:o.normal,g=d?(u=n.experiments[d])==null?void 0:u.sample:void 0;if(g&&g!==i)return g}return null}function cE({data:n,sampleId:i,fingerprint:s,onSample:o}){const u=T.useRef(null),[f,d]=T.useState(null),[g,p]=T.useState(!1);T.useEffect(()=>{if(!f||g)return;const w=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(w)},[f,g]);const S=new Set(n.failures.map(w=>w.sample)),y=T.useRef(i),[v,b]=T.useState(null);T.useEffect(()=>{if(y.current===i)return;const w=y.current;y.current=i,b(j=>({from:w,to:i,n:((j==null?void 0:j.n)??0)+1}))},[i]);const C=uE(n,i);T.useLayoutEffect(()=>{const w=u.current;if(!w)return;const j=()=>{const G=w.getBoundingClientRect(),B=document.getElementById(ky);if(!B)return;const K=Array.from(w.querySelectorAll("[data-sample]")).map(W=>{const oe=W.getBoundingClientRect();return{id:W.dataset.sample,x:oe.left-G.left+22,left:oe.left-G.left,width:oe.width,top:oe.top-G.top,bottom:oe.bottom-G.top}}),q=sE(B,G),Z=Math.min(...K.map(W=>W.top));d({root:q,trunk:Z-12,tabs:K})};if(j(),typeof ResizeObserver>"u")return;const O=new ResizeObserver(j);return O.observe(w),()=>O.disconnect()},[n,i]);const E=f==null?void 0:f.tabs.find(w=>w.id===i),N=C?f==null?void 0:f.tabs.find(w=>w.id===C):void 0,_=v?f==null?void 0:f.tabs.find(w=>w.id===v.from):void 0;return h.jsxs("div",{ref:u,className:"ltabs",children:[f&&h.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[f.tabs.map(w=>h.jsx("path",{d:Cd(f.root,f.trunk,w.x,w.top)},w.id)),E&&h.jsxs(h.Fragment,{children:[h.jsx("path",{className:"ltabs-haze","data-moving":g,style:{d:`path("${Cd(f.root,f.trunk,E.x,E.top)}")`}}),h.jsx("path",{className:"ltabs-on","data-moving":g,style:{d:`path("${Cd(f.root,f.trunk,E.x,E.top)}")`}}),_&&v&&v.to===E.id&&h.jsx("path",{className:"ltabs-bead",pathLength:1,d:oE(f.trunk,_,E)},`bead-${v.n}`)]}),E&&N&&h.jsxs("g",{className:"ltabs-match",children:[h.jsx("path",{d:rE(f.trunk,E,N)}),h.jsx("text",{x:(E.left+E.width/2+N.left+N.width/2)/2,y:f.trunk-27,children:"matched normal"})]})]}),E&&h.jsx("span",{className:"ltabs-thumb","data-moving":g,"aria-hidden":!0,style:{width:E.width,height:E.bottom-E.top,transform:`translate(${E.left}px, ${E.top}px)`}}),h.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(w=>{const j=w.id===i,O=s==null?void 0:s.samples.find(B=>B.sample===w.id),G=w.experiments.map(B=>({id:B,...n.experiments[B]})).filter(B=>B.technique);return h.jsxs("button",{type:"button",role:"tab","data-sample":w.id,"aria-selected":j,className:"ltab",onClick:()=>o(w.id),children:[h.jsxs("span",{className:"ltab-name",children:[w.category==="TUMOR"?h.jsx(ju,{fingerprint:O,size:"mini",className:"h-[18px] w-[18px] flex-none"}):h.jsx(Fy,{size:15,"aria-hidden":!0,className:"flex-none"}),wh(w.id,n.individual.id)," ",w.category==="TUMOR"?"tumour":"normal",S.has(w.id)&&h.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),h.jsxs("span",{className:"ltab-exps",children:[G.length===0&&h.jsx("span",{children:"No experiments"}),G.map(B=>{const K=aE[B.technique],q=(K==null?void 0:K.icon)??Tu;return h.jsxs("span",{title:B.id,children:[h.jsx(q,{size:12,"aria-hidden":!0}),(K==null?void 0:K.label)??B.technique]},B.id)})]})]},w.id)})})]})}function fE({data:n,sampleId:i,fingerprint:s,onSample:o}){return h.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const f=s==null?void 0:s.samples.find(d=>d.sample===u.id);return h.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===i,className:"ctab",onClick:()=>o(u.id),children:[u.category==="TUMOR"?h.jsx(ju,{fingerprint:f,size:"mini",className:"h-[16px] w-[16px] flex-none"}):h.jsx(Fy,{size:14,"aria-hidden":!0,className:"flex-none"}),wh(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Qy({individualId:n,subtitle:i,patientIcon:s,compact:o,showCompact:u=!1}){const[f,d]=T.useState(!1),[g,p]=T.useState(!1);T.useEffect(()=>{const y=()=>p(window.scrollY>4);return y(),window.addEventListener("scroll",y,{passive:!0}),()=>window.removeEventListener("scroll",y)},[]);async function S(){try{await navigator.clipboard.writeText(window.location.href),d(!0),window.setTimeout(()=>d(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return h.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-4 pb-3.5","data-scrolled":g,children:[h.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[h.jsx(xC,{to:"/",style:{color:"var(--muted)",textDecoration:"none"},children:"Patients"}),n&&h.jsxs(h.Fragment,{children:[h.jsx(Ch,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),s&&h.jsx("span",{id:ky,className:"ltabs-icon",children:s}),h.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),i&&h.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:i})]})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs("div",{className:"field w-[300px] max-w-full",title:"Not available yet",children:[h.jsx(Nu,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),h.jsx("label",{className:"sr-only",htmlFor:"search",children:"Search"}),h.jsx("input",{id:"search",placeholder:"Search genes, variants, analyses",disabled:!0})]}),h.jsx("button",{type:"button",className:"sc-btn sc-b2",disabled:!0,title:"Not available yet",children:"Compare versions"}),h.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:S,children:h.jsx(BC,{size:16,"aria-hidden":!0})}),h.jsx("button",{type:"button",className:"sc-ib","aria-label":"Export tables",disabled:!0,title:"Not available yet",children:h.jsx(HC,{size:16,"aria-hidden":!0})}),h.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:f?"Link copied":""})]}),o&&h.jsx("div",{className:"topbar-compact","data-open":u,inert:!u,"aria-hidden":!u,children:h.jsx("div",{children:o})})]})}class Au extends Error{}class Yy extends Error{}function dE(){try{return localStorage.getItem(Wd)}catch{return null}}function Iy(n){try{n?localStorage.setItem(Wd,n):localStorage.removeItem(Wd)}catch{}}function Xy(){const n=dE();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function la(n,i={}){const s=new URLSearchParams;for(const[f,d]of Object.entries(i))d&&s.set(f,d);const o=s.toString(),u=await fetch(`${Yn.apiHost}/wgts/api/${n}${o?`?${o}`:""}`,{headers:Xy()});if(u.status===401)throw new Au;if(u.status===403){const f=await u.json().catch(()=>({}));throw new Yy(f.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function hE(n){if(!(await fetch(`${Yn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");Iy(n)}async function mE(n,i){const s=await fetch(`${Yn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:i})});if(!s.ok)throw new Error("Isabl did not accept that username and password.");const o=await s.json();Iy(o.key)}async function gE(n){const i=new URLSearchParams(n?{q:n}:{}).toString(),s=await fetch(`${Yn.apiHost}/wgts/api/individuals/${i?`?${i}`:""}`,{headers:Xy()});if(s.status===401)throw new Au;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return(await s.json()).results}const Ky={drivers:"gene",coding:"position",all:"position"},pE=100;function j0(){return{scope:"drivers",sort:Ky.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function Zy(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function vE(n){const i={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(i[`${n.range.measure}_min`]=String(n.range.low),i[`${n.range.measure}_max`]=String(n.range.high)),i}const Py={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},Jy={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function yE(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const Wy=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function SE(n){return Wy.test(n.trim())}function xE(n,i,s){return`chr${n}:${i.toLocaleString("en-US")}-${s.toLocaleString("en-US")}`}const bE={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function CE(n){var f;if(!n)return null;const i=n.split(";"),s=(f=n.match(/SOM=(\d+)/))==null?void 0:f[1],o=bE[i[0]];return!s&&!o?n:[s?`${Number(s).toLocaleString("en-US")} somatic ${s==="1"?"sample":"samples"}`:"",o].filter(Boolean).join(", ")}function EE(n){const i=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return i?`${i[1]} of ${i[2]} ${i[2]==="1"?"copy":"copies"}`:n}function wE(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const fl=(n,i)=>!(i instanceof Au)&&n<2;function _E(n,i){return ta({queryKey:["individual",n,i??null],queryFn:()=>la(`individuals/${encodeURIComponent(n)}/`,{version:i}),retry:fl})}function RE(n,i,s){return ta({queryKey:["metrics",n,i,s??null],queryFn:()=>la(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:i,version:s}),enabled:!!i,retry:fl})}function TE(n,i){return ta({queryKey:["fingerprint",n,i??null],queryFn:()=>la(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:i}),retry:fl})}const Ro=(n,i)=>`individuals/${encodeURIComponent(n)}/${i}/`;function NE(n,i,s){return ta({queryKey:["cn",n,i,s??null],queryFn:()=>la(Ro(n,"cn"),{sample:i,version:s}),enabled:!!i,retry:fl})}function ME(n,i,s,o,u){return ta({queryKey:["ccf",n,i,s,o,u??null],queryFn:()=>la(Ro(n,"ccf"),{sample:i,measure:s,version:u,ffpe:o?"all":void 0}),enabled:!!i,retry:fl})}function jE(n,i,s){return ta({queryKey:["signatures",n,i,s??null],queryFn:()=>la(Ro(n,"signatures"),{sample:i,version:s}),enabled:!!i,retry:fl})}function AE(n,i,s){return ta({queryKey:["svs",n,i,s??null],queryFn:()=>la(Ro(n,"svs"),{sample:i,version:s}),enabled:!!i,retry:fl})}function OE(n,i,s,o){return y2({queryKey:["variants",n,i,s,o??null],queryFn:({pageParam:u})=>la(Ro(n,"variants"),{sample:i,version:o,...vE(s),page:String(u),page_size:String(pE)}),initialPageParam:1,getNextPageParam:(u,f,d)=>u.status!=="ok"||!u.data?void 0:f.reduce((p,S)=>p+(S.status==="ok"&&S.data?S.data.rows.length:0),0)<u.data.total?d+1:void 0,enabled:!!i,placeholderData:cy,retry:fl})}function zE(n,i){return ta({queryKey:["patients",n],queryFn:()=>gE(n),enabled:i,staleTime:6e4,placeholderData:cy,retry:fl})}const e1="wgts-recent-patients",DE=6;function t1(){try{const n=JSON.parse(localStorage.getItem(e1)??"[]");return Array.isArray(n)?n.filter(i=>typeof i=="string"):[]}catch{return[]}}function UE(n){try{localStorage.setItem(e1,JSON.stringify([n,...t1().filter(i=>i!==n)].slice(0,DE)))}catch{}}const HE=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function n1({current:n}){const i=Ru(),[s,o]=T.useState(""),[u,f]=T.useState(!1),[d,g]=T.useState(0),p=T.useRef(null),S=T.useId(),y=T.useDeferredValue(s.trim()),v=zE(y,u&&y.length>0);T.useEffect(()=>{const w=j=>{var O;j.key.toLowerCase()==="k"&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),(O=p.current)==null||O.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[]);const b=y?(v.data??[]).map(w=>({id:w.individual,meta:w.individual===n?"On this page":`${w.samples} ${w.samples===1?"sample":"samples"}, report ${w.report_version}`})):t1().filter(w=>w!==n).map(w=>({id:w,meta:"Opened recently",recent:!0})),C=y&&b.length===0&&!v.isFetching?{id:y,meta:"No dashboard found; open anyway"}:null,E=C?[...b,C]:b,N=u&&(E.length>0||y&&v.isFetching),_=w=>{var j;o(""),f(!1),(j=p.current)==null||j.blur(),w!==n&&i(`/${encodeURIComponent(w)}`)};return h.jsxs("div",{className:"psearch","data-open":!!N,children:[h.jsxs("div",{className:"psearch-field",children:[h.jsx(Nu,{size:15,"aria-hidden":!0}),h.jsx("input",{ref:p,role:"combobox","aria-expanded":!!N,"aria-controls":S,"aria-activedescendant":N&&E[d]?`${S}-${d}`:void 0,"aria-label":"Search patients",placeholder:"Search patients",value:s,onFocus:()=>f(!0),onBlur:()=>f(!1),onChange:w=>{o(w.target.value),g(0),f(!0)},onKeyDown:w=>{var j;w.key==="ArrowDown"?(w.preventDefault(),g(O=>Math.min(O+1,E.length-1))):w.key==="ArrowUp"?(w.preventDefault(),g(O=>Math.max(O-1,0))):w.key==="Enter"&&E[d]?(w.preventDefault(),_(E[d].id)):w.key==="Escape"&&(o(""),(j=p.current)==null||j.blur())}}),h.jsx("kbd",{className:"kbd","aria-hidden":!0,children:HE?"⌘K":"Ctrl K"})]}),N&&h.jsxs("ul",{id:S,role:"listbox",className:"psearch-list","aria-label":"Patients",children:[!y&&h.jsx("li",{className:"psearch-head",children:"Recent"}),E.map((w,j)=>h.jsxs("li",{id:`${S}-${j}`,role:"option","aria-selected":j===d,className:"psearch-option",onMouseDown:O=>O.preventDefault(),onMouseEnter:()=>g(j),onClick:()=>_(w.id),children:[w.recent?h.jsx(LC,{size:14,"aria-hidden":!0}):h.jsx(Gy,{size:14,"aria-hidden":!0}),h.jsxs("span",{className:"flex min-w-0 flex-col",children:[h.jsx("span",{className:"truncate",children:w.id}),h.jsx("span",{className:"psearch-meta",children:w.meta})]}),j===d&&h.jsx(UC,{size:13,"aria-hidden":!0,className:"ml-auto flex-none opacity-50"})]},w.id)),y&&E.length===0&&h.jsx("li",{className:"psearch-head",children:"Searching…"})]})]})}function LE(){const n=Ru(),[i,s]=T.useState("");return h.jsxs("div",{className:`wgts ${Yn.theme}`,children:[h.jsxs("aside",{className:"side","aria-label":"Navigation",children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[h.jsx(Tu,{size:24,strokeWidth:1.9,style:{color:"var(--menu-hi)"},"aria-hidden":!0}),h.jsx("span",{className:"text-base font-semibold tracking-tight",style:{color:"var(--menu-brand)"},children:"WGTS Reports"})]}),h.jsx(n1,{current:""})]}),h.jsxs("div",{className:"page",children:[h.jsx(Qy,{}),h.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[h.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),h.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Enter an individual's system id to see its WGTS report as live charts and tables."}),h.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:o=>{o.preventDefault(),i.trim()&&n(`/${i.trim()}`)},children:[h.jsxs("div",{className:"field w-[340px] max-w-full",children:[h.jsx(Nu,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),h.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),h.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:i,onChange:o=>s(o.target.value)})]}),h.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!i.trim(),children:"Open"})]})]})]})]})}function lh(n){const i=n.toUpperCase();return i.startsWith("BATTENBERG")||i.startsWith("CNV_")?"cn":i.startsWith("ANNOT_SNVS")||i.startsWith("ANNOT_INDELS")||i.startsWith("FFPERASE")?"mut":i.startsWith("MSISENSOR")?"msi":"other"}function ts(n){return`fam-${lh(n)}`}function l1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function wt(n){return`${n.app}#${n.pk??""}`}const VE=[{key:"overview",label:"Overview",icon:FC},{key:"copyNumber",label:"Copy number",icon:TC},{key:"mutations",label:"Mutations",icon:qC},{key:"structuralVariants",label:"Structural variants",icon:QC},{key:"signatures",label:"Signatures and HRD",icon:jC},{key:"rna",label:"RNA",icon:YC},{key:"germline",label:"Germline",icon:$C},{key:"quality",label:"Quality",icon:zC}];function FE({individualId:n,sampleCount:i,mode:s,fingerprint:o,analyses:u,onPage:f,sampleLabel:d,picked:g,onPick:p,sections:S,active:y,onSection:v}){const[b,C]=T.useState(!1),E=["cn","mut","msi","other"],N=(O,G)=>E.indexOf(lh(O.app))-E.indexOf(lh(G.app))||O.app.localeCompare(G.app),_=u.filter(O=>O.role==="input"),w=_.filter(O=>f.has(wt(O))).sort(N),j=[..._.filter(O=>!f.has(wt(O))).sort(N),...u.filter(O=>O.role==="cohort")];return h.jsxs("aside",{className:"side","aria-label":"Patient navigation",children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[h.jsx(Tu,{size:24,strokeWidth:1.9,style:{color:"var(--menu-hi)"},"aria-hidden":!0}),h.jsx("span",{className:"text-base font-semibold tracking-tight",style:{color:"var(--menu-brand)"},children:"WGTS Reports"})]}),h.jsx(n1,{current:n}),h.jsxs("nav",{"aria-label":"Patient sections",className:"flex flex-col gap-0.5",children:[h.jsxs("div",{className:"side-patient",children:[h.jsx(ju,{fingerprint:o,size:"switcher",className:"h-10 w-10 flex-none"}),h.jsxs("span",{className:"flex min-w-0 flex-col gap-px",children:[h.jsx("span",{className:"truncate text-[13.5px] font-semibold",style:{color:"var(--menu-strong)"},children:n}),h.jsxs("span",{className:"text-xs",style:{color:"var(--menu-muted)"},children:[i," samples",s?`, ${s}`:""]})]})]}),VE.map(({key:O,label:G,icon:B})=>{const K=S.has(O);return h.jsxs("button",{type:"button",className:"sc-nav","aria-current":K&&y===O?"location":void 0,disabled:!K,title:K?void 0:"Not available for this sample yet",onClick:()=>v(O),children:[h.jsx(B,{size:18,"aria-hidden":!0}),G]},O)})]}),h.jsxs("section",{"aria-label":"Analyses on this page",className:"flex flex-col gap-0.5",children:[h.jsx("span",{className:"side-label",children:"Analyses on this page"}),w.length===0&&h.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",d||"this sample","."]}),w.map(O=>{const G=wt(O),B=O.state==="failed",K=O.modules.filter(q=>q.status==="failed");return h.jsxs("button",{type:"button",className:`tb-src${B?" fail":""}`,"aria-pressed":g===G,title:B?K.map(q=>`${q.label} failed`).join("; "):"Show what it feeds",onClick:()=>p(g===G?null:G),children:[B?h.jsx(By,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):h.jsx("span",{className:`tb-dot ${ts(O.app)}`,"aria-hidden":!0}),h.jsxs("span",{className:"truncate",children:[O.app," ",O.version??""]}),B&&h.jsx("span",{className:"sr-only",children:", failed"}),h.jsx("span",{className:"tb-n",children:O.pk?`#${O.pk}`:""})]},G)}),j.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"tb-src","aria-expanded":b,onClick:()=>C(O=>!O),children:[h.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),b?"Hide":"Show"," ",j.length," more for ",d||"this sample"]}),b&&j.map(O=>h.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[h.jsx("span",{className:`tb-dot ${ts(O.app)}`,"aria-hidden":!0}),h.jsx("span",{className:"truncate",children:O.role==="cohort"?`${O.app}${O.project?`, project ${O.project}`:""}`:`${O.app} ${O.version??""}`}),h.jsx("span",{className:"tb-n",children:O.pk?`#${O.pk}`:""})]},wt(O)))]}),h.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]}),h.jsx("div",{className:"flex-auto"})]})}function Aa({envelope:n}){const i=n.status==="error",s=i?OC:DC;return h.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[h.jsx(s,{size:18,"aria-hidden":!0,style:{color:i?"var(--warn-ink)":"var(--chev)",flex:"none"}}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:i?"This panel could not be read":"Nothing to show here"}),n.warnings.map(o=>h.jsx("span",{children:o},o))]})]})}const ah={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". Alternating grey bands mark the chromosomes, named along the bottom.',`The dashed line is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["Triangles along the top mark the genes with likely driver mutations, one per gene; hover for its protein changes."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Double-click a chromosome","Zooms to fill the view with it; the axis then counts megabases."],["Slider and reset","The slider under the plot shows and moves the window; the button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations are labelled on it. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range; drivers outside it fade. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group; lighter bars are the clustered ones.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. The bands join the two columns, so a signature can be followed from the tumour to its cohort. Hover a band or a row of the table for the numbers.","Eight signatures get colours of their own; any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one bar."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). The box spans the middle half of the cohort, the line in it is the median, the whiskers reach the furthest tumours within one and a half box-lengths, and dots beyond them are outliers. The tumour is the marked point; hover it for its unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},BE={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function GE(n,i){const s=i.role==="cohort"||i.app.endsWith("Project Application"),o=i.app.replace(/ Project Application$/,""),u=BE[n];return(s?u[`${o} cohort`]:u[o])??(s?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function qE({topic:n,lineage:i,subject:s,onClose:o}){const u=ah[n],f=T.useId(),d=T.useRef(null),g=i.filter(w=>w.role!=="cohort"&&!w.app.endsWith("Project Application")),p=i.filter(w=>!g.includes(w)),S=T.useRef(o);S.current=o,T.useEffect(()=>{var B;const w=document.activeElement;(B=d.current)==null||B.focus();const j=document.documentElement,O=j.style.overflow;j.style.overflow="hidden";const G=K=>{K.key==="Escape"&&S.current()};return document.addEventListener("keydown",G),()=>{document.removeEventListener("keydown",G),j.style.overflow=O,w==null||w.focus()}},[]);const y=[...u.sections.map(w=>w.heading),"Sources"],v=y.map((w,j)=>`${f}-s${j}`),[b,C]=T.useState(0),E=T.useRef(null);T.useEffect(()=>{const w=E.current;if(!w)return;const j=()=>{const O=w.getBoundingClientRect().top+24;let G=0;v.forEach((B,K)=>{const q=document.getElementById(B);q&&q.getBoundingClientRect().top<=O&&(G=K)}),w.scrollTop+w.clientHeight>=w.scrollHeight-4&&(G=v.length-1),C(G)};return j(),w.addEventListener("scroll",j,{passive:!0}),()=>w.removeEventListener("scroll",j)},[]);const N=w=>{var O;const j=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;(O=document.getElementById(v[w]))==null||O.scrollIntoView({behavior:j?"auto":"smooth",block:"start"})},_=w=>h.jsxs("li",{className:"info-source",children:[h.jsx("span",{className:`tb-dot ${ts(w.app)}`,"aria-hidden":!0}),h.jsxs("span",{className:"info-source-text",children:[w.pk?h.jsxs("a",{className:"info-source-name info-source-link",href:Uy(w.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[h.jsxs("span",{className:"mono",children:[w.app,w.version?` ${w.version}`:""]}),h.jsxs("span",{className:"mono info-source-pk",children:["#",w.pk]}),h.jsx(NC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):h.jsxs("span",{className:"info-source-name",children:[h.jsxs("span",{className:"mono",children:[w.app,w.version?` ${w.version}`:""]}),w.project?h.jsxs("span",{className:"info-source-pk",children:["project ",w.project]}):null]}),h.jsx("span",{className:"info-source-role",children:GE(n,w)})]})]},wt(w));return by.createPortal(h.jsx("div",{className:`info-backdrop ${Yn.theme}`,onMouseDown:w=>w.target===w.currentTarget&&o(),children:h.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":f,children:[h.jsx("button",{ref:d,type:"button",className:"info-close","aria-label":"Close",onClick:o,children:h.jsx(Eh,{size:18,"aria-hidden":!0})}),h.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[h.jsx("span",{className:"info-kicker",children:s??"About"}),h.jsx("h2",{id:f,children:u.title}),h.jsx("ol",{children:y.map((w,j)=>h.jsx("li",{children:h.jsx("button",{type:"button","aria-current":j===b?"true":void 0,onClick:()=>N(j),children:w})},w))})]}),h.jsxs("div",{ref:E,className:"info-main",children:[h.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((w,j)=>{var O;return h.jsxs("section",{id:v[j],className:"info-section",children:[h.jsx("h3",{children:w.heading}),(O=w.paragraphs)==null?void 0:O.map(G=>h.jsx("p",{children:G},G)),w.terms&&h.jsx("dl",{children:w.terms.map(([G,B])=>h.jsxs("div",{children:[h.jsx("dt",{children:G}),h.jsx("dd",{children:B})]},G))})]},w.heading)}),h.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[h.jsx("h3",{children:"Sources"}),h.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),i.length===0&&h.jsx("p",{children:"No analyses recorded for this card."}),h.jsx("ul",{className:"info-sources",children:g.map(_)}),p.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("h4",{children:"Cohort runs"}),h.jsx("ul",{className:"info-sources",children:p.map(_)})]})]})]})]})}),document.body)}function A0(n){return n.split(" ").map(i=>/^[A-Z0-9]{2,}$/.test(i)?i:i.toLowerCase()).join(" ")}function a1({topic:n,lineage:i,subject:s}){const[o,u]=T.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${A0(ah[n].title)}`,title:`About ${A0(ah[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:h.jsx(VC,{size:15,"aria-hidden":!0})}),o&&h.jsx(qE,{topic:n,lineage:i,subject:s,onClose:()=>u(!1)})]})}function kE({lineage:n,children:i}){const[s,o]=T.useState(!1),u=n.filter(d=>d.role!=="cohort"),f=n.filter(d=>d.role==="cohort");return h.jsxs("div",{className:"sc-cf",children:[i,i&&h.jsx("span",{className:"flex-auto"}),n.length>0&&h.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(d=>d.pk?h.jsxs("a",{className:"sc-src sc-src-link",href:Uy(d.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[h.jsx("span",{className:`tb-dot ${ts(d.app)}`,"aria-hidden":!0}),d.app," ",d.version??""," #",d.pk]},wt(d)):h.jsxs("span",{className:"sc-src",children:[h.jsx("span",{className:`tb-dot ${ts(d.app)}`,"aria-hidden":!0}),d.app," ",d.version??""]},wt(d))),f.length>0&&h.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":s,onClick:()=>o(d=>!d),children:[s?"Hide":"+"," ",f.length," cohort ",f.length===1?"run":"runs"]}),s&&f.map(d=>h.jsxs("span",{className:"sc-src",children:[h.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),d.app,d.project?`, project ${d.project}`:""," ",d.pk?`#${d.pk}`:""]},wt(d)))]})}function i1(...n){const i=new Map;for(const s of n.flat())s&&!i.has(wt(s))&&i.set(wt(s),s);return[...i.values()]}const Ou=T.forwardRef(function({title:i,subtitle:s,controls:o,lineage:u,picked:f,footer:d,className:g="",info:p,expandable:S,children:y},v){const b=!!f&&u.some(N=>wt(N)===f),[C,E]=$E();return h.jsxs(h.Fragment,{children:[C&&h.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>E(!1)}),h.jsxs("section",{ref:v,className:`sc-card flex flex-col ${g}`,"data-picked":b,"data-full":C||void 0,"aria-label":i,children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-4 pb-1",children:[h.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsx("h2",{className:"m-0 text-base font-semibold",children:i}),s&&h.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:s})]}),(o||p||S)&&h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,S&&h.jsx("button",{type:"button",className:"sc-ib","aria-label":C?"Exit full screen":`Expand ${i.toLowerCase()} to full screen`,title:C?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":C,onClick:()=>E(!C),children:C?h.jsx(kC,{size:16,"aria-hidden":!0}):h.jsx(GC,{size:16,"aria-hidden":!0})}),p&&h.jsx(a1,{topic:p,lineage:u,subject:typeof s=="string"?s:void 0})]})]}),h.jsx("div",{className:"min-w-0 flex-auto",children:y}),(u.length>0||d)&&h.jsx(kE,{lineage:u,children:d})]})]})});function $E(){const[n,i]=T.useState(!1);return T.useEffect(()=>{if(!n)return;const s=document.documentElement,o=s.style.overflow;s.style.overflow="hidden";const u=f=>{var d,g;f.key==="Escape"&&((g=(d=f.target)==null?void 0:d.closest)!=null&&g.call(d,"input, textarea, select")||document.querySelector(".info-backdrop")||i(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),s.style.overflow=o}},[n]),[n,i]}function To({label:n,envelope:i,loading:s,skeletonHeight:o=160,children:u}){return h.jsxs(h.Fragment,{children:[s&&!i&&h.jsx("div",{className:"px-5 py-3",children:h.jsx("div",{className:"skeleton",style:{height:o},"aria-label":`Loading ${n}`})}),i&&i.status!=="ok"&&h.jsx("div",{className:"px-5 py-4",children:h.jsx(Aa,{envelope:i})}),(i==null?void 0:i.status)==="ok"&&i.data!==null&&u(i.data),(i==null?void 0:i.status)==="ok"&&i.warnings.length>0&&h.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:i.warnings.join(" ")})]})}function QE({title:n,subtitle:i,controls:s,envelope:o,loading:u,picked:f,skeletonHeight:d=160,footer:g,className:p="",info:S,children:y}){return h.jsx(Ou,{title:n,subtitle:i,controls:s,lineage:(o==null?void 0:o.lineage)??[],picked:f,footer:g,className:p,info:S,children:h.jsx(To,{label:n,envelope:o,loading:u,skeletonHeight:d,children:y})})}function YE(n,i){const[s,o]=T.useState(null),[u,f]=T.useState(!1);return T.useLayoutEffect(()=>{const d=n.current;if(!d)return;const g=()=>{const S=d.querySelector('[aria-pressed="true"]');o(S?{x:S.offsetLeft,y:S.offsetTop,width:S.offsetWidth,height:S.offsetHeight}:null)};if(g(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(g);p.observe(d);for(const S of Array.from(d.children))p.observe(S);return()=>p.disconnect()},[n,i]),T.useEffect(()=>{if(s&&!u){const d=requestAnimationFrame(()=>f(!0));return()=>cancelAnimationFrame(d)}},[s,u]),{thumb:s,moving:u}}function zu({label:n,options:i,value:s,onChange:o,className:u=""}){const f=T.useRef(null),{thumb:d,moving:g}=YE(f,s);return h.jsxs("div",{ref:f,className:`sc-track ${u}`,role:"group","aria-label":n,children:[d&&h.jsx("span",{className:"sc-thumb","data-moving":g,"aria-hidden":!0,style:{width:d.width,height:d.height,transform:`translate(${d.x}px, ${d.y}px)`}}),i.map(p=>h.jsx("button",{type:"button",className:"sc-seg","aria-pressed":p.value===s,disabled:p.disabled,title:p.title,onClick:()=>o(p.value),children:p.label},p.value))]})}function IE(n){var s;const i=[];return n.mode==="unmatched"&&i.push("Tumour only"),n.individual.germline_consent&&i.push("Germline consented"),(s=n.individual.dmp_id)!=null&&s.startsWith("P-")&&i.push("DMP linked"),i}function XE({data:n,fingerprint:i,sampleId:s,onSample:o,onVersion:u}){const f=n.report;return h.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-x-10 gap-y-5",children:[h.jsx(cE,{data:n,sampleId:s,fingerprint:i,onSample:o}),h.jsxs("div",{className:"flex flex-col items-start gap-2.5 pt-1 lg:items-end",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[h.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),h.jsx(zu,{label:"Report version",value:f.version,onChange:u,options:n.versions.map(d=>({value:d.version,label:d.version}))})]}),h.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",f.analysis?`run #${f.analysis}`:"run indexed by hand",f.built?`, built ${PC(f.built)}`:""]}),h.jsx("div",{className:"flex flex-wrap gap-2",children:IE(n).map(d=>h.jsx("span",{className:"sc-chip",children:d},d))})]})]})}const ih=["purity","ploidy","coverage","tmb","msi","fga"];function KE({value:n}){const s=2*Math.PI*13,o=Math.min(Math.max(n,0),1);return h.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[h.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),h.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${o*s} ${s}`,transform:"rotate(-90 17 17)"})]})}function O0({value:n,min:i,max:s,ticks:o,reference:u}){const f=d=>4+(Math.min(Math.max(d,i),s)-i)/(s-i)*64;return h.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[h.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),o.map(d=>h.jsx("line",{x1:f(d),x2:f(d),y1:d===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:d===u?1.5:1},d)),h.jsx("circle",{cx:f(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function ZE({metric:n}){const i=n.value;if(i===null)return null;switch(n.key){case"purity":case"fga":return h.jsx(KE,{value:i});case"ploidy":return h.jsx(O0,{value:i,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return h.jsx(O0,{value:Math.log10(Math.max(i,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const PE={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function JE({metric:n,picked:i}){const s=n.value===null&&!n.text,o=!!i&&n.sources.some(u=>wt(u)===i);return h.jsxs("div",{className:"kpi","data-picked":o,title:PE[n.key],children:[h.jsxs("span",{className:"kpi-top",children:[h.jsx("span",{className:"kpi-label",children:n.label}),h.jsx(ZE,{metric:n})]}),h.jsx("span",{className:"kpi-value","data-empty":s,children:s?KC(n):XC(n)}),n.sources.length>0?h.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>h.jsxs("span",{className:"kpi-src",children:[h.jsx("span",{className:`tb-dot ${ts(u.app)}`,"aria-hidden":!0}),h.jsx("span",{className:"min-w-0",children:l1(u)})]},wt(u)))}):h.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function WE({sampleLabel:n,fingerprint:i,metrics:s,picked:o,lineage:u=[]}){var d;const f=(((d=s==null?void 0:s.data)==null?void 0:d.metrics)??[]).filter(g=>ih.includes(g.key));return h.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[h.jsx("span",{className:"absolute top-3 right-3",children:h.jsx(a1,{topic:"summary",lineage:u,subject:n})}),h.jsx(ju,{fingerprint:i,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),h.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[h.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),h.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:i?qy(i):"No copy-number data for this sample."}),h.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),h.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),h.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[s===void 0&&ih.map(g=>h.jsx("div",{className:"kpi","aria-hidden":!0,children:h.jsx("div",{className:"skeleton h-[70px]"})},g)),s&&s.status!=="ok"&&h.jsx("div",{className:"col-span-full",children:h.jsx(Aa,{envelope:s})}),f.map(g=>h.jsx(JE,{metric:g,picked:o},g.key))]})]})}function ew({sampleLabel:n,failures:i,analyses:s}){return i.length===0?null:h.jsx("div",{className:"flex flex-col gap-2.5",children:i.map(o=>{const u=s.filter(f=>f.modules.some(d=>d.etl===o.etl&&d.status==="failed"));return h.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[h.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:h.jsx(By,{size:18,"aria-hidden":!0})}),h.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[h.jsxs("span",{className:"text-[14.5px] font-semibold",children:[o.label," failed for ",n]}),h.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:o.message.split(`
257
- `)[0]}),u.length>0&&h.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(l1).join(", ")]})]})]},`${o.etl}-${o.node}`)})})}function tw({onSignedIn:n}){const[i,s]=T.useState("password"),[o,u]=T.useState(""),[f,d]=T.useState(""),[g,p]=T.useState(""),[S,y]=T.useState(null),[v,b]=T.useState(!1),C=i==="password"?!!o&&!!f:!!g.trim();return h.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async E=>{E.preventDefault(),b(!0),y(null);try{i==="password"?await mE(o,f):await hE(g.trim()),n()}catch(N){y(N.message)}finally{b(!1)}},children:[h.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),h.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),i==="password"?h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",h.jsx("span",{className:"field",children:h.jsx("input",{id:"username",autoComplete:"username",value:o,onChange:E=>u(E.target.value)})})]}),h.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",h.jsx("span",{className:"field",children:h.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:f,onChange:E=>d(E.target.value)})})]})]}):h.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",h.jsx("span",{className:"field",children:h.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:g,onChange:E=>p(E.target.value)})}),h.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),S&&h.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:S}),h.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!C,children:v?"Signing in":"Sign in"}),h.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{s(i==="password"?"token":"password"),y(null)},children:i==="password"?"Use an API token instead":"Use a username and password instead"})]})}const nw="modulepreload",lw=function(n){return"https://cdn.jsdelivr.net/npm/wgts-report@0.1.5/dist/"+n},z0={},aw=function(i,s,o){let u=Promise.resolve();if(s&&s.length>0){let d=function(S){return Promise.all(S.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));u=d(s.map(S=>{if(S=lw(S),S in z0)return;z0[S]=!0;const y=S.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${S}"]${v}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":nw,y||(b.as="script"),b.crossOrigin="",b.href=S,p&&b.setAttribute("nonce",p),document.head.appendChild(b),y)return new Promise((C,E)=>{b.addEventListener("load",C),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${S}`)))})}))}function f(d){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=d,window.dispatchEvent(g),!g.defaultPrevented)throw d}return u.then(d=>{for(const g of d||[])g.status==="rejected"&&f(g.reason);return i().catch(f)})},Ve={ink:"#18181b",ink2:"#52525b",muted:"#6e6e76",faint:"#71717a",card:"#ffffff",head:"#fafafb",line:"#e8e8ec",grid:"#f0f0f3",axis:"#d4d4d8",band:"#fafafb",cn2:"#dcdce1",guide:"#ececf0",gain:"#e8590c",gainStrong:"#c2410c",loss:"#1c7ed6",neutral:"#52525b",major:"#52525b",minor:"#a1a1aa",accent:"#6e5ad8",accentSoft:"#f3f1fd",ccfLine:"#6e5ad8",ccfFill:"#8e7fe6",dot:"#5a46c8",svDel:"#1c7ed6",svDup:"#e8590c",svInv:"#1f9e89",svTra:"#b0458f",font:"Manrope, system-ui, sans-serif",mono:"JetBrains Mono, ui-monospace, monospace",reducedMotion:!1};function iw(n){if(!n||typeof getComputedStyle>"u")return Ve;const i=getComputedStyle(n),s=(o,u)=>i.getPropertyValue(o).trim()||u;return{ink:s("--ink",Ve.ink),ink2:s("--ink-2",Ve.ink2),muted:s("--muted",Ve.muted),faint:s("--faint",Ve.faint),card:s("--card",Ve.card),head:s("--head",Ve.head),line:s("--line",Ve.line),grid:s("--grid",Ve.grid),axis:s("--axis",Ve.axis),band:s("--band",Ve.band),cn2:s("--cn2",Ve.cn2),guide:s("--guide",Ve.guide),gain:s("--gain",Ve.gain),gainStrong:s("--gain-strong",Ve.gainStrong),loss:s("--loss",Ve.loss),neutral:s("--neutral",Ve.neutral),major:s("--ink-2",Ve.major),minor:s("--chev",Ve.minor),accent:s("--focus",Ve.accent),accentSoft:s("--hi-soft",Ve.accentSoft),ccfLine:s("--ccf-line",Ve.ccfLine),ccfFill:s("--ccf-fill",Ve.ccfFill),dot:s("--dot",Ve.dot),svDel:s("--sv-del",Ve.svDel),svDup:s("--sv-dup",Ve.svDup),svInv:s("--sv-inv",Ve.svInv),svTra:s("--sv-tra",Ve.svTra),font:s("--font",Ve.font),mono:s("--mono",Ve.mono),reducedMotion:typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches}}function No(n){return{confine:!0,backgroundColor:n.card,borderColor:n.line,borderWidth:1,padding:[10,12],textStyle:{color:n.ink,fontFamily:n.font,fontSize:12.5},extraCssText:"border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(16,16,20,0.28);"}}function $n(n,i){const s=n.replace("#","");if(s.length!==6)return n;const[o,u,f]=[0,2,4].map(d=>parseInt(s.slice(d,d+2),16));return`rgba(${o}, ${u}, ${f}, ${i})`}const s1=()=>aw(()=>import("./EChart-DTluBlbi.js"),[]),sw=T.lazy(s1);function ow(){s1()}function Mo(n){return h.jsx(T.Suspense,{fallback:h.jsx("div",{className:"skeleton",style:{height:n.height},"aria-hidden":!0}),children:h.jsx(sw,{...n})})}function jo(){const n=T.useRef(null),[i,s]=T.useState(null);return T.useLayoutEffect(()=>s(iw(n.current)),[]),[n,i]}function o1({top:n,distance:i=5,gap:s=6,rowGap:o=3}={}){let u=[],f=-1;return d=>{d.dataIndex<=f&&(u=[]),f=d.dataIndex;const{labelRect:g,rect:p}=d;let S=u.findIndex(E=>E+s<=g.x);S===-1&&(S=u.push(0)-1),u[S]=g.x+g.width;const y=g.height+o,v=n===void 0?p.y-i-g.height-S*y:n+S*y,b=g.x+g.width/2,C=v+g.height+2;return{y:v,align:"center",verticalAlign:"top",labelLinePoints:[[b,C],[b,Math.max(C,p.y-3)]]}}}const gt=1e3,r1=.35,rw=8,sh=.1;function xu(n,i){return(Su(n,i)??0)*gt}function Wl(n){const[i,s]=Mu[n.replace(/^chr/,"")];return[i*gt,s*gt]}function uw(n,i,s){const[o,u]=n,f=Math.min(gt,Math.max(r1,(u-o)*s)),d=Math.min(Math.max(i-(i-o)/(u-o)*f,0),gt-f);return[d,d+f]}function cw(n,i){const s=n[1]-n[0],o=Math.min(Math.max(n[0]+i,0),gt-s);return[o,o+s]}function fw(n){for(const[i]of Qn){const[s,o]=Wl(i);if(n>=s&&n<=o)return i}return null}function u1(n,i){const s=n.segments.flatMap(u=>i==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),o=Math.max(...s.map(u=>u??0));return Math.min(rw,Math.max(n.baseline+2,Math.ceil(o)))}function dw(n){const i=10**Math.floor(Math.log10(n)),s=n/i;return(s<1.5?1:s<3.5?2:s<7.5?5:10)*i}function c1(n,i,s=5){const o=Qn.filter(([b])=>{const[C,E]=Wl(b);return E>n&&C<i});if(o.length!==1)return o.map(([b])=>{const[C,E]=Wl(b);return{value:(C+E)/2,label:b}});const[u,f]=o[0],[d,g]=Wl(u),p=(Math.max(n,d)-d)/(g-d)*f,S=(Math.min(i,g)-d)/(g-d)*f,y=dw(Math.max(S-p,1)/s),v=[];for(let b=Math.ceil(p/y)*y;b<=S;b+=y)v.push({value:d+b/f*(g-d),label:uo(b,y)});return v}function f1(n,i){const s=new Map(n.map(o=>[o.value,o.label]));return{customValues:n.map(o=>o.value),formatter:o=>s.get(o)??"",hideOverlap:!0,color:i.faint,fontFamily:i.mono,fontSize:10.5,margin:10}}function hw(n,i){if(n<=.5&&i>=gt-.5)return null;const s=R0(n/gt,"start"),o=R0(i/gt,"end");if(s.chrom===o.chrom){const u=(o.pos-s.pos)/10;return`chr${s.chrom}: ${uo(s.pos,u).replace(" Mb","")}–${uo(o.pos,u)}`}return`chr${s.chrom}:${uo(s.pos,1e6)} – chr${o.chrom}:${uo(o.pos,1e6)}`}const mw={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},D0=["neutral","gain","amp","loss"];function gw(n,i){const s=`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,o=n.major_cn!==null&&n.minor_cn!==null?` (${n.major_cn} + ${n.minor_cn})`:"",u=n.log2!==null?`, log2 ratio ${n.log2.toFixed(2)}`:"";return`<span style="font-weight:600">${mw[n.call??"neutral"]}</span>, ${n.total_cn??"?"} copies${o}<div style="font-family:var(--mono);font-size:11.5px;margin-top:3px">${s}${u}</div><div style="opacity:.7;font-size:11.5px;margin-top:5px">${i}</div>`}function pw(n){const i=new Map;for(const s of n){const o=s.gene??"?",u=i.get(o)??{gene:o,x:xu(s.chrom,s.pos),changes:[]};s.protein_change&&u.changes.push(s.protein_change),i.set(o,u)}return[...i.values()].map(s=>({...s,changes:s.changes.join(", ")})).sort((s,o)=>s.x-o.x)}function vw(n,i,s,o=[]){const u=u1(n,i),f=n.segments.some(y=>Math.max(y.total_cn??0,y.major_cn??0)>u),d={neutral:s.minor,gain:s.gain,amp:s.gainStrong,loss:s.loss},g=(y,v=0)=>n.segments.flatMap((b,C)=>{const E=y(b);if(E===null)return[];const N=D0.indexOf(b.call??"neutral");return[[xu(b.chrom,b.start),xu(b.chrom,b.end),Math.min(E,u)+v,N,C]]}),p=(y,v,b,C)=>({type:"custom",id:y,name:v,data:b,encode:{x:[0,1],y:2},clip:!0,z:6,renderItem:(E,N)=>{const _=N.coord([N.value(0),N.value(2)]),w=N.coord([N.value(1),N.value(2)]),j=D0[N.value(3)],O=Math.max(w[0]-_[0],j==="neutral"?2:7),G={x1:_[0],y1:_[1],x2:_[0]+O,y2:_[1]};return{type:"group",children:[{type:"line",shape:G,style:{stroke:"rgba(0,0,0,0)",lineWidth:16}},{type:"line",shape:G,style:{stroke:C??d[j],lineWidth:5,lineCap:"round"},emphasis:{style:{lineWidth:8}}}]}},tooltip:{formatter:E=>gw(n.segments[E.data[4]],"Click to list the mutations in this segment")}}),S=[{id:"bands",type:"line",data:[[0,0]],symbol:"none",silent:!0,lineStyle:{opacity:0},markArea:{silent:!0,data:Qn.filter((y,v)=>v%2===0).map(([y])=>[{xAxis:Wl(y)[0],itemStyle:{color:s.band}},{xAxis:Wl(y)[1]}])},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:s.axis,type:[5,4],width:1.25},label:{show:!0,position:"insideStartTop",formatter:`${n.baseline} copies`,color:s.faint,fontSize:10.5},data:[{yAxis:n.baseline}]}}];return i==="total"?S.push(p("cn-total","Copy number",g(y=>y.total_cn))):(S.push(p("cn-major","Major allele",g(y=>y.major_cn,sh),s.major)),S.push(p("cn-minor","Minor allele",g(y=>y.minor_cn,-sh),s.minor))),S.push({id:"drivers",type:"scatter",name:"Drivers",data:pw(o).map(y=>({value:[y.x,u],name:y.gene,protein:y.changes})),symbol:"triangle",symbolRotate:180,symbolSize:9,symbolOffset:[0,-11],itemStyle:{opacity:1,color:s.ink},cursor:"pointer",label:{show:!0,formatter:"{b}",position:"top",distance:3,color:s.ink2,fontSize:10.5,fontWeight:600,fontStyle:"italic"},labelLine:{show:!0,lineStyle:{color:s.axis,width:1}},labelLayout:o1({distance:3,rowGap:1}),emphasis:{scale:1.4},tooltip:{formatter:y=>`<span style="font-weight:600"><i>${y.name}</i></span> ${y.data.protein}<div style="opacity:.7;font-size:11.5px;margin-top:5px">Driver. Click to find it in the table</div>`},z:7}),S.push({id:"focus",type:"scatter",data:[],silent:!0,animation:!1,symbolSize:12,itemStyle:{opacity:1,color:s.card,borderColor:s.ink,borderWidth:2.5},label:{show:!0,position:"right",distance:8,color:s.ink,backgroundColor:s.card,borderColor:s.line,borderWidth:1,borderRadius:6,padding:[3,6],rich:{gene:{fontWeight:600,fontStyle:"italic",fontSize:11.5,color:s.ink},copies:{fontSize:11.5,color:s.muted,padding:[0,0,0,4]}}},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:s.ink,type:"solid",width:1.25,opacity:.4},label:{show:!1},data:[]},z:8}),{animation:!s.reducedMotion,animationDuration:450,textStyle:{fontFamily:s.font},grid:{left:34,right:16,top:o.length?46:16,bottom:54},xAxis:{type:"value",min:0,max:gt,axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:f1(c1(0,gt),s)},yAxis:{type:"value",min:0,max:u,interval:1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:s.faint,fontFamily:s.mono,fontSize:11,formatter:y=>y===u&&f?`${y}+`:`${y}`},splitLine:{lineStyle:{color:s.grid}}},tooltip:{trigger:"item",...No(s)},dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"none",height:10,bottom:6,borderColor:"transparent",backgroundColor:s.grid,fillerColor:$n(s.accent,.16),dataBackground:{lineStyle:{opacity:0},areaStyle:{opacity:0}},selectedDataBackground:{lineStyle:{opacity:0},areaStyle:{opacity:0}},handleIcon:"path://M2,0 h2 a2,2 0 0 1 2,2 v12 a2,2 0 0 1 -2,2 h-2 a2,2 0 0 1 -2,-2 v-12 a2,2 0 0 1 2,-2 z",handleSize:"140%",handleStyle:{color:s.card,borderColor:s.axis,borderWidth:1},moveHandleSize:0,showDetail:!1,brushSelect:!1,minValueSpan:r1}],series:S}}function yw(n,i,s){const o=i.replace(/^chr/,"");return n.segments.find(u=>u.chrom===o&&u.start<=s&&s<=u.end)}function Sw(n,i,s){if(!n)return{series:[{id:"focus",data:[],markLine:{data:[]}}]};const o=u1(i,s),u=yw(i,n.chrom,n.pos),f=u?s==="total"?u.total_cn:u.major_cn:null,d=xu(n.chrom,n.pos),g=Math.min(f??i.baseline,o)+(s==="allele"&&f!==null?sh:0),p=(u==null?void 0:u.total_cn)!==null&&(u==null?void 0:u.total_cn)!==void 0?`{copies|${u.total_cn} copies}`:"";return{series:[{id:"focus",data:[{value:[d,g],label:{formatter:`{gene|${n.gene??"?"}}${p}`}}],markLine:{data:[[{coord:[d,0]},{coord:[d,o]}]]}}]}}function Bi(n,[i,s]){n==null||n.dispatchAction({type:"dataZoom",startValue:i,endValue:s})}function xw(n){var s;const i=((s=n.batch)==null?void 0:s[0])??n;return i.startValue!==void 0&&i.endValue!==void 0?[i.startValue,i.endValue]:i.start!==void 0&&i.end!==void 0?[i.start/100*gt,i.end/100*gt]:null}function bw({data:n,mode:i,drivers:s,focus:o,locate:u,chartRef:f,onWindow:d,onSegment:g,onGene:p}){const[S,y]=jo(),v=T.useRef([0,gt]),b=T.useMemo(()=>y?vw(n,i,y,s):null,[n,i,y,s]),C=T.useMemo(()=>Sw(o,n,i),[o,n,i]),E=T.useMemo(()=>({datazoom:w=>{const j=xw(w),O=f.current;if(!j||!O||!y)return;v.current=j;const G=c1(...j,Math.max(2,Math.round(O.getWidth()/150)));O.setOption({xAxis:{axisLabel:f1(G,y)}},{lazyUpdate:!0}),d(j)},click:w=>{var j;w.seriesId==="drivers"&&w.name?p(w.name):(j=w.seriesId)!=null&&j.startsWith("cn-")&&g(n.segments[w.data[4]])}}),[f,y,n,d,g,p]),N=T.useCallback(w=>{f.current=w;const j=w.getZr(),O=w.getDom(),G=ae=>w.containPixel({gridIndex:0},ae),B=ae=>w.convertFromPixel({gridIndex:0},ae)[0],K=ae=>{const Xe=[ae.offsetX,ae.offsetY];if(!G(Xe))return;const et=fw(B(Xe));et&&Bi(w,Wl(et))},q=ae=>{if(!ae.ctrlKey)return;const Xe=O.getBoundingClientRect(),et=[ae.clientX-Xe.left,ae.clientY-Xe.top];if(!G(et))return;ae.preventDefault();const He=Math.max(-50,Math.min(50,ae.deltaY));Bi(w,uw(v.current,B(et),Math.exp(He*.01)))};let Z=null;const W=ae=>{Z=v.current[1]-v.current[0]<gt-.5&&G([ae.offsetX,ae.offsetY])?{pixel:ae.offsetX,view:v.current}:null},oe=ae=>{if(!Z)return;const Xe=B([ae.offsetX,0])-B([Z.pixel,0]);Bi(w,cw(Z.view,-Xe))},Se=()=>{Z=null};return j.on("dblclick",K),j.on("mousedown",W),j.on("mousemove",oe),j.on("mouseup",Se),j.on("globalout",Se),O.addEventListener("wheel",q,{passive:!1}),()=>{j.off("dblclick",K),j.off("mousedown",W),j.off("mousemove",oe),j.off("mouseup",Se),j.off("globalout",Se),O.removeEventListener("wheel",q),f.current=null}},[f]),_=T.useCallback(w=>{const[j,O]=v.current;(j>0||O<gt)&&Bi(w,[j,O])},[]);return T.useEffect(()=>{u&&Bi(f.current,Wl(u.chrom))},[u,f]),h.jsx("div",{ref:S,className:"px-2 pt-1",children:b&&h.jsx(Mo,{option:b,overlay:C,height:268,ariaLabel:`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,onEvents:E,onReady:N,onDrawn:_})})}function ao({color:n,label:i}){return h.jsxs("span",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),i]})}function Cw({envelope:n,loading:i,picked:s,sampleLabel:o,drivers:u,focus:f,locate:d,onSegment:g,onGene:p}){var _;const[S,y]=T.useState("total"),[v,b]=T.useState([0,gt]),C=T.useRef(null),E=((_=n==null?void 0:n.data)==null?void 0:_.allele_specific)??!1,N=hw(...v);return h.jsx(QE,{title:"Copy number",subtitle:`Copy number across the genome, ${o}`,info:"copyNumber",envelope:n,loading:i,picked:s,skeletonHeight:250,controls:h.jsxs(h.Fragment,{children:[N&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:N}),h.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:()=>Bi(C.current,[0,gt]),children:h.jsx(IC,{size:15,"aria-hidden":!0})})]}),h.jsx(zu,{label:"Copy number view",value:E?S:"total",onChange:y,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!E}]})]}),footer:h.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[S==="total"||!E?h.jsxs(h.Fragment,{children:[h.jsx(ao,{color:"var(--gain)",label:"Gain"}),h.jsx(ao,{color:"var(--gain-strong)",label:"Amplification"}),h.jsx(ao,{color:"var(--loss)",label:"Loss"})]}):h.jsxs(h.Fragment,{children:[h.jsx(ao,{color:"var(--ink-2)",label:"Major allele"}),h.jsx(ao,{color:"var(--chev)",label:"Minor allele"})]}),h.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan. Double-click a chromosome to fill the view."})]}),children:w=>h.jsx(bw,{data:w,mode:E?S:"total",drivers:u,focus:f,locate:d,chartRef:C,onWindow:b,onSegment:g,onGene:p})})}function d1(n){const[i,s]=n.range;return[[i,0],...n.bins.map(o=>[(o.x0+o.x1)/2,o.n]),[s,0]]}function h1(n,i){for(let s=1;s<n.length;s++){const[o,u]=n[s-1],[f,d]=n[s];if(i<=f)return f===o?d:u+(i-o)/(f-o)*(d-u)}return n[n.length-1][1]}function m1(n){return n==="ccf"?"CCF":"VAF"}function oh(n,i){return Math.min(Math.max(i,n.range[0]),n.range[1])}const Ew=1;function ww(n,i){const s=d1(n),o=m1(n.measure);return{animation:!i.reducedMotion,animationDuration:650,animationEasing:"cubicOut",textStyle:{fontFamily:i.font},grid:{left:16,right:22,top:44,bottom:40},xAxis:{type:"value",min:n.range[0],max:n.range[1],interval:n.measure==="ccf"?.25:.1,axisLine:{lineStyle:{color:i.axis}},axisTick:{show:!1},axisLabel:{color:i.faint,fontFamily:i.mono,fontSize:10.5,lineHeight:14,formatter:u=>n.measure==="ccf"?u===1?`1.0
258
- {clonal|clonal}`:u.toFixed(2).replace(/0$/,""):u.toFixed(1),rich:{clonal:{color:i.faint,fontFamily:i.font,fontSize:10.5}}},splitLine:{show:!0,lineStyle:{color:i.grid}}},yAxis:{type:"value",show:!1,max:u=>Math.max(1,u.max)*1.25},tooltip:{trigger:"item",...No(i)},brush:{xAxisIndex:0,seriesIndex:[Ew],brushType:"lineX",brushMode:"single",transformable:!0,removeOnClick:!0,brushStyle:{color:$n(i.accent,.08),borderColor:$n(i.accent,.55),borderWidth:1},outOfBrush:{colorAlpha:.25},throttleType:"debounce",throttleDelay:120},series:[{id:"density",type:"line",name:o,data:s,smooth:.45,symbol:"none",silent:!0,lineStyle:{width:2.25,color:i.ccfLine},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:$n(i.ccfFill,.26)},{offset:1,color:$n(i.ccfFill,.02)}]}},markLine:n.measure==="ccf"?{silent:!0,symbol:"none",animation:!1,lineStyle:{color:i.axis,type:[4,4],width:1.25},label:{show:!1},data:[{xAxis:1}]}:void 0},{id:"drivers",type:"scatter",name:"Drivers",data:[...n.drivers].sort((u,f)=>u.value-f.value).map(u=>({value:[oh(n,u.value),h1(s,oh(n,u.value))],name:u.gene??"?",protein:u.protein_change,actual:u.value})),symbolSize:10,cursor:"pointer",itemStyle:{opacity:1,color:i.dot,borderColor:i.card,borderWidth:2.5,shadowBlur:6,shadowColor:$n(i.dot,.3)},emphasis:{scale:1.5},label:{show:!0,formatter:"{b}",position:"top",distance:10,color:i.ink,fontWeight:600,fontStyle:"italic",fontSize:11.5},labelLine:{show:!0,lineStyle:{color:i.axis,width:1}},labelLayout:o1({top:4}),tooltip:{formatter:u=>`<span style="font-weight:600"><i>${u.name}</i></span> ${u.data.protein??""}<div style="margin-top:3px">${o} <span style="font-weight:600">${u.data.actual.toFixed(2)}</span></div><div style="opacity:.7;font-size:11.5px;margin-top:5px">Driver. Click to find it in the table</div>`},z:4},{id:"focus",type:"scatter",data:[],silent:!0,symbolSize:13,itemStyle:{opacity:1,color:i.card,borderColor:i.ink,borderWidth:2.5},label:{show:!0,position:"right",distance:8,color:i.ink,fontSize:11,fontWeight:600,backgroundColor:i.card,borderColor:i.line,borderWidth:1,borderRadius:6,padding:[3,6]},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:i.ink,type:"solid",width:1.25,opacity:.45},label:{show:!1},data:[]},animation:!1,z:6}]}}function _w(n,i){const s=i?n.measure==="ccf"?i.ccf:i.vaf:null;if(s==null)return{series:[{id:"focus",data:[],markLine:{data:[]}}]};const o=oh(n,s),u=h1(d1(n),o);return{series:[{id:"focus",data:[{value:[o,u],label:{formatter:`${(i==null?void 0:i.gene)??"?"} ${s.toFixed(2)}`}}],markLine:{data:[[{coord:[o,0]},{coord:[o,u]}]]}}]}}function U0(n,i){n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"lineX",brushMode:"single"}}),n.dispatchAction({type:"brush",areas:i?[{brushType:"lineX",xAxisIndex:0,coordRange:i}]:[]})}const H0=n=>Math.round(n*100)/100;function Rw({data:n,range:i,focus:s,onRange:o,onGene:u}){const[f,d]=jo(),g=T.useRef(null),p=T.useRef(i);p.current=i;const S=T.useMemo(()=>d?ww(n,d):null,[n,d]),y=T.useMemo(()=>_w(n,s),[n,s]),v=T.useMemo(()=>({brushEnd:N=>{const _=N.areas[0];if(!_)return o(null);const[w,j]=_.coordRange;o(j-w<.005?null:[H0(w),H0(j)])},click:N=>{N.seriesId==="drivers"&&N.name&&u(N.name)}}),[o,u]),b=T.useCallback(N=>(g.current=N,()=>{g.current=null}),[]),C=T.useCallback(N=>U0(N,p.current),[]);T.useEffect(()=>{g.current&&U0(g.current,i)},[i]);const E=m1(n.measure);return h.jsx("div",{ref:f,className:"strip-chart",children:S&&h.jsx(Mo,{option:S,overlay:y,height:196,ariaLabel:`${E} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(N=>`${N.gene} at ${N.value.toFixed(2)}`).join(", ")}`:""}.`,onEvents:v,onReady:b,onDrawn:C})})}function Tw({envelope:n,loading:i,measure:s,onMeasure:o,range:u,focus:f,onRange:d,onGene:g}){const p=s==="ccf"?"Cancer cell fraction":"Variant allele fraction",S=(n==null?void 0:n.status)==="ok"?n.data:null;return h.jsxs("div",{className:"strip",children:[h.jsxs("div",{className:"strip-head",children:[h.jsx("span",{className:"text-[13px] font-semibold",children:p}),S&&h.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[S.median!==null?`Median ${S.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),h.jsx("span",{className:"flex-auto"}),h.jsx(zu,{label:"Measure",value:s,onChange:o,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),h.jsx(To,{label:p,envelope:n,loading:i,skeletonHeight:180,children:y=>h.jsx(Rw,{data:y,range:u,focus:f,onRange:d,onGene:g})})]})}const Nw=Object.keys(Py),Mw=Object.keys(Jy);function L0(n,i){return n.includes(i)?n.filter(s=>s!==i):[...n,i]}function Ed({label:n,count:i,active:s,onClick:o}){return h.jsxs("button",{type:"button",className:"facet","aria-pressed":s,"data-empty":!s&&i===0,onClick:o,children:[h.jsx("span",{className:"facet-check","aria-hidden":!0,children:s&&h.jsx(AC,{size:11,strokeWidth:3})}),h.jsx("span",{className:"truncate",children:n}),h.jsx("span",{className:"facet-n",children:i===void 0?"":i.toLocaleString("en-US")})]})}function jw({table:n,data:i,onChange:s}){const o=i==null?void 0:i.facets.effects,u=i==null?void 0:i.facets.flags,f=n.range;return h.jsxs("aside",{className:"facets","aria-label":"Filters",children:[h.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[h.jsx("span",{className:"facet-title",children:"Effect"}),Nw.map(d=>h.jsx(Ed,{label:Py[d],count:o==null?void 0:o[d],active:n.effects.includes(d),onClick:()=>s({effects:L0(n.effects,d)})},d))]}),h.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[h.jsx("span",{className:"facet-title",children:"Flags"}),Mw.map(d=>h.jsx(Ed,{label:Jy[d],count:u==null?void 0:u[d],active:n.flags.includes(d),onClick:()=>s({flags:L0(n.flags,d)})},d))]}),(i==null?void 0:i.ffpe)&&h.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[h.jsx("span",{className:"facet-title",children:"FFPE filter"}),h.jsx(Ed,{label:"Show filtered calls",count:i.ffpe.removed,active:n.ffpe,onClick:()=>s({ffpe:!n.ffpe})}),h.jsx("span",{className:"facet-note",children:i.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${i.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),f&&h.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[h.jsxs("span",{className:"facet-title",children:[f.measure==="ccf"?"CCF":"VAF"," range"]}),h.jsxs("span",{className:"facet-range",children:[h.jsxs("span",{className:"mono",children:[f.low.toFixed(2)," – ",f.high.toFixed(2)]}),h.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>s({range:null}),children:h.jsx(Eh,{size:13,"aria-hidden":!0})})]})]}),Zy(n)>0&&h.jsx("button",{type:"button",className:"facet-clear",onClick:()=>s({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}function g1({value:n,onChange:i,label:s="Search mutations",placeholder:o="Search gene, change or locus",shortcut:u=!0}){const[f,d]=T.useState(n),g=T.useRef(null),p=T.useRef(i);p.current=i,T.useEffect(()=>d(n),[n]),T.useEffect(()=>{if(f===n)return;const y=window.setTimeout(()=>p.current(f),250);return()=>window.clearTimeout(y)},[f,n]),T.useEffect(()=>{if(!u)return;const y=v=>{var b,C,E;v.key!=="/"||v.metaKey||v.ctrlKey||v.altKey||(C=(b=v.target)==null?void 0:b.closest)!=null&&C.call(b,"input, textarea, select, [contenteditable]")||(v.preventDefault(),(E=g.current)==null||E.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[u]);const S=()=>{d(""),i("")};return h.jsxs("div",{className:"field search-field",children:[h.jsx(Nu,{size:15,"aria-hidden":!0,style:{color:"var(--chev)"}}),h.jsx("input",{ref:g,type:"search","aria-label":s,placeholder:o,value:f,onChange:y=>d(y.target.value),onKeyDown:y=>{y.key==="Escape"&&S(),y.key==="Enter"&&i(f)}}),f?h.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:S,children:h.jsx(Eh,{size:14,"aria-hidden":!0})}):u?h.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}/**
256
+ */const wC=Ue("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
257
+ * @license lucide-react v0.468.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const Qu=Ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
262
+ * @license lucide-react v0.468.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const CC=Ue("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function jC(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function EC(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const NC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function O1(n){if(!n)return"";const s=new Date(n);return Number.isNaN(s.getTime())?"":NC.format(s)}function lm(n,s){return n.startsWith(`${s}_`)?n.slice(s.length+1):n}function Oh(n){return n==null?"–":n.toFixed(2)}const sy={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function _C(n,s){const i=(n??s??"").split("&")[0];if(!i)return"–";if(sy[i])return sy[i];const r=i.replace(/_/g," ");return r.charAt(0).toUpperCase()+r.slice(1)}function Fr(n,s){return`chr${n}:${s.toLocaleString("en-US")}`}const On=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],zh=.0025,MC=On.reduce((n,[,s])=>n+s,0),RC=1-zh*On.length,Yu=(()=>{const n={};let s=zh/2;for(const[i,r]of On){const u=r/MC*RC;n[i]=[s,s+u],s+=u+zh}return n})(),iy=Object.fromEntries(On);function Hu(n,s){const i=n.replace(/^chr/,""),r=Yu[i];if(!r)return null;const u=Math.min(Math.max(s,0),iy[i]);return r[0]+u/iy[i]*(r[1]-r[0])}function ry(n,s,i,r){const u=r*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),s+i*Math.sin(u)]}function Vd(n,s,i,r,u){const[d,h]=ry(n,s,i,r),[m,p]=ry(n,s,i,u),y=u-r>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${p.toFixed(2)}`}function Dh(n,s="start"){let i=null;for(const d of On){const[h,m]=d,[p,y]=Yu[h];if(n<p&&s==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-p)/(y-p))*m)};i=d}const[r,u]=On[On.length-1];return{chrom:r,pos:u}}function Or(n,s){const i=s>=1e6?0:s>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const TC={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},oy=.004,uy=.003;function AC(n,s,i){const r=Hu(n,s),u=Hu(n,i);return r===null||u===null?null:u-r<oy?[r,r+oy]:[r,u]}function $d(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function OC(n,s,i){return n===1?`one ${s}`:`${n} ${i}`}function z1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,p])=>{const y=n.events.filter(C=>C.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(C=>C.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,b=x.length===1?`chromosome ${x[0]}`:`chromosomes ${$d(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${OC(y.length,m,p)} on ${b}${w}`]}),r=i.length?$d(i):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(h=>h.gene).filter(h=>!!h))].sort(),d=u.length?`Drivers in ${$d(u)}.`:"No drivers.";return`${r.charAt(0).toUpperCase()}${r.slice(1)}. ${d}`}function am({fingerprint:n,size:s,title:i,subtitle:r,className:u}){const d=TC[s],h=d.box/2,m=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${z1(n)}`:"No copy-number data";return f.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:s==="mini"?void 0:"img","aria-label":s==="mini"?void 0:y,"aria-hidden":s==="mini"?!0:void 0,className:u,children:[f.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(Yu).map(([x,[v,b]])=>f.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:Vd(h,h,d.ring,v,b)},x)),m.map((x,v)=>{const b=AC(x.chrom,x.start,x.end);if(!b)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,C=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return f.jsx("path",{className:`r-${x.kind}`,strokeWidth:C,d:Vd(h,h,w,b[0],b[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&p.map((x,v)=>{const b=Hu(x.chrom,x.pos);return b===null?null:f.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:Vd(h,h,d.drv,b-uy/2,b+uy/2)},`${x.gene}-${x.pos}-${v}`)})]}),s==="hero"&&i&&f.jsxs(f.Fragment,{children:[f.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),r&&f.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:r})]})]})}const zC={"DNA|WG":{label:"WGS",icon:qu},"RNA|WT":{label:"RNA",icon:aC}};function cy({children:n}){return f.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function DC({sex:n}){const s=n==null?void 0:n.toUpperCase();return s==="MALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),f.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),f.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),f.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):s==="FEMALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),f.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),f.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):f.jsx(SC,{size:16,"aria-hidden":!0})}const D1="wgts-patient-root";function HC(n,s){const i=n.getBoundingClientRect(),r=n.closest(".topbar"),u=r==null?void 0:r.parentElement,d=r&&u?u.getBoundingClientRect().top-r.getBoundingClientRect().top:0;return{x:i.left-s.left+i.width/2,y:i.top+d-s.top+i.height/2}}const H1=8;function Fd(n,s,i,r){const u=i>=n.x?1:-1,d=Math.min(H1,Math.abs(i-n.x)/2,(s-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${s-d}`,`Q${n.x},${s} ${n.x+u*d},${s}`,`H${i-u*d}`,`Q${i},${s} ${i},${s+d}`,`V${r}`].join(" ")}function LC(n,s,i){const r=i.x>s.x?1:-1,u=Math.min(H1,Math.abs(i.x-s.x)/2,(s.top-n)/2);return[`M${s.x},${s.top}`,`V${n+u}`,`Q${s.x},${n} ${s.x+r*u},${n}`,`H${i.x-r*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function UC(n,s,i){const r=s.left+s.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${r},${d} C${r},${m} ${u},${m} ${u},${d}`}function VC(n,s){var r,u;const i=n.samples.find(d=>d.id===s);for(const d of(i==null?void 0:i.experiments)??[]){const h=(r=n.experiments[d])==null?void 0:r.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==s)return m}return null}function $C({data:n,sampleId:s,fingerprint:i,onSample:r}){const u=E.useRef(null),[d,h]=E.useState(null),[m,p]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const R=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(R)},[d,m]);const y=new Set(n.failures.map(R=>R.sample)),x=E.useRef(s),[v,b]=E.useState(null);E.useEffect(()=>{if(x.current===s)return;const R=x.current;x.current=s,b(j=>({from:R,to:s,n:((j==null?void 0:j.n)??0)+1}))},[s]);const w=VC(n,s);E.useLayoutEffect(()=>{const R=u.current;if(!R)return;const j=()=>{const T=R.getBoundingClientRect(),H=document.getElementById(D1);if(!H)return;const D=Array.from(R.querySelectorAll("[data-sample]")).map(te=>{const k=te.getBoundingClientRect();return{id:te.dataset.sample,x:k.left-T.left+22,left:k.left-T.left,width:k.width,top:k.top-T.top,bottom:k.bottom-T.top}}),z=HC(H,T),Y=Math.min(...D.map(te=>te.top));h({root:z,trunk:Y-12,tabs:D})};if(j(),typeof ResizeObserver>"u")return;const F=new ResizeObserver(j);return F.observe(R),()=>F.disconnect()},[n,s]);const C=d==null?void 0:d.tabs.find(R=>R.id===s),N=w?d==null?void 0:d.tabs.find(R=>R.id===w):void 0,M=v?d==null?void 0:d.tabs.find(R=>R.id===v.from):void 0;return f.jsxs("div",{ref:u,className:"ltabs",children:[d&&f.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(R=>f.jsx("path",{d:Fd(d.root,d.trunk,R.x,R.top)},R.id)),C&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),M&&v&&v.to===C.id&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:LC(d.trunk,M,C)},`bead-${v.n}`)]}),C&&N&&f.jsxs("g",{className:"ltabs-match",children:[f.jsx("path",{d:UC(d.trunk,C,N)}),f.jsx("text",{x:(C.left+C.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),C&&f.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:C.width,height:C.bottom-C.top,transform:`translate(${C.left}px, ${C.top}px)`}}),f.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(R=>{const j=R.id===s,F=i==null?void 0:i.samples.find(H=>H.sample===R.id),T=R.experiments.map(H=>({id:H,...n.experiments[H]})).filter(H=>H.technique);return f.jsxs("button",{type:"button",role:"tab","data-sample":R.id,"aria-selected":j,className:"ltab",onClick:()=>r(R.id),children:[f.jsxs("span",{className:"ltab-name",children:[R.category==="TUMOR"?f.jsx(am,{fingerprint:F,size:"mini",className:"h-[18px] w-[18px] flex-none"}):f.jsx(T1,{size:15,"aria-hidden":!0,className:"flex-none"}),lm(R.id,n.individual.id)," ",R.category==="TUMOR"?"tumour":"normal",y.has(R.id)&&f.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),f.jsxs("span",{className:"ltab-exps",children:[T.length===0&&f.jsx("span",{children:"No experiments"}),T.map(H=>{const D=zC[H.technique],z=(D==null?void 0:D.icon)??qu;return f.jsxs("span",{title:H.id,children:[f.jsx(z,{size:12,"aria-hidden":!0}),(D==null?void 0:D.label)??H.technique]},H.id)})]})]},R.id)})})]})}function FC({data:n,sampleId:s,fingerprint:i,onSample:r}){return f.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const d=i==null?void 0:i.samples.find(h=>h.sample===u.id);return f.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===s,className:"ctab",onClick:()=>r(u.id),children:[u.category==="TUMOR"?f.jsx(am,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):f.jsx(T1,{size:14,"aria-hidden":!0,className:"flex-none"}),lm(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Dr(n){let s=n;const i=new Set;return{get:()=>s,set:r=>{Object.is(r,s)||(s=r,i.forEach(u=>u()))},subscribe:r=>(i.add(r),()=>i.delete(r))}}function Iu(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const sm=Dr(!1),Br=()=>sm.set(!0),Eu=()=>sm.set(!1),BC=Dr(!0);function L1({individualId:n,subtitle:s,patientIcon:i,report:r,compact:u,headerInView:d=BC}){const h=!Iu(d),[m,p]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const b=()=>x(window.scrollY>4);return b(),window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]);async function v(){try{await navigator.clipboard.writeText(window.location.href),p(!0),window.setTimeout(()=>p(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return f.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-3 pb-2","data-scrolled":y,children:[f.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[f.jsx("button",{type:"button",className:"crumb",onClick:Br,title:"Browse projects and patients",children:"Patients"}),n&&f.jsxs(f.Fragment,{children:[f.jsx(nm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&f.jsx("span",{id:D1,className:"ltabs-icon",children:i}),f.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),s&&f.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:s})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,f.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:f.jsx(dC,{size:16,"aria-hidden":!0})}),f.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&f.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:f.jsx("div",{children:u})})]})}function kC(){const n=tm(),[s,i]=E.useState("");return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx("aside",{className:"side","aria-label":"Navigation",children:f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})})]})}),f.jsxs("div",{className:"page",children:[f.jsx(L1,{}),f.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[f.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),f.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Browse the projects that have a dashboard and pick a patient, or enter an individual's system id to see its WGTS report as live charts and tables."}),f.jsx("div",{children:f.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:Br,children:[f.jsx(uC,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),f.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:r=>{r.preventDefault(),s.trim()&&n(`/${s.trim()}`)},children:[f.jsxs("div",{className:"field w-[340px] max-w-full",children:[f.jsx(Du,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),f.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),f.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:s,onChange:r=>i(r.target.value)})]}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!s.trim(),children:"Open"})]})]})]})]})}class Xu extends Error{}class U1 extends Error{}function GC(){try{return localStorage.getItem(Th)}catch{return null}}function V1(n){try{n?localStorage.setItem(Th,n):localStorage.removeItem(Th)}catch{}}function $1(){const n=GC();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Ca(n,s={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(s))h&&i.set(d,h);const r=i.toString(),u=await fetch(`${Gn.apiHost}/wgts/api/${n}${r?`?${r}`:""}`,{headers:$1()});if(u.status===401)throw new Xu;if(u.status===403){const d=await u.json().catch(()=>({}));throw new U1(d.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function qC(n){if(!(await fetch(`${Gn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");V1(n)}async function QC(n,s){const i=await fetch(`${Gn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:s})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const r=await i.json();V1(r.key)}async function F1(n){const s=await fetch(`${Gn.apiHost}/wgts/api/${n}`,{headers:$1()});if(s.status===401)throw new Xu;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return await s.json()}const YC=()=>F1("projects/"),IC=n=>F1(`projects/${n}/individuals/`);function Hh(n){const s=n.toUpperCase();return s.startsWith("BATTENBERG")||s.startsWith("CNV_")?"cn":s.startsWith("ANNOT_SNVS")||s.startsWith("ANNOT_INDELS")||s.startsWith("FFPERASE")?"mut":s.startsWith("MSISENSOR")?"msi":"other"}function Ei(n){return`fam-${Hh(n)}`}function B1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Ft(n){return`${n.app}#${n.pk??""}`}const k1={drivers:"gene",coding:"position",all:"position"},XC=100;function fy(){return{scope:"drivers",sort:k1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function G1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function KC(n){const s={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(s[`${n.range.measure}_min`]=String(n.range.low),s[`${n.range.measure}_max`]=String(n.range.high)),s}const q1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},Q1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function ZC(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const Y1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function PC(n){return Y1.test(n.trim())}function JC(n,s,i){return`chr${n}:${s.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const WC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function ej(n){var d;if(!n)return null;const s=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],r=WC[s[0]];return!i&&!r?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",r].filter(Boolean).join(", ")}function tj(n){const s=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return s?`${s[1]} of ${s[2]} ${s[2]==="1"?"copy":"copies"}`:n}function nj(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const ul=(n,s)=>!(s instanceof Xu)&&n<2;function lj(n,s){return Ol({queryKey:["individual",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/`,{version:s}),retry:ul})}function aj(n,s,i){return Ol({queryKey:["metrics",n,s,i??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:s,version:i}),enabled:!!s,retry:ul})}function sj(n,s){return Ol({queryKey:["fingerprint",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:s}),retry:ul})}const Kr=(n,s)=>`individuals/${encodeURIComponent(n)}/${s}/`;function ij(n,s,i){return Ol({queryKey:["cn",n,s,i??null],queryFn:()=>Ca(Kr(n,"cn"),{sample:s,version:i}),enabled:!!s,retry:ul})}function rj(n,s,i,r,u){return Ol({queryKey:["ccf",n,s,i,r,u??null],queryFn:()=>Ca(Kr(n,"ccf"),{sample:s,measure:i,version:u,ffpe:r?"all":void 0}),enabled:!!s,retry:ul})}function oj(n,s,i){return Ol({queryKey:["signatures",n,s,i??null],queryFn:()=>Ca(Kr(n,"signatures"),{sample:s,version:i}),enabled:!!s,retry:ul})}function uj(n,s,i){return Ol({queryKey:["svs",n,s,i??null],queryFn:()=>Ca(Kr(n,"svs"),{sample:s,version:i}),enabled:!!s,retry:ul})}function cj(n,s,i,r){return tw({queryKey:["variants",n,s,i,r??null],queryFn:({pageParam:u})=>Ca(Kr(n,"variants"),{sample:s,version:r,...KC(i),page:String(u),page_size:String(XC)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((p,y)=>p+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!s,placeholderData:Wy,retry:ul})}function fj(){return Ol({queryKey:["picker","projects"],queryFn:YC,staleTime:6e4,retry:ul})}function dj(n){return Ol({queryKey:["picker","patients",n],queryFn:()=>IC(n),staleTime:6e4,placeholderData:Wy,retry:ul})}const ci=6,hj=16,I1=7,Lu=6;function Bd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${Lu} V${n-s}`}function kd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${n-s} Q${ci},${n} ${ci+s},${n} H${hj}`}function mj(n,s){return`M${ci},${n} V${s}`}function gj(n,s,i,r){const[u,d]=E.useState(null),[h,m]=E.useState([]),[p,y]=E.useState(!1),[x,v]=E.useState(null),[b,w]=E.useState(280),C=n.map(D=>`${D.key}:${D.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const D=()=>{const Y=Array.from(u.querySelectorAll(i));m(n.flatMap((te,k)=>{const ne=Y[k];if(!ne)return[];const ie=ne.offsetTop,Ce=ne.offsetHeight;return[{key:te.key,cy:ie+Ce/2,top:ie,height:Ce,available:te.available}]}))};if(D(),typeof ResizeObserver>"u")return;const z=new ResizeObserver(D);return z.observe(u),()=>z.disconnect()},[u,C,i,r]);const N=h.find(D=>D.key===s&&D.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||p)return;const D=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(D)},[N,p]);const[R,j]=E.useState(s);E.useEffect(()=>{if(R===s)return;const D=R;j(s),D&&s&&v(z=>({from:D,to:s,n:((z==null?void 0:z.n)??0)+1}))},[s,R]);const F=x?h.find(D=>D.key===x.from):void 0,[T,H]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&T!==null&&T!==N.cy){const D=Math.abs(N.cy-T)/38;w(Math.round(Math.min(620,240+80*D)))}H(N?N.cy:null)},[N==null?void 0:N.key,N==null?void 0:N.cy]),{setBox:d,tree:h,on:N,light:M,glides:p,hop:x,leaving:F,duration:b}}function pj({tree:n,on:s,light:i,glides:r,hop:u,leaving:d}){return f.jsxs(f.Fragment,{children:[n.length>0&&f.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[f.jsx("circle",{cx:ci,cy:Lu,r:"2.5",className:"side-root"}),f.jsx("path",{d:Bd(n[n.length-1].cy)}),n.map(h=>f.jsx("path",{d:kd(h.cy),"data-off":h.available?void 0:"true"},h.key)),s&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}})]}),n.map(h=>f.jsxs("g",{className:"side-stub","data-active":h.key===(s==null?void 0:s.key)||void 0,children:[f.jsx("path",{className:"ltabs-haze",d:kd(h.cy)}),f.jsx("path",{className:"ltabs-on",d:kd(h.cy)})]},h.key)),s&&d&&u&&u.to===s.key&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:mj(d.cy,s.cy)},`bead-${u.n}`)]}),f.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":r||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const Gd=[{key:"overview",label:"Overview",icon:fC},{key:"copyNumber",label:"Copy number",icon:nC},{key:"mutations",label:"Mutations",icon:mC},{key:"structuralVariants",label:"Structural variants",icon:xC},{key:"signatures",label:"Signatures and HRD",icon:sC},{key:"rna",label:"RNA",icon:wC,soon:!0},{key:"germline",label:"Germline",icon:yC,soon:!0},{key:"quality",label:"Quality",icon:rC,soon:!0}],dy="wgts-side-collapsed";function vj(){const[n,s]=E.useState(()=>{try{return localStorage.getItem(dy)==="1"}catch{return!1}});return[n,r=>{s(r);try{localStorage.setItem(dy,r?"1":"0")}catch{}}]}function yj({analyses:n,onPage:s,sampleLabel:i,picked:r,onPick:u,sections:d,activeStore:h,onSection:m}){const p=Iu(h),[y,x]=vj(),{setBox:v,...b}=gj(Gd.map(({key:z})=>({key:z,available:d.has(z)})),p,".sc-nav",y),[w,C]=E.useState(!1),[N,M]=E.useState(!1),R=["cn","mut","msi","other"],j=(z,Y)=>R.indexOf(Hh(z.app))-R.indexOf(Hh(Y.app))||z.app.localeCompare(Y.app),F=N||r!==null;E.useEffect(()=>{const z=Y=>{Y.key.toLowerCase()==="k"&&(Y.metaKey||Y.ctrlKey)&&(Y.preventDefault(),Br())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const T=n.filter(z=>z.role==="input"),H=T.filter(z=>s.has(Ft(z))).sort(j),D=[...T.filter(z=>!s.has(Ft(z))).sort(j),...n.filter(z=>z.role==="cohort")];return f.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})}),f.jsx("button",{type:"button",className:"side-toggle","aria-label":y?"Expand the menu":"Collapse the menu","aria-expanded":!y,title:y?"Expand the menu":"Collapse the menu",onClick:()=>x(!y),children:y?f.jsx(vC,{size:17,"aria-hidden":!0}):f.jsx(pC,{size:17,"aria-hidden":!0})})]}),f.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${b.duration}ms`},children:[f.jsx(pj,{...b}),Gd.map(({key:z,label:Y,icon:te,soon:k},ne)=>{const ie=d.has(z);return f.jsxs("div",{className:"contents",children:[k&&!Gd[ne-1].soon&&f.jsx("span",{className:"side-group",children:"Coming soon"}),f.jsxs("button",{type:"button",className:"sc-nav","aria-current":ie&&p===z?"location":void 0,"aria-label":Y,disabled:!ie,title:y?Y:ie?void 0:"Not available for this sample yet",onClick:()=>m(z),children:[f.jsx(te,{size:17,strokeWidth:1.7,"aria-hidden":!0}),f.jsx("span",{className:"side-text",children:Y})]})]},z)})]}),f.jsx("div",{className:"flex-auto"}),f.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[f.jsxs("button",{type:"button",className:"side-fold","aria-expanded":F,onClick:()=>M(z=>!z),children:["Analyses on this page",f.jsx("span",{className:"side-count",children:H.length}),f.jsx(M1,{size:14,"aria-hidden":!0,"data-open":F})]}),F&&H.length===0&&f.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),F&&H.map(z=>{const Y=Ft(z),te=z.state==="failed",k=z.modules.filter(ne=>ne.status==="failed");return f.jsxs("button",{type:"button",className:`tb-src${te?" fail":""}`,"aria-pressed":r===Y,title:te?k.map(ne=>`${ne.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(r===Y?null:Y),children:[te?f.jsx(A1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"truncate",children:[z.app," ",z.version??""]}),te&&f.jsx("span",{className:"sr-only",children:", failed"}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Y)}),F&&D.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>C(z=>!z),children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",D.length," more for ",i||"this sample"]}),w&&D.map(z=>f.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"truncate",children:z.role==="cohort"?`${z.app}${z.project?`, project ${z.project}`:""}`:`${z.app} ${z.version??""}`}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Ft(z)))]}),F&&f.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]})]})}function es({envelope:n}){const s=n.status==="error",i=s?iC:oC;return f.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[f.jsx(i,{size:18,"aria-hidden":!0,style:{color:s?"var(--warn-ink)":"var(--chev)",flex:"none"}}),f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:s?"This panel could not be read":"Nothing to show here"}),n.warnings.map(r=>f.jsx("span",{children:r},r))]})]})}const Lh={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". A gain or amplification rises as a column from the baseline to its stroke, and a loss falls to it, so the changes read as a landscape. Alternating grey bands mark the chromosomes, named in a strip along the bottom.',`The line across the plot is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["A label along the top names each gene with likely driver mutations, one per gene, joined by a line to a dot on the segment the gene sits on, so its copy number can be read off at once. Hover one for its protein changes and the copies there."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio. A readout at the foot of the plot gives the pointer's place on the genome."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Arrow keys, plus and minus, 0","With the plot focused: pan, zoom in and out, and show the whole genome."],["Double-click a chromosome, or click its name","Glides to fill the view with it; the strip then counts megabases."],["The overview","The whole genome in miniature under the strip. Its window shows where the plot is: drag the window to move, its ends to resize, or click elsewhere to centre it there. The button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations sit on it as labelled dots, and the diamond on the axis is the median. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range: the curve stays lit inside the range and fades outside it, and the range is read out at its foot. Drag the edges to resize it, or its body to move it. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group, grouped under its class; lighter bars are the clustered ones, in the shaded zone. A group with none shows a short stub on the baseline. Hover a bar for its name and its share of all rearrangements, or a class in the key to light its bars.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. A ribbon joins each signature's two bands, widening or narrowing with its share, so a signature can be followed from the tumour to its cohort; a label on the ribbon says how many percentage points the tumour leads or trails the cohort by, where the difference is at least 5. Hover a band, a ribbon or a row of the table for the numbers.","Seven signatures get colours of their own (eight when there are no more than eight); any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one column."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). Each row is one feature: the pin is this tumour, the dots beneath are the cohort's samples, the shaded band is the middle half of the cohort and the line in it the median. With eight or more cohort samples a smoothed outline of how the samples are spread is drawn above the dots; with fewer it is left out, because it would suggest more than the data says. The words at the right say how many of the other cohort samples the tumour is above. Hover a row for the unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},xj={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function Sj(n,s){const i=s.role==="cohort"||s.app.endsWith("Project Application"),r=s.app.replace(/ Project Application$/,""),u=xj[n];return(i?u[`${r} cohort`]:u[r])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function bj({topic:n,lineage:s,subject:i,onClose:r}){const u=Lh[n],d=E.useId(),h=E.useRef(null),m=s.filter(T=>T.role!=="cohort"&&!T.app.endsWith("Project Application")),p=s.filter(T=>!m.includes(T)),y=E.useRef(r);y.current=r,E.useEffect(()=>{var Y;const T=document.activeElement;(Y=h.current)==null||Y.focus();const H=document.documentElement,D=H.style.overflow;H.style.overflow="hidden";const z=te=>{te.key==="Escape"&&y.current()};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z),H.style.overflow=D,T==null||T.focus()}},[]);const x=[...u.sections.map(T=>T.heading),"Sources"],v=x.map((T,H)=>`${d}-s${H}`),[b,w]=E.useState(0),C=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),R=E.useRef(0);E.useEffect(()=>{const T=C.current;if(!T)return;const H=24,D=()=>{const te=T.getBoundingClientRect().top,k=Math.max(0,T.scrollHeight-T.clientHeight),ne=v.map(ee=>{const P=document.getElementById(ee);return P?P.getBoundingClientRect().top-te:1/0}),ie=Math.max(0,...ne.map(ee=>Number.isFinite(ee)?ee+T.scrollTop-k-H:0)),Ce=H+(k>0?ie*Math.min(1,T.scrollTop/k):0);let X=0;ne.forEach((ee,P)=>{ee<=Ce&&(X=P)}),w(X)},z=()=>{if(N.current){M.current===null?(window.clearTimeout(R.current),R.current=window.setTimeout(()=>M.current=T.scrollTop,160)):Math.abs(T.scrollTop-M.current)>4&&(N.current=!1,M.current=null,D());return}D()},Y=()=>{N.current&&M.current===null&&(window.clearTimeout(R.current),N.current=!1,D())};return D(),T.addEventListener("scroll",z,{passive:!0}),T.addEventListener("wheel",Y,{passive:!0}),T.addEventListener("touchstart",Y,{passive:!0}),()=>{window.clearTimeout(R.current),T.removeEventListener("scroll",z),T.removeEventListener("wheel",Y),T.removeEventListener("touchstart",Y)}},[]);const j=T=>{var D;const H=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(T),window.clearTimeout(R.current),R.current=window.setTimeout(()=>{var z;return M.current=((z=C.current)==null?void 0:z.scrollTop)??0},160),(D=document.getElementById(v[T]))==null||D.scrollIntoView({behavior:H?"auto":"smooth",block:"start"})},F=T=>f.jsxs("li",{className:"info-source",children:[f.jsx("span",{className:`tb-dot ${Ei(T.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"info-source-text",children:[T.pk?f.jsxs("a",{className:"info-source-name info-source-link",href:j1(T.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),f.jsxs("span",{className:"mono info-source-pk",children:["#",T.pk]}),f.jsx(lC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):f.jsxs("span",{className:"info-source-name",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),T.project?f.jsxs("span",{className:"info-source-pk",children:["project ",T.project]}):null]}),f.jsx("span",{className:"info-source-role",children:Sj(n,T)})]})]},Ft(T));return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:T=>T.target===T.currentTarget&&r(),children:f.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[f.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:r,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[f.jsx("span",{className:"info-kicker",children:i??"About"}),f.jsx("h2",{id:d,children:u.title}),f.jsx("ol",{children:x.map((T,H)=>f.jsx("li",{children:f.jsx("button",{type:"button","aria-current":H===b?"true":void 0,onClick:()=>j(H),children:T})},T))})]}),f.jsxs("div",{ref:C,className:"info-main",children:[f.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((T,H)=>{var D;return f.jsxs("section",{id:v[H],className:"info-section",children:[f.jsx("h3",{children:T.heading}),(D=T.paragraphs)==null?void 0:D.map(z=>f.jsx("p",{children:z},z)),T.terms&&f.jsx("dl",{children:T.terms.map(([z,Y])=>f.jsxs("div",{children:[f.jsx("dt",{children:z}),f.jsx("dd",{children:Y})]},z))})]},T.heading)}),f.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[f.jsx("h3",{children:"Sources"}),f.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),s.length===0&&f.jsx("p",{children:"No analyses recorded for this card."}),f.jsx("ul",{className:"info-sources",children:m.map(F)}),p.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h4",{children:"Cohort runs"}),f.jsx("ul",{className:"info-sources",children:p.map(F)})]})]})]})]})}),document.body)}function hy(n){return n.split(" ").map(s=>/^[A-Z0-9]{2,}$/.test(s)?s:s.toLowerCase()).join(" ")}function X1({topic:n,lineage:s,subject:i}){const[r,u]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${hy(Lh[n].title)}`,title:`About ${hy(Lh[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:f.jsx(cC,{size:15,"aria-hidden":!0})}),r&&f.jsx(bj,{topic:n,lineage:s,subject:i,onClose:()=>u(!1)})]})}function wj({lineage:n,children:s}){const[i,r]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return f.jsxs("div",{className:"sc-cf",children:[s,s&&f.jsx("span",{className:"flex-auto"}),n.length>0&&f.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?f.jsxs("a",{className:"sc-src sc-src-link",href:j1(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Ft(h)):f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Ft(h))),d.length>0&&f.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>r(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Ft(h)))]})}function K1(...n){const s=new Map;for(const i of n.flat())i&&!s.has(Ft(i))&&s.set(Ft(i),i);return[...s.values()]}const Ku=E.forwardRef(function({title:s,subtitle:i,controls:r,lineage:u,picked:d,footer:h,className:m="",info:p,expandable:y,children:x},v){const b=!!d&&u.some(N=>Ft(N)===d),[w,C]=Cj();return f.jsxs(f.Fragment,{children:[w&&f.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>C(!1)}),f.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":b,"data-full":w||void 0,"aria-label":s,children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:s}),i&&f.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(r||p||y)&&f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,y&&f.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${s.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>C(!w),children:w?f.jsx(gC,{size:16,"aria-hidden":!0}):f.jsx(hC,{size:16,"aria-hidden":!0})}),p&&f.jsx(X1,{topic:p,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),f.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&f.jsx(wj,{lineage:u,children:h})]})]})});function Cj(){const[n,s]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,r=i.style.overflow;i.style.overflow="hidden";const u=d=>{var h,m;d.key==="Escape"&&((m=(h=d.target)==null?void 0:h.closest)!=null&&m.call(h,"input, textarea, select")||document.querySelector(".info-backdrop")||s(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=r}},[n]),[n,s]}function Zr({label:n,envelope:s,loading:i,skeletonHeight:r=160,children:u}){return f.jsxs(f.Fragment,{children:[i&&!s&&f.jsx("div",{className:"px-5 py-3",children:f.jsx("div",{className:"skeleton",style:{height:r},"aria-label":`Loading ${n}`})}),s&&s.status!=="ok"&&f.jsx("div",{className:"px-5 py-4",children:f.jsx(es,{envelope:s})}),(s==null?void 0:s.status)==="ok"&&s.data!==null&&u(s.data),(s==null?void 0:s.status)==="ok"&&s.warnings.length>0&&f.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")})]})}function jj({title:n,subtitle:s,controls:i,envelope:r,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:p="",info:y,children:x}){return f.jsx(Ku,{title:n,subtitle:s,controls:i,lineage:(r==null?void 0:r.lineage)??[],picked:d,footer:m,className:p,info:y,children:f.jsx(Zr,{label:n,envelope:r,loading:u,skeletonHeight:h,children:x})})}function Ej(n,s){const[i,r]=E.useState(null),[u,d]=E.useState(!1);return E.useLayoutEffect(()=>{const h=n.current;if(!h)return;const m=()=>{const y=h.querySelector('[aria-pressed="true"]');r(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(m);p.observe(h);for(const y of Array.from(h.children))p.observe(y);return()=>p.disconnect()},[n,s]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Zu({label:n,options:s,value:i,onChange:r,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=Ej(d,i);return f.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&f.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:h.width,height:h.height,transform:`translate(${h.x}px, ${h.y}px)`}}),s.map(p=>f.jsx("button",{type:"button",className:"sc-seg","aria-pressed":p.value===i,disabled:p.disabled,title:p.title,onClick:()=>r(p.value),children:p.label},p.value))]})}function Nj(n){var i;const s=[];return n.mode==="unmatched"&&s.push("Tumour only"),n.individual.germline_consent&&s.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&s.push("DMP linked"),s}function _j({data:n,onVersion:s}){const i=n.report,[r,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!r)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},p=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p)}},[r]);const h=Nj(n);return f.jsxs("div",{ref:d,className:"report-menu",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":r,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,f.jsx(M1,{size:14,"aria-hidden":!0})]}),r&&f.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),f.jsx(Zu,{label:"Report version",value:i.version,onChange:m=>{s(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",i.analysis?`run #${i.analysis}`:"run indexed by hand",i.built?`, built ${O1(i.built)}`:""]}),h.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>f.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const Uh=["purity","ploidy","coverage","tmb","msi","fga"];function Mj({value:n}){const i=2*Math.PI*13,r=Math.min(Math.max(n,0),1);return f.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${r*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function my({value:n,min:s,max:i,ticks:r,reference:u}){const d=h=>4+(Math.min(Math.max(h,s),i)-s)/(i-s)*64;return f.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[f.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),r.map(h=>f.jsx("line",{x1:d(h),x2:d(h),y1:h===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:h===u?1.5:1},h)),f.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function Rj({metric:n}){const s=n.value;if(s===null)return null;switch(n.key){case"purity":case"fga":return f.jsx(Mj,{value:s});case"ploidy":return f.jsx(my,{value:s,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return f.jsx(my,{value:Math.log10(Math.max(s,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const Tj={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function Aj({metric:n,picked:s}){const i=n.value===null&&!n.text,r=!!s&&n.sources.some(u=>Ft(u)===s);return f.jsxs("div",{className:"kpi","data-picked":r,title:Tj[n.key],children:[f.jsxs("span",{className:"kpi-top",children:[f.jsx("span",{className:"kpi-label",children:n.label}),f.jsx(Rj,{metric:n})]}),f.jsx("span",{className:"kpi-value","data-empty":i,children:i?EC(n):jC(n)}),n.sources.length>0?f.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>f.jsxs("span",{className:"kpi-src",children:[f.jsx("span",{className:`tb-dot ${Ei(u.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"min-w-0",children:B1(u)})]},Ft(u)))}):f.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function Oj({sampleLabel:n,fingerprint:s,metrics:i,picked:r,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>Uh.includes(m.key));return f.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[f.jsx("span",{className:"absolute top-3 right-3",children:f.jsx(X1,{topic:"summary",lineage:u,subject:n})}),f.jsx(am,{fingerprint:s,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[f.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),f.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:s?z1(s):"No copy-number data for this sample."}),f.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),f.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),f.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&Uh.map(m=>f.jsx("div",{className:"kpi","aria-hidden":!0,children:f.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&f.jsx("div",{className:"col-span-full",children:f.jsx(es,{envelope:i})}),d.map(m=>f.jsx(Aj,{metric:m,picked:r},m.key))]})]})}function zj({sampleLabel:n,failures:s,analyses:i}){return s.length===0?null:f.jsx("div",{className:"flex flex-col gap-2.5",children:s.map(r=>{const u=i.filter(d=>d.modules.some(h=>h.etl===r.etl&&h.status==="failed"));return f.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[f.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:f.jsx(A1,{size:18,"aria-hidden":!0})}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[f.jsxs("span",{className:"text-[14.5px] font-semibold",children:[r.label," failed for ",n]}),f.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:r.message.split(`
267
+ `)[0]}),u.length>0&&f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(B1).join(", ")]})]})]},`${r.etl}-${r.node}`)})})}function Dj({onSignedIn:n}){const[s,i]=E.useState("password"),[r,u]=E.useState(""),[d,h]=E.useState(""),[m,p]=E.useState(""),[y,x]=E.useState(null),[v,b]=E.useState(!1),w=s==="password"?!!r&&!!d:!!m.trim();return f.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async C=>{C.preventDefault(),b(!0),x(null);try{s==="password"?await QC(r,d):await qC(m.trim()),n()}catch(N){x(N.message)}finally{b(!1)}},children:[f.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),s==="password"?f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",f.jsx("span",{className:"field",children:f.jsx("input",{id:"username",autoComplete:"username",value:r,onChange:C=>u(C.target.value)})})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",f.jsx("span",{className:"field",children:f.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:C=>h(C.target.value)})})]})]}):f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",f.jsx("span",{className:"field",children:f.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:C=>p(C.target.value)})}),f.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),y&&f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),f.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{i(s==="password"?"token":"password"),x(null)},children:s==="password"?"Use an API token instead":"Use a username and password instead"})]})}const it=1e3,Vh=.35,Hj=8,Uu=.1;function Au(n,s){return(Hu(n,s)??0)*it}function ol(n){const[s,i]=Yu[n.replace(/^chr/,"")];return[s*it,i*it]}function qd(n,s,i){const[r,u]=n,d=Math.min(it,Math.max(Vh,(u-r)*i)),h=Math.min(Math.max(s-(s-r)/(u-r)*d,0),it-d);return[h,h+d]}function Nu(n,s){const i=n[1]-n[0],r=Math.min(Math.max(n[0]+s,0),it-i);return[r,r+i]}function Lj(n,s,i){const r=Math.min(Math.max(i,0),it);return s===0?[Math.min(r,n[1]-Vh),n[1]]:[n[0],Math.max(r,n[0]+Vh)]}function Uj(n,s,i){const r=(n[0]+n[1])/2+((s[0]+s[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],s[1]-s[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(r-h/2,0),it-h);return[m,m+h]}function gy(n){return n[1]-n[0]<it-.5}function Vj(n){for(const[s]of On){const[i,r]=ol(s);if(n>=i&&n<=r)return s}return null}function $j(n,s){const i=n.segments.flatMap(u=>s==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),r=Math.max(...i.map(u=>u??0));return Math.min(Hj,Math.max(n.baseline+2,Math.ceil(r)))}function Fj(n){const s=10**Math.floor(Math.log10(n)),i=n/s;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*s}function Bj(n,s,i=5){const r=On.filter(([b])=>{const[w,C]=ol(b);return C>n&&w<s});if(r.length!==1)return r.map(([b])=>{const[w,C]=ol(b);return{value:(w+C)/2,label:b}});const[u,d]=r[0],[h,m]=ol(u),p=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(s,m)-h)/(m-h)*d,x=Fj(Math.max(y-p,1)/i),v=[];for(let b=Math.ceil(p/x)*x;b<=y;b+=x)v.push({value:h+b/d*(m-h),label:Or(b,x)});return v}function kj(n,s){if(n<=.5&&s>=it-.5)return null;const i=Dh(n/it,"start"),r=Dh(s/it,"end");if(i.chrom===r.chrom){const u=(r.pos-i.pos)/10;return`chr${i.chrom}: ${Or(i.pos,u).replace(" Mb","")}–${Or(r.pos,u)}`}return`chr${i.chrom}:${Or(i.pos,1e6)} – chr${r.chrom}:${Or(r.pos,1e6)}`}function Gj(n){const{chrom:s,pos:i}=Dh(Math.min(Math.max(n,0),it)/it,"start");return`chr${s} · ${(i/1e6).toFixed(1)} Mb`}const Pu=n=>n.call??"neutral",qj={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},Z1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function Qj(n){return{call:qj[Pu(n)],copies:n.total_cn===null?"? copies":`${n.total_cn} ${n.total_cn===1?"copy":"copies"}`,alleles:n.major_cn!==null&&n.minor_cn!==null?`${n.major_cn} + ${n.minor_cn}`:"",span:`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,log2:n.log2!==null?n.log2.toFixed(2):""}}function Yj(n){const s=new Map;for(const i of n){const r=i.gene??"?",u=s.get(r)??{gene:r,x:Au(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),s.set(r,u)}return[...s.values()].map(({list:i,...r})=>({...r,changes:i.join(", ")})).sort((i,r)=>i.x-r.x)}function Qd(n,s,i){const r=s.replace(/^chr/,"");return n.segments.find(u=>u.chrom===r&&u.start<=i&&i<=u.end)}function Yd(n,s){return n?s==="total"?n.total_cn:n.major_cn:null}function Ij(n){const s=n.length;if(s===0)return"";const i=m=>m.toFixed(2);if(s===1)return`M${i(n[0][0])},${i(n[0][1])}`;const r=n.slice(1).map((m,p)=>m[0]-n[p][0]),u=n.slice(1).map((m,p)=>r[p]===0?0:(m[1]-n[p][1])/r[p]),d=n.map((m,p)=>p===0?u[0]:p===s-1?u[s-2]:u[p-1]*u[p]<=0?0:(u[p-1]+u[p])/2);for(let m=0;m<s-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const p=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(p,y);x>3&&(d[m]=3*p*u[m]/x,d[m+1]=3*y*u[m]/x)}let h=`M${i(n[0][0])},${i(n[0][1])}`;for(let m=0;m<s-1;m++){const[p,y]=n[m],[x,v]=n[m+1];h+=` C${i(p+r[m]/3)},${i(y+d[m]*r[m]/3)} ${i(x-r[m]/3)},${i(v-d[m+1]*r[m]/3)} ${i(x)},${i(v)}`}return h}function $h(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u].left-n[d].left).forEach(u=>{let d=i.findIndex(h=>h+s<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,r[u]=d}),r}function Xj(n,s=4){const i=Math.max(n,1)/s,r=10**Math.floor(Math.log10(i)),u=i/r,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*r),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const Kj=n=>1-(1-n)**3;function Sa(n,s,i=500){return n.length*s*(i>=600?.6:.56)}function Ni({x:n,y:s,width:i,above:r=!1,children:u}){const d=n>i-320,h=r?Math.min(Math.max(n,110),i-110):n,m=r?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return f.jsx("div",{className:"ctip",style:{left:h,top:s,transform:m},role:"presentation",children:u})}function Fh(n,s,i){const r=n.clientX;let u=!1;const d=m=>{const p=m.clientX-r;Math.abs(p)>3&&(u=!0),s(p,m)},h=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),i==null||i(u)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h)}function Pr(n=640){const s=E.useRef(null),[i,r]=E.useState(n);return E.useLayoutEffect(()=>{const u=s.current;if(!u)return;const d=()=>r(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[s,i]}const py=36,Zj=14,zr=232,vy=22,oi=28,yy=19,Pj=480,Jj=E.memo(function({segments:s,spans:i,mode:r,shown:u,geo:d,hover:h,grad:m,onHover:p,onClick:y}){const x=u[1]-u[0],v=C=>d.plotL+(C-u[0])/x*d.plotW,b=C=>d.plotTop+(1-Math.min(Math.max(C,0),d.top)/d.top)*zr,w=b(d.baseline);return f.jsx("g",{children:s.map((C,N)=>{const[M,R]=i[N];if(R<u[0]-1||M>u[1]+1)return null;const j=Pu(C),F=v(M),T=Math.max(v(R)-F,j==="neutral"?2:7),H=h===N;if(r==="total"){if(C.total_cn===null)return null;const Y=b(C.total_cn);return f.jsxs("g",{className:"cn-seg","data-call":j,"data-on":H||void 0,children:[j!=="neutral"&&f.jsx("rect",{x:F,y:Math.min(Y,w),width:T,height:Math.abs(Y-w),fill:`url(#${m[j]})`,className:"cn-col"}),f.jsx("line",{x1:F,x2:F+T,y1:Y,y2:Y,style:{stroke:Z1[j]},className:"cn-line"}),f.jsx("rect",{x:F-2,y:Math.min(Y,w)-9,width:T+4,height:Math.abs(Y-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:Y}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)}if(C.major_cn===null||C.minor_cn===null)return null;const D=b(C.major_cn+Uu),z=b(C.minor_cn-Uu);return f.jsxs("g",{className:"cn-seg","data-on":H||void 0,children:[f.jsx("line",{x1:F,x2:F+T,y1:z,y2:z,className:"cn-line cn-minor"}),f.jsx("line",{x1:F,x2:F+T,y1:D,y2:D,className:"cn-line cn-major"}),f.jsx("rect",{x:F-2,y:Math.min(D,z)-9,width:T+4,height:Math.abs(D-z)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:D}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)})})}),Wj=E.memo(function({segments:s,spans:i,mode:r,top:u,baseline:d,plotL:h,plotW:m,y0:p}){const y=x=>p+3+(1-Math.min(x,u)/u)*(oi-6);return f.jsxs("g",{pointerEvents:"none",children:[On.map(([x],v)=>{const[b,w]=ol(x);return v%2===0?f.jsx("rect",{x:h+b/it*m,y:p,width:(w-b)/it*m,height:oi,className:"cn-mini-band"},x):null}),f.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),s.map((x,v)=>{const b=r==="total"?x.total_cn:x.major_cn;if(b===null)return null;const w=Pu(x),C=h+i[v][0]/it*m,N=Math.max((i[v][1]-i[v][0])/it*m,w==="neutral"?1:2);return f.jsx("line",{x1:C,x2:C+N,y1:y(b),y2:y(b),className:"cn-mini-line",style:{stroke:r==="total"?Z1[w]:"var(--ink-2)"}},v)})]})});function eE({data:n,mode:s,drivers:i,focus:r,locate:u,view:d,onView:h,onSegment:m,onGene:p}){const[y,x]=Pr(900),v=E.useRef(null),b=E.useId(),w={gain:`${b}-gain`,amp:`${b}-amp`,loss:`${b}-loss`},[C,N]=E.useState(d.window),M=E.useRef(C);M.current=C,E.useLayoutEffect(()=>{const Z=d.window,le=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||le){N(Z);return}const Me=M.current,Ve=performance.now();let Fe=0;const Ct=st=>{const et=Math.min(1,(st-Ve)/Pj);N(Uj(Me,Z,Kj(et))),et<1&&(Fe=requestAnimationFrame(Ct))};return Fe=requestAnimationFrame(Ct),()=>cancelAnimationFrame(Fe)},[d]);const[R,j]=E.useState(null),[F,T]=E.useState(null),[H,D]=E.useState(null),[z,Y]=E.useState(!1),te=E.useRef(!1),k=E.useMemo(()=>$j(n,s),[n,s]),ne=E.useMemo(()=>n.segments.some(Z=>Math.max(Z.total_cn??0,Z.major_cn??0)>k),[n,k]),ie=E.useMemo(()=>n.segments.map(Z=>[Au(Z.chrom,Z.start),Au(Z.chrom,Z.end)]),[n]),Ce=E.useMemo(()=>Yj(i),[i]),X=py,ee=Math.max(x-py-Zj,200),P=C[1]-C[0],J=Z=>X+(Z-C[0])/P*ee,ue=Z=>C[0]+(Z-X)/ee*P,Ee=Z=>Sa(Z,11.5,600)+14,je=E.useMemo(()=>{const Z=Ce.map(le=>({left:X+le.x/it*ee-Ee(le.gene)/2,width:Ee(le.gene)}));return Ce.length?Math.max(...$h(Z,4))+1:0},[Ce,X,ee]),Ie=(je?je*yy+8:4)+4,We=Ie+zr,A=We+10,V=A+vy+12,W=V+oi+6,se={plotL:X,plotW:ee,plotTop:Ie,top:k,baseline:n.baseline},he=Z=>Ie+(1-Math.min(Math.max(Z,0),k)/k)*zr,ye=Ce.map((Z,le)=>({m:Z,index:le,x:J(Z.x)})).filter(({x:Z})=>Z>=X-4&&Z<=X+ee+4),be=$h(ye.map(({m:Z,x:le})=>({left:le-Ee(Z.gene)/2,width:Ee(Z.gene)})),4),re=(Z,le)=>Z>=X&&Z<=X+ee&&le>=Ie&&le<=We,me=Z=>{const le=v.current.getBoundingClientRect();return[Z.clientX-le.left,Z.clientY-le.top]},rt=E.useCallback(Z=>h({window:Z,smooth:!1}),[h]),Bt=E.useCallback(Z=>h({window:Z,smooth:!0}),[h]),zn=E.useRef({shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt});zn.current={shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt},E.useEffect(()=>{const Z=y.current;if(!Z)return;const le=Me=>{if(!Me.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),Fe=Me.clientX-Ve.left,Ct=Me.clientY-Ve.top,st=zn.current;if(Fe<st.plotL||Fe>st.plotL+st.plotW||Ct<st.plotTop||Ct>st.plotBottom)return;Me.preventDefault();const et=st.shown[0]+(Fe-st.plotL)/st.plotW*(st.shown[1]-st.shown[0]),Yn=Math.max(-50,Math.min(50,Me.deltaY));st.move(qd(st.shown,et,Math.exp(Yn*.01)))};return Z.addEventListener("wheel",le,{passive:!1}),()=>Z.removeEventListener("wheel",le)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&Bt(ol(u.chrom))},[u,Bt]);const Nt=Z=>{if(Z.button!==0)return;const[le,Me]=me(Z);if(!re(le,Me)||!gy(C))return;Z.preventDefault();const Ve=C;Y(!0),Fh(Z,Fe=>rt(Nu(Ve,-(Fe/ee)*(Ve[1]-Ve[0]))),Fe=>{Y(!1),Fe&&(te.current=!0,setTimeout(()=>te.current=!1,0))})},ot=Z=>{const[le,Me]=me(Z);D(re(le,Me)?le:null)},Ge=Z=>{const[le,Me]=me(Z);if(!re(le,Me))return;const Ve=Vj(ue(le));Ve&&Bt(ol(Ve))},pt=Z=>{const le=(C[0]+C[1])/2;if(Z.key==="ArrowLeft"||Z.key==="ArrowRight")Z.preventDefault(),rt(Nu(C,(Z.key==="ArrowLeft"?-.15:.15)*P));else if(Z.key==="+"||Z.key==="=")Bt(qd(C,le,.6));else if(Z.key==="-")Bt(qd(C,le,1/.6));else if(Z.key==="0"||Z.key==="Home")Bt([0,it]);else return;Z.key!=="ArrowLeft"&&Z.key!=="ArrowRight"&&Z.preventDefault()},cl=E.useCallback(Z=>{te.current||m(Z)},[m]),At=On.map(([Z],le)=>{const[Me,Ve]=ol(Z);return{chrom:Z,i:le,x0:J(Me),x1:J(Ve)}}).filter(({x0:Z,x1:le})=>le>X&&Z<X+ee),nn=At.length===1?At[0]:null,qn=nn?Bj(C[0],C[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!r)return null;const Z=Au(r.chrom,r.pos);if(Z<C[0]||Z>C[1])return null;const le=Qd(n,r.chrom,r.pos),Me=Yd(le,s),Ve=s==="allele"&&Me!==null?Uu:0;return{x:J(Z),y:he((Me??n.baseline)+Ve),copies:(le==null?void 0:le.total_cn)??null}})(),fl=R?n.segments[R.index]:null,It=fl?Qj(fl):null,kt=F!==null?Ce[F]:null,zl=Z=>X+Z/it*ee,Gt={x0:zl(C[0]),x1:zl(C[1])},Qn=gy(C),ln=(Z,le)=>{Z.stopPropagation(),Z.preventDefault();const Me=C;Y(!0),Fh(Z,Ve=>{const Fe=Ve/ee*it;rt(le==="move"?Nu(Me,Fe):Lj(Me,le,Me[le]+Fe))},()=>Y(!1))};return f.jsxs("div",{ref:y,className:"cn","data-dragging":z||void 0,"data-zoomed":Qn||void 0,tabIndex:0,role:"group","aria-label":`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,"aria-keyshortcuts":"ArrowLeft ArrowRight + - 0",onKeyDown:pt,children:[f.jsxs("svg",{ref:v,width:x,height:W,"aria-hidden":!0,onPointerDown:Nt,onPointerMove:ot,onPointerLeave:()=>D(null),onDoubleClick:Ge,children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),f.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),f.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),f.jsx("clipPath",{id:`${b}-plot`,children:f.jsx("rect",{x:X-4,y:Ie-2,width:ee+8,height:zr+4})})]}),f.jsx("g",{clipPath:`url(#${b}-plot)`,children:On.map(([Z],le)=>{const[Me,Ve]=ol(Z),Fe=J(Me),Ct=J(Ve);return le%2===0&&Ct>X&&Fe<X+ee?f.jsx("rect",{x:Fe,y:Ie,width:Ct-Fe,height:zr,className:"cn-band"},Z):null})}),Array.from({length:k+1},(Z,le)=>f.jsxs("g",{children:[f.jsx("line",{x1:X,x2:X+ee,y1:he(le),y2:he(le),className:"cn-grid"}),f.jsx("text",{x:X-10,y:he(le)+4,textAnchor:"end",className:"cn-tick",children:le===k&&ne?`${le}+`:le})]},le)),f.jsx("line",{x1:X,x2:X+ee,y1:he(n.baseline),y2:he(n.baseline),className:"cn-baseline"}),f.jsxs("text",{x:X+8,y:he(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),f.jsx("g",{className:"cn-reveal",children:f.jsx("g",{clipPath:`url(#${b}-plot)`,children:f.jsx(Jj,{segments:n.segments,spans:ie,mode:s,shown:C,geo:se,hover:R?R.index:null,grad:w,onHover:j,onClick:cl})})}),H!==null&&!z&&!R&&F===null&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:H,x2:H,y1:Ie,y2:We,className:"cn-guide"}),f.jsxs("g",{transform:`translate(${Math.min(Math.max(H,X+52),X+ee-52)} ${We-24})`,children:[f.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),f.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:Gj(ue(H))})]})]}),ye.map(({m:Z,x:le,index:Me},Ve)=>{const Fe=Qd(n,Z.chrom,Z.pos),Ct=Yd(Fe,s),st=he((Ct??n.baseline)+(s==="allele"&&Ct!==null?Uu:0)),et=Ee(Z.gene),Yn=4+be[Ve]*yy,Dl=F===Me;return f.jsxs("g",{className:"cn-driver","data-on":Dl||void 0,onPointerDown:ja=>ja.stopPropagation(),onMouseEnter:()=>T(Me),onMouseLeave:()=>T(null),onClick:()=>p(Z.gene),children:[f.jsx("line",{x1:le,x2:le,y1:Yn+16,y2:st,className:"cn-leader"}),f.jsx("rect",{x:le-et/2,y:Yn,width:et,height:16,rx:8,className:"cn-chip"}),f.jsx("text",{x:le,y:Yn+11.5,textAnchor:"middle",className:"cn-gene",children:Z.gene}),f.jsx("circle",{cx:le,cy:st,r:Dl?6.5:5,className:"cn-dot"})]},Z.gene)}),ut&&r&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ut.x,x2:ut.x,y1:Ie,y2:We,className:"cn-focus-line"}),f.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const Z=`${r.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,le=Sa(Z,11.5,600)+14,Me=ut.x+12+le>X+ee;return f.jsxs("g",{transform:`translate(${Me?ut.x-12-le:ut.x+12} ${ut.y-12})`,children:[f.jsx("rect",{width:le,height:22,rx:7,className:"cn-focus-chip"}),f.jsx("text",{x:7,y:15,className:"cn-focus-text",children:Z})]})})()]}),f.jsxs("g",{className:"cn-strip",children:[At.map(({chrom:Z,i:le,x0:Me,x1:Ve})=>{const Fe=Math.max(Me,X),Ct=Math.min(Ve,X+ee),st=Ct-Fe,et=nn?`chr${Z}`:Z;return f.jsxs("g",{className:"cn-pill",onClick:()=>Bt(ol(Z)),role:"presentation",children:[f.jsx("title",{children:`Zoom to chromosome ${Z}`}),f.jsx("rect",{x:Fe+.5,y:A,width:Math.max(st-1,1),height:vy,rx:7,"data-odd":le%2?"":void 0}),st>=Sa(et,11,600)+3&&f.jsx("text",{x:nn?Fe+10:(Fe+Ct)/2,y:A+15,textAnchor:nn?"start":"middle",children:et})]},Z)}),nn&&qn.map(Z=>{const le=J(Z.value);return le>Math.max(nn.x0,X)+70&&le<X+ee-20?f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:le,x2:le,y1:A+3,y2:A+9,className:"cn-mb-tick"}),f.jsx("text",{x:le,y:A+18,textAnchor:"middle",className:"cn-mb",children:Z.label})]},Z.value):null})]}),f.jsx(Wj,{segments:n.segments,spans:ie,mode:s,top:k,baseline:n.baseline,plotL:X,plotW:ee,y0:V}),f.jsx("rect",{x:X,y:V,width:ee,height:oi,fill:"transparent",className:"cn-mini-track",onPointerDown:Z=>{const[le]=me(Z),Me=C[1]-C[0],Ve=(le-X)/ee*it;Bt(Nu([Ve-Me/2,Ve+Me/2],0))}}),Qn&&f.jsxs("g",{className:"cn-mini-window",children:[f.jsx("rect",{x:Gt.x0,y:V-1,width:Math.max(Gt.x1-Gt.x0,4),height:oi+2,rx:6,onPointerDown:Z=>ln(Z,"move"),className:"cn-mini-win"}),[0,1].map(Z=>f.jsx("rect",{x:(Z===0?Gt.x0:Gt.x1)-4,y:V+oi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:le=>ln(le,Z)},Z))]})]}),It&&R&&f.jsxs(Ni,{x:R.x+0,y:R.y+0,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"cn-call-dot","data-call":Pu(fl),"aria-hidden":!0}),It.call,f.jsx("span",{className:"ctip-sub",children:It.copies})]}),It.alleles&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Alleles"}),f.jsx("b",{children:It.alleles})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Region"}),f.jsx("b",{className:"mono",children:It.span})]}),It.log2&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"log2 ratio"}),f.jsx("b",{children:It.log2})]}),f.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),kt&&F!==null&&f.jsxs(Ni,{x:J(kt.x),y:Ie+10,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:kt.gene}),kt.changes&&f.jsx("span",{className:"ctip-sub",children:kt.changes})]}),(()=>{const Z=Yd(Qd(n,kt.chrom,kt.pos),s);return Z!==null?f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Copy number here"}),f.jsx("b",{children:Z})]}):null})(),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function Cr({color:n,label:s}){return f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),s]})}function tE({envelope:n,loading:s,picked:i,sampleLabel:r,drivers:u,focus:d,locate:h,onSegment:m,onGene:p}){var M;const[y,x]=E.useState("total"),[v,b]=E.useState({window:[0,it],smooth:!1}),w=((M=n==null?void 0:n.data)==null?void 0:M.allele_specific)??!1,C=kj(...v.window),N=E.useCallback(()=>b({window:[0,it],smooth:!0}),[]);return f.jsx(jj,{title:"Copy number",subtitle:`Copy number across the genome, ${r}`,info:"copyNumber",envelope:n,loading:s,picked:i,skeletonHeight:250,controls:f.jsxs(f.Fragment,{children:[C&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:C}),f.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:N,children:f.jsx(CC,{size:15,"aria-hidden":!0})})]}),f.jsx(Zu,{label:"Copy number view",value:w?y:"total",onChange:x,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!w}]})]}),footer:f.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[y==="total"||!w?f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--gain)",label:"Gain"}),f.jsx(Cr,{color:"var(--gain-strong)",label:"Amplification"}),f.jsx(Cr,{color:"var(--loss)",label:"Loss"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--ink-2)",label:"Major allele"}),f.jsx(Cr,{color:"var(--chev)",label:"Minor allele"})]}),f.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan, or move the window in the overview. Double-click a chromosome, or click its name, to fill the view."})]}),children:R=>f.jsx(eE,{data:R,mode:w?y:"total",drivers:u,focus:d,locate:h,view:v,onView:b,onSegment:m,onGene:p})})}function nE(n){const[s,i]=n.range;return[[s,0],...n.bins.map(r=>[(r.x0+r.x1)/2,r.n]),[i,0]]}function Id(n,s){for(let i=1;i<n.length;i++){const[r,u]=n[i-1],[d,h]=n[i];if(s<=d)return d===r?h:u+(s-r)/(d-r)*(h-u)}return n[n.length-1][1]}function lE(n){return n==="ccf"?"CCF":"VAF"}function Ml(n,s){return Math.min(Math.max(s,n.range[0]),n.range[1])}function aE(n){const s=n.measure==="ccf"?.25:.1,i=[];for(let r=n.range[0];r<=n.range[1]+1e-9;r+=s)i.push(Math.round(r*100)/100);return i}function sE(n,s){return n.measure==="ccf"?s===1?"1.0":s.toFixed(2).replace(/0$/,""):s.toFixed(1)}const Ja=14,iE=22,jr=118,rE=40,li=19,xy=n=>Math.round(n*100)/100;function oE({data:n,range:s,focus:i,onRange:r,onGene:u}){const[d,h]=Pr(),m=E.useId(),p=E.useRef(null),[y,x]=E.useState(null),[v,b]=E.useState(null),[w,C]=n.range,N=h-iE,M=V=>Ja+(V-w)/(C-w)*(N-Ja),R=V=>w+(V-Ja)/(N-Ja)*(C-w),j=E.useMemo(()=>nE(n),[n]),F=Math.max(1,...j.map(V=>V[1])),T=V=>V*li+8+jr,H=(V,W)=>T(V)-W/(F*1.1)*jr,D=E.useMemo(()=>[...n.drivers].sort((V,W)=>V.value-W.value),[n.drivers]),z=D.map(V=>({left:M(Ml(n,V.value))-Sa(V.gene??"?",11.5,600)/2-6,width:Sa(V.gene??"?",11.5,600)+12})),Y=$h(z,4),te=D.length?Math.max(...Y)+1:0,k=T(te),ne=k+rE,ie=j.map(([V,W])=>[M(V),H(te,W)]),Ce=Ij(ie),X=`${Ce} L${M(C).toFixed(2)},${k} L${M(w).toFixed(2)},${k} Z`,ee=V=>V.kind==="new"?[Math.min(V.from,V.to),Math.max(V.from,V.to)]:V.kind==="edge"?[Math.min(V.fixed,V.to),Math.max(V.fixed,V.to)]:V.range,P=y?ee(y):s,J=V=>{const W=p.current.getBoundingClientRect();return R(Math.min(Math.max(V-W.left,Ja),N))},ue=(V,W,se)=>{V.preventDefault(),V.stopPropagation();let he=W(J(V.clientX));x(he),Fh(V,(ye,be)=>{he=se(he,J(be.clientX)),x(he)},()=>{const[ye,be]=ee(he);if(x(null),M(be)-M(ye)<4)return r(null);r([xy(Ml(n,ye)),xy(Ml(n,be))])})},Ee=(V,W)=>V.kind==="move"?V:{...V,to:W},je=(V,W)=>{if(V.kind!=="move")return V;const se=V.range[1]-V.range[0],he=Math.min(Math.max(V.range[0]+(W-V.grab),w),C-se);return{...V,grab:W,range:[he,he+se]}},$e=P?[M(Ml(n,P[0])),M(Ml(n,P[1]))]:null,Ie=lE(n.measure),We=i?n.measure==="ccf"?i.ccf:i.vaf:null,A=v!==null?D[v]:null;return f.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[f.jsxs("svg",{ref:p,width:h,height:ne,role:"img","aria-label":`${Ie} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(V=>`${V.gene} at ${V.value.toFixed(2)}`).join(", ")}`:""}.`,onPointerDown:V=>{V.button===0&&ue(V,W=>({kind:"new",from:W,to:W}),Ee)},children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),f.jsx("clipPath",{id:`${m}-spot`,children:$e&&f.jsx("rect",{x:$e[0],y:0,width:Math.max($e[1]-$e[0],0),height:ne})})]}),aE(n).map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:M(V),x2:M(V),y1:te*li+8,y2:k,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),f.jsx("text",{x:M(V),y:k+18,textAnchor:"middle",className:"dens-tick",children:sE(n,V)})]},V)),n.measure==="ccf"&&w<=1&&C>=1&&f.jsx("text",{x:M(1),y:k+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),f.jsxs("g",{className:"dens-curve","data-dim":$e?"":void 0,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]}),$e&&f.jsx("g",{className:"dens-curve dens-lit",children:f.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]})}),f.jsx("line",{x1:Ja,x2:N,y1:k,y2:k,className:"dens-axis"}),n.median!==null&&f.jsx("path",{d:`M${M(n.median)},${k+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:f.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),D.map((V,W)=>{const se=Ml(n,V.value),he=M(se),ye=H(te,Id(j,se)),be=V.gene??"?",re=Sa(be,11.5,600)+12,me=8+Y[W]*li,rt=v===W;return f.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:Bt=>Bt.stopPropagation(),onMouseEnter:()=>b(W),onMouseLeave:()=>b(null),onClick:()=>V.gene&&u(V.gene),children:[f.jsx("line",{x1:he,x2:he,y1:me+15,y2:ye,className:"dens-leader"}),f.jsx("rect",{x:he-re/2,y:me,width:re,height:16,rx:8,className:"dens-chip"}),f.jsx("text",{x:he,y:me+11.5,textAnchor:"middle",className:"dens-gene",children:be}),f.jsx("circle",{cx:he,cy:ye,r:rt?7:5.5,className:"dens-dot"})]},`${be}-${W}`)}),We!=null&&f.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ml(n,We),W=M(V),se=H(te,Id(j,V)),he=`${(i==null?void 0:i.gene)??"?"} ${We.toFixed(2)}`,ye=Sa(he,11,600)+14,be=W+12+ye>h;return f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:W,x2:W,y1:se,y2:k,className:"dens-focus-line"}),f.jsx("circle",{cx:W,cy:se,r:6.5,className:"dens-focus-dot"}),f.jsxs("g",{transform:`translate(${be?W-12-ye:W+12} ${se-11})`,children:[f.jsx("rect",{width:ye,height:22,rx:7,className:"dens-focus-chip"}),f.jsx("text",{x:7,y:15,className:"dens-focus-text",children:he})]})]})})()}),P&&$e&&f.jsxs("g",{className:"dens-brush",children:[f.jsx("rect",{x:$e[0],y:te*li+4,width:Math.max($e[1]-$e[0],0),height:jr+8,className:"dens-sel",onPointerDown:V=>ue(V,W=>({kind:"move",grab:W,range:P}),je)}),[0,1].map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:$e[V],x2:$e[V],y1:te*li+4,y2:k,className:"dens-sel-edge"}),f.jsx("rect",{x:$e[V]-5,y:te*li+4,width:10,height:jr+8,className:"dens-edge",onPointerDown:W=>ue(W,()=>({kind:"edge",fixed:P[1-V],to:P[V]}),Ee)}),f.jsx("rect",{x:$e[V]-3,y:k-jr/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),f.jsxs("g",{transform:`translate(${Math.min(Math.max(($e[0]+$e[1])/2,Ja+48),N-48)} ${k-30})`,pointerEvents:"none",children:[f.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),f.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[P[0].toFixed(2)," – ",P[1].toFixed(2)]})]})]})]}),A&&v!==null&&f.jsxs(Ni,{x:M(Ml(n,A.value)),y:H(te,Id(j,Ml(n,A.value)))-22,width:h,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:A.gene??"?"}),A.protein_change&&f.jsxs("span",{className:"ctip-sub",children:[" ",A.protein_change]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:Ie}),f.jsx("b",{children:A.value.toFixed(2)})]}),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function uE({envelope:n,loading:s,measure:i,onMeasure:r,range:u,focus:d,onRange:h,onGene:m}){const p=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return f.jsxs("div",{className:"strip",children:[f.jsxs("div",{className:"strip-head",children:[f.jsx("span",{className:"text-[13px] font-semibold",children:p}),y&&f.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[y.median!==null?`Median ${y.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),f.jsx("span",{className:"flex-auto"}),f.jsx(Zu,{label:"Measure",value:i,onChange:r,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),f.jsx(Zr,{label:p,envelope:n,loading:s,skeletonHeight:180,children:x=>f.jsx(oE,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const cE=Object.keys(q1),fE=Object.keys(Q1);function Sy(n,s){return n.includes(s)?n.filter(i=>i!==s):[...n,s]}function Xd({label:n,count:s,active:i,onClick:r}){return f.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&s===0,onClick:r,children:[f.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&f.jsx(_1,{size:11,strokeWidth:3})}),f.jsx("span",{className:"truncate",children:n}),f.jsx("span",{className:"facet-n",children:s===void 0?"":s.toLocaleString("en-US")})]})}function dE({table:n,data:s,onChange:i}){const r=s==null?void 0:s.facets.effects,u=s==null?void 0:s.facets.flags,d=n.range;return f.jsxs("aside",{className:"facets","aria-label":"Filters",children:[f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[f.jsx("span",{className:"facet-title",children:"Effect"}),cE.map(h=>f.jsx(Xd,{label:q1[h],count:r==null?void 0:r[h],active:n.effects.includes(h),onClick:()=>i({effects:Sy(n.effects,h)})},h))]}),f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[f.jsx("span",{className:"facet-title",children:"Flags"}),fE.map(h=>f.jsx(Xd,{label:Q1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Sy(n.flags,h)})},h))]}),(s==null?void 0:s.ffpe)&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[f.jsx("span",{className:"facet-title",children:"FFPE filter"}),f.jsx(Xd,{label:"Show filtered calls",count:s.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),f.jsx("span",{className:"facet-note",children:s.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${s.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[f.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),f.jsxs("span",{className:"facet-range",children:[f.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),f.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:f.jsx(Qu,{size:13,"aria-hidden":!0})})]})]}),G1(n)>0&&f.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}/**
259
268
  * table-core
260
269
  *
261
270
  * Copyright (c) TanStack
@@ -264,10 +273,10 @@ Error generating stack: `+a.message+`
264
273
  * LICENSE.md file in the root directory of this source tree.
265
274
  *
266
275
  * @license MIT
267
- */function Pl(n,i){return typeof n=="function"?n(i):n}function an(n,i){return s=>{i.setState(o=>({...o,[n]:Pl(s,o[n])}))}}function Du(n){return n instanceof Function}function Aw(n){return Array.isArray(n)&&n.every(i=>typeof i=="number")}function Ow(n,i){const s=[],o=u=>{u.forEach(f=>{s.push(f);const d=i(f);d!=null&&d.length&&o(d)})};return o(n),s}function de(n,i,s){let o=[],u;return f=>{let d;s.key&&s.debug&&(d=Date.now());const g=n(f);if(!(g.length!==o.length||g.some((y,v)=>o[v]!==y)))return u;o=g;let S;if(s.key&&s.debug&&(S=Date.now()),u=i(...g),s==null||s.onChange==null||s.onChange(u),s.key&&s.debug&&s!=null&&s.debug()){const y=Math.round((Date.now()-d)*100)/100,v=Math.round((Date.now()-S)*100)/100,b=v/16,C=(E,N)=>{for(E=String(E);E.length<N;)E=" "+E;return E};console.info(`%c⏱ ${C(v,5)} /${C(y,5)} ms`,`
276
+ */function ba(n,s){return typeof n=="function"?n(s):n}function Sn(n,s){return i=>{s.setState(r=>({...r,[n]:ba(i,r[n])}))}}function Ju(n){return n instanceof Function}function hE(n){return Array.isArray(n)&&n.every(s=>typeof s=="number")}function mE(n,s){const i=[],r=u=>{u.forEach(d=>{i.push(d);const h=s(d);h!=null&&h.length&&r(h)})};return r(n),i}function xe(n,s,i){let r=[],u;return d=>{let h;i.key&&i.debug&&(h=Date.now());const m=n(d);if(!(m.length!==r.length||m.some((x,v)=>r[v]!==x)))return u;r=m;let y;if(i.key&&i.debug&&(y=Date.now()),u=s(...m),i==null||i.onChange==null||i.onChange(u),i.key&&i.debug&&i!=null&&i.debug()){const x=Math.round((Date.now()-h)*100)/100,v=Math.round((Date.now()-y)*100)/100,b=v/16,w=(C,N)=>{for(C=String(C);C.length<N;)C=" "+C;return C};console.info(`%c⏱ ${w(v,5)} /${w(x,5)} ms`,`
268
277
  font-size: .6rem;
269
278
  font-weight: bold;
270
- color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,s==null?void 0:s.key)}return u}}function he(n,i,s,o){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[i]},key:!1,onChange:o}}function zw(n,i,s,o){const u=()=>{var d;return(d=f.getValue())!=null?d:n.options.renderFallbackValue},f={id:`${i.id}_${s.id}`,row:i,column:s,getValue:()=>i.getValue(o),renderValue:u,getContext:de(()=>[n,s,i,f],(d,g,p,S)=>({table:d,column:g,row:p,cell:S,getValue:S.getValue,renderValue:S.renderValue}),he(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(f,s,i,n)},{}),f}function Dw(n,i,s,o){var u,f;const g={...n._getDefaultColumnDef(),...i},p=g.accessorKey;let S=(u=(f=g.id)!=null?f:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?u:typeof g.header=="string"?g.header:void 0,y;if(g.accessorFn?y=g.accessorFn:p&&(p.includes(".")?y=b=>{let C=b;for(const N of p.split(".")){var E;C=(E=C)==null?void 0:E[N]}return C}:y=b=>b[g.accessorKey]),!S)throw new Error;let v={id:`${String(S)}`,accessorFn:y,parent:o,depth:s,columnDef:g,columns:[],getFlatColumns:de(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(C=>C.getFlatColumns())]},he(n.options,"debugColumns")),getLeafColumns:de(()=>[n._getOrderColumnsFn()],b=>{var C;if((C=v.columns)!=null&&C.length){let E=v.columns.flatMap(N=>N.getLeafColumns());return b(E)}return[v]},he(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Nt="debugHeaders";function V0(n,i,s){var o;let f={id:(o=s.id)!=null?o:i.id,column:i,index:s.index,isPlaceholder:!!s.isPlaceholder,placeholderId:s.placeholderId,depth:s.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],g=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(g),d.push(p)};return g(f),d},getContext:()=>({table:n,header:f,column:i})};return n._features.forEach(d=>{d.createHeader==null||d.createHeader(f,n)}),f}const Uw={createTable:n=>{n.getHeaderGroups=de(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(i,s,o,u)=>{var f,d;const g=(f=o==null?void 0:o.map(v=>s.find(b=>b.id===v)).filter(Boolean))!=null?f:[],p=(d=u==null?void 0:u.map(v=>s.find(b=>b.id===v)).filter(Boolean))!=null?d:[],S=s.filter(v=>!(o!=null&&o.includes(v.id))&&!(u!=null&&u.includes(v.id)));return fu(i,[...g,...S,...p],n)},he(n.options,Nt)),n.getCenterHeaderGroups=de(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(i,s,o,u)=>(s=s.filter(f=>!(o!=null&&o.includes(f.id))&&!(u!=null&&u.includes(f.id))),fu(i,s,n,"center")),he(n.options,Nt)),n.getLeftHeaderGroups=de(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(i,s,o)=>{var u;const f=(u=o==null?void 0:o.map(d=>s.find(g=>g.id===d)).filter(Boolean))!=null?u:[];return fu(i,f,n,"left")},he(n.options,Nt)),n.getRightHeaderGroups=de(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(i,s,o)=>{var u;const f=(u=o==null?void 0:o.map(d=>s.find(g=>g.id===d)).filter(Boolean))!=null?u:[];return fu(i,f,n,"right")},he(n.options,Nt)),n.getFooterGroups=de(()=>[n.getHeaderGroups()],i=>[...i].reverse(),he(n.options,Nt)),n.getLeftFooterGroups=de(()=>[n.getLeftHeaderGroups()],i=>[...i].reverse(),he(n.options,Nt)),n.getCenterFooterGroups=de(()=>[n.getCenterHeaderGroups()],i=>[...i].reverse(),he(n.options,Nt)),n.getRightFooterGroups=de(()=>[n.getRightHeaderGroups()],i=>[...i].reverse(),he(n.options,Nt)),n.getFlatHeaders=de(()=>[n.getHeaderGroups()],i=>i.map(s=>s.headers).flat(),he(n.options,Nt)),n.getLeftFlatHeaders=de(()=>[n.getLeftHeaderGroups()],i=>i.map(s=>s.headers).flat(),he(n.options,Nt)),n.getCenterFlatHeaders=de(()=>[n.getCenterHeaderGroups()],i=>i.map(s=>s.headers).flat(),he(n.options,Nt)),n.getRightFlatHeaders=de(()=>[n.getRightHeaderGroups()],i=>i.map(s=>s.headers).flat(),he(n.options,Nt)),n.getCenterLeafHeaders=de(()=>[n.getCenterFlatHeaders()],i=>i.filter(s=>{var o;return!((o=s.subHeaders)!=null&&o.length)}),he(n.options,Nt)),n.getLeftLeafHeaders=de(()=>[n.getLeftFlatHeaders()],i=>i.filter(s=>{var o;return!((o=s.subHeaders)!=null&&o.length)}),he(n.options,Nt)),n.getRightLeafHeaders=de(()=>[n.getRightFlatHeaders()],i=>i.filter(s=>{var o;return!((o=s.subHeaders)!=null&&o.length)}),he(n.options,Nt)),n.getLeafHeaders=de(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(i,s,o)=>{var u,f,d,g,p,S;return[...(u=(f=i[0])==null?void 0:f.headers)!=null?u:[],...(d=(g=s[0])==null?void 0:g.headers)!=null?d:[],...(p=(S=o[0])==null?void 0:S.headers)!=null?p:[]].map(y=>y.getLeafHeaders()).flat()},he(n.options,Nt))}};function fu(n,i,s,o){var u,f;let d=0;const g=function(b,C){C===void 0&&(C=1),d=Math.max(d,C),b.filter(E=>E.getIsVisible()).forEach(E=>{var N;(N=E.columns)!=null&&N.length&&g(E.columns,C+1)},0)};g(n);let p=[];const S=(b,C)=>{const E={depth:C,id:[o,`${C}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(_=>{const w=[...N].reverse()[0],j=_.column.depth===E.depth;let O,G=!1;if(j&&_.column.parent?O=_.column.parent:(O=_.column,G=!0),w&&(w==null?void 0:w.column)===O)w.subHeaders.push(_);else{const B=V0(s,O,{id:[o,C,O.id,_==null?void 0:_.id].filter(Boolean).join("_"),isPlaceholder:G,placeholderId:G?`${N.filter(K=>K.column===O).length}`:void 0,depth:C,index:N.length});B.subHeaders.push(_),N.push(B)}E.headers.push(_),_.headerGroup=E}),p.push(E),C>0&&S(N,C-1)},y=i.map((b,C)=>V0(s,b,{depth:d,index:C}));S(y,d-1),p.reverse();const v=b=>b.filter(E=>E.column.getIsVisible()).map(E=>{let N=0,_=0,w=[0];E.subHeaders&&E.subHeaders.length?(w=[],v(E.subHeaders).forEach(O=>{let{colSpan:G,rowSpan:B}=O;N+=G,w.push(B)})):N=1;const j=Math.min(...w);return _=_+j,E.colSpan=N,E.rowSpan=_,{colSpan:N,rowSpan:_}});return v((u=(f=p[0])==null?void 0:f.headers)!=null?u:[]),p}const Hw=(n,i,s,o,u,f,d)=>{let g={id:i,index:o,original:s,depth:u,parentId:d,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(g._valuesCache.hasOwnProperty(p))return g._valuesCache[p];const S=n.getColumn(p);if(S!=null&&S.accessorFn)return g._valuesCache[p]=S.accessorFn(g.original,o),g._valuesCache[p]},getUniqueValues:p=>{if(g._uniqueValuesCache.hasOwnProperty(p))return g._uniqueValuesCache[p];const S=n.getColumn(p);if(S!=null&&S.accessorFn)return S.columnDef.getUniqueValues?(g._uniqueValuesCache[p]=S.columnDef.getUniqueValues(g.original,o),g._uniqueValuesCache[p]):(g._uniqueValuesCache[p]=[g.getValue(p)],g._uniqueValuesCache[p])},renderValue:p=>{var S;return(S=g.getValue(p))!=null?S:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ow(g.subRows,p=>p.subRows),getParentRow:()=>g.parentId?n.getRow(g.parentId,!0):void 0,getParentRows:()=>{let p=[],S=g;for(;;){const y=S.getParentRow();if(!y)break;p.push(y),S=y}return p.reverse()},getAllCells:de(()=>[n.getAllLeafColumns()],p=>p.map(S=>zw(n,g,S,S.id)),he(n.options,"debugRows")),_getAllCellsByColumnId:de(()=>[g.getAllCells()],p=>p.reduce((S,y)=>(S[y.column.id]=y,S),{}),he(n.options,"debugRows"))};for(let p=0;p<n._features.length;p++){const S=n._features[p];S==null||S.createRow==null||S.createRow(g,n)}return g},Lw={createColumn:(n,i)=>{n._getFacetedRowModel=i.options.getFacetedRowModel&&i.options.getFacetedRowModel(i,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():i.getPreFilteredRowModel(),n._getFacetedUniqueValues=i.options.getFacetedUniqueValues&&i.options.getFacetedUniqueValues(i,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=i.options.getFacetedMinMaxValues&&i.options.getFacetedMinMaxValues(i,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},p1=(n,i,s)=>{var o,u;const f=s==null||(o=s.toString())==null?void 0:o.toLowerCase();return!!(!((u=n.getValue(i))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(f))};p1.autoRemove=n=>Tn(n);const v1=(n,i,s)=>{var o;return!!(!((o=n.getValue(i))==null||(o=o.toString())==null)&&o.includes(s))};v1.autoRemove=n=>Tn(n);const y1=(n,i,s)=>{var o;return((o=n.getValue(i))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(s==null?void 0:s.toLowerCase())};y1.autoRemove=n=>Tn(n);const S1=(n,i,s)=>{var o;return(o=n.getValue(i))==null?void 0:o.includes(s)};S1.autoRemove=n=>Tn(n);const x1=(n,i,s)=>!s.some(o=>{var u;return!((u=n.getValue(i))!=null&&u.includes(o))});x1.autoRemove=n=>Tn(n)||!(n!=null&&n.length);const b1=(n,i,s)=>s.some(o=>{var u;return(u=n.getValue(i))==null?void 0:u.includes(o)});b1.autoRemove=n=>Tn(n)||!(n!=null&&n.length);const C1=(n,i,s)=>n.getValue(i)===s;C1.autoRemove=n=>Tn(n);const E1=(n,i,s)=>n.getValue(i)==s;E1.autoRemove=n=>Tn(n);const _h=(n,i,s)=>{let[o,u]=s;const f=n.getValue(i);return f>=o&&f<=u};_h.resolveFilterValue=n=>{let[i,s]=n,o=typeof i!="number"?parseFloat(i):i,u=typeof s!="number"?parseFloat(s):s,f=i===null||Number.isNaN(o)?-1/0:o,d=s===null||Number.isNaN(u)?1/0:u;if(f>d){const g=f;f=d,d=g}return[f,d]};_h.autoRemove=n=>Tn(n)||Tn(n[0])&&Tn(n[1]);const ul={includesString:p1,includesStringSensitive:v1,equalsString:y1,arrIncludes:S1,arrIncludesAll:x1,arrIncludesSome:b1,equals:C1,weakEquals:E1,inNumberRange:_h};function Tn(n){return n==null||n===""}const Vw={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:an("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,i)=>{n.getAutoFilterFn=()=>{const s=i.getCoreRowModel().flatRows[0],o=s==null?void 0:s.getValue(n.id);return typeof o=="string"?ul.includesString:typeof o=="number"?ul.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ul.equals:Array.isArray(o)?ul.arrIncludes:ul.weakEquals},n.getFilterFn=()=>{var s,o;return Du(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(s=(o=i.options.filterFns)==null?void 0:o[n.columnDef.filterFn])!=null?s:ul[n.columnDef.filterFn]},n.getCanFilter=()=>{var s,o,u;return((s=n.columnDef.enableColumnFilter)!=null?s:!0)&&((o=i.options.enableColumnFilters)!=null?o:!0)&&((u=i.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var s;return(s=i.getState().columnFilters)==null||(s=s.find(o=>o.id===n.id))==null?void 0:s.value},n.getFilterIndex=()=>{var s,o;return(s=(o=i.getState().columnFilters)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?s:-1},n.setFilterValue=s=>{i.setColumnFilters(o=>{const u=n.getFilterFn(),f=o==null?void 0:o.find(y=>y.id===n.id),d=Pl(s,f?f.value:void 0);if(F0(u,d,n)){var g;return(g=o==null?void 0:o.filter(y=>y.id!==n.id))!=null?g:[]}const p={id:n.id,value:d};if(f){var S;return(S=o==null?void 0:o.map(y=>y.id===n.id?p:y))!=null?S:[]}return o!=null&&o.length?[...o,p]:[p]})}},createRow:(n,i)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=i=>{const s=n.getAllLeafColumns(),o=u=>{var f;return(f=Pl(i,u))==null?void 0:f.filter(d=>{const g=s.find(p=>p.id===d.id);if(g){const p=g.getFilterFn();if(F0(p,d.value,g))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(o)},n.resetColumnFilters=i=>{var s,o;n.setColumnFilters(i?[]:(s=(o=n.initialState)==null?void 0:o.columnFilters)!=null?s:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function F0(n,i,s){return(n&&n.autoRemove?n.autoRemove(i,s):!1)||typeof i>"u"||typeof i=="string"&&!i}const Fw=(n,i,s)=>s.reduce((o,u)=>{const f=u.getValue(n);return o+(typeof f=="number"?f:0)},0),Bw=(n,i,s)=>{let o;return s.forEach(u=>{const f=u.getValue(n);f!=null&&(o>f||o===void 0&&f>=f)&&(o=f)}),o},Gw=(n,i,s)=>{let o;return s.forEach(u=>{const f=u.getValue(n);f!=null&&(o<f||o===void 0&&f>=f)&&(o=f)}),o},qw=(n,i,s)=>{let o,u;return s.forEach(f=>{const d=f.getValue(n);d!=null&&(o===void 0?d>=d&&(o=u=d):(o>d&&(o=d),u<d&&(u=d)))}),[o,u]},kw=(n,i)=>{let s=0,o=0;if(i.forEach(u=>{let f=u.getValue(n);f!=null&&(f=+f)>=f&&(++s,o+=f)}),s)return o/s},$w=(n,i)=>{if(!i.length)return;const s=i.map(f=>f.getValue(n));if(!Aw(s))return;if(s.length===1)return s[0];const o=Math.floor(s.length/2),u=s.sort((f,d)=>f-d);return s.length%2!==0?u[o]:(u[o-1]+u[o])/2},Qw=(n,i)=>Array.from(new Set(i.map(s=>s.getValue(n))).values()),Yw=(n,i)=>new Set(i.map(s=>s.getValue(n))).size,Iw=(n,i)=>i.length,wd={sum:Fw,min:Bw,max:Gw,extent:qw,mean:kw,median:$w,unique:Qw,uniqueCount:Yw,count:Iw},Xw={getDefaultColumnDef:()=>({aggregatedCell:n=>{var i,s;return(i=(s=n.getValue())==null||s.toString==null?void 0:s.toString())!=null?i:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:an("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,i)=>{n.toggleGrouping=()=>{i.setGrouping(s=>s!=null&&s.includes(n.id)?s.filter(o=>o!==n.id):[...s??[],n.id])},n.getCanGroup=()=>{var s,o;return((s=n.columnDef.enableGrouping)!=null?s:!0)&&((o=i.options.enableGrouping)!=null?o:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var s;return(s=i.getState().grouping)==null?void 0:s.includes(n.id)},n.getGroupedIndex=()=>{var s;return(s=i.getState().grouping)==null?void 0:s.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const s=n.getCanGroup();return()=>{s&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const s=i.getCoreRowModel().flatRows[0],o=s==null?void 0:s.getValue(n.id);if(typeof o=="number")return wd.sum;if(Object.prototype.toString.call(o)==="[object Date]")return wd.extent},n.getAggregationFn=()=>{var s,o;if(!n)throw new Error;return Du(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(s=(o=i.options.aggregationFns)==null?void 0:o[n.columnDef.aggregationFn])!=null?s:wd[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=i=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(i),n.resetGrouping=i=>{var s,o;n.setGrouping(i?[]:(s=(o=n.initialState)==null?void 0:o.grouping)!=null?s:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,i)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=s=>{if(n._groupingValuesCache.hasOwnProperty(s))return n._groupingValuesCache[s];const o=i.getColumn(s);return o!=null&&o.columnDef.getGroupingValue?(n._groupingValuesCache[s]=o.columnDef.getGroupingValue(n.original),n._groupingValuesCache[s]):n.getValue(s)},n._groupingValuesCache={}},createCell:(n,i,s,o)=>{n.getIsGrouped=()=>i.getIsGrouped()&&i.id===s.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&i.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=s.subRows)!=null&&u.length)}}};function Kw(n,i,s){if(!(i!=null&&i.length)||!s)return n;const o=n.filter(f=>!i.includes(f.id));return s==="remove"?o:[...i.map(f=>n.find(d=>d.id===f)).filter(Boolean),...o]}const Zw={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:an("columnOrder",n)}),createColumn:(n,i)=>{n.getIndex=de(s=>[co(i,s)],s=>s.findIndex(o=>o.id===n.id),he(i.options,"debugColumns")),n.getIsFirstColumn=s=>{var o;return((o=co(i,s)[0])==null?void 0:o.id)===n.id},n.getIsLastColumn=s=>{var o;const u=co(i,s);return((o=u[u.length-1])==null?void 0:o.id)===n.id}},createTable:n=>{n.setColumnOrder=i=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(i),n.resetColumnOrder=i=>{var s;n.setColumnOrder(i?[]:(s=n.initialState.columnOrder)!=null?s:[])},n._getOrderColumnsFn=de(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(i,s,o)=>u=>{let f=[];if(!(i!=null&&i.length))f=u;else{const d=[...i],g=[...u];for(;g.length&&d.length;){const p=d.shift(),S=g.findIndex(y=>y.id===p);S>-1&&f.push(g.splice(S,1)[0])}f=[...f,...g]}return Kw(f,s,o)},he(n.options,"debugTable"))}},_d=()=>({left:[],right:[]}),Pw={getInitialState:n=>({columnPinning:_d(),...n}),getDefaultOptions:n=>({onColumnPinningChange:an("columnPinning",n)}),createColumn:(n,i)=>{n.pin=s=>{const o=n.getLeafColumns().map(u=>u.id).filter(Boolean);i.setColumnPinning(u=>{var f,d;if(s==="right"){var g,p;return{left:((g=u==null?void 0:u.left)!=null?g:[]).filter(v=>!(o!=null&&o.includes(v))),right:[...((p=u==null?void 0:u.right)!=null?p:[]).filter(v=>!(o!=null&&o.includes(v))),...o]}}if(s==="left"){var S,y;return{left:[...((S=u==null?void 0:u.left)!=null?S:[]).filter(v=>!(o!=null&&o.includes(v))),...o],right:((y=u==null?void 0:u.right)!=null?y:[]).filter(v=>!(o!=null&&o.includes(v)))}}return{left:((f=u==null?void 0:u.left)!=null?f:[]).filter(v=>!(o!=null&&o.includes(v))),right:((d=u==null?void 0:u.right)!=null?d:[]).filter(v=>!(o!=null&&o.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(o=>{var u,f,d;return((u=o.columnDef.enablePinning)!=null?u:!0)&&((f=(d=i.options.enableColumnPinning)!=null?d:i.options.enablePinning)!=null?f:!0)}),n.getIsPinned=()=>{const s=n.getLeafColumns().map(g=>g.id),{left:o,right:u}=i.getState().columnPinning,f=s.some(g=>o==null?void 0:o.includes(g)),d=s.some(g=>u==null?void 0:u.includes(g));return f?"left":d?"right":!1},n.getPinnedIndex=()=>{var s,o;const u=n.getIsPinned();return u?(s=(o=i.getState().columnPinning)==null||(o=o[u])==null?void 0:o.indexOf(n.id))!=null?s:-1:0}},createRow:(n,i)=>{n.getCenterVisibleCells=de(()=>[n._getAllVisibleCells(),i.getState().columnPinning.left,i.getState().columnPinning.right],(s,o,u)=>{const f=[...o??[],...u??[]];return s.filter(d=>!f.includes(d.column.id))},he(i.options,"debugRows")),n.getLeftVisibleCells=de(()=>[n._getAllVisibleCells(),i.getState().columnPinning.left],(s,o)=>(o??[]).map(f=>s.find(d=>d.column.id===f)).filter(Boolean).map(f=>({...f,position:"left"})),he(i.options,"debugRows")),n.getRightVisibleCells=de(()=>[n._getAllVisibleCells(),i.getState().columnPinning.right],(s,o)=>(o??[]).map(f=>s.find(d=>d.column.id===f)).filter(Boolean).map(f=>({...f,position:"right"})),he(i.options,"debugRows"))},createTable:n=>{n.setColumnPinning=i=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(i),n.resetColumnPinning=i=>{var s,o;return n.setColumnPinning(i?_d():(s=(o=n.initialState)==null?void 0:o.columnPinning)!=null?s:_d())},n.getIsSomeColumnsPinned=i=>{var s;const o=n.getState().columnPinning;if(!i){var u,f;return!!((u=o.left)!=null&&u.length||(f=o.right)!=null&&f.length)}return!!((s=o[i])!=null&&s.length)},n.getLeftLeafColumns=de(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(i,s)=>(s??[]).map(o=>i.find(u=>u.id===o)).filter(Boolean),he(n.options,"debugColumns")),n.getRightLeafColumns=de(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(i,s)=>(s??[]).map(o=>i.find(u=>u.id===o)).filter(Boolean),he(n.options,"debugColumns")),n.getCenterLeafColumns=de(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(i,s,o)=>{const u=[...s??[],...o??[]];return i.filter(f=>!u.includes(f.id))},he(n.options,"debugColumns"))}};function Jw(n){return n||(typeof document<"u"?document:null)}const du={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Rd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ww={getDefaultColumnDef:()=>du,getInitialState:n=>({columnSizing:{},columnSizingInfo:Rd(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:an("columnSizing",n),onColumnSizingInfoChange:an("columnSizingInfo",n)}),createColumn:(n,i)=>{n.getSize=()=>{var s,o,u;const f=i.getState().columnSizing[n.id];return Math.min(Math.max((s=n.columnDef.minSize)!=null?s:du.minSize,(o=f??n.columnDef.size)!=null?o:du.size),(u=n.columnDef.maxSize)!=null?u:du.maxSize)},n.getStart=de(s=>[s,co(i,s),i.getState().columnSizing],(s,o)=>o.slice(0,n.getIndex(s)).reduce((u,f)=>u+f.getSize(),0),he(i.options,"debugColumns")),n.getAfter=de(s=>[s,co(i,s),i.getState().columnSizing],(s,o)=>o.slice(n.getIndex(s)+1).reduce((u,f)=>u+f.getSize(),0),he(i.options,"debugColumns")),n.resetSize=()=>{i.setColumnSizing(s=>{let{[n.id]:o,...u}=s;return u})},n.getCanResize=()=>{var s,o;return((s=n.columnDef.enableResizing)!=null?s:!0)&&((o=i.options.enableColumnResizing)!=null?o:!0)},n.getIsResizing=()=>i.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,i)=>{n.getSize=()=>{let s=0;const o=u=>{if(u.subHeaders.length)u.subHeaders.forEach(o);else{var f;s+=(f=u.column.getSize())!=null?f:0}};return o(n),s},n.getStart=()=>{if(n.index>0){const s=n.headerGroup.headers[n.index-1];return s.getStart()+s.getSize()}return 0},n.getResizeHandler=s=>{const o=i.getColumn(n.column.id),u=o==null?void 0:o.getCanResize();return f=>{if(!o||!u||(f.persist==null||f.persist(),Td(f)&&f.touches&&f.touches.length>1))return;const d=n.getSize(),g=n?n.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],p=Td(f)?Math.round(f.touches[0].clientX):f.clientX,S={},y=(w,j)=>{typeof j=="number"&&(i.setColumnSizingInfo(O=>{var G,B;const K=i.options.columnResizeDirection==="rtl"?-1:1,q=(j-((G=O==null?void 0:O.startOffset)!=null?G:0))*K,Z=Math.max(q/((B=O==null?void 0:O.startSize)!=null?B:0),-.999999);return O.columnSizingStart.forEach(W=>{let[oe,Se]=W;S[oe]=Math.round(Math.max(Se+Se*Z,0)*100)/100}),{...O,deltaOffset:q,deltaPercentage:Z}}),(i.options.columnResizeMode==="onChange"||w==="end")&&i.setColumnSizing(O=>({...O,...S})))},v=w=>y("move",w),b=w=>{y("end",w),i.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},C=Jw(s),E={moveHandler:w=>v(w.clientX),upHandler:w=>{C==null||C.removeEventListener("mousemove",E.moveHandler),C==null||C.removeEventListener("mouseup",E.upHandler),b(w.clientX)}},N={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),v(w.touches[0].clientX),!1),upHandler:w=>{var j;C==null||C.removeEventListener("touchmove",N.moveHandler),C==null||C.removeEventListener("touchend",N.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),b((j=w.touches[0])==null?void 0:j.clientX)}},_=e_()?{passive:!1}:!1;Td(f)?(C==null||C.addEventListener("touchmove",N.moveHandler,_),C==null||C.addEventListener("touchend",N.upHandler,_)):(C==null||C.addEventListener("mousemove",E.moveHandler,_),C==null||C.addEventListener("mouseup",E.upHandler,_)),i.setColumnSizingInfo(w=>({...w,startOffset:p,startSize:d,deltaOffset:0,deltaPercentage:0,columnSizingStart:g,isResizingColumn:o.id}))}}},createTable:n=>{n.setColumnSizing=i=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(i),n.setColumnSizingInfo=i=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(i),n.resetColumnSizing=i=>{var s;n.setColumnSizing(i?{}:(s=n.initialState.columnSizing)!=null?s:{})},n.resetHeaderSizeInfo=i=>{var s;n.setColumnSizingInfo(i?Rd():(s=n.initialState.columnSizingInfo)!=null?s:Rd())},n.getTotalSize=()=>{var i,s;return(i=(s=n.getHeaderGroups()[0])==null?void 0:s.headers.reduce((o,u)=>o+u.getSize(),0))!=null?i:0},n.getLeftTotalSize=()=>{var i,s;return(i=(s=n.getLeftHeaderGroups()[0])==null?void 0:s.headers.reduce((o,u)=>o+u.getSize(),0))!=null?i:0},n.getCenterTotalSize=()=>{var i,s;return(i=(s=n.getCenterHeaderGroups()[0])==null?void 0:s.headers.reduce((o,u)=>o+u.getSize(),0))!=null?i:0},n.getRightTotalSize=()=>{var i,s;return(i=(s=n.getRightHeaderGroups()[0])==null?void 0:s.headers.reduce((o,u)=>o+u.getSize(),0))!=null?i:0}}};let hu=null;function e_(){if(typeof hu=="boolean")return hu;let n=!1;try{const i={get passive(){return n=!0,!1}},s=()=>{};window.addEventListener("test",s,i),window.removeEventListener("test",s)}catch{n=!1}return hu=n,hu}function Td(n){return n.type==="touchstart"}const t_={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:an("columnVisibility",n)}),createColumn:(n,i)=>{n.toggleVisibility=s=>{n.getCanHide()&&i.setColumnVisibility(o=>({...o,[n.id]:s??!n.getIsVisible()}))},n.getIsVisible=()=>{var s,o;const u=n.columns;return(s=u.length?u.some(f=>f.getIsVisible()):(o=i.getState().columnVisibility)==null?void 0:o[n.id])!=null?s:!0},n.getCanHide=()=>{var s,o;return((s=n.columnDef.enableHiding)!=null?s:!0)&&((o=i.options.enableHiding)!=null?o:!0)},n.getToggleVisibilityHandler=()=>s=>{n.toggleVisibility==null||n.toggleVisibility(s.target.checked)}},createRow:(n,i)=>{n._getAllVisibleCells=de(()=>[n.getAllCells(),i.getState().columnVisibility],s=>s.filter(o=>o.column.getIsVisible()),he(i.options,"debugRows")),n.getVisibleCells=de(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(s,o,u)=>[...s,...o,...u],he(i.options,"debugRows"))},createTable:n=>{const i=(s,o)=>de(()=>[o(),o().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(f=>f.getIsVisible==null?void 0:f.getIsVisible()),he(n.options,"debugColumns"));n.getVisibleFlatColumns=i("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=i("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=i("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=i("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=i("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=s=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(s),n.resetColumnVisibility=s=>{var o;n.setColumnVisibility(s?{}:(o=n.initialState.columnVisibility)!=null?o:{})},n.toggleAllColumnsVisible=s=>{var o;s=(o=s)!=null?o:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,f)=>({...u,[f.id]:s||!(f.getCanHide!=null&&f.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(s=>!(s.getIsVisible!=null&&s.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(s=>s.getIsVisible==null?void 0:s.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>s=>{var o;n.toggleAllColumnsVisible((o=s.target)==null?void 0:o.checked)}}};function co(n,i){return i?i==="center"?n.getCenterVisibleLeafColumns():i==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const n_={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},l_={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:an("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:i=>{var s;const o=(s=n.getCoreRowModel().flatRows[0])==null||(s=s._getAllCellsByColumnId()[i.id])==null?void 0:s.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(n,i)=>{n.getCanGlobalFilter=()=>{var s,o,u,f;return((s=n.columnDef.enableGlobalFilter)!=null?s:!0)&&((o=i.options.enableGlobalFilter)!=null?o:!0)&&((u=i.options.enableFilters)!=null?u:!0)&&((f=i.options.getColumnCanGlobalFilter==null?void 0:i.options.getColumnCanGlobalFilter(n))!=null?f:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>ul.includesString,n.getGlobalFilterFn=()=>{var i,s;const{globalFilterFn:o}=n.options;return Du(o)?o:o==="auto"?n.getGlobalAutoFilterFn():(i=(s=n.options.filterFns)==null?void 0:s[o])!=null?i:ul[o]},n.setGlobalFilter=i=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(i)},n.resetGlobalFilter=i=>{n.setGlobalFilter(i?void 0:n.initialState.globalFilter)}}},a_={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:an("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let i=!1,s=!1;n._autoResetExpanded=()=>{var o,u;if(!i){n._queue(()=>{i=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?o:!n.options.manualExpanding){if(s)return;s=!0,n._queue(()=>{n.resetExpanded(),s=!1})}},n.setExpanded=o=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(o),n.toggleAllRowsExpanded=o=>{o??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=o=>{var u,f;n.setExpanded(o?{}:(u=(f=n.initialState)==null?void 0:f.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const o=n.getState().expanded;return o===!0||Object.values(o).some(Boolean)},n.getIsAllRowsExpanded=()=>{const o=n.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let o=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(f=>{const d=f.split(".");o=Math.max(o,d.length)}),o},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,i)=>{n.toggleExpanded=s=>{i.setExpanded(o=>{var u;const f=o===!0?!0:!!(o!=null&&o[n.id]);let d={};if(o===!0?Object.keys(i.getRowModel().rowsById).forEach(g=>{d[g]=!0}):d=o,s=(u=s)!=null?u:!f,!f&&s)return{...d,[n.id]:!0};if(f&&!s){const{[n.id]:g,...p}=d;return p}return o})},n.getIsExpanded=()=>{var s;const o=i.getState().expanded;return!!((s=i.options.getIsRowExpanded==null?void 0:i.options.getIsRowExpanded(n))!=null?s:o===!0||o!=null&&o[n.id])},n.getCanExpand=()=>{var s,o,u;return(s=i.options.getRowCanExpand==null?void 0:i.options.getRowCanExpand(n))!=null?s:((o=i.options.enableExpanding)!=null?o:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let s=!0,o=n;for(;s&&o.parentId;)o=i.getRow(o.parentId,!0),s=o.getIsExpanded();return s},n.getToggleExpandedHandler=()=>{const s=n.getCanExpand();return()=>{s&&n.toggleExpanded()}}}},rh=0,uh=10,Nd=()=>({pageIndex:rh,pageSize:uh}),i_={getInitialState:n=>({...n,pagination:{...Nd(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:an("pagination",n)}),createTable:n=>{let i=!1,s=!1;n._autoResetPageIndex=()=>{var o,u;if(!i){n._queue(()=>{i=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?o:!n.options.manualPagination){if(s)return;s=!0,n._queue(()=>{n.resetPageIndex(),s=!1})}},n.setPagination=o=>{const u=f=>Pl(o,f);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=o=>{var u;n.setPagination(o?Nd():(u=n.initialState.pagination)!=null?u:Nd())},n.setPageIndex=o=>{n.setPagination(u=>{let f=Pl(o,u.pageIndex);const d=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return f=Math.max(0,Math.min(f,d)),{...u,pageIndex:f}})},n.resetPageIndex=o=>{var u,f;n.setPageIndex(o?rh:(u=(f=n.initialState)==null||(f=f.pagination)==null?void 0:f.pageIndex)!=null?u:rh)},n.resetPageSize=o=>{var u,f;n.setPageSize(o?uh:(u=(f=n.initialState)==null||(f=f.pagination)==null?void 0:f.pageSize)!=null?u:uh)},n.setPageSize=o=>{n.setPagination(u=>{const f=Math.max(1,Pl(o,u.pageSize)),d=u.pageSize*u.pageIndex,g=Math.floor(d/f);return{...u,pageIndex:g,pageSize:f}})},n.setPageCount=o=>n.setPagination(u=>{var f;let d=Pl(o,(f=n.options.pageCount)!=null?f:-1);return typeof d=="number"&&(d=Math.max(-1,d)),{...u,pageCount:d}}),n.getPageOptions=de(()=>[n.getPageCount()],o=>{let u=[];return o&&o>0&&(u=[...new Array(o)].fill(null).map((f,d)=>d)),u},he(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:o}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:o<u-1},n.previousPage=()=>n.setPageIndex(o=>o-1),n.nextPage=()=>n.setPageIndex(o=>o+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var o;return(o=n.options.pageCount)!=null?o:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var o;return(o=n.options.rowCount)!=null?o:n.getPrePaginationRowModel().rows.length}}},Md=()=>({top:[],bottom:[]}),s_={getInitialState:n=>({rowPinning:Md(),...n}),getDefaultOptions:n=>({onRowPinningChange:an("rowPinning",n)}),createRow:(n,i)=>{n.pin=(s,o,u)=>{const f=o?n.getLeafRows().map(p=>{let{id:S}=p;return S}):[],d=u?n.getParentRows().map(p=>{let{id:S}=p;return S}):[],g=new Set([...d,n.id,...f]);i.setRowPinning(p=>{var S,y;if(s==="bottom"){var v,b;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(N=>!(g!=null&&g.has(N))),bottom:[...((b=p==null?void 0:p.bottom)!=null?b:[]).filter(N=>!(g!=null&&g.has(N))),...Array.from(g)]}}if(s==="top"){var C,E;return{top:[...((C=p==null?void 0:p.top)!=null?C:[]).filter(N=>!(g!=null&&g.has(N))),...Array.from(g)],bottom:((E=p==null?void 0:p.bottom)!=null?E:[]).filter(N=>!(g!=null&&g.has(N)))}}return{top:((S=p==null?void 0:p.top)!=null?S:[]).filter(N=>!(g!=null&&g.has(N))),bottom:((y=p==null?void 0:p.bottom)!=null?y:[]).filter(N=>!(g!=null&&g.has(N)))}})},n.getCanPin=()=>{var s;const{enableRowPinning:o,enablePinning:u}=i.options;return typeof o=="function"?o(n):(s=o??u)!=null?s:!0},n.getIsPinned=()=>{const s=[n.id],{top:o,bottom:u}=i.getState().rowPinning,f=s.some(g=>o==null?void 0:o.includes(g)),d=s.some(g=>u==null?void 0:u.includes(g));return f?"top":d?"bottom":!1},n.getPinnedIndex=()=>{var s,o;const u=n.getIsPinned();if(!u)return-1;const f=(s=u==="top"?i.getTopRows():i.getBottomRows())==null?void 0:s.map(d=>{let{id:g}=d;return g});return(o=f==null?void 0:f.indexOf(n.id))!=null?o:-1}},createTable:n=>{n.setRowPinning=i=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(i),n.resetRowPinning=i=>{var s,o;return n.setRowPinning(i?Md():(s=(o=n.initialState)==null?void 0:o.rowPinning)!=null?s:Md())},n.getIsSomeRowsPinned=i=>{var s;const o=n.getState().rowPinning;if(!i){var u,f;return!!((u=o.top)!=null&&u.length||(f=o.bottom)!=null&&f.length)}return!!((s=o[i])!=null&&s.length)},n._getPinnedRows=(i,s,o)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(s??[]).map(d=>{const g=n.getRow(d,!0);return g.getIsAllParentsExpanded()?g:null}):(s??[]).map(d=>i.find(g=>g.id===d))).filter(Boolean).map(d=>({...d,position:o}))},n.getTopRows=de(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(i,s)=>n._getPinnedRows(i,s,"top"),he(n.options,"debugRows")),n.getBottomRows=de(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(i,s)=>n._getPinnedRows(i,s,"bottom"),he(n.options,"debugRows")),n.getCenterRows=de(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(i,s,o)=>{const u=new Set([...s??[],...o??[]]);return i.filter(f=>!u.has(f.id))},he(n.options,"debugRows"))}},o_={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:an("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=i=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(i),n.resetRowSelection=i=>{var s;return n.setRowSelection(i?{}:(s=n.initialState.rowSelection)!=null?s:{})},n.toggleAllRowsSelected=i=>{n.setRowSelection(s=>{i=typeof i<"u"?i:!n.getIsAllRowsSelected();const o={...s},u=n.getPreGroupedRowModel().flatRows;return i?u.forEach(f=>{f.getCanSelect()&&(o[f.id]=!0)}):u.forEach(f=>{delete o[f.id]}),o})},n.toggleAllPageRowsSelected=i=>n.setRowSelection(s=>{const o=typeof i<"u"?i:!n.getIsAllPageRowsSelected(),u={...s};return n.getRowModel().rows.forEach(f=>{ch(u,f.id,o,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=de(()=>[n.getState().rowSelection,n.getCoreRowModel()],(i,s)=>Object.keys(i).length?jd(n,s):{rows:[],flatRows:[],rowsById:{}},he(n.options,"debugTable")),n.getFilteredSelectedRowModel=de(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(i,s)=>Object.keys(i).length?jd(n,s):{rows:[],flatRows:[],rowsById:{}},he(n.options,"debugTable")),n.getGroupedSelectedRowModel=de(()=>[n.getState().rowSelection,n.getSortedRowModel()],(i,s)=>Object.keys(i).length?jd(n,s):{rows:[],flatRows:[],rowsById:{}},he(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const i=n.getFilteredRowModel().flatRows,{rowSelection:s}=n.getState();let o=!!(i.length&&Object.keys(s).length);return o&&i.some(u=>u.getCanSelect()&&!s[u.id])&&(o=!1),o},n.getIsAllPageRowsSelected=()=>{const i=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:s}=n.getState();let o=!!i.length;return o&&i.some(u=>!s[u.id])&&(o=!1),o},n.getIsSomeRowsSelected=()=>{var i;const s=Object.keys((i=n.getState().rowSelection)!=null?i:{}).length;return s>0&&s<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const i=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:i.filter(s=>s.getCanSelect()).some(s=>s.getIsSelected()||s.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>i=>{n.toggleAllRowsSelected(i.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>i=>{n.toggleAllPageRowsSelected(i.target.checked)}},createRow:(n,i)=>{n.toggleSelected=(s,o)=>{const u=n.getIsSelected();i.setRowSelection(f=>{var d;if(s=typeof s<"u"?s:!u,n.getCanSelect()&&u===s)return f;const g={...f};return ch(g,n.id,s,(d=o==null?void 0:o.selectChildren)!=null?d:!0,i),g})},n.getIsSelected=()=>{const{rowSelection:s}=i.getState();return Rh(n,s)},n.getIsSomeSelected=()=>{const{rowSelection:s}=i.getState();return fh(n,s)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:s}=i.getState();return fh(n,s)==="all"},n.getCanSelect=()=>{var s;return typeof i.options.enableRowSelection=="function"?i.options.enableRowSelection(n):(s=i.options.enableRowSelection)!=null?s:!0},n.getCanSelectSubRows=()=>{var s;return typeof i.options.enableSubRowSelection=="function"?i.options.enableSubRowSelection(n):(s=i.options.enableSubRowSelection)!=null?s:!0},n.getCanMultiSelect=()=>{var s;return typeof i.options.enableMultiRowSelection=="function"?i.options.enableMultiRowSelection(n):(s=i.options.enableMultiRowSelection)!=null?s:!0},n.getToggleSelectedHandler=()=>{const s=n.getCanSelect();return o=>{var u;s&&n.toggleSelected((u=o.target)==null?void 0:u.checked)}}}},ch=(n,i,s,o,u)=>{var f;const d=u.getRow(i,!0);s?(d.getCanMultiSelect()||Object.keys(n).forEach(g=>delete n[g]),d.getCanSelect()&&(n[i]=!0)):delete n[i],o&&(f=d.subRows)!=null&&f.length&&d.getCanSelectSubRows()&&d.subRows.forEach(g=>ch(n,g.id,s,o,u))};function jd(n,i){const s=n.getState().rowSelection,o=[],u={},f=function(d,g){return d.map(p=>{var S;const y=Rh(p,s);if(y&&(o.push(p),u[p.id]=p),(S=p.subRows)!=null&&S.length&&(p={...p,subRows:f(p.subRows)}),y)return p}).filter(Boolean)};return{rows:f(i.rows),flatRows:o,rowsById:u}}function Rh(n,i){var s;return(s=i[n.id])!=null?s:!1}function fh(n,i,s){var o;if(!((o=n.subRows)!=null&&o.length))return!1;let u=!0,f=!1;return n.subRows.forEach(d=>{if(!(f&&!u)&&(d.getCanSelect()&&(Rh(d,i)?f=!0:u=!1),d.subRows&&d.subRows.length)){const g=fh(d,i);g==="all"?f=!0:(g==="some"&&(f=!0),u=!1)}}),u?"all":f?"some":!1}const dh=/([0-9]+)/gm,r_=(n,i,s)=>w1(ea(n.getValue(s)).toLowerCase(),ea(i.getValue(s)).toLowerCase()),u_=(n,i,s)=>w1(ea(n.getValue(s)),ea(i.getValue(s))),c_=(n,i,s)=>Th(ea(n.getValue(s)).toLowerCase(),ea(i.getValue(s)).toLowerCase()),f_=(n,i,s)=>Th(ea(n.getValue(s)),ea(i.getValue(s))),d_=(n,i,s)=>{const o=n.getValue(s),u=i.getValue(s);return o>u?1:o<u?-1:0},h_=(n,i,s)=>Th(n.getValue(s),i.getValue(s));function Th(n,i){return n===i?0:n>i?1:-1}function ea(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function w1(n,i){const s=n.split(dh).filter(Boolean),o=i.split(dh).filter(Boolean);for(;s.length&&o.length;){const u=s.shift(),f=o.shift(),d=parseInt(u,10),g=parseInt(f,10),p=[d,g].sort();if(isNaN(p[0])){if(u>f)return 1;if(f>u)return-1;continue}if(isNaN(p[1]))return isNaN(d)?-1:1;if(d>g)return 1;if(g>d)return-1}return s.length-o.length}const io={alphanumeric:r_,alphanumericCaseSensitive:u_,text:c_,textCaseSensitive:f_,datetime:d_,basic:h_},m_={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:an("sorting",n),isMultiSortEvent:i=>i.shiftKey}),createColumn:(n,i)=>{n.getAutoSortingFn=()=>{const s=i.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const u of s){const f=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(f)==="[object Date]")return io.datetime;if(typeof f=="string"&&(o=!0,f.split(dh).length>1))return io.alphanumeric}return o?io.text:io.basic},n.getAutoSortDir=()=>{const s=i.getFilteredRowModel().flatRows[0];return typeof(s==null?void 0:s.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var s,o;if(!n)throw new Error;return Du(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(s=(o=i.options.sortingFns)==null?void 0:o[n.columnDef.sortingFn])!=null?s:io[n.columnDef.sortingFn]},n.toggleSorting=(s,o)=>{const u=n.getNextSortingOrder(),f=typeof s<"u"&&s!==null;i.setSorting(d=>{const g=d==null?void 0:d.find(C=>C.id===n.id),p=d==null?void 0:d.findIndex(C=>C.id===n.id);let S=[],y,v=f?s:u==="desc";if(d!=null&&d.length&&n.getCanMultiSort()&&o?g?y="toggle":y="add":d!=null&&d.length&&p!==d.length-1?y="replace":g?y="toggle":y="replace",y==="toggle"&&(f||u||(y="remove")),y==="add"){var b;S=[...d,{id:n.id,desc:v}],S.splice(0,S.length-((b=i.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else y==="toggle"?S=d.map(C=>C.id===n.id?{...C,desc:v}:C):y==="remove"?S=d.filter(C=>C.id!==n.id):S=[{id:n.id,desc:v}];return S})},n.getFirstSortDir=()=>{var s,o;return((s=(o=n.columnDef.sortDescFirst)!=null?o:i.options.sortDescFirst)!=null?s:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=s=>{var o,u;const f=n.getFirstSortDir(),d=n.getIsSorted();return d?d!==f&&((o=i.options.enableSortingRemoval)==null||o)&&(!(s&&(u=i.options.enableMultiRemove)!=null)||u)?!1:d==="desc"?"asc":"desc":f},n.getCanSort=()=>{var s,o;return((s=n.columnDef.enableSorting)!=null?s:!0)&&((o=i.options.enableSorting)!=null?o:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var s,o;return(s=(o=n.columnDef.enableMultiSort)!=null?o:i.options.enableMultiSort)!=null?s:!!n.accessorFn},n.getIsSorted=()=>{var s;const o=(s=i.getState().sorting)==null?void 0:s.find(u=>u.id===n.id);return o?o.desc?"desc":"asc":!1},n.getSortIndex=()=>{var s,o;return(s=(o=i.getState().sorting)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?s:-1},n.clearSorting=()=>{i.setSorting(s=>s!=null&&s.length?s.filter(o=>o.id!==n.id):[])},n.getToggleSortingHandler=()=>{const s=n.getCanSort();return o=>{s&&(o.persist==null||o.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?i.options.isMultiSortEvent==null?void 0:i.options.isMultiSortEvent(o):!1))}}},createTable:n=>{n.setSorting=i=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(i),n.resetSorting=i=>{var s,o;n.setSorting(i?[]:(s=(o=n.initialState)==null?void 0:o.sorting)!=null?s:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},g_=[Uw,t_,Zw,Pw,Lw,Vw,n_,l_,m_,Xw,a_,i_,s_,o_,Ww];function p_(n){var i,s;const o=[...g_,...(i=n._features)!=null?i:[]];let u={_features:o};const f=u._features.reduce((b,C)=>Object.assign(b,C.getDefaultOptions==null?void 0:C.getDefaultOptions(u)),{}),d=b=>u.options.mergeOptions?u.options.mergeOptions(f,b):{...f,...b};let p={...{},...(s=n.initialState)!=null?s:{}};u._features.forEach(b=>{var C;p=(C=b.getInitialState==null?void 0:b.getInitialState(p))!=null?C:p});const S=[];let y=!1;const v={_features:o,options:{...f,...n},initialState:p,_queue:b=>{S.push(b),y||(y=!0,Promise.resolve().then(()=>{for(;S.length;)S.shift()();y=!1}).catch(C=>setTimeout(()=>{throw C})))},reset:()=>{u.setState(u.initialState)},setOptions:b=>{const C=Pl(b,u.options);u.options=d(C)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,C,E)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,C,E))!=null?N:`${E?[E.id,C].join("."):C}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,C)=>{let E=(C?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!E&&(E=u.getCoreRowModel().rowsById[b],!E))throw new Error;return E},_getDefaultColumnDef:de(()=>[u.options.defaultColumn],b=>{var C;return b=(C=b)!=null?C:{},{header:E=>{const N=E.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:E=>{var N,_;return(N=(_=E.renderValue())==null||_.toString==null?void 0:_.toString())!=null?N:null},...u._features.reduce((E,N)=>Object.assign(E,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},he(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:de(()=>[u._getColumnDefs()],b=>{const C=function(E,N,_){return _===void 0&&(_=0),E.map(w=>{const j=Dw(u,w,_,N),O=w;return j.columns=O.columns?C(O.columns,j,_+1):[],j})};return C(b)},he(n,"debugColumns")),getAllFlatColumns:de(()=>[u.getAllColumns()],b=>b.flatMap(C=>C.getFlatColumns()),he(n,"debugColumns")),_getAllFlatColumnsById:de(()=>[u.getAllFlatColumns()],b=>b.reduce((C,E)=>(C[E.id]=E,C),{}),he(n,"debugColumns")),getAllLeafColumns:de(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,C)=>{let E=b.flatMap(N=>N.getLeafColumns());return C(E)},he(n,"debugColumns")),getColumn:b=>u._getAllFlatColumnsById()[b]};Object.assign(u,v);for(let b=0;b<u._features.length;b++){const C=u._features[b];C==null||C.createTable==null||C.createTable(u)}return u}function _1(){return n=>de(()=>[n.options.data],i=>{const s={rows:[],flatRows:[],rowsById:{}},o=function(u,f,d){f===void 0&&(f=0);const g=[];for(let S=0;S<u.length;S++){const y=Hw(n,n._getRowId(u[S],S,d),u[S],S,f,void 0,d==null?void 0:d.id);if(s.flatRows.push(y),s.rowsById[y.id]=y,g.push(y),n.options.getSubRows){var p;y.originalSubRows=n.options.getSubRows(u[S],S),(p=y.originalSubRows)!=null&&p.length&&(y.subRows=o(y.originalSubRows,f+1,y))}}return g};return s.rows=o(i),s},he(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function R1(){return n=>de(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(i,s,o)=>!s.rows.length||i!==!0&&!Object.keys(i??{}).length||!o?s:v_(s),he(n.options,"debugTable"))}function v_(n){const i=[],s=o=>{var u;i.push(o),(u=o.subRows)!=null&&u.length&&o.getIsExpanded()&&o.subRows.forEach(s)};return n.rows.forEach(s),{rows:i,flatRows:n.flatRows,rowsById:n.rowsById}}function y_(){return n=>de(()=>[n.getState().sorting,n.getPreSortedRowModel()],(i,s)=>{if(!s.rows.length||!(i!=null&&i.length))return s;const o=n.getState().sorting,u=[],f=o.filter(p=>{var S;return(S=n.getColumn(p.id))==null?void 0:S.getCanSort()}),d={};f.forEach(p=>{const S=n.getColumn(p.id);S&&(d[p.id]={sortUndefined:S.columnDef.sortUndefined,invertSorting:S.columnDef.invertSorting,sortingFn:S.getSortingFn()})});const g=p=>{const S=p.map(y=>({...y}));return S.sort((y,v)=>{for(let C=0;C<f.length;C+=1){var b;const E=f[C],N=d[E.id],_=N.sortUndefined,w=(b=E==null?void 0:E.desc)!=null?b:!1;let j=0;if(_){const O=y.getValue(E.id),G=v.getValue(E.id),B=O===void 0,K=G===void 0;if(B||K){if(_==="first")return B?-1:1;if(_==="last")return B?1:-1;j=B&&K?0:B?_:-_}}if(j===0&&(j=N.sortingFn(y,v,E.id)),j!==0)return w&&(j*=-1),N.invertSorting&&(j*=-1),j}return y.index-v.index}),S.forEach(y=>{var v;u.push(y),(v=y.subRows)!=null&&v.length&&(y.subRows=g(y.subRows))}),S};return{rows:g(s.rows),flatRows:u,rowsById:s.rowsById}},he(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
279
+ color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function Se(n,s,i,r){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[s]},key:!1,onChange:r}}function gE(n,s,i,r){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${s.id}_${i.id}`,row:s,column:i,getValue:()=>s.getValue(r),renderValue:u,getContext:xe(()=>[n,i,s,d],(h,m,p,y)=>({table:h,column:m,row:p,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Se(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,s,n)},{}),d}function pE(n,s,i,r){var u,d;const m={...n._getDefaultColumnDef(),...s},p=m.accessorKey;let y=(u=(d=m.id)!=null?d:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:p&&(p.includes(".")?x=b=>{let w=b;for(const N of p.split(".")){var C;w=(C=w)==null?void 0:C[N]}return w}:x=b=>b[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:r,depth:i,columnDef:m,columns:[],getFlatColumns:xe(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(w=>w.getFlatColumns())]},Se(n.options,"debugColumns")),getLeafColumns:xe(()=>[n._getOrderColumnsFn()],b=>{var w;if((w=v.columns)!=null&&w.length){let C=v.columns.flatMap(N=>N.getLeafColumns());return b(C)}return[v]},Se(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Qt="debugHeaders";function by(n,s,i){var r;let d={id:(r=i.id)!=null?r:s.id,column:s,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),h.push(p)};return m(d),h},getContext:()=>({table:n,header:d,column:s})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const vE={createTable:n=>{n.getHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>{var d,h;const m=(d=r==null?void 0:r.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?d:[],p=(h=u==null?void 0:u.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(r!=null&&r.includes(v.id))&&!(u!=null&&u.includes(v.id)));return _u(s,[...m,...y,...p],n)},Se(n.options,Qt)),n.getCenterHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>(i=i.filter(d=>!(r!=null&&r.includes(d.id))&&!(u!=null&&u.includes(d.id))),_u(s,i,n,"center")),Se(n.options,Qt)),n.getLeftHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"left")},Se(n.options,Qt)),n.getRightHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"right")},Se(n.options,Qt)),n.getFooterGroups=xe(()=>[n.getHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getLeftFooterGroups=xe(()=>[n.getLeftHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getCenterFooterGroups=xe(()=>[n.getCenterHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getRightFooterGroups=xe(()=>[n.getRightHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getFlatHeaders=xe(()=>[n.getHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getLeftFlatHeaders=xe(()=>[n.getLeftHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterFlatHeaders=xe(()=>[n.getCenterHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getRightFlatHeaders=xe(()=>[n.getRightHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterLeafHeaders=xe(()=>[n.getCenterFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeftLeafHeaders=xe(()=>[n.getLeftFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getRightLeafHeaders=xe(()=>[n.getRightFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeafHeaders=xe(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(s,i,r)=>{var u,d,h,m,p,y;return[...(u=(d=s[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(p=(y=r[0])==null?void 0:y.headers)!=null?p:[]].map(x=>x.getLeafHeaders()).flat()},Se(n.options,Qt))}};function _u(n,s,i,r){var u,d;let h=0;const m=function(b,w){w===void 0&&(w=1),h=Math.max(h,w),b.filter(C=>C.getIsVisible()).forEach(C=>{var N;(N=C.columns)!=null&&N.length&&m(C.columns,w+1)},0)};m(n);let p=[];const y=(b,w)=>{const C={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(M=>{const R=[...N].reverse()[0],j=M.column.depth===C.depth;let F,T=!1;if(j&&M.column.parent?F=M.column.parent:(F=M.column,T=!0),R&&(R==null?void 0:R.column)===F)R.subHeaders.push(M);else{const H=by(i,F,{id:[r,w,F.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${N.filter(D=>D.column===F).length}`:void 0,depth:w,index:N.length});H.subHeaders.push(M),N.push(H)}C.headers.push(M),M.headerGroup=C}),p.push(C),w>0&&y(N,w-1)},x=s.map((b,w)=>by(i,b,{depth:h,index:w}));y(x,h-1),p.reverse();const v=b=>b.filter(C=>C.column.getIsVisible()).map(C=>{let N=0,M=0,R=[0];C.subHeaders&&C.subHeaders.length?(R=[],v(C.subHeaders).forEach(F=>{let{colSpan:T,rowSpan:H}=F;N+=T,R.push(H)})):N=1;const j=Math.min(...R);return M=M+j,C.colSpan=N,C.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=p[0])==null?void 0:d.headers)!=null?u:[]),p}const yE=(n,s,i,r,u,d,h)=>{let m={id:s,index:r,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(m._valuesCache.hasOwnProperty(p))return m._valuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return m._valuesCache[p]=y.accessorFn(m.original,r),m._valuesCache[p]},getUniqueValues:p=>{if(m._uniqueValuesCache.hasOwnProperty(p))return m._uniqueValuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[p]=y.columnDef.getUniqueValues(m.original,r),m._uniqueValuesCache[p]):(m._uniqueValuesCache[p]=[m.getValue(p)],m._uniqueValuesCache[p])},renderValue:p=>{var y;return(y=m.getValue(p))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>mE(m.subRows,p=>p.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let p=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;p.push(x),y=x}return p.reverse()},getAllCells:xe(()=>[n.getAllLeafColumns()],p=>p.map(y=>gE(n,m,y,y.id)),Se(n.options,"debugRows")),_getAllCellsByColumnId:xe(()=>[m.getAllCells()],p=>p.reduce((y,x)=>(y[x.column.id]=x,y),{}),Se(n.options,"debugRows"))};for(let p=0;p<n._features.length;p++){const y=n._features[p];y==null||y.createRow==null||y.createRow(m,n)}return m},xE={createColumn:(n,s)=>{n._getFacetedRowModel=s.options.getFacetedRowModel&&s.options.getFacetedRowModel(s,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():s.getPreFilteredRowModel(),n._getFacetedUniqueValues=s.options.getFacetedUniqueValues&&s.options.getFacetedUniqueValues(s,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=s.options.getFacetedMinMaxValues&&s.options.getFacetedMinMaxValues(s,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},P1=(n,s,i)=>{var r,u;const d=i==null||(r=i.toString())==null?void 0:r.toLowerCase();return!!(!((u=n.getValue(s))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};P1.autoRemove=n=>kn(n);const J1=(n,s,i)=>{var r;return!!(!((r=n.getValue(s))==null||(r=r.toString())==null)&&r.includes(i))};J1.autoRemove=n=>kn(n);const W1=(n,s,i)=>{var r;return((r=n.getValue(s))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(i==null?void 0:i.toLowerCase())};W1.autoRemove=n=>kn(n);const ex=(n,s,i)=>{var r;return(r=n.getValue(s))==null?void 0:r.includes(i)};ex.autoRemove=n=>kn(n);const tx=(n,s,i)=>!i.some(r=>{var u;return!((u=n.getValue(s))!=null&&u.includes(r))});tx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const nx=(n,s,i)=>i.some(r=>{var u;return(u=n.getValue(s))==null?void 0:u.includes(r)});nx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const lx=(n,s,i)=>n.getValue(s)===i;lx.autoRemove=n=>kn(n);const ax=(n,s,i)=>n.getValue(s)==i;ax.autoRemove=n=>kn(n);const im=(n,s,i)=>{let[r,u]=i;const d=n.getValue(s);return d>=r&&d<=u};im.resolveFilterValue=n=>{let[s,i]=n,r=typeof s!="number"?parseFloat(s):s,u=typeof i!="number"?parseFloat(i):i,d=s===null||Number.isNaN(r)?-1/0:r,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};im.autoRemove=n=>kn(n)||kn(n[0])&&kn(n[1]);const Tl={includesString:P1,includesStringSensitive:J1,equalsString:W1,arrIncludes:ex,arrIncludesAll:tx,arrIncludesSome:nx,equals:lx,weakEquals:ax,inNumberRange:im};function kn(n){return n==null||n===""}const SE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:Sn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,s)=>{n.getAutoFilterFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);return typeof r=="string"?Tl.includesString:typeof r=="number"?Tl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Tl.equals:Array.isArray(r)?Tl.arrIncludes:Tl.weakEquals},n.getFilterFn=()=>{var i,r;return Ju(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(r=s.options.filterFns)==null?void 0:r[n.columnDef.filterFn])!=null?i:Tl[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,r,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((r=s.options.enableColumnFilters)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=s.getState().columnFilters)==null||(i=i.find(r=>r.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,r;return(i=(r=s.getState().columnFilters)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{s.setColumnFilters(r=>{const u=n.getFilterFn(),d=r==null?void 0:r.find(x=>x.id===n.id),h=ba(i,d?d.value:void 0);if(wy(u,h,n)){var m;return(m=r==null?void 0:r.filter(x=>x.id!==n.id))!=null?m:[]}const p={id:n.id,value:h};if(d){var y;return(y=r==null?void 0:r.map(x=>x.id===n.id?p:x))!=null?y:[]}return r!=null&&r.length?[...r,p]:[p]})}},createRow:(n,s)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=s=>{const i=n.getAllLeafColumns(),r=u=>{var d;return(d=ba(s,u))==null?void 0:d.filter(h=>{const m=i.find(p=>p.id===h.id);if(m){const p=m.getFilterFn();if(wy(p,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(r)},n.resetColumnFilters=s=>{var i,r;n.setColumnFilters(s?[]:(i=(r=n.initialState)==null?void 0:r.columnFilters)!=null?i:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function wy(n,s,i){return(n&&n.autoRemove?n.autoRemove(s,i):!1)||typeof s>"u"||typeof s=="string"&&!s}const bE=(n,s,i)=>i.reduce((r,u)=>{const d=u.getValue(n);return r+(typeof d=="number"?d:0)},0),wE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r>d||r===void 0&&d>=d)&&(r=d)}),r},CE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r<d||r===void 0&&d>=d)&&(r=d)}),r},jE=(n,s,i)=>{let r,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(r===void 0?h>=h&&(r=u=h):(r>h&&(r=h),u<h&&(u=h)))}),[r,u]},EE=(n,s)=>{let i=0,r=0;if(s.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,r+=d)}),i)return r/i},NE=(n,s)=>{if(!s.length)return;const i=s.map(d=>d.getValue(n));if(!hE(i))return;if(i.length===1)return i[0];const r=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[r]:(u[r-1]+u[r])/2},_E=(n,s)=>Array.from(new Set(s.map(i=>i.getValue(n))).values()),ME=(n,s)=>new Set(s.map(i=>i.getValue(n))).size,RE=(n,s)=>s.length,Kd={sum:bE,min:wE,max:CE,extent:jE,mean:EE,median:NE,unique:_E,uniqueCount:ME,count:RE},TE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var s,i;return(s=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?s:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:Sn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,s)=>{n.toggleGrouping=()=>{s.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(r=>r!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,r;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((r=s.options.enableGrouping)!=null?r:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);if(typeof r=="number")return Kd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kd.extent},n.getAggregationFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(r=s.options.aggregationFns)==null?void 0:r[n.columnDef.aggregationFn])!=null?i:Kd[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=s=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(s),n.resetGrouping=s=>{var i,r;n.setGrouping(s?[]:(i=(r=n.initialState)==null?void 0:r.grouping)!=null?i:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,s)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const r=s.getColumn(i);return r!=null&&r.columnDef.getGroupingValue?(n._groupingValuesCache[i]=r.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,s,i,r)=>{n.getIsGrouped=()=>s.getIsGrouped()&&s.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&s.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function AE(n,s,i){if(!(s!=null&&s.length)||!i)return n;const r=n.filter(d=>!s.includes(d.id));return i==="remove"?r:[...s.map(d=>n.find(h=>h.id===d)).filter(Boolean),...r]}const OE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:Sn("columnOrder",n)}),createColumn:(n,s)=>{n.getIndex=xe(i=>[Hr(s,i)],i=>i.findIndex(r=>r.id===n.id),Se(s.options,"debugColumns")),n.getIsFirstColumn=i=>{var r;return((r=Hr(s,i)[0])==null?void 0:r.id)===n.id},n.getIsLastColumn=i=>{var r;const u=Hr(s,i);return((r=u[u.length-1])==null?void 0:r.id)===n.id}},createTable:n=>{n.setColumnOrder=s=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(s),n.resetColumnOrder=s=>{var i;n.setColumnOrder(s?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=xe(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(s,i,r)=>u=>{let d=[];if(!(s!=null&&s.length))d=u;else{const h=[...s],m=[...u];for(;m.length&&h.length;){const p=h.shift(),y=m.findIndex(x=>x.id===p);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return AE(d,i,r)},Se(n.options,"debugTable"))}},Zd=()=>({left:[],right:[]}),zE={getInitialState:n=>({columnPinning:Zd(),...n}),getDefaultOptions:n=>({onColumnPinningChange:Sn("columnPinning",n)}),createColumn:(n,s)=>{n.pin=i=>{const r=n.getLeafColumns().map(u=>u.id).filter(Boolean);s.setColumnPinning(u=>{var d,h;if(i==="right"){var m,p;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(r!=null&&r.includes(v))),right:[...((p=u==null?void 0:u.right)!=null?p:[]).filter(v=>!(r!=null&&r.includes(v))),...r]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(r!=null&&r.includes(v))),...r],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(r!=null&&r.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(r!=null&&r.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(r!=null&&r.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(r=>{var u,d,h;return((u=r.columnDef.enablePinning)!=null?u:!0)&&((d=(h=s.options.enableColumnPinning)!=null?h:s.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:r,right:u}=s.getState().columnPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();return u?(i=(r=s.getState().columnPinning)==null||(r=r[u])==null?void 0:r.indexOf(n.id))!=null?i:-1:0}},createRow:(n,s)=>{n.getCenterVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left,s.getState().columnPinning.right],(i,r,u)=>{const d=[...r??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Se(s.options,"debugRows")),n.getLeftVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Se(s.options,"debugRows")),n.getRightVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.right],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Se(s.options,"debugRows"))},createTable:n=>{n.setColumnPinning=s=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(s),n.resetColumnPinning=s=>{var i,r;return n.setColumnPinning(s?Zd():(i=(r=n.initialState)==null?void 0:r.columnPinning)!=null?i:Zd())},n.getIsSomeColumnsPinned=s=>{var i;const r=n.getState().columnPinning;if(!s){var u,d;return!!((u=r.left)!=null&&u.length||(d=r.right)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n.getLeftLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getRightLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getCenterLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r)=>{const u=[...i??[],...r??[]];return s.filter(d=>!u.includes(d.id))},Se(n.options,"debugColumns"))}};function DE(n){return n||(typeof document<"u"?document:null)}const Mu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Pd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),HE={getDefaultColumnDef:()=>Mu,getInitialState:n=>({columnSizing:{},columnSizingInfo:Pd(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sn("columnSizing",n),onColumnSizingInfoChange:Sn("columnSizingInfo",n)}),createColumn:(n,s)=>{n.getSize=()=>{var i,r,u;const d=s.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Mu.minSize,(r=d??n.columnDef.size)!=null?r:Mu.size),(u=n.columnDef.maxSize)!=null?u:Mu.maxSize)},n.getStart=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.getAfter=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.resetSize=()=>{s.setColumnSizing(i=>{let{[n.id]:r,...u}=i;return u})},n.getCanResize=()=>{var i,r;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((r=s.options.enableColumnResizing)!=null?r:!0)},n.getIsResizing=()=>s.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,s)=>{n.getSize=()=>{let i=0;const r=u=>{if(u.subHeaders.length)u.subHeaders.forEach(r);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return r(n),i},n.getStart=()=>{if(n.index>0){const i=n.headerGroup.headers[n.index-1];return i.getStart()+i.getSize()}return 0},n.getResizeHandler=i=>{const r=s.getColumn(n.column.id),u=r==null?void 0:r.getCanResize();return d=>{if(!r||!u||(d.persist==null||d.persist(),Jd(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[r.id,r.getSize()]],p=Jd(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(R,j)=>{typeof j=="number"&&(s.setColumnSizingInfo(F=>{var T,H;const D=s.options.columnResizeDirection==="rtl"?-1:1,z=(j-((T=F==null?void 0:F.startOffset)!=null?T:0))*D,Y=Math.max(z/((H=F==null?void 0:F.startSize)!=null?H:0),-.999999);return F.columnSizingStart.forEach(te=>{let[k,ne]=te;y[k]=Math.round(Math.max(ne+ne*Y,0)*100)/100}),{...F,deltaOffset:z,deltaPercentage:Y}}),(s.options.columnResizeMode==="onChange"||R==="end")&&s.setColumnSizing(F=>({...F,...y})))},v=R=>x("move",R),b=R=>{x("end",R),s.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=DE(i),C={moveHandler:R=>v(R.clientX),upHandler:R=>{w==null||w.removeEventListener("mousemove",C.moveHandler),w==null||w.removeEventListener("mouseup",C.upHandler),b(R.clientX)}},N={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),v(R.touches[0].clientX),!1),upHandler:R=>{var j;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),b((j=R.touches[0])==null?void 0:j.clientX)}},M=LE()?{passive:!1}:!1;Jd(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",C.moveHandler,M),w==null||w.addEventListener("mouseup",C.upHandler,M)),s.setColumnSizingInfo(R=>({...R,startOffset:p,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:r.id}))}}},createTable:n=>{n.setColumnSizing=s=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(s),n.setColumnSizingInfo=s=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(s),n.resetColumnSizing=s=>{var i;n.setColumnSizing(s?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=s=>{var i;n.setColumnSizingInfo(s?Pd():(i=n.initialState.columnSizingInfo)!=null?i:Pd())},n.getTotalSize=()=>{var s,i;return(s=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getLeftTotalSize=()=>{var s,i;return(s=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getCenterTotalSize=()=>{var s,i;return(s=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getRightTotalSize=()=>{var s,i;return(s=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0}}};let Ru=null;function LE(){if(typeof Ru=="boolean")return Ru;let n=!1;try{const s={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,s),window.removeEventListener("test",i)}catch{n=!1}return Ru=n,Ru}function Jd(n){return n.type==="touchstart"}const UE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:Sn("columnVisibility",n)}),createColumn:(n,s)=>{n.toggleVisibility=i=>{n.getCanHide()&&s.setColumnVisibility(r=>({...r,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,r;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(r=s.getState().columnVisibility)==null?void 0:r[n.id])!=null?i:!0},n.getCanHide=()=>{var i,r;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((r=s.options.enableHiding)!=null?r:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,s)=>{n._getAllVisibleCells=xe(()=>[n.getAllCells(),s.getState().columnVisibility],i=>i.filter(r=>r.column.getIsVisible()),Se(s.options,"debugRows")),n.getVisibleCells=xe(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,r,u)=>[...i,...r,...u],Se(s.options,"debugRows"))},createTable:n=>{const s=(i,r)=>xe(()=>[r(),r().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Se(n.options,"debugColumns"));n.getVisibleFlatColumns=s("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=s("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=s("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=s("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=s("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var r;n.setColumnVisibility(i?{}:(r=n.initialState.columnVisibility)!=null?r:{})},n.toggleAllColumnsVisible=i=>{var r;i=(r=i)!=null?r:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,d)=>({...u,[d.id]:i||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(i=>!(i.getIsVisible!=null&&i.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(i=>i.getIsVisible==null?void 0:i.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>i=>{var r;n.toggleAllColumnsVisible((r=i.target)==null?void 0:r.checked)}}};function Hr(n,s){return s?s==="center"?n.getCenterVisibleLeafColumns():s==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const VE={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},$E={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:Sn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:s=>{var i;const r=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[s.id])==null?void 0:i.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(n,s)=>{n.getCanGlobalFilter=()=>{var i,r,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((r=s.options.enableGlobalFilter)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&((d=s.options.getColumnCanGlobalFilter==null?void 0:s.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Tl.includesString,n.getGlobalFilterFn=()=>{var s,i;const{globalFilterFn:r}=n.options;return Ju(r)?r:r==="auto"?n.getGlobalAutoFilterFn():(s=(i=n.options.filterFns)==null?void 0:i[r])!=null?s:Tl[r]},n.setGlobalFilter=s=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(s)},n.resetGlobalFilter=s=>{n.setGlobalFilter(s?void 0:n.initialState.globalFilter)}}},FE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:Sn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let s=!1,i=!1;n._autoResetExpanded=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?r:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=r=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(r),n.toggleAllRowsExpanded=r=>{r??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=r=>{var u,d;n.setExpanded(r?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const r=n.getState().expanded;return r===!0||Object.values(r).some(Boolean)},n.getIsAllRowsExpanded=()=>{const r=n.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let r=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");r=Math.max(r,h.length)}),r},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,s)=>{n.toggleExpanded=i=>{s.setExpanded(r=>{var u;const d=r===!0?!0:!!(r!=null&&r[n.id]);let h={};if(r===!0?Object.keys(s.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=r,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...p}=h;return p}return r})},n.getIsExpanded=()=>{var i;const r=s.getState().expanded;return!!((i=s.options.getIsRowExpanded==null?void 0:s.options.getIsRowExpanded(n))!=null?i:r===!0||r!=null&&r[n.id])},n.getCanExpand=()=>{var i,r,u;return(i=s.options.getRowCanExpand==null?void 0:s.options.getRowCanExpand(n))!=null?i:((r=s.options.enableExpanding)!=null?r:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,r=n;for(;i&&r.parentId;)r=s.getRow(r.parentId,!0),i=r.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},Bh=0,kh=10,Wd=()=>({pageIndex:Bh,pageSize:kh}),BE={getInitialState:n=>({...n,pagination:{...Wd(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:Sn("pagination",n)}),createTable:n=>{let s=!1,i=!1;n._autoResetPageIndex=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?r:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=r=>{const u=d=>ba(r,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=r=>{var u;n.setPagination(r?Wd():(u=n.initialState.pagination)!=null?u:Wd())},n.setPageIndex=r=>{n.setPagination(u=>{let d=ba(r,u.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...u,pageIndex:d}})},n.resetPageIndex=r=>{var u,d;n.setPageIndex(r?Bh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:Bh)},n.resetPageSize=r=>{var u,d;n.setPageSize(r?kh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:kh)},n.setPageSize=r=>{n.setPagination(u=>{const d=Math.max(1,ba(r,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=r=>n.setPagination(u=>{var d;let h=ba(r,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=xe(()=>[n.getPageCount()],r=>{let u=[];return r&&r>0&&(u=[...new Array(r)].fill(null).map((d,h)=>h)),u},Se(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:r}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:r<u-1},n.previousPage=()=>n.setPageIndex(r=>r-1),n.nextPage=()=>n.setPageIndex(r=>r+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var r;return(r=n.options.pageCount)!=null?r:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var r;return(r=n.options.rowCount)!=null?r:n.getPrePaginationRowModel().rows.length}}},eh=()=>({top:[],bottom:[]}),kE={getInitialState:n=>({rowPinning:eh(),...n}),getDefaultOptions:n=>({onRowPinningChange:Sn("rowPinning",n)}),createRow:(n,s)=>{n.pin=(i,r,u)=>{const d=r?n.getLeafRows().map(p=>{let{id:y}=p;return y}):[],h=u?n.getParentRows().map(p=>{let{id:y}=p;return y}):[],m=new Set([...h,n.id,...d]);s.setRowPinning(p=>{var y,x;if(i==="bottom"){var v,b;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((b=p==null?void 0:p.bottom)!=null?b:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,C;return{top:[...((w=p==null?void 0:p.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((C=p==null?void 0:p.bottom)!=null?C:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=p==null?void 0:p.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=p==null?void 0:p.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:r,enablePinning:u}=s.options;return typeof r=="function"?r(n):(i=r??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:r,bottom:u}=s.getState().rowPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?s.getTopRows():s.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(r=d==null?void 0:d.indexOf(n.id))!=null?r:-1}},createTable:n=>{n.setRowPinning=s=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(s),n.resetRowPinning=s=>{var i,r;return n.setRowPinning(s?eh():(i=(r=n.initialState)==null?void 0:r.rowPinning)!=null?i:eh())},n.getIsSomeRowsPinned=s=>{var i;const r=n.getState().rowPinning;if(!s){var u,d;return!!((u=r.top)!=null&&u.length||(d=r.bottom)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n._getPinnedRows=(s,i,r)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(i??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(i??[]).map(h=>s.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:r}))},n.getTopRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(s,i)=>n._getPinnedRows(s,i,"top"),Se(n.options,"debugRows")),n.getBottomRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(s,i)=>n._getPinnedRows(s,i,"bottom"),Se(n.options,"debugRows")),n.getCenterRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(s,i,r)=>{const u=new Set([...i??[],...r??[]]);return s.filter(d=>!u.has(d.id))},Se(n.options,"debugRows"))}},GE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:Sn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=s=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(s),n.resetRowSelection=s=>{var i;return n.setRowSelection(s?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=s=>{n.setRowSelection(i=>{s=typeof s<"u"?s:!n.getIsAllRowsSelected();const r={...i},u=n.getPreGroupedRowModel().flatRows;return s?u.forEach(d=>{d.getCanSelect()&&(r[d.id]=!0)}):u.forEach(d=>{delete r[d.id]}),r})},n.toggleAllPageRowsSelected=s=>n.setRowSelection(i=>{const r=typeof s<"u"?s:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{Gh(u,d.id,r,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getCoreRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getFilteredSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getGroupedSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getSortedRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const s=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let r=!!(s.length&&Object.keys(i).length);return r&&s.some(u=>u.getCanSelect()&&!i[u.id])&&(r=!1),r},n.getIsAllPageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let r=!!s.length;return r&&s.some(u=>!i[u.id])&&(r=!1),r},n.getIsSomeRowsSelected=()=>{var s;const i=Object.keys((s=n.getState().rowSelection)!=null?s:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:s.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>s=>{n.toggleAllRowsSelected(s.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>s=>{n.toggleAllPageRowsSelected(s.target.checked)}},createRow:(n,s)=>{n.toggleSelected=(i,r)=>{const u=n.getIsSelected();s.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return Gh(m,n.id,i,(h=r==null?void 0:r.selectChildren)!=null?h:!0,s),m})},n.getIsSelected=()=>{const{rowSelection:i}=s.getState();return rm(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof s.options.enableRowSelection=="function"?s.options.enableRowSelection(n):(i=s.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof s.options.enableSubRowSelection=="function"?s.options.enableSubRowSelection(n):(i=s.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof s.options.enableMultiRowSelection=="function"?s.options.enableMultiRowSelection(n):(i=s.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return r=>{var u;i&&n.toggleSelected((u=r.target)==null?void 0:u.checked)}}}},Gh=(n,s,i,r,u)=>{var d;const h=u.getRow(s,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[s]=!0)):delete n[s],r&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>Gh(n,m.id,i,r,u))};function th(n,s){const i=n.getState().rowSelection,r=[],u={},d=function(h,m){return h.map(p=>{var y;const x=rm(p,i);if(x&&(r.push(p),u[p.id]=p),(y=p.subRows)!=null&&y.length&&(p={...p,subRows:d(p.subRows)}),x)return p}).filter(Boolean)};return{rows:d(s.rows),flatRows:r,rowsById:u}}function rm(n,s){var i;return(i=s[n.id])!=null?i:!1}function qh(n,s,i){var r;if(!((r=n.subRows)!=null&&r.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(rm(h,s)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=qh(h,s);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const Qh=/([0-9]+)/gm,qE=(n,s,i)=>sx(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),QE=(n,s,i)=>sx(wa(n.getValue(i)),wa(s.getValue(i))),YE=(n,s,i)=>om(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),IE=(n,s,i)=>om(wa(n.getValue(i)),wa(s.getValue(i))),XE=(n,s,i)=>{const r=n.getValue(i),u=s.getValue(i);return r>u?1:r<u?-1:0},KE=(n,s,i)=>om(n.getValue(i),s.getValue(i));function om(n,s){return n===s?0:n>s?1:-1}function wa(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function sx(n,s){const i=n.split(Qh).filter(Boolean),r=s.split(Qh).filter(Boolean);for(;i.length&&r.length;){const u=i.shift(),d=r.shift(),h=parseInt(u,10),m=parseInt(d,10),p=[h,m].sort();if(isNaN(p[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(p[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-r.length}const Er={alphanumeric:qE,alphanumericCaseSensitive:QE,text:YE,textCaseSensitive:IE,datetime:XE,basic:KE},ZE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:Sn("sorting",n),isMultiSortEvent:s=>s.shiftKey}),createColumn:(n,s)=>{n.getAutoSortingFn=()=>{const i=s.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const u of i){const d=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return Er.datetime;if(typeof d=="string"&&(r=!0,d.split(Qh).length>1))return Er.alphanumeric}return r?Er.text:Er.basic},n.getAutoSortDir=()=>{const i=s.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(r=s.options.sortingFns)==null?void 0:r[n.columnDef.sortingFn])!=null?i:Er[n.columnDef.sortingFn]},n.toggleSorting=(i,r)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;s.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),p=h==null?void 0:h.findIndex(w=>w.id===n.id);let y=[],x,v=d?i:u==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&r?m?x="toggle":x="add":h!=null&&h.length&&p!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var b;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((b=s.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else x==="toggle"?y=h.map(w=>w.id===n.id?{...w,desc:v}:w):x==="remove"?y=h.filter(w=>w.id!==n.id):y=[{id:n.id,desc:v}];return y})},n.getFirstSortDir=()=>{var i,r;return((i=(r=n.columnDef.sortDescFirst)!=null?r:s.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var r,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((r=s.options.enableSortingRemoval)==null||r)&&(!(i&&(u=s.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,r;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((r=s.options.enableSorting)!=null?r:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,r;return(i=(r=n.columnDef.enableMultiSort)!=null?r:s.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const r=(i=s.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return r?r.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,r;return(i=(r=s.getState().sorting)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{s.setSorting(i=>i!=null&&i.length?i.filter(r=>r.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return r=>{i&&(r.persist==null||r.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?s.options.isMultiSortEvent==null?void 0:s.options.isMultiSortEvent(r):!1))}}},createTable:n=>{n.setSorting=s=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(s),n.resetSorting=s=>{var i,r;n.setSorting(s?[]:(i=(r=n.initialState)==null?void 0:r.sorting)!=null?i:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},PE=[vE,UE,OE,zE,xE,SE,VE,$E,ZE,TE,FE,BE,kE,GE,HE];function JE(n){var s,i;const r=[...PE,...(s=n._features)!=null?s:[]];let u={_features:r};const d=u._features.reduce((b,w)=>Object.assign(b,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=b=>u.options.mergeOptions?u.options.mergeOptions(d,b):{...d,...b};let p={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(b=>{var w;p=(w=b.getInitialState==null?void 0:b.getInitialState(p))!=null?w:p});const y=[];let x=!1;const v={_features:r,options:{...d,...n},initialState:p,_queue:b=>{y.push(b),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:b=>{const w=ba(b,u.options);u.options=h(w)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,w,C)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,w,C))!=null?N:`${C?[C.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,w)=>{let C=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!C&&(C=u.getCoreRowModel().rowsById[b],!C))throw new Error;return C},_getDefaultColumnDef:xe(()=>[u.options.defaultColumn],b=>{var w;return b=(w=b)!=null?w:{},{header:C=>{const N=C.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:C=>{var N,M;return(N=(M=C.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((C,N)=>Object.assign(C,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},Se(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:xe(()=>[u._getColumnDefs()],b=>{const w=function(C,N,M){return M===void 0&&(M=0),C.map(R=>{const j=pE(u,R,M,N),F=R;return j.columns=F.columns?w(F.columns,j,M+1):[],j})};return w(b)},Se(n,"debugColumns")),getAllFlatColumns:xe(()=>[u.getAllColumns()],b=>b.flatMap(w=>w.getFlatColumns()),Se(n,"debugColumns")),_getAllFlatColumnsById:xe(()=>[u.getAllFlatColumns()],b=>b.reduce((w,C)=>(w[C.id]=C,w),{}),Se(n,"debugColumns")),getAllLeafColumns:xe(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,w)=>{let C=b.flatMap(N=>N.getLeafColumns());return w(C)},Se(n,"debugColumns")),getColumn:b=>u._getAllFlatColumnsById()[b]};Object.assign(u,v);for(let b=0;b<u._features.length;b++){const w=u._features[b];w==null||w.createTable==null||w.createTable(u)}return u}function ix(){return n=>xe(()=>[n.options.data],s=>{const i={rows:[],flatRows:[],rowsById:{}},r=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=yE(n,n._getRowId(u[y],y,h),u[y],y,d,void 0,h==null?void 0:h.id);if(i.flatRows.push(x),i.rowsById[x.id]=x,m.push(x),n.options.getSubRows){var p;x.originalSubRows=n.options.getSubRows(u[y],y),(p=x.originalSubRows)!=null&&p.length&&(x.subRows=r(x.originalSubRows,d+1,x))}}return m};return i.rows=r(s),i},Se(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function rx(){return n=>xe(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(s,i,r)=>!i.rows.length||s!==!0&&!Object.keys(s??{}).length||!r?i:WE(i),Se(n.options,"debugTable"))}function WE(n){const s=[],i=r=>{var u;s.push(r),(u=r.subRows)!=null&&u.length&&r.getIsExpanded()&&r.subRows.forEach(i)};return n.rows.forEach(i),{rows:s,flatRows:n.flatRows,rowsById:n.rowsById}}function eN(){return n=>xe(()=>[n.getState().sorting,n.getPreSortedRowModel()],(s,i)=>{if(!i.rows.length||!(s!=null&&s.length))return i;const r=n.getState().sorting,u=[],d=r.filter(p=>{var y;return(y=n.getColumn(p.id))==null?void 0:y.getCanSort()}),h={};d.forEach(p=>{const y=n.getColumn(p.id);y&&(h[p.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=p=>{const y=p.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var b;const C=d[w],N=h[C.id],M=N.sortUndefined,R=(b=C==null?void 0:C.desc)!=null?b:!1;let j=0;if(M){const F=x.getValue(C.id),T=v.getValue(C.id),H=F===void 0,D=T===void 0;if(H||D){if(M==="first")return H?-1:1;if(M==="last")return H?1:-1;j=H&&D?0:H?M:-M}}if(j===0&&(j=N.sortingFn(x,v,C.id)),j!==0)return R&&(j*=-1),N.invertSorting&&(j*=-1),j}return x.index-v.index}),y.forEach(x=>{var v;u.push(x),(v=x.subRows)!=null&&v.length&&(x.subRows=m(x.subRows))}),y};return{rows:m(i.rows),flatRows:u,rowsById:i.rowsById}},Se(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
271
280
  * react-table
272
281
  *
273
282
  * Copyright (c) TanStack
@@ -276,4 +285,4 @@ Error generating stack: `+a.message+`
276
285
  * LICENSE.md file in the root directory of this source tree.
277
286
  *
278
287
  * @license MIT
279
- */function bu(n,i){return n?S_(n)?T.createElement(n,i):n:null}function S_(n){return x_(n)||typeof n=="function"||b_(n)}function x_(n){return typeof n=="function"&&(()=>{const i=Object.getPrototypeOf(n);return i.prototype&&i.prototype.isReactComponent})()}function b_(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function T1(n){const i={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[s]=T.useState(()=>({current:p_(i)})),[o,u]=T.useState(()=>s.current.initialState);return s.current.setOptions(f=>({...f,...n,state:{...o,...n.state},onStateChange:d=>{u(d),n.onStateChange==null||n.onStateChange(d)}})),s.current}function C_(n){return typeof n=="object"?n.key:n}function E_(n,i){const s=n.length;return new Proxy(n,{get(o,u,f){if(typeof u=="string"){const d=u.charCodeAt(0);if(d>=48&&d<=57){const g=+u;if(Number.isInteger(g)&&g>=0&&g<s){let p=o[g];if(typeof p!="object"){const S=i[g*2];p=o[g]={index:g,key:p,start:S,size:i[g*2+1],end:S+i[g*2+1],lane:0}}return p}}if(u==="length")return s}return Reflect.get(o,u,f)}})}function Li(n,i,s){let o=s.initialDeps??[],u,f=!0;function d(){const g=n();return(g.length!==o.length||g.some((S,y)=>o[y]!==S))&&(o=g,u=i(...g),s!=null&&s.onChange&&!(f&&s.skipInitialOnChange)&&s.onChange(u),f=!1),u}return d.updateDeps=g=>{o=g},d}function B0(n,i){if(n===void 0)throw new Error("Unexpected undefined");return n}const G0=(n,i)=>Math.abs(n-i)<1.01,w_=(n,i,s)=>{let o;return Object.assign(function(...u){n.clearTimeout(o),o=n.setTimeout(()=>i.apply(this,u),s)},{cancel:()=>{n.clearTimeout(o)}})};let so;const Ad=()=>{if(so!==void 0)return so;if(typeof navigator>"u")return so=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return so=!0;const n=navigator.maxTouchPoints;return so=navigator.platform==="MacIntel"&&n!==void 0&&n>0},q0=n=>{const{offsetWidth:i,offsetHeight:s}=n;return{width:i,height:s}},__=n=>n,R_=n=>{const i=Math.max(n.startIndex-n.overscan,0),o=Math.min(n.endIndex+n.overscan,n.count-1)-i+1,u=new Array(o);for(let f=0;f<o;f++)u[f]=i+f;return u},T_=(n,i)=>{const s=n.scrollElement;if(!s)return;const o=n.targetWindow;if(!o)return;const u=d=>{const{width:g,height:p}=d;i({width:Math.round(g),height:Math.round(p)})};if(u(q0(s)),!o.ResizeObserver)return()=>{};const f=new o.ResizeObserver(d=>{const g=()=>{const p=d[0];if(p!=null&&p.borderBoxSize){const S=p.borderBoxSize[0];if(S){u({width:S.inlineSize,height:S.blockSize});return}}u(q0(s))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(g):g()});return f.observe(s,{box:"border-box"}),()=>{f.unobserve(s)}},Cu={passive:!0},N_=typeof window>"u"?!0:"onscrollend"in window,M_=(n,i,s)=>{const o=n.scrollElement;if(!o)return;const u=n.targetWindow;if(!u)return;const f=n.options.useScrollendEvent&&N_;let d=0;const g=f?null:w_(u,()=>i(s(o),!1),n.options.isScrollingResetDelay),p=v=>()=>{d=s(o),g==null||g(),i(d,v)},S=p(!0),y=p(!1);return o.addEventListener("scroll",S,Cu),f&&o.addEventListener("scrollend",y,Cu),()=>{o.removeEventListener("scroll",S),f&&o.removeEventListener("scrollend",y),g==null||g.cancel()}},j_=(n,i)=>M_(n,i,s=>{const{horizontal:o,isRtl:u}=n.options;return o?s.scrollLeft*(u&&-1||1):s.scrollTop}),A_=(n,i,s)=>{if(s.options.useCachedMeasurements){const o=s.indexFromElement(n),u=s.options.getItemKey(o);return s.itemSizeCache.get(u)??s.options.estimateSize(o)}if(i!=null&&i.borderBoxSize){const o=i.borderBoxSize[0];if(o)return Math.round(o[s.options.horizontal?"inlineSize":"blockSize"])}if(!i){const o=s.indexFromElement(n),u=s.options.getItemKey(o),f=s.itemSizeCache.get(u);if(f!==void 0)return f}return n[s.options.horizontal?"offsetWidth":"offsetHeight"]},O_=(n,{adjustments:i=0,behavior:s},o)=>{var u,f;(f=(u=o.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[o.options.horizontal?"left":"top"]:n+i,behavior:s})},z_=O_;function D_(n,i,s,o){if(i===0)return!1;const u=o(0),f=new Set;let d=0;for(;d<n;){const p=s(d);if(p===u)break;f.add(p),d++}const g=n-d;if(g===0||g>=i)return!1;for(let p=0;p<g;p++)if(o(p)!==s(d+p))return!1;for(let p=g;p<i;p++)if(f.has(o(p)))return!1;return!0}class U_{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var s,o,u;return((u=(o=(s=this.targetWindow)==null?void 0:s.performance)==null?void 0:o.now)==null?void 0:u.call(o))??Date.now()},this.observer=(()=>{let s=null;const o=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{const d=()=>{const g=f.target,p=this.indexFromElement(g);if(!g.isConnected){this.observer.unobserve(g);for(const[S,y]of this.elementsCache)if(y===g){this.elementsCache.delete(S);break}return}this.isIndexInRange(p)&&this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(g,f,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(d):d()})}));return{disconnect:()=>{var u;(u=o())==null||u.disconnect(),s=null},observe:u=>{var f;return(f=o())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=o())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=s=>{var o;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:__,rangeExtractor:R_,onChange:()=>{},measureElement:A_,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in s){const b=s[v];b!==void 0&&(u[v]=b)}const f=this.options;let d=null,g=null,p=!1;if(f!==void 0&&f.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=f.count,b=u.count,C=this.getMeasurements(),E=((o=this._singleLaneMeasurements)==null?void 0:o.items)??C,N=G=>C_(E[G]),_=v>0?N(0):null,w=v>0?N(v-1):null;if(b!==v||v>0&&b>0&&(u.getItemKey(0)!==_||u.getItemKey(b-1)!==w)){p=!0;const G=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??C[0]:null;G&&(d=[G.key,this.getScrollOffset()-G.start]);const B=u.followOnAppend===!0?"auto":u.followOnAppend||null;B&&b>0&&this.isAtEnd(f.scrollEndThreshold)&&(v===0||u.getItemKey(b-1)!==w)&&(b>v||D_(v,b,N,u.getItemKey))&&(g=B)}}this.options=u,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let S=!1,y=0;if(d&&this.scrollOffset!==null){const[v,b]=d,C=this.getMeasurements(),{count:E,getItemKey:N}=this.options;let _=0;for(;_<E&&N(_)!==v;)_++;if(_<E){const w=C[_];if(w){const j=Math.max(0,w.start+b);!g&&j!==this.scrollOffset&&(y=j-this.scrollOffset,this.scrollOffset=j,S=!0)}}}(S||g)&&(this.pendingScrollAnchor=[S?d[0]:null,S?d[1]:0,g,y])},this.notify=s=>{var o,u;(u=(o=this.options).onChange)==null||u.call(o,this,s)},this.maybeNotify=Li(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s,o;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(d=>{this.observer.observe(d)}),this.unsubs.push(this.options.observeElementRect(this,d=>{this.scrollRect=d,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(d,g)=>{if(g&&this._intendedScrollOffset===null&&d===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(d-this._intendedScrollOffset)<1.5&&(d=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(d-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const p=this.getScrollOffset();this.scrollDirection=g?p===d?this.scrollDirection:p<d?"forward":"backward":null,this.scrollOffset=d,this.isScrolling=g,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const d=this.scrollElement,g=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},p=()=>{this._iosTouching=!1,!(!Ad()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};d.addEventListener("touchstart",g,Cu),d.addEventListener("touchend",p,Cu),this.unsubs.push(()=>{d.removeEventListener("touchstart",g),d.removeEventListener("touchend",p),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const f=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,f&&this.scrollElement&&this.options.enabled){const[d,g,p,S]=f;d!==null&&!p&&(Ad()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?S!==0&&(this._iosDeferredAdjustment+=S):((o=this.scrollState)==null?void 0:o.behavior)==="smooth"&&!G0(this.getScrollOffset()-S,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),p&&this.scrollToEnd({behavior:p})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:s,maxAtWrite:o}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>o+.5&&(this._clampedAdjustment=s>u+.5?{target:s,maxAtWrite:u}:null,this._scrollToOffset(s,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const s=this.getScrollOffset(),o=this.getMaxScrollOffset();if(s<0||s>o)return;if(this._iosDeferredAdjustment<0&&s>=o-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(s,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Li(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(s,o,u,f,d,g,p,S)=>(this.prevLanes!==void 0&&this.prevLanes!==g&&(this.lanesChangedFlag=!0),this.prevLanes=g,this.pendingMin=null,{count:s,paddingStart:o,scrollMargin:u,getItemKey:f,enabled:d,lanes:g,laneAssignmentMode:p,gap:S}),{key:!1}),this.isIndexInRange=s=>s>=0&&s<this.options.count,this.getMeasurements=Li(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:s,paddingStart:o,scrollMargin:u,getItemKey:f,enabled:d,lanes:g,laneAssignmentMode:p,gap:S},y)=>{var v;const b=this.itemSizeCache;if(!d)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const j of this.laneAssignments.keys())j>=s&&this.laneAssignments.delete(j);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(j=>{this.itemSizeCache.set(j.key,j.size)}));const C=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1),g===1){const j=s*2;let O=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!O||O.length<j){const q=new Float64Array(j);O&&C>0&&q.set(O.subarray(0,C*2)),O=q}const G=C===0?new Array(s):this._singleLaneMeasurements.items.slice();let B;if(C===0)B=o+u;else{const q=C-1;B=O[q*2]+O[q*2+1]+S}for(let q=C;q<s;q++){const Z=f(q);G[q]=Z;const W=b.get(Z),oe=typeof W=="number"?W:this.options.estimateSize(q);O[q*2]=B,O[q*2+1]=oe,B+=oe+S}this._singleLaneMeasurements={flat:O,items:G};const K=E_(G,O);return this.measurementsCache=K,K}const E=this.measurementsCache.slice(0,C),N=new Array(g).fill(void 0),_=new Float64Array(g);let w=0;for(let j=0;j<C;j++){const O=E[j];O&&(N[O.lane]===void 0&&w++,N[O.lane]=j,_[O.lane]=O.end)}for(let j=C;j<s;j++){const O=f(j),G=this.laneAssignments.get(j);let B,K;const q=p==="estimate"||b.has(O);if(G!==void 0&&this.options.lanes>1){B=G;const Se=N[B],ae=Se!==void 0?E[Se]:void 0;K=ae?ae.end+S:o+u}else if(w===g){let Se=0,ae=_[0],Xe=N[0];for(let et=1;et<g;et++){const He=_[et];(He<ae||He===ae&&N[et]<Xe)&&(Se=et,ae=He,Xe=N[et])}B=Se,K=ae+S,q&&this.laneAssignments.set(j,B)}else B=j%this.options.lanes,K=o+u,q&&this.laneAssignments.set(j,B);const Z=b.get(O),W=typeof Z=="number"?Z:this.options.estimateSize(j),oe=K+W;E[j]={index:j,start:K,size:W,end:oe,key:O,lane:B},N[B]===void 0&&w++,N[B]=j,_[B]=oe}return this.measurementsCache=E,E},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Li(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,o,u,f)=>s.length===0||o===0?(this.range=null,null):(this.range=L_(s,o,u,f,f===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Li(()=>{let s=null,o=null;const u=this.calculateRange();return u&&(s=u.startIndex,o=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,o]},(s,o,u,f,d)=>f===null||d===null?[]:s({startIndex:f,endIndex:d,overscan:o,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const o=this.options.indexAttribute,u=s.getAttribute(o);return u?parseInt(u,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=s=>{var o;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((o=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:o.index);if(u!==void 0&&this.range){const f=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),d=Math.max(0,u-f),g=Math.min(this.options.count-1,u+f);return s>=d&&s<=g}return!0},this.measureElement=s=>{if(!s){this.elementsCache.forEach((d,g)=>{d.isConnected||(this.observer.unobserve(d),this.elementsCache.delete(g))});return}const o=this.indexFromElement(s);if(!this.isIndexInRange(o))return;const u=this.options.getItemKey(o),f=this.elementsCache.get(u);f!==s&&(f&&this.observer.unobserve(f),this.observer.observe(s),this.elementsCache.set(u,s)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(o)&&this.resizeItem(o,this.options.measureElement(s,void 0,this))},this.resizeItem=(s,o)=>{var u,f,d;if(!this.isIndexInRange(s))return;let g,p,S;const y=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&y!=null)S=this.options.getItemKey(s),p=y[s*2],g=y[s*2+1];else{const C=this.measurementsCache[s];if(!C)return;S=C.key,p=C.start,g=C.size}const v=this.itemSizeCache.get(S)??g,b=o-v;if(b!==0){const C=this.options.anchorTo==="end"&&((f=this.scrollState)==null?void 0:f.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,E=C?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,w=!this.itemSizeCache.has(S)?p<N:p+v<=N&&this.scrollDirection!=="backward",j=((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[s]??{index:s,key:S,start:p,size:g,end:p+g,lane:0},b,this):w);(this.pendingMin===null||s<this.pendingMin)&&(this.pendingMin=s),this.itemSizeCache.set(S,o),this.itemSizeCacheVersion++;let O=!1;C?O=this.applyScrollAdjustment(this.getTotalSize()-E):j&&(O=this.applyScrollAdjustment(b)),this.notify(O),this._retryClampedAdjustment()}},this.getVirtualItems=Li(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,o)=>{const u=[];for(let f=0,d=s.length;f<d;f++){const g=s[f],p=o[g];u.push(p)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{var o;const u=this.getMeasurements();if(u.length===0)return;const f=(o=this._singleLaneMeasurements)==null?void 0:o.flat,d=this.options.lanes===1&&f!=null,g=N1(0,u.length-1,d?p=>f[p*2]:p=>B0(u[p]).start,s);return B0(u[g])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(s=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=s,this.getOffsetForAlignment=(s,o,u=0)=>{if(!this.scrollElement)return 0;const f=this.getSize(),d=this.getScrollOffset();o==="auto"&&(o=s>=d+f?"end":"start"),o==="center"?s+=(u-f)/2:o==="end"&&(s-=f);const g=this.getMaxScrollOffset();return Math.max(Math.min(g,s),0)},this.getOffsetForIndex=(s,o="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const u=this.getSize(),f=this.getScrollOffset(),d=this.measurementsCache[s];if(!d)return;if(o==="auto")if(d.end>=f+u-this.options.scrollPaddingEnd)o="end";else if(d.start<=f+this.options.scrollPaddingStart)o="start";else return[f,o];if(o==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),o];const g=o==="end"?d.end+this.options.scrollPaddingEnd:d.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(g,o,d.size),o]},this.scrollToOffset=(s,{align:o="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const f=this.getOffsetForAlignment(s,o),d=this.now();this.scrollState={index:null,align:o,behavior:u,startedAt:d,lastTargetOffset:f,stableFrames:0},this._scrollToOffset(f,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(s,{align:o="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,s=Math.max(0,Math.min(s,this.options.count-1));const f=this.getOffsetForIndex(s,o);if(!f)return;const[d,g]=f,p=this.now();this.scrollState={index:s,align:g,behavior:u,startedAt:p,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(s,{behavior:o="auto"}={})=>{const u=this.getScrollOffset()+s,f=this.now();this.scrollState={index:null,align:"start",behavior:o,startedAt:f,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:s="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:s});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:s})},this.getTotalSize=()=>{var s,o;const u=this.getMeasurements();let f;if(u.length===0)f=this.options.paddingStart;else if(this.options.lanes===1){const d=u.length-1,g=(s=this._singleLaneMeasurements)==null?void 0:s.flat;g!=null?f=g[d*2]+g[d*2+1]:f=((o=u[d])==null?void 0:o.end)??0}else{const d=Array(this.options.lanes).fill(null);let g=u.length-1;for(;g>=0&&d.some(p=>p===null);){const p=u[g];d[p.lane]===null&&(d[p.lane]=p.end),g--}f=Math.max(...d.filter(p=>p!==null))}return Math.max(f-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const s=[];if(this.itemSizeCache.size===0)return s;const o=this.getMeasurements();for(const u of o)u&&this.itemSizeCache.has(u.key)&&s.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return s},this._scrollToOffset=(s,{adjustments:o,behavior:u})=>{this._intendedScrollOffset=s+(o??0),this.options.scrollToFn(s,{behavior:u,adjustments:o},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(i)}applyScrollAdjustment(i,s){if(i===0)return!1;if(Ad()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=i,!1;{const o=this.getScrollOffset()+this.scrollAdjustments+i,u=this.scrollElement,f=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=f!==null&&o>f+.5?{target:o,maxAtWrite:f}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:s}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const o=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=o?o[0]:this.scrollState.lastTargetOffset,f=1,d=u!==this.scrollState.lastTargetOffset;if(!d&&G0(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=f){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,d){const g=this.getSize()||600,p=Math.abs(u-this.getScrollOffset()),S=this.scrollState.behavior==="smooth"&&p>g;this.scrollState.lastTargetOffset=u,S||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:S?"smooth":"auto"})}this.scheduleScrollReconcile()}}const N1=(n,i,s,o)=>{for(;n<=i;){const u=(n+i)/2|0,f=s(u);if(f<o)n=u+1;else if(f>o)i=u-1;else return u}return n>0?n-1:0};function H_(n,i,s){let o=0;for(;o<=i;){const u=(o+i)/2|0,f=n[u*2];if(f<s)o=u+1;else if(f>s)i=u-1;else return u}return o>0?o-1:0}function L_(n,i,s,o,u){const f=n.length-1;if(n.length<=o)return{startIndex:0,endIndex:f};if(o===1&&u!==null){const S=H_(u,f,s);let y=S;const v=s+i;for(;y<f&&u[y*2]+u[y*2+1]<v;)y++;return{startIndex:S,endIndex:y}}let g=N1(0,f,S=>n[S].start,s),p=g;if(o===1)for(;p<f&&n[p].end<s+i;)p++;else if(o>1){const S=Array(o).fill(0);for(;p<f&&S.some(v=>v<s+i);){const v=n[p];S[v.lane]=v.end,p++}const y=Array(o).fill(s+i);for(;g>=0&&y.some(v=>v>=s);){const v=n[g];y[v.lane]=v.start,g--}g=Math.max(0,g-g%o),p=Math.min(f,p+(o-1-p%o))}return{startIndex:g,endIndex:p}}const Od=typeof document<"u"?T.useLayoutEffect:T.useEffect;function V_({useFlushSync:n=!0,directDomUpdates:i=!1,directDomUpdatesMode:s="transform",...o}){const u=T.useReducer(v=>v+1,0)[1],f=T.useRef({enabled:i,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});f.current.enabled=i,f.current.mode=s;const d=T.useRef(!1),g=v=>{const b=f.current;if(!b.enabled||!b.container)return;const C=v.getTotalSize();if(C!==b.lastSize){b.lastSize=C;const E=v.options.horizontal?"width":"height";b.container.style[E]=`${C}px`}},p=v=>{const b=f.current;if(!b.enabled||!b.container)return;g(v);const C=!!v.options.horizontal,E=b.mode==="transform",N=C?"left":"top",_=v.options.scrollMargin,w=v.getVirtualItems();for(const j of w){const O=j.start-_,G=v.elementsCache.get(j.key);G&&b.lastPositions.get(G)!==O&&(b.lastPositions.set(G,O),E?G.style.transform=C?`translate3d(${O}px, 0, 0)`:`translate3d(0, ${O}px, 0)`:G.style[N]=`${O}px`)}},S={...o,onChange:(v,b)=>{var C;const E=f.current;let N=!0;if(E.enabled){p(v);const _=v.range,w=E.prevRange;N=!w||w.isScrolling!==v.isScrolling||w.startIndex!==(_==null?void 0:_.startIndex)||w.endIndex!==(_==null?void 0:_.endIndex),N&&(E.prevRange=_?{startIndex:_.startIndex,endIndex:_.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!d.current?by.flushSync(u):u()),(C=o.onChange)==null||C.call(o,v,b)}},[y]=T.useState(()=>{const v=new U_(S),b=v.measureElement;return v.measureElement=C=>{d.current=!0;try{b(C)}finally{d.current=!1}},Object.assign(v,{containerRef:C=>{const E=f.current;if(E.container=C,E.lastSize=null,C&&E.enabled){const N=v.getTotalSize();E.lastSize=N;const _=v.options.horizontal?"width":"height";C.style[_]=`${N}px`}}})});return y.setOptions(S),Od(()=>y._didMount(),[]),Od(()=>(g(y),y._willUpdate())),Od(()=>{p(y)}),y}function F_(n){return V_({observeElementRect:T_,observeElementOffset:j_,scrollToFn:z_,...n})}const mu=58,Vi=38,B_=25;function M1({items:n,scrollRef:i,columnCount:s,getKey:o,render:u,onEndReached:f,endThreshold:d=15}){var N;const g=F_({count:n.length,getScrollElement:()=>i.current,estimateSize:()=>mu,overscan:8,scrollMargin:Vi,getItemKey:_=>o(n[_],_),initialRect:{width:1e3,height:Vi+mu*10}}),p=!((N=g.scrollRect)!=null&&N.height),S=p?n.slice(0,B_).map((_,w)=>({key:o(_,w),index:w,start:Vi+w*mu,end:Vi+(w+1)*mu})):g.getVirtualItems(),y=S[0],v=S[S.length-1],b=(v==null?void 0:v.index)??-1;T.useEffect(()=>{f&&b>=0&&b>=n.length-d&&f()},[b,n.length,d,f]);const C=!p&&y?y.start-Vi:0,E=!p&&v?g.getTotalSize()-(v.end-Vi):0;return h.jsxs(h.Fragment,{children:[C>0&&h.jsx("tbody",{"aria-hidden":!0,children:h.jsx("tr",{className:"vt-spacer",style:{height:C},children:h.jsx("td",{colSpan:s})})}),S.map(_=>h.jsx("tbody",{"data-index":_.index,ref:p?void 0:g.measureElement,children:u(n[_.index],_.index)},_.key)),E>0&&h.jsx("tbody",{"aria-hidden":!0,children:h.jsx("tr",{className:"vt-spacer",style:{height:E},children:h.jsx("td",{colSpan:s})})})]})}function fo({text:n,query:i}){const s=i.trim();if(!s||SE(s))return h.jsx(h.Fragment,{children:n});const o=[],u=n.toLowerCase(),f=s.toLowerCase();let d=0;for(let g=u.indexOf(f);g!==-1;g=u.indexOf(f,d))g>d&&o.push(n.slice(d,g)),o.push(h.jsx("mark",{children:n.slice(g,g+s.length)},g)),d=g+s.length;return o.push(n.slice(d)),h.jsx(h.Fragment,{children:o})}function k0({value:n,max:i,clonal:s}){return n===null?h.jsx("span",{style:{color:"var(--chev)"},children:"–"}):h.jsxs("span",{className:"vbar",children:[h.jsx("span",{className:"vbar-n",children:th(n)}),h.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[h.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/i,1)*100}%`}}),s&&h.jsx("span",{className:"vbar-tick",style:{left:`${1/i*100}%`}})]})]})}function G_({variant:n,showDriver:i}){return h.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[i&&n.is_driver&&h.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&h.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&h.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&h.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function q_(n){return`${n.ref}>${n.alt}`}function k_({variant:n,onLocate:i}){const[s,o]=T.useState(!1),u=`chr${n.chrom}:${n.pos}`,f=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${q_(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",th(n.normal_vaf)],["Mutant copies",EE(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",CE(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?th(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",wE(n)??"–"]];return h.jsxs("div",{className:"vt-detail-body",children:[h.jsx("dl",{className:"vt-facts",children:f.map(([d,g])=>h.jsxs("div",{children:[h.jsx("dt",{children:d}),h.jsx("dd",{children:g})]},d))}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(n),children:[h.jsx(eh,{size:14,"aria-hidden":!0}),"Show on copy number"]}),h.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[h.jsx(Vy,{size:14,"aria-hidden":!0}),s?"Copied":"Copy locus"]})]})]})}function $_({sort:n,current:i,onSort:s}){const o=i.replace(/^-/,"")===n.key,u=i.startsWith("-"),f=o?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return h.jsxs("button",{type:"button",className:"vt-sort","data-active":o,onClick:()=>s(f),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,o&&u?h.jsx(yu,{size:12,"aria-hidden":!0}):o?h.jsx(Ly,{size:12,"aria-hidden":!0}):h.jsx(yu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function Q_({data:n,rows:i,hasMore:s,loadingMore:o,onMore:u,table:f,fetching:d,showCcf:g,onTable:p,onHover:S,onLocate:y}){const[v,b]=T.useState({}),C=f.q,E=f.scope!=="drivers",N=T.useMemo(()=>[{id:"expand",header:()=>h.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:q})=>h.jsx("button",{type:"button",className:"vt-expand","aria-expanded":q.getIsExpanded(),"aria-label":`Details of ${q.original.gene??"this mutation"} ${q.original.protein_change??""}`.trim(),onClick:Z=>{Z.stopPropagation(),q.toggleExpanded()},onFocus:()=>S(q.original),children:h.jsx(Ch,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:q}})=>h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"vt-gene",children:h.jsx(fo,{text:q.gene??"–",query:C})}),h.jsx("span",{className:"vt-sub mono",children:vo(q.chrom,q.pos)})]})},{id:"change",header:"Change",cell:({row:{original:q}})=>h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"mono block text-[12.5px] font-medium",children:h.jsx(fo,{text:q.protein_change??"–",query:C})}),q.cdna_change&&h.jsx("span",{className:"vt-sub mono",children:h.jsx(fo,{text:q.cdna_change,query:C})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:q}})=>h.jsx("span",{className:q.effect_class==="truncating"?"font-semibold":void 0,children:JC(q.consequence,q.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:q}})=>h.jsx(k0,{value:q.vaf,max:1})},...g?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:q}})=>h.jsx(k0,{value:q.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:q}})=>h.jsx(G_,{variant:q,showDriver:E})}],[C,E,g,S]),_=T1({data:i,columns:N,getRowId:yE,getCoreRowModel:_1(),getExpandedRowModel:R1(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),w=f.sort.replace(/^-/,""),j=_.getVisibleLeafColumns().length,O=Zy(f)>0,G=T.useRef(null),B=JSON.stringify([f.scope,f.sort,f.q,f.effects,f.flags,f.range,f.ffpe]);T.useEffect(()=>{G.current&&(G.current.scrollTop=0)},[B]);const K=q=>q.toLocaleString("en-US");return h.jsxs("div",{className:"flex min-w-0 flex-col",children:[h.jsxs("div",{ref:G,className:"vt-scroll vt-viewport",onMouseLeave:()=>S(null),"aria-busy":d,children:[d&&h.jsx("div",{className:"vt-progress","aria-hidden":!0}),h.jsxs("table",{className:"vt",children:[h.jsx("thead",{children:_.getHeaderGroups().map(q=>h.jsx("tr",{children:q.headers.map(Z=>{var Se;const W=Z.column.columnDef.meta,oe=(Se=W==null?void 0:W.sorts)==null?void 0:Se.some(ae=>ae.key===w);return h.jsx("th",{className:W==null?void 0:W.className,"aria-sort":oe?f.sort.startsWith("-")?"descending":"ascending":void 0,children:W!=null&&W.sorts?h.jsx("span",{className:"vt-sorts",children:W.sorts.map(ae=>h.jsx($_,{sort:ae,current:f.sort,onSort:Xe=>p({sort:Xe})},ae.key))}):bu(Z.column.columnDef.header,Z.getContext())},Z.id)})},q.id))}),h.jsx(M1,{items:_.getRowModel().rows,scrollRef:G,columnCount:j,getKey:q=>q.id,onEndReached:s&&!o?u:void 0,render:q=>h.jsxs(h.Fragment,{children:[h.jsx("tr",{className:"vt-row","data-expanded":q.getIsExpanded(),onClick:()=>q.toggleExpanded(),onMouseEnter:()=>S(q.original),children:q.getVisibleCells().map(Z=>{var W;return h.jsx("td",{className:(W=Z.column.columnDef.meta)==null?void 0:W.className,children:bu(Z.column.columnDef.cell,Z.getContext())},Z.id)})}),q.getIsExpanded()&&h.jsx("tr",{className:"vt-detail",children:h.jsx("td",{colSpan:j,children:h.jsx(k_,{variant:q.original,onLocate:y})})})]})}),i.length===0&&h.jsx("tbody",{children:h.jsx("tr",{children:h.jsx("td",{colSpan:j,children:h.jsx("div",{className:"vt-empty",children:O?h.jsxs(h.Fragment,{children:["No mutations match these filters.",h.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>p({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${f.scope==="all"?"":`${f.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&h.jsxs("div",{className:"vt-foot",role:"status",children:[h.jsx("span",{children:i.length>=n.total?`${K(n.total)} ${n.total===1?"mutation":"mutations"}`:`${K(i.length)} of ${K(n.total)} mutations loaded`}),o?h.jsx("span",{children:"Loading more…"}):i.length<n.total?h.jsx("span",{children:"Scroll the table for more"}):null]})]})}const Y_=T.forwardRef(function({variants:i,rows:s,hasMore:o,loadingMore:u,onMore:f,variantsLoading:d,variantsFetching:g,density:p,densityLoading:S,picked:y,measure:v,onMeasure:b,table:C,onTable:E,hovered:N,onHover:_,onLocate:w,showCcf:j},O){var oe,Se;const G=(i==null?void 0:i.status)==="ok"?i.data??void 0:void 0,B=G==null?void 0:G.counts,K=(p==null?void 0:p.status)==="ok"?(oe=p.data)==null?void 0:oe.total:void 0,q=(p==null?void 0:p.status)==="ok"?(Se=p.data)==null?void 0:Se.ffpe:null,Z=ae=>ae===void 0?"":ae.toLocaleString("en-US"),W=C.range&&C.range.measure===v?[C.range.low,C.range.high]:null;return h.jsxs(Ou,{ref:O,title:"Mutations",subtitle:K!==void 0?`${Z(K)} PASS SNVs and indels${q&&!q.shown?", after the FFPE filter":""}`:void 0,lineage:i1(p==null?void 0:p.lineage,i==null?void 0:i.lineage),picked:y,className:"mut",info:"mutations",expandable:!0,controls:h.jsxs(h.Fragment,{children:[h.jsx(g1,{value:C.q,onChange:ae=>E({q:ae})}),h.jsx(zu,{label:"Which mutations",value:C.scope,onChange:ae=>E({scope:ae,sort:Ky[ae]}),options:[{value:"drivers",label:h.jsxs(h.Fragment,{children:["Drivers",h.jsx("span",{className:"seg-n",children:Z(B==null?void 0:B.drivers)})]})},{value:"coding",label:h.jsxs(h.Fragment,{children:["Coding",h.jsx("span",{className:"seg-n",children:Z(B==null?void 0:B.coding)})]})},{value:"all",label:h.jsxs(h.Fragment,{children:["All",h.jsx("span",{className:"seg-n",children:Z(B==null?void 0:B.all)})]})}]})]}),children:[h.jsx(Tw,{envelope:p,loading:S,measure:v,onMeasure:b,range:W,focus:N,onRange:ae=>{!ae&&!C.range||E({range:ae?{measure:v,low:ae[0],high:ae[1]}:null})},onGene:ae=>E({q:ae})}),G&&i&&i.warnings.length>0&&h.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:i.warnings.join(" ")}),G?h.jsxs("div",{className:"mut-body",children:[h.jsx(jw,{table:C,data:G,onChange:E}),h.jsx(Q_,{data:G,rows:s,hasMore:o,loadingMore:u,onMore:f,table:C,fetching:g,showCcf:j,onTable:E,onHover:_,onLocate:w})]}):h.jsx("div",{className:"mut-rule",children:h.jsx(To,{label:"mutations",envelope:i,loading:d,skeletonHeight:240,children:()=>null})})]})}),Nh={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},j1=["oncogene","tsg","both"],A1={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},I_={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function X_(n){return n?I_[n]??n:""}const K_={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function Mh(n){return n?K_[n]??n:"–"}function Z_(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function P_(n){return n.some(i=>i.left_expression||i.right_expression||i.expression)}function J_(n){const i={oncogene:0,tsg:0,both:0};for(const s of n)s.role&&(i[s.role]+=1);return i}function W_(n){const i=n.trim().match(Wy);if(!i)return null;const s=Number(i[2].replace(/,/g,"")),o=i[3]?Number(i[3].replace(/,/g,"")):s;return{chrom:i[1].toUpperCase(),start:Math.min(s,o),end:Math.max(s,o)}}function eR(n,i){const s=i.trim().toLowerCase();if(!s)return!0;const o=W_(i);if(o){const u=(f,d)=>(f==null?void 0:f.toUpperCase())===o.chrom&&d!==null&&d>=o.start&&d<=o.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,Mh(n.sv_type),n.role?Nh[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(s))}function O1(n,i){return{deletion:n.svDel,"tandem-duplication":n.svDup,inversion:n.svInv,translocation:n.svTra}[i]}function tR(n,i){const s=O1(n,i.sv_class);return i.clustered?$n(s,.42):s}const nR={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function lR(n){return n.size?nR[n.size]??n.size:""}const aR={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."};function iR(n){const i=n.map(()=>"");let s=0;for(let o=1;o<=n.length;o++)o<n.length&&n[o].sv_class===n[s].sv_class&&n[o].clustered===n[s].clustered||(i[s+Math.floor((o-1-s)/2)]=aR[n[s].sv_class],s=o);return i}function sR(n){const i=`${n.clustered?"Clustered":"Dispersed"} ${A1[n.sv_class].toLowerCase()}s`;return n.size?`${i}, ${X_(n.size)}`:i}function oR(n,i){const s=n.map(S=>S.category),o=iR(n),u=n.findIndex(S=>!S.clustered),f=Math.max(0,...n.map(S=>S.count)),d=Math.max(2,Math.ceil(f*1.3)),g=[u!==0?[{name:"Clustered",xAxis:s[0],itemStyle:{color:$n(i.ink,.035)}},{xAxis:s[(u>0?u:s.length)-1]}]:null,u>=0?[{name:"Dispersed",xAxis:s[u],itemStyle:{color:"transparent"}},{xAxis:s[s.length-1]}]:null].filter(Boolean),p={type:"category",data:s,position:"bottom",axisTick:{show:!1}};return{animation:!i.reducedMotion,animationDuration:500,textStyle:{fontFamily:i.font},grid:{left:34,right:10,top:14,bottom:44,containLabel:!1},tooltip:{...No(i),trigger:"item",formatter:S=>{const y=n[S.dataIndex],v=y.count;return`${sR(y)}<br/><b>${v.toLocaleString("en-US")}</b> ${v===1?"rearrangement":"rearrangements"}`}},xAxis:[{...p,axisLine:{lineStyle:{color:i.axis}},axisLabel:{color:i.muted,fontSize:10,fontFamily:i.mono,interval:0,hideOverlap:!0,formatter:(S,y)=>lR(n[y])}},{...p,offset:16,axisLine:{show:!1},axisLabel:{color:i.ink2,fontSize:11,interval:0,hideOverlap:!0,formatter:(S,y)=>o[y]}}],yAxis:{type:"value",max:d,minInterval:1,axisLabel:{color:i.muted,fontSize:11},splitLine:{lineStyle:{color:i.grid}}},series:[{id:"categories",type:"bar",xAxisIndex:0,barCategoryGap:"28%",data:n.map(S=>({value:S.count,itemStyle:{color:tR(i,S),borderRadius:[3,3,0,0]},label:{show:S.count>0,position:"top",color:i.ink2,fontSize:10.5,fontFamily:i.mono}})),emphasis:{focus:"none"},markArea:{silent:!0,label:{show:!0,position:"insideTopLeft",color:i.muted,fontSize:11.5,offset:[2,2]},data:g}}]}}function rR({role:n}){return n?h.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:Nh[n]}):h.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function uR({rows:n,shown:i,onToggle:s}){const o=J_(n);return h.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:j1.filter(u=>o[u]>0).map(u=>h.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":i.includes(u),onClick:()=>s(u),children:[Nh[u],h.jsx("span",{className:"sv-legend-n",children:o[u]})]},u))})}function $0({gene:n,chrom:i,pos:s,loc:o,query:u}){return h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"sv-end",children:[h.jsx("span",{className:"vt-gene",children:h.jsx(fo,{text:n||"–",query:u})}),o&&h.jsx("span",{className:"sv-loc",children:o})]}),h.jsx("span",{className:"vt-sub mono",children:i&&s!==null?vo(i,s):"–"})]})}function z1(n){return n?n.replace(/,\s*/g,", "):"–"}function cR({label:n,sorted:i,onClick:s}){return h.jsxs("button",{type:"button",className:"vt-sort","data-active":!!i,onClick:s,title:`Sort by ${n.toLowerCase()}`,children:[n,i==="desc"?h.jsx(yu,{size:12,"aria-hidden":!0}):i==="asc"?h.jsx(Ly,{size:12,"aria-hidden":!0}):h.jsx(yu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function fR({row:n,onLocate:i}){const[s,o]=T.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,f=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,d=[["Type",Mh(n.sv_type)],["Left breakpoint",u?`${vo(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",f?`${vo(f.chrom,f.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",z1(n.callers)]],g=n.gene??n.left_gene,p=n.gene??n.right_gene;return h.jsxs("div",{className:"vt-detail-body",children:[h.jsx("dl",{className:"vt-facts",children:d.map(([S,y])=>h.jsxs("div",{children:[h.jsx("dt",{children:S}),h.jsx("dd",{children:y})]},S))}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&h.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i({...u,gene:g}),children:[h.jsx(eh,{size:14,"aria-hidden":!0}),"Show ",f&&f.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),f&&f.chrom!==(u==null?void 0:u.chrom)&&h.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i({...f,gene:p}),children:[h.jsx(eh,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&h.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[h.jsx(Vy,{size:14,"aria-hidden":!0}),s?"Copied":"Copy IGV loci"]})]})]})}function Q0({kind:n,rows:i,query:s="",onLocate:o}){const[u,f]=T.useState({}),[d,g]=T.useState([]),p=T.useRef(null),S=P_(i);T.useEffect(()=>{p.current&&(p.current.scrollTop=0)},[s,i.length]);const y=T.useMemo(()=>{const C={id:"expand",header:()=>h.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:_})=>h.jsx("button",{type:"button",className:"vt-expand","aria-expanded":_.getIsExpanded(),"aria-label":`Details of ${_.original.gene??[_.original.left_gene,_.original.right_gene].filter(Boolean).join(" and ")}`,onClick:w=>{w.stopPropagation(),_.toggleExpanded()},children:h.jsx(Ch,{size:14,"aria-hidden":!0})})},E=[{id:"type",header:"Type",accessorFn:_=>_.sv_type??"",cell:({row:{original:_}})=>Mh(_.sv_type)},{id:"role",header:"Role",accessorFn:_=>_.role?j1.indexOf(_.role):9,cell:({row:{original:_}})=>h.jsx(rR,{role:_.role})},{id:"callers",header:"Callers",accessorFn:_=>_.callers??"",cell:({row:{original:_}})=>h.jsx("span",{className:"text-[12.5px]",children:z1(_.callers)})},{id:"support",header:"Support",accessorFn:_=>_.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:_}})=>h.jsx("span",{className:"mono",children:_.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:_}})=>h.jsx("span",{className:"mono text-[12px]",children:[_.left_pileup,_.right_pileup].filter(Boolean).join(" · ")||"–"})}],N=S?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:_}})=>n==="whole_gene"?h.jsx("span",{className:"text-[12.5px]",children:_.expression??"–"}):h.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[h.jsx("span",{children:_.left_expression??"–"}),h.jsx("span",{style:{color:"var(--muted)"},children:_.right_expression??"–"})]})}]:[];return n==="whole_gene"?[C,{id:"gene",header:"Gene",accessorFn:_=>_.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:_}})=>h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"vt-gene",children:h.jsx(fo,{text:_.gene??"–",query:s})}),h.jsx("span",{className:"vt-sub mono",children:_.left_chrom&&_.left_pos!==null&&_.right_pos!==null?`${vo(_.left_chrom,_.left_pos)}–${_.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:_=>_.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:_}})=>h.jsx("span",{className:"mono",children:Z_(_.length)})},...E,...N]:[C,{id:"left",header:"Left",accessorFn:_=>_.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:_}})=>h.jsx($0,{gene:_.left_gene,chrom:_.left_chrom,pos:_.left_pos,loc:_.left_loc,query:s})},{id:"right",header:"Right",accessorFn:_=>_.right_gene??"",cell:({row:{original:_}})=>h.jsx($0,{gene:_.right_gene,chrom:_.right_chrom,pos:_.right_pos,loc:_.right_loc,query:s})},...E,...N]},[n,S,s]),v=T1({data:i,columns:y,getRowId:C=>`${n}-${C.row}`,getCoreRowModel:_1(),getSortedRowModel:y_(),getExpandedRowModel:R1(),getRowCanExpand:()=>!0,state:{expanded:u,sorting:d},onExpandedChange:f,onSortingChange:g}),b=v.getVisibleLeafColumns().length;return h.jsx("div",{ref:p,className:"vt-scroll vt-viewport",children:h.jsxs("table",{className:"vt",children:[h.jsx("thead",{children:v.getHeaderGroups().map(C=>h.jsx("tr",{children:C.headers.map(E=>{const N=E.column.columnDef.meta,_=E.column.getIsSorted();return h.jsx("th",{className:N==null?void 0:N.className,"aria-sort":_?_==="desc"?"descending":"ascending":void 0,children:E.column.getCanSort()?h.jsx(cR,{label:String(E.column.columnDef.header),sorted:_,onClick:E.column.getToggleSortingHandler()}):bu(E.column.columnDef.header,E.getContext())},E.id)})},C.id))}),h.jsx(M1,{items:v.getRowModel().rows,scrollRef:p,columnCount:b,getKey:C=>C.id,render:C=>h.jsxs(h.Fragment,{children:[h.jsx("tr",{className:"vt-row","data-expanded":C.getIsExpanded(),onClick:()=>C.toggleExpanded(),children:C.getVisibleCells().map(E=>{var N;return h.jsx("td",{className:(N=E.column.columnDef.meta)==null?void 0:N.className,children:bu(E.column.columnDef.cell,E.getContext())},E.id)})}),C.getIsExpanded()&&h.jsx("tr",{className:"vt-detail",children:h.jsx("td",{colSpan:b,children:h.jsx(fR,{row:C.original,onLocate:o})})})]})})]})})}function Eu(n,i,s){return`${n.toLocaleString("en-US")} ${n===1?i:s}`}function dR({categories:n,total:i}){const[s,o]=jo(),u=T.useMemo(()=>o?oR(n,o):null,[n,o]),f=[...new Set(n.map(d=>d.sv_class))];return h.jsxs("div",{ref:s,className:"sv-sigs",children:[h.jsxs("div",{className:"sv-sigs-head",children:[h.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",h.jsx("span",{className:"sv-h-n",children:Eu(i,"rearrangement","rearrangements")})]}),h.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",children:[f.map(d=>h.jsxs("li",{children:[h.jsx("span",{className:"sv-swatch",style:{background:o?O1(o,d):void 0},"aria-hidden":!0}),A1[d]]},d)),h.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),u&&h.jsx(Mo,{option:u,height:250,ariaLabel:`Rearrangement signatures: ${n.filter(d=>d.count>0).map(d=>`${d.category} ${d.count}`).join(", ")}`})]})}function hR({data:n,query:i,onClear:s,onLocate:o}){const[u,f]=T.useState([]),d=C=>f(E=>E.includes(C)?E.filter(N=>N!==C):[...E,C]),g=C=>C.filter(E=>eR(E,i)),p=C=>u.length?C.filter(E=>E.role&&u.includes(E.role)):C,S=[...n.onco,...n.whole_gene],y=[...g(n.onco),...g(n.whole_gene)],v=p(g(n.onco)),b=p(g(n.whole_gene));return S.length===0?h.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):y.length===0?h.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",h.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:s,children:"Clear the search"})]}):h.jsxs(h.Fragment,{children:[h.jsx(uR,{rows:y,shown:u,onToggle:d}),v.length>0&&h.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[h.jsxs("h3",{className:"sv-h",children:["Rearranged oncogenes and tumour suppressors",h.jsx("span",{className:"sv-h-n",children:Eu(v.length,"row","rows")})]}),h.jsx(Q0,{kind:"onco",rows:v,query:i,onLocate:o})]}),b.length>0&&h.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[h.jsxs("h3",{className:"sv-h",children:["Whole-gene rearrangements",h.jsx("span",{className:"sv-h-n",children:Eu(b.length,"row","rows")})]}),h.jsx(Q0,{kind:"whole_gene",rows:b,query:i,onLocate:o})]})]})}const mR=T.forwardRef(function({envelope:i,loading:s,picked:o,onLocate:u},f){const d=(i==null?void 0:i.status)==="ok"?i.data:null,[g,p]=T.useState(""),S=!!d&&d.onco.length+d.whole_gene.length>0;return h.jsx(Ou,{ref:f,title:"Structural variants",subtitle:d?Eu(d.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(i==null?void 0:i.lineage)??[],picked:o,info:"structuralVariants",className:"svs",expandable:!0,controls:S?h.jsx(g1,{value:g,onChange:p,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1}):void 0,children:h.jsx(To,{label:"structural variants",envelope:i,loading:s,skeletonHeight:220,children:y=>h.jsxs("div",{className:"sv-body",children:[h.jsx(hR,{data:y,query:g,onClear:()=>p(""),onLocate:u}),y.signatures&&h.jsx(dR,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),gR={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function Y0(n,i="short"){var s;return((s=gR[n])==null?void 0:s[i])??n}const zd=8;function pR(n){const i=n.find(u=>u.group==="sample")??n[0],s=[...(i==null?void 0:i.signatures)??[]].sort((u,f)=>(f.proportion??0)-(u.proportion??0)).map(u=>u.signature),o=s.length>zd?zd-1:zd;return{shown:s.slice(0,o),other:s.slice(o)}}function wu(n,i){const s=Array.isArray(i)?i:[i];return n.signatures.filter(o=>s.includes(o.signature)).reduce((o,u)=>o+(u.proportion??0),0)}function ho(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}function vR(n){const i=n.filter(y=>y!==null&&Number.isFinite(y)).sort((y,v)=>y-v);if(i.length===0)return null;const s=y=>{const v=(i.length-1)*y,b=Math.floor(v),C=Math.ceil(v);return i[b]+(i[C]-i[b])*(v-b)},[o,u,f]=[s(.25),s(.5),s(.75)],d=1.5*(f-o),g=i.filter(y=>y>=o-d&&y<=f+d),p=g[0]??o,S=g[g.length-1]??f;return{box:[p,o,u,f,S],outliers:i.filter(y=>y<p||y>S)}}const I0=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"];function D1(n,i){const{shown:s,other:o}=pR(n),u=s.map((f,d)=>({name:f,members:[f],colour:I0[d%I0.length]}));return o.length&&u.push({name:"Other",members:o,colour:i.minor}),u}const yR=n=>`${(n*100).toFixed(n>=.1?0:1)}%`;function SR(n,i){const s=D1(n,i),o=n.map(ho),u=n.length===1,f=s.map(p=>({id:p.name,name:p.name,type:u?"bar":"line",stack:"share",data:n.map(S=>Number((wu(S,p.members)*100).toFixed(3))),symbol:"none",smooth:!1,barWidth:u?34:void 0,lineStyle:{width:0},areaStyle:u?void 0:{color:p.colour,opacity:.92},itemStyle:{color:p.colour,borderColor:i.card,borderWidth:u?1.5:0},emphasis:{focus:"series"}})),d={type:"category",data:o,boundaryGap:u,axisTick:{show:!1},axisLine:{show:!1},axisLabel:{show:u,color:i.ink2,fontSize:12,fontWeight:600}},g={type:"value",min:0,max:100,interval:25,axisLabel:{color:i.muted,fontSize:11,formatter:"{value}%"},splitLine:{lineStyle:{color:i.grid}}};return{animation:!i.reducedMotion,animationDuration:500,textStyle:{fontFamily:i.font},grid:u?{left:96,right:16,top:10,bottom:26}:{left:42,right:14,top:8,bottom:12,containLabel:!1},tooltip:{...No(i),trigger:"axis",axisPointer:{type:u?"shadow":"line",lineStyle:{color:i.axis}},formatter:p=>{var v;const S=n[((v=p[0])==null?void 0:v.dataIndex)??0],y=s.map(b=>({band:b,share:wu(S,b.members)})).filter(({share:b})=>b>0).sort((b,C)=>C.share-b.share).map(({band:b,share:C})=>`<span style="color:${b.colour}">●</span> ${b.name} <b>${yR(C)}</b>`);return`<b>${ho(S)}</b><br/>${y.join("<br/>")}`}},xAxis:u?g:{...d,position:"top"},yAxis:u?{...d,inverse:!0}:g,series:f}}const Fi=n=>n==null?"–":n.toFixed(2);function xR(n,i){const s=n.map(u=>vR(u.cohort)),o=n.map(u=>Y0(u.feature));return{animation:!i.reducedMotion,animationDuration:400,textStyle:{fontFamily:i.font},grid:{left:40,right:16,top:14,bottom:30},tooltip:{...No(i),trigger:"item",formatter:u=>{var p,S,y;const f=n[u.dataIndex],d=`<b>${Y0(f.feature,"long")}</b>`;if(u.seriesId==="tumour")return`${d}<br/>This tumour: <b>${Fi((p=f.sample)==null?void 0:p.raw)}</b> (scaled ${Fi((S=f.sample)==null?void 0:S.value)})`;const g=(y=s[u.dataIndex])==null?void 0:y.box;return u.seriesId==="outliers"?`${d}<br/>A cohort sample at ${Fi(u.value[1])} (scaled)`:g?`${d}<br/>Cohort, scaled 0–1 (n = ${f.cohort.length})<br/>Median ${Fi(g[2])}, middle half ${Fi(g[1])}–${Fi(g[3])}`:d}},xAxis:{type:"category",data:o,axisTick:{show:!1},axisLine:{lineStyle:{color:i.axis}},axisLabel:{color:i.ink2,fontSize:11.5,interval:0,hideOverlap:!0}},yAxis:{type:"value",min:0,max:1,interval:.25,axisLabel:{color:i.muted,fontSize:11},splitLine:{lineStyle:{color:i.grid}}},series:[{id:"cohort",type:"boxplot",boxWidth:[14,34],data:s.map(u=>u?u.box:["-","-","-","-","-"]),itemStyle:{color:$n(i.ink2,.08),borderColor:i.ink2,borderWidth:1.2},emphasis:{itemStyle:{borderWidth:1.6}}},{id:"outliers",type:"scatter",symbolSize:5,itemStyle:{color:$n(i.ink2,.45)},data:s.flatMap((u,f)=>u?u.outliers.map(d=>[f,d]):[])},{id:"tumour",type:"scatter",symbolSize:12,z:5,itemStyle:{color:i.accent,borderColor:i.card,borderWidth:2},data:n.map((u,f)=>{var d,g;return((d=u.sample)==null?void 0:d.value)===null||((g=u.sample)==null?void 0:g.value)===void 0?null:[f,u.sample.value]})}]}}const Dd=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,gu=n=>Math.round(n).toLocaleString("en-US");function bR({groups:n}){const[i,s]=jo(),o=T.useRef(null),[u,f]=T.useState(null),d=T.useMemo(()=>s?SR(n,s):null,[n,s]),g=T.useMemo(()=>s?D1(n,s):[],[n,s]),p=n.find(C=>C.group==="sample"),S=n.find(C=>C.group==="cohort"),y=C=>{f(C);const E=o.current;E&&(E.dispatchAction({type:"downplay"}),C&&E.dispatchAction({type:"highlight",seriesId:C}))},v=T.useCallback(C=>(o.current=C,()=>{o.current=null}),[]),b=T.useMemo(()=>({mouseover:C=>f(C.seriesId??null),globalout:()=>f(null)}),[]);return h.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[h.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),h.jsxs("div",{className:"sig-grid",children:[h.jsxs("div",{ref:i,className:"sig-chart",children:[S&&p&&h.jsxs("div",{className:"sig-columns",children:[h.jsxs("span",{children:[ho(p),h.jsxs("small",{children:[gu(p.total)," mutations"]})]}),h.jsxs("span",{children:[ho(S),h.jsxs("small",{children:["about ",gu(S.total)," each, on average"]})]})]}),d&&h.jsx(Mo,{option:d,height:n.length===1?110:300,ariaLabel:`Signature shares: ${n.map(C=>`${ho(C)}: ${C.signatures.map(E=>`${E.signature} ${Dd(E.proportion??0)}`).join(", ")}`).join("; ")}`,onReady:v,onEvents:b})]}),h.jsxs("table",{className:"sig-table",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Signature"}),h.jsx("th",{className:"n",children:"This tumour"}),S&&h.jsx("th",{className:"n",children:"Cohort"})]})}),h.jsx("tbody",{children:g.map(C=>{var w;const E=p?wu(p,C.members):0,N=p==null?void 0:p.signatures.filter(j=>C.members.includes(j.signature)).reduce((j,O)=>j+(O.count??0),0),_=C.members.length===1?(w=p==null?void 0:p.signatures.find(j=>j.signature===C.name))==null?void 0:w.aetiology:`${C.members.length} signatures: ${C.members.join(", ")}`;return h.jsxs("tr",{"data-lit":u===C.name||void 0,onMouseEnter:()=>y(C.name),onMouseLeave:()=>y(null),children:[h.jsxs("td",{children:[h.jsxs("span",{className:"sig-name",children:[h.jsx("span",{className:"sv-swatch",style:{background:C.colour},"aria-hidden":!0}),C.name]}),_&&h.jsx("span",{className:"sig-aetiology",children:_})]}),h.jsxs("td",{className:"n",children:[h.jsx("span",{className:"mono",children:Dd(E)}),h.jsx("span",{className:"sig-count",children:gu(N??0)})]}),S&&h.jsx("td",{className:"n mono",children:Dd(wu(S,C.members))})]},C.name)})})]})]})]})}function CR({score:n}){const i=n.value,s=n.rating==="HIGH";return h.jsxs("div",{className:"hrd-score",children:[h.jsx("span",{className:"hrd-name",children:n.name}),h.jsx("span",{className:"hrd-value mono",children:i===null?"–":i.toFixed(2)}),n.rating&&h.jsx("span",{className:`sc-pill ${s?"p-warn":"p-neu"}`,children:n.rating}),h.jsxs("span",{className:"hrd-gauge","aria-hidden":!0,children:[n.threshold!==null&&h.jsx("span",{className:"hrd-threshold",style:{left:`${n.threshold*100}%`}}),i!==null&&h.jsx("span",{className:"hrd-dot","data-high":s||void 0,style:{left:`${Math.min(Math.max(i,0),1)*100}%`}})]}),n.threshold!==null&&h.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function ER({hrd:n}){const[i,s]=jo(),o=T.useMemo(()=>s&&n.features.length?xR(n.features,s):null,[n,s]);return h.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[h.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),h.jsx("div",{className:"hrd-scores",children:n.scores.map(u=>h.jsx(CR,{score:u},u.name))}),n.features.length>0&&h.jsxs("div",{ref:i,className:"hrd-chart",children:[h.jsxs("div",{className:"sv-sigs-head",children:[h.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?h.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),h.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[h.jsxs("li",{children:[h.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"This tumour"]}),h.jsxs("li",{children:[h.jsx("span",{className:"hrd-key-box","aria-hidden":!0}),"Cohort, scaled 0–1"]})]})]}),o&&h.jsx(Mo,{option:o,height:260,ariaLabel:`HRDetect features: ${n.features.map(u=>{var f,d;return`${u.feature} ${((d=(f=u.sample)==null?void 0:f.value)==null?void 0:d.toFixed(2))??"no value"}`}).join(", ")}`})]})]})}const wR=T.forwardRef(function({envelope:i,loading:s,picked:o},u){var g;const f=(i==null?void 0:i.status)==="ok"?i.data:null,d=(g=f==null?void 0:f.signatures)==null?void 0:g.find(p=>p.group==="sample");return h.jsx(Ou,{ref:u,title:"Signatures and HRD",subtitle:d?`${gu(d.total)} mutations attributed to signatures`:void 0,lineage:(i==null?void 0:i.lineage)??[],picked:o,info:"signaturesHrd",className:"sigs",children:h.jsx(To,{label:"signatures and HRD",envelope:i,loading:s,skeletonHeight:300,children:p=>h.jsxs("div",{className:"sig-body",children:[p.signatures?h.jsx(bR,{groups:p.signatures}):h.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),p.hrd&&h.jsx(ER,{hrd:p.hrd})]})})})});function _R(n){var o;const i=n.samples.filter(u=>u.category==="TUMOR");return(o=i.find(u=>Object.values(u.datasets??{}).some(f=>Object.values(f).includes("ok")))??i[0]??n.samples[0])==null?void 0:o.id}const RR=[];function TR(n){const i=T.useRef(!1);return T.useEffect(()=>{let s=0;const o=()=>{i.current=!0,window.clearTimeout(s),s=window.setTimeout(()=>i.current=!1,150)};return window.addEventListener("scroll",o,{passive:!0}),()=>{window.removeEventListener("scroll",o),window.clearTimeout(s)}},[]),T.useCallback(s=>{(s===null||!i.current)&&n(s)},[n])}function NR(n){var s,o;const i=(o=(s=n==null?void 0:n.samples.find(u=>{var f;return(f=u.disease)==null?void 0:f.name}))==null?void 0:s.disease)==null?void 0:o.name;return i?i.charAt(0)+i.slice(1).toLowerCase():void 0}function oo(n,i){const s=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:s?"auto":"smooth",block:i})}const MR=160;function jR(n){const[i,s]=T.useState(null),o=T.useRef(n);return o.current=n,T.useEffect(()=>{let u=0;const f=()=>{var y,v;u=0;const g=o.current.filter(([,b])=>b.current);let p=((y=g[0])==null?void 0:y[0])??null;for(const[b,C]of g)(((v=C.current)==null?void 0:v.getBoundingClientRect().top)??1/0)<=MR&&(p=b);window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2&&g.length&&window.scrollY>0&&(p=g[g.length-1][0]),s(p)},d=()=>{u||(u=requestAnimationFrame(f))};return f(),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d),window.removeEventListener("resize",d),u&&cancelAnimationFrame(u)}},[]),i}function AR(){var Ao,ss,$a,Qa,Ya,Oo,zo,Rt,Do,os,rs,oa,Uo,us,Ho;const{individual:n=""}=I2(),[i,s]=CC(),o=i.get("version")??void 0,[u,f]=T.useState(null),[d,g]=T.useState(null),[p,S]=T.useState(j0),[y,v]=T.useState(null),b=TR(v),[C,E]=T.useState(null),N=T.useRef(null),[_,w]=T.useState(null),[j,O]=T.useState(!0),G=T.useRef(null),B=T.useRef(null),K=T.useRef(null),q=T.useRef(null),Z=jR([["overview",B],["copyNumber",N],["mutations",G],["structuralVariants",K],["signatures",q]]),W=sy();T.useEffect(ow,[]),T.useEffect(()=>{const P=_;if(!P||typeof IntersectionObserver>"u")return;const Fe=new IntersectionObserver(([Ke])=>O(Ke.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Fe.observe(P),()=>Fe.disconnect()},[_]),T.useEffect(()=>UE(n),[n]);const oe=T.useCallback(P=>S(Fe=>({...Fe,...P})),[]),Se=T.useCallback(P=>{oe({q:xE(P.chrom,P.start,P.end),scope:"all",sort:"position"}),oo(G.current,"start")},[oe]),ae=T.useCallback(P=>{oe({q:P}),oo(G.current,"start")},[oe]),Xe=T.useCallback(P=>{E({chrom:P.chrom,pos:P.pos,gene:P.gene,nonce:Date.now()}),oo(N.current,"center")},[]),et=T.useCallback(P=>{E({...P,nonce:Date.now()}),oo(N.current,"center")},[]),He=_E(n,o),Y=He.data,I=(Y==null?void 0:Y.status)==="ok"?Y.data??void 0:void 0,ie=i.get("sample")??(I?_R(I):void 0),Me=I==null?void 0:I.samples.find(P=>P.id===ie),ye=(Me==null?void 0:Me.category)==="TUMOR"?ie:void 0,Bt=d??((I==null?void 0:I.mode)==="unmatched"?"vaf":"ccf"),jt=RE(n,I?ie:void 0,o),At=TE(n,o),A=NE(n,ye,o),Q=ME(n,ye,Bt,p.ffpe,o),te=OE(n,ye,p,o),se=(Ao=te.data)==null?void 0:Ao.pages[0],_e=T.useMemo(()=>{var P;return((P=te.data)==null?void 0:P.pages.flatMap(Fe=>Fe.status==="ok"&&Fe.data?Fe.data.rows:[]))??[]},[te.data]),{fetchNextPage:Re}=te,je=T.useCallback(()=>void Re(),[Re]),ne=AE(n,ye,o),ue=jE(n,ye,o),_t=($a=(ss=At.data)==null?void 0:ss.data)==null?void 0:$a.samples.find(P=>P.sample===ie),ls=T.useMemo(()=>(_t==null?void 0:_t.drivers)??RR,[_t]),dl=T.useMemo(()=>y?{chrom:y.chrom,pos:y.pos,gene:y.gene}:C,[y,C]),Gt=T.useRef(null),[Ie,ze]=T.useState(null),Kt=[jt,A,Q,te,ne,ue,At].some(P=>P.isFetching);T.useEffect(()=>{if(!Ie||Ie.sample!==ie||Kt)return;const P=Gt.current,Fe=P==null?void 0:P.querySelector("main"),Ke=P==null?void 0:P.querySelector(".topbar");if(!P||!Fe||!Ke||!_)return ze(null);const Mn=P.getBoundingClientRect().top+window.scrollY,Ot=Math.max(Mn+Ke.offsetHeight+Fe.offsetHeight,window.innerHeight),Uu=_.getBoundingClientRect().bottom+window.scrollY-Ke.offsetHeight+2,Hu=Math.max(0,Math.min(Uu,Ot-window.innerHeight)),Lo=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:Hu,behavior:Lo?"auto":"smooth"});const Ia=window.setTimeout(()=>ze(null),Lo?0:520);return()=>window.clearTimeout(Ia)},[Ie,ie,Kt,_]),T.useEffect(()=>{if(!Ie)return;const P=window.setTimeout(()=>ze(null),4e3);return()=>window.clearTimeout(P)},[Ie]);const aa=P=>{var Fe;P!==ie&&(ze({sample:P,height:document.documentElement.scrollHeight-(((Fe=Gt.current)==null?void 0:Fe.getBoundingClientRect().top)??0)-window.scrollY}),sn("sample",P))},sn=(P,Fe)=>{const Ke=new URLSearchParams(i);Ke.set(P,Fe),s(Ke,{replace:!1}),f(null),S(j0()),v(null),E(null)},ia=[He,jt,At,A,Q,te,ne,ue].map(P=>P.error);if(ia.some(P=>P instanceof Au))return h.jsx("div",{className:`wgts ${Yn.theme}`,children:h.jsx("main",{className:"page",children:h.jsx(tw,{onSignedIn:()=>W.invalidateQueries()})})});const hl=ia.find(P=>P instanceof Yy),on=Me&&I?wh(Me.id,I.individual.id):"",as=new Set(I?ye?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),ka=P=>{if(P==="overview"){const Ke=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:Ke?"auto":"smooth"});return}const Fe={copyNumber:N,mutations:G,structuralVariants:K,signatures:q}[P];oo((Fe==null?void 0:Fe.current)??null,"start")},ml=I&&ie&&I.analyses[ie]||[],is=(I==null?void 0:I.failures.filter(P=>P.sample===ie))??[],Nn=new Set(ml.map(wt)),sa=new Set,yn=P=>P==null?void 0:P.forEach(Fe=>Nn.has(wt(Fe))&&sa.add(wt(Fe)));for(const P of((Ya=(Qa=jt.data)==null?void 0:Qa.data)==null?void 0:Ya.metrics)??[])ih.includes(P.key)&&yn(P.sources);yn((Oo=At.data)==null?void 0:Oo.lineage),yn((zo=A.data)==null?void 0:zo.lineage),yn((Rt=Q.data)==null?void 0:Rt.lineage),yn(se==null?void 0:se.lineage),yn((Do=ne.data)==null?void 0:Do.lineage),yn((os=ue.data)==null?void 0:os.lineage);for(const P of ml)P.state==="failed"&&is.length>0&&sa.add(wt(P));return h.jsxs("div",{className:`wgts ${Yn.theme}`,children:[h.jsx(FE,{individualId:n,sampleCount:(I==null?void 0:I.samples.length)??0,mode:I==null?void 0:I.mode,fingerprint:_t,analyses:ml,onPage:sa,sampleLabel:on,picked:u,onPick:f,sections:as,active:Z,onSection:ka}),h.jsxs("div",{ref:Gt,className:"page",style:Ie?{minHeight:Ie.height}:void 0,children:[h.jsx(Qy,{individualId:n,subtitle:[NR(I),(rs=I==null?void 0:I.individual.sex)==null?void 0:rs.toLowerCase()].filter(Boolean).join(", ")||void 0,patientIcon:I?h.jsx(iE,{sex:I.individual.sex}):void 0,compact:I&&ie?h.jsx(fE,{data:I,sampleId:ie,fingerprint:((oa=At.data)==null?void 0:oa.data)??void 0,onSample:aa}):void 0,showCompact:!j}),h.jsxs("main",{className:"flex flex-col gap-5 px-8 pt-[18px] pb-10",children:[He.isPending&&h.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),hl&&h.jsx("div",{className:"sc-card px-6 py-5",children:h.jsx(Aa,{envelope:{status:"error",data:null,lineage:[],warnings:[hl.message]}})}),He.isError&&!hl&&h.jsx("div",{className:"sc-card px-6 py-5",children:h.jsx(Aa,{envelope:{status:"error",data:null,lineage:[],warnings:[He.error.message]}})}),Y&&Y.status!=="ok"&&h.jsx("div",{className:"sc-card px-6 py-5",children:h.jsx(Aa,{envelope:Y})}),(Y==null?void 0:Y.status)==="ok"&&Y.warnings.length>0&&h.jsx("div",{className:"sc-card px-6 py-4",children:h.jsx(Aa,{envelope:{...Y,status:"missing"}})}),I&&ie&&h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:w,children:h.jsx(XE,{data:I,fingerprint:((Uo=At.data)==null?void 0:Uo.data)??void 0,sampleId:ie,onSample:P=>sn("sample",P),onVersion:P=>sn("version",P)})}),h.jsx(ew,{sampleLabel:on,failures:is,analyses:ml}),ye?h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:B,className:"page-section",children:h.jsx(WE,{sampleLabel:`${on} tumour`,fingerprint:_t,metrics:jt.data,picked:u,lineage:i1((us=jt.data)==null?void 0:us.lineage,(Ho=At.data)==null?void 0:Ho.lineage)})}),h.jsx("div",{ref:N,className:"page-section",children:h.jsx(Cw,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:on,drivers:ls,focus:dl,locate:C,onSegment:Se,onGene:ae})}),h.jsx(Y_,{ref:G,variants:se,rows:_e,hasMore:te.hasNextPage,loadingMore:te.isFetchingNextPage,onMore:je,variantsLoading:te.isPending,variantsFetching:te.isFetching&&te.isPlaceholderData,density:Q.data,densityLoading:Q.isPending,picked:u,measure:Bt,onMeasure:P=>{g(P),p.range&&p.range.measure!==P&&oe({range:null})},table:p,onTable:oe,hovered:y,onHover:b,onLocate:Xe,showCcf:I.mode!=="unmatched"}),h.jsx(mR,{ref:K,envelope:ne.data,loading:ne.isPending,picked:u,onLocate:et}),h.jsx(wR,{ref:q,envelope:ue.data,loading:ue.isPending,picked:u})]}):h.jsx("div",{ref:B,className:"sc-card px-6 py-5",children:h.jsx(Aa,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${on} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})}const OR=new o2({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function zR(){return h.jsx(Db,{client:OR,children:h.jsx(vC,{basename:Yn.basePath,children:h.jsxs(uC,{children:[h.jsx(Kd,{path:"/",element:h.jsx(LE,{})}),h.jsx(Kd,{path:"/:individual",element:h.jsx(AR,{})})]})})})}zb.createRoot(document.getElementById("root")).render(h.jsx(T.StrictMode,{children:h.jsx(zR,{})}));export{h as j,T as r};
288
+ */function Vu(n,s){return n?tN(n)?E.createElement(n,s):n:null}function tN(n){return nN(n)||typeof n=="function"||lN(n)}function nN(n){return typeof n=="function"&&(()=>{const s=Object.getPrototypeOf(n);return s.prototype&&s.prototype.isReactComponent})()}function lN(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function ox(n){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:JE(s)})),[r,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...r,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function $u({value:n,onChange:s,label:i="Search mutations",placeholder:r="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),p=E.useRef(null),y=E.useRef(s);y.current=s,E.useEffect(()=>m(n),[n]),E.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),E.useEffect(()=>{if(!u)return;const v=b=>{var w,C,N;b.key!=="/"||b.metaKey||b.ctrlKey||b.altKey||(C=(w=b.target)==null?void 0:w.closest)!=null&&C.call(w,"input, textarea, select, [contenteditable]")||(b.preventDefault(),(N=p.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),s("")};return f.jsxs("div",{className:"tsearch",children:[f.jsx(Du,{size:15,"aria-hidden":!0}),f.jsx("input",{ref:p,type:"search","aria-label":i,placeholder:r,value:h,onChange:v=>{m(v.target.value),d===0&&s(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&s(h)}}),h?f.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:f.jsx(Qu,{size:14,"aria-hidden":!0})}):u?f.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const nh=n=>n.toLocaleString("en-US");function Wu({shown:n,total:s,noun:i,loaded:r=!1,note:u}){const h=n>=s?`${nh(s)} ${s===1?i[0]:i[1]}`:`${nh(n)} of ${nh(s)} ${i[1]}${r?" loaded":""}`;return f.jsxs("div",{className:"vt-foot",role:"status",children:[u?f.jsx("span",{className:"vt-foot-note",children:u}):null,f.jsx("span",{className:"vt-foot-count",children:h})]})}function aN(n){return typeof n=="object"?n.key:n}function sN(n,s){const i=n.length;return new Proxy(n,{get(r,u,d){if(typeof u=="string"){const h=u.charCodeAt(0);if(h>=48&&h<=57){const m=+u;if(Number.isInteger(m)&&m>=0&&m<i){let p=r[m];if(typeof p!="object"){const y=s[m*2];p=r[m]={index:m,key:p,start:y,size:s[m*2+1],end:y+s[m*2+1],lane:0}}return p}}if(u==="length")return i}return Reflect.get(r,u,d)}})}function ai(n,s,i){let r=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==r.length||m.some((y,x)=>r[x]!==y))&&(r=m,u=s(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{r=m},h}function Cy(n,s){if(n===void 0)throw new Error("Unexpected undefined");return n}const jy=(n,s)=>Math.abs(n-s)<1.01,iN=(n,s,i)=>{let r;return Object.assign(function(...u){n.clearTimeout(r),r=n.setTimeout(()=>s.apply(this,u),i)},{cancel:()=>{n.clearTimeout(r)}})};let Nr;const lh=()=>{if(Nr!==void 0)return Nr;if(typeof navigator>"u")return Nr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Nr=!0;const n=navigator.maxTouchPoints;return Nr=navigator.platform==="MacIntel"&&n!==void 0&&n>0},Ey=n=>{const{offsetWidth:s,offsetHeight:i}=n;return{width:s,height:i}},rN=n=>n,oN=n=>{const s=Math.max(n.startIndex-n.overscan,0),r=Math.min(n.endIndex+n.overscan,n.count-1)-s+1,u=new Array(r);for(let d=0;d<r;d++)u[d]=s+d;return u},uN=(n,s)=>{const i=n.scrollElement;if(!i)return;const r=n.targetWindow;if(!r)return;const u=h=>{const{width:m,height:p}=h;s({width:Math.round(m),height:Math.round(p)})};if(u(Ey(i)),!r.ResizeObserver)return()=>{};const d=new r.ResizeObserver(h=>{const m=()=>{const p=h[0];if(p!=null&&p.borderBoxSize){const y=p.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(Ey(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Fu={passive:!0},cN=typeof window>"u"?!0:"onscrollend"in window,fN=(n,s,i)=>{const r=n.scrollElement;if(!r)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&cN;let h=0;const m=d?null:iN(u,()=>s(i(r),!1),n.options.isScrollingResetDelay),p=v=>()=>{h=i(r),m==null||m(),s(h,v)},y=p(!0),x=p(!1);return r.addEventListener("scroll",y,Fu),d&&r.addEventListener("scrollend",x,Fu),()=>{r.removeEventListener("scroll",y),d&&r.removeEventListener("scrollend",x),m==null||m.cancel()}},dN=(n,s)=>fN(n,s,i=>{const{horizontal:r,isRtl:u}=n.options;return r?i.scrollLeft*(u&&-1||1):i.scrollTop}),hN=(n,s,i)=>{if(i.options.useCachedMeasurements){const r=i.indexFromElement(n),u=i.options.getItemKey(r);return i.itemSizeCache.get(u)??i.options.estimateSize(r)}if(s!=null&&s.borderBoxSize){const r=s.borderBoxSize[0];if(r)return Math.round(r[i.options.horizontal?"inlineSize":"blockSize"])}if(!s){const r=i.indexFromElement(n),u=i.options.getItemKey(r),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},mN=(n,{adjustments:s=0,behavior:i},r)=>{var u,d;(d=(u=r.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[r.options.horizontal?"left":"top"]:n+s,behavior:i})},gN=mN;function pN(n,s,i,r){if(s===0)return!1;const u=r(0),d=new Set;let h=0;for(;h<n;){const p=i(h);if(p===u)break;d.add(p),h++}const m=n-h;if(m===0||m>=s)return!1;for(let p=0;p<m;p++)if(r(p)!==i(h+p))return!1;for(let p=m;p<s;p++)if(d.has(r(p)))return!1;return!0}class vN{constructor(s){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var i,r,u;return((u=(r=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:r.now)==null?void 0:u.call(r))??Date.now()},this.observer=(()=>{let i=null;const r=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,p=this.indexFromElement(m);if(!m.isConnected){this.observer.unobserve(m);for(const[y,x]of this.elementsCache)if(x===m){this.elementsCache.delete(y);break}return}this.isIndexInRange(p)&&this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=r())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=r())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=r())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var r;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rN,rangeExtractor:oN,onChange:()=>{},measureElement:hN,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const v in i){const b=i[v];b!==void 0&&(u[v]=b)}const d=this.options;let h=null,m=null,p=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,b=u.count,w=this.getMeasurements(),C=((r=this._singleLaneMeasurements)==null?void 0:r.items)??w,N=T=>aN(C[T]),M=v>0?N(0):null,R=v>0?N(v-1):null;if(b!==v||v>0&&b>0&&(u.getItemKey(0)!==M||u.getItemKey(b-1)!==R)){p=!0;const T=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;T&&(h=[T.key,this.getScrollOffset()-T.start]);const H=u.followOnAppend===!0?"auto":u.followOnAppend||null;H&&b>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(b-1)!==R)&&(b>v||pN(v,b,N,u.getItemKey))&&(m=H)}}this.options=u,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,b]=h,w=this.getMeasurements(),{count:C,getItemKey:N}=this.options;let M=0;for(;M<C&&N(M)!==v;)M++;if(M<C){const R=w[M];if(R){const j=Math.max(0,R.start+b);!m&&j!==this.scrollOffset&&(x=j-this.scrollOffset,this.scrollOffset=j,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var r,u;(u=(r=this.options).onChange)==null||u.call(r,this,i)},this.maybeNotify=ai(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i,r;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(h=>{this.observer.observe(h)}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(h,m)=>{if(m&&this._intendedScrollOffset===null&&h===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(h-this._intendedScrollOffset)<1.5&&(h=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(h-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const p=this.getScrollOffset();this.scrollDirection=m?p===h?this.scrollDirection:p<h?"forward":"backward":null,this.scrollOffset=h,this.isScrolling=m,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const h=this.scrollElement,m=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},p=()=>{this._iosTouching=!1,!(!lh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,Fu),h.addEventListener("touchend",p,Fu),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",p),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const d=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,d&&this.scrollElement&&this.options.enabled){const[h,m,p,y]=d;h!==null&&!p&&(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((r=this.scrollState)==null?void 0:r.behavior)==="smooth"&&!jy(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),p&&this.scrollToEnd({behavior:p})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:r}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>r+.5&&(this._clampedAdjustment=i>u+.5?{target:i,maxAtWrite:u}:null,this._scrollToOffset(i,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const i=this.getScrollOffset(),r=this.getMaxScrollOffset();if(i<0||i>r)return;if(this._iosDeferredAdjustment<0&&i>=r-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(i,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ai(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(i,r,u,d,h,m,p,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=ai(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y},x)=>{var v;const b=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const j of this.laneAssignments.keys())j>=i&&this.laneAssignments.delete(j);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(j=>{this.itemSizeCache.set(j.key,j.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const j=i*2;let F=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!F||F.length<j){const z=new Float64Array(j);F&&w>0&&z.set(F.subarray(0,w*2)),F=z}const T=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let H;if(w===0)H=r+u;else{const z=w-1;H=F[z*2]+F[z*2+1]+y}for(let z=w;z<i;z++){const Y=d(z);T[z]=Y;const te=b.get(Y),k=typeof te=="number"?te:this.options.estimateSize(z);F[z*2]=H,F[z*2+1]=k,H+=k+y}this._singleLaneMeasurements={flat:F,items:T};const D=sN(T,F);return this.measurementsCache=D,D}const C=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let R=0;for(let j=0;j<w;j++){const F=C[j];F&&(N[F.lane]===void 0&&R++,N[F.lane]=j,M[F.lane]=F.end)}for(let j=w;j<i;j++){const F=d(j),T=this.laneAssignments.get(j);let H,D;const z=p==="estimate"||b.has(F);if(T!==void 0&&this.options.lanes>1){H=T;const ne=N[H],ie=ne!==void 0?C[ne]:void 0;D=ie?ie.end+y:r+u}else if(R===m){let ne=0,ie=M[0],Ce=N[0];for(let X=1;X<m;X++){const ee=M[X];(ee<ie||ee===ie&&N[X]<Ce)&&(ne=X,ie=ee,Ce=N[X])}H=ne,D=ie+y,z&&this.laneAssignments.set(j,H)}else H=j%this.options.lanes,D=r+u,z&&this.laneAssignments.set(j,H);const Y=b.get(F),te=typeof Y=="number"?Y:this.options.estimateSize(j),k=D+te;C[j]={index:j,start:D,size:te,end:k,key:F,lane:H},N[H]===void 0&&R++,N[H]=j,M[H]=k}return this.measurementsCache=C,C},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ai(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,r,u,d)=>i.length===0||r===0?(this.range=null,null):(this.range=xN(i,r,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ai(()=>{let i=null,r=null;const u=this.calculateRange();return u&&(i=u.startIndex,r=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,r]},(i,r,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:r,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const r=this.options.indexAttribute,u=i.getAttribute(r);return u?parseInt(u,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(u!==void 0&&this.range){const d=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,u-d),m=Math.min(this.options.count-1,u+d);return i>=h&&i<=m}return!0},this.measureElement=i=>{if(!i){this.elementsCache.forEach((h,m)=>{h.isConnected||(this.observer.unobserve(h),this.elementsCache.delete(m))});return}const r=this.indexFromElement(i);if(!this.isIndexInRange(r))return;const u=this.options.getItemKey(r),d=this.elementsCache.get(u);d!==i&&(d&&this.observer.unobserve(d),this.observer.observe(i),this.elementsCache.set(u,i)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,r)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,p,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),p=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,p=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,b=r-v;if(b!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,C=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,R=!this.itemSizeCache.has(y)?p<N:p+v<=N&&this.scrollDirection!=="backward",j=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:p,size:m,end:p+m,lane:0},b,this):R);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,r),this.itemSizeCacheVersion++;let F=!1;w?F=this.applyScrollAdjustment(this.getTotalSize()-C):j&&(F=this.applyScrollAdjustment(b)),this.notify(F),this._retryClampedAdjustment()}},this.getVirtualItems=ai(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,r)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],p=r[m];u.push(p)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var r;const u=this.getMeasurements();if(u.length===0)return;const d=(r=this._singleLaneMeasurements)==null?void 0:r.flat,h=this.options.lanes===1&&d!=null,m=ux(0,u.length-1,h?p=>d[p*2]:p=>Cy(u[p]).start,i);return Cy(u[m])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const i=this.scrollElement.document.documentElement;return this.options.horizontal?i.scrollWidth-this.scrollElement.innerWidth:i.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(i=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=i,this.getOffsetForAlignment=(i,r,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();r==="auto"&&(r=i>=h+d?"end":"start"),r==="center"?i+=(u-d)/2:r==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,r="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const u=this.getSize(),d=this.getScrollOffset(),h=this.measurementsCache[i];if(!h)return;if(r==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)r="end";else if(h.start<=d+this.options.scrollPaddingStart)r="start";else return[d,r];if(r==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),r];const m=r==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,r,h.size),r]},this.scrollToOffset=(i,{align:r="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,r),h=this.now();this.scrollState={index:null,align:r,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:r="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,r);if(!d)return;const[h,m]=d,p=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:p,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:r="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:i="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:i});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:i})},this.getTotalSize=()=>{var i,r;const u=this.getMeasurements();let d;if(u.length===0)d=this.options.paddingStart;else if(this.options.lanes===1){const h=u.length-1,m=(i=this._singleLaneMeasurements)==null?void 0:i.flat;m!=null?d=m[h*2]+m[h*2+1]:d=((r=u[h])==null?void 0:r.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(p=>p===null);){const p=u[m];h[p.lane]===null&&(h[p.lane]=p.end),m--}d=Math.max(...h.filter(p=>p!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const r=this.getMeasurements();for(const u of r)u&&this.itemSizeCache.has(u.key)&&i.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return i},this._scrollToOffset=(i,{adjustments:r,behavior:u})=>{this._intendedScrollOffset=i+(r??0),this.options.scrollToFn(i,{behavior:u,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(s)}applyScrollAdjustment(s,i){if(s===0)return!1;if(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=s,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+s,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&r>d+.5?{target:r,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:i}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=r?r[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&jy(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=d){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,h){const m=this.getSize()||600,p=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&p>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ux=(n,s,i,r)=>{for(;n<=s;){const u=(n+s)/2|0,d=i(u);if(d<r)n=u+1;else if(d>r)s=u-1;else return u}return n>0?n-1:0};function yN(n,s,i){let r=0;for(;r<=s;){const u=(r+s)/2|0,d=n[u*2];if(d<i)r=u+1;else if(d>i)s=u-1;else return u}return r>0?r-1:0}function xN(n,s,i,r,u){const d=n.length-1;if(n.length<=r)return{startIndex:0,endIndex:d};if(r===1&&u!==null){const y=yN(u,d,i);let x=y;const v=i+s;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=ux(0,d,y=>n[y].start,i),p=m;if(r===1)for(;p<d&&n[p].end<i+s;)p++;else if(r>1){const y=Array(r).fill(0);for(;p<d&&y.some(v=>v<i+s);){const v=n[p];y[v.lane]=v.end,p++}const x=Array(r).fill(i+s);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%r),p=Math.min(d,p+(r-1-p%r))}return{startIndex:m,endIndex:p}}const ah=typeof document<"u"?E.useLayoutEffect:E.useEffect;function SN({useFlushSync:n=!0,directDomUpdates:s=!1,directDomUpdatesMode:i="transform",...r}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:s,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=s,d.current.mode=i;const h=E.useRef(!1),m=v=>{const b=d.current;if(!b.enabled||!b.container)return;const w=v.getTotalSize();if(w!==b.lastSize){b.lastSize=w;const C=v.options.horizontal?"width":"height";b.container.style[C]=`${w}px`}},p=v=>{const b=d.current;if(!b.enabled||!b.container)return;m(v);const w=!!v.options.horizontal,C=b.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,R=v.getVirtualItems();for(const j of R){const F=j.start-M,T=v.elementsCache.get(j.key);T&&b.lastPositions.get(T)!==F&&(b.lastPositions.set(T,F),C?T.style.transform=w?`translate3d(${F}px, 0, 0)`:`translate3d(0, ${F}px, 0)`:T.style[N]=`${F}px`)}},y={...r,onChange:(v,b)=>{var w;const C=d.current;let N=!0;if(C.enabled){p(v);const M=v.range,R=C.prevRange;N=!R||R.isScrolling!==v.isScrolling||R.startIndex!==(M==null?void 0:M.startIndex)||R.endIndex!==(M==null?void 0:M.endIndex),N&&(C.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!h.current?Wh.flushSync(u):u()),(w=r.onChange)==null||w.call(r,v,b)}},[x]=E.useState(()=>{const v=new vN(y),b=v.measureElement;return v.measureElement=w=>{h.current=!0;try{b(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const C=d.current;if(C.container=w,C.lastSize=null,w&&C.enabled){const N=v.getTotalSize();C.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),ah(()=>x._didMount(),[]),ah(()=>(m(x),x._willUpdate())),ah(()=>{p(x)}),x}function bN(n){return SN({observeElementRect:uN,observeElementOffset:dN,scrollToFn:gN,...n})}const cx=33,si=32,wN=25;function fx({items:n,scrollRef:s,columnCount:i,getKey:r,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=cx}){var M;const p=bN({count:n.length,getScrollElement:()=>s.current,estimateSize:()=>m,overscan:8,scrollMargin:si,getItemKey:R=>r(n[R],R),initialRect:{width:1e3,height:si+m*10}}),y=!((M=p.scrollRect)!=null&&M.height),x=y?n.slice(0,wN).map((R,j)=>({key:r(R,j),index:j,start:si+j*m,end:si+(j+1)*m})):p.getVirtualItems(),v=x[0],b=x[x.length-1],w=(b==null?void 0:b.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const C=!y&&v?v.start-si:0,N=!y&&b?p.getTotalSize()-(b.end-si):0;return f.jsxs(f.Fragment,{children:[C>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:C},children:f.jsx("td",{colSpan:i})})}),x.map(R=>f.jsx("tbody",{"data-index":R.index,ref:y?void 0:p.measureElement,children:u(n[R.index],R.index)},R.key)),N>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:N},children:f.jsx("td",{colSpan:i})})})]})}function ds({text:n,query:s}){const i=s.trim();if(!i||PC(i))return f.jsx(f.Fragment,{children:n});const r=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&r.push(n.slice(h,m)),r.push(f.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return r.push(n.slice(h)),f.jsx(f.Fragment,{children:r})}function Ny({value:n,max:s,clonal:i}){return n===null?f.jsx("span",{style:{color:"var(--chev)"},children:"–"}):f.jsxs("span",{className:"vbar",children:[f.jsx("span",{className:"vbar-n",children:Oh(n)}),f.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[f.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/s,1)*100}%`}}),i&&f.jsx("span",{className:"vbar-tick",style:{left:`${1/s*100}%`}})]})]})}function CN({variant:n,showDriver:s}){return f.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[s&&n.is_driver&&f.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&f.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&f.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&f.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function jN(n){return`${n.ref}>${n.alt}`}function EN({variant:n,onLocate:s}){const[i,r]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${jN(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",Oh(n.normal_vaf)],["Mutant copies",tj(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",ej(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?Oh(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",nj(n)??"–"]];return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>f.jsxs("div",{children:[f.jsx("dt",{children:h}),f.jsx("dd",{children:m})]},h))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s(n),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show on copy number"]}),f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function NN({sort:n,current:s,onSort:i}){const r=s.replace(/^-/,"")===n.key,u=s.startsWith("-"),d=r?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return f.jsxs("button",{type:"button",className:"vt-sort","data-active":r,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,r&&u?f.jsx(zu,{size:12,"aria-hidden":!0}):r?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function _N({data:n,rows:s,hasMore:i,loadingMore:r,onMore:u,table:d,fetching:h,showCcf:m,onTable:p,onHover:y,onLocate:x}){const[v,b]=E.useState({}),w=d.q,C=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:D})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":D.getIsExpanded(),"aria-label":`Details of ${D.original.gene??"this mutation"} ${D.original.protein_change??""}`.trim(),onClick:z=>{z.stopPropagation(),D.toggleExpanded()},onFocus:()=>y(D.original),children:f.jsx(nm,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:D.gene??"–",query:w})}),f.jsx("span",{className:"vt-sub mono",children:Fr(D.chrom,D.pos)})]})},{id:"change",header:"Change",cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-[12.5px] font-medium",children:f.jsx(ds,{text:D.protein_change??"–",query:w})}),D.cdna_change&&f.jsx("span",{className:"vt-sub mono",children:f.jsx(ds,{text:D.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:D}})=>f.jsx("span",{className:D.effect_class==="truncating"?"font-semibold":void 0,children:_C(D.consequence,D.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:D}})=>f.jsx(CN,{variant:D,showDriver:C})}],[w,C,m,y]),M=ox({data:s,columns:N,getRowId:ZC,getCoreRowModel:ix(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),R=d.sort.replace(/^-/,""),j=M.getVisibleLeafColumns().length,F=G1(d)>0,T=E.useRef(null),H=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{T.current&&(T.current.scrollTop=0)},[H]),f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("div",{className:"tbar",children:f.jsx($u,{value:d.q,onChange:D=>p({q:D})})}),f.jsxs("div",{ref:T,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&f.jsx("div",{className:"vt-progress","aria-hidden":!0}),f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:M.getHeaderGroups().map(D=>f.jsx("tr",{children:D.headers.map(z=>{var k;const Y=z.column.columnDef.meta,te=(k=Y==null?void 0:Y.sorts)==null?void 0:k.some(ne=>ne.key===R);return f.jsx("th",{className:Y==null?void 0:Y.className,"aria-sort":te?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Y!=null&&Y.sorts?f.jsx("span",{className:"vt-sorts",children:Y.sorts.map(ne=>f.jsx(NN,{sort:ne,current:d.sort,onSort:ie=>p({sort:ie})},ne.key))}):Vu(z.column.columnDef.header,z.getContext())},z.id)})},D.id))}),f.jsx(fx,{items:M.getRowModel().rows,scrollRef:T,columnCount:j,getKey:D=>D.id,onEndReached:i&&!r?u:void 0,render:D=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":D.getIsExpanded(),onClick:()=>D.toggleExpanded(),onMouseEnter:()=>y(D.original),children:D.getVisibleCells().map(z=>{var Y;return f.jsx("td",{className:(Y=z.column.columnDef.meta)==null?void 0:Y.className,children:Vu(z.column.columnDef.cell,z.getContext())},z.id)})}),D.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:j,children:f.jsx(EN,{variant:D.original,onLocate:x})})})]})}),s.length===0&&f.jsx("tbody",{children:f.jsx("tr",{children:f.jsx("td",{colSpan:j,children:f.jsx("div",{className:"vt-empty",children:F?f.jsxs(f.Fragment,{children:["No mutations match these filters.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>p({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&f.jsx(Wu,{shown:s.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:r?"Loading more…":s.length<n.total?"Scroll the table for more":void 0})]})}const MN=E.forwardRef(function({variants:s,rows:i,hasMore:r,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:p,densityLoading:y,picked:x,measure:v,onMeasure:b,table:w,onTable:C,hovered:N,onHover:M,onLocate:R,showCcf:j},F){var k,ne;const T=(s==null?void 0:s.status)==="ok"?s.data??void 0:void 0,H=T==null?void 0:T.counts,D=(p==null?void 0:p.status)==="ok"?(k=p.data)==null?void 0:k.total:void 0,z=(p==null?void 0:p.status)==="ok"?(ne=p.data)==null?void 0:ne.ffpe:null,Y=ie=>ie===void 0?"":ie.toLocaleString("en-US"),te=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return f.jsxs(Ku,{ref:F,title:"Mutations",subtitle:D!==void 0?`${Y(D)} PASS SNVs and indels${z&&!z.shown?", after the FFPE filter":""}`:void 0,lineage:K1(p==null?void 0:p.lineage,s==null?void 0:s.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:f.jsx(f.Fragment,{children:f.jsx(Zu,{label:"Which mutations",value:w.scope,onChange:ie=>C({scope:ie,sort:k1[ie]}),options:[{value:"drivers",label:f.jsxs(f.Fragment,{children:["Drivers",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.drivers)})]})},{value:"coding",label:f.jsxs(f.Fragment,{children:["Coding",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.coding)})]})},{value:"all",label:f.jsxs(f.Fragment,{children:["All",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.all)})]})}]})}),children:[f.jsx(uE,{envelope:p,loading:y,measure:v,onMeasure:b,range:te,focus:N,onRange:ie=>{!ie&&!w.range||C({range:ie?{measure:v,low:ie[0],high:ie[1]}:null})},onGene:ie=>C({q:ie})}),T&&s&&s.warnings.length>0&&f.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")}),T?f.jsxs("div",{className:"mut-body",children:[f.jsx(dE,{table:w,data:T,onChange:C}),f.jsx(_N,{data:T,rows:i,hasMore:r,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:j,onTable:C,onHover:M,onLocate:R})]}):f.jsx("div",{className:"mut-rule",children:f.jsx(Zr,{label:"mutations",envelope:s,loading:h,skeletonHeight:240,children:()=>null})})]})}),um={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},dx=["oncogene","tsg","both"],cm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},RN={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function TN(n){return n?RN[n]??n:""}const AN={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function fm(n){return n?AN[n]??n:"–"}function ON(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function zN(n){return n.some(s=>s.left_expression||s.right_expression||s.expression)}function DN(n){const s={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(s[i.role]+=1);return s}function HN(n){const s=n.trim().match(Y1);if(!s)return null;const i=Number(s[2].replace(/,/g,"")),r=s[3]?Number(s[3].replace(/,/g,"")):i;return{chrom:s[1].toUpperCase(),start:Math.min(i,r),end:Math.max(i,r)}}function LN(n,s){const i=s.trim().toLowerCase();if(!i)return!0;const r=HN(s);if(r){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===r.chrom&&h!==null&&h>=r.start&&h<=r.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,fm(n.sv_type),n.role?um[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const Wa={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},UN={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},VN={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function $N(n){return n.size?VN[n.size]??n.size:""}function _y(n){const s=`${n.clustered?"Clustered":"Dispersed"} ${cm[n.sv_class].toLowerCase()}s`;return n.size?`${s}, ${TN(n.size)}`:s}function FN(n){const s=[];return n.forEach((i,r)=>{const u=s[s.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=r:s.push({clustered:i.clustered,sv_class:i.sv_class,start:r,end:r})}),s}function BN(n){const s=new Map;for(const i of n)s.set(i.sv_class,(s.get(i.sv_class)??0)+i.count);return[...s].map(([i,r])=>({sv_class:i,count:r}))}const kN=45;function GN({role:n}){return n?f.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:um[n]}):f.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function qN({rows:n,shown:s,onToggle:i}){const r=DN(n);return f.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:dx.filter(u=>r[u]>0).map(u=>f.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":s.includes(u),onClick:()=>i(u),children:[um[u],f.jsx("span",{className:"sv-legend-n",children:r[u]})]},u))})}function My({gene:n,chrom:s,pos:i,loc:r,query:u}){return f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"sv-end",children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:n||"–",query:u})}),r&&f.jsx("span",{className:"sv-loc",children:r})]}),f.jsx("span",{className:"vt-sub stack mono",children:s&&i!==null?Fr(s,i):"–"})]})}function hx(n){return n?n.replace(/,\s*/g,", "):"–"}function QN({label:n,sorted:s,onClick:i}){return f.jsxs("button",{type:"button",className:"vt-sort","data-active":!!s,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,s==="desc"?f.jsx(zu,{size:12,"aria-hidden":!0}):s==="asc"?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function YN({row:n,onLocate:s}){const[i,r]=E.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,d=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,h=[["Type",fm(n.sv_type)],["Left breakpoint",u?`${Fr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${Fr(d.chrom,d.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",hx(n.callers)]],m=n.gene??n.left_gene,p=n.gene??n.right_gene;return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>f.jsxs("div",{children:[f.jsx("dt",{children:y}),f.jsx("dd",{children:x})]},y))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...u,gene:m}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show ",d&&d.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),d&&d.chrom!==(u==null?void 0:u.chrom)&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...d,gene:p}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function Ry({kind:n,rows:s,total:i=s.length,query:r="",onLocate:u}){const[d,h]=E.useState({}),[m,p]=E.useState([]),y=E.useRef(null),x=zN(s);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[r,s.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:j})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":j.getIsExpanded(),"aria-label":`Details of ${j.original.gene??[j.original.left_gene,j.original.right_gene].filter(Boolean).join(" and ")}`,onClick:F=>{F.stopPropagation(),j.toggleExpanded()},children:f.jsx(nm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:j=>j.sv_type??"",cell:({row:{original:j}})=>fm(j.sv_type)},{id:"role",header:"Role",accessorFn:j=>j.role?dx.indexOf(j.role):9,cell:({row:{original:j}})=>f.jsx(GN,{role:j.role})},{id:"callers",header:"Callers",accessorFn:j=>j.callers??"",cell:({row:{original:j}})=>f.jsx("span",{className:"text-[12.5px]",children:hx(j.callers)})},{id:"support",header:"Support",accessorFn:j=>j.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:j.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:j}})=>f.jsx("span",{className:"mono text-[12px]",children:[j.left_pileup,j.right_pileup].filter(Boolean).join(" · ")||"–"})}],R=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:j}})=>n==="whole_gene"?f.jsx("span",{className:"text-[12.5px]",children:j.expression??"–"}):f.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[f.jsx("span",{children:j.left_expression??"–"}),f.jsx("span",{style:{color:"var(--muted)"},children:j.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:j=>j.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:j.gene??"–",query:r})}),f.jsx("span",{className:"vt-sub mono",children:j.left_chrom&&j.left_pos!==null&&j.right_pos!==null?`${Fr(j.left_chrom,j.left_pos)}–${j.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:j=>j.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:ON(j.length)})},...M,...R]:[N,{id:"left",header:"Left",accessorFn:j=>j.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsx(My,{gene:j.left_gene,chrom:j.left_chrom,pos:j.left_pos,loc:j.left_loc,query:r})},{id:"right",header:"Right",accessorFn:j=>j.right_gene??"",cell:({row:{original:j}})=>f.jsx(My,{gene:j.right_gene,chrom:j.right_chrom,pos:j.right_pos,loc:j.right_loc,query:r})},...M,...R]},[n,x,r]),b=ox({data:s,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:ix(),getSortedRowModel:eN(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:p}),w=b.getVisibleLeafColumns().length,C=n==="onco"?kN:cx;return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${C}px`},children:f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:b.getHeaderGroups().map(N=>f.jsx("tr",{children:N.headers.map(M=>{const R=M.column.columnDef.meta,j=M.column.getIsSorted();return f.jsx("th",{className:R==null?void 0:R.className,"aria-sort":j?j==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?f.jsx(QN,{label:String(M.column.columnDef.header),sorted:j,onClick:M.column.getToggleSortingHandler()}):Vu(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),f.jsx(fx,{items:b.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:C,getKey:N=>N.id,render:N=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var R;return f.jsx("td",{className:(R=M.column.columnDef.meta)==null?void 0:R.className,children:Vu(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:w,children:f.jsx(YN,{row:N.original,onLocate:u})})})]})})]})}),f.jsx(Wu,{shown:s.length,total:i,noun:["row","rows"]})]})}const _r=176,sh=34,ih=7,rh=22,Tu=30,IN={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function XN(n,s){return[cm[n],UN[n],IN[n]].find(r=>Sa(r,12)+8<=s)??""}function KN(n,s,i,r,u){const d=Math.min(u,i/2,r);return`M${n},${s+r} V${s+d} Q${n},${s} ${n+d},${s} H${n+i-d} Q${n+i},${s} ${n+i},${s+d} V${s+r} Z`}function ZN({categories:n,total:s,litClass:i}){const[r,u]=Pr(),d=E.useId(),[h,m]=E.useState(null),p=FN(n),y=Math.max(0,...n.map(k=>k.count)),x=Xj(y,3),v=x[x.length-1],b=n.length,w=(p.length-1)*ih,C=n.some(k=>k.clustered)&&n.some(k=>!k.clustered),N=Math.max((u-Tu-6-w-(C?rh-ih:0))/b,4),M=Math.min(26,N*.64),R=[],j=[];let F=Tu;p.forEach((k,ne)=>{ne>0&&(F+=p[ne-1].clustered!==k.clustered?rh:ih);const ie=F;for(let ee=k.start;ee<=k.end;ee++)R[ee]=F+(N-M)/2,F+=N;const Ce=j.find(ee=>ee.clustered===k.clustered&&ee.x1>=ie-rh-1),X=n.slice(k.start,k.end+1).reduce((ee,P)=>ee+P.count,0);Ce?(Ce.x1=F,Ce.count+=X):j.push({clustered:k.clustered,x0:ie,x1:F,count:X})});const T=k=>sh+_r-k/v*_r,H=sh+_r,D=k=>h!==null?k===h:i?n[k].sv_class===i:!0,z=h===null?null:n[h],Y=z&&s?Math.round(z.count/s*100):0,te=H+62;return f.jsxs("div",{ref:r,className:"rs","data-lit":h!==null||i?"":void 0,children:[f.jsxs("svg",{width:u,height:te,role:"img","aria-label":`Rearrangement signatures: ${n.filter(k=>k.count>0).map(k=>`${k.category} ${k.count}`).join(", ")}`,children:[f.jsx("defs",{children:Object.keys(Wa).map(k=>f.jsxs("linearGradient",{id:`${d}-${k}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:Wa[k]}}),f.jsx("stop",{offset:"1",style:{stopColor:Wa[k]},stopOpacity:.72})]},k))}),j.map(k=>f.jsxs("g",{children:[C&&k.clustered&&f.jsx("rect",{x:k.x0-6,y:0,width:k.x1-k.x0+12,height:H+56,rx:14,className:"rs-zone"}),C&&f.jsxs("text",{x:k.x0,y:17,className:"rs-zone-name",children:[k.clustered?"Clustered":"Dispersed",f.jsxs("tspan",{className:"rs-zone-n",children:[" ",k.count.toLocaleString("en-US")]})]})]},k.clustered?"c":"d")),x.map(k=>f.jsxs("g",{children:[f.jsx("line",{x1:Tu-4,x2:u,y1:T(k),y2:T(k),className:k===0?"rs-base":"rs-grid"}),f.jsx("text",{x:Tu-10,y:T(k)+4,textAnchor:"end",className:"rs-tick",children:k.toLocaleString("en-US")})]},k)),n.map((k,ne)=>{const ie=k.count/v*_r,Ce=D(ne);return f.jsxs("g",{className:"rs-bar","data-off":Ce?void 0:"",children:[k.count>0?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:KN(R[ne],T(k.count),M,ie,6),fill:`url(#${d}-${k.sv_class})`,fillOpacity:k.clustered?.5:1}),f.jsx("text",{x:R[ne]+M/2,y:T(k.count)-7,textAnchor:"middle",className:"rs-count",children:k.count.toLocaleString("en-US")})]}):f.jsx("rect",{x:R[ne],y:H-3,width:M,height:3,rx:1.5,style:{fill:Wa[k.sv_class]},fillOpacity:.28}),k.size&&N>=26&&f.jsx("text",{x:R[ne]+M/2,y:H+16,textAnchor:"middle",className:"rs-size",children:$N(k)}),f.jsx("rect",{x:R[ne]-(N-M)/2,y:sh-8,width:N,height:_r+30,fill:"transparent",tabIndex:0,"aria-label":`${_y(k)}: ${k.count}`,onMouseEnter:()=>m(ne),onMouseLeave:()=>m(null),onFocus:()=>m(ne),onBlur:()=>m(null)})]},k.category)}),p.map(k=>{const ne=R[k.start],ie=R[k.end]+M,Ce=XN(k.sv_class,ie-ne+(N-M));return f.jsxs("g",{className:"rs-class","data-off":i&&i!==k.sv_class?"":void 0,children:[f.jsx("line",{x1:ne,x2:ie,y1:H+26,y2:H+26,style:{stroke:Wa[k.sv_class]},className:"rs-bracket"}),f.jsx("text",{x:(ne+ie)/2,y:H+44,textAnchor:"middle",className:"rs-class-name",children:Ce})]},`${k.clustered}-${k.sv_class}`)})]}),z&&h!==null&&f.jsxs(Ni,{x:R[h]+M/2,y:Math.max(T(z.count)-8,40),width:u,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[z.sv_class],opacity:z.clustered?.5:1},"aria-hidden":!0}),_y(z)]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rearrangements"}),f.jsx("b",{children:z.count.toLocaleString("en-US")})]}),s>0&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Of all of them"}),f.jsxs("b",{children:[Y===0&&z.count>0?"<1":Y,"%"]})]})]})]})}function mx(n,s,i){return`${n.toLocaleString("en-US")} ${n===1?s:i}`}function PN({categories:n,total:s}){const[i,r]=E.useState(null),u=BN(n);return f.jsxs("div",{className:"sv-sigs",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",f.jsx("span",{className:"sv-h-n",children:mx(s,"rearrangement","rearrangements")})]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>r(null),children:[u.map(({sv_class:d,count:h})=>f.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>r(d),children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[d]},"aria-hidden":!0}),cm[d],f.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),f.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),f.jsx("div",{className:"sv-sigs-plot",children:f.jsx(ZN,{categories:n,total:s,litClass:i})})]})}function JN({data:n,query:s,onQuery:i,onLocate:r}){const[u,d]=E.useState([]),h=w=>d(C=>C.includes(w)?C.filter(N=>N!==w):[...C,w]),m=w=>w.filter(C=>LN(C,s)),p=w=>u.length?w.filter(C=>C.role&&u.includes(C.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=p(m(n.onco)),b=p(m(n.whole_gene));return y.length===0?f.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"tbar",children:[x.length>0&&f.jsx(qN,{rows:x,shown:u,onToggle:h}),f.jsx($u,{value:s,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&f.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[f.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),f.jsx(Ry,{kind:"onco",rows:v,total:n.onco.length,query:s,onLocate:r})]}),b.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[f.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),f.jsx(Ry,{kind:"whole_gene",rows:b,total:n.whole_gene.length,query:s,onLocate:r})]})]})}const WN=E.forwardRef(function({envelope:s,loading:i,picked:r,onLocate:u},d){const h=(s==null?void 0:s.status)==="ok"?s.data:null,[m,p]=E.useState("");return f.jsx(Ku,{ref:d,title:"Structural variants",subtitle:h?mx(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"structuralVariants",className:"svs",expandable:!0,children:f.jsx(Zr,{label:"structural variants",envelope:s,loading:i,skeletonHeight:220,children:y=>f.jsxs("div",{className:"sv-body",children:[f.jsx(JN,{data:y,query:m,onQuery:p,onLocate:u}),y.signatures&&f.jsx(PN,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),e_={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function Ty(n,s="short"){var i;return((i=e_[n])==null?void 0:i[s])??n}const oh=8;function t_(n){const s=n.find(u=>u.group==="sample")??n[0],i=[...(s==null?void 0:s.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),r=i.length>oh?oh-1:oh;return{shown:i.slice(0,r),other:i.slice(r)}}function Ay(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Oy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],n_="#a3a3ab";function l_(n){const{shown:s,other:i}=t_(n),r=n.find(p=>p.group==="sample")??n[0],u=n.find(p=>p.group==="cohort")??null,d=(p,y,x)=>p?p.signatures.filter(v=>y.includes(v.signature)).reduce((v,b)=>v+(b[x]??0),0):null,h=(p,y,x)=>{var v,b;return{name:p,members:y,colour:x,share:d(r,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(r,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=r==null?void 0:r.signatures.find(w=>w.signature===p))==null?void 0:v.aetiology)??((b=u==null?void 0:u.signatures.find(w=>w.signature===p))==null?void 0:b.aetiology)??null:`${y.length} smaller signatures`}},m=s.map((p,y)=>h(p,[p],Oy[y%Oy.length]));return i.length&&m.push(h("Other",i,n_)),m}function ua(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function zy(n,s,i){const r=Math.max(s-i*Math.max(n.length-1,0),0),u=n.reduce((h,m)=>h+m,0)||1;let d=0;return n.map(h=>{const m=h/u*r,p={y0:d,y1:d+m};return d+=m+i,p})}function a_(n,s,i,r){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(s.y0)} C${d(u)},${d(s.y0)} ${d(u)},${d(r.y0)} ${d(i)},${d(r.y0)} L${d(i)},${d(r.y1)} C${d(u)},${d(r.y1)} ${d(u)},${d(s.y1)} ${d(n)},${d(s.y1)} Z`}function Lr(n,s){const i=(n.length-1)*s,r=Math.floor(i),u=Math.ceil(i);return n[r]+(n[u]-n[r])*(i-r)}function gx(n){var u;const s=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(s.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,r=[...s];if(i!==null){const d=r.indexOf(i);d>=0&&r.splice(d,1)}return{values:s,q1:Lr(s,.25),median:Lr(s,.5),q3:Lr(s,.75),tumour:i,above:i===null?null:r.filter(d=>d<i).length,others:r.length}}function s_(n,s=64){const i=n.length,r=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-r)**2,0)/Math.max(i-1,1)),d=Math.min(u,(Lr(n,.75)-Lr(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:s+1},(y,x)=>{const v=x/s;return{x:v,y:n.reduce((b,w)=>b+Math.exp(-.5*((v-w)/h)**2),0)}}),p=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/p}))}function i_(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u]-n[d]).forEach(u=>{let d=0;for(;i.some(h=>h.level===d&&Math.abs(h.x-n[u])<s);)d+=1;i.push({x:n[u],level:d}),r[u]=d}),r}function uh(n){return n.above===null||n.others===0?"":n.above===n.others?n.others===1?"Above the other sample":"Highest in the cohort":n.above===0?"Lowest in the cohort":`Above ${n.above} of ${n.others} others`}function ui(n,s,i,r){const u=Math.PI*(1-Math.min(Math.max(r,0),1));return{x:n+i*Math.cos(u),y:s-i*Math.sin(u)}}const ca=n=>n==null?"–":n.toFixed(2),r_=8,o_=250,ke={w:232,h:148,cx:116,cy:122,r:92};function ch(n,s){const i=ui(ke.cx,ke.cy,ke.r,n),r=ui(ke.cx,ke.cy,ke.r,s);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${ke.r},${ke.r} 0 0 1 ${r.x.toFixed(2)},${r.y.toFixed(2)}`}function u_({score:n}){const s=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",r=n.threshold,u=r===null?null:[ui(ke.cx,ke.cy,ke.r-14,r),ui(ke.cx,ke.cy,ke.r+14,r),ui(ke.cx,ke.cy,ke.r+27,r)],d=s===null?null:ui(ke.cx,ke.cy,ke.r,s);return f.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[f.jsxs("div",{className:"hrd-score-head",children:[f.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&f.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),f.jsxs("svg",{width:ke.w,height:ke.h,viewBox:`0 0 ${ke.w} ${ke.h}`,role:"img","aria-label":`${n.name} ${s===null?"has no score":`scores ${ca(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-track"}),r!==null&&f.jsx("path",{d:ch(r,1),pathLength:1,className:"hrd-zone"}),s!==null&&f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-fill",style:{"--v":s}}),u&&f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),f.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:r})]}),d&&f.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),f.jsx("text",{x:ke.cx,y:ke.cy-10,textAnchor:"middle",className:"hrd-num",children:s===null?"–":ca(n.value)}),f.jsx("text",{x:ke.cx-ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),f.jsx("text",{x:ke.cx+ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&f.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function c_(n){const s=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:s.filter(i=>i.stats.tumour>i.stats.median).length,of:s.length}}const f_="var(--font)";function d_({features:n}){var F;const[s,i]=Pr(720),[r,u]=E.useState(null),d=n.map(T=>({feature:T,stats:gx(T)})),h=i<640,m=h?0:116,p=h?0:168,y=m+10,x=i-p-14,v=T=>y+T*(x-y),b=h?28:0,w=h?100:70,C=b+38,N=30,M=d.length*w+14,R=M+22,j=r===null?null:d[r];return f.jsxs("div",{ref:s,className:"clouds",onMouseLeave:()=>u(null),children:[f.jsxs("svg",{width:i,height:R,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:f_},children:[[0,.25,.5,.75,1].map(T=>f.jsx("line",{x1:v(T),x2:v(T),y1:0,y2:M,className:"cloud-grid","data-major":T===0||T===1||void 0},T)),d.map(({feature:T,stats:H},D)=>{var Ce;const z=D*w,Y=Ty(T.feature),te=H&&H.values.length<=o_?H.values:[],k=i_(te.map(v),7.5),ne=H&&H.values.length>=r_?s_(H.values):null,ie=H&&H.tumour!==null?v(H.tumour):null;return f.jsxs("g",{transform:`translate(0 ${z})`,className:"cloud-row","data-on":r===D||void 0,onMouseEnter:()=>u(D),children:[f.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),H&&f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:v(H.q1),y:b+4,width:Math.max(v(H.q3)-v(H.q1),2),height:w-b-10,rx:8,className:"cloud-iqr"}),f.jsx("line",{x1:v(H.median),x2:v(H.median),y1:b+10,y2:w-14,className:"cloud-median"}),ne&&f.jsxs(f.Fragment,{children:[f.jsx("path",{d:`M${v(0)},${C} ${ne.map(X=>`L${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" ")} L${v(1)},${C} Z`,className:"cloud-area"}),f.jsx("path",{d:ne.map((X,ee)=>`${ee?"L":"M"}${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),te.map((X,ee)=>f.jsx("circle",{cx:v(X),cy:C+11+Math.min(k[ee],2)*7,r:3,className:"cloud-dot"},ee)),ie!==null&&f.jsxs("g",{className:"cloud-pin",transform:`translate(${ie} 0)`,children:[f.jsx("line",{y1:b+8,y2:C,className:"cloud-stem"}),f.jsx("circle",{cy:C,r:8,className:"cloud-pin-dot"})]})]}),f.jsx("text",{x:h?4:6,y:h?18:C-6,className:"cloud-name",children:Y}),!h&&f.jsxs("text",{x:6,y:C+10,className:"cloud-raw",children:["raw ",ca((Ce=T.sample)==null?void 0:Ce.raw)]}),H&&f.jsx("text",{x:i-4,y:h?18:C-6,textAnchor:"end",className:"cloud-rank",children:uh(H)}),!h&&H&&f.jsxs("text",{x:i-4,y:C+10,textAnchor:"end",className:"cloud-raw",children:["of ",H.values.length," in the cohort"]})]},T.feature)}),f.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[f.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),f.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),f.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),j&&r!==null&&j.stats&&f.jsxs(Ni,{x:j.stats.tumour!==null?v(j.stats.tumour):v(j.stats.median),y:r*w+C,width:i,children:[f.jsx("span",{className:"ctip-title",children:Ty(j.feature.feature,"long")}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[ca((F=j.feature.sample)==null?void 0:F.raw)," ",f.jsxs("i",{children:["scaled ",ca(j.stats.tumour)]})]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort median"}),f.jsx("b",{children:ca(j.stats.median)})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Middle half"}),f.jsxs("b",{children:[ca(j.stats.q1),"–",ca(j.stats.q3)]})]}),uh(j.stats)&&f.jsx("span",{className:"ctip-note",children:uh(j.stats)})]})]})}const Mr=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Rr=n=>Math.round(n).toLocaleString("en-US"),h_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,Dy=3,ii=26,ri=52;function m_({groups:n,bands:s,lit:i,onLight:r}){const[u,d]=Pr(),h=n.find(D=>D.group==="sample")??n[0],m=n.find(D=>D.group==="cohort")??null,p=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=p?330:230,b=zy(s.map(D=>D.share),v,Dy),w=p?zy(s.map(D=>D.cohortShare??0),v,Dy):[],C=p?x:0,N=d-x-ii,M=C+ii,R=N,j=s.find(D=>D.name===i)??null,F=j?s.indexOf(j):-1,T=F<0?0:ri+((b[F].y0+b[F].y1)/2+(p?(w[F].y0+w[F].y1)/2:(b[F].y0+b[F].y1)/2))/2,H=(D,z,Y,te,k,ne)=>{const ie=D.y1-D.y0;if(!y||ie<17)return null;const Ce=ri+(D.y0+D.y1)/2,X=ie>=36;return f.jsxs("text",{x:k,y:Ce,textAnchor:ne,className:"flow-label",children:[f.jsxs("tspan",{x:k,dy:X?"-0.35em":"0.35em",className:"flow-name",children:[z.name,!X&&f.jsxs("tspan",{className:"flow-share",children:[" ",Mr(Y)]})]}),X&&f.jsxs("tspan",{x:k,dy:"1.35em",className:"flow-share",children:[Mr(Y),te]})]})};return f.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[f.jsxs("svg",{width:d,height:ri+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[f.jsxs("g",{className:"flow-head",children:[f.jsx("text",{x:0,y:16,className:"flow-col",children:Ay(h)}),f.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Rr(h.total)," mutations"]}),m&&f.jsxs(f.Fragment,{children:[f.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:Ay(m)}),f.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Rr(m.total)," each, on average"]})]})]}),p&&f.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ri})`,children:s.map((D,z)=>f.jsx("path",{d:a_(M,b[z],R,w[z]),fill:D.colour,className:"flow-rib","data-on":i===D.name||void 0,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null)},D.name))}),s.map((D,z)=>{const Y=i===D.name||void 0,te=(k,ne)=>k.y1-k.y0>.4&&f.jsx("rect",{x:ne,y:ri+k.y0,width:ii,height:k.y1-k.y0,rx:Math.min(5,(k.y1-k.y0)/2),fill:D.colour,className:"flow-seg","data-on":Y,tabIndex:0,"aria-label":`${D.name}, ${Mr(D.share)} of this tumour`,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null),onFocus:()=>r(D.name),onBlur:()=>r(null)});return f.jsxs("g",{className:"flow-band","data-on":Y,children:[te(b[z],C),p&&te(w[z],N),H(b[z],D,D.share,D.count?` · ${Rr(D.count)}`:"",p?C-10:C+ii+10,p?"end":"start"),p&&H(w[z],D,D.cohortShare??0,"",N+ii+10,"start")]},D.name)}),p&&d>=520&&s.map((D,z)=>{const Y=ua(D),te=b[z],k=w[z];if(Y===null||Math.abs(Y)<5||Math.min(te.y1-te.y0,k.y1-k.y0)<22)return null;const ne=(M+R)/2,ie=ri+(te.y0+te.y1+k.y0+k.y1)/4;return f.jsxs("g",{transform:`translate(${ne} ${ie})`,className:"flow-delta","data-on":i===D.name||void 0,children:[f.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),f.jsxs("text",{y:4,textAnchor:"middle",children:[h_(Y)," pts"]})]},D.name)})]}),j&&f.jsxs(Ni,{x:p?d/2:C+ii+x+20,y:T,width:d,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:j.colour},"aria-hidden":!0}),j.name]}),j.aetiology&&f.jsx("span",{className:"ctip-sub",children:j.aetiology}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[Mr(j.share)," ",f.jsxs("i",{children:[Rr(j.count)," mutations"]})]})]}),j.cohortShare!==null&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort"}),f.jsxs("b",{children:[Mr(j.cohortShare)," ",f.jsx("i",{children:j.cohortCount!==null?`about ${Rr(j.cohortCount)} each`:""})]})]}),ua(j)!==null&&f.jsx("span",{className:"ctip-note",children:Math.abs(ua(j))<1?"About the same as its cohort":`${Math.abs(ua(j)).toFixed(Math.abs(ua(j))>=10?0:1)} points ${ua(j)>0?"above":"below"} its cohort`})]})]})}const Hy=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,px=n=>Math.round(n).toLocaleString("en-US");function g_({points:n,reach:s}){if(n===null)return null;const i=Math.min(Math.abs(n)/s,1)*100;return f.jsx("span",{className:"lead","aria-hidden":!0,children:f.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function p_({groups:n}){const[s,i]=E.useState(null),r=E.useMemo(()=>l_(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...r.map(h=>Math.abs(ua(h)??0)));return f.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[f.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),f.jsxs("div",{className:"sig-grid",children:[f.jsx(m_,{groups:n,bands:r,lit:s,onLight:i}),f.jsxs("div",{className:"sig-tablebox",children:[f.jsxs("table",{className:"sig-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Signature"}),f.jsx("th",{className:"n",children:"This tumour"}),u&&f.jsx("th",{className:"n",children:"Cohort"}),u&&f.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),f.jsx("tbody",{children:r.map(h=>{const m=ua(h);return f.jsxs("tr",{"data-lit":s===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[f.jsxs("td",{children:[f.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[f.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&f.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),f.jsxs("td",{className:"n",children:[f.jsx("span",{className:"mono",children:Hy(h.share)}),f.jsx("span",{className:"sig-count",children:px(h.count)})]}),u&&f.jsx("td",{className:"n mono",children:Hy(h.cohortShare??0)}),u&&f.jsx("td",{children:f.jsxs("span",{className:"lead-cell",children:[f.jsx(g_,{points:m,reach:d}),f.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),f.jsx(Wu,{shown:r.length,total:r.length,noun:["signature","signatures"]})]})]})]})}function v_({hrd:n}){const s=E.useMemo(()=>c_(n.features.map(i=>({feature:i,stats:gx(i)}))),[n.features]);return f.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[f.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),f.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&f.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>f.jsx(u_,{score:i},i.name))}),n.features.length>0&&f.jsxs("div",{className:"hrd-chart",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?f.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),s.of>0&&f.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",f.jsx("b",{children:s.above})," of ",s.of," features"]}),f.jsx(d_,{features:n.features})]})]})]})}const y_=E.forwardRef(function({envelope:s,loading:i,picked:r},u){var m;const d=(s==null?void 0:s.status)==="ok"?s.data:null,h=(m=d==null?void 0:d.signatures)==null?void 0:m.find(p=>p.group==="sample");return f.jsx(Ku,{ref:u,title:"Signatures and HRD",subtitle:h?`${px(h.total)} mutations attributed to signatures`:void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"signaturesHrd",className:"sigs",children:f.jsx(Zr,{label:"signatures and HRD",envelope:s,loading:i,skeletonHeight:300,children:p=>f.jsxs("div",{className:"sig-body",children:[p.signatures?f.jsx(p_,{groups:p.signatures}):f.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),p.hrd&&f.jsx(v_,{hrd:p.hrd})]})})})});function x_(n){var r;const s=n.samples.filter(u=>u.category==="TUMOR");return(r=s.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??s[0]??n.samples[0])==null?void 0:r.id}const S_=[];function b_(n){const s=E.useRef(!1);return E.useEffect(()=>{let i=0;const r=()=>{s.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>s.current=!1,150)};return window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!s.current)&&n(i)},[n])}function w_(n){var i,r;const s=(r=(i=n==null?void 0:n.samples.find(u=>{var d;return(d=u.disease)==null?void 0:d.name}))==null?void 0:i.disease)==null?void 0:r.name;return s?s.charAt(0)+s.slice(1).toLowerCase():void 0}function Tr(n,s){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:s})}const Ly=160;function C_(n,s){const i=E.useRef(n);i.current=n;const r=E.useRef(null),u=E.useRef(null),d=E.useRef(0),h=E.useRef(()=>{}),m=E.useRef(()=>{});E.useEffect(()=>{let x=0;const v=()=>{var H;if(x=0,r.current)return;const M=i.current.filter(([,D])=>D.current).map(([D,z])=>[D,z.current.getBoundingClientRect().top]),R=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),j=Math.max(0,...M.map(([,D])=>D+window.scrollY-R-Ly)),F=Ly+(R>0?j*Math.min(1,window.scrollY/R):0);let T=((H=M[0])==null?void 0:H[0])??null;for(const[D,z]of M)z<=F&&(T=D);s.set(T)},b=()=>{r.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(r.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&b();return}x||(x=requestAnimationFrame(v))},C=()=>{r.current&&u.current===null&&(window.clearTimeout(d.current),b())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",C),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",C),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const p=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==p.current&&(p.current=x,h.current())}),x=>{r.current=x,u.current=null,s.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function j_({held:n,sampleId:s,...i}){const r=Iu(n);return f.jsx($C,{...i,sampleId:r??s})}function E_(){var Z,le,Me,Ve,Fe,Ct,st,et,Yn,Dl,ja,Ea,Jr,Mi,Wr;const{individual:n=""}=Tw(),[s,i]=Pw(),r=s.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[p,y]=E.useState(fy),[x,v]=E.useState(null),b=b_(v),[w,C]=E.useState(null),N=E.useRef(null),[M,R]=E.useState(null),j=E.useRef(Dr(!0)).current,F=E.useRef(null),T=E.useRef(null),H=E.useRef(null),D=E.useRef(null),z=E.useRef(Dr(null)).current,Y=C_([["overview",T],["copyNumber",N],["mutations",F],["structuralVariants",H],["signatures",D]],z),te=Ky();E.useEffect(()=>{const fe=M;if(!fe||typeof IntersectionObserver>"u")return;const Pe=new IntersectionObserver(([nt])=>j.set(nt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Pe.observe(fe),()=>Pe.disconnect()},[M]);const k=E.useCallback(fe=>y(Pe=>({...Pe,...fe})),[]),ne=E.useCallback(fe=>{k({q:JC(fe.chrom,fe.start,fe.end),scope:"all",sort:"position"}),Tr(F.current,"start")},[k]),ie=E.useCallback(fe=>{k({q:fe}),Tr(F.current,"start")},[k]),Ce=E.useCallback(fe=>{C({chrom:fe.chrom,pos:fe.pos,gene:fe.gene,nonce:Date.now()}),Tr(N.current,"center")},[]),X=E.useCallback(fe=>{C({...fe,nonce:Date.now()}),Tr(N.current,"center")},[]),ee=lj(n,r),P=ee.data,J=(P==null?void 0:P.status)==="ok"?P.data??void 0:void 0,ue=s.get("sample")??(J?x_(J):void 0),Ee=J==null?void 0:J.samples.find(fe=>fe.id===ue),je=(Ee==null?void 0:Ee.category)==="TUMOR"?ue:void 0,$e=h??((J==null?void 0:J.mode)==="unmatched"?"vaf":"ccf"),Ie=aj(n,J?ue:void 0,r),We=sj(n,r),A=ij(n,je,r),V=rj(n,je,$e,p.ffpe,r),W=cj(n,je,p,r),se=(Z=W.data)==null?void 0:Z.pages[0],he=E.useMemo(()=>{var fe;return((fe=W.data)==null?void 0:fe.pages.flatMap(Pe=>Pe.status==="ok"&&Pe.data?Pe.data.rows:[]))??[]},[W.data]),{fetchNextPage:ye}=W,be=E.useCallback(()=>void ye(),[ye]),re=uj(n,je,r),me=oj(n,je,r),rt=(Me=(le=We.data)==null?void 0:le.data)==null?void 0:Me.samples.find(fe=>fe.sample===ue),Bt=E.useMemo(()=>(rt==null?void 0:rt.drivers)??S_,[rt]),zn=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Nt=E.useRef(null),ot=E.useRef(Dr(null)).current,Ge=(fe,Pe)=>{var nt;(nt=Nt.current)==null||nt.toggleAttribute("data-gliding",fe),Nt.current&&(Nt.current.style.minHeight=fe&&Pe?`${Pe}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var fe;return(fe=pt.current)==null?void 0:fe.call(pt)},[]);const cl=fe=>{var _a,Ma;if(fe===ue)return;(_a=pt.current)==null||_a.call(pt);const Pe=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,nt=50;if(Pe||window.scrollY<=nt)return window.scrollTo({top:0,behavior:"auto"}),At("sample",fe);const bn=window.scrollY,Xt=Math.min(520,240+bn*.12),ec=performance.now();Ge(!0,document.documentElement.scrollHeight-(((Ma=Nt.current)==null?void 0:Ma.getBoundingClientRect().top)??0)-bn),ot.set(ue??null),Y("overview"),E.startTransition(()=>At("sample",fe));let Ri=0;function In(){cancelAnimationFrame(Ri),window.removeEventListener("wheel",In),window.removeEventListener("touchstart",In),window.removeEventListener("keydown",In),pt.current=null,ot.set(null),Ge(!1)}const Na=dl=>{const Ra=Math.min(1,(dl-ec)/Xt),Hl=bn*(1-Ra)**3;window.scrollTo({top:Hl,behavior:"instant"}),Hl<=nt&&ot.set(null),Ra<1?Ri=requestAnimationFrame(Na):In()};window.addEventListener("wheel",In,{passive:!0}),window.addEventListener("touchstart",In,{passive:!0}),window.addEventListener("keydown",In),pt.current=In,Ri=requestAnimationFrame(Na)},At=(fe,Pe)=>{const nt=new URLSearchParams(s);nt.set(fe,Pe),i(nt,{replace:!1}),d(null),y(fy()),v(null),C(null)},nn=[ee,Ie,We,A,V,W,re,me].map(fe=>fe.error);if(nn.some(fe=>fe instanceof Xu))return f.jsx("div",{className:`wgts ${Gn.theme}`,children:f.jsx("main",{className:"page",children:f.jsx(Dj,{onSignedIn:()=>te.invalidateQueries()})})});const qn=nn.find(fe=>fe instanceof U1),ut=Ee&&J?lm(Ee.id,J.individual.id):"",fl=new Set(J?je?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),It=fe=>{if(Y(fe),fe==="overview"){const nt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:nt?"auto":"smooth"});return}const Pe={copyNumber:N,mutations:F,structuralVariants:H,signatures:D}[fe];Tr((Pe==null?void 0:Pe.current)??null,"start")},kt=J&&ue&&J.analyses[ue]||[],zl=(J==null?void 0:J.failures.filter(fe=>fe.sample===ue))??[],Gt=new Set(kt.map(Ft)),Qn=new Set,ln=fe=>fe==null?void 0:fe.forEach(Pe=>Gt.has(Ft(Pe))&&Qn.add(Ft(Pe)));for(const fe of((Fe=(Ve=Ie.data)==null?void 0:Ve.data)==null?void 0:Fe.metrics)??[])Uh.includes(fe.key)&&ln(fe.sources);ln((Ct=We.data)==null?void 0:Ct.lineage),ln((st=A.data)==null?void 0:st.lineage),ln((et=V.data)==null?void 0:et.lineage),ln(se==null?void 0:se.lineage),ln((Yn=re.data)==null?void 0:Yn.lineage),ln((Dl=me.data)==null?void 0:Dl.lineage);for(const fe of kt)fe.state==="failed"&&zl.length>0&&Qn.add(Ft(fe));return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx(yj,{analyses:kt,onPage:Qn,sampleLabel:ut,picked:u,onPick:d,sections:fl,activeStore:z,onSection:It}),f.jsxs("div",{ref:Nt,className:"page",children:[f.jsx(L1,{individualId:n,subtitle:[w_(J),(ja=J==null?void 0:J.individual.sex)==null?void 0:ja.toLowerCase(),(J==null?void 0:J.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:J?f.jsx(DC,{sex:J.individual.sex}):void 0,report:J?f.jsx(_j,{data:J,onVersion:fe=>At("version",fe)}):void 0,compact:J&&ue?f.jsx(FC,{data:J,sampleId:ue,fingerprint:((Ea=We.data)==null?void 0:Ea.data)??void 0,onSample:cl}):void 0,headerInView:j}),f.jsxs("main",{className:"flex flex-1 flex-col",children:[J&&ue&&f.jsx("div",{className:"px-8 pt-1",children:f.jsx("div",{ref:R,children:f.jsx(j_,{held:ot,data:J,sampleId:ue,fingerprint:((Jr=We.data)==null?void 0:Jr.data)??void 0,onSample:fe=>At("sample",fe)})})}),f.jsxs("div",{className:"sheet",children:[ee.isPending&&f.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[qn.message]}})}),ee.isError&&!qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),P&&P.status!=="ok"&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:P})}),(P==null?void 0:P.status)==="ok"&&P.warnings.length>0&&f.jsx("div",{className:"sc-card px-6 py-4",children:f.jsx(es,{envelope:{...P,status:"missing"}})}),J&&ue&&f.jsxs(f.Fragment,{children:[f.jsx(zj,{sampleLabel:ut,failures:zl,analyses:kt}),je?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:T,className:"page-section",children:f.jsx(Oj,{sampleLabel:`${ut} tumour`,fingerprint:rt,metrics:Ie.data,picked:u,lineage:K1((Mi=Ie.data)==null?void 0:Mi.lineage,(Wr=We.data)==null?void 0:Wr.lineage)})}),f.jsx("div",{ref:N,className:"page-section",children:f.jsx(tE,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:ut,drivers:Bt,focus:zn,locate:w,onSegment:ne,onGene:ie})}),f.jsx(MN,{ref:F,variants:se,rows:he,hasMore:W.hasNextPage,loadingMore:W.isFetchingNextPage,onMore:be,variantsLoading:W.isPending,variantsFetching:W.isFetching&&W.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:$e,onMeasure:fe=>{m(fe),p.range&&p.range.measure!==fe&&k({range:null})},table:p,onTable:k,hovered:x,onHover:b,onLocate:Ce,showCcf:J.mode!=="unmatched"}),f.jsx(WN,{ref:H,envelope:re.data,loading:re.isPending,picked:u,onLocate:X}),f.jsx(y_,{ref:D,envelope:me.data,loading:me.isPending,picked:u})]}):f.jsx("div",{ref:T,className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${ut} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const fh=200,vx="wgts-picker-scope";function N_(){try{const n=localStorage.getItem(vx);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function __(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.individual} ${r.diseases.join(" ")} ${r.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function M_(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.title} ${r.short_title??""} ${r.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const dh=n=>n.toLocaleString("en-US");function R_(){return Iu(sm)?f.jsx(T_,{}):null}function T_(){var k,ne,ie,Ce;const n=tm(),s=((k=Mw("/:individual"))==null?void 0:k.params.individual)??"",i=E.useId(),r=E.useRef(null),[u,d]=E.useState(N_),[h,m]=E.useState(""),[p,y]=E.useState(""),[x,v]=E.useState(0),b=fj(),w=dj(u);E.useEffect(()=>{const X=document.activeElement,ee=document.documentElement,P=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var J;return(J=document.querySelector(".pick-main .tsearch input"))==null?void 0:J.focus()}),()=>{ee.style.overflow=P,X==null||X.focus()}},[]);const C=X=>{d(X),y(""),v(0);try{localStorage.setItem(vx,String(X))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((ne=b.data)==null?void 0:ne.results)??[],M=E.useMemo(()=>M_(N,h),[N,h]),R=u==="all"?null:N.find(X=>X.pk===u)??((ie=w.data)==null?void 0:ie.project)??null,j=((Ce=w.data)==null?void 0:Ce.results)??[],F=E.useMemo(()=>__(j,p),[j,p]),T=F.slice(0,fh),H=E.useRef(null),D=X=>{Eu(),X.individual!==s&&n(`/${encodeURIComponent(X.individual)}`)};E.useEffect(()=>{var X,ee,P;(P=(ee=(X=H.current)==null?void 0:X.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||P.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[p]);const z=X=>{const ee=X.target,P=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(X.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Eu()}else if(P&&X.key==="ArrowDown")X.preventDefault(),v(J=>Math.min(J+1,T.length-1));else if(P&&X.key==="ArrowUp")X.preventDefault(),v(J=>Math.max(J-1,0));else if(P&&X.key==="Enter"&&T[x])X.preventDefault(),D(T[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&X.key==="Enter"){X.preventDefault();const J=M[0];J&&C(J.pk)}},Y=b.isPending,te=b.isError||w.isError;return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:X=>X.target===X.currentTarget&&Eu(),children:f.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:z,children:[f.jsx("button",{ref:r,type:"button",className:"info-close","aria-label":"Close",onClick:Eu,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[f.jsx("span",{className:"info-kicker",children:"Browse"}),f.jsx("h2",{id:i,children:"Projects"}),f.jsx($u,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),f.jsxs("ol",{children:[f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>C("all"),children:[f.jsx("span",{className:"pick-name",children:f.jsxs("span",{children:[f.jsx(bC,{size:14,"aria-hidden":!0}),"All patients"]})}),f.jsx("span",{className:"pick-n",children:b.data?dh(b.data.total):""})]})}),M.map(X=>f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u===X.pk?"true":void 0,onClick:()=>C(X.pk),title:X.short_title?`${X.title} (${X.short_title})`:X.title,children:[f.jsx("span",{className:"pick-name",children:X.title}),f.jsx("span",{className:"pick-n",children:dh(X.patients)})]})},X.pk))]}),Y&&f.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Y&&N.length>0&&M.length===0&&f.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Y&&!b.isError&&N.length===0&&f.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),f.jsxs("div",{className:"pick-main",children:[f.jsxs("header",{className:"pick-head",children:[f.jsx("span",{className:"info-kicker",children:(R==null?void 0:R.short_title)??(u==="all"?"Every project":"Project")}),f.jsx("h3",{children:(R==null?void 0:R.title)??"All patients"}),(R==null?void 0:R.description)&&f.jsx("p",{children:R.description})]}),f.jsx("div",{className:"tbar",children:f.jsx($u,{value:p,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),f.jsx("div",{ref:H,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:te?f.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?f.jsx("p",{className:"pick-note",children:"Loading patients…"}):T.length===0?f.jsx("p",{className:"pick-note",children:p?`No patient matches “${p}”.`:"No patients with a dashboard in this project yet."}):T.map((X,ee)=>f.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":X.individual===s||void 0,onMouseEnter:()=>v(ee),onClick:()=>D(X),children:[f.jsx("span",{className:"pick-id mono",children:f.jsx(ds,{text:X.individual,query:p})}),f.jsx("span",{className:"pick-diseases",children:X.diseases.length>0?X.diseases.map(P=>f.jsx("span",{className:"sc-chip",children:f.jsx(ds,{text:P,query:p})},P)):f.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),f.jsx("span",{className:"pick-aside",children:X.individual===s?f.jsxs("span",{className:"pick-here",children:[f.jsx(_1,{size:13,"aria-hidden":!0}),"On this page"]}):f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[dh(X.samples)," ",X.samples===1?"sample":"samples"]}),f.jsxs("span",{className:"pick-faint",children:["report ",X.report_version,X.built?`, ${O1(X.built)}`:""]})]})})]},X.individual))}),w.data&&f.jsx(Wu,{shown:F.length,total:j.length,noun:["patient","patients"],note:F.length>fh?`Showing the first ${fh}; search to narrow`:void 0})]})]})}),document.body)}const A_=new q2({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function O_(){return f.jsx(v2,{client:A_,children:f.jsxs(Zw,{basename:Gn.basePath,children:[f.jsxs(Yw,{children:[f.jsx(_h,{path:"/",element:f.jsx(kC,{})}),f.jsx(_h,{path:"/:individual",element:f.jsx(E_,{})})]}),f.jsx(R_,{})]})})}p2.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(O_,{})}));