@elizaos/plugin-knowledge 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,160 @@
1
+ var wp=e=>{throw TypeError(e)};var yc=(e,n,i)=>n.has(e)||wp("Cannot "+i);var j=(e,n,i)=>(yc(e,n,"read from private field"),i?i.call(e):n.get(e)),ve=(e,n,i)=>n.has(e)?wp("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,i),ue=(e,n,i,s)=>(yc(e,n,"write to private field"),s?s.call(e,i):n.set(e,i),i),Pe=(e,n,i)=>(yc(e,n,"access private method"),i);var Kl=(e,n,i,s)=>({set _(a){ue(e,n,a,i)},get _(){return j(e,n,s)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function i(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(a){if(a.ep)return;a.ep=!0;const u=i(a);fetch(a.href,u)}})();function mm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vc={exports:{}},Xo={},xc={exports:{}},Ne={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var kp;function Lv(){if(kp)return Ne;kp=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=g&&O[g]||O["@@iterator"],typeof O=="function"?O:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,C={};function S(O,V,fe){this.props=O,this.context=V,this.refs=C,this.updater=fe||_}S.prototype.isReactComponent={},S.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,V,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function k(){}k.prototype=S.prototype;function R(O,V,fe){this.props=O,this.context=V,this.refs=C,this.updater=fe||_}var A=R.prototype=new k;A.constructor=R,b(A,S.prototype),A.isPureReactComponent=!0;var N=Array.isArray,T=Object.prototype.hasOwnProperty,D={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function I(O,V,fe){var de,ke={},be=null,Ee=null;if(V!=null)for(de in V.ref!==void 0&&(Ee=V.ref),V.key!==void 0&&(be=""+V.key),V)T.call(V,de)&&!F.hasOwnProperty(de)&&(ke[de]=V[de]);var Ce=arguments.length-2;if(Ce===1)ke.children=fe;else if(1<Ce){for(var Re=Array(Ce),yt=0;yt<Ce;yt++)Re[yt]=arguments[yt+2];ke.children=Re}if(O&&O.defaultProps)for(de in Ce=O.defaultProps,Ce)ke[de]===void 0&&(ke[de]=Ce[de]);return{$$typeof:e,type:O,key:be,ref:Ee,props:ke,_owner:D.current}}function B(O,V){return{$$typeof:e,type:O.type,key:V,ref:O.ref,props:O.props,_owner:O._owner}}function K(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function X(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(fe){return V[fe]})}var se=/\/+/g;function ce(O,V){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):V.toString(36)}function $(O,V,fe,de,ke){var be=typeof O;(be==="undefined"||be==="boolean")&&(O=null);var Ee=!1;if(O===null)Ee=!0;else switch(be){case"string":case"number":Ee=!0;break;case"object":switch(O.$$typeof){case e:case n:Ee=!0}}if(Ee)return Ee=O,ke=ke(Ee),O=de===""?"."+ce(Ee,0):de,N(ke)?(fe="",O!=null&&(fe=O.replace(se,"$&/")+"/"),$(ke,V,fe,"",function(yt){return yt})):ke!=null&&(K(ke)&&(ke=B(ke,fe+(!ke.key||Ee&&Ee.key===ke.key?"":(""+ke.key).replace(se,"$&/")+"/")+O)),V.push(ke)),1;if(Ee=0,de=de===""?".":de+":",N(O))for(var Ce=0;Ce<O.length;Ce++){be=O[Ce];var Re=de+ce(be,Ce);Ee+=$(be,V,fe,Re,ke)}else if(Re=x(O),typeof Re=="function")for(O=Re.call(O),Ce=0;!(be=O.next()).done;)be=be.value,Re=de+ce(be,Ce++),Ee+=$(be,V,fe,Re,ke);else if(be==="object")throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return Ee}function ne(O,V,fe){if(O==null)return O;var de=[],ke=0;return $(O,de,"","",function(be){return V.call(fe,be,ke++)}),de}function W(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(fe){(O._status===0||O._status===-1)&&(O._status=1,O._result=fe)},function(fe){(O._status===0||O._status===-1)&&(O._status=2,O._result=fe)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var re={current:null},Q={transition:null},Z={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:Q,ReactCurrentOwner:D};function G(){throw Error("act(...) is not supported in production builds of React.")}return Ne.Children={map:ne,forEach:function(O,V,fe){ne(O,function(){V.apply(this,arguments)},fe)},count:function(O){var V=0;return ne(O,function(){V++}),V},toArray:function(O){return ne(O,function(V){return V})||[]},only:function(O){if(!K(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Ne.Component=S,Ne.Fragment=i,Ne.Profiler=a,Ne.PureComponent=R,Ne.StrictMode=s,Ne.Suspense=p,Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ne.act=G,Ne.cloneElement=function(O,V,fe){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var de=b({},O.props),ke=O.key,be=O.ref,Ee=O._owner;if(V!=null){if(V.ref!==void 0&&(be=V.ref,Ee=D.current),V.key!==void 0&&(ke=""+V.key),O.type&&O.type.defaultProps)var Ce=O.type.defaultProps;for(Re in V)T.call(V,Re)&&!F.hasOwnProperty(Re)&&(de[Re]=V[Re]===void 0&&Ce!==void 0?Ce[Re]:V[Re])}var Re=arguments.length-2;if(Re===1)de.children=fe;else if(1<Re){Ce=Array(Re);for(var yt=0;yt<Re;yt++)Ce[yt]=arguments[yt+2];de.children=Ce}return{$$typeof:e,type:O.type,key:ke,ref:be,props:de,_owner:Ee}},Ne.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:u,_context:O},O.Consumer=O},Ne.createElement=I,Ne.createFactory=function(O){var V=I.bind(null,O);return V.type=O,V},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(O){return{$$typeof:h,render:O}},Ne.isValidElement=K,Ne.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:W}},Ne.memo=function(O,V){return{$$typeof:m,type:O,compare:V===void 0?null:V}},Ne.startTransition=function(O){var V=Q.transition;Q.transition={};try{O()}finally{Q.transition=V}},Ne.unstable_act=G,Ne.useCallback=function(O,V){return re.current.useCallback(O,V)},Ne.useContext=function(O){return re.current.useContext(O)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(O){return re.current.useDeferredValue(O)},Ne.useEffect=function(O,V){return re.current.useEffect(O,V)},Ne.useId=function(){return re.current.useId()},Ne.useImperativeHandle=function(O,V,fe){return re.current.useImperativeHandle(O,V,fe)},Ne.useInsertionEffect=function(O,V){return re.current.useInsertionEffect(O,V)},Ne.useLayoutEffect=function(O,V){return re.current.useLayoutEffect(O,V)},Ne.useMemo=function(O,V){return re.current.useMemo(O,V)},Ne.useReducer=function(O,V,fe){return re.current.useReducer(O,V,fe)},Ne.useRef=function(O){return re.current.useRef(O)},Ne.useState=function(O){return re.current.useState(O)},Ne.useSyncExternalStore=function(O,V,fe){return re.current.useSyncExternalStore(O,V,fe)},Ne.useTransition=function(){return re.current.useTransition()},Ne.version="18.3.1",Ne}var Sp;function xf(){return Sp||(Sp=1,xc.exports=Lv()),xc.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var bp;function Fv(){if(bp)return Xo;bp=1;var e=xf(),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function f(h,p,m){var v,g={},x=null,_=null;m!==void 0&&(x=""+m),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(_=p.ref);for(v in p)s.call(p,v)&&!u.hasOwnProperty(v)&&(g[v]=p[v]);if(h&&h.defaultProps)for(v in p=h.defaultProps,p)g[v]===void 0&&(g[v]=p[v]);return{$$typeof:n,type:h,key:x,ref:_,props:g,_owner:a.current}}return Xo.Fragment=i,Xo.jsx=f,Xo.jsxs=f,Xo}var Cp;function $v(){return Cp||(Cp=1,vc.exports=Fv()),vc.exports}var P=$v(),lo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fi=typeof window>"u"||"Deno"in globalThis;function kt(){}function Uv(e,n){return typeof e=="function"?e(n):e}function Lc(e){return typeof e=="number"&&e>=0&&e!==1/0}function ym(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Ar(e,n){return typeof e=="function"?e(n):e}function pn(e,n){return typeof e=="function"?e(n):e}function Ep(e,n){const{type:i="all",exact:s,fetchStatus:a,predicate:u,queryKey:f,stale:h}=e;if(f){if(s){if(n.queryHash!==_f(f,n.options))return!1}else if(!ps(n.queryKey,f))return!1}if(i!=="all"){const p=n.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&n.isStale()!==h||a&&a!==n.state.fetchStatus||u&&!u(n))}function Pp(e,n){const{exact:i,status:s,predicate:a,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(i){if(hi(n.options.mutationKey)!==hi(u))return!1}else if(!ps(n.options.mutationKey,u))return!1}return!(s&&n.state.status!==s||a&&!a(n))}function _f(e,n){return((n==null?void 0:n.queryKeyHashFn)||hi)(e)}function hi(e){return JSON.stringify(e,(n,i)=>Fc(i)?Object.keys(i).sort().reduce((s,a)=>(s[a]=i[a],s),{}):i)}function ps(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(i=>ps(e[i],n[i])):!1}function vm(e,n){if(e===n)return e;const i=Np(e)&&Np(n);if(i||Fc(e)&&Fc(n)){const s=i?e:Object.keys(e),a=s.length,u=i?n:Object.keys(n),f=u.length,h=i?[]:{},p=new Set(s);let m=0;for(let v=0;v<f;v++){const g=i?v:u[v];(!i&&p.has(g)||i)&&e[g]===void 0&&n[g]===void 0?(h[g]=void 0,m++):(h[g]=vm(e[g],n[g]),h[g]===e[g]&&e[g]!==void 0&&m++)}return a===f&&m===a?e:h}return n}function fa(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(e[i]!==n[i])return!1;return!0}function Np(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fc(e){if(!Tp(e))return!1;const n=e.constructor;if(n===void 0)return!0;const i=n.prototype;return!(!Tp(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Tp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hv(e){return new Promise(n=>{setTimeout(n,e)})}function $c(e,n,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,n):i.structuralSharing!==!1?vm(e,n):n}function qv(e,n,i=0){const s=[...e,n];return i&&s.length>i?s.slice(1):s}function Vv(e,n,i=0){const s=[n,...e];return i&&s.length>i?s.slice(0,-1):s}var wf=Symbol();function xm(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===wf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _m(e,n){return typeof e=="function"?e(...n):!!e}var ti,br,Bi,sm,Bv=(sm=class extends lo{constructor(){super();ve(this,ti);ve(this,br);ve(this,Bi);ue(this,Bi,n=>{if(!fi&&window.addEventListener){const i=()=>n();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){j(this,br)||this.setEventListener(j(this,Bi))}onUnsubscribe(){var n;this.hasListeners()||((n=j(this,br))==null||n.call(this),ue(this,br,void 0))}setEventListener(n){var i;ue(this,Bi,n),(i=j(this,br))==null||i.call(this),ue(this,br,n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(n){j(this,ti)!==n&&(ue(this,ti,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(i=>{i(n)})}isFocused(){var n;return typeof j(this,ti)=="boolean"?j(this,ti):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},ti=new WeakMap,br=new WeakMap,Bi=new WeakMap,sm),kf=new Bv,Qi,Cr,Wi,lm,Qv=(lm=class extends lo{constructor(){super();ve(this,Qi,!0);ve(this,Cr);ve(this,Wi);ue(this,Wi,n=>{if(!fi&&window.addEventListener){const i=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}})}onSubscribe(){j(this,Cr)||this.setEventListener(j(this,Wi))}onUnsubscribe(){var n;this.hasListeners()||((n=j(this,Cr))==null||n.call(this),ue(this,Cr,void 0))}setEventListener(n){var i;ue(this,Wi,n),(i=j(this,Cr))==null||i.call(this),ue(this,Cr,n(this.setOnline.bind(this)))}setOnline(n){j(this,Qi)!==n&&(ue(this,Qi,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return j(this,Qi)}},Qi=new WeakMap,Cr=new WeakMap,Wi=new WeakMap,lm),ha=new Qv;function Uc(){let e,n;const i=new Promise((a,u)=>{e=a,n=u});i.status="pending",i.catch(()=>{});function s(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},i.reject=a=>{s({status:"rejected",reason:a}),n(a)},i}function Wv(e){return Math.min(1e3*2**e,3e4)}function wm(e){return(e??"online")==="online"?ha.isOnline():!0}var km=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _c(e){return e instanceof km}function Sm(e){let n=!1,i=0,s=!1,a;const u=Uc(),f=C=>{var S;s||(x(new km(C)),(S=e.abort)==null||S.call(e))},h=()=>{n=!0},p=()=>{n=!1},m=()=>kf.isFocused()&&(e.networkMode==="always"||ha.isOnline())&&e.canRun(),v=()=>wm(e.networkMode)&&e.canRun(),g=C=>{var S;s||(s=!0,(S=e.onSuccess)==null||S.call(e,C),a==null||a(),u.resolve(C))},x=C=>{var S;s||(s=!0,(S=e.onError)==null||S.call(e,C),a==null||a(),u.reject(C))},_=()=>new Promise(C=>{var S;a=k=>{(s||m())&&C(k)},(S=e.onPause)==null||S.call(e)}).then(()=>{var C;a=void 0,s||(C=e.onContinue)==null||C.call(e)}),b=()=>{if(s)return;let C;const S=i===0?e.initialPromise:void 0;try{C=S??e.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(g).catch(k=>{var D;if(s)return;const R=e.retry??(fi?0:3),A=e.retryDelay??Wv,N=typeof A=="function"?A(i,k):A,T=R===!0||typeof R=="number"&&i<R||typeof R=="function"&&R(i,k);if(n||!T){x(k);return}i++,(D=e.onFail)==null||D.call(e,i,k),Hv(N).then(()=>m()?void 0:_()).then(()=>{n?x(k):b()})})};return{promise:u,cancel:f,continue:()=>(a==null||a(),u),cancelRetry:h,continueRetry:p,canStart:v,start:()=>(v()?b():_().then(b),u)}}var Kv=e=>setTimeout(e,0);function Gv(){let e=[],n=0,i=h=>{h()},s=h=>{h()},a=Kv;const u=h=>{n?e.push(h):a(()=>{i(h)})},f=()=>{const h=e;e=[],h.length&&a(()=>{s(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;n++;try{p=h()}finally{n--,n||f()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{a=h}}}var nt=Gv(),ni,am,bm=(am=class{constructor(){ve(this,ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lc(this.gcTime)&&ue(this,ni,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fi?1/0:5*60*1e3))}clearGcTimeout(){j(this,ni)&&(clearTimeout(j(this,ni)),ue(this,ni,void 0))}},ni=new WeakMap,am),Ki,Gi,en,ri,mt,Ss,ii,hn,Qn,um,Xv=(um=class extends bm{constructor(n){super();ve(this,hn);ve(this,Ki);ve(this,Gi);ve(this,en);ve(this,ri);ve(this,mt);ve(this,Ss);ve(this,ii);ue(this,ii,!1),ue(this,Ss,n.defaultOptions),this.setOptions(n.options),this.observers=[],ue(this,ri,n.client),ue(this,en,j(this,ri).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,ue(this,Ki,Yv(this.options)),this.state=n.state??j(this,Ki),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=j(this,mt))==null?void 0:n.promise}setOptions(n){this.options={...j(this,Ss),...n},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,en).remove(this)}setData(n,i){const s=$c(this.state.data,n,this.options);return Pe(this,hn,Qn).call(this,{data:s,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),s}setState(n,i){Pe(this,hn,Qn).call(this,{type:"setState",state:n,setStateOptions:i})}cancel(n){var s,a;const i=(s=j(this,mt))==null?void 0:s.promise;return(a=j(this,mt))==null||a.cancel(n),i?i.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Ki))}isActive(){return this.observers.some(n=>pn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Ar(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!ym(this.state.dataUpdatedAt,n)}onFocus(){var i;const n=this.observers.find(s=>s.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(i=j(this,mt))==null||i.continue()}onOnline(){var i;const n=this.observers.find(s=>s.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(i=j(this,mt))==null||i.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),j(this,en).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(i=>i!==n),this.observers.length||(j(this,mt)&&(j(this,ii)?j(this,mt).cancel({revert:!0}):j(this,mt).cancelRetry()),this.scheduleGc()),j(this,en).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,hn,Qn).call(this,{type:"invalidate"})}fetch(n,i){var m,v,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(j(this,mt))return j(this,mt).continueRetry(),j(this,mt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const x=this.observers.find(_=>_.options.queryFn);x&&this.setOptions(x.options)}const s=new AbortController,a=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(ue(this,ii,!0),s.signal)})},u=()=>{const x=xm(this.options,i),b=(()=>{const C={client:j(this,ri),queryKey:this.queryKey,meta:this.meta};return a(C),C})();return ue(this,ii,!1),this.options.persister?this.options.persister(x,b,this):x(b)},h=(()=>{const x={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:j(this,ri),state:this.state,fetchFn:u};return a(x),x})();(m=this.options.behavior)==null||m.onFetch(h,this),ue(this,Gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Pe(this,hn,Qn).call(this,{type:"fetch",meta:(g=h.fetchOptions)==null?void 0:g.meta});const p=x=>{var _,b,C,S;_c(x)&&x.silent||Pe(this,hn,Qn).call(this,{type:"error",error:x}),_c(x)||((b=(_=j(this,en).config).onError)==null||b.call(_,x,this),(S=(C=j(this,en).config).onSettled)==null||S.call(C,this.state.data,x,this)),this.scheduleGc()};return ue(this,mt,Sm({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,abort:s.abort.bind(s),onSuccess:x=>{var _,b,C,S;if(x===void 0){p(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(x)}catch(k){p(k);return}(b=(_=j(this,en).config).onSuccess)==null||b.call(_,x,this),(S=(C=j(this,en).config).onSettled)==null||S.call(C,x,this.state.error,this),this.scheduleGc()},onError:p,onFail:(x,_)=>{Pe(this,hn,Qn).call(this,{type:"failed",failureCount:x,error:_})},onPause:()=>{Pe(this,hn,Qn).call(this,{type:"pause"})},onContinue:()=>{Pe(this,hn,Qn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),j(this,mt).start()}},Ki=new WeakMap,Gi=new WeakMap,en=new WeakMap,ri=new WeakMap,mt=new WeakMap,Ss=new WeakMap,ii=new WeakMap,hn=new WeakSet,Qn=function(n){const i=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Cm(s.data,this.options),fetchMeta:n.meta??null};case"success":return{...s,data:n.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=n.error;return _c(a)&&a.revert&&j(this,Gi)?{...j(this,Gi),fetchStatus:"idle"}:{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=i(this.state),nt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),j(this,en).notify({query:this,type:"updated",action:n})})},um);function Cm(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wm(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Yv(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,i=n!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:i?s??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,cm,Zv=(cm=class extends lo{constructor(n={}){super();ve(this,En);this.config=n,ue(this,En,new Map)}build(n,i,s){const a=i.queryKey,u=i.queryHash??_f(a,i);let f=this.get(u);return f||(f=new Xv({client:n,queryKey:a,queryHash:u,options:n.defaultQueryOptions(i),state:s,defaultOptions:n.getQueryDefaults(a)}),this.add(f)),f}add(n){j(this,En).has(n.queryHash)||(j(this,En).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=j(this,En).get(n.queryHash);i&&(n.destroy(),i===n&&j(this,En).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){nt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return j(this,En).get(n)}getAll(){return[...j(this,En).values()]}find(n){const i={exact:!0,...n};return this.getAll().find(s=>Ep(i,s))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(s=>Ep(n,s)):i}notify(n){nt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},En=new WeakMap,cm),Pn,_t,oi,Nn,kr,fm,Jv=(fm=class extends bm{constructor(n){super();ve(this,Nn);ve(this,Pn);ve(this,_t);ve(this,oi);this.mutationId=n.mutationId,ue(this,_t,n.mutationCache),ue(this,Pn,[]),this.state=n.state||Em(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){j(this,Pn).includes(n)||(j(this,Pn).push(n),this.clearGcTimeout(),j(this,_t).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){ue(this,Pn,j(this,Pn).filter(i=>i!==n)),this.scheduleGc(),j(this,_t).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){j(this,Pn).length||(this.state.status==="pending"?this.scheduleGc():j(this,_t).remove(this))}continue(){var n;return((n=j(this,oi))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var u,f,h,p,m,v,g,x,_,b,C,S,k,R,A,N,T,D,F,I;const i=()=>{Pe(this,Nn,kr).call(this,{type:"continue"})};ue(this,oi,Sm({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(B,K)=>{Pe(this,Nn,kr).call(this,{type:"failed",failureCount:B,error:K})},onPause:()=>{Pe(this,Nn,kr).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,_t).canRun(this)}));const s=this.state.status==="pending",a=!j(this,oi).canStart();try{if(s)i();else{Pe(this,Nn,kr).call(this,{type:"pending",variables:n,isPaused:a}),await((f=(u=j(this,_t).config).onMutate)==null?void 0:f.call(u,n,this));const K=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,n));K!==this.state.context&&Pe(this,Nn,kr).call(this,{type:"pending",context:K,variables:n,isPaused:a})}const B=await j(this,oi).start();return await((v=(m=j(this,_t).config).onSuccess)==null?void 0:v.call(m,B,n,this.state.context,this)),await((x=(g=this.options).onSuccess)==null?void 0:x.call(g,B,n,this.state.context)),await((b=(_=j(this,_t).config).onSettled)==null?void 0:b.call(_,B,null,this.state.variables,this.state.context,this)),await((S=(C=this.options).onSettled)==null?void 0:S.call(C,B,null,n,this.state.context)),Pe(this,Nn,kr).call(this,{type:"success",data:B}),B}catch(B){try{throw await((R=(k=j(this,_t).config).onError)==null?void 0:R.call(k,B,n,this.state.context,this)),await((N=(A=this.options).onError)==null?void 0:N.call(A,B,n,this.state.context)),await((D=(T=j(this,_t).config).onSettled)==null?void 0:D.call(T,void 0,B,this.state.variables,this.state.context,this)),await((I=(F=this.options).onSettled)==null?void 0:I.call(F,void 0,B,n,this.state.context)),B}finally{Pe(this,Nn,kr).call(this,{type:"error",error:B})}}finally{j(this,_t).runNext(this)}}},Pn=new WeakMap,_t=new WeakMap,oi=new WeakMap,Nn=new WeakSet,kr=function(n){const i=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=i(this.state),nt.batch(()=>{j(this,Pn).forEach(s=>{s.onMutationUpdate(n)}),j(this,_t).notify({mutation:this,type:"updated",action:n})})},fm);function Em(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kn,dn,bs,hm,e1=(hm=class extends lo{constructor(n={}){super();ve(this,Kn);ve(this,dn);ve(this,bs);this.config=n,ue(this,Kn,new Set),ue(this,dn,new Map),ue(this,bs,0)}build(n,i,s){const a=new Jv({mutationCache:this,mutationId:++Kl(this,bs)._,options:n.defaultMutationOptions(i),state:s});return this.add(a),a}add(n){j(this,Kn).add(n);const i=Gl(n);if(typeof i=="string"){const s=j(this,dn).get(i);s?s.push(n):j(this,dn).set(i,[n])}this.notify({type:"added",mutation:n})}remove(n){if(j(this,Kn).delete(n)){const i=Gl(n);if(typeof i=="string"){const s=j(this,dn).get(i);if(s)if(s.length>1){const a=s.indexOf(n);a!==-1&&s.splice(a,1)}else s[0]===n&&j(this,dn).delete(i)}}this.notify({type:"removed",mutation:n})}canRun(n){const i=Gl(n);if(typeof i=="string"){const s=j(this,dn).get(i),a=s==null?void 0:s.find(u=>u.state.status==="pending");return!a||a===n}else return!0}runNext(n){var s;const i=Gl(n);if(typeof i=="string"){const a=(s=j(this,dn).get(i))==null?void 0:s.find(u=>u!==n&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{j(this,Kn).forEach(n=>{this.notify({type:"removed",mutation:n})}),j(this,Kn).clear(),j(this,dn).clear()})}getAll(){return Array.from(j(this,Kn))}find(n){const i={exact:!0,...n};return this.getAll().find(s=>Pp(i,s))}findAll(n={}){return this.getAll().filter(i=>Pp(n,i))}notify(n){nt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return nt.batch(()=>Promise.all(n.map(i=>i.continue().catch(kt))))}},Kn=new WeakMap,dn=new WeakMap,bs=new WeakMap,hm);function Gl(e){var n;return(n=e.options.scope)==null?void 0:n.id}function jp(e){return{onFetch:(n,i)=>{var v,g,x,_,b;const s=n.options,a=(x=(g=(v=n.fetchOptions)==null?void 0:v.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,u=((_=n.state.data)==null?void 0:_.pages)||[],f=((b=n.state.data)==null?void 0:b.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let C=!1;const S=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(n.signal.aborted?C=!0:n.signal.addEventListener("abort",()=>{C=!0}),n.signal)})},k=xm(n.options,n.fetchOptions),R=async(A,N,T)=>{if(C)return Promise.reject();if(N==null&&A.pages.length)return Promise.resolve(A);const F=(()=>{const X={client:n.client,queryKey:n.queryKey,pageParam:N,direction:T?"backward":"forward",meta:n.options.meta};return S(X),X})(),I=await k(F),{maxPages:B}=n.options,K=T?Vv:qv;return{pages:K(A.pages,I,B),pageParams:K(A.pageParams,N,B)}};if(a&&u.length){const A=a==="backward",N=A?t1:Mp,T={pages:u,pageParams:f},D=N(s,T);h=await R(T,D,A)}else{const A=e??u.length;do{const N=p===0?f[0]??s.initialPageParam:Mp(s,h);if(p>0&&N==null)break;h=await R(h,N),p++}while(p<A)}return h};n.options.persister?n.fetchFn=()=>{var C,S;return(S=(C=n.options).persister)==null?void 0:S.call(C,m,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},i)}:n.fetchFn=m}}}function Mp(e,{pages:n,pageParams:i}){const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,i[s],i):void 0}function t1(e,{pages:n,pageParams:i}){var s;return n.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,n[0],n,i[0],i):void 0}var Xe,Er,Pr,Xi,Yi,Nr,Zi,Ji,dm,n1=(dm=class{constructor(e={}){ve(this,Xe);ve(this,Er);ve(this,Pr);ve(this,Xi);ve(this,Yi);ve(this,Nr);ve(this,Zi);ve(this,Ji);ue(this,Xe,e.queryCache||new Zv),ue(this,Er,e.mutationCache||new e1),ue(this,Pr,e.defaultOptions||{}),ue(this,Xi,new Map),ue(this,Yi,new Map),ue(this,Nr,0)}mount(){Kl(this,Nr)._++,j(this,Nr)===1&&(ue(this,Zi,kf.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Xe).onFocus())})),ue(this,Ji,ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Xe).onOnline())})))}unmount(){var e,n;Kl(this,Nr)._--,j(this,Nr)===0&&((e=j(this,Zi))==null||e.call(this),ue(this,Zi,void 0),(n=j(this,Ji))==null||n.call(this),ue(this,Ji,void 0))}isFetching(e){return j(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Er).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=j(this,Xe).get(n.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),i=j(this,Xe).build(this,n),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Ar(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(e){return j(this,Xe).findAll(e).map(({queryKey:n,state:i})=>{const s=i.data;return[n,s]})}setQueryData(e,n,i){const s=this.defaultQueryOptions({queryKey:e}),a=j(this,Xe).get(s.queryHash),u=a==null?void 0:a.state.data,f=Uv(n,u);if(f!==void 0)return j(this,Xe).build(this,s).setData(f,{...i,manual:!0})}setQueriesData(e,n,i){return nt.batch(()=>j(this,Xe).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,n,i)]))}getQueryState(e){var i;const n=this.defaultQueryOptions({queryKey:e});return(i=j(this,Xe).get(n.queryHash))==null?void 0:i.state}removeQueries(e){const n=j(this,Xe);nt.batch(()=>{n.findAll(e).forEach(i=>{n.remove(i)})})}resetQueries(e,n){const i=j(this,Xe);return nt.batch(()=>(i.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const i={revert:!0,...n},s=nt.batch(()=>j(this,Xe).findAll(e).map(a=>a.cancel(i)));return Promise.all(s).then(kt).catch(kt)}invalidateQueries(e,n={}){return nt.batch(()=>(j(this,Xe).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const i={...n,cancelRefetch:n.cancelRefetch??!0},s=nt.batch(()=>j(this,Xe).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,i);return i.throwOnError||(u=u.catch(kt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(kt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const i=j(this,Xe).build(this,n);return i.isStaleByTime(Ar(n.staleTime,i))?i.fetch(n):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kt).catch(kt)}fetchInfiniteQuery(e){return e.behavior=jp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kt).catch(kt)}ensureInfiniteQueryData(e){return e.behavior=jp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ha.isOnline()?j(this,Er).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Xe)}getMutationCache(){return j(this,Er)}getDefaultOptions(){return j(this,Pr)}setDefaultOptions(e){ue(this,Pr,e)}setQueryDefaults(e,n){j(this,Xi).set(hi(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...j(this,Xi).values()],i={};return n.forEach(s=>{ps(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,n){j(this,Yi).set(hi(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...j(this,Yi).values()],i={};return n.forEach(s=>{ps(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const n={...j(this,Pr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=_f(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===wf&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Pr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,Xe).clear(),j(this,Er).clear()}},Xe=new WeakMap,Er=new WeakMap,Pr=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,Nr=new WeakMap,Zi=new WeakMap,Ji=new WeakMap,dm),Ot,je,Cs,wt,si,eo,Tr,jr,Es,to,no,li,ai,Mr,ro,Ae,ss,Hc,qc,Vc,Bc,Qc,Wc,Kc,Pm,pm,r1=(pm=class extends lo{constructor(n,i){super();ve(this,Ae);ve(this,Ot);ve(this,je);ve(this,Cs);ve(this,wt);ve(this,si);ve(this,eo);ve(this,Tr);ve(this,jr);ve(this,Es);ve(this,to);ve(this,no);ve(this,li);ve(this,ai);ve(this,Mr);ve(this,ro,new Set);this.options=i,ue(this,Ot,n),ue(this,jr,null),ue(this,Tr,Uc()),this.options.experimental_prefetchInRender||j(this,Tr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,je).addObserver(this),Op(j(this,je),this.options)?Pe(this,Ae,ss).call(this):this.updateResult(),Pe(this,Ae,Bc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gc(j(this,je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gc(j(this,je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,Ae,Qc).call(this),Pe(this,Ae,Wc).call(this),j(this,je).removeObserver(this)}setOptions(n){const i=this.options,s=j(this,je);if(this.options=j(this,Ot).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof pn(this.options.enabled,j(this,je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,Ae,Kc).call(this),j(this,je).setOptions(this.options),i._defaulted&&!fa(this.options,i)&&j(this,Ot).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,je),observer:this});const a=this.hasListeners();a&&Rp(j(this,je),s,this.options,i)&&Pe(this,Ae,ss).call(this),this.updateResult(),a&&(j(this,je)!==s||pn(this.options.enabled,j(this,je))!==pn(i.enabled,j(this,je))||Ar(this.options.staleTime,j(this,je))!==Ar(i.staleTime,j(this,je)))&&Pe(this,Ae,Hc).call(this);const u=Pe(this,Ae,qc).call(this);a&&(j(this,je)!==s||pn(this.options.enabled,j(this,je))!==pn(i.enabled,j(this,je))||u!==j(this,Mr))&&Pe(this,Ae,Vc).call(this,u)}getOptimisticResult(n){const i=j(this,Ot).getQueryCache().build(j(this,Ot),n),s=this.createResult(i,n);return o1(this,s)&&(ue(this,wt,s),ue(this,eo,this.options),ue(this,si,j(this,je).state)),s}getCurrentResult(){return j(this,wt)}trackResult(n,i){return new Proxy(n,{get:(s,a)=>(this.trackProp(a),i==null||i(a),Reflect.get(s,a))})}trackProp(n){j(this,ro).add(n)}getCurrentQuery(){return j(this,je)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const i=j(this,Ot).defaultQueryOptions(n),s=j(this,Ot).getQueryCache().build(j(this,Ot),i);return s.fetch().then(()=>this.createResult(s,i))}fetch(n){return Pe(this,Ae,ss).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,wt)))}createResult(n,i){var B;const s=j(this,je),a=this.options,u=j(this,wt),f=j(this,si),h=j(this,eo),m=n!==s?n.state:j(this,Cs),{state:v}=n;let g={...v},x=!1,_;if(i._optimisticResults){const K=this.hasListeners(),X=!K&&Op(n,i),se=K&&Rp(n,s,i,a);(X||se)&&(g={...g,...Cm(v.data,n.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:C,status:S}=g;_=g.data;let k=!1;if(i.placeholderData!==void 0&&_===void 0&&S==="pending"){let K;u!=null&&u.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?(K=u.data,k=!0):K=typeof i.placeholderData=="function"?i.placeholderData((B=j(this,no))==null?void 0:B.state.data,j(this,no)):i.placeholderData,K!==void 0&&(S="success",_=$c(u==null?void 0:u.data,K,i),x=!0)}if(i.select&&_!==void 0&&!k)if(u&&_===(f==null?void 0:f.data)&&i.select===j(this,Es))_=j(this,to);else try{ue(this,Es,i.select),_=i.select(_),_=$c(u==null?void 0:u.data,_,i),ue(this,to,_),ue(this,jr,null)}catch(K){ue(this,jr,K)}j(this,jr)&&(b=j(this,jr),_=j(this,to),C=Date.now(),S="error");const R=g.fetchStatus==="fetching",A=S==="pending",N=S==="error",T=A&&R,D=_!==void 0,I={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:N,isInitialLoading:T,isLoading:T,data:_,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:N&&!D,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:N&&D,isStale:Sf(n,i),refetch:this.refetch,promise:j(this,Tr)};if(this.options.experimental_prefetchInRender){const K=ce=>{I.status==="error"?ce.reject(I.error):I.data!==void 0&&ce.resolve(I.data)},X=()=>{const ce=ue(this,Tr,I.promise=Uc());K(ce)},se=j(this,Tr);switch(se.status){case"pending":n.queryHash===s.queryHash&&K(se);break;case"fulfilled":(I.status==="error"||I.data!==se.value)&&X();break;case"rejected":(I.status!=="error"||I.error!==se.reason)&&X();break}}return I}updateResult(){const n=j(this,wt),i=this.createResult(j(this,je),this.options);if(ue(this,si,j(this,je).state),ue(this,eo,this.options),j(this,si).data!==void 0&&ue(this,no,j(this,je)),fa(i,n))return;ue(this,wt,i);const s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!j(this,ro).size)return!0;const f=new Set(u??j(this,ro));return this.options.throwOnError&&f.add("error"),Object.keys(j(this,wt)).some(h=>{const p=h;return j(this,wt)[p]!==n[p]&&f.has(p)})};Pe(this,Ae,Pm).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,Ae,Bc).call(this)}},Ot=new WeakMap,je=new WeakMap,Cs=new WeakMap,wt=new WeakMap,si=new WeakMap,eo=new WeakMap,Tr=new WeakMap,jr=new WeakMap,Es=new WeakMap,to=new WeakMap,no=new WeakMap,li=new WeakMap,ai=new WeakMap,Mr=new WeakMap,ro=new WeakMap,Ae=new WeakSet,ss=function(n){Pe(this,Ae,Kc).call(this);let i=j(this,je).fetch(this.options,n);return n!=null&&n.throwOnError||(i=i.catch(kt)),i},Hc=function(){Pe(this,Ae,Qc).call(this);const n=Ar(this.options.staleTime,j(this,je));if(fi||j(this,wt).isStale||!Lc(n))return;const s=ym(j(this,wt).dataUpdatedAt,n)+1;ue(this,li,setTimeout(()=>{j(this,wt).isStale||this.updateResult()},s))},qc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,je)):this.options.refetchInterval)??!1},Vc=function(n){Pe(this,Ae,Wc).call(this),ue(this,Mr,n),!(fi||pn(this.options.enabled,j(this,je))===!1||!Lc(j(this,Mr))||j(this,Mr)===0)&&ue(this,ai,setInterval(()=>{(this.options.refetchIntervalInBackground||kf.isFocused())&&Pe(this,Ae,ss).call(this)},j(this,Mr)))},Bc=function(){Pe(this,Ae,Hc).call(this),Pe(this,Ae,Vc).call(this,Pe(this,Ae,qc).call(this))},Qc=function(){j(this,li)&&(clearTimeout(j(this,li)),ue(this,li,void 0))},Wc=function(){j(this,ai)&&(clearInterval(j(this,ai)),ue(this,ai,void 0))},Kc=function(){const n=j(this,Ot).getQueryCache().build(j(this,Ot),this.options);if(n===j(this,je))return;const i=j(this,je);ue(this,je,n),ue(this,Cs,n.state),this.hasListeners()&&(i==null||i.removeObserver(this),n.addObserver(this))},Pm=function(n){nt.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(j(this,wt))}),j(this,Ot).getQueryCache().notify({query:j(this,je),type:"observerResultsUpdated"})})},pm);function i1(e,n){return pn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Op(e,n){return i1(e,n)||e.state.data!==void 0&&Gc(e,n,n.refetchOnMount)}function Gc(e,n,i){if(pn(n.enabled,e)!==!1&&Ar(n.staleTime,e)!=="static"){const s=typeof i=="function"?i(e):i;return s==="always"||s!==!1&&Sf(e,n)}return!1}function Rp(e,n,i,s){return(e!==n||pn(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Sf(e,i)}function Sf(e,n){return pn(n.enabled,e)!==!1&&e.isStaleByTime(Ar(n.staleTime,e))}function o1(e,n){return!fa(e.getCurrentResult(),n)}var Or,Rr,Rt,Gn,Jn,oa,Xc,gm,s1=(gm=class extends lo{constructor(i,s){super();ve(this,Jn);ve(this,Or);ve(this,Rr);ve(this,Rt);ve(this,Gn);ue(this,Or,i),this.setOptions(s),this.bindMethods(),Pe(this,Jn,oa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var a;const s=this.options;this.options=j(this,Or).defaultMutationOptions(i),fa(this.options,s)||j(this,Or).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,Rt),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&hi(s.mutationKey)!==hi(this.options.mutationKey)?this.reset():((a=j(this,Rt))==null?void 0:a.state.status)==="pending"&&j(this,Rt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=j(this,Rt))==null||i.removeObserver(this)}onMutationUpdate(i){Pe(this,Jn,oa).call(this),Pe(this,Jn,Xc).call(this,i)}getCurrentResult(){return j(this,Rr)}reset(){var i;(i=j(this,Rt))==null||i.removeObserver(this),ue(this,Rt,void 0),Pe(this,Jn,oa).call(this),Pe(this,Jn,Xc).call(this)}mutate(i,s){var a;return ue(this,Gn,s),(a=j(this,Rt))==null||a.removeObserver(this),ue(this,Rt,j(this,Or).getMutationCache().build(j(this,Or),this.options)),j(this,Rt).addObserver(this),j(this,Rt).execute(i)}},Or=new WeakMap,Rr=new WeakMap,Rt=new WeakMap,Gn=new WeakMap,Jn=new WeakSet,oa=function(){var s;const i=((s=j(this,Rt))==null?void 0:s.state)??Em();ue(this,Rr,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Xc=function(i){nt.batch(()=>{var s,a,u,f,h,p,m,v;if(j(this,Gn)&&this.hasListeners()){const g=j(this,Rr).variables,x=j(this,Rr).context;(i==null?void 0:i.type)==="success"?((a=(s=j(this,Gn)).onSuccess)==null||a.call(s,i.data,g,x),(f=(u=j(this,Gn)).onSettled)==null||f.call(u,i.data,null,g,x)):(i==null?void 0:i.type)==="error"&&((p=(h=j(this,Gn)).onError)==null||p.call(h,i.error,g,x),(v=(m=j(this,Gn)).onSettled)==null||v.call(m,void 0,i.error,g,x))}this.listeners.forEach(g=>{g(j(this,Rr))})})},gm),ae=xf();const Nm=mm(ae);var Tm=ae.createContext(void 0),Ca=e=>{const n=ae.useContext(Tm);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},l1=({client:e,children:n})=>(ae.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),P.jsx(Tm.Provider,{value:e,children:n})),jm=ae.createContext(!1),a1=()=>ae.useContext(jm);jm.Provider;function u1(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var c1=ae.createContext(u1()),f1=()=>ae.useContext(c1),h1=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},d1=e=>{ae.useEffect(()=>{e.clearReset()},[e])},p1=({result:e,errorResetBoundary:n,throwOnError:i,query:s,suspense:a})=>e.isError&&!n.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||_m(i,[e.error,s])),g1=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},m1=(e,n)=>e.isLoading&&e.isFetching&&!n,y1=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Ap=(e,n,i)=>n.fetchOptimistic(e).catch(()=>{i.clearReset()});function v1(e,n,i){var g,x,_,b,C;const s=a1(),a=f1(),u=Ca(),f=u.defaultQueryOptions(e);(x=(g=u.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||x.call(g,f),f._optimisticResults=s?"isRestoring":"optimistic",g1(f),h1(f,a),d1(a);const h=!u.getQueryCache().get(f.queryHash),[p]=ae.useState(()=>new n(u,f)),m=p.getOptimisticResult(f),v=!s&&e.subscribed!==!1;if(ae.useSyncExternalStore(ae.useCallback(S=>{const k=v?p.subscribe(nt.batchCalls(S)):kt;return p.updateResult(),k},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),ae.useEffect(()=>{p.setOptions(f)},[f,p]),y1(f,m))throw Ap(f,p,a);if(p1({result:m,errorResetBoundary:a,throwOnError:f.throwOnError,query:u.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw m.error;if((b=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,f,m),f.experimental_prefetchInRender&&!fi&&m1(m,s)){const S=h?Ap(f,p,a):(C=u.getQueryCache().get(f.queryHash))==null?void 0:C.promise;S==null||S.catch(kt).finally(()=>{p.updateResult()})}return f.notifyOnChangeProps?m:p.trackResult(m)}function Yc(e,n){return v1(e,r1)}function x1(e,n){const i=Ca(),[s]=ae.useState(()=>new s1(i,e));ae.useEffect(()=>{s.setOptions(e)},[s,e]);const a=ae.useSyncExternalStore(ae.useCallback(f=>s.subscribe(nt.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=ae.useCallback((f,h)=>{s.mutate(f,h).catch(kt)},[s]);if(a.error&&_m(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}var Xl={},wc={exports:{}},Mt={},kc={exports:{}},Sc={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var zp;function _1(){return zp||(zp=1,function(e){function n(Q,Z){var G=Q.length;Q.push(Z);e:for(;0<G;){var O=G-1>>>1,V=Q[O];if(0<a(V,Z))Q[O]=Z,Q[G]=V,G=O;else break e}}function i(Q){return Q.length===0?null:Q[0]}function s(Q){if(Q.length===0)return null;var Z=Q[0],G=Q.pop();if(G!==Z){Q[0]=G;e:for(var O=0,V=Q.length,fe=V>>>1;O<fe;){var de=2*(O+1)-1,ke=Q[de],be=de+1,Ee=Q[be];if(0>a(ke,G))be<V&&0>a(Ee,ke)?(Q[O]=Ee,Q[be]=G,O=be):(Q[O]=ke,Q[de]=G,O=de);else if(be<V&&0>a(Ee,G))Q[O]=Ee,Q[be]=G,O=be;else break e}}return Z}function a(Q,Z){var G=Q.sortIndex-Z.sortIndex;return G!==0?G:Q.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();e.unstable_now=function(){return f.now()-h}}var p=[],m=[],v=1,g=null,x=3,_=!1,b=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Q){for(var Z=i(m);Z!==null;){if(Z.callback===null)s(m);else if(Z.startTime<=Q)s(m),Z.sortIndex=Z.expirationTime,n(p,Z);else break;Z=i(m)}}function N(Q){if(C=!1,A(Q),!b)if(i(p)!==null)b=!0,W(T);else{var Z=i(m);Z!==null&&re(N,Z.startTime-Q)}}function T(Q,Z){b=!1,C&&(C=!1,k(I),I=-1),_=!0;var G=x;try{for(A(Z),g=i(p);g!==null&&(!(g.expirationTime>Z)||Q&&!X());){var O=g.callback;if(typeof O=="function"){g.callback=null,x=g.priorityLevel;var V=O(g.expirationTime<=Z);Z=e.unstable_now(),typeof V=="function"?g.callback=V:g===i(p)&&s(p),A(Z)}else s(p);g=i(p)}if(g!==null)var fe=!0;else{var de=i(m);de!==null&&re(N,de.startTime-Z),fe=!1}return fe}finally{g=null,x=G,_=!1}}var D=!1,F=null,I=-1,B=5,K=-1;function X(){return!(e.unstable_now()-K<B)}function se(){if(F!==null){var Q=e.unstable_now();K=Q;var Z=!0;try{Z=F(!0,Q)}finally{Z?ce():(D=!1,F=null)}}else D=!1}var ce;if(typeof R=="function")ce=function(){R(se)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,ne=$.port2;$.port1.onmessage=se,ce=function(){ne.postMessage(null)}}else ce=function(){S(se,0)};function W(Q){F=Q,D||(D=!0,ce())}function re(Q,Z){I=S(function(){Q(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){b||_||(b=!0,W(T))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return i(p)},e.unstable_next=function(Q){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var G=x;x=Z;try{return Q()}finally{x=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,Z){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var G=x;x=Q;try{return Z()}finally{x=G}},e.unstable_scheduleCallback=function(Q,Z,G){var O=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?O+G:O):G=O,Q){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=G+V,Q={id:v++,callback:Z,priorityLevel:Q,startTime:G,expirationTime:V,sortIndex:-1},G>O?(Q.sortIndex=G,n(m,Q),i(p)===null&&Q===i(m)&&(C?(k(I),I=-1):C=!0,re(N,G-O))):(Q.sortIndex=V,n(p,Q),b||_||(b=!0,W(T))),Q},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(Q){var Z=x;return function(){var G=x;x=Z;try{return Q.apply(this,arguments)}finally{x=G}}}}(Sc)),Sc}var Dp;function w1(){return Dp||(Dp=1,kc.exports=_1()),kc.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Ip;function k1(){if(Ip)return Mt;Ip=1;var e=xf(),n=w1();function i(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function u(r,o){f(r,o),f(r+"Capture",o)}function f(r,o){for(a[r]=o,r=0;r<o.length;r++)s.add(o[r])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},g={};function x(r){return p.call(g,r)?!0:p.call(v,r)?!1:m.test(r)?g[r]=!0:(v[r]=!0,!1)}function _(r,o,l,c){if(l!==null&&l.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:l!==null?!l.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function b(r,o,l,c){if(o===null||typeof o>"u"||_(r,o,l,c))return!0;if(c)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function C(r,o,l,c,d,y,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=l,this.propertyName=r,this.type=o,this.sanitizeURL=y,this.removeEmptyString=w}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];S[o]=new C(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new C(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){S[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(k,R);S[o]=new C(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(k,R);S[o]=new C(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(k,R);S[o]=new C(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,o,l,c){var d=S.hasOwnProperty(o)?S[o]:null;(d!==null?d.type!==0:c||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,l,d,c)&&(l=null),c||d===null?x(o)&&(l===null?r.removeAttribute(o):r.setAttribute(o,""+l)):d.mustUseProperty?r[d.propertyName]=l===null?d.type===3?!1:"":l:(o=d.attributeName,c=d.attributeNamespace,l===null?r.removeAttribute(o):(d=d.type,l=d===3||d===4&&l===!0?"":""+l,c?r.setAttributeNS(c,o,l):r.setAttribute(o,l))))}var N=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T=Symbol.for("react.element"),D=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),X=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),Q=Symbol.iterator;function Z(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var G=Object.assign,O;function V(r){if(O===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);O=o&&o[1]||""}return`
34
+ `+O+r}var fe=!1;function de(r,o){if(!r||fe)return"";fe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(q){var c=q}Reflect.construct(r,[],o)}else{try{o.call()}catch(q){c=q}r.call(o.prototype)}else{try{throw Error()}catch(q){c=q}r()}}catch(q){if(q&&c&&typeof q.stack=="string"){for(var d=q.stack.split(`
35
+ `),y=c.stack.split(`
36
+ `),w=d.length-1,E=y.length-1;1<=w&&0<=E&&d[w]!==y[E];)E--;for(;1<=w&&0<=E;w--,E--)if(d[w]!==y[E]){if(w!==1||E!==1)do if(w--,E--,0>E||d[w]!==y[E]){var M=`
37
+ `+d[w].replace(" at new "," at ");return r.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",r.displayName)),M}while(1<=w&&0<=E);break}}}finally{fe=!1,Error.prepareStackTrace=l}return(r=r?r.displayName||r.name:"")?V(r):""}function ke(r){switch(r.tag){case 5:return V(r.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return r=de(r.type,!1),r;case 11:return r=de(r.type.render,!1),r;case 1:return r=de(r.type,!0),r;default:return""}}function be(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case F:return"Fragment";case D:return"Portal";case B:return"Profiler";case I:return"StrictMode";case ce:return"Suspense";case $:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case X:return(r.displayName||"Context")+".Consumer";case K:return(r._context.displayName||"Context")+".Provider";case se:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ne:return o=r.displayName||null,o!==null?o:be(r.type)||"Memo";case W:o=r._payload,r=r._init;try{return be(r(o))}catch{}}return null}function Ee(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return be(o);case 8:return o===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ce(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Re(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function yt(r){var o=Re(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),c=""+r[o];if(!r.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,y=l.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return d.call(this)},set:function(w){c=""+w,y.call(this,w)}}),Object.defineProperty(r,o,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function pi(r){r._valueTracker||(r._valueTracker=yt(r))}function Os(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return r&&(c=Re(r)?r.checked?"true":"false":r.value),r=c,r!==l?(o.setValue(r),!0):!1}function gi(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function mi(r,o){var l=o.checked;return G({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??r._wrapperState.initialChecked})}function Ht(r,o){var l=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;l=Ce(o.value!=null?o.value:l),r._wrapperState={initialChecked:c,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Rs(r,o){o=o.checked,o!=null&&A(r,"checked",o,!1)}function zr(r,o){Rs(r,o);var l=Ce(o.value),c=o.type;if(l!=null)c==="number"?(l===0&&r.value===""||r.value!=l)&&(r.value=""+l):r.value!==""+l&&(r.value=""+l);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?ao(r,o.type,l):o.hasOwnProperty("defaultValue")&&ao(r,o.type,Ce(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function As(r,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,l||o===r.value||(r.value=o),r.defaultValue=o}l=r.name,l!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,l!==""&&(r.name=l)}function ao(r,o,l){(o!=="number"||gi(r.ownerDocument)!==r)&&(l==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+l&&(r.defaultValue=""+l))}var Dr=Array.isArray;function Rn(r,o,l,c){if(r=r.options,o){o={};for(var d=0;d<l.length;d++)o["$"+l[d]]=!0;for(l=0;l<r.length;l++)d=o.hasOwnProperty("$"+r[l].value),r[l].selected!==d&&(r[l].selected=d),d&&c&&(r[l].defaultSelected=!0)}else{for(l=""+Ce(l),o=null,d=0;d<r.length;d++){if(r[d].value===l){r[d].selected=!0,c&&(r[d].defaultSelected=!0);return}o!==null||r[d].disabled||(o=r[d])}o!==null&&(o.selected=!0)}}function uo(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(i(91));return G({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function co(r,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(i(92));if(Dr(l)){if(1<l.length)throw Error(i(93));l=l[0]}o=l}o==null&&(o=""),l=o}r._wrapperState={initialValue:Ce(l)}}function zs(r,o){var l=Ce(o.value),c=Ce(o.defaultValue);l!=null&&(l=""+l,l!==r.value&&(r.value=l),o.defaultValue==null&&r.defaultValue!==l&&(r.defaultValue=l)),c!=null&&(r.defaultValue=""+c)}function fo(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function Ds(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ho(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?Ds(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var yi,Is=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,l,c,d){MSApp.execUnsafeLocalFunction(function(){return r(o,l,c,d)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(yi=yi||document.createElement("div"),yi.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=yi.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function Ir(r,o){if(o){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=o;return}}r.textContent=o}var Lr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ra=["Webkit","ms","Moz","O"];Object.keys(Lr).forEach(function(r){Ra.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Lr[o]=Lr[r]})});function Ls(r,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||Lr.hasOwnProperty(r)&&Lr[r]?(""+o).trim():o+"px"}function Fs(r,o){r=r.style;for(var l in o)if(o.hasOwnProperty(l)){var c=l.indexOf("--")===0,d=Ls(l,o[l],c);l==="float"&&(l="cssFloat"),c?r.setProperty(l,d):r[l]=d}}var $s=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vi(r,o){if(o){if($s[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(i(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(i(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(i(61))}if(o.style!=null&&typeof o.style!="object")throw Error(i(62))}}function ee(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){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 xe=null;function Te(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ke=null,De=null,qt=null;function Vt(r){if(r=zo(r)){if(typeof Ke!="function")throw Error(i(280));var o=r.stateNode;o&&(o=ul(o),Ke(r.stateNode,r.type,o))}}function ct(r){De?qt?qt.push(r):qt=[r]:De=r}function Ct(){if(De){var r=De,o=qt;if(qt=De=null,Vt(r),o)for(r=0;r<o.length;r++)Vt(o[r])}}function Bt(r,o){return r(o)}function Hf(){}var Aa=!1;function qf(r,o,l){if(Aa)return r(o,l);Aa=!0;try{return Bt(r,o,l)}finally{Aa=!1,(De!==null||qt!==null)&&(Hf(),Ct())}}function po(r,o){var l=r.stateNode;if(l===null)return null;var c=ul(l);if(c===null)return null;l=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(i(231,o,typeof l));return l}var za=!1;if(h)try{var go={};Object.defineProperty(go,"passive",{get:function(){za=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{za=!1}function V0(r,o,l,c,d,y,w,E,M){var q=Array.prototype.slice.call(arguments,3);try{o.apply(l,q)}catch(J){this.onError(J)}}var mo=!1,Us=null,Hs=!1,Da=null,B0={onError:function(r){mo=!0,Us=r}};function Q0(r,o,l,c,d,y,w,E,M){mo=!1,Us=null,V0.apply(B0,arguments)}function W0(r,o,l,c,d,y,w,E,M){if(Q0.apply(this,arguments),mo){if(mo){var q=Us;mo=!1,Us=null}else throw Error(i(198));Hs||(Hs=!0,Da=q)}}function Fr(r){var o=r,l=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(l=o.return),r=o.return;while(r)}return o.tag===3?l:null}function Vf(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Bf(r){if(Fr(r)!==r)throw Error(i(188))}function K0(r){var o=r.alternate;if(!o){if(o=Fr(r),o===null)throw Error(i(188));return o!==r?null:r}for(var l=r,c=o;;){var d=l.return;if(d===null)break;var y=d.alternate;if(y===null){if(c=d.return,c!==null){l=c;continue}break}if(d.child===y.child){for(y=d.child;y;){if(y===l)return Bf(d),r;if(y===c)return Bf(d),o;y=y.sibling}throw Error(i(188))}if(l.return!==c.return)l=d,c=y;else{for(var w=!1,E=d.child;E;){if(E===l){w=!0,l=d,c=y;break}if(E===c){w=!0,c=d,l=y;break}E=E.sibling}if(!w){for(E=y.child;E;){if(E===l){w=!0,l=y,c=d;break}if(E===c){w=!0,c=y,l=d;break}E=E.sibling}if(!w)throw Error(i(189))}}if(l.alternate!==c)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?r:o}function Qf(r){return r=K0(r),r!==null?Wf(r):null}function Wf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Wf(r);if(o!==null)return o;r=r.sibling}return null}var Kf=n.unstable_scheduleCallback,Gf=n.unstable_cancelCallback,G0=n.unstable_shouldYield,X0=n.unstable_requestPaint,Ye=n.unstable_now,Y0=n.unstable_getCurrentPriorityLevel,Ia=n.unstable_ImmediatePriority,Xf=n.unstable_UserBlockingPriority,qs=n.unstable_NormalPriority,Z0=n.unstable_LowPriority,Yf=n.unstable_IdlePriority,Vs=null,xn=null;function J0(r){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(Vs,r,void 0,(r.current.flags&128)===128)}catch{}}var rn=Math.clz32?Math.clz32:ny,ey=Math.log,ty=Math.LN2;function ny(r){return r>>>=0,r===0?32:31-(ey(r)/ty|0)|0}var Bs=64,Qs=4194304;function yo(r){switch(r&-r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ws(r,o){var l=r.pendingLanes;if(l===0)return 0;var c=0,d=r.suspendedLanes,y=r.pingedLanes,w=l&268435455;if(w!==0){var E=w&~d;E!==0?c=yo(E):(y&=w,y!==0&&(c=yo(y)))}else w=l&~d,w!==0?c=yo(w):y!==0&&(c=yo(y));if(c===0)return 0;if(o!==0&&o!==c&&(o&d)===0&&(d=c&-c,y=o&-o,d>=y||d===16&&(y&4194240)!==0))return o;if((c&4)!==0&&(c|=l&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=c;0<o;)l=31-rn(o),d=1<<l,c|=r[l],o&=~d;return c}function ry(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function iy(r,o){for(var l=r.suspendedLanes,c=r.pingedLanes,d=r.expirationTimes,y=r.pendingLanes;0<y;){var w=31-rn(y),E=1<<w,M=d[w];M===-1?((E&l)===0||(E&c)!==0)&&(d[w]=ry(E,o)):M<=o&&(r.expiredLanes|=E),y&=~E}}function La(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Zf(){var r=Bs;return Bs<<=1,(Bs&4194240)===0&&(Bs=64),r}function Fa(r){for(var o=[],l=0;31>l;l++)o.push(r);return o}function vo(r,o,l){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-rn(o),r[o]=l}function oy(r,o){var l=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0<l;){var d=31-rn(l),y=1<<d;o[d]=0,c[d]=-1,r[d]=-1,l&=~y}}function $a(r,o){var l=r.entangledLanes|=o;for(r=r.entanglements;l;){var c=31-rn(l),d=1<<c;d&o|r[c]&o&&(r[c]|=o),l&=~d}}var ze=0;function Jf(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var eh,Ua,th,nh,rh,Ha=!1,Ks=[],tr=null,nr=null,rr=null,xo=new Map,_o=new Map,ir=[],sy="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 submit".split(" ");function ih(r,o){switch(r){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":xo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":_o.delete(o.pointerId)}}function wo(r,o,l,c,d,y){return r===null||r.nativeEvent!==y?(r={blockedOn:o,domEventName:l,eventSystemFlags:c,nativeEvent:y,targetContainers:[d]},o!==null&&(o=zo(o),o!==null&&Ua(o)),r):(r.eventSystemFlags|=c,o=r.targetContainers,d!==null&&o.indexOf(d)===-1&&o.push(d),r)}function ly(r,o,l,c,d){switch(o){case"focusin":return tr=wo(tr,r,o,l,c,d),!0;case"dragenter":return nr=wo(nr,r,o,l,c,d),!0;case"mouseover":return rr=wo(rr,r,o,l,c,d),!0;case"pointerover":var y=d.pointerId;return xo.set(y,wo(xo.get(y)||null,r,o,l,c,d)),!0;case"gotpointercapture":return y=d.pointerId,_o.set(y,wo(_o.get(y)||null,r,o,l,c,d)),!0}return!1}function oh(r){var o=$r(r.target);if(o!==null){var l=Fr(o);if(l!==null){if(o=l.tag,o===13){if(o=Vf(l),o!==null){r.blockedOn=o,rh(r.priority,function(){th(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Gs(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var l=Va(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(l===null){l=r.nativeEvent;var c=new l.constructor(l.type,l);xe=c,l.target.dispatchEvent(c),xe=null}else return o=zo(l),o!==null&&Ua(o),r.blockedOn=l,!1;o.shift()}return!0}function sh(r,o,l){Gs(r)&&l.delete(o)}function ay(){Ha=!1,tr!==null&&Gs(tr)&&(tr=null),nr!==null&&Gs(nr)&&(nr=null),rr!==null&&Gs(rr)&&(rr=null),xo.forEach(sh),_o.forEach(sh)}function ko(r,o){r.blockedOn===o&&(r.blockedOn=null,Ha||(Ha=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ay)))}function So(r){function o(d){return ko(d,r)}if(0<Ks.length){ko(Ks[0],r);for(var l=1;l<Ks.length;l++){var c=Ks[l];c.blockedOn===r&&(c.blockedOn=null)}}for(tr!==null&&ko(tr,r),nr!==null&&ko(nr,r),rr!==null&&ko(rr,r),xo.forEach(o),_o.forEach(o),l=0;l<ir.length;l++)c=ir[l],c.blockedOn===r&&(c.blockedOn=null);for(;0<ir.length&&(l=ir[0],l.blockedOn===null);)oh(l),l.blockedOn===null&&ir.shift()}var xi=N.ReactCurrentBatchConfig,Xs=!0;function uy(r,o,l,c){var d=ze,y=xi.transition;xi.transition=null;try{ze=1,qa(r,o,l,c)}finally{ze=d,xi.transition=y}}function cy(r,o,l,c){var d=ze,y=xi.transition;xi.transition=null;try{ze=4,qa(r,o,l,c)}finally{ze=d,xi.transition=y}}function qa(r,o,l,c){if(Xs){var d=Va(r,o,l,c);if(d===null)lu(r,o,c,Ys,l),ih(r,c);else if(ly(d,r,o,l,c))c.stopPropagation();else if(ih(r,c),o&4&&-1<sy.indexOf(r)){for(;d!==null;){var y=zo(d);if(y!==null&&eh(y),y=Va(r,o,l,c),y===null&&lu(r,o,c,Ys,l),y===d)break;d=y}d!==null&&c.stopPropagation()}else lu(r,o,c,null,l)}}var Ys=null;function Va(r,o,l,c){if(Ys=null,r=Te(c),r=$r(r),r!==null)if(o=Fr(r),o===null)r=null;else if(l=o.tag,l===13){if(r=Vf(o),r!==null)return r;r=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return Ys=r,null}function lh(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Y0()){case Ia:return 1;case Xf:return 4;case qs:case Z0:return 16;case Yf:return 536870912;default:return 16}default:return 16}}var or=null,Ba=null,Zs=null;function ah(){if(Zs)return Zs;var r,o=Ba,l=o.length,c,d="value"in or?or.value:or.textContent,y=d.length;for(r=0;r<l&&o[r]===d[r];r++);var w=l-r;for(c=1;c<=w&&o[l-c]===d[y-c];c++);return Zs=d.slice(r,1<c?1-c:void 0)}function Js(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function el(){return!0}function uh(){return!1}function Dt(r){function o(l,c,d,y,w){this._reactName=l,this._targetInst=d,this.type=c,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var E in r)r.hasOwnProperty(E)&&(l=r[E],this[E]=l?l(y):y[E]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?el:uh,this.isPropagationStopped=uh,this}return G(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=el)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=el)},persist:function(){},isPersistent:el}),o}var _i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qa=Dt(_i),bo=G({},_i,{view:0,detail:0}),fy=Dt(bo),Wa,Ka,Co,tl=G({},bo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xa,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Co&&(Co&&r.type==="mousemove"?(Wa=r.screenX-Co.screenX,Ka=r.screenY-Co.screenY):Ka=Wa=0,Co=r),Wa)},movementY:function(r){return"movementY"in r?r.movementY:Ka}}),ch=Dt(tl),hy=G({},tl,{dataTransfer:0}),dy=Dt(hy),py=G({},bo,{relatedTarget:0}),Ga=Dt(py),gy=G({},_i,{animationName:0,elapsedTime:0,pseudoElement:0}),my=Dt(gy),yy=G({},_i,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),vy=Dt(yy),xy=G({},_i,{data:0}),fh=Dt(xy),_y={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wy={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"},ky={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sy(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=ky[r])?!!o[r]:!1}function Xa(){return Sy}var by=G({},bo,{key:function(r){if(r.key){var o=_y[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Js(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?wy[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xa,charCode:function(r){return r.type==="keypress"?Js(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Js(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Cy=Dt(by),Ey=G({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hh=Dt(Ey),Py=G({},bo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xa}),Ny=Dt(Py),Ty=G({},_i,{propertyName:0,elapsedTime:0,pseudoElement:0}),jy=Dt(Ty),My=G({},tl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Oy=Dt(My),Ry=[9,13,27,32],Ya=h&&"CompositionEvent"in window,Eo=null;h&&"documentMode"in document&&(Eo=document.documentMode);var Ay=h&&"TextEvent"in window&&!Eo,dh=h&&(!Ya||Eo&&8<Eo&&11>=Eo),ph=" ",gh=!1;function mh(r,o){switch(r){case"keyup":return Ry.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yh(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var wi=!1;function zy(r,o){switch(r){case"compositionend":return yh(o);case"keypress":return o.which!==32?null:(gh=!0,ph);case"textInput":return r=o.data,r===ph&&gh?null:r;default:return null}}function Dy(r,o){if(wi)return r==="compositionend"||!Ya&&mh(r,o)?(r=ah(),Zs=Ba=or=null,wi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return dh&&o.locale!=="ko"?null:o.data;default:return null}}var Iy={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 vh(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Iy[r.type]:o==="textarea"}function xh(r,o,l,c){ct(c),o=sl(o,"onChange"),0<o.length&&(l=new Qa("onChange","change",null,l,c),r.push({event:l,listeners:o}))}var Po=null,No=null;function Ly(r){Ih(r,0)}function nl(r){var o=Ei(r);if(Os(o))return r}function Fy(r,o){if(r==="change")return o}var _h=!1;if(h){var Za;if(h){var Ja="oninput"in document;if(!Ja){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),Ja=typeof wh.oninput=="function"}Za=Ja}else Za=!1;_h=Za&&(!document.documentMode||9<document.documentMode)}function kh(){Po&&(Po.detachEvent("onpropertychange",Sh),No=Po=null)}function Sh(r){if(r.propertyName==="value"&&nl(No)){var o=[];xh(o,No,r,Te(r)),qf(Ly,o)}}function $y(r,o,l){r==="focusin"?(kh(),Po=o,No=l,Po.attachEvent("onpropertychange",Sh)):r==="focusout"&&kh()}function Uy(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return nl(No)}function Hy(r,o){if(r==="click")return nl(o)}function qy(r,o){if(r==="input"||r==="change")return nl(o)}function Vy(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var on=typeof Object.is=="function"?Object.is:Vy;function To(r,o){if(on(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var l=Object.keys(r),c=Object.keys(o);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var d=l[c];if(!p.call(o,d)||!on(r[d],o[d]))return!1}return!0}function bh(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ch(r,o){var l=bh(r);r=0;for(var c;l;){if(l.nodeType===3){if(c=r+l.textContent.length,r<=o&&c>=o)return{node:l,offset:o-r};r=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=bh(l)}}function Eh(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Eh(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Ph(){for(var r=window,o=gi();o instanceof r.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)r=o.contentWindow;else break;o=gi(r.document)}return o}function eu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function By(r){var o=Ph(),l=r.focusedElem,c=r.selectionRange;if(o!==l&&l&&l.ownerDocument&&Eh(l.ownerDocument.documentElement,l)){if(c!==null&&eu(l)){if(o=c.start,r=c.end,r===void 0&&(r=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(r,l.value.length);else if(r=(o=l.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var d=l.textContent.length,y=Math.min(c.start,d);c=c.end===void 0?y:Math.min(c.end,d),!r.extend&&y>c&&(d=c,c=y,y=d),d=Ch(l,y);var w=Ch(l,c);d&&w&&(r.rangeCount!==1||r.anchorNode!==d.node||r.anchorOffset!==d.offset||r.focusNode!==w.node||r.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(d.node,d.offset),r.removeAllRanges(),y>c?(r.addRange(o),r.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),r.addRange(o)))}}for(o=[],r=l;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)r=o[l],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Qy=h&&"documentMode"in document&&11>=document.documentMode,ki=null,tu=null,jo=null,nu=!1;function Nh(r,o,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;nu||ki==null||ki!==gi(c)||(c=ki,"selectionStart"in c&&eu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),jo&&To(jo,c)||(jo=c,c=sl(tu,"onSelect"),0<c.length&&(o=new Qa("onSelect","select",null,o,l),r.push({event:o,listeners:c}),o.target=ki)))}function rl(r,o){var l={};return l[r.toLowerCase()]=o.toLowerCase(),l["Webkit"+r]="webkit"+o,l["Moz"+r]="moz"+o,l}var Si={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},ru={},Th={};h&&(Th=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function il(r){if(ru[r])return ru[r];if(!Si[r])return r;var o=Si[r],l;for(l in o)if(o.hasOwnProperty(l)&&l in Th)return ru[r]=o[l];return r}var jh=il("animationend"),Mh=il("animationiteration"),Oh=il("animationstart"),Rh=il("transitionend"),Ah=new Map,zh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function sr(r,o){Ah.set(r,o),u(o,[r])}for(var iu=0;iu<zh.length;iu++){var ou=zh[iu],Wy=ou.toLowerCase(),Ky=ou[0].toUpperCase()+ou.slice(1);sr(Wy,"on"+Ky)}sr(jh,"onAnimationEnd"),sr(Mh,"onAnimationIteration"),sr(Oh,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(Rh,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),Gy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mo));function Dh(r,o,l){var c=r.type||"unknown-event";r.currentTarget=l,W0(c,o,void 0,r),r.currentTarget=null}function Ih(r,o){o=(o&4)!==0;for(var l=0;l<r.length;l++){var c=r[l],d=c.event;c=c.listeners;e:{var y=void 0;if(o)for(var w=c.length-1;0<=w;w--){var E=c[w],M=E.instance,q=E.currentTarget;if(E=E.listener,M!==y&&d.isPropagationStopped())break e;Dh(d,E,q),y=M}else for(w=0;w<c.length;w++){if(E=c[w],M=E.instance,q=E.currentTarget,E=E.listener,M!==y&&d.isPropagationStopped())break e;Dh(d,E,q),y=M}}}if(Hs)throw r=Da,Hs=!1,Da=null,r}function $e(r,o){var l=o[du];l===void 0&&(l=o[du]=new Set);var c=r+"__bubble";l.has(c)||(Lh(o,r,2,!1),l.add(c))}function su(r,o,l){var c=0;o&&(c|=4),Lh(l,r,c,o)}var ol="_reactListening"+Math.random().toString(36).slice(2);function Oo(r){if(!r[ol]){r[ol]=!0,s.forEach(function(l){l!=="selectionchange"&&(Gy.has(l)||su(l,!1,r),su(l,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[ol]||(o[ol]=!0,su("selectionchange",!1,o))}}function Lh(r,o,l,c){switch(lh(o)){case 1:var d=uy;break;case 4:d=cy;break;default:d=qa}l=d.bind(null,o,l,r),d=void 0,!za||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(d=!0),c?d!==void 0?r.addEventListener(o,l,{capture:!0,passive:d}):r.addEventListener(o,l,!0):d!==void 0?r.addEventListener(o,l,{passive:d}):r.addEventListener(o,l,!1)}function lu(r,o,l,c,d){var y=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var E=c.stateNode.containerInfo;if(E===d||E.nodeType===8&&E.parentNode===d)break;if(w===4)for(w=c.return;w!==null;){var M=w.tag;if((M===3||M===4)&&(M=w.stateNode.containerInfo,M===d||M.nodeType===8&&M.parentNode===d))return;w=w.return}for(;E!==null;){if(w=$r(E),w===null)return;if(M=w.tag,M===5||M===6){c=y=w;continue e}E=E.parentNode}}c=c.return}qf(function(){var q=y,J=Te(l),te=[];e:{var Y=Ah.get(r);if(Y!==void 0){var le=Qa,pe=r;switch(r){case"keypress":if(Js(l)===0)break e;case"keydown":case"keyup":le=Cy;break;case"focusin":pe="focus",le=Ga;break;case"focusout":pe="blur",le=Ga;break;case"beforeblur":case"afterblur":le=Ga;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":le=ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=Ny;break;case jh:case Mh:case Oh:le=my;break;case Rh:le=jy;break;case"scroll":le=fy;break;case"wheel":le=Oy;break;case"copy":case"cut":case"paste":le=vy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=hh}var ge=(o&4)!==0,Ze=!ge&&r==="scroll",U=ge?Y!==null?Y+"Capture":null:Y;ge=[];for(var z=q,H;z!==null;){H=z;var ie=H.stateNode;if(H.tag===5&&ie!==null&&(H=ie,U!==null&&(ie=po(z,U),ie!=null&&ge.push(Ro(z,ie,H)))),Ze)break;z=z.return}0<ge.length&&(Y=new le(Y,pe,null,l,J),te.push({event:Y,listeners:ge}))}}if((o&7)===0){e:{if(Y=r==="mouseover"||r==="pointerover",le=r==="mouseout"||r==="pointerout",Y&&l!==xe&&(pe=l.relatedTarget||l.fromElement)&&($r(pe)||pe[An]))break e;if((le||Y)&&(Y=J.window===J?J:(Y=J.ownerDocument)?Y.defaultView||Y.parentWindow:window,le?(pe=l.relatedTarget||l.toElement,le=q,pe=pe?$r(pe):null,pe!==null&&(Ze=Fr(pe),pe!==Ze||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(le=null,pe=q),le!==pe)){if(ge=ch,ie="onMouseLeave",U="onMouseEnter",z="mouse",(r==="pointerout"||r==="pointerover")&&(ge=hh,ie="onPointerLeave",U="onPointerEnter",z="pointer"),Ze=le==null?Y:Ei(le),H=pe==null?Y:Ei(pe),Y=new ge(ie,z+"leave",le,l,J),Y.target=Ze,Y.relatedTarget=H,ie=null,$r(J)===q&&(ge=new ge(U,z+"enter",pe,l,J),ge.target=H,ge.relatedTarget=Ze,ie=ge),Ze=ie,le&&pe)t:{for(ge=le,U=pe,z=0,H=ge;H;H=bi(H))z++;for(H=0,ie=U;ie;ie=bi(ie))H++;for(;0<z-H;)ge=bi(ge),z--;for(;0<H-z;)U=bi(U),H--;for(;z--;){if(ge===U||U!==null&&ge===U.alternate)break t;ge=bi(ge),U=bi(U)}ge=null}else ge=null;le!==null&&Fh(te,Y,le,ge,!1),pe!==null&&Ze!==null&&Fh(te,Ze,pe,ge,!0)}}e:{if(Y=q?Ei(q):window,le=Y.nodeName&&Y.nodeName.toLowerCase(),le==="select"||le==="input"&&Y.type==="file")var me=Fy;else if(vh(Y))if(_h)me=qy;else{me=Uy;var _e=$y}else(le=Y.nodeName)&&le.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(me=Hy);if(me&&(me=me(r,q))){xh(te,me,l,J);break e}_e&&_e(r,Y,q),r==="focusout"&&(_e=Y._wrapperState)&&_e.controlled&&Y.type==="number"&&ao(Y,"number",Y.value)}switch(_e=q?Ei(q):window,r){case"focusin":(vh(_e)||_e.contentEditable==="true")&&(ki=_e,tu=q,jo=null);break;case"focusout":jo=tu=ki=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,Nh(te,l,J);break;case"selectionchange":if(Qy)break;case"keydown":case"keyup":Nh(te,l,J)}var we;if(Ya)e:{switch(r){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else wi?mh(r,l)&&(Se="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(dh&&l.locale!=="ko"&&(wi||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&wi&&(we=ah()):(or=J,Ba="value"in or?or.value:or.textContent,wi=!0)),_e=sl(q,Se),0<_e.length&&(Se=new fh(Se,r,null,l,J),te.push({event:Se,listeners:_e}),we?Se.data=we:(we=yh(l),we!==null&&(Se.data=we)))),(we=Ay?zy(r,l):Dy(r,l))&&(q=sl(q,"onBeforeInput"),0<q.length&&(J=new fh("onBeforeInput","beforeinput",null,l,J),te.push({event:J,listeners:q}),J.data=we))}Ih(te,o)})}function Ro(r,o,l){return{instance:r,listener:o,currentTarget:l}}function sl(r,o){for(var l=o+"Capture",c=[];r!==null;){var d=r,y=d.stateNode;d.tag===5&&y!==null&&(d=y,y=po(r,l),y!=null&&c.unshift(Ro(r,y,d)),y=po(r,o),y!=null&&c.push(Ro(r,y,d))),r=r.return}return c}function bi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Fh(r,o,l,c,d){for(var y=o._reactName,w=[];l!==null&&l!==c;){var E=l,M=E.alternate,q=E.stateNode;if(M!==null&&M===c)break;E.tag===5&&q!==null&&(E=q,d?(M=po(l,y),M!=null&&w.unshift(Ro(l,M,E))):d||(M=po(l,y),M!=null&&w.push(Ro(l,M,E)))),l=l.return}w.length!==0&&r.push({event:o,listeners:w})}var Xy=/\r\n?/g,Yy=/\u0000|\uFFFD/g;function $h(r){return(typeof r=="string"?r:""+r).replace(Xy,`
38
+ `).replace(Yy,"")}function ll(r,o,l){if(o=$h(o),$h(r)!==o&&l)throw Error(i(425))}function al(){}var au=null,uu=null;function cu(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var fu=typeof setTimeout=="function"?setTimeout:void 0,Zy=typeof clearTimeout=="function"?clearTimeout:void 0,Uh=typeof Promise=="function"?Promise:void 0,Jy=typeof queueMicrotask=="function"?queueMicrotask:typeof Uh<"u"?function(r){return Uh.resolve(null).then(r).catch(ev)}:fu;function ev(r){setTimeout(function(){throw r})}function hu(r,o){var l=o,c=0;do{var d=l.nextSibling;if(r.removeChild(l),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(c===0){r.removeChild(d),So(o);return}c--}else l!=="$"&&l!=="$?"&&l!=="$!"||c++;l=d}while(l);So(o)}function lr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function Hh(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return r;o--}else l==="/$"&&o++}r=r.previousSibling}return null}var Ci=Math.random().toString(36).slice(2),_n="__reactFiber$"+Ci,Ao="__reactProps$"+Ci,An="__reactContainer$"+Ci,du="__reactEvents$"+Ci,tv="__reactListeners$"+Ci,nv="__reactHandles$"+Ci;function $r(r){var o=r[_n];if(o)return o;for(var l=r.parentNode;l;){if(o=l[An]||l[_n]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(r=Hh(r);r!==null;){if(l=r[_n])return l;r=Hh(r)}return o}r=l,l=r.parentNode}return null}function zo(r){return r=r[_n]||r[An],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ei(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(i(33))}function ul(r){return r[Ao]||null}var pu=[],Pi=-1;function ar(r){return{current:r}}function Ue(r){0>Pi||(r.current=pu[Pi],pu[Pi]=null,Pi--)}function Fe(r,o){Pi++,pu[Pi]=r.current,r.current=o}var ur={},ft=ar(ur),Et=ar(!1),Ur=ur;function Ni(r,o){var l=r.type.contextTypes;if(!l)return ur;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var d={},y;for(y in l)d[y]=o[y];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=d),d}function Pt(r){return r=r.childContextTypes,r!=null}function cl(){Ue(Et),Ue(ft)}function qh(r,o,l){if(ft.current!==ur)throw Error(i(168));Fe(ft,o),Fe(Et,l)}function Vh(r,o,l){var c=r.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return l;c=c.getChildContext();for(var d in c)if(!(d in o))throw Error(i(108,Ee(r)||"Unknown",d));return G({},l,c)}function fl(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ur,Ur=ft.current,Fe(ft,r),Fe(Et,Et.current),!0}function Bh(r,o,l){var c=r.stateNode;if(!c)throw Error(i(169));l?(r=Vh(r,o,Ur),c.__reactInternalMemoizedMergedChildContext=r,Ue(Et),Ue(ft),Fe(ft,r)):Ue(Et),Fe(Et,l)}var zn=null,hl=!1,gu=!1;function Qh(r){zn===null?zn=[r]:zn.push(r)}function rv(r){hl=!0,Qh(r)}function cr(){if(!gu&&zn!==null){gu=!0;var r=0,o=ze;try{var l=zn;for(ze=1;r<l.length;r++){var c=l[r];do c=c(!0);while(c!==null)}zn=null,hl=!1}catch(d){throw zn!==null&&(zn=zn.slice(r+1)),Kf(Ia,cr),d}finally{ze=o,gu=!1}}return null}var Ti=[],ji=0,dl=null,pl=0,Qt=[],Wt=0,Hr=null,Dn=1,In="";function qr(r,o){Ti[ji++]=pl,Ti[ji++]=dl,dl=r,pl=o}function Wh(r,o,l){Qt[Wt++]=Dn,Qt[Wt++]=In,Qt[Wt++]=Hr,Hr=r;var c=Dn;r=In;var d=32-rn(c)-1;c&=~(1<<d),l+=1;var y=32-rn(o)+d;if(30<y){var w=d-d%5;y=(c&(1<<w)-1).toString(32),c>>=w,d-=w,Dn=1<<32-rn(o)+d|l<<d|c,In=y+r}else Dn=1<<y|l<<d|c,In=r}function mu(r){r.return!==null&&(qr(r,1),Wh(r,1,0))}function yu(r){for(;r===dl;)dl=Ti[--ji],Ti[ji]=null,pl=Ti[--ji],Ti[ji]=null;for(;r===Hr;)Hr=Qt[--Wt],Qt[Wt]=null,In=Qt[--Wt],Qt[Wt]=null,Dn=Qt[--Wt],Qt[Wt]=null}var It=null,Lt=null,qe=!1,sn=null;function Kh(r,o){var l=Yt(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=r,o=r.deletions,o===null?(r.deletions=[l],r.flags|=16):o.push(l)}function Gh(r,o){switch(r.tag){case 5:var l=r.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,It=r,Lt=lr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,It=r,Lt=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=Hr!==null?{id:Dn,overflow:In}:null,r.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=Yt(18,null,null,0),l.stateNode=o,l.return=r,r.child=l,It=r,Lt=null,!0):!1;default:return!1}}function vu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function xu(r){if(qe){var o=Lt;if(o){var l=o;if(!Gh(r,o)){if(vu(r))throw Error(i(418));o=lr(l.nextSibling);var c=It;o&&Gh(r,o)?Kh(c,l):(r.flags=r.flags&-4097|2,qe=!1,It=r)}}else{if(vu(r))throw Error(i(418));r.flags=r.flags&-4097|2,qe=!1,It=r}}}function Xh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;It=r}function gl(r){if(r!==It)return!1;if(!qe)return Xh(r),qe=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!cu(r.type,r.memoizedProps)),o&&(o=Lt)){if(vu(r))throw Yh(),Error(i(418));for(;o;)Kh(r,o),o=lr(o.nextSibling)}if(Xh(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"){if(o===0){Lt=lr(r.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}r=r.nextSibling}Lt=null}}else Lt=It?lr(r.stateNode.nextSibling):null;return!0}function Yh(){for(var r=Lt;r;)r=lr(r.nextSibling)}function Mi(){Lt=It=null,qe=!1}function _u(r){sn===null?sn=[r]:sn.push(r)}var iv=N.ReactCurrentBatchConfig;function Do(r,o,l){if(r=l.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(i(309));var c=l.stateNode}if(!c)throw Error(i(147,r));var d=c,y=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===y?o.ref:(o=function(w){var E=d.refs;w===null?delete E[y]:E[y]=w},o._stringRef=y,o)}if(typeof r!="string")throw Error(i(284));if(!l._owner)throw Error(i(290,r))}return r}function ml(r,o){throw r=Object.prototype.toString.call(o),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function Zh(r){var o=r._init;return o(r._payload)}function Jh(r){function o(U,z){if(r){var H=U.deletions;H===null?(U.deletions=[z],U.flags|=16):H.push(z)}}function l(U,z){if(!r)return null;for(;z!==null;)o(U,z),z=z.sibling;return null}function c(U,z){for(U=new Map;z!==null;)z.key!==null?U.set(z.key,z):U.set(z.index,z),z=z.sibling;return U}function d(U,z){return U=vr(U,z),U.index=0,U.sibling=null,U}function y(U,z,H){return U.index=H,r?(H=U.alternate,H!==null?(H=H.index,H<z?(U.flags|=2,z):H):(U.flags|=2,z)):(U.flags|=1048576,z)}function w(U){return r&&U.alternate===null&&(U.flags|=2),U}function E(U,z,H,ie){return z===null||z.tag!==6?(z=fc(H,U.mode,ie),z.return=U,z):(z=d(z,H),z.return=U,z)}function M(U,z,H,ie){var me=H.type;return me===F?J(U,z,H.props.children,ie,H.key):z!==null&&(z.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===W&&Zh(me)===z.type)?(ie=d(z,H.props),ie.ref=Do(U,z,H),ie.return=U,ie):(ie=$l(H.type,H.key,H.props,null,U.mode,ie),ie.ref=Do(U,z,H),ie.return=U,ie)}function q(U,z,H,ie){return z===null||z.tag!==4||z.stateNode.containerInfo!==H.containerInfo||z.stateNode.implementation!==H.implementation?(z=hc(H,U.mode,ie),z.return=U,z):(z=d(z,H.children||[]),z.return=U,z)}function J(U,z,H,ie,me){return z===null||z.tag!==7?(z=Yr(H,U.mode,ie,me),z.return=U,z):(z=d(z,H),z.return=U,z)}function te(U,z,H){if(typeof z=="string"&&z!==""||typeof z=="number")return z=fc(""+z,U.mode,H),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case T:return H=$l(z.type,z.key,z.props,null,U.mode,H),H.ref=Do(U,null,z),H.return=U,H;case D:return z=hc(z,U.mode,H),z.return=U,z;case W:var ie=z._init;return te(U,ie(z._payload),H)}if(Dr(z)||Z(z))return z=Yr(z,U.mode,H,null),z.return=U,z;ml(U,z)}return null}function Y(U,z,H,ie){var me=z!==null?z.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return me!==null?null:E(U,z,""+H,ie);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case T:return H.key===me?M(U,z,H,ie):null;case D:return H.key===me?q(U,z,H,ie):null;case W:return me=H._init,Y(U,z,me(H._payload),ie)}if(Dr(H)||Z(H))return me!==null?null:J(U,z,H,ie,null);ml(U,H)}return null}function le(U,z,H,ie,me){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return U=U.get(H)||null,E(z,U,""+ie,me);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case T:return U=U.get(ie.key===null?H:ie.key)||null,M(z,U,ie,me);case D:return U=U.get(ie.key===null?H:ie.key)||null,q(z,U,ie,me);case W:var _e=ie._init;return le(U,z,H,_e(ie._payload),me)}if(Dr(ie)||Z(ie))return U=U.get(H)||null,J(z,U,ie,me,null);ml(z,ie)}return null}function pe(U,z,H,ie){for(var me=null,_e=null,we=z,Se=z=0,ot=null;we!==null&&Se<H.length;Se++){we.index>Se?(ot=we,we=null):ot=we.sibling;var Oe=Y(U,we,H[Se],ie);if(Oe===null){we===null&&(we=ot);break}r&&we&&Oe.alternate===null&&o(U,we),z=y(Oe,z,Se),_e===null?me=Oe:_e.sibling=Oe,_e=Oe,we=ot}if(Se===H.length)return l(U,we),qe&&qr(U,Se),me;if(we===null){for(;Se<H.length;Se++)we=te(U,H[Se],ie),we!==null&&(z=y(we,z,Se),_e===null?me=we:_e.sibling=we,_e=we);return qe&&qr(U,Se),me}for(we=c(U,we);Se<H.length;Se++)ot=le(we,U,Se,H[Se],ie),ot!==null&&(r&&ot.alternate!==null&&we.delete(ot.key===null?Se:ot.key),z=y(ot,z,Se),_e===null?me=ot:_e.sibling=ot,_e=ot);return r&&we.forEach(function(xr){return o(U,xr)}),qe&&qr(U,Se),me}function ge(U,z,H,ie){var me=Z(H);if(typeof me!="function")throw Error(i(150));if(H=me.call(H),H==null)throw Error(i(151));for(var _e=me=null,we=z,Se=z=0,ot=null,Oe=H.next();we!==null&&!Oe.done;Se++,Oe=H.next()){we.index>Se?(ot=we,we=null):ot=we.sibling;var xr=Y(U,we,Oe.value,ie);if(xr===null){we===null&&(we=ot);break}r&&we&&xr.alternate===null&&o(U,we),z=y(xr,z,Se),_e===null?me=xr:_e.sibling=xr,_e=xr,we=ot}if(Oe.done)return l(U,we),qe&&qr(U,Se),me;if(we===null){for(;!Oe.done;Se++,Oe=H.next())Oe=te(U,Oe.value,ie),Oe!==null&&(z=y(Oe,z,Se),_e===null?me=Oe:_e.sibling=Oe,_e=Oe);return qe&&qr(U,Se),me}for(we=c(U,we);!Oe.done;Se++,Oe=H.next())Oe=le(we,U,Se,Oe.value,ie),Oe!==null&&(r&&Oe.alternate!==null&&we.delete(Oe.key===null?Se:Oe.key),z=y(Oe,z,Se),_e===null?me=Oe:_e.sibling=Oe,_e=Oe);return r&&we.forEach(function(Iv){return o(U,Iv)}),qe&&qr(U,Se),me}function Ze(U,z,H,ie){if(typeof H=="object"&&H!==null&&H.type===F&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case T:e:{for(var me=H.key,_e=z;_e!==null;){if(_e.key===me){if(me=H.type,me===F){if(_e.tag===7){l(U,_e.sibling),z=d(_e,H.props.children),z.return=U,U=z;break e}}else if(_e.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===W&&Zh(me)===_e.type){l(U,_e.sibling),z=d(_e,H.props),z.ref=Do(U,_e,H),z.return=U,U=z;break e}l(U,_e);break}else o(U,_e);_e=_e.sibling}H.type===F?(z=Yr(H.props.children,U.mode,ie,H.key),z.return=U,U=z):(ie=$l(H.type,H.key,H.props,null,U.mode,ie),ie.ref=Do(U,z,H),ie.return=U,U=ie)}return w(U);case D:e:{for(_e=H.key;z!==null;){if(z.key===_e)if(z.tag===4&&z.stateNode.containerInfo===H.containerInfo&&z.stateNode.implementation===H.implementation){l(U,z.sibling),z=d(z,H.children||[]),z.return=U,U=z;break e}else{l(U,z);break}else o(U,z);z=z.sibling}z=hc(H,U.mode,ie),z.return=U,U=z}return w(U);case W:return _e=H._init,Ze(U,z,_e(H._payload),ie)}if(Dr(H))return pe(U,z,H,ie);if(Z(H))return ge(U,z,H,ie);ml(U,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,z!==null&&z.tag===6?(l(U,z.sibling),z=d(z,H),z.return=U,U=z):(l(U,z),z=fc(H,U.mode,ie),z.return=U,U=z),w(U)):l(U,z)}return Ze}var Oi=Jh(!0),ed=Jh(!1),yl=ar(null),vl=null,Ri=null,wu=null;function ku(){wu=Ri=vl=null}function Su(r){var o=yl.current;Ue(yl),r._currentValue=o}function bu(r,o,l){for(;r!==null;){var c=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),r===l)break;r=r.return}}function Ai(r,o){vl=r,wu=Ri=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Nt=!0),r.firstContext=null)}function Kt(r){var o=r._currentValue;if(wu!==r)if(r={context:r,memoizedValue:o,next:null},Ri===null){if(vl===null)throw Error(i(308));Ri=r,vl.dependencies={lanes:0,firstContext:r}}else Ri=Ri.next=r;return o}var Vr=null;function Cu(r){Vr===null?Vr=[r]:Vr.push(r)}function td(r,o,l,c){var d=o.interleaved;return d===null?(l.next=l,Cu(o)):(l.next=d.next,d.next=l),o.interleaved=l,Ln(r,c)}function Ln(r,o){r.lanes|=o;var l=r.alternate;for(l!==null&&(l.lanes|=o),l=r,r=r.return;r!==null;)r.childLanes|=o,l=r.alternate,l!==null&&(l.childLanes|=o),l=r,r=r.return;return l.tag===3?l.stateNode:null}var fr=!1;function Eu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nd(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Fn(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function hr(r,o,l){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Me&2)!==0){var d=c.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),c.pending=o,Ln(r,l)}return d=c.interleaved,d===null?(o.next=o,Cu(c)):(o.next=d.next,d.next=o),c.interleaved=o,Ln(r,l)}function xl(r,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var c=o.lanes;c&=r.pendingLanes,l|=c,o.lanes=l,$a(r,l)}}function rd(r,o){var l=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var d=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var w={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?d=y=w:y=y.next=w,l=l.next}while(l!==null);y===null?d=y=o:y=y.next=o}else d=y=o;l={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:y,shared:c.shared,effects:c.effects},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=o:r.next=o,l.lastBaseUpdate=o}function _l(r,o,l,c){var d=r.updateQueue;fr=!1;var y=d.firstBaseUpdate,w=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var M=E,q=M.next;M.next=null,w===null?y=q:w.next=q,w=M;var J=r.alternate;J!==null&&(J=J.updateQueue,E=J.lastBaseUpdate,E!==w&&(E===null?J.firstBaseUpdate=q:E.next=q,J.lastBaseUpdate=M))}if(y!==null){var te=d.baseState;w=0,J=q=M=null,E=y;do{var Y=E.lane,le=E.eventTime;if((c&Y)===Y){J!==null&&(J=J.next={eventTime:le,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var pe=r,ge=E;switch(Y=o,le=l,ge.tag){case 1:if(pe=ge.payload,typeof pe=="function"){te=pe.call(le,te,Y);break e}te=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ge.payload,Y=typeof pe=="function"?pe.call(le,te,Y):pe,Y==null)break e;te=G({},te,Y);break e;case 2:fr=!0}}E.callback!==null&&E.lane!==0&&(r.flags|=64,Y=d.effects,Y===null?d.effects=[E]:Y.push(E))}else le={eventTime:le,lane:Y,tag:E.tag,payload:E.payload,callback:E.callback,next:null},J===null?(q=J=le,M=te):J=J.next=le,w|=Y;if(E=E.next,E===null){if(E=d.shared.pending,E===null)break;Y=E,E=Y.next,Y.next=null,d.lastBaseUpdate=Y,d.shared.pending=null}}while(!0);if(J===null&&(M=te),d.baseState=M,d.firstBaseUpdate=q,d.lastBaseUpdate=J,o=d.shared.interleaved,o!==null){d=o;do w|=d.lane,d=d.next;while(d!==o)}else y===null&&(d.shared.lanes=0);Wr|=w,r.lanes=w,r.memoizedState=te}}function id(r,o,l){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var c=r[o],d=c.callback;if(d!==null){if(c.callback=null,c=l,typeof d!="function")throw Error(i(191,d));d.call(c)}}}var Io={},wn=ar(Io),Lo=ar(Io),Fo=ar(Io);function Br(r){if(r===Io)throw Error(i(174));return r}function Pu(r,o){switch(Fe(Fo,o),Fe(Lo,r),Fe(wn,Io),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ho(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ho(o,r)}Ue(wn),Fe(wn,o)}function zi(){Ue(wn),Ue(Lo),Ue(Fo)}function od(r){Br(Fo.current);var o=Br(wn.current),l=ho(o,r.type);o!==l&&(Fe(Lo,r),Fe(wn,l))}function Nu(r){Lo.current===r&&(Ue(wn),Ue(Lo))}var Qe=ar(0);function wl(r){for(var o=r;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Tu=[];function ju(){for(var r=0;r<Tu.length;r++)Tu[r]._workInProgressVersionPrimary=null;Tu.length=0}var kl=N.ReactCurrentDispatcher,Mu=N.ReactCurrentBatchConfig,Qr=0,We=null,et=null,rt=null,Sl=!1,$o=!1,Uo=0,ov=0;function ht(){throw Error(i(321))}function Ou(r,o){if(o===null)return!1;for(var l=0;l<o.length&&l<r.length;l++)if(!on(r[l],o[l]))return!1;return!0}function Ru(r,o,l,c,d,y){if(Qr=y,We=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,kl.current=r===null||r.memoizedState===null?uv:cv,r=l(c,d),$o){y=0;do{if($o=!1,Uo=0,25<=y)throw Error(i(301));y+=1,rt=et=null,o.updateQueue=null,kl.current=fv,r=l(c,d)}while($o)}if(kl.current=El,o=et!==null&&et.next!==null,Qr=0,rt=et=We=null,Sl=!1,o)throw Error(i(300));return r}function Au(){var r=Uo!==0;return Uo=0,r}function kn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?We.memoizedState=rt=r:rt=rt.next=r,rt}function Gt(){if(et===null){var r=We.alternate;r=r!==null?r.memoizedState:null}else r=et.next;var o=rt===null?We.memoizedState:rt.next;if(o!==null)rt=o,et=r;else{if(r===null)throw Error(i(310));et=r,r={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},rt===null?We.memoizedState=rt=r:rt=rt.next=r}return rt}function Ho(r,o){return typeof o=="function"?o(r):o}function zu(r){var o=Gt(),l=o.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=r;var c=et,d=c.baseQueue,y=l.pending;if(y!==null){if(d!==null){var w=d.next;d.next=y.next,y.next=w}c.baseQueue=d=y,l.pending=null}if(d!==null){y=d.next,c=c.baseState;var E=w=null,M=null,q=y;do{var J=q.lane;if((Qr&J)===J)M!==null&&(M=M.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),c=q.hasEagerState?q.eagerState:r(c,q.action);else{var te={lane:J,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};M===null?(E=M=te,w=c):M=M.next=te,We.lanes|=J,Wr|=J}q=q.next}while(q!==null&&q!==y);M===null?w=c:M.next=E,on(c,o.memoizedState)||(Nt=!0),o.memoizedState=c,o.baseState=w,o.baseQueue=M,l.lastRenderedState=c}if(r=l.interleaved,r!==null){d=r;do y=d.lane,We.lanes|=y,Wr|=y,d=d.next;while(d!==r)}else d===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Du(r){var o=Gt(),l=o.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=r;var c=l.dispatch,d=l.pending,y=o.memoizedState;if(d!==null){l.pending=null;var w=d=d.next;do y=r(y,w.action),w=w.next;while(w!==d);on(y,o.memoizedState)||(Nt=!0),o.memoizedState=y,o.baseQueue===null&&(o.baseState=y),l.lastRenderedState=y}return[y,c]}function sd(){}function ld(r,o){var l=We,c=Gt(),d=o(),y=!on(c.memoizedState,d);if(y&&(c.memoizedState=d,Nt=!0),c=c.queue,Iu(cd.bind(null,l,c,r),[r]),c.getSnapshot!==o||y||rt!==null&&rt.memoizedState.tag&1){if(l.flags|=2048,qo(9,ud.bind(null,l,c,d,o),void 0,null),it===null)throw Error(i(349));(Qr&30)!==0||ad(l,o,d)}return d}function ad(r,o,l){r.flags|=16384,r={getSnapshot:o,value:l},o=We.updateQueue,o===null?(o={lastEffect:null,stores:null},We.updateQueue=o,o.stores=[r]):(l=o.stores,l===null?o.stores=[r]:l.push(r))}function ud(r,o,l,c){o.value=l,o.getSnapshot=c,fd(o)&&hd(r)}function cd(r,o,l){return l(function(){fd(o)&&hd(r)})}function fd(r){var o=r.getSnapshot;r=r.value;try{var l=o();return!on(r,l)}catch{return!0}}function hd(r){var o=Ln(r,1);o!==null&&cn(o,r,1,-1)}function dd(r){var o=kn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:r},o.queue=r,r=r.dispatch=av.bind(null,We,r),[o.memoizedState,r]}function qo(r,o,l,c){return r={tag:r,create:o,destroy:l,deps:c,next:null},o=We.updateQueue,o===null?(o={lastEffect:null,stores:null},We.updateQueue=o,o.lastEffect=r.next=r):(l=o.lastEffect,l===null?o.lastEffect=r.next=r:(c=l.next,l.next=r,r.next=c,o.lastEffect=r)),r}function pd(){return Gt().memoizedState}function bl(r,o,l,c){var d=kn();We.flags|=r,d.memoizedState=qo(1|o,l,void 0,c===void 0?null:c)}function Cl(r,o,l,c){var d=Gt();c=c===void 0?null:c;var y=void 0;if(et!==null){var w=et.memoizedState;if(y=w.destroy,c!==null&&Ou(c,w.deps)){d.memoizedState=qo(o,l,y,c);return}}We.flags|=r,d.memoizedState=qo(1|o,l,y,c)}function gd(r,o){return bl(8390656,8,r,o)}function Iu(r,o){return Cl(2048,8,r,o)}function md(r,o){return Cl(4,2,r,o)}function yd(r,o){return Cl(4,4,r,o)}function vd(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function xd(r,o,l){return l=l!=null?l.concat([r]):null,Cl(4,4,vd.bind(null,o,r),l)}function Lu(){}function _d(r,o){var l=Gt();o=o===void 0?null:o;var c=l.memoizedState;return c!==null&&o!==null&&Ou(o,c[1])?c[0]:(l.memoizedState=[r,o],r)}function wd(r,o){var l=Gt();o=o===void 0?null:o;var c=l.memoizedState;return c!==null&&o!==null&&Ou(o,c[1])?c[0]:(r=r(),l.memoizedState=[r,o],r)}function kd(r,o,l){return(Qr&21)===0?(r.baseState&&(r.baseState=!1,Nt=!0),r.memoizedState=l):(on(l,o)||(l=Zf(),We.lanes|=l,Wr|=l,r.baseState=!0),o)}function sv(r,o){var l=ze;ze=l!==0&&4>l?l:4,r(!0);var c=Mu.transition;Mu.transition={};try{r(!1),o()}finally{ze=l,Mu.transition=c}}function Sd(){return Gt().memoizedState}function lv(r,o,l){var c=mr(r);if(l={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null},bd(r))Cd(o,l);else if(l=td(r,o,l,c),l!==null){var d=xt();cn(l,r,c,d),Ed(l,o,c)}}function av(r,o,l){var c=mr(r),d={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null};if(bd(r))Cd(o,d);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=o.lastRenderedReducer,y!==null))try{var w=o.lastRenderedState,E=y(w,l);if(d.hasEagerState=!0,d.eagerState=E,on(E,w)){var M=o.interleaved;M===null?(d.next=d,Cu(o)):(d.next=M.next,M.next=d),o.interleaved=d;return}}catch{}finally{}l=td(r,o,d,c),l!==null&&(d=xt(),cn(l,r,c,d),Ed(l,o,c))}}function bd(r){var o=r.alternate;return r===We||o!==null&&o===We}function Cd(r,o){$o=Sl=!0;var l=r.pending;l===null?o.next=o:(o.next=l.next,l.next=o),r.pending=o}function Ed(r,o,l){if((l&4194240)!==0){var c=o.lanes;c&=r.pendingLanes,l|=c,o.lanes=l,$a(r,l)}}var El={readContext:Kt,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},uv={readContext:Kt,useCallback:function(r,o){return kn().memoizedState=[r,o===void 0?null:o],r},useContext:Kt,useEffect:gd,useImperativeHandle:function(r,o,l){return l=l!=null?l.concat([r]):null,bl(4194308,4,vd.bind(null,o,r),l)},useLayoutEffect:function(r,o){return bl(4194308,4,r,o)},useInsertionEffect:function(r,o){return bl(4,2,r,o)},useMemo:function(r,o){var l=kn();return o=o===void 0?null:o,r=r(),l.memoizedState=[r,o],r},useReducer:function(r,o,l){var c=kn();return o=l!==void 0?l(o):o,c.memoizedState=c.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},c.queue=r,r=r.dispatch=lv.bind(null,We,r),[c.memoizedState,r]},useRef:function(r){var o=kn();return r={current:r},o.memoizedState=r},useState:dd,useDebugValue:Lu,useDeferredValue:function(r){return kn().memoizedState=r},useTransition:function(){var r=dd(!1),o=r[0];return r=sv.bind(null,r[1]),kn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,l){var c=We,d=kn();if(qe){if(l===void 0)throw Error(i(407));l=l()}else{if(l=o(),it===null)throw Error(i(349));(Qr&30)!==0||ad(c,o,l)}d.memoizedState=l;var y={value:l,getSnapshot:o};return d.queue=y,gd(cd.bind(null,c,y,r),[r]),c.flags|=2048,qo(9,ud.bind(null,c,y,l,o),void 0,null),l},useId:function(){var r=kn(),o=it.identifierPrefix;if(qe){var l=In,c=Dn;l=(c&~(1<<32-rn(c)-1)).toString(32)+l,o=":"+o+"R"+l,l=Uo++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=ov++,o=":"+o+"r"+l.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},cv={readContext:Kt,useCallback:_d,useContext:Kt,useEffect:Iu,useImperativeHandle:xd,useInsertionEffect:md,useLayoutEffect:yd,useMemo:wd,useReducer:zu,useRef:pd,useState:function(){return zu(Ho)},useDebugValue:Lu,useDeferredValue:function(r){var o=Gt();return kd(o,et.memoizedState,r)},useTransition:function(){var r=zu(Ho)[0],o=Gt().memoizedState;return[r,o]},useMutableSource:sd,useSyncExternalStore:ld,useId:Sd,unstable_isNewReconciler:!1},fv={readContext:Kt,useCallback:_d,useContext:Kt,useEffect:Iu,useImperativeHandle:xd,useInsertionEffect:md,useLayoutEffect:yd,useMemo:wd,useReducer:Du,useRef:pd,useState:function(){return Du(Ho)},useDebugValue:Lu,useDeferredValue:function(r){var o=Gt();return et===null?o.memoizedState=r:kd(o,et.memoizedState,r)},useTransition:function(){var r=Du(Ho)[0],o=Gt().memoizedState;return[r,o]},useMutableSource:sd,useSyncExternalStore:ld,useId:Sd,unstable_isNewReconciler:!1};function ln(r,o){if(r&&r.defaultProps){o=G({},o),r=r.defaultProps;for(var l in r)o[l]===void 0&&(o[l]=r[l]);return o}return o}function Fu(r,o,l,c){o=r.memoizedState,l=l(c,o),l=l==null?o:G({},o,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var Pl={isMounted:function(r){return(r=r._reactInternals)?Fr(r)===r:!1},enqueueSetState:function(r,o,l){r=r._reactInternals;var c=xt(),d=mr(r),y=Fn(c,d);y.payload=o,l!=null&&(y.callback=l),o=hr(r,y,d),o!==null&&(cn(o,r,d,c),xl(o,r,d))},enqueueReplaceState:function(r,o,l){r=r._reactInternals;var c=xt(),d=mr(r),y=Fn(c,d);y.tag=1,y.payload=o,l!=null&&(y.callback=l),o=hr(r,y,d),o!==null&&(cn(o,r,d,c),xl(o,r,d))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var l=xt(),c=mr(r),d=Fn(l,c);d.tag=2,o!=null&&(d.callback=o),o=hr(r,d,c),o!==null&&(cn(o,r,c,l),xl(o,r,c))}};function Pd(r,o,l,c,d,y,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,y,w):o.prototype&&o.prototype.isPureReactComponent?!To(l,c)||!To(d,y):!0}function Nd(r,o,l){var c=!1,d=ur,y=o.contextType;return typeof y=="object"&&y!==null?y=Kt(y):(d=Pt(o)?Ur:ft.current,c=o.contextTypes,y=(c=c!=null)?Ni(r,d):ur),o=new o(l,y),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Pl,r.stateNode=o,o._reactInternals=r,c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=d,r.__reactInternalMemoizedMaskedChildContext=y),o}function Td(r,o,l,c){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,c),o.state!==r&&Pl.enqueueReplaceState(o,o.state,null)}function $u(r,o,l,c){var d=r.stateNode;d.props=l,d.state=r.memoizedState,d.refs={},Eu(r);var y=o.contextType;typeof y=="object"&&y!==null?d.context=Kt(y):(y=Pt(o)?Ur:ft.current,d.context=Ni(r,y)),d.state=r.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Fu(r,o,y,l),d.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(o=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),o!==d.state&&Pl.enqueueReplaceState(d,d.state,null),_l(r,l,d,c),d.state=r.memoizedState),typeof d.componentDidMount=="function"&&(r.flags|=4194308)}function Di(r,o){try{var l="",c=o;do l+=ke(c),c=c.return;while(c);var d=l}catch(y){d=`
39
+ Error generating stack: `+y.message+`
40
+ `+y.stack}return{value:r,source:o,stack:d,digest:null}}function Uu(r,o,l){return{value:r,source:null,stack:l??null,digest:o??null}}function Hu(r,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var hv=typeof WeakMap=="function"?WeakMap:Map;function jd(r,o,l){l=Fn(-1,l),l.tag=3,l.payload={element:null};var c=o.value;return l.callback=function(){Al||(Al=!0,rc=c),Hu(r,o)},l}function Md(r,o,l){l=Fn(-1,l),l.tag=3;var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;l.payload=function(){return c(d)},l.callback=function(){Hu(r,o)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){Hu(r,o),typeof c!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})}),l}function Od(r,o,l){var c=r.pingCache;if(c===null){c=r.pingCache=new hv;var d=new Set;c.set(o,d)}else d=c.get(o),d===void 0&&(d=new Set,c.set(o,d));d.has(l)||(d.add(l),r=Ev.bind(null,r,o,l),o.then(r,r))}function Rd(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Ad(r,o,l,c,d){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=Fn(-1,1),o.tag=2,hr(l,o,1))),l.lanes|=1),r):(r.flags|=65536,r.lanes=d,r)}var dv=N.ReactCurrentOwner,Nt=!1;function vt(r,o,l,c){o.child=r===null?ed(o,null,l,c):Oi(o,r.child,l,c)}function zd(r,o,l,c,d){l=l.render;var y=o.ref;return Ai(o,d),c=Ru(r,o,l,c,y,d),l=Au(),r!==null&&!Nt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~d,$n(r,o,d)):(qe&&l&&mu(o),o.flags|=1,vt(r,o,c,d),o.child)}function Dd(r,o,l,c,d){if(r===null){var y=l.type;return typeof y=="function"&&!cc(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=y,Id(r,o,y,c,d)):(r=$l(l.type,null,c,o,o.mode,d),r.ref=o.ref,r.return=o,o.child=r)}if(y=r.child,(r.lanes&d)===0){var w=y.memoizedProps;if(l=l.compare,l=l!==null?l:To,l(w,c)&&r.ref===o.ref)return $n(r,o,d)}return o.flags|=1,r=vr(y,c),r.ref=o.ref,r.return=o,o.child=r}function Id(r,o,l,c,d){if(r!==null){var y=r.memoizedProps;if(To(y,c)&&r.ref===o.ref)if(Nt=!1,o.pendingProps=c=y,(r.lanes&d)!==0)(r.flags&131072)!==0&&(Nt=!0);else return o.lanes=r.lanes,$n(r,o,d)}return qu(r,o,l,c,d)}function Ld(r,o,l){var c=o.pendingProps,d=c.children,y=r!==null?r.memoizedState:null;if(c.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(Li,Ft),Ft|=l;else{if((l&1073741824)===0)return r=y!==null?y.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Fe(Li,Ft),Ft|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=y!==null?y.baseLanes:l,Fe(Li,Ft),Ft|=c}else y!==null?(c=y.baseLanes|l,o.memoizedState=null):c=l,Fe(Li,Ft),Ft|=c;return vt(r,o,d,l),o.child}function Fd(r,o){var l=o.ref;(r===null&&l!==null||r!==null&&r.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function qu(r,o,l,c,d){var y=Pt(l)?Ur:ft.current;return y=Ni(o,y),Ai(o,d),l=Ru(r,o,l,c,y,d),c=Au(),r!==null&&!Nt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~d,$n(r,o,d)):(qe&&c&&mu(o),o.flags|=1,vt(r,o,l,d),o.child)}function $d(r,o,l,c,d){if(Pt(l)){var y=!0;fl(o)}else y=!1;if(Ai(o,d),o.stateNode===null)Tl(r,o),Nd(o,l,c),$u(o,l,c,d),c=!0;else if(r===null){var w=o.stateNode,E=o.memoizedProps;w.props=E;var M=w.context,q=l.contextType;typeof q=="object"&&q!==null?q=Kt(q):(q=Pt(l)?Ur:ft.current,q=Ni(o,q));var J=l.getDerivedStateFromProps,te=typeof J=="function"||typeof w.getSnapshotBeforeUpdate=="function";te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(E!==c||M!==q)&&Td(o,w,c,q),fr=!1;var Y=o.memoizedState;w.state=Y,_l(o,c,w,d),M=o.memoizedState,E!==c||Y!==M||Et.current||fr?(typeof J=="function"&&(Fu(o,l,J,c),M=o.memoizedState),(E=fr||Pd(o,l,E,c,Y,M,q))?(te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=M),w.props=c,w.state=M,w.context=q,c=E):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{w=o.stateNode,nd(r,o),E=o.memoizedProps,q=o.type===o.elementType?E:ln(o.type,E),w.props=q,te=o.pendingProps,Y=w.context,M=l.contextType,typeof M=="object"&&M!==null?M=Kt(M):(M=Pt(l)?Ur:ft.current,M=Ni(o,M));var le=l.getDerivedStateFromProps;(J=typeof le=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(E!==te||Y!==M)&&Td(o,w,c,M),fr=!1,Y=o.memoizedState,w.state=Y,_l(o,c,w,d);var pe=o.memoizedState;E!==te||Y!==pe||Et.current||fr?(typeof le=="function"&&(Fu(o,l,le,c),pe=o.memoizedState),(q=fr||Pd(o,l,q,c,Y,pe,M)||!1)?(J||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,pe,M),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,pe,M)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||E===r.memoizedProps&&Y===r.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&Y===r.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=pe),w.props=c,w.state=pe,w.context=M,c=q):(typeof w.componentDidUpdate!="function"||E===r.memoizedProps&&Y===r.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||E===r.memoizedProps&&Y===r.memoizedState||(o.flags|=1024),c=!1)}return Vu(r,o,l,c,y,d)}function Vu(r,o,l,c,d,y){Fd(r,o);var w=(o.flags&128)!==0;if(!c&&!w)return d&&Bh(o,l,!1),$n(r,o,y);c=o.stateNode,dv.current=o;var E=w&&typeof l.getDerivedStateFromError!="function"?null:c.render();return o.flags|=1,r!==null&&w?(o.child=Oi(o,r.child,null,y),o.child=Oi(o,null,E,y)):vt(r,o,E,y),o.memoizedState=c.state,d&&Bh(o,l,!0),o.child}function Ud(r){var o=r.stateNode;o.pendingContext?qh(r,o.pendingContext,o.pendingContext!==o.context):o.context&&qh(r,o.context,!1),Pu(r,o.containerInfo)}function Hd(r,o,l,c,d){return Mi(),_u(d),o.flags|=256,vt(r,o,l,c),o.child}var Bu={dehydrated:null,treeContext:null,retryLane:0};function Qu(r){return{baseLanes:r,cachePool:null,transitions:null}}function qd(r,o,l){var c=o.pendingProps,d=Qe.current,y=!1,w=(o.flags&128)!==0,E;if((E=w)||(E=r!==null&&r.memoizedState===null?!1:(d&2)!==0),E?(y=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(d|=1),Fe(Qe,d&1),r===null)return xu(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(w=c.children,r=c.fallback,y?(c=o.mode,y=o.child,w={mode:"hidden",children:w},(c&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=w):y=Ul(w,c,0,null),r=Yr(r,c,l,null),y.return=o,r.return=o,y.sibling=r,o.child=y,o.child.memoizedState=Qu(l),o.memoizedState=Bu,r):Wu(o,w));if(d=r.memoizedState,d!==null&&(E=d.dehydrated,E!==null))return pv(r,o,w,c,E,d,l);if(y){y=c.fallback,w=o.mode,d=r.child,E=d.sibling;var M={mode:"hidden",children:c.children};return(w&1)===0&&o.child!==d?(c=o.child,c.childLanes=0,c.pendingProps=M,o.deletions=null):(c=vr(d,M),c.subtreeFlags=d.subtreeFlags&14680064),E!==null?y=vr(E,y):(y=Yr(y,w,l,null),y.flags|=2),y.return=o,c.return=o,c.sibling=y,o.child=c,c=y,y=o.child,w=r.child.memoizedState,w=w===null?Qu(l):{baseLanes:w.baseLanes|l,cachePool:null,transitions:w.transitions},y.memoizedState=w,y.childLanes=r.childLanes&~l,o.memoizedState=Bu,c}return y=r.child,r=y.sibling,c=vr(y,{mode:"visible",children:c.children}),(o.mode&1)===0&&(c.lanes=l),c.return=o,c.sibling=null,r!==null&&(l=o.deletions,l===null?(o.deletions=[r],o.flags|=16):l.push(r)),o.child=c,o.memoizedState=null,c}function Wu(r,o){return o=Ul({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Nl(r,o,l,c){return c!==null&&_u(c),Oi(o,r.child,null,l),r=Wu(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function pv(r,o,l,c,d,y,w){if(l)return o.flags&256?(o.flags&=-257,c=Uu(Error(i(422))),Nl(r,o,w,c)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(y=c.fallback,d=o.mode,c=Ul({mode:"visible",children:c.children},d,0,null),y=Yr(y,d,w,null),y.flags|=2,c.return=o,y.return=o,c.sibling=y,o.child=c,(o.mode&1)!==0&&Oi(o,r.child,null,w),o.child.memoizedState=Qu(w),o.memoizedState=Bu,y);if((o.mode&1)===0)return Nl(r,o,w,null);if(d.data==="$!"){if(c=d.nextSibling&&d.nextSibling.dataset,c)var E=c.dgst;return c=E,y=Error(i(419)),c=Uu(y,c,void 0),Nl(r,o,w,c)}if(E=(w&r.childLanes)!==0,Nt||E){if(c=it,c!==null){switch(w&-w){case 4:d=2;break;case 16:d=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(c.suspendedLanes|w))!==0?0:d,d!==0&&d!==y.retryLane&&(y.retryLane=d,Ln(r,d),cn(c,r,d,-1))}return uc(),c=Uu(Error(i(421))),Nl(r,o,w,c)}return d.data==="$?"?(o.flags|=128,o.child=r.child,o=Pv.bind(null,r),d._reactRetry=o,null):(r=y.treeContext,Lt=lr(d.nextSibling),It=o,qe=!0,sn=null,r!==null&&(Qt[Wt++]=Dn,Qt[Wt++]=In,Qt[Wt++]=Hr,Dn=r.id,In=r.overflow,Hr=o),o=Wu(o,c.children),o.flags|=4096,o)}function Vd(r,o,l){r.lanes|=o;var c=r.alternate;c!==null&&(c.lanes|=o),bu(r.return,o,l)}function Ku(r,o,l,c,d){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:d}:(y.isBackwards=o,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=l,y.tailMode=d)}function Bd(r,o,l){var c=o.pendingProps,d=c.revealOrder,y=c.tail;if(vt(r,o,c.children,l),c=Qe.current,(c&2)!==0)c=c&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Vd(r,l,o);else if(r.tag===19)Vd(r,l,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}c&=1}if(Fe(Qe,c),(o.mode&1)===0)o.memoizedState=null;else switch(d){case"forwards":for(l=o.child,d=null;l!==null;)r=l.alternate,r!==null&&wl(r)===null&&(d=l),l=l.sibling;l=d,l===null?(d=o.child,o.child=null):(d=l.sibling,l.sibling=null),Ku(o,!1,d,l,y);break;case"backwards":for(l=null,d=o.child,o.child=null;d!==null;){if(r=d.alternate,r!==null&&wl(r)===null){o.child=d;break}r=d.sibling,d.sibling=l,l=d,d=r}Ku(o,!0,l,null,y);break;case"together":Ku(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Tl(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function $n(r,o,l){if(r!==null&&(o.dependencies=r.dependencies),Wr|=o.lanes,(l&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(i(153));if(o.child!==null){for(r=o.child,l=vr(r,r.pendingProps),o.child=l,l.return=o;r.sibling!==null;)r=r.sibling,l=l.sibling=vr(r,r.pendingProps),l.return=o;l.sibling=null}return o.child}function gv(r,o,l){switch(o.tag){case 3:Ud(o),Mi();break;case 5:od(o);break;case 1:Pt(o.type)&&fl(o);break;case 4:Pu(o,o.stateNode.containerInfo);break;case 10:var c=o.type._context,d=o.memoizedProps.value;Fe(yl,c._currentValue),c._currentValue=d;break;case 13:if(c=o.memoizedState,c!==null)return c.dehydrated!==null?(Fe(Qe,Qe.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?qd(r,o,l):(Fe(Qe,Qe.current&1),r=$n(r,o,l),r!==null?r.sibling:null);Fe(Qe,Qe.current&1);break;case 19:if(c=(l&o.childLanes)!==0,(r.flags&128)!==0){if(c)return Bd(r,o,l);o.flags|=128}if(d=o.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Fe(Qe,Qe.current),c)break;return null;case 22:case 23:return o.lanes=0,Ld(r,o,l)}return $n(r,o,l)}var Qd,Gu,Wd,Kd;Qd=function(r,o){for(var l=o.child;l!==null;){if(l.tag===5||l.tag===6)r.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Gu=function(){},Wd=function(r,o,l,c){var d=r.memoizedProps;if(d!==c){r=o.stateNode,Br(wn.current);var y=null;switch(l){case"input":d=mi(r,d),c=mi(r,c),y=[];break;case"select":d=G({},d,{value:void 0}),c=G({},c,{value:void 0}),y=[];break;case"textarea":d=uo(r,d),c=uo(r,c),y=[];break;default:typeof d.onClick!="function"&&typeof c.onClick=="function"&&(r.onclick=al)}vi(l,c);var w;l=null;for(q in d)if(!c.hasOwnProperty(q)&&d.hasOwnProperty(q)&&d[q]!=null)if(q==="style"){var E=d[q];for(w in E)E.hasOwnProperty(w)&&(l||(l={}),l[w]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(a.hasOwnProperty(q)?y||(y=[]):(y=y||[]).push(q,null));for(q in c){var M=c[q];if(E=d!=null?d[q]:void 0,c.hasOwnProperty(q)&&M!==E&&(M!=null||E!=null))if(q==="style")if(E){for(w in E)!E.hasOwnProperty(w)||M&&M.hasOwnProperty(w)||(l||(l={}),l[w]="");for(w in M)M.hasOwnProperty(w)&&E[w]!==M[w]&&(l||(l={}),l[w]=M[w])}else l||(y||(y=[]),y.push(q,l)),l=M;else q==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,E=E?E.__html:void 0,M!=null&&E!==M&&(y=y||[]).push(q,M)):q==="children"?typeof M!="string"&&typeof M!="number"||(y=y||[]).push(q,""+M):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(a.hasOwnProperty(q)?(M!=null&&q==="onScroll"&&$e("scroll",r),y||E===M||(y=[])):(y=y||[]).push(q,M))}l&&(y=y||[]).push("style",l);var q=y;(o.updateQueue=q)&&(o.flags|=4)}},Kd=function(r,o,l,c){l!==c&&(o.flags|=4)};function Vo(r,o){if(!qe)switch(r.tailMode){case"hidden":o=r.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function dt(r){var o=r.alternate!==null&&r.alternate.child===r.child,l=0,c=0;if(o)for(var d=r.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=r,d=d.sibling;else for(d=r.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=r,d=d.sibling;return r.subtreeFlags|=c,r.childLanes=l,o}function mv(r,o,l){var c=o.pendingProps;switch(yu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(o),null;case 1:return Pt(o.type)&&cl(),dt(o),null;case 3:return c=o.stateNode,zi(),Ue(Et),Ue(ft),ju(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(gl(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,sn!==null&&(sc(sn),sn=null))),Gu(r,o),dt(o),null;case 5:Nu(o);var d=Br(Fo.current);if(l=o.type,r!==null&&o.stateNode!=null)Wd(r,o,l,c,d),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!c){if(o.stateNode===null)throw Error(i(166));return dt(o),null}if(r=Br(wn.current),gl(o)){c=o.stateNode,l=o.type;var y=o.memoizedProps;switch(c[_n]=o,c[Ao]=y,r=(o.mode&1)!==0,l){case"dialog":$e("cancel",c),$e("close",c);break;case"iframe":case"object":case"embed":$e("load",c);break;case"video":case"audio":for(d=0;d<Mo.length;d++)$e(Mo[d],c);break;case"source":$e("error",c);break;case"img":case"image":case"link":$e("error",c),$e("load",c);break;case"details":$e("toggle",c);break;case"input":Ht(c,y),$e("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!y.multiple},$e("invalid",c);break;case"textarea":co(c,y),$e("invalid",c)}vi(l,y),d=null;for(var w in y)if(y.hasOwnProperty(w)){var E=y[w];w==="children"?typeof E=="string"?c.textContent!==E&&(y.suppressHydrationWarning!==!0&&ll(c.textContent,E,r),d=["children",E]):typeof E=="number"&&c.textContent!==""+E&&(y.suppressHydrationWarning!==!0&&ll(c.textContent,E,r),d=["children",""+E]):a.hasOwnProperty(w)&&E!=null&&w==="onScroll"&&$e("scroll",c)}switch(l){case"input":pi(c),As(c,y,!0);break;case"textarea":pi(c),fo(c);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(c.onclick=al)}c=d,o.updateQueue=c,c!==null&&(o.flags|=4)}else{w=d.nodeType===9?d:d.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Ds(l)),r==="http://www.w3.org/1999/xhtml"?l==="script"?(r=w.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=w.createElement(l,{is:c.is}):(r=w.createElement(l),l==="select"&&(w=r,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):r=w.createElementNS(r,l),r[_n]=o,r[Ao]=c,Qd(r,o,!1,!1),o.stateNode=r;e:{switch(w=ee(l,c),l){case"dialog":$e("cancel",r),$e("close",r),d=c;break;case"iframe":case"object":case"embed":$e("load",r),d=c;break;case"video":case"audio":for(d=0;d<Mo.length;d++)$e(Mo[d],r);d=c;break;case"source":$e("error",r),d=c;break;case"img":case"image":case"link":$e("error",r),$e("load",r),d=c;break;case"details":$e("toggle",r),d=c;break;case"input":Ht(r,c),d=mi(r,c),$e("invalid",r);break;case"option":d=c;break;case"select":r._wrapperState={wasMultiple:!!c.multiple},d=G({},c,{value:void 0}),$e("invalid",r);break;case"textarea":co(r,c),d=uo(r,c),$e("invalid",r);break;default:d=c}vi(l,d),E=d;for(y in E)if(E.hasOwnProperty(y)){var M=E[y];y==="style"?Fs(r,M):y==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,M!=null&&Is(r,M)):y==="children"?typeof M=="string"?(l!=="textarea"||M!=="")&&Ir(r,M):typeof M=="number"&&Ir(r,""+M):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?M!=null&&y==="onScroll"&&$e("scroll",r):M!=null&&A(r,y,M,w))}switch(l){case"input":pi(r),As(r,c,!1);break;case"textarea":pi(r),fo(r);break;case"option":c.value!=null&&r.setAttribute("value",""+Ce(c.value));break;case"select":r.multiple=!!c.multiple,y=c.value,y!=null?Rn(r,!!c.multiple,y,!1):c.defaultValue!=null&&Rn(r,!!c.multiple,c.defaultValue,!0);break;default:typeof d.onClick=="function"&&(r.onclick=al)}switch(l){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return dt(o),null;case 6:if(r&&o.stateNode!=null)Kd(r,o,r.memoizedProps,c);else{if(typeof c!="string"&&o.stateNode===null)throw Error(i(166));if(l=Br(Fo.current),Br(wn.current),gl(o)){if(c=o.stateNode,l=o.memoizedProps,c[_n]=o,(y=c.nodeValue!==l)&&(r=It,r!==null))switch(r.tag){case 3:ll(c.nodeValue,l,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ll(c.nodeValue,l,(r.mode&1)!==0)}y&&(o.flags|=4)}else c=(l.nodeType===9?l:l.ownerDocument).createTextNode(c),c[_n]=o,o.stateNode=c}return dt(o),null;case 13:if(Ue(Qe),c=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(qe&&Lt!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Yh(),Mi(),o.flags|=98560,y=!1;else if(y=gl(o),c!==null&&c.dehydrated!==null){if(r===null){if(!y)throw Error(i(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[_n]=o}else Mi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;dt(o),y=!1}else sn!==null&&(sc(sn),sn=null),y=!0;if(!y)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(c=c!==null,c!==(r!==null&&r.memoizedState!==null)&&c&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(Qe.current&1)!==0?tt===0&&(tt=3):uc())),o.updateQueue!==null&&(o.flags|=4),dt(o),null);case 4:return zi(),Gu(r,o),r===null&&Oo(o.stateNode.containerInfo),dt(o),null;case 10:return Su(o.type._context),dt(o),null;case 17:return Pt(o.type)&&cl(),dt(o),null;case 19:if(Ue(Qe),y=o.memoizedState,y===null)return dt(o),null;if(c=(o.flags&128)!==0,w=y.rendering,w===null)if(c)Vo(y,!1);else{if(tt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(w=wl(r),w!==null){for(o.flags|=128,Vo(y,!1),c=w.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),o.subtreeFlags=0,c=l,l=o.child;l!==null;)y=l,r=c,y.flags&=14680066,w=y.alternate,w===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=w.childLanes,y.lanes=w.lanes,y.child=w.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=w.memoizedProps,y.memoizedState=w.memoizedState,y.updateQueue=w.updateQueue,y.type=w.type,r=w.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l=l.sibling;return Fe(Qe,Qe.current&1|2),o.child}r=r.sibling}y.tail!==null&&Ye()>Fi&&(o.flags|=128,c=!0,Vo(y,!1),o.lanes=4194304)}else{if(!c)if(r=wl(w),r!==null){if(o.flags|=128,c=!0,l=r.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Vo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!w.alternate&&!qe)return dt(o),null}else 2*Ye()-y.renderingStartTime>Fi&&l!==1073741824&&(o.flags|=128,c=!0,Vo(y,!1),o.lanes=4194304);y.isBackwards?(w.sibling=o.child,o.child=w):(l=y.last,l!==null?l.sibling=w:o.child=w,y.last=w)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=Ye(),o.sibling=null,l=Qe.current,Fe(Qe,c?l&1|2:l&1),o):(dt(o),null);case 22:case 23:return ac(),c=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(Ft&1073741824)!==0&&(dt(o),o.subtreeFlags&6&&(o.flags|=8192)):dt(o),null;case 24:return null;case 25:return null}throw Error(i(156,o.tag))}function yv(r,o){switch(yu(o),o.tag){case 1:return Pt(o.type)&&cl(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return zi(),Ue(Et),Ue(ft),ju(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Nu(o),null;case 13:if(Ue(Qe),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(i(340));Mi()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Ue(Qe),null;case 4:return zi(),null;case 10:return Su(o.type._context),null;case 22:case 23:return ac(),null;case 24:return null;default:return null}}var jl=!1,pt=!1,vv=typeof WeakSet=="function"?WeakSet:Set,he=null;function Ii(r,o){var l=r.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(c){Ge(r,o,c)}else l.current=null}function Xu(r,o,l){try{l()}catch(c){Ge(r,o,c)}}var Gd=!1;function xv(r,o){if(au=Xs,r=Ph(),eu(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var d=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var w=0,E=-1,M=-1,q=0,J=0,te=r,Y=null;t:for(;;){for(var le;te!==l||d!==0&&te.nodeType!==3||(E=w+d),te!==y||c!==0&&te.nodeType!==3||(M=w+c),te.nodeType===3&&(w+=te.nodeValue.length),(le=te.firstChild)!==null;)Y=te,te=le;for(;;){if(te===r)break t;if(Y===l&&++q===d&&(E=w),Y===y&&++J===c&&(M=w),(le=te.nextSibling)!==null)break;te=Y,Y=te.parentNode}te=le}l=E===-1||M===-1?null:{start:E,end:M}}else l=null}l=l||{start:0,end:0}}else l=null;for(uu={focusedElem:r,selectionRange:l},Xs=!1,he=o;he!==null;)if(o=he,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,he=r;else for(;he!==null;){o=he;try{var pe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ge=pe.memoizedProps,Ze=pe.memoizedState,U=o.stateNode,z=U.getSnapshotBeforeUpdate(o.elementType===o.type?ge:ln(o.type,ge),Ze);U.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var H=o.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ie){Ge(o,o.return,ie)}if(r=o.sibling,r!==null){r.return=o.return,he=r;break}he=o.return}return pe=Gd,Gd=!1,pe}function Bo(r,o,l){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&r)===r){var y=d.destroy;d.destroy=void 0,y!==void 0&&Xu(o,l,y)}d=d.next}while(d!==c)}}function Ml(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&r)===r){var c=l.create;l.destroy=c()}l=l.next}while(l!==o)}}function Yu(r){var o=r.ref;if(o!==null){var l=r.stateNode;switch(r.tag){case 5:r=l;break;default:r=l}typeof o=="function"?o(r):o.current=r}}function Xd(r){var o=r.alternate;o!==null&&(r.alternate=null,Xd(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[_n],delete o[Ao],delete o[du],delete o[tv],delete o[nv])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Yd(r){return r.tag===5||r.tag===3||r.tag===4}function Zd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Yd(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Zu(r,o,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(r,o):l.insertBefore(r,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(r,l)):(o=l,o.appendChild(r)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=al));else if(c!==4&&(r=r.child,r!==null))for(Zu(r,o,l),r=r.sibling;r!==null;)Zu(r,o,l),r=r.sibling}function Ju(r,o,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,o?l.insertBefore(r,o):l.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Ju(r,o,l),r=r.sibling;r!==null;)Ju(r,o,l),r=r.sibling}var lt=null,an=!1;function dr(r,o,l){for(l=l.child;l!==null;)Jd(r,o,l),l=l.sibling}function Jd(r,o,l){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(Vs,l)}catch{}switch(l.tag){case 5:pt||Ii(l,o);case 6:var c=lt,d=an;lt=null,dr(r,o,l),lt=c,an=d,lt!==null&&(an?(r=lt,l=l.stateNode,r.nodeType===8?r.parentNode.removeChild(l):r.removeChild(l)):lt.removeChild(l.stateNode));break;case 18:lt!==null&&(an?(r=lt,l=l.stateNode,r.nodeType===8?hu(r.parentNode,l):r.nodeType===1&&hu(r,l),So(r)):hu(lt,l.stateNode));break;case 4:c=lt,d=an,lt=l.stateNode.containerInfo,an=!0,dr(r,o,l),lt=c,an=d;break;case 0:case 11:case 14:case 15:if(!pt&&(c=l.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var y=d,w=y.destroy;y=y.tag,w!==void 0&&((y&2)!==0||(y&4)!==0)&&Xu(l,o,w),d=d.next}while(d!==c)}dr(r,o,l);break;case 1:if(!pt&&(Ii(l,o),c=l.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=l.memoizedProps,c.state=l.memoizedState,c.componentWillUnmount()}catch(E){Ge(l,o,E)}dr(r,o,l);break;case 21:dr(r,o,l);break;case 22:l.mode&1?(pt=(c=pt)||l.memoizedState!==null,dr(r,o,l),pt=c):dr(r,o,l);break;default:dr(r,o,l)}}function ep(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var l=r.stateNode;l===null&&(l=r.stateNode=new vv),o.forEach(function(c){var d=Nv.bind(null,r,c);l.has(c)||(l.add(c),c.then(d,d))})}}function un(r,o){var l=o.deletions;if(l!==null)for(var c=0;c<l.length;c++){var d=l[c];try{var y=r,w=o,E=w;e:for(;E!==null;){switch(E.tag){case 5:lt=E.stateNode,an=!1;break e;case 3:lt=E.stateNode.containerInfo,an=!0;break e;case 4:lt=E.stateNode.containerInfo,an=!0;break e}E=E.return}if(lt===null)throw Error(i(160));Jd(y,w,d),lt=null,an=!1;var M=d.alternate;M!==null&&(M.return=null),d.return=null}catch(q){Ge(d,o,q)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)tp(o,r),o=o.sibling}function tp(r,o){var l=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(un(o,r),Sn(r),c&4){try{Bo(3,r,r.return),Ml(3,r)}catch(ge){Ge(r,r.return,ge)}try{Bo(5,r,r.return)}catch(ge){Ge(r,r.return,ge)}}break;case 1:un(o,r),Sn(r),c&512&&l!==null&&Ii(l,l.return);break;case 5:if(un(o,r),Sn(r),c&512&&l!==null&&Ii(l,l.return),r.flags&32){var d=r.stateNode;try{Ir(d,"")}catch(ge){Ge(r,r.return,ge)}}if(c&4&&(d=r.stateNode,d!=null)){var y=r.memoizedProps,w=l!==null?l.memoizedProps:y,E=r.type,M=r.updateQueue;if(r.updateQueue=null,M!==null)try{E==="input"&&y.type==="radio"&&y.name!=null&&Rs(d,y),ee(E,w);var q=ee(E,y);for(w=0;w<M.length;w+=2){var J=M[w],te=M[w+1];J==="style"?Fs(d,te):J==="dangerouslySetInnerHTML"?Is(d,te):J==="children"?Ir(d,te):A(d,J,te,q)}switch(E){case"input":zr(d,y);break;case"textarea":zs(d,y);break;case"select":var Y=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!y.multiple;var le=y.value;le!=null?Rn(d,!!y.multiple,le,!1):Y!==!!y.multiple&&(y.defaultValue!=null?Rn(d,!!y.multiple,y.defaultValue,!0):Rn(d,!!y.multiple,y.multiple?[]:"",!1))}d[Ao]=y}catch(ge){Ge(r,r.return,ge)}}break;case 6:if(un(o,r),Sn(r),c&4){if(r.stateNode===null)throw Error(i(162));d=r.stateNode,y=r.memoizedProps;try{d.nodeValue=y}catch(ge){Ge(r,r.return,ge)}}break;case 3:if(un(o,r),Sn(r),c&4&&l!==null&&l.memoizedState.isDehydrated)try{So(o.containerInfo)}catch(ge){Ge(r,r.return,ge)}break;case 4:un(o,r),Sn(r);break;case 13:un(o,r),Sn(r),d=r.child,d.flags&8192&&(y=d.memoizedState!==null,d.stateNode.isHidden=y,!y||d.alternate!==null&&d.alternate.memoizedState!==null||(nc=Ye())),c&4&&ep(r);break;case 22:if(J=l!==null&&l.memoizedState!==null,r.mode&1?(pt=(q=pt)||J,un(o,r),pt=q):un(o,r),Sn(r),c&8192){if(q=r.memoizedState!==null,(r.stateNode.isHidden=q)&&!J&&(r.mode&1)!==0)for(he=r,J=r.child;J!==null;){for(te=he=J;he!==null;){switch(Y=he,le=Y.child,Y.tag){case 0:case 11:case 14:case 15:Bo(4,Y,Y.return);break;case 1:Ii(Y,Y.return);var pe=Y.stateNode;if(typeof pe.componentWillUnmount=="function"){c=Y,l=Y.return;try{o=c,pe.props=o.memoizedProps,pe.state=o.memoizedState,pe.componentWillUnmount()}catch(ge){Ge(c,l,ge)}}break;case 5:Ii(Y,Y.return);break;case 22:if(Y.memoizedState!==null){ip(te);continue}}le!==null?(le.return=Y,he=le):ip(te)}J=J.sibling}e:for(J=null,te=r;;){if(te.tag===5){if(J===null){J=te;try{d=te.stateNode,q?(y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(E=te.stateNode,M=te.memoizedProps.style,w=M!=null&&M.hasOwnProperty("display")?M.display:null,E.style.display=Ls("display",w))}catch(ge){Ge(r,r.return,ge)}}}else if(te.tag===6){if(J===null)try{te.stateNode.nodeValue=q?"":te.memoizedProps}catch(ge){Ge(r,r.return,ge)}}else if((te.tag!==22&&te.tag!==23||te.memoizedState===null||te===r)&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===r)break e;for(;te.sibling===null;){if(te.return===null||te.return===r)break e;J===te&&(J=null),te=te.return}J===te&&(J=null),te.sibling.return=te.return,te=te.sibling}}break;case 19:un(o,r),Sn(r),c&4&&ep(r);break;case 21:break;default:un(o,r),Sn(r)}}function Sn(r){var o=r.flags;if(o&2){try{e:{for(var l=r.return;l!==null;){if(Yd(l)){var c=l;break e}l=l.return}throw Error(i(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(Ir(d,""),c.flags&=-33);var y=Zd(r);Ju(r,y,d);break;case 3:case 4:var w=c.stateNode.containerInfo,E=Zd(r);Zu(r,E,w);break;default:throw Error(i(161))}}catch(M){Ge(r,r.return,M)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function _v(r,o,l){he=r,np(r)}function np(r,o,l){for(var c=(r.mode&1)!==0;he!==null;){var d=he,y=d.child;if(d.tag===22&&c){var w=d.memoizedState!==null||jl;if(!w){var E=d.alternate,M=E!==null&&E.memoizedState!==null||pt;E=jl;var q=pt;if(jl=w,(pt=M)&&!q)for(he=d;he!==null;)w=he,M=w.child,w.tag===22&&w.memoizedState!==null?op(d):M!==null?(M.return=w,he=M):op(d);for(;y!==null;)he=y,np(y),y=y.sibling;he=d,jl=E,pt=q}rp(r)}else(d.subtreeFlags&8772)!==0&&y!==null?(y.return=d,he=y):rp(r)}}function rp(r){for(;he!==null;){var o=he;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:pt||Ml(5,o);break;case 1:var c=o.stateNode;if(o.flags&4&&!pt)if(l===null)c.componentDidMount();else{var d=o.elementType===o.type?l.memoizedProps:ln(o.type,l.memoizedProps);c.componentDidUpdate(d,l.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var y=o.updateQueue;y!==null&&id(o,y,c);break;case 3:var w=o.updateQueue;if(w!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}id(o,w,l)}break;case 5:var E=o.stateNode;if(l===null&&o.flags&4){l=E;var M=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":M.autoFocus&&l.focus();break;case"img":M.src&&(l.src=M.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var q=o.alternate;if(q!==null){var J=q.memoizedState;if(J!==null){var te=J.dehydrated;te!==null&&So(te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}pt||o.flags&512&&Yu(o)}catch(Y){Ge(o,o.return,Y)}}if(o===r){he=null;break}if(l=o.sibling,l!==null){l.return=o.return,he=l;break}he=o.return}}function ip(r){for(;he!==null;){var o=he;if(o===r){he=null;break}var l=o.sibling;if(l!==null){l.return=o.return,he=l;break}he=o.return}}function op(r){for(;he!==null;){var o=he;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{Ml(4,o)}catch(M){Ge(o,l,M)}break;case 1:var c=o.stateNode;if(typeof c.componentDidMount=="function"){var d=o.return;try{c.componentDidMount()}catch(M){Ge(o,d,M)}}var y=o.return;try{Yu(o)}catch(M){Ge(o,y,M)}break;case 5:var w=o.return;try{Yu(o)}catch(M){Ge(o,w,M)}}}catch(M){Ge(o,o.return,M)}if(o===r){he=null;break}var E=o.sibling;if(E!==null){E.return=o.return,he=E;break}he=o.return}}var wv=Math.ceil,Ol=N.ReactCurrentDispatcher,ec=N.ReactCurrentOwner,Xt=N.ReactCurrentBatchConfig,Me=0,it=null,Je=null,at=0,Ft=0,Li=ar(0),tt=0,Qo=null,Wr=0,Rl=0,tc=0,Wo=null,Tt=null,nc=0,Fi=1/0,Un=null,Al=!1,rc=null,pr=null,zl=!1,gr=null,Dl=0,Ko=0,ic=null,Il=-1,Ll=0;function xt(){return(Me&6)!==0?Ye():Il!==-1?Il:Il=Ye()}function mr(r){return(r.mode&1)===0?1:(Me&2)!==0&&at!==0?at&-at:iv.transition!==null?(Ll===0&&(Ll=Zf()),Ll):(r=ze,r!==0||(r=window.event,r=r===void 0?16:lh(r.type)),r)}function cn(r,o,l,c){if(50<Ko)throw Ko=0,ic=null,Error(i(185));vo(r,l,c),((Me&2)===0||r!==it)&&(r===it&&((Me&2)===0&&(Rl|=l),tt===4&&yr(r,at)),jt(r,c),l===1&&Me===0&&(o.mode&1)===0&&(Fi=Ye()+500,hl&&cr()))}function jt(r,o){var l=r.callbackNode;iy(r,o);var c=Ws(r,r===it?at:0);if(c===0)l!==null&&Gf(l),r.callbackNode=null,r.callbackPriority=0;else if(o=c&-c,r.callbackPriority!==o){if(l!=null&&Gf(l),o===1)r.tag===0?rv(lp.bind(null,r)):Qh(lp.bind(null,r)),Jy(function(){(Me&6)===0&&cr()}),l=null;else{switch(Jf(c)){case 1:l=Ia;break;case 4:l=Xf;break;case 16:l=qs;break;case 536870912:l=Yf;break;default:l=qs}l=gp(l,sp.bind(null,r))}r.callbackPriority=o,r.callbackNode=l}}function sp(r,o){if(Il=-1,Ll=0,(Me&6)!==0)throw Error(i(327));var l=r.callbackNode;if($i()&&r.callbackNode!==l)return null;var c=Ws(r,r===it?at:0);if(c===0)return null;if((c&30)!==0||(c&r.expiredLanes)!==0||o)o=Fl(r,c);else{o=c;var d=Me;Me|=2;var y=up();(it!==r||at!==o)&&(Un=null,Fi=Ye()+500,Gr(r,o));do try{bv();break}catch(E){ap(r,E)}while(!0);ku(),Ol.current=y,Me=d,Je!==null?o=0:(it=null,at=0,o=tt)}if(o!==0){if(o===2&&(d=La(r),d!==0&&(c=d,o=oc(r,d))),o===1)throw l=Qo,Gr(r,0),yr(r,c),jt(r,Ye()),l;if(o===6)yr(r,c);else{if(d=r.current.alternate,(c&30)===0&&!kv(d)&&(o=Fl(r,c),o===2&&(y=La(r),y!==0&&(c=y,o=oc(r,y))),o===1))throw l=Qo,Gr(r,0),yr(r,c),jt(r,Ye()),l;switch(r.finishedWork=d,r.finishedLanes=c,o){case 0:case 1:throw Error(i(345));case 2:Xr(r,Tt,Un);break;case 3:if(yr(r,c),(c&130023424)===c&&(o=nc+500-Ye(),10<o)){if(Ws(r,0)!==0)break;if(d=r.suspendedLanes,(d&c)!==c){xt(),r.pingedLanes|=r.suspendedLanes&d;break}r.timeoutHandle=fu(Xr.bind(null,r,Tt,Un),o);break}Xr(r,Tt,Un);break;case 4:if(yr(r,c),(c&4194240)===c)break;for(o=r.eventTimes,d=-1;0<c;){var w=31-rn(c);y=1<<w,w=o[w],w>d&&(d=w),c&=~y}if(c=d,c=Ye()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*wv(c/1960))-c,10<c){r.timeoutHandle=fu(Xr.bind(null,r,Tt,Un),c);break}Xr(r,Tt,Un);break;case 5:Xr(r,Tt,Un);break;default:throw Error(i(329))}}}return jt(r,Ye()),r.callbackNode===l?sp.bind(null,r):null}function oc(r,o){var l=Wo;return r.current.memoizedState.isDehydrated&&(Gr(r,o).flags|=256),r=Fl(r,o),r!==2&&(o=Tt,Tt=l,o!==null&&sc(o)),r}function sc(r){Tt===null?Tt=r:Tt.push.apply(Tt,r)}function kv(r){for(var o=r;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var c=0;c<l.length;c++){var d=l[c],y=d.getSnapshot;d=d.value;try{if(!on(y(),d))return!1}catch{return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function yr(r,o){for(o&=~tc,o&=~Rl,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var l=31-rn(o),c=1<<l;r[l]=-1,o&=~c}}function lp(r){if((Me&6)!==0)throw Error(i(327));$i();var o=Ws(r,0);if((o&1)===0)return jt(r,Ye()),null;var l=Fl(r,o);if(r.tag!==0&&l===2){var c=La(r);c!==0&&(o=c,l=oc(r,c))}if(l===1)throw l=Qo,Gr(r,0),yr(r,o),jt(r,Ye()),l;if(l===6)throw Error(i(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Xr(r,Tt,Un),jt(r,Ye()),null}function lc(r,o){var l=Me;Me|=1;try{return r(o)}finally{Me=l,Me===0&&(Fi=Ye()+500,hl&&cr())}}function Kr(r){gr!==null&&gr.tag===0&&(Me&6)===0&&$i();var o=Me;Me|=1;var l=Xt.transition,c=ze;try{if(Xt.transition=null,ze=1,r)return r()}finally{ze=c,Xt.transition=l,Me=o,(Me&6)===0&&cr()}}function ac(){Ft=Li.current,Ue(Li)}function Gr(r,o){r.finishedWork=null,r.finishedLanes=0;var l=r.timeoutHandle;if(l!==-1&&(r.timeoutHandle=-1,Zy(l)),Je!==null)for(l=Je.return;l!==null;){var c=l;switch(yu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&cl();break;case 3:zi(),Ue(Et),Ue(ft),ju();break;case 5:Nu(c);break;case 4:zi();break;case 13:Ue(Qe);break;case 19:Ue(Qe);break;case 10:Su(c.type._context);break;case 22:case 23:ac()}l=l.return}if(it=r,Je=r=vr(r.current,null),at=Ft=o,tt=0,Qo=null,tc=Rl=Wr=0,Tt=Wo=null,Vr!==null){for(o=0;o<Vr.length;o++)if(l=Vr[o],c=l.interleaved,c!==null){l.interleaved=null;var d=c.next,y=l.pending;if(y!==null){var w=y.next;y.next=d,c.next=w}l.pending=c}Vr=null}return r}function ap(r,o){do{var l=Je;try{if(ku(),kl.current=El,Sl){for(var c=We.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}Sl=!1}if(Qr=0,rt=et=We=null,$o=!1,Uo=0,ec.current=null,l===null||l.return===null){tt=1,Qo=o,Je=null;break}e:{var y=r,w=l.return,E=l,M=o;if(o=at,E.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){var q=M,J=E,te=J.tag;if((J.mode&1)===0&&(te===0||te===11||te===15)){var Y=J.alternate;Y?(J.updateQueue=Y.updateQueue,J.memoizedState=Y.memoizedState,J.lanes=Y.lanes):(J.updateQueue=null,J.memoizedState=null)}var le=Rd(w);if(le!==null){le.flags&=-257,Ad(le,w,E,y,o),le.mode&1&&Od(y,q,o),o=le,M=q;var pe=o.updateQueue;if(pe===null){var ge=new Set;ge.add(M),o.updateQueue=ge}else pe.add(M);break e}else{if((o&1)===0){Od(y,q,o),uc();break e}M=Error(i(426))}}else if(qe&&E.mode&1){var Ze=Rd(w);if(Ze!==null){(Ze.flags&65536)===0&&(Ze.flags|=256),Ad(Ze,w,E,y,o),_u(Di(M,E));break e}}y=M=Di(M,E),tt!==4&&(tt=2),Wo===null?Wo=[y]:Wo.push(y),y=w;do{switch(y.tag){case 3:y.flags|=65536,o&=-o,y.lanes|=o;var U=jd(y,M,o);rd(y,U);break e;case 1:E=M;var z=y.type,H=y.stateNode;if((y.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(pr===null||!pr.has(H)))){y.flags|=65536,o&=-o,y.lanes|=o;var ie=Md(y,E,o);rd(y,ie);break e}}y=y.return}while(y!==null)}fp(l)}catch(me){o=me,Je===l&&l!==null&&(Je=l=l.return);continue}break}while(!0)}function up(){var r=Ol.current;return Ol.current=El,r===null?El:r}function uc(){(tt===0||tt===3||tt===2)&&(tt=4),it===null||(Wr&268435455)===0&&(Rl&268435455)===0||yr(it,at)}function Fl(r,o){var l=Me;Me|=2;var c=up();(it!==r||at!==o)&&(Un=null,Gr(r,o));do try{Sv();break}catch(d){ap(r,d)}while(!0);if(ku(),Me=l,Ol.current=c,Je!==null)throw Error(i(261));return it=null,at=0,tt}function Sv(){for(;Je!==null;)cp(Je)}function bv(){for(;Je!==null&&!G0();)cp(Je)}function cp(r){var o=pp(r.alternate,r,Ft);r.memoizedProps=r.pendingProps,o===null?fp(r):Je=o,ec.current=null}function fp(r){var o=r;do{var l=o.alternate;if(r=o.return,(o.flags&32768)===0){if(l=mv(l,o,Ft),l!==null){Je=l;return}}else{if(l=yv(l,o),l!==null){l.flags&=32767,Je=l;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{tt=6,Je=null;return}}if(o=o.sibling,o!==null){Je=o;return}Je=o=r}while(o!==null);tt===0&&(tt=5)}function Xr(r,o,l){var c=ze,d=Xt.transition;try{Xt.transition=null,ze=1,Cv(r,o,l,c)}finally{Xt.transition=d,ze=c}return null}function Cv(r,o,l,c){do $i();while(gr!==null);if((Me&6)!==0)throw Error(i(327));l=r.finishedWork;var d=r.finishedLanes;if(l===null)return null;if(r.finishedWork=null,r.finishedLanes=0,l===r.current)throw Error(i(177));r.callbackNode=null,r.callbackPriority=0;var y=l.lanes|l.childLanes;if(oy(r,y),r===it&&(Je=it=null,at=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||zl||(zl=!0,gp(qs,function(){return $i(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=Xt.transition,Xt.transition=null;var w=ze;ze=1;var E=Me;Me|=4,ec.current=null,xv(r,l),tp(l,r),By(uu),Xs=!!au,uu=au=null,r.current=l,_v(l),X0(),Me=E,ze=w,Xt.transition=y}else r.current=l;if(zl&&(zl=!1,gr=r,Dl=d),y=r.pendingLanes,y===0&&(pr=null),J0(l.stateNode),jt(r,Ye()),o!==null)for(c=r.onRecoverableError,l=0;l<o.length;l++)d=o[l],c(d.value,{componentStack:d.stack,digest:d.digest});if(Al)throw Al=!1,r=rc,rc=null,r;return(Dl&1)!==0&&r.tag!==0&&$i(),y=r.pendingLanes,(y&1)!==0?r===ic?Ko++:(Ko=0,ic=r):Ko=0,cr(),null}function $i(){if(gr!==null){var r=Jf(Dl),o=Xt.transition,l=ze;try{if(Xt.transition=null,ze=16>r?16:r,gr===null)var c=!1;else{if(r=gr,gr=null,Dl=0,(Me&6)!==0)throw Error(i(331));var d=Me;for(Me|=4,he=r.current;he!==null;){var y=he,w=y.child;if((he.flags&16)!==0){var E=y.deletions;if(E!==null){for(var M=0;M<E.length;M++){var q=E[M];for(he=q;he!==null;){var J=he;switch(J.tag){case 0:case 11:case 15:Bo(8,J,y)}var te=J.child;if(te!==null)te.return=J,he=te;else for(;he!==null;){J=he;var Y=J.sibling,le=J.return;if(Xd(J),J===q){he=null;break}if(Y!==null){Y.return=le,he=Y;break}he=le}}}var pe=y.alternate;if(pe!==null){var ge=pe.child;if(ge!==null){pe.child=null;do{var Ze=ge.sibling;ge.sibling=null,ge=Ze}while(ge!==null)}}he=y}}if((y.subtreeFlags&2064)!==0&&w!==null)w.return=y,he=w;else e:for(;he!==null;){if(y=he,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Bo(9,y,y.return)}var U=y.sibling;if(U!==null){U.return=y.return,he=U;break e}he=y.return}}var z=r.current;for(he=z;he!==null;){w=he;var H=w.child;if((w.subtreeFlags&2064)!==0&&H!==null)H.return=w,he=H;else e:for(w=z;he!==null;){if(E=he,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Ml(9,E)}}catch(me){Ge(E,E.return,me)}if(E===w){he=null;break e}var ie=E.sibling;if(ie!==null){ie.return=E.return,he=ie;break e}he=E.return}}if(Me=d,cr(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(Vs,r)}catch{}c=!0}return c}finally{ze=l,Xt.transition=o}}return!1}function hp(r,o,l){o=Di(l,o),o=jd(r,o,1),r=hr(r,o,1),o=xt(),r!==null&&(vo(r,1,o),jt(r,o))}function Ge(r,o,l){if(r.tag===3)hp(r,r,l);else for(;o!==null;){if(o.tag===3){hp(o,r,l);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(pr===null||!pr.has(c))){r=Di(l,r),r=Md(o,r,1),o=hr(o,r,1),r=xt(),o!==null&&(vo(o,1,r),jt(o,r));break}}o=o.return}}function Ev(r,o,l){var c=r.pingCache;c!==null&&c.delete(o),o=xt(),r.pingedLanes|=r.suspendedLanes&l,it===r&&(at&l)===l&&(tt===4||tt===3&&(at&130023424)===at&&500>Ye()-nc?Gr(r,0):tc|=l),jt(r,o)}function dp(r,o){o===0&&((r.mode&1)===0?o=1:(o=Qs,Qs<<=1,(Qs&130023424)===0&&(Qs=4194304)));var l=xt();r=Ln(r,o),r!==null&&(vo(r,o,l),jt(r,l))}function Pv(r){var o=r.memoizedState,l=0;o!==null&&(l=o.retryLane),dp(r,l)}function Nv(r,o){var l=0;switch(r.tag){case 13:var c=r.stateNode,d=r.memoizedState;d!==null&&(l=d.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(i(314))}c!==null&&c.delete(o),dp(r,l)}var pp;pp=function(r,o,l){if(r!==null)if(r.memoizedProps!==o.pendingProps||Et.current)Nt=!0;else{if((r.lanes&l)===0&&(o.flags&128)===0)return Nt=!1,gv(r,o,l);Nt=(r.flags&131072)!==0}else Nt=!1,qe&&(o.flags&1048576)!==0&&Wh(o,pl,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;Tl(r,o),r=o.pendingProps;var d=Ni(o,ft.current);Ai(o,l),d=Ru(null,o,c,r,d,l);var y=Au();return o.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Pt(c)?(y=!0,fl(o)):y=!1,o.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Eu(o),d.updater=Pl,o.stateNode=d,d._reactInternals=o,$u(o,c,r,l),o=Vu(null,o,c,!0,y,l)):(o.tag=0,qe&&y&&mu(o),vt(null,o,d,l),o=o.child),o;case 16:c=o.elementType;e:{switch(Tl(r,o),r=o.pendingProps,d=c._init,c=d(c._payload),o.type=c,d=o.tag=jv(c),r=ln(c,r),d){case 0:o=qu(null,o,c,r,l);break e;case 1:o=$d(null,o,c,r,l);break e;case 11:o=zd(null,o,c,r,l);break e;case 14:o=Dd(null,o,c,ln(c.type,r),l);break e}throw Error(i(306,c,""))}return o;case 0:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:ln(c,d),qu(r,o,c,d,l);case 1:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:ln(c,d),$d(r,o,c,d,l);case 3:e:{if(Ud(o),r===null)throw Error(i(387));c=o.pendingProps,y=o.memoizedState,d=y.element,nd(r,o),_l(o,c,null,l);var w=o.memoizedState;if(c=w.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=y,o.memoizedState=y,o.flags&256){d=Di(Error(i(423)),o),o=Hd(r,o,c,l,d);break e}else if(c!==d){d=Di(Error(i(424)),o),o=Hd(r,o,c,l,d);break e}else for(Lt=lr(o.stateNode.containerInfo.firstChild),It=o,qe=!0,sn=null,l=ed(o,null,c,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Mi(),c===d){o=$n(r,o,l);break e}vt(r,o,c,l)}o=o.child}return o;case 5:return od(o),r===null&&xu(o),c=o.type,d=o.pendingProps,y=r!==null?r.memoizedProps:null,w=d.children,cu(c,d)?w=null:y!==null&&cu(c,y)&&(o.flags|=32),Fd(r,o),vt(r,o,w,l),o.child;case 6:return r===null&&xu(o),null;case 13:return qd(r,o,l);case 4:return Pu(o,o.stateNode.containerInfo),c=o.pendingProps,r===null?o.child=Oi(o,null,c,l):vt(r,o,c,l),o.child;case 11:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:ln(c,d),zd(r,o,c,d,l);case 7:return vt(r,o,o.pendingProps,l),o.child;case 8:return vt(r,o,o.pendingProps.children,l),o.child;case 12:return vt(r,o,o.pendingProps.children,l),o.child;case 10:e:{if(c=o.type._context,d=o.pendingProps,y=o.memoizedProps,w=d.value,Fe(yl,c._currentValue),c._currentValue=w,y!==null)if(on(y.value,w)){if(y.children===d.children&&!Et.current){o=$n(r,o,l);break e}}else for(y=o.child,y!==null&&(y.return=o);y!==null;){var E=y.dependencies;if(E!==null){w=y.child;for(var M=E.firstContext;M!==null;){if(M.context===c){if(y.tag===1){M=Fn(-1,l&-l),M.tag=2;var q=y.updateQueue;if(q!==null){q=q.shared;var J=q.pending;J===null?M.next=M:(M.next=J.next,J.next=M),q.pending=M}}y.lanes|=l,M=y.alternate,M!==null&&(M.lanes|=l),bu(y.return,l,o),E.lanes|=l;break}M=M.next}}else if(y.tag===10)w=y.type===o.type?null:y.child;else if(y.tag===18){if(w=y.return,w===null)throw Error(i(341));w.lanes|=l,E=w.alternate,E!==null&&(E.lanes|=l),bu(w,l,o),w=y.sibling}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===o){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}vt(r,o,d.children,l),o=o.child}return o;case 9:return d=o.type,c=o.pendingProps.children,Ai(o,l),d=Kt(d),c=c(d),o.flags|=1,vt(r,o,c,l),o.child;case 14:return c=o.type,d=ln(c,o.pendingProps),d=ln(c.type,d),Dd(r,o,c,d,l);case 15:return Id(r,o,o.type,o.pendingProps,l);case 17:return c=o.type,d=o.pendingProps,d=o.elementType===c?d:ln(c,d),Tl(r,o),o.tag=1,Pt(c)?(r=!0,fl(o)):r=!1,Ai(o,l),Nd(o,c,d),$u(o,c,d,l),Vu(null,o,c,!0,r,l);case 19:return Bd(r,o,l);case 22:return Ld(r,o,l)}throw Error(i(156,o.tag))};function gp(r,o){return Kf(r,o)}function Tv(r,o,l,c){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(r,o,l,c){return new Tv(r,o,l,c)}function cc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jv(r){if(typeof r=="function")return cc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===se)return 11;if(r===ne)return 14}return 2}function vr(r,o){var l=r.alternate;return l===null?(l=Yt(r.tag,o,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=o,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&14680064,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,o=r.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l}function $l(r,o,l,c,d,y){var w=2;if(c=r,typeof r=="function")cc(r)&&(w=1);else if(typeof r=="string")w=5;else e:switch(r){case F:return Yr(l.children,d,y,o);case I:w=8,d|=8;break;case B:return r=Yt(12,l,o,d|2),r.elementType=B,r.lanes=y,r;case ce:return r=Yt(13,l,o,d),r.elementType=ce,r.lanes=y,r;case $:return r=Yt(19,l,o,d),r.elementType=$,r.lanes=y,r;case re:return Ul(l,d,y,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case K:w=10;break e;case X:w=9;break e;case se:w=11;break e;case ne:w=14;break e;case W:w=16,c=null;break e}throw Error(i(130,r==null?r:typeof r,""))}return o=Yt(w,l,o,d),o.elementType=r,o.type=c,o.lanes=y,o}function Yr(r,o,l,c){return r=Yt(7,r,c,o),r.lanes=l,r}function Ul(r,o,l,c){return r=Yt(22,r,c,o),r.elementType=re,r.lanes=l,r.stateNode={isHidden:!1},r}function fc(r,o,l){return r=Yt(6,r,null,o),r.lanes=l,r}function hc(r,o,l){return o=Yt(4,r.children!==null?r.children:[],r.key,o),o.lanes=l,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Mv(r,o,l,c,d){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fa(0),this.expirationTimes=Fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function dc(r,o,l,c,d,y,w,E,M){return r=new Mv(r,o,l,E,M),o===1?(o=1,y===!0&&(o|=8)):o=0,y=Yt(3,null,null,o),r.current=y,y.stateNode=r,y.memoizedState={element:c,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Eu(y),r}function Ov(r,o,l){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:c==null?null:""+c,children:r,containerInfo:o,implementation:l}}function mp(r){if(!r)return ur;r=r._reactInternals;e:{if(Fr(r)!==r||r.tag!==1)throw Error(i(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Pt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(i(171))}if(r.tag===1){var l=r.type;if(Pt(l))return Vh(r,l,o)}return o}function yp(r,o,l,c,d,y,w,E,M){return r=dc(l,c,!0,r,d,y,w,E,M),r.context=mp(null),l=r.current,c=xt(),d=mr(l),y=Fn(c,d),y.callback=o??null,hr(l,y,d),r.current.lanes=d,vo(r,d,c),jt(r,c),r}function Hl(r,o,l,c){var d=o.current,y=xt(),w=mr(d);return l=mp(l),o.context===null?o.context=l:o.pendingContext=l,o=Fn(y,w),o.payload={element:r},c=c===void 0?null:c,c!==null&&(o.callback=c),r=hr(d,o,w),r!==null&&(cn(r,d,w,y),xl(r,d,w)),w}function ql(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function vp(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<o?l:o}}function pc(r,o){vp(r,o),(r=r.alternate)&&vp(r,o)}function Rv(){return null}var xp=typeof reportError=="function"?reportError:function(r){console.error(r)};function gc(r){this._internalRoot=r}Vl.prototype.render=gc.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(i(409));Hl(r,o,null,null)},Vl.prototype.unmount=gc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Kr(function(){Hl(null,r,null,null)}),o[An]=null}};function Vl(r){this._internalRoot=r}Vl.prototype.unstable_scheduleHydration=function(r){if(r){var o=nh();r={blockedOn:null,target:r,priority:o};for(var l=0;l<ir.length&&o!==0&&o<ir[l].priority;l++);ir.splice(l,0,r),l===0&&oh(r)}};function mc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Bl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function _p(){}function Av(r,o,l,c,d){if(d){if(typeof c=="function"){var y=c;c=function(){var q=ql(w);y.call(q)}}var w=yp(o,c,r,0,null,!1,!1,"",_p);return r._reactRootContainer=w,r[An]=w.current,Oo(r.nodeType===8?r.parentNode:r),Kr(),w}for(;d=r.lastChild;)r.removeChild(d);if(typeof c=="function"){var E=c;c=function(){var q=ql(M);E.call(q)}}var M=dc(r,0,!1,null,null,!1,!1,"",_p);return r._reactRootContainer=M,r[An]=M.current,Oo(r.nodeType===8?r.parentNode:r),Kr(function(){Hl(o,M,l,c)}),M}function Ql(r,o,l,c,d){var y=l._reactRootContainer;if(y){var w=y;if(typeof d=="function"){var E=d;d=function(){var M=ql(w);E.call(M)}}Hl(o,w,r,d)}else w=Av(l,o,r,d,c);return ql(w)}eh=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var l=yo(o.pendingLanes);l!==0&&($a(o,l|1),jt(o,Ye()),(Me&6)===0&&(Fi=Ye()+500,cr()))}break;case 13:Kr(function(){var c=Ln(r,1);if(c!==null){var d=xt();cn(c,r,1,d)}}),pc(r,1)}},Ua=function(r){if(r.tag===13){var o=Ln(r,134217728);if(o!==null){var l=xt();cn(o,r,134217728,l)}pc(r,134217728)}},th=function(r){if(r.tag===13){var o=mr(r),l=Ln(r,o);if(l!==null){var c=xt();cn(l,r,o,c)}pc(r,o)}},nh=function(){return ze},rh=function(r,o){var l=ze;try{return ze=r,o()}finally{ze=l}},Ke=function(r,o,l){switch(o){case"input":if(zr(r,l),o=l.name,l.type==="radio"&&o!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var c=l[o];if(c!==r&&c.form===r.form){var d=ul(c);if(!d)throw Error(i(90));Os(c),zr(c,d)}}}break;case"textarea":zs(r,l);break;case"select":o=l.value,o!=null&&Rn(r,!!l.multiple,o,!1)}},Bt=lc,Hf=Kr;var zv={usingClientEntryPoint:!1,Events:[zo,Ei,ul,ct,Ct,lc]},Go={findFiberByHostInstance:$r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Dv={bundleType:Go.bundleType,version:Go.version,rendererPackageName:Go.rendererPackageName,rendererConfig:Go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Qf(r),r===null?null:r.stateNode},findFiberByHostInstance:Go.findFiberByHostInstance||Rv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{Vs=Wl.inject(Dv),xn=Wl}catch{}}return Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zv,Mt.createPortal=function(r,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mc(o))throw Error(i(200));return Ov(r,o,null,l)},Mt.createRoot=function(r,o){if(!mc(r))throw Error(i(299));var l=!1,c="",d=xp;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onRecoverableError!==void 0&&(d=o.onRecoverableError)),o=dc(r,1,!1,null,null,l,!1,c,d),r[An]=o.current,Oo(r.nodeType===8?r.parentNode:r),new gc(o)},Mt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=Qf(o),r=r===null?null:r.stateNode,r},Mt.flushSync=function(r){return Kr(r)},Mt.hydrate=function(r,o,l){if(!Bl(o))throw Error(i(200));return Ql(null,r,o,!0,l)},Mt.hydrateRoot=function(r,o,l){if(!mc(r))throw Error(i(405));var c=l!=null&&l.hydratedSources||null,d=!1,y="",w=xp;if(l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),o=yp(o,null,r,1,l??null,d,!1,y,w),r[An]=o.current,Oo(r),c)for(r=0;r<c.length;r++)l=c[r],d=l._getVersion,d=d(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,d]:o.mutableSourceEagerHydrationData.push(l,d);return new Vl(o)},Mt.render=function(r,o,l){if(!Bl(o))throw Error(i(200));return Ql(null,r,o,!1,l)},Mt.unmountComponentAtNode=function(r){if(!Bl(r))throw Error(i(40));return r._reactRootContainer?(Kr(function(){Ql(null,null,r,!1,function(){r._reactRootContainer=null,r[An]=null})}),!0):!1},Mt.unstable_batchedUpdates=lc,Mt.unstable_renderSubtreeIntoContainer=function(r,o,l,c){if(!Bl(l))throw Error(i(200));if(r==null||r._reactInternals===void 0)throw Error(i(38));return Ql(r,o,l,!1,c)},Mt.version="18.3.1-next-f1338f8080-20240426",Mt}var Lp;function S1(){if(Lp)return wc.exports;Lp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),wc.exports=k1(),wc.exports}var Fp;function b1(){if(Fp)return Xl;Fp=1;var e=S1();return Xl.createRoot=e.createRoot,Xl.hydrateRoot=e.hydrateRoot,Xl}var C1=b1();/**
41
+ * @license lucide-react v0.408.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const E1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mm=(...e)=>e.filter((n,i,s)=>!!n&&s.indexOf(n)===i).join(" ");/**
46
+ * @license lucide-react v0.408.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var P1={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"};/**
51
+ * @license lucide-react v0.408.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const N1=ae.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:u,iconNode:f,...h},p)=>ae.createElement("svg",{ref:p,...P1,width:n,height:n,stroke:e,strokeWidth:s?Number(i)*24/Number(n):i,className:Mm("lucide",a),...h},[...f.map(([m,v])=>ae.createElement(m,v)),...Array.isArray(u)?u:[u]]));/**
56
+ * @license lucide-react v0.408.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const yn=(e,n)=>{const i=ae.forwardRef(({className:s,...a},u)=>ae.createElement(N1,{ref:u,iconNode:n,className:Mm(`lucide-${E1(e)}`,s),...a}));return i.displayName=`${e}`,i};/**
61
+ * @license lucide-react v0.408.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const T1=yn("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
66
+ * @license lucide-react v0.408.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const j1=yn("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
71
+ * @license lucide-react v0.408.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const $p=yn("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
76
+ * @license lucide-react v0.408.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const bc=yn("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
81
+ * @license lucide-react v0.408.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const M1=yn("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
86
+ * @license lucide-react v0.408.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const O1=yn("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
91
+ * @license lucide-react v0.408.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Yo=yn("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
96
+ * @license lucide-react v0.408.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const R1=yn("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
101
+ * @license lucide-react v0.408.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Cc=yn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
106
+ * @license lucide-react v0.408.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const A1=yn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
111
+ * @license lucide-react v0.408.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Up=yn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function Hp({children:e,variant:n="default",className:i=""}){const s="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",a={default:"bg-primary text-primary-foreground",outline:"border border-input bg-background text-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive text-destructive-foreground"};return P.jsx("span",{className:`${s} ${a[n]} ${i}`,children:e})}function st({children:e,variant:n="default",size:i="default",className:s="",onClick:a,disabled:u=!1,title:f,type:h="button"}){const p="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",m={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},v={default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"};return P.jsx("button",{type:h,className:`${p} ${m[n]} ${v[i]} ${s}`,onClick:a,disabled:u,title:f,children:e})}function z1({children:e,className:n=""}){return P.jsx("div",{className:`rounded-lg border bg-card text-card-foreground shadow-sm ${n}`,children:e})}function D1({children:e,className:n=""}){return P.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${n}`,children:e})}function I1({children:e,className:n=""}){return P.jsx("div",{className:`flex items-center p-6 pt-0 ${n}`,children:e})}function qp({type:e="text",placeholder:n,value:i,onChange:s,className:a="",disabled:u=!1,ref:f,multiple:h,accept:p,...m}){return P.jsx("input",{type:e,placeholder:n,value:i,onChange:s,disabled:u,multiple:h,accept:p,ref:f,className:`flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${a}`,...m})}function L1(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n===0){if(Object(i)!==i)return;p=!1}else for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function F1(e,n,i){return n=W1(n),n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Vp(e,n){return H1(e)||L1(e,n)||Om(e,n)||B1()}function $1(e){return U1(e)||q1(e)||Om(e)||V1()}function U1(e){if(Array.isArray(e))return Zc(e)}function H1(e){if(Array.isArray(e))return e}function q1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Om(e,n){if(e){if(typeof e=="string")return Zc(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Zc(e,n)}}function Zc(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=new Array(n);i<n;i++)s[i]=e[i];return s}function V1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
116
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
117
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q1(e,n){if(typeof e!="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function W1(e){var n=Q1(e,"string");return typeof n=="symbol"?n:String(n)}var K1=function(n,i){var s=new Set(i);return Object.assign.apply(Object,[{}].concat($1(Object.entries(n).filter(function(a){var u=Vp(a,1),f=u[0];return!s.has(f)}).map(function(a){var u=Vp(a,2),f=u[0],h=u[1];return F1({},f,h)}))))};function Jc(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function G1(e){if(Array.isArray(e))return e}function X1(e){if(Array.isArray(e))return Jc(e)}function Y1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z1(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n!==0)for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function J1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ex(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
119
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tx(e,n){return G1(e)||Z1(e,n)||Rm(e,n)||J1()}function Bp(e){return X1(e)||Y1(e)||Rm(e)||ex()}function Rm(e,n){if(e){if(typeof e=="string")return Jc(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Jc(e,n):void 0}}function nx(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.wrapperElementType,s=i===void 0?"div":i,a=n.nodeMapper,u=a===void 0?function(v){return v}:a,f=n.methodNames,h=f===void 0?[]:f,p=n.initPropNames,m=p===void 0?[]:p;return ae.forwardRef(function(v,g){var x=ae.useRef(),_=ae.useMemo(function(){var S=Object.fromEntries(m.filter(function(k){return v.hasOwnProperty(k)}).map(function(k){return[k,v[k]]}));return e(S)},[]);Qp(function(){_(u(x.current))},ae.useLayoutEffect),Qp(function(){return _._destructor instanceof Function?_._destructor:void 0});var b=ae.useCallback(function(S){for(var k=arguments.length,R=new Array(k>1?k-1:0),A=1;A<k;A++)R[A-1]=arguments[A];return _[S]instanceof Function?_[S].apply(_,R):void 0},[_]),C=ae.useRef({});return Object.keys(K1(v,[].concat(Bp(h),Bp(m)))).filter(function(S){return C.current[S]!==v[S]}).forEach(function(S){return b(S,v[S])}),C.current=v,ae.useImperativeHandle(g,function(){return Object.fromEntries(h.map(function(S){return[S,function(){for(var k=arguments.length,R=new Array(k),A=0;A<k;A++)R[A]=arguments[A];return b.apply(void 0,[S].concat(R))}]}))},[b]),Nm.createElement(s,{ref:x})})}function Qp(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae.useEffect,i=ae.useRef(),s=ae.useRef(!1),a=ae.useRef(!1),u=ae.useState(0),f=tx(u,2);f[0];var h=f[1];s.current&&(a.current=!0),n(function(){return s.current||(i.current=e(),s.current=!0),h(function(p){return p+1}),function(){a.current&&i.current&&i.current()}},[])}var ef="http://www.w3.org/1999/xhtml";const Wp={svg:"http://www.w3.org/2000/svg",xhtml:ef,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ea(e){var n=e+="",i=n.indexOf(":");return i>=0&&(n=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),Wp.hasOwnProperty(n)?{space:Wp[n],local:e}:e}function rx(e){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===ef&&n.documentElement.namespaceURI===ef?n.createElement(e):n.createElementNS(i,e)}}function ix(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Am(e){var n=Ea(e);return(n.local?ix:rx)(n)}function ox(){}function bf(e){return e==null?ox:function(){return this.querySelector(e)}}function sx(e){typeof e!="function"&&(e=bf(e));for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a)for(var u=n[a],f=u.length,h=s[a]=new Array(f),p,m,v=0;v<f;++v)(p=u[v])&&(m=e.call(p,p.__data__,v,u))&&("__data__"in p&&(m.__data__=p.__data__),h[v]=m);return new Ut(s,this._parents)}function lx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ax(){return[]}function zm(e){return e==null?ax:function(){return this.querySelectorAll(e)}}function ux(e){return function(){return lx(e.apply(this,arguments))}}function cx(e){typeof e=="function"?e=ux(e):e=zm(e);for(var n=this._groups,i=n.length,s=[],a=[],u=0;u<i;++u)for(var f=n[u],h=f.length,p,m=0;m<h;++m)(p=f[m])&&(s.push(e.call(p,p.__data__,m,f)),a.push(p));return new Ut(s,a)}function Dm(e){return function(){return this.matches(e)}}function Im(e){return function(n){return n.matches(e)}}var fx=Array.prototype.find;function hx(e){return function(){return fx.call(this.children,e)}}function dx(){return this.firstElementChild}function px(e){return this.select(e==null?dx:hx(typeof e=="function"?e:Im(e)))}var gx=Array.prototype.filter;function mx(){return Array.from(this.children)}function yx(e){return function(){return gx.call(this.children,e)}}function vx(e){return this.selectAll(e==null?mx:yx(typeof e=="function"?e:Im(e)))}function xx(e){typeof e!="function"&&(e=Dm(e));for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a)for(var u=n[a],f=u.length,h=s[a]=[],p,m=0;m<f;++m)(p=u[m])&&e.call(p,p.__data__,m,u)&&h.push(p);return new Ut(s,this._parents)}function Lm(e){return new Array(e.length)}function _x(){return new Ut(this._enter||this._groups.map(Lm),this._parents)}function da(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}da.prototype={constructor:da,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wx(e){return function(){return e}}function kx(e,n,i,s,a,u){for(var f=0,h,p=n.length,m=u.length;f<m;++f)(h=n[f])?(h.__data__=u[f],s[f]=h):i[f]=new da(e,u[f]);for(;f<p;++f)(h=n[f])&&(a[f]=h)}function Sx(e,n,i,s,a,u,f){var h,p,m=new Map,v=n.length,g=u.length,x=new Array(v),_;for(h=0;h<v;++h)(p=n[h])&&(x[h]=_=f.call(p,p.__data__,h,n)+"",m.has(_)?a[h]=p:m.set(_,p));for(h=0;h<g;++h)_=f.call(e,u[h],h,u)+"",(p=m.get(_))?(s[h]=p,p.__data__=u[h],m.delete(_)):i[h]=new da(e,u[h]);for(h=0;h<v;++h)(p=n[h])&&m.get(x[h])===p&&(a[h]=p)}function bx(e){return e.__data__}function Cx(e,n){if(!arguments.length)return Array.from(this,bx);var i=n?Sx:kx,s=this._parents,a=this._groups;typeof e!="function"&&(e=wx(e));for(var u=a.length,f=new Array(u),h=new Array(u),p=new Array(u),m=0;m<u;++m){var v=s[m],g=a[m],x=g.length,_=Ex(e.call(v,v&&v.__data__,m,s)),b=_.length,C=h[m]=new Array(b),S=f[m]=new Array(b),k=p[m]=new Array(x);i(v,g,C,S,k,_,n);for(var R=0,A=0,N,T;R<b;++R)if(N=C[R]){for(R>=A&&(A=R+1);!(T=S[A])&&++A<b;);N._next=T||null}}return f=new Ut(f,s),f._enter=h,f._exit=p,f}function Ex(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Px(){return new Ut(this._exit||this._groups.map(Lm),this._parents)}function Nx(e,n,i){var s=this.enter(),a=this,u=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),n!=null&&(a=n(a),a&&(a=a.selection())),i==null?u.remove():i(u),s&&a?s.merge(a).order():a}function Tx(e){for(var n=e.selection?e.selection():e,i=this._groups,s=n._groups,a=i.length,u=s.length,f=Math.min(a,u),h=new Array(a),p=0;p<f;++p)for(var m=i[p],v=s[p],g=m.length,x=h[p]=new Array(g),_,b=0;b<g;++b)(_=m[b]||v[b])&&(x[b]=_);for(;p<a;++p)h[p]=i[p];return new Ut(h,this._parents)}function jx(){for(var e=this._groups,n=-1,i=e.length;++n<i;)for(var s=e[n],a=s.length-1,u=s[a],f;--a>=0;)(f=s[a])&&(u&&f.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(f,u),u=f);return this}function Mx(e){e||(e=Ox);function n(g,x){return g&&x?e(g.__data__,x.__data__):!g-!x}for(var i=this._groups,s=i.length,a=new Array(s),u=0;u<s;++u){for(var f=i[u],h=f.length,p=a[u]=new Array(h),m,v=0;v<h;++v)(m=f[v])&&(p[v]=m);p.sort(n)}return new Ut(a,this._parents).order()}function Ox(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Rx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ax(){return Array.from(this)}function zx(){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var s=e[n],a=0,u=s.length;a<u;++a){var f=s[a];if(f)return f}return null}function Dx(){let e=0;for(const n of this)++e;return e}function Ix(){return!this.node()}function Lx(e){for(var n=this._groups,i=0,s=n.length;i<s;++i)for(var a=n[i],u=0,f=a.length,h;u<f;++u)(h=a[u])&&e.call(h,h.__data__,u,a);return this}function Fx(e){return function(){this.removeAttribute(e)}}function $x(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ux(e,n){return function(){this.setAttribute(e,n)}}function Hx(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function qx(e,n){return function(){var i=n.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function Vx(e,n){return function(){var i=n.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function Bx(e,n){var i=Ea(e);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((n==null?i.local?$x:Fx:typeof n=="function"?i.local?Vx:qx:i.local?Hx:Ux)(i,n))}function Fm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Qx(e){return function(){this.style.removeProperty(e)}}function Wx(e,n,i){return function(){this.style.setProperty(e,n,i)}}function Kx(e,n,i){return function(){var s=n.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,i)}}function Gx(e,n,i){return arguments.length>1?this.each((n==null?Qx:typeof n=="function"?Kx:Wx)(e,n,i??"")):io(this.node(),e)}function io(e,n){return e.style.getPropertyValue(n)||Fm(e).getComputedStyle(e,null).getPropertyValue(n)}function Xx(e){return function(){delete this[e]}}function Yx(e,n){return function(){this[e]=n}}function Zx(e,n){return function(){var i=n.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function Jx(e,n){return arguments.length>1?this.each((n==null?Xx:typeof n=="function"?Zx:Yx)(e,n)):this.node()[e]}function $m(e){return e.trim().split(/^|\s+/)}function Cf(e){return e.classList||new Um(e)}function Um(e){this._node=e,this._names=$m(e.getAttribute("class")||"")}Um.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Hm(e,n){for(var i=Cf(e),s=-1,a=n.length;++s<a;)i.add(n[s])}function qm(e,n){for(var i=Cf(e),s=-1,a=n.length;++s<a;)i.remove(n[s])}function e_(e){return function(){Hm(this,e)}}function t_(e){return function(){qm(this,e)}}function n_(e,n){return function(){(n.apply(this,arguments)?Hm:qm)(this,e)}}function r_(e,n){var i=$m(e+"");if(arguments.length<2){for(var s=Cf(this.node()),a=-1,u=i.length;++a<u;)if(!s.contains(i[a]))return!1;return!0}return this.each((typeof n=="function"?n_:n?e_:t_)(i,n))}function i_(){this.textContent=""}function o_(e){return function(){this.textContent=e}}function s_(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function l_(e){return arguments.length?this.each(e==null?i_:(typeof e=="function"?s_:o_)(e)):this.node().textContent}function a_(){this.innerHTML=""}function u_(e){return function(){this.innerHTML=e}}function c_(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function f_(e){return arguments.length?this.each(e==null?a_:(typeof e=="function"?c_:u_)(e)):this.node().innerHTML}function h_(){this.nextSibling&&this.parentNode.appendChild(this)}function d_(){return this.each(h_)}function p_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function g_(){return this.each(p_)}function m_(e){var n=typeof e=="function"?e:Am(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function y_(){return null}function v_(e,n){var i=typeof e=="function"?e:Am(e),s=n==null?y_:typeof n=="function"?n:bf(n);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function x_(){var e=this.parentNode;e&&e.removeChild(this)}function __(){return this.each(x_)}function w_(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function k_(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function S_(e){return this.select(e?k_:w_)}function b_(e){return arguments.length?this.property("__data__",e):this.node().__data__}function C_(e){return function(n){e.call(this,n,this.__data__)}}function E_(e){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");return s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),{type:n,name:i}})}function P_(e){return function(){var n=this.__on;if(n){for(var i=0,s=-1,a=n.length,u;i<a;++i)u=n[i],(!e.type||u.type===e.type)&&u.name===e.name?this.removeEventListener(u.type,u.listener,u.options):n[++s]=u;++s?n.length=s:delete this.__on}}}function N_(e,n,i){return function(){var s=this.__on,a,u=C_(n);if(s){for(var f=0,h=s.length;f<h;++f)if((a=s[f]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=i),a.value=n;return}}this.addEventListener(e.type,u,i),a={type:e.type,name:e.name,value:n,listener:u,options:i},s?s.push(a):this.__on=[a]}}function T_(e,n,i){var s=E_(e+""),a,u=s.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,m=h.length,v;p<m;++p)for(a=0,v=h[p];a<u;++a)if((f=s[a]).type===v.type&&f.name===v.name)return v.value}return}for(h=n?N_:P_,a=0;a<u;++a)this.each(h(s[a],n,i));return this}function Vm(e,n,i){var s=Fm(e),a=s.CustomEvent;typeof a=="function"?a=new a(n,i):(a=s.document.createEvent("Event"),i?(a.initEvent(n,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(n,!1,!1)),e.dispatchEvent(a)}function j_(e,n){return function(){return Vm(this,e,n)}}function M_(e,n){return function(){return Vm(this,e,n.apply(this,arguments))}}function O_(e,n){return this.each((typeof n=="function"?M_:j_)(e,n))}function*R_(){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var s=e[n],a=0,u=s.length,f;a<u;++a)(f=s[a])&&(yield f)}var Bm=[null];function Ut(e,n){this._groups=e,this._parents=n}function Ps(){return new Ut([[document.documentElement]],Bm)}function A_(){return this}Ut.prototype=Ps.prototype={constructor:Ut,select:sx,selectAll:cx,selectChild:px,selectChildren:vx,filter:xx,data:Cx,enter:_x,exit:Px,join:Nx,merge:Tx,selection:A_,order:jx,sort:Mx,call:Rx,nodes:Ax,node:zx,size:Dx,empty:Ix,each:Lx,attr:Bx,style:Gx,property:Jx,classed:r_,text:l_,html:f_,raise:d_,lower:g_,append:m_,insert:v_,remove:__,clone:S_,datum:b_,on:T_,dispatch:O_,[Symbol.iterator]:R_};function tn(e){return typeof e=="string"?new Ut([[document.querySelector(e)]],[document.documentElement]):new Ut([[e]],Bm)}function z_(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Cn(e,n){if(e=z_(e),n===void 0&&(n=e.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(n.getScreenCTM().inverse()),[s.x,s.y]}if(n.getBoundingClientRect){var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}}return[e.pageX,e.pageY]}var D_={value:()=>{}};function Ns(){for(var e=0,n=arguments.length,i={},s;e<n;++e){if(!(s=arguments[e]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new sa(i)}function sa(e){this._=e}function I_(e,n){return e.trim().split(/^|\s+/).map(function(i){var s="",a=i.indexOf(".");if(a>=0&&(s=i.slice(a+1),i=i.slice(0,a)),i&&!n.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}sa.prototype=Ns.prototype={constructor:sa,on:function(e,n){var i=this._,s=I_(e+"",i),a,u=-1,f=s.length;if(arguments.length<2){for(;++u<f;)if((a=(e=s[u]).type)&&(a=L_(i[a],e.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++u<f;)if(a=(e=s[u]).type)i[a]=Kp(i[a],e.name,n);else if(n==null)for(a in i)i[a]=Kp(i[a],e.name,null);return this},copy:function(){var e={},n=this._;for(var i in n)e[i]=n[i].slice();return new sa(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var i=new Array(a),s=0,a,u;s<a;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(u=this._[e],s=0,a=u.length;s<a;++s)u[s].value.apply(n,i)},apply:function(e,n,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],a=0,u=s.length;a<u;++a)s[a].value.apply(n,i)}};function L_(e,n){for(var i=0,s=e.length,a;i<s;++i)if((a=e[i]).name===n)return a.value}function Kp(e,n,i){for(var s=0,a=e.length;s<a;++s)if(e[s].name===n){e[s]=D_,e=e.slice(0,s).concat(e.slice(s+1));break}return i!=null&&e.push({name:n,value:i}),e}const F_={passive:!1},gs={capture:!0,passive:!1};function Ec(e){e.stopImmediatePropagation()}function qi(e){e.preventDefault(),e.stopImmediatePropagation()}function Qm(e){var n=e.document.documentElement,i=tn(e).on("dragstart.drag",qi,gs);"onselectstart"in n?i.on("selectstart.drag",qi,gs):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Wm(e,n){var i=e.document.documentElement,s=tn(e).on("dragstart.drag",null);n&&(s.on("click.drag",qi,gs),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Yl=e=>()=>e;function tf(e,{sourceEvent:n,subject:i,target:s,identifier:a,active:u,x:f,y:h,dx:p,dy:m,dispatch:v}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:v}})}tf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $_(e){return!e.ctrlKey&&!e.button}function U_(){return this.parentNode}function H_(e,n){return n??{x:e.x,y:e.y}}function q_(){return navigator.maxTouchPoints||"ontouchstart"in this}function V_(){var e=$_,n=U_,i=H_,s=q_,a={},u=Ns("start","drag","end"),f=0,h,p,m,v,g=0;function x(N){N.on("mousedown.drag",_).filter(s).on("touchstart.drag",S).on("touchmove.drag",k,F_).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(N,T){if(!(v||!e.call(this,N,T))){var D=A(this,n.call(this,N,T),N,T,"mouse");D&&(tn(N.view).on("mousemove.drag",b,gs).on("mouseup.drag",C,gs),Qm(N.view),Ec(N),m=!1,h=N.clientX,p=N.clientY,D("start",N))}}function b(N){if(qi(N),!m){var T=N.clientX-h,D=N.clientY-p;m=T*T+D*D>g}a.mouse("drag",N)}function C(N){tn(N.view).on("mousemove.drag mouseup.drag",null),Wm(N.view,m),qi(N),a.mouse("end",N)}function S(N,T){if(e.call(this,N,T)){var D=N.changedTouches,F=n.call(this,N,T),I=D.length,B,K;for(B=0;B<I;++B)(K=A(this,F,N,T,D[B].identifier,D[B]))&&(Ec(N),K("start",N,D[B]))}}function k(N){var T=N.changedTouches,D=T.length,F,I;for(F=0;F<D;++F)(I=a[T[F].identifier])&&(qi(N),I("drag",N,T[F]))}function R(N){var T=N.changedTouches,D=T.length,F,I;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),F=0;F<D;++F)(I=a[T[F].identifier])&&(Ec(N),I("end",N,T[F]))}function A(N,T,D,F,I,B){var K=u.copy(),X=Cn(B||D,T),se,ce,$;if(($=i.call(N,new tf("beforestart",{sourceEvent:D,target:x,identifier:I,active:f,x:X[0],y:X[1],dx:0,dy:0,dispatch:K}),F))!=null)return se=$.x-X[0]||0,ce=$.y-X[1]||0,function ne(W,re,Q){var Z=X,G;switch(W){case"start":a[I]=ne,G=f++;break;case"end":delete a[I],--f;case"drag":X=Cn(Q||re,T),G=f;break}K.call(W,N,new tf(W,{sourceEvent:re,subject:$,target:x,identifier:I,active:G,x:X[0]+se,y:X[1]+ce,dx:X[0]-Z[0],dy:X[1]-Z[1],dispatch:K}),F)}}return x.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Yl(!!N),x):e},x.container=function(N){return arguments.length?(n=typeof N=="function"?N:Yl(N),x):n},x.subject=function(N){return arguments.length?(i=typeof N=="function"?N:Yl(N),x):i},x.touchable=function(N){return arguments.length?(s=typeof N=="function"?N:Yl(!!N),x):s},x.on=function(){var N=u.on.apply(u,arguments);return N===u?x:N},x.clickDistance=function(N){return arguments.length?(g=(N=+N)*N,x):Math.sqrt(g)},x}function Ef(e,n,i){e.prototype=n.prototype=i,i.constructor=e}function Km(e,n){var i=Object.create(e.prototype);for(var s in n)i[s]=n[s];return i}function Ts(){}var ms=.7,pa=1/ms,Vi="\\s*([+-]?\\d+)\\s*",ys="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B_=/^#([0-9a-f]{3,8})$/,Q_=new RegExp(`^rgb\\(${Vi},${Vi},${Vi}\\)$`),W_=new RegExp(`^rgb\\(${jn},${jn},${jn}\\)$`),K_=new RegExp(`^rgba\\(${Vi},${Vi},${Vi},${ys}\\)$`),G_=new RegExp(`^rgba\\(${jn},${jn},${jn},${ys}\\)$`),X_=new RegExp(`^hsl\\(${ys},${jn},${jn}\\)$`),Y_=new RegExp(`^hsla\\(${ys},${jn},${jn},${ys}\\)$`),Gp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ef(Ts,vs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xp,formatHex:Xp,formatHex8:Z_,formatHsl:J_,formatRgb:Yp,toString:Yp});function Xp(){return this.rgb().formatHex()}function Z_(){return this.rgb().formatHex8()}function J_(){return Gm(this).formatHsl()}function Yp(){return this.rgb().formatRgb()}function vs(e){var n,i;return e=(e+"").trim().toLowerCase(),(n=B_.exec(e))?(i=n[1].length,n=parseInt(n[1],16),i===6?Zp(n):i===3?new At(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):i===8?Zl(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):i===4?Zl(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Q_.exec(e))?new At(n[1],n[2],n[3],1):(n=W_.exec(e))?new At(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=K_.exec(e))?Zl(n[1],n[2],n[3],n[4]):(n=G_.exec(e))?Zl(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=X_.exec(e))?tg(n[1],n[2]/100,n[3]/100,1):(n=Y_.exec(e))?tg(n[1],n[2]/100,n[3]/100,n[4]):Gp.hasOwnProperty(e)?Zp(Gp[e]):e==="transparent"?new At(NaN,NaN,NaN,0):null}function Zp(e){return new At(e>>16&255,e>>8&255,e&255,1)}function Zl(e,n,i,s){return s<=0&&(e=n=i=NaN),new At(e,n,i,s)}function ew(e){return e instanceof Ts||(e=vs(e)),e?(e=e.rgb(),new At(e.r,e.g,e.b,e.opacity)):new At}function nf(e,n,i,s){return arguments.length===1?ew(e):new At(e,n,i,s??1)}function At(e,n,i,s){this.r=+e,this.g=+n,this.b=+i,this.opacity=+s}Ef(At,nf,Km(Ts,{brighter(e){return e=e==null?pa:Math.pow(pa,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ms:Math.pow(ms,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new At(ui(this.r),ui(this.g),ui(this.b),ga(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jp,formatHex:Jp,formatHex8:tw,formatRgb:eg,toString:eg}));function Jp(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}`}function tw(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}${ei((isNaN(this.opacity)?1:this.opacity)*255)}`}function eg(){const e=ga(this.opacity);return`${e===1?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${e===1?")":`, ${e})`}`}function ga(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ui(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ei(e){return e=ui(e),(e<16?"0":"")+e.toString(16)}function tg(e,n,i,s){return s<=0?e=n=i=NaN:i<=0||i>=1?e=n=NaN:n<=0&&(e=NaN),new gn(e,n,i,s)}function Gm(e){if(e instanceof gn)return new gn(e.h,e.s,e.l,e.opacity);if(e instanceof Ts||(e=vs(e)),!e)return new gn;if(e instanceof gn)return e;e=e.rgb();var n=e.r/255,i=e.g/255,s=e.b/255,a=Math.min(n,i,s),u=Math.max(n,i,s),f=NaN,h=u-a,p=(u+a)/2;return h?(n===u?f=(i-s)/h+(i<s)*6:i===u?f=(s-n)/h+2:f=(n-i)/h+4,h/=p<.5?u+a:2-u-a,f*=60):h=p>0&&p<1?0:f,new gn(f,h,p,e.opacity)}function nw(e,n,i,s){return arguments.length===1?Gm(e):new gn(e,n,i,s??1)}function gn(e,n,i,s){this.h=+e,this.s=+n,this.l=+i,this.opacity=+s}Ef(gn,nw,Km(Ts,{brighter(e){return e=e==null?pa:Math.pow(pa,e),new gn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ms:Math.pow(ms,e),new gn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*n,a=2*i-s;return new At(Pc(e>=240?e-240:e+120,a,s),Pc(e,a,s),Pc(e<120?e+240:e-120,a,s),this.opacity)},clamp(){return new gn(ng(this.h),Jl(this.s),Jl(this.l),ga(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ga(this.opacity);return`${e===1?"hsl(":"hsla("}${ng(this.h)}, ${Jl(this.s)*100}%, ${Jl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ng(e){return e=(e||0)%360,e<0?e+360:e}function Jl(e){return Math.max(0,Math.min(1,e||0))}function Pc(e,n,i){return(e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n)*255}const Xm=e=>()=>e;function rw(e,n){return function(i){return e+i*n}}function iw(e,n,i){return e=Math.pow(e,i),n=Math.pow(n,i)-e,i=1/i,function(s){return Math.pow(e+s*n,i)}}function ow(e){return(e=+e)==1?Ym:function(n,i){return i-n?iw(n,i,e):Xm(isNaN(n)?i:n)}}function Ym(e,n){var i=n-e;return i?rw(e,i):Xm(isNaN(e)?n:e)}const rg=function e(n){var i=ow(n);function s(a,u){var f=i((a=nf(a)).r,(u=nf(u)).r),h=i(a.g,u.g),p=i(a.b,u.b),m=Ym(a.opacity,u.opacity);return function(v){return a.r=f(v),a.g=h(v),a.b=p(v),a.opacity=m(v),a+""}}return s.gamma=e,s}(1);function Sr(e,n){return e=+e,n=+n,function(i){return e*(1-i)+n*i}}var rf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Nc=new RegExp(rf.source,"g");function sw(e){return function(){return e}}function lw(e){return function(n){return e(n)+""}}function aw(e,n){var i=rf.lastIndex=Nc.lastIndex=0,s,a,u,f=-1,h=[],p=[];for(e=e+"",n=n+"";(s=rf.exec(e))&&(a=Nc.exec(n));)(u=a.index)>i&&(u=n.slice(i,u),h[f]?h[f]+=u:h[++f]=u),(s=s[0])===(a=a[0])?h[f]?h[f]+=a:h[++f]=a:(h[++f]=null,p.push({i:f,x:Sr(s,a)})),i=Nc.lastIndex;return i<n.length&&(u=n.slice(i),h[f]?h[f]+=u:h[++f]=u),h.length<2?p[0]?lw(p[0].x):sw(n):(n=p.length,function(m){for(var v=0,g;v<n;++v)h[(g=p[v]).i]=g.x(m);return h.join("")})}var ig=180/Math.PI,of={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zm(e,n,i,s,a,u){var f,h,p;return(f=Math.sqrt(e*e+n*n))&&(e/=f,n/=f),(p=e*i+n*s)&&(i-=e*p,s-=n*p),(h=Math.sqrt(i*i+s*s))&&(i/=h,s/=h,p/=h),e*s<n*i&&(e=-e,n=-n,p=-p,f=-f),{translateX:a,translateY:u,rotate:Math.atan2(n,e)*ig,skewX:Math.atan(p)*ig,scaleX:f,scaleY:h}}var ea;function uw(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?of:Zm(n.a,n.b,n.c,n.d,n.e,n.f)}function cw(e){return e==null||(ea||(ea=document.createElementNS("http://www.w3.org/2000/svg","g")),ea.setAttribute("transform",e),!(e=ea.transform.baseVal.consolidate()))?of:(e=e.matrix,Zm(e.a,e.b,e.c,e.d,e.e,e.f))}function Jm(e,n,i,s){function a(m){return m.length?m.pop()+" ":""}function u(m,v,g,x,_,b){if(m!==g||v!==x){var C=_.push("translate(",null,n,null,i);b.push({i:C-4,x:Sr(m,g)},{i:C-2,x:Sr(v,x)})}else(g||x)&&_.push("translate("+g+n+x+i)}function f(m,v,g,x){m!==v?(m-v>180?v+=360:v-m>180&&(m+=360),x.push({i:g.push(a(g)+"rotate(",null,s)-2,x:Sr(m,v)})):v&&g.push(a(g)+"rotate("+v+s)}function h(m,v,g,x){m!==v?x.push({i:g.push(a(g)+"skewX(",null,s)-2,x:Sr(m,v)}):v&&g.push(a(g)+"skewX("+v+s)}function p(m,v,g,x,_,b){if(m!==g||v!==x){var C=_.push(a(_)+"scale(",null,",",null,")");b.push({i:C-4,x:Sr(m,g)},{i:C-2,x:Sr(v,x)})}else(g!==1||x!==1)&&_.push(a(_)+"scale("+g+","+x+")")}return function(m,v){var g=[],x=[];return m=e(m),v=e(v),u(m.translateX,m.translateY,v.translateX,v.translateY,g,x),f(m.rotate,v.rotate,g,x),h(m.skewX,v.skewX,g,x),p(m.scaleX,m.scaleY,v.scaleX,v.scaleY,g,x),m=v=null,function(_){for(var b=-1,C=x.length,S;++b<C;)g[(S=x[b]).i]=S.x(_);return g.join("")}}}var fw=Jm(uw,"px, ","px)","deg)"),hw=Jm(cw,", ",")",")"),dw=1e-12;function og(e){return((e=Math.exp(e))+1/e)/2}function pw(e){return((e=Math.exp(e))-1/e)/2}function gw(e){return((e=Math.exp(2*e))-1)/(e+1)}const mw=function e(n,i,s){function a(u,f){var h=u[0],p=u[1],m=u[2],v=f[0],g=f[1],x=f[2],_=v-h,b=g-p,C=_*_+b*b,S,k;if(C<dw)k=Math.log(x/m)/n,S=function(F){return[h+F*_,p+F*b,m*Math.exp(n*F*k)]};else{var R=Math.sqrt(C),A=(x*x-m*m+s*C)/(2*m*i*R),N=(x*x-m*m-s*C)/(2*x*i*R),T=Math.log(Math.sqrt(A*A+1)-A),D=Math.log(Math.sqrt(N*N+1)-N);k=(D-T)/n,S=function(F){var I=F*k,B=og(T),K=m/(i*R)*(B*gw(n*I+T)-pw(T));return[h+K*_,p+K*b,m*B/og(n*I+T)]}}return S.duration=k*1e3*n/Math.SQRT2,S}return a.rho=function(u){var f=Math.max(.001,+u),h=f*f,p=h*h;return e(f,h,p)},a}(Math.SQRT2,2,4);var oo=0,ls=0,Zo=0,e0=1e3,ma,as,ya=0,di=0,Pa=0,xs=typeof performance=="object"&&performance.now?performance:Date,t0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Pf(){return di||(t0(yw),di=xs.now()+Pa)}function yw(){di=0}function va(){this._call=this._time=this._next=null}va.prototype=Nf.prototype={constructor:va,restart:function(e,n,i){if(typeof e!="function")throw new TypeError("callback is not a function");i=(i==null?Pf():+i)+(n==null?0:+n),!this._next&&as!==this&&(as?as._next=this:ma=this,as=this),this._call=e,this._time=i,sf()},stop:function(){this._call&&(this._call=null,this._time=1/0,sf())}};function Nf(e,n,i){var s=new va;return s.restart(e,n,i),s}function vw(){Pf(),++oo;for(var e=ma,n;e;)(n=di-e._time)>=0&&e._call.call(void 0,n),e=e._next;--oo}function sg(){di=(ya=xs.now())+Pa,oo=ls=0;try{vw()}finally{oo=0,_w(),di=0}}function xw(){var e=xs.now(),n=e-ya;n>e0&&(Pa-=n,ya=e)}function _w(){for(var e,n=ma,i,s=1/0;n;)n._call?(s>n._time&&(s=n._time),e=n,n=n._next):(i=n._next,n._next=null,n=e?e._next=i:ma=i);as=e,sf(s)}function sf(e){if(!oo){ls&&(ls=clearTimeout(ls));var n=e-di;n>24?(e<1/0&&(ls=setTimeout(sg,e-xs.now()-Pa)),Zo&&(Zo=clearInterval(Zo))):(Zo||(ya=xs.now(),Zo=setInterval(xw,e0)),oo=1,t0(sg))}}function lg(e,n,i){var s=new va;return n=n==null?0:+n,s.restart(a=>{s.stop(),e(a+n)},n,i),s}var ww=Ns("start","end","cancel","interrupt"),kw=[],n0=0,ag=1,lf=2,la=3,ug=4,af=5,aa=6;function Na(e,n,i,s,a,u){var f=e.__transition;if(!f)e.__transition={};else if(i in f)return;Sw(e,i,{name:n,index:s,group:a,on:ww,tween:kw,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:n0})}function Tf(e,n){var i=vn(e,n);if(i.state>n0)throw new Error("too late; already scheduled");return i}function On(e,n){var i=vn(e,n);if(i.state>la)throw new Error("too late; already running");return i}function vn(e,n){var i=e.__transition;if(!i||!(i=i[n]))throw new Error("transition not found");return i}function Sw(e,n,i){var s=e.__transition,a;s[n]=i,i.timer=Nf(u,0,i.time);function u(m){i.state=ag,i.timer.restart(f,i.delay,i.time),i.delay<=m&&f(m-i.delay)}function f(m){var v,g,x,_;if(i.state!==ag)return p();for(v in s)if(_=s[v],_.name===i.name){if(_.state===la)return lg(f);_.state===ug?(_.state=aa,_.timer.stop(),_.on.call("interrupt",e,e.__data__,_.index,_.group),delete s[v]):+v<n&&(_.state=aa,_.timer.stop(),_.on.call("cancel",e,e.__data__,_.index,_.group),delete s[v])}if(lg(function(){i.state===la&&(i.state=ug,i.timer.restart(h,i.delay,i.time),h(m))}),i.state=lf,i.on.call("start",e,e.__data__,i.index,i.group),i.state===lf){for(i.state=la,a=new Array(x=i.tween.length),v=0,g=-1;v<x;++v)(_=i.tween[v].value.call(e,e.__data__,i.index,i.group))&&(a[++g]=_);a.length=g+1}}function h(m){for(var v=m<i.duration?i.ease.call(null,m/i.duration):(i.timer.restart(p),i.state=af,1),g=-1,x=a.length;++g<x;)a[g].call(e,v);i.state===af&&(i.on.call("end",e,e.__data__,i.index,i.group),p())}function p(){i.state=aa,i.timer.stop(),delete s[n];for(var m in s)return;delete e.__transition}}function ua(e,n){var i=e.__transition,s,a,u=!0,f;if(i){n=n==null?null:n+"";for(f in i){if((s=i[f]).name!==n){u=!1;continue}a=s.state>lf&&s.state<af,s.state=aa,s.timer.stop(),s.on.call(a?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete i[f]}u&&delete e.__transition}}function bw(e){return this.each(function(){ua(this,e)})}function Cw(e,n){var i,s;return function(){var a=On(this,e),u=a.tween;if(u!==i){s=i=u;for(var f=0,h=s.length;f<h;++f)if(s[f].name===n){s=s.slice(),s.splice(f,1);break}}a.tween=s}}function Ew(e,n,i){var s,a;if(typeof i!="function")throw new Error;return function(){var u=On(this,e),f=u.tween;if(f!==s){a=(s=f).slice();for(var h={name:n,value:i},p=0,m=a.length;p<m;++p)if(a[p].name===n){a[p]=h;break}p===m&&a.push(h)}u.tween=a}}function Pw(e,n){var i=this._id;if(e+="",arguments.length<2){for(var s=vn(this.node(),i).tween,a=0,u=s.length,f;a<u;++a)if((f=s[a]).name===e)return f.value;return null}return this.each((n==null?Cw:Ew)(i,e,n))}function jf(e,n,i){var s=e._id;return e.each(function(){var a=On(this,s);(a.value||(a.value={}))[n]=i.apply(this,arguments)}),function(a){return vn(a,s).value[n]}}function r0(e,n){var i;return(typeof n=="number"?Sr:n instanceof vs?rg:(i=vs(n))?(n=i,rg):aw)(e,n)}function Nw(e){return function(){this.removeAttribute(e)}}function Tw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jw(e,n,i){var s,a=i+"",u;return function(){var f=this.getAttribute(e);return f===a?null:f===s?u:u=n(s=f,i)}}function Mw(e,n,i){var s,a=i+"",u;return function(){var f=this.getAttributeNS(e.space,e.local);return f===a?null:f===s?u:u=n(s=f,i)}}function Ow(e,n,i){var s,a,u;return function(){var f,h=i(this),p;return h==null?void this.removeAttribute(e):(f=this.getAttribute(e),p=h+"",f===p?null:f===s&&p===a?u:(a=p,u=n(s=f,h)))}}function Rw(e,n,i){var s,a,u;return function(){var f,h=i(this),p;return h==null?void this.removeAttributeNS(e.space,e.local):(f=this.getAttributeNS(e.space,e.local),p=h+"",f===p?null:f===s&&p===a?u:(a=p,u=n(s=f,h)))}}function Aw(e,n){var i=Ea(e),s=i==="transform"?hw:r0;return this.attrTween(e,typeof n=="function"?(i.local?Rw:Ow)(i,s,jf(this,"attr."+e,n)):n==null?(i.local?Tw:Nw)(i):(i.local?Mw:jw)(i,s,n))}function zw(e,n){return function(i){this.setAttribute(e,n.call(this,i))}}function Dw(e,n){return function(i){this.setAttributeNS(e.space,e.local,n.call(this,i))}}function Iw(e,n){var i,s;function a(){var u=n.apply(this,arguments);return u!==s&&(i=(s=u)&&Dw(e,u)),i}return a._value=n,a}function Lw(e,n){var i,s;function a(){var u=n.apply(this,arguments);return u!==s&&(i=(s=u)&&zw(e,u)),i}return a._value=n,a}function Fw(e,n){var i="attr."+e;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;var s=Ea(e);return this.tween(i,(s.local?Iw:Lw)(s,n))}function $w(e,n){return function(){Tf(this,e).delay=+n.apply(this,arguments)}}function Uw(e,n){return n=+n,function(){Tf(this,e).delay=n}}function Hw(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?$w:Uw)(n,e)):vn(this.node(),n).delay}function qw(e,n){return function(){On(this,e).duration=+n.apply(this,arguments)}}function Vw(e,n){return n=+n,function(){On(this,e).duration=n}}function Bw(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?qw:Vw)(n,e)):vn(this.node(),n).duration}function Qw(e,n){if(typeof n!="function")throw new Error;return function(){On(this,e).ease=n}}function Ww(e){var n=this._id;return arguments.length?this.each(Qw(n,e)):vn(this.node(),n).ease}function Kw(e,n){return function(){var i=n.apply(this,arguments);if(typeof i!="function")throw new Error;On(this,e).ease=i}}function Gw(e){if(typeof e!="function")throw new Error;return this.each(Kw(this._id,e))}function Xw(e){typeof e!="function"&&(e=Dm(e));for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a)for(var u=n[a],f=u.length,h=s[a]=[],p,m=0;m<f;++m)(p=u[m])&&e.call(p,p.__data__,m,u)&&h.push(p);return new er(s,this._parents,this._name,this._id)}function Yw(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,i=e._groups,s=n.length,a=i.length,u=Math.min(s,a),f=new Array(s),h=0;h<u;++h)for(var p=n[h],m=i[h],v=p.length,g=f[h]=new Array(v),x,_=0;_<v;++_)(x=p[_]||m[_])&&(g[_]=x);for(;h<s;++h)f[h]=n[h];return new er(f,this._parents,this._name,this._id)}function Zw(e){return(e+"").trim().split(/^|\s+/).every(function(n){var i=n.indexOf(".");return i>=0&&(n=n.slice(0,i)),!n||n==="start"})}function Jw(e,n,i){var s,a,u=Zw(n)?Tf:On;return function(){var f=u(this,e),h=f.on;h!==s&&(a=(s=h).copy()).on(n,i),f.on=a}}function e2(e,n){var i=this._id;return arguments.length<2?vn(this.node(),i).on.on(e):this.each(Jw(i,e,n))}function t2(e){return function(){var n=this.parentNode;for(var i in this.__transition)if(+i!==e)return;n&&n.removeChild(this)}}function n2(){return this.on("end.remove",t2(this._id))}function r2(e){var n=this._name,i=this._id;typeof e!="function"&&(e=bf(e));for(var s=this._groups,a=s.length,u=new Array(a),f=0;f<a;++f)for(var h=s[f],p=h.length,m=u[f]=new Array(p),v,g,x=0;x<p;++x)(v=h[x])&&(g=e.call(v,v.__data__,x,h))&&("__data__"in v&&(g.__data__=v.__data__),m[x]=g,Na(m[x],n,i,x,m,vn(v,i)));return new er(u,this._parents,n,i)}function i2(e){var n=this._name,i=this._id;typeof e!="function"&&(e=zm(e));for(var s=this._groups,a=s.length,u=[],f=[],h=0;h<a;++h)for(var p=s[h],m=p.length,v,g=0;g<m;++g)if(v=p[g]){for(var x=e.call(v,v.__data__,g,p),_,b=vn(v,i),C=0,S=x.length;C<S;++C)(_=x[C])&&Na(_,n,i,C,x,b);u.push(x),f.push(v)}return new er(u,f,n,i)}var o2=Ps.prototype.constructor;function s2(){return new o2(this._groups,this._parents)}function l2(e,n){var i,s,a;return function(){var u=io(this,e),f=(this.style.removeProperty(e),io(this,e));return u===f?null:u===i&&f===s?a:a=n(i=u,s=f)}}function i0(e){return function(){this.style.removeProperty(e)}}function a2(e,n,i){var s,a=i+"",u;return function(){var f=io(this,e);return f===a?null:f===s?u:u=n(s=f,i)}}function u2(e,n,i){var s,a,u;return function(){var f=io(this,e),h=i(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(e),io(this,e))),f===p?null:f===s&&p===a?u:(a=p,u=n(s=f,h))}}function c2(e,n){var i,s,a,u="style."+n,f="end."+u,h;return function(){var p=On(this,e),m=p.on,v=p.value[u]==null?h||(h=i0(n)):void 0;(m!==i||a!==v)&&(s=(i=m).copy()).on(f,a=v),p.on=s}}function f2(e,n,i){var s=(e+="")=="transform"?fw:r0;return n==null?this.styleTween(e,l2(e,s)).on("end.style."+e,i0(e)):typeof n=="function"?this.styleTween(e,u2(e,s,jf(this,"style."+e,n))).each(c2(this._id,e)):this.styleTween(e,a2(e,s,n),i).on("end.style."+e,null)}function h2(e,n,i){return function(s){this.style.setProperty(e,n.call(this,s),i)}}function d2(e,n,i){var s,a;function u(){var f=n.apply(this,arguments);return f!==a&&(s=(a=f)&&h2(e,f,i)),s}return u._value=n,u}function p2(e,n,i){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(n==null)return this.tween(s,null);if(typeof n!="function")throw new Error;return this.tween(s,d2(e,n,i??""))}function g2(e){return function(){this.textContent=e}}function m2(e){return function(){var n=e(this);this.textContent=n??""}}function y2(e){return this.tween("text",typeof e=="function"?m2(jf(this,"text",e)):g2(e==null?"":e+""))}function v2(e){return function(n){this.textContent=e.call(this,n)}}function x2(e){var n,i;function s(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&v2(a)),n}return s._value=e,s}function _2(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,x2(e))}function w2(){for(var e=this._name,n=this._id,i=o0(),s=this._groups,a=s.length,u=0;u<a;++u)for(var f=s[u],h=f.length,p,m=0;m<h;++m)if(p=f[m]){var v=vn(p,n);Na(p,e,i,m,f,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new er(s,this._parents,e,i)}function k2(){var e,n,i=this,s=i._id,a=i.size();return new Promise(function(u,f){var h={value:f},p={value:function(){--a===0&&u()}};i.each(function(){var m=On(this,s),v=m.on;v!==e&&(n=(e=v).copy(),n._.cancel.push(h),n._.interrupt.push(h),n._.end.push(p)),m.on=n}),a===0&&u()})}var S2=0;function er(e,n,i,s){this._groups=e,this._parents=n,this._name=i,this._id=s}function o0(){return++S2}var Hn=Ps.prototype;er.prototype={constructor:er,select:r2,selectAll:i2,selectChild:Hn.selectChild,selectChildren:Hn.selectChildren,filter:Xw,merge:Yw,selection:s2,transition:w2,call:Hn.call,nodes:Hn.nodes,node:Hn.node,size:Hn.size,empty:Hn.empty,each:Hn.each,on:e2,attr:Aw,attrTween:Fw,style:f2,styleTween:p2,text:y2,textTween:_2,remove:n2,tween:Pw,delay:Hw,duration:Bw,ease:Ww,easeVarying:Gw,end:k2,[Symbol.iterator]:Hn[Symbol.iterator]};function b2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var C2={time:null,delay:0,duration:250,ease:b2};function E2(e,n){for(var i;!(i=e.__transition)||!(i=i[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return i}function P2(e){var n,i;e instanceof er?(n=e._id,e=e._name):(n=o0(),(i=C2).time=Pf(),e=e==null?null:e+"");for(var s=this._groups,a=s.length,u=0;u<a;++u)for(var f=s[u],h=f.length,p,m=0;m<h;++m)(p=f[m])&&Na(p,e,n,m,f,i||E2(p,n));return new er(s,this._parents,e,n)}Ps.prototype.interrupt=bw;Ps.prototype.transition=P2;const ta=e=>()=>e;function N2(e,{sourceEvent:n,target:i,transform:s,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:a}})}function Xn(e,n,i){this.k=e,this.x=n,this.y=i}Xn.prototype={constructor:Xn,scale:function(e){return e===1?this:new Xn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Xn(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mf=new Xn(1,0,0);bn.prototype=Xn.prototype;function bn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Mf;return e.__zoom}function Tc(e){e.stopImmediatePropagation()}function Jo(e){e.preventDefault(),e.stopImmediatePropagation()}function T2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function j2(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function cg(){return this.__zoom||Mf}function M2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function O2(){return navigator.maxTouchPoints||"ontouchstart"in this}function R2(e,n,i){var s=e.invertX(n[0][0])-i[0][0],a=e.invertX(n[1][0])-i[1][0],u=e.invertY(n[0][1])-i[0][1],f=e.invertY(n[1][1])-i[1][1];return e.translate(a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a),f>u?(u+f)/2:Math.min(0,u)||Math.max(0,f))}function A2(){var e=T2,n=j2,i=R2,s=M2,a=O2,u=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,p=mw,m=Ns("start","zoom","end"),v,g,x,_=500,b=150,C=0,S=10;function k($){$.property("__zoom",cg).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",K).filter(a).on("touchstart.zoom",X).on("touchmove.zoom",se).on("touchend.zoom touchcancel.zoom",ce).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function($,ne,W,re){var Q=$.selection?$.selection():$;Q.property("__zoom",cg),$!==Q?T($,ne,W,re):Q.interrupt().each(function(){D(this,arguments).event(re).start().zoom(null,typeof ne=="function"?ne.apply(this,arguments):ne).end()})},k.scaleBy=function($,ne,W,re){k.scaleTo($,function(){var Q=this.__zoom.k,Z=typeof ne=="function"?ne.apply(this,arguments):ne;return Q*Z},W,re)},k.scaleTo=function($,ne,W,re){k.transform($,function(){var Q=n.apply(this,arguments),Z=this.__zoom,G=W==null?N(Q):typeof W=="function"?W.apply(this,arguments):W,O=Z.invert(G),V=typeof ne=="function"?ne.apply(this,arguments):ne;return i(A(R(Z,V),G,O),Q,f)},W,re)},k.translateBy=function($,ne,W,re){k.transform($,function(){return i(this.__zoom.translate(typeof ne=="function"?ne.apply(this,arguments):ne,typeof W=="function"?W.apply(this,arguments):W),n.apply(this,arguments),f)},null,re)},k.translateTo=function($,ne,W,re,Q){k.transform($,function(){var Z=n.apply(this,arguments),G=this.__zoom,O=re==null?N(Z):typeof re=="function"?re.apply(this,arguments):re;return i(Mf.translate(O[0],O[1]).scale(G.k).translate(typeof ne=="function"?-ne.apply(this,arguments):-ne,typeof W=="function"?-W.apply(this,arguments):-W),Z,f)},re,Q)};function R($,ne){return ne=Math.max(u[0],Math.min(u[1],ne)),ne===$.k?$:new Xn(ne,$.x,$.y)}function A($,ne,W){var re=ne[0]-W[0]*$.k,Q=ne[1]-W[1]*$.k;return re===$.x&&Q===$.y?$:new Xn($.k,re,Q)}function N($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function T($,ne,W,re){$.on("start.zoom",function(){D(this,arguments).event(re).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(re).end()}).tween("zoom",function(){var Q=this,Z=arguments,G=D(Q,Z).event(re),O=n.apply(Q,Z),V=W==null?N(O):typeof W=="function"?W.apply(Q,Z):W,fe=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),de=Q.__zoom,ke=typeof ne=="function"?ne.apply(Q,Z):ne,be=p(de.invert(V).concat(fe/de.k),ke.invert(V).concat(fe/ke.k));return function(Ee){if(Ee===1)Ee=ke;else{var Ce=be(Ee),Re=fe/Ce[2];Ee=new Xn(Re,V[0]-Ce[0]*Re,V[1]-Ce[1]*Re)}G.zoom(null,Ee)}})}function D($,ne,W){return!W&&$.__zooming||new F($,ne)}function F($,ne){this.that=$,this.args=ne,this.active=0,this.sourceEvent=null,this.extent=n.apply($,ne),this.taps=0}F.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,ne){return this.mouse&&$!=="mouse"&&(this.mouse[1]=ne.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=ne.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=ne.invert(this.touch1[0])),this.that.__zoom=ne,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var ne=tn(this.that).datum();m.call($,this.that,new N2($,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:m}),ne)}};function I($,...ne){if(!e.apply(this,arguments))return;var W=D(this,ne).event($),re=this.__zoom,Q=Math.max(u[0],Math.min(u[1],re.k*Math.pow(2,s.apply(this,arguments)))),Z=Cn($);if(W.wheel)(W.mouse[0][0]!==Z[0]||W.mouse[0][1]!==Z[1])&&(W.mouse[1]=re.invert(W.mouse[0]=Z)),clearTimeout(W.wheel);else{if(re.k===Q)return;W.mouse=[Z,re.invert(Z)],ua(this),W.start()}Jo($),W.wheel=setTimeout(G,b),W.zoom("mouse",i(A(R(re,Q),W.mouse[0],W.mouse[1]),W.extent,f));function G(){W.wheel=null,W.end()}}function B($,...ne){if(x||!e.apply(this,arguments))return;var W=$.currentTarget,re=D(this,ne,!0).event($),Q=tn($.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",fe,!0),Z=Cn($,W),G=$.clientX,O=$.clientY;Qm($.view),Tc($),re.mouse=[Z,this.__zoom.invert(Z)],ua(this),re.start();function V(de){if(Jo(de),!re.moved){var ke=de.clientX-G,be=de.clientY-O;re.moved=ke*ke+be*be>C}re.event(de).zoom("mouse",i(A(re.that.__zoom,re.mouse[0]=Cn(de,W),re.mouse[1]),re.extent,f))}function fe(de){Q.on("mousemove.zoom mouseup.zoom",null),Wm(de.view,re.moved),Jo(de),re.event(de).end()}}function K($,...ne){if(e.apply(this,arguments)){var W=this.__zoom,re=Cn($.changedTouches?$.changedTouches[0]:$,this),Q=W.invert(re),Z=W.k*($.shiftKey?.5:2),G=i(A(R(W,Z),re,Q),n.apply(this,ne),f);Jo($),h>0?tn(this).transition().duration(h).call(T,G,re,$):tn(this).call(k.transform,G,re,$)}}function X($,...ne){if(e.apply(this,arguments)){var W=$.touches,re=W.length,Q=D(this,ne,$.changedTouches.length===re).event($),Z,G,O,V;for(Tc($),G=0;G<re;++G)O=W[G],V=Cn(O,this),V=[V,this.__zoom.invert(V),O.identifier],Q.touch0?!Q.touch1&&Q.touch0[2]!==V[2]&&(Q.touch1=V,Q.taps=0):(Q.touch0=V,Z=!0,Q.taps=1+!!v);v&&(v=clearTimeout(v)),Z&&(Q.taps<2&&(g=V[0],v=setTimeout(function(){v=null},_)),ua(this),Q.start())}}function se($,...ne){if(this.__zooming){var W=D(this,ne).event($),re=$.changedTouches,Q=re.length,Z,G,O,V;for(Jo($),Z=0;Z<Q;++Z)G=re[Z],O=Cn(G,this),W.touch0&&W.touch0[2]===G.identifier?W.touch0[0]=O:W.touch1&&W.touch1[2]===G.identifier&&(W.touch1[0]=O);if(G=W.that.__zoom,W.touch1){var fe=W.touch0[0],de=W.touch0[1],ke=W.touch1[0],be=W.touch1[1],Ee=(Ee=ke[0]-fe[0])*Ee+(Ee=ke[1]-fe[1])*Ee,Ce=(Ce=be[0]-de[0])*Ce+(Ce=be[1]-de[1])*Ce;G=R(G,Math.sqrt(Ee/Ce)),O=[(fe[0]+ke[0])/2,(fe[1]+ke[1])/2],V=[(de[0]+be[0])/2,(de[1]+be[1])/2]}else if(W.touch0)O=W.touch0[0],V=W.touch0[1];else return;W.zoom("touch",i(A(G,O,V),W.extent,f))}}function ce($,...ne){if(this.__zooming){var W=D(this,ne).event($),re=$.changedTouches,Q=re.length,Z,G;for(Tc($),x&&clearTimeout(x),x=setTimeout(function(){x=null},_),Z=0;Z<Q;++Z)G=re[Z],W.touch0&&W.touch0[2]===G.identifier?delete W.touch0:W.touch1&&W.touch1[2]===G.identifier&&delete W.touch1;if(W.touch1&&!W.touch0&&(W.touch0=W.touch1,delete W.touch1),W.touch0)W.touch0[1]=this.__zoom.invert(W.touch0[0]);else if(W.end(),W.taps===2&&(G=Cn(G,this),Math.hypot(g[0]-G[0],g[1]-G[1])<S)){var O=tn(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return k.wheelDelta=function($){return arguments.length?(s=typeof $=="function"?$:ta(+$),k):s},k.filter=function($){return arguments.length?(e=typeof $=="function"?$:ta(!!$),k):e},k.touchable=function($){return arguments.length?(a=typeof $=="function"?$:ta(!!$),k):a},k.extent=function($){return arguments.length?(n=typeof $=="function"?$:ta([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),k):n},k.scaleExtent=function($){return arguments.length?(u[0]=+$[0],u[1]=+$[1],k):[u[0],u[1]]},k.translateExtent=function($){return arguments.length?(f[0][0]=+$[0][0],f[1][0]=+$[1][0],f[0][1]=+$[0][1],f[1][1]=+$[1][1],k):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},k.constrain=function($){return arguments.length?(i=$,k):i},k.duration=function($){return arguments.length?(h=+$,k):h},k.interpolate=function($){return arguments.length?(p=$,k):p},k.on=function(){var $=m.on.apply(m,arguments);return $===m?k:$},k.clickDistance=function($){return arguments.length?(C=($=+$)*$,k):Math.sqrt(C)},k.tapDistance=function($){return arguments.length?(S=+$,k):S},k}class fg extends Map{constructor(n,i=I2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),n!=null)for(const[s,a]of n)this.set(s,a)}get(n){return super.get(hg(this,n))}has(n){return super.has(hg(this,n))}set(n,i){return super.set(z2(this,n),i)}delete(n){return super.delete(D2(this,n))}}function hg({_intern:e,_key:n},i){const s=n(i);return e.has(s)?e.get(s):i}function z2({_intern:e,_key:n},i){const s=n(i);return e.has(s)?e.get(s):(e.set(s,i),i)}function D2({_intern:e,_key:n},i){const s=n(i);return e.has(s)&&(i=e.get(s),e.delete(s)),i}function I2(e){return e!==null&&typeof e=="object"?e.valueOf():e}function dg(e,n){let i;if(n===void 0)for(const s of e)s!=null&&(i<s||i===void 0&&s>=s)&&(i=s);else{let s=-1;for(let a of e)(a=n(a,++s,e))!=null&&(i<a||i===void 0&&a>=a)&&(i=a)}return i}function pg(e,n){let i;if(n===void 0)for(const s of e)s!=null&&(i>s||i===void 0&&s>=s)&&(i=s);else{let s=-1;for(let a of e)(a=n(a,++s,e))!=null&&(i>a||i===void 0&&a>=a)&&(i=a)}return i}function L2(e,n){let i=0;for(let s of e)(s=+s)&&(i+=s);return i}var F2=typeof global=="object"&&global&&global.Object===Object&&global,$2=typeof self=="object"&&self&&self.Object===Object&&self,s0=F2||$2||Function("return this")(),xa=s0.Symbol,l0=Object.prototype,U2=l0.hasOwnProperty,H2=l0.toString,es=xa?xa.toStringTag:void 0;function q2(e){var n=U2.call(e,es),i=e[es];try{e[es]=void 0;var s=!0}catch{}var a=H2.call(e);return s&&(n?e[es]=i:delete e[es]),a}var V2=Object.prototype,B2=V2.toString;function Q2(e){return B2.call(e)}var W2="[object Null]",K2="[object Undefined]",gg=xa?xa.toStringTag:void 0;function G2(e){return e==null?e===void 0?K2:W2:gg&&gg in Object(e)?q2(e):Q2(e)}function X2(e){return e!=null&&typeof e=="object"}var Y2="[object Symbol]";function Z2(e){return typeof e=="symbol"||X2(e)&&G2(e)==Y2}var J2=/\s/;function ek(e){for(var n=e.length;n--&&J2.test(e.charAt(n)););return n}var tk=/^\s+/;function nk(e){return e&&e.slice(0,ek(e)+1).replace(tk,"")}function _a(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var mg=NaN,rk=/^[-+]0x[0-9a-f]+$/i,ik=/^0b[01]+$/i,ok=/^0o[0-7]+$/i,sk=parseInt;function yg(e){if(typeof e=="number")return e;if(Z2(e))return mg;if(_a(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=_a(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=nk(e);var i=ik.test(e);return i||ok.test(e)?sk(e.slice(2),i?2:8):rk.test(e)?mg:+e}var jc=function(){return s0.Date.now()},lk="Expected a function",ak=Math.max,uk=Math.min;function a0(e,n,i){var s,a,u,f,h,p,m=0,v=!1,g=!1,x=!0;if(typeof e!="function")throw new TypeError(lk);n=yg(n)||0,_a(i)&&(v=!!i.leading,g="maxWait"in i,u=g?ak(yg(i.maxWait)||0,n):u,x="trailing"in i?!!i.trailing:x);function _(D){var F=s,I=a;return s=a=void 0,m=D,f=e.apply(I,F),f}function b(D){return m=D,h=setTimeout(k,n),v?_(D):f}function C(D){var F=D-p,I=D-m,B=n-F;return g?uk(B,u-I):B}function S(D){var F=D-p,I=D-m;return p===void 0||F>=n||F<0||g&&I>=u}function k(){var D=jc();if(S(D))return R(D);h=setTimeout(k,C(D))}function R(D){return h=void 0,x&&s?_(D):(s=a=void 0,f)}function A(){h!==void 0&&clearTimeout(h),m=0,s=p=a=h=void 0}function N(){return h===void 0?f:R(jc())}function T(){var D=jc(),F=S(D);if(s=arguments,a=this,p=D,F){if(h===void 0)return b(p);if(g)return clearTimeout(h),h=setTimeout(k,n),_(p)}return h===void 0&&(h=setTimeout(k,n)),f}return T.cancel=A,T.flush=N,T}var ck="Expected a function";function fk(e,n,i){var s=!0,a=!0;if(typeof e!="function")throw new TypeError(ck);return _a(i)&&(s="leading"in i?!!i.leading:s,a="trailing"in i?!!i.trailing:a),a0(e,n,{leading:s,maxWait:n,trailing:a})}var ci=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-ci.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?ci.Bounce.In(e*2)*.5:ci.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),us=function(){return performance.now()},u0=function(){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(i){return n._tweens[i]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];for(var a=0,u=i;a<u.length;a++){var f=u[a];(n=f._group)===null||n===void 0||n.remove(f),f._group=this,this._tweens[f.getId()]=f,this._tweensAddedDuringUpdate[f.getId()]=f}},e.prototype.remove=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var s=0,a=n;s<a.length;s++){var u=a[s];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,i){n===void 0&&(n=us()),i===void 0&&(i=!0);var s=Object.keys(this._tweens);if(s.length!==0)for(;s.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<s.length;a++){var u=this._tweens[s[a]],f=!i;u&&u.update(n,f)===!1&&!i&&this.remove(u)}s=Object.keys(this._tweensAddedDuringUpdate)}},e}(),uf={Linear:function(e,n){var i=e.length-1,s=i*n,a=Math.floor(s),u=uf.Utils.Linear;return n<0?u(e[0],e[1],s):n>1?u(e[i],e[i-1],i-s):u(e[a],e[a+1>i?i:a+1],s-a)},Utils:{Linear:function(e,n,i){return(n-e)*i+e}}},c0=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),cf=new u0,vg=function(){function e(n,i){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ci.Linear.None,this._interpolationFunction=uf.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=c0.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof i=="object"?(this._group=i,i.add(this)):i===!0&&(this._group=cf,cf.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,i){if(i===void 0&&(i=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=i<0?0:i,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,i){if(n===void 0&&(n=us()),i===void 0&&(i=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var s in this._valuesStartRepeat)this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||i){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,i)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,i,s,a,u){for(var f in s){var h=n[f],p=Array.isArray(h),m=p?"array":typeof h,v=!p&&Array.isArray(s[f]);if(!(m==="undefined"||m==="function")){if(v){var g=s[f];if(g.length===0)continue;for(var x=[h],_=0,b=g.length;_<b;_+=1){var C=this._handleRelativeValue(h,g[_]);if(isNaN(C)){v=!1,console.warn("Found invalid interpolation list. Skipping.");break}x.push(C)}v&&(s[f]=x)}if((m==="object"||p)&&h&&!v){i[f]=p?[]:{};var S=h;for(var k in S)i[f][k]=S[k];a[f]=p?[]:{};var g=s[f];if(!this._isDynamic){var R={};for(var k in g)R[k]=g[k];s[f]=g=R}this._setupProperties(S,i[f],g,a[f],u)}else(typeof i[f]>"u"||u)&&(i[f]=h),p||(i[f]*=1),v?a[f]=s[f].slice().reverse():a[f]=i[f]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=us()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=us()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,i=this._chainedTweens.length;n<i;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=ci.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=uf.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,i){var s=this,a;if(n===void 0&&(n=us()),i===void 0&&(i=e.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(i)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var f=n-this._startTime,h=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),p=this._duration+this._repeat*h,m=function(){if(s._duration===0||f>p)return 1;var C=Math.trunc(f/h),S=f-C*h,k=Math.min(S/s._duration,1);return k===0&&f===s._duration?1:k},v=m(),g=this._easingFunction(v);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,g),this._onUpdateCallback&&this._onUpdateCallback(this._object,v),this._duration===0||f>=this._duration)if(this._repeat>0){var x=Math.min(Math.trunc((f-this._duration)/h)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=x);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=h*x,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var _=0,b=this._chainedTweens.length;_<b;_++)this._chainedTweens[_].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,i,s,a){for(var u in s)if(i[u]!==void 0){var f=i[u]||0,h=s[u],p=Array.isArray(n[u]),m=Array.isArray(h),v=!p&&m;v?n[u]=this._interpolationFunction(h,a):typeof h=="object"&&h?this._updateProperties(n[u],f,h,a):(h=this._handleRelativeValue(f,h),typeof h=="number"&&(n[u]=f+(h-f)*a))}},e.prototype._handleRelativeValue=function(n,i){return typeof i!="string"?i:i.charAt(0)==="+"||i.charAt(0)==="-"?n+parseFloat(i):parseFloat(i)},e.prototype._swapEndStartRepeatValues=function(n){var i=this._valuesStartRepeat[n],s=this._valuesEnd[n];typeof s=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(s):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=i},e.autoStartOnUpdate=!1,e}();c0.nextId;var Mn=cf;Mn.getAll.bind(Mn);Mn.removeAll.bind(Mn);Mn.add.bind(Mn);Mn.remove.bind(Mn);Mn.update.bind(Mn);function xg(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function hk(e){if(Array.isArray(e))return e}function dk(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function pk(e,n,i){return Object.defineProperty(e,"prototype",{writable:!1}),e}function gk(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n!==0)for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function mk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
120
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yk(e,n){return hk(e)||gk(e,n)||vk(e,n)||mk()}function vk(e,n){if(e){if(typeof e=="string")return xg(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?xg(e,n):void 0}}var xk=pk(function e(n,i){var s=i.default,a=s===void 0?null:s,u=i.triggerUpdate,f=u===void 0?!0:u,h=i.onChange,p=h===void 0?function(m,v){}:h;dk(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=f,this.onChange=p});function Of(e){var n=e.stateInit,i=n===void 0?function(){return{}}:n,s=e.props,a=s===void 0?{}:s,u=e.methods,f=u===void 0?{}:u,h=e.aliases,p=h===void 0?{}:h,m=e.init,v=m===void 0?function(){}:m,g=e.update,x=g===void 0?function(){}:g,_=Object.keys(a).map(function(b){return new xk(b,a[b])});return function b(){for(var C=arguments.length,S=new Array(C),k=0;k<C;k++)S[k]=arguments[k];var R=!!(this instanceof b&&this.constructor),A=R?S.shift():void 0,N=S[0],T=N===void 0?{}:N,D=Object.assign({},i instanceof Function?i(T):i,{initialised:!1}),F={};function I(X){return B(X,T),K(),I}var B=function(se,ce){v.call(I,se,D,ce),D.initialised=!0},K=a0(function(){D.initialised&&(x.call(I,D,F),F={})},1);return _.forEach(function(X){I[X.name]=se(X);function se(ce){var $=ce.name,ne=ce.triggerUpdate,W=ne===void 0?!1:ne,re=ce.onChange,Q=re===void 0?function(O,V){}:re,Z=ce.defaultVal,G=Z===void 0?null:Z;return function(O){var V=D[$];if(!arguments.length)return V;var fe=O===void 0?G:O;return D[$]=fe,Q.call(I,fe,D,V),!F.hasOwnProperty($)&&(F[$]=V),W&&K(),I}}}),Object.keys(f).forEach(function(X){I[X]=function(){for(var se,ce=arguments.length,$=new Array(ce),ne=0;ne<ce;ne++)$[ne]=arguments[ne];return(se=f[X]).call.apply(se,[I,D].concat($))}}),Object.entries(p).forEach(function(X){var se=yk(X,2),ce=se[0],$=se[1];return I[ce]=I[$]}),I.resetProps=function(){return _.forEach(function(X){I[X.name](X.defaultVal)}),I},I.resetProps(),D._rerender=K,R&&A&&I(A),I}}var Ie=function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}};function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wa(e)}var _k=/^\s+/,wk=/\s+$/;function ye(e,n){if(e=e||"",n=n||{},e instanceof ye)return e;if(!(this instanceof ye))return new ye(e,n);var i=kk(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}ye.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),i,s,a,u,f,h;return i=n.r/255,s=n.g/255,a=n.b/255,i<=.03928?u=i/12.92:u=Math.pow((i+.055)/1.055,2.4),s<=.03928?f=s/12.92:f=Math.pow((s+.055)/1.055,2.4),a<=.03928?h=a/12.92:h=Math.pow((a+.055)/1.055,2.4),.2126*u+.7152*f+.0722*h},setAlpha:function(n){return this._a=f0(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=wg(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=wg(this._r,this._g,this._b),i=Math.round(n.h*360),s=Math.round(n.s*100),a=Math.round(n.v*100);return this._a==1?"hsv("+i+", "+s+"%, "+a+"%)":"hsva("+i+", "+s+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var n=_g(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=_g(this._r,this._g,this._b),i=Math.round(n.h*360),s=Math.round(n.s*100),a=Math.round(n.l*100);return this._a==1?"hsl("+i+", "+s+"%, "+a+"%)":"hsla("+i+", "+s+"%, "+a+"%, "+this._roundA+")"},toHex:function(n){return kg(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return Ek(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Ve(this._r,255)*100)+"%",g:Math.round(Ve(this._g,255)*100)+"%",b:Math.round(Ve(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ve(this._r,255)*100)+"%, "+Math.round(Ve(this._g,255)*100)+"%, "+Math.round(Ve(this._b,255)*100)+"%)":"rgba("+Math.round(Ve(this._r,255)*100)+"%, "+Math.round(Ve(this._g,255)*100)+"%, "+Math.round(Ve(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Lk[kg(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var i="#"+Sg(this._r,this._g,this._b,this._a),s=i,a=this._gradientType?"GradientType = 1, ":"";if(n){var u=ye(n);s="#"+Sg(u._r,u._g,u._b,u._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+i+",endColorstr="+s+")"},toString:function(n){var i=!!n;n=n||this._format;var s=!1,a=this._a<1&&this._a>=0,u=!i&&a&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return u?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(s=this.toRgbString()),n==="prgb"&&(s=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(s=this.toHexString()),n==="hex3"&&(s=this.toHexString(!0)),n==="hex4"&&(s=this.toHex8String(!0)),n==="hex8"&&(s=this.toHex8String()),n==="name"&&(s=this.toName()),n==="hsl"&&(s=this.toHslString()),n==="hsv"&&(s=this.toHsvString()),s||this.toHexString())},clone:function(){return ye(this.toString())},_applyModification:function(n,i){var s=n.apply(null,[this].concat([].slice.call(i)));return this._r=s._r,this._g=s._g,this._b=s._b,this.setAlpha(s._a),this},lighten:function(){return this._applyModification(jk,arguments)},brighten:function(){return this._applyModification(Mk,arguments)},darken:function(){return this._applyModification(Ok,arguments)},desaturate:function(){return this._applyModification(Pk,arguments)},saturate:function(){return this._applyModification(Nk,arguments)},greyscale:function(){return this._applyModification(Tk,arguments)},spin:function(){return this._applyModification(Rk,arguments)},_applyCombination:function(n,i){return n.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this._applyCombination(Dk,arguments)},complement:function(){return this._applyCombination(Ak,arguments)},monochromatic:function(){return this._applyCombination(Ik,arguments)},splitcomplement:function(){return this._applyCombination(zk,arguments)},triad:function(){return this._applyCombination(bg,[3])},tetrad:function(){return this._applyCombination(bg,[4])}};ye.fromRatio=function(e,n){if(wa(e)=="object"){var i={};for(var s in e)e.hasOwnProperty(s)&&(s==="a"?i[s]=e[s]:i[s]=cs(e[s]));e=i}return ye(e,n)};function kk(e){var n={r:0,g:0,b:0},i=1,s=null,a=null,u=null,f=!1,h=!1;return typeof e=="string"&&(e=Hk(e)),wa(e)=="object"&&(qn(e.r)&&qn(e.g)&&qn(e.b)?(n=Sk(e.r,e.g,e.b),f=!0,h=String(e.r).substr(-1)==="%"?"prgb":"rgb"):qn(e.h)&&qn(e.s)&&qn(e.v)?(s=cs(e.s),a=cs(e.v),n=Ck(e.h,s,a),f=!0,h="hsv"):qn(e.h)&&qn(e.s)&&qn(e.l)&&(s=cs(e.s),u=cs(e.l),n=bk(e.h,s,u),f=!0,h="hsl"),e.hasOwnProperty("a")&&(i=e.a)),i=f0(i),{ok:f,format:e.format||h,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i}}function Sk(e,n,i){return{r:Ve(e,255)*255,g:Ve(n,255)*255,b:Ve(i,255)*255}}function _g(e,n,i){e=Ve(e,255),n=Ve(n,255),i=Ve(i,255);var s=Math.max(e,n,i),a=Math.min(e,n,i),u,f,h=(s+a)/2;if(s==a)u=f=0;else{var p=s-a;switch(f=h>.5?p/(2-s-a):p/(s+a),s){case e:u=(n-i)/p+(n<i?6:0);break;case n:u=(i-e)/p+2;break;case i:u=(e-n)/p+4;break}u/=6}return{h:u,s:f,l:h}}function bk(e,n,i){var s,a,u;e=Ve(e,360),n=Ve(n,100),i=Ve(i,100);function f(m,v,g){return g<0&&(g+=1),g>1&&(g-=1),g<1/6?m+(v-m)*6*g:g<1/2?v:g<2/3?m+(v-m)*(2/3-g)*6:m}if(n===0)s=a=u=i;else{var h=i<.5?i*(1+n):i+n-i*n,p=2*i-h;s=f(p,h,e+1/3),a=f(p,h,e),u=f(p,h,e-1/3)}return{r:s*255,g:a*255,b:u*255}}function wg(e,n,i){e=Ve(e,255),n=Ve(n,255),i=Ve(i,255);var s=Math.max(e,n,i),a=Math.min(e,n,i),u,f,h=s,p=s-a;if(f=s===0?0:p/s,s==a)u=0;else{switch(s){case e:u=(n-i)/p+(n<i?6:0);break;case n:u=(i-e)/p+2;break;case i:u=(e-n)/p+4;break}u/=6}return{h:u,s:f,v:h}}function Ck(e,n,i){e=Ve(e,360)*6,n=Ve(n,100),i=Ve(i,100);var s=Math.floor(e),a=e-s,u=i*(1-n),f=i*(1-a*n),h=i*(1-(1-a)*n),p=s%6,m=[i,f,u,u,h,i][p],v=[h,i,i,f,u,u][p],g=[u,u,h,i,i,f][p];return{r:m*255,g:v*255,b:g*255}}function kg(e,n,i,s){var a=[mn(Math.round(e).toString(16)),mn(Math.round(n).toString(16)),mn(Math.round(i).toString(16))];return s&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Ek(e,n,i,s,a){var u=[mn(Math.round(e).toString(16)),mn(Math.round(n).toString(16)),mn(Math.round(i).toString(16)),mn(h0(s))];return a&&u[0].charAt(0)==u[0].charAt(1)&&u[1].charAt(0)==u[1].charAt(1)&&u[2].charAt(0)==u[2].charAt(1)&&u[3].charAt(0)==u[3].charAt(1)?u[0].charAt(0)+u[1].charAt(0)+u[2].charAt(0)+u[3].charAt(0):u.join("")}function Sg(e,n,i,s){var a=[mn(h0(s)),mn(Math.round(e).toString(16)),mn(Math.round(n).toString(16)),mn(Math.round(i).toString(16))];return a.join("")}ye.equals=function(e,n){return!e||!n?!1:ye(e).toRgbString()==ye(n).toRgbString()};ye.random=function(){return ye.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Pk(e,n){n=n===0?0:n||10;var i=ye(e).toHsl();return i.s-=n/100,i.s=Ta(i.s),ye(i)}function Nk(e,n){n=n===0?0:n||10;var i=ye(e).toHsl();return i.s+=n/100,i.s=Ta(i.s),ye(i)}function Tk(e){return ye(e).desaturate(100)}function jk(e,n){n=n===0?0:n||10;var i=ye(e).toHsl();return i.l+=n/100,i.l=Ta(i.l),ye(i)}function Mk(e,n){n=n===0?0:n||10;var i=ye(e).toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(255*-(n/100)))),i.g=Math.max(0,Math.min(255,i.g-Math.round(255*-(n/100)))),i.b=Math.max(0,Math.min(255,i.b-Math.round(255*-(n/100)))),ye(i)}function Ok(e,n){n=n===0?0:n||10;var i=ye(e).toHsl();return i.l-=n/100,i.l=Ta(i.l),ye(i)}function Rk(e,n){var i=ye(e).toHsl(),s=(i.h+n)%360;return i.h=s<0?360+s:s,ye(i)}function Ak(e){var n=ye(e).toHsl();return n.h=(n.h+180)%360,ye(n)}function bg(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var i=ye(e).toHsl(),s=[ye(e)],a=360/n,u=1;u<n;u++)s.push(ye({h:(i.h+u*a)%360,s:i.s,l:i.l}));return s}function zk(e){var n=ye(e).toHsl(),i=n.h;return[ye(e),ye({h:(i+72)%360,s:n.s,l:n.l}),ye({h:(i+216)%360,s:n.s,l:n.l})]}function Dk(e,n,i){n=n||6,i=i||30;var s=ye(e).toHsl(),a=360/i,u=[ye(e)];for(s.h=(s.h-(a*n>>1)+720)%360;--n;)s.h=(s.h+a)%360,u.push(ye(s));return u}function Ik(e,n){n=n||6;for(var i=ye(e).toHsv(),s=i.h,a=i.s,u=i.v,f=[],h=1/n;n--;)f.push(ye({h:s,s:a,v:u})),u=(u+h)%1;return f}ye.mix=function(e,n,i){i=i===0?0:i||50;var s=ye(e).toRgb(),a=ye(n).toRgb(),u=i/100,f={r:(a.r-s.r)*u+s.r,g:(a.g-s.g)*u+s.g,b:(a.b-s.b)*u+s.b,a:(a.a-s.a)*u+s.a};return ye(f)};ye.readability=function(e,n){var i=ye(e),s=ye(n);return(Math.max(i.getLuminance(),s.getLuminance())+.05)/(Math.min(i.getLuminance(),s.getLuminance())+.05)};ye.isReadable=function(e,n,i){var s=ye.readability(e,n),a,u;switch(u=!1,a=qk(i),a.level+a.size){case"AAsmall":case"AAAlarge":u=s>=4.5;break;case"AAlarge":u=s>=3;break;case"AAAsmall":u=s>=7;break}return u};ye.mostReadable=function(e,n,i){var s=null,a=0,u,f,h,p;i=i||{},f=i.includeFallbackColors,h=i.level,p=i.size;for(var m=0;m<n.length;m++)u=ye.readability(e,n[m]),u>a&&(a=u,s=ye(n[m]));return ye.isReadable(e,s,{level:h,size:p})||!f?s:(i.includeFallbackColors=!1,ye.mostReadable(e,["#fff","#000"],i))};var ff=ye.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Lk=ye.hexNames=Fk(ff);function Fk(e){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);return n}function f0(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ve(e,n){$k(e)&&(e="100%");var i=Uk(e);return e=Math.min(n,Math.max(0,parseFloat(e))),i&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Ta(e){return Math.min(1,Math.max(0,e))}function $t(e){return parseInt(e,16)}function $k(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Uk(e){return typeof e=="string"&&e.indexOf("%")!=-1}function mn(e){return e.length==1?"0"+e:""+e}function cs(e){return e<=1&&(e=e*100+"%"),e}function h0(e){return Math.round(parseFloat(e)*255).toString(16)}function Cg(e){return $t(e)/255}var fn=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",i="(?:"+n+")|(?:"+e+")",s="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",a="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+s),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+s),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+s),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function qn(e){return!!fn.CSS_UNIT.exec(e)}function Hk(e){e=e.replace(_k,"").replace(wk,"").toLowerCase();var n=!1;if(ff[e])e=ff[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=fn.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=fn.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=fn.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=fn.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=fn.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=fn.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=fn.hex8.exec(e))?{r:$t(i[1]),g:$t(i[2]),b:$t(i[3]),a:Cg(i[4]),format:n?"name":"hex8"}:(i=fn.hex6.exec(e))?{r:$t(i[1]),g:$t(i[2]),b:$t(i[3]),format:n?"name":"hex"}:(i=fn.hex4.exec(e))?{r:$t(i[1]+""+i[1]),g:$t(i[2]+""+i[2]),b:$t(i[3]+""+i[3]),a:Cg(i[4]+""+i[4]),format:n?"name":"hex8"}:(i=fn.hex3.exec(e))?{r:$t(i[1]+""+i[1]),g:$t(i[2]+""+i[2]),b:$t(i[3]+""+i[3]),format:n?"name":"hex"}:!1}function qk(e){var n,i;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),i=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:n,size:i}}function hf(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function Vk(e){if(Array.isArray(e))return hf(e)}function d0(e,n,i){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:i;throw new TypeError("Private element is not present on this object")}function Bk(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qk(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Zt(e,n){return e.get(d0(e,n))}function Eg(e,n,i){Bk(e,n),n.set(e,i)}function Pg(e,n,i){return e.set(d0(e,n),i),i}function Wk(e,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Jk(s.key),s)}}function Kk(e,n,i){return n&&Wk(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
121
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yk(e){return Vk(e)||Gk(e)||eS(e)||Xk()}function Zk(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jk(e){var n=Zk(e,"string");return typeof n=="symbol"?n:n+""}function eS(e,n){if(e){if(typeof e=="string")return hf(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?hf(e,n):void 0}}var tS=123,nS=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},p0=function(n,i,s){return(n<<16)+(i<<8)+s},rS=function(n){var i=ye(n).toRgb(),s=i.r,a=i.g,u=i.b;return p0(s,a,u)},Ng=function(n,i){return n*tS%Math.pow(2,i)},Zr=new WeakMap,Vn=new WeakMap,iS=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Qk(this,e),Eg(this,Zr,void 0),Eg(this,Vn,void 0),Pg(Vn,this,n),this.reset()}return Kk(e,[{key:"reset",value:function(){Pg(Zr,this,["__reserved for background__"])}},{key:"register",value:function(i){if(Zt(Zr,this).length>=Math.pow(2,24-Zt(Vn,this)))return null;var s=Zt(Zr,this).length,a=Ng(s,Zt(Vn,this)),u=nS(s+(a<<24-Zt(Vn,this)));return Zt(Zr,this).push(i),u}},{key:"lookup",value:function(i){if(!i)return null;var s=typeof i=="string"?rS(i):p0.apply(void 0,Yk(i));if(!s)return null;var a=s&Math.pow(2,24-Zt(Vn,this))-1,u=s>>24-Zt(Vn,this)&Math.pow(2,Zt(Vn,this))-1;return Ng(a,Zt(Vn,this))!==u||a>=Zt(Zr,this).length?null:Zt(Zr,this)[a]}}])}(),js,Be,g0,m0,Jr,Tg,y0,v0,x0,Rf,df,pf,_s={},_0=[],oS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ja=Array.isArray;function Tn(e,n){for(var i in n)e[i]=n[i];return e}function Af(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function sS(e,n,i){var s,a,u,f={};for(u in n)u=="key"?s=n[u]:u=="ref"?a=n[u]:f[u]=n[u];if(arguments.length>2&&(f.children=arguments.length>3?js.call(arguments,2):i),typeof e=="function"&&e.defaultProps!=null)for(u in e.defaultProps)f[u]===void 0&&(f[u]=e.defaultProps[u]);return fs(e,f,s,a,null)}function fs(e,n,i,s,a){var u={type:e,props:n,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++g0,__i:-1,__u:0};return a==null&&Be.vnode!=null&&Be.vnode(u),u}function Ma(e){return e.children}function ca(e,n){this.props=e,this.context=n}function so(e,n){if(n==null)return e.__?so(e.__,e.__i+1):null;for(var i;n<e.__k.length;n++)if((i=e.__k[n])!=null&&i.__e!=null)return i.__e;return typeof e.type=="function"?so(e):null}function w0(e){var n,i;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((i=e.__k[n])!=null&&i.__e!=null){e.__e=e.__c.base=i.__e;break}return w0(e)}}function jg(e){(!e.__d&&(e.__d=!0)&&Jr.push(e)&&!ka.__r++||Tg!=Be.debounceRendering)&&((Tg=Be.debounceRendering)||y0)(ka)}function ka(){for(var e,n,i,s,a,u,f,h=1;Jr.length;)Jr.length>h&&Jr.sort(v0),e=Jr.shift(),h=Jr.length,e.__d&&(i=void 0,a=(s=(n=e).__v).__e,u=[],f=[],n.__P&&((i=Tn({},s)).__v=s.__v+1,Be.vnode&&Be.vnode(i),zf(n.__P,i,s,n.__n,n.__P.namespaceURI,32&s.__u?[a]:null,u,a??so(s),!!(32&s.__u),f),i.__v=s.__v,i.__.__k[i.__i]=i,b0(u,i,f),i.__e!=a&&w0(i)));ka.__r=0}function k0(e,n,i,s,a,u,f,h,p,m,v){var g,x,_,b,C,S,k=s&&s.__k||_0,R=n.length;for(p=lS(i,n,k,p,R),g=0;g<R;g++)(_=i.__k[g])!=null&&(x=_.__i==-1?_s:k[_.__i]||_s,_.__i=g,S=zf(e,_,x,a,u,f,h,p,m,v),b=_.__e,_.ref&&x.ref!=_.ref&&(x.ref&&Df(x.ref,null,_),v.push(_.ref,_.__c||b,_)),C==null&&b!=null&&(C=b),4&_.__u||x.__k===_.__k?p=S0(_,p,e):typeof _.type=="function"&&S!==void 0?p=S:b&&(p=b.nextSibling),_.__u&=-7);return i.__e=C,p}function lS(e,n,i,s,a){var u,f,h,p,m,v=i.length,g=v,x=0;for(e.__k=new Array(a),u=0;u<a;u++)(f=n[u])!=null&&typeof f!="boolean"&&typeof f!="function"?(p=u+x,(f=e.__k[u]=typeof f=="string"||typeof f=="number"||typeof f=="bigint"||f.constructor==String?fs(null,f,null,null,null):ja(f)?fs(Ma,{children:f},null,null,null):f.constructor==null&&f.__b>0?fs(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f).__=e,f.__b=e.__b+1,h=null,(m=f.__i=aS(f,i,p,g))!=-1&&(g--,(h=i[m])&&(h.__u|=2)),h==null||h.__v==null?(m==-1&&(a>v?x--:a<v&&x++),typeof f.type!="function"&&(f.__u|=4)):m!=p&&(m==p-1?x--:m==p+1?x++:(m>p?x--:x++,f.__u|=4))):e.__k[u]=null;if(g)for(u=0;u<v;u++)(h=i[u])!=null&&(2&h.__u)==0&&(h.__e==s&&(s=so(h)),E0(h,h));return s}function S0(e,n,i){var s,a;if(typeof e.type=="function"){for(s=e.__k,a=0;s&&a<s.length;a++)s[a]&&(s[a].__=e,n=S0(s[a],n,i));return n}e.__e!=n&&(n&&e.type&&!i.contains(n)&&(n=so(e)),i.insertBefore(e.__e,n||null),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function aS(e,n,i,s){var a,u,f=e.key,h=e.type,p=n[i];if(p===null&&e.key==null||p&&f==p.key&&h==p.type&&(2&p.__u)==0)return i;if(s>(p!=null&&(2&p.__u)==0?1:0))for(a=i-1,u=i+1;a>=0||u<n.length;){if(a>=0){if((p=n[a])&&(2&p.__u)==0&&f==p.key&&h==p.type)return a;a--}if(u<n.length){if((p=n[u])&&(2&p.__u)==0&&f==p.key&&h==p.type)return u;u++}}return-1}function Mg(e,n,i){n[0]=="-"?e.setProperty(n,i??""):e[n]=i==null?"":typeof i!="number"||oS.test(n)?i:i+"px"}function na(e,n,i,s,a){var u,f;e:if(n=="style")if(typeof i=="string")e.style.cssText=i;else{if(typeof s=="string"&&(e.style.cssText=s=""),s)for(n in s)i&&n in i||Mg(e.style,n,"");if(i)for(n in i)s&&i[n]==s[n]||Mg(e.style,n,i[n])}else if(n[0]=="o"&&n[1]=="n")u=n!=(n=n.replace(x0,"$1")),f=n.toLowerCase(),n=f in e||n=="onFocusOut"||n=="onFocusIn"?f.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+u]=i,i?s?i.u=s.u:(i.u=Rf,e.addEventListener(n,u?pf:df,u)):e.removeEventListener(n,u?pf:df,u);else{if(a=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=i??"";break e}catch{}typeof i=="function"||(i==null||i===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&i==1?"":i))}}function Og(e){return function(n){if(this.l){var i=this.l[n.type+e];if(n.t==null)n.t=Rf++;else if(n.t<i.u)return;return i(Be.event?Be.event(n):n)}}}function zf(e,n,i,s,a,u,f,h,p,m){var v,g,x,_,b,C,S,k,R,A,N,T,D,F,I,B,K,X=n.type;if(n.constructor!=null)return null;128&i.__u&&(p=!!(32&i.__u),u=[h=n.__e=i.__e]),(v=Be.__b)&&v(n);e:if(typeof X=="function")try{if(k=n.props,R="prototype"in X&&X.prototype.render,A=(v=X.contextType)&&s[v.__c],N=v?A?A.props.value:v.__:s,i.__c?S=(g=n.__c=i.__c).__=g.__E:(R?n.__c=g=new X(k,N):(n.__c=g=new ca(k,N),g.constructor=X,g.render=cS),A&&A.sub(g),g.props=k,g.state||(g.state={}),g.context=N,g.__n=s,x=g.__d=!0,g.__h=[],g._sb=[]),R&&g.__s==null&&(g.__s=g.state),R&&X.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=Tn({},g.__s)),Tn(g.__s,X.getDerivedStateFromProps(k,g.__s))),_=g.props,b=g.state,g.__v=n,x)R&&X.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),R&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(R&&X.getDerivedStateFromProps==null&&k!==_&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(k,N),!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(k,g.__s,N)===!1||n.__v==i.__v){for(n.__v!=i.__v&&(g.props=k,g.state=g.__s,g.__d=!1),n.__e=i.__e,n.__k=i.__k,n.__k.some(function(se){se&&(se.__=n)}),T=0;T<g._sb.length;T++)g.__h.push(g._sb[T]);g._sb=[],g.__h.length&&f.push(g);break e}g.componentWillUpdate!=null&&g.componentWillUpdate(k,g.__s,N),R&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(_,b,C)})}if(g.context=N,g.props=k,g.__P=e,g.__e=!1,D=Be.__r,F=0,R){for(g.state=g.__s,g.__d=!1,D&&D(n),v=g.render(g.props,g.state,g.context),I=0;I<g._sb.length;I++)g.__h.push(g._sb[I]);g._sb=[]}else do g.__d=!1,D&&D(n),v=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++F<25);g.state=g.__s,g.getChildContext!=null&&(s=Tn(Tn({},s),g.getChildContext())),R&&!x&&g.getSnapshotBeforeUpdate!=null&&(C=g.getSnapshotBeforeUpdate(_,b)),B=v,v!=null&&v.type===Ma&&v.key==null&&(B=C0(v.props.children)),h=k0(e,ja(B)?B:[B],n,i,s,a,u,f,h,p,m),g.base=n.__e,n.__u&=-161,g.__h.length&&f.push(g),S&&(g.__E=g.__=null)}catch(se){if(n.__v=null,p||u!=null)if(se.then){for(n.__u|=p?160:128;h&&h.nodeType==8&&h.nextSibling;)h=h.nextSibling;u[u.indexOf(h)]=null,n.__e=h}else for(K=u.length;K--;)Af(u[K]);else n.__e=i.__e,n.__k=i.__k;Be.__e(se,n,i)}else u==null&&n.__v==i.__v?(n.__k=i.__k,n.__e=i.__e):h=n.__e=uS(i.__e,n,i,s,a,u,f,p,m);return(v=Be.diffed)&&v(n),128&n.__u?void 0:h}function b0(e,n,i){for(var s=0;s<i.length;s++)Df(i[s],i[++s],i[++s]);Be.__c&&Be.__c(n,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(u){u.call(a)})}catch(u){Be.__e(u,a.__v)}})}function C0(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:ja(e)?e.map(C0):Tn({},e)}function uS(e,n,i,s,a,u,f,h,p){var m,v,g,x,_,b,C,S=i.props,k=n.props,R=n.type;if(R=="svg"?a="http://www.w3.org/2000/svg":R=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),u!=null){for(m=0;m<u.length;m++)if((_=u[m])&&"setAttribute"in _==!!R&&(R?_.localName==R:_.nodeType==3)){e=_,u[m]=null;break}}if(e==null){if(R==null)return document.createTextNode(k);e=document.createElementNS(a,R,k.is&&k),h&&(Be.__m&&Be.__m(n,u),h=!1),u=null}if(R==null)S===k||h&&e.data==k||(e.data=k);else{if(u=u&&js.call(e.childNodes),S=i.props||_s,!h&&u!=null)for(S={},m=0;m<e.attributes.length;m++)S[(_=e.attributes[m]).name]=_.value;for(m in S)if(_=S[m],m!="children"){if(m=="dangerouslySetInnerHTML")g=_;else if(!(m in k)){if(m=="value"&&"defaultValue"in k||m=="checked"&&"defaultChecked"in k)continue;na(e,m,null,_,a)}}for(m in k)_=k[m],m=="children"?x=_:m=="dangerouslySetInnerHTML"?v=_:m=="value"?b=_:m=="checked"?C=_:h&&typeof _!="function"||S[m]===_||na(e,m,_,S[m],a);if(v)h||g&&(v.__html==g.__html||v.__html==e.innerHTML)||(e.innerHTML=v.__html),n.__k=[];else if(g&&(e.innerHTML=""),k0(n.type=="template"?e.content:e,ja(x)?x:[x],n,i,s,R=="foreignObject"?"http://www.w3.org/1999/xhtml":a,u,f,u?u[0]:i.__k&&so(i,0),h,p),u!=null)for(m=u.length;m--;)Af(u[m]);h||(m="value",R=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[m]||R=="progress"&&!b||R=="option"&&b!=S[m])&&na(e,m,b,S[m],a),m="checked",C!=null&&C!=e[m]&&na(e,m,C,S[m],a))}return e}function Df(e,n,i){try{if(typeof e=="function"){var s=typeof e.__u=="function";s&&e.__u(),s&&n==null||(e.__u=e(n))}else e.current=n}catch(a){Be.__e(a,i)}}function E0(e,n,i){var s,a;if(Be.unmount&&Be.unmount(e),(s=e.ref)&&(s.current&&s.current!=e.__e||Df(s,null,n)),(s=e.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(u){Be.__e(u,n)}s.base=s.__P=null}if(s=e.__k)for(a=0;a<s.length;a++)s[a]&&E0(s[a],n,i||typeof e.type!="function");i||Af(e.__e),e.__c=e.__=e.__e=void 0}function cS(e,n,i){return this.constructor(e,i)}function fS(e,n,i){var s,a,u,f;n==document&&(n=document.documentElement),Be.__&&Be.__(e,n),a=(s=!1)?null:n.__k,u=[],f=[],zf(n,e=n.__k=sS(Ma,null,[e]),a||_s,_s,n.namespaceURI,a?null:n.firstChild?js.call(n.childNodes):null,u,a?a.__e:n.firstChild,s,f),b0(u,e,f)}function P0(e,n,i){var s,a,u,f,h=Tn({},e.props);for(u in e.type&&e.type.defaultProps&&(f=e.type.defaultProps),n)u=="key"?s=n[u]:u=="ref"?a=n[u]:h[u]=n[u]===void 0&&f!=null?f[u]:n[u];return arguments.length>2&&(h.children=arguments.length>3?js.call(arguments,2):i),fs(e.type,h,s||e.key,a||e.ref,null)}js=_0.slice,Be={__e:function(e,n,i,s){for(var a,u,f;n=n.__;)if((a=n.__c)&&!a.__)try{if((u=a.constructor)&&u.getDerivedStateFromError!=null&&(a.setState(u.getDerivedStateFromError(e)),f=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,s||{}),f=a.__d),f)return a.__E=a}catch(h){e=h}throw e}},g0=0,m0=function(e){return e!=null&&e.constructor==null},ca.prototype.setState=function(e,n){var i;i=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Tn({},this.state),typeof e=="function"&&(e=e(Tn({},i),this.props)),e&&Tn(i,e),e!=null&&this.__v&&(n&&this._sb.push(n),jg(this))},ca.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),jg(this))},ca.prototype.render=Ma,Jr=[],y0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,v0=function(e,n){return e.__v.__b-n.__v.__b},ka.__r=0,x0=/(PointerCapture)$|Capture$/i,Rf=0,df=Og(!1),pf=Og(!0);function Rg(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function hS(e){if(Array.isArray(e))return e}function dS(e,n,i){return(n=xS(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function pS(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n!==0)for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function gS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
122
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ag(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,s)}return i}function mS(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Ag(Object(i),!0).forEach(function(s){dS(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ag(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function yS(e,n){return hS(e)||pS(e,n)||_S(e,n)||gS()}function vS(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function xS(e){var n=vS(e,"string");return typeof n=="symbol"?n:n+""}function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sa(e)}function _S(e,n){if(e){if(typeof e=="string")return Rg(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Rg(e,n):void 0}}var gf=function(n){if(Sa(n)!=="object")return n;var i=P0(n);if(i.props){var s;i.props=mS({},i.props),i!=null&&(s=i.props)!==null&&s!==void 0&&s.children&&(i.props.children=Array.isArray(i.props.children)?i.props.children.map(gf):gf(i.props.children))}return i},wS=function(n){return m0(P0(n))},kS=function(n,i){delete i.__k,fS(gf(n),i)};function SS(e,n){n===void 0&&(n={});var i=n.insertAt;if(!(typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&s.firstChild?s.insertBefore(a,s.firstChild):s.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var bS=`.float-tooltip-kap {
123
+ position: absolute;
124
+ width: max-content; /* prevent shrinking near right edge */
125
+ max-width: max(50%, 150px);
126
+ padding: 3px 5px;
127
+ border-radius: 3px;
128
+ font: 12px sans-serif;
129
+ color: #eee;
130
+ background: rgba(0,0,0,0.6);
131
+ pointer-events: none;
132
+ }
133
+ `;SS(bS);var CS=Of({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.style,u=a===void 0?{}:a,f=!!n&&Sa(n)==="object"&&!!n.node&&typeof n.node=="function",h=tn(f?n.node():n);h.style("position")==="static"&&h.style("position","relative"),i.tooltipEl=h.append("div").attr("class","float-tooltip-kap"),Object.entries(u).forEach(function(m){var v=yS(m,2),g=v[0],x=v[1];return i.tooltipEl.style(g,x)}),i.tooltipEl.style("left","-10000px").style("display","none");var p="tooltip-".concat(Math.round(Math.random()*1e12));i.mouseInside=!1,h.on("mousemove.".concat(p),function(m){i.mouseInside=!0;var v=Cn(m),g=h.node(),x=g.offsetWidth,_=g.offsetHeight,b=[i.offsetX===null||i.offsetX===void 0?"-".concat(v[0]/x*100,"%"):typeof i.offsetX=="number"?"calc(-50% + ".concat(i.offsetX,"px)"):i.offsetX,i.offsetY===null||i.offsetY===void 0?_>130&&_-v[1]<100?"calc(-100% - 6px)":"21px":typeof i.offsetY=="number"?i.offsetY<0?"calc(-100% - ".concat(Math.abs(i.offsetY),"px)"):"".concat(i.offsetY,"px"):i.offsetY];i.tooltipEl.style("left",v[0]+"px").style("top",v[1]+"px").style("transform","translate(".concat(b.join(","),")")),i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseover.".concat(p),function(){i.mouseInside=!0,i.content&&i.tooltipEl.style("display","inline")}),h.on("mouseout.".concat(p),function(){i.mouseInside=!1,i.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):wS(n.content)?(n.tooltipEl.text(""),kS(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function ES(e,n,i){var s,a=1;e==null&&(e=0),n==null&&(n=0),i==null&&(i=0);function u(){var f,h=s.length,p,m=0,v=0,g=0;for(f=0;f<h;++f)p=s[f],m+=p.x||0,v+=p.y||0,g+=p.z||0;for(m=(m/h-e)*a,v=(v/h-n)*a,g=(g/h-i)*a,f=0;f<h;++f)p=s[f],m&&(p.x-=m),v&&(p.y-=v),g&&(p.z-=g)}return u.initialize=function(f){s=f},u.x=function(f){return arguments.length?(e=+f,u):e},u.y=function(f){return arguments.length?(n=+f,u):n},u.z=function(f){return arguments.length?(i=+f,u):i},u.strength=function(f){return arguments.length?(a=+f,u):a},u}function PS(e){const n=+this._x.call(null,e);return N0(this.cover(n),n,e)}function N0(e,n,i){if(isNaN(n))return e;var s,a=e._root,u={data:i},f=e._x0,h=e._x1,p,m,v,g,x;if(!a)return e._root=u,e;for(;a.length;)if((v=n>=(p=(f+h)/2))?f=p:h=p,s=a,!(a=a[g=+v]))return s[g]=u,e;if(m=+e._x.call(null,a.data),n===m)return u.next=a,s?s[g]=u:e._root=u,e;do s=s?s[g]=new Array(2):e._root=new Array(2),(v=n>=(p=(f+h)/2))?f=p:h=p;while((g=+v)==(x=+(m>=p)));return s[x]=a,s[g]=u,e}function NS(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,i=new Float64Array(n);let s=1/0,a=-1/0;for(let u=0,f;u<n;++u)isNaN(f=+this._x.call(null,e[u]))||(i[u]=f,f<s&&(s=f),f>a&&(a=f));if(s>a)return this;this.cover(s).cover(a);for(let u=0;u<n;++u)N0(this,i[u],e[u]);return this}function TS(e){if(isNaN(e=+e))return this;var n=this._x0,i=this._x1;if(isNaN(n))i=(n=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,u,f;n>e||e>=i;)switch(f=+(e<n),u=new Array(2),u[f]=a,a=u,s*=2,f){case 0:i=n+s;break;case 1:n=i-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._x1=i,this}function jS(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function MS(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Zn(e,n,i){this.node=e,this.x0=n,this.x1=i}function OS(e,n){var i,s=this._x0,a,u,f=this._x1,h=[],p=this._root,m,v;for(p&&h.push(new Zn(p,s,f)),n==null?n=1/0:(s=e-n,f=e+n);m=h.pop();)if(!(!(p=m.node)||(a=m.x0)>f||(u=m.x1)<s))if(p.length){var g=(a+u)/2;h.push(new Zn(p[1],g,u),new Zn(p[0],a,g)),(v=+(e>=g))&&(m=h[h.length-1],h[h.length-1]=h[h.length-1-v],h[h.length-1-v]=m)}else{var x=Math.abs(e-+this._x.call(null,p.data));x<n&&(n=x,s=e-x,f=e+x,i=p.data)}return i}function RS(e){if(isNaN(p=+this._x.call(null,e)))return this;var n,i=this._root,s,a,u,f=this._x0,h=this._x1,p,m,v,g,x;if(!i)return this;if(i.length)for(;;){if((v=p>=(m=(f+h)/2))?f=m:h=m,n=i,!(i=i[g=+v]))return this;if(!i.length)break;n[g+1&1]&&(s=n,x=g)}for(;i.data!==e;)if(a=i,!(i=i.next))return this;return(u=i.next)&&delete i.next,a?(u?a.next=u:delete a.next,this):n?(u?n[g]=u:delete n[g],(i=n[0]||n[1])&&i===(n[1]||n[0])&&!i.length&&(s?s[x]=i:this._root=i),this):(this._root=u,this)}function AS(e){for(var n=0,i=e.length;n<i;++n)this.remove(e[n]);return this}function zS(){return this._root}function DS(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function IS(e){var n=[],i,s=this._root,a,u,f;for(s&&n.push(new Zn(s,this._x0,this._x1));i=n.pop();)if(!e(s=i.node,u=i.x0,f=i.x1)&&s.length){var h=(u+f)/2;(a=s[1])&&n.push(new Zn(a,h,f)),(a=s[0])&&n.push(new Zn(a,u,h))}return this}function LS(e){var n=[],i=[],s;for(this._root&&n.push(new Zn(this._root,this._x0,this._x1));s=n.pop();){var a=s.node;if(a.length){var u,f=s.x0,h=s.x1,p=(f+h)/2;(u=a[0])&&n.push(new Zn(u,f,p)),(u=a[1])&&n.push(new Zn(u,p,h))}i.push(s)}for(;s=i.pop();)e(s.node,s.x0,s.x1);return this}function FS(e){return e[0]}function $S(e){return arguments.length?(this._x=e,this):this._x}function T0(e,n){var i=new If(n??FS,NaN,NaN);return e==null?i:i.addAll(e)}function If(e,n,i){this._x=e,this._x0=n,this._x1=i,this._root=void 0}function zg(e){for(var n={data:e.data},i=n;e=e.next;)i=i.next={data:e.data};return n}var zt=T0.prototype=If.prototype;zt.copy=function(){var e=new If(this._x,this._x0,this._x1),n=this._root,i,s;if(!n)return e;if(!n.length)return e._root=zg(n),e;for(i=[{source:n,target:e._root=new Array(2)}];n=i.pop();)for(var a=0;a<2;++a)(s=n.source[a])&&(s.length?i.push({source:s,target:n.target[a]=new Array(2)}):n.target[a]=zg(s));return e};zt.add=PS;zt.addAll=NS;zt.cover=TS;zt.data=jS;zt.extent=MS;zt.find=OS;zt.remove=RS;zt.removeAll=AS;zt.root=zS;zt.size=DS;zt.visit=IS;zt.visitAfter=LS;zt.x=$S;function US(e){const n=+this._x.call(null,e),i=+this._y.call(null,e);return j0(this.cover(n,i),n,i,e)}function j0(e,n,i,s){if(isNaN(n)||isNaN(i))return e;var a,u=e._root,f={data:s},h=e._x0,p=e._y0,m=e._x1,v=e._y1,g,x,_,b,C,S,k,R;if(!u)return e._root=f,e;for(;u.length;)if((C=n>=(g=(h+m)/2))?h=g:m=g,(S=i>=(x=(p+v)/2))?p=x:v=x,a=u,!(u=u[k=S<<1|C]))return a[k]=f,e;if(_=+e._x.call(null,u.data),b=+e._y.call(null,u.data),n===_&&i===b)return f.next=u,a?a[k]=f:e._root=f,e;do a=a?a[k]=new Array(4):e._root=new Array(4),(C=n>=(g=(h+m)/2))?h=g:m=g,(S=i>=(x=(p+v)/2))?p=x:v=x;while((k=S<<1|C)===(R=(b>=x)<<1|_>=g));return a[R]=u,a[k]=f,e}function HS(e){var n,i,s=e.length,a,u,f=new Array(s),h=new Array(s),p=1/0,m=1/0,v=-1/0,g=-1/0;for(i=0;i<s;++i)isNaN(a=+this._x.call(null,n=e[i]))||isNaN(u=+this._y.call(null,n))||(f[i]=a,h[i]=u,a<p&&(p=a),a>v&&(v=a),u<m&&(m=u),u>g&&(g=u));if(p>v||m>g)return this;for(this.cover(p,m).cover(v,g),i=0;i<s;++i)j0(this,f[i],h[i],e[i]);return this}function qS(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var i=this._x0,s=this._y0,a=this._x1,u=this._y1;if(isNaN(i))a=(i=Math.floor(e))+1,u=(s=Math.floor(n))+1;else{for(var f=a-i||1,h=this._root,p,m;i>e||e>=a||s>n||n>=u;)switch(m=(n<s)<<1|e<i,p=new Array(4),p[m]=h,h=p,f*=2,m){case 0:a=i+f,u=s+f;break;case 1:i=a-f,u=s+f;break;case 2:a=i+f,s=u-f;break;case 3:i=a-f,s=u-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=s,this._x1=a,this._y1=u,this}function VS(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function BS(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function St(e,n,i,s,a){this.node=e,this.x0=n,this.y0=i,this.x1=s,this.y1=a}function QS(e,n,i){var s,a=this._x0,u=this._y0,f,h,p,m,v=this._x1,g=this._y1,x=[],_=this._root,b,C;for(_&&x.push(new St(_,a,u,v,g)),i==null?i=1/0:(a=e-i,u=n-i,v=e+i,g=n+i,i*=i);b=x.pop();)if(!(!(_=b.node)||(f=b.x0)>v||(h=b.y0)>g||(p=b.x1)<a||(m=b.y1)<u))if(_.length){var S=(f+p)/2,k=(h+m)/2;x.push(new St(_[3],S,k,p,m),new St(_[2],f,k,S,m),new St(_[1],S,h,p,k),new St(_[0],f,h,S,k)),(C=(n>=k)<<1|e>=S)&&(b=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=b)}else{var R=e-+this._x.call(null,_.data),A=n-+this._y.call(null,_.data),N=R*R+A*A;if(N<i){var T=Math.sqrt(i=N);a=e-T,u=n-T,v=e+T,g=n+T,s=_.data}}return s}function WS(e){if(isNaN(v=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e)))return this;var n,i=this._root,s,a,u,f=this._x0,h=this._y0,p=this._x1,m=this._y1,v,g,x,_,b,C,S,k;if(!i)return this;if(i.length)for(;;){if((b=v>=(x=(f+p)/2))?f=x:p=x,(C=g>=(_=(h+m)/2))?h=_:m=_,n=i,!(i=i[S=C<<1|b]))return this;if(!i.length)break;(n[S+1&3]||n[S+2&3]||n[S+3&3])&&(s=n,k=S)}for(;i.data!==e;)if(a=i,!(i=i.next))return this;return(u=i.next)&&delete i.next,a?(u?a.next=u:delete a.next,this):n?(u?n[S]=u:delete n[S],(i=n[0]||n[1]||n[2]||n[3])&&i===(n[3]||n[2]||n[1]||n[0])&&!i.length&&(s?s[k]=i:this._root=i),this):(this._root=u,this)}function KS(e){for(var n=0,i=e.length;n<i;++n)this.remove(e[n]);return this}function GS(){return this._root}function XS(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function YS(e){var n=[],i,s=this._root,a,u,f,h,p;for(s&&n.push(new St(s,this._x0,this._y0,this._x1,this._y1));i=n.pop();)if(!e(s=i.node,u=i.x0,f=i.y0,h=i.x1,p=i.y1)&&s.length){var m=(u+h)/2,v=(f+p)/2;(a=s[3])&&n.push(new St(a,m,v,h,p)),(a=s[2])&&n.push(new St(a,u,v,m,p)),(a=s[1])&&n.push(new St(a,m,f,h,v)),(a=s[0])&&n.push(new St(a,u,f,m,v))}return this}function ZS(e){var n=[],i=[],s;for(this._root&&n.push(new St(this._root,this._x0,this._y0,this._x1,this._y1));s=n.pop();){var a=s.node;if(a.length){var u,f=s.x0,h=s.y0,p=s.x1,m=s.y1,v=(f+p)/2,g=(h+m)/2;(u=a[0])&&n.push(new St(u,f,h,v,g)),(u=a[1])&&n.push(new St(u,v,h,p,g)),(u=a[2])&&n.push(new St(u,f,g,v,m)),(u=a[3])&&n.push(new St(u,v,g,p,m))}i.push(s)}for(;s=i.pop();)e(s.node,s.x0,s.y0,s.x1,s.y1);return this}function JS(e){return e[0]}function eb(e){return arguments.length?(this._x=e,this):this._x}function tb(e){return e[1]}function nb(e){return arguments.length?(this._y=e,this):this._y}function M0(e,n,i){var s=new Lf(n??JS,i??tb,NaN,NaN,NaN,NaN);return e==null?s:s.addAll(e)}function Lf(e,n,i,s,a,u){this._x=e,this._y=n,this._x0=i,this._y0=s,this._x1=a,this._y1=u,this._root=void 0}function Dg(e){for(var n={data:e.data},i=n;e=e.next;)i=i.next={data:e.data};return n}var bt=M0.prototype=Lf.prototype;bt.copy=function(){var e=new Lf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,i,s;if(!n)return e;if(!n.length)return e._root=Dg(n),e;for(i=[{source:n,target:e._root=new Array(4)}];n=i.pop();)for(var a=0;a<4;++a)(s=n.source[a])&&(s.length?i.push({source:s,target:n.target[a]=new Array(4)}):n.target[a]=Dg(s));return e};bt.add=US;bt.addAll=HS;bt.cover=qS;bt.data=VS;bt.extent=BS;bt.find=QS;bt.remove=WS;bt.removeAll=KS;bt.root=GS;bt.size=XS;bt.visit=YS;bt.visitAfter=ZS;bt.x=eb;bt.y=nb;function rb(e){const n=+this._x.call(null,e),i=+this._y.call(null,e),s=+this._z.call(null,e);return O0(this.cover(n,i,s),n,i,s,e)}function O0(e,n,i,s,a){if(isNaN(n)||isNaN(i)||isNaN(s))return e;var u,f=e._root,h={data:a},p=e._x0,m=e._y0,v=e._z0,g=e._x1,x=e._y1,_=e._z1,b,C,S,k,R,A,N,T,D,F,I;if(!f)return e._root=h,e;for(;f.length;)if((N=n>=(b=(p+g)/2))?p=b:g=b,(T=i>=(C=(m+x)/2))?m=C:x=C,(D=s>=(S=(v+_)/2))?v=S:_=S,u=f,!(f=f[F=D<<2|T<<1|N]))return u[F]=h,e;if(k=+e._x.call(null,f.data),R=+e._y.call(null,f.data),A=+e._z.call(null,f.data),n===k&&i===R&&s===A)return h.next=f,u?u[F]=h:e._root=h,e;do u=u?u[F]=new Array(8):e._root=new Array(8),(N=n>=(b=(p+g)/2))?p=b:g=b,(T=i>=(C=(m+x)/2))?m=C:x=C,(D=s>=(S=(v+_)/2))?v=S:_=S;while((F=D<<2|T<<1|N)===(I=(A>=S)<<2|(R>=C)<<1|k>=b));return u[I]=f,u[F]=h,e}function ib(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,i=new Float64Array(n),s=new Float64Array(n),a=new Float64Array(n);let u=1/0,f=1/0,h=1/0,p=-1/0,m=-1/0,v=-1/0;for(let g=0,x,_,b,C;g<n;++g)isNaN(_=+this._x.call(null,x=e[g]))||isNaN(b=+this._y.call(null,x))||isNaN(C=+this._z.call(null,x))||(i[g]=_,s[g]=b,a[g]=C,_<u&&(u=_),_>p&&(p=_),b<f&&(f=b),b>m&&(m=b),C<h&&(h=C),C>v&&(v=C));if(u>p||f>m||h>v)return this;this.cover(u,f,h).cover(p,m,v);for(let g=0;g<n;++g)O0(this,i[g],s[g],a[g],e[g]);return this}function ob(e,n,i){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(i=+i))return this;var s=this._x0,a=this._y0,u=this._z0,f=this._x1,h=this._y1,p=this._z1;if(isNaN(s))f=(s=Math.floor(e))+1,h=(a=Math.floor(n))+1,p=(u=Math.floor(i))+1;else{for(var m=f-s||1,v=this._root,g,x;s>e||e>=f||a>n||n>=h||u>i||i>=p;)switch(x=(i<u)<<2|(n<a)<<1|e<s,g=new Array(8),g[x]=v,v=g,m*=2,x){case 0:f=s+m,h=a+m,p=u+m;break;case 1:s=f-m,h=a+m,p=u+m;break;case 2:f=s+m,a=h-m,p=u+m;break;case 3:s=f-m,a=h-m,p=u+m;break;case 4:f=s+m,h=a+m,u=p-m;break;case 5:s=f-m,h=a+m,u=p-m;break;case 6:f=s+m,a=h-m,u=p-m;break;case 7:s=f-m,a=h-m,u=p-m;break}this._root&&this._root.length&&(this._root=v)}return this._x0=s,this._y0=a,this._z0=u,this._x1=f,this._y1=h,this._z1=p,this}function sb(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function lb(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Le(e,n,i,s,a,u,f){this.node=e,this.x0=n,this.y0=i,this.z0=s,this.x1=a,this.y1=u,this.z1=f}function ab(e,n,i,s){var a,u=this._x0,f=this._y0,h=this._z0,p,m,v,g,x,_,b=this._x1,C=this._y1,S=this._z1,k=[],R=this._root,A,N;for(R&&k.push(new Le(R,u,f,h,b,C,S)),s==null?s=1/0:(u=e-s,f=n-s,h=i-s,b=e+s,C=n+s,S=i+s,s*=s);A=k.pop();)if(!(!(R=A.node)||(p=A.x0)>b||(m=A.y0)>C||(v=A.z0)>S||(g=A.x1)<u||(x=A.y1)<f||(_=A.z1)<h))if(R.length){var T=(p+g)/2,D=(m+x)/2,F=(v+_)/2;k.push(new Le(R[7],T,D,F,g,x,_),new Le(R[6],p,D,F,T,x,_),new Le(R[5],T,m,F,g,D,_),new Le(R[4],p,m,F,T,D,_),new Le(R[3],T,D,v,g,x,F),new Le(R[2],p,D,v,T,x,F),new Le(R[1],T,m,v,g,D,F),new Le(R[0],p,m,v,T,D,F)),(N=(i>=F)<<2|(n>=D)<<1|e>=T)&&(A=k[k.length-1],k[k.length-1]=k[k.length-1-N],k[k.length-1-N]=A)}else{var I=e-+this._x.call(null,R.data),B=n-+this._y.call(null,R.data),K=i-+this._z.call(null,R.data),X=I*I+B*B+K*K;if(X<s){var se=Math.sqrt(s=X);u=e-se,f=n-se,h=i-se,b=e+se,C=n+se,S=i+se,a=R.data}}return a}const ub=(e,n,i,s,a,u)=>Math.sqrt((e-s)**2+(n-a)**2+(i-u)**2);function cb(e,n,i,s){const a=[],u=e-s,f=n-s,h=i-s,p=e+s,m=n+s,v=i+s;return this.visit((g,x,_,b,C,S,k)=>{if(!g.length)do{const R=g.data;ub(e,n,i,this._x(R),this._y(R),this._z(R))<=s&&a.push(R)}while(g=g.next);return x>p||_>m||b>v||C<u||S<f||k<h}),a}function fb(e){if(isNaN(x=+this._x.call(null,e))||isNaN(_=+this._y.call(null,e))||isNaN(b=+this._z.call(null,e)))return this;var n,i=this._root,s,a,u,f=this._x0,h=this._y0,p=this._z0,m=this._x1,v=this._y1,g=this._z1,x,_,b,C,S,k,R,A,N,T,D;if(!i)return this;if(i.length)for(;;){if((R=x>=(C=(f+m)/2))?f=C:m=C,(A=_>=(S=(h+v)/2))?h=S:v=S,(N=b>=(k=(p+g)/2))?p=k:g=k,n=i,!(i=i[T=N<<2|A<<1|R]))return this;if(!i.length)break;(n[T+1&7]||n[T+2&7]||n[T+3&7]||n[T+4&7]||n[T+5&7]||n[T+6&7]||n[T+7&7])&&(s=n,D=T)}for(;i.data!==e;)if(a=i,!(i=i.next))return this;return(u=i.next)&&delete i.next,a?(u?a.next=u:delete a.next,this):n?(u?n[T]=u:delete n[T],(i=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&i===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!i.length&&(s?s[D]=i:this._root=i),this):(this._root=u,this)}function hb(e){for(var n=0,i=e.length;n<i;++n)this.remove(e[n]);return this}function db(){return this._root}function pb(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function gb(e){var n=[],i,s=this._root,a,u,f,h,p,m,v;for(s&&n.push(new Le(s,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();)if(!e(s=i.node,u=i.x0,f=i.y0,h=i.z0,p=i.x1,m=i.y1,v=i.z1)&&s.length){var g=(u+p)/2,x=(f+m)/2,_=(h+v)/2;(a=s[7])&&n.push(new Le(a,g,x,_,p,m,v)),(a=s[6])&&n.push(new Le(a,u,x,_,g,m,v)),(a=s[5])&&n.push(new Le(a,g,f,_,p,x,v)),(a=s[4])&&n.push(new Le(a,u,f,_,g,x,v)),(a=s[3])&&n.push(new Le(a,g,x,h,p,m,_)),(a=s[2])&&n.push(new Le(a,u,x,h,g,m,_)),(a=s[1])&&n.push(new Le(a,g,f,h,p,x,_)),(a=s[0])&&n.push(new Le(a,u,f,h,g,x,_))}return this}function mb(e){var n=[],i=[],s;for(this._root&&n.push(new Le(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));s=n.pop();){var a=s.node;if(a.length){var u,f=s.x0,h=s.y0,p=s.z0,m=s.x1,v=s.y1,g=s.z1,x=(f+m)/2,_=(h+v)/2,b=(p+g)/2;(u=a[0])&&n.push(new Le(u,f,h,p,x,_,b)),(u=a[1])&&n.push(new Le(u,x,h,p,m,_,b)),(u=a[2])&&n.push(new Le(u,f,_,p,x,v,b)),(u=a[3])&&n.push(new Le(u,x,_,p,m,v,b)),(u=a[4])&&n.push(new Le(u,f,h,b,x,_,g)),(u=a[5])&&n.push(new Le(u,x,h,b,m,_,g)),(u=a[6])&&n.push(new Le(u,f,_,b,x,v,g)),(u=a[7])&&n.push(new Le(u,x,_,b,m,v,g))}i.push(s)}for(;s=i.pop();)e(s.node,s.x0,s.y0,s.z0,s.x1,s.y1,s.z1);return this}function yb(e){return e[0]}function vb(e){return arguments.length?(this._x=e,this):this._x}function xb(e){return e[1]}function _b(e){return arguments.length?(this._y=e,this):this._y}function wb(e){return e[2]}function kb(e){return arguments.length?(this._z=e,this):this._z}function R0(e,n,i,s){var a=new Ff(n??yb,i??xb,s??wb,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function Ff(e,n,i,s,a,u,f,h,p){this._x=e,this._y=n,this._z=i,this._x0=s,this._y0=a,this._z0=u,this._x1=f,this._y1=h,this._z1=p,this._root=void 0}function Ig(e){for(var n={data:e.data},i=n;e=e.next;)i=i.next={data:e.data};return n}var ut=R0.prototype=Ff.prototype;ut.copy=function(){var e=new Ff(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,i,s;if(!n)return e;if(!n.length)return e._root=Ig(n),e;for(i=[{source:n,target:e._root=new Array(8)}];n=i.pop();)for(var a=0;a<8;++a)(s=n.source[a])&&(s.length?i.push({source:s,target:n.target[a]=new Array(8)}):n.target[a]=Ig(s));return e};ut.add=rb;ut.addAll=ib;ut.cover=ob;ut.data=sb;ut.extent=lb;ut.find=ab;ut.findAllWithinRadius=cb;ut.remove=fb;ut.removeAll=hb;ut.root=db;ut.size=pb;ut.visit=gb;ut.visitAfter=mb;ut.x=vb;ut.y=_b;ut.z=kb;function Yn(e){return function(){return e}}function Wn(e){return(e()-.5)*1e-6}function Sb(e){return e.index}function Lg(e,n){var i=e.get(n);if(!i)throw new Error("node not found: "+n);return i}function bb(e){var n=Sb,i=x,s,a=Yn(30),u,f,h,p,m,v,g=1;e==null&&(e=[]);function x(k){return 1/Math.min(p[k.source.index],p[k.target.index])}function _(k){for(var R=0,A=e.length;R<g;++R)for(var N=0,T,D,F,I=0,B=0,K=0,X,se;N<A;++N)T=e[N],D=T.source,F=T.target,I=F.x+F.vx-D.x-D.vx||Wn(v),h>1&&(B=F.y+F.vy-D.y-D.vy||Wn(v)),h>2&&(K=F.z+F.vz-D.z-D.vz||Wn(v)),X=Math.sqrt(I*I+B*B+K*K),X=(X-u[N])/X*k*s[N],I*=X,B*=X,K*=X,F.vx-=I*(se=m[N]),h>1&&(F.vy-=B*se),h>2&&(F.vz-=K*se),D.vx+=I*(se=1-se),h>1&&(D.vy+=B*se),h>2&&(D.vz+=K*se)}function b(){if(f){var k,R=f.length,A=e.length,N=new Map(f.map((D,F)=>[n(D,F,f),D])),T;for(k=0,p=new Array(R);k<A;++k)T=e[k],T.index=k,typeof T.source!="object"&&(T.source=Lg(N,T.source)),typeof T.target!="object"&&(T.target=Lg(N,T.target)),p[T.source.index]=(p[T.source.index]||0)+1,p[T.target.index]=(p[T.target.index]||0)+1;for(k=0,m=new Array(A);k<A;++k)T=e[k],m[k]=p[T.source.index]/(p[T.source.index]+p[T.target.index]);s=new Array(A),C(),u=new Array(A),S()}}function C(){if(f)for(var k=0,R=e.length;k<R;++k)s[k]=+i(e[k],k,e)}function S(){if(f)for(var k=0,R=e.length;k<R;++k)u[k]=+a(e[k],k,e)}return _.initialize=function(k,...R){f=k,v=R.find(A=>typeof A=="function")||Math.random,h=R.find(A=>[1,2,3].includes(A))||2,b()},_.links=function(k){return arguments.length?(e=k,b(),_):e},_.id=function(k){return arguments.length?(n=k,_):n},_.iterations=function(k){return arguments.length?(g=+k,_):g},_.strength=function(k){return arguments.length?(i=typeof k=="function"?k:Yn(+k),C(),_):i},_.distance=function(k){return arguments.length?(a=typeof k=="function"?k:Yn(+k),S(),_):a},_}const Cb=1664525,Eb=1013904223,Fg=4294967296;function Pb(){let e=1;return()=>(e=(Cb*e+Eb)%Fg)/Fg}var $g=3;function Mc(e){return e.x}function Ug(e){return e.y}function Nb(e){return e.z}var Tb=10,jb=Math.PI*(3-Math.sqrt(5)),Mb=Math.PI*20/(9+Math.sqrt(221));function Ob(e,n){n=n||2;var i=Math.min($g,Math.max(1,Math.round(n))),s,a=1,u=.001,f=1-Math.pow(u,1/300),h=0,p=.6,m=new Map,v=Nf(_),g=Ns("tick","end"),x=Pb();e==null&&(e=[]);function _(){b(),g.call("tick",s),a<u&&(v.stop(),g.call("end",s))}function b(k){var R,A=e.length,N;k===void 0&&(k=1);for(var T=0;T<k;++T)for(a+=(h-a)*f,m.forEach(function(D){D(a)}),R=0;R<A;++R)N=e[R],N.fx==null?N.x+=N.vx*=p:(N.x=N.fx,N.vx=0),i>1&&(N.fy==null?N.y+=N.vy*=p:(N.y=N.fy,N.vy=0)),i>2&&(N.fz==null?N.z+=N.vz*=p:(N.z=N.fz,N.vz=0));return s}function C(){for(var k=0,R=e.length,A;k<R;++k){if(A=e[k],A.index=k,A.fx!=null&&(A.x=A.fx),A.fy!=null&&(A.y=A.fy),A.fz!=null&&(A.z=A.fz),isNaN(A.x)||i>1&&isNaN(A.y)||i>2&&isNaN(A.z)){var N=Tb*(i>2?Math.cbrt(.5+k):i>1?Math.sqrt(.5+k):k),T=k*jb,D=k*Mb;i===1?A.x=N:i===2?(A.x=N*Math.cos(T),A.y=N*Math.sin(T)):(A.x=N*Math.sin(T)*Math.cos(D),A.y=N*Math.cos(T),A.z=N*Math.sin(T)*Math.sin(D))}(isNaN(A.vx)||i>1&&isNaN(A.vy)||i>2&&isNaN(A.vz))&&(A.vx=0,i>1&&(A.vy=0),i>2&&(A.vz=0))}}function S(k){return k.initialize&&k.initialize(e,x,i),k}return C(),s={tick:b,restart:function(){return v.restart(_),s},stop:function(){return v.stop(),s},numDimensions:function(k){return arguments.length?(i=Math.min($g,Math.max(1,Math.round(k))),m.forEach(S),s):i},nodes:function(k){return arguments.length?(e=k,C(),m.forEach(S),s):e},alpha:function(k){return arguments.length?(a=+k,s):a},alphaMin:function(k){return arguments.length?(u=+k,s):u},alphaDecay:function(k){return arguments.length?(f=+k,s):+f},alphaTarget:function(k){return arguments.length?(h=+k,s):h},velocityDecay:function(k){return arguments.length?(p=1-k,s):1-p},randomSource:function(k){return arguments.length?(x=k,m.forEach(S),s):x},force:function(k,R){return arguments.length>1?(R==null?m.delete(k):m.set(k,S(R)),s):m.get(k)},find:function(){var k=Array.prototype.slice.call(arguments),R=k.shift()||0,A=(i>1?k.shift():null)||0,N=(i>2?k.shift():null)||0,T=k.shift()||1/0,D=0,F=e.length,I,B,K,X,se,ce;for(T*=T,D=0;D<F;++D)se=e[D],I=R-se.x,B=A-(se.y||0),K=N-(se.z||0),X=I*I+B*B+K*K,X<T&&(ce=se,T=X);return ce},on:function(k,R){return arguments.length>1?(g.on(k,R),s):g.on(k)}}}function Rb(){var e,n,i,s,a,u=Yn(-30),f,h=1,p=1/0,m=.81;function v(b){var C,S=e.length,k=(n===1?T0(e,Mc):n===2?M0(e,Mc,Ug):n===3?R0(e,Mc,Ug,Nb):null).visitAfter(x);for(a=b,C=0;C<S;++C)i=e[C],k.visit(_)}function g(){if(e){var b,C=e.length,S;for(f=new Array(C),b=0;b<C;++b)S=e[b],f[S.index]=+u(S,b,e)}}function x(b){var C=0,S,k,R=0,A,N,T,D,F=b.length;if(F){for(A=N=T=D=0;D<F;++D)(S=b[D])&&(k=Math.abs(S.value))&&(C+=S.value,R+=k,A+=k*(S.x||0),N+=k*(S.y||0),T+=k*(S.z||0));C*=Math.sqrt(4/F),b.x=A/R,n>1&&(b.y=N/R),n>2&&(b.z=T/R)}else{S=b,S.x=S.data.x,n>1&&(S.y=S.data.y),n>2&&(S.z=S.data.z);do C+=f[S.data.index];while(S=S.next)}b.value=C}function _(b,C,S,k,R){if(!b.value)return!0;var A=[S,k,R][n-1],N=b.x-i.x,T=n>1?b.y-i.y:0,D=n>2?b.z-i.z:0,F=A-C,I=N*N+T*T+D*D;if(F*F/m<I)return I<p&&(N===0&&(N=Wn(s),I+=N*N),n>1&&T===0&&(T=Wn(s),I+=T*T),n>2&&D===0&&(D=Wn(s),I+=D*D),I<h&&(I=Math.sqrt(h*I)),i.vx+=N*b.value*a/I,n>1&&(i.vy+=T*b.value*a/I),n>2&&(i.vz+=D*b.value*a/I)),!0;if(b.length||I>=p)return;(b.data!==i||b.next)&&(N===0&&(N=Wn(s),I+=N*N),n>1&&T===0&&(T=Wn(s),I+=T*T),n>2&&D===0&&(D=Wn(s),I+=D*D),I<h&&(I=Math.sqrt(h*I)));do b.data!==i&&(F=f[b.data.index]*a/I,i.vx+=N*F,n>1&&(i.vy+=T*F),n>2&&(i.vz+=D*F));while(b=b.next)}return v.initialize=function(b,...C){e=b,s=C.find(S=>typeof S=="function")||Math.random,n=C.find(S=>[1,2,3].includes(S))||2,g()},v.strength=function(b){return arguments.length?(u=typeof b=="function"?b:Yn(+b),g(),v):u},v.distanceMin=function(b){return arguments.length?(h=b*b,v):Math.sqrt(h)},v.distanceMax=function(b){return arguments.length?(p=b*b,v):Math.sqrt(p)},v.theta=function(b){return arguments.length?(m=b*b,v):Math.sqrt(m)},v}function Ab(e,n,i,s){var a,u,f=Yn(.1),h,p;typeof e!="function"&&(e=Yn(+e)),n==null&&(n=0),i==null&&(i=0),s==null&&(s=0);function m(g){for(var x=0,_=a.length;x<_;++x){var b=a[x],C=b.x-n||1e-6,S=(b.y||0)-i||1e-6,k=(b.z||0)-s||1e-6,R=Math.sqrt(C*C+S*S+k*k),A=(p[x]-R)*h[x]*g/R;b.vx+=C*A,u>1&&(b.vy+=S*A),u>2&&(b.vz+=k*A)}}function v(){if(a){var g,x=a.length;for(h=new Array(x),p=new Array(x),g=0;g<x;++g)p[g]=+e(a[g],g,a),h[g]=isNaN(p[g])?0:+f(a[g],g,a)}}return m.initialize=function(g,...x){a=g,u=x.find(_=>[1,2,3].includes(_))||2,v()},m.strength=function(g){return arguments.length?(f=typeof g=="function"?g:Yn(+g),v(),m):f},m.radius=function(g){return arguments.length?(e=typeof g=="function"?g:Yn(+g),v(),m):e},m.x=function(g){return arguments.length?(n=+g,m):n},m.y=function(g){return arguments.length?(i=+g,m):i},m.z=function(g){return arguments.length?(s=+g,m):s},m}const{abs:ts,cos:Bn,sin:Ui,acos:zb,atan2:ns,sqrt:_r,pow:Jt}=Math;function rs(e){return e<0?-Jt(-e,1/3):Jt(e,1/3)}const A0=Math.PI,ra=2*A0,wr=A0/2,Db=1e-6,Oc=Number.MAX_SAFE_INTEGER||9007199254740991,Rc=Number.MIN_SAFE_INTEGER||-9007199254740991,Ib={x:0,y:0,z:0},oe={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const i=n(e);let s=i.x*i.x+i.y*i.y;return typeof i.z<"u"&&(s+=i.z*i.z),_r(s)},compute:function(e,n,i){if(e===0)return n[0].t=0,n[0];const s=n.length-1;if(e===1)return n[s].t=1,n[s];const a=1-e;let u=n;if(s===0)return n[0].t=e,n[0];if(s===1){const h={x:a*u[0].x+e*u[1].x,y:a*u[0].y+e*u[1].y,t:e};return i&&(h.z=a*u[0].z+e*u[1].z),h}if(s<4){let h=a*a,p=e*e,m,v,g,x=0;s===2?(u=[u[0],u[1],u[2],Ib],m=h,v=a*e*2,g=p):s===3&&(m=h*a,v=h*e*3,g=a*p*3,x=e*p);const _={x:m*u[0].x+v*u[1].x+g*u[2].x+x*u[3].x,y:m*u[0].y+v*u[1].y+g*u[2].y+x*u[3].y,t:e};return i&&(_.z=m*u[0].z+v*u[1].z+g*u[2].z+x*u[3].z),_}const f=JSON.parse(JSON.stringify(n));for(;f.length>1;){for(let h=0;h<f.length-1;h++)f[h]={x:f[h].x+(f[h+1].x-f[h].x)*e,y:f[h].y+(f[h+1].y-f[h].y)*e},typeof f[h].z<"u"&&(f[h].z=f[h].z+(f[h+1].z-f[h].z)*e);f.splice(f.length-1,1)}return f[0].t=e,f[0]},computeWithRatios:function(e,n,i,s){const a=1-e,u=i,f=n;let h=u[0],p=u[1],m=u[2],v=u[3],g;if(h*=a,p*=e,f.length===2)return g=h+p,{x:(h*f[0].x+p*f[1].x)/g,y:(h*f[0].y+p*f[1].y)/g,z:s?(h*f[0].z+p*f[1].z)/g:!1,t:e};if(h*=a,p*=2*a,m*=e*e,f.length===3)return g=h+p+m,{x:(h*f[0].x+p*f[1].x+m*f[2].x)/g,y:(h*f[0].y+p*f[1].y+m*f[2].y)/g,z:s?(h*f[0].z+p*f[1].z+m*f[2].z)/g:!1,t:e};if(h*=a,p*=1.5*a,m*=3*a,v*=e*e*e,f.length===4)return g=h+p+m+v,{x:(h*f[0].x+p*f[1].x+m*f[2].x+v*f[3].x)/g,y:(h*f[0].y+p*f[1].y+m*f[2].y+v*f[3].y)/g,z:s?(h*f[0].z+p*f[1].z+m*f[2].z+v*f[3].z)/g:!1,t:e}},derive:function(e,n){const i=[];for(let s=e,a=s.length,u=a-1;a>1;a--,u--){const f=[];for(let h=0,p;h<u;h++)p={x:u*(s[h+1].x-s[h].x),y:u*(s[h+1].y-s[h].y)},n&&(p.z=u*(s[h+1].z-s[h].z)),f.push(p);i.push(f),s=f}return i},between:function(e,n,i){return n<=e&&e<=i||oe.approximately(e,n)||oe.approximately(e,i)},approximately:function(e,n,i){return ts(e-n)<=(i||Db)},length:function(e){const i=oe.Tvalues.length;let s=0;for(let a=0,u;a<i;a++)u=.5*oe.Tvalues[a]+.5,s+=oe.Cvalues[a]*oe.arcfn(u,e);return .5*s},map:function(e,n,i,s,a){const u=i-n,f=a-s,h=e-n,p=h/u;return s+f*p},lerp:function(e,n,i){const s={x:n.x+e*(i.x-n.x),y:n.y+e*(i.y-n.y)};return n.z!==void 0&&i.z!==void 0&&(s.z=n.z+e*(i.z-n.z)),s},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(oe.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,i){const s=n.x-e.x,a=n.y-e.y,u=i.x-e.x,f=i.y-e.y,h=s*f-a*u,p=s*u+a*f;return ns(h,p)},round:function(e,n){const i=""+e,s=i.indexOf(".");return parseFloat(i.substring(0,s+1+n))},dist:function(e,n){const i=e.x-n.x,s=e.y-n.y;return _r(i*i+s*s)},closest:function(e,n){let i=Jt(2,63),s,a;return e.forEach(function(u,f){a=oe.dist(n,u),a<i&&(i=a,s=f)}),{mdist:i,mpos:s}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const i=Jt(e,n)+Jt(1-e,n),s=i-1;return ts(s/i)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const i=Jt(1-e,n),s=Jt(e,n)+i;return i/s},lli8:function(e,n,i,s,a,u,f,h){const p=(e*s-n*i)*(a-f)-(e-i)*(a*h-u*f),m=(e*s-n*i)*(u-h)-(n-s)*(a*h-u*f),v=(e-i)*(u-h)-(n-s)*(a-f);return v==0?!1:{x:p/v,y:m/v}},lli4:function(e,n,i,s){const a=e.x,u=e.y,f=n.x,h=n.y,p=i.x,m=i.y,v=s.x,g=s.y;return oe.lli8(a,u,f,h,p,m,v,g)},lli:function(e,n){return oe.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new He(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Oc,i=Oc,s=Rc,a=Rc;return e.forEach(function(u){const f=u.bbox();n>f.x.min&&(n=f.x.min),i>f.y.min&&(i=f.y.min),s<f.x.max&&(s=f.x.max),a<f.y.max&&(a=f.y.max)}),{x:{min:n,mid:(n+s)/2,max:s,size:s-n},y:{min:i,mid:(i+a)/2,max:a,size:a-i}}},shapeintersections:function(e,n,i,s,a){if(!oe.bboxoverlap(n,s))return[];const u=[],f=[e.startcap,e.forward,e.back,e.endcap],h=[i.startcap,i.forward,i.back,i.endcap];return f.forEach(function(p){p.virtual||h.forEach(function(m){if(m.virtual)return;const v=p.intersects(m,a);v.length>0&&(v.c1=p,v.c2=m,v.s1=e,v.s2=i,u.push(v))})}),u},makeshape:function(e,n,i){const s=n.points.length,a=e.points.length,u=oe.makeline(n.points[s-1],e.points[0]),f=oe.makeline(e.points[a-1],n.points[0]),h={startcap:u,forward:e,back:n,endcap:f,bbox:oe.findbbox([u,e,n,f])};return h.intersections=function(p){return oe.shapeintersections(h,h.bbox,p,p.bbox,i)},h},getminmax:function(e,n,i){if(!i)return{min:0,max:0};let s=Oc,a=Rc,u,f;i.indexOf(0)===-1&&(i=[0].concat(i)),i.indexOf(1)===-1&&i.push(1);for(let h=0,p=i.length;h<p;h++)u=i[h],f=e.get(u),f[n]<s&&(s=f[n]),f[n]>a&&(a=f[n]);return{min:s,mid:(s+a)/2,max:a,size:a-s}},align:function(e,n){const i=n.p1.x,s=n.p1.y,a=-ns(n.p2.y-s,n.p2.x-i),u=function(f){return{x:(f.x-i)*Bn(a)-(f.y-s)*Ui(a),y:(f.x-i)*Ui(a)+(f.y-s)*Bn(a)}};return e.map(u)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const i=e.length-1,s=oe.align(e,n),a=function(F){return 0<=F&&F<=1};if(i===2){const F=s[0].y,I=s[1].y,B=s[2].y,K=F-2*I+B;if(K!==0){const X=-_r(I*I-F*B),se=-F+I,ce=-(X+se)/K,$=-(-X+se)/K;return[ce,$].filter(a)}else if(I!==B&&K===0)return[(2*I-B)/(2*I-2*B)].filter(a);return[]}const u=s[0].y,f=s[1].y,h=s[2].y,p=s[3].y;let m=-u+3*f-3*h+p,v=3*u-6*f+3*h,g=-3*u+3*f,x=u;if(oe.approximately(m,0)){if(oe.approximately(v,0))return oe.approximately(g,0)?[]:[-x/g].filter(a);const F=_r(g*g-4*v*x),I=2*v;return[(F-g)/I,(-g-F)/I].filter(a)}v/=m,g/=m,x/=m;const _=(3*g-v*v)/3,b=_/3,C=(2*v*v*v-9*v*g+27*x)/27,S=C/2,k=S*S+b*b*b;let R,A,N,T,D;if(k<0){const F=-_/3,I=F*F*F,B=_r(I),K=-C/(2*B),X=K<-1?-1:K>1?1:K,se=zb(X),ce=rs(B),$=2*ce;return N=$*Bn(se/3)-v/3,T=$*Bn((se+ra)/3)-v/3,D=$*Bn((se+2*ra)/3)-v/3,[N,T,D].filter(a)}else{if(k===0)return R=S<0?rs(-S):-rs(S),N=2*R-v/3,T=-R-v/3,[N,T].filter(a);{const F=_r(k);return R=rs(-S+F),A=rs(S+F),[R-A-v/3].filter(a)}}},droots:function(e){if(e.length===3){const n=e[0],i=e[1],s=e[2],a=n-2*i+s;if(a!==0){const u=-_r(i*i-n*s),f=-n+i,h=-(u+f)/a,p=-(-u+f)/a;return[h,p]}else if(i!==s&&a===0)return[(2*i-s)/(2*(i-s))];return[]}if(e.length===2){const n=e[0],i=e[1];return n!==i?[n/(n-i)]:[]}return[]},curvature:function(e,n,i,s,a){let u,f,h,p,m=0,v=0;const g=oe.compute(e,n),x=oe.compute(e,i),_=g.x*g.x+g.y*g.y;if(s?(u=_r(Jt(g.y*x.z-x.y*g.z,2)+Jt(g.z*x.x-x.z*g.x,2)+Jt(g.x*x.y-x.x*g.y,2)),f=Jt(_+g.z*g.z,3/2)):(u=g.x*x.y-g.y*x.x,f=Jt(_,3/2)),u===0||f===0)return{k:0,r:0};if(m=u/f,v=f/u,!a){const b=oe.curvature(e-.001,n,i,s,!0).k,C=oe.curvature(e+.001,n,i,s,!0).k;p=(C-m+(m-b))/2,h=(ts(C-m)+ts(m-b))/2}return{k:m,r:v,dk:p,adk:h}},inflections:function(e){if(e.length<4)return[];const n=oe.align(e,{p1:e[0],p2:e.slice(-1)[0]}),i=n[2].x*n[1].y,s=n[3].x*n[1].y,a=n[1].x*n[2].y,u=n[3].x*n[2].y,f=18*(-3*i+2*s+3*a-u),h=18*(3*i-s-3*a),p=18*(a-i);if(oe.approximately(f,0)){if(!oe.approximately(h,0)){let x=-p/h;if(0<=x&&x<=1)return[x]}return[]}const m=2*f;if(oe.approximately(m,0))return[];const v=h*h-4*f*p;if(v<0)return[];const g=Math.sqrt(v);return[(g-h)/m,-(h+g)/m].filter(function(x){return 0<=x&&x<=1})},bboxoverlap:function(e,n){const i=["x","y"],s=i.length;for(let a=0,u,f,h,p;a<s;a++)if(u=i[a],f=e[u].mid,h=n[u].mid,p=(e[u].size+n[u].size)/2,ts(f-h)>=p)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,i){const s=e.bbox(),a=n.bbox(),u=1e5,f=i||.5;if(s.x.size+s.y.size<f&&a.x.size+a.y.size<f)return[(u*(e._t1+e._t2)/2|0)/u+"/"+(u*(n._t1+n._t2)/2|0)/u];let h=e.split(.5),p=n.split(.5),m=[{left:h.left,right:p.left},{left:h.left,right:p.right},{left:h.right,right:p.right},{left:h.right,right:p.left}];m=m.filter(function(g){return oe.bboxoverlap(g.left.bbox(),g.right.bbox())});let v=[];return m.length===0||(m.forEach(function(g){v=v.concat(oe.pairiteration(g.left,g.right,f))}),v=v.filter(function(g,x){return v.indexOf(g)===x})),v},getccenter:function(e,n,i){const s=n.x-e.x,a=n.y-e.y,u=i.x-n.x,f=i.y-n.y,h=s*Bn(wr)-a*Ui(wr),p=s*Ui(wr)+a*Bn(wr),m=u*Bn(wr)-f*Ui(wr),v=u*Ui(wr)+f*Bn(wr),g=(e.x+n.x)/2,x=(e.y+n.y)/2,_=(n.x+i.x)/2,b=(n.y+i.y)/2,C=g+h,S=x+p,k=_+m,R=b+v,A=oe.lli8(g,x,C,S,_,b,k,R),N=oe.dist(A,e);let T=ns(e.y-A.y,e.x-A.x),D=ns(n.y-A.y,n.x-A.x),F=ns(i.y-A.y,i.x-A.x),I;return T<F?((T>D||D>F)&&(T+=ra),T>F&&(I=F,F=T,T=I)):F<D&&D<T?(I=F,F=T,T=I):F+=ra,A.s=T,A.e=F,A.r=N,A},numberSort:function(e,n){return e-n}};class hs{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return oe.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,i){return n+i})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var i=n[0].bbox(),s=1;s<n.length;s++)oe.expandbox(i,n[s].bbox());return i}offset(n){const i=[];return this.curves.forEach(function(s){i.push(...s.offset(n))}),new hs(i)}}const{abs:is,min:Hg,max:qg,cos:Lb,sin:Fb,acos:$b,sqrt:os}=Math,Ub=Math.PI;class He{constructor(n){let i=n&&n.forEach?n:Array.from(arguments).slice(),s=!1;if(typeof i[0]=="object"){s=i.length;const _=[];i.forEach(function(b){["x","y","z"].forEach(function(C){typeof b[C]<"u"&&_.push(b[C])})}),i=_}let a=!1;const u=i.length;if(s){if(s>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");a=!0}}else if(u!==6&&u!==8&&u!==9&&u!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const f=this._3d=!a&&(u===9||u===12)||n&&n[0]&&typeof n[0].z<"u",h=this.points=[];for(let _=0,b=f?3:2;_<u;_+=b){var p={x:i[_],y:i[_+1]};f&&(p.z=i[_+2]),h.push(p)}const m=this.order=h.length-1,v=this.dims=["x","y"];f&&v.push("z"),this.dimlen=v.length;const g=oe.align(h,{p1:h[0],p2:h[m]}),x=oe.dist(h[0],h[m]);this._linear=g.reduce((_,b)=>_+is(b.y),0)<x/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,i,s,a){if(typeof a>"u"&&(a=.5),a===0)return new He(i,i,s);if(a===1)return new He(n,i,i);const u=He.getABC(2,n,i,s,a);return new He(n,u.A,s)}static cubicFromPoints(n,i,s,a,u){typeof a>"u"&&(a=.5);const f=He.getABC(3,n,i,s,a);typeof u>"u"&&(u=oe.dist(i,f.C));const h=u*(1-a)/a,p=oe.dist(n,s),m=(s.x-n.x)/p,v=(s.y-n.y)/p,g=u*m,x=u*v,_=h*m,b=h*v,C={x:i.x-g,y:i.y-x},S={x:i.x+_,y:i.y+b},k=f.A,R={x:k.x+(C.x-k.x)/(1-a),y:k.y+(C.y-k.y)/(1-a)},A={x:k.x+(S.x-k.x)/a,y:k.y+(S.y-k.y)/a},N={x:n.x+(R.x-n.x)/a,y:n.y+(R.y-n.y)/a},T={x:s.x+(A.x-s.x)/(1-a),y:s.y+(A.y-s.y)/(1-a)};return new He(n,N,T,s)}static getUtils(){return oe}getUtils(){return He.getUtils()}static get PolyBezier(){return hs}valueOf(){return this.toString()}toString(){return oe.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,i=n[0].x,s=n[0].y,a=["M",i,s,this.order===2?"Q":"C"];for(let u=1,f=n.length;u<f;u++)a.push(n[u].x),a.push(n[u].y);return a.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,i){return""+i+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=oe.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,i=oe.angle(n[0],n[this.order],n[1]);this.clockwise=i>0}length(){return oe.length(this.derivative.bind(this))}static getABC(n=2,i,s,a,u=.5){const f=oe.projectionratio(u,n),h=1-f,p={x:f*i.x+h*a.x,y:f*i.y+h*a.y},m=oe.abcratio(u,n);return{A:{x:s.x+(s.x-p.x)/m,y:s.y+(s.y-p.y)/m},B:s,C:p,S:i,E:a}}getABC(n,i){i=i||this.get(n);let s=this.points[0],a=this.points[this.order];return He.getABC(this.order,s,i,a,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let i=0,s,a;i<n;i++)a=i/(n-1),s=this.compute(a),s.t=a,this._lut.push(s);return this._lut}on(n,i){i=i||5;const s=this.getLUT(),a=[];for(let u=0,f,h=0;u<s.length;u++)f=s[u],oe.dist(f,n)<i&&(a.push(f),h+=u/s.length);return a.length?t/=a.length:!1}project(n){const i=this.getLUT(),s=i.length-1,a=oe.closest(i,n),u=a.mpos,f=(u-1)/s,h=(u+1)/s,p=.1/s;let m=a.mdist,v=f,g=v,x;m+=1;for(let _;v<h+p;v+=p)x=this.compute(v),_=oe.dist(n,x),_<m&&(m=_,g=v);return g=g<0?0:g>1?1:g,x=this.compute(g),x.t=g,x.d=m,x}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?oe.computeWithRatios(n,this.points,this.ratios,this._3d):oe.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,i=[n[0]],s=n.length;for(let a=1,u,f;a<s;a++)u=n[a],f=n[a-1],i[a]={x:(s-a)/s*u.x+a/s*f.x,y:(s-a)/s*u.y+a/s*f.y};return i[s]=n[s-1],new He(i)}derivative(n){return oe.compute(n,this.dpoints[0],this._3d)}dderivative(n){return oe.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new He(oe.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return oe.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return oe.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const i=this.derivative(n),s=os(i.x*i.x+i.y*i.y);return{t:n,x:-i.y/s,y:i.x/s}}__normal3(n){const i=this.derivative(n),s=this.derivative(n+.01),a=os(i.x*i.x+i.y*i.y+i.z*i.z),u=os(s.x*s.x+s.y*s.y+s.z*s.z);i.x/=a,i.y/=a,i.z/=a,s.x/=u,s.y/=u,s.z/=u;const f={x:s.y*i.z-s.z*i.y,y:s.z*i.x-s.x*i.z,z:s.x*i.y-s.y*i.x},h=os(f.x*f.x+f.y*f.y+f.z*f.z);f.x/=h,f.y/=h,f.z/=h;const p=[f.x*f.x,f.x*f.y-f.z,f.x*f.z+f.y,f.x*f.y+f.z,f.y*f.y,f.y*f.z-f.x,f.x*f.z-f.y,f.y*f.z+f.x,f.z*f.z];return{t:n,x:p[0]*i.x+p[1]*i.y+p[2]*i.z,y:p[3]*i.x+p[4]*i.y+p[5]*i.z,z:p[6]*i.x+p[7]*i.y+p[8]*i.z}}hull(n){let i=this.points,s=[],a=[],u=0;for(a[u++]=i[0],a[u++]=i[1],a[u++]=i[2],this.order===3&&(a[u++]=i[3]);i.length>1;){s=[];for(let f=0,h,p=i.length-1;f<p;f++)h=oe.lerp(n,i[f],i[f+1]),a[u++]=h,s.push(h);i=s}return a}split(n,i){if(n===0&&i)return this.split(i).left;if(i===1)return this.split(n).right;const s=this.hull(n),a={left:this.order===2?new He([s[0],s[3],s[5]]):new He([s[0],s[4],s[7],s[9]]),right:this.order===2?new He([s[5],s[4],s[2]]):new He([s[9],s[8],s[6],s[3]]),span:s};return a.left._t1=oe.map(0,0,1,this._t1,this._t2),a.left._t2=oe.map(n,0,1,this._t1,this._t2),a.right._t1=oe.map(n,0,1,this._t1,this._t2),a.right._t2=oe.map(1,0,1,this._t1,this._t2),i?(i=oe.map(i,n,1,0,1),a.right.split(i).left):a}extrema(){const n={};let i=[];return this.dims.forEach((function(s){let a=function(f){return f[s]},u=this.dpoints[0].map(a);n[s]=oe.droots(u),this.order===3&&(u=this.dpoints[1].map(a),n[s]=n[s].concat(oe.droots(u))),n[s]=n[s].filter(function(f){return f>=0&&f<=1}),i=i.concat(n[s].sort(oe.numberSort))}).bind(this)),n.values=i.sort(oe.numberSort).filter(function(s,a){return i.indexOf(s)===a}),n}bbox(){const n=this.extrema(),i={};return this.dims.forEach((function(s){i[s]=oe.getminmax(this,s,n[s])}).bind(this)),i}overlaps(n){const i=this.bbox(),s=n.bbox();return oe.bboxoverlap(i,s)}offset(n,i){if(typeof i<"u"){const s=this.get(n),a=this.normal(n),u={c:s,n:a,x:s.x+a.x*i,y:s.y+a.y*i};return this._3d&&(u.z=s.z+a.z*i),u}if(this._linear){const s=this.normal(0),a=this.points.map(function(u){const f={x:u.x+n*s.x,y:u.y+n*s.y};return u.z&&s.z&&(f.z=u.z+n*s.z),f});return[new He(a)]}return this.reduce().map(function(s){return s._linear?s.offset(n)[0]:s.scale(n)})}simple(){if(this.order===3){const a=oe.angle(this.points[0],this.points[3],this.points[1]),u=oe.angle(this.points[0],this.points[3],this.points[2]);if(a>0&&u<0||a<0&&u>0)return!1}const n=this.normal(0),i=this.normal(1);let s=n.x*i.x+n.y*i.y;return this._3d&&(s+=n.z*i.z),is($b(s))<Ub/3}reduce(){let n,i=0,s=0,a=.01,u,f=[],h=[],p=this.extrema().values;for(p.indexOf(0)===-1&&(p=[0].concat(p)),p.indexOf(1)===-1&&p.push(1),i=p[0],n=1;n<p.length;n++)s=p[n],u=this.split(i,s),u._t1=i,u._t2=s,f.push(u),i=s;return f.forEach(function(m){for(i=0,s=0;s<=1;)for(s=i+a;s<=1+a;s+=a)if(u=m.split(i,s),!u.simple()){if(s-=a,is(i-s)<a)return[];u=m.split(i,s),u._t1=oe.map(i,0,1,m._t1,m._t2),u._t2=oe.map(s,0,1,m._t1,m._t2),h.push(u),i=s;break}i<1&&(u=m.split(i,1),u._t1=oe.map(i,0,1,m._t1,m._t2),u._t2=m._t2,h.push(u))}),h}translate(n,i,s){s=typeof s=="number"?s:i;const a=this.order;let u=this.points.map((f,h)=>(1-h/a)*i+h/a*s);return new He(this.points.map((f,h)=>({x:f.x+n.x*u[h],y:f.y+n.y*u[h]})))}scale(n){const i=this.order;let s=!1;if(typeof n=="function"&&(s=n),s&&i===2)return this.raise().scale(s);const a=this.clockwise,u=this.points;if(this._linear)return this.translate(this.normal(0),s?s(0):n,s?s(1):n);const f=s?s(0):n,h=s?s(1):n,p=[this.offset(0,10),this.offset(1,10)],m=[],v=oe.lli4(p[0],p[0].c,p[1],p[1].c);if(!v)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(g){const x=m[g*i]=oe.copy(u[g*i]);x.x+=(g?h:f)*p[g].n.x,x.y+=(g?h:f)*p[g].n.y}),s?([0,1].forEach(function(g){if(!(i===2&&g)){var x=u[g+1],_={x:x.x-v.x,y:x.y-v.y},b=s?s((g+1)/i):n;s&&!a&&(b=-b);var C=os(_.x*_.x+_.y*_.y);_.x/=C,_.y/=C,m[g+1]={x:x.x+b*_.x,y:x.y+b*_.y}}}),new He(m)):([0,1].forEach(g=>{if(i===2&&g)return;const x=m[g*i],_=this.derivative(g),b={x:x.x+_.x,y:x.y+_.y};m[g+1]=oe.lli4(x,b,v,u[g+1])}),new He(m))}outline(n,i,s,a){if(i=i===void 0?n:i,this._linear){const T=this.normal(0),D=this.points[0],F=this.points[this.points.length-1];let I,B,K;s===void 0&&(s=n,a=i),I={x:D.x+T.x*n,y:D.y+T.y*n},K={x:F.x+T.x*s,y:F.y+T.y*s},B={x:(I.x+K.x)/2,y:(I.y+K.y)/2};const X=[I,B,K];I={x:D.x-T.x*i,y:D.y-T.y*i},K={x:F.x-T.x*a,y:F.y-T.y*a},B={x:(I.x+K.x)/2,y:(I.y+K.y)/2};const se=[K,B,I],ce=oe.makeline(se[2],X[0]),$=oe.makeline(X[2],se[0]),ne=[ce,new He(X),$,new He(se)];return new hs(ne)}const u=this.reduce(),f=u.length,h=[];let p=[],m,v=0,g=this.length();const x=typeof s<"u"&&typeof a<"u";function _(T,D,F,I,B){return function(K){const X=I/F,se=(I+B)/F,ce=D-T;return oe.map(K,0,1,T+X*ce,T+se*ce)}}u.forEach(function(T){const D=T.length();x?(h.push(T.scale(_(n,s,g,v,D))),p.push(T.scale(_(-i,-a,g,v,D)))):(h.push(T.scale(n)),p.push(T.scale(-i))),v+=D}),p=p.map(function(T){return m=T.points,m[3]?T.points=[m[3],m[2],m[1],m[0]]:T.points=[m[2],m[1],m[0]],T}).reverse();const b=h[0].points[0],C=h[f-1].points[h[f-1].points.length-1],S=p[f-1].points[p[f-1].points.length-1],k=p[0].points[0],R=oe.makeline(S,b),A=oe.makeline(C,k),N=[R].concat(h).concat([A]).concat(p);return new hs(N)}outlineshapes(n,i,s){i=i||n;const a=this.outline(n,i).curves,u=[];for(let f=1,h=a.length;f<h/2;f++){const p=oe.makeshape(a[f],a[h-f],s);p.startcap.virtual=f>1,p.endcap.virtual=f<h/2-1,u.push(p)}return u}intersects(n,i){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof He&&(n=n.reduce()),this.curveintersects(this.reduce(),n,i)):this.selfintersects(i)}lineIntersects(n){const i=Hg(n.p1.x,n.p2.x),s=Hg(n.p1.y,n.p2.y),a=qg(n.p1.x,n.p2.x),u=qg(n.p1.y,n.p2.y);return oe.roots(this.points,n).filter(f=>{var h=this.get(f);return oe.between(h.x,i,a)&&oe.between(h.y,s,u)})}selfintersects(n){const i=this.reduce(),s=i.length-2,a=[];for(let u=0,f,h,p;u<s;u++)h=i.slice(u,u+1),p=i.slice(u+2),f=this.curveintersects(h,p,n),a.push(...f);return a}curveintersects(n,i,s){const a=[];n.forEach(function(f){i.forEach(function(h){f.overlaps(h)&&a.push({left:f,right:h})})});let u=[];return a.forEach(function(f){const h=oe.pairiteration(f.left,f.right,s);h.length>0&&(u=u.concat(h))}),u}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,i,s,a){const u=(a-s)/4,f=this.get(s+u),h=this.get(a-u),p=oe.dist(n,i),m=oe.dist(n,f),v=oe.dist(n,h);return is(m-p)+is(v-p)}_iterate(n,i){let s=0,a=1,u;do{u=0,a=1;let f=this.get(s),h,p,m,v,g=!1,x=!1,_,b=a,C=1;do if(x=g,v=m,b=(s+a)/2,h=this.get(b),p=this.get(a),m=oe.getccenter(f,h,p),m.interval={start:s,end:a},g=this._error(m,f,s,a)<=n,_=x&&!g,_||(C=a),g){if(a>=1){if(m.interval.end=C=1,v=m,a>1){let k={x:m.x+m.r*Lb(m.e),y:m.y+m.r*Fb(m.e)};m.e+=oe.angle({x:m.x,y:m.y},k,this.get(1))}break}a=a+(a-s)/2}else a=b;while(!_&&u++<100);if(u>=100)break;v=v||m,i.push(v),s=C}while(a<1);return i}}function mf(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function Hb(e){if(Array.isArray(e))return e}function qb(e){if(Array.isArray(e))return mf(e)}function Vb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bb(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n!==0)for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function Qb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
134
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
135
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kb(e,n){if(e==null)return{};var i,s,a=Gb(e,n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(s=0;s<u.length;s++)i=u[s],n.includes(i)||{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}function Gb(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.includes(s))continue;i[s]=e[s]}return i}function Xb(e,n){return Hb(e)||Bb(e,n)||z0(e,n)||Qb()}function Yb(e){return qb(e)||Vb(e)||z0(e)||Wb()}function Zb(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jb(e){var n=Zb(e,"string");return typeof n=="symbol"?n:n+""}function z0(e,n){if(e){if(typeof e=="string")return mf(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?mf(e,n):void 0}}var eC=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(h){return{keyAccessor:h,isProp:!(h instanceof Function)}}),u=e.reduce(function(h,p){var m=h,v=p;return a.forEach(function(g,x){var _=g.keyAccessor,b=g.isProp,C;if(b){var S=v,k=S[_],R=Kb(S,[_].map(Jb));C=k,v=R}else C=_(v,x);x+1<a.length?(m.hasOwnProperty(C)||(m[C]={}),m=m[C]):i?(m.hasOwnProperty(C)||(m[C]=[]),m[C].push(v)):m[C]=v}),h},{});i instanceof Function&&function h(p){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;m===a.length?Object.keys(p).forEach(function(v){return p[v]=i(p[v])}):Object.values(p).forEach(function(v){return h(v,m+1)})}(u);var f=u;return s&&(f=[],function h(p){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];m.length===a.length?f.push({keys:m,vals:p}):Object.entries(p).forEach(function(v){var g=Xb(v,2),x=g[0],_=g[1];return h(_,[].concat(Yb(m),[x]))})}(u),n instanceof Array&&n.length===0&&f.length===1&&(f[0].keys=[])),f};function tC(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const Vg=Symbol("implicit");function D0(){var e=new fg,n=[],i=[],s=Vg;function a(u){let f=e.get(u);if(f===void 0){if(s!==Vg)return s;e.set(u,f=n.push(u)-1)}return i[f%i.length]}return a.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new fg;for(const f of u)e.has(f)||e.set(f,n.push(f)-1);return a},a.range=function(u){return arguments.length?(i=Array.from(u),a):i.slice()},a.unknown=function(u){return arguments.length?(s=u,a):s},a.copy=function(){return D0(n,i).unknown(s)},tC.apply(a,arguments),a}function nC(e){for(var n=e.length/6|0,i=new Array(n),s=0;s<n;)i[s]="#"+e.slice(s*6,++s*6);return i}const rC=nC("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function iC(e,n){n===void 0&&(n={});var i=n.insertAt;if(!(typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i==="top"&&s.firstChild?s.insertBefore(a,s.firstChild):s.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var oC=`.force-graph-container canvas {
136
+ display: block;
137
+ user-select: none;
138
+ outline: none;
139
+ -webkit-tap-highlight-color: transparent;
140
+ }
141
+
142
+ .force-graph-container .clickable {
143
+ cursor: pointer;
144
+ }
145
+
146
+ .force-graph-container .grabbable {
147
+ cursor: move;
148
+ cursor: grab;
149
+ cursor: -moz-grab;
150
+ cursor: -webkit-grab;
151
+ }
152
+
153
+ .force-graph-container .grabbable:active {
154
+ cursor: grabbing;
155
+ cursor: -moz-grabbing;
156
+ cursor: -webkit-grabbing;
157
+ }
158
+ `;iC(oC);function yf(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function sC(e){if(Array.isArray(e))return e}function lC(e){if(Array.isArray(e))return yf(e)}function Bg(e,n,i){if(I0())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,n);var a=new(e.bind.apply(e,s));return a}function ws(e,n,i){return(n=dC(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function I0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I0=function(){return!!e})()}function aC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uC(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,a,u,f,h=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n!==0)for(;!(p=(s=u.call(i)).done)&&(h.push(s.value),h.length!==n);p=!0);}catch(v){m=!0,a=v}finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(m)throw a}}return h}}function cC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
159
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
160
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qg(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,s)}return i}function Hi(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Qg(Object(i),!0).forEach(function(s){ws(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Qg(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function ds(e,n){return sC(e)||uC(e,n)||L0(e,n)||cC()}function nn(e){return lC(e)||aC(e)||L0(e)||fC()}function hC(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function dC(e){var n=hC(e,"string");return typeof n=="symbol"?n:n+""}function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vf(e)}function L0(e,n){if(e){if(typeof e=="string")return yf(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?yf(e,n):void 0}}var pC=D0(rC);function Wg(e,n,i){!n||typeof i!="string"||e.filter(function(s){return!s[i]}).forEach(function(s){s[i]=pC(n(s))})}function gC(e,n){var i=e.nodes,s=e.links,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=a.nodeFilter,f=u===void 0?function(){return!0}:u,h=a.onLoopError,p=h===void 0?function(_){throw"Invalid DAG structure! Found cycle in node path: ".concat(_.join(" -> "),".")}:h,m={};i.forEach(function(_){return m[n(_)]={data:_,out:[],depth:-1,skip:!f(_)}}),s.forEach(function(_){var b=_.source,C=_.target,S=N(b),k=N(C);if(!m.hasOwnProperty(S))throw"Missing source node with id: ".concat(S);if(!m.hasOwnProperty(k))throw"Missing target node with id: ".concat(k);var R=m[S],A=m[k];R.out.push(A);function N(T){return vf(T)==="object"?n(T):T}});var v=[];x(Object.values(m));var g=Object.assign.apply(Object,[{}].concat(nn(Object.entries(m).filter(function(_){var b=ds(_,2),C=b[1];return!C.skip}).map(function(_){var b=ds(_,2),C=b[0],S=b[1];return ws({},C,S.depth)}))));return g;function x(_){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,S=function(){var N=_[k];if(b.indexOf(N)!==-1){var T=[].concat(nn(b.slice(b.indexOf(N))),[N]).map(function(D){return n(D.data)});return v.some(function(D){return D.length===T.length&&D.every(function(F,I){return F===T[I]})})||(v.push(T),p(T)),1}C>N.depth&&(N.depth=C,x(N.out,[].concat(nn(b),[N]),C+(N.skip?0:1)))},k=0,R=_.length;k<R;k++)S()}}var mC=2,gt=function(n,i){return i.onNeedsRedraw&&i.onNeedsRedraw()},Kg=function(n,i){if(!i.isShadow){var s=Ie(i.linkDirectionalParticles);i.graphData.links.forEach(function(a){var u=Math.round(Math.abs(s(a)));u?a.__photons=nn(Array(u)).map(function(){return{}}):delete a.__photons})}},ba=Of({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,i){i.engineRunning=!1,Kg(n,i)}},dagMode:{onChange:function(n,i){!n&&(i.graphData.nodes||[]).forEach(function(s){return s.fx=s.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:gt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:gt},nodeColor:{default:"color",triggerUpdate:!1,onChange:gt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:gt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:gt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:gt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:gt},linkColor:{default:"color",triggerUpdate:!1,onChange:gt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:gt},linkWidth:{default:1,triggerUpdate:!1,onChange:gt},linkCurvature:{default:0,triggerUpdate:!1,onChange:gt},linkCanvasObject:{triggerUpdate:!1,onChange:gt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:gt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:gt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:gt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:gt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Kg},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,i){i.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,i){i.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,i){i.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,i,s){return s===void 0?n.forceLayout.force(i):(n.forceLayout.force(i,s),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&i(),a(),!n.isShadow&&u(),!n.isShadow&&f(),s(),this;function i(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function s(){var h=Ie(n.nodeVisibility),p=Ie(n.nodeVal),m=Ie(n.nodeColor),v=Ie(n.nodeCanvasObjectMode),g=n.ctx,x=n.isShadow/n.globalScale,_=n.graphData.nodes.filter(h);g.save(),_.forEach(function(b){var C=v(b);if(n.nodeCanvasObject&&(C==="before"||C==="replace")&&(n.nodeCanvasObject(b,g,n.globalScale),C==="replace")){g.restore();return}var S=Math.sqrt(Math.max(0,p(b)||1))*n.nodeRelSize+x;g.beginPath(),g.arc(b.x,b.y,S,0,2*Math.PI,!1),g.fillStyle=m(b)||"rgba(31, 120, 180, 0.92)",g.fill(),n.nodeCanvasObject&&C==="after"&&n.nodeCanvasObject(b,n.ctx,n.globalScale)}),g.restore()}function a(){var h=Ie(n.linkVisibility),p=Ie(n.linkColor),m=Ie(n.linkWidth),v=Ie(n.linkLineDash),g=Ie(n.linkCurvature),x=Ie(n.linkCanvasObjectMode),_=n.ctx,b=n.isShadow*2,C=n.graphData.links.filter(h);C.forEach(D);var S=[],k=[],R=C;if(n.linkCanvasObject){var A=[],N=[];C.forEach(function(F){return({before:S,after:k,replace:A}[x(F)]||N).push(F)}),R=[].concat(nn(S),k,N),S=S.concat(A)}_.save(),S.forEach(function(F){return n.linkCanvasObject(F,_,n.globalScale)}),_.restore();var T=eC(R,[p,m,v]);_.save(),Object.entries(T).forEach(function(F){var I=ds(F,2),B=I[0],K=I[1],X=!B||B==="undefined"?"rgba(0,0,0,0.15)":B;Object.entries(K).forEach(function(se){var ce=ds(se,2),$=ce[0],ne=ce[1],W=($||1)/n.globalScale+b;Object.entries(ne).forEach(function(re){var Q=ds(re,2);Q[0];var Z=Q[1],G=v(Z[0]);_.beginPath(),Z.forEach(function(O){var V=O.source,fe=O.target;if(!(!V||!fe||!V.hasOwnProperty("x")||!fe.hasOwnProperty("x"))){_.moveTo(V.x,V.y);var de=O.__controlPoints;de?_[de.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(_,nn(de).concat([fe.x,fe.y])):_.lineTo(fe.x,fe.y)}}),_.strokeStyle=X,_.lineWidth=W,_.setLineDash(G||[]),_.stroke()})})}),_.restore(),_.save(),k.forEach(function(F){return n.linkCanvasObject(F,_,n.globalScale)}),_.restore();function D(F){var I=g(F);if(!I){F.__controlPoints=null;return}var B=F.source,K=F.target;if(!(!B||!K||!B.hasOwnProperty("x")||!K.hasOwnProperty("x"))){var X=Math.sqrt(Math.pow(K.x-B.x,2)+Math.pow(K.y-B.y,2));if(X>0){var se=Math.atan2(K.y-B.y,K.x-B.x),ce=X*I,$={x:(B.x+K.x)/2+ce*Math.cos(se-Math.PI/2),y:(B.y+K.y)/2+ce*Math.sin(se-Math.PI/2)};F.__controlPoints=[$.x,$.y]}else{var ne=I*70;F.__controlPoints=[K.x,K.y-ne,K.x+ne,K.y]}}}}function u(){var h=1.6,p=.2,m=Ie(n.linkDirectionalArrowLength),v=Ie(n.linkDirectionalArrowRelPos),g=Ie(n.linkVisibility),x=Ie(n.linkDirectionalArrowColor||n.linkColor),_=Ie(n.nodeVal),b=n.ctx;b.save(),n.graphData.links.filter(g).forEach(function(C){var S=m(C);if(!(!S||S<0)){var k=C.source,R=C.target;if(!(!k||!R||!k.hasOwnProperty("x")||!R.hasOwnProperty("x"))){var A=Math.sqrt(Math.max(0,_(k)||1))*n.nodeRelSize,N=Math.sqrt(Math.max(0,_(R)||1))*n.nodeRelSize,T=Math.min(1,Math.max(0,v(C))),D=x(C)||"rgba(0,0,0,0.28)",F=S/h/2,I=C.__controlPoints&&Bg(He,[k.x,k.y].concat(nn(C.__controlPoints),[R.x,R.y])),B=I?function(W){return I.get(W)}:function(W){return{x:k.x+(R.x-k.x)*W||0,y:k.y+(R.y-k.y)*W||0}},K=I?I.length():Math.sqrt(Math.pow(R.x-k.x,2)+Math.pow(R.y-k.y,2)),X=A+S+(K-A-N-S)*T,se=B(X/K),ce=B((X-S)/K),$=B((X-S*(1-p))/K),ne=Math.atan2(se.y-ce.y,se.x-ce.x)-Math.PI/2;b.beginPath(),b.moveTo(se.x,se.y),b.lineTo(ce.x+F*Math.cos(ne),ce.y+F*Math.sin(ne)),b.lineTo($.x,$.y),b.lineTo(ce.x-F*Math.cos(ne),ce.y-F*Math.sin(ne)),b.fillStyle=D,b.fill()}}}),b.restore()}function f(){var h=Ie(n.linkDirectionalParticles),p=Ie(n.linkDirectionalParticleSpeed),m=Ie(n.linkDirectionalParticleWidth),v=Ie(n.linkVisibility),g=Ie(n.linkDirectionalParticleColor||n.linkColor),x=n.ctx;x.save(),n.graphData.links.filter(v).forEach(function(_){var b=h(_);if(!(!_.hasOwnProperty("__photons")||!_.__photons.length)){var C=_.source,S=_.target;if(!(!C||!S||!C.hasOwnProperty("x")||!S.hasOwnProperty("x"))){var k=p(_),R=_.__photons||[],A=Math.max(0,m(_)/2)/Math.sqrt(n.globalScale),N=g(_)||"rgba(0,0,0,0.28)";x.fillStyle=N;var T=_.__controlPoints?Bg(He,[C.x,C.y].concat(nn(_.__controlPoints),[S.x,S.y])):null,D=0,F=!1;R.forEach(function(I){var B=!!I.__singleHop;if(I.hasOwnProperty("__progressRatio")||(I.__progressRatio=B?0:D/b),!B&&D++,I.__progressRatio+=k,I.__progressRatio>=1)if(!B)I.__progressRatio=I.__progressRatio%1;else{F=!0;return}var K=I.__progressRatio,X=T?T.get(K):{x:C.x+(S.x-C.x)*K||0,y:C.y+(S.y-C.y)*K||0};x.beginPath(),x.arc(X.x,X.y,A,0,2*Math.PI,!1),x.fill()}),F&&(_.__photons=_.__photons.filter(function(I){return!I.__singleHop||I.__progressRatio<=1}))}}}),x.restore()}},emitParticle:function(n,i){return i&&(!i.__photons&&(i.__photons=[]),i.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Ob().force("link",bb()).force("charge",Rb()).force("center",ES()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,i){i.ctx=n},update:function(n,i){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Wg(n.graphData.nodes,Ie(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Wg(n.graphData.links,Ie(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(x){x.source=x[n.linkSource],x.target=x[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var s=n.forceLayout.force("link");s&&s.id(function(x){return x[n.nodeId]}).links(n.graphData.links);var a=n.dagMode&&gC(n.graphData,function(x){return x[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),u=Math.max.apply(Math,nn(Object.values(a||[]))),f=n.dagLevelDistance||n.graphData.nodes.length/(u||1)*mC*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(i.dagMode)){var h=["lr","rl"].includes(i.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(x){return delete x[h]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var p=["rl","bu"].includes(n.dagMode),m=function(_){return(a[_[n.nodeId]]-u/2)*f*(p?-1:1)},v=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(x){return x[v]=m(x)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?Ab(function(x){var _=a[x[n.nodeId]]||-1;return(n.dagMode==="radialin"?u-_:_)*f}).strength(function(x){return n.dagNodeFilter(x)?1:0}):null);for(var g=0;g<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);g++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function F0(e,n){var i=e instanceof Array?e:[e],s=new n;return s._destructor&&s._destructor(),{linkProp:function(u){return{default:s[u](),onChange:function(h,p){i.forEach(function(m){return p[m][u](h)})},triggerUpdate:!1}},linkMethod:function(u){return function(f){for(var h=arguments.length,p=new Array(h>1?h-1:0),m=1;m<h;m++)p[m-1]=arguments[m];var v=[];return i.forEach(function(g){var x=f[g],_=x[u].apply(x,p);_!==x&&v.push(_)}),v.length?v[0]:this}}}}var yC=800,vC=4,xC=5,$0=F0("forceGraph",ba),_C=F0(["forceGraph","shadowGraph"],ba),wC=Object.assign.apply(Object,nn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return ws({},e,$0.linkProp(e))})).concat(nn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return ws({},e,_C.linkProp(e))})))),kC=Object.assign.apply(Object,nn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return ws({},e,$0.linkMethod(e))})));function Ac(e){if(e.canvas){var n=e.canvas.width,i=e.canvas.height;n===300&&i===150&&(n=i=0);var s=window.devicePixelRatio;n/=s,i/=s,[e.canvas,e.shadowCanvas].forEach(function(u){u.style.width="".concat(e.width,"px"),u.style.height="".concat(e.height,"px"),u.width=e.width*s,u.height=e.height*s,!n&&!i&&u.getContext("2d").scale(s,s)});var a=bn(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/a,(e.height-i)/2/a),e.needsRedraw=!0}}function U0(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Gg(e,n,i){e.save(),U0(e),e.clearRect(0,0,n,i),e.restore()}var SC=Of({props:Hi({width:{default:window.innerWidth,onChange:function(n,i){return Ac(i)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,i){return Ac(i)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,i){[n.nodes,n.links].every(function(a){return(a||[]).every(function(u){return!u.hasOwnProperty("__indexColor")})})&&i.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(s),i.forceGraph.graphData(n),i.shadowGraph.graphData(n);function s(a){var u=a.type,f=a.objs;f.filter(function(h){if(!h.hasOwnProperty("__indexColor"))return!0;var p=i.colorTracker.lookup(h.__indexColor);return!p||!p.hasOwnProperty("d")||p.d!==h}).forEach(function(h){h.__indexColor=i.colorTracker.register({type:u,d:h})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,i){i.canvas&&n&&(i.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,i){i.shadowGraph.nodeCanvasObject(n?function(s,a,u){return n(s,s.__indexColor,a,u)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,i){i.shadowGraph.linkCanvasObject(n?function(s,a,u){return n(s,s.__indexColor,a,u)}:null),i.flushShadowCanvas&&i.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,i){i.zoom.scaleExtent([n,i.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,i){i.zoom.scaleExtent([i.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,i){i.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},wC),aliases:{stopAnimation:"pauseAnimation"},methods:Hi({graph2ScreenCoords:function(n,i,s){var a=bn(n.canvas);return{x:i*a.k+a.x,y:s*a.k+a.y}},screen2GraphCoords:function(n,i,s){var a=bn(n.canvas);return{x:(i-a.x)/a.k,y:(s-a.y)/a.k}},centerAt:function(n,i,s,a){if(!n.canvas)return null;if(i!==void 0||s!==void 0){var u=Object.assign({},i!==void 0?{x:i}:{},s!==void 0?{y:s}:{});return a?n.tweenGroup.add(new vg(f()).to(u,a).easing(ci.Quadratic.Out).onUpdate(h).start()):h(u),this}return f();function f(){var p=bn(n.canvas);return{x:(n.width/2-p.x)/p.k,y:(n.height/2-p.y)/p.k}}function h(p){var m=p.x,v=p.y;n.zoom.translateTo(n.zoom.__baseElem,m===void 0?f().x:m,v===void 0?f().y:v),n.needsRedraw=!0}},zoom:function(n,i,s){if(!n.canvas)return null;if(i!==void 0)return s?n.tweenGroup.add(new vg({k:a()}).to({k:i},s).easing(ci.Quadratic.Out).onUpdate(function(f){var h=f.k;return u(h)}).start()):u(i),this;return a();function a(){return bn(n.canvas).k}function u(f){n.zoom.scaleTo(n.zoom.__baseElem,f),n.needsRedraw=!0}},zoomToFit:function(n){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length,u=new Array(a>3?a-3:0),f=3;f<a;f++)u[f-3]=arguments[f];var h=this.getGraphBbox.apply(this,u);if(h){var p={x:(h.x[0]+h.x[1])/2,y:(h.y[0]+h.y[1])/2},m=Math.max(1e-12,Math.min(1e12,(n.width-s*2)/(h.x[1]-h.x[0]),(n.height-s*2)/(h.y[1]-h.y[0])));this.centerAt(p.x,p.y,i),this.zoom(m,i)}return this},getGraphBbox:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},s=Ie(n.nodeVal),a=function(h){return Math.sqrt(Math.max(0,s(h)||1))*n.nodeRelSize},u=n.graphData.nodes.filter(i).map(function(f){return{x:f.x,y:f.y,r:a(f)}});return u.length?{x:[pg(u,function(f){return f.x-f.r}),dg(u,function(f){return f.x+f.r})],y:[pg(u,function(f){return f.y-f.r}),dg(u,function(f){return f.y+f.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},kC),stateInit:function(){return{lastSetZoom:1,zoom:A2(),forceGraph:new ba,shadowGraph:new ba().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new iS,tweenGroup:new u0}},init:function(n,i){var s=this;n.innerHTML="";var a=document.createElement("div");a.classList.add("force-graph-container"),a.style.position="relative",n.appendChild(a),i.canvas=document.createElement("canvas"),i.backgroundColor&&(i.canvas.style.background=i.backgroundColor),a.appendChild(i.canvas),i.shadowCanvas=document.createElement("canvas");var u=i.canvas.getContext("2d"),f=i.shadowCanvas.getContext("2d",{willReadFrequently:!0}),h={x:-1e12,y:-1e12},p=function(){var g=null,x=window.devicePixelRatio,_=h.x>0&&h.y>0?f.getImageData(h.x*x,h.y*x,1,1):null;return _&&(g=i.colorTracker.lookup(_.data)),g};tn(i.canvas).call(V_().subject(function(){if(!i.enableNodeDrag)return null;var v=p();return v&&v.type==="Node"?v.d:null}).on("start",function(v){var g=v.subject;g.__initialDragPos={x:g.x,y:g.y,fx:g.fx,fy:g.fy},v.active||(g.fx=g.x,g.fy=g.y),i.canvas.classList.add("grabbable")}).on("drag",function(v){var g=v.subject,x=g.__initialDragPos,_=v,b=bn(i.canvas).k,C={x:x.x+(_.x-x.x)/b-g.x,y:x.y+(_.y-x.y)/b-g.y};["x","y"].forEach(function(S){return g["f".concat(S)]=g[S]=x[S]+(_[S]-x[S])/b}),!(!g.__dragged&&xC>=Math.sqrt(L2(["x","y"].map(function(S){return Math.pow(v[S]-x[S],2)}))))&&(i.forceGraph.d3AlphaTarget(.3).resetCountdown(),i.isPointerDragging=!0,g.__dragged=!0,i.onNodeDrag(g,C))}).on("end",function(v){var g=v.subject,x=g.__initialDragPos,_={x:g.x-x.x,y:g.y-x.y};x.fx===void 0&&(g.fx=void 0),x.fy===void 0&&(g.fy=void 0),delete g.__initialDragPos,i.forceGraph.d3AlphaTarget()&&i.forceGraph.d3AlphaTarget(0).resetCountdown(),i.canvas.classList.remove("grabbable"),i.isPointerDragging=!1,g.__dragged&&(delete g.__dragged,i.onNodeDragEnd(g,_))})),i.zoom(i.zoom.__baseElem=tn(i.canvas)),i.zoom.__baseElem.on("dblclick.zoom",null),i.zoom.filter(function(v){return!v.button&&i.enableZoomPanInteraction&&(v.type!=="wheel"||Ie(i.enableZoomInteraction)(v))&&(v.type==="wheel"||Ie(i.enablePanInteraction)(v))}).on("zoom",function(v){var g=v.transform;[u,f].forEach(function(x){U0(x),x.translate(g.x,g.y),x.scale(g.k,g.k)}),i.isPointerDragging=!0,i.onZoom&&i.onZoom(Hi(Hi({},g),s.centerAt())),i.needsRedraw=!0}).on("end",function(v){i.isPointerDragging=!1,i.onZoomEnd&&i.onZoomEnd(Hi(Hi({},v.transform),s.centerAt()))}),Ac(i),i.forceGraph.onNeedsRedraw(function(){return i.needsRedraw=!0}).onFinishUpdate(function(){bn(i.canvas).k===i.lastSetZoom&&i.graphData.nodes.length&&(i.zoom.scaleTo(i.zoom.__baseElem,i.lastSetZoom=vC/Math.cbrt(i.graphData.nodes.length)),i.needsRedraw=!0)}),i.tooltip=new CS(a),["pointermove","pointerdown"].forEach(function(v){return a.addEventListener(v,function(g){v==="pointerdown"&&(i.isPointerPressed=!0,i.pointerDownEvent=g),!i.isPointerDragging&&g.type==="pointermove"&&i.onBackgroundClick&&(g.pressure>0||i.isPointerPressed)&&(g.pointerType!=="touch"||g.movementX===void 0||[g.movementX,g.movementY].some(function(b){return Math.abs(b)>1}))&&(i.isPointerDragging=!0);var x=_(a);h.x=g.pageX-x.left,h.y=g.pageY-x.top;function _(b){var C=b.getBoundingClientRect(),S=window.pageXOffset||document.documentElement.scrollLeft,k=window.pageYOffset||document.documentElement.scrollTop;return{top:C.top+k,left:C.left+S}}},{passive:!0})}),a.addEventListener("pointerup",function(v){if(i.isPointerPressed){if(i.isPointerPressed=!1,i.isPointerDragging){i.isPointerDragging=!1;return}var g=[v,i.pointerDownEvent];requestAnimationFrame(function(){if(v.button===0)if(i.hoverObj){var x=i["on".concat(i.hoverObj.type,"Click")];x&&x.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundClick&&i.onBackgroundClick.apply(i,g);if(v.button===2)if(i.hoverObj){var _=i["on".concat(i.hoverObj.type,"RightClick")];_&&_.apply(void 0,[i.hoverObj.d].concat(g))}else i.onBackgroundRightClick&&i.onBackgroundRightClick.apply(i,g)})}},{passive:!0}),a.addEventListener("contextmenu",function(v){return!i.onBackgroundRightClick&&!i.onNodeRightClick&&!i.onLinkRightClick?!0:(v.preventDefault(),!1)}),i.forceGraph(u),i.shadowGraph(f);var m=fk(function(){Gg(f,i.width,i.height),i.shadowGraph.linkWidth(function(g){return Ie(i.linkWidth)(g)+i.linkHoverPrecision});var v=bn(i.canvas);i.shadowGraph.globalScale(v.k).tickFrame()},yC);i.flushShadowCanvas=m.flush,(this._animationCycle=function v(){var g=!i.autoPauseRedraw||!!i.needsRedraw||i.forceGraph.isEngineRunning()||i.graphData.links.some(function(A){return A.__photons&&A.__photons.length});if(i.needsRedraw=!1,i.enablePointerInteraction){var x=i.isPointerDragging?null:p();if(x!==i.hoverObj){var _=i.hoverObj,b=_?_.type:null,C=x?x.type:null;if(b&&b!==C){var S=i["on".concat(b,"Hover")];S&&S(null,_.d)}if(C){var k=i["on".concat(C,"Hover")];k&&k(x.d,b===C?_.d:null)}i.tooltip.content(x&&Ie(i["".concat(x.type.toLowerCase(),"Label")])(x.d)||null),i.canvas.classList[x&&i["on".concat(C,"Click")]||!x&&i.onBackgroundClick?"add":"remove"]("clickable"),i.hoverObj=x}g&&m()}if(g){Gg(u,i.width,i.height);var R=bn(i.canvas).k;i.onRenderFramePre&&i.onRenderFramePre(u,R),i.forceGraph.globalScale(R).tickFrame(),i.onRenderFramePost&&i.onRenderFramePost(u,R)}i.tweenGroup.update(),i.animationFrameRequestId=requestAnimationFrame(v)})()},update:function(n){}}),zc={exports:{}},Dc,Xg;function bC(){if(Xg)return Dc;Xg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dc=e,Dc}var Ic,Yg;function CC(){if(Yg)return Ic;Yg=1;var e=bC();function n(){}function i(){}return i.resetWarningCache=n,Ic=function(){function s(f,h,p,m,v,g){if(g!==e){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}s.isRequired=s;function a(){return s}var u={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:a,element:s,elementType:s,instanceOf:a,node:s,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:n};return u.PropTypes=u,u},Ic}var Zg;function EC(){return Zg||(Zg=1,zc.exports=CC()()),zc.exports}var PC=EC();const L=mm(PC),Oa={width:L.number,height:L.number,graphData:L.shape({nodes:L.arrayOf(L.object).isRequired,links:L.arrayOf(L.object).isRequired}),backgroundColor:L.string,nodeRelSize:L.number,nodeId:L.string,nodeLabel:L.oneOfType([L.string,L.func]),nodeVal:L.oneOfType([L.number,L.string,L.func]),nodeVisibility:L.oneOfType([L.bool,L.string,L.func]),nodeColor:L.oneOfType([L.string,L.func]),nodeAutoColorBy:L.oneOfType([L.string,L.func]),onNodeHover:L.func,onNodeClick:L.func,linkSource:L.string,linkTarget:L.string,linkLabel:L.oneOfType([L.string,L.func]),linkVisibility:L.oneOfType([L.bool,L.string,L.func]),linkColor:L.oneOfType([L.string,L.func]),linkAutoColorBy:L.oneOfType([L.string,L.func]),linkWidth:L.oneOfType([L.number,L.string,L.func]),linkCurvature:L.oneOfType([L.number,L.string,L.func]),linkDirectionalArrowLength:L.oneOfType([L.number,L.string,L.func]),linkDirectionalArrowColor:L.oneOfType([L.string,L.func]),linkDirectionalArrowRelPos:L.oneOfType([L.number,L.string,L.func]),linkDirectionalParticles:L.oneOfType([L.number,L.string,L.func]),linkDirectionalParticleSpeed:L.oneOfType([L.number,L.string,L.func]),linkDirectionalParticleWidth:L.oneOfType([L.number,L.string,L.func]),linkDirectionalParticleColor:L.oneOfType([L.string,L.func]),onLinkHover:L.func,onLinkClick:L.func,dagMode:L.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:L.number,dagNodeFilter:L.func,onDagError:L.func,d3AlphaMin:L.number,d3AlphaDecay:L.number,d3VelocityDecay:L.number,warmupTicks:L.number,cooldownTicks:L.number,cooldownTime:L.number,onEngineTick:L.func,onEngineStop:L.func,getGraphBbox:L.func},H0={zoomToFit:L.func,onNodeRightClick:L.func,onNodeDrag:L.func,onNodeDragEnd:L.func,onLinkRightClick:L.func,linkHoverPrecision:L.number,onBackgroundClick:L.func,onBackgroundRightClick:L.func,enablePointerInteraction:L.bool,enableNodeDrag:L.bool},$f={showNavInfo:L.bool,nodeOpacity:L.number,nodeResolution:L.number,nodeThreeObject:L.oneOfType([L.object,L.string,L.func]),nodeThreeObjectExtend:L.oneOfType([L.bool,L.string,L.func]),linkOpacity:L.number,linkResolution:L.number,linkCurveRotation:L.oneOfType([L.number,L.string,L.func]),linkMaterial:L.oneOfType([L.object,L.string,L.func]),linkThreeObject:L.oneOfType([L.object,L.string,L.func]),linkThreeObjectExtend:L.oneOfType([L.bool,L.string,L.func]),linkPositionUpdate:L.func,linkDirectionalArrowResolution:L.number,linkDirectionalParticleResolution:L.number,forceEngine:L.oneOf(["d3","ngraph"]),ngraphPhysics:L.object,numDimensions:L.oneOf([1,2,3])},NC=Object.assign({},Oa,H0,{linkLineDash:L.oneOfType([L.arrayOf(L.number),L.string,L.func]),nodeCanvasObjectMode:L.oneOfType([L.string,L.func]),nodeCanvasObject:L.func,nodePointerAreaPaint:L.func,linkCanvasObjectMode:L.oneOfType([L.string,L.func]),linkCanvasObject:L.func,linkPointerAreaPaint:L.func,autoPauseRedraw:L.bool,minZoom:L.number,maxZoom:L.number,enableZoomInteraction:L.oneOfType([L.bool,L.func]),enablePanInteraction:L.oneOfType([L.bool,L.func]),onZoom:L.func,onZoomEnd:L.func,onRenderFramePre:L.func,onRenderFramePost:L.func});Object.assign({},Oa,H0,$f,{enableNavigationControls:L.bool,controlType:L.oneOf(["trackball","orbit","fly"]),rendererConfig:L.object,extraRenderers:L.arrayOf(L.shape({render:L.func.isRequired}))});Object.assign({},Oa,$f,{nodeDesc:L.oneOfType([L.string,L.func]),linkDesc:L.oneOfType([L.string,L.func])});Object.assign({},Oa,$f,{markerAttrs:L.object,yOffset:L.number,glScale:L.number});const Uf=nx(SC,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Uf.displayName="ForceGraph2D";Uf.propTypes=NC;const TC=e=>{const n=[],i=[];e.forEach(u=>{const f=u.metadata;if(!u.id||!f||typeof f!="object")return;const h={id:u.id,name:f.title||u.id.substring(0,8),memory:u,val:3,type:(f.type||"").toLowerCase()==="document"?"document":"fragment"};(f.type||"").toLowerCase()==="document"?(h.val=5,n.push(h)):(f.type||"").toLowerCase()==="fragment"||f.documentId&&(f.type||"").toLowerCase()!=="document"?(h.val=3,i.push(h)):n.push(h)});const s=[];return i.forEach(u=>{const f=u.memory.metadata;if(f.documentId){const h=n.find(p=>p.id===f.documentId);h&&s.push({source:h.id,target:u.id,value:1})}}),{nodes:[...n,...i],links:s}};function jC({memories:e,onNodeClick:n,selectedMemoryId:i}){const s=ae.useRef(null),[a,u]=ae.useState(!1),[f,h]=ae.useState(!0),[p,m]=ae.useState({nodes:[],links:[]}),v=ae.useRef(null),[g,x]=ae.useState({width:800,height:600}),_=4;ae.useEffect(()=>{if(e.length>0){const S=TC(e);m(S)}},[e]),ae.useEffect(()=>()=>{s.current=null,u(!1),h(!1)},[]),ae.useEffect(()=>{const S=()=>{if(v.current){const{offsetWidth:k,offsetHeight:R}=v.current;x({width:k,height:R})}};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}},[]),ae.useEffect(()=>{if(a&&s.current&&i){const S=p.nodes.find(k=>k.id===i);S&&(s.current.centerAt(S.x,S.y,1e3),s.current.zoom(2.5,1e3))}},[i,a,p.nodes]);const b=ae.useCallback(S=>{if(s.current=S,S){const k=S.d3Force("charge");k&&k.strength(-120);const R=S.d3Force("link");R&&R.distance(50),S.zoomToFit(400),u(!0)}},[]),C=()=>P.jsxs("div",{className:"absolute top-4 right-4 p-3 bg-card/90 text-card-foreground border border-border rounded-md shadow-sm text-xs backdrop-blur-sm",children:[P.jsx("div",{className:"font-medium mb-2 text-xs",children:"Legend"}),P.jsxs("div",{className:"flex items-center mb-2",children:[P.jsx("div",{className:"w-3 h-3 rounded-full bg-orange-500/90 mr-2 border border-orange-600/60"}),P.jsx("span",{children:"Document"})]}),P.jsxs("div",{className:"flex items-center",children:[P.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-400/90 mr-2 border border-gray-500/60"}),P.jsx("span",{children:"Fragment"})]})]});return P.jsxs("div",{ref:v,className:"w-full h-full relative",children:[C(),f&&P.jsx(Uf,{ref:b,graphData:p,width:g.width,height:g.height,backgroundColor:"hsla(var(--background), 0.8)",linkColor:()=>"hsla(var(--muted-foreground), 0.2)",linkWidth:1,linkDirectionalParticles:1,linkDirectionalParticleWidth:1,linkDirectionalParticleSpeed:.003,nodeRelSize:_,nodeVal:S=>S.val||3,nodeColor:S=>S.type==="document"?"hsl(30, 100%, 50%)":"hsl(210, 10%, 70%)",nodeLabel:S=>{const k=S.memory.metadata;return`${S.type==="document"?"📄 Document":"📝 Fragment"}: ${k.title||S.id.substring(0,8)}`},onNodeClick:S=>{n(S.memory)},onNodeDragEnd:S=>{S.fx=S.x,S.fy=S.y},cooldownTicks:100,nodeCanvasObjectMode:S=>i===S.id?"after":"replace",nodeCanvasObject:(S,k,R)=>{const{x:A,y:N}=S,T=(S.val||3)*_,D=10/R,F=i===S.id,I=S.type==="document";if(k.beginPath(),k.arc(A||0,N||0,T,0,2*Math.PI),k.fillStyle=I?"hsl(30, 100%, 50%)":"hsl(210, 10%, 70%)",k.fill(),k.strokeStyle=I?"hsl(30, 100%, 35%)":"hsl(210, 10%, 45%)",k.lineWidth=F?2:1,k.stroke(),R>=1.4||F){const B=S.name||S.id.substring(0,6),K=S.memory.metadata,X=I?B:K.position!==void 0?`#${K.position}`:B;k.font=`${F?"bold ":""}${D}px Arial`,k.textAlign="center",k.textBaseline="middle",k.strokeStyle="hsla(var(--background), 0.8)",k.lineWidth=3,k.strokeText(X,A||0,N||0),k.fillStyle="hsla(var(--foreground), 0.9)",k.fillText(X,A||0,N||0)}if(F){k.beginPath(),k.arc(A||0,N||0,T*1.4,0,2*Math.PI),k.strokeStyle=I?"hsla(30, 100%, 60%, 0.8)":"hsla(210, 10%, 80%, 0.8)",k.lineWidth=1.5,k.stroke();const B=k.createRadialGradient(A||0,N||0,T,A||0,N||0,T*2);B.addColorStop(0,I?"hsla(30, 100%, 60%, 0.3)":"hsla(210, 10%, 80%, 0.3)"),B.addColorStop(1,"hsla(0, 0%, 0%, 0)"),k.fillStyle=B,k.beginPath(),k.arc(A||0,N||0,T*2,0,2*Math.PI),k.fill()}}})]})}const Ms=(...e)=>e.filter(Boolean).join(" "),MC=()=>({toast:({title:e,description:n,variant:i})=>{console.log(`Toast: ${e} - ${n} (${i||"default"})`)}}),Jg=({open:e,onOpenChange:n,children:i})=>e?P.jsx("div",{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm flex items-center justify-center p-4",onClick:()=>n(!1),children:P.jsx("div",{className:"bg-card text-card-foreground rounded-lg shadow-lg max-w-full max-h-full flex flex-col border border-border",onClick:s=>s.stopPropagation(),children:i})}):null,em=({className:e,children:n})=>P.jsx("div",{className:Ms("p-6 flex flex-col border-border",e),children:n}),tm=({className:e,children:n})=>P.jsx("div",{className:Ms("mb-4",e),children:n}),nm=({className:e,children:n})=>P.jsx("h2",{className:Ms("text-lg font-semibold",e),children:n}),rm=({className:e,children:n})=>P.jsx("p",{className:Ms("text-sm text-muted-foreground",e),children:n}),im=({className:e,children:n})=>P.jsx("div",{className:Ms("flex justify-end gap-2 mt-4",e),children:n}),ia=10,q0=e=>{const i=e.name.toLowerCase().split(".").pop()||"",s=["ts","tsx","js","jsx","mjs","cjs","py","pyw","pyi","java","c","cpp","cc","cxx","h","hpp","cs","php","rb","go","rs","swift","kt","kts","scala","clj","cljs","ex","exs","r","R","m","mm","sh","bash","zsh","fish","ps1","bat","cmd","sql","lua","pl","pm","dart","hs","elm","ml","fs","fsx","vb","pas","d","nim","zig","jl","tcl","awk","sed","vue","svelte","astro","gitignore","dockerignore","editorconfig","env","cfg","conf","ini","log","txt"],a=["md","markdown"],u=["json"],f=["xml"],h=["html","htm"],p=["css","scss","sass","less"],m=["csv","tsv"],v=["yaml","yml"];return s.includes(i)?"text/plain":a.includes(i)?"text/markdown":u.includes(i)?"application/json":f.includes(i)?"application/xml":h.includes(i)?"text/html":p.includes(i)?"text/css":m.includes(i)?"text/csv":v.includes(i)?"text/yaml":i==="pdf"?"application/pdf":i==="doc"?"application/msword":i==="docx"?"application/vnd.openxmlformats-officedocument.wordprocessingml.document":e.type||"application/octet-stream"},ks={getKnowledgeDocuments:async(e,n)=>{const i=new URLSearchParams;i.append("agentId",e),n!=null&&n.limit&&i.append("limit",n.limit.toString()),n!=null&&n.before&&i.append("before",n.before.toString()),n!=null&&n.includeEmbedding&&i.append("includeEmbedding","true");const s=await fetch(`/api/documents?${i.toString()}`);if(!s.ok){const a=await s.text();throw new Error(`Failed to fetch knowledge documents: ${s.status} ${a}`)}return await s.json()},getKnowledgeChunks:async(e,n)=>{const i=new URLSearchParams;i.append("agentId",e),n!=null&&n.limit&&i.append("limit",n.limit.toString()),n!=null&&n.before&&i.append("before",n.before.toString()),n!=null&&n.documentId&&i.append("documentId",n.documentId);const s=await fetch(`/api/knowledges?${i.toString()}`);if(!s.ok){const a=await s.text();throw new Error(`Failed to fetch knowledge chunks: ${s.status} ${a}`)}return await s.json()},deleteKnowledgeDocument:async(e,n)=>{const i=new URLSearchParams;i.append("agentId",e);const s=await fetch(`/api/documents/${n}?${i.toString()}`,{method:"DELETE"});if(!s.ok){const a=await s.text();throw new Error(`Failed to delete knowledge document: ${s.status} ${a}`)}if(s.status!==204)return await s.json()},uploadKnowledge:async(e,n)=>{const i=new FormData;for(const a of n){const u=q0(a),f=new Blob([a],{type:u});i.append("files",f,a.name)}i.append("agentId",e);const s=await fetch("/api/documents",{method:"POST",body:i});if(!s.ok){const a=await s.text();throw new Error(`Failed to upload knowledge: ${s.status} ${a}`)}return await s.json()},searchKnowledge:async(e,n,i=.5,s=20)=>{const a=new URLSearchParams;a.append("agentId",e),a.append("q",n),a.append("threshold",i.toString()),a.append("limit",s.toString());const u=await fetch(`/api/search?${a.toString()}`);if(!u.ok){const f=await u.text();throw new Error(`Failed to search knowledge: ${u.status} ${f}`)}return await u.json()}},OC=(e,n=!0,i=!1)=>Yc({queryKey:["agents",e,"knowledge","documents",{includeEmbedding:i}],queryFn:async()=>(await ks.getKnowledgeDocuments(e,{includeEmbedding:i})).data.memories||[],enabled:n}),RC=(e,n=!0,i)=>{const{data:s=[],isLoading:a,error:u}=Yc({queryKey:["agents",e,"knowledge","chunks",{documentIdFilter:i}],queryFn:async()=>(await ks.getKnowledgeChunks(e,{documentId:i})).data.chunks||[],enabled:n}),{data:f=[],isLoading:h,error:p}=Yc({queryKey:["agents",e,"knowledge","documents-for-graph"],queryFn:async()=>(await ks.getKnowledgeDocuments(e,{includeEmbedding:!1})).data.memories||[],enabled:n}),m=[...f,...s],v=a||h,g=u||p;return console.log(`Documents: ${f.length}, Fragments: ${s.length}, Total: ${m.length}`),{data:m,isLoading:v,error:g}},AC=e=>{const n=Ca();return x1({mutationFn:async({knowledgeId:i})=>{await ks.deleteKnowledgeDocument(e,i)},onSuccess:()=>{n.invalidateQueries({queryKey:["agents",e,"knowledge","documents"]})}})};function zC({agentId:e}){var $s,vi;const[n,i]=ae.useState(null),[s,a]=ae.useState(!1),[u,f]=ae.useState(ia),[h,p]=ae.useState(!1),[m,v]=ae.useState("list"),[g,x]=ae.useState(null),[_,b]=ae.useState(void 0),[C,S]=ae.useState(1),[k,R]=ae.useState(!1),[A,N]=ae.useState(""),[T,D]=ae.useState(!1),[F,I]=ae.useState(null),[B,K]=ae.useState([]),[X,se]=ae.useState(!1),[ce,$]=ae.useState(""),[ne,W]=ae.useState(.5),[re,Q]=ae.useState([]),[Z,G]=ae.useState(!1),[O,V]=ae.useState(null),fe=ae.useRef(null),de=ae.useRef(null),{toast:ke}=MC(),be=Ca(),{data:Ee=[],isLoading:Ce,error:Re}=OC(e,m==="list"&&!X,!1),{data:yt=[],isLoading:pi,error:Os}=RC(e,m==="graph"&&!X,_),gi=m==="list"?Ce:pi,mi=m==="list"?Re:Os,Ht=m==="list"?Ee:yt,{mutate:Rs}=AC(e),zr=ae.useCallback(()=>{if(!de.current||h||u>=Ht.length)return;const{scrollTop:ee,scrollHeight:xe,clientHeight:Te}=de.current;ee+Te>=xe-100&&(p(!0),setTimeout(()=>{f(De=>Math.min(De+ia,Ht.length)),p(!1)},300))},[h,u,Ht.length]);if(ae.useEffect(()=>{f(ia)},[]),ae.useEffect(()=>{const ee=de.current;if(ee)return ee.addEventListener("scroll",zr),()=>ee.removeEventListener("scroll",zr)},[zr]),gi&&(!Ht||Ht.length===0)&&!X)return P.jsx("div",{className:"flex items-center justify-center h-40",children:"Loading knowledge documents..."});if(mi&&!X)return P.jsxs("div",{className:"flex items-center justify-center h-40 text-destructive",children:["Error loading knowledge documents: ",mi.message]});const As=ee=>{const xe=new Date(ee);return`${xe.toLocaleDateString()} ${xe.toLocaleTimeString()}`},ao=ee=>{var Te;switch((Te=ee.split(".").pop())==null?void 0:Te.toLowerCase()){case"md":return P.jsx(bc,{className:"h-4 w-4 text-blue-500"});case"js":case"ts":case"jsx":case"tsx":return P.jsx(bc,{className:"h-4 w-4 text-yellow-500"});case"json":return P.jsx(bc,{className:"h-4 w-4 text-green-500"});case"pdf":return P.jsx($p,{className:"h-4 w-4 text-red-500"});default:return P.jsx($p,{className:"h-4 w-4 text-gray-500"})}},Dr=ee=>{ee&&window.confirm("Are you sure you want to delete this document?")&&(Rs({knowledgeId:ee}),i(null))},Rn=()=>{fe.current&&fe.current.click()},uo=()=>{R(!0),N(""),K([]),I(null)},co=()=>{try{if(!new URL(A).protocol.startsWith("http")){I("URL must start with http:// or https://");return}if(B.includes(A)){I("This URL is already in the list");return}K([...B,A]),N(""),I(null)}catch{I("Invalid URL")}},zs=ee=>{K(B.filter(xe=>xe!==ee))},fo=async()=>{if(!ce.trim()){V("Please enter a search query");return}G(!0),V(null),Q([]);try{const ee=await ks.searchKnowledge(e,ce,ne);Q(ee.data.results||[]),ee.data.results.length===0&&V("No results found. Try adjusting your search query or lowering the similarity threshold.")}catch(ee){V(ee.message||"Failed to search knowledge"),Q([])}finally{G(!1)}},Ds=async()=>{var ee;if(A.trim())try{new URL(A).protocol.startsWith("http")&&!B.includes(A)&&K([...B,A])}catch{}if(B.length===0){I("Please add at least one valid URL");return}D(!0),I(null);try{const xe=await fetch("/api/documents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileUrls:B,agentId:e})});if(!xe.ok){const Ke=await xe.text();throw new Error(Ke)}const Te=await xe.json();Te.success?(ke({title:"URLs imported",description:`Successfully imported ${B.length} document(s)`}),R(!1),be.invalidateQueries({queryKey:["agents",e,"knowledge","documents"]})):I(((ee=Te.error)==null?void 0:ee.message)||"Error importing documents from URLs")}catch(xe){I(xe.message||"Error importing documents from URLs"),ke({title:"Error",description:"Failed to import documents from URLs",variant:"destructive"})}finally{D(!1)}},ho=async ee=>{const xe=ee.target.files;if(!(!xe||xe.length===0)){a(!0);try{const Te=Array.from(xe),Ke=new FormData;for(const ct of Te){const Ct=q0(ct),Bt=new Blob([ct],{type:Ct});Ke.append("files",Bt,ct.name)}Ke.append("agentId",e);const De=await fetch("/api/documents",{method:"POST",body:Ke});if(!De.ok)throw new Error(`Upload failed: ${De.statusText}`);const Vt=(await De.json()).data||[];if(Array.isArray(Vt)&&Vt.every(ct=>ct.status==="success"))ke({title:"Knowledge Uploaded",description:`Successfully uploaded ${Te.length} file(s)`}),be.invalidateQueries({queryKey:["agents",e,"knowledge","documents"]});else{const ct=Vt.filter(Bt=>Bt.status==="success").length,Ct=Te.length-ct;ke({title:Ct>0?"Upload Partially Failed":"Upload Issues",description:`Uploaded ${ct} file(s). ${Ct} file(s) failed. Check console for details.`,variant:Ct>0?"destructive":"default"}),console.error("Upload results:",Vt)}}catch(Te){ke({title:"Upload Failed",description:Te instanceof Error?Te.message:"Failed to upload knowledge files",variant:"destructive"}),console.error("Upload error:",Te)}finally{a(!1),fe.current&&(fe.current.value="")}}},yi=Ht.slice(0,u),Is=u<Ht.length,Ir=()=>P.jsx("div",{className:"flex justify-center p-4",children:h?P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx(Yo,{className:"h-4 w-4 animate-spin"}),P.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading more..."})]}):P.jsx(st,{variant:"ghost",size:"sm",onClick:()=>f(ee=>ee+ia),className:"text-xs",children:"Show more"})}),Lr=()=>P.jsxs("div",{className:"text-muted-foreground text-center p-12 flex flex-col items-center gap-3 border-2 border-dashed rounded-lg mt-8",children:[P.jsx(T1,{className:"h-12 w-12 text-muted-foreground opacity-20"}),P.jsx("h3",{className:"text-lg font-medium",children:"No Knowledge Documents"}),P.jsx("p",{className:"max-w-md text-sm",children:"No Knowledge Documents found."}),P.jsxs(st,{variant:"outline",onClick:Rn,children:[P.jsx(Up,{className:"h-4 w-4 mr-2"}),"Upload Documents"]})]}),Ra=({memory:ee,index:xe})=>{var Ct;const Te=ee.metadata||{},Ke=Te.title||ee.id||"Unknown Document",De=Te.filename||"Unknown Document",qt=Te.fileExt||((Ct=De.split(".").pop())==null?void 0:Ct.toLowerCase())||"",Vt=Ke,ct=Te.path||De;return P.jsx("button",{type:"button",className:"w-full text-left",onClick:()=>i(ee),children:P.jsxs(z1,{className:"hover:bg-accent/10 transition-colors relative group",children:[P.jsx("div",{className:"absolute top-3 left-3 opacity-70",children:ao(De)}),P.jsxs(D1,{className:"p-3 pb-2 pl-10",children:[P.jsx("div",{className:"text-xs text-muted-foreground mb-1 line-clamp-1",children:ct}),P.jsxs("div",{className:"mb-2",children:[P.jsx("div",{className:"text-sm font-medium mb-1",children:Vt}),Te.description&&P.jsx("div",{className:"text-xs text-muted-foreground line-clamp-2",children:Te.description})]})]}),P.jsx(I1,{className:"p-2 border-t bg-muted/30 text-xs text-muted-foreground",children:P.jsxs("div",{className:"flex justify-between items-center w-full",children:[P.jsxs("div",{className:"flex items-center",children:[P.jsx(j1,{className:"h-3 w-3 mr-1.5"}),P.jsx("span",{children:new Date(ee.createdAt||0).toLocaleString(void 0,{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"})})]}),P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx(Hp,{variant:"outline",className:"px-1.5 py-0 h-5",children:qt||"unknown document"}),ee.id&&P.jsx(st,{variant:"ghost",size:"icon",className:"size-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Bt=>{Bt&&(Bt.stopPropagation(),Bt.preventDefault()),Dr(ee.id||"")},title:"Delete knowledge",children:P.jsx(A1,{className:"h-3.5 w-3.5 text-destructive"})})]})]})})]})},ee.id||xe)},Ls=ee=>{b(ee===_?void 0:ee)},Fs=({memory:ee})=>{var Ke,De;const xe=ee.metadata,Te=(xe==null?void 0:xe.type)==="fragment";return xe==null||xe.type,P.jsxs("div",{className:"border-t border-border bg-card text-card-foreground h-full flex flex-col",children:[P.jsxs("div",{className:"p-4 flex justify-between items-start flex-shrink-0",children:[P.jsxs("div",{className:"space-y-1",children:[P.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[Te?P.jsxs("span",{className:"flex items-center",children:[P.jsx("div",{className:"h-3 w-3 rounded-full bg-accent mr-1.5"}),"Fragment"]}):P.jsxs("span",{className:"flex items-center",children:[P.jsx("div",{className:"h-3 w-3 rounded-full bg-primary mr-1.5"}),"Document"]}),P.jsx("span",{className:"text-muted-foreground ml-2",children:(xe==null?void 0:xe.title)||((Ke=ee.id)==null?void 0:Ke.substring(0,8))})]}),P.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[P.jsxs("div",{className:"col-span-2",children:["ID: ",P.jsx("span",{className:"font-mono",children:ee.id})]}),Te&&xe.documentId&&P.jsxs("div",{className:"col-span-2",children:["Parent Document: ",P.jsx("span",{className:"font-mono text-primary/80",children:xe.documentId})]}),Te&&xe.position!==void 0&&P.jsxs("div",{children:["Position: ",xe.position]}),xe.source&&P.jsxs("div",{children:["Source: ",xe.source]}),P.jsxs("div",{children:["Created on: ",As(ee.createdAt||0)]})]})]}),P.jsx(st,{variant:"ghost",size:"sm",onClick:()=>x(null),className:"text-xs h-7 px-2",children:"Close"})]}),P.jsxs("div",{className:"px-4 pb-4 flex-1 flex flex-col",children:[P.jsx("div",{className:"bg-background rounded border border-border p-3 text-sm overflow-auto flex-1",children:P.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs h-full",children:((De=ee.content)==null?void 0:De.text)||"No content available"})}),ee.embedding&&P.jsxs("div",{className:"mt-2 flex items-center text-xs text-muted-foreground flex-shrink-0",children:[P.jsx("span",{className:"bg-accent/20 text-accent-foreground px-1.5 py-0.5 rounded text-[10px] font-medium mr-1.5",children:"EMBEDDING"}),P.jsxs("span",{children:["Vector with ",ee.embedding.length," dimensions"]})]})]})]})};return P.jsxs("div",{className:"flex flex-col h-full",children:[P.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between p-4 border-b gap-3",children:[P.jsxs("div",{className:"flex flex-col gap-1",children:[P.jsx("h2",{className:"text-lg font-semibold",children:"Knowledge"}),P.jsx("p",{className:"text-xs text-muted-foreground",children:X?"Searching knowledge fragments":m==="list"?"Viewing documents only":"Viewing documents and their fragments"})]}),P.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[P.jsx(st,{variant:"outline",size:"sm",onClick:()=>v(m==="list"?"graph":"list"),className:"flex-shrink-0",title:m==="list"?"Switch to Graph view to see documents and fragments":"Switch to List view to see documents only",disabled:X,children:m==="list"?P.jsxs(P.Fragment,{children:[P.jsx(R1,{className:"h-4 w-4 mr-2"}),P.jsx("span",{className:"hidden md:inline",children:"Graph View"}),P.jsx("span",{className:"md:hidden",children:"Graph"})]}):P.jsxs(P.Fragment,{children:[P.jsx(O1,{className:"h-4 w-4 mr-2"}),P.jsx("span",{className:"hidden md:inline",children:"List View"}),P.jsx("span",{className:"md:hidden",children:"List"})]})}),m==="graph"&&_&&!X&&P.jsxs(st,{variant:"outline",size:"sm",onClick:()=>b(void 0),className:"flex-shrink-0",children:[P.jsx("span",{className:"hidden sm:inline",children:"Clear Filter"}),P.jsx("span",{className:"sm:hidden",children:"Clear"})]}),P.jsxs("div",{className:"flex gap-2 ml-auto sm:ml-0",children:[P.jsxs(st,{variant:X?"default":"outline",onClick:()=>{se(!X),X&&($(""),Q([]),V(null))},size:"sm",className:"flex-shrink-0",children:[P.jsx(Cc,{className:"h-4 w-4 sm:mr-2"}),P.jsx("span",{className:"hidden sm:inline",children:"Search"})]}),P.jsxs(st,{variant:"outline",onClick:uo,size:"sm",className:"flex-shrink-0",disabled:X,children:[P.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 sm:mr-2",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),P.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),P.jsx("span",{className:"hidden sm:inline",children:"URL"})]}),P.jsxs(st,{onClick:Rn,disabled:s||X,size:"sm",className:"flex-shrink-0",children:[s?P.jsx(Yo,{className:"h-4 w-4 animate-spin sm:mr-2"}):P.jsx(Up,{className:"h-4 w-4 sm:mr-2"}),P.jsx("span",{className:"hidden sm:inline",children:"Upload"})]})]})]})]}),X&&P.jsx("div",{className:"border-b border-border bg-muted/30 p-4",children:P.jsxs("div",{className:"space-y-4",children:[P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx(M1,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),P.jsx("p",{className:"text-sm text-muted-foreground",children:"Search your knowledge base using semantic vector search. Adjust the similarity threshold to control how closely results must match your query."})]}),P.jsxs("div",{className:"space-y-3",children:[P.jsxs("div",{className:"flex gap-2",children:[P.jsx(qp,{placeholder:"Enter your search query...",value:ce,onChange:ee=>$(ee.target.value),onKeyDown:ee=>{ee.key==="Enter"&&ce.trim()&&(ee.preventDefault(),fo())},className:"flex-1"}),P.jsx(st,{onClick:fo,disabled:Z||!ce.trim(),size:"sm",className:"px-6",children:Z?P.jsx(Yo,{className:"h-4 w-4 animate-spin"}):P.jsx(Cc,{className:"h-4 w-4"})})]}),P.jsxs("div",{className:"space-y-2",children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("label",{className:"text-sm font-medium",children:"Similarity Threshold"}),P.jsxs("span",{className:"text-sm text-muted-foreground",children:[ne.toFixed(2)," (",Math.round(ne*100),"% match)"]})]}),P.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:ne,onChange:ee=>W(parseFloat(ee.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"}),P.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[P.jsx("span",{children:"0% (least similar)"}),P.jsx("span",{children:"100% (exact match)"})]})]})]})]})}),k&&P.jsx(Jg,{open:k,onOpenChange:R,children:P.jsxs(em,{className:"max-w-md w-full",children:[P.jsxs(tm,{children:[P.jsx(nm,{className:"text-xl font-bold",children:"Import from URL"}),P.jsx(rm,{children:"Enter one or more URLs of PDF, text, or other files to import into the knowledge base."})]}),P.jsxs("div",{className:"mt-6 space-y-4",children:[P.jsxs("div",{className:"flex gap-2",children:[P.jsx(qp,{placeholder:"https://example.com/document.pdf",value:A,onChange:ee=>N(ee.target.value),disabled:T,className:"flex-1",onKeyDown:ee=>{ee.key==="Enter"&&A.trim()&&(ee.preventDefault(),co())}}),P.jsx(st,{variant:"outline",size:"sm",onClick:co,disabled:T||!A.trim(),children:"Add"})]}),F&&P.jsx("div",{className:"text-sm text-destructive bg-destructive/10 p-2 rounded-md",children:F}),B.length>0&&P.jsxs("div",{className:"border border-border rounded-md bg-card/50 p-3 mt-2",children:[P.jsxs("h4",{className:"text-sm font-medium mb-2",children:["URLs to import (",B.length,")"]}),P.jsx("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:B.map((ee,xe)=>P.jsxs("div",{className:"flex items-center justify-between text-sm bg-background p-2 rounded border border-border",children:[P.jsx("span",{className:"truncate flex-1",children:ee}),P.jsx(st,{variant:"ghost",size:"icon",className:"h-6 w-6 hover:bg-destructive/10 hover:text-destructive",onClick:()=>zs(ee),disabled:T,children:P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:P.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},xe))})]})]}),P.jsxs(im,{className:"mt-6 pt-4 border-t border-border",children:[P.jsx(st,{variant:"outline",onClick:()=>R(!1),disabled:T,children:"Cancel"}),P.jsx(st,{onClick:Ds,disabled:T||B.length===0&&!A.trim(),children:T?P.jsxs(P.Fragment,{children:[P.jsx(Yo,{className:"h-4 w-4 animate-spin mr-2"}),"Importing..."]}):"Import"})]})]})}),P.jsx("input",{ref:fe,type:"file",multiple:!0,accept:".txt,.md,.markdown,.pdf,.doc,.docx,.json,.xml,.yaml,.yml,.csv,.tsv,.log,.ini,.cfg,.conf,.env,.gitignore,.dockerignore,.editorconfig,.js,.jsx,.ts,.tsx,.mjs,.cjs,.py,.pyw,.pyi,.java,.c,.cpp,.cc,.cxx,.h,.hpp,.cs,.php,.rb,.go,.rs,.swift,.kt,.kts,.scala,.clj,.cljs,.ex,.exs,.r,.R,.m,.mm,.sh,.bash,.zsh,.fish,.ps1,.bat,.cmd,.sql,.html,.htm,.css,.scss,.sass,.less,.vue,.svelte,.astro,.lua,.pl,.pm,.dart,.hs,.elm,.ml,.fs,.fsx,.vb,.pas,.d,.nim,.zig,.jl,.tcl,.awk,.sed",onChange:ho,className:"hidden"}),P.jsx("div",{className:"flex-1 overflow-hidden",children:X?P.jsxs("div",{className:"h-full overflow-y-auto p-4",children:[Z&&P.jsx("div",{className:"flex items-center justify-center h-full",children:P.jsx(Yo,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),O&&!Z&&P.jsx("div",{className:"flex items-center justify-center h-full text-center",children:P.jsx("div",{className:"p-4 bg-destructive/10 text-destructive rounded-md",children:O})}),re.length>0&&!Z&&P.jsxs("div",{className:"space-y-3",children:[P.jsxs("h3",{className:"text-sm font-medium",children:["Found ",re.length," result",re.length!==1?"s":""]}),P.jsx("div",{className:"space-y-2",children:re.map((ee,xe)=>{var Te,Ke,De;return P.jsxs("div",{className:"border border-border rounded-md p-3 bg-card hover:bg-accent/10 transition-colors",children:[P.jsx("div",{className:"flex items-start justify-between mb-2",children:P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsxs(Hp,{variant:"outline",className:"text-xs",children:[(ee.similarity*100).toFixed(1),"% match"]}),P.jsx("span",{className:"text-xs text-muted-foreground",children:((Te=ee.metadata)==null?void 0:Te.documentFilename)||"Unknown Document"})]})}),P.jsx("p",{className:"text-sm line-clamp-3",children:((Ke=ee.content)==null?void 0:Ke.text)||"No content"}),((De=ee.metadata)==null?void 0:De.position)!==void 0&&P.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Fragment position: ",ee.metadata.position]})]},ee.id||xe)})})]}),!Z&&re.length===0&&!O&&P.jsx("div",{className:"flex items-center justify-center h-full text-center text-muted-foreground",children:P.jsxs("div",{className:"flex flex-col items-center gap-2",children:[P.jsx(Cc,{className:"h-10 w-10 opacity-30"}),P.jsx("p",{children:"Enter a query to search your knowledge base."})]})})]}):Ht.length===0?P.jsx(Lr,{}):m==="graph"?P.jsxs("div",{className:"flex flex-col h-full",children:[P.jsxs("div",{className:`p-4 overflow-hidden ${g?"h-1/3":"flex-1"} transition-all duration-300`,children:[P.jsx(jC,{memories:Ht,onNodeClick:ee=>{x(ee),ee.metadata&&typeof ee.metadata=="object"&&"type"in ee.metadata&&(ee.metadata.type||"").toLowerCase()==="document"&&!("documentId"in ee.metadata)&&Ls(ee.id)},selectedMemoryId:g==null?void 0:g.id}),_&&P.jsx("div",{className:"absolute top-16 left-4 bg-card/90 backdrop-blur-sm text-card-foreground p-2 rounded-md shadow-sm border border-border",children:P.jsxs("span",{className:"text-xs text-muted-foreground flex items-center",children:[P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 mr-1.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:P.jsx("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"})}),"Filtering by document ID: ",P.jsxs("span",{className:"font-mono ml-1",children:[_.substring(0,8),"..."]})]})})]}),g&&P.jsx("div",{className:"h-2/3 overflow-hidden flex-1 transition-all duration-300",children:P.jsx(Fs,{memory:g})})]}):P.jsxs("div",{ref:de,className:"h-full overflow-y-auto p-4",children:[P.jsx("div",{className:"grid gap-3",children:yi.map((ee,xe)=>P.jsx(Ra,{memory:ee,index:xe},ee.id||xe))}),Is&&P.jsx(Ir,{})]})}),n&&P.jsx(Jg,{open:!!n,onOpenChange:()=>i(null),children:P.jsxs(em,{className:"max-w-[95vw] w-full max-h-[95vh] h-full overflow-hidden flex flex-col p-0",children:[P.jsx(tm,{className:"flex-shrink-0 p-6 pb-2",children:P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsxs("div",{children:[P.jsx(nm,{className:"text-xl",children:(($s=n.metadata)==null?void 0:$s.title)||"Document Content"}),P.jsx(rm,{children:((vi=n.metadata)==null?void 0:vi.filename)||"Knowledge document"})]}),(()=>{var De;const ee=n.metadata,xe=(ee==null?void 0:ee.contentType)||"",Te=((De=ee==null?void 0:ee.fileExt)==null?void 0:De.toLowerCase())||"";return xe==="application/pdf"||Te==="pdf"?P.jsxs("div",{className:"flex items-center gap-2",children:[P.jsx(st,{variant:"outline",size:"sm",onClick:()=>S(Math.max(.5,C-.25)),disabled:C<=.5,children:P.jsx("span",{className:"text-lg",children:"−"})}),P.jsxs("span",{className:"text-sm font-medium min-w-[60px] text-center",children:[Math.round(C*100),"%"]}),P.jsx(st,{variant:"outline",size:"sm",onClick:()=>S(Math.min(3,C+.25)),disabled:C>=3,children:P.jsx("span",{className:"text-lg",children:"+"})}),P.jsx(st,{variant:"outline",size:"sm",onClick:()=>S(1),children:"Reset"})]}):null})()]})}),P.jsx("div",{className:"flex-1 overflow-auto px-6 pb-2",children:(()=>{var De,qt,Vt,ct;const ee=n.metadata,xe=(ee==null?void 0:ee.contentType)||"",Te=((De=ee==null?void 0:ee.fileExt)==null?void 0:De.toLowerCase())||"",Ke=xe==="application/pdf"||Te==="pdf";if(Ke&&((qt=n.content)!=null&&qt.text)){const Ct=n.content.text.trim();if(!Ct)return P.jsx("div",{className:"h-full w-full bg-background rounded-lg border border-border p-6 flex items-center justify-center",children:P.jsxs("div",{className:"text-center text-muted-foreground",children:[P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:P.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.732-.833-2.5 0L4.314 18.5c-.77.833.192 2.5 1.732 2.5z"})}),P.jsx("p",{className:"text-lg font-medium",children:"PDF Content Unavailable"}),P.jsx("p",{className:"text-sm",children:"The PDF content could not be loaded."})]})});const Bt=`data:application/pdf;base64,${Ct}`;return P.jsx("div",{className:"w-full h-full rounded-lg overflow-auto bg-card border border-border",children:P.jsx("div",{className:"min-w-full flex items-center justify-center p-4",style:{minHeight:"100%",transform:`scale(${C})`,transformOrigin:"top center",width:C>1?`${100/C}%`:"100%"},children:P.jsx("iframe",{src:Bt,className:"w-full border-0 shadow-md",style:{height:"90vh",maxWidth:"1200px",backgroundColor:"var(--background)"},title:"PDF Document",onError:()=>{console.error("Failed to load PDF in iframe")}})})})}else return Ke&&!((Vt=n.content)!=null&&Vt.text)?P.jsx("div",{className:"h-full w-full bg-background rounded-lg border border-border p-6 flex items-center justify-center",children:P.jsxs("div",{className:"text-center text-muted-foreground",children:[P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:P.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),P.jsx("p",{className:"text-lg font-medium",children:"PDF Not Available"}),P.jsx("p",{className:"text-sm",children:"This PDF document has no content to display."})]})}):P.jsx("div",{className:"h-full w-full bg-background rounded-lg border border-border p-6",children:P.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono leading-relaxed text-foreground",children:((ct=n.content)==null?void 0:ct.text)||"No content available"})})})()}),P.jsx(im,{className:"flex-shrink-0 p-6 pt-4 border-t border-border",children:P.jsx(st,{variant:"outline",onClick:()=>{i(null),S(1)},children:"Close"})})]})})]})}const DC=new n1;function IC(){const e=window.ELIZA_CONFIG,n=e==null?void 0:e.agentId;return Nm.useEffect(()=>{document.documentElement.classList.add("dark")},[]),n?P.jsx(LC,{agentId:n}):P.jsxs("div",{className:"p-4 text-center",children:[P.jsx("div",{className:"text-red-600 font-medium",children:"Error: Agent ID not found"}),P.jsx("div",{className:"text-sm text-gray-600 mt-2",children:"The server should inject the agent ID configuration."})]})}function LC({agentId:e}){return P.jsx(l1,{client:DC,children:P.jsx(zC,{agentId:e})})}const om=document.getElementById("root");om&&C1.createRoot(om).render(P.jsx(IC,{}));