ocean-brain 0.2.1 → 0.3.0
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/dist/index.js +73 -41
- package/dist/mcp.js +587 -26
- package/package.json +6 -1
- package/scripts/postinstall-prisma.mjs +41 -0
- package/server/client/dist/assets/Calendar-DRv2aEl8.js +28 -0
- package/server/client/dist/assets/Callout-B2kPcDrq.js +1 -0
- package/server/client/dist/assets/Graph-DotbTrZR.js +1 -0
- package/server/client/dist/assets/Image-B5R7gF2P.js +1 -0
- package/server/client/dist/assets/Image.es-Dld9r9MJ.js +1 -0
- package/server/client/dist/assets/ModalActionRow-CES9L_Gy.js +1 -0
- package/server/client/dist/assets/Note-SK4hDhEM.css +1 -0
- package/server/client/dist/assets/Note-cIbXJc1v.js +1 -0
- package/server/client/dist/assets/Reminders-4LunlZRb.js +1 -0
- package/server/client/dist/assets/Search-Cp17DGR6.js +1 -0
- package/server/client/dist/assets/SurfaceCard-yzVU4Qkx.js +1 -0
- package/server/client/dist/assets/Tag-CwmuMPmo.js +1 -0
- package/server/client/dist/assets/TagNotes-gGroWMtT.js +1 -0
- package/server/client/dist/assets/Trash.es-B3KWD8_C.js +1 -0
- package/server/client/dist/assets/color-wpu7wT_s.js +1 -0
- package/server/client/dist/assets/graph-vendor-CUxe67Lr.js +46 -0
- package/server/client/dist/assets/image.api-DJgOBt8S.js +17 -0
- package/server/client/dist/assets/index-40Y2UsVr.js +205 -0
- package/server/client/dist/assets/index-BnxpTwtL.css +1 -0
- package/server/client/dist/assets/index-DYUg2N-6.js +1 -0
- package/server/client/dist/assets/manage-image-ByY1mRZx.js +1 -0
- package/server/client/dist/assets/manage-image-detail-BVaDZHRu.js +1 -0
- package/server/client/dist/assets/mcp-Jj3061aI.js +1 -0
- package/server/client/dist/assets/{note-core-DTIu0anW.js → note-core-BCgMq5QA.js} +7 -7
- package/server/client/dist/assets/note-vendor-BofYbzmZ.js +54 -0
- package/server/client/dist/assets/placeholder-4P_GK7fV.js +34 -0
- package/server/client/dist/assets/trash-CPBwY07S.js +1 -0
- package/server/client/dist/assets/useReminderMutate-1YVndM2T.js +82 -0
- package/server/client/dist/index.html +5 -4
- package/server/dist/app.js +97 -9
- package/server/dist/app.js.map +1 -1
- package/server/dist/main.js +16 -2
- package/server/dist/main.js.map +1 -1
- package/server/dist/modules/auth-guard.js +73 -0
- package/server/dist/modules/auth-guard.js.map +1 -0
- package/server/dist/modules/auth-mode.js +51 -0
- package/server/dist/modules/auth-mode.js.map +1 -0
- package/server/dist/modules/auth.js +9 -0
- package/server/dist/modules/auth.js.map +1 -1
- package/server/dist/modules/blocknote.js +7 -1
- package/server/dist/modules/blocknote.js.map +1 -1
- package/server/dist/modules/error-handler.js +41 -0
- package/server/dist/modules/error-handler.js.map +1 -0
- package/server/dist/modules/image-upload.js +114 -0
- package/server/dist/modules/image-upload.js.map +1 -0
- package/server/dist/modules/mcp-admin.js +88 -0
- package/server/dist/modules/mcp-admin.js.map +1 -0
- package/server/dist/modules/mcp-auth.js +71 -0
- package/server/dist/modules/mcp-auth.js.map +1 -0
- package/server/dist/modules/mcp-token.js +28 -0
- package/server/dist/modules/mcp-token.js.map +1 -0
- package/server/dist/modules/note-authoring.js +140 -0
- package/server/dist/modules/note-authoring.js.map +1 -0
- package/server/dist/modules/note-cleanup.js +207 -0
- package/server/dist/modules/note-cleanup.js.map +1 -0
- package/server/dist/modules/note-snapshot.js +223 -0
- package/server/dist/modules/note-snapshot.js.map +1 -0
- package/server/dist/modules/note-trash.js +262 -0
- package/server/dist/modules/note-trash.js.map +1 -0
- package/server/dist/modules/prisma-runtime.js +46 -0
- package/server/dist/modules/prisma-runtime.js.map +1 -0
- package/server/dist/modules/recovery-retention.js +26 -0
- package/server/dist/modules/recovery-retention.js.map +1 -0
- package/server/dist/modules/remote-image.js +176 -0
- package/server/dist/modules/remote-image.js.map +1 -0
- package/server/dist/modules/tag-organization.js +66 -0
- package/server/dist/modules/tag-organization.js.map +1 -0
- package/server/dist/modules/use-async.js +2 -4
- package/server/dist/modules/use-async.js.map +1 -1
- package/server/dist/schema/note/index.js +150 -6
- package/server/dist/schema/note/index.js.map +1 -1
- package/server/dist/start.js +11 -0
- package/server/dist/start.js.map +1 -0
- package/server/dist/types/index.js.map +1 -1
- package/server/dist/urls.js +3 -2
- package/server/dist/urls.js.map +1 -1
- package/server/dist/views/auth.js +305 -0
- package/server/dist/views/auth.js.map +1 -0
- package/server/dist/views/image.js +24 -81
- package/server/dist/views/image.js.map +1 -1
- package/server/dist/views/index.js +4 -0
- package/server/dist/views/index.js.map +1 -1
- package/server/dist/views/mcp-admin.js +42 -0
- package/server/dist/views/mcp-admin.js.map +1 -0
- package/server/dist/views/note.js +124 -0
- package/server/dist/views/note.js.map +1 -0
- package/server/dist/views/tag.js +23 -0
- package/server/dist/views/tag.js.map +1 -0
- package/server/prisma/migrations/20260331183000_0010_note_snapshot/migration.sql +13 -0
- package/server/prisma/migrations/20260331195000_0011_note_trash_entities/migration.sql +35 -0
- package/server/prisma/migrations/20260331213000_0012_image_hash_unique/migration.sql +49 -0
- package/server/prisma/migrations/20260404000000_0013_mcp_admin_control/migration.sql +9 -0
- package/server/prisma/schema.prisma +66 -1
- package/server/client/dist/assets/index-BJgBFWwL.css +0 -1
- package/server/client/dist/assets/index-DvNRv9YC.js +0 -391
- package/server/client/dist/assets/note-vendor-CUVHa9LU.js +0 -54
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function Ao(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(i,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Je={exports:{}},V={};var Kn;function Co(){if(Kn)return V;Kn=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),d=Symbol.iterator;function p(_){return _===null||typeof _!="object"?null:(_=d&&_[d]||_["@@iterator"],typeof _=="function"?_:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function g(_,M,U){this.props=_,this.context=M,this.refs=v,this.updater=U||y}g.prototype.isReactComponent={},g.prototype.setState=function(_,M){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,M,"setState")},g.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function A(){}A.prototype=g.prototype;function T(_,M,U){this.props=_,this.context=M,this.refs=v,this.updater=U||y}var b=T.prototype=new A;b.constructor=T,x(b,g.prototype),b.isPureReactComponent=!0;var w=Array.isArray;function S(){}var k={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function I(_,M,U){var j=U.ref;return{$$typeof:e,type:_,key:M,ref:j!==void 0?j:null,props:U}}function R(_,M){return I(_.type,M,_.props)}function z(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function $(_){var M={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(U){return M[U]})}var L=/\/+/g;function C(_,M){return typeof _=="object"&&_!==null&&_.key!=null?$(""+_.key):M.toString(36)}function N(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(S,S):(_.status="pending",_.then(function(M){_.status==="pending"&&(_.status="fulfilled",_.value=M)},function(M){_.status==="pending"&&(_.status="rejected",_.reason=M)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function P(_,M,U,j,W){var B=typeof _;(B==="undefined"||B==="boolean")&&(_=null);var Y=!1;if(_===null)Y=!0;else switch(B){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(_.$$typeof){case e:case n:Y=!0;break;case h:return Y=_._init,P(Y(_._payload),M,U,j,W)}}if(Y)return W=W(_),Y=j===""?"."+C(_,0):j,w(W)?(U="",Y!=null&&(U=Y.replace(L,"$&/")+"/"),P(W,M,U,"",function(ko){return ko})):W!=null&&(z(W)&&(W=R(W,U+(W.key==null||_&&_.key===W.key?"":(""+W.key).replace(L,"$&/")+"/")+Y)),M.push(W)),1;Y=0;var tt=j===""?".":j+":";if(w(_))for(var et=0;et<_.length;et++)j=_[et],B=tt+C(j,et),Y+=P(j,M,U,B,W);else if(et=p(_),typeof et=="function")for(_=et.call(_),et=0;!(j=_.next()).done;)j=j.value,B=tt+C(j,et++),Y+=P(j,M,U,B,W);else if(B==="object"){if(typeof _.then=="function")return P(N(_),M,U,j,W);throw M=String(_),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return Y}function D(_,M,U){if(_==null)return _;var j=[],W=0;return P(_,j,"","",function(B){return M.call(U,B,W++)}),j}function H(_){if(_._status===-1){var M=_._result;M=M(),M.then(function(U){(_._status===0||_._status===-1)&&(_._status=1,_._result=U)},function(U){(_._status===0||_._status===-1)&&(_._status=2,_._result=U)}),_._status===-1&&(_._status=0,_._result=M)}if(_._status===1)return _._result.default;throw _._result}var q=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},G={map:D,forEach:function(_,M,U){D(_,function(){M.apply(this,arguments)},U)},count:function(_){var M=0;return D(_,function(){M++}),M},toArray:function(_){return D(_,function(M){return M})||[]},only:function(_){if(!z(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return V.Activity=c,V.Children=G,V.Component=g,V.Fragment=r,V.Profiler=o,V.PureComponent=T,V.StrictMode=i,V.Suspense=f,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,V.__COMPILER_RUNTIME={__proto__:null,c:function(_){return k.H.useMemoCache(_)}},V.cache=function(_){return function(){return _.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(_,M,U){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var j=x({},_.props),W=_.key;if(M!=null)for(B in M.key!==void 0&&(W=""+M.key),M)!E.call(M,B)||B==="key"||B==="__self"||B==="__source"||B==="ref"&&M.ref===void 0||(j[B]=M[B]);var B=arguments.length-2;if(B===1)j.children=U;else if(1<B){for(var Y=Array(B),tt=0;tt<B;tt++)Y[tt]=arguments[tt+2];j.children=Y}return I(_.type,W,j)},V.createContext=function(_){return _={$$typeof:s,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:a,_context:_},_},V.createElement=function(_,M,U){var j,W={},B=null;if(M!=null)for(j in M.key!==void 0&&(B=""+M.key),M)E.call(M,j)&&j!=="key"&&j!=="__self"&&j!=="__source"&&(W[j]=M[j]);var Y=arguments.length-2;if(Y===1)W.children=U;else if(1<Y){for(var tt=Array(Y),et=0;et<Y;et++)tt[et]=arguments[et+2];W.children=tt}if(_&&_.defaultProps)for(j in Y=_.defaultProps,Y)W[j]===void 0&&(W[j]=Y[j]);return I(_,B,W)},V.createRef=function(){return{current:null}},V.forwardRef=function(_){return{$$typeof:u,render:_}},V.isValidElement=z,V.lazy=function(_){return{$$typeof:h,_payload:{_status:-1,_result:_},_init:H}},V.memo=function(_,M){return{$$typeof:l,type:_,compare:M===void 0?null:M}},V.startTransition=function(_){var M=k.T,U={};k.T=U;try{var j=_(),W=k.S;W!==null&&W(U,j),typeof j=="object"&&j!==null&&typeof j.then=="function"&&j.then(S,q)}catch(B){q(B)}finally{M!==null&&U.types!==null&&(M.types=U.types),k.T=M}},V.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},V.use=function(_){return k.H.use(_)},V.useActionState=function(_,M,U){return k.H.useActionState(_,M,U)},V.useCallback=function(_,M){return k.H.useCallback(_,M)},V.useContext=function(_){return k.H.useContext(_)},V.useDebugValue=function(){},V.useDeferredValue=function(_,M){return k.H.useDeferredValue(_,M)},V.useEffect=function(_,M){return k.H.useEffect(_,M)},V.useEffectEvent=function(_){return k.H.useEffectEvent(_)},V.useId=function(){return k.H.useId()},V.useImperativeHandle=function(_,M,U){return k.H.useImperativeHandle(_,M,U)},V.useInsertionEffect=function(_,M){return k.H.useInsertionEffect(_,M)},V.useLayoutEffect=function(_,M){return k.H.useLayoutEffect(_,M)},V.useMemo=function(_,M){return k.H.useMemo(_,M)},V.useOptimistic=function(_,M){return k.H.useOptimistic(_,M)},V.useReducer=function(_,M,U){return k.H.useReducer(_,M,U)},V.useRef=function(_){return k.H.useRef(_)},V.useState=function(_){return k.H.useState(_)},V.useSyncExternalStore=function(_,M,U){return k.H.useSyncExternalStore(_,M,U)},V.useTransition=function(){return k.H.useTransition()},V.version="19.2.4",V}var Qn;function So(){return Qn||(Qn=1,Je.exports=Co()),Je.exports}var at=So();const fi=ui(at),md=Ao({__proto__:null,default:fi},[at]);var tn={exports:{}},en,Jn;function To(){if(Jn)return en;Jn=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return en=e,en}var nn,tr;function Eo(){if(tr)return nn;tr=1;var e=To();function n(){}function r(){}return r.resetWarningCache=n,nn=function(){function i(s,u,f,l,h,c){if(c!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}i.isRequired=i;function o(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a},nn}var er;function Mo(){return er||(er=1,tn.exports=Eo()()),tn.exports}var Po=Mo();const m=ui(Po);function Oo(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Ro(e,n,r){return n=Fo(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function nr(e,n){return Io(e)||Oo(e,n)||li(e,n)||jo()}function zo(e){return No(e)||$o(e)||li(e)||Do()}function No(e){if(Array.isArray(e))return dn(e)}function Io(e){if(Array.isArray(e))return e}function $o(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function li(e,n){if(e){if(typeof e=="string")return dn(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dn(e,n)}}function dn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function Do(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Fo(e){var n=Uo(e,"string");return typeof n=="symbol"?n:String(n)}var Lo=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(zo(Object.entries(n).filter(function(o){var a=nr(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=nr(o,2),s=a[0],u=a[1];return Ro({},s,u)}))))};function pn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ho(e){if(Array.isArray(e))return e}function qo(e){if(Array.isArray(e))return pn(e)}function Go(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vo(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Wo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yo(e,n){return Ho(e)||Vo(e,n)||ci(e,n)||Wo()}function rr(e){return qo(e)||Go(e)||ci(e)||Bo()}function ci(e,n){if(e){if(typeof e=="string")return pn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pn(e,n):void 0}}function Xo(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,i=r===void 0?"div":r,o=n.nodeMapper,a=o===void 0?function(h){return h}:o,s=n.methodNames,u=s===void 0?[]:s,f=n.initPropNames,l=f===void 0?[]:f;return at.forwardRef(function(h,c){var d=at.useRef(),p=at.useMemo(function(){var v=Object.fromEntries(l.filter(function(g){return h.hasOwnProperty(g)}).map(function(g){return[g,h[g]]}));return e(v)},[]);ir(function(){p(a(d.current))},at.useLayoutEffect),ir(function(){return p._destructor instanceof Function?p._destructor:void 0});var y=at.useCallback(function(v){for(var g=arguments.length,A=new Array(g>1?g-1:0),T=1;T<g;T++)A[T-1]=arguments[T];return p[v]instanceof Function?p[v].apply(p,A):void 0},[p]),x=at.useRef({});return Object.keys(Lo(h,[].concat(rr(u),rr(l)))).filter(function(v){return x.current[v]!==h[v]}).forEach(function(v){return y(v,h[v])}),x.current=h,at.useImperativeHandle(c,function(){return Object.fromEntries(u.map(function(v){return[v,function(){for(var g=arguments.length,A=new Array(g),T=0;T<g;T++)A[T]=arguments[T];return y.apply(void 0,[v].concat(A))}]}))},[y]),fi.createElement(i,{ref:d})})}function ir(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:at.useEffect,r=at.useRef(),i=at.useRef(!1),o=at.useRef(!1),a=at.useState(0),s=Yo(a,2);s[0];var u=s[1];i.current&&(o.current=!0),n(function(){return i.current||(r.current=e(),i.current=!0),u(function(f){return f+1}),function(){o.current&&r.current&&r.current()}},[])}var gn="http://www.w3.org/1999/xhtml";const or={svg:"http://www.w3.org/2000/svg",xhtml:gn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),or.hasOwnProperty(n)?{space:or[n],local:e}:e}function Zo(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===gn&&n.documentElement.namespaceURI===gn?n.createElement(e):n.createElementNS(r,e)}}function Ko(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hi(e){var n=We(e);return(n.local?Ko:Zo)(n)}function Qo(){}function Nn(e){return e==null?Qo:function(){return this.querySelector(e)}}function Jo(e){typeof e!="function"&&(e=Nn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=new Array(s),f,l,h=0;h<s;++h)(f=a[h])&&(l=e.call(f,f.__data__,h,a))&&("__data__"in f&&(l.__data__=f.__data__),u[h]=l);return new lt(i,this._parents)}function ta(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ea(){return[]}function di(e){return e==null?ea:function(){return this.querySelectorAll(e)}}function na(e){return function(){return ta(e.apply(this,arguments))}}function ra(e){typeof e=="function"?e=na(e):e=di(e);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var s=n[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&(i.push(e.call(f,f.__data__,l,s)),o.push(f));return new lt(i,o)}function pi(e){return function(){return this.matches(e)}}function gi(e){return function(n){return n.matches(e)}}var ia=Array.prototype.find;function oa(e){return function(){return ia.call(this.children,e)}}function aa(){return this.firstElementChild}function sa(e){return this.select(e==null?aa:oa(typeof e=="function"?e:gi(e)))}var ua=Array.prototype.filter;function fa(){return Array.from(this.children)}function la(e){return function(){return ua.call(this.children,e)}}function ca(e){return this.selectAll(e==null?fa:la(typeof e=="function"?e:gi(e)))}function ha(e){typeof e!="function"&&(e=pi(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new lt(i,this._parents)}function yi(e){return new Array(e.length)}function da(){return new lt(this._enter||this._groups.map(yi),this._parents)}function Ne(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Ne.prototype={constructor:Ne,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function pa(e){return function(){return e}}function ga(e,n,r,i,o,a){for(var s=0,u,f=n.length,l=a.length;s<l;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new Ne(e,a[s]);for(;s<f;++s)(u=n[s])&&(o[s]=u)}function ya(e,n,r,i,o,a,s){var u,f,l=new Map,h=n.length,c=a.length,d=new Array(h),p;for(u=0;u<h;++u)(f=n[u])&&(d[u]=p=s.call(f,f.__data__,u,n)+"",l.has(p)?o[u]=f:l.set(p,f));for(u=0;u<c;++u)p=s.call(e,a[u],u,a)+"",(f=l.get(p))?(i[u]=f,f.__data__=a[u],l.delete(p)):r[u]=new Ne(e,a[u]);for(u=0;u<h;++u)(f=n[u])&&l.get(d[u])===f&&(o[u]=f)}function _a(e){return e.__data__}function va(e,n){if(!arguments.length)return Array.from(this,_a);var r=n?ya:ga,i=this._parents,o=this._groups;typeof e!="function"&&(e=pa(e));for(var a=o.length,s=new Array(a),u=new Array(a),f=new Array(a),l=0;l<a;++l){var h=i[l],c=o[l],d=c.length,p=ma(e.call(h,h&&h.__data__,l,i)),y=p.length,x=u[l]=new Array(y),v=s[l]=new Array(y),g=f[l]=new Array(d);r(h,c,x,v,g,p,n);for(var A=0,T=0,b,w;A<y;++A)if(b=x[A]){for(A>=T&&(T=A+1);!(w=v[T])&&++T<y;);b._next=w||null}}return s=new lt(s,i),s._enter=u,s._exit=f,s}function ma(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xa(){return new lt(this._exit||this._groups.map(yi),this._parents)}function ba(e,n,r){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?a.remove():r(a),i&&o?i.merge(o).order():o}function wa(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,s=Math.min(o,a),u=new Array(o),f=0;f<s;++f)for(var l=r[f],h=i[f],c=l.length,d=u[f]=new Array(c),p,y=0;y<c;++y)(p=l[y]||h[y])&&(d[y]=p);for(;f<o;++f)u[f]=r[f];return new lt(u,this._parents)}function ka(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i=e[n],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Aa(e){e||(e=Ca);function n(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s=r[a],u=s.length,f=o[a]=new Array(u),l,h=0;h<u;++h)(l=s[h])&&(f[h]=l);f.sort(n)}return new lt(o,this._parents).order()}function Ca(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function Sa(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ta(){return Array.from(this)}function Ea(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Ma(){let e=0;for(const n of this)++e;return e}function Pa(){return!this.node()}function Oa(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],a=0,s=o.length,u;a<s;++a)(u=o[a])&&e.call(u,u.__data__,a,o);return this}function Ra(e){return function(){this.removeAttribute(e)}}function za(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Na(e,n){return function(){this.setAttribute(e,n)}}function Ia(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function $a(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Da(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function ja(e,n){var r=We(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((n==null?r.local?za:Ra:typeof n=="function"?r.local?Da:$a:r.local?Ia:Na)(r,n))}function _i(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ua(e){return function(){this.style.removeProperty(e)}}function Fa(e,n,r){return function(){this.style.setProperty(e,n,r)}}function La(e,n,r){return function(){var i=n.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function Ha(e,n,r){return arguments.length>1?this.each((n==null?Ua:typeof n=="function"?La:Fa)(e,n,r??"")):Bt(this.node(),e)}function Bt(e,n){return e.style.getPropertyValue(n)||_i(e).getComputedStyle(e,null).getPropertyValue(n)}function qa(e){return function(){delete this[e]}}function Ga(e,n){return function(){this[e]=n}}function Va(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Wa(e,n){return arguments.length>1?this.each((n==null?qa:typeof n=="function"?Va:Ga)(e,n)):this.node()[e]}function vi(e){return e.trim().split(/^|\s+/)}function In(e){return e.classList||new mi(e)}function mi(e){this._node=e,this._names=vi(e.getAttribute("class")||"")}mi.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function xi(e,n){for(var r=In(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function bi(e,n){for(var r=In(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function Ba(e){return function(){xi(this,e)}}function Ya(e){return function(){bi(this,e)}}function Xa(e,n){return function(){(n.apply(this,arguments)?xi:bi)(this,e)}}function Za(e,n){var r=vi(e+"");if(arguments.length<2){for(var i=In(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?Xa:n?Ba:Ya)(r,n))}function Ka(){this.textContent=""}function Qa(e){return function(){this.textContent=e}}function Ja(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function ts(e){return arguments.length?this.each(e==null?Ka:(typeof e=="function"?Ja:Qa)(e)):this.node().textContent}function es(){this.innerHTML=""}function ns(e){return function(){this.innerHTML=e}}function rs(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function is(e){return arguments.length?this.each(e==null?es:(typeof e=="function"?rs:ns)(e)):this.node().innerHTML}function os(){this.nextSibling&&this.parentNode.appendChild(this)}function as(){return this.each(os)}function ss(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function us(){return this.each(ss)}function fs(e){var n=typeof e=="function"?e:hi(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ls(){return null}function cs(e,n){var r=typeof e=="function"?e:hi(e),i=n==null?ls:typeof n=="function"?n:Nn(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function hs(){var e=this.parentNode;e&&e.removeChild(this)}function ds(){return this.each(hs)}function ps(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function gs(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function ys(e){return this.select(e?gs:ps)}function _s(e){return arguments.length?this.property("__data__",e):this.node().__data__}function vs(e){return function(n){e.call(this,n,this.__data__)}}function ms(e){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");return i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function xs(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r<o;++r)a=n[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):n[++i]=a;++i?n.length=i:delete this.__on}}}function bs(e,n,r){return function(){var i=this.__on,o,a=vs(n);if(i){for(var s=0,u=i.length;s<u;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=r),o.value=n;return}}this.addEventListener(e.type,a,r),o={type:e.type,name:e.name,value:n,listener:a,options:r},i?i.push(o):this.__on=[o]}}function ws(e,n,r){var i=ms(e+""),o,a=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var f=0,l=u.length,h;f<l;++f)for(o=0,h=u[f];o<a;++o)if((s=i[o]).type===h.type&&s.name===h.name)return h.value}return}for(u=n?bs:xs,o=0;o<a;++o)this.each(u(i[o],n,r));return this}function wi(e,n,r){var i=_i(e),o=i.CustomEvent;typeof o=="function"?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function ks(e,n){return function(){return wi(this,e,n)}}function As(e,n){return function(){return wi(this,e,n.apply(this,arguments))}}function Cs(e,n){return this.each((typeof n=="function"?As:ks)(e,n))}function*Ss(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ki=[null];function lt(e,n){this._groups=e,this._parents=n}function ve(){return new lt([[document.documentElement]],ki)}function Ts(){return this}lt.prototype=ve.prototype={constructor:lt,select:Jo,selectAll:ra,selectChild:sa,selectChildren:ca,filter:ha,data:va,enter:da,exit:xa,join:ba,merge:wa,selection:Ts,order:ka,sort:Aa,call:Sa,nodes:Ta,node:Ea,size:Ma,empty:Pa,each:Oa,attr:ja,style:Ha,property:Wa,classed:Za,text:ts,html:is,raise:as,lower:us,append:fs,insert:cs,remove:ds,clone:ys,datum:_s,on:ws,dispatch:Cs,[Symbol.iterator]:Ss};function dt(e){return typeof e=="string"?new lt([[document.querySelector(e)]],[document.documentElement]):new lt([[e]],ki)}function Es(e){let n;for(;n=e.sourceEvent;)e=n;return e}function xt(e,n){if(e=Es(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var Ms={value:()=>{}};function me(){for(var e=0,n=arguments.length,r={},i;e<n;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Me(r)}function Me(e){this._=e}function Ps(e,n){return e.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");if(o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Me.prototype=me.prototype={constructor:Me,on:function(e,n){var r=this._,i=Ps(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Os(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++a<s;)if(o=(e=i[a]).type)r[o]=ar(r[o],e.name,n);else if(n==null)for(o in r)r[o]=ar(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Me(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),i=0,o,a;i<o;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};function Os(e,n){for(var r=0,i=e.length,o;r<i;++r)if((o=e[r]).name===n)return o.value}function ar(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=Ms,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:n,value:r}),e}const Rs={passive:!1},ce={capture:!0,passive:!1};function rn(e){e.stopImmediatePropagation()}function Vt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ai(e){var n=e.document.documentElement,r=dt(e).on("dragstart.drag",Vt,ce);"onselectstart"in n?r.on("selectstart.drag",Vt,ce):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Ci(e,n){var r=e.document.documentElement,i=dt(e).on("dragstart.drag",null);n&&(i.on("click.drag",Vt,ce),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const we=e=>()=>e;function yn(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}yn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function zs(e){return!e.ctrlKey&&!e.button}function Ns(){return this.parentNode}function Is(e,n){return n??{x:e.x,y:e.y}}function $s(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ds(){var e=zs,n=Ns,r=Is,i=$s,o={},a=me("start","drag","end"),s=0,u,f,l,h,c=0;function d(b){b.on("mousedown.drag",p).filter(i).on("touchstart.drag",v).on("touchmove.drag",g,Rs).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,w){if(!(h||!e.call(this,b,w))){var S=T(this,n.call(this,b,w),b,w,"mouse");S&&(dt(b.view).on("mousemove.drag",y,ce).on("mouseup.drag",x,ce),Ai(b.view),rn(b),l=!1,u=b.clientX,f=b.clientY,S("start",b))}}function y(b){if(Vt(b),!l){var w=b.clientX-u,S=b.clientY-f;l=w*w+S*S>c}o.mouse("drag",b)}function x(b){dt(b.view).on("mousemove.drag mouseup.drag",null),Ci(b.view,l),Vt(b),o.mouse("end",b)}function v(b,w){if(e.call(this,b,w)){var S=b.changedTouches,k=n.call(this,b,w),E=S.length,I,R;for(I=0;I<E;++I)(R=T(this,k,b,w,S[I].identifier,S[I]))&&(rn(b),R("start",b,S[I]))}}function g(b){var w=b.changedTouches,S=w.length,k,E;for(k=0;k<S;++k)(E=o[w[k].identifier])&&(Vt(b),E("drag",b,w[k]))}function A(b){var w=b.changedTouches,S=w.length,k,E;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),k=0;k<S;++k)(E=o[w[k].identifier])&&(rn(b),E("end",b,w[k]))}function T(b,w,S,k,E,I){var R=a.copy(),z=xt(I||S,w),$,L,C;if((C=r.call(b,new yn("beforestart",{sourceEvent:S,target:d,identifier:E,active:s,x:z[0],y:z[1],dx:0,dy:0,dispatch:R}),k))!=null)return $=C.x-z[0]||0,L=C.y-z[1]||0,function N(P,D,H){var q=z,G;switch(P){case"start":o[E]=N,G=s++;break;case"end":delete o[E],--s;case"drag":z=xt(H||D,w),G=s;break}R.call(P,b,new yn(P,{sourceEvent:D,subject:C,target:d,identifier:E,active:G,x:z[0]+$,y:z[1]+L,dx:z[0]-q[0],dy:z[1]-q[1],dispatch:R}),k)}}return d.filter=function(b){return arguments.length?(e=typeof b=="function"?b:we(!!b),d):e},d.container=function(b){return arguments.length?(n=typeof b=="function"?b:we(b),d):n},d.subject=function(b){return arguments.length?(r=typeof b=="function"?b:we(b),d):r},d.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:we(!!b),d):i},d.on=function(){var b=a.on.apply(a,arguments);return b===a?d:b},d.clickDistance=function(b){return arguments.length?(c=(b=+b)*b,d):Math.sqrt(c)},d}function $n(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function Si(e,n){var r=Object.create(e.prototype);for(var i in n)r[i]=n[i];return r}function xe(){}var he=.7,Ie=1/he,Wt="\\s*([+-]?\\d+)\\s*",de="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",js=/^#([0-9a-f]{3,8})$/,Us=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),Fs=new RegExp(`^rgb\\(${wt},${wt},${wt}\\)$`),Ls=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${de}\\)$`),Hs=new RegExp(`^rgba\\(${wt},${wt},${wt},${de}\\)$`),qs=new RegExp(`^hsl\\(${de},${wt},${wt}\\)$`),Gs=new RegExp(`^hsla\\(${de},${wt},${wt},${de}\\)$`),sr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$n(xe,pe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ur,formatHex:ur,formatHex8:Vs,formatHsl:Ws,formatRgb:fr,toString:fr});function ur(){return this.rgb().formatHex()}function Vs(){return this.rgb().formatHex8()}function Ws(){return Ti(this).formatHsl()}function fr(){return this.rgb().formatRgb()}function pe(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=js.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?lr(n):r===3?new st(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?ke(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?ke(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Us.exec(e))?new st(n[1],n[2],n[3],1):(n=Fs.exec(e))?new st(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Ls.exec(e))?ke(n[1],n[2],n[3],n[4]):(n=Hs.exec(e))?ke(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=qs.exec(e))?dr(n[1],n[2]/100,n[3]/100,1):(n=Gs.exec(e))?dr(n[1],n[2]/100,n[3]/100,n[4]):sr.hasOwnProperty(e)?lr(sr[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function lr(e){return new st(e>>16&255,e>>8&255,e&255,1)}function ke(e,n,r,i){return i<=0&&(e=n=r=NaN),new st(e,n,r,i)}function Bs(e){return e instanceof xe||(e=pe(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function _n(e,n,r,i){return arguments.length===1?Bs(e):new st(e,n,r,i??1)}function st(e,n,r,i){this.r=+e,this.g=+n,this.b=+r,this.opacity=+i}$n(st,_n,Si(xe,{brighter(e){return e=e==null?Ie:Math.pow(Ie,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?he:Math.pow(he,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(Ft(this.r),Ft(this.g),Ft(this.b),$e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cr,formatHex:cr,formatHex8:Ys,formatRgb:hr,toString:hr}));function cr(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}`}function Ys(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}${Ut((isNaN(this.opacity)?1:this.opacity)*255)}`}function hr(){const e=$e(this.opacity);return`${e===1?"rgb(":"rgba("}${Ft(this.r)}, ${Ft(this.g)}, ${Ft(this.b)}${e===1?")":`, ${e})`}`}function $e(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ft(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ut(e){return e=Ft(e),(e<16?"0":"")+e.toString(16)}function dr(e,n,r,i){return i<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new yt(e,n,r,i)}function Ti(e){if(e instanceof yt)return new yt(e.h,e.s,e.l,e.opacity);if(e instanceof xe||(e=pe(e)),!e)return new yt;if(e instanceof yt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(n,r,i),a=Math.max(n,r,i),s=NaN,u=a-o,f=(a+o)/2;return u?(n===a?s=(r-i)/u+(r<i)*6:r===a?s=(i-n)/u+2:s=(n-r)/u+4,u/=f<.5?a+o:2-a-o,s*=60):u=f>0&&f<1?0:s,new yt(s,u,f,e.opacity)}function Xs(e,n,r,i){return arguments.length===1?Ti(e):new yt(e,n,r,i??1)}function yt(e,n,r,i){this.h=+e,this.s=+n,this.l=+r,this.opacity=+i}$n(yt,Xs,Si(xe,{brighter(e){return e=e==null?Ie:Math.pow(Ie,e),new yt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?he:Math.pow(he,e),new yt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,o=2*r-i;return new st(on(e>=240?e-240:e+120,o,i),on(e,o,i),on(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new yt(pr(this.h),Ae(this.s),Ae(this.l),$e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$e(this.opacity);return`${e===1?"hsl(":"hsla("}${pr(this.h)}, ${Ae(this.s)*100}%, ${Ae(this.l)*100}%${e===1?")":`, ${e})`}`}}));function pr(e){return e=(e||0)%360,e<0?e+360:e}function Ae(e){return Math.max(0,Math.min(1,e||0))}function on(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const Ei=e=>()=>e;function Zs(e,n){return function(r){return e+r*n}}function Ks(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(i){return Math.pow(e+i*n,r)}}function Qs(e){return(e=+e)==1?Mi:function(n,r){return r-n?Ks(n,r,e):Ei(isNaN(n)?r:n)}}function Mi(e,n){var r=n-e;return r?Zs(e,r):Ei(isNaN(e)?n:e)}const gr=(function e(n){var r=Qs(n);function i(o,a){var s=r((o=_n(o)).r,(a=_n(a)).r),u=r(o.g,a.g),f=r(o.b,a.b),l=Mi(o.opacity,a.opacity);return function(h){return o.r=s(h),o.g=u(h),o.b=f(h),o.opacity=l(h),o+""}}return i.gamma=e,i})(1);function $t(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var vn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,an=new RegExp(vn.source,"g");function Js(e){return function(){return e}}function tu(e){return function(n){return e(n)+""}}function eu(e,n){var r=vn.lastIndex=an.lastIndex=0,i,o,a,s=-1,u=[],f=[];for(e=e+"",n=n+"";(i=vn.exec(e))&&(o=an.exec(n));)(a=o.index)>r&&(a=n.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(i=i[0])===(o=o[0])?u[s]?u[s]+=o:u[++s]=o:(u[++s]=null,f.push({i:s,x:$t(i,o)})),r=an.lastIndex;return r<n.length&&(a=n.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?f[0]?tu(f[0].x):Js(n):(n=f.length,function(l){for(var h=0,c;h<n;++h)u[(c=f[h]).i]=c.x(l);return u.join("")})}var yr=180/Math.PI,mn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Pi(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i<n*r&&(e=-e,n=-n,f=-f,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*yr,skewX:Math.atan(f)*yr,scaleX:s,scaleY:u}}var Ce;function nu(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?mn:Pi(n.a,n.b,n.c,n.d,n.e,n.f)}function ru(e){return e==null||(Ce||(Ce=document.createElementNS("http://www.w3.org/2000/svg","g")),Ce.setAttribute("transform",e),!(e=Ce.transform.baseVal.consolidate()))?mn:(e=e.matrix,Pi(e.a,e.b,e.c,e.d,e.e,e.f))}function Oi(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,h,c,d,p,y){if(l!==c||h!==d){var x=p.push("translate(",null,n,null,r);y.push({i:x-4,x:$t(l,c)},{i:x-2,x:$t(h,d)})}else(c||d)&&p.push("translate("+c+n+d+r)}function s(l,h,c,d){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),d.push({i:c.push(o(c)+"rotate(",null,i)-2,x:$t(l,h)})):h&&c.push(o(c)+"rotate("+h+i)}function u(l,h,c,d){l!==h?d.push({i:c.push(o(c)+"skewX(",null,i)-2,x:$t(l,h)}):h&&c.push(o(c)+"skewX("+h+i)}function f(l,h,c,d,p,y){if(l!==c||h!==d){var x=p.push(o(p)+"scale(",null,",",null,")");y.push({i:x-4,x:$t(l,c)},{i:x-2,x:$t(h,d)})}else(c!==1||d!==1)&&p.push(o(p)+"scale("+c+","+d+")")}return function(l,h){var c=[],d=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,c,d),s(l.rotate,h.rotate,c,d),u(l.skewX,h.skewX,c,d),f(l.scaleX,l.scaleY,h.scaleX,h.scaleY,c,d),l=h=null,function(p){for(var y=-1,x=d.length,v;++y<x;)c[(v=d[y]).i]=v.x(p);return c.join("")}}}var iu=Oi(nu,"px, ","px)","deg)"),ou=Oi(ru,", ",")",")"),au=1e-12;function _r(e){return((e=Math.exp(e))+1/e)/2}function su(e){return((e=Math.exp(e))-1/e)/2}function uu(e){return((e=Math.exp(2*e))-1)/(e+1)}const fu=(function e(n,r,i){function o(a,s){var u=a[0],f=a[1],l=a[2],h=s[0],c=s[1],d=s[2],p=h-u,y=c-f,x=p*p+y*y,v,g;if(x<au)g=Math.log(d/l)/n,v=function(k){return[u+k*p,f+k*y,l*Math.exp(n*k*g)]};else{var A=Math.sqrt(x),T=(d*d-l*l+i*x)/(2*l*r*A),b=(d*d-l*l-i*x)/(2*d*r*A),w=Math.log(Math.sqrt(T*T+1)-T),S=Math.log(Math.sqrt(b*b+1)-b);g=(S-w)/n,v=function(k){var E=k*g,I=_r(w),R=l/(r*A)*(I*uu(n*E+w)-su(w));return[u+R*p,f+R*y,l*I/_r(n*E+w)]}}return v.duration=g*1e3*n/Math.SQRT2,v}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,f=u*u;return e(s,u,f)},o})(Math.SQRT2,2,4);var Yt=0,ie=0,Zt=0,Ri=1e3,De,oe,je=0,Ht=0,Be=0,ge=typeof performance=="object"&&performance.now?performance:Date,zi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dn(){return Ht||(zi(lu),Ht=ge.now()+Be)}function lu(){Ht=0}function Ue(){this._call=this._time=this._next=null}Ue.prototype=jn.prototype={constructor:Ue,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Dn():+r)+(n==null?0:+n),!this._next&&oe!==this&&(oe?oe._next=this:De=this,oe=this),this._call=e,this._time=r,xn()},stop:function(){this._call&&(this._call=null,this._time=1/0,xn())}};function jn(e,n,r){var i=new Ue;return i.restart(e,n,r),i}function cu(){Dn(),++Yt;for(var e=De,n;e;)(n=Ht-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Yt}function vr(){Ht=(je=ge.now())+Be,Yt=ie=0;try{cu()}finally{Yt=0,du(),Ht=0}}function hu(){var e=ge.now(),n=e-je;n>Ri&&(Be-=n,je=e)}function du(){for(var e,n=De,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:De=r);oe=e,xn(i)}function xn(e){if(!Yt){ie&&(ie=clearTimeout(ie));var n=e-Ht;n>24?(e<1/0&&(ie=setTimeout(vr,e-ge.now()-Be)),Zt&&(Zt=clearInterval(Zt))):(Zt||(je=ge.now(),Zt=setInterval(hu,Ri)),Yt=1,zi(vr))}}function mr(e,n,r){var i=new Ue;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var pu=me("start","end","cancel","interrupt"),gu=[],Ni=0,xr=1,bn=2,Pe=3,br=4,wn=5,Oe=6;function Ye(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;yu(e,r,{name:n,index:i,group:o,on:pu,tween:gu,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ni})}function Un(e,n){var r=vt(e,n);if(r.state>Ni)throw new Error("too late; already scheduled");return r}function At(e,n){var r=vt(e,n);if(r.state>Pe)throw new Error("too late; already running");return r}function vt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function yu(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=jn(a,0,r.time);function a(l){r.state=xr,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var h,c,d,p;if(r.state!==xr)return f();for(h in i)if(p=i[h],p.name===r.name){if(p.state===Pe)return mr(s);p.state===br?(p.state=Oe,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+h<n&&(p.state=Oe,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[h])}if(mr(function(){r.state===Pe&&(r.state=br,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=bn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===bn){for(r.state=Pe,o=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(p=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++c]=p);o.length=c+1}}function u(l){for(var h=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(f),r.state=wn,1),c=-1,d=o.length;++c<d;)o[c].call(e,h);r.state===wn&&(r.on.call("end",e,e.__data__,r.index,r.group),f())}function f(){r.state=Oe,r.timer.stop(),delete i[n];for(var l in i)return;delete e.__transition}}function Re(e,n){var r=e.__transition,i,o,a=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((i=r[s]).name!==n){a=!1;continue}o=i.state>bn&&i.state<wn,i.state=Oe,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function _u(e){return this.each(function(){Re(this,e)})}function vu(e,n){var r,i;return function(){var o=At(this,e),a=o.tween;if(a!==r){i=r=a;for(var s=0,u=i.length;s<u;++s)if(i[s].name===n){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function mu(e,n,r){var i,o;if(typeof r!="function")throw new Error;return function(){var a=At(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var u={name:n,value:r},f=0,l=o.length;f<l;++f)if(o[f].name===n){o[f]=u;break}f===l&&o.push(u)}a.tween=o}}function xu(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i=vt(this.node(),r).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((n==null?vu:mu)(r,e,n))}function Fn(e,n,r){var i=e._id;return e.each(function(){var o=At(this,i);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return vt(o,i).value[n]}}function Ii(e,n){var r;return(typeof n=="number"?$t:n instanceof pe?gr:(r=pe(n))?(n=r,gr):eu)(e,n)}function bu(e){return function(){this.removeAttribute(e)}}function wu(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ku(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=n(i=s,r)}}function Au(e,n,r){var i,o=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=n(i=s,r)}}function Cu(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function Su(e,n,r){var i,o,a;return function(){var s,u=r(this),f;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=u+"",s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u)))}}function Tu(e,n){var r=We(e),i=r==="transform"?ou:Ii;return this.attrTween(e,typeof n=="function"?(r.local?Su:Cu)(r,i,Fn(this,"attr."+e,n)):n==null?(r.local?wu:bu)(r):(r.local?Au:ku)(r,i,n))}function Eu(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function Mu(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function Pu(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Mu(e,a)),r}return o._value=n,o}function Ou(e,n){var r,i;function o(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&Eu(e,a)),r}return o._value=n,o}function Ru(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var i=We(e);return this.tween(r,(i.local?Pu:Ou)(i,n))}function zu(e,n){return function(){Un(this,e).delay=+n.apply(this,arguments)}}function Nu(e,n){return n=+n,function(){Un(this,e).delay=n}}function Iu(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?zu:Nu)(n,e)):vt(this.node(),n).delay}function $u(e,n){return function(){At(this,e).duration=+n.apply(this,arguments)}}function Du(e,n){return n=+n,function(){At(this,e).duration=n}}function ju(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?$u:Du)(n,e)):vt(this.node(),n).duration}function Uu(e,n){if(typeof n!="function")throw new Error;return function(){At(this,e).ease=n}}function Fu(e){var n=this._id;return arguments.length?this.each(Uu(n,e)):vt(this.node(),n).ease}function Lu(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;At(this,e).ease=r}}function Hu(e){if(typeof e!="function")throw new Error;return this.each(Lu(this._id,e))}function qu(e){typeof e!="function"&&(e=pi(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a=n[o],s=a.length,u=i[o]=[],f,l=0;l<s;++l)(f=a[l])&&e.call(f,f.__data__,l,a)&&u.push(f);return new zt(i,this._parents,this._name,this._id)}function Gu(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var f=n[u],l=r[u],h=f.length,c=s[u]=new Array(h),d,p=0;p<h;++p)(d=f[p]||l[p])&&(c[p]=d);for(;u<i;++u)s[u]=n[u];return new zt(s,this._parents,this._name,this._id)}function Vu(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function Wu(e,n,r){var i,o,a=Vu(n)?Un:At;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function Bu(e,n){var r=this._id;return arguments.length<2?vt(this.node(),r).on.on(e):this.each(Wu(r,e,n))}function Yu(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Xu(){return this.on("end.remove",Yu(this._id))}function Zu(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Nn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u=i[s],f=u.length,l=a[s]=new Array(f),h,c,d=0;d<f;++d)(h=u[d])&&(c=e.call(h,h.__data__,d,u))&&("__data__"in h&&(c.__data__=h.__data__),l[d]=c,Ye(l[d],n,r,d,l,vt(h,r)));return new zt(a,this._parents,n,r)}function Ku(e){var n=this._name,r=this._id;typeof e!="function"&&(e=di(e));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var f=i[u],l=f.length,h,c=0;c<l;++c)if(h=f[c]){for(var d=e.call(h,h.__data__,c,f),p,y=vt(h,r),x=0,v=d.length;x<v;++x)(p=d[x])&&Ye(p,n,r,x,d,y);a.push(d),s.push(h)}return new zt(a,s,n,r)}var Qu=ve.prototype.constructor;function Ju(){return new Qu(this._groups,this._parents)}function tf(e,n){var r,i,o;return function(){var a=Bt(this,e),s=(this.style.removeProperty(e),Bt(this,e));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function $i(e){return function(){this.style.removeProperty(e)}}function ef(e,n,r){var i,o=r+"",a;return function(){var s=Bt(this,e);return s===o?null:s===i?a:a=n(i=s,r)}}function nf(e,n,r){var i,o,a;return function(){var s=Bt(this,e),u=r(this),f=u+"";return u==null&&(f=u=(this.style.removeProperty(e),Bt(this,e))),s===f?null:s===i&&f===o?a:(o=f,a=n(i=s,u))}}function rf(e,n){var r,i,o,a="style."+n,s="end."+a,u;return function(){var f=At(this,e),l=f.on,h=f.value[a]==null?u||(u=$i(n)):void 0;(l!==r||o!==h)&&(i=(r=l).copy()).on(s,o=h),f.on=i}}function of(e,n,r){var i=(e+="")=="transform"?iu:Ii;return n==null?this.styleTween(e,tf(e,i)).on("end.style."+e,$i(e)):typeof n=="function"?this.styleTween(e,nf(e,i,Fn(this,"style."+e,n))).each(rf(this._id,e)):this.styleTween(e,ef(e,i,n),r).on("end.style."+e,null)}function af(e,n,r){return function(i){this.style.setProperty(e,n.call(this,i),r)}}function sf(e,n,r){var i,o;function a(){var s=n.apply(this,arguments);return s!==o&&(i=(o=s)&&af(e,s,r)),i}return a._value=n,a}function uf(e,n,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,sf(e,n,r??""))}function ff(e){return function(){this.textContent=e}}function lf(e){return function(){var n=e(this);this.textContent=n??""}}function cf(e){return this.tween("text",typeof e=="function"?lf(Fn(this,"text",e)):ff(e==null?"":e+""))}function hf(e){return function(n){this.textContent=e.call(this,n)}}function df(e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hf(o)),n}return i._value=e,i}function pf(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,df(e))}function gf(){for(var e=this._name,n=this._id,r=Di(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)if(f=s[l]){var h=vt(f,n);Ye(f,e,r,l,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new zt(i,this._parents,e,r)}function yf(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var u={value:s},f={value:function(){--o===0&&a()}};r.each(function(){var l=At(this,i),h=l.on;h!==e&&(n=(e=h).copy(),n._.cancel.push(u),n._.interrupt.push(u),n._.end.push(f)),l.on=n}),o===0&&a()})}var _f=0;function zt(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}function Di(){return++_f}var Ct=ve.prototype;zt.prototype={constructor:zt,select:Zu,selectAll:Ku,selectChild:Ct.selectChild,selectChildren:Ct.selectChildren,filter:qu,merge:Gu,selection:Ju,transition:gf,call:Ct.call,nodes:Ct.nodes,node:Ct.node,size:Ct.size,empty:Ct.empty,each:Ct.each,on:Bu,attr:Tu,attrTween:Ru,style:of,styleTween:uf,text:cf,textTween:pf,remove:Xu,tween:xu,delay:Iu,duration:ju,ease:Fu,easeVarying:Hu,end:yf,[Symbol.iterator]:Ct[Symbol.iterator]};function vf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var mf={time:null,delay:0,duration:250,ease:vf};function xf(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function bf(e){var n,r;e instanceof zt?(n=e._id,e=e._name):(n=Di(),(r=mf).time=Dn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],u=s.length,f,l=0;l<u;++l)(f=s[l])&&Ye(f,e,n,l,s,r||xf(f,n));return new zt(i,this._parents,e,n)}ve.prototype.interrupt=_u;ve.prototype.transition=bf;const Se=e=>()=>e;function wf(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Pt(e,n,r){this.k=e,this.x=n,this.y=r}Pt.prototype={constructor:Pt,scale:function(e){return e===1?this:new Pt(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Pt(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ln=new Pt(1,0,0);mt.prototype=Pt.prototype;function mt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ln;return e.__zoom}function sn(e){e.stopImmediatePropagation()}function Kt(e){e.preventDefault(),e.stopImmediatePropagation()}function kf(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Af(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function wr(){return this.__zoom||Ln}function Cf(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Sf(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tf(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function Ef(){var e=kf,n=Af,r=Tf,i=Cf,o=Sf,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=fu,l=me("start","zoom","end"),h,c,d,p=500,y=150,x=0,v=10;function g(C){C.property("__zoom",wr).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",R).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(C,N,P,D){var H=C.selection?C.selection():C;H.property("__zoom",wr),C!==H?w(C,N,P,D):H.interrupt().each(function(){S(this,arguments).event(D).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},g.scaleBy=function(C,N,P,D){g.scaleTo(C,function(){var H=this.__zoom.k,q=typeof N=="function"?N.apply(this,arguments):N;return H*q},P,D)},g.scaleTo=function(C,N,P,D){g.transform(C,function(){var H=n.apply(this,arguments),q=this.__zoom,G=P==null?b(H):typeof P=="function"?P.apply(this,arguments):P,_=q.invert(G),M=typeof N=="function"?N.apply(this,arguments):N;return r(T(A(q,M),G,_),H,s)},P,D)},g.translateBy=function(C,N,P,D){g.transform(C,function(){return r(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof P=="function"?P.apply(this,arguments):P),n.apply(this,arguments),s)},null,D)},g.translateTo=function(C,N,P,D,H){g.transform(C,function(){var q=n.apply(this,arguments),G=this.__zoom,_=D==null?b(q):typeof D=="function"?D.apply(this,arguments):D;return r(Ln.translate(_[0],_[1]).scale(G.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof P=="function"?-P.apply(this,arguments):-P),q,s)},D,H)};function A(C,N){return N=Math.max(a[0],Math.min(a[1],N)),N===C.k?C:new Pt(N,C.x,C.y)}function T(C,N,P){var D=N[0]-P[0]*C.k,H=N[1]-P[1]*C.k;return D===C.x&&H===C.y?C:new Pt(C.k,D,H)}function b(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function w(C,N,P,D){C.on("start.zoom",function(){S(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(D).end()}).tween("zoom",function(){var H=this,q=arguments,G=S(H,q).event(D),_=n.apply(H,q),M=P==null?b(_):typeof P=="function"?P.apply(H,q):P,U=Math.max(_[1][0]-_[0][0],_[1][1]-_[0][1]),j=H.__zoom,W=typeof N=="function"?N.apply(H,q):N,B=f(j.invert(M).concat(U/j.k),W.invert(M).concat(U/W.k));return function(Y){if(Y===1)Y=W;else{var tt=B(Y),et=U/tt[2];Y=new Pt(et,M[0]-tt[0]*et,M[1]-tt[1]*et)}G.zoom(null,Y)}})}function S(C,N,P){return!P&&C.__zooming||new k(C,N)}function k(C,N){this.that=C,this.args=N,this.active=0,this.sourceEvent=null,this.extent=n.apply(C,N),this.taps=0}k.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,N){return this.mouse&&C!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var N=dt(this.that).datum();l.call(C,this.that,new wf(C,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),N)}};function E(C,...N){if(!e.apply(this,arguments))return;var P=S(this,N).event(C),D=this.__zoom,H=Math.max(a[0],Math.min(a[1],D.k*Math.pow(2,i.apply(this,arguments)))),q=xt(C);if(P.wheel)(P.mouse[0][0]!==q[0]||P.mouse[0][1]!==q[1])&&(P.mouse[1]=D.invert(P.mouse[0]=q)),clearTimeout(P.wheel);else{if(D.k===H)return;P.mouse=[q,D.invert(q)],Re(this),P.start()}Kt(C),P.wheel=setTimeout(G,y),P.zoom("mouse",r(T(A(D,H),P.mouse[0],P.mouse[1]),P.extent,s));function G(){P.wheel=null,P.end()}}function I(C,...N){if(d||!e.apply(this,arguments))return;var P=C.currentTarget,D=S(this,N,!0).event(C),H=dt(C.view).on("mousemove.zoom",M,!0).on("mouseup.zoom",U,!0),q=xt(C,P),G=C.clientX,_=C.clientY;Ai(C.view),sn(C),D.mouse=[q,this.__zoom.invert(q)],Re(this),D.start();function M(j){if(Kt(j),!D.moved){var W=j.clientX-G,B=j.clientY-_;D.moved=W*W+B*B>x}D.event(j).zoom("mouse",r(T(D.that.__zoom,D.mouse[0]=xt(j,P),D.mouse[1]),D.extent,s))}function U(j){H.on("mousemove.zoom mouseup.zoom",null),Ci(j.view,D.moved),Kt(j),D.event(j).end()}}function R(C,...N){if(e.apply(this,arguments)){var P=this.__zoom,D=xt(C.changedTouches?C.changedTouches[0]:C,this),H=P.invert(D),q=P.k*(C.shiftKey?.5:2),G=r(T(A(P,q),D,H),n.apply(this,N),s);Kt(C),u>0?dt(this).transition().duration(u).call(w,G,D,C):dt(this).call(g.transform,G,D,C)}}function z(C,...N){if(e.apply(this,arguments)){var P=C.touches,D=P.length,H=S(this,N,C.changedTouches.length===D).event(C),q,G,_,M;for(sn(C),G=0;G<D;++G)_=P[G],M=xt(_,this),M=[M,this.__zoom.invert(M),_.identifier],H.touch0?!H.touch1&&H.touch0[2]!==M[2]&&(H.touch1=M,H.taps=0):(H.touch0=M,q=!0,H.taps=1+!!h);h&&(h=clearTimeout(h)),q&&(H.taps<2&&(c=M[0],h=setTimeout(function(){h=null},p)),Re(this),H.start())}}function $(C,...N){if(this.__zooming){var P=S(this,N).event(C),D=C.changedTouches,H=D.length,q,G,_,M;for(Kt(C),q=0;q<H;++q)G=D[q],_=xt(G,this),P.touch0&&P.touch0[2]===G.identifier?P.touch0[0]=_:P.touch1&&P.touch1[2]===G.identifier&&(P.touch1[0]=_);if(G=P.that.__zoom,P.touch1){var U=P.touch0[0],j=P.touch0[1],W=P.touch1[0],B=P.touch1[1],Y=(Y=W[0]-U[0])*Y+(Y=W[1]-U[1])*Y,tt=(tt=B[0]-j[0])*tt+(tt=B[1]-j[1])*tt;G=A(G,Math.sqrt(Y/tt)),_=[(U[0]+W[0])/2,(U[1]+W[1])/2],M=[(j[0]+B[0])/2,(j[1]+B[1])/2]}else if(P.touch0)_=P.touch0[0],M=P.touch0[1];else return;P.zoom("touch",r(T(G,_,M),P.extent,s))}}function L(C,...N){if(this.__zooming){var P=S(this,N).event(C),D=C.changedTouches,H=D.length,q,G;for(sn(C),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),q=0;q<H;++q)G=D[q],P.touch0&&P.touch0[2]===G.identifier?delete P.touch0:P.touch1&&P.touch1[2]===G.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(G=xt(G,this),Math.hypot(c[0]-G[0],c[1]-G[1])<v)){var _=dt(this).on("dblclick.zoom");_&&_.apply(this,arguments)}}}return g.wheelDelta=function(C){return arguments.length?(i=typeof C=="function"?C:Se(+C),g):i},g.filter=function(C){return arguments.length?(e=typeof C=="function"?C:Se(!!C),g):e},g.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:Se(!!C),g):o},g.extent=function(C){return arguments.length?(n=typeof C=="function"?C:Se([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),g):n},g.scaleExtent=function(C){return arguments.length?(a[0]=+C[0],a[1]=+C[1],g):[a[0],a[1]]},g.translateExtent=function(C){return arguments.length?(s[0][0]=+C[0][0],s[1][0]=+C[1][0],s[0][1]=+C[0][1],s[1][1]=+C[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(C){return arguments.length?(r=C,g):r},g.duration=function(C){return arguments.length?(u=+C,g):u},g.interpolate=function(C){return arguments.length?(f=C,g):f},g.on=function(){var C=l.on.apply(l,arguments);return C===l?g:C},g.clickDistance=function(C){return arguments.length?(x=(C=+C)*C,g):Math.sqrt(x)},g.tapDistance=function(C){return arguments.length?(v=+C,g):v},g}class kr extends Map{constructor(n,r=Of){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[i,o]of n)this.set(i,o)}get(n){return super.get(Ar(this,n))}has(n){return super.has(Ar(this,n))}set(n,r){return super.set(Mf(this,n),r)}delete(n){return super.delete(Pf(this,n))}}function Ar({_intern:e,_key:n},r){const i=n(r);return e.has(i)?e.get(i):r}function Mf({_intern:e,_key:n},r){const i=n(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Pf({_intern:e,_key:n},r){const i=n(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function Of(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Cr(e,n){let r;if(n===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of e)(o=n(o,++i,e))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function Sr(e,n){let r;if(n===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let o of e)(o=n(o,++i,e))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function Rf(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var zf=typeof global=="object"&&global&&global.Object===Object&&global,Nf=typeof self=="object"&&self&&self.Object===Object&&self,ji=zf||Nf||Function("return this")(),Fe=ji.Symbol,Ui=Object.prototype,If=Ui.hasOwnProperty,$f=Ui.toString,Qt=Fe?Fe.toStringTag:void 0;function Df(e){var n=If.call(e,Qt),r=e[Qt];try{e[Qt]=void 0;var i=!0}catch{}var o=$f.call(e);return i&&(n?e[Qt]=r:delete e[Qt]),o}var jf=Object.prototype,Uf=jf.toString;function Ff(e){return Uf.call(e)}var Lf="[object Null]",Hf="[object Undefined]",Tr=Fe?Fe.toStringTag:void 0;function qf(e){return e==null?e===void 0?Hf:Lf:Tr&&Tr in Object(e)?Df(e):Ff(e)}function Gf(e){return e!=null&&typeof e=="object"}var Vf="[object Symbol]";function Wf(e){return typeof e=="symbol"||Gf(e)&&qf(e)==Vf}var Bf=/\s/;function Yf(e){for(var n=e.length;n--&&Bf.test(e.charAt(n)););return n}var Xf=/^\s+/;function Zf(e){return e&&e.slice(0,Yf(e)+1).replace(Xf,"")}function Le(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Er=NaN,Kf=/^[-+]0x[0-9a-f]+$/i,Qf=/^0b[01]+$/i,Jf=/^0o[0-7]+$/i,tl=parseInt;function Mr(e){if(typeof e=="number")return e;if(Wf(e))return Er;if(Le(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Le(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Zf(e);var r=Qf.test(e);return r||Jf.test(e)?tl(e.slice(2),r?2:8):Kf.test(e)?Er:+e}var un=function(){return ji.Date.now()},el="Expected a function",nl=Math.max,rl=Math.min;function Fi(e,n,r){var i,o,a,s,u,f,l=0,h=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(el);n=Mr(n)||0,Le(r)&&(h=!!r.leading,c="maxWait"in r,a=c?nl(Mr(r.maxWait)||0,n):a,d="trailing"in r?!!r.trailing:d);function p(S){var k=i,E=o;return i=o=void 0,l=S,s=e.apply(E,k),s}function y(S){return l=S,u=setTimeout(g,n),h?p(S):s}function x(S){var k=S-f,E=S-l,I=n-k;return c?rl(I,a-E):I}function v(S){var k=S-f,E=S-l;return f===void 0||k>=n||k<0||c&&E>=a}function g(){var S=un();if(v(S))return A(S);u=setTimeout(g,x(S))}function A(S){return u=void 0,d&&i?p(S):(i=o=void 0,s)}function T(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function b(){return u===void 0?s:A(un())}function w(){var S=un(),k=v(S);if(i=arguments,o=this,f=S,k){if(u===void 0)return y(f);if(c)return clearTimeout(u),u=setTimeout(g,n),p(f)}return u===void 0&&(u=setTimeout(g,n)),s}return w.cancel=T,w.flush=b,w}var il="Expected a function";function ol(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(il);return Le(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Fi(e,n,{leading:i,maxWait:n,trailing:o})}var Lt=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Lt.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Lt.Bounce.In(e*2)*.5:Lt.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),ae=function(){return performance.now()},Li=(function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];(n=s._group)===null||n===void 0||n.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];a._group=void 0,delete this._tweens[a.getId()],delete this._tweensAddedDuringUpdate[a.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=ae()),r===void 0&&(r=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var a=this._tweens[i[o]],s=!r;a&&a.update(n,s)===!1&&!r&&this.remove(a)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),kn={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=kn.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},Hi=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),An=new Li,Pr=(function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Lt.Linear.None,this._interpolationFunction=kn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Hi.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=An,An.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=ae()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],f=Array.isArray(u),l=f?"array":typeof u,h=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(h){var c=i[s];if(c.length===0)continue;for(var d=[u],p=0,y=c.length;p<y;p+=1){var x=this._handleRelativeValue(u,c[p]);if(isNaN(x)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(x)}h&&(i[s]=d)}if((l==="object"||f)&&u&&!h){r[s]=f?[]:{};var v=u;for(var g in v)r[s][g]=v[g];o[s]=f?[]:{};var c=i[s];if(!this._isDynamic){var A={};for(var g in c)A[g]=c[g];i[s]=c=A}this._setupProperties(v,r[s],c,o[s],a)}else(typeof r[s]>"u"||a)&&(r[s]=u),f||(r[s]*=1),h?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=ae()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=ae()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=Lt.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=kn.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var i=this,o;if(n===void 0&&(n=ae()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=n-this._startTime,u=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),f=this._duration+this._repeat*u,l=function(){if(i._duration===0||s>f)return 1;var x=Math.trunc(s/u),v=s-x*u,g=Math.min(v/i._duration,1);return g===0&&s===i._duration?1:g},h=l(),c=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,c),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((s-this._duration)/u)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=d);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=u*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,y=this._chainedTweens.length;p<y;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,i,o){for(var a in i)if(r[a]!==void 0){var s=r[a]||0,u=i[a],f=Array.isArray(n[a]),l=Array.isArray(u),h=!f&&l;h?n[a]=this._interpolationFunction(u,o):typeof u=="object"&&u?this._updateProperties(n[a],s,u,o):(u=this._handleRelativeValue(s,u),typeof u=="number"&&(n[a]=s+(u-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],i=this._valuesEnd[n];typeof i=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(i):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e})();Hi.nextId;var kt=An;kt.getAll.bind(kt);kt.removeAll.bind(kt);kt.add.bind(kt);kt.remove.bind(kt);kt.update.bind(kt);function Or(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function al(e){if(Array.isArray(e))return e}function sl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ul(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function fl(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function ll(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cl(e,n){return al(e)||fl(e,n)||hl(e,n)||ll()}function hl(e,n){if(e){if(typeof e=="string")return Or(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Or(e,n):void 0}}var dl=ul(function e(n,r){var i=r.default,o=i===void 0?null:i,a=r.triggerUpdate,s=a===void 0?!0:a,u=r.onChange,f=u===void 0?function(l,h){}:u;sl(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=f});function Hn(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,o=i===void 0?{}:i,a=e.methods,s=a===void 0?{}:a,u=e.aliases,f=u===void 0?{}:u,l=e.init,h=l===void 0?function(){}:l,c=e.update,d=c===void 0?function(){}:c,p=Object.keys(o).map(function(y){return new dl(y,o[y])});return function y(){for(var x=arguments.length,v=new Array(x),g=0;g<x;g++)v[g]=arguments[g];var A=!!(this instanceof y&&this.constructor),T=A?v.shift():void 0,b=v[0],w=b===void 0?{}:b,S=Object.assign({},r instanceof Function?r(w):r,{initialised:!1}),k={};function E(z){return I(z,w),R(),E}var I=function($,L){h.call(E,$,S,L),S.initialised=!0},R=Fi(function(){S.initialised&&(d.call(E,S,k),k={})},1);return p.forEach(function(z){E[z.name]=$(z);function $(L){var C=L.name,N=L.triggerUpdate,P=N===void 0?!1:N,D=L.onChange,H=D===void 0?function(_,M){}:D,q=L.defaultVal,G=q===void 0?null:q;return function(_){var M=S[C];if(!arguments.length)return M;var U=_===void 0?G:_;return S[C]=U,H.call(E,U,S,M),!k.hasOwnProperty(C)&&(k[C]=M),P&&R(),E}}}),Object.keys(s).forEach(function(z){E[z]=function(){for(var $,L=arguments.length,C=new Array(L),N=0;N<L;N++)C[N]=arguments[N];return($=s[z]).call.apply($,[E,S].concat(C))}}),Object.entries(f).forEach(function(z){var $=cl(z,2),L=$[0],C=$[1];return E[L]=E[C]}),E.resetProps=function(){return p.forEach(function(z){E[z.name](z.defaultVal)}),E},E.resetProps(),S._rerender=R,A&&T&&E(T),E}}var X=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function He(e){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},He(e)}var pl=/^\s+/,gl=/\s+$/;function F(e,n){if(e=e||"",n=n||{},e instanceof F)return e;if(!(this instanceof F))return new F(e,n);var r=yl(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}F.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,i,o,a,s,u;return r=n.r/255,i=n.g/255,o=n.b/255,r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),o<=.03928?u=o/12.92:u=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*s+.0722*u},setAlpha:function(n){return this._a=qi(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=zr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=zr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+i+"%, "+o+"%)":"hsva("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=Rr(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=Rr(this._r,this._g,this._b),r=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+i+"%, "+o+"%)":"hsla("+r+", "+i+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return Nr(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return xl(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Q(this._r,255)*100)+"%",g:Math.round(Q(this._g,255)*100)+"%",b:Math.round(Q(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Q(this._r,255)*100)+"%, "+Math.round(Q(this._g,255)*100)+"%, "+Math.round(Q(this._b,255)*100)+"%)":"rgba("+Math.round(Q(this._r,255)*100)+"%, "+Math.round(Q(this._g,255)*100)+"%, "+Math.round(Q(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Rl[Nr(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+Ir(this._r,this._g,this._b,this._a),i=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var a=F(n);i="#"+Ir(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+i+")"},toString:function(n){var r=!!n;n=n||this._format;var i=!1,o=this._a<1&&this._a>=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return F(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(Al,arguments)},brighten:function(){return this._applyModification(Cl,arguments)},darken:function(){return this._applyModification(Sl,arguments)},desaturate:function(){return this._applyModification(bl,arguments)},saturate:function(){return this._applyModification(wl,arguments)},greyscale:function(){return this._applyModification(kl,arguments)},spin:function(){return this._applyModification(Tl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(Pl,arguments)},complement:function(){return this._applyCombination(El,arguments)},monochromatic:function(){return this._applyCombination(Ol,arguments)},splitcomplement:function(){return this._applyCombination(Ml,arguments)},triad:function(){return this._applyCombination($r,[3])},tetrad:function(){return this._applyCombination($r,[4])}};F.fromRatio=function(e,n){if(He(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=se(e[i]));e=r}return F(e,n)};function yl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=$l(e)),He(e)=="object"&&(St(e.r)&&St(e.g)&&St(e.b)?(n=_l(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):St(e.h)&&St(e.s)&&St(e.v)?(i=se(e.s),o=se(e.v),n=ml(e.h,i,o),s=!0,u="hsv"):St(e.h)&&St(e.s)&&St(e.l)&&(i=se(e.s),a=se(e.l),n=vl(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=qi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function _l(e,n,r){return{r:Q(e,255)*255,g:Q(n,255)*255,b:Q(r,255)*255}}function Rr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,l:u}}function vl(e,n,r){var i,o,a;e=Q(e,360),n=Q(n,100),r=Q(r,100);function s(l,h,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?l+(h-l)*6*c:c<1/2?h:c<2/3?l+(h-l)*(2/3-c)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function zr(e,n,r){e=Q(e,255),n=Q(n,255),r=Q(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n<r?6:0);break;case n:a=(r-e)/f+2;break;case r:a=(e-n)/f+4;break}a/=6}return{h:a,s,v:u}}function ml(e,n,r){e=Q(e,360)*6,n=Q(n,100),r=Q(r,100);var i=Math.floor(e),o=e-i,a=r*(1-n),s=r*(1-o*n),u=r*(1-(1-o)*n),f=i%6,l=[r,s,a,a,u,r][f],h=[u,r,r,s,a,a][f],c=[a,a,u,r,r,s][f];return{r:l*255,g:h*255,b:c*255}}function Nr(e,n,r,i){var o=[_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function xl(e,n,r,i,o){var a=[_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16)),_t(Gi(i))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ir(e,n,r,i){var o=[_t(Gi(i)),_t(Math.round(e).toString(16)),_t(Math.round(n).toString(16)),_t(Math.round(r).toString(16))];return o.join("")}F.equals=function(e,n){return!e||!n?!1:F(e).toRgbString()==F(n).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function bl(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.s-=n/100,r.s=Xe(r.s),F(r)}function wl(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.s+=n/100,r.s=Xe(r.s),F(r)}function kl(e){return F(e).desaturate(100)}function Al(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.l+=n/100,r.l=Xe(r.l),F(r)}function Cl(e,n){n=n===0?0:n||10;var r=F(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),F(r)}function Sl(e,n){n=n===0?0:n||10;var r=F(e).toHsl();return r.l-=n/100,r.l=Xe(r.l),F(r)}function Tl(e,n){var r=F(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,F(r)}function El(e){var n=F(e).toHsl();return n.h=(n.h+180)%360,F(n)}function $r(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=F(e).toHsl(),i=[F(e)],o=360/n,a=1;a<n;a++)i.push(F({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function Ml(e){var n=F(e).toHsl(),r=n.h;return[F(e),F({h:(r+72)%360,s:n.s,l:n.l}),F({h:(r+216)%360,s:n.s,l:n.l})]}function Pl(e,n,r){n=n||6,r=r||30;var i=F(e).toHsl(),o=360/r,a=[F(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(F(i));return a}function Ol(e,n){n=n||6;for(var r=F(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(F({h:i,s:o,v:a})),a=(a+u)%1;return s}F.mix=function(e,n,r){r=r===0?0:r||50;var i=F(e).toRgb(),o=F(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return F(s)};F.readability=function(e,n){var r=F(e),i=F(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};F.isReadable=function(e,n,r){var i=F.readability(e,n),o,a;switch(a=!1,o=Dl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};F.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;l<n.length;l++)a=F.readability(e,n[l]),a>o&&(o=a,i=F(n[l]));return F.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,F.mostReadable(e,["#fff","#000"],r))};var Cn=F.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Rl=F.hexNames=zl(Cn);function zl(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function qi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Q(e,n){Nl(e)&&(e="100%");var r=Il(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Xe(e){return Math.min(1,Math.max(0,e))}function ft(e){return parseInt(e,16)}function Nl(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Il(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _t(e){return e.length==1?"0"+e:""+e}function se(e){return e<=1&&(e=e*100+"%"),e}function Gi(e){return Math.round(parseFloat(e)*255).toString(16)}function Dr(e){return ft(e)/255}var gt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function St(e){return!!gt.CSS_UNIT.exec(e)}function $l(e){e=e.replace(pl,"").replace(gl,"").toLowerCase();var n=!1;if(Cn[e])e=Cn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=gt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=gt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=gt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=gt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=gt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=gt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=gt.hex8.exec(e))?{r:ft(r[1]),g:ft(r[2]),b:ft(r[3]),a:Dr(r[4]),format:n?"name":"hex8"}:(r=gt.hex6.exec(e))?{r:ft(r[1]),g:ft(r[2]),b:ft(r[3]),format:n?"name":"hex"}:(r=gt.hex4.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),a:Dr(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=gt.hex3.exec(e))?{r:ft(r[1]+""+r[1]),g:ft(r[2]+""+r[2]),b:ft(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function Dl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function Sn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function jl(e){if(Array.isArray(e))return Sn(e)}function Vi(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function Ul(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ct(e,n){return e.get(Vi(e,n))}function jr(e,n,r){Ul(e,n),n.set(e,r)}function Ur(e,n,r){return e.set(Vi(e,n),r),r}function Ll(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Bl(i.key),i)}}function Hl(e,n,r){return n&&Ll(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ql(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vl(e){return jl(e)||ql(e)||Yl(e)||Gl()}function Wl(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bl(e){var n=Wl(e,"string");return typeof n=="symbol"?n:n+""}function Yl(e,n){if(e){if(typeof e=="string")return Sn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sn(e,n):void 0}}var Xl=123,Zl=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},Wi=function(n,r,i){return(n<<16)+(r<<8)+i},Kl=function(n){var r=F(n).toRgb(),i=r.r,o=r.g,a=r.b;return Wi(i,o,a)},Fr=function(n,r){return n*Xl%Math.pow(2,r)},Dt=new WeakMap,Tt=new WeakMap,Ql=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;Fl(this,e),jr(this,Dt,void 0),jr(this,Tt,void 0),Ur(Tt,this,n),this.reset()}return Hl(e,[{key:"reset",value:function(){Ur(Dt,this,["__reserved for background__"])}},{key:"register",value:function(r){if(ct(Dt,this).length>=Math.pow(2,24-ct(Tt,this)))return null;var i=ct(Dt,this).length,o=Fr(i,ct(Tt,this)),a=Zl(i+(o<<24-ct(Tt,this)));return ct(Dt,this).push(r),a}},{key:"lookup",value:function(r){if(!r)return null;var i=typeof r=="string"?Kl(r):Wi.apply(void 0,Vl(r));if(!i)return null;var o=i&Math.pow(2,24-ct(Tt,this))-1,a=i>>24-ct(Tt,this)&Math.pow(2,ct(Tt,this))-1;return Fr(o,ct(Tt,this))!==a||o>=ct(Dt,this).length?null:ct(Dt,this)[o]}}])})(),be,J,Bi,Yi,jt,Lr,Xi,Zi,Ki,qn,Tn,En,ye={},Qi=[],Jl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ze=Array.isArray;function bt(e,n){for(var r in n)e[r]=n[r];return e}function Gn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tc(e,n,r){var i,o,a,s={};for(a in n)a=="key"?i=n[a]:a=="ref"?o=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?be.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return ue(e,s,i,o,null)}function ue(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Bi,__i:-1,__u:0};return o==null&&J.vnode!=null&&J.vnode(a),a}function Ke(e){return e.children}function ze(e,n){this.props=e,this.context=n}function Xt(e,n){if(n==null)return e.__?Xt(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Xt(e):null}function Ji(e){var n,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ji(e)}}function Hr(e){(!e.__d&&(e.__d=!0)&&jt.push(e)&&!qe.__r++||Lr!=J.debounceRendering)&&((Lr=J.debounceRendering)||Xi)(qe)}function qe(){for(var e,n,r,i,o,a,s,u=1;jt.length;)jt.length>u&&jt.sort(Zi),e=jt.shift(),u=jt.length,e.__d&&(r=void 0,i=void 0,o=(i=(n=e).__v).__e,a=[],s=[],n.__P&&((r=bt({},i)).__v=i.__v+1,J.vnode&&J.vnode(r),Vn(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,a,o??Xt(i),!!(32&i.__u),s),r.__v=i.__v,r.__.__k[r.__i]=r,no(a,r,s),i.__e=i.__=null,r.__e!=o&&Ji(r)));qe.__r=0}function to(e,n,r,i,o,a,s,u,f,l,h){var c,d,p,y,x,v,g,A=i&&i.__k||Qi,T=n.length;for(f=ec(r,n,A,f,T),c=0;c<T;c++)(p=r.__k[c])!=null&&(d=p.__i==-1?ye:A[p.__i]||ye,p.__i=c,v=Vn(e,p,d,o,a,s,u,f,l,h),y=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Wn(d.ref,null,p),h.push(p.ref,p.__c||y,p)),x==null&&y!=null&&(x=y),(g=!!(4&p.__u))||d.__k===p.__k?f=eo(p,f,e,g):typeof p.type=="function"&&v!==void 0?f=v:y&&(f=y.nextSibling),p.__u&=-7);return r.__e=x,f}function ec(e,n,r,i,o){var a,s,u,f,l,h=r.length,c=h,d=0;for(e.__k=new Array(o),a=0;a<o;a++)(s=n[a])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[a]=ue(null,s,null,null,null):Ze(s)?s=e.__k[a]=ue(Ke,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[a]=ue(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,f=a+d,s.__=e,s.__b=e.__b+1,u=null,(l=s.__i=nc(s,r,f,c))!=-1&&(c--,(u=r[l])&&(u.__u|=2)),u==null||u.__v==null?(l==-1&&(o>h?d--:o<h&&d++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?d--:l==f+1?d++:(l>f?d--:d++,s.__u|=4))):e.__k[a]=null;if(c)for(a=0;a<h;a++)(u=r[a])!=null&&(2&u.__u)==0&&(u.__e==i&&(i=Xt(u)),io(u,u));return i}function eo(e,n,r,i){var o,a;if(typeof e.type=="function"){for(o=e.__k,a=0;o&&a<o.length;a++)o[a]&&(o[a].__=e,n=eo(o[a],n,r,i));return n}e.__e!=n&&(i&&(n&&e.type&&!n.parentNode&&(n=Xt(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function nc(e,n,r,i){var o,a,s,u=e.key,f=e.type,l=n[r],h=l!=null&&(2&l.__u)==0;if(l===null&&u==null||h&&u==l.key&&f==l.type)return r;if(i>(h?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if((l=n[s=o>=0?o--:a++])!=null&&(2&l.__u)==0&&u==l.key&&f==l.type)return s}return-1}function qr(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||Jl.test(n)?r:r+"px"}function Te(e,n,r,i,o){var a,s;t:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(n in i)r&&n in r||qr(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||qr(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")a=n!=(n=n.replace(Ki,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r.u=i.u:(r.u=qn,e.addEventListener(n,a?En:Tn,a)):e.removeEventListener(n,a?En:Tn,a);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function Gr(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n.t==null)n.t=qn++;else if(n.t<r.u)return;return r(J.event?J.event(n):n)}}}function Vn(e,n,r,i,o,a,s,u,f,l){var h,c,d,p,y,x,v,g,A,T,b,w,S,k,E,I,R,z=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),a=[u=n.__e=r.__e]),(h=J.__b)&&h(n);t:if(typeof z=="function")try{if(g=n.props,A="prototype"in z&&z.prototype.render,T=(h=z.contextType)&&i[h.__c],b=h?T?T.props.value:h.__:i,r.__c?v=(c=n.__c=r.__c).__=c.__E:(A?n.__c=c=new z(g,b):(n.__c=c=new ze(g,b),c.constructor=z,c.render=ic),T&&T.sub(c),c.state||(c.state={}),c.__n=i,d=c.__d=!0,c.__h=[],c._sb=[]),A&&c.__s==null&&(c.__s=c.state),A&&z.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=bt({},c.__s)),bt(c.__s,z.getDerivedStateFromProps(g,c.__s))),p=c.props,y=c.state,c.__v=n,d)A&&z.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),A&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(A&&z.getDerivedStateFromProps==null&&g!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,b),n.__v==r.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,b)===!1){for(n.__v!=r.__v&&(c.props=g,c.state=c.__s,c.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function($){$&&($.__=n)}),w=0;w<c._sb.length;w++)c.__h.push(c._sb[w]);c._sb=[],c.__h.length&&s.push(c);break t}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,b),A&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,y,x)})}if(c.context=b,c.props=g,c.__P=e,c.__e=!1,S=J.__r,k=0,A){for(c.state=c.__s,c.__d=!1,S&&S(n),h=c.render(c.props,c.state,c.context),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[]}else do c.__d=!1,S&&S(n),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++k<25);c.state=c.__s,c.getChildContext!=null&&(i=bt(bt({},i),c.getChildContext())),A&&!d&&c.getSnapshotBeforeUpdate!=null&&(x=c.getSnapshotBeforeUpdate(p,y)),I=h,h!=null&&h.type===Ke&&h.key==null&&(I=ro(h.props.children)),u=to(e,Ze(I)?I:[I],n,r,i,o,a,s,u,f,l),c.base=n.__e,n.__u&=-161,c.__h.length&&s.push(c),v&&(c.__E=c.__=null)}catch($){if(n.__v=null,f||a!=null)if($.then){for(n.__u|=f?160:128;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,n.__e=u}else{for(R=a.length;R--;)Gn(a[R]);Mn(n)}else n.__e=r.__e,n.__k=r.__k,$.then||Mn(n);J.__e($,n,r)}else a==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=rc(r.__e,n,r,i,o,a,s,f,l);return(h=J.diffed)&&h(n),128&n.__u?void 0:u}function Mn(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Mn)}function no(e,n,r){for(var i=0;i<r.length;i++)Wn(r[i],r[++i],r[++i]);J.__c&&J.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){J.__e(a,o.__v)}})}function ro(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ze(e)?e.map(ro):bt({},e)}function rc(e,n,r,i,o,a,s,u,f){var l,h,c,d,p,y,x,v=r.props||ye,g=n.props,A=n.type;if(A=="svg"?o="http://www.w3.org/2000/svg":A=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&"setAttribute"in p==!!A&&(A?p.localName==A:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(A==null)return document.createTextNode(g);e=document.createElementNS(o,A,g.is&&g),u&&(J.__m&&J.__m(n,a),u=!1),a=null}if(A==null)v===g||u&&e.data==g||(e.data=g);else{if(a=a&&be.call(e.childNodes),!u&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in g)){if(l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g)continue;Te(e,l,null,p,o)}}for(l in g)p=g[l],l=="children"?d=p:l=="dangerouslySetInnerHTML"?h=p:l=="value"?y=p:l=="checked"?x=p:u&&typeof p!="function"||v[l]===p||Te(e,l,p,v[l],o);if(h)u||c&&(h.__html==c.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(c&&(e.innerHTML=""),to(n.type=="template"?e.content:e,Ze(d)?d:[d],n,r,i,A=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,s,a?a[0]:r.__k&&Xt(r,0),u,f),a!=null)for(l=a.length;l--;)Gn(a[l]);u||(l="value",A=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||A=="progress"&&!y||A=="option"&&y!=v[l])&&Te(e,l,y,v[l],o),l="checked",x!=null&&x!=e[l]&&Te(e,l,x,v[l],o))}return e}function Wn(e,n,r){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(o){J.__e(o,r)}}function io(e,n,r){var i,o;if(J.unmount&&J.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Wn(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){J.__e(a,n)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&io(i[o],n,r||typeof e.type!="function");r||Gn(e.__e),e.__c=e.__=e.__e=void 0}function ic(e,n,r){return this.constructor(e,r)}function oc(e,n,r){var i,o,a,s;n==document&&(n=document.documentElement),J.__&&J.__(e,n),o=(i=!1)?null:n.__k,a=[],s=[],Vn(n,e=n.__k=tc(Ke,null,[e]),o||ye,ye,n.namespaceURI,o?null:n.firstChild?be.call(n.childNodes):null,a,o?o.__e:n.firstChild,i,s),no(a,e,s)}function oo(e,n,r){var i,o,a,s,u=bt({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)a=="key"?i=n[a]:a=="ref"?o=n[a]:u[a]=n[a]===void 0&&s!=null?s[a]:n[a];return arguments.length>2&&(u.children=arguments.length>3?be.call(arguments,2):r),ue(e.type,u,i||e.key,o||e.ref,null)}be=Qi.slice,J={__e:function(e,n,r,i){for(var o,a,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,i||{}),s=o.__d),s)return o.__E=o}catch(u){e=u}throw e}},Bi=0,Yi=function(e){return e!=null&&e.constructor===void 0},ze.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=bt({},this.state),typeof e=="function"&&(e=e(bt({},r),this.props)),e&&bt(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Hr(this))},ze.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Hr(this))},ze.prototype.render=Ke,jt=[],Xi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zi=function(e,n){return e.__v.__b-n.__v.__b},qe.__r=0,Ki=/(PointerCapture)$|Capture$/i,qn=0,Tn=Gr(!1),En=Gr(!0);function Vr(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function ac(e){if(Array.isArray(e))return e}function sc(e,n,r){return(n=dc(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function uc(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function fc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function lc(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Wr(Object(r),!0).forEach(function(i){sc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function cc(e,n){return ac(e)||uc(e,n)||pc(e,n)||fc()}function hc(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function dc(e){var n=hc(e,"string");return typeof n=="symbol"?n:n+""}function Ge(e){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ge(e)}function pc(e,n){if(e){if(typeof e=="string")return Vr(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vr(e,n):void 0}}var Pn=function(n){if(Ge(n)!=="object")return n;var r=oo(n);if(r.props){var i;r.props=lc({},r.props),r!=null&&(i=r.props)!==null&&i!==void 0&&i.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Pn):Pn(r.props.children))}return r},gc=function(n){return Yi(oo(n))},yc=function(n,r){delete r.__k,oc(Pn(n),r)};function _c(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var vc=`.float-tooltip-kap {
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
11
|
+
max-width: max(50%, 150px);
|
|
12
|
+
padding: 3px 5px;
|
|
13
|
+
border-radius: 3px;
|
|
14
|
+
font: 12px sans-serif;
|
|
15
|
+
color: #eee;
|
|
16
|
+
background: rgba(0,0,0,0.6);
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
`;_c(vc);var mc=Hn({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.style,a=o===void 0?{}:o,s=!!n&&Ge(n)==="object"&&!!n.node&&typeof n.node=="function",u=dt(s?n.node():n);u.style("position")==="static"&&u.style("position","relative"),r.tooltipEl=u.append("div").attr("class","float-tooltip-kap"),Object.entries(a).forEach(function(l){var h=cc(l,2),c=h[0],d=h[1];return r.tooltipEl.style(c,d)}),r.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,u.on("mousemove.".concat(f),function(l){r.mouseInside=!0;var h=xt(l),c=u.node(),d=c.offsetWidth,p=c.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(h[0]/d*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?p>130&&p-h[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseover.".concat(f),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),u.on("mouseout.".concat(f),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):gc(n.content)?(n.tooltipEl.text(""),yc(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function xc(e,n,r){var i,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function a(){var s,u=i.length,f,l=0,h=0,c=0;for(s=0;s<u;++s)f=i[s],l+=f.x||0,h+=f.y||0,c+=f.z||0;for(l=(l/u-e)*o,h=(h/u-n)*o,c=(c/u-r)*o,s=0;s<u;++s)f=i[s],l&&(f.x-=l),h&&(f.y-=h),c&&(f.z-=c)}return a.initialize=function(s){i=s},a.x=function(s){return arguments.length?(e=+s,a):e},a.y=function(s){return arguments.length?(n=+s,a):n},a.z=function(s){return arguments.length?(r=+s,a):r},a.strength=function(s){return arguments.length?(o=+s,a):o},a}function bc(e){const n=+this._x.call(null,e);return ao(this.cover(n),n,e)}function ao(e,n,r){if(isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,u=e._x1,f,l,h,c,d;if(!o)return e._root=a,e;for(;o.length;)if((h=n>=(f=(s+u)/2))?s=f:u=f,i=o,!(o=o[c=+h]))return i[c]=a,e;if(l=+e._x.call(null,o.data),n===l)return a.next=o,i?i[c]=a:e._root=a,e;do i=i?i[c]=new Array(2):e._root=new Array(2),(h=n>=(f=(s+u)/2))?s=f:u=f;while((c=+h)==(d=+(l>=f)));return i[d]=o,i[c]=a,e}function wc(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let i=1/0,o=-1/0;for(let a=0,s;a<n;++a)isNaN(s=+this._x.call(null,e[a]))||(r[a]=s,s<i&&(i=s),s>o&&(o=s));if(i>o)return this;this.cover(i).cover(o);for(let a=0;a<n;++a)ao(this,r[a],e[a]);return this}function kc(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i=r-n||1,o=this._root,a,s;n>e||e>=r;)switch(s=+(e<n),a=new Array(2),a[s]=o,o=a,i*=2,s){case 0:r=n+i;break;case 1:n=r-i;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function Ac(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Cc(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Rt(e,n,r){this.node=e,this.x0=n,this.x1=r}function Sc(e,n){var r,i=this._x0,o,a,s=this._x1,u=[],f=this._root,l,h;for(f&&u.push(new Rt(f,i,s)),n==null?n=1/0:(i=e-n,s=e+n);l=u.pop();)if(!(!(f=l.node)||(o=l.x0)>s||(a=l.x1)<i))if(f.length){var c=(o+a)/2;u.push(new Rt(f[1],c,a),new Rt(f[0],o,c)),(h=+(e>=c))&&(l=u[u.length-1],u[u.length-1]=u[u.length-1-h],u[u.length-1-h]=l)}else{var d=Math.abs(e-+this._x.call(null,f.data));d<n&&(n=d,i=e-d,s=e+d,r=f.data)}return r}function Tc(e){if(isNaN(f=+this._x.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._x1,f,l,h,c,d;if(!r)return this;if(r.length)for(;;){if((h=f>=(l=(s+u)/2))?s=l:u=l,n=r,!(r=r[c=+h]))return this;if(!r.length)break;n[c+1&1]&&(i=n,d=c)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[c]=a:delete n[c],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(i?i[d]=r:this._root=r),this):(this._root=a,this)}function Ec(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Mc(){return this._root}function Pc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Oc(e){var n=[],r,i=this._root,o,a,s;for(i&&n.push(new Rt(i,this._x0,this._x1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.x1)&&i.length){var u=(a+s)/2;(o=i[1])&&n.push(new Rt(o,u,s)),(o=i[0])&&n.push(new Rt(o,a,u))}return this}function Rc(e){var n=[],r=[],i;for(this._root&&n.push(new Rt(this._root,this._x0,this._x1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.x1,f=(s+u)/2;(a=o[0])&&n.push(new Rt(a,s,f)),(a=o[1])&&n.push(new Rt(a,f,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.x1);return this}function zc(e){return e[0]}function Nc(e){return arguments.length?(this._x=e,this):this._x}function so(e,n){var r=new Bn(n??zc,NaN,NaN);return e==null?r:r.addAll(e)}function Bn(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function Br(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ut=so.prototype=Bn.prototype;ut.copy=function(){var e=new Bn(this._x,this._x0,this._x1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Br(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(2)}):n.target[o]=Br(i));return e};ut.add=bc;ut.addAll=wc;ut.cover=kc;ut.data=Ac;ut.extent=Cc;ut.find=Sc;ut.remove=Tc;ut.removeAll=Ec;ut.root=Mc;ut.size=Pc;ut.visit=Oc;ut.visitAfter=Rc;ut.x=Nc;function Ic(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return uo(this.cover(n,r),n,r,e)}function uo(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var o,a=e._root,s={data:i},u=e._x0,f=e._y0,l=e._x1,h=e._y1,c,d,p,y,x,v,g,A;if(!a)return e._root=s,e;for(;a.length;)if((x=n>=(c=(u+l)/2))?u=c:l=c,(v=r>=(d=(f+h)/2))?f=d:h=d,o=a,!(a=a[g=v<<1|x]))return o[g]=s,e;if(p=+e._x.call(null,a.data),y=+e._y.call(null,a.data),n===p&&r===y)return s.next=a,o?o[g]=s:e._root=s,e;do o=o?o[g]=new Array(4):e._root=new Array(4),(x=n>=(c=(u+l)/2))?u=c:l=c,(v=r>=(d=(f+h)/2))?f=d:h=d;while((g=v<<1|x)===(A=(y>=d)<<1|p>=c));return o[A]=a,o[g]=s,e}function $c(e){var n,r,i=e.length,o,a,s=new Array(i),u=new Array(i),f=1/0,l=1/0,h=-1/0,c=-1/0;for(r=0;r<i;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(a=+this._y.call(null,n))||(s[r]=o,u[r]=a,o<f&&(f=o),o>h&&(h=o),a<l&&(l=a),a>c&&(c=a));if(f>h||l>c)return this;for(this.cover(f,l).cover(h,c),r=0;r<i;++r)uo(this,s[r],u[r],e[r]);return this}function Dc(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._x1,a=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,a=(i=Math.floor(n))+1;else{for(var s=o-r||1,u=this._root,f,l;r>e||e>=o||i>n||n>=a;)switch(l=(n<i)<<1|e<r,f=new Array(4),f[l]=u,u=f,s*=2,l){case 0:o=r+s,a=i+s;break;case 1:r=o-s,a=i+s;break;case 2:o=r+s,i=a-s;break;case 3:r=o-s,i=a-s;break}this._root&&this._root.length&&(this._root=u)}return this._x0=r,this._y0=i,this._x1=o,this._y1=a,this}function jc(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Uc(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function it(e,n,r,i,o){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=o}function Fc(e,n,r){var i,o=this._x0,a=this._y0,s,u,f,l,h=this._x1,c=this._y1,d=[],p=this._root,y,x;for(p&&d.push(new it(p,o,a,h,c)),r==null?r=1/0:(o=e-r,a=n-r,h=e+r,c=n+r,r*=r);y=d.pop();)if(!(!(p=y.node)||(s=y.x0)>h||(u=y.y0)>c||(f=y.x1)<o||(l=y.y1)<a))if(p.length){var v=(s+f)/2,g=(u+l)/2;d.push(new it(p[3],v,g,f,l),new it(p[2],s,g,v,l),new it(p[1],v,u,f,g),new it(p[0],s,u,v,g)),(x=(n>=g)<<1|e>=v)&&(y=d[d.length-1],d[d.length-1]=d[d.length-1-x],d[d.length-1-x]=y)}else{var A=e-+this._x.call(null,p.data),T=n-+this._y.call(null,p.data),b=A*A+T*T;if(b<r){var w=Math.sqrt(r=b);o=e-w,a=n-w,h=e+w,c=n+w,i=p.data}}return i}function Lc(e){if(isNaN(h=+this._x.call(null,e))||isNaN(c=+this._y.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._x1,l=this._y1,h,c,d,p,y,x,v,g;if(!r)return this;if(r.length)for(;;){if((y=h>=(d=(s+f)/2))?s=d:f=d,(x=c>=(p=(u+l)/2))?u=p:l=p,n=r,!(r=r[v=x<<1|y]))return this;if(!r.length)break;(n[v+1&3]||n[v+2&3]||n[v+3&3])&&(i=n,g=v)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[v]=a:delete n[v],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[g]=r:this._root=r),this):(this._root=a,this)}function Hc(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function qc(){return this._root}function Gc(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Vc(e){var n=[],r,i=this._root,o,a,s,u,f;for(i&&n.push(new it(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.x1,f=r.y1)&&i.length){var l=(a+u)/2,h=(s+f)/2;(o=i[3])&&n.push(new it(o,l,h,u,f)),(o=i[2])&&n.push(new it(o,a,h,l,f)),(o=i[1])&&n.push(new it(o,l,s,u,h)),(o=i[0])&&n.push(new it(o,a,s,l,h))}return this}function Wc(e){var n=[],r=[],i;for(this._root&&n.push(new it(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.x1,l=i.y1,h=(s+f)/2,c=(u+l)/2;(a=o[0])&&n.push(new it(a,s,u,h,c)),(a=o[1])&&n.push(new it(a,h,u,f,c)),(a=o[2])&&n.push(new it(a,s,c,h,l)),(a=o[3])&&n.push(new it(a,h,c,f,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Bc(e){return e[0]}function Yc(e){return arguments.length?(this._x=e,this):this._x}function Xc(e){return e[1]}function Zc(e){return arguments.length?(this._y=e,this):this._y}function fo(e,n,r){var i=new Yn(n??Bc,r??Xc,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Yn(e,n,r,i,o,a){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=o,this._y1=a,this._root=void 0}function Yr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ot=fo.prototype=Yn.prototype;ot.copy=function(){var e=new Yn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Yr(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(4)}):n.target[o]=Yr(i));return e};ot.add=Ic;ot.addAll=$c;ot.cover=Dc;ot.data=jc;ot.extent=Uc;ot.find=Fc;ot.remove=Lc;ot.removeAll=Hc;ot.root=qc;ot.size=Gc;ot.visit=Vc;ot.visitAfter=Wc;ot.x=Yc;ot.y=Zc;function Kc(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return lo(this.cover(n,r,i),n,r,i,e)}function lo(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,s=e._root,u={data:o},f=e._x0,l=e._y0,h=e._z0,c=e._x1,d=e._y1,p=e._z1,y,x,v,g,A,T,b,w,S,k,E;if(!s)return e._root=u,e;for(;s.length;)if((b=n>=(y=(f+c)/2))?f=y:c=y,(w=r>=(x=(l+d)/2))?l=x:d=x,(S=i>=(v=(h+p)/2))?h=v:p=v,a=s,!(s=s[k=S<<2|w<<1|b]))return a[k]=u,e;if(g=+e._x.call(null,s.data),A=+e._y.call(null,s.data),T=+e._z.call(null,s.data),n===g&&r===A&&i===T)return u.next=s,a?a[k]=u:e._root=u,e;do a=a?a[k]=new Array(8):e._root=new Array(8),(b=n>=(y=(f+c)/2))?f=y:c=y,(w=r>=(x=(l+d)/2))?l=x:d=x,(S=i>=(v=(h+p)/2))?h=v:p=v;while((k=S<<2|w<<1|b)===(E=(T>=v)<<2|(A>=x)<<1|g>=y));return a[E]=s,a[k]=u,e}function Qc(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n);let a=1/0,s=1/0,u=1/0,f=-1/0,l=-1/0,h=-1/0;for(let c=0,d,p,y,x;c<n;++c)isNaN(p=+this._x.call(null,d=e[c]))||isNaN(y=+this._y.call(null,d))||isNaN(x=+this._z.call(null,d))||(r[c]=p,i[c]=y,o[c]=x,p<a&&(a=p),p>f&&(f=p),y<s&&(s=y),y>l&&(l=y),x<u&&(u=x),x>h&&(h=x));if(a>f||s>l||u>h)return this;this.cover(a,s,u).cover(f,l,h);for(let c=0;c<n;++c)lo(this,r[c],i[c],o[c],e[c]);return this}function Jc(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,s=this._x1,u=this._y1,f=this._z1;if(isNaN(i))s=(i=Math.floor(e))+1,u=(o=Math.floor(n))+1,f=(a=Math.floor(r))+1;else{for(var l=s-i||1,h=this._root,c,d;i>e||e>=s||o>n||n>=u||a>r||r>=f;)switch(d=(r<a)<<2|(n<o)<<1|e<i,c=new Array(8),c[d]=h,h=c,l*=2,d){case 0:s=i+l,u=o+l,f=a+l;break;case 1:i=s-l,u=o+l,f=a+l;break;case 2:s=i+l,o=u-l,f=a+l;break;case 3:i=s-l,o=u-l,f=a+l;break;case 4:s=i+l,u=o+l,a=f-l;break;case 5:i=s-l,u=o+l,a=f-l;break;case 6:s=i+l,o=u-l,a=f-l;break;case 7:i=s-l,o=u-l,a=f-l;break}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this}function th(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function eh(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Z(e,n,r,i,o,a,s){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=s}function nh(e,n,r,i){var o,a=this._x0,s=this._y0,u=this._z0,f,l,h,c,d,p,y=this._x1,x=this._y1,v=this._z1,g=[],A=this._root,T,b;for(A&&g.push(new Z(A,a,s,u,y,x,v)),i==null?i=1/0:(a=e-i,s=n-i,u=r-i,y=e+i,x=n+i,v=r+i,i*=i);T=g.pop();)if(!(!(A=T.node)||(f=T.x0)>y||(l=T.y0)>x||(h=T.z0)>v||(c=T.x1)<a||(d=T.y1)<s||(p=T.z1)<u))if(A.length){var w=(f+c)/2,S=(l+d)/2,k=(h+p)/2;g.push(new Z(A[7],w,S,k,c,d,p),new Z(A[6],f,S,k,w,d,p),new Z(A[5],w,l,k,c,S,p),new Z(A[4],f,l,k,w,S,p),new Z(A[3],w,S,h,c,d,k),new Z(A[2],f,S,h,w,d,k),new Z(A[1],w,l,h,c,S,k),new Z(A[0],f,l,h,w,S,k)),(b=(r>=k)<<2|(n>=S)<<1|e>=w)&&(T=g[g.length-1],g[g.length-1]=g[g.length-1-b],g[g.length-1-b]=T)}else{var E=e-+this._x.call(null,A.data),I=n-+this._y.call(null,A.data),R=r-+this._z.call(null,A.data),z=E*E+I*I+R*R;if(z<i){var $=Math.sqrt(i=z);a=e-$,s=n-$,u=r-$,y=e+$,x=n+$,v=r+$,o=A.data}}return o}const rh=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function ih(e,n,r,i){const o=[],a=e-i,s=n-i,u=r-i,f=e+i,l=n+i,h=r+i;return this.visit((c,d,p,y,x,v,g)=>{if(!c.length)do{const A=c.data;rh(e,n,r,this._x(A),this._y(A),this._z(A))<=i&&o.push(A)}while(c=c.next);return d>f||p>l||y>h||x<a||v<s||g<u}),o}function oh(e){if(isNaN(d=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,i,o,a,s=this._x0,u=this._y0,f=this._z0,l=this._x1,h=this._y1,c=this._z1,d,p,y,x,v,g,A,T,b,w,S;if(!r)return this;if(r.length)for(;;){if((A=d>=(x=(s+l)/2))?s=x:l=x,(T=p>=(v=(u+h)/2))?u=v:h=v,(b=y>=(g=(f+c)/2))?f=g:c=g,n=r,!(r=r[w=b<<2|T<<1|A]))return this;if(!r.length)break;(n[w+1&7]||n[w+2&7]||n[w+3&7]||n[w+4&7]||n[w+5&7]||n[w+6&7]||n[w+7&7])&&(i=n,S=w)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,o?(a?o.next=a:delete o.next,this):n?(a?n[w]=a:delete n[w],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[S]=r:this._root=r),this):(this._root=a,this)}function ah(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function sh(){return this._root}function uh(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function fh(e){var n=[],r,i=this._root,o,a,s,u,f,l,h;for(i&&n.push(new Z(i,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(i=r.node,a=r.x0,s=r.y0,u=r.z0,f=r.x1,l=r.y1,h=r.z1)&&i.length){var c=(a+f)/2,d=(s+l)/2,p=(u+h)/2;(o=i[7])&&n.push(new Z(o,c,d,p,f,l,h)),(o=i[6])&&n.push(new Z(o,a,d,p,c,l,h)),(o=i[5])&&n.push(new Z(o,c,s,p,f,d,h)),(o=i[4])&&n.push(new Z(o,a,s,p,c,d,h)),(o=i[3])&&n.push(new Z(o,c,d,u,f,l,p)),(o=i[2])&&n.push(new Z(o,a,d,u,c,l,p)),(o=i[1])&&n.push(new Z(o,c,s,u,f,d,p)),(o=i[0])&&n.push(new Z(o,a,s,u,c,d,p))}return this}function lh(e){var n=[],r=[],i;for(this._root&&n.push(new Z(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));i=n.pop();){var o=i.node;if(o.length){var a,s=i.x0,u=i.y0,f=i.z0,l=i.x1,h=i.y1,c=i.z1,d=(s+l)/2,p=(u+h)/2,y=(f+c)/2;(a=o[0])&&n.push(new Z(a,s,u,f,d,p,y)),(a=o[1])&&n.push(new Z(a,d,u,f,l,p,y)),(a=o[2])&&n.push(new Z(a,s,p,f,d,h,y)),(a=o[3])&&n.push(new Z(a,d,p,f,l,h,y)),(a=o[4])&&n.push(new Z(a,s,u,y,d,p,c)),(a=o[5])&&n.push(new Z(a,d,u,y,l,p,c)),(a=o[6])&&n.push(new Z(a,s,p,y,d,h,c)),(a=o[7])&&n.push(new Z(a,d,p,y,l,h,c))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.z0,i.x1,i.y1,i.z1);return this}function ch(e){return e[0]}function hh(e){return arguments.length?(this._x=e,this):this._x}function dh(e){return e[1]}function ph(e){return arguments.length?(this._y=e,this):this._y}function gh(e){return e[2]}function yh(e){return arguments.length?(this._z=e,this):this._z}function co(e,n,r,i){var o=new Xn(n??ch,r??dh,i??gh,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Xn(e,n,r,i,o,a,s,u,f){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=s,this._y1=u,this._z1=f,this._root=void 0}function Xr(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var nt=co.prototype=Xn.prototype;nt.copy=function(){var e=new Xn(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Xr(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(i=n.source[o])&&(i.length?r.push({source:i,target:n.target[o]=new Array(8)}):n.target[o]=Xr(i));return e};nt.add=Kc;nt.addAll=Qc;nt.cover=Jc;nt.data=th;nt.extent=eh;nt.find=nh;nt.findAllWithinRadius=ih;nt.remove=oh;nt.removeAll=ah;nt.root=sh;nt.size=uh;nt.visit=fh;nt.visitAfter=lh;nt.x=hh;nt.y=ph;nt.z=yh;function Ot(e){return function(){return e}}function Mt(e){return(e()-.5)*1e-6}function _h(e){return e.index}function Zr(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function vh(e){var n=_h,r=d,i,o=Ot(30),a,s,u,f,l,h,c=1;e==null&&(e=[]);function d(g){return 1/Math.min(f[g.source.index],f[g.target.index])}function p(g){for(var A=0,T=e.length;A<c;++A)for(var b=0,w,S,k,E=0,I=0,R=0,z,$;b<T;++b)w=e[b],S=w.source,k=w.target,E=k.x+k.vx-S.x-S.vx||Mt(h),u>1&&(I=k.y+k.vy-S.y-S.vy||Mt(h)),u>2&&(R=k.z+k.vz-S.z-S.vz||Mt(h)),z=Math.sqrt(E*E+I*I+R*R),z=(z-a[b])/z*g*i[b],E*=z,I*=z,R*=z,k.vx-=E*($=l[b]),u>1&&(k.vy-=I*$),u>2&&(k.vz-=R*$),S.vx+=E*($=1-$),u>1&&(S.vy+=I*$),u>2&&(S.vz+=R*$)}function y(){if(s){var g,A=s.length,T=e.length,b=new Map(s.map((S,k)=>[n(S,k,s),S])),w;for(g=0,f=new Array(A);g<T;++g)w=e[g],w.index=g,typeof w.source!="object"&&(w.source=Zr(b,w.source)),typeof w.target!="object"&&(w.target=Zr(b,w.target)),f[w.source.index]=(f[w.source.index]||0)+1,f[w.target.index]=(f[w.target.index]||0)+1;for(g=0,l=new Array(T);g<T;++g)w=e[g],l[g]=f[w.source.index]/(f[w.source.index]+f[w.target.index]);i=new Array(T),x(),a=new Array(T),v()}}function x(){if(s)for(var g=0,A=e.length;g<A;++g)i[g]=+r(e[g],g,e)}function v(){if(s)for(var g=0,A=e.length;g<A;++g)a[g]=+o(e[g],g,e)}return p.initialize=function(g,...A){s=g,h=A.find(T=>typeof T=="function")||Math.random,u=A.find(T=>[1,2,3].includes(T))||2,y()},p.links=function(g){return arguments.length?(e=g,y(),p):e},p.id=function(g){return arguments.length?(n=g,p):n},p.iterations=function(g){return arguments.length?(c=+g,p):c},p.strength=function(g){return arguments.length?(r=typeof g=="function"?g:Ot(+g),x(),p):r},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:Ot(+g),v(),p):o},p}const mh=1664525,xh=1013904223,Kr=4294967296;function bh(){let e=1;return()=>(e=(mh*e+xh)%Kr)/Kr}var Qr=3;function fn(e){return e.x}function Jr(e){return e.y}function wh(e){return e.z}var kh=10,Ah=Math.PI*(3-Math.sqrt(5)),Ch=Math.PI*20/(9+Math.sqrt(221));function Sh(e,n){n=n||2;var r=Math.min(Qr,Math.max(1,Math.round(n))),i,o=1,a=.001,s=1-Math.pow(a,1/300),u=0,f=.6,l=new Map,h=jn(p),c=me("tick","end"),d=bh();e==null&&(e=[]);function p(){y(),c.call("tick",i),o<a&&(h.stop(),c.call("end",i))}function y(g){var A,T=e.length,b;g===void 0&&(g=1);for(var w=0;w<g;++w)for(o+=(u-o)*s,l.forEach(function(S){S(o)}),A=0;A<T;++A)b=e[A],b.fx==null?b.x+=b.vx*=f:(b.x=b.fx,b.vx=0),r>1&&(b.fy==null?b.y+=b.vy*=f:(b.y=b.fy,b.vy=0)),r>2&&(b.fz==null?b.z+=b.vz*=f:(b.z=b.fz,b.vz=0));return i}function x(){for(var g=0,A=e.length,T;g<A;++g){if(T=e[g],T.index=g,T.fx!=null&&(T.x=T.fx),T.fy!=null&&(T.y=T.fy),T.fz!=null&&(T.z=T.fz),isNaN(T.x)||r>1&&isNaN(T.y)||r>2&&isNaN(T.z)){var b=kh*(r>2?Math.cbrt(.5+g):r>1?Math.sqrt(.5+g):g),w=g*Ah,S=g*Ch;r===1?T.x=b:r===2?(T.x=b*Math.cos(w),T.y=b*Math.sin(w)):(T.x=b*Math.sin(w)*Math.cos(S),T.y=b*Math.cos(w),T.z=b*Math.sin(w)*Math.sin(S))}(isNaN(T.vx)||r>1&&isNaN(T.vy)||r>2&&isNaN(T.vz))&&(T.vx=0,r>1&&(T.vy=0),r>2&&(T.vz=0))}}function v(g){return g.initialize&&g.initialize(e,d,r),g}return x(),i={tick:y,restart:function(){return h.restart(p),i},stop:function(){return h.stop(),i},numDimensions:function(g){return arguments.length?(r=Math.min(Qr,Math.max(1,Math.round(g))),l.forEach(v),i):r},nodes:function(g){return arguments.length?(e=g,x(),l.forEach(v),i):e},alpha:function(g){return arguments.length?(o=+g,i):o},alphaMin:function(g){return arguments.length?(a=+g,i):a},alphaDecay:function(g){return arguments.length?(s=+g,i):+s},alphaTarget:function(g){return arguments.length?(u=+g,i):u},velocityDecay:function(g){return arguments.length?(f=1-g,i):1-f},randomSource:function(g){return arguments.length?(d=g,l.forEach(v),i):d},force:function(g,A){return arguments.length>1?(A==null?l.delete(g):l.set(g,v(A)),i):l.get(g)},find:function(){var g=Array.prototype.slice.call(arguments),A=g.shift()||0,T=(r>1?g.shift():null)||0,b=(r>2?g.shift():null)||0,w=g.shift()||1/0,S=0,k=e.length,E,I,R,z,$,L;for(w*=w,S=0;S<k;++S)$=e[S],E=A-$.x,I=T-($.y||0),R=b-($.z||0),z=E*E+I*I+R*R,z<w&&(L=$,w=z);return L},on:function(g,A){return arguments.length>1?(c.on(g,A),i):c.on(g)}}}function Th(){var e,n,r,i,o,a=Ot(-30),s,u=1,f=1/0,l=.81;function h(y){var x,v=e.length,g=(n===1?so(e,fn):n===2?fo(e,fn,Jr):n===3?co(e,fn,Jr,wh):null).visitAfter(d);for(o=y,x=0;x<v;++x)r=e[x],g.visit(p)}function c(){if(e){var y,x=e.length,v;for(s=new Array(x),y=0;y<x;++y)v=e[y],s[v.index]=+a(v,y,e)}}function d(y){var x=0,v,g,A=0,T,b,w,S,k=y.length;if(k){for(T=b=w=S=0;S<k;++S)(v=y[S])&&(g=Math.abs(v.value))&&(x+=v.value,A+=g,T+=g*(v.x||0),b+=g*(v.y||0),w+=g*(v.z||0));x*=Math.sqrt(4/k),y.x=T/A,n>1&&(y.y=b/A),n>2&&(y.z=w/A)}else{v=y,v.x=v.data.x,n>1&&(v.y=v.data.y),n>2&&(v.z=v.data.z);do x+=s[v.data.index];while(v=v.next)}y.value=x}function p(y,x,v,g,A){if(!y.value)return!0;var T=[v,g,A][n-1],b=y.x-r.x,w=n>1?y.y-r.y:0,S=n>2?y.z-r.z:0,k=T-x,E=b*b+w*w+S*S;if(k*k/l<E)return E<f&&(b===0&&(b=Mt(i),E+=b*b),n>1&&w===0&&(w=Mt(i),E+=w*w),n>2&&S===0&&(S=Mt(i),E+=S*S),E<u&&(E=Math.sqrt(u*E)),r.vx+=b*y.value*o/E,n>1&&(r.vy+=w*y.value*o/E),n>2&&(r.vz+=S*y.value*o/E)),!0;if(y.length||E>=f)return;(y.data!==r||y.next)&&(b===0&&(b=Mt(i),E+=b*b),n>1&&w===0&&(w=Mt(i),E+=w*w),n>2&&S===0&&(S=Mt(i),E+=S*S),E<u&&(E=Math.sqrt(u*E)));do y.data!==r&&(k=s[y.data.index]*o/E,r.vx+=b*k,n>1&&(r.vy+=w*k),n>2&&(r.vz+=S*k));while(y=y.next)}return h.initialize=function(y,...x){e=y,i=x.find(v=>typeof v=="function")||Math.random,n=x.find(v=>[1,2,3].includes(v))||2,c()},h.strength=function(y){return arguments.length?(a=typeof y=="function"?y:Ot(+y),c(),h):a},h.distanceMin=function(y){return arguments.length?(u=y*y,h):Math.sqrt(u)},h.distanceMax=function(y){return arguments.length?(f=y*y,h):Math.sqrt(f)},h.theta=function(y){return arguments.length?(l=y*y,h):Math.sqrt(l)},h}function Eh(e,n,r,i){var o,a,s=Ot(.1),u,f;typeof e!="function"&&(e=Ot(+e)),n==null&&(n=0),r==null&&(r=0),i==null&&(i=0);function l(c){for(var d=0,p=o.length;d<p;++d){var y=o[d],x=y.x-n||1e-6,v=(y.y||0)-r||1e-6,g=(y.z||0)-i||1e-6,A=Math.sqrt(x*x+v*v+g*g),T=(f[d]-A)*u[d]*c/A;y.vx+=x*T,a>1&&(y.vy+=v*T),a>2&&(y.vz+=g*T)}}function h(){if(o){var c,d=o.length;for(u=new Array(d),f=new Array(d),c=0;c<d;++c)f[c]=+e(o[c],c,o),u[c]=isNaN(f[c])?0:+s(o[c],c,o)}}return l.initialize=function(c,...d){o=c,a=d.find(p=>[1,2,3].includes(p))||2,h()},l.strength=function(c){return arguments.length?(s=typeof c=="function"?c:Ot(+c),h(),l):s},l.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Ot(+c),h(),l):e},l.x=function(c){return arguments.length?(n=+c,l):n},l.y=function(c){return arguments.length?(r=+c,l):r},l.z=function(c){return arguments.length?(i=+c,l):i},l}const{abs:Jt,cos:Et,sin:qt,acos:Mh,atan2:te,sqrt:Nt,pow:ht}=Math;function ee(e){return e<0?-ht(-e,1/3):ht(e,1/3)}const ho=Math.PI,Ee=2*ho,It=ho/2,Ph=1e-6,ln=Number.MAX_SAFE_INTEGER||9007199254740991,cn=Number.MIN_SAFE_INTEGER||-9007199254740991,Oh={x:0,y:0,z:0},O={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),Nt(i)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const i=n.length-1;if(e===1)return n[i].t=1,n[i];const o=1-e;let a=n;if(i===0)return n[0].t=e,n[0];if(i===1){const u={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(u.z=o*a[0].z+e*a[1].z),u}if(i<4){let u=o*o,f=e*e,l,h,c,d=0;i===2?(a=[a[0],a[1],a[2],Oh],l=u,h=o*e*2,c=f):i===3&&(l=u*o,h=u*e*3,c=o*f*3,d=e*f);const p={x:l*a[0].x+h*a[1].x+c*a[2].x+d*a[3].x,y:l*a[0].y+h*a[1].y+c*a[2].y+d*a[3].y,t:e};return r&&(p.z=l*a[0].z+h*a[1].z+c*a[2].z+d*a[3].z),p}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let u=0;u<s.length-1;u++)s[u]={x:s[u].x+(s[u+1].x-s[u].x)*e,y:s[u].y+(s[u+1].y-s[u].y)*e},typeof s[u].z<"u"&&(s[u].z=s[u].z+(s[u+1].z-s[u].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,i){const o=1-e,a=r,s=n;let u=a[0],f=a[1],l=a[2],h=a[3],c;if(u*=o,f*=e,s.length===2)return c=u+f,{x:(u*s[0].x+f*s[1].x)/c,y:(u*s[0].y+f*s[1].y)/c,z:i?(u*s[0].z+f*s[1].z)/c:!1,t:e};if(u*=o,f*=2*o,l*=e*e,s.length===3)return c=u+f+l,{x:(u*s[0].x+f*s[1].x+l*s[2].x)/c,y:(u*s[0].y+f*s[1].y+l*s[2].y)/c,z:i?(u*s[0].z+f*s[1].z+l*s[2].z)/c:!1,t:e};if(u*=o,f*=1.5*o,l*=3*o,h*=e*e*e,s.length===4)return c=u+f+l+h,{x:(u*s[0].x+f*s[1].x+l*s[2].x+h*s[3].x)/c,y:(u*s[0].y+f*s[1].y+l*s[2].y+h*s[3].y)/c,z:i?(u*s[0].z+f*s[1].z+l*s[2].z+h*s[3].z)/c:!1,t:e}},derive:function(e,n){const r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){const s=[];for(let u=0,f;u<a;u++)f={x:a*(i[u+1].x-i[u].x),y:a*(i[u+1].y-i[u].y)},n&&(f.z=a*(i[u+1].z-i[u].z)),s.push(f);r.push(s),i=s}return r},between:function(e,n,r){return n<=e&&e<=r||O.approximately(e,n)||O.approximately(e,r)},approximately:function(e,n,r){return Jt(e-n)<=(r||Ph)},length:function(e){const r=O.Tvalues.length;let i=0;for(let o=0,a;o<r;o++)a=.5*O.Tvalues[o]+.5,i+=O.Cvalues[o]*O.arcfn(a,e);return .5*i},map:function(e,n,r,i,o){const a=r-n,s=o-i,u=e-n,f=u/a;return i+s*f},lerp:function(e,n,r){const i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(O.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,s=r.y-e.y,u=i*s-o*a,f=i*a+o*s;return te(u,f)},round:function(e,n){const r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){const r=e.x-n.x,i=e.y-n.y;return Nt(r*r+i*i)},closest:function(e,n){let r=ht(2,63),i,o;return e.forEach(function(a,s){o=O.dist(n,a),o<r&&(r=o,i=s)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=ht(e,n)+ht(1-e,n),i=r-1;return Jt(i/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=ht(1-e,n),i=ht(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,s,u){const f=(e*i-n*r)*(o-s)-(e-r)*(o*u-a*s),l=(e*i-n*r)*(a-u)-(n-i)*(o*u-a*s),h=(e-r)*(a-u)-(n-i)*(o-s);return h==0?!1:{x:f/h,y:l/h}},lli4:function(e,n,r,i){const o=e.x,a=e.y,s=n.x,u=n.y,f=r.x,l=r.y,h=i.x,c=i.y;return O.lli8(o,a,s,u,f,l,h,c)},lli:function(e,n){return O.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new K(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=ln,r=ln,i=cn,o=cn;return e.forEach(function(a){const s=a.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),i<s.x.max&&(i=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!O.bboxoverlap(n,i))return[];const a=[],s=[e.startcap,e.forward,e.back,e.endcap],u=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(f){f.virtual||u.forEach(function(l){if(l.virtual)return;const h=f.intersects(l,o);h.length>0&&(h.c1=f,h.c2=l,h.s1=e,h.s2=r,a.push(h))})}),a},makeshape:function(e,n,r){const i=n.points.length,o=e.points.length,a=O.makeline(n.points[i-1],e.points[0]),s=O.makeline(e.points[o-1],n.points[0]),u={startcap:a,forward:e,back:n,endcap:s,bbox:O.findbbox([a,e,n,s])};return u.intersections=function(f){return O.shapeintersections(u,u.bbox,f,f.bbox,r)},u},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=ln,o=cn,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let u=0,f=r.length;u<f;u++)a=r[u],s=e.get(a),s[n]<i&&(i=s[n]),s[n]>o&&(o=s[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){const r=n.p1.x,i=n.p1.y,o=-te(n.p2.y-i,n.p2.x-r),a=function(s){return{x:(s.x-r)*Et(o)-(s.y-i)*qt(o),y:(s.x-r)*qt(o)+(s.y-i)*Et(o)}};return e.map(a)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,i=O.align(e,n),o=function(k){return 0<=k&&k<=1};if(r===2){const k=i[0].y,E=i[1].y,I=i[2].y,R=k-2*E+I;if(R!==0){const z=-Nt(E*E-k*I),$=-k+E,L=-(z+$)/R,C=-(-z+$)/R;return[L,C].filter(o)}else if(E!==I&&R===0)return[(2*E-I)/(2*E-2*I)].filter(o);return[]}const a=i[0].y,s=i[1].y,u=i[2].y,f=i[3].y;let l=-a+3*s-3*u+f,h=3*a-6*s+3*u,c=-3*a+3*s,d=a;if(O.approximately(l,0)){if(O.approximately(h,0))return O.approximately(c,0)?[]:[-d/c].filter(o);const k=Nt(c*c-4*h*d),E=2*h;return[(k-c)/E,(-c-k)/E].filter(o)}h/=l,c/=l,d/=l;const p=(3*c-h*h)/3,y=p/3,x=(2*h*h*h-9*h*c+27*d)/27,v=x/2,g=v*v+y*y*y;let A,T,b,w,S;if(g<0){const k=-p/3,E=k*k*k,I=Nt(E),R=-x/(2*I),z=R<-1?-1:R>1?1:R,$=Mh(z),L=ee(I),C=2*L;return b=C*Et($/3)-h/3,w=C*Et(($+Ee)/3)-h/3,S=C*Et(($+2*Ee)/3)-h/3,[b,w,S].filter(o)}else{if(g===0)return A=v<0?ee(-v):-ee(v),b=2*A-h/3,w=-A-h/3,[b,w].filter(o);{const k=Nt(g);return A=ee(-v+k),T=ee(v+k),[A-T-h/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(o!==0){const a=-Nt(r*r-n*i),s=-n+r,u=-(a+s)/o,f=-(-a+s)/o;return[u,f]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,i,o){let a,s,u,f,l=0,h=0;const c=O.compute(e,n),d=O.compute(e,r),p=c.x*c.x+c.y*c.y;if(i?(a=Nt(ht(c.y*d.z-d.y*c.z,2)+ht(c.z*d.x-d.z*c.x,2)+ht(c.x*d.y-d.x*c.y,2)),s=ht(p+c.z*c.z,3/2)):(a=c.x*d.y-c.y*d.x,s=ht(p,3/2)),a===0||s===0)return{k:0,r:0};if(l=a/s,h=s/a,!o){const y=O.curvature(e-.001,n,r,i,!0).k,x=O.curvature(e+.001,n,r,i,!0).k;f=(x-l+(l-y))/2,u=(Jt(x-l)+Jt(l-y))/2}return{k:l,r:h,dk:f,adk:u}},inflections:function(e){if(e.length<4)return[];const n=O.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=n[3].x*n[2].y,s=18*(-3*r+2*i+3*o-a),u=18*(3*r-i-3*o),f=18*(o-r);if(O.approximately(s,0)){if(!O.approximately(u,0)){let d=-f/u;if(0<=d&&d<=1)return[d]}return[]}const l=2*s;if(O.approximately(l,0))return[];const h=u*u-4*s*f;if(h<0)return[];const c=Math.sqrt(h);return[(c-u)/l,-(u+c)/l].filter(function(d){return 0<=d&&d<=1})},bboxoverlap:function(e,n){const r=["x","y"],i=r.length;for(let o=0,a,s,u,f;o<i;o++)if(a=r[o],s=e[a].mid,u=n[a].mid,f=(e[a].size+n[a].size)/2,Jt(s-u)>=f)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const i=e.bbox(),o=n.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.size<s&&o.x.size+o.y.size<s)return[(a*(e._t1+e._t2)/2|0)/a+"/"+(a*(n._t1+n._t2)/2|0)/a];let u=e.split(.5),f=n.split(.5),l=[{left:u.left,right:f.left},{left:u.left,right:f.right},{left:u.right,right:f.right},{left:u.right,right:f.left}];l=l.filter(function(c){return O.bboxoverlap(c.left.bbox(),c.right.bbox())});let h=[];return l.length===0||(l.forEach(function(c){h=h.concat(O.pairiteration(c.left,c.right,s))}),h=h.filter(function(c,d){return h.indexOf(c)===d})),h},getccenter:function(e,n,r){const i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,s=r.y-n.y,u=i*Et(It)-o*qt(It),f=i*qt(It)+o*Et(It),l=a*Et(It)-s*qt(It),h=a*qt(It)+s*Et(It),c=(e.x+n.x)/2,d=(e.y+n.y)/2,p=(n.x+r.x)/2,y=(n.y+r.y)/2,x=c+u,v=d+f,g=p+l,A=y+h,T=O.lli8(c,d,x,v,p,y,g,A),b=O.dist(T,e);let w=te(e.y-T.y,e.x-T.x),S=te(n.y-T.y,n.x-T.x),k=te(r.y-T.y,r.x-T.x),E;return w<k?((w>S||S>k)&&(w+=Ee),w>k&&(E=k,k=w,w=E)):k<S&&S<w?(E=k,k=w,w=E):k+=Ee,T.s=w,T.e=k,T.r=b,T},numberSort:function(e,n){return e-n}};class fe{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return O.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),i=1;i<n.length;i++)O.expandbox(r,n[i].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(i){r.push(...i.offset(n))}),new fe(r)}}const{abs:ne,min:ti,max:ei,cos:Rh,sin:zh,acos:Nh,sqrt:re}=Math,Ih=Math.PI;class K{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),i=!1;if(typeof r[0]=="object"){i=r.length;const p=[];r.forEach(function(y){["x","y","z"].forEach(function(x){typeof y[x]<"u"&&p.push(y[x])})}),r=p}let o=!1;const a=r.length;if(i){if(i>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||n&&n[0]&&typeof n[0].z<"u",u=this.points=[];for(let p=0,y=s?3:2;p<a;p+=y){var f={x:r[p],y:r[p+1]};s&&(f.z=r[p+2]),u.push(f)}const l=this.order=u.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const c=O.align(u,{p1:u[0],p2:u[l]}),d=O.dist(u[0],u[l]);this._linear=c.reduce((p,y)=>p+ne(y.y),0)<d/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,i,o){if(typeof o>"u"&&(o=.5),o===0)return new K(r,r,i);if(o===1)return new K(n,r,r);const a=K.getABC(2,n,r,i,o);return new K(n,a.A,i)}static cubicFromPoints(n,r,i,o,a){typeof o>"u"&&(o=.5);const s=K.getABC(3,n,r,i,o);typeof a>"u"&&(a=O.dist(r,s.C));const u=a*(1-o)/o,f=O.dist(n,i),l=(i.x-n.x)/f,h=(i.y-n.y)/f,c=a*l,d=a*h,p=u*l,y=u*h,x={x:r.x-c,y:r.y-d},v={x:r.x+p,y:r.y+y},g=s.A,A={x:g.x+(x.x-g.x)/(1-o),y:g.y+(x.y-g.y)/(1-o)},T={x:g.x+(v.x-g.x)/o,y:g.y+(v.y-g.y)/o},b={x:n.x+(A.x-n.x)/o,y:n.y+(A.y-n.y)/o},w={x:i.x+(T.x-i.x)/(1-o),y:i.y+(T.y-i.y)/(1-o)};return new K(n,b,w,i)}static getUtils(){return O}getUtils(){return K.getUtils()}static get PolyBezier(){return fe}valueOf(){return this.toString()}toString(){return O.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,i=n[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=n.length;a<s;a++)o.push(n[a].x),o.push(n[a].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=O.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=O.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return O.length(this.derivative.bind(this))}static getABC(n=2,r,i,o,a=.5){const s=O.projectionratio(a,n),u=1-s,f={x:s*r.x+u*o.x,y:s*r.y+u*o.y},l=O.abcratio(a,n);return{A:{x:i.x+(i.x-f.x)/l,y:i.y+(i.y-f.y)/l},B:i,C:f,S:r,E:o}}getABC(n,r){r=r||this.get(n);let i=this.points[0],o=this.points[this.order];return K.getABC(this.order,i,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,i,o;r<n;r++)o=r/(n-1),i=this.compute(o),i.t=o,this._lut.push(i);return this._lut}on(n,r){r=r||5;const i=this.getLUT(),o=[];for(let a=0,s,u=0;a<i.length;a++)s=i[a],O.dist(s,n)<r&&(o.push(s),u+=a/i.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),i=r.length-1,o=O.closest(r,n),a=o.mpos,s=(a-1)/i,u=(a+1)/i,f=.1/i;let l=o.mdist,h=s,c=h,d;l+=1;for(let p;h<u+f;h+=f)d=this.compute(h),p=O.dist(n,d),p<l&&(l=p,c=h);return c=c<0?0:c>1?1:c,d=this.compute(c),d.t=c,d.d=l,d}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?O.computeWithRatios(n,this.points,this.ratios,this._3d):O.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],i=n.length;for(let o=1,a,s;o<i;o++)a=n[o],s=n[o-1],r[o]={x:(i-o)/i*a.x+o/i*s.x,y:(i-o)/i*a.y+o/i*s.y};return r[i]=n[i-1],new K(r)}derivative(n){return O.compute(n,this.dpoints[0],this._3d)}dderivative(n){return O.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new K(O.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return O.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return O.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),i=re(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/i,y:r.x/i}}__normal3(n){const r=this.derivative(n),i=this.derivative(n+.01),o=re(r.x*r.x+r.y*r.y+r.z*r.z),a=re(i.x*i.x+i.y*i.y+i.z*i.z);r.x/=o,r.y/=o,r.z/=o,i.x/=a,i.y/=a,i.z/=a;const s={x:i.y*r.z-i.z*r.y,y:i.z*r.x-i.x*r.z,z:i.x*r.y-i.y*r.x},u=re(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=u,s.y/=u,s.z/=u;const f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:f[0]*r.x+f[1]*r.y+f[2]*r.z,y:f[3]*r.x+f[4]*r.y+f[5]*r.z,z:f[6]*r.x+f[7]*r.y+f[8]*r.z}}hull(n){let r=this.points,i=[],o=[],a=0;for(o[a++]=r[0],o[a++]=r[1],o[a++]=r[2],this.order===3&&(o[a++]=r[3]);r.length>1;){i=[];for(let s=0,u,f=r.length-1;s<f;s++)u=O.lerp(n,r[s],r[s+1]),o[a++]=u,i.push(u);r=i}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const i=this.hull(n),o={left:this.order===2?new K([i[0],i[3],i[5]]):new K([i[0],i[4],i[7],i[9]]),right:this.order===2?new K([i[5],i[4],i[2]]):new K([i[9],i[8],i[6],i[3]]),span:i};return o.left._t1=O.map(0,0,1,this._t1,this._t2),o.left._t2=O.map(n,0,1,this._t1,this._t2),o.right._t1=O.map(n,0,1,this._t1,this._t2),o.right._t2=O.map(1,0,1,this._t1,this._t2),r?(r=O.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(i){let o=function(s){return s[i]},a=this.dpoints[0].map(o);n[i]=O.droots(a),this.order===3&&(a=this.dpoints[1].map(o),n[i]=n[i].concat(O.droots(a))),n[i]=n[i].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[i].sort(O.numberSort))}).bind(this)),n.values=r.sort(O.numberSort).filter(function(i,o){return r.indexOf(i)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=O.getminmax(this,i,n[i])}).bind(this)),r}overlaps(n){const r=this.bbox(),i=n.bbox();return O.bboxoverlap(r,i)}offset(n,r){if(typeof r<"u"){const i=this.get(n),o=this.normal(n),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+n*i.x,y:a.y+n*i.y};return a.z&&i.z&&(s.z=a.z+n*i.z),s});return[new K(o)]}return this.reduce().map(function(i){return i._linear?i.offset(n)[0]:i.scale(n)})}simple(){if(this.order===3){const o=O.angle(this.points[0],this.points[3],this.points[1]),a=O.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const n=this.normal(0),r=this.normal(1);let i=n.x*r.x+n.y*r.y;return this._3d&&(i+=n.z*r.z),ne(Nh(i))<Ih/3}reduce(){let n,r=0,i=0,o=.01,a,s=[],u=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),r=f[0],n=1;n<f.length;n++)i=f[n],a=this.split(r,i),a._t1=r,a._t2=i,s.push(a),r=i;return s.forEach(function(l){for(r=0,i=0;i<=1;)for(i=r+o;i<=1+o;i+=o)if(a=l.split(r,i),!a.simple()){if(i-=o,ne(r-i)<o)return[];a=l.split(r,i),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=O.map(i,0,1,l._t1,l._t2),u.push(a),r=i;break}r<1&&(a=l.split(r,1),a._t1=O.map(r,0,1,l._t1,l._t2),a._t2=l._t2,u.push(a))}),u}translate(n,r,i){i=typeof i=="number"?i:r;const o=this.order;let a=this.points.map((s,u)=>(1-u/o)*r+u/o*i);return new K(this.points.map((s,u)=>({x:s.x+n.x*a[u],y:s.y+n.y*a[u]})))}scale(n){const r=this.order;let i=!1;if(typeof n=="function"&&(i=n),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):n,i?i(1):n);const s=i?i(0):n,u=i?i(1):n,f=[this.offset(0,10),this.offset(1,10)],l=[],h=O.lli4(f[0],f[0].c,f[1],f[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(c){const d=l[c*r]=O.copy(a[c*r]);d.x+=(c?u:s)*f[c].n.x,d.y+=(c?u:s)*f[c].n.y}),i?([0,1].forEach(function(c){if(!(r===2&&c)){var d=a[c+1],p={x:d.x-h.x,y:d.y-h.y},y=i?i((c+1)/r):n;i&&!o&&(y=-y);var x=re(p.x*p.x+p.y*p.y);p.x/=x,p.y/=x,l[c+1]={x:d.x+y*p.x,y:d.y+y*p.y}}}),new K(l)):([0,1].forEach(c=>{if(r===2&&c)return;const d=l[c*r],p=this.derivative(c),y={x:d.x+p.x,y:d.y+p.y};l[c+1]=O.lli4(d,y,h,a[c+1])}),new K(l))}outline(n,r,i,o){if(r=r===void 0?n:r,this._linear){const w=this.normal(0),S=this.points[0],k=this.points[this.points.length-1];let E,I,R;i===void 0&&(i=n,o=r),E={x:S.x+w.x*n,y:S.y+w.y*n},R={x:k.x+w.x*i,y:k.y+w.y*i},I={x:(E.x+R.x)/2,y:(E.y+R.y)/2};const z=[E,I,R];E={x:S.x-w.x*r,y:S.y-w.y*r},R={x:k.x-w.x*o,y:k.y-w.y*o},I={x:(E.x+R.x)/2,y:(E.y+R.y)/2};const $=[R,I,E],L=O.makeline($[2],z[0]),C=O.makeline(z[2],$[0]),N=[L,new K(z),C,new K($)];return new fe(N)}const a=this.reduce(),s=a.length,u=[];let f=[],l,h=0,c=this.length();const d=typeof i<"u"&&typeof o<"u";function p(w,S,k,E,I){return function(R){const z=E/k,$=(E+I)/k,L=S-w;return O.map(R,0,1,w+z*L,w+$*L)}}a.forEach(function(w){const S=w.length();d?(u.push(w.scale(p(n,i,c,h,S))),f.push(w.scale(p(-r,-o,c,h,S)))):(u.push(w.scale(n)),f.push(w.scale(-r))),h+=S}),f=f.map(function(w){return l=w.points,l[3]?w.points=[l[3],l[2],l[1],l[0]]:w.points=[l[2],l[1],l[0]],w}).reverse();const y=u[0].points[0],x=u[s-1].points[u[s-1].points.length-1],v=f[s-1].points[f[s-1].points.length-1],g=f[0].points[0],A=O.makeline(v,y),T=O.makeline(x,g),b=[A].concat(u).concat([T]).concat(f);return new fe(b)}outlineshapes(n,r,i){r=r||n;const o=this.outline(n,r).curves,a=[];for(let s=1,u=o.length;s<u/2;s++){const f=O.makeshape(o[s],o[u-s],i);f.startcap.virtual=s>1,f.endcap.virtual=s<u/2-1,a.push(f)}return a}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof K&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=ti(n.p1.x,n.p2.x),i=ti(n.p1.y,n.p2.y),o=ei(n.p1.x,n.p2.x),a=ei(n.p1.y,n.p2.y);return O.roots(this.points,n).filter(s=>{var u=this.get(s);return O.between(u.x,r,o)&&O.between(u.y,i,a)})}selfintersects(n){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,u,f;a<i;a++)u=r.slice(a,a+1),f=r.slice(a+2),s=this.curveintersects(u,f,n),o.push(...s);return o}curveintersects(n,r,i){const o=[];n.forEach(function(s){r.forEach(function(u){s.overlaps(u)&&o.push({left:s,right:u})})});let a=[];return o.forEach(function(s){const u=O.pairiteration(s.left,s.right,i);u.length>0&&(a=a.concat(u))}),a}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,i,o){const a=(o-i)/4,s=this.get(i+a),u=this.get(o-a),f=O.dist(n,r),l=O.dist(n,s),h=O.dist(n,u);return ne(l-f)+ne(h-f)}_iterate(n,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),u,f,l,h,c=!1,d=!1,p,y=o,x=1;do if(d=c,h=l,y=(i+o)/2,u=this.get(y),f=this.get(o),l=O.getccenter(s,u,f),l.interval={start:i,end:o},c=this._error(l,s,i,o)<=n,p=d&&!c,p||(x=o),c){if(o>=1){if(l.interval.end=x=1,h=l,o>1){let g={x:l.x+l.r*Rh(l.e),y:l.y+l.r*zh(l.e)};l.e+=O.angle({x:l.x,y:l.y},g,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!p&&a++<100);if(a>=100)break;h=h||l,r.push(h),i=x}while(o<1);return r}}function On(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function $h(e){if(Array.isArray(e))return e}function Dh(e){if(Array.isArray(e))return On(e)}function jh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uh(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Fh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
20
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hh(e,n){if(e==null)return{};var r,i,o=qh(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function qh(e,n){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.includes(i))continue;r[i]=e[i]}return r}function Gh(e,n){return $h(e)||Uh(e,n)||po(e,n)||Fh()}function Vh(e){return Dh(e)||jh(e)||po(e)||Lh()}function Wh(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bh(e){var n=Wh(e,"string");return typeof n=="symbol"?n:n+""}function po(e,n){if(e){if(typeof e=="string")return On(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?On(e,n):void 0}}var Yh=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(u){return{keyAccessor:u,isProp:!(u instanceof Function)}}),a=e.reduce(function(u,f){var l=u,h=f;return o.forEach(function(c,d){var p=c.keyAccessor,y=c.isProp,x;if(y){var v=h,g=v[p],A=Hh(v,[p].map(Bh));x=g,h=A}else x=p(h,d);d+1<o.length?(l.hasOwnProperty(x)||(l[x]={}),l=l[x]):r?(l.hasOwnProperty(x)||(l[x]=[]),l[x].push(h)):l[x]=h}),u},{});r instanceof Function&&(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;l===o.length?Object.keys(f).forEach(function(h){return f[h]=r(f[h])}):Object.values(f).forEach(function(h){return u(h,l+1)})})(a);var s=a;return i&&(s=[],(function u(f){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.length===o.length?s.push({keys:l,vals:f}):Object.entries(f).forEach(function(h){var c=Gh(h,2),d=c[0],p=c[1];return u(p,[].concat(Vh(l),[d]))})})(a),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function Xh(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const ni=Symbol("implicit");function go(){var e=new kr,n=[],r=[],i=ni;function o(a){let s=e.get(a);if(s===void 0){if(i!==ni)return i;e.set(a,s=n.push(a)-1)}return r[s%r.length]}return o.domain=function(a){if(!arguments.length)return n.slice();n=[],e=new kr;for(const s of a)e.has(s)||e.set(s,n.push(s)-1);return o},o.range=function(a){return arguments.length?(r=Array.from(a),o):r.slice()},o.unknown=function(a){return arguments.length?(i=a,o):i},o.copy=function(){return go(n,r).unknown(i)},Xh.apply(o,arguments),o}function Zh(e){for(var n=e.length/6|0,r=new Array(n),i=0;i<n;)r[i]="#"+e.slice(i*6,++i*6);return r}const Kh=Zh("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Qh(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var Jh=`.force-graph-container canvas {
|
|
22
|
+
display: block;
|
|
23
|
+
user-select: none;
|
|
24
|
+
outline: none;
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.force-graph-container .clickable {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.force-graph-container .grabbable {
|
|
33
|
+
cursor: move;
|
|
34
|
+
cursor: grab;
|
|
35
|
+
cursor: -moz-grab;
|
|
36
|
+
cursor: -webkit-grab;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.force-graph-container .grabbable:active {
|
|
40
|
+
cursor: grabbing;
|
|
41
|
+
cursor: -moz-grabbing;
|
|
42
|
+
cursor: -webkit-grabbing;
|
|
43
|
+
}
|
|
44
|
+
`;Qh(Jh);function Rn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function td(e){if(Array.isArray(e))return e}function ed(e){if(Array.isArray(e))return Rn(e)}function ri(e,n,r){if(yo())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,n);var o=new(e.bind.apply(e,i));return o}function _e(e,n,r){return(n=sd(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function yo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yo=function(){return!!e})()}function nd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rd(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function id(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function od(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ii(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Gt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ii(Object(r),!0).forEach(function(i){_e(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function le(e,n){return td(e)||rd(e,n)||_o(e,n)||id()}function pt(e){return ed(e)||nd(e)||_o(e)||od()}function ad(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function sd(e){var n=ad(e,"string");return typeof n=="symbol"?n:n+""}function zn(e){"@babel/helpers - typeof";return zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zn(e)}function _o(e,n){if(e){if(typeof e=="string")return Rn(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rn(e,n):void 0}}var ud=go(Kh);function oi(e,n,r){!n||typeof r!="string"||e.filter(function(i){return!i[r]}).forEach(function(i){i[r]=ud(n(i))})}function fd(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.nodeFilter,s=a===void 0?function(){return!0}:a,u=o.onLoopError,f=u===void 0?function(p){throw"Invalid DAG structure! Found cycle in node path: ".concat(p.join(" -> "),".")}:u,l={};r.forEach(function(p){return l[n(p)]={data:p,out:[],depth:-1,skip:!s(p)}}),i.forEach(function(p){var y=p.source,x=p.target,v=b(y),g=b(x);if(!l.hasOwnProperty(v))throw"Missing source node with id: ".concat(v);if(!l.hasOwnProperty(g))throw"Missing target node with id: ".concat(g);var A=l[v],T=l[g];A.out.push(T);function b(w){return zn(w)==="object"?n(w):w}});var h=[];d(Object.values(l));var c=Object.assign.apply(Object,[{}].concat(pt(Object.entries(l).filter(function(p){var y=le(p,2),x=y[1];return!x.skip}).map(function(p){var y=le(p,2),x=y[0],v=y[1];return _e({},x,v.depth)}))));return c;function d(p){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=function(){var b=p[g];if(y.indexOf(b)!==-1){var w=[].concat(pt(y.slice(y.indexOf(b))),[b]).map(function(S){return n(S.data)});return h.some(function(S){return S.length===w.length&&S.every(function(k,E){return k===w[E]})})||(h.push(w),f(w)),1}x>b.depth&&(b.depth=x,d(b.out,[].concat(pt(y),[b]),x+(b.skip?0:1)))},g=0,A=p.length;g<A;g++)v()}}var ld=2,rt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},ai=function(n,r){if(!r.isShadow){var i=X(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var a=Math.round(Math.abs(i(o)));a?o.__photons=pt(Array(a)).map(function(){return{}}):delete o.__photons})}},Ve=Hn({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,ai(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(i){return i.fx=i.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:rt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:rt},nodeColor:{default:"color",triggerUpdate:!1,onChange:rt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:rt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkColor:{default:"color",triggerUpdate:!1,onChange:rt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:rt},linkWidth:{default:1,triggerUpdate:!1,onChange:rt},linkCurvature:{default:0,triggerUpdate:!1,onChange:rt},linkCanvasObject:{triggerUpdate:!1,onChange:rt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:rt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:rt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:rt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:ai},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,i){return i===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,i),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&a(),!n.isShadow&&s(),i(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function i(){var u=X(n.nodeVisibility),f=X(n.nodeVal),l=X(n.nodeColor),h=X(n.nodeCanvasObjectMode),c=n.ctx,d=n.isShadow/n.globalScale,p=n.graphData.nodes.filter(u);c.save(),p.forEach(function(y){var x=h(y);if(n.nodeCanvasObject&&(x==="before"||x==="replace")&&(n.nodeCanvasObject(y,c,n.globalScale),x==="replace")){c.restore();return}var v=Math.sqrt(Math.max(0,f(y)||1))*n.nodeRelSize+d;c.beginPath(),c.arc(y.x,y.y,v,0,2*Math.PI,!1),c.fillStyle=l(y)||"rgba(31, 120, 180, 0.92)",c.fill(),n.nodeCanvasObject&&x==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),c.restore()}function o(){var u=X(n.linkVisibility),f=X(n.linkColor),l=X(n.linkWidth),h=X(n.linkLineDash),c=X(n.linkCurvature),d=X(n.linkCanvasObjectMode),p=n.ctx,y=n.isShadow*2,x=n.graphData.links.filter(u);x.forEach(S);var v=[],g=[],A=x;if(n.linkCanvasObject){var T=[],b=[];x.forEach(function(k){return({before:v,after:g,replace:T}[d(k)]||b).push(k)}),A=[].concat(pt(v),g,b),v=v.concat(T)}p.save(),v.forEach(function(k){return n.linkCanvasObject(k,p,n.globalScale)}),p.restore();var w=Yh(A,[f,l,h]);p.save(),Object.entries(w).forEach(function(k){var E=le(k,2),I=E[0],R=E[1],z=!I||I==="undefined"?"rgba(0,0,0,0.15)":I;Object.entries(R).forEach(function($){var L=le($,2),C=L[0],N=L[1],P=(C||1)/n.globalScale+y;Object.entries(N).forEach(function(D){var H=le(D,2);H[0];var q=H[1],G=h(q[0]);p.beginPath(),q.forEach(function(_){var M=_.source,U=_.target;if(!(!M||!U||!M.hasOwnProperty("x")||!U.hasOwnProperty("x"))){p.moveTo(M.x,M.y);var j=_.__controlPoints;j?p[j.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(p,pt(j).concat([U.x,U.y])):p.lineTo(U.x,U.y)}}),p.strokeStyle=z,p.lineWidth=P,p.setLineDash(G||[]),p.stroke()})})}),p.restore(),p.save(),g.forEach(function(k){return n.linkCanvasObject(k,p,n.globalScale)}),p.restore();function S(k){var E=c(k);if(!E){k.__controlPoints=null;return}var I=k.source,R=k.target;if(!(!I||!R||!I.hasOwnProperty("x")||!R.hasOwnProperty("x"))){var z=Math.sqrt(Math.pow(R.x-I.x,2)+Math.pow(R.y-I.y,2));if(z>0){var $=Math.atan2(R.y-I.y,R.x-I.x),L=z*E,C={x:(I.x+R.x)/2+L*Math.cos($-Math.PI/2),y:(I.y+R.y)/2+L*Math.sin($-Math.PI/2)};k.__controlPoints=[C.x,C.y]}else{var N=E*70;k.__controlPoints=[R.x,R.y-N,R.x+N,R.y]}}}}function a(){var u=1.6,f=.2,l=X(n.linkDirectionalArrowLength),h=X(n.linkDirectionalArrowRelPos),c=X(n.linkVisibility),d=X(n.linkDirectionalArrowColor||n.linkColor),p=X(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(c).forEach(function(x){var v=l(x);if(!(!v||v<0)){var g=x.source,A=x.target;if(!(!g||!A||!g.hasOwnProperty("x")||!A.hasOwnProperty("x"))){var T=Math.sqrt(Math.max(0,p(g)||1))*n.nodeRelSize,b=Math.sqrt(Math.max(0,p(A)||1))*n.nodeRelSize,w=Math.min(1,Math.max(0,h(x))),S=d(x)||"rgba(0,0,0,0.28)",k=v/u/2,E=x.__controlPoints&&ri(K,[g.x,g.y].concat(pt(x.__controlPoints),[A.x,A.y])),I=E?function(P){return E.get(P)}:function(P){return{x:g.x+(A.x-g.x)*P||0,y:g.y+(A.y-g.y)*P||0}},R=E?E.length():Math.sqrt(Math.pow(A.x-g.x,2)+Math.pow(A.y-g.y,2)),z=T+v+(R-T-b-v)*w,$=I(z/R),L=I((z-v)/R),C=I((z-v*(1-f))/R),N=Math.atan2($.y-L.y,$.x-L.x)-Math.PI/2;y.beginPath(),y.moveTo($.x,$.y),y.lineTo(L.x+k*Math.cos(N),L.y+k*Math.sin(N)),y.lineTo(C.x,C.y),y.lineTo(L.x-k*Math.cos(N),L.y-k*Math.sin(N)),y.fillStyle=S,y.fill()}}}),y.restore()}function s(){var u=X(n.linkDirectionalParticles),f=X(n.linkDirectionalParticleSpeed),l=X(n.linkDirectionalParticleOffset),h=X(n.linkDirectionalParticleWidth),c=X(n.linkVisibility),d=X(n.linkDirectionalParticleColor||n.linkColor),p=n.ctx;p.save(),n.graphData.links.filter(c).forEach(function(y){var x=u(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var v=y.source,g=y.target;if(!(!v||!g||!v.hasOwnProperty("x")||!g.hasOwnProperty("x"))){var A=f(y),T=Math.abs(l(y)),b=y.__photons||[],w=Math.max(0,h(y)/2)/Math.sqrt(n.globalScale),S=d(y)||"rgba(0,0,0,0.28)";p.fillStyle=S;var k=y.__controlPoints?ri(K,[v.x,v.y].concat(pt(y.__controlPoints),[g.x,g.y])):null,E=0,I=!1;b.forEach(function(R){var z=!!R.__singleHop;if(R.hasOwnProperty("__progressRatio")||(R.__progressRatio=z?0:(E+T)/x),!z&&E++,R.__progressRatio+=A,R.__progressRatio>=1)if(!z)R.__progressRatio=R.__progressRatio%1;else{I=!0;return}var $=R.__progressRatio,L=k?k.get($):{x:v.x+(g.x-v.x)*$||0,y:v.y+(g.y-v.y)*$||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(L.x,L.y,y,p,n.globalScale):(p.beginPath(),p.arc(L.x,L.y,w,0,2*Math.PI,!1),p.fill())}),I&&(y.__photons=y.__photons.filter(function(R){return!R.__singleHop||R.__progressRatio<=1}))}}}),p.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Sh().force("link",vh()).force("charge",Th()).force("center",xc()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&oi(n.graphData.nodes,X(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&oi(n.graphData.links,X(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(d){d.source=d[n.linkSource],d.target=d[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var i=n.forceLayout.force("link");i&&i.id(function(d){return d[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&fd(n.graphData,function(d){return d[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),a=Math.max.apply(Math,pt(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(a||1)*ld*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var u=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return delete d[u]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var f=["rl","bu"].includes(n.dagMode),l=function(p){return(o[p[n.nodeId]]-a/2)*s*(f?-1:1)},h=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(d){return d[h]=l(d)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?Eh(function(d){var p=o[d[n.nodeId]]||-1;return(n.dagMode==="radialin"?a-p:p)*s}).strength(function(d){return n.dagNodeFilter(d)?1:0}):null);for(var c=0;c<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);c++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function vo(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(a){return{default:i[a](),onChange:function(u,f){r.forEach(function(l){return f[l][a](u)})},triggerUpdate:!1}},linkMethod:function(a){return function(s){for(var u=arguments.length,f=new Array(u>1?u-1:0),l=1;l<u;l++)f[l-1]=arguments[l];var h=[];return r.forEach(function(c){var d=s[c],p=d[a].apply(d,f);p!==d&&h.push(p)}),h.length?h[0]:this}}}}var cd=800,hd=4,dd=5,mo=vo("forceGraph",Ve),pd=vo(["forceGraph","shadowGraph"],Ve),gd=Object.assign.apply(Object,pt(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return _e({},e,mo.linkProp(e))})).concat(pt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return _e({},e,pd.linkProp(e))})))),yd=Object.assign.apply(Object,pt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return _e({},e,mo.linkMethod(e))})));function hn(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(a){a.style.width="".concat(e.width,"px"),a.style.height="".concat(e.height,"px"),a.width=e.width*i,a.height=e.height*i,!n&&!r&&a.getContext("2d").scale(i,i)});var o=mt(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function xo(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function si(e,n,r){e.save(),xo(e),e.clearRect(0,0,n,r),e.restore()}var _d=Hn({props:Gt({width:{default:window.innerWidth,onChange:function(n,r){return hn(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return hn(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(a){return!a.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(i),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function i(o){var a=o.type,s=o.objs;s.filter(function(u){if(!u.hasOwnProperty("__indexColor"))return!0;var f=r.colorTracker.lookup(u.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==u}).forEach(function(u){u.__indexColor=r.colorTracker.register({type:a,d:u})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(i,o,a){return n(i,i.__indexColor,o,a)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},gd),aliases:{stopAnimation:"pauseAnimation"},methods:Gt({graph2ScreenCoords:function(n,r,i){var o=mt(n.canvas);return{x:r*o.k+o.x,y:i*o.k+o.y}},screen2GraphCoords:function(n,r,i){var o=mt(n.canvas);return{x:(r-o.x)/o.k,y:(i-o.y)/o.k}},centerAt:function(n,r,i,o){if(!n.canvas)return null;if(r!==void 0||i!==void 0){var a=Object.assign({},r!==void 0?{x:r}:{},i!==void 0?{y:i}:{});return o?n.tweenGroup.add(new Pr(s()).to(a,o).easing(Lt.Quadratic.Out).onUpdate(u).start()):u(a),this}return s();function s(){var f=mt(n.canvas);return{x:(n.width/2-f.x)/f.k,y:(n.height/2-f.y)/f.k}}function u(f){var l=f.x,h=f.y;n.zoom.translateTo(n.zoom.__baseElem,l===void 0?s().x:l,h===void 0?s().y:h),n.needsRedraw=!0}},zoom:function(n,r,i){if(!n.canvas)return null;if(r!==void 0)return i?n.tweenGroup.add(new Pr({k:o()}).to({k:r},i).easing(Lt.Quadratic.Out).onUpdate(function(s){var u=s.k;return a(u)}).start()):a(r),this;return o();function o(){return mt(n.canvas).k}function a(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];var u=this.getGraphBbox.apply(this,a);if(u){var f={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(n.width-i*2)/(u.x[1]-u.x[0]),(n.height-i*2)/(u.y[1]-u.y[0])));this.centerAt(f.x,f.y,r),this.zoom(l,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},i=X(n.nodeVal),o=function(u){return Math.sqrt(Math.max(0,i(u)||1))*n.nodeRelSize},a=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return a.length?{x:[Sr(a,function(s){return s.x-s.r}),Cr(a,function(s){return s.x+s.r})],y:[Sr(a,function(s){return s.y-s.r}),Cr(a,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},yd),stateInit:function(){return{lastSetZoom:1,zoom:Ef(),forceGraph:new Ve,shadowGraph:new Ve().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Ql,tweenGroup:new Li}},init:function(n,r){var i=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var a=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},f=function(){var c=null,d=window.devicePixelRatio,p=u.x>0&&u.y>0?s.getImageData(u.x*d,u.y*d,1,1):null;return p&&(c=r.colorTracker.lookup(p.data)),c};dt(r.canvas).call(Ds().subject(function(){if(!r.enableNodeDrag)return null;var h=f();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var c=h.subject;c.__initialDragPos={x:c.x,y:c.y,fx:c.fx,fy:c.fy},h.active||(c.fx=c.x,c.fy=c.y),r.canvas.classList.add("grabbable")}).on("drag",function(h){var c=h.subject,d=c.__initialDragPos,p=h,y=mt(r.canvas).k,x={x:d.x+(p.x-d.x)/y-c.x,y:d.y+(p.y-d.y)/y-c.y};["x","y"].forEach(function(v){return c["f".concat(v)]=c[v]=d[v]+(p[v]-d[v])/y}),!(!c.__dragged&&dd>=Math.sqrt(Rf(["x","y"].map(function(v){return Math.pow(h[v]-d[v],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,c.__dragged=!0,r.onNodeDrag(c,x))}).on("end",function(h){var c=h.subject,d=c.__initialDragPos,p={x:c.x-d.x,y:c.y-d.y};d.fx===void 0&&(c.fx=void 0),d.fy===void 0&&(c.fy=void 0),delete c.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,c.__dragged&&(delete c.__dragged,r.onNodeDragEnd(c,p))})),r.zoom(r.zoom.__baseElem=dt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(h){return!h.button&&r.enableZoomPanInteraction&&(h.type!=="wheel"||X(r.enableZoomInteraction)(h))&&(h.type==="wheel"||X(r.enablePanInteraction)(h))}).on("zoom",function(h){var c=h.transform;[a,s].forEach(function(d){xo(d),d.translate(c.x,c.y),d.scale(c.k,c.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Gt(Gt({},c),i.centerAt())),r.needsRedraw=!0}).on("end",function(h){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Gt(Gt({},h.transform),i.centerAt()))}),hn(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){mt(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=hd/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new mc(o),["pointermove","pointerdown"].forEach(function(h){return o.addEventListener(h,function(c){h==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=c),!r.isPointerDragging&&c.type==="pointermove"&&r.onBackgroundClick&&(c.pressure>0||r.isPointerPressed)&&(c.pointerType==="mouse"||c.movementX===void 0||[c.movementX,c.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var d=p(o);u.x=c.pageX-d.left,u.y=c.pageY-d.top;function p(y){var x=y.getBoundingClientRect(),v=window.pageXOffset||document.documentElement.scrollLeft,g=window.pageYOffset||document.documentElement.scrollTop;return{top:x.top+g,left:x.left+v}}},{passive:!0})}),o.addEventListener("pointerup",function(h){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var c=[h,r.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(r.hoverObj){var d=r["on".concat(r.hoverObj.type,"Click")];d&&d.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,c);if(h.button===2)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"RightClick")];p&&p.apply(void 0,[r.hoverObj.d].concat(c))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,c)})}},{passive:!0}),o.addEventListener("contextmenu",function(h){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(h.preventDefault(),!1)}),r.forceGraph(a),r.shadowGraph(s);var l=ol(function(){si(s,r.width,r.height),r.shadowGraph.linkWidth(function(c){return X(r.linkWidth)(c)+r.linkHoverPrecision});var h=mt(r.canvas);r.shadowGraph.globalScale(h.k).tickFrame()},cd);r.flushShadowCanvas=l.flush,(this._animationCycle=function h(){var c=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(T){return T.__photons&&T.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var d=r.isPointerDragging?null:f();if(d!==r.hoverObj){var p=r.hoverObj,y=p?p.type:null,x=d?d.type:null;if(y&&y!==x){var v=r["on".concat(y,"Hover")];v&&v(null,p.d)}if(x){var g=r["on".concat(x,"Hover")];g&&g(d.d,y===x?p.d:null)}r.tooltip.content(d&&X(r["".concat(d.type.toLowerCase(),"Label")])(d.d)||null),r.canvas.classList[(d&&r["on".concat(x,"Click")]||!d&&r.onBackgroundClick)&&X(r.showPointerCursor)(d?.d)?"add":"remove"]("clickable"),r.hoverObj=d}c&&l()}if(c){si(a,r.width,r.height);var A=mt(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(a,A),r.forceGraph.globalScale(A).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(a,A)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(n){}});const Qe={width:m.number,height:m.number,graphData:m.shape({nodes:m.arrayOf(m.object).isRequired,links:m.arrayOf(m.object).isRequired}),backgroundColor:m.string,nodeRelSize:m.number,nodeId:m.string,nodeLabel:m.oneOfType([m.string,m.func]),nodeVal:m.oneOfType([m.number,m.string,m.func]),nodeVisibility:m.oneOfType([m.bool,m.string,m.func]),nodeColor:m.oneOfType([m.string,m.func]),nodeAutoColorBy:m.oneOfType([m.string,m.func]),onNodeHover:m.func,onNodeClick:m.func,linkSource:m.string,linkTarget:m.string,linkLabel:m.oneOfType([m.string,m.func]),linkVisibility:m.oneOfType([m.bool,m.string,m.func]),linkColor:m.oneOfType([m.string,m.func]),linkAutoColorBy:m.oneOfType([m.string,m.func]),linkWidth:m.oneOfType([m.number,m.string,m.func]),linkCurvature:m.oneOfType([m.number,m.string,m.func]),linkDirectionalArrowLength:m.oneOfType([m.number,m.string,m.func]),linkDirectionalArrowColor:m.oneOfType([m.string,m.func]),linkDirectionalArrowRelPos:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticles:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleSpeed:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleOffset:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleWidth:m.oneOfType([m.number,m.string,m.func]),linkDirectionalParticleColor:m.oneOfType([m.string,m.func]),onLinkHover:m.func,onLinkClick:m.func,dagMode:m.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:m.number,dagNodeFilter:m.func,onDagError:m.func,d3AlphaMin:m.number,d3AlphaDecay:m.number,d3VelocityDecay:m.number,warmupTicks:m.number,cooldownTicks:m.number,cooldownTime:m.number,onEngineTick:m.func,onEngineStop:m.func,getGraphBbox:m.func},bo={zoomToFit:m.func,onNodeRightClick:m.func,onNodeDrag:m.func,onNodeDragEnd:m.func,onLinkRightClick:m.func,linkHoverPrecision:m.number,onBackgroundClick:m.func,onBackgroundRightClick:m.func,showPointerCursor:m.oneOfType([m.bool,m.func]),enablePointerInteraction:m.bool,enableNodeDrag:m.bool},Zn={showNavInfo:m.bool,nodeOpacity:m.number,nodeResolution:m.number,nodeThreeObject:m.oneOfType([m.object,m.string,m.func]),nodeThreeObjectExtend:m.oneOfType([m.bool,m.string,m.func]),nodePositionUpdate:m.func,linkOpacity:m.number,linkResolution:m.number,linkCurveRotation:m.oneOfType([m.number,m.string,m.func]),linkMaterial:m.oneOfType([m.object,m.string,m.func]),linkThreeObject:m.oneOfType([m.object,m.string,m.func]),linkThreeObjectExtend:m.oneOfType([m.bool,m.string,m.func]),linkPositionUpdate:m.func,linkDirectionalArrowResolution:m.number,linkDirectionalParticleResolution:m.number,linkDirectionalParticleThreeObject:m.oneOfType([m.object,m.string,m.func]),forceEngine:m.oneOf(["d3","ngraph"]),ngraphPhysics:m.object,numDimensions:m.oneOf([1,2,3])},vd=Object.assign({},Qe,bo,{linkLineDash:m.oneOfType([m.arrayOf(m.number),m.string,m.func]),nodeCanvasObjectMode:m.oneOfType([m.string,m.func]),nodeCanvasObject:m.func,nodePointerAreaPaint:m.func,linkCanvasObjectMode:m.oneOfType([m.string,m.func]),linkCanvasObject:m.func,linkPointerAreaPaint:m.func,linkDirectionalParticleCanvasObject:m.func,autoPauseRedraw:m.bool,minZoom:m.number,maxZoom:m.number,enableZoomInteraction:m.oneOfType([m.bool,m.func]),enablePanInteraction:m.oneOfType([m.bool,m.func]),onZoom:m.func,onZoomEnd:m.func,onRenderFramePre:m.func,onRenderFramePost:m.func});Object.assign({},Qe,bo,Zn,{enableNavigationControls:m.bool,controlType:m.oneOf(["trackball","orbit","fly"]),rendererConfig:m.object,extraRenderers:m.arrayOf(m.shape({render:m.func.isRequired}))});Object.assign({},Qe,Zn,{nodeDesc:m.oneOfType([m.string,m.func]),linkDesc:m.oneOfType([m.string,m.func])});Object.assign({},Qe,Zn,{markerAttrs:m.object,yOffset:m.number,glScale:m.number});const wo=Xo(_d,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});wo.displayName="ForceGraph2D";wo.propTypes=vd;export{wo as F,fi as N,m as P,md as R,at as a,ui as g,So as r};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{g as t,aa as n}from"./index-40Y2UsVr.js";function o({limit:a=50,offset:e=0}={}){return t(`query FetchImages($pagination: PaginationInput) {
|
|
2
|
+
allImages(pagination: $pagination) {
|
|
3
|
+
totalCount
|
|
4
|
+
images {
|
|
5
|
+
id
|
|
6
|
+
url
|
|
7
|
+
referenceCount
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}`,{pagination:{limit:a,offset:e}})}function u(a){return t(`query FetchImage($id: ID!) {
|
|
11
|
+
image(id: $id) {
|
|
12
|
+
id
|
|
13
|
+
url
|
|
14
|
+
}
|
|
15
|
+
}`,{id:a})}function g(a){return t(`mutation DeleteImage($id: ID!) {
|
|
16
|
+
deleteImage(id: $id)
|
|
17
|
+
}`,{id:a})}async function m({base64:a,externalSrc:e}){if(a){const{data:i}=await n.post("/api/image",{image:a});return i.url}if(e){const{data:i}=await n.post("/api/image-from-src",{src:e});return i.url}throw new Error("No file or src provided")}export{u as a,g as d,o as f,m as u};
|