recallx 1.0.1 → 1.0.2
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.
package/app/shared/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const RECALLX_VERSION = "1.0.
|
|
1
|
+
export const RECALLX_VERSION = "1.0.2";
|
package/dist/renderer/assets/{ProjectGraphCanvas-DACOH-d3.js → ProjectGraphCanvas-BVlOgk7l.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as It,r as Z,j as Ti,p as Si}from"./index-CbvJjhcL.js";var Te={exports:{}},ot;function Ci(){if(ot)return Te.exports;ot=1;var n=typeof Reflect=="object"?Reflect:null,i=n&&typeof n.apply=="function"?n.apply:function(p,v,E){return Function.prototype.apply.call(p,v,E)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:t=function(p){return Object.getOwnPropertyNames(p)};function e(f){console&&console.warn&&console.warn(f)}var r=Number.isNaN||function(p){return p!==p};function a(){a.init.call(this)}Te.exports=a,Te.exports.once=R,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(f){if(typeof f!="number"||f<0||r(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");o=f}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||r(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function u(f){return f._maxListeners===void 0?a.defaultMaxListeners:f._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(p){for(var v=[],E=1;E<arguments.length;E++)v.push(arguments[E]);var A=p==="error",D=this._events;if(D!==void 0)A=A&&D.error===void 0;else if(!A)return!1;if(A){var L;if(v.length>0&&(L=v[0]),L instanceof Error)throw L;var N=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw N.context=L,N}var F=D[p];if(F===void 0)return!1;if(typeof F=="function")i(F,this,v);else for(var Y=F.length,M=y(F,Y),E=0;E<Y;++E)i(M[E],this,v);return!0};function h(f,p,v,E){var A,D,L;if(s(v),D=f._events,D===void 0?(D=f._events=Object.create(null),f._eventsCount=0):(D.newListener!==void 0&&(f.emit("newListener",p,v.listener?v.listener:v),D=f._events),L=D[p]),L===void 0)L=D[p]=v,++f._eventsCount;else if(typeof L=="function"?L=D[p]=E?[v,L]:[L,v]:E?L.unshift(v):L.push(v),A=u(f),A>0&&L.length>A&&!L.warned){L.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=f,N.type=p,N.count=L.length,e(N)}return f}a.prototype.addListener=function(p,v){return h(this,p,v,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(p,v){return h(this,p,v,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(f,p,v){var E={fired:!1,wrapFn:void 0,target:f,type:p,listener:v},A=d.bind(E);return A.listener=v,E.wrapFn=A,A}a.prototype.once=function(p,v){return s(v),this.on(p,c(this,p,v)),this},a.prototype.prependOnceListener=function(p,v){return s(v),this.prependListener(p,c(this,p,v)),this},a.prototype.removeListener=function(p,v){var E,A,D,L,N;if(s(v),A=this._events,A===void 0)return this;if(E=A[p],E===void 0)return this;if(E===v||E.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete A[p],A.removeListener&&this.emit("removeListener",p,E.listener||v));else if(typeof E!="function"){for(D=-1,L=E.length-1;L>=0;L--)if(E[L]===v||E[L].listener===v){N=E[L].listener,D=L;break}if(D<0)return this;D===0?E.shift():w(E,D),E.length===1&&(A[p]=E[0]),A.removeListener!==void 0&&this.emit("removeListener",p,N||v)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(p){var v,E,A;if(E=this._events,E===void 0)return this;if(E.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):E[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete E[p]),this;if(arguments.length===0){var D=Object.keys(E),L;for(A=0;A<D.length;++A)L=D[A],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(v=E[p],typeof v=="function")this.removeListener(p,v);else if(v!==void 0)for(A=v.length-1;A>=0;A--)this.removeListener(p,v[A]);return this};function l(f,p,v){var E=f._events;if(E===void 0)return[];var A=E[p];return A===void 0?[]:typeof A=="function"?v?[A.listener||A]:[A]:v?_(A):y(A,A.length)}a.prototype.listeners=function(p){return l(this,p,!0)},a.prototype.rawListeners=function(p){return l(this,p,!1)},a.listenerCount=function(f,p){return typeof f.listenerCount=="function"?f.listenerCount(p):g.call(f,p)},a.prototype.listenerCount=g;function g(f){var p=this._events;if(p!==void 0){var v=p[f];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(f,p){for(var v=new Array(p),E=0;E<p;++E)v[E]=f[E];return v}function w(f,p){for(;p+1<f.length;p++)f[p]=f[p+1];f.pop()}function _(f){for(var p=new Array(f.length),v=0;v<p.length;++v)p[v]=f[v].listener||f[v];return p}function R(f,p){return new Promise(function(v,E){function A(L){f.removeListener(p,D),E(L)}function D(){typeof f.removeListener=="function"&&f.removeListener("error",A),v([].slice.call(arguments))}T(f,p,D,{once:!0}),p!=="error"&&x(f,A,{once:!0})})}function x(f,p,v){typeof f.on=="function"&&T(f,"error",p,v)}function T(f,p,v,E){if(typeof f.on=="function")E.once?f.once(p,v):f.on(p,v);else if(typeof f.addEventListener=="function")f.addEventListener(p,function A(D){E.once&&f.removeEventListener(p,A),v(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}return Te.exports}var Mt=Ci();function Ai(){const n=arguments[0];for(let i=1,t=arguments.length;i<t;i++)if(arguments[i])for(const e in arguments[i])n[e]=arguments[i][e];return n}let P=Ai;typeof Object.assign=="function"&&(P=Object.assign);function O(n,i,t,e){const r=n._nodes.get(i);let a=null;return r&&(e==="mixed"?a=r.out&&r.out[t]||r.undirected&&r.undirected[t]:e==="directed"?a=r.out&&r.out[t]:a=r.undirected&&r.undirected[t]),a}function I(n){return typeof n=="object"&&n!==null}function $t(n){let i;for(i in n)return!1;return!0}function U(n,i,t){Object.defineProperty(n,i,{enumerable:!1,configurable:!1,writable:!0,value:t})}function j(n,i,t){const e={enumerable:!0,configurable:!0};typeof t=="function"?e.get=t:(e.value=t,e.writable=!1),Object.defineProperty(n,i,e)}function st(n){return!(!I(n)||n.attributes&&!Array.isArray(n.attributes))}function Ri(){let n=Math.floor(Math.random()*256)&255;return()=>n++}function Q(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function le(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Qe extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class S extends Qe{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,S.prototype.constructor)}}class b extends Qe{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,b.prototype.constructor)}}class k extends Qe{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,k.prototype.constructor)}}function zt(n,i){this.key=n,this.attributes=i,this.clear()}zt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Ut(n,i){this.key=n,this.attributes=i,this.clear()}Ut.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Ot(n,i){this.key=n,this.attributes=i,this.clear()}Ot.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function fe(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}fe.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};fe.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};fe.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};fe.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Bt=0,Ht=1,ki=2,Wt=3;function ee(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Bt){if(s=n._nodes.get(e),!s)throw new b(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===Wt){if(r=""+r,u=n._edges.get(r),!u)throw new b(`Graph.${i}: could not find the "${r}" edge in the graph.`);const c=u.source.key,l=u.target.key;if(e===c)s=u.target;else if(e===l)s=u.source;else throw new b(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${c}, ${l}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===Ht?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function Li(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes[s]}}function Di(n,i,t){n.prototype[i]=function(e,r){const[a]=ee(this,i,t,e,r);return a.attributes}}function Gi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function Ni(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Fi(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);if(typeof h!="function")throw new S(`Graph.${i}: updater should be a function.`);const d=s.attributes,c=h(d[u]);return d[u]=c,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Pi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function Ii(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!I(s))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Mi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!I(s))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return P(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function $i(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(typeof s!="function")throw new S(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const zi=[{name:n=>`get${n}Attribute`,attacher:Li},{name:n=>`get${n}Attributes`,attacher:Di},{name:n=>`has${n}Attribute`,attacher:Gi},{name:n=>`set${n}Attribute`,attacher:Ni},{name:n=>`update${n}Attribute`,attacher:Fi},{name:n=>`remove${n}Attribute`,attacher:Pi},{name:n=>`replace${n}Attributes`,attacher:Ii},{name:n=>`merge${n}Attributes`,attacher:Mi},{name:n=>`update${n}Attributes`,attacher:$i}];function Ui(n){zi.forEach(function({name:i,attacher:t}){t(n,i("Node"),Bt),t(n,i("Source"),Ht),t(n,i("Target"),ki),t(n,i("Opposite"),Wt)})}function Oi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function Bi(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=O(this,a,o,t),!r)throw new b(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function Hi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Wi(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=O(this,s,u,t),!o)throw new b(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function ji(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=O(this,s,u,t),!o)throw new b(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new S(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Vi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function Ki(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!I(r))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Yi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!I(r))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return P(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function qi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new S(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Zi=[{name:n=>`get${n}Attribute`,attacher:Oi},{name:n=>`get${n}Attributes`,attacher:Bi},{name:n=>`has${n}Attribute`,attacher:Hi},{name:n=>`set${n}Attribute`,attacher:Wi},{name:n=>`update${n}Attribute`,attacher:ji},{name:n=>`remove${n}Attribute`,attacher:Vi},{name:n=>`replace${n}Attributes`,attacher:Ki},{name:n=>`merge${n}Attributes`,attacher:Yi},{name:n=>`update${n}Attributes`,attacher:qi}];function Xi(n){Zi.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Ji=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Qi(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function er(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function Pe(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function tr(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function ir(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function Ie(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function rr(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function jt(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:c,source:l,target:g}=s;if(u=e(d,c,l.key,g.key,l.attributes,g.attributes,s.undirected),n&&u)return d}}function nr(n,i){if(n.size===0)return le();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function et(n,i,t,e,r,a){const o=i?er:Qi;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function ar(n,i,t,e){const r=[];return et(!1,n,i,t,e,function(a){r.push(a)}),r}function or(n,i,t){let e=le();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=Q(e,Pe(t.in))),i!=="in"&&typeof t.out<"u"&&(e=Q(e,Pe(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=Q(e,Pe(t.undirected))),e}function tt(n,i,t,e,r,a,o){const s=t?ir:tr;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function sr(n,i,t,e,r){const a=[];return tt(!1,n,i,t,e,r,function(o){a.push(o)}),a}function ur(n,i,t,e){let r=le();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=Q(r,Ie(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=Q(r,Ie(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=Q(r,Ie(t.undirected,e))),r}function hr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return rr(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new b(`Graph.${t}: could not find the "${a}" node in the graph.`);return ar(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new b(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new b(`Graph.${t}: could not find the "${o}" target node in the graph.`);return sr(e,this.multi,r,s,o)}throw new S(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function dr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,c){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return c=h,jt(!1,this,e,c);if(arguments.length===2){h=""+h,c=d;const l=this._nodes.get(h);if(typeof l>"u")throw new b(`Graph.${a}: could not find the "${h}" node in the graph.`);return et(!1,this.multi,e==="mixed"?this.type:e,r,l,c)}if(arguments.length===3){h=""+h,d=""+d;const l=this._nodes.get(h);if(!l)throw new b(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new b(`Graph.${a}: could not find the "${d}" target node in the graph.`);return tt(!1,e,this.multi,r,l,d,c)}throw new S(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let c;if(h.length===0){let l=0;e!=="directed"&&(l+=this.undirectedSize),e!=="undirected"&&(l+=this.directedSize),c=new Array(l);let g=0;h.push((y,w,_,R,x,T,f)=>{c[g++]=d(y,w,_,R,x,T,f)})}else c=[],h.push((l,g,y,w,_,R,x)=>{c.push(d(l,g,y,w,_,R,x))});return this[a].apply(this,h),c};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),c=[];return h.push((l,g,y,w,_,R,x)=>{d(l,g,y,w,_,R,x)&&c.push(l)}),this[a].apply(this,h),c};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new S(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new S(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,c;h.length===2?(d=h[0],c=h[1],h=[]):h.length===3?(d=h[1],c=h[2],h=[h[0]]):h.length===4&&(d=h[2],c=h[3],h=[h[0],h[1]]);let l=c;return h.push((g,y,w,_,R,x,T)=>{l=d(l,g,y,w,_,R,x,T)}),this[a].apply(this,h),l}}function cr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,jt(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const c=this._nodes.get(u);if(typeof c>"u")throw new b(`Graph.${a}: could not find the "${u}" node in the graph.`);return et(!0,this.multi,e==="mixed"?this.type:e,r,c,d)}if(arguments.length===3){u=""+u,h=""+h;const c=this._nodes.get(u);if(!c)throw new b(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new b(`Graph.${a}: could not find the "${h}" target node in the graph.`);return tt(!0,e,this.multi,r,c,h,d)}throw new S(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((c,l,g,y,w,_,R)=>h(c,l,g,y,w,_,R)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((c,l,g,y,w,_,R)=>!h(c,l,g,y,w,_,R)),!this[a].apply(this,u)}}function lr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return le();if(!arguments.length)return nr(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new b(`Graph.${a}: could not find the "${o}" node in the graph.`);return or(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new b(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new b(`Graph.${a}: could not find the "${s}" target node in the graph.`);return ur(e,r,u,s)}throw new S(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function fr(n){Ji.forEach(i=>{hr(n,i),dr(n,i),cr(n,i),lr(n,i)})}const gr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function De(){this.A=null,this.B=null}De.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};De.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function pe(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function it(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return pe(n,null,e,e.undirected,r);if(typeof t=="string")return pe(n,null,e,e[t],r)}const a=new De;let o;if(i!=="undirected"){if(t!=="out"){if(o=pe(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=pe(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=pe(n,a,e,e.undirected,r),n&&o))return o}function pr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return it(!1,n,i,t,function(r){e.push(r)}),e}function me(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function mr(n,i,t){if(n!=="mixed"){if(n==="undirected")return me(null,t,t.undirected);if(typeof i=="string")return me(null,t,t[i])}let e=le();const r=new De;return n!=="undirected"&&(i!=="out"&&(e=Q(e,me(r,t,t.in))),i!=="in"&&(e=Q(e,me(r,t,t.out)))),n!=="directed"&&(e=Q(e,me(r,t,t.undirected))),e}function vr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new b(`Graph.${t}: could not find the "${a}" node in the graph.`);return pr(e==="mixed"?this.type:e,r,o)}}function yr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const c=this._nodes.get(h);if(typeof c>"u")throw new b(`Graph.${a}: could not find the "${h}" node in the graph.`);it(!1,e==="mixed"?this.type:e,r,c,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const c=[];return this[a](h,(l,g)=>{c.push(d(l,g))}),c};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const c=[];return this[a](h,(l,g)=>{d(l,g)&&c.push(l)}),c};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,c){if(arguments.length<3)throw new S(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let l=c;return this[a](h,(g,y)=>{l=d(l,g,y)}),l}}function br(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const c=this._nodes.get(h);if(typeof c>"u")throw new b(`Graph.${o}: could not find the "${h}" node in the graph.`);return it(!0,e==="mixed"?this.type:e,r,c,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(l,g)=>!d(l,g))}}function wr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return le();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new b(`Graph.${a}: could not find the "${o}" node in the graph.`);return mr(e==="mixed"?this.type:e,r,s)}}function Er(n){gr.forEach(i=>{vr(n,i),yr(n,i),br(n,i),wr(n,i)})}function Se(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,c,l;for(;s=a.next(),s.done!==!0;){let g=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){c=d[h];do l=c.target,g=!0,r(u.key,l.key,u.attributes,l.attributes,c.key,c.attributes,c.undirected),c=c.next;while(c)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){c=d[h];do l=c.target,l.key!==h&&(l=c.source),g=!0,r(u.key,l.key,u.attributes,l.attributes,c.key,c.attributes,c.undirected),c=c.next;while(c)}}t&&!g&&r(u.key,null,u.attributes,null,null,null,null)}}function _r(n,i){const t={key:n};return $t(i.attributes)||(t.attributes=P({},i.attributes)),t}function xr(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return $t(t.attributes)||(e.attributes=P({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function Tr(n){if(!I(n))throw new S('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new S("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!I(n.attributes)||n.attributes===null))throw new S("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Sr(n){if(!I(n))throw new S('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new S("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new S("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!I(n.attributes)||n.attributes===null))throw new S("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new S("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Cr=Ri(),Ar=new Set(["directed","undirected","mixed"]),ut=new Set(["domain","_events","_eventsCount","_maxListeners"]),Rr=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],kr={allowSelfLoops:!0,multi:!1,type:"mixed"};function Lr(n,i,t){if(t&&!I(t))throw new S(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new k(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function ht(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Vt(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new k(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new k(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!I(s))throw new S(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new k(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new b(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new b(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new k(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new k(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const c=new fe(e,r,u,h,s);n._edges.set(r,c);const l=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,l&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,l&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?c.attachMulti():c.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function Dr(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new k(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new k(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new S(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!I(s))throw new S(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new k(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),c=n._nodes.get(o),l,g;if(!t&&(l=n._edges.get(r),l)){if((l.source.key!==a||l.target.key!==o)&&(!e||l.source.key!==o||l.target.key!==a))throw new k(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${l.source.key}", "${l.target.key}").`);g=l}if(!g&&!n.multi&&d&&(g=e?d.undirected[o]:d.out[o]),g){const x=[g.key,!1,!1,!1];if(u?!h:!s)return x;if(u){const T=g.attributes;g.attributes=h(T),n.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else P(g.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:s});return x}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new k(`Graph.${i}: the "${r}" edge already exists in the graph.`);let w=!1,_=!1;d||(d=ht(n,a,{}),w=!0,a===o&&(c=d,_=!0)),c||(c=ht(n,o,{}),_=!0),l=new fe(e,r,d,c,s),n._edges.set(r,l);const R=a===o;return e?(d.undirectedDegree++,c.undirectedDegree++,R&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,c.inDegree++,R&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,w,_]}function ue(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class G extends Mt.EventEmitter{constructor(i){if(super(),i=P({},kr,i),typeof i.multi!="boolean")throw new S(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!Ar.has(i.type))throw new S(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new S(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?zt:i.type==="directed"?Ut:Ot;U(this,"NodeDataClass",t);const e="geid_"+Cr()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};U(this,"_attributes",{}),U(this,"_nodes",new Map),U(this,"_edges",new Map),U(this,"_directedSize",0),U(this,"_undirectedSize",0),U(this,"_directedSelfLoopCount",0),U(this,"_undirectedSelfLoopCount",0),U(this,"_edgeKeyGenerator",a),U(this,"_options",i),ut.forEach(o=>U(this,o,this[o])),j(this,"order",()=>this._nodes.size),j(this,"size",()=>this._edges.size),j(this,"directedSize",()=>this._directedSize),j(this,"undirectedSize",()=>this._undirectedSize),j(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),j(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),j(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),j(this,"multi",this._options.multi),j(this,"type",this._options.type),j(this,"allowSelfLoops",this._options.allowSelfLoops),j(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new S(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new S(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new S(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new k("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new b(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new k("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new b(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new k("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new b(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new b(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new b(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return Lr(this,i,t).key}mergeNode(i,t){if(t&&!I(t))throw new S(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(P(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new S(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do ue(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do ue(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do ue(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=O(this,e,r,this.type),!t)throw new b(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new b(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return ue(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new k("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new k("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=O(this,i,t,"directed");if(!e)throw new b(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new k("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new k("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=O(this,i,t,"undirected");if(!e)throw new b(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new S("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!I(i))throw new S("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!I(i))throw new S("Graph.mergeAttributes: provided attributes are not a plain object.");return P(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new S("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new S("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!st(t))throw new S("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new S("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!st(t))throw new S("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new S("Graph.forEachAdjacencyEntry: expecting a callback.");Se(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new S("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new S("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Se(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new S("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new S("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new S("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new S("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new S("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new S("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new S("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new S("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new S("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=_r(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=xr(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof G)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,c,l,g,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,c,h):this.mergeDirectedEdgeWithKey(u,d,c,h):y?this.addUndirectedEdgeWithKey(u,d,c,h):this.addDirectedEdgeWithKey(u,d,c,h)}),this;if(!I(i))throw new S("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!I(i.attributes))throw new S("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new S("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e<r;e++){o=a[e],Tr(o);const{key:u,attributes:h}=o;t?this.mergeNode(u,h):this.addNode(u,h)}}if(i.edges){let u=!1;if(this.type==="undirected"&&(u=!0),a=i.edges,!Array.isArray(a))throw new S("Graph.import: invalid edges. Expecting an array.");for(e=0,r=a.length;e<r;e++){s=a[e],Sr(s);const{source:h,target:d,attributes:c,undirected:l=u}=s;let g;"key"in s?(g=t?l?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:l?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,g.call(this,s.key,h,d,c)):(g=t?l?this.mergeUndirectedEdge:this.mergeDirectedEdge:l?this.addUndirectedEdge:this.addDirectedEdge,g.call(this,h,d,c))}}return this}nullCopy(i){const t=new G(P({},this._options,i));return t.replaceAttributes(P({},this.getAttributes())),t}emptyCopy(i){const t=this.nullCopy(i);return this._nodes.forEach((e,r)=>{const a=P({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new k(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new k("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new k("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,Vt(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,P({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,c;a.undirected&&h>d&&(c=h,h=d,d=c);const l=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[l]>"u"?e[l]=0:e[l]++,u+=`${e[l]}. `):u+=`[${o}]: `,u+=l,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!ut.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,U(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(G.prototype[Symbol.for("nodejs.util.inspect.custom")]=G.prototype.inspect);Rr.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?Vt:Dr;n.generateKey?G.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:G.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});Ui(G);Xi(G);fr(G);Er(G);class Kt extends G{constructor(i){const t=P({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new S("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new S('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Yt extends G{constructor(i){const t=P({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new S("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new S('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class qt extends G{constructor(i){const t=P({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Zt extends G{constructor(i){const t=P({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new S('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Xt extends G{constructor(i){const t=P({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new S('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function ge(n){n.from=function(i,t){const e=P({},i.options,t),r=new n(e);return r.import(i),r}}ge(G);ge(Kt);ge(Yt);ge(qt);ge(Zt);ge(Xt);G.Graph=G;G.DirectedGraph=Kt;G.UndirectedGraph=Yt;G.MultiGraph=qt;G.MultiDirectedGraph=Zt;G.MultiUndirectedGraph=Xt;G.InvalidArgumentsGraphError=S;G.NotFoundGraphError=b;G.UsageGraphError=k;var Me,dt;function Gr(){if(dt)return Me;dt=1;function n(t){return!t||typeof t!="object"||typeof t=="function"||Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof RegExp||t instanceof Date}function i(t,e){t=t||{};var r={};for(var a in e){var o=t[a],s=e[a];if(!n(s)){r[a]=i(o,s);continue}o===void 0?r[a]=s:r[a]=o}return r}return Me=i,Me}var $e,ct;function Jt(){return ct||(ct=1,$e=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),$e}var ze,lt;function Nr(){if(lt)return ze;lt=1;var n=Gr(),i=Jt(),t={dimensions:["x","y"],center:.5,scale:1};function e(a,o,s){if(!i(o))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");s=n(s,t);var u=s.dimensions;if(!Array.isArray(u)||u.length!==2)throw new Error("graphology-layout/random: given dimensions are invalid.");var h=s.center,d=s.scale,c=Math.PI*2,l=(h-.5)*d,g=o.order,y=u[0],w=u[1];function _(T,f){return f[y]=d*Math.cos(T*c/g)+l,f[w]=d*Math.sin(T*c/g)+l,f}var R=0;if(!a){var x={};return o.forEachNode(function(T){x[T]=_(R++,{})}),x}o.updateEachNodeAttributes(function(T,f){return _(R++,f),f},{attributes:u})}var r=e.bind(null,!1);return r.assign=e.bind(null,!0),ze=r,ze}var Fr=Nr();const Pr=It(Fr);function Ir(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function Ee(n){var i=Ir(n,"string");return typeof i=="symbol"?i:i+""}function $(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function ft(n,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,Ee(e.key),e)}}function z(n,i,t){return i&&ft(n.prototype,i),t&&ft(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function de(n){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},de(n)}function Qt(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qt=function(){return!!n})()}function Mr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function $r(n,i){if(i&&(typeof i=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mr(n)}function B(n,i,t){return i=de(i),$r(n,Qt()?Reflect.construct(i,t||[],de(n).constructor):i.apply(n,t))}function Ye(n,i){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ye(n,i)}function H(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Ye(n,i)}function zr(n){if(Array.isArray(n))return n}function Ur(n,i){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var e,r,a,o,s=[],u=!0,h=!1;try{if(a=(t=t.call(n)).next,i===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(e=a.call(t)).done)&&(s.push(e.value),s.length!==i);u=!0);}catch(d){h=!0,r=d}finally{try{if(!u&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw r}}return s}}function qe(n,i){(i==null||i>n.length)&&(i=n.length);for(var t=0,e=Array(i);t<i;t++)e[t]=n[t];return e}function ei(n,i){if(n){if(typeof n=="string")return qe(n,i);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(n,i):void 0}}function Or(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{g as It,r as Z,j as Ti,p as Si}from"./index-JtUcLLhP.js";var Te={exports:{}},ot;function Ci(){if(ot)return Te.exports;ot=1;var n=typeof Reflect=="object"?Reflect:null,i=n&&typeof n.apply=="function"?n.apply:function(p,v,E){return Function.prototype.apply.call(p,v,E)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(p){return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p))}:t=function(p){return Object.getOwnPropertyNames(p)};function e(f){console&&console.warn&&console.warn(f)}var r=Number.isNaN||function(p){return p!==p};function a(){a.init.call(this)}Te.exports=a,Te.exports.once=R,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(f){if(typeof f!="number"||f<0||r(f))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+f+".");o=f}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(p){if(typeof p!="number"||p<0||r(p))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+p+".");return this._maxListeners=p,this};function u(f){return f._maxListeners===void 0?a.defaultMaxListeners:f._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(p){for(var v=[],E=1;E<arguments.length;E++)v.push(arguments[E]);var A=p==="error",D=this._events;if(D!==void 0)A=A&&D.error===void 0;else if(!A)return!1;if(A){var L;if(v.length>0&&(L=v[0]),L instanceof Error)throw L;var N=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw N.context=L,N}var F=D[p];if(F===void 0)return!1;if(typeof F=="function")i(F,this,v);else for(var Y=F.length,M=y(F,Y),E=0;E<Y;++E)i(M[E],this,v);return!0};function h(f,p,v,E){var A,D,L;if(s(v),D=f._events,D===void 0?(D=f._events=Object.create(null),f._eventsCount=0):(D.newListener!==void 0&&(f.emit("newListener",p,v.listener?v.listener:v),D=f._events),L=D[p]),L===void 0)L=D[p]=v,++f._eventsCount;else if(typeof L=="function"?L=D[p]=E?[v,L]:[L,v]:E?L.unshift(v):L.push(v),A=u(f),A>0&&L.length>A&&!L.warned){L.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=f,N.type=p,N.count=L.length,e(N)}return f}a.prototype.addListener=function(p,v){return h(this,p,v,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(p,v){return h(this,p,v,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(f,p,v){var E={fired:!1,wrapFn:void 0,target:f,type:p,listener:v},A=d.bind(E);return A.listener=v,E.wrapFn=A,A}a.prototype.once=function(p,v){return s(v),this.on(p,c(this,p,v)),this},a.prototype.prependOnceListener=function(p,v){return s(v),this.prependListener(p,c(this,p,v)),this},a.prototype.removeListener=function(p,v){var E,A,D,L,N;if(s(v),A=this._events,A===void 0)return this;if(E=A[p],E===void 0)return this;if(E===v||E.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete A[p],A.removeListener&&this.emit("removeListener",p,E.listener||v));else if(typeof E!="function"){for(D=-1,L=E.length-1;L>=0;L--)if(E[L]===v||E[L].listener===v){N=E[L].listener,D=L;break}if(D<0)return this;D===0?E.shift():w(E,D),E.length===1&&(A[p]=E[0]),A.removeListener!==void 0&&this.emit("removeListener",p,N||v)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(p){var v,E,A;if(E=this._events,E===void 0)return this;if(E.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):E[p]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete E[p]),this;if(arguments.length===0){var D=Object.keys(E),L;for(A=0;A<D.length;++A)L=D[A],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(v=E[p],typeof v=="function")this.removeListener(p,v);else if(v!==void 0)for(A=v.length-1;A>=0;A--)this.removeListener(p,v[A]);return this};function l(f,p,v){var E=f._events;if(E===void 0)return[];var A=E[p];return A===void 0?[]:typeof A=="function"?v?[A.listener||A]:[A]:v?_(A):y(A,A.length)}a.prototype.listeners=function(p){return l(this,p,!0)},a.prototype.rawListeners=function(p){return l(this,p,!1)},a.listenerCount=function(f,p){return typeof f.listenerCount=="function"?f.listenerCount(p):g.call(f,p)},a.prototype.listenerCount=g;function g(f){var p=this._events;if(p!==void 0){var v=p[f];if(typeof v=="function")return 1;if(v!==void 0)return v.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(f,p){for(var v=new Array(p),E=0;E<p;++E)v[E]=f[E];return v}function w(f,p){for(;p+1<f.length;p++)f[p]=f[p+1];f.pop()}function _(f){for(var p=new Array(f.length),v=0;v<p.length;++v)p[v]=f[v].listener||f[v];return p}function R(f,p){return new Promise(function(v,E){function A(L){f.removeListener(p,D),E(L)}function D(){typeof f.removeListener=="function"&&f.removeListener("error",A),v([].slice.call(arguments))}T(f,p,D,{once:!0}),p!=="error"&&x(f,A,{once:!0})})}function x(f,p,v){typeof f.on=="function"&&T(f,"error",p,v)}function T(f,p,v,E){if(typeof f.on=="function")E.once?f.once(p,v):f.on(p,v);else if(typeof f.addEventListener=="function")f.addEventListener(p,function A(D){E.once&&f.removeEventListener(p,A),v(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof f)}return Te.exports}var Mt=Ci();function Ai(){const n=arguments[0];for(let i=1,t=arguments.length;i<t;i++)if(arguments[i])for(const e in arguments[i])n[e]=arguments[i][e];return n}let P=Ai;typeof Object.assign=="function"&&(P=Object.assign);function O(n,i,t,e){const r=n._nodes.get(i);let a=null;return r&&(e==="mixed"?a=r.out&&r.out[t]||r.undirected&&r.undirected[t]:e==="directed"?a=r.out&&r.out[t]:a=r.undirected&&r.undirected[t]),a}function I(n){return typeof n=="object"&&n!==null}function $t(n){let i;for(i in n)return!1;return!0}function U(n,i,t){Object.defineProperty(n,i,{enumerable:!1,configurable:!1,writable:!0,value:t})}function j(n,i,t){const e={enumerable:!0,configurable:!0};typeof t=="function"?e.get=t:(e.value=t,e.writable=!1),Object.defineProperty(n,i,e)}function st(n){return!(!I(n)||n.attributes&&!Array.isArray(n.attributes))}function Ri(){let n=Math.floor(Math.random()*256)&255;return()=>n++}function Q(){const n=arguments;let i=null,t=-1;return{[Symbol.iterator](){return this},next(){let e=null;do{if(i===null){if(t++,t>=n.length)return{done:!0};i=n[t][Symbol.iterator]()}if(e=i.next(),e.done){i=null;continue}break}while(!0);return e}}}function le(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Qe extends Error{constructor(i){super(),this.name="GraphError",this.message=i}}class S extends Qe{constructor(i){super(i),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,S.prototype.constructor)}}class b extends Qe{constructor(i){super(i),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,b.prototype.constructor)}}class k extends Qe{constructor(i){super(i),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,k.prototype.constructor)}}function zt(n,i){this.key=n,this.attributes=i,this.clear()}zt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Ut(n,i){this.key=n,this.attributes=i,this.clear()}Ut.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Ot(n,i){this.key=n,this.attributes=i,this.clear()}Ot.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function fe(n,i,t,e,r){this.key=i,this.attributes=r,this.undirected=n,this.source=t,this.target=e}fe.prototype.attach=function(){let n="out",i="in";this.undirected&&(n=i="undirected");const t=this.source.key,e=this.target.key;this.source[n][e]=this,!(this.undirected&&t===e)&&(this.target[i][t]=this)};fe.prototype.attachMulti=function(){let n="out",i="in";const t=this.source.key,e=this.target.key;this.undirected&&(n=i="undirected");const r=this.source[n],a=r[e];if(typeof a>"u"){r[e]=this,this.undirected&&t===e||(this.target[i][t]=this);return}a.previous=this,this.next=a,r[e]=this,this.target[i][t]=this};fe.prototype.detach=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),delete this.source[t][i],delete this.target[e][n]};fe.prototype.detachMulti=function(){const n=this.source.key,i=this.target.key;let t="out",e="in";this.undirected&&(t=e="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][i],delete this.target[e][n]):(this.next.previous=void 0,this.source[t][i]=this.next,this.target[e][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Bt=0,Ht=1,ki=2,Wt=3;function ee(n,i,t,e,r,a,o){let s,u,h,d;if(e=""+e,t===Bt){if(s=n._nodes.get(e),!s)throw new b(`Graph.${i}: could not find the "${e}" node in the graph.`);h=r,d=a}else if(t===Wt){if(r=""+r,u=n._edges.get(r),!u)throw new b(`Graph.${i}: could not find the "${r}" edge in the graph.`);const c=u.source.key,l=u.target.key;if(e===c)s=u.target;else if(e===l)s=u.source;else throw new b(`Graph.${i}: the "${e}" node is not attached to the "${r}" edge (${c}, ${l}).`);h=a,d=o}else{if(u=n._edges.get(e),!u)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`);t===Ht?s=u.source:s=u.target,h=r,d=a}return[s,h,d]}function Li(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes[s]}}function Di(n,i,t){n.prototype[i]=function(e,r){const[a]=ee(this,i,t,e,r);return a.attributes}}function Gi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return o.attributes.hasOwnProperty(s)}}function Ni(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);return s.attributes[u]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Fi(n,i,t){n.prototype[i]=function(e,r,a,o){const[s,u,h]=ee(this,i,t,e,r,a,o);if(typeof h!="function")throw new S(`Graph.${i}: updater should be a function.`);const d=s.attributes,c=h(d[u]);return d[u]=c,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:u}),this}}function Pi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}function Ii(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!I(s))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Mi(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(!I(s))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return P(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}function $i(n,i,t){n.prototype[i]=function(e,r,a){const[o,s]=ee(this,i,t,e,r,a);if(typeof s!="function")throw new S(`Graph.${i}: provided updater is not a function.`);return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const zi=[{name:n=>`get${n}Attribute`,attacher:Li},{name:n=>`get${n}Attributes`,attacher:Di},{name:n=>`has${n}Attribute`,attacher:Gi},{name:n=>`set${n}Attribute`,attacher:Ni},{name:n=>`update${n}Attribute`,attacher:Fi},{name:n=>`remove${n}Attribute`,attacher:Pi},{name:n=>`replace${n}Attributes`,attacher:Ii},{name:n=>`merge${n}Attributes`,attacher:Mi},{name:n=>`update${n}Attributes`,attacher:$i}];function Ui(n){zi.forEach(function({name:i,attacher:t}){t(n,i("Node"),Bt),t(n,i("Source"),Ht),t(n,i("Target"),ki),t(n,i("Opposite"),Wt)})}function Oi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes[r]}}function Bi(n,i,t){n.prototype[i]=function(e){let r;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,o=""+arguments[1];if(r=O(this,a,o,t),!r)throw new b(`Graph.${i}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function Hi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(r)}}function Wi(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=O(this,s,u,t),!o)throw new b(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=a,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function ji(n,i,t){n.prototype[i]=function(e,r,a){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+e,u=""+r;if(r=arguments[2],a=arguments[3],o=O(this,s,u,t),!o)throw new b(`Graph.${i}: could not find an edge for the given path ("${s}" - "${u}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof a!="function")throw new S(`Graph.${i}: updater should be a function.`);return o.attributes[r]=a(o.attributes[r]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:r}),this}}function Vi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[r],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:r}),this}}function Ki(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!I(r))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return a.attributes=r,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Yi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(!I(r))throw new S(`Graph.${i}: provided attributes are not a plain object.`);return P(a.attributes,r),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:r}),this}}function qi(n,i,t){n.prototype[i]=function(e,r){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new k(`Graph.${i}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new k(`Graph.${i}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,s=""+r;if(r=arguments[2],a=O(this,o,s,t),!a)throw new b(`Graph.${i}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new k(`Graph.${i}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,a=this._edges.get(e),!a)throw new b(`Graph.${i}: could not find the "${e}" edge in the graph.`)}if(typeof r!="function")throw new S(`Graph.${i}: provided updater is not a function.`);return a.attributes=r(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Zi=[{name:n=>`get${n}Attribute`,attacher:Oi},{name:n=>`get${n}Attributes`,attacher:Bi},{name:n=>`has${n}Attribute`,attacher:Hi},{name:n=>`set${n}Attribute`,attacher:Wi},{name:n=>`update${n}Attribute`,attacher:ji},{name:n=>`remove${n}Attribute`,attacher:Vi},{name:n=>`replace${n}Attributes`,attacher:Ki},{name:n=>`merge${n}Attributes`,attacher:Yi},{name:n=>`update${n}Attributes`,attacher:qi}];function Xi(n){Zi.forEach(function({name:i,attacher:t}){t(n,i("Edge"),"mixed"),t(n,i("DirectedEdge"),"directed"),t(n,i("UndirectedEdge"),"undirected")})}const Ji=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Qi(n,i,t,e){let r=!1;for(const a in i){if(a===e)continue;const o=i[a];if(r=t(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&r)return o.key}}function er(n,i,t,e){let r,a,o,s=!1;for(const u in i)if(u!==e){r=i[u];do{if(a=r.source,o=r.target,s=t(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected),n&&s)return r.key;r=r.next}while(r!==void 0)}}function Pe(n,i){const t=Object.keys(n),e=t.length;let r,a=0;return{[Symbol.iterator](){return this},next(){do if(r)r=r.next;else{if(a>=e)return{done:!0};const o=t[a++];if(o===i){r=void 0;continue}r=n[o]}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}}}function tr(n,i,t,e){const r=i[t];if(!r)return;const a=r.source,o=r.target;if(e(r.key,r.attributes,a.key,o.key,a.attributes,o.attributes,r.undirected)&&n)return r.key}function ir(n,i,t,e){let r=i[t];if(!r)return;let a=!1;do{if(a=e(r.key,r.attributes,r.source.key,r.target.key,r.source.attributes,r.target.attributes,r.undirected),n&&a)return r.key;r=r.next}while(r!==void 0)}function Ie(n,i){let t=n[i];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const r={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:r}}};let e=!1;return{[Symbol.iterator](){return this},next(){return e===!0?{done:!0}:(e=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function rr(n,i){if(n.size===0)return[];if(i==="mixed"||i===n.type)return Array.from(n._edges.keys());const t=i==="undirected"?n.undirectedSize:n.directedSize,e=new Array(t),r=i==="undirected",a=n._edges.values();let o=0,s,u;for(;s=a.next(),s.done!==!0;)u=s.value,u.undirected===r&&(e[o++]=u.key);return e}function jt(n,i,t,e){if(i.size===0)return;const r=t!=="mixed"&&t!==i.type,a=t==="undirected";let o,s,u=!1;const h=i._edges.values();for(;o=h.next(),o.done!==!0;){if(s=o.value,r&&s.undirected!==a)continue;const{key:d,attributes:c,source:l,target:g}=s;if(u=e(d,c,l.key,g.key,l.attributes,g.attributes,s.undirected),n&&u)return d}}function nr(n,i){if(n.size===0)return le();const t=i!=="mixed"&&i!==n.type,e=i==="undirected",r=n._edges.values();return{[Symbol.iterator](){return this},next(){let a,o;for(;;){if(a=r.next(),a.done)return a;if(o=a.value,!(t&&o.undirected!==e))break}return{value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected},done:!1}}}}function et(n,i,t,e,r,a){const o=i?er:Qi;let s;if(t!=="undirected"&&(e!=="out"&&(s=o(n,r.in,a),n&&s)||e!=="in"&&(s=o(n,r.out,a,e?void 0:r.key),n&&s))||t!=="directed"&&(s=o(n,r.undirected,a),n&&s))return s}function ar(n,i,t,e){const r=[];return et(!1,n,i,t,e,function(a){r.push(a)}),r}function or(n,i,t){let e=le();return n!=="undirected"&&(i!=="out"&&typeof t.in<"u"&&(e=Q(e,Pe(t.in))),i!=="in"&&typeof t.out<"u"&&(e=Q(e,Pe(t.out,i?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(e=Q(e,Pe(t.undirected))),e}function tt(n,i,t,e,r,a,o){const s=t?ir:tr;let u;if(i!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&(u=s(n,r.in,a,o),n&&u)||typeof r.out<"u"&&e!=="in"&&(e||r.key!==a)&&(u=s(n,r.out,a,o),n&&u))||i!=="directed"&&typeof r.undirected<"u"&&(u=s(n,r.undirected,a,o),n&&u))return u}function sr(n,i,t,e,r){const a=[];return tt(!1,n,i,t,e,r,function(o){a.push(o)}),a}function ur(n,i,t,e){let r=le();return n!=="undirected"&&(typeof t.in<"u"&&i!=="out"&&e in t.in&&(r=Q(r,Ie(t.in,e))),typeof t.out<"u"&&i!=="in"&&e in t.out&&(i||t.key!==e)&&(r=Q(r,Ie(t.out,e)))),n!=="directed"&&typeof t.undirected<"u"&&e in t.undirected&&(r=Q(r,Ie(t.undirected,e))),r}function hr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a,o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];if(!arguments.length)return rr(this,e);if(arguments.length===1){a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new b(`Graph.${t}: could not find the "${a}" node in the graph.`);return ar(this.multi,e==="mixed"?this.type:e,r,s)}if(arguments.length===2){a=""+a,o=""+o;const s=this._nodes.get(a);if(!s)throw new b(`Graph.${t}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(o))throw new b(`Graph.${t}: could not find the "${o}" target node in the graph.`);return sr(e,this.multi,r,s,o)}throw new S(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function dr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d,c){if(!(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)){if(arguments.length===1)return c=h,jt(!1,this,e,c);if(arguments.length===2){h=""+h,c=d;const l=this._nodes.get(h);if(typeof l>"u")throw new b(`Graph.${a}: could not find the "${h}" node in the graph.`);return et(!1,this.multi,e==="mixed"?this.type:e,r,l,c)}if(arguments.length===3){h=""+h,d=""+d;const l=this._nodes.get(h);if(!l)throw new b(`Graph.${a}: could not find the "${h}" source node in the graph.`);if(!this._nodes.has(d))throw new b(`Graph.${a}: could not find the "${d}" target node in the graph.`);return tt(!1,e,this.multi,r,l,d,c)}throw new S(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop();let c;if(h.length===0){let l=0;e!=="directed"&&(l+=this.undirectedSize),e!=="undirected"&&(l+=this.directedSize),c=new Array(l);let g=0;h.push((y,w,_,R,x,T,f)=>{c[g++]=d(y,w,_,R,x,T,f)})}else c=[],h.push((l,g,y,w,_,R,x)=>{c.push(d(l,g,y,w,_,R,x))});return this[a].apply(this,h),c};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const h=Array.prototype.slice.call(arguments),d=h.pop(),c=[];return h.push((l,g,y,w,_,R,x)=>{d(l,g,y,w,_,R,x)&&c.push(l)}),this[a].apply(this,h),c};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(){let h=Array.prototype.slice.call(arguments);if(h.length<2||h.length>4)throw new S(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${h.length}).`);if(typeof h[h.length-1]=="function"&&typeof h[h.length-2]!="function")throw new S(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,c;h.length===2?(d=h[0],c=h[1],h=[]):h.length===3?(d=h[1],c=h[2],h=[h[0]]):h.length===4&&(d=h[2],c=h[3],h=[h[0],h[1]]);let l=c;return h.push((g,y,w,_,R,x,T)=>{l=d(l,g,y,w,_,R,x,T)}),this[a].apply(this,h),l}}function cr(n,i){const{name:t,type:e,direction:r}=i,a="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(u,h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return!1;if(arguments.length===1)return d=u,jt(!0,this,e,d);if(arguments.length===2){u=""+u,d=h;const c=this._nodes.get(u);if(typeof c>"u")throw new b(`Graph.${a}: could not find the "${u}" node in the graph.`);return et(!0,this.multi,e==="mixed"?this.type:e,r,c,d)}if(arguments.length===3){u=""+u,h=""+h;const c=this._nodes.get(u);if(!c)throw new b(`Graph.${a}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(h))throw new b(`Graph.${a}: could not find the "${h}" target node in the graph.`);return tt(!0,e,this.multi,r,c,h,d)}throw new S(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const o="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((c,l,g,y,w,_,R)=>h(c,l,g,y,w,_,R)),!!this[a].apply(this,u)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),h=u.pop();return u.push((c,l,g,y,w,_,R)=>!h(c,l,g,y,w,_,R)),!this[a].apply(this,u)}}function lr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o,s){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return le();if(!arguments.length)return nr(this,e);if(arguments.length===1){o=""+o;const u=this._nodes.get(o);if(!u)throw new b(`Graph.${a}: could not find the "${o}" node in the graph.`);return or(e,r,u)}if(arguments.length===2){o=""+o,s=""+s;const u=this._nodes.get(o);if(!u)throw new b(`Graph.${a}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new b(`Graph.${a}: could not find the "${s}" target node in the graph.`);return ur(e,r,u,s)}throw new S(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function fr(n){Ji.forEach(i=>{hr(n,i),dr(n,i),cr(n,i),lr(n,i)})}const gr=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function De(){this.A=null,this.B=null}De.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};De.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function pe(n,i,t,e,r){for(const a in e){const o=e[a],s=o.source,u=o.target,h=s===t?u:s;if(i&&i.has(h.key))continue;const d=r(h.key,h.attributes);if(n&&d)return h.key}}function it(n,i,t,e,r){if(i!=="mixed"){if(i==="undirected")return pe(n,null,e,e.undirected,r);if(typeof t=="string")return pe(n,null,e,e[t],r)}const a=new De;let o;if(i!=="undirected"){if(t!=="out"){if(o=pe(n,null,e,e.in,r),n&&o)return o;a.wrap(e.in)}if(t!=="in"){if(o=pe(n,a,e,e.out,r),n&&o)return o;a.wrap(e.out)}}if(i!=="directed"&&(o=pe(n,a,e,e.undirected,r),n&&o))return o}function pr(n,i,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof i=="string")return Object.keys(t[i])}const e=[];return it(!1,n,i,t,function(r){e.push(r)}),e}function me(n,i,t){const e=Object.keys(t),r=e.length;let a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=r)return n&&n.wrap(t),{done:!0};const s=t[e[a++]],u=s.source,h=s.target;if(o=u===i?h:u,n&&n.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function mr(n,i,t){if(n!=="mixed"){if(n==="undirected")return me(null,t,t.undirected);if(typeof i=="string")return me(null,t,t[i])}let e=le();const r=new De;return n!=="undirected"&&(i!=="out"&&(e=Q(e,me(r,t,t.in))),i!=="in"&&(e=Q(e,me(r,t,t.out)))),n!=="directed"&&(e=Q(e,me(r,t,t.undirected))),e}function vr(n,i){const{name:t,type:e,direction:r}=i;n.prototype[t]=function(a){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return[];a=""+a;const o=this._nodes.get(a);if(typeof o>"u")throw new b(`Graph.${t}: could not find the "${a}" node in the graph.`);return pr(e==="mixed"?this.type:e,r,o)}}function yr(n,i){const{name:t,type:e,direction:r}=i,a="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const c=this._nodes.get(h);if(typeof c>"u")throw new b(`Graph.${a}: could not find the "${h}" node in the graph.`);it(!1,e==="mixed"?this.type:e,r,c,d)};const o="map"+t[0].toUpperCase()+t.slice(1);n.prototype[o]=function(h,d){const c=[];return this[a](h,(l,g)=>{c.push(d(l,g))}),c};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(h,d){const c=[];return this[a](h,(l,g)=>{d(l,g)&&c.push(l)}),c};const u="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[u]=function(h,d,c){if(arguments.length<3)throw new S(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let l=c;return this[a](h,(g,y)=>{l=d(l,g,y)}),l}}function br(n,i){const{name:t,type:e,direction:r}=i,a=t[0].toUpperCase()+t.slice(1,-1),o="find"+a;n.prototype[o]=function(h,d){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return;h=""+h;const c=this._nodes.get(h);if(typeof c>"u")throw new b(`Graph.${o}: could not find the "${h}" node in the graph.`);return it(!0,e==="mixed"?this.type:e,r,c,d)};const s="some"+a;n.prototype[s]=function(h,d){return!!this[o](h,d)};const u="every"+a;n.prototype[u]=function(h,d){return!this[o](h,(l,g)=>!d(l,g))}}function wr(n,i){const{name:t,type:e,direction:r}=i,a=t.slice(0,-1)+"Entries";n.prototype[a]=function(o){if(e!=="mixed"&&this.type!=="mixed"&&e!==this.type)return le();o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new b(`Graph.${a}: could not find the "${o}" node in the graph.`);return mr(e==="mixed"?this.type:e,r,s)}}function Er(n){gr.forEach(i=>{vr(n,i),yr(n,i),br(n,i),wr(n,i)})}function Se(n,i,t,e,r){const a=e._nodes.values(),o=e.type;let s,u,h,d,c,l;for(;s=a.next(),s.done!==!0;){let g=!1;if(u=s.value,o!=="undirected"){d=u.out;for(h in d){c=d[h];do l=c.target,g=!0,r(u.key,l.key,u.attributes,l.attributes,c.key,c.attributes,c.undirected),c=c.next;while(c)}}if(o!=="directed"){d=u.undirected;for(h in d)if(!(i&&u.key>h)){c=d[h];do l=c.target,l.key!==h&&(l=c.source),g=!0,r(u.key,l.key,u.attributes,l.attributes,c.key,c.attributes,c.undirected),c=c.next;while(c)}}t&&!g&&r(u.key,null,u.attributes,null,null,null,null)}}function _r(n,i){const t={key:n};return $t(i.attributes)||(t.attributes=P({},i.attributes)),t}function xr(n,i,t){const e={key:i,source:t.source.key,target:t.target.key};return $t(t.attributes)||(e.attributes=P({},t.attributes)),n==="mixed"&&t.undirected&&(e.undirected=!0),e}function Tr(n){if(!I(n))throw new S('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new S("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!I(n.attributes)||n.attributes===null))throw new S("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Sr(n){if(!I(n))throw new S('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new S("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new S("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!I(n.attributes)||n.attributes===null))throw new S("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new S("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Cr=Ri(),Ar=new Set(["directed","undirected","mixed"]),ut=new Set(["domain","_events","_eventsCount","_maxListeners"]),Rr=[{name:n=>`${n}Edge`,generateKey:!0},{name:n=>`${n}DirectedEdge`,generateKey:!0,type:"directed"},{name:n=>`${n}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:n=>`${n}EdgeWithKey`},{name:n=>`${n}DirectedEdgeWithKey`,type:"directed"},{name:n=>`${n}UndirectedEdgeWithKey`,type:"undirected"}],kr={allowSelfLoops:!0,multi:!1,type:"mixed"};function Lr(n,i,t){if(t&&!I(t))throw new S(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(i=""+i,t=t||{},n._nodes.has(i))throw new k(`Graph.addNode: the "${i}" node already exist in the graph.`);const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function ht(n,i,t){const e=new n.NodeDataClass(i,t);return n._nodes.set(i,e),n.emit("nodeAdded",{key:i,attributes:t}),e}function Vt(n,i,t,e,r,a,o,s){if(!e&&n.type==="undirected")throw new k(`Graph.${i}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new k(`Graph.${i}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!I(s))throw new S(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`);if(a=""+a,o=""+o,s=s||{},!n.allowSelfLoops&&a===o)throw new k(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=n._nodes.get(a),h=n._nodes.get(o);if(!u)throw new b(`Graph.${i}: source node "${a}" not found.`);if(!h)throw new b(`Graph.${i}: target node "${o}" not found.`);const d={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new k(`Graph.${i}: the "${r}" edge already exists in the graph.`);if(!n.multi&&(e?typeof u.undirected[o]<"u":typeof u.out[o]<"u"))throw new k(`Graph.${i}: an edge linking "${a}" to "${o}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const c=new fe(e,r,u,h,s);n._edges.set(r,c);const l=a===o;return e?(u.undirectedDegree++,h.undirectedDegree++,l&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,h.inDegree++,l&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?c.attachMulti():c.attach(),e?n._undirectedSize++:n._directedSize++,d.key=r,n.emit("edgeAdded",d),r}function Dr(n,i,t,e,r,a,o,s,u){if(!e&&n.type==="undirected")throw new k(`Graph.${i}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(e&&n.type==="directed")throw new k(`Graph.${i}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(u){if(typeof s!="function")throw new S(`Graph.${i}: invalid updater function. Expecting a function but got "${s}"`)}else if(!I(s))throw new S(`Graph.${i}: invalid attributes. Expecting an object but got "${s}"`)}a=""+a,o=""+o;let h;if(u&&(h=s,s=void 0),!n.allowSelfLoops&&a===o)throw new k(`Graph.${i}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=n._nodes.get(a),c=n._nodes.get(o),l,g;if(!t&&(l=n._edges.get(r),l)){if((l.source.key!==a||l.target.key!==o)&&(!e||l.source.key!==o||l.target.key!==a))throw new k(`Graph.${i}: inconsistency detected when attempting to merge the "${r}" edge with "${a}" source & "${o}" target vs. ("${l.source.key}", "${l.target.key}").`);g=l}if(!g&&!n.multi&&d&&(g=e?d.undirected[o]:d.out[o]),g){const x=[g.key,!1,!1,!1];if(u?!h:!s)return x;if(u){const T=g.attributes;g.attributes=h(T),n.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else P(g.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:s});return x}s=s||{},u&&h&&(s=h(s));const y={key:null,undirected:e,source:a,target:o,attributes:s};if(t)r=n._edgeKeyGenerator();else if(r=""+r,n._edges.has(r))throw new k(`Graph.${i}: the "${r}" edge already exists in the graph.`);let w=!1,_=!1;d||(d=ht(n,a,{}),w=!0,a===o&&(c=d,_=!0)),c||(c=ht(n,o,{}),_=!0),l=new fe(e,r,d,c,s),n._edges.set(r,l);const R=a===o;return e?(d.undirectedDegree++,c.undirectedDegree++,R&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,c.inDegree++,R&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),e?n._undirectedSize++:n._directedSize++,y.key=r,n.emit("edgeAdded",y),[r,!0,w,_]}function ue(n,i){n._edges.delete(i.key);const{source:t,target:e,attributes:r}=i,a=i.undirected,o=t===e;a?(t.undirectedDegree--,e.undirectedDegree--,o&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,e.inDegree--,o&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?i.detachMulti():i.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:i.key,attributes:r,source:t.key,target:e.key,undirected:a})}class G extends Mt.EventEmitter{constructor(i){if(super(),i=P({},kr,i),typeof i.multi!="boolean")throw new S(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${i.multi}".`);if(!Ar.has(i.type))throw new S(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${i.type}".`);if(typeof i.allowSelfLoops!="boolean")throw new S(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${i.allowSelfLoops}".`);const t=i.type==="mixed"?zt:i.type==="directed"?Ut:Ot;U(this,"NodeDataClass",t);const e="geid_"+Cr()+"_";let r=0;const a=()=>{let o;do o=e+r++;while(this._edges.has(o));return o};U(this,"_attributes",{}),U(this,"_nodes",new Map),U(this,"_edges",new Map),U(this,"_directedSize",0),U(this,"_undirectedSize",0),U(this,"_directedSelfLoopCount",0),U(this,"_undirectedSelfLoopCount",0),U(this,"_edgeKeyGenerator",a),U(this,"_options",i),ut.forEach(o=>U(this,o,this[o])),j(this,"order",()=>this._nodes.size),j(this,"size",()=>this._edges.size),j(this,"directedSize",()=>this._directedSize),j(this,"undirectedSize",()=>this._undirectedSize),j(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),j(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),j(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),j(this,"multi",this._options.multi),j(this,"type",this._options.type),j(this,"allowSelfLoops",this._options.allowSelfLoops),j(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(i){return this._nodes.has(""+i)}hasDirectedEdge(i,t){if(this.type==="undirected")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&!r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.out.hasOwnProperty(t):!1}throw new S(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(i,t){if(this.type==="directed")return!1;if(arguments.length===1){const e=""+i,r=this._edges.get(e);return!!r&&r.undirected}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?e.undirected.hasOwnProperty(t):!1}throw new S(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(i,t){if(arguments.length===1){const e=""+i;return this._edges.has(e)}else if(arguments.length===2){i=""+i,t=""+t;const e=this._nodes.get(i);return e?typeof e.out<"u"&&e.out.hasOwnProperty(t)||typeof e.undirected<"u"&&e.undirected.hasOwnProperty(t):!1}throw new S(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(i,t){if(this.type==="undirected")return;if(i=""+i,t=""+t,this.multi)throw new k("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const e=this._nodes.get(i);if(!e)throw new b(`Graph.directedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||void 0;if(r)return r.key}undirectedEdge(i,t){if(this.type==="directed")return;if(i=""+i,t=""+t,this.multi)throw new k("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const e=this._nodes.get(i);if(!e)throw new b(`Graph.undirectedEdge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=e.undirected&&e.undirected[t]||void 0;if(r)return r.key}edge(i,t){if(this.multi)throw new k("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.edge: could not find the "${i}" source node in the graph.`);if(!this._nodes.has(t))throw new b(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=e.out&&e.out[t]||e.undirected&&e.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areDirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in||t in e.out}areOutNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areOutNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.out}areInNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areInNeighbors: could not find the "${i}" node in the graph.`);return this.type==="undirected"?!1:t in e.in}areUndirectedNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areUndirectedNeighbors: could not find the "${i}" node in the graph.`);return this.type==="directed"?!1:t in e.undirected}areNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&(t in e.in||t in e.out)||this.type!=="directed"&&t in e.undirected}areInboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areInboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.in||this.type!=="directed"&&t in e.undirected}areOutboundNeighbors(i,t){i=""+i,t=""+t;const e=this._nodes.get(i);if(!e)throw new b(`Graph.areOutboundNeighbors: could not find the "${i}" node in the graph.`);return this.type!=="undirected"&&t in e.out||this.type!=="directed"&&t in e.undirected}inDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.directedDegree: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.undirectedDegree: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree),e}outboundDegree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outboundDegree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.outDegree),e}degree(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.degree: could not find the "${i}" node in the graph.`);let e=0;return this.type!=="directed"&&(e+=t.undirectedDegree),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree),e}inDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.directedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree,r+=t.directedLoops),e-r}outboundDegreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.outDegree,r+=t.directedLoops),e-r}degreeWithoutSelfLoops(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.degreeWithoutSelfLoops: could not find the "${i}" node in the graph.`);let e=0,r=0;return this.type!=="directed"&&(e+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!=="undirected"&&(e+=t.inDegree+t.outDegree,r+=t.directedLoops*2),e-r}source(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.source: could not find the "${i}" edge in the graph.`);return t.source.key}target(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.target: could not find the "${i}" edge in the graph.`);return t.target.key}extremities(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.extremities: could not find the "${i}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(i,t){i=""+i,t=""+t;const e=this._edges.get(t);if(!e)throw new b(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=e.source.key,a=e.target.key;if(i===r)return a;if(i===a)return r;throw new b(`Graph.opposite: the "${i}" node is not attached to the "${t}" edge (${r}, ${a}).`)}hasExtremity(i,t){i=""+i,t=""+t;const e=this._edges.get(i);if(!e)throw new b(`Graph.hasExtremity: could not find the "${i}" edge in the graph.`);return e.source.key===t||e.target.key===t}isUndirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isUndirected: could not find the "${i}" edge in the graph.`);return t.undirected}isDirected(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isDirected: could not find the "${i}" edge in the graph.`);return!t.undirected}isSelfLoop(i){i=""+i;const t=this._edges.get(i);if(!t)throw new b(`Graph.isSelfLoop: could not find the "${i}" edge in the graph.`);return t.source===t.target}addNode(i,t){return Lr(this,i,t).key}mergeNode(i,t){if(t&&!I(t))throw new S(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);i=""+i,t=t||{};let e=this._nodes.get(i);return e?(t&&(P(e.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:i,attributes:e.attributes,data:t})),[i,!1]):(e=new this.NodeDataClass(i,t),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:t}),[i,!0])}updateNode(i,t){if(t&&typeof t!="function")throw new S(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);i=""+i;let e=this._nodes.get(i);if(e){if(t){const a=e.attributes;e.attributes=t(a),this.emit("nodeAttributesUpdated",{type:"replace",key:i,attributes:e.attributes})}return[i,!1]}const r=t?t({}):{};return e=new this.NodeDataClass(i,r),this._nodes.set(i,e),this.emit("nodeAdded",{key:i,attributes:r}),[i,!0]}dropNode(i){i=""+i;const t=this._nodes.get(i);if(!t)throw new b(`Graph.dropNode: could not find the "${i}" node in the graph.`);let e;if(this.type!=="undirected"){for(const r in t.out){e=t.out[r];do ue(this,e),e=e.next;while(e)}for(const r in t.in){e=t.in[r];do ue(this,e),e=e.next;while(e)}}if(this.type!=="directed")for(const r in t.undirected){e=t.undirected[r];do ue(this,e),e=e.next;while(e)}this._nodes.delete(i),this.emit("nodeDropped",{key:i,attributes:t.attributes})}dropEdge(i){let t;if(arguments.length>1){const e=""+arguments[0],r=""+arguments[1];if(t=O(this,e,r,this.type),!t)throw new b(`Graph.dropEdge: could not find the "${e}" -> "${r}" edge in the graph.`)}else if(i=""+i,t=this._edges.get(i),!t)throw new b(`Graph.dropEdge: could not find the "${i}" edge in the graph.`);return ue(this,t),this}dropDirectedEdge(i,t){if(arguments.length<2)throw new k("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new k("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");i=""+i,t=""+t;const e=O(this,i,t,"directed");if(!e)throw new b(`Graph.dropDirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}dropUndirectedEdge(i,t){if(arguments.length<2)throw new k("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new k("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const e=O(this,i,t,"undirected");if(!e)throw new b(`Graph.dropUndirectedEdge: could not find a "${i}" -> "${t}" edge in the graph.`);return ue(this,e),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const i=this._nodes.values();let t;for(;t=i.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(i){return this._attributes[i]}getAttributes(){return this._attributes}hasAttribute(i){return this._attributes.hasOwnProperty(i)}setAttribute(i,t){return this._attributes[i]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}updateAttribute(i,t){if(typeof t!="function")throw new S("Graph.updateAttribute: updater should be a function.");const e=this._attributes[i];return this._attributes[i]=t(e),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:i}),this}removeAttribute(i){return delete this._attributes[i],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:i}),this}replaceAttributes(i){if(!I(i))throw new S("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=i,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(i){if(!I(i))throw new S("Graph.mergeAttributes: provided attributes are not a plain object.");return P(this._attributes,i),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:i}),this}updateAttributes(i){if(typeof i!="function")throw new S("Graph.updateAttributes: provided updater is not a function.");return this._attributes=i(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(i,t){if(typeof i!="function")throw new S("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!st(t))throw new S("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._nodes.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,a.attributes=i(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(i,t){if(typeof i!="function")throw new S("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!st(t))throw new S("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const e=this._edges.values();let r,a,o,s;for(;r=e.next(),r.done!==!0;)a=r.value,o=a.source,s=a.target,a.attributes=i(a.key,a.attributes,o.key,s.key,o.attributes,s.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(i){if(typeof i!="function")throw new S("Graph.forEachAdjacencyEntry: expecting a callback.");Se(!1,!1,!1,this,i)}forEachAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new S("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!1,!0,this,i)}forEachAssymetricAdjacencyEntry(i){if(typeof i!="function")throw new S("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Se(!1,!0,!1,this,i)}forEachAssymetricAdjacencyEntryWithOrphans(i){if(typeof i!="function")throw new S("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Se(!1,!0,!0,this,i)}nodes(){return Array.from(this._nodes.keys())}forEachNode(i){if(typeof i!="function")throw new S("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)}findNode(i){if(typeof i!="function")throw new S("Graph.findNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return r.key}mapNodes(i){if(typeof i!="function")throw new S("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let e,r;const a=new Array(this.order);let o=0;for(;e=t.next(),e.done!==!0;)r=e.value,a[o++]=i(r.key,r.attributes);return a}someNode(i){if(typeof i!="function")throw new S("Graph.someNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,i(r.key,r.attributes))return!0;return!1}everyNode(i){if(typeof i!="function")throw new S("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let e,r;for(;e=t.next(),e.done!==!0;)if(r=e.value,!i(r.key,r.attributes))return!1;return!0}filterNodes(i){if(typeof i!="function")throw new S("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let e,r;const a=[];for(;e=t.next(),e.done!==!0;)r=e.value,i(r.key,r.attributes)&&a.push(r.key);return a}reduceNodes(i,t){if(typeof i!="function")throw new S("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new S("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let e=t;const r=this._nodes.values();let a,o;for(;a=r.next(),a.done!==!0;)o=a.value,e=i(e,o.key,o.attributes);return e}nodeEntries(){const i=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=i.next();if(t.done)return t;const e=t.value;return{value:{node:e.key,attributes:e.attributes},done:!1}}}}export(){const i=new Array(this._nodes.size);let t=0;this._nodes.forEach((r,a)=>{i[t++]=_r(a,r)});const e=new Array(this._edges.size);return t=0,this._edges.forEach((r,a)=>{e[t++]=xr(this.type,a,r)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:i,edges:e}}import(i,t=!1){if(i instanceof G)return i.forEachNode((u,h)=>{t?this.mergeNode(u,h):this.addNode(u,h)}),i.forEachEdge((u,h,d,c,l,g,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,c,h):this.mergeDirectedEdgeWithKey(u,d,c,h):y?this.addUndirectedEdgeWithKey(u,d,c,h):this.addDirectedEdgeWithKey(u,d,c,h)}),this;if(!I(i))throw new S("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(i.attributes){if(!I(i.attributes))throw new S("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(i.attributes):this.replaceAttributes(i.attributes)}let e,r,a,o,s;if(i.nodes){if(a=i.nodes,!Array.isArray(a))throw new S("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=a.length;e<r;e++){o=a[e],Tr(o);const{key:u,attributes:h}=o;t?this.mergeNode(u,h):this.addNode(u,h)}}if(i.edges){let u=!1;if(this.type==="undirected"&&(u=!0),a=i.edges,!Array.isArray(a))throw new S("Graph.import: invalid edges. Expecting an array.");for(e=0,r=a.length;e<r;e++){s=a[e],Sr(s);const{source:h,target:d,attributes:c,undirected:l=u}=s;let g;"key"in s?(g=t?l?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:l?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,g.call(this,s.key,h,d,c)):(g=t?l?this.mergeUndirectedEdge:this.mergeDirectedEdge:l?this.addUndirectedEdge:this.addDirectedEdge,g.call(this,h,d,c))}}return this}nullCopy(i){const t=new G(P({},this._options,i));return t.replaceAttributes(P({},this.getAttributes())),t}emptyCopy(i){const t=this.nullCopy(i);return this._nodes.forEach((e,r)=>{const a=P({},e.attributes);e=new t.NodeDataClass(r,a),t._nodes.set(r,e)}),t}copy(i){if(i=i||{},typeof i.type=="string"&&i.type!==this.type&&i.type!=="mixed")throw new k(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${i.type}" because this would mean losing information about the current graph.`);if(typeof i.multi=="boolean"&&i.multi!==this.multi&&i.multi!==!0)throw new k("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof i.allowSelfLoops=="boolean"&&i.allowSelfLoops!==this.allowSelfLoops&&i.allowSelfLoops!==!0)throw new k("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(i),e=this._edges.values();let r,a;for(;r=e.next(),r.done!==!0;)a=r.value,Vt(t,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,P({},a.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const i={};this._nodes.forEach((a,o)=>{i[o]=a.attributes});const t={},e={};this._edges.forEach((a,o)=>{const s=a.undirected?"--":"->";let u="",h=a.source.key,d=a.target.key,c;a.undirected&&h>d&&(c=h,h=d,d=c);const l=`(${h})${s}(${d})`;o.startsWith("geid_")?this.multi&&(typeof e[l]>"u"?e[l]=0:e[l]++,u+=`${e[l]}. `):u+=`[${o}]: `,u+=l,t[u]=a.attributes});const r={};for(const a in this)this.hasOwnProperty(a)&&!ut.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(r[a]=this[a]);return r.attributes=this._attributes,r.nodes=i,r.edges=t,U(r,"constructor",this.constructor),r}}typeof Symbol<"u"&&(G.prototype[Symbol.for("nodejs.util.inspect.custom")]=G.prototype.inspect);Rr.forEach(n=>{["add","merge","update"].forEach(i=>{const t=n.name(i),e=i==="add"?Vt:Dr;n.generateKey?G.prototype[t]=function(r,a,o){return e(this,t,!0,(n.type||this.type)==="undirected",null,r,a,o,i==="update")}:G.prototype[t]=function(r,a,o,s){return e(this,t,!1,(n.type||this.type)==="undirected",r,a,o,s,i==="update")}})});Ui(G);Xi(G);fr(G);Er(G);class Kt extends G{constructor(i){const t=P({type:"directed"},i);if("multi"in t&&t.multi!==!1)throw new S("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new S('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Yt extends G{constructor(i){const t=P({type:"undirected"},i);if("multi"in t&&t.multi!==!1)throw new S("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new S('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class qt extends G{constructor(i){const t=P({multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Zt extends G{constructor(i){const t=P({type:"directed",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new S('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Xt extends G{constructor(i){const t=P({type:"undirected",multi:!0},i);if("multi"in t&&t.multi!==!0)throw new S("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new S('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function ge(n){n.from=function(i,t){const e=P({},i.options,t),r=new n(e);return r.import(i),r}}ge(G);ge(Kt);ge(Yt);ge(qt);ge(Zt);ge(Xt);G.Graph=G;G.DirectedGraph=Kt;G.UndirectedGraph=Yt;G.MultiGraph=qt;G.MultiDirectedGraph=Zt;G.MultiUndirectedGraph=Xt;G.InvalidArgumentsGraphError=S;G.NotFoundGraphError=b;G.UsageGraphError=k;var Me,dt;function Gr(){if(dt)return Me;dt=1;function n(t){return!t||typeof t!="object"||typeof t=="function"||Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof RegExp||t instanceof Date}function i(t,e){t=t||{};var r={};for(var a in e){var o=t[a],s=e[a];if(!n(s)){r[a]=i(o,s);continue}o===void 0?r[a]=s:r[a]=o}return r}return Me=i,Me}var $e,ct;function Jt(){return ct||(ct=1,$e=function(i){return i!==null&&typeof i=="object"&&typeof i.addUndirectedEdgeWithKey=="function"&&typeof i.dropNode=="function"&&typeof i.multi=="boolean"}),$e}var ze,lt;function Nr(){if(lt)return ze;lt=1;var n=Gr(),i=Jt(),t={dimensions:["x","y"],center:.5,scale:1};function e(a,o,s){if(!i(o))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");s=n(s,t);var u=s.dimensions;if(!Array.isArray(u)||u.length!==2)throw new Error("graphology-layout/random: given dimensions are invalid.");var h=s.center,d=s.scale,c=Math.PI*2,l=(h-.5)*d,g=o.order,y=u[0],w=u[1];function _(T,f){return f[y]=d*Math.cos(T*c/g)+l,f[w]=d*Math.sin(T*c/g)+l,f}var R=0;if(!a){var x={};return o.forEachNode(function(T){x[T]=_(R++,{})}),x}o.updateEachNodeAttributes(function(T,f){return _(R++,f),f},{attributes:u})}var r=e.bind(null,!1);return r.assign=e.bind(null,!0),ze=r,ze}var Fr=Nr();const Pr=It(Fr);function Ir(n,i){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,i);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function Ee(n){var i=Ir(n,"string");return typeof i=="symbol"?i:i+""}function $(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function ft(n,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,Ee(e.key),e)}}function z(n,i,t){return i&&ft(n.prototype,i),t&&ft(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function de(n){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},de(n)}function Qt(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qt=function(){return!!n})()}function Mr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function $r(n,i){if(i&&(typeof i=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mr(n)}function B(n,i,t){return i=de(i),$r(n,Qt()?Reflect.construct(i,t||[],de(n).constructor):i.apply(n,t))}function Ye(n,i){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ye(n,i)}function H(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Ye(n,i)}function zr(n){if(Array.isArray(n))return n}function Ur(n,i){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var e,r,a,o,s=[],u=!0,h=!1;try{if(a=(t=t.call(n)).next,i===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(e=a.call(t)).done)&&(s.push(e.value),s.length!==i);u=!0);}catch(d){h=!0,r=d}finally{try{if(!u&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(h)throw r}}return s}}function qe(n,i){(i==null||i>n.length)&&(i=n.length);for(var t=0,e=Array(i);t<i;t++)e[t]=n[t];return e}function ei(n,i){if(n){if(typeof n=="string")return qe(n,i);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(n,i):void 0}}function Or(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(n,i){return zr(n)||Ur(n,i)||ei(n,i)||Or()}var Ue={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},ti=new Int8Array(4),Oe=new Int32Array(ti.buffer,0,1),Br=new Float32Array(ti.buffer,0,1),Hr=/^\s*rgba?\s*\(/,Wr=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function jr(n){var i=0,t=0,e=0,r=1;if(n[0]==="#")n.length===4?(i=parseInt(n.charAt(1)+n.charAt(1),16),t=parseInt(n.charAt(2)+n.charAt(2),16),e=parseInt(n.charAt(3)+n.charAt(3),16)):(i=parseInt(n.charAt(1)+n.charAt(2),16),t=parseInt(n.charAt(3)+n.charAt(4),16),e=parseInt(n.charAt(5)+n.charAt(6),16)),n.length===9&&(r=parseInt(n.charAt(7)+n.charAt(8),16)/255);else if(Hr.test(n)){var a=n.match(Wr);a&&(i=+a[1],t=+a[2],e=+a[3],a[4]&&(r=+a[4]))}return{r:i,g:t,b:e,a:r}}var he={};for(var Ce in Ue)he[Ce]=_e(Ue[Ce]),he[Ue[Ce]]=he[Ce];function ii(n,i,t,e,r){return Oe[0]=e<<24|t<<16|i<<8|n,Oe[0]=Oe[0]&4278190079,Br[0]}function _e(n){if(n=n.toLowerCase(),typeof he[n]<"u")return he[n];var i=jr(n),t=i.r,e=i.g,r=i.b,a=i.a;a=a*255|0;var o=ii(t,e,r,a);return he[n]=o,o}var Be={};function ri(n){if(typeof Be[n]<"u")return Be[n];var i=(n&16711680)>>>16,t=(n&65280)>>>8,e=n&255,r=255,a=ii(i,t,e,r);return Be[n]=a,a}function gt(n,i,t,e){return t+(i<<8)+(n<<16)}function pt(n,i,t,e,r,a){var o=Math.floor(t/a*r),s=Math.floor(n.drawingBufferHeight/a-e/a*r),u=new Uint8Array(4);n.bindFramebuffer(n.FRAMEBUFFER,i),n.readPixels(o,s,1,1,n.RGBA,n.UNSIGNED_BYTE,u);var h=ce(u,4),d=h[0],c=h[1],l=h[2],g=h[3];return[d,c,l,g]}function m(n,i,t){return(i=Ee(i))in n?Object.defineProperty(n,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[i]=t,n}function mt(n,i){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,e)}return t}function C(n){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?mt(Object(t),!0).forEach(function(e){m(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):mt(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})}return n}function Vr(n,i){for(;!{}.hasOwnProperty.call(n,i)&&(n=de(n))!==null;);return n}function Ze(){return Ze=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,i,t){var e=Vr(n,i);if(e){var r=Object.getOwnPropertyDescriptor(e,i);return r.get?r.get.call(arguments.length<3?n:t):r.value}},Ze.apply(null,arguments)}function ni(n,i,t,e){var r=Ze(de(n.prototype),i,t);return typeof r=="function"?function(a){return r.apply(t,a)}:r}function Kr(n){return n.normalized?1:n.size}function He(n){var i=0;return n.forEach(function(t){return i+=Kr(t)}),i}function ai(n,i,t){var e=n==="VERTEX"?i.VERTEX_SHADER:i.FRAGMENT_SHADER,r=i.createShader(e);if(r===null)throw new Error("loadShader: error while creating the shader");i.shaderSource(r,t),i.compileShader(r);var a=i.getShaderParameter(r,i.COMPILE_STATUS);if(!a){var o=i.getShaderInfoLog(r);throw i.deleteShader(r),new Error(`loadShader: error while compiling the shader:
|
|
3
3
|
`.concat(o,`
|
|
4
4
|
`).concat(t))}return r}function Yr(n,i){return ai("VERTEX",n,i)}function qr(n,i){return ai("FRAGMENT",n,i)}function Zr(n,i){var t=n.createProgram();if(t===null)throw new Error("loadProgram: error while creating the program.");var e,r;for(e=0,r=i.length;e<r;e++)n.attachShader(t,i[e]);n.linkProgram(t);var a=n.getProgramParameter(t,n.LINK_STATUS);if(!a)throw n.deleteProgram(t),new Error("loadProgram: error while linking the program.");return t}function vt(n){var i=n.gl,t=n.buffer,e=n.program,r=n.vertexShader,a=n.fragmentShader;i.deleteShader(r),i.deleteShader(a),i.deleteProgram(e),i.deleteBuffer(t)}var yt=`#define PICKING_MODE
|
|
@@ -48,14 +48,14 @@ Error generating stack: `+a.message+`
|
|
|
48
48
|
`+a.stack}}var Oa=Object.prototype.hasOwnProperty,ol=s.unstable_scheduleCallback,pe=s.unstable_cancelCallback,$l=s.unstable_shouldYield,We=s.unstable_requestPaint,Fe=s.unstable_now,Ma=s.unstable_getCurrentPriorityLevel,He=s.unstable_ImmediatePriority,Wl=s.unstable_UserBlockingPriority,fl=s.unstable_NormalPriority,Lu=s.unstable_LowPriority,Fl=s.unstable_IdlePriority,Qn=s.log,Pt=s.unstable_setDisableYieldValue,Yt=null,te=null;function Lt(e){if(typeof Qn=="function"&&Pt(e),te&&typeof te.setStrictMode=="function")try{te.setStrictMode(Yt,e)}catch{}}var Ie=Math.clz32?Math.clz32:Zu,Xu=Math.log,Qu=Math.LN2;function Zu(e){return e>>>=0,e===0?32:31-(Xu(e)/Qu|0)|0}var jl=256,xl=262144,Nl=4194304;function Xt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ca(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var r=a&134217727;return r!==0?(a=r&~u,a!==0?n=Xt(a):(c&=r,c!==0?n=Xt(c):l||(l=r&~e,l!==0&&(n=Xt(l))))):(r=a&~u,r!==0?n=Xt(r):c!==0?n=Xt(c):l||(l=a&~e,l!==0&&(n=Xt(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function dl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Da(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ua(){var e=Nl;return Nl<<=1,(Nl&62914560)===0&&(Nl=4194304),e}function en(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function le(e,t,l,a,n,u){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var r=e.entanglements,d=e.expirationTimes,S=e.hiddenUpdates;for(l=c&~l;0<l;){var _=31-Ie(l),M=1<<_;r[_]=0,d[_]=-1;var j=S[_];if(j!==null)for(S[_]=null,_=0;_<j.length;_++){var x=j[_];x!==null&&(x.lane&=-536870913)}l&=~M}a!==0&&Zn(e,a,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(c&~t))}function Zn(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ie(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function F(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Ie(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function pt(e,t){var l=t&-t;return l=(l&42)!==0?1:Vn(l),(l&(e.suspendedLanes|t))!==0?0:l}function Vn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ra(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pl(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Id(e.type))}function hl(e,t){var l=U.p;try{return U.p=e,t()}finally{U.p=l}}var at=Math.random().toString(36).slice(2),oe="__reactFiber$"+at,Pe="__reactProps$"+at,vt="__reactContainer$"+at,ml="__reactEvents$"+at,Vu="__reactListeners$"+at,wu="__reactHandles$"+at,tn="__reactResources$"+at,Ha="__reactMarker$"+at;function ln(e){delete e[oe],delete e[Pe],delete e[ml],delete e[Vu],delete e[wu]}function ea(e){var t=e[oe];if(t)return t;for(var l=e.parentNode;l;){if(t=l[vt]||l[oe]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bd(e);e!==null;){if(l=e[oe])return l;e=Bd(e)}return t}e=l,l=e.parentNode}return null}function Tl(e){if(e=e[oe]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ta(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(f(33))}function Al(e){var t=e[tn];return t||(t=e[tn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[Ha]=!0}var Ku=new Set,Ju={};function _l(e,t){la(e,t),la(e+"Capture",t)}function la(e,t){for(Ju[e]=t,e=0;e<t.length;e++)Ku.add(t[e])}var fi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ku={},$u={};function wn(e){return Oa.call($u,e)?!0:Oa.call(ku,e)?!1:fi.test(e)?$u[e]=!0:(ku[e]=!0,!1)}function an(e,t,l){if(wn(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function El(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function et(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kn(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,u.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function aa(e){if(!e._valueTracker){var t=zl(e)?"checked":"value";e._valueTracker=Kn(e,t,""+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=zl(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ot(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Wu=/[\n"\\]/g;function Be(e){return e.replace(Wu,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function el(e,t,l,a,n,u,c,r){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gt(t)):e.value!==""+gt(t)&&(e.value=""+gt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?dt(e,c,gt(t)):l!=null?dt(e,c,gt(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+gt(r):e.removeAttribute("name")}function Jn(e,t,l,a,n,u,c,r){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){aa(e);return}l=l!=null?""+gt(l):"",t=t!=null?""+gt(t):l,r||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=r?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),aa(e)}function dt(e,t,l){t==="number"&&Ot(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function bt(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+gt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function un(e,t,l){if(t!=null&&(t=""+gt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+gt(l):""}function tl(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(f(92));if(yt(a)){if(1<a.length)throw Error(f(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=gt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),aa(e)}function Ol(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Qt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Fu(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Qt.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Iu(e,t,l){if(t!=null&&typeof t!="object")throw Error(f(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Fu(e,n,a)}else for(var u in t)t.hasOwnProperty(u)&&Fu(e,u,t[u])}function kn(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pu=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),di=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function cn(e){return di.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ll(){}var $n=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mt=null,na=null;function ec(e){var t=Tl(e);if(t&&(e=t.stateNode)){var l=e[Pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(el(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Be(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Pe]||null;if(!n)throw Error(f(90));el(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&nn(a)}break e;case"textarea":un(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&bt(e,!!l.multiple,t,!1)}}}var ua=!1;function Wn(e,t,l){if(ua)return e(t,l);ua=!0;try{var a=e(t);return a}finally{if(ua=!1,(Mt!==null||na!==null)&&(Gc(),Mt&&(t=Mt,e=na,na=Mt=null,ec(t),e)))for(t=0;t<e.length;t++)ec(e[t])}}function ca(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Pe]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(f(231,t,typeof l));return l}var Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),o=!1;if(Zt)try{var T={};Object.defineProperty(T,"passive",{get:function(){o=!0}}),window.addEventListener("test",T,T),window.removeEventListener("test",T,T)}catch{o=!1}var H=null,K=null,ae=null;function qe(){if(ae)return ae;var e,t=K,l=t.length,a,n="value"in H?H.value:H.textContent,u=n.length;for(e=0;e<l&&t[e]===n[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===n[u-a];a++);return ae=n.slice(e,1<a?1-a:void 0)}function al(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ct(){return!0}function zr(){return!1}function St(e){function t(l,a,n,u,c){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=c,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(l=e[r],this[r]=l?l(u):u[r]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ct:zr,this.isPropagationStopped=zr,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ct)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ct)},persist:function(){},isPersistent:Ct}),t}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tc=St(Ba),Fn=v({},Ba,{view:0,detail:0}),zh=St(Fn),hi,mi,In,lc=v({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==In&&(In&&e.type==="mousemove"?(hi=e.screenX-In.screenX,mi=e.screenY-In.screenY):mi=hi=0,In=e),hi)},movementY:function(e){return"movementY"in e?e.movementY:mi}}),Or=St(lc),Oh=v({},lc,{dataTransfer:0}),Mh=St(Oh),Ch=v({},Fn,{relatedTarget:0}),yi=St(Ch),Dh=v({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),Uh=St(Dh),Rh=v({},Ba,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hh=St(Rh),Bh=v({},Ba,{data:0}),Mr=St(Bh),qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gh={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"},Yh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yh[e])?!!t[e]:!1}function pi(){return Lh}var Xh=v({},Fn,{key:function(e){if(e.key){var t=qh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=al(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pi,charCode:function(e){return e.type==="keypress"?al(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?al(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qh=St(Xh),Zh=v({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cr=St(Zh),Vh=v({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pi}),wh=St(Vh),Kh=v({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jh=St(Kh),kh=v({},lc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),$h=St(kh),Wh=v({},Ba,{newState:0,oldState:0}),Fh=St(Wh),Ih=[9,13,27,32],vi=Zt&&"CompositionEvent"in window,Pn=null;Zt&&"documentMode"in document&&(Pn=document.documentMode);var Ph=Zt&&"TextEvent"in window&&!Pn,Dr=Zt&&(!vi||Pn&&8<Pn&&11>=Pn),Ur=" ",Rr=!1;function Hr(e,t){switch(e){case"keyup":return Ih.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Br(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function em(e,t){switch(e){case"compositionend":return Br(t);case"keypress":return t.which!==32?null:(Rr=!0,Ur);case"textInput":return e=t.data,e===Ur&&Rr?null:e;default:return null}}function tm(e,t){if(rn)return e==="compositionend"||!vi&&Hr(e,t)?(e=qe(),ae=K=H=null,rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dr&&t.locale!=="ko"?null:t.data;default:return null}}var lm={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lm[e.type]:t==="textarea"}function Gr(e,t,l,a){Mt?na?na.push(a):na=[a]:Mt=a,t=wc(t,"onChange"),0<t.length&&(l=new tc("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var eu=null,tu=null;function am(e){xd(e,0)}function ac(e){var t=ta(e);if(nn(t))return e}function Yr(e,t){if(e==="change")return t}var Lr=!1;if(Zt){var gi;if(Zt){var bi="oninput"in document;if(!bi){var Xr=document.createElement("div");Xr.setAttribute("oninput","return;"),bi=typeof Xr.oninput=="function"}gi=bi}else gi=!1;Lr=gi&&(!document.documentMode||9<document.documentMode)}function Qr(){eu&&(eu.detachEvent("onpropertychange",Zr),tu=eu=null)}function Zr(e){if(e.propertyName==="value"&&ac(tu)){var t=[];Gr(t,tu,e,sn(e)),Wn(am,t)}}function nm(e,t,l){e==="focusin"?(Qr(),eu=t,tu=l,eu.attachEvent("onpropertychange",Zr)):e==="focusout"&&Qr()}function um(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ac(tu)}function cm(e,t){if(e==="click")return ac(t)}function im(e,t){if(e==="input"||e==="change")return ac(t)}function sm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:sm;function lu(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Oa.call(t,n)||!Dt(e[n],t[n]))return!1}return!0}function Vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var l=Vr(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Vr(l)}}function Kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ot(e.document)}return t}function Si(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var rm=Zt&&"documentMode"in document&&11>=document.documentMode,on=null,ji=null,au=null,xi=!1;function kr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xi||on==null||on!==Ot(a)||(a=on,"selectionStart"in a&&Si(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),au&&lu(au,a)||(au=a,a=wc(ji,"onSelect"),0<a.length&&(t=new tc("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=on)))}function qa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var fn={animationend:qa("Animation","AnimationEnd"),animationiteration:qa("Animation","AnimationIteration"),animationstart:qa("Animation","AnimationStart"),transitionrun:qa("Transition","TransitionRun"),transitionstart:qa("Transition","TransitionStart"),transitioncancel:qa("Transition","TransitionCancel"),transitionend:qa("Transition","TransitionEnd")},Ni={},$r={};Zt&&($r=document.createElement("div").style,"AnimationEvent"in window||(delete fn.animationend.animation,delete fn.animationiteration.animation,delete fn.animationstart.animation),"TransitionEvent"in window||delete fn.transitionend.transition);function Ga(e){if(Ni[e])return Ni[e];if(!fn[e])return e;var t=fn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in $r)return Ni[e]=t[l];return e}var Wr=Ga("animationend"),Fr=Ga("animationiteration"),Ir=Ga("animationstart"),om=Ga("transitionrun"),fm=Ga("transitionstart"),dm=Ga("transitioncancel"),Pr=Ga("transitionend"),eo=new Map,Ti="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ti.push("scrollEnd");function nl(e,t){eo.set(e,t),_l(t,[e])}var nc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vt=[],dn=0,Ai=0;function uc(){for(var e=dn,t=Ai=dn=0;t<e;){var l=Vt[t];Vt[t++]=null;var a=Vt[t];Vt[t++]=null;var n=Vt[t];Vt[t++]=null;var u=Vt[t];if(Vt[t++]=null,a!==null&&n!==null){var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}u!==0&&to(l,n,u)}}function cc(e,t,l,a){Vt[dn++]=e,Vt[dn++]=t,Vt[dn++]=l,Vt[dn++]=a,Ai|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function _i(e,t,l,a){return cc(e,t,l,a),ic(e)}function Ya(e,t){return cc(e,null,null,t),ic(e)}function to(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-Ie(l),e=u.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),u):null}function ic(e){if(50<Au)throw Au=0,Hs=null,Error(f(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hn={};function hm(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,l,a){return new hm(e,t,l,a)}function Ei(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ml(e,t){var l=e.alternate;return l===null?(l=Ut(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function lo(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function sc(e,t,l,a,n,u){var c=0;if(a=e,typeof e=="function")Ei(e)&&(c=1);else if(typeof e=="string")c=gy(e,l,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Et:return e=Ut(31,l,t,n),e.elementType=Et,e.lanes=u,e;case Te:return La(l.children,n,u,t);case Ae:c=8,n|=24;break;case lt:return e=Ut(12,l,t,n|2),e.elementType=lt,e.lanes=u,e;case _t:return e=Ut(13,l,t,n),e.elementType=_t,e.lanes=u,e;case Re:return e=Ut(19,l,t,n),e.elementType=Re,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ke:c=10;break e;case ot:c=9;break e;case ft:c=11;break e;case I:c=14;break e;case Je:c=16,a=null;break e}c=29,l=Error(f(130,e===null?"null":typeof e,"")),a=null}return t=Ut(c,l,t,n),t.elementType=e,t.type=a,t.lanes=u,t}function La(e,t,l,a){return e=Ut(7,e,a,t),e.lanes=l,e}function zi(e,t,l){return e=Ut(6,e,null,t),e.lanes=l,e}function ao(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function Oi(e,t,l){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var no=new WeakMap;function wt(e,t){if(typeof e=="object"&&e!==null){var l=no.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Sl(t)},no.set(e,t),t)}return{value:e,source:t,stack:Sl(t)}}var mn=[],yn=0,rc=null,nu=0,Kt=[],Jt=0,ia=null,yl=1,pl="";function Cl(e,t){mn[yn++]=nu,mn[yn++]=rc,rc=e,nu=t}function uo(e,t,l){Kt[Jt++]=yl,Kt[Jt++]=pl,Kt[Jt++]=ia,ia=e;var a=yl;e=pl;var n=32-Ie(a)-1;a&=~(1<<n),l+=1;var u=32-Ie(t)+n;if(30<u){var c=n-n%5;u=(a&(1<<c)-1).toString(32),a>>=c,n-=c,yl=1<<32-Ie(t)+n|l<<n|a,pl=u+e}else yl=1<<u|l<<n|a,pl=e}function Mi(e){e.return!==null&&(Cl(e,1),uo(e,1,0))}function Ci(e){for(;e===rc;)rc=mn[--yn],mn[yn]=null,nu=mn[--yn],mn[yn]=null;for(;e===ia;)ia=Kt[--Jt],Kt[Jt]=null,pl=Kt[--Jt],Kt[Jt]=null,yl=Kt[--Jt],Kt[Jt]=null}function co(e,t){Kt[Jt++]=yl,Kt[Jt++]=pl,Kt[Jt++]=ia,yl=t.id,pl=t.overflow,ia=e}var nt=null,_e=null,re=!1,sa=null,kt=!1,Di=Error(f(519));function ra(e){var t=Error(f(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uu(wt(t,e)),Di}function io(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[oe]=e,t[Pe]=a,l){case"dialog":ue("cancel",t),ue("close",t);break;case"iframe":case"object":case"embed":ue("load",t);break;case"video":case"audio":for(l=0;l<Eu.length;l++)ue(Eu[l],t);break;case"source":ue("error",t);break;case"img":case"image":case"link":ue("error",t),ue("load",t);break;case"details":ue("toggle",t);break;case"input":ue("invalid",t),Jn(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ue("invalid",t);break;case"textarea":ue("invalid",t),tl(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||_d(t.textContent,l)?(a.popover!=null&&(ue("beforetoggle",t),ue("toggle",t)),a.onScroll!=null&&ue("scroll",t),a.onScrollEnd!=null&&ue("scrollend",t),a.onClick!=null&&(t.onclick=ll),t=!0):t=!1,t||ra(e,!0)}function so(e){for(nt=e.return;nt;)switch(nt.tag){case 5:case 31:case 13:kt=!1;return;case 27:case 3:kt=!0;return;default:nt=nt.return}}function pn(e){if(e!==nt)return!1;if(!re)return so(e),re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ws(e.type,e.memoizedProps)),l=!l),l&&_e&&ra(e),so(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));_e=Hd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));_e=Hd(e)}else t===27?(t=_e,Na(e.type)?(e=tr,tr=null,_e=e):_e=t):_e=nt?Wt(e.stateNode.nextSibling):null;return!0}function Xa(){_e=nt=null,re=!1}function Ui(){var e=sa;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),sa=null),e}function uu(e){sa===null?sa=[e]:sa.push(e)}var Ri=y(null),Qa=null,Dl=null;function oa(e,t,l){R(Ri,t._currentValue),t._currentValue=l}function Ul(e){e._currentValue=Ri.current,O(Ri)}function Hi(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Bi(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var c=n.child;u=u.firstContext;e:for(;u!==null;){var r=u;u=n;for(var d=0;d<t.length;d++)if(r.context===t[d]){u.lanes|=l,r=u.alternate,r!==null&&(r.lanes|=l),Hi(u.return,l,e),a||(c=null);break e}u=r.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(f(341));c.lanes|=l,u=c.alternate,u!==null&&(u.lanes|=l),Hi(c,l,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function vn(e,t,l,a){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error(f(387));if(c=c.memoizedProps,c!==null){var r=n.type;Dt(n.pendingProps.value,c.value)||(e!==null?e.push(r):e=[r])}}else if(n===se.current){if(c=n.alternate,c===null)throw Error(f(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Du):e=[Du])}n=n.return}e!==null&&Bi(t,e,l,a),t.flags|=262144}function oc(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Za(e){Qa=e,Dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return ro(Qa,e)}function fc(e,t){return Qa===null&&Za(e),ro(e,t)}function ro(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Dl===null){if(e===null)throw Error(f(308));Dl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Dl=Dl.next=t;return l}var mm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},ym=s.unstable_scheduleCallback,pm=s.unstable_NormalPriority,Qe={$$typeof:Ke,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qi(){return{controller:new mm,data:new Map,refCount:0}}function cu(e){e.refCount--,e.refCount===0&&ym(pm,function(){e.controller.abort()})}var iu=null,Gi=0,gn=0,bn=null;function vm(e,t){if(iu===null){var l=iu=[];Gi=0,gn=Xs(),bn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Gi++,t.then(oo,oo),t}function oo(){if(--Gi===0&&iu!==null){bn!==null&&(bn.status="fulfilled");var e=iu;iu=null,gn=0,bn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gm(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var fo=A.S;A.S=function(e,t){Wf=Fe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vm(e,t),fo!==null&&fo(e,t)};var Va=y(null);function Yi(){var e=Va.current;return e!==null?e:Ne.pooledCache}function dc(e,t){t===null?R(Va,Va.current):R(Va,t.pool)}function ho(){var e=Yi();return e===null?null:{parent:Qe._currentValue,pool:e}}var Sn=Error(f(460)),Li=Error(f(474)),hc=Error(f(542)),mc={then:function(){}};function mo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ll,ll),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vo(e),e;default:if(typeof t.status=="string")t.then(ll,ll);else{if(e=Ne,e!==null&&100<e.shellSuspendCounter)throw Error(f(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vo(e),e}throw Ka=t,Sn}}function wa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ka=l,Sn):l}}var Ka=null;function po(){if(Ka===null)throw Error(f(459));var e=Ka;return Ka=null,e}function vo(e){if(e===Sn||e===hc)throw Error(f(483))}var jn=null,su=0;function yc(e){var t=su;return su+=1,jn===null&&(jn=[]),yo(jn,e,t)}function ru(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pc(e,t){throw t.$$typeof===J?Error(f(525)):(e=Object.prototype.toString.call(t),Error(f(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function go(e){function t(p,m){if(e){var b=p.deletions;b===null?(p.deletions=[m],p.flags|=16):b.push(m)}}function l(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function a(p){for(var m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function n(p,m){return p=Ml(p,m),p.index=0,p.sibling=null,p}function u(p,m,b){return p.index=b,e?(b=p.alternate,b!==null?(b=b.index,b<m?(p.flags|=67108866,m):b):(p.flags|=67108866,m)):(p.flags|=1048576,m)}function c(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,m,b,E){return m===null||m.tag!==6?(m=zi(b,p.mode,E),m.return=p,m):(m=n(m,b),m.return=p,m)}function d(p,m,b,E){var Q=b.type;return Q===Te?_(p,m,b.props.children,E,b.key):m!==null&&(m.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===Je&&wa(Q)===m.type)?(m=n(m,b.props),ru(m,b),m.return=p,m):(m=sc(b.type,b.key,b.props,null,p.mode,E),ru(m,b),m.return=p,m)}function S(p,m,b,E){return m===null||m.tag!==4||m.stateNode.containerInfo!==b.containerInfo||m.stateNode.implementation!==b.implementation?(m=Oi(b,p.mode,E),m.return=p,m):(m=n(m,b.children||[]),m.return=p,m)}function _(p,m,b,E,Q){return m===null||m.tag!==7?(m=La(b,p.mode,E,Q),m.return=p,m):(m=n(m,b),m.return=p,m)}function M(p,m,b){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=zi(""+m,p.mode,b),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ce:return b=sc(m.type,m.key,m.props,null,p.mode,b),ru(b,m),b.return=p,b;case xe:return m=Oi(m,p.mode,b),m.return=p,m;case Je:return m=wa(m),M(p,m,b)}if(yt(m)||$e(m))return m=La(m,p.mode,b,null),m.return=p,m;if(typeof m.then=="function")return M(p,yc(m),b);if(m.$$typeof===Ke)return M(p,fc(p,m),b);pc(p,m)}return null}function j(p,m,b,E){var Q=m!==null?m.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return Q!==null?null:r(p,m,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ce:return b.key===Q?d(p,m,b,E):null;case xe:return b.key===Q?S(p,m,b,E):null;case Je:return b=wa(b),j(p,m,b,E)}if(yt(b)||$e(b))return Q!==null?null:_(p,m,b,E,null);if(typeof b.then=="function")return j(p,m,yc(b),E);if(b.$$typeof===Ke)return j(p,m,fc(p,b),E);pc(p,b)}return null}function x(p,m,b,E,Q){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return p=p.get(b)||null,r(m,p,""+E,Q);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ce:return p=p.get(E.key===null?b:E.key)||null,d(m,p,E,Q);case xe:return p=p.get(E.key===null?b:E.key)||null,S(m,p,E,Q);case Je:return E=wa(E),x(p,m,b,E,Q)}if(yt(E)||$e(E))return p=p.get(b)||null,_(m,p,E,Q,null);if(typeof E.then=="function")return x(p,m,b,yc(E),Q);if(E.$$typeof===Ke)return x(p,m,b,fc(m,E),Q);pc(m,E)}return null}function L(p,m,b,E){for(var Q=null,fe=null,X=m,ee=m=0,ie=null;X!==null&&ee<b.length;ee++){X.index>ee?(ie=X,X=null):ie=X.sibling;var de=j(p,X,b[ee],E);if(de===null){X===null&&(X=ie);break}e&&X&&de.alternate===null&&t(p,X),m=u(de,m,ee),fe===null?Q=de:fe.sibling=de,fe=de,X=ie}if(ee===b.length)return l(p,X),re&&Cl(p,ee),Q;if(X===null){for(;ee<b.length;ee++)X=M(p,b[ee],E),X!==null&&(m=u(X,m,ee),fe===null?Q=X:fe.sibling=X,fe=X);return re&&Cl(p,ee),Q}for(X=a(X);ee<b.length;ee++)ie=x(X,p,ee,b[ee],E),ie!==null&&(e&&ie.alternate!==null&&X.delete(ie.key===null?ee:ie.key),m=u(ie,m,ee),fe===null?Q=ie:fe.sibling=ie,fe=ie);return e&&X.forEach(function(za){return t(p,za)}),re&&Cl(p,ee),Q}function w(p,m,b,E){if(b==null)throw Error(f(151));for(var Q=null,fe=null,X=m,ee=m=0,ie=null,de=b.next();X!==null&&!de.done;ee++,de=b.next()){X.index>ee?(ie=X,X=null):ie=X.sibling;var za=j(p,X,de.value,E);if(za===null){X===null&&(X=ie);break}e&&X&&za.alternate===null&&t(p,X),m=u(za,m,ee),fe===null?Q=za:fe.sibling=za,fe=za,X=ie}if(de.done)return l(p,X),re&&Cl(p,ee),Q;if(X===null){for(;!de.done;ee++,de=b.next())de=M(p,de.value,E),de!==null&&(m=u(de,m,ee),fe===null?Q=de:fe.sibling=de,fe=de);return re&&Cl(p,ee),Q}for(X=a(X);!de.done;ee++,de=b.next())de=x(X,p,ee,de.value,E),de!==null&&(e&&de.alternate!==null&&X.delete(de.key===null?ee:de.key),m=u(de,m,ee),fe===null?Q=de:fe.sibling=de,fe=de);return e&&X.forEach(function(Oy){return t(p,Oy)}),re&&Cl(p,ee),Q}function je(p,m,b,E){if(typeof b=="object"&&b!==null&&b.type===Te&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ce:e:{for(var Q=b.key;m!==null;){if(m.key===Q){if(Q=b.type,Q===Te){if(m.tag===7){l(p,m.sibling),E=n(m,b.props.children),E.return=p,p=E;break e}}else if(m.elementType===Q||typeof Q=="object"&&Q!==null&&Q.$$typeof===Je&&wa(Q)===m.type){l(p,m.sibling),E=n(m,b.props),ru(E,b),E.return=p,p=E;break e}l(p,m);break}else t(p,m);m=m.sibling}b.type===Te?(E=La(b.props.children,p.mode,E,b.key),E.return=p,p=E):(E=sc(b.type,b.key,b.props,null,p.mode,E),ru(E,b),E.return=p,p=E)}return c(p);case xe:e:{for(Q=b.key;m!==null;){if(m.key===Q)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){l(p,m.sibling),E=n(m,b.children||[]),E.return=p,p=E;break e}else{l(p,m);break}else t(p,m);m=m.sibling}E=Oi(b,p.mode,E),E.return=p,p=E}return c(p);case Je:return b=wa(b),je(p,m,b,E)}if(yt(b))return L(p,m,b,E);if($e(b)){if(Q=$e(b),typeof Q!="function")throw Error(f(150));return b=Q.call(b),w(p,m,b,E)}if(typeof b.then=="function")return je(p,m,yc(b),E);if(b.$$typeof===Ke)return je(p,m,fc(p,b),E);pc(p,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(l(p,m.sibling),E=n(m,b),E.return=p,p=E):(l(p,m),E=zi(b,p.mode,E),E.return=p,p=E),c(p)):l(p,m)}return function(p,m,b,E){try{su=0;var Q=je(p,m,b,E);return jn=null,Q}catch(X){if(X===Sn||X===hc)throw X;var fe=Ut(29,X,null,p.mode);return fe.lanes=E,fe.return=p,fe}finally{}}}var Ja=go(!0),bo=go(!1),fa=!1;function Xi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ha(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(me&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=ic(e),to(e,null,l),t}return cc(e,a,t,l),ic(e)}function ou(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,F(e,l)}}function Zi(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=c:u=u.next=c,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Vi=!1;function fu(){if(Vi){var e=bn;if(e!==null)throw e}}function du(e,t,l,a){Vi=!1;var n=e.updateQueue;fa=!1;var u=n.firstBaseUpdate,c=n.lastBaseUpdate,r=n.shared.pending;if(r!==null){n.shared.pending=null;var d=r,S=d.next;d.next=null,c===null?u=S:c.next=S,c=d;var _=e.alternate;_!==null&&(_=_.updateQueue,r=_.lastBaseUpdate,r!==c&&(r===null?_.firstBaseUpdate=S:r.next=S,_.lastBaseUpdate=d))}if(u!==null){var M=n.baseState;c=0,_=S=d=null,r=u;do{var j=r.lane&-536870913,x=j!==r.lane;if(x?(ce&j)===j:(a&j)===j){j!==0&&j===gn&&(Vi=!0),_!==null&&(_=_.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var L=e,w=r;j=t;var je=l;switch(w.tag){case 1:if(L=w.payload,typeof L=="function"){M=L.call(je,M,j);break e}M=L;break e;case 3:L.flags=L.flags&-65537|128;case 0:if(L=w.payload,j=typeof L=="function"?L.call(je,M,j):L,j==null)break e;M=v({},M,j);break e;case 2:fa=!0}}j=r.callback,j!==null&&(e.flags|=64,x&&(e.flags|=8192),x=n.callbacks,x===null?n.callbacks=[j]:x.push(j))}else x={lane:j,tag:r.tag,payload:r.payload,callback:r.callback,next:null},_===null?(S=_=x,d=M):_=_.next=x,c|=j;if(r=r.next,r===null){if(r=n.shared.pending,r===null)break;x=r,r=x.next,x.next=null,n.lastBaseUpdate=x,n.shared.pending=null}}while(!0);_===null&&(d=M),n.baseState=d,n.firstBaseUpdate=S,n.lastBaseUpdate=_,u===null&&(n.shared.lanes=0),ga|=c,e.lanes=c,e.memoizedState=M}}function So(e,t){if(typeof e!="function")throw Error(f(191,e));e.call(t)}function jo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)So(l[e],t)}var xn=y(null),vc=y(0);function xo(e,t){e=Ql,R(vc,e),R(xn,t),Ql=e|t.baseLanes}function wi(){R(vc,Ql),R(xn,xn.current)}function Ki(){Ql=vc.current,O(xn),O(vc)}var Rt=y(null),$t=null;function ma(e){var t=e.alternate;R(Ge,Ge.current&1),R(Rt,e),$t===null&&(t===null||xn.current!==null||t.memoizedState!==null)&&($t=e)}function Ji(e){R(Ge,Ge.current),R(Rt,e),$t===null&&($t=e)}function No(e){e.tag===22?(R(Ge,Ge.current),R(Rt,e),$t===null&&($t=e)):ya()}function ya(){R(Ge,Ge.current),R(Rt,Rt.current)}function Ht(e){O(Rt),$t===e&&($t=null),O(Ge)}var Ge=y(0);function gc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Ps(l)||er(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rl=0,P=null,be=null,Ze=null,bc=!1,Nn=!1,ka=!1,Sc=0,hu=0,Tn=null,bm=0;function De(){throw Error(f(321))}function ki(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Dt(e[l],t[l]))return!1;return!0}function $i(e,t,l,a,n,u){return Rl=u,P=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?cf:os,ka=!1,u=l(a,n),ka=!1,Nn&&(u=Ao(t,l,a,n)),To(e),u}function To(e){A.H=pu;var t=be!==null&&be.next!==null;if(Rl=0,Ze=be=P=null,bc=!1,hu=0,Tn=null,t)throw Error(f(300));e===null||Ve||(e=e.dependencies,e!==null&&oc(e)&&(Ve=!0))}function Ao(e,t,l,a){P=e;var n=0;do{if(Nn&&(Tn=null),hu=0,Nn=!1,25<=n)throw Error(f(301));if(n+=1,Ze=be=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}A.H=sf,u=t(l,a)}while(Nn);return u}function Sm(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?mu(t):t,e=e.useState()[0],(be!==null?be.memoizedState:null)!==e&&(P.flags|=1024),t}function Wi(){var e=Sc!==0;return Sc=0,e}function Fi(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Ii(e){if(bc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bc=!1}Rl=0,Ze=be=P=null,Nn=!1,hu=Sc=0,Tn=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?P.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Ye(){if(be===null){var e=P.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Ze===null?P.memoizedState:Ze.next;if(t!==null)Ze=t,be=e;else{if(e===null)throw P.alternate===null?Error(f(467)):Error(f(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Ze===null?P.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function jc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mu(e){var t=hu;return hu+=1,Tn===null&&(Tn=[]),e=yo(Tn,e,t),t=P,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?cf:os),e}function xc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return mu(e);if(e.$$typeof===Ke)return ut(e)}throw Error(f(438,String(e)))}function Pi(e){var t=null,l=P.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=P.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=jc(),P.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=il;return t.index++,l}function Hl(e,t){return typeof t=="function"?t(e):t}function Nc(e){var t=Ye();return es(t,be,e)}function es(e,t,l){var a=e.queue;if(a===null)throw Error(f(311));a.lastRenderedReducer=l;var n=e.baseQueue,u=a.pending;if(u!==null){if(n!==null){var c=n.next;n.next=u.next,u.next=c}t.baseQueue=n=u,a.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var r=c=null,d=null,S=t,_=!1;do{var M=S.lane&-536870913;if(M!==S.lane?(ce&M)===M:(Rl&M)===M){var j=S.revertLane;if(j===0)d!==null&&(d=d.next={lane:0,revertLane:0,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null}),M===gn&&(_=!0);else if((Rl&j)===j){S=S.next,j===gn&&(_=!0);continue}else M={lane:0,revertLane:S.revertLane,gesture:null,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},d===null?(r=d=M,c=u):d=d.next=M,P.lanes|=j,ga|=j;M=S.action,ka&&l(u,M),u=S.hasEagerState?S.eagerState:l(u,M)}else j={lane:M,revertLane:S.revertLane,gesture:S.gesture,action:S.action,hasEagerState:S.hasEagerState,eagerState:S.eagerState,next:null},d===null?(r=d=j,c=u):d=d.next=j,P.lanes|=M,ga|=M;S=S.next}while(S!==null&&S!==t);if(d===null?c=u:d.next=r,!Dt(u,e.memoizedState)&&(Ve=!0,_&&(l=bn,l!==null)))throw l;e.memoizedState=u,e.baseState=c,e.baseQueue=d,a.lastRenderedState=u}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ts(e){var t=Ye(),l=t.queue;if(l===null)throw Error(f(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,u=t.memoizedState;if(n!==null){l.pending=null;var c=n=n.next;do u=e(u,c.action),c=c.next;while(c!==n);Dt(u,t.memoizedState)||(Ve=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function _o(e,t,l){var a=P,n=Ye(),u=re;if(u){if(l===void 0)throw Error(f(407));l=l()}else l=t();var c=!Dt((be||n).memoizedState,l);if(c&&(n.memoizedState=l,Ve=!0),n=n.queue,ns(Oo.bind(null,a,n,e),[e]),n.getSnapshot!==t||c||Ze!==null&&Ze.memoizedState.tag&1){if(a.flags|=2048,An(9,{destroy:void 0},zo.bind(null,a,n,l,t),null),Ne===null)throw Error(f(349));u||(Rl&127)!==0||Eo(a,t,l)}return l}function Eo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=P.updateQueue,t===null?(t=jc(),P.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function zo(e,t,l,a){t.value=l,t.getSnapshot=a,Mo(t)&&Co(e)}function Oo(e,t,l){return l(function(){Mo(t)&&Co(e)})}function Mo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Dt(e,l)}catch{return!0}}function Co(e){var t=Ya(e,2);t!==null&&At(t,e,2)}function ls(e){var t=ht();if(typeof e=="function"){var l=e;if(e=l(),ka){Lt(!0);try{l()}finally{Lt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:e},t}function Do(e,t,l,a){return e.baseState=l,es(e,be,typeof a=="function"?a:Hl)}function jm(e,t,l,a,n){if(_c(e))throw Error(f(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){u.listeners.push(c)}};A.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,Uo(t,u)):(u.next=l.next,t.pending=l.next=u)}}function Uo(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var u=A.T,c={};A.T=c;try{var r=l(n,a),d=A.S;d!==null&&d(c,r),Ro(e,t,r)}catch(S){as(e,t,S)}finally{u!==null&&c.types!==null&&(u.types=c.types),A.T=u}}else try{u=l(n,a),Ro(e,t,u)}catch(S){as(e,t,S)}}function Ro(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Ho(e,t,a)},function(a){return as(e,t,a)}):Ho(e,t,l)}function Ho(e,t,l){t.status="fulfilled",t.value=l,Bo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Uo(e,l)))}function as(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Bo(t),t=t.next;while(t!==a)}e.action=null}function Bo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qo(e,t){return t}function Go(e,t){if(re){var l=Ne.formState;if(l!==null){e:{var a=P;if(re){if(_e){t:{for(var n=_e,u=kt;n.nodeType!==8;){if(!u){n=null;break t}if(n=Wt(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){_e=Wt(n.nextSibling),a=n.data==="F!";break e}}ra(a)}a=!1}a&&(t=l[0])}}return l=ht(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:t},l.queue=a,l=af.bind(null,P,a),a.dispatch=l,a=ls(!1),u=rs.bind(null,P,!1,a.queue),a=ht(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=jm.bind(null,P,n,u,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Yo(e){var t=Ye();return Lo(t,be,e)}function Lo(e,t,l){if(t=es(e,t,qo)[0],e=Nc(Hl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=mu(t)}catch(c){throw c===Sn?hc:c}else a=t;t=Ye();var n=t.queue,u=n.dispatch;return l!==t.memoizedState&&(P.flags|=2048,An(9,{destroy:void 0},xm.bind(null,n,l),null)),[a,u,e]}function xm(e,t){e.action=t}function Xo(e){var t=Ye(),l=be;if(l!==null)return Lo(t,l,e);Ye(),t=t.memoizedState,l=Ye();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function An(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=P.updateQueue,t===null&&(t=jc(),P.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Qo(){return Ye().memoizedState}function Tc(e,t,l,a){var n=ht();P.flags|=e,n.memoizedState=An(1|t,{destroy:void 0},l,a===void 0?null:a)}function Ac(e,t,l,a){var n=Ye();a=a===void 0?null:a;var u=n.memoizedState.inst;be!==null&&a!==null&&ki(a,be.memoizedState.deps)?n.memoizedState=An(t,u,l,a):(P.flags|=e,n.memoizedState=An(1|t,u,l,a))}function Zo(e,t){Tc(8390656,8,e,t)}function ns(e,t){Ac(2048,8,e,t)}function Nm(e){P.flags|=4;var t=P.updateQueue;if(t===null)t=jc(),P.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Vo(e){var t=Ye().memoizedState;return Nm({ref:t,nextImpl:e}),function(){if((me&2)!==0)throw Error(f(440));return t.impl.apply(void 0,arguments)}}function wo(e,t){return Ac(4,2,e,t)}function Ko(e,t){return Ac(4,4,e,t)}function Jo(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ko(e,t,l){l=l!=null?l.concat([e]):null,Ac(4,4,Jo.bind(null,t,e),l)}function us(){}function $o(e,t){var l=Ye();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&ki(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Wo(e,t){var l=Ye();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&ki(t,a[1]))return a[0];if(a=e(),ka){Lt(!0);try{e()}finally{Lt(!1)}}return l.memoizedState=[a,t],a}function cs(e,t,l){return l===void 0||(Rl&1073741824)!==0&&(ce&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=If(),P.lanes|=e,ga|=e,l)}function Fo(e,t,l,a){return Dt(l,t)?l:xn.current!==null?(e=cs(e,l,a),Dt(e,t)||(Ve=!0),e):(Rl&42)===0||(Rl&1073741824)!==0&&(ce&261930)===0?(Ve=!0,e.memoizedState=l):(e=If(),P.lanes|=e,ga|=e,t)}function Io(e,t,l,a,n){var u=U.p;U.p=u!==0&&8>u?u:8;var c=A.T,r={};A.T=r,rs(e,!1,t,l);try{var d=n(),S=A.S;if(S!==null&&S(r,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var _=gm(d,a);yu(e,t,_,Gt(e))}else yu(e,t,a,Gt(e))}catch(M){yu(e,t,{then:function(){},status:"rejected",reason:M},Gt())}finally{U.p=u,c!==null&&r.types!==null&&(c.types=r.types),A.T=c}}function Tm(){}function is(e,t,l,a){if(e.tag!==5)throw Error(f(476));var n=Po(e).queue;Io(e,n,t,V,l===null?Tm:function(){return ef(e),l(a)})}function Po(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:V},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ef(e){var t=Po(e);t.next===null&&(t=e.alternate.memoizedState),yu(e,t.next.queue,{},Gt())}function ss(){return ut(Du)}function tf(){return Ye().memoizedState}function lf(){return Ye().memoizedState}function Am(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Gt();e=da(l);var a=ha(t,e,l);a!==null&&(At(a,t,l),ou(a,t,l)),t={cache:qi()},e.payload=t;return}t=t.return}}function _m(e,t,l){var a=Gt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_c(e)?nf(t,l):(l=_i(e,t,l,a),l!==null&&(At(l,e,a),uf(l,t,a)))}function af(e,t,l){var a=Gt();yu(e,t,l,a)}function yu(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(_c(e))nf(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var c=t.lastRenderedState,r=u(c,l);if(n.hasEagerState=!0,n.eagerState=r,Dt(r,c))return cc(e,t,n,0),Ne===null&&uc(),!1}catch{}finally{}if(l=_i(e,t,n,a),l!==null)return At(l,e,a),uf(l,t,a),!0}return!1}function rs(e,t,l,a){if(a={lane:2,revertLane:Xs(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},_c(e)){if(t)throw Error(f(479))}else t=_i(e,l,a,2),t!==null&&At(t,e,2)}function _c(e){var t=e.alternate;return e===P||t!==null&&t===P}function nf(e,t){Nn=bc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function uf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,F(e,l)}}var pu={readContext:ut,use:xc,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};pu.useEffectEvent=De;var cf={readContext:ut,use:xc,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Zo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Tc(4194308,4,Jo.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Tc(4194308,4,e,t)},useInsertionEffect:function(e,t){Tc(4,2,e,t)},useMemo:function(e,t){var l=ht();t=t===void 0?null:t;var a=e();if(ka){Lt(!0);try{e()}finally{Lt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ht();if(l!==void 0){var n=l(t);if(ka){Lt(!0);try{l(t)}finally{Lt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=_m.bind(null,P,e),[a.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=ls(e);var t=e.queue,l=af.bind(null,P,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:us,useDeferredValue:function(e,t){var l=ht();return cs(l,e,t)},useTransition:function(){var e=ls(!1);return e=Io.bind(null,P,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=P,n=ht();if(re){if(l===void 0)throw Error(f(407));l=l()}else{if(l=t(),Ne===null)throw Error(f(349));(ce&127)!==0||Eo(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,Zo(Oo.bind(null,a,u,e),[e]),a.flags|=2048,An(9,{destroy:void 0},zo.bind(null,a,u,l,t),null),l},useId:function(){var e=ht(),t=Ne.identifierPrefix;if(re){var l=pl,a=yl;l=(a&~(1<<32-Ie(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Sc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=bm++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ss,useFormState:Go,useActionState:Go,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=rs.bind(null,P,!0,l),l.dispatch=t,[e,t]},useMemoCache:Pi,useCacheRefresh:function(){return ht().memoizedState=Am.bind(null,P)},useEffectEvent:function(e){var t=ht(),l={impl:e};return t.memoizedState=l,function(){if((me&2)!==0)throw Error(f(440));return l.impl.apply(void 0,arguments)}}},os={readContext:ut,use:xc,useCallback:$o,useContext:ut,useEffect:ns,useImperativeHandle:ko,useInsertionEffect:wo,useLayoutEffect:Ko,useMemo:Wo,useReducer:Nc,useRef:Qo,useState:function(){return Nc(Hl)},useDebugValue:us,useDeferredValue:function(e,t){var l=Ye();return Fo(l,be.memoizedState,e,t)},useTransition:function(){var e=Nc(Hl)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:mu(e),t]},useSyncExternalStore:_o,useId:tf,useHostTransitionStatus:ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){var l=Ye();return Do(l,be,e,t)},useMemoCache:Pi,useCacheRefresh:lf};os.useEffectEvent=Vo;var sf={readContext:ut,use:xc,useCallback:$o,useContext:ut,useEffect:ns,useImperativeHandle:ko,useInsertionEffect:wo,useLayoutEffect:Ko,useMemo:Wo,useReducer:ts,useRef:Qo,useState:function(){return ts(Hl)},useDebugValue:us,useDeferredValue:function(e,t){var l=Ye();return be===null?cs(l,e,t):Fo(l,be.memoizedState,e,t)},useTransition:function(){var e=ts(Hl)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:mu(e),t]},useSyncExternalStore:_o,useId:tf,useHostTransitionStatus:ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){var l=Ye();return be!==null?Do(l,be,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Pi,useCacheRefresh:lf};sf.useEffectEvent=Vo;function fs(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ds={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Gt(),n=da(a);n.payload=t,l!=null&&(n.callback=l),t=ha(e,n,a),t!==null&&(At(t,e,a),ou(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Gt(),n=da(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=ha(e,n,a),t!==null&&(At(t,e,a),ou(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Gt(),a=da(l);a.tag=2,t!=null&&(a.callback=t),t=ha(e,a,l),t!==null&&(At(t,e,l),ou(t,e,l))}};function rf(e,t,l,a,n,u,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,c):t.prototype&&t.prototype.isPureReactComponent?!lu(l,a)||!lu(n,u):!0}function of(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&ds.enqueueReplaceState(t,t.state,null)}function $a(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function ff(e){nc(e)}function df(e){console.error(e)}function hf(e){nc(e)}function Ec(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function mf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function hs(e,t,l){return l=da(l),l.tag=3,l.payload={element:null},l.callback=function(){Ec(e,t)},l}function yf(e){return e=da(e),e.tag=3,e}function pf(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){mf(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){mf(t,l,a),typeof n!="function"&&(ba===null?ba=new Set([this]):ba.add(this));var r=a.stack;this.componentDidCatch(a.value,{componentStack:r!==null?r:""})})}function Em(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&vn(t,l,n,!0),l=Rt.current,l!==null){switch(l.tag){case 31:case 13:return $t===null?Yc():l.alternate===null&&Ue===0&&(Ue=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===mc?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Gs(e,a,n)),!1;case 22:return l.flags|=65536,a===mc?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Gs(e,a,n)),!1}throw Error(f(435,l.tag))}return Gs(e,a,n),Yc(),!1}if(re)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Di&&(e=Error(f(422),{cause:a}),uu(wt(e,l)))):(a!==Di&&(t=Error(f(423),{cause:a}),uu(wt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=wt(a,l),n=hs(e.stateNode,a,n),Zi(e,n),Ue!==4&&(Ue=2)),!1;var u=Error(f(520),{cause:a});if(u=wt(u,l),Tu===null?Tu=[u]:Tu.push(u),Ue!==4&&(Ue=2),t===null)return!0;a=wt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=hs(l.stateNode,a,e),Zi(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ba===null||!ba.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=yf(n),pf(n,e,l,a),Zi(l,n),!1}l=l.return}while(l!==null);return!1}var ms=Error(f(461)),Ve=!1;function ct(e,t,l,a){t.child=e===null?bo(t,null,l,a):Ja(t,e.child,l,a)}function vf(e,t,l,a,n){l=l.render;var u=t.ref;if("ref"in a){var c={};for(var r in a)r!=="ref"&&(c[r]=a[r])}else c=a;return Za(t),a=$i(e,t,l,c,u,n),r=Wi(),e!==null&&!Ve?(Fi(e,t,n),Bl(e,t,n)):(re&&r&&Mi(t),t.flags|=1,ct(e,t,a,n),t.child)}function gf(e,t,l,a,n){if(e===null){var u=l.type;return typeof u=="function"&&!Ei(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,bf(e,t,u,a,n)):(e=sc(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!xs(e,n)){var c=u.memoizedProps;if(l=l.compare,l=l!==null?l:lu,l(c,a)&&e.ref===t.ref)return Bl(e,t,n)}return t.flags|=1,e=Ml(u,a),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,l,a,n){if(e!==null){var u=e.memoizedProps;if(lu(u,a)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=a=u,xs(e,n))(e.flags&131072)!==0&&(Ve=!0);else return t.lanes=e.lanes,Bl(e,t,n)}return ys(e,t,l,a,n)}function Sf(e,t,l,a){var n=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,t.child=null;return jf(e,t,u,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&dc(t,u!==null?u.cachePool:null),u!==null?xo(t,u):wi(),No(t);else return a=t.lanes=536870912,jf(e,t,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(dc(t,u.cachePool),xo(t,u),ya(),t.memoizedState=null):(e!==null&&dc(t,null),wi(),ya());return ct(e,t,n,l),t.child}function vu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jf(e,t,l,a,n){var u=Yi();return u=u===null?null:{parent:Qe._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&dc(t,null),wi(),No(t),e!==null&&vn(e,t,a,!0),t.childLanes=n,null}function zc(e,t){return t=Mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xf(e,t,l){return Ja(t,e.child,null,l),e=zc(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function zm(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(re){if(a.mode==="hidden")return e=zc(t,a),t.lanes=536870912,vu(null,e);if(Ji(t),(e=_e)?(e=Rd(e,kt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ia!==null?{id:yl,overflow:pl}:null,retryLane:536870912,hydrationErrors:null},l=ao(e),l.return=t,t.child=l,nt=t,_e=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return zc(t,a)}var u=e.memoizedState;if(u!==null){var c=u.dehydrated;if(Ji(t),n)if(t.flags&256)t.flags&=-257,t=xf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(f(558));else if(Ve||vn(e,t,l,!1),n=(l&e.childLanes)!==0,Ve||n){if(a=Ne,a!==null&&(c=pt(a,l),c!==0&&c!==u.retryLane))throw u.retryLane=c,Ya(e,c),At(a,e,c),ms;Yc(),t=xf(e,t,l)}else e=u.treeContext,_e=Wt(c.nextSibling),nt=t,re=!0,sa=null,kt=!1,e!==null&&co(t,e),t=zc(t,a),t.flags|=4096;return t}return e=Ml(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(f(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function ys(e,t,l,a,n){return Za(t),l=$i(e,t,l,a,void 0,n),a=Wi(),e!==null&&!Ve?(Fi(e,t,n),Bl(e,t,n)):(re&&a&&Mi(t),t.flags|=1,ct(e,t,l,n),t.child)}function Nf(e,t,l,a,n,u){return Za(t),t.updateQueue=null,l=Ao(t,a,l,n),To(e),a=Wi(),e!==null&&!Ve?(Fi(e,t,u),Bl(e,t,u)):(re&&a&&Mi(t),t.flags|=1,ct(e,t,l,u),t.child)}function Tf(e,t,l,a,n){if(Za(t),t.stateNode===null){var u=hn,c=l.contextType;typeof c=="object"&&c!==null&&(u=ut(c)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=ds,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Xi(t),c=l.contextType,u.context=typeof c=="object"&&c!==null?ut(c):hn,u.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(fs(t,l,c,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(c=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),c!==u.state&&ds.enqueueReplaceState(u,u.state,null),du(t,a,u,n),fu(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var r=t.memoizedProps,d=$a(l,r);u.props=d;var S=u.context,_=l.contextType;c=hn,typeof _=="object"&&_!==null&&(c=ut(_));var M=l.getDerivedStateFromProps;_=typeof M=="function"||typeof u.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,_||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(r||S!==c)&&of(t,u,a,c),fa=!1;var j=t.memoizedState;u.state=j,du(t,a,u,n),fu(),S=t.memoizedState,r||j!==S||fa?(typeof M=="function"&&(fs(t,l,M,a),S=t.memoizedState),(d=fa||rf(t,l,d,a,j,S,c))?(_||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=S),u.props=a,u.state=S,u.context=c,a=d):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Qi(e,t),c=t.memoizedProps,_=$a(l,c),u.props=_,M=t.pendingProps,j=u.context,S=l.contextType,d=hn,typeof S=="object"&&S!==null&&(d=ut(S)),r=l.getDerivedStateFromProps,(S=typeof r=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c!==M||j!==d)&&of(t,u,a,d),fa=!1,j=t.memoizedState,u.state=j,du(t,a,u,n),fu();var x=t.memoizedState;c!==M||j!==x||fa||e!==null&&e.dependencies!==null&&oc(e.dependencies)?(typeof r=="function"&&(fs(t,l,r,a),x=t.memoizedState),(_=fa||rf(t,l,_,a,j,x,d)||e!==null&&e.dependencies!==null&&oc(e.dependencies))?(S||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,x,d),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,x,d)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||c===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=x),u.props=a,u.state=x,u.context=d,a=_):(typeof u.componentDidUpdate!="function"||c===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Oc(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Ja(t,e.child,null,n),t.child=Ja(t,null,l,n)):ct(e,t,l,n),t.memoizedState=u.state,e=t.child):e=Bl(e,t,n),e}function Af(e,t,l,a){return Xa(),t.flags|=256,ct(e,t,l,a),t.child}var ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vs(e){return{baseLanes:e,cachePool:ho()}}function gs(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=qt),e}function _f(e,t,l){var a=t.pendingProps,n=!1,u=(t.flags&128)!==0,c;if((c=u)||(c=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(re){if(n?ma(t):ya(),(e=_e)?(e=Rd(e,kt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ia!==null?{id:yl,overflow:pl}:null,retryLane:536870912,hydrationErrors:null},l=ao(e),l.return=t,t.child=l,nt=t,_e=null)):e=null,e===null)throw ra(t);return er(e)?t.lanes=32:t.lanes=536870912,null}var r=a.children;return a=a.fallback,n?(ya(),n=t.mode,r=Mc({mode:"hidden",children:r},n),a=La(a,n,l,null),r.return=t,a.return=t,r.sibling=a,t.child=r,a=t.child,a.memoizedState=vs(l),a.childLanes=gs(e,c,l),t.memoizedState=ps,vu(null,a)):(ma(t),bs(t,r))}var d=e.memoizedState;if(d!==null&&(r=d.dehydrated,r!==null)){if(u)t.flags&256?(ma(t),t.flags&=-257,t=Ss(e,t,l)):t.memoizedState!==null?(ya(),t.child=e.child,t.flags|=128,t=null):(ya(),r=a.fallback,n=t.mode,a=Mc({mode:"visible",children:a.children},n),r=La(r,n,l,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,Ja(t,e.child,null,l),a=t.child,a.memoizedState=vs(l),a.childLanes=gs(e,c,l),t.memoizedState=ps,t=vu(null,a));else if(ma(t),er(r)){if(c=r.nextSibling&&r.nextSibling.dataset,c)var S=c.dgst;c=S,a=Error(f(419)),a.stack="",a.digest=c,uu({value:a,source:null,stack:null}),t=Ss(e,t,l)}else if(Ve||vn(e,t,l,!1),c=(l&e.childLanes)!==0,Ve||c){if(c=Ne,c!==null&&(a=pt(c,l),a!==0&&a!==d.retryLane))throw d.retryLane=a,Ya(e,a),At(c,e,a),ms;Ps(r)||Yc(),t=Ss(e,t,l)}else Ps(r)?(t.flags|=192,t.child=e.child,t=null):(e=d.treeContext,_e=Wt(r.nextSibling),nt=t,re=!0,sa=null,kt=!1,e!==null&&co(t,e),t=bs(t,a.children),t.flags|=4096);return t}return n?(ya(),r=a.fallback,n=t.mode,d=e.child,S=d.sibling,a=Ml(d,{mode:"hidden",children:a.children}),a.subtreeFlags=d.subtreeFlags&65011712,S!==null?r=Ml(S,r):(r=La(r,n,l,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,vu(null,a),a=t.child,r=e.child.memoizedState,r===null?r=vs(l):(n=r.cachePool,n!==null?(d=Qe._currentValue,n=n.parent!==d?{parent:d,pool:d}:n):n=ho(),r={baseLanes:r.baseLanes|l,cachePool:n}),a.memoizedState=r,a.childLanes=gs(e,c,l),t.memoizedState=ps,vu(e.child,a)):(ma(t),l=e.child,e=l.sibling,l=Ml(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function bs(e,t){return t=Mc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mc(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function Ss(e,t,l){return Ja(t,e.child,null,l),e=bs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ef(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Hi(e.return,t,l)}function js(e,t,l,a,n,u){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=n,c.treeForkCount=u)}function zf(e,t,l){var a=t.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var c=Ge.current,r=(c&2)!==0;if(r?(c=c&1|2,t.flags|=128):c&=1,R(Ge,c),ct(e,t,a,l),a=re?nu:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ef(e,l,t);else if(e.tag===19)Ef(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&gc(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),js(t,!1,n,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&gc(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}js(t,!0,l,null,u,a);break;case"together":js(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Bl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ga|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(vn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(f(153));if(t.child!==null){for(e=t.child,l=Ml(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ml(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function xs(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&oc(e)))}function Om(e,t,l){switch(t.tag){case 3:Le(t,t.stateNode.containerInfo),oa(t,Qe,e.memoizedState.cache),Xa();break;case 27:case 5:It(t);break;case 4:Le(t,t.stateNode.containerInfo);break;case 10:oa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ji(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ma(t),t.flags|=128,null):(l&t.child.childLanes)!==0?_f(e,t,l):(ma(t),e=Bl(e,t,l),e!==null?e.sibling:null);ma(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(vn(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return zf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),R(Ge,Ge.current),a)break;return null;case 22:return t.lanes=0,Sf(e,t,l,t.pendingProps);case 24:oa(t,Qe,e.memoizedState.cache)}return Bl(e,t,l)}function Of(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ve=!0;else{if(!xs(e,l)&&(t.flags&128)===0)return Ve=!1,Om(e,t,l);Ve=(e.flags&131072)!==0}else Ve=!1,re&&(t.flags&1048576)!==0&&uo(t,nu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e=="function")Ei(e)?(a=$a(e,a),t.tag=1,t=Tf(null,t,e,a,l)):(t.tag=0,t=ys(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===ft){t.tag=11,t=vf(null,t,e,a,l);break e}else if(n===I){t.tag=14,t=gf(null,t,e,a,l);break e}}throw t=zt(e)||e,Error(f(306,t,""))}}return t;case 0:return ys(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=$a(a,t.pendingProps),Tf(e,t,a,n,l);case 3:e:{if(Le(t,t.stateNode.containerInfo),e===null)throw Error(f(387));a=t.pendingProps;var u=t.memoizedState;n=u.element,Qi(e,t),du(t,a,null,l);var c=t.memoizedState;if(a=c.cache,oa(t,Qe,a),a!==u.cache&&Bi(t,[Qe],l,!0),fu(),a=c.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Af(e,t,a,l);break e}else if(a!==n){n=wt(Error(f(424)),t),uu(n),t=Af(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=Wt(e.firstChild),nt=t,re=!0,sa=null,kt=!0,l=bo(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Xa(),a===n){t=Bl(e,t,l);break e}ct(e,t,a,l)}t=t.child}return t;case 26:return Oc(e,t),e===null?(l=Ld(t.type,null,t.pendingProps,null))?t.memoizedState=l:re||(l=t.type,e=t.pendingProps,a=Kc($.current).createElement(l),a[oe]=t,a[Pe]=e,it(a,l,e),Xe(a),t.stateNode=a):t.memoizedState=Ld(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return It(t),e===null&&re&&(a=t.stateNode=qd(t.type,t.pendingProps,$.current),nt=t,kt=!0,n=_e,Na(t.type)?(tr=n,_e=Wt(a.firstChild)):_e=n),ct(e,t,t.pendingProps.children,l),Oc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&re&&((n=a=_e)&&(a=uy(a,t.type,t.pendingProps,kt),a!==null?(t.stateNode=a,nt=t,_e=Wt(a.firstChild),kt=!1,n=!0):n=!1),n||ra(t)),It(t),n=t.type,u=t.pendingProps,c=e!==null?e.memoizedProps:null,a=u.children,Ws(n,u)?a=null:c!==null&&Ws(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=$i(e,t,Sm,null,null,l),Du._currentValue=n),Oc(e,t),ct(e,t,a,l),t.child;case 6:return e===null&&re&&((e=l=_e)&&(l=cy(l,t.pendingProps,kt),l!==null?(t.stateNode=l,nt=t,_e=null,e=!0):e=!1),e||ra(t)),null;case 13:return _f(e,t,l);case 4:return Le(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ja(t,null,a,l):ct(e,t,a,l),t.child;case 11:return vf(e,t,t.type,t.pendingProps,l);case 7:return ct(e,t,t.pendingProps,l),t.child;case 8:return ct(e,t,t.pendingProps.children,l),t.child;case 12:return ct(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,oa(t,t.type,a.value),ct(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Za(t),n=ut(n),a=a(n),t.flags|=1,ct(e,t,a,l),t.child;case 14:return gf(e,t,t.type,t.pendingProps,l);case 15:return bf(e,t,t.type,t.pendingProps,l);case 19:return zf(e,t,l);case 31:return zm(e,t,l);case 22:return Sf(e,t,l,t.pendingProps);case 24:return Za(t),a=ut(Qe),e===null?(n=Yi(),n===null&&(n=Ne,u=qi(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),t.memoizedState={parent:a,cache:n},Xi(t),oa(t,Qe,n)):((e.lanes&l)!==0&&(Qi(e,t),du(t,null,null,l),fu()),n=e.memoizedState,u=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),oa(t,Qe,a)):(a=u.cache,oa(t,Qe,a),a!==n.cache&&Bi(t,[Qe],l,!0))),ct(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(f(156,t.tag))}function ql(e){e.flags|=4}function Ns(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(ld())e.flags|=8192;else throw Ka=mc,Li}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wd(t))if(ld())e.flags|=8192;else throw Ka=mc,Li}function Cc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ua():536870912,e.lanes|=t,On|=t)}function gu(e,t){if(!re)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Mm(e,t,l){var a=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(t),null;case 1:return Ee(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ul(Qe),Oe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(pn(t)?ql(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ui())),Ee(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?(ql(t),u!==null?(Ee(t),Mf(t,u)):(Ee(t),Ns(t,n,null,a,l))):u?u!==e.memoizedState?(ql(t),Ee(t),Mf(t,u)):(Ee(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ql(t),Ee(t),Ns(t,n,e,a,l)),null;case 27:if(Ia(t),l=$.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ql(t);else{if(!a){if(t.stateNode===null)throw Error(f(166));return Ee(t),null}e=Y.current,pn(t)?io(t):(e=qd(n,a,l),t.stateNode=e,ql(t))}return Ee(t),null;case 5:if(Ia(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ql(t);else{if(!a){if(t.stateNode===null)throw Error(f(166));return Ee(t),null}if(u=Y.current,pn(t))io(t);else{var c=Kc($.current);switch(u){case 1:u=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=c.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}u[oe]=t,u[Pe]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)u.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=u;e:switch(it(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ql(t)}}return Ee(t),Ns(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ql(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(f(166));if(e=$.current,pn(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=nt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[oe]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||_d(e.nodeValue,l)),e||ra(t,!0)}else e=Kc(e).createTextNode(a),e[oe]=t,t.stateNode=e}return Ee(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=pn(t),l!==null){if(e===null){if(!a)throw Error(f(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(557));e[oe]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),e=!1}else l=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(f(558))}return Ee(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=pn(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(f(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(f(317));n[oe]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),n=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Cc(t,t.updateQueue),Ee(t),null);case 4:return Oe(),e===null&&ws(t.stateNode.containerInfo),Ee(t),null;case 10:return Ul(t.type),Ee(t),null;case 19:if(O(Ge),a=t.memoizedState,a===null)return Ee(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)gu(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=gc(e),u!==null){for(t.flags|=128,gu(a,!1),e=u.updateQueue,t.updateQueue=e,Cc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)lo(l,e),l=l.sibling;return R(Ge,Ge.current&1|2),re&&Cl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Fe()>Bc&&(t.flags|=128,n=!0,gu(a,!1),t.lanes=4194304)}else{if(!n)if(e=gc(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Cc(t,e),gu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!re)return Ee(t),null}else 2*Fe()-a.renderingStartTime>Bc&&l!==536870912&&(t.flags|=128,n=!0,gu(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Fe(),e.sibling=null,l=Ge.current,R(Ge,n?l&1|2:l&1),re&&Cl(t,a.treeForkCount),e):(Ee(t),null);case 22:case 23:return Ht(t),Ki(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),l=t.updateQueue,l!==null&&Cc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&O(Va),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ul(Qe),Ee(t),null;case 25:return null;case 30:return null}throw Error(f(156,t.tag))}function Cm(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ul(Qe),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ia(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(f(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(Ge),null;case 4:return Oe(),null;case 10:return Ul(t.type),null;case 22:case 23:return Ht(t),Ki(),e!==null&&O(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ul(Qe),null;case 25:return null;default:return null}}function Cf(e,t){switch(Ci(t),t.tag){case 3:Ul(Qe),Oe();break;case 26:case 27:case 5:Ia(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:O(Ge);break;case 10:Ul(t.type);break;case 22:case 23:Ht(t),Ki(),e!==null&&O(Va);break;case 24:Ul(Qe)}}function bu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,c=l.inst;a=u(),c.destroy=a}l=l.next}while(l!==n)}}catch(r){ge(t,t.return,r)}}function pa(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var c=a.inst,r=c.destroy;if(r!==void 0){c.destroy=void 0,n=t;var d=l,S=r;try{S()}catch(_){ge(n,d,_)}}}a=a.next}while(a!==u)}}catch(_){ge(t,t.return,_)}}function Df(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{jo(t,l)}catch(a){ge(e,e.return,a)}}}function Uf(e,t,l){l.props=$a(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ge(e,t,a)}}function Su(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){ge(e,t,n)}}function vl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){ge(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){ge(e,t,n)}else l.current=null}function Rf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){ge(e,e.return,n)}}function Ts(e,t,l){try{var a=e.stateNode;Pm(a,e.type,l,t),a[Pe]=t}catch(n){ge(e,e.return,n)}}function Hf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Na(e.type)||e.tag===4}function As(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Na(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _s(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ll));else if(a!==4&&(a===27&&Na(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(_s(e,t,l),e=e.sibling;e!==null;)_s(e,t,l),e=e.sibling}function Dc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Na(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Dc(e,t,l),e=e.sibling;e!==null;)Dc(e,t,l),e=e.sibling}function Bf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);it(t,a,l),t[oe]=e,t[Pe]=l}catch(u){ge(e,e.return,u)}}var Gl=!1,we=!1,Es=!1,qf=typeof WeakSet=="function"?WeakSet:Set,tt=null;function Dm(e,t){if(e=e.containerInfo,ks=Pc,e=Jr(e),Si(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var c=0,r=-1,d=-1,S=0,_=0,M=e,j=null;t:for(;;){for(var x;M!==l||n!==0&&M.nodeType!==3||(r=c+n),M!==u||a!==0&&M.nodeType!==3||(d=c+a),M.nodeType===3&&(c+=M.nodeValue.length),(x=M.firstChild)!==null;)j=M,M=x;for(;;){if(M===e)break t;if(j===l&&++S===n&&(r=c),j===u&&++_===a&&(d=c),(x=M.nextSibling)!==null)break;M=j,j=M.parentNode}M=x}l=r===-1||d===-1?null:{start:r,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for($s={focusedElem:e,selectionRange:l},Pc=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){switch(t=tt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var L=$a(l.type,n);e=a.getSnapshotBeforeUpdate(L,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(w){ge(l,l.return,w)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Is(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Is(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(f(163))}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}}function Gf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Ll(e,l),a&4&&bu(5,l);break;case 1:if(Ll(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){ge(l,l.return,c)}else{var n=$a(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){ge(l,l.return,c)}}a&64&&Df(l),a&512&&Su(l,l.return);break;case 3:if(Ll(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{jo(e,t)}catch(c){ge(l,l.return,c)}}break;case 27:t===null&&a&4&&Bf(l);case 26:case 5:Ll(e,l),t===null&&a&4&&Rf(l),a&512&&Su(l,l.return);break;case 12:Ll(e,l);break;case 31:Ll(e,l),a&4&&Xf(e,l);break;case 13:Ll(e,l),a&4&&Qf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Xm.bind(null,l),iy(e,l))));break;case 22:if(a=l.memoizedState!==null||Gl,!a){t=t!==null&&t.memoizedState!==null||we,n=Gl;var u=we;Gl=a,(we=t)&&!u?Xl(e,l,(l.subtreeFlags&8772)!==0):Ll(e,l),Gl=n,we=u}break;case 30:break;default:Ll(e,l)}}function Yf(e){var t=e.alternate;t!==null&&(e.alternate=null,Yf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ln(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ze=null,jt=!1;function Yl(e,t,l){for(l=l.child;l!==null;)Lf(e,t,l),l=l.sibling}function Lf(e,t,l){if(te&&typeof te.onCommitFiberUnmount=="function")try{te.onCommitFiberUnmount(Yt,l)}catch{}switch(l.tag){case 26:we||vl(l,t),Yl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:we||vl(l,t);var a=ze,n=jt;Na(l.type)&&(ze=l.stateNode,jt=!1),Yl(e,t,l),Ou(l.stateNode),ze=a,jt=n;break;case 5:we||vl(l,t);case 6:if(a=ze,n=jt,ze=null,Yl(e,t,l),ze=a,jt=n,ze!==null)if(jt)try{(ze.nodeType===9?ze.body:ze.nodeName==="HTML"?ze.ownerDocument.body:ze).removeChild(l.stateNode)}catch(u){ge(l,t,u)}else try{ze.removeChild(l.stateNode)}catch(u){ge(l,t,u)}break;case 18:ze!==null&&(jt?(e=ze,Dd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),qn(e)):Dd(ze,l.stateNode));break;case 4:a=ze,n=jt,ze=l.stateNode.containerInfo,jt=!0,Yl(e,t,l),ze=a,jt=n;break;case 0:case 11:case 14:case 15:pa(2,l,t),we||pa(4,l,t),Yl(e,t,l);break;case 1:we||(vl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Uf(l,t,a)),Yl(e,t,l);break;case 21:Yl(e,t,l);break;case 22:we=(a=we)||l.memoizedState!==null,Yl(e,t,l),we=a;break;default:Yl(e,t,l)}}function Xf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qn(e)}catch(l){ge(t,t.return,l)}}}function Qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qn(e)}catch(l){ge(t,t.return,l)}}function Um(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qf),t;default:throw Error(f(435,e.tag))}}function Uc(e,t){var l=Um(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Qm.bind(null,e,a);a.then(n,n)}})}function xt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=e,c=t,r=c;e:for(;r!==null;){switch(r.tag){case 27:if(Na(r.type)){ze=r.stateNode,jt=!1;break e}break;case 5:ze=r.stateNode,jt=!1;break e;case 3:case 4:ze=r.stateNode.containerInfo,jt=!0;break e}r=r.return}if(ze===null)throw Error(f(160));Lf(u,c,n),ze=null,jt=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zf(t,e),t=t.sibling}var ul=null;function Zf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Nt(e),a&4&&(pa(3,e,e.return),bu(3,e),pa(5,e,e.return));break;case 1:xt(t,e),Nt(e),a&512&&(we||l===null||vl(l,l.return)),a&64&&Gl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=ul;if(xt(t,e),Nt(e),a&512&&(we||l===null||vl(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Ha]||u[oe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),it(u,a,l),u[oe]=e,Xe(u),a=u;break e;case"link":var c=Zd("link","href",n).get(a+(l.href||""));if(c){for(var r=0;r<c.length;r++)if(u=c[r],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(r,1);break t}}u=n.createElement(a),it(u,a,l),n.head.appendChild(u);break;case"meta":if(c=Zd("meta","content",n).get(a+(l.content||""))){for(r=0;r<c.length;r++)if(u=c[r],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(r,1);break t}}u=n.createElement(a),it(u,a,l),n.head.appendChild(u);break;default:throw Error(f(468,a))}u[oe]=e,Xe(u),a=u}e.stateNode=a}else Vd(n,e.type,e.stateNode);else e.stateNode=Qd(n,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?Vd(n,e.type,e.stateNode):Qd(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ts(e,e.memoizedProps,l.memoizedProps)}break;case 27:xt(t,e),Nt(e),a&512&&(we||l===null||vl(l,l.return)),l!==null&&a&4&&Ts(e,e.memoizedProps,l.memoizedProps);break;case 5:if(xt(t,e),Nt(e),a&512&&(we||l===null||vl(l,l.return)),e.flags&32){n=e.stateNode;try{Ol(n,"")}catch(L){ge(e,e.return,L)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Ts(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Es=!0);break;case 6:if(xt(t,e),Nt(e),a&4){if(e.stateNode===null)throw Error(f(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(L){ge(e,e.return,L)}}break;case 3:if($c=null,n=ul,ul=Jc(t.containerInfo),xt(t,e),ul=n,Nt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{qn(t.containerInfo)}catch(L){ge(e,e.return,L)}Es&&(Es=!1,Vf(e));break;case 4:a=ul,ul=Jc(e.stateNode.containerInfo),xt(t,e),Nt(e),ul=a;break;case 12:xt(t,e),Nt(e);break;case 31:xt(t,e),Nt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uc(e,a)));break;case 13:xt(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Hc=Fe()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uc(e,a)));break;case 22:n=e.memoizedState!==null;var d=l!==null&&l.memoizedState!==null,S=Gl,_=we;if(Gl=S||n,we=_||d,xt(t,e),we=_,Gl=S,Nt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||d||Gl||we||Wa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){d=l=t;try{if(u=d.stateNode,n)c=u.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{r=d.stateNode;var M=d.memoizedProps.style,j=M!=null&&M.hasOwnProperty("display")?M.display:null;r.style.display=j==null||typeof j=="boolean"?"":(""+j).trim()}}catch(L){ge(d,d.return,L)}}}else if(t.tag===6){if(l===null){d=t;try{d.stateNode.nodeValue=n?"":d.memoizedProps}catch(L){ge(d,d.return,L)}}}else if(t.tag===18){if(l===null){d=t;try{var x=d.stateNode;n?Ud(x,!0):Ud(d.stateNode,!1)}catch(L){ge(d,d.return,L)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Uc(e,l))));break;case 19:xt(t,e),Nt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uc(e,a)));break;case 30:break;case 21:break;default:xt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Hf(a)){l=a;break}a=a.return}if(l==null)throw Error(f(160));switch(l.tag){case 27:var n=l.stateNode,u=As(e);Dc(e,u,n);break;case 5:var c=l.stateNode;l.flags&32&&(Ol(c,""),l.flags&=-33);var r=As(e);Dc(e,r,c);break;case 3:case 4:var d=l.stateNode.containerInfo,S=As(e);_s(e,S,d);break;default:throw Error(f(161))}}catch(_){ge(e,e.return,_)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ll(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Gf(e,t.alternate,t),t=t.sibling}function Wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pa(4,t,t.return),Wa(t);break;case 1:vl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Uf(t,t.return,l),Wa(t);break;case 27:Ou(t.stateNode);case 26:case 5:vl(t,t.return),Wa(t);break;case 22:t.memoizedState===null&&Wa(t);break;case 30:Wa(t);break;default:Wa(t)}e=e.sibling}}function Xl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,u=t,c=u.flags;switch(u.tag){case 0:case 11:case 15:Xl(n,u,l),bu(4,u);break;case 1:if(Xl(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(S){ge(a,a.return,S)}if(a=u,n=a.updateQueue,n!==null){var r=a.stateNode;try{var d=n.shared.hiddenCallbacks;if(d!==null)for(n.shared.hiddenCallbacks=null,n=0;n<d.length;n++)So(d[n],r)}catch(S){ge(a,a.return,S)}}l&&c&64&&Df(u),Su(u,u.return);break;case 27:Bf(u);case 26:case 5:Xl(n,u,l),l&&a===null&&c&4&&Rf(u),Su(u,u.return);break;case 12:Xl(n,u,l);break;case 31:Xl(n,u,l),l&&c&4&&Xf(n,u);break;case 13:Xl(n,u,l),l&&c&4&&Qf(n,u);break;case 22:u.memoizedState===null&&Xl(n,u,l),Su(u,u.return);break;case 30:break;default:Xl(n,u,l)}t=t.sibling}}function zs(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&cu(l))}function Os(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cu(e))}function cl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wf(e,t,l,a),t=t.sibling}function wf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:cl(e,t,l,a),n&2048&&bu(9,t);break;case 1:cl(e,t,l,a);break;case 3:cl(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cu(e)));break;case 12:if(n&2048){cl(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,c=u.id,r=u.onPostCommit;typeof r=="function"&&r(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(d){ge(t,t.return,d)}}else cl(e,t,l,a);break;case 31:cl(e,t,l,a);break;case 13:cl(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,c=t.alternate,t.memoizedState!==null?u._visibility&2?cl(e,t,l,a):ju(e,t):u._visibility&2?cl(e,t,l,a):(u._visibility|=2,_n(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&zs(c,t);break;case 24:cl(e,t,l,a),n&2048&&Os(t.alternate,t);break;default:cl(e,t,l,a)}}function _n(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,c=t,r=l,d=a,S=c.flags;switch(c.tag){case 0:case 11:case 15:_n(u,c,r,d,n),bu(8,c);break;case 23:break;case 22:var _=c.stateNode;c.memoizedState!==null?_._visibility&2?_n(u,c,r,d,n):ju(u,c):(_._visibility|=2,_n(u,c,r,d,n)),n&&S&2048&&zs(c.alternate,c);break;case 24:_n(u,c,r,d,n),n&&S&2048&&Os(c.alternate,c);break;default:_n(u,c,r,d,n)}t=t.sibling}}function ju(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:ju(l,a),n&2048&&zs(a.alternate,a);break;case 24:ju(l,a),n&2048&&Os(a.alternate,a);break;default:ju(l,a)}t=t.sibling}}var xu=8192;function En(e,t,l){if(e.subtreeFlags&xu)for(e=e.child;e!==null;)Kf(e,t,l),e=e.sibling}function Kf(e,t,l){switch(e.tag){case 26:En(e,t,l),e.flags&xu&&e.memoizedState!==null&&by(l,ul,e.memoizedState,e.memoizedProps);break;case 5:En(e,t,l);break;case 3:case 4:var a=ul;ul=Jc(e.stateNode.containerInfo),En(e,t,l),ul=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=xu,xu=16777216,En(e,t,l),xu=a):En(e,t,l));break;default:En(e,t,l)}}function Jf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];tt=a,$f(a,e)}Jf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kf(e),e=e.sibling}function kf(e){switch(e.tag){case 0:case 11:case 15:Nu(e),e.flags&2048&&pa(9,e,e.return);break;case 3:Nu(e);break;case 12:Nu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rc(e)):Nu(e);break;default:Nu(e)}}function Rc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];tt=a,$f(a,e)}Jf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pa(8,t,t.return),Rc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Rc(t));break;default:Rc(t)}e=e.sibling}}function $f(e,t){for(;tt!==null;){var l=tt;switch(l.tag){case 0:case 11:case 15:pa(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:cu(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,tt=a;else e:for(l=e;tt!==null;){a=tt;var n=a.sibling,u=a.return;if(Yf(a),a===l){tt=null;break e}if(n!==null){n.return=u,tt=n;break e}tt=u}}}var Rm={getCacheForType:function(e){var t=ut(Qe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ut(Qe).controller.signal}},Hm=typeof WeakMap=="function"?WeakMap:Map,me=0,Ne=null,ne=null,ce=0,ve=0,Bt=null,va=!1,zn=!1,Ms=!1,Ql=0,Ue=0,ga=0,Fa=0,Cs=0,qt=0,On=0,Tu=null,Tt=null,Ds=!1,Hc=0,Wf=0,Bc=1/0,qc=null,ba=null,ke=0,Sa=null,Mn=null,Zl=0,Us=0,Rs=null,Ff=null,Au=0,Hs=null;function Gt(){return(me&2)!==0&&ce!==0?ce&-ce:A.T!==null?Xs():Pl()}function If(){if(qt===0)if((ce&536870912)===0||re){var e=xl;xl<<=1,(xl&3932160)===0&&(xl=262144),qt=e}else qt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),qt}function At(e,t,l){(e===Ne&&(ve===2||ve===9)||e.cancelPendingCommit!==null)&&(Cn(e,0),ja(e,ce,qt,!1)),Il(e,l),((me&2)===0||e!==Ne)&&(e===Ne&&((me&2)===0&&(Fa|=l),Ue===4&&ja(e,ce,qt,!1)),gl(e))}function Pf(e,t,l){if((me&6)!==0)throw Error(f(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||dl(e,t),n=a?Gm(e,t):qs(e,t,!0),u=a;do{if(n===0){zn&&!a&&ja(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!Bm(l)){n=qs(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var r=e;n=Tu;var d=r.current.memoizedState.isDehydrated;if(d&&(Cn(r,c).flags|=256),c=qs(r,c,!1),c!==2){if(Ms&&!d){r.errorRecoveryDisabledLanes|=u,Fa|=u,n=4;break e}u=Tt,Tt=n,u!==null&&(Tt===null?Tt=u:Tt.push.apply(Tt,u))}n=c}if(u=!1,n!==2)continue}}if(n===1){Cn(e,0),ja(e,t,0,!0);break}e:{switch(a=e,u=n,u){case 0:case 1:throw Error(f(345));case 4:if((t&4194048)!==t)break;case 6:ja(a,t,qt,!va);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(f(329))}if((t&62914560)===t&&(n=Hc+300-Fe(),10<n)){if(ja(a,t,qt,!va),Ca(a,0,!0)!==0)break e;Zl=t,a.timeoutHandle=Md(ed.bind(null,a,l,Tt,qc,Ds,t,qt,Fa,On,va,u,"Throttled",-0,0),n);break e}ed(a,l,Tt,qc,Ds,t,qt,Fa,On,va,u,null,-0,0)}}break}while(!0);gl(e)}function ed(e,t,l,a,n,u,c,r,d,S,_,M,j,x){if(e.timeoutHandle=-1,M=t.subtreeFlags,M&8192||(M&16785408)===16785408){M={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ll},Kf(t,u,M);var L=(u&62914560)===u?Hc-Fe():(u&4194048)===u?Wf-Fe():0;if(L=Sy(M,L),L!==null){Zl=u,e.cancelPendingCommit=L(sd.bind(null,e,t,u,l,a,n,c,r,d,_,M,null,j,x)),ja(e,u,c,!S);return}}sd(e,t,u,l,a,n,c,r,d)}function Bm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!Dt(u(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ja(e,t,l,a){t&=~Cs,t&=~Fa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var u=31-Ie(n),c=1<<u;a[u]=-1,n&=~c}l!==0&&Zn(e,l,t)}function Gc(){return(me&6)===0?(_u(0),!1):!0}function Bs(){if(ne!==null){if(ve===0)var e=ne.return;else e=ne,Dl=Qa=null,Ii(e),jn=null,su=0,e=ne;for(;e!==null;)Cf(e.alternate,e),e=e.return;ne=null}}function Cn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ly(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Zl=0,Bs(),Ne=e,ne=l=Ml(e.current,null),ce=t,ve=0,Bt=null,va=!1,zn=dl(e,t),Ms=!1,On=qt=Cs=Fa=ga=Ue=0,Tt=Tu=null,Ds=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-Ie(a),u=1<<n;t|=e[n],a&=~u}return Ql=t,uc(),l}function td(e,t){P=null,A.H=pu,t===Sn||t===hc?(t=po(),ve=3):t===Li?(t=po(),ve=4):ve=t===ms?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,ne===null&&(Ue=1,Ec(e,wt(t,e.current)))}function ld(){var e=Rt.current;return e===null?!0:(ce&4194048)===ce?$t===null:(ce&62914560)===ce||(ce&536870912)!==0?e===$t:!1}function ad(){var e=A.H;return A.H=pu,e===null?pu:e}function nd(){var e=A.A;return A.A=Rm,e}function Yc(){Ue=4,va||(ce&4194048)!==ce&&Rt.current!==null||(zn=!0),(ga&134217727)===0&&(Fa&134217727)===0||Ne===null||ja(Ne,ce,qt,!1)}function qs(e,t,l){var a=me;me|=2;var n=ad(),u=nd();(Ne!==e||ce!==t)&&(qc=null,Cn(e,t)),t=!1;var c=Ue;e:do try{if(ve!==0&&ne!==null){var r=ne,d=Bt;switch(ve){case 8:Bs(),c=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var S=ve;if(ve=0,Bt=null,Dn(e,r,d,S),l&&zn){c=0;break e}break;default:S=ve,ve=0,Bt=null,Dn(e,r,d,S)}}qm(),c=Ue;break}catch(_){td(e,_)}while(!0);return t&&e.shellSuspendCounter++,Dl=Qa=null,me=a,A.H=n,A.A=u,ne===null&&(Ne=null,ce=0,uc()),c}function qm(){for(;ne!==null;)ud(ne)}function Gm(e,t){var l=me;me|=2;var a=ad(),n=nd();Ne!==e||ce!==t?(qc=null,Bc=Fe()+500,Cn(e,t)):zn=dl(e,t);e:do try{if(ve!==0&&ne!==null){t=ne;var u=Bt;t:switch(ve){case 1:ve=0,Bt=null,Dn(e,t,u,1);break;case 2:case 9:if(mo(u)){ve=0,Bt=null,cd(t);break}t=function(){ve!==2&&ve!==9||Ne!==e||(ve=7),gl(e)},u.then(t,t);break e;case 3:ve=7;break e;case 4:ve=5;break e;case 7:mo(u)?(ve=0,Bt=null,cd(t)):(ve=0,Bt=null,Dn(e,t,u,7));break;case 5:var c=null;switch(ne.tag){case 26:c=ne.memoizedState;case 5:case 27:var r=ne;if(c?wd(c):r.stateNode.complete){ve=0,Bt=null;var d=r.sibling;if(d!==null)ne=d;else{var S=r.return;S!==null?(ne=S,Lc(S)):ne=null}break t}}ve=0,Bt=null,Dn(e,t,u,5);break;case 6:ve=0,Bt=null,Dn(e,t,u,6);break;case 8:Bs(),Ue=6;break e;default:throw Error(f(462))}}Ym();break}catch(_){td(e,_)}while(!0);return Dl=Qa=null,A.H=a,A.A=n,me=l,ne!==null?0:(Ne=null,ce=0,uc(),Ue)}function Ym(){for(;ne!==null&&!$l();)ud(ne)}function ud(e){var t=Of(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Lc(e):ne=t}function cd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Nf(l,t,t.pendingProps,t.type,void 0,ce);break;case 11:t=Nf(l,t,t.pendingProps,t.type.render,t.ref,ce);break;case 5:Ii(t);default:Cf(l,t),t=ne=lo(t,Ql),t=Of(l,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Lc(e):ne=t}function Dn(e,t,l,a){Dl=Qa=null,Ii(t),jn=null,su=0;var n=t.return;try{if(Em(e,n,t,l,ce)){Ue=1,Ec(e,wt(l,e.current)),ne=null;return}}catch(u){if(n!==null)throw ne=n,u;Ue=1,Ec(e,wt(l,e.current)),ne=null;return}t.flags&32768?(re||a===1?e=!0:zn||(ce&536870912)!==0?e=!1:(va=e=!0,(a===2||a===9||a===3||a===6)&&(a=Rt.current,a!==null&&a.tag===13&&(a.flags|=16384))),id(t,e)):Lc(t)}function Lc(e){var t=e;do{if((t.flags&32768)!==0){id(t,va);return}e=t.return;var l=Mm(t.alternate,t,Ql);if(l!==null){ne=l;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);Ue===0&&(Ue=5)}function id(e,t){do{var l=Cm(e.alternate,e);if(l!==null){l.flags&=32767,ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ne=e;return}ne=e=l}while(e!==null);Ue=6,ne=null}function sd(e,t,l,a,n,u,c,r,d){e.cancelPendingCommit=null;do Xc();while(ke!==0);if((me&6)!==0)throw Error(f(327));if(t!==null){if(t===e.current)throw Error(f(177));if(u=t.lanes|t.childLanes,u|=Ai,le(e,l,u,c,r,d),e===Ne&&(ne=Ne=null,ce=0),Mn=t,Sa=e,Zl=l,Us=u,Rs=n,Ff=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zm(fl,function(){return hd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=A.T,A.T=null,n=U.p,U.p=2,c=me,me|=4;try{Dm(e,t,l)}finally{me=c,U.p=n,A.T=a}}ke=1,rd(),od(),fd()}}function rd(){if(ke===1){ke=0;var e=Sa,t=Mn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=A.T,A.T=null;var a=U.p;U.p=2;var n=me;me|=4;try{Zf(t,e);var u=$s,c=Jr(e.containerInfo),r=u.focusedElem,d=u.selectionRange;if(c!==r&&r&&r.ownerDocument&&Kr(r.ownerDocument.documentElement,r)){if(d!==null&&Si(r)){var S=d.start,_=d.end;if(_===void 0&&(_=S),"selectionStart"in r)r.selectionStart=S,r.selectionEnd=Math.min(_,r.value.length);else{var M=r.ownerDocument||document,j=M&&M.defaultView||window;if(j.getSelection){var x=j.getSelection(),L=r.textContent.length,w=Math.min(d.start,L),je=d.end===void 0?w:Math.min(d.end,L);!x.extend&&w>je&&(c=je,je=w,w=c);var p=wr(r,w),m=wr(r,je);if(p&&m&&(x.rangeCount!==1||x.anchorNode!==p.node||x.anchorOffset!==p.offset||x.focusNode!==m.node||x.focusOffset!==m.offset)){var b=M.createRange();b.setStart(p.node,p.offset),x.removeAllRanges(),w>je?(x.addRange(b),x.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),x.addRange(b))}}}}for(M=[],x=r;x=x.parentNode;)x.nodeType===1&&M.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<M.length;r++){var E=M[r];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}Pc=!!ks,$s=ks=null}finally{me=n,U.p=a,A.T=l}}e.current=t,ke=2}}function od(){if(ke===2){ke=0;var e=Sa,t=Mn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=A.T,A.T=null;var a=U.p;U.p=2;var n=me;me|=4;try{Gf(e,t.alternate,t)}finally{me=n,U.p=a,A.T=l}}ke=3}}function fd(){if(ke===4||ke===3){ke=0,We();var e=Sa,t=Mn,l=Zl,a=Ff;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Mn=Sa=null,dd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(ba=null),Ra(l),t=t.stateNode,te&&typeof te.onCommitFiberRoot=="function")try{te.onCommitFiberRoot(Yt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=A.T,n=U.p,U.p=2,A.T=null;try{for(var u=e.onRecoverableError,c=0;c<a.length;c++){var r=a[c];u(r.value,{componentStack:r.stack})}}finally{A.T=t,U.p=n}}(Zl&3)!==0&&Xc(),gl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Hs?Au++:(Au=0,Hs=e):Au=0,_u(0)}}function dd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,cu(t)))}function Xc(){return rd(),od(),fd(),hd()}function hd(){if(ke!==5)return!1;var e=Sa,t=Us;Us=0;var l=Ra(Zl),a=A.T,n=U.p;try{U.p=32>l?32:l,A.T=null,l=Rs,Rs=null;var u=Sa,c=Zl;if(ke=0,Mn=Sa=null,Zl=0,(me&6)!==0)throw Error(f(331));var r=me;if(me|=4,kf(u.current),wf(u,u.current,c,l),me=r,_u(0,!1),te&&typeof te.onPostCommitFiberRoot=="function")try{te.onPostCommitFiberRoot(Yt,u)}catch{}return!0}finally{U.p=n,A.T=a,dd(e,t)}}function md(e,t,l){t=wt(l,t),t=hs(e.stateNode,t,2),e=ha(e,t,2),e!==null&&(Il(e,2),gl(e))}function ge(e,t,l){if(e.tag===3)md(e,e,l);else for(;t!==null;){if(t.tag===3){md(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ba===null||!ba.has(a))){e=wt(l,e),l=yf(2),a=ha(t,l,2),a!==null&&(pf(l,a,t,e),Il(a,2),gl(a));break}}t=t.return}}function Gs(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Hm;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Ms=!0,n.add(l),e=Lm.bind(null,e,t,l),t.then(e,e))}function Lm(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ne===e&&(ce&l)===l&&(Ue===4||Ue===3&&(ce&62914560)===ce&&300>Fe()-Hc?(me&2)===0&&Cn(e,0):Cs|=l,On===ce&&(On=0)),gl(e)}function yd(e,t){t===0&&(t=Ua()),e=Ya(e,t),e!==null&&(Il(e,t),gl(e))}function Xm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),yd(e,l)}function Qm(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(f(314))}a!==null&&a.delete(t),yd(e,l)}function Zm(e,t){return ol(e,t)}var Qc=null,Un=null,Ys=!1,Zc=!1,Ls=!1,xa=0;function gl(e){e!==Un&&e.next===null&&(Un===null?Qc=Un=e:Un=Un.next=e),Zc=!0,Ys||(Ys=!0,wm())}function _u(e,t){if(!Ls&&Zc){Ls=!0;do for(var l=!1,a=Qc;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var c=a.suspendedLanes,r=a.pingedLanes;u=(1<<31-Ie(42|e)+1)-1,u&=n&~(c&~r),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,bd(a,u))}else u=ce,u=Ca(a,a===Ne?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||dl(a,u)||(l=!0,bd(a,u));a=a.next}while(l);Ls=!1}}function Vm(){pd()}function pd(){Zc=Ys=!1;var e=0;xa!==0&&ty()&&(e=xa);for(var t=Fe(),l=null,a=Qc;a!==null;){var n=a.next,u=vd(a,t);u===0?(a.next=null,l===null?Qc=n:l.next=n,n===null&&(Un=l)):(l=a,(e!==0||(u&3)!==0)&&(Zc=!0)),a=n}ke!==0&&ke!==5||_u(e),xa!==0&&(xa=0)}function vd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var c=31-Ie(u),r=1<<c,d=n[c];d===-1?((r&l)===0||(r&a)!==0)&&(n[c]=Da(r,t)):d<=t&&(e.expiredLanes|=r),u&=~r}if(t=Ne,l=ce,l=Ca(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(ve===2||ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&pe(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||dl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&pe(a),Ra(l)){case 2:case 8:l=Wl;break;case 32:l=fl;break;case 268435456:l=Fl;break;default:l=fl}return a=gd.bind(null,e),l=ol(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&pe(a),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(ke!==0&&ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Xc()&&e.callbackNode!==l)return null;var a=ce;return a=Ca(e,e===Ne?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Pf(e,a,t),vd(e,Fe()),e.callbackNode!=null&&e.callbackNode===l?gd.bind(null,e):null)}function bd(e,t){if(Xc())return null;Pf(e,t,!0)}function wm(){ay(function(){(me&6)!==0?ol(He,Vm):pd()})}function Xs(){if(xa===0){var e=gn;e===0&&(e=jl,jl<<=1,(jl&261888)===0&&(jl=256)),xa=e}return xa}function Sd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cn(""+e)}function jd(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Km(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var u=Sd((n[Pe]||null).action),c=a.submitter;c&&(t=(t=c[Pe]||null)?Sd(t.formAction):c.getAttribute("formAction"),t!==null&&(u=t,c=null));var r=new tc("action","action",null,a,n);e.push({event:r,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(xa!==0){var d=c?jd(n,c):new FormData(n);is(l,{pending:!0,data:d,method:n.method,action:u},null,d)}}else typeof u=="function"&&(r.preventDefault(),d=c?jd(n,c):new FormData(n),is(l,{pending:!0,data:d,method:n.method,action:u},u,d))},currentTarget:n}]})}}for(var Qs=0;Qs<Ti.length;Qs++){var Zs=Ti[Qs],Jm=Zs.toLowerCase(),km=Zs[0].toUpperCase()+Zs.slice(1);nl(Jm,"on"+km)}nl(Wr,"onAnimationEnd"),nl(Fr,"onAnimationIteration"),nl(Ir,"onAnimationStart"),nl("dblclick","onDoubleClick"),nl("focusin","onFocus"),nl("focusout","onBlur"),nl(om,"onTransitionRun"),nl(fm,"onTransitionStart"),nl(dm,"onTransitionCancel"),nl(Pr,"onTransitionEnd"),la("onMouseEnter",["mouseout","mouseover"]),la("onMouseLeave",["mouseout","mouseover"]),la("onPointerEnter",["pointerout","pointerover"]),la("onPointerLeave",["pointerout","pointerover"]),_l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_l("onBeforeInput",["compositionend","keypress","textInput","paste"]),_l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="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(" "),$m=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Eu));function xd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var c=a.length-1;0<=c;c--){var r=a[c],d=r.instance,S=r.currentTarget;if(r=r.listener,d!==u&&n.isPropagationStopped())break e;u=r,n.currentTarget=S;try{u(n)}catch(_){nc(_)}n.currentTarget=null,u=d}else for(c=0;c<a.length;c++){if(r=a[c],d=r.instance,S=r.currentTarget,r=r.listener,d!==u&&n.isPropagationStopped())break e;u=r,n.currentTarget=S;try{u(n)}catch(_){nc(_)}n.currentTarget=null,u=d}}}}function ue(e,t){var l=t[ml];l===void 0&&(l=t[ml]=new Set);var a=e+"__bubble";l.has(a)||(Nd(t,e,2,!1),l.add(a))}function Vs(e,t,l){var a=0;t&&(a|=4),Nd(l,e,a,t)}var Vc="_reactListening"+Math.random().toString(36).slice(2);function ws(e){if(!e[Vc]){e[Vc]=!0,Ku.forEach(function(l){l!=="selectionchange"&&($m.has(l)||Vs(l,!1,e),Vs(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vc]||(t[Vc]=!0,Vs("selectionchange",!1,t))}}function Nd(e,t,l,a){switch(Id(t)){case 2:var n=Ny;break;case 8:n=Ty;break;default:n=cr}l=n.bind(null,t,l,e),n=void 0,!o||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Ks(e,t,l,a,n){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var r=a.stateNode.containerInfo;if(r===n)break;if(c===4)for(c=a.return;c!==null;){var d=c.tag;if((d===3||d===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;r!==null;){if(c=ea(r),c===null)return;if(d=c.tag,d===5||d===6||d===26||d===27){a=u=c;continue e}r=r.parentNode}}a=a.return}Wn(function(){var S=u,_=sn(l),M=[];e:{var j=eo.get(e);if(j!==void 0){var x=tc,L=e;switch(e){case"keypress":if(al(l)===0)break e;case"keydown":case"keyup":x=Qh;break;case"focusin":L="focus",x=yi;break;case"focusout":L="blur",x=yi;break;case"beforeblur":case"afterblur":x=yi;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":x=Or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=Mh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=wh;break;case Wr:case Fr:case Ir:x=Uh;break;case Pr:x=Jh;break;case"scroll":case"scrollend":x=zh;break;case"wheel":x=$h;break;case"copy":case"cut":case"paste":x=Hh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Cr;break;case"toggle":case"beforetoggle":x=Fh}var w=(t&4)!==0,je=!w&&(e==="scroll"||e==="scrollend"),p=w?j!==null?j+"Capture":null:j;w=[];for(var m=S,b;m!==null;){var E=m;if(b=E.stateNode,E=E.tag,E!==5&&E!==26&&E!==27||b===null||p===null||(E=ca(m,p),E!=null&&w.push(zu(m,E,b))),je)break;m=m.return}0<w.length&&(j=new x(j,L,null,l,_),M.push({event:j,listeners:w}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",j&&l!==$n&&(L=l.relatedTarget||l.fromElement)&&(ea(L)||L[vt]))break e;if((x||j)&&(j=_.window===_?_:(j=_.ownerDocument)?j.defaultView||j.parentWindow:window,x?(L=l.relatedTarget||l.toElement,x=S,L=L?ea(L):null,L!==null&&(je=q(L),w=L.tag,L!==je||w!==5&&w!==27&&w!==6)&&(L=null)):(x=null,L=S),x!==L)){if(w=Or,E="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(w=Cr,E="onPointerLeave",p="onPointerEnter",m="pointer"),je=x==null?j:ta(x),b=L==null?j:ta(L),j=new w(E,m+"leave",x,l,_),j.target=je,j.relatedTarget=b,E=null,ea(_)===S&&(w=new w(p,m+"enter",L,l,_),w.target=b,w.relatedTarget=je,E=w),je=E,x&&L)t:{for(w=Wm,p=x,m=L,b=0,E=p;E;E=w(E))b++;E=0;for(var Q=m;Q;Q=w(Q))E++;for(;0<b-E;)p=w(p),b--;for(;0<E-b;)m=w(m),E--;for(;b--;){if(p===m||m!==null&&p===m.alternate){w=p;break t}p=w(p),m=w(m)}w=null}else w=null;x!==null&&Td(M,j,x,w,!1),L!==null&&je!==null&&Td(M,je,L,w,!0)}}e:{if(j=S?ta(S):window,x=j.nodeName&&j.nodeName.toLowerCase(),x==="select"||x==="input"&&j.type==="file")var fe=Yr;else if(qr(j))if(Lr)fe=im;else{fe=um;var X=nm}else x=j.nodeName,!x||x.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?S&&kn(S.elementType)&&(fe=Yr):fe=cm;if(fe&&(fe=fe(e,S))){Gr(M,fe,l,_);break e}X&&X(e,j,S),e==="focusout"&&S&&j.type==="number"&&S.memoizedProps.value!=null&&dt(j,"number",j.value)}switch(X=S?ta(S):window,e){case"focusin":(qr(X)||X.contentEditable==="true")&&(on=X,ji=S,au=null);break;case"focusout":au=ji=on=null;break;case"mousedown":xi=!0;break;case"contextmenu":case"mouseup":case"dragend":xi=!1,kr(M,l,_);break;case"selectionchange":if(rm)break;case"keydown":case"keyup":kr(M,l,_)}var ee;if(vi)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else rn?Hr(e,l)&&(ie="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ie="onCompositionStart");ie&&(Dr&&l.locale!=="ko"&&(rn||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&rn&&(ee=qe()):(H=_,K="value"in H?H.value:H.textContent,rn=!0)),X=wc(S,ie),0<X.length&&(ie=new Mr(ie,e,null,l,_),M.push({event:ie,listeners:X}),ee?ie.data=ee:(ee=Br(l),ee!==null&&(ie.data=ee)))),(ee=Ph?em(e,l):tm(e,l))&&(ie=wc(S,"onBeforeInput"),0<ie.length&&(X=new Mr("onBeforeInput","beforeinput",null,l,_),M.push({event:X,listeners:ie}),X.data=ee)),Km(M,e,S,l,_)}xd(M,t)})}function zu(e,t,l){return{instance:e,listener:t,currentTarget:l}}function wc(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=ca(e,l),n!=null&&a.unshift(zu(e,n,u)),n=ca(e,t),n!=null&&a.push(zu(e,n,u))),e.tag===3)return a;e=e.return}return[]}function Wm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Td(e,t,l,a,n){for(var u=t._reactName,c=[];l!==null&&l!==a;){var r=l,d=r.alternate,S=r.stateNode;if(r=r.tag,d!==null&&d===a)break;r!==5&&r!==26&&r!==27||S===null||(d=S,n?(S=ca(l,u),S!=null&&c.unshift(zu(l,S,d))):n||(S=ca(l,u),S!=null&&c.push(zu(l,S,d)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var Fm=/\r\n?/g,Im=/\u0000|\uFFFD/g;function Ad(e){return(typeof e=="string"?e:""+e).replace(Fm,`
|
|
49
49
|
`).replace(Im,"")}function _d(e,t){return t=Ad(t),Ad(e)===t}function Se(e,t,l,a,n,u){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ol(e,""+a);break;case"className":El(e,"class",a);break;case"tabIndex":El(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":El(e,l,a);break;case"style":Iu(e,a,u);break;case"data":if(t!=="object"){El(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=cn(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(t!=="input"&&Se(e,t,"name",n.name,n,null),Se(e,t,"formEncType",n.formEncType,n,null),Se(e,t,"formMethod",n.formMethod,n,null),Se(e,t,"formTarget",n.formTarget,n,null)):(Se(e,t,"encType",n.encType,n,null),Se(e,t,"method",n.method,n,null),Se(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=cn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=ll);break;case"onScroll":a!=null&&ue("scroll",e);break;case"onScrollEnd":a!=null&&ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(f(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=cn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ue("beforetoggle",e),ue("toggle",e),an(e,"popover",a);break;case"xlinkActuate":et(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":et(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":et(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":et(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":et(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":et(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":et(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":et(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":et(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":an(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Pu.get(l)||l,an(e,l,a))}}function Js(e,t,l,a,n,u){switch(l){case"style":Iu(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(f(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&Ol(e,""+a);break;case"onScroll":a!=null&&ue("scroll",e);break;case"onScrollEnd":a!=null&&ue("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ll);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ju.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),u=e[Pe]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):an(e,l,a)}}}function it(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ue("error",e),ue("load",e);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var c=l[u];if(c!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:Se(e,t,u,c,l,null)}}n&&Se(e,t,"srcSet",l.srcSet,l,null),a&&Se(e,t,"src",l.src,l,null);return;case"input":ue("invalid",e);var r=u=c=n=null,d=null,S=null;for(a in l)if(l.hasOwnProperty(a)){var _=l[a];if(_!=null)switch(a){case"name":n=_;break;case"type":c=_;break;case"checked":d=_;break;case"defaultChecked":S=_;break;case"value":u=_;break;case"defaultValue":r=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(f(137,t));break;default:Se(e,t,a,_,l,null)}}Jn(e,u,r,d,S,c,n,!1);return;case"select":ue("invalid",e),a=c=u=null;for(n in l)if(l.hasOwnProperty(n)&&(r=l[n],r!=null))switch(n){case"value":u=r;break;case"defaultValue":c=r;break;case"multiple":a=r;default:Se(e,t,n,r,l,null)}t=u,l=c,e.multiple=!!a,t!=null?bt(e,!!a,t,!1):l!=null&&bt(e,!!a,l,!0);return;case"textarea":ue("invalid",e),u=n=a=null;for(c in l)if(l.hasOwnProperty(c)&&(r=l[c],r!=null))switch(c){case"value":a=r;break;case"defaultValue":n=r;break;case"children":u=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(f(91));break;default:Se(e,t,c,r,l,null)}tl(e,a,n,u);return;case"option":for(d in l)if(l.hasOwnProperty(d)&&(a=l[d],a!=null))switch(d){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Se(e,t,d,a,l,null)}return;case"dialog":ue("beforetoggle",e),ue("toggle",e),ue("cancel",e),ue("close",e);break;case"iframe":case"object":ue("load",e);break;case"video":case"audio":for(a=0;a<Eu.length;a++)ue(Eu[a],e);break;case"image":ue("error",e),ue("load",e);break;case"details":ue("toggle",e);break;case"embed":case"source":case"link":ue("error",e),ue("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(S in l)if(l.hasOwnProperty(S)&&(a=l[S],a!=null))switch(S){case"children":case"dangerouslySetInnerHTML":throw Error(f(137,t));default:Se(e,t,S,a,l,null)}return;default:if(kn(t)){for(_ in l)l.hasOwnProperty(_)&&(a=l[_],a!==void 0&&Js(e,t,_,a,l,void 0));return}}for(r in l)l.hasOwnProperty(r)&&(a=l[r],a!=null&&Se(e,t,r,a,l,null))}function Pm(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,c=null,r=null,d=null,S=null,_=null;for(x in l){var M=l[x];if(l.hasOwnProperty(x)&&M!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":d=M;default:a.hasOwnProperty(x)||Se(e,t,x,null,a,M)}}for(var j in a){var x=a[j];if(M=l[j],a.hasOwnProperty(j)&&(x!=null||M!=null))switch(j){case"type":u=x;break;case"name":n=x;break;case"checked":S=x;break;case"defaultChecked":_=x;break;case"value":c=x;break;case"defaultValue":r=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(f(137,t));break;default:x!==M&&Se(e,t,j,x,a,M)}}el(e,c,r,d,S,_,u,n);return;case"select":x=c=r=j=null;for(u in l)if(d=l[u],l.hasOwnProperty(u)&&d!=null)switch(u){case"value":break;case"multiple":x=d;default:a.hasOwnProperty(u)||Se(e,t,u,null,a,d)}for(n in a)if(u=a[n],d=l[n],a.hasOwnProperty(n)&&(u!=null||d!=null))switch(n){case"value":j=u;break;case"defaultValue":r=u;break;case"multiple":c=u;default:u!==d&&Se(e,t,n,u,a,d)}t=r,l=c,a=x,j!=null?bt(e,!!l,j,!1):!!a!=!!l&&(t!=null?bt(e,!!l,t,!0):bt(e,!!l,l?[]:"",!1));return;case"textarea":x=j=null;for(r in l)if(n=l[r],l.hasOwnProperty(r)&&n!=null&&!a.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Se(e,t,r,null,a,n)}for(c in a)if(n=a[c],u=l[c],a.hasOwnProperty(c)&&(n!=null||u!=null))switch(c){case"value":j=n;break;case"defaultValue":x=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(f(91));break;default:n!==u&&Se(e,t,c,n,a,u)}un(e,j,x);return;case"option":for(var L in l)if(j=l[L],l.hasOwnProperty(L)&&j!=null&&!a.hasOwnProperty(L))switch(L){case"selected":e.selected=!1;break;default:Se(e,t,L,null,a,j)}for(d in a)if(j=a[d],x=l[d],a.hasOwnProperty(d)&&j!==x&&(j!=null||x!=null))switch(d){case"selected":e.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:Se(e,t,d,j,a,x)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var w in l)j=l[w],l.hasOwnProperty(w)&&j!=null&&!a.hasOwnProperty(w)&&Se(e,t,w,null,a,j);for(S in a)if(j=a[S],x=l[S],a.hasOwnProperty(S)&&j!==x&&(j!=null||x!=null))switch(S){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(f(137,t));break;default:Se(e,t,S,j,a,x)}return;default:if(kn(t)){for(var je in l)j=l[je],l.hasOwnProperty(je)&&j!==void 0&&!a.hasOwnProperty(je)&&Js(e,t,je,void 0,a,j);for(_ in a)j=a[_],x=l[_],!a.hasOwnProperty(_)||j===x||j===void 0&&x===void 0||Js(e,t,_,j,a,x);return}}for(var p in l)j=l[p],l.hasOwnProperty(p)&&j!=null&&!a.hasOwnProperty(p)&&Se(e,t,p,null,a,j);for(M in a)j=a[M],x=l[M],!a.hasOwnProperty(M)||j===x||j==null&&x==null||Se(e,t,M,j,a,x)}function Ed(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ey(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,c=n.initiatorType,r=n.duration;if(u&&r&&Ed(c)){for(c=0,r=n.responseEnd,a+=1;a<l.length;a++){var d=l[a],S=d.startTime;if(S>r)break;var _=d.transferSize,M=d.initiatorType;_&&Ed(M)&&(d=d.responseEnd,c+=_*(d<r?1:(r-S)/(d-S)))}if(--a,t+=8*(u+c)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ks=null,$s=null;function Kc(e){return e.nodeType===9?e:e.ownerDocument}function zd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Od(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ws(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fs=null;function ty(){var e=window.event;return e&&e.type==="popstate"?e===Fs?!1:(Fs=e,!0):(Fs=null,!1)}var Md=typeof setTimeout=="function"?setTimeout:void 0,ly=typeof clearTimeout=="function"?clearTimeout:void 0,Cd=typeof Promise=="function"?Promise:void 0,ay=typeof queueMicrotask=="function"?queueMicrotask:typeof Cd<"u"?function(e){return Cd.resolve(null).then(e).catch(ny)}:Md;function ny(e){setTimeout(function(){throw e})}function Na(e){return e==="head"}function Dd(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),qn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Ou(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ou(l);for(var u=l.firstChild;u;){var c=u.nextSibling,r=u.nodeName;u[Ha]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=c}}else l==="body"&&Ou(e.ownerDocument.body);l=n}while(l);qn(t)}function Ud(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Is(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Is(l),ln(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function uy(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ha])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Wt(e.nextSibling),e===null)break}return null}function cy(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Wt(e.nextSibling),e===null))return null;return e}function Rd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Wt(e.nextSibling),e===null))return null;return e}function Ps(e){return e.data==="$?"||e.data==="$~"}function er(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iy(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Wt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var tr=null;function Hd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Wt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function qd(e,t,l){switch(t=Kc(l),e){case"html":if(e=t.documentElement,!e)throw Error(f(452));return e;case"head":if(e=t.head,!e)throw Error(f(453));return e;case"body":if(e=t.body,!e)throw Error(f(454));return e;default:throw Error(f(451))}}function Ou(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ln(e)}var Ft=new Map,Gd=new Set;function Jc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Vl=U.d;U.d={f:sy,r:ry,D:oy,C:fy,L:dy,m:hy,X:yy,S:my,M:py};function sy(){var e=Vl.f(),t=Gc();return e||t}function ry(e){var t=Tl(e);t!==null&&t.tag===5&&t.type==="form"?ef(t):Vl.r(e)}var Rn=typeof document>"u"?null:document;function Yd(e,t,l){var a=Rn;if(a&&typeof t=="string"&&t){var n=Be(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Gd.has(n)||(Gd.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),it(t,"link",e),Xe(t),a.head.appendChild(t)))}}function oy(e){Vl.D(e),Yd("dns-prefetch",e,null)}function fy(e,t){Vl.C(e,t),Yd("preconnect",e,t)}function dy(e,t,l){Vl.L(e,t,l);var a=Rn;if(a&&e&&t){var n='link[rel="preload"][as="'+Be(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Be(l.imageSizes)+'"]')):n+='[href="'+Be(e)+'"]';var u=n;switch(t){case"style":u=Hn(e);break;case"script":u=Bn(e)}Ft.has(u)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ft.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Mu(u))||t==="script"&&a.querySelector(Cu(u))||(t=a.createElement("link"),it(t,"link",e),Xe(t),a.head.appendChild(t)))}}function hy(e,t){Vl.m(e,t);var l=Rn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Be(a)+'"][href="'+Be(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Bn(e)}if(!Ft.has(u)&&(e=v({rel:"modulepreload",href:e},t),Ft.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Cu(u)))return}a=l.createElement("link"),it(a,"link",e),Xe(a),l.head.appendChild(a)}}}function my(e,t,l){Vl.S(e,t,l);var a=Rn;if(a&&e){var n=Al(a).hoistableStyles,u=Hn(e);t=t||"default";var c=n.get(u);if(!c){var r={loading:0,preload:null};if(c=a.querySelector(Mu(u)))r.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ft.get(u))&&lr(e,l);var d=c=a.createElement("link");Xe(d),it(d,"link",e),d._p=new Promise(function(S,_){d.onload=S,d.onerror=_}),d.addEventListener("load",function(){r.loading|=1}),d.addEventListener("error",function(){r.loading|=2}),r.loading|=4,kc(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:r},n.set(u,c)}}}function yy(e,t){Vl.X(e,t);var l=Rn;if(l&&e){var a=Al(l).hoistableScripts,n=Bn(e),u=a.get(n);u||(u=l.querySelector(Cu(n)),u||(e=v({src:e,async:!0},t),(t=Ft.get(n))&&ar(e,t),u=l.createElement("script"),Xe(u),it(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function py(e,t){Vl.M(e,t);var l=Rn;if(l&&e){var a=Al(l).hoistableScripts,n=Bn(e),u=a.get(n);u||(u=l.querySelector(Cu(n)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Ft.get(n))&&ar(e,t),u=l.createElement("script"),Xe(u),it(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Ld(e,t,l,a){var n=(n=$.current)?Jc(n):null;if(!n)throw Error(f(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Hn(l.href),l=Al(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Hn(l.href);var u=Al(n).hoistableStyles,c=u.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,c),(u=n.querySelector(Mu(e)))&&!u._p&&(c.instance=u,c.state.loading=5),Ft.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ft.set(e,l),u||vy(n,e,l,c.state))),t&&a===null)throw Error(f(528,""));return c}if(t&&a!==null)throw Error(f(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Bn(l),l=Al(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,e))}}function Hn(e){return'href="'+Be(e)+'"'}function Mu(e){return'link[rel="stylesheet"]['+e+"]"}function Xd(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function vy(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),it(t,"link",l),Xe(t),e.head.appendChild(t))}function Bn(e){return'[src="'+Be(e)+'"]'}function Cu(e){return"script[async]"+e}function Qd(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Be(l.href)+'"]');if(a)return t.instance=a,Xe(a),a;var n=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Xe(a),it(a,"style",n),kc(a,l.precedence,e),t.instance=a;case"stylesheet":n=Hn(l.href);var u=e.querySelector(Mu(n));if(u)return t.state.loading|=4,t.instance=u,Xe(u),u;a=Xd(l),(n=Ft.get(n))&&lr(a,n),u=(e.ownerDocument||e).createElement("link"),Xe(u);var c=u;return c._p=new Promise(function(r,d){c.onload=r,c.onerror=d}),it(u,"link",a),t.state.loading|=4,kc(u,l.precedence,e),t.instance=u;case"script":return u=Bn(l.src),(n=e.querySelector(Cu(u)))?(t.instance=n,Xe(n),n):(a=l,(n=Ft.get(u))&&(a=v({},l),ar(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Xe(n),it(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(f(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,kc(a,l.precedence,e));return t.instance}function kc(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,c=0;c<a.length;c++){var r=a[c];if(r.dataset.precedence===t)u=r;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ar(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $c=null;function Zd(e,t,l){if($c===null){var a=new Map,n=$c=new Map;n.set(l,a)}else n=$c,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var u=l[n];if(!(u[Ha]||u[oe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var c=u.getAttribute(t)||"";c=e+c;var r=a.get(c);r?r.push(u):a.set(c,[u])}}return a}function Vd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function gy(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function by(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Hn(a.href),u=t.querySelector(Mu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Xe(u);return}u=t.ownerDocument||t,a=Xd(a),(n=Ft.get(n))&&lr(a,n),u=u.createElement("link"),Xe(u);var c=u;c._p=new Promise(function(r,d){c.onload=r,c.onerror=d}),it(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Wc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var nr=0;function Sy(e,t){return e.stylesheets&&e.count===0&&Ic(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ic(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&nr===0&&(nr=62500*ey());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ic(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>nr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Wc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ic(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fc=null;function Ic(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fc=new Map,t.forEach(jy,e),Fc=null,Wc.call(e))}function jy(e,t){if(!(t.state.loading&4)){var l=Fc.get(e);if(l)var a=l.get(null);else{l=new Map,Fc.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var c=n[u];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}n=t.instance,c=n.getAttribute("data-precedence"),u=l.get(c)||a,u===a&&l.set(null,n),l.set(c,n),this.count++,a=Wc.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Du={$$typeof:Ke,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function xy(e,t,l,a,n,u,c,r,d){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=en(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=en(0),this.hiddenUpdates=en(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=d,this.incompleteTransitions=new Map}function Kd(e,t,l,a,n,u,c,r,d,S,_,M){return e=new xy(e,t,l,c,d,S,_,M,r),t=1,u===!0&&(t|=24),u=Ut(3,null,null,t),e.current=u,u.stateNode=e,t=qi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},Xi(u),e}function Jd(e){return e?(e=hn,e):hn}function kd(e,t,l,a,n,u){n=Jd(n),a.context===null?a.context=n:a.pendingContext=n,a=da(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=ha(e,a,t),l!==null&&(At(l,e,t),ou(l,e,t))}function $d(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ur(e,t){$d(e,t),(e=e.alternate)&&$d(e,t)}function Wd(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&At(t,e,67108864),ur(e,67108864)}}function Fd(e){if(e.tag===13||e.tag===31){var t=Gt();t=Vn(t);var l=Ya(e,t);l!==null&&At(l,e,t),ur(e,t)}}var Pc=!0;function Ny(e,t,l,a){var n=A.T;A.T=null;var u=U.p;try{U.p=2,cr(e,t,l,a)}finally{U.p=u,A.T=n}}function Ty(e,t,l,a){var n=A.T;A.T=null;var u=U.p;try{U.p=8,cr(e,t,l,a)}finally{U.p=u,A.T=n}}function cr(e,t,l,a){if(Pc){var n=ir(a);if(n===null)Ks(e,t,a,ei,l),Pd(e,a);else if(_y(n,e,t,l,a))a.stopPropagation();else if(Pd(e,a),t&4&&-1<Ay.indexOf(e)){for(;n!==null;){var u=Tl(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var c=Xt(u.pendingLanes);if(c!==0){var r=u;for(r.pendingLanes|=2,r.entangledLanes|=2;c;){var d=1<<31-Ie(c);r.entanglements[1]|=d,c&=~d}gl(u),(me&6)===0&&(Bc=Fe()+500,_u(0))}}break;case 31:case 13:r=Ya(u,2),r!==null&&At(r,u,2),Gc(),ur(u,2)}if(u=ir(a),u===null&&Ks(e,t,a,ei,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else Ks(e,t,a,null,l)}}function ir(e){return e=sn(e),sr(e)}var ei=null;function sr(e){if(ei=null,e=ea(e),e!==null){var t=q(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=C(t),e!==null)return e;e=null}else if(l===31){if(e=G(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ei=e,null}function Id(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ma()){case He:return 2;case Wl:return 8;case fl:case Lu:return 32;case Fl:return 268435456;default:return 32}default:return 32}}var rr=!1,Ta=null,Aa=null,_a=null,Uu=new Map,Ru=new Map,Ea=[],Ay="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Pd(e,t){switch(e){case"focusin":case"focusout":Ta=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":_a=null;break;case"pointerover":case"pointerout":Uu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ru.delete(t.pointerId)}}function Hu(e,t,l,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},t!==null&&(t=Tl(t),t!==null&&Wd(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function _y(e,t,l,a,n){switch(t){case"focusin":return Ta=Hu(Ta,e,t,l,a,n),!0;case"dragenter":return Aa=Hu(Aa,e,t,l,a,n),!0;case"mouseover":return _a=Hu(_a,e,t,l,a,n),!0;case"pointerover":var u=n.pointerId;return Uu.set(u,Hu(Uu.get(u)||null,e,t,l,a,n)),!0;case"gotpointercapture":return u=n.pointerId,Ru.set(u,Hu(Ru.get(u)||null,e,t,l,a,n)),!0}return!1}function eh(e){var t=ea(e.target);if(t!==null){var l=q(t);if(l!==null){if(t=l.tag,t===13){if(t=C(l),t!==null){e.blockedOn=t,hl(e.priority,function(){Fd(l)});return}}else if(t===31){if(t=G(l),t!==null){e.blockedOn=t,hl(e.priority,function(){Fd(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ti(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ir(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);$n=a,l.target.dispatchEvent(a),$n=null}else return t=Tl(l),t!==null&&Wd(t),e.blockedOn=l,!1;t.shift()}return!0}function th(e,t,l){ti(e)&&l.delete(t)}function Ey(){rr=!1,Ta!==null&&ti(Ta)&&(Ta=null),Aa!==null&&ti(Aa)&&(Aa=null),_a!==null&&ti(_a)&&(_a=null),Uu.forEach(th),Ru.forEach(th)}function li(e,t){e.blockedOn===t&&(e.blockedOn=null,rr||(rr=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ey)))}var ai=null;function lh(e){ai!==e&&(ai=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){ai===e&&(ai=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(sr(a||l)===null)continue;break}var u=Tl(l);u!==null&&(e.splice(t,3),t-=3,is(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function qn(e){function t(d){return li(d,e)}Ta!==null&&li(Ta,e),Aa!==null&&li(Aa,e),_a!==null&&li(_a,e),Uu.forEach(t),Ru.forEach(t);for(var l=0;l<Ea.length;l++){var a=Ea[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ea.length&&(l=Ea[0],l.blockedOn===null);)eh(l),l.blockedOn===null&&Ea.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],c=n[Pe]||null;if(typeof u=="function")c||lh(l);else if(c){var r=null;if(u&&u.hasAttribute("formAction")){if(n=u,c=u[Pe]||null)r=c.formAction;else if(sr(n)!==null)continue}else r=c.action;typeof r=="function"?l[a+1]=r:(l.splice(a,3),a-=3),lh(l)}}}function ah(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function or(e){this._internalRoot=e}ni.prototype.render=or.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(f(409));var l=t.current,a=Gt();kd(l,a,e,t,null,null)},ni.prototype.unmount=or.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kd(e.current,2,null,e,null,null),Gc(),t[vt]=null}};function ni(e){this._internalRoot=e}ni.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pl();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ea.length&&t!==0&&t<Ea[l].priority;l++);Ea.splice(l,0,e),l===0&&eh(e)}};var nh=h.version;if(nh!=="19.2.4")throw Error(f(527,nh,"19.2.4"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(f(188)):(e=Object.keys(e).join(","),Error(f(268,e)));return e=N(t),e=e!==null?Z(e):null,e=e===null?null:e.stateNode,e};var zy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ui.isDisabled&&ui.supportsFiber)try{Yt=ui.inject(zy),te=ui}catch{}}return qu.createRoot=function(e,t){if(!z(e))throw Error(f(299));var l=!1,a="",n=ff,u=df,c=hf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Kd(e,1,!1,null,null,l,a,null,n,u,c,ah),e[vt]=t.current,ws(e),new or(t)},qu.hydrateRoot=function(e,t,l){if(!z(e))throw Error(f(299));var a=!1,n="",u=ff,c=df,r=hf,d=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(r=l.onRecoverableError),l.formState!==void 0&&(d=l.formState)),t=Kd(e,1,!0,t,l??null,a,n,d,u,c,r,ah),t.context=Jd(null),l=t.current,a=Gt(),a=Vn(a),n=da(a),n.callback=null,ha(l,n,a),l=a,t.current.lanes=l,Il(t,l),gl(t),e[vt]=t.current,ws(e),new ni(t)},qu.version="19.2.4",qu}var mh;function Xy(){if(mh)return mr.exports;mh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(h){console.error(h)}}return s(),mr.exports=Ly(),mr.exports}var Qy=Xy();const Zy=Th(Qy),Vy="modulepreload",wy=function(s,h){return new URL(s,h).href},yh={},Ky=function(h,g,f){let z=Promise.resolve();if(g&&g.length>0){let C=function(Z){return Promise.all(Z.map(v=>Promise.resolve(v).then(J=>({status:"fulfilled",value:J}),J=>({status:"rejected",reason:J}))))};const G=document.getElementsByTagName("link"),D=document.querySelector("meta[property=csp-nonce]"),N=(D==null?void 0:D.nonce)||(D==null?void 0:D.getAttribute("nonce"));z=C(g.map(Z=>{if(Z=wy(Z,f),Z in yh)return;yh[Z]=!0;const v=Z.endsWith(".css"),J=v?'[rel="stylesheet"]':"";if(!!f)for(let Te=G.length-1;Te>=0;Te--){const Ae=G[Te];if(Ae.href===Z&&(!v||Ae.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${Z}"]${J}`))return;const xe=document.createElement("link");if(xe.rel=v?"stylesheet":Vy,v||(xe.as="script"),xe.crossOrigin="",xe.href=Z,N&&xe.setAttribute("nonce",N),document.head.appendChild(xe),v)return new Promise((Te,Ae)=>{xe.addEventListener("load",Te),xe.addEventListener("error",()=>Ae(new Error(`Unable to preload CSS for ${Z}`)))})}))}function q(C){const G=new Event("vite:preloadError",{cancelable:!0});if(G.payload=C,window.dispatchEvent(G),!G.defaultPrevented)throw C}return z.then(C=>{for(const G of C||[])G.status==="rejected"&&q(G.reason);return h().catch(q)})},Me="2026-03-18T01:13:09.680Z",Jy=[{id:"node_recallx",type:"project",status:"active",canonicality:"canonical",visibility:"normal",title:"RecallX",body:`RecallX is a local-first knowledge substrate for durable notes, projects, decisions, references, activities, and graph relationships shared across humans and tools.
|
|
50
50
|
|
|
51
|
-
The current slice focuses on durable storage, fast retrieval, provenance, and automatic governance.`,summary:"Shared local memory layer for humans and agents.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",tags:["workspace","memory","local-first"],createdAt:Me,updatedAt:Me,metadata:{stage:"build",priority:"core"}},{id:"node_v1_governance",type:"decision",status:"active",canonicality:"canonical",visibility:"normal",title:"v1 governance rules",body:"Agent-created relations default to suggested. Automatic governance promotes, contests, or demotes content using deterministic local signals. Summary maintenance should stay cheap and deterministic.",summary:"Keep agent writes additive and automatically governed.",createdBy:"고주환",sourceType:"human",sourceLabel:"docs",tags:["governance","automation","rules"],createdAt:Me,updatedAt:Me,metadata:{doc:"docs/promotion-rules.md",scope:"v1"}},{id:"node_api_surface",type:"spec",status:"active",canonicality:"suggested",visibility:"normal",title:"Local API surface",body:"Expose /api/v1/nodes, /api/v1/relations, /api/v1/activities, and /api/v1/retrieval routes through a loopback-only service. Keep read operations simple and append-first writes attributable.",summary:"Thin loopback API for local tools and UI.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",tags:["api","cli","integration"],createdAt:Me,updatedAt:Me,metadata:{transport:"http",version:"v1"}},{id:"node_retrieval",type:"note",status:"active",canonicality:"appended",visibility:"normal",title:"Retrieval should be summary-first",body:"Fast context assembly should prefer summaries, recent activity digests, and a compact shortlist before reaching for full bodies or deeper traversal.",summary:"Search should return a working set, not the whole graph.",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",tags:["retrieval","scout","performance"],createdAt:Me,updatedAt:Me,metadata:{bundle:"compact",hotPath:!0}},{id:"node_governance_policy",type:"question",status:"draft",canonicality:"generated",visibility:"normal",title:"How should governance issues be surfaced?",body:"We need a simple way to surface contested and low-confidence entities while keeping the governance surface compact and operational.",summary:"Open question about governance surfacing.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",tags:["governance","triage"],createdAt:Me,updatedAt:Me,metadata:{status:"pending"}},{id:"node_openclaw",type:"reference",status:"active",canonicality:"imported",visibility:"normal",title:"OpenClaw session summary pattern",body:"Session summaries should land as activity by default unless they carry durable cross-tool knowledge or a decision. High-value outputs become suggested notes.",summary:"Imported integration guidance from docs.",createdBy:"system",sourceType:"import",sourceLabel:"docs import",tags:["integration","openclaw"],createdAt:Me,updatedAt:Me,metadata:{importSource:"docs/archive/integrations.md"}}],ky=[{id:"rel_1",fromNodeId:"node_v1_governance",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Me,metadata:{}},{id:"rel_2",fromNodeId:"node_api_surface",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{}},{id:"rel_3",fromNodeId:"node_retrieval",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Me,metadata:{}},{id:"rel_4",fromNodeId:"node_recallx",toNodeId:"node_api_surface",relationType:"related_to",status:"suggested",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{}},{id:"rel_5",fromNodeId:"node_retrieval",toNodeId:"node_api_surface",relationType:"supports",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Me,metadata:{}}],$y=[{id:"act_1",targetNodeId:"node_recallx",activityType:"note_appended",body:"Created the project hub and aligned the workspace name to RecallX.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Me,metadata:{}},{id:"act_2",targetNodeId:"node_api_surface",activityType:"agent_run_summary",body:"Codex documented the initial API contract and suggested a thin local HTTP surface.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{runId:"run_123"}},{id:"act_3",targetNodeId:"node_governance_policy",activityType:"review_action",body:"Governance issue triage still needs a clear priority rule for contested entities and suggested notes.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",createdAt:Me,metadata:{}}],Wy=[{id:"art_1",nodeId:"node_api_surface",path:"artifacts/reports/api-contract.md",mimeType:"text/markdown",sizeBytes:4096,checksum:"sha256:recallx-api-contract",createdBy:"Codex",sourceLabel:"docs synthesis",createdAt:Me,metadata:{kind:"report"}}],Fy=[{id:"int_1",name:"Claude Code",kind:"claude_code",status:"active",capabilities:["read_search","get_context_bundle","append_activity"],updatedAt:Me},{id:"int_2",name:"Codex",kind:"codex",status:"active",capabilities:["read_search","get_context_bundle","create_node","create_relation"],updatedAt:Me}],Iy={workspace:{name:"RecallX",rootPath:"/Users/name/Documents/RecallX",schemaVersion:1,apiBind:"127.0.0.1:8787",integrationModes:["read-only","append-only"],authMode:"optional"},nodes:Jy,relations:ky,activities:$y,artifacts:Wy,integrations:Fy,pinnedProjectIds:["node_recallx"],recentNodeIds:["node_api_surface","node_v1_governance","node_retrieval"]},Py="1.0.1",Ah=window.__RECALLX_API_BASE__??"/api/v1",Nr={actorType:"human",actorLabel:"recallx-renderer",toolName:"recallx-renderer",toolVersion:Py};let Tr=null;class ri extends Error{constructor(g,f,z){super(z);fr(this,"kind");fr(this,"status");this.kind=g,this.status=f}}function _h(s){return structuredClone(s)}let gr=null;function wl(){return gr||(gr=_h(Iy)),gr}function Yu(s){const h=(s==null?void 0:s.data)??s;return{name:h.workspaceName??h.name??"RecallX",rootPath:h.rootPath??h.workspaceRoot??"",schemaVersion:h.schemaVersion??1,apiBind:h.bindAddress??h.apiBind??"127.0.0.1:8787",integrationModes:h.enabledIntegrationModes??h.integrationModes??["read-only","append-only"],authMode:h.authMode==="bearer"?"bearer":"optional"}}function Ln(s){return(s==null?void 0:s.data)??s}function ep(s){const h=Ln(s);return Array.isArray(h==null?void 0:h.items)?h.items:[]}function tp(s){var g;const h=Ln(s);return Array.isArray((g=h==null?void 0:h.bundle)==null?void 0:g.items)?h.bundle.items:[]}function oi(s,h){return ep(s).map(h)}function lp(s){return{...Yu(s),isCurrent:!!(s!=null&&s.isCurrent),lastOpenedAt:(s==null?void 0:s.lastOpenedAt)??new Date().toISOString()}}function ap(s){return Array.isArray(s)?s.map(lp):[]}function Ar(s){const h=Ln(s);return{current:Yu(h==null?void 0:h.current),items:ap(h==null?void 0:h.items)}}function Yn(s){return{id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,visibility:s.visibility??"normal",title:s.title??"Untitled",body:s.body??"",summary:s.summary??"No summary yet.",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",tags:Array.isArray(s.tags)?s.tags:[],createdAt:s.createdAt??s.created_at??new Date().toISOString(),updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function np(s){return{id:s.id,targetNodeId:s.targetNodeId??s.target_node_id,activityType:s.activityType??s.activity_type,body:s.body??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function Eh(s){return{entityType:s.entityType??s.entity_type,entityId:s.entityId??s.entity_id,state:s.state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reasons:Array.isArray(s.reasons)?s.reasons:[],lastEvaluatedAt:s.lastEvaluatedAt??s.last_evaluated_at??new Date().toISOString(),lastTransitionAt:s.lastTransitionAt??s.last_transition_at??new Date().toISOString(),metadata:s.metadata??{}}}function up(s){const h=Eh(s);return{...h,title:s.title??s.display_title??`${h.entityType}:${h.entityId}`,subtitle:s.subtitle??s.display_subtitle??""}}function cp(s){return{id:s.id??`gov-event:${s.entityType??s.entity_type}:${s.entityId??s.entity_id}:${s.eventType??s.event_type??"evaluated"}`,entityType:s.entityType??s.entity_type??"node",entityId:s.entityId??s.entity_id,eventType:s.eventType??s.event_type??"evaluated",previousState:s.previousState??s.previous_state??null,nextState:s.nextState??s.next_state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reason:s.reason??"No governance reason available.",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function ip(s){return{state:s!=null&&s.state?Eh(s.state):null,events:Array.isArray(s==null?void 0:s.events)?s.events.map(cp):[]}}function sp(s){return{id:s.id,nodeId:s.nodeId??s.node_id,path:s.path,mimeType:s.mimeType??s.mime_type??"application/octet-stream",sizeBytes:s.sizeBytes??s.size_bytes??0,checksum:s.checksum??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function rp(s,h=new Date().toISOString()){return{current:s,items:[{...s,isCurrent:!0,lastOpenedAt:h}]}}function op(s){return s.status==="contested"?{entityType:"node",entityId:s.id,state:"contested",confidence:.22,reasons:["Historical contradiction or migration pressure is still attached to this node."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:s.canonicality==="suggested"||s.canonicality==="generated"?{entityType:"node",entityId:s.id,state:"low_confidence",confidence:.56,reasons:["Suggested or generated content still needs repeated local confirmation signals."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:{entityType:"node",entityId:s.id,state:"healthy",confidence:.86,reasons:["Canonical or appended content is currently stable in the fallback workspace."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}}function fp(s,h){return[{id:`gov-fallback:${s.id}`,entityType:"node",entityId:s.id,eventType:h.state==="contested"?"contested":"evaluated",previousState:null,nextState:h.state,confidence:h.confidence,reason:h.reasons[0]??"Fallback governance evaluation.",createdAt:s.updatedAt,metadata:{source:"fallback"}}]}function dp(s){const h=op(s),g=wl();return{node:s,related:g.relations.filter(f=>f.fromNodeId===s.id||f.toNodeId===s.id).map(f=>f.fromNodeId===s.id?f.toNodeId:f.fromNodeId).map(f=>g.nodes.find(z=>z.id===f)).filter(f=>!!f),activities:g.activities.filter(f=>f.targetNodeId===s.id),artifacts:g.artifacts.filter(f=>f.nodeId===s.id),governance:{state:h,events:fp(s,h)}}}function hp(s){return{id:s.id,name:s.name,kind:s.kind,status:s.status??"active",capabilities:Array.isArray(s.capabilities)?s.capabilities:[],updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString()}}function mp(s,h){const g=Yn(h.node),f=h.edge??{},z={id:f.relationId??f.relation_id??`edge:${s}:${g.id}:${f.relationType??f.relation_type??"related_to"}`,fromNodeId:f.direction==="incoming"?g.id:s,toNodeId:f.direction==="incoming"?s:g.id,relationType:f.relationType??f.relation_type??"related_to",status:f.relationStatus??f.relation_status??"active",createdBy:f.generator??f.relationSource??"recallx",sourceType:f.relationSource==="inferred"?"system":"human",sourceLabel:f.relationSource==="inferred"?`inferred:${f.generator??"derived"}`:"canonical",createdAt:new Date().toISOString(),metadata:{}};return{node:g,relation:z,direction:f.direction==="incoming"?"incoming":"outgoing",hop:f.hop===2?2:1,viaNodeId:typeof h.viaNodeId=="string"?h.viaNodeId:void 0,viaNodeTitle:typeof h.viaNodeTitle=="string"?h.viaNodeTitle:void 0}}function yp(s){var g,f,z,q,C,G,D,N,Z;const h=Ln(s);return{nodes:Array.isArray(h==null?void 0:h.nodes)?h.nodes.map(v=>({id:v.id,title:v.title??"Untitled",type:v.type,status:v.status??"active",canonicality:v.canonicality??"appended",summary:v.summary??"No summary yet.",createdAt:v.createdAt??v.created_at??new Date().toISOString(),updatedAt:v.updatedAt??v.updated_at??v.createdAt??v.created_at??new Date().toISOString(),degree:typeof v.degree=="number"?v.degree:0,isFocus:!!v.isFocus,projectRole:v.projectRole==="focus"?"focus":"member"})):[],edges:Array.isArray(h==null?void 0:h.edges)?h.edges.map(v=>({id:v.id,source:v.source,target:v.target,relationType:v.relationType??v.relation_type??"related_to",relationSource:v.relationSource==="inferred"?"inferred":"canonical",status:v.status??"active",score:typeof v.score=="number"?v.score:null,generator:typeof v.generator=="string"?v.generator:null,createdAt:v.createdAt??v.created_at??new Date().toISOString(),evidence:v.evidence??{}})):[],timeline:Array.isArray(h==null?void 0:h.timeline)?h.timeline.map(v=>({id:v.id,kind:v.kind??"activity",at:v.at??new Date().toISOString(),nodeId:typeof v.nodeId=="string"?v.nodeId:void 0,edgeId:typeof v.edgeId=="string"?v.edgeId:void 0,label:v.label??"Graph event"})):[],meta:{focusProjectId:((g=h==null?void 0:h.meta)==null?void 0:g.focusProjectId)??((f=h==null?void 0:h.meta)==null?void 0:f.focus_project_id)??"",nodeCount:typeof((z=h==null?void 0:h.meta)==null?void 0:z.nodeCount)=="number"?h.meta.nodeCount:0,edgeCount:typeof((q=h==null?void 0:h.meta)==null?void 0:q.edgeCount)=="number"?h.meta.edgeCount:0,inferredEdgeCount:typeof((C=h==null?void 0:h.meta)==null?void 0:C.inferredEdgeCount)=="number"?h.meta.inferredEdgeCount:0,timeRange:{start:((D=(G=h==null?void 0:h.meta)==null?void 0:G.timeRange)==null?void 0:D.start)??null,end:((Z=(N=h==null?void 0:h.meta)==null?void 0:N.timeRange)==null?void 0:Z.end)??null}}}}function pp(s,h){var N,Z;const g=s.nodes.find(v=>v.id===h&&v.type==="project");if(!g)throw new Error("Project not found in fallback workspace.");const f=s.relations.filter(v=>v.relationType==="relevant_to"&&v.status!=="archived"&&v.status!=="rejected"&&(v.fromNodeId===h||v.toNodeId===h)),z=new Set([h]);f.forEach(v=>{z.add(v.fromNodeId===h?v.toNodeId:v.fromNodeId)});const q=s.nodes.filter(v=>z.has(v.id)).map(v=>({id:v.id,title:v.title,type:v.type,status:v.status,canonicality:v.canonicality,summary:v.summary,createdAt:v.createdAt,updatedAt:v.updatedAt,degree:s.relations.filter(J=>z.has(J.fromNodeId)&&z.has(J.toNodeId)&&(J.fromNodeId===v.id||J.toNodeId===v.id)).length,isFocus:v.id===h,projectRole:v.id===h?"focus":"member"})),C=new Map(q.map(v=>[v.id,v.title])),G=s.relations.filter(v=>z.has(v.fromNodeId)&&z.has(v.toNodeId)&&v.status!=="archived"&&v.status!=="rejected").map(v=>({id:v.id,source:v.fromNodeId,target:v.toNodeId,relationType:v.relationType,relationSource:"canonical",status:v.status,score:null,generator:null,createdAt:v.createdAt,evidence:{}})),D=[...q.map(v=>({id:`timeline-node:${v.id}`,kind:"node_created",at:v.createdAt,nodeId:v.id,label:`${v.title} created`})),...G.map(v=>({id:`timeline-edge:${v.id}`,kind:"relation_created",at:v.createdAt,edgeId:v.id,nodeId:v.source,label:`${C.get(v.source)??v.source} ${v.relationType.replaceAll("_"," ")} ${C.get(v.target)??v.target}`})),...s.activities.filter(v=>z.has(v.targetNodeId)).map(v=>({id:`timeline-activity:${v.id}`,kind:"activity",at:v.createdAt,nodeId:v.targetNodeId,label:`${v.activityType.replaceAll("_"," ")} on ${C.get(v.targetNodeId)??v.targetNodeId}`}))].sort((v,J)=>v.at.localeCompare(J.at)||v.id.localeCompare(J.id));return{nodes:q,edges:G,timeline:D,meta:{focusProjectId:h,nodeCount:q.length,edgeCount:G.length,inferredEdgeCount:0,timeRange:{start:((N=D[0])==null?void 0:N.at)??g.createdAt,end:((Z=D[D.length-1])==null?void 0:Z.at)??g.createdAt}}}}async function rt(s,h){const g=_r();let f;try{f=await fetch(`${Ah}${s}`,{headers:{Accept:"application/json","Content-Type":"application/json",...g?{Authorization:`Bearer ${g}`}:{},...(h==null?void 0:h.headers)??{}},...h})}catch(z){throw new ri("network",0,z instanceof Error?z.message:"Network request failed.")}if(!f.ok)throw new ri("http",f.status,`Request failed: ${f.status}`);return f.json()}async function Kl(s,h){try{return await s()}catch(g){if(g instanceof ri&&g.kind==="network")return await h();throw g}}function _r(){const s=window.__RECALLX_API_TOKEN__;return s||Tr}function vp(s){Tr=s}function br(){Tr=null}function ph(s){return s instanceof ri&&s.status===401}function gp(){return`${Ah}/events`}function bp(){return _h(wl())}async function Sp(){return Kl(async()=>{const s=await rt("/workspace");return Yu(s)},async()=>wl().workspace)}async function jp(){return Kl(async()=>{const s=await rt("/workspaces");return Ar(s)},async()=>rp(wl().workspace))}async function xp(){return Kl(async()=>{const s=await rt("/bootstrap"),h=Ln(s),g=Yu(h.workspace??h);return{workspace:g,authMode:h.authMode==="bearer"?"bearer":g.authMode,hasToken:!!_r()}},async()=>({workspace:wl().workspace,authMode:"optional",hasToken:!1}))}async function Np(s){return Kl(async()=>{const h=await rt("/context/bundles",{method:"POST",body:JSON.stringify({target:{id:s},mode:"compact",preset:"for-assistant",options:{includeRelated:!0,includeInferred:!0,includeRecentActivities:!1,includeDecisions:!0,includeOpenQuestions:!0,maxInferred:4,maxItems:6}})});return tp(h).filter(g=>g&&typeof g.nodeId=="string"&&g.nodeId!==s).map(g=>({nodeId:g.nodeId,type:g.type,title:typeof g.title=="string"?g.title:null,summary:typeof g.summary=="string"?g.summary:null,reason:typeof g.reason=="string"?g.reason:"Included for context",relationId:typeof g.relationId=="string"?g.relationId:void 0,relationType:typeof g.relationType=="string"?g.relationType:void 0,relationSource:g.relationSource==="canonical"||g.relationSource==="inferred"?g.relationSource:void 0,relationScore:typeof g.relationScore=="number"?g.relationScore:void 0,retrievalRank:typeof g.retrievalRank=="number"?g.retrievalRank:void 0,generator:typeof g.generator=="string"?g.generator:null}))},async()=>[])}async function Tp(s){await rt("/relation-usage-events",{method:"POST",body:JSON.stringify({relationId:s.relationId,relationSource:s.relationSource,eventType:s.eventType,sessionId:s.sessionId,delta:s.delta,source:Nr,metadata:s.metadata??{}})})}async function Ap(s){const h=await rt("/workspaces",{method:"POST",body:JSON.stringify(s)});return Ar(h)}async function _p(s){const h=await rt("/workspaces/open",{method:"POST",body:JSON.stringify({rootPath:s})});return Ar(h)}async function Ep(){return Kl(async()=>{const[s,h,g]=await Promise.all([rt("/workspace"),rt("/nodes/search",{method:"POST",body:JSON.stringify({query:"",filters:{},limit:50,offset:0,sort:"updated_at"})}),rt("/integrations")]),f=oi(h,Yn),z=oi(g,hp),q=f.slice(0,5).map(G=>G.id),C=f.filter(G=>G.type==="project").slice(0,3).map(G=>G.id);return{workspace:Yu(s),nodes:f,relations:[],activities:[],artifacts:[],integrations:z,pinnedProjectIds:C,recentNodeIds:q}},async()=>bp())}async function zp(s){return Kl(async()=>{const h=await rt(`/nodes/${encodeURIComponent(s)}`),g=Ln(h);return{node:g!=null&&g.node?Yn(g.node):null,related:Array.isArray(g==null?void 0:g.related)?g.related.map(f=>Yn(f.node??f)):[],activities:Array.isArray(g==null?void 0:g.activities)?g.activities.map(np):[],artifacts:Array.isArray(g==null?void 0:g.artifacts)?g.artifacts.map(sp):[],governance:ip(g==null?void 0:g.governance)}},async()=>{const h=wl().nodes.find(g=>g.id===s);return h?dp(h):void 0})}function vh(s,h){const g=new Map(s.nodes.map(f=>[f.id,f]));return s.relations.reduce((f,z)=>{if(z.fromNodeId!==h&&z.toNodeId!==h||z.status==="archived")return f;const q=z.fromNodeId===h?z.toNodeId:z.fromNodeId,C=g.get(q);return!C||C.status==="archived"||f.push({node:C,relation:z,direction:z.fromNodeId===h?"outgoing":"incoming",hop:1}),f},[])}async function Op(s,h){return Kl(async()=>{const g=await rt(`/nodes/${encodeURIComponent(s)}/neighborhood?include_inferred=1&max_inferred=4&depth=${h}`);return oi(g,f=>mp(s,f))},async()=>{const g=wl(),f=vh(g,s);if(h===1)return f;const z=f.map(G=>vh(g,G.node.id).filter(D=>D.node.id!==s).map(D=>({...D,hop:2,viaNodeId:G.node.id,viaNodeTitle:G.node.title}))),q=[...f],C=new Set(f.map(G=>`${G.relation.id}:${G.node.id}:1`));return z.flat().forEach(G=>{const D=`${G.relation.id}:${G.node.id}:${G.viaNodeId??"direct"}`;C.has(D)||(C.add(D),q.push(G))}),q})}async function Mp(s){return Kl(async()=>{const h=await rt(`/projects/${encodeURIComponent(s)}/graph?include_inferred=1&max_inferred=60`);return yp(h)},async()=>pp(wl(),s))}async function Cp(){return Kl(async()=>{const s=await rt("/governance/issues?limit=20");return oi(s,up)},async()=>wl().nodes.filter(s=>s.status==="contested"||s.canonicality==="suggested").map(s=>({entityType:"node",entityId:s.id,state:s.status==="contested"?"contested":"low_confidence",confidence:s.status==="contested"?.2:.55,reasons:s.status==="contested"?["fallback contested node"]:["fallback suggested node"],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{},title:s.title,subtitle:s.type})))}function Dp(s){if(typeof window>"u"||typeof window.fetch>"u")return()=>{};const h=new AbortController;let g=null;async function f(){var z;try{const q=_r(),C=await fetch(gp(),{headers:q?{Authorization:`Bearer ${q}`}:void 0,signal:h.signal});if(!C.ok||!C.body)throw new Error(`Workspace event stream failed (${C.status})`);const G=C.body.getReader(),D=new TextDecoder;let N="";for(;!h.signal.aborted;){const{done:Z,value:v}=await G.read();if(Z)break;N+=D.decode(v,{stream:!0});let J=gh(N);for(;J>=0;){const Ce=N.slice(0,J);N=N.slice(Up(N,J)),Rp(Ce,s.onWorkspaceUpdate),J=gh(N)}}}catch{if(h.signal.aborted)return;(z=s.onError)==null||z.call(s)}h.signal.aborted||(g=window.setTimeout(()=>{g=null,f()},1e3))}return f(),()=>{h.abort(),g!==null&&window.clearTimeout(g)}}function gh(s){const h=s.indexOf(`
|
|
51
|
+
The current slice focuses on durable storage, fast retrieval, provenance, and automatic governance.`,summary:"Shared local memory layer for humans and agents.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",tags:["workspace","memory","local-first"],createdAt:Me,updatedAt:Me,metadata:{stage:"build",priority:"core"}},{id:"node_v1_governance",type:"decision",status:"active",canonicality:"canonical",visibility:"normal",title:"v1 governance rules",body:"Agent-created relations default to suggested. Automatic governance promotes, contests, or demotes content using deterministic local signals. Summary maintenance should stay cheap and deterministic.",summary:"Keep agent writes additive and automatically governed.",createdBy:"고주환",sourceType:"human",sourceLabel:"docs",tags:["governance","automation","rules"],createdAt:Me,updatedAt:Me,metadata:{doc:"docs/promotion-rules.md",scope:"v1"}},{id:"node_api_surface",type:"spec",status:"active",canonicality:"suggested",visibility:"normal",title:"Local API surface",body:"Expose /api/v1/nodes, /api/v1/relations, /api/v1/activities, and /api/v1/retrieval routes through a loopback-only service. Keep read operations simple and append-first writes attributable.",summary:"Thin loopback API for local tools and UI.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",tags:["api","cli","integration"],createdAt:Me,updatedAt:Me,metadata:{transport:"http",version:"v1"}},{id:"node_retrieval",type:"note",status:"active",canonicality:"appended",visibility:"normal",title:"Retrieval should be summary-first",body:"Fast context assembly should prefer summaries, recent activity digests, and a compact shortlist before reaching for full bodies or deeper traversal.",summary:"Search should return a working set, not the whole graph.",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",tags:["retrieval","scout","performance"],createdAt:Me,updatedAt:Me,metadata:{bundle:"compact",hotPath:!0}},{id:"node_governance_policy",type:"question",status:"draft",canonicality:"generated",visibility:"normal",title:"How should governance issues be surfaced?",body:"We need a simple way to surface contested and low-confidence entities while keeping the governance surface compact and operational.",summary:"Open question about governance surfacing.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",tags:["governance","triage"],createdAt:Me,updatedAt:Me,metadata:{status:"pending"}},{id:"node_openclaw",type:"reference",status:"active",canonicality:"imported",visibility:"normal",title:"OpenClaw session summary pattern",body:"Session summaries should land as activity by default unless they carry durable cross-tool knowledge or a decision. High-value outputs become suggested notes.",summary:"Imported integration guidance from docs.",createdBy:"system",sourceType:"import",sourceLabel:"docs import",tags:["integration","openclaw"],createdAt:Me,updatedAt:Me,metadata:{importSource:"docs/archive/integrations.md"}}],ky=[{id:"rel_1",fromNodeId:"node_v1_governance",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Me,metadata:{}},{id:"rel_2",fromNodeId:"node_api_surface",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{}},{id:"rel_3",fromNodeId:"node_retrieval",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Me,metadata:{}},{id:"rel_4",fromNodeId:"node_recallx",toNodeId:"node_api_surface",relationType:"related_to",status:"suggested",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{}},{id:"rel_5",fromNodeId:"node_retrieval",toNodeId:"node_api_surface",relationType:"supports",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Me,metadata:{}}],$y=[{id:"act_1",targetNodeId:"node_recallx",activityType:"note_appended",body:"Created the project hub and aligned the workspace name to RecallX.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Me,metadata:{}},{id:"act_2",targetNodeId:"node_api_surface",activityType:"agent_run_summary",body:"Codex documented the initial API contract and suggested a thin local HTTP surface.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Me,metadata:{runId:"run_123"}},{id:"act_3",targetNodeId:"node_governance_policy",activityType:"review_action",body:"Governance issue triage still needs a clear priority rule for contested entities and suggested notes.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",createdAt:Me,metadata:{}}],Wy=[{id:"art_1",nodeId:"node_api_surface",path:"artifacts/reports/api-contract.md",mimeType:"text/markdown",sizeBytes:4096,checksum:"sha256:recallx-api-contract",createdBy:"Codex",sourceLabel:"docs synthesis",createdAt:Me,metadata:{kind:"report"}}],Fy=[{id:"int_1",name:"Claude Code",kind:"claude_code",status:"active",capabilities:["read_search","get_context_bundle","append_activity"],updatedAt:Me},{id:"int_2",name:"Codex",kind:"codex",status:"active",capabilities:["read_search","get_context_bundle","create_node","create_relation"],updatedAt:Me}],Iy={workspace:{name:"RecallX",rootPath:"/Users/name/Documents/RecallX",schemaVersion:1,apiBind:"127.0.0.1:8787",integrationModes:["read-only","append-only"],authMode:"optional"},nodes:Jy,relations:ky,activities:$y,artifacts:Wy,integrations:Fy,pinnedProjectIds:["node_recallx"],recentNodeIds:["node_api_surface","node_v1_governance","node_retrieval"]},Py="1.0.2",Ah=window.__RECALLX_API_BASE__??"/api/v1",Nr={actorType:"human",actorLabel:"recallx-renderer",toolName:"recallx-renderer",toolVersion:Py};let Tr=null;class ri extends Error{constructor(g,f,z){super(z);fr(this,"kind");fr(this,"status");this.kind=g,this.status=f}}function _h(s){return structuredClone(s)}let gr=null;function wl(){return gr||(gr=_h(Iy)),gr}function Yu(s){const h=(s==null?void 0:s.data)??s;return{name:h.workspaceName??h.name??"RecallX",rootPath:h.rootPath??h.workspaceRoot??"",schemaVersion:h.schemaVersion??1,apiBind:h.bindAddress??h.apiBind??"127.0.0.1:8787",integrationModes:h.enabledIntegrationModes??h.integrationModes??["read-only","append-only"],authMode:h.authMode==="bearer"?"bearer":"optional"}}function Ln(s){return(s==null?void 0:s.data)??s}function ep(s){const h=Ln(s);return Array.isArray(h==null?void 0:h.items)?h.items:[]}function tp(s){var g;const h=Ln(s);return Array.isArray((g=h==null?void 0:h.bundle)==null?void 0:g.items)?h.bundle.items:[]}function oi(s,h){return ep(s).map(h)}function lp(s){return{...Yu(s),isCurrent:!!(s!=null&&s.isCurrent),lastOpenedAt:(s==null?void 0:s.lastOpenedAt)??new Date().toISOString()}}function ap(s){return Array.isArray(s)?s.map(lp):[]}function Ar(s){const h=Ln(s);return{current:Yu(h==null?void 0:h.current),items:ap(h==null?void 0:h.items)}}function Yn(s){return{id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,visibility:s.visibility??"normal",title:s.title??"Untitled",body:s.body??"",summary:s.summary??"No summary yet.",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",tags:Array.isArray(s.tags)?s.tags:[],createdAt:s.createdAt??s.created_at??new Date().toISOString(),updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function np(s){return{id:s.id,targetNodeId:s.targetNodeId??s.target_node_id,activityType:s.activityType??s.activity_type,body:s.body??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function Eh(s){return{entityType:s.entityType??s.entity_type,entityId:s.entityId??s.entity_id,state:s.state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reasons:Array.isArray(s.reasons)?s.reasons:[],lastEvaluatedAt:s.lastEvaluatedAt??s.last_evaluated_at??new Date().toISOString(),lastTransitionAt:s.lastTransitionAt??s.last_transition_at??new Date().toISOString(),metadata:s.metadata??{}}}function up(s){const h=Eh(s);return{...h,title:s.title??s.display_title??`${h.entityType}:${h.entityId}`,subtitle:s.subtitle??s.display_subtitle??""}}function cp(s){return{id:s.id??`gov-event:${s.entityType??s.entity_type}:${s.entityId??s.entity_id}:${s.eventType??s.event_type??"evaluated"}`,entityType:s.entityType??s.entity_type??"node",entityId:s.entityId??s.entity_id,eventType:s.eventType??s.event_type??"evaluated",previousState:s.previousState??s.previous_state??null,nextState:s.nextState??s.next_state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reason:s.reason??"No governance reason available.",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function ip(s){return{state:s!=null&&s.state?Eh(s.state):null,events:Array.isArray(s==null?void 0:s.events)?s.events.map(cp):[]}}function sp(s){return{id:s.id,nodeId:s.nodeId??s.node_id,path:s.path,mimeType:s.mimeType??s.mime_type??"application/octet-stream",sizeBytes:s.sizeBytes??s.size_bytes??0,checksum:s.checksum??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function rp(s,h=new Date().toISOString()){return{current:s,items:[{...s,isCurrent:!0,lastOpenedAt:h}]}}function op(s){return s.status==="contested"?{entityType:"node",entityId:s.id,state:"contested",confidence:.22,reasons:["Historical contradiction or migration pressure is still attached to this node."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:s.canonicality==="suggested"||s.canonicality==="generated"?{entityType:"node",entityId:s.id,state:"low_confidence",confidence:.56,reasons:["Suggested or generated content still needs repeated local confirmation signals."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:{entityType:"node",entityId:s.id,state:"healthy",confidence:.86,reasons:["Canonical or appended content is currently stable in the fallback workspace."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}}function fp(s,h){return[{id:`gov-fallback:${s.id}`,entityType:"node",entityId:s.id,eventType:h.state==="contested"?"contested":"evaluated",previousState:null,nextState:h.state,confidence:h.confidence,reason:h.reasons[0]??"Fallback governance evaluation.",createdAt:s.updatedAt,metadata:{source:"fallback"}}]}function dp(s){const h=op(s),g=wl();return{node:s,related:g.relations.filter(f=>f.fromNodeId===s.id||f.toNodeId===s.id).map(f=>f.fromNodeId===s.id?f.toNodeId:f.fromNodeId).map(f=>g.nodes.find(z=>z.id===f)).filter(f=>!!f),activities:g.activities.filter(f=>f.targetNodeId===s.id),artifacts:g.artifacts.filter(f=>f.nodeId===s.id),governance:{state:h,events:fp(s,h)}}}function hp(s){return{id:s.id,name:s.name,kind:s.kind,status:s.status??"active",capabilities:Array.isArray(s.capabilities)?s.capabilities:[],updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString()}}function mp(s,h){const g=Yn(h.node),f=h.edge??{},z={id:f.relationId??f.relation_id??`edge:${s}:${g.id}:${f.relationType??f.relation_type??"related_to"}`,fromNodeId:f.direction==="incoming"?g.id:s,toNodeId:f.direction==="incoming"?s:g.id,relationType:f.relationType??f.relation_type??"related_to",status:f.relationStatus??f.relation_status??"active",createdBy:f.generator??f.relationSource??"recallx",sourceType:f.relationSource==="inferred"?"system":"human",sourceLabel:f.relationSource==="inferred"?`inferred:${f.generator??"derived"}`:"canonical",createdAt:new Date().toISOString(),metadata:{}};return{node:g,relation:z,direction:f.direction==="incoming"?"incoming":"outgoing",hop:f.hop===2?2:1,viaNodeId:typeof h.viaNodeId=="string"?h.viaNodeId:void 0,viaNodeTitle:typeof h.viaNodeTitle=="string"?h.viaNodeTitle:void 0}}function yp(s){var g,f,z,q,C,G,D,N,Z;const h=Ln(s);return{nodes:Array.isArray(h==null?void 0:h.nodes)?h.nodes.map(v=>({id:v.id,title:v.title??"Untitled",type:v.type,status:v.status??"active",canonicality:v.canonicality??"appended",summary:v.summary??"No summary yet.",createdAt:v.createdAt??v.created_at??new Date().toISOString(),updatedAt:v.updatedAt??v.updated_at??v.createdAt??v.created_at??new Date().toISOString(),degree:typeof v.degree=="number"?v.degree:0,isFocus:!!v.isFocus,projectRole:v.projectRole==="focus"?"focus":"member"})):[],edges:Array.isArray(h==null?void 0:h.edges)?h.edges.map(v=>({id:v.id,source:v.source,target:v.target,relationType:v.relationType??v.relation_type??"related_to",relationSource:v.relationSource==="inferred"?"inferred":"canonical",status:v.status??"active",score:typeof v.score=="number"?v.score:null,generator:typeof v.generator=="string"?v.generator:null,createdAt:v.createdAt??v.created_at??new Date().toISOString(),evidence:v.evidence??{}})):[],timeline:Array.isArray(h==null?void 0:h.timeline)?h.timeline.map(v=>({id:v.id,kind:v.kind??"activity",at:v.at??new Date().toISOString(),nodeId:typeof v.nodeId=="string"?v.nodeId:void 0,edgeId:typeof v.edgeId=="string"?v.edgeId:void 0,label:v.label??"Graph event"})):[],meta:{focusProjectId:((g=h==null?void 0:h.meta)==null?void 0:g.focusProjectId)??((f=h==null?void 0:h.meta)==null?void 0:f.focus_project_id)??"",nodeCount:typeof((z=h==null?void 0:h.meta)==null?void 0:z.nodeCount)=="number"?h.meta.nodeCount:0,edgeCount:typeof((q=h==null?void 0:h.meta)==null?void 0:q.edgeCount)=="number"?h.meta.edgeCount:0,inferredEdgeCount:typeof((C=h==null?void 0:h.meta)==null?void 0:C.inferredEdgeCount)=="number"?h.meta.inferredEdgeCount:0,timeRange:{start:((D=(G=h==null?void 0:h.meta)==null?void 0:G.timeRange)==null?void 0:D.start)??null,end:((Z=(N=h==null?void 0:h.meta)==null?void 0:N.timeRange)==null?void 0:Z.end)??null}}}}function pp(s,h){var N,Z;const g=s.nodes.find(v=>v.id===h&&v.type==="project");if(!g)throw new Error("Project not found in fallback workspace.");const f=s.relations.filter(v=>v.relationType==="relevant_to"&&v.status!=="archived"&&v.status!=="rejected"&&(v.fromNodeId===h||v.toNodeId===h)),z=new Set([h]);f.forEach(v=>{z.add(v.fromNodeId===h?v.toNodeId:v.fromNodeId)});const q=s.nodes.filter(v=>z.has(v.id)).map(v=>({id:v.id,title:v.title,type:v.type,status:v.status,canonicality:v.canonicality,summary:v.summary,createdAt:v.createdAt,updatedAt:v.updatedAt,degree:s.relations.filter(J=>z.has(J.fromNodeId)&&z.has(J.toNodeId)&&(J.fromNodeId===v.id||J.toNodeId===v.id)).length,isFocus:v.id===h,projectRole:v.id===h?"focus":"member"})),C=new Map(q.map(v=>[v.id,v.title])),G=s.relations.filter(v=>z.has(v.fromNodeId)&&z.has(v.toNodeId)&&v.status!=="archived"&&v.status!=="rejected").map(v=>({id:v.id,source:v.fromNodeId,target:v.toNodeId,relationType:v.relationType,relationSource:"canonical",status:v.status,score:null,generator:null,createdAt:v.createdAt,evidence:{}})),D=[...q.map(v=>({id:`timeline-node:${v.id}`,kind:"node_created",at:v.createdAt,nodeId:v.id,label:`${v.title} created`})),...G.map(v=>({id:`timeline-edge:${v.id}`,kind:"relation_created",at:v.createdAt,edgeId:v.id,nodeId:v.source,label:`${C.get(v.source)??v.source} ${v.relationType.replaceAll("_"," ")} ${C.get(v.target)??v.target}`})),...s.activities.filter(v=>z.has(v.targetNodeId)).map(v=>({id:`timeline-activity:${v.id}`,kind:"activity",at:v.createdAt,nodeId:v.targetNodeId,label:`${v.activityType.replaceAll("_"," ")} on ${C.get(v.targetNodeId)??v.targetNodeId}`}))].sort((v,J)=>v.at.localeCompare(J.at)||v.id.localeCompare(J.id));return{nodes:q,edges:G,timeline:D,meta:{focusProjectId:h,nodeCount:q.length,edgeCount:G.length,inferredEdgeCount:0,timeRange:{start:((N=D[0])==null?void 0:N.at)??g.createdAt,end:((Z=D[D.length-1])==null?void 0:Z.at)??g.createdAt}}}}async function rt(s,h){const g=_r();let f;try{f=await fetch(`${Ah}${s}`,{headers:{Accept:"application/json","Content-Type":"application/json",...g?{Authorization:`Bearer ${g}`}:{},...(h==null?void 0:h.headers)??{}},...h})}catch(z){throw new ri("network",0,z instanceof Error?z.message:"Network request failed.")}if(!f.ok)throw new ri("http",f.status,`Request failed: ${f.status}`);return f.json()}async function Kl(s,h){try{return await s()}catch(g){if(g instanceof ri&&g.kind==="network")return await h();throw g}}function _r(){const s=window.__RECALLX_API_TOKEN__;return s||Tr}function vp(s){Tr=s}function br(){Tr=null}function ph(s){return s instanceof ri&&s.status===401}function gp(){return`${Ah}/events`}function bp(){return _h(wl())}async function Sp(){return Kl(async()=>{const s=await rt("/workspace");return Yu(s)},async()=>wl().workspace)}async function jp(){return Kl(async()=>{const s=await rt("/workspaces");return Ar(s)},async()=>rp(wl().workspace))}async function xp(){return Kl(async()=>{const s=await rt("/bootstrap"),h=Ln(s),g=Yu(h.workspace??h);return{workspace:g,authMode:h.authMode==="bearer"?"bearer":g.authMode,hasToken:!!_r()}},async()=>({workspace:wl().workspace,authMode:"optional",hasToken:!1}))}async function Np(s){return Kl(async()=>{const h=await rt("/context/bundles",{method:"POST",body:JSON.stringify({target:{id:s},mode:"compact",preset:"for-assistant",options:{includeRelated:!0,includeInferred:!0,includeRecentActivities:!1,includeDecisions:!0,includeOpenQuestions:!0,maxInferred:4,maxItems:6}})});return tp(h).filter(g=>g&&typeof g.nodeId=="string"&&g.nodeId!==s).map(g=>({nodeId:g.nodeId,type:g.type,title:typeof g.title=="string"?g.title:null,summary:typeof g.summary=="string"?g.summary:null,reason:typeof g.reason=="string"?g.reason:"Included for context",relationId:typeof g.relationId=="string"?g.relationId:void 0,relationType:typeof g.relationType=="string"?g.relationType:void 0,relationSource:g.relationSource==="canonical"||g.relationSource==="inferred"?g.relationSource:void 0,relationScore:typeof g.relationScore=="number"?g.relationScore:void 0,retrievalRank:typeof g.retrievalRank=="number"?g.retrievalRank:void 0,generator:typeof g.generator=="string"?g.generator:null}))},async()=>[])}async function Tp(s){await rt("/relation-usage-events",{method:"POST",body:JSON.stringify({relationId:s.relationId,relationSource:s.relationSource,eventType:s.eventType,sessionId:s.sessionId,delta:s.delta,source:Nr,metadata:s.metadata??{}})})}async function Ap(s){const h=await rt("/workspaces",{method:"POST",body:JSON.stringify(s)});return Ar(h)}async function _p(s){const h=await rt("/workspaces/open",{method:"POST",body:JSON.stringify({rootPath:s})});return Ar(h)}async function Ep(){return Kl(async()=>{const[s,h,g]=await Promise.all([rt("/workspace"),rt("/nodes/search",{method:"POST",body:JSON.stringify({query:"",filters:{},limit:50,offset:0,sort:"updated_at"})}),rt("/integrations")]),f=oi(h,Yn),z=oi(g,hp),q=f.slice(0,5).map(G=>G.id),C=f.filter(G=>G.type==="project").slice(0,3).map(G=>G.id);return{workspace:Yu(s),nodes:f,relations:[],activities:[],artifacts:[],integrations:z,pinnedProjectIds:C,recentNodeIds:q}},async()=>bp())}async function zp(s){return Kl(async()=>{const h=await rt(`/nodes/${encodeURIComponent(s)}`),g=Ln(h);return{node:g!=null&&g.node?Yn(g.node):null,related:Array.isArray(g==null?void 0:g.related)?g.related.map(f=>Yn(f.node??f)):[],activities:Array.isArray(g==null?void 0:g.activities)?g.activities.map(np):[],artifacts:Array.isArray(g==null?void 0:g.artifacts)?g.artifacts.map(sp):[],governance:ip(g==null?void 0:g.governance)}},async()=>{const h=wl().nodes.find(g=>g.id===s);return h?dp(h):void 0})}function vh(s,h){const g=new Map(s.nodes.map(f=>[f.id,f]));return s.relations.reduce((f,z)=>{if(z.fromNodeId!==h&&z.toNodeId!==h||z.status==="archived")return f;const q=z.fromNodeId===h?z.toNodeId:z.fromNodeId,C=g.get(q);return!C||C.status==="archived"||f.push({node:C,relation:z,direction:z.fromNodeId===h?"outgoing":"incoming",hop:1}),f},[])}async function Op(s,h){return Kl(async()=>{const g=await rt(`/nodes/${encodeURIComponent(s)}/neighborhood?include_inferred=1&max_inferred=4&depth=${h}`);return oi(g,f=>mp(s,f))},async()=>{const g=wl(),f=vh(g,s);if(h===1)return f;const z=f.map(G=>vh(g,G.node.id).filter(D=>D.node.id!==s).map(D=>({...D,hop:2,viaNodeId:G.node.id,viaNodeTitle:G.node.title}))),q=[...f],C=new Set(f.map(G=>`${G.relation.id}:${G.node.id}:1`));return z.flat().forEach(G=>{const D=`${G.relation.id}:${G.node.id}:${G.viaNodeId??"direct"}`;C.has(D)||(C.add(D),q.push(G))}),q})}async function Mp(s){return Kl(async()=>{const h=await rt(`/projects/${encodeURIComponent(s)}/graph?include_inferred=1&max_inferred=60`);return yp(h)},async()=>pp(wl(),s))}async function Cp(){return Kl(async()=>{const s=await rt("/governance/issues?limit=20");return oi(s,up)},async()=>wl().nodes.filter(s=>s.status==="contested"||s.canonicality==="suggested").map(s=>({entityType:"node",entityId:s.id,state:s.status==="contested"?"contested":"low_confidence",confidence:s.status==="contested"?.2:.55,reasons:s.status==="contested"?["fallback contested node"]:["fallback suggested node"],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{},title:s.title,subtitle:s.type})))}function Dp(s){if(typeof window>"u"||typeof window.fetch>"u")return()=>{};const h=new AbortController;let g=null;async function f(){var z;try{const q=_r(),C=await fetch(gp(),{headers:q?{Authorization:`Bearer ${q}`}:void 0,signal:h.signal});if(!C.ok||!C.body)throw new Error(`Workspace event stream failed (${C.status})`);const G=C.body.getReader(),D=new TextDecoder;let N="";for(;!h.signal.aborted;){const{done:Z,value:v}=await G.read();if(Z)break;N+=D.decode(v,{stream:!0});let J=gh(N);for(;J>=0;){const Ce=N.slice(0,J);N=N.slice(Up(N,J)),Rp(Ce,s.onWorkspaceUpdate),J=gh(N)}}}catch{if(h.signal.aborted)return;(z=s.onError)==null||z.call(s)}h.signal.aborted||(g=window.setTimeout(()=>{g=null,f()},1e3))}return f(),()=>{h.abort(),g!==null&&window.clearTimeout(g)}}function gh(s){const h=s.indexOf(`
|
|
52
52
|
|
|
53
53
|
`),g=s.indexOf(`\r
|
|
54
54
|
\r
|
|
55
55
|
`);return h<0?g:g<0?h:Math.min(h,g)}function Up(s,h){return s.startsWith(`\r
|
|
56
56
|
\r
|
|
57
57
|
`,h)?h+4:h+2}function Rp(s,h){const g=s.split(/\r?\n/);let f="message";const z=[];for(const q of g){if(q.startsWith("event:")){f=q.slice(6).trim();continue}q.startsWith("data:")&&z.push(q.slice(5).trimStart())}if(!(f!=="workspace.updated"||z.length===0))try{h==null||h(JSON.parse(z.join(`
|
|
58
|
-
`)))}catch{}}async function Hp(s){var g,f;const h=await rt("/nodes",{method:"POST",body:JSON.stringify({type:s.type,title:s.title,body:s.body,tags:s.tags??[],source:Nr,metadata:{createdFrom:"renderer-quick-capture"}})});return{node:Yn((g=h==null?void 0:h.data)==null?void 0:g.node),landing:((f=h==null?void 0:h.data)==null?void 0:f.landing)??null}}async function Bp(s){var g;const h=await rt(`/nodes/${encodeURIComponent(s)}/refresh-summary`,{method:"POST",body:JSON.stringify({source:Nr})});return Yn((g=h==null?void 0:h.data)==null?void 0:g.node)}function bh(s){return s?Array.from(new Set(s.edges.map(h=>h.relationType))).sort((h,g)=>h.localeCompare(g)):[]}function qp(s,h){if(!s)return{nodes:[],edges:[]};const g=new Set(h.relationTypes),f=s.edges.filter(C=>!(!g.has(C.relationType)||C.relationSource==="canonical"&&!h.sources.canonical||C.relationSource==="inferred"&&!h.sources.inferred)),z=new Set(s.nodes.filter(C=>C.isFocus).map(C=>C.id));for(const C of f)z.add(C.source),z.add(C.target);return{nodes:s.nodes.filter(C=>z.has(C.id)),edges:f}}function Gp(s,h,g){if(!s)return{emphasizedNodeIds:[],emphasizedEdgeIds:[],activeAt:null};const f=h.nodes,z=h.edges,q=s.timeline[Math.min(Math.max(g,0),Math.max(s.timeline.length-1,0))],C=(q==null?void 0:q.at)??null,G=C?f.filter(N=>N.createdAt<=C).map(N=>N.id):f.map(N=>N.id),D=C?z.filter(N=>N.createdAt<=C).map(N=>N.id):z.map(N=>N.id);return{emphasizedNodeIds:G,emphasizedEdgeIds:D,activeAt:C}}function Wp(s){if(s.relationSource==="inferred")return"#7c8aa5";switch(s.relationType){case"supports":return"#0f766e";case"depends_on":return"#9a3412";case"contradicts":return"#b91c1c";case"elaborates":return"#1d4ed8";case"derived_from":return"#6d28d9";case"produced_by":return"#92400e";case"relevant_to":return"#2563eb";default:return"#475569"}}const Yp=15e3,Lp=[{id:"home",label:"Home",hint:"landing"},{id:"search",label:"Guide",hint:"api + mcp"},{id:"recent",label:"Notes",hint:"reading"},{id:"settings",label:"Workspace",hint:"scope"}],Xp=[{id:"graph",label:"Graph"},{id:"project-map",label:"Project map",graphMode:"project-map"},{id:"governance",label:"Governance"}];function Qp(s){if(s.startsWith("["))return`http://${s}/api/v1`;if((s.match(/:/g)??[]).length>1){const g=s.lastIndexOf(":"),f=s.slice(0,g),z=s.slice(g+1);if(f&&/^\d+$/.test(z))return`http://[${f}]:${z}/api/v1`}return`http://${s}/api/v1`}const Zp=B.lazy(async()=>({default:(await Ky(()=>import("./ProjectGraphCanvas-DACOH-d3.js"),[],import.meta.url)).ProjectGraphCanvas}));function Gu(s){return s==="active"||s==="approved"?"tone-good":s==="contested"||s==="pending"?"tone-warn":s==="draft"||s==="suggested"?"tone-info":"tone-muted"}function Sr(s){switch(s){case"supports":return"relation-chip--supports";case"depends_on":return"relation-chip--depends";case"contradicts":return"relation-chip--contradicts";case"elaborates":return"relation-chip--elaborates";case"derived_from":return"relation-chip--derived";case"produced_by":return"relation-chip--produced";case"relevant_to":return"relation-chip--relevant";default:return"relation-chip--related"}}function ci(s){return s.replaceAll("_"," ")}function ii(s){return new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(s))}function Sh(s){switch(s){case"contested":return 0;case"low_confidence":return 1;default:return 2}}function jh(s){return`${(s*100).toFixed(0)}%`}function xh(s){switch(s){case"contested":return"Contradiction or repeated negative signals are suppressing trust right now.";case"low_confidence":return"Local evidence exists, but the entity still needs stronger repeated confirmation.";default:return"Signals are currently stable and no contest path is active."}}function Vp(s){return s.entityType==="node"?"Inspect node":"Relation issue"}function wp(s){switch(s){case"search":return"Guide";case"projects":return"Guide";case"recent":return"Notes";case"settings":return"Workspace";case"governance":return"Governance";case"graph":return"Graph";default:return"Home"}}function Kp(){if(typeof window>"u")return"home";switch(new URLSearchParams(window.location.search).get("view")){case"search":case"guide":return"search";case"graph":return"graph";case"governance":return"governance";case"recent":return"recent";case"settings":return"settings";default:return"home"}}function Jp(){return window.__RECALLX_DESKTOP_INFO__??null}function Nh(){return window.__RECALLX_DESKTOP_ACTIONS__??null}function si(){return{node:null,related:[],bundleItems:[],activities:[],artifacts:[],governance:{state:null,events:[]}}}function kp(){var ua,Wn,ca,Zt;const[s,h]=B.useState(null),[g,f]=B.useState([]),[z,q]=B.useState(null),[C,G]=B.useState(Kp),[D,N]=B.useState("node_recallx"),[Z,v]=B.useState(""),J=B.useDeferredValue(Z),[Ce,xe]=B.useState(!0),[Te,Ae]=B.useState(null),[lt,ot]=B.useState(!1),[Ke,ft]=B.useState(""),[_t,Re]=B.useState(null),[I,Je]=B.useState(null),[Et,il]=B.useState("note"),[mt,$e]=B.useState(""),[sl,zt]=B.useState(""),[yt,A]=B.useState(null),[U,V]=B.useState(null),[he,ye]=B.useState(!1),[y,O]=B.useState(""),[R,Y]=B.useState(""),[k,$]=B.useState(null),[se,Le]=B.useState(!1),[Oe,It]=B.useState(!1),[Ia,Xn]=B.useState("overview"),Pa=B.useRef(new Set),bl=B.useRef(((Wn=(ua=globalThis.crypto)==null?void 0:ua.randomUUID)==null?void 0:Wn.call(ua))??`recallx-renderer-${Date.now()}`);async function Jl(){const o=await Ep();return q(o),Ae(null),o}async function kl(o){var ae;const[T,H,K]=await Promise.all([o!=null&&o.workspaceOverride?Promise.resolve(o.workspaceOverride):Sp(),Jl(),o!=null&&o.catalogOverride?Promise.resolve(o.catalogOverride):jp()]);return h(((ae=o==null?void 0:o.catalogOverride)==null?void 0:ae.current)??T),f(K.items),O(K.current.rootPath),Ae(null),H}function rl(o,T){if(ph(o)){br(),ot(!0),Re("Enter the RecallX API token to continue."),Ae(null);return}Ae(o instanceof Error?o.message:T)}B.useEffect(()=>{let o=!0;async function T(){try{const H=await xp();if(!o)return;if(h(H.workspace),H.authMode==="bearer"&&!H.hasToken){ot(!0),Re(null),Ae(null);return}if(await kl({workspaceOverride:H.workspace}),!o)return;ot(!1),Re(null),Je(null)}catch(H){if(!o)return;rl(H,"Failed to load workspace.")}finally{o&&xe(!1)}}return T(),()=>{o=!1}},[]),B.useEffect(()=>{const o=Nh();if(!o)return;const T=K=>{window.setTimeout(()=>{const ae=document.querySelector(K);ae==null||ae.focus()},60)},H=o.onAction(K=>{if(K.type==="open-search"){G("recent"),T("#notes-search-input");return}if(K.type==="open-settings"){G("settings"),T("#workspace-settings-card");return}if(K.type==="open-server-status"){G("settings"),T("#server-status-card");return}if(K.type==="open-workspace-status"){G("settings"),T("#workspace-status-card");return}K.type==="quick-capture"&&(G("recent"),il("note"),$e(""),zt(""),A(null),T("#capture-title-input"))})??void 0;return()=>{H==null||H()}},[]),B.useEffect(()=>{const o=Nh();if(!o)return;const T=o;let H=!1;async function K(){try{const ae=await T.getRuntimeState();H||Zn(ae)}catch{H||Zn(null)}}return K(),()=>{H=!0}},[C]),B.useEffect(()=>{if(Ce||lt||C!=="recent")return;let o=!1,T=!1,H=!1;async function K(){if(!(o||document.hidden)){if(T){H=!0;return}T=!0;try{await Jl(),Ae(null)}catch(Ct){o||rl(Ct,"Failed to refresh recent activity.")}finally{T=!1,H&&!o&&(H=!1,K())}}}function ae(){document.hidden||K()}const qe=Dp({onWorkspaceUpdate:()=>{K()},onError:()=>{document.hidden||K()}}),al=(s==null?void 0:s.authMode)==="bearer"?window.setInterval(()=>{document.hidden||K()},Yp):null;return K(),window.addEventListener("focus",ae),document.addEventListener("visibilitychange",ae),()=>{o=!0,qe(),al!==null&&window.clearInterval(al),window.removeEventListener("focus",ae),document.removeEventListener("visibilitychange",ae)}},[lt,Ce,C,s==null?void 0:s.authMode]);const Sl=B.useMemo(()=>{const o=new Map;return z==null||z.nodes.forEach(T=>o.set(T.id,T)),o},[z]);B.useEffect(()=>{var o;z!=null&&z.nodes.length&&(!D||Sl.has(D)||N(((o=z.nodes[0])==null?void 0:o.id)??""))},[Sl,D,z]);const Oa=B.useMemo(()=>((z==null?void 0:z.nodes)??[]).slice().sort((o,T)=>(o.title||"").localeCompare(T.title||"")||o.updatedAt.localeCompare(T.updatedAt)),[z]),ol=B.useMemo(()=>Oa.filter(o=>o.type==="project"),[Oa]),pe=D?Sl.get(D)??null:null,$l=(pe==null?void 0:pe.id)??null,[We,Fe]=B.useState(si),Ma=((ca=We.node)==null?void 0:ca.id)===(pe==null?void 0:pe.id)?We.node:pe,[He,Wl]=B.useState("neighborhood"),[fl,Lu]=B.useState(1),[Fl,Qn]=B.useState([]),[Pt,Yt]=B.useState(null),[te,Lt]=B.useState(null),[Ie,Xu]=B.useState({canonical:!0,inferred:!0}),[Qu,Zu]=B.useState([]),[jl,xl]=B.useState(0),[Nl,Xt]=B.useState(!1),[Ca,dl]=B.useState(null),[Da,Ua]=B.useState(!1),[en,Il]=B.useState(!1),[le,Zn]=B.useState(null),F=Jp();B.useEffect(()=>{var o;if(!ol.length){Yt(null);return}if((pe==null?void 0:pe.type)==="project"){Yt(pe.id);return}(!Pt||!ol.some(T=>T.id===Pt))&&Yt(((o=ol[0])==null?void 0:o.id)??null)},[Pt,ol,pe]),B.useEffect(()=>{let o=!0;const T=pe;if(C!=="graph"||!T||!$l)return;const H=$l;Fe({...si(),node:T});async function K(){var ae;try{const[qe,al]=await Promise.all([zp(H),Np(H)]);if(!o)return;const Ct=qe??{...si(),node:T};Fe({node:((ae=Ct.node)==null?void 0:ae.id)===H?Ct.node:T,related:Ct.related,bundleItems:al,activities:Ct.activities,artifacts:Ct.artifacts,governance:Ct.governance}),Ae(null)}catch(qe){if(!o)return;rl(qe,"Failed to load node detail.")}}return K(),()=>{o=!1}},[$l]),B.useEffect(()=>{let o=!0;if(C!=="graph"||He!=="neighborhood"||!pe||!$l)return;const H=$l;async function K(){Ua(!0);try{const ae=await Op(H,fl);if(!o)return;Qn(ae),dl(null)}catch(ae){if(!o)return;Qn([]),dl(ae instanceof Error?ae.message:"Failed to load graph neighborhood.")}finally{o&&Ua(!1)}}return K(),()=>{o=!1}},[He,fl,$l,C]),B.useEffect(()=>{let o=!0;if(C!=="graph"||He!=="project-map"||!Pt)return;const T=Pt;async function H(){Ua(!0);try{const K=await Mp(T);if(!o)return;Lt(K);const ae=bh(K);Zu(qe=>qe.length?qe.filter(al=>ae.includes(al)):ae),xl(Math.max(K.timeline.length-1,0)),Qn([]),dl(null)}catch(K){if(!o)return;Lt(null),dl(K instanceof Error?K.message:"Failed to load project graph.")}finally{o&&Ua(!1)}}return H(),()=>{o=!1}},[He,Pt,C]);const[pt,Vn]=B.useState([]),Ra=B.useMemo(()=>((z==null?void 0:z.nodes)??[]).map(o=>({node:o,searchText:[o.title,o.summary,o.body,o.tags.join(" ")].join(" ").toLowerCase()})).sort((o,T)=>T.node.updatedAt.localeCompare(o.node.updatedAt)||o.node.title.localeCompare(T.node.title)),[z]),Pl=B.useMemo(()=>{const o=J.trim().toLowerCase();return o?Ra.filter(T=>T.searchText.includes(o)).map(T=>T.node):Ra.map(T=>T.node)},[J,Ra]),hl=B.useMemo(()=>Pl.find(o=>o.id===D)??null,[Pl,D]),at=Oe?((Zt=We.node)==null?void 0:Zt.id)===(hl==null?void 0:hl.id)?We.node:hl:null;B.useEffect(()=>{if(C!=="governance")return;let o=!0;async function T(){try{const H=await Cp();if(!o)return;Vn(H.slice().sort((K,ae)=>{const qe=Sh(K.state)-Sh(ae.state);return qe!==0?qe:K.confidence-ae.confidence||ae.lastTransitionAt.localeCompare(K.lastTransitionAt)})),Ae(null)}catch(H){if(!o)return;rl(H,"Failed to refresh workspace lists.")}}return T(),()=>{o=!1}},[C]),B.useEffect(()=>{var o;if(!pt.length){I!==null&&Je(null);return}(!I||!pt.some(T=>T.entityId===I))&&Je(((o=pt[0])==null?void 0:o.entityId)??null)},[pt,I]);const oe=pt.find(o=>o.entityId===I)??pt[0],Pe=(s==null?void 0:s.name)??"RecallX",vt=(F==null?void 0:F.apiBase)??Qp((s==null?void 0:s.apiBind)??"127.0.0.1:8787"),ml=(s==null?void 0:s.rootPath)??(F==null?void 0:F.workspaceRoot)??"",Vu=(F==null?void 0:F.workspaceDbPath)??(ml?`${ml}/workspace.db`:""),wu=(F==null?void 0:F.artifactsPath)??(ml?`${ml}/artifacts`:""),tn=(F==null?void 0:F.mcpLauncherPath)??"",Ha=`node dist/server/app/mcp/index.js --api ${vt}`,ln=(F==null?void 0:F.mcpCommand)??Ha,ea=(le==null?void 0:le.serviceStatus)??(F?"running":"stopped"),Tl=(le==null?void 0:le.lastHealthAt)??null,ta=(le==null?void 0:le.lastError)??null,Al=(le==null?void 0:le.workspaceHome)??(F==null?void 0:F.workspaceHome)??"",Xe=(le==null?void 0:le.commandShimPath)??(F==null?void 0:F.commandShimPath)??"",Ku=(le==null?void 0:le.mcpLauncherPath)??tn,Ju=(le==null?void 0:le.mcpCommand)??ln,_l=(le==null?void 0:le.appVersion)??(F==null?void 0:F.appVersion)??"",la=(le==null?void 0:le.launchAtLoginEnabled)??!1,fi=(le==null?void 0:le.keepRunningInBackground)??!!(F!=null&&F.isPackaged),ku=(le==null?void 0:le.isPackaged)??!!(F!=null&&F.isPackaged),$u=tn?`{
|
|
58
|
+
`)))}catch{}}async function Hp(s){var g,f;const h=await rt("/nodes",{method:"POST",body:JSON.stringify({type:s.type,title:s.title,body:s.body,tags:s.tags??[],source:Nr,metadata:{createdFrom:"renderer-quick-capture"}})});return{node:Yn((g=h==null?void 0:h.data)==null?void 0:g.node),landing:((f=h==null?void 0:h.data)==null?void 0:f.landing)??null}}async function Bp(s){var g;const h=await rt(`/nodes/${encodeURIComponent(s)}/refresh-summary`,{method:"POST",body:JSON.stringify({source:Nr})});return Yn((g=h==null?void 0:h.data)==null?void 0:g.node)}function bh(s){return s?Array.from(new Set(s.edges.map(h=>h.relationType))).sort((h,g)=>h.localeCompare(g)):[]}function qp(s,h){if(!s)return{nodes:[],edges:[]};const g=new Set(h.relationTypes),f=s.edges.filter(C=>!(!g.has(C.relationType)||C.relationSource==="canonical"&&!h.sources.canonical||C.relationSource==="inferred"&&!h.sources.inferred)),z=new Set(s.nodes.filter(C=>C.isFocus).map(C=>C.id));for(const C of f)z.add(C.source),z.add(C.target);return{nodes:s.nodes.filter(C=>z.has(C.id)),edges:f}}function Gp(s,h,g){if(!s)return{emphasizedNodeIds:[],emphasizedEdgeIds:[],activeAt:null};const f=h.nodes,z=h.edges,q=s.timeline[Math.min(Math.max(g,0),Math.max(s.timeline.length-1,0))],C=(q==null?void 0:q.at)??null,G=C?f.filter(N=>N.createdAt<=C).map(N=>N.id):f.map(N=>N.id),D=C?z.filter(N=>N.createdAt<=C).map(N=>N.id):z.map(N=>N.id);return{emphasizedNodeIds:G,emphasizedEdgeIds:D,activeAt:C}}function Wp(s){if(s.relationSource==="inferred")return"#7c8aa5";switch(s.relationType){case"supports":return"#0f766e";case"depends_on":return"#9a3412";case"contradicts":return"#b91c1c";case"elaborates":return"#1d4ed8";case"derived_from":return"#6d28d9";case"produced_by":return"#92400e";case"relevant_to":return"#2563eb";default:return"#475569"}}const Yp=15e3,Lp=[{id:"home",label:"Home",hint:"landing"},{id:"search",label:"Guide",hint:"api + mcp"},{id:"recent",label:"Notes",hint:"reading"},{id:"settings",label:"Workspace",hint:"scope"}],Xp=[{id:"graph",label:"Graph"},{id:"project-map",label:"Project map",graphMode:"project-map"},{id:"governance",label:"Governance"}];function Qp(s){if(s.startsWith("["))return`http://${s}/api/v1`;if((s.match(/:/g)??[]).length>1){const g=s.lastIndexOf(":"),f=s.slice(0,g),z=s.slice(g+1);if(f&&/^\d+$/.test(z))return`http://[${f}]:${z}/api/v1`}return`http://${s}/api/v1`}const Zp=B.lazy(async()=>({default:(await Ky(()=>import("./ProjectGraphCanvas-BVlOgk7l.js"),[],import.meta.url)).ProjectGraphCanvas}));function Gu(s){return s==="active"||s==="approved"?"tone-good":s==="contested"||s==="pending"?"tone-warn":s==="draft"||s==="suggested"?"tone-info":"tone-muted"}function Sr(s){switch(s){case"supports":return"relation-chip--supports";case"depends_on":return"relation-chip--depends";case"contradicts":return"relation-chip--contradicts";case"elaborates":return"relation-chip--elaborates";case"derived_from":return"relation-chip--derived";case"produced_by":return"relation-chip--produced";case"relevant_to":return"relation-chip--relevant";default:return"relation-chip--related"}}function ci(s){return s.replaceAll("_"," ")}function ii(s){return new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(s))}function Sh(s){switch(s){case"contested":return 0;case"low_confidence":return 1;default:return 2}}function jh(s){return`${(s*100).toFixed(0)}%`}function xh(s){switch(s){case"contested":return"Contradiction or repeated negative signals are suppressing trust right now.";case"low_confidence":return"Local evidence exists, but the entity still needs stronger repeated confirmation.";default:return"Signals are currently stable and no contest path is active."}}function Vp(s){return s.entityType==="node"?"Inspect node":"Relation issue"}function wp(s){switch(s){case"search":return"Guide";case"projects":return"Guide";case"recent":return"Notes";case"settings":return"Workspace";case"governance":return"Governance";case"graph":return"Graph";default:return"Home"}}function Kp(){if(typeof window>"u")return"home";switch(new URLSearchParams(window.location.search).get("view")){case"search":case"guide":return"search";case"graph":return"graph";case"governance":return"governance";case"recent":return"recent";case"settings":return"settings";default:return"home"}}function Jp(){return window.__RECALLX_DESKTOP_INFO__??null}function Nh(){return window.__RECALLX_DESKTOP_ACTIONS__??null}function si(){return{node:null,related:[],bundleItems:[],activities:[],artifacts:[],governance:{state:null,events:[]}}}function kp(){var ua,Wn,ca,Zt;const[s,h]=B.useState(null),[g,f]=B.useState([]),[z,q]=B.useState(null),[C,G]=B.useState(Kp),[D,N]=B.useState("node_recallx"),[Z,v]=B.useState(""),J=B.useDeferredValue(Z),[Ce,xe]=B.useState(!0),[Te,Ae]=B.useState(null),[lt,ot]=B.useState(!1),[Ke,ft]=B.useState(""),[_t,Re]=B.useState(null),[I,Je]=B.useState(null),[Et,il]=B.useState("note"),[mt,$e]=B.useState(""),[sl,zt]=B.useState(""),[yt,A]=B.useState(null),[U,V]=B.useState(null),[he,ye]=B.useState(!1),[y,O]=B.useState(""),[R,Y]=B.useState(""),[k,$]=B.useState(null),[se,Le]=B.useState(!1),[Oe,It]=B.useState(!1),[Ia,Xn]=B.useState("overview"),Pa=B.useRef(new Set),bl=B.useRef(((Wn=(ua=globalThis.crypto)==null?void 0:ua.randomUUID)==null?void 0:Wn.call(ua))??`recallx-renderer-${Date.now()}`);async function Jl(){const o=await Ep();return q(o),Ae(null),o}async function kl(o){var ae;const[T,H,K]=await Promise.all([o!=null&&o.workspaceOverride?Promise.resolve(o.workspaceOverride):Sp(),Jl(),o!=null&&o.catalogOverride?Promise.resolve(o.catalogOverride):jp()]);return h(((ae=o==null?void 0:o.catalogOverride)==null?void 0:ae.current)??T),f(K.items),O(K.current.rootPath),Ae(null),H}function rl(o,T){if(ph(o)){br(),ot(!0),Re("Enter the RecallX API token to continue."),Ae(null);return}Ae(o instanceof Error?o.message:T)}B.useEffect(()=>{let o=!0;async function T(){try{const H=await xp();if(!o)return;if(h(H.workspace),H.authMode==="bearer"&&!H.hasToken){ot(!0),Re(null),Ae(null);return}if(await kl({workspaceOverride:H.workspace}),!o)return;ot(!1),Re(null),Je(null)}catch(H){if(!o)return;rl(H,"Failed to load workspace.")}finally{o&&xe(!1)}}return T(),()=>{o=!1}},[]),B.useEffect(()=>{const o=Nh();if(!o)return;const T=K=>{window.setTimeout(()=>{const ae=document.querySelector(K);ae==null||ae.focus()},60)},H=o.onAction(K=>{if(K.type==="open-search"){G("recent"),T("#notes-search-input");return}if(K.type==="open-settings"){G("settings"),T("#workspace-settings-card");return}if(K.type==="open-server-status"){G("settings"),T("#server-status-card");return}if(K.type==="open-workspace-status"){G("settings"),T("#workspace-status-card");return}K.type==="quick-capture"&&(G("recent"),il("note"),$e(""),zt(""),A(null),T("#capture-title-input"))})??void 0;return()=>{H==null||H()}},[]),B.useEffect(()=>{const o=Nh();if(!o)return;const T=o;let H=!1;async function K(){try{const ae=await T.getRuntimeState();H||Zn(ae)}catch{H||Zn(null)}}return K(),()=>{H=!0}},[C]),B.useEffect(()=>{if(Ce||lt||C!=="recent")return;let o=!1,T=!1,H=!1;async function K(){if(!(o||document.hidden)){if(T){H=!0;return}T=!0;try{await Jl(),Ae(null)}catch(Ct){o||rl(Ct,"Failed to refresh recent activity.")}finally{T=!1,H&&!o&&(H=!1,K())}}}function ae(){document.hidden||K()}const qe=Dp({onWorkspaceUpdate:()=>{K()},onError:()=>{document.hidden||K()}}),al=(s==null?void 0:s.authMode)==="bearer"?window.setInterval(()=>{document.hidden||K()},Yp):null;return K(),window.addEventListener("focus",ae),document.addEventListener("visibilitychange",ae),()=>{o=!0,qe(),al!==null&&window.clearInterval(al),window.removeEventListener("focus",ae),document.removeEventListener("visibilitychange",ae)}},[lt,Ce,C,s==null?void 0:s.authMode]);const Sl=B.useMemo(()=>{const o=new Map;return z==null||z.nodes.forEach(T=>o.set(T.id,T)),o},[z]);B.useEffect(()=>{var o;z!=null&&z.nodes.length&&(!D||Sl.has(D)||N(((o=z.nodes[0])==null?void 0:o.id)??""))},[Sl,D,z]);const Oa=B.useMemo(()=>((z==null?void 0:z.nodes)??[]).slice().sort((o,T)=>(o.title||"").localeCompare(T.title||"")||o.updatedAt.localeCompare(T.updatedAt)),[z]),ol=B.useMemo(()=>Oa.filter(o=>o.type==="project"),[Oa]),pe=D?Sl.get(D)??null:null,$l=(pe==null?void 0:pe.id)??null,[We,Fe]=B.useState(si),Ma=((ca=We.node)==null?void 0:ca.id)===(pe==null?void 0:pe.id)?We.node:pe,[He,Wl]=B.useState("neighborhood"),[fl,Lu]=B.useState(1),[Fl,Qn]=B.useState([]),[Pt,Yt]=B.useState(null),[te,Lt]=B.useState(null),[Ie,Xu]=B.useState({canonical:!0,inferred:!0}),[Qu,Zu]=B.useState([]),[jl,xl]=B.useState(0),[Nl,Xt]=B.useState(!1),[Ca,dl]=B.useState(null),[Da,Ua]=B.useState(!1),[en,Il]=B.useState(!1),[le,Zn]=B.useState(null),F=Jp();B.useEffect(()=>{var o;if(!ol.length){Yt(null);return}if((pe==null?void 0:pe.type)==="project"){Yt(pe.id);return}(!Pt||!ol.some(T=>T.id===Pt))&&Yt(((o=ol[0])==null?void 0:o.id)??null)},[Pt,ol,pe]),B.useEffect(()=>{let o=!0;const T=pe;if(C!=="graph"||!T||!$l)return;const H=$l;Fe({...si(),node:T});async function K(){var ae;try{const[qe,al]=await Promise.all([zp(H),Np(H)]);if(!o)return;const Ct=qe??{...si(),node:T};Fe({node:((ae=Ct.node)==null?void 0:ae.id)===H?Ct.node:T,related:Ct.related,bundleItems:al,activities:Ct.activities,artifacts:Ct.artifacts,governance:Ct.governance}),Ae(null)}catch(qe){if(!o)return;rl(qe,"Failed to load node detail.")}}return K(),()=>{o=!1}},[$l]),B.useEffect(()=>{let o=!0;if(C!=="graph"||He!=="neighborhood"||!pe||!$l)return;const H=$l;async function K(){Ua(!0);try{const ae=await Op(H,fl);if(!o)return;Qn(ae),dl(null)}catch(ae){if(!o)return;Qn([]),dl(ae instanceof Error?ae.message:"Failed to load graph neighborhood.")}finally{o&&Ua(!1)}}return K(),()=>{o=!1}},[He,fl,$l,C]),B.useEffect(()=>{let o=!0;if(C!=="graph"||He!=="project-map"||!Pt)return;const T=Pt;async function H(){Ua(!0);try{const K=await Mp(T);if(!o)return;Lt(K);const ae=bh(K);Zu(qe=>qe.length?qe.filter(al=>ae.includes(al)):ae),xl(Math.max(K.timeline.length-1,0)),Qn([]),dl(null)}catch(K){if(!o)return;Lt(null),dl(K instanceof Error?K.message:"Failed to load project graph.")}finally{o&&Ua(!1)}}return H(),()=>{o=!1}},[He,Pt,C]);const[pt,Vn]=B.useState([]),Ra=B.useMemo(()=>((z==null?void 0:z.nodes)??[]).map(o=>({node:o,searchText:[o.title,o.summary,o.body,o.tags.join(" ")].join(" ").toLowerCase()})).sort((o,T)=>T.node.updatedAt.localeCompare(o.node.updatedAt)||o.node.title.localeCompare(T.node.title)),[z]),Pl=B.useMemo(()=>{const o=J.trim().toLowerCase();return o?Ra.filter(T=>T.searchText.includes(o)).map(T=>T.node):Ra.map(T=>T.node)},[J,Ra]),hl=B.useMemo(()=>Pl.find(o=>o.id===D)??null,[Pl,D]),at=Oe?((Zt=We.node)==null?void 0:Zt.id)===(hl==null?void 0:hl.id)?We.node:hl:null;B.useEffect(()=>{if(C!=="governance")return;let o=!0;async function T(){try{const H=await Cp();if(!o)return;Vn(H.slice().sort((K,ae)=>{const qe=Sh(K.state)-Sh(ae.state);return qe!==0?qe:K.confidence-ae.confidence||ae.lastTransitionAt.localeCompare(K.lastTransitionAt)})),Ae(null)}catch(H){if(!o)return;rl(H,"Failed to refresh workspace lists.")}}return T(),()=>{o=!1}},[C]),B.useEffect(()=>{var o;if(!pt.length){I!==null&&Je(null);return}(!I||!pt.some(T=>T.entityId===I))&&Je(((o=pt[0])==null?void 0:o.entityId)??null)},[pt,I]);const oe=pt.find(o=>o.entityId===I)??pt[0],Pe=(s==null?void 0:s.name)??"RecallX",vt=(F==null?void 0:F.apiBase)??Qp((s==null?void 0:s.apiBind)??"127.0.0.1:8787"),ml=(s==null?void 0:s.rootPath)??(F==null?void 0:F.workspaceRoot)??"",Vu=(F==null?void 0:F.workspaceDbPath)??(ml?`${ml}/workspace.db`:""),wu=(F==null?void 0:F.artifactsPath)??(ml?`${ml}/artifacts`:""),tn=(F==null?void 0:F.mcpLauncherPath)??"",Ha=`node dist/server/app/mcp/index.js --api ${vt}`,ln=(F==null?void 0:F.mcpCommand)??Ha,ea=(le==null?void 0:le.serviceStatus)??(F?"running":"stopped"),Tl=(le==null?void 0:le.lastHealthAt)??null,ta=(le==null?void 0:le.lastError)??null,Al=(le==null?void 0:le.workspaceHome)??(F==null?void 0:F.workspaceHome)??"",Xe=(le==null?void 0:le.commandShimPath)??(F==null?void 0:F.commandShimPath)??"",Ku=(le==null?void 0:le.mcpLauncherPath)??tn,Ju=(le==null?void 0:le.mcpCommand)??ln,_l=(le==null?void 0:le.appVersion)??(F==null?void 0:F.appVersion)??"",la=(le==null?void 0:le.launchAtLoginEnabled)??!1,fi=(le==null?void 0:le.keepRunningInBackground)??!!(F!=null&&F.isPackaged),ku=(le==null?void 0:le.isPackaged)??!!(F!=null&&F.isPackaged),$u=tn?`{
|
|
59
59
|
"mcpServers": {
|
|
60
60
|
"recallx": {
|
|
61
61
|
"command": "${tn}",
|
package/dist/renderer/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>RecallX</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-JtUcLLhP.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-C2-KXqBO.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|