@eventcatalog/core 1.2.2 → 1.2.4
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +53 -49
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1bay4w0 +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +19 -11
- package/.next/routes-manifest.json +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderComplete.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderCreated/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderCreated.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderCreated.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderRequested.json +1 -1
- package/.next/server/pages/domains/Orders/services/Orders Service.html +2 -2
- package/.next/server/pages/domains/Orders/services/Orders Service.json +1 -1
- package/.next/server/pages/domains/Orders.html +2 -2
- package/.next/server/pages/domains/Orders.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.json +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.json +1 -1
- package/.next/server/pages/domains/Shopping.html +2 -2
- package/.next/server/pages/domains/Shopping.json +1 -1
- package/.next/server/pages/domains.html +2 -2
- package/.next/server/pages/events/PaymentProcessed/logs.html +1 -1
- package/.next/server/pages/events/PaymentProcessed.html +2 -2
- package/.next/server/pages/events/PaymentProcessed.json +1 -1
- package/.next/server/pages/events/ShipmentDelivered/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDelivered.html +2 -2
- package/.next/server/pages/events/ShipmentDelivered.json +1 -1
- package/.next/server/pages/events/ShipmentDispatched/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDispatched.html +2 -2
- package/.next/server/pages/events/ShipmentDispatched.json +1 -1
- package/.next/server/pages/events/ShipmentPrepared/logs.html +1 -1
- package/.next/server/pages/events/ShipmentPrepared.html +2 -2
- package/.next/server/pages/events/ShipmentPrepared.json +1 -1
- package/.next/server/pages/events.html +2 -2
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/services/Orders Service.html +1 -1
- package/.next/server/pages/services/Payment Service.html +2 -2
- package/.next/server/pages/services/Payment Service.json +1 -1
- package/.next/server/pages/services/Shipping Service.html +2 -2
- package/.next/server/pages/services/Shipping Service.json +1 -1
- package/.next/server/pages/services.html +2 -2
- package/.next/server/pages/users/dboyne.html +2 -2
- package/.next/server/pages/users/mSmith.html +2 -2
- package/.next/server/pages/users.html +1 -1
- package/.next/server/pages/visualiser.html +2 -2
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/ab9mQ_Is0joPnE3nhy0Z9/_buildManifest.js +1 -0
- package/.next/static/chunks/1178-011609b6f3b123b3.js +1 -0
- package/.next/static/chunks/3116-e9a578a270d9e013.js +1 -0
- package/.next/static/chunks/4816.03f53c476d2a5924.js +1 -0
- package/.next/static/chunks/5048.73fa7a6d734ba5ef.js +1 -0
- package/.next/static/chunks/6772-fba69ba8e4fa1ef4.js +1 -0
- package/.next/static/chunks/6790-f4527d80153a3e25.js +1 -0
- package/.next/static/chunks/7458.1de01a44cd67f6f0.js +1 -0
- package/.next/static/chunks/828-ef0e36f29db31dde.js +1 -0
- package/.next/static/chunks/8341-b8d844d6f606aed5.js +1 -0
- package/.next/static/chunks/9097.1efc23284d82765c.js +1 -0
- package/.next/static/chunks/9497.49670ee9a8bd76f7.js +1 -0
- package/.next/static/chunks/9930.28415573db2b7806.js +7 -0
- package/.next/static/chunks/f4df0e03.56d1c15b5532ab26.js +1 -0
- package/.next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-4d444783d4b4fba1.js → [version]-175a58a05deb2eda.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/events/{[name]-3ba1de12c77cab63.js → [name]-7c7c2526e7d63883.js} +1 -1
- package/.next/static/chunks/pages/events/[name]/v/{[version]-5fc81634778e7c99.js → [version]-af687afaafd7fd45.js} +1 -1
- package/.next/static/chunks/pages/events/{[name]-09d36860d8a55ce1.js → [name]-24bc568718357116.js} +1 -1
- package/.next/static/chunks/webpack-7e93d0cba2ccf996.js +1 -0
- package/.next/static/css/ae8abf3666c55019.css +5 -0
- package/.next/trace +141 -129
- package/CHANGELOG.md +12 -0
- package/bin/eventcatalog.js +3 -3
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderComplete.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderConfirmed.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderCreated.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderRequested.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/services/Orders Service.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/AddedItemToCart.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/RemovedItemFromCart.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/PaymentProcessed.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentDelivered.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentDispatched.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentPrepared.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/services/Payment Service.json +1 -1
- package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/services/Shipping Service.json +1 -1
- package/out/_next/static/ab9mQ_Is0joPnE3nhy0Z9/_buildManifest.js +1 -0
- package/out/_next/static/chunks/1178-011609b6f3b123b3.js +1 -0
- package/out/_next/static/chunks/3116-e9a578a270d9e013.js +1 -0
- package/out/_next/static/chunks/4816.03f53c476d2a5924.js +1 -0
- package/out/_next/static/chunks/5048.73fa7a6d734ba5ef.js +1 -0
- package/out/_next/static/chunks/6772-fba69ba8e4fa1ef4.js +1 -0
- package/out/_next/static/chunks/6790-f4527d80153a3e25.js +1 -0
- package/out/_next/static/chunks/7458.1de01a44cd67f6f0.js +1 -0
- package/out/_next/static/chunks/828-ef0e36f29db31dde.js +1 -0
- package/out/_next/static/chunks/8341-b8d844d6f606aed5.js +1 -0
- package/out/_next/static/chunks/9097.1efc23284d82765c.js +1 -0
- package/out/_next/static/chunks/9497.49670ee9a8bd76f7.js +1 -0
- package/out/_next/static/chunks/9930.28415573db2b7806.js +7 -0
- package/out/_next/static/chunks/f4df0e03.56d1c15b5532ab26.js +1 -0
- package/out/_next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-4d444783d4b4fba1.js → [version]-175a58a05deb2eda.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/events/{[name]-3ba1de12c77cab63.js → [name]-7c7c2526e7d63883.js} +1 -1
- package/out/_next/static/chunks/pages/events/[name]/v/{[version]-5fc81634778e7c99.js → [version]-af687afaafd7fd45.js} +1 -1
- package/out/_next/static/chunks/pages/events/{[name]-09d36860d8a55ce1.js → [name]-24bc568718357116.js} +1 -1
- package/out/_next/static/chunks/webpack-7e93d0cba2ccf996.js +1 -0
- package/out/_next/static/css/ae8abf3666c55019.css +5 -0
- package/out/domains/Orders/events/OrderComplete/index.html +2 -2
- package/out/domains/Orders/events/OrderComplete/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderConfirmed/index.html +2 -2
- package/out/domains/Orders/events/OrderConfirmed/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderCreated/index.html +2 -2
- package/out/domains/Orders/events/OrderCreated/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderRequested/index.html +2 -2
- package/out/domains/Orders/events/OrderRequested/logs/index.html +1 -1
- package/out/domains/Orders/index.html +2 -2
- package/out/domains/Orders/services/Orders Service/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/logs/index.html +1 -1
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.1/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.2/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/logs/index.html +1 -1
- package/out/domains/Shopping/index.html +2 -2
- package/out/domains/index.html +2 -2
- package/out/events/PaymentProcessed/index.html +2 -2
- package/out/events/PaymentProcessed/logs/index.html +1 -1
- package/out/events/ShipmentDelivered/index.html +2 -2
- package/out/events/ShipmentDelivered/logs/index.html +1 -1
- package/out/events/ShipmentDispatched/index.html +2 -2
- package/out/events/ShipmentDispatched/logs/index.html +1 -1
- package/out/events/ShipmentPrepared/index.html +2 -2
- package/out/events/ShipmentPrepared/logs/index.html +1 -1
- package/out/events/index.html +2 -2
- package/out/index.html +1 -1
- package/out/overview/index.html +1 -1
- package/out/services/Orders Service/index.html +1 -1
- package/out/services/Payment Service/index.html +2 -2
- package/out/services/Shipping Service/index.html +2 -2
- package/out/services/index.html +2 -2
- package/out/users/dboyne/index.html +2 -2
- package/out/users/index.html +1 -1
- package/out/users/mSmith/index.html +2 -2
- package/out/visualiser/index.html +2 -2
- package/package.json +2 -2
- package/.next/static/MAIac1E5zA9R63laY-FR4/_buildManifest.js +0 -1
- package/.next/static/chunks/1178-b4e2573b9c7bb613.js +0 -1
- package/.next/static/chunks/286-8534ea96c6d9e562.js +0 -1
- package/.next/static/chunks/3116-5812308a44e7c1a6.js +0 -1
- package/.next/static/chunks/4314.f91d14a6c13e15c0.js +0 -1
- package/.next/static/chunks/4816.31d857685dc2e825.js +0 -1
- package/.next/static/chunks/57-05de6c8e26eb8688.js +0 -1
- package/.next/static/chunks/6396-bc2a059ae6288077.js +0 -1
- package/.next/static/chunks/7080.11e17718953a039e.js +0 -1
- package/.next/static/chunks/7458.0462f81036564845.js +0 -1
- package/.next/static/chunks/8897.37511608169db8e6.js +0 -1
- package/.next/static/chunks/ad943d25.aad9a06860394d43.js +0 -1
- package/.next/static/chunks/webpack-c12822072a8a5613.js +0 -1
- package/.next/static/css/19fc4a6469bccc9d.css +0 -5
- package/out/_next/static/MAIac1E5zA9R63laY-FR4/_buildManifest.js +0 -1
- package/out/_next/static/chunks/1178-b4e2573b9c7bb613.js +0 -1
- package/out/_next/static/chunks/286-8534ea96c6d9e562.js +0 -1
- package/out/_next/static/chunks/3116-5812308a44e7c1a6.js +0 -1
- package/out/_next/static/chunks/4314.f91d14a6c13e15c0.js +0 -1
- package/out/_next/static/chunks/4816.31d857685dc2e825.js +0 -1
- package/out/_next/static/chunks/57-05de6c8e26eb8688.js +0 -1
- package/out/_next/static/chunks/6396-bc2a059ae6288077.js +0 -1
- package/out/_next/static/chunks/7080.11e17718953a039e.js +0 -1
- package/out/_next/static/chunks/7458.0462f81036564845.js +0 -1
- package/out/_next/static/chunks/8897.37511608169db8e6.js +0 -1
- package/out/_next/static/chunks/ad943d25.aad9a06860394d43.js +0 -1
- package/out/_next/static/chunks/webpack-c12822072a8a5613.js +0 -1
- package/out/_next/static/css/19fc4a6469bccc9d.css +0 -5
- /package/.next/static/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/_ssgManifest.js +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderComplete/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderConfirmed/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderCreated/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Orders/events/OrderRequested/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/AddedItemToCart/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains/Shopping/events/RemovedItemFromCart/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/domains.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/PaymentProcessed/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentDelivered/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentDispatched/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events/ShipmentPrepared/logs.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/events.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/overview.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/services/Orders Service.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/services.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/users/dboyne.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/users/mSmith.json +0 -0
- /package/out/_next/data/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/visualiser.json +0 -0
- /package/out/_next/static/{MAIac1E5zA9R63laY-FR4 → ab9mQ_Is0joPnE3nhy0Z9}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7458],{18886:function(e){e.exports=function(e){return[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{})}},43168:function(e){e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);var t=function(e){var t=Object.create(null);return{on:function(n,r,o){if("function"!==typeof r)throw new Error("callback is expected to be a function");var i=t[n];return i||(i=t[n]=[]),i.push({callback:r,ctx:o}),e},off:function(n,r){if("undefined"===typeof n)return t=Object.create(null),e;if(t[n])if("function"!==typeof r)delete t[n];else for(var o=t[n],i=0;i<o.length;++i)o[i].callback===r&&o.splice(i,1);return e},fire:function(n){var r,o=t[n];if(!o)return e;arguments.length>1&&(r=Array.prototype.splice.call(arguments,1));for(var i=0;i<o.length;++i){var a=o[i];a.callback.apply(a.ctx,r)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},58736:function(e,t,n){e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var i=(t&&t.createSimulator||n(52570))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var a=e.version>19?function(t){var n=e.getLinks(t);return n?1+n.size/3:1}:function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(a=t.nodeMass);var s=new Map,u={},c=0,l=i.settings.springTransform||o;c=0,e.forEachNode((function(e){v(e.id),c+=1})),e.forEachLink(y),e.on("changed",g);var h=!1,d={step:function(){if(0===c)return f(!0),!0;var e=i.step();d.lastMove=e,d.fire("step");var t=e/c<=.01;return f(t),t},getNodePosition:function(e){return _(e).pos},setNodePosition:function(e){var t=_(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=u[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return i.getBBox()},forEachBody:p,pinNode:function(e,t){_(e.id).isPinned=!!t},isNodePinned:function(e){return _(e.id).isPinned},dispose:function(){e.off("changed",g),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var o=e.hasLink(t,n);if(!o)return;r=o.id}return u[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:i,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function g(t){for(var n=0;n<t.length;++n){var r=t[n];"add"===r.changeType?(r.node&&v(r.node.id),r.link&&y(r.link)):"remove"===r.changeType&&(r.node&&m(r.node),r.link&&b(r.link))}c=e.getNodesCount()}function v(t){var n=s.get(t);if(!n){var r=e.getNode(t);if(!r)throw new Error("initBody() was called with unknown node id");var o=r.position;if(!o){var a=function(e){var t=[];if(!e.links)return t;for(var n=Math.min(e.links.length,2),r=0;r<n;++r){var o=e.links[r],i=o.fromId!==e.id?s.get(o.fromId):s.get(o.toId);i&&i.pos&&t.push(i)}return t}(r);o=i.getBestNewBodyPosition(a)}(n=i.addBodyAt(o)).id=t,s.set(t,n),w(t),function(e){return e&&(e.isPinned||e.data&&e.data.isPinned)}(r)&&(n.isPinned=!0)}}function m(e){var t=e.id,n=s.get(t);n&&(s.delete(t),i.removeBody(n))}function y(e){w(e.fromId),w(e.toId);var t=s.get(e.fromId),n=s.get(e.toId),r=i.addSpring(t,n,e.length);l(e,r),u[e.id]=r}function b(t){var n=u[t.id];if(n){var r=e.getNode(t.fromId),o=e.getNode(t.toId);r&&w(r.id),o&&w(o.id),delete u[t.id],i.removeSpring(n)}}function w(e){var t=s.get(e);if(t.mass=a(e),Number.isNaN(t.mass))throw new Error("Node mass should be a number")}function _(e){var t=s.get(e);return t||(v(e),t=s.get(e)),t}},e.exports.simulator=n(52570);var r=n(43168);function o(){}},10669:function(e,t,n){const r=n(53445);e.exports=function(e){return function(t,n){let o=n&&n.indent||0,i=n&&void 0!==n.join?n.join:"\n",a=Array(o+1).join(" "),s=[];for(let u=0;u<e;++u){let e=r(u),n=0===u?"":a;s.push(n+t.replace(/{var}/g,e))}return s.join(i)}}},19361:function(e,t,n){e.exports=function(e){let t=o(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=o;const r=n(10669);function o(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},48704:function(e,t,n){const r=n(10669);function o(e,t){return`\n${a(e,t)}\n${i(e)}\nreturn {Body: Body, Vector: Vector};\n`}function i(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function a(e,t){let n=r(e),o="";return t&&(o=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${o}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=o(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=o,e.exports.getVectorCode=a,e.exports.getBodyCode=i},56431:function(e,t,n){const r=n(10669);function o(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=o(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=o},17018:function(e,t,n){const r=n(10669);function o(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=o(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=o},73489:function(e,t,n){const r=n(10669);function o(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=o(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=o},5614:function(e,t,n){const r=n(10669),o=n(53445);function i(e){let t=r(e),n=Math.pow(2,e);return`\n${l()}\n${c(e)}\n${a(e)}\n${u(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" node.")}\n node.body = null;\n node.mass = ${t("node.mass_{var} = ",{join:""})}0;\n ${t("node.min_{var} = node.max_{var} = ",{join:""})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${t("var d{var};",{indent:4})}\n var r; \n ${t("var f{var} = 0;",{indent:4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${t("d{var} = body.pos.{var} - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${t("d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n // If s / r < \u03b8, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${o(0)} - node.min_${o(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${function(){let e=Array(11).join(" "),t=[];for(let r=0;r<n;++r)t.push(e+`if (node.quad${r}) {`),t.push(e+` queue[pushIdx] = node.quad${r};`),t.push(e+" queueLength += 1;"),t.push(e+" pushIdx += 1;"),t.push(e+"}");return t.join("\n")}()}\n }\n }\n }\n\n ${t("sourceBody.force.{var} += f{var};",{indent:4})}\n }\n\n function insertBodies(bodies) {\n ${t("var {var}min = Number.MAX_VALUE;",{indent:4})}\n ${t("var {var}max = Number.MIN_VALUE;",{indent:4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${t("if (pos.{var} < {var}min) {var}min = pos.{var};",{indent:6})}\n ${t("if (pos.{var} > {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(t+1).join(" ");for(let i=0;i<e;++i)n.push(r+`if (${o(i)} > max_${o(i)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,i)};`),n.push(r+` min_${o(i)} = max_${o(i)};`),n.push(r+` max_${o(i)} = node.max_${o(i)};`),n.push(r+"}");return n.join("\n")}(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function a(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n<t;++n){let t=0===n?" ":" else ";e.push(`${t}if (idx === ${n}) node.quad${n} = child;`)}return e.join("\n")}()}\n}`}function u(e){return`function getChild(node, idx) {\n${function(){let t=[],n=Math.pow(2,e);for(let e=0;e<n;++e)t.push(` if (idx === ${e}) return node.quad${e};`);return t.join("\n")}()}\n return null;\n}`}function c(e){let t=r(e),n=Math.pow(2,e);return`\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" this.")}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${t("this.mass_{var} = 0;",{indent:2})}\n\n // bounding box coordinates\n ${t("this.min_{var} = 0;",{indent:2})}\n ${t("this.max_{var} = 0;",{indent:2})}\n}\n`}function l(){return"\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=i(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=i,e.exports.getInsertStackCode=l,e.exports.getQuadNodeCode=c,e.exports.isSamePosition=a,e.exports.getChildBodyCode=u,e.exports.setChildBodyCode=s},53445:function(e){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},52570:function(e,t,n){e.exports=function(e){var t=n(44295),h=n(9256),d=n(43168);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=c[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:o(p),createBounds:i(p),createDragForce:a(p),createSpringForce:s(p),integrate:u(p)},c[p]=f}var g=f.Body,v=f.createQuadTree,m=f.createBounds,y=f.createDragForce,b=f.createSpringForce,w=f.integrate,_=n(20102).random(42),x=[],k=[],j=v(e,_),O=m(x,e,_),E=b(e,_),P=y(e),S=[],M=new Map,C=0;L("nbody",(function(){if(0===x.length)return;j.insertBodies(x);var e=x.length;for(;e--;){var t=x[e];t.isPinned||(t.reset(),j.updateBodyForce(t),P.update(t))}})),L("spring",(function(){var e=k.length;for(;e--;)E.update(k[e])}));var A={bodies:x,quadTree:j,springs:k,settings:e,addForce:L,removeForce:function(e){var t=S.indexOf(M.get(e));if(t<0)return;S.splice(t,1),M.delete(e)},getForces:function(){return M},step:function(){for(var t=0;t<S.length;++t)S[t](C);var n=w(x,e.timeStep,e.adaptiveTimeStepWeight);return C+=1,n},addBody:function(e){if(!e)throw new Error("Body is required");return x.push(e),e},addBodyAt:function(e){if(!e)throw new Error("Body position is required");var t=(e=>new g(e))(e);return x.push(t),t},removeBody:function(e){if(e){var t=x.indexOf(e);if(!(t<0))return x.splice(t,1),0===x.length&&O.reset(),!0}},addSpring:function(e,n,r,o){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!==typeof r&&(r=-1);var i=new t(e,n,r,o>=0?o:-1);return k.push(i),i},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=k.indexOf(e);return t>-1?(k.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return O.getBestNewPosition(e)},getBBox:T,getBoundingBox:T,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,j.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,j.options({theta:t}),this):e.theta},random:_};return function(e,t){for(var n in e)l(e,t,n)}(e,A),d(A),A;function T(){return O.update(),O.box}function L(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),S.push(t)}};var r=n(48704),o=n(5614),i=n(19361),a=n(56431),s=n(17018),u=n(73489),c={};function l(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},44295:function(e){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},84368:function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=new Map,u={},c=0,l=e.multigraph?function(e,t,n){var r=s(e,t),o=u.hasOwnProperty(r);if(o||O(e,t)){o||(u[r]=0);var i="@"+ ++u[r];r=s(e+i,t+i)}return new a(e,t,n,r)}:function(e,t,r){var o=s(e,t),i=n.get(o);if(i)return i.data=r,i;return new a(e,t,r,o)},h=[],d=E,f=E,p=E,g=E,v={version:20,addNode:b,addLink:function(e,t,r){p();var o=w(e)||b(e),a=w(t)||b(t),s=l(e,t,r),u=n.has(s.id);n.set(s.id,s),i(o,s),e!==t&&i(a,s);return d(s,u?"update":"add"),g(),s},removeLink:function(e,t){void 0!==t&&(e=O(e,t));return j(e)},removeNode:_,getNode:w,getNodeCount:x,getLinkCount:k,getEdgeCount:k,getLinksCount:k,getNodesCount:x,getLinks:function(e){var t=w(e);return t?t.links:null},forEachNode:M,forEachLinkedNode:function(e,n,r){var o=w(e);if(o&&o.links&&"function"===typeof n)return r?function(e,n,r){var o=e.values(),i=o.next();for(;!i.done;){var a=i.value;if(a.fromId===n&&r(t.get(a.toId),a))return!0;i=o.next()}}(o.links,e,n):function(e,n,r){var o=e.values(),i=o.next();for(;!i.done;){var a=i.value,s=a.fromId===n?a.toId:a.fromId;if(r(t.get(s),a))return!0;i=o.next()}}(o.links,e,n)},forEachLink:function(e){if("function"===typeof e)for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}},beginUpdate:p,endUpdate:g,clear:function(){p(),M((function(e){_(e.id)})),g()},hasLink:O,hasNode:w,getLink:O};return r(v),function(){var e=v.on;function t(){return v.beginUpdate=p=P,v.endUpdate=g=S,d=m,f=y,v.on=e,e.apply(v,arguments)}v.on=t}(),v;function m(e,t){h.push({link:e,changeType:t})}function y(e,t){h.push({node:e,changeType:t})}function b(e,n){if(void 0===e)throw new Error("Invalid node identifier");p();var r=w(e);return r?(r.data=n,f(r,"update")):(r=new o(e,n),f(r,"add")),t.set(e,r),g(),r}function w(e){return t.get(e)}function _(e){var n=w(e);if(!n)return!1;p();var r=n.links;return r&&(r.forEach(j),n.links=null),t.delete(e),f(n,"remove"),g(),!0}function x(){return t.size}function k(){return n.size}function j(e){if(!e)return!1;if(!n.get(e.id))return!1;p(),n.delete(e.id);var t=w(e.fromId),r=w(e.toId);return t&&t.links.delete(e),r&&r.links.delete(e),d(e,"remove"),g(),!0}function O(e,t){if(void 0!==e&&void 0!==t)return n.get(s(e,t))}function E(){}function P(){c+=1}function S(){0===(c-=1)&&h.length>0&&(v.fire("changed",h),h.length=0)}function M(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(43168);function o(e,t){this.id=e,this.links=null,this.data=t}function i(e,t){e.links?e.links.add(t):e.links=new Set([t])}function a(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},9256:function(e){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var o=t.hasOwnProperty(r),i=typeof n[r];!o||typeof t[r]!==i?t[r]=n[r]:"object"===i&&(t[r]=e(t[r],n[r]))}return t}},20102:function(e){function t(e){return new n("number"===typeof e?e:+new Date)}function n(e){this.seed=e}function r(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function o(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=t,e.exports.random=t,e.exports.randomIterator=function(e,n){var r=n||t();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,o,i;for(n=e.length-1;n>0;--n)o=r.next(n+1),i=e[o],e[o]=e[n],e[n]=i,t(i);e.length&&t(e[0])},shuffle:function(){var t,n,o;for(t=e.length-1;t>0;--t)n=r.next(t+1),o=e[n],e[n]=e[t],e[t]=o;return e}}},n.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},n.prototype.nextDouble=o,n.prototype.uniform=o,n.prototype.gaussian=function(){var e,t,n;do{t=2*this.nextDouble()-1,n=2*this.nextDouble()-1,e=t*t+n*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},n.prototype.levy=function(){var e=1.5,t=Math.pow(r(2.5)*Math.sin(Math.PI*e/2)/(r(1.25)*e*Math.pow(2,.25)),1/e);return this.gaussian()*t/Math.pow(Math.abs(this.gaussian()),1/e)}},61649:function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}n.d(t,{Z:function(){return r}})},396:function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}n.d(t,{Z:function(){return r}})},33844:function(e,t){"use strict";var n={value:()=>{}};function r(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new o(r)}function o(e){this._=e}function i(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function a(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function s(e,t,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=n,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=r&&e.push({name:t,value:r}),e}o.prototype=r.prototype={constructor:o,on:function(e,t){var n,r=this._,o=i(e+"",r),u=-1,c=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++u<c;)if(n=(e=o[u]).type)r[n]=s(r[n],e.name,t);else if(null==t)for(n in r)r[n]=s(r[n],e.name,null);return this}for(;++u<c;)if((n=(e=o[u]).type)&&(n=a(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new o(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}},t.Z=r},67585:function(e,t,n){"use strict";function r(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}n.d(t,{Z:function(){return r}})},68753:function(e,t,n){"use strict";function r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}n.d(t,{o:function(){return r}})},93484:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});class r extends Map{constructor(e,t=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(o(this,e))}has(e){return super.has(o(this,e))}set(e,t){return super.set(i(this,e),t)}delete(e){return super.delete(a(this,e))}}Set;function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function i({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function s(e){return null!==e&&"object"===typeof e?e.valueOf():e}var u=n(68753);const c=Symbol("implicit");function l(){var e=new r,t=[],n=[],o=c;function i(r){let i=e.get(r);if(void 0===i){if(o!==c)return o;e.set(r,i=t.push(r)-1)}return n[i%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(o=e,i):o},i.copy=function(){return l(t,n).unknown(o)},u.o.apply(i,arguments),i}},23452:function(e,t,n){"use strict";n.d(t,{B7:function(){return g},HT:function(){return v},zO:function(){return f}});var r,o,i=0,a=0,s=0,u=0,c=0,l=0,h="object"===typeof performance&&performance.now?performance:Date,d="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function f(){return c||(d(p),c=h.now()+l)}function p(){c=0}function g(){this._call=this._time=this._next=null}function v(e,t,n){var r=new g;return r.restart(e,t,n),r}function m(){c=(u=h.now())+l,i=a=0;try{!function(){f(),++i;for(var e,t=r;t;)(e=c-t._time)>=0&&t._call.call(void 0,e),t=t._next;--i}()}finally{i=0,function(){var e,t,n=r,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);o=e,b(i)}(),c=0}}function y(){var e=h.now(),t=e-u;t>1e3&&(l-=t,u=e)}function b(e){i||(a&&(a=clearTimeout(a)),e-c>24?(e<1/0&&(a=setTimeout(m,e-h.now()-l)),s&&(s=clearInterval(s))):(s||(u=h.now(),s=setInterval(y,1e3)),i=1,d(m)))}g.prototype=v.prototype={constructor:g,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?f():+n)+(null==t?0:+t),this._next||o===this||(o?o._next=this:r=this,o=this),this._call=e,this._time=n,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}}},187:function(e,t,n){"use strict";var r=n(93221).Z.Symbol;t.Z=r},98147:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.Z?r.Z.toStringTag:void 0;var u=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(u){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o},c=Object.prototype.toString;var l=function(e){return c.call(e)},h=r.Z?r.Z.toStringTag:void 0;var d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?u(e):l(e)}},92168:function(e,t){"use strict";var n="object"==typeof global&&global&&global.Object===Object&&global;t.Z=n},93221:function(e,t,n){"use strict";var r=n(92168),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.Z||o||Function("return this")();t.Z=i},93122:function(e,t){"use strict";t.Z=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},43391:function(e,t){"use strict";t.Z=function(e){return null!=e&&"object"==typeof e}},22758:function(e,t,n){"use strict";var r=n(98147),o=n(43391);t.Z=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},56068:function(e,t,n){"use strict";var r=n(93221);t.Z=function(){return r.Z.Date.now()}},62875:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=/\s/;var o=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t},i=/^\s+/;var a=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e},s=n(93122),u=n(22758),c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,h=/^0o[0-7]+$/i,d=parseInt;var f=function(e){if("number"==typeof e)return e;if((0,u.Z)(e))return NaN;if((0,s.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var n=l.test(e);return n||h.test(e)?d(e.slice(2),n?2:8):c.test(e)?NaN:+e}},27458:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return vr}});var r=n(2784);function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(a(Object.entries(e).filter((function(e){var t=i(e,1)[0];return!n.has(t)})).map((function(e){var t=i(e,2);return o({},t[0],t[1])})))))},l=n(18886);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.useEffect,n=(0,r.useRef)(),o=(0,r.useRef)(!1),i=(0,r.useRef)(!1),a=(0,r.useState)(0),s=d(a,2);s[0];var u=s[1];o.current&&(i.current=!0),t((function(){return o.current||(n.current=e(),o.current=!0),u((function(e){return e+1})),function(){i.current&&n.current&&n.current()}}),[])}var m=n(96995);const y=new m.JOQ,b=new m.iMs,w=new m.FM8,_=new m.Pa4,x=new m.Pa4,k=new m.Pa4,j=new m.yGw;class O extends m.pBf{constructor(e,t,n){super(),n.style.touchAction="none";let r=null,o=null;const i=[],a=this;function s(){n.addEventListener("pointermove",c),n.addEventListener("pointerdown",l),n.addEventListener("pointerup",h),n.addEventListener("pointerleave",h)}function u(){n.removeEventListener("pointermove",c),n.removeEventListener("pointerdown",l),n.removeEventListener("pointerup",h),n.removeEventListener("pointerleave",h),n.style.cursor=""}function c(s){if(!1!==a.enabled){if(d(s),b.setFromCamera(w,t),r)return b.ray.intersectPlane(y,x)&&r.position.copy(x.sub(_).applyMatrix4(j)),void a.dispatchEvent({type:"drag",object:r});if("mouse"===s.pointerType||"pen"===s.pointerType)if(i.length=0,b.setFromCamera(w,t),b.intersectObjects(e,!0,i),i.length>0){const e=i[0].object;y.setFromNormalAndCoplanarPoint(t.getWorldDirection(y.normal),k.setFromMatrixPosition(e.matrixWorld)),o!==e&&null!==o&&(a.dispatchEvent({type:"hoveroff",object:o}),n.style.cursor="auto",o=null),o!==e&&(a.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",o=e)}else null!==o&&(a.dispatchEvent({type:"hoveroff",object:o}),n.style.cursor="auto",o=null)}}function l(o){!1!==a.enabled&&(d(o),i.length=0,b.setFromCamera(w,t),b.intersectObjects(e,!0,i),i.length>0&&(r=!0===a.transformGroup?e[0]:i[0].object,y.setFromNormalAndCoplanarPoint(t.getWorldDirection(y.normal),k.setFromMatrixPosition(r.matrixWorld)),b.ray.intersectPlane(y,x)&&(j.copy(r.parent.matrixWorld).invert(),_.copy(x).sub(k.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",a.dispatchEvent({type:"dragstart",object:r})))}function h(){!1!==a.enabled&&(r&&(a.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=o?"pointer":"auto")}function d(e){const t=n.getBoundingClientRect();w.x=(e.clientX-t.left)/t.width*2-1,w.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.transformGroup=!1,this.activate=s,this.deactivate=u,this.dispose=function(){u()},this.getObjects=function(){return e},this.getRaycaster=function(){return b}}}var E=n(33844),P=n(23452);const S=4294967296;function M(e){return e.x}function C(e){return e.y}function A(e){return e.z}var T=Math.PI*(3-Math.sqrt(5)),L=20*Math.PI/(9+Math.sqrt(221));function R(e,t){t=t||2;var n,r=Math.min(3,Math.max(1,Math.round(t))),o=1,i=.001,a=1-Math.pow(i,1/300),s=0,u=.6,c=new Map,l=(0,P.HT)(f),h=(0,E.Z)("tick","end"),d=function(){let e=1;return()=>(e=(1664525*e+1013904223)%S)/S}();function f(){p(),h.call("tick",n),o<i&&(l.stop(),h.call("end",n))}function p(t){var i,l,h=e.length;void 0===t&&(t=1);for(var d=0;d<t;++d)for(o+=(s-o)*a,c.forEach((function(e){e(o)})),i=0;i<h;++i)null==(l=e[i]).fx?l.x+=l.vx*=u:(l.x=l.fx,l.vx=0),r>1&&(null==l.fy?l.y+=l.vy*=u:(l.y=l.fy,l.vy=0)),r>2&&(null==l.fz?l.z+=l.vz*=u:(l.z=l.fz,l.vz=0));return n}function g(){for(var t,n=0,o=e.length;n<o;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),null!=t.fz&&(t.z=t.fz),isNaN(t.x)||r>1&&isNaN(t.y)||r>2&&isNaN(t.z)){var i=10*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),a=n*T,s=n*L;1===r?t.x=i:2===r?(t.x=i*Math.cos(a),t.y=i*Math.sin(a)):(t.x=i*Math.sin(a)*Math.cos(s),t.y=i*Math.cos(a),t.z=i*Math.sin(a)*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(t){return t.initialize&&t.initialize(e,d,r),t}return null==e&&(e=[]),g(),n={tick:p,restart:function(){return l.restart(f),n},stop:function(){return l.stop(),n},numDimensions:function(e){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(e))),c.forEach(v),n):r},nodes:function(t){return arguments.length?(e=t,g(),c.forEach(v),n):e},alpha:function(e){return arguments.length?(o=+e,n):o},alphaMin:function(e){return arguments.length?(i=+e,n):i},alphaDecay:function(e){return arguments.length?(a=+e,n):+a},alphaTarget:function(e){return arguments.length?(s=+e,n):s},velocityDecay:function(e){return arguments.length?(u=1-e,n):1-u},randomSource:function(e){return arguments.length?(d=e,c.forEach(v),n):d},force:function(e,t){return arguments.length>1?(null==t?c.delete(e):c.set(e,v(t)),n):c.get(e)},find:function(){var t,n,o,i,a,s,u=Array.prototype.slice.call(arguments),c=u.shift()||0,l=(r>1?u.shift():null)||0,h=(r>2?u.shift():null)||0,d=u.shift()||1/0,f=0,p=e.length;for(d*=d,f=0;f<p;++f)(i=(t=c-(a=e[f]).x)*t+(n=l-(a.y||0))*n+(o=h-(a.z||0))*o)<d&&(s=a,d=i);return s},on:function(e,t){return arguments.length>1?(h.on(e,t),n):h.on(e)}}}function N(e){return function(){return e}}function D(e){return 1e-6*(e()-.5)}function I(e){return e.index}function z(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function F(e){var t,n,r,o,i,a,s,u=I,c=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},l=N(30),h=1;function d(r){for(var i=0,u=e.length;i<h;++i)for(var c,l,d,f,p,g=0,v=0,m=0,y=0;g<u;++g)l=(c=e[g]).source,v=(d=c.target).x+d.vx-l.x-l.vx||D(s),o>1&&(m=d.y+d.vy-l.y-l.vy||D(s)),o>2&&(y=d.z+d.vz-l.z-l.vz||D(s)),v*=f=((f=Math.sqrt(v*v+m*m+y*y))-n[g])/f*r*t[g],m*=f,y*=f,d.vx-=v*(p=a[g]),o>1&&(d.vy-=m*p),o>2&&(d.vz-=y*p),l.vx+=v*(p=1-p),o>1&&(l.vy+=m*p),o>2&&(l.vz+=y*p)}function f(){if(r){var o,s,c=r.length,l=e.length,h=new Map(r.map(((e,t)=>[u(e,t,r),e])));for(o=0,i=new Array(c);o<l;++o)(s=e[o]).index=o,"object"!==typeof s.source&&(s.source=z(h,s.source)),"object"!==typeof s.target&&(s.target=z(h,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(o=0,a=new Array(l);o<l;++o)s=e[o],a[o]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);t=new Array(l),p(),n=new Array(l),g()}}function p(){if(r)for(var n=0,o=e.length;n<o;++n)t[n]=+c(e[n],n,e)}function g(){if(r)for(var t=0,o=e.length;t<o;++t)n[t]=+l(e[t],t,e)}return null==e&&(e=[]),d.initialize=function(e,...t){r=e,s=t.find((e=>"function"===typeof e))||Math.random,o=t.find((e=>[1,2,3].includes(e)))||2,f()},d.links=function(t){return arguments.length?(e=t,f(),d):e},d.id=function(e){return arguments.length?(u=e,d):u},d.iterations=function(e){return arguments.length?(h=+e,d):h},d.strength=function(e){return arguments.length?(c="function"===typeof e?e:N(+e),p(),d):c},d.distance=function(e){return arguments.length?(l="function"===typeof e?e:N(+e),g(),d):l},d}function B(e,t,n){if(isNaN(t))return e;var r,o,i,a,s,u,c=e._root,l={data:n},h=e._x0,d=e._x1;if(!c)return e._root=l,e;for(;c.length;)if((a=t>=(o=(h+d)/2))?h=o:d=o,r=c,!(c=c[s=+a]))return r[s]=l,e;if(t===(i=+e._x.call(null,c.data)))return l.next=c,r?r[s]=l:e._root=l,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(a=t>=(o=(h+d)/2))?h=o:d=o}while((s=+a)===(u=+(i>=o)));return r[u]=c,r[s]=l,e}function U(e,t,n){this.node=e,this.x0=t,this.x1=n}function $(e){return e[0]}function V(e,t){var n=new q(null==t?$:t,NaN,NaN);return null==e?n:n.addAll(e)}function q(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function H(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Z=V.prototype=q.prototype;function G(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,s,u,c,l,h,d,f=e._root,p={data:r},g=e._x0,v=e._y0,m=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(i=(g+m)/2))?g=i:m=i,(l=n>=(a=(v+y)/2))?v=a:y=a,o=f,!(f=f[h=l<<1|c]))return o[h]=p,e;if(s=+e._x.call(null,f.data),u=+e._y.call(null,f.data),t===s&&n===u)return p.next=f,o?o[h]=p:e._root=p,e;do{o=o?o[h]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+m)/2))?g=i:m=i,(l=n>=(a=(v+y)/2))?v=a:y=a}while((h=l<<1|c)===(d=(u>=a)<<1|s>=i));return o[d]=f,o[h]=p,e}function Y(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function K(e){return e[0]}function W(e){return e[1]}function X(e,t,n){var r=new Q(null==t?K:t,null==n?W:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Q(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function J(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}Z.copy=function(){var e,t,n=new q(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=H(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var o=0;o<2;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(2)}):r.target[o]=H(t));return n},Z.add=function(e){const t=+this._x.call(null,e);return B(this.cover(t),t,e)},Z.addAll=function(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let r=1/0,o=-1/0;for(let i,a=0;a<t;++a)isNaN(i=+this._x.call(null,e[a]))||(n[a]=i,i<r&&(r=i),i>o&&(o=i));if(r>o)return this;this.cover(r).cover(o);for(let i=0;i<t;++i)B(this,n[i],e[i]);return this},Z.cover=function(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var r,o,i=n-t||1,a=this._root;t>e||e>=n;)switch(o=+(e<t),(r=new Array(2))[o]=a,a=r,i*=2,o){case 0:n=t+i;break;case 1:t=n-i}this._root&&this._root.length&&(this._root=a)}return this._x0=t,this._x1=n,this},Z.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Z.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},Z.find=function(e,t){var n,r,o,i,a,s=this._x0,u=this._x1,c=[],l=this._root;for(l&&c.push(new U(l,s,u)),null==t?t=1/0:(s=e-t,u=e+t);i=c.pop();)if(!(!(l=i.node)||(r=i.x0)>u||(o=i.x1)<s))if(l.length){var h=(r+o)/2;c.push(new U(l[1],h,o),new U(l[0],r,h)),(a=+(e>=h))&&(i=c[c.length-1],c[c.length-1]=c[c.length-1-a],c[c.length-1-a]=i)}else{var d=Math.abs(e-+this._x.call(null,l.data));d<t&&(t=d,s=e-d,u=e+d,n=l.data)}return n},Z.remove=function(e){if(isNaN(i=+this._x.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l=this._root,h=this._x0,d=this._x1;if(!l)return this;if(l.length)for(;;){if((s=i>=(a=(h+d)/2))?h=a:d=a,t=l,!(l=l[u=+s]))return this;if(!l.length)break;t[u+1&1]&&(n=t,c=u)}for(;l.data!==e;)if(r=l,!(l=l.next))return this;return(o=l.next)&&delete l.next,r?(o?r.next=o:delete r.next,this):t?(o?t[u]=o:delete t[u],(l=t[0]||t[1])&&l===(t[1]||t[0])&&!l.length&&(n?n[c]=l:this._root=l),this):(this._root=o,this)},Z.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},Z.root=function(){return this._root},Z.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Z.visit=function(e){var t,n,r,o,i=[],a=this._root;for(a&&i.push(new U(a,this._x0,this._x1));t=i.pop();)if(!e(a=t.node,r=t.x0,o=t.x1)&&a.length){var s=(r+o)/2;(n=a[1])&&i.push(new U(n,s,o)),(n=a[0])&&i.push(new U(n,r,s))}return this},Z.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new U(this._root,this._x0,this._x1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.x1,u=(a+s)/2;(i=o[0])&&n.push(new U(i,a,u)),(i=o[1])&&n.push(new U(i,u,s))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.x1);return this},Z.x=function(e){return arguments.length?(this._x=e,this):this._x};var ee=X.prototype=Q.prototype;function te(e,t,n,r,o){if(isNaN(t)||isNaN(n)||isNaN(r))return e;var i,a,s,u,c,l,h,d,f,p,g,v,m=e._root,y={data:o},b=e._x0,w=e._y0,_=e._z0,x=e._x1,k=e._y1,j=e._z1;if(!m)return e._root=y,e;for(;m.length;)if((d=t>=(a=(b+x)/2))?b=a:x=a,(f=n>=(s=(w+k)/2))?w=s:k=s,(p=r>=(u=(_+j)/2))?_=u:j=u,i=m,!(m=m[g=p<<2|f<<1|d]))return i[g]=y,e;if(c=+e._x.call(null,m.data),l=+e._y.call(null,m.data),h=+e._z.call(null,m.data),t===c&&n===l&&r===h)return y.next=m,i?i[g]=y:e._root=y,e;do{i=i?i[g]=new Array(8):e._root=new Array(8),(d=t>=(a=(b+x)/2))?b=a:x=a,(f=n>=(s=(w+k)/2))?w=s:k=s,(p=r>=(u=(_+j)/2))?_=u:j=u}while((g=p<<2|f<<1|d)===(v=(h>=u)<<2|(l>=s)<<1|c>=a));return i[v]=m,i[g]=y,e}function ne(e,t,n,r,o,i,a){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=o,this.y1=i,this.z1=a}function re(e){return e[0]}function oe(e){return e[1]}function ie(e){return e[2]}function ae(e,t,n,r){var o=new se(null==t?re:t,null==n?oe:n,null==r?ie:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?o:o.addAll(e)}function se(e,t,n,r,o,i,a,s,u){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=o,this._z0=i,this._x1=a,this._y1=s,this._z1=u,this._root=void 0}function ue(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}ee.copy=function(){var e,t,n=new Q(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=J(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var o=0;o<4;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(4)}):r.target[o]=J(t));return n},ee.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return G(this.cover(t,n),t,n,e)},ee.addAll=function(e){var t,n,r,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=r,s[n]=o,r<u&&(u=r),r>l&&(l=r),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<i;++n)G(this,a[n],s[n],e[n]);return this},ee.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var a,s,u=o-n||1,c=this._root;n>e||e>=o||r>t||t>=i;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=n+u,i=r+u;break;case 1:n=o-u,i=r+u;break;case 2:o=n+u,r=i-u;break;case 3:n=o-u,r=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},ee.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},ee.extent=function(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]]},ee.find=function(e,t,n){var r,o,i,a,s,u,c,l=this._x0,h=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new Y(g,l,h,d,f)),null==n?n=1/0:(l=e-n,h=t-n,d=e+n,f=t+n,n*=n);u=p.pop();)if(!(!(g=u.node)||(o=u.x0)>d||(i=u.y0)>f||(a=u.x1)<l||(s=u.y1)<h))if(g.length){var v=(o+a)/2,m=(i+s)/2;p.push(new Y(g[3],v,m,a,s),new Y(g[2],o,m,v,s),new Y(g[1],v,i,a,m),new Y(g[0],o,i,v,m)),(c=(t>=m)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var y=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=y*y+b*b;if(w<n){var _=Math.sqrt(n=w);l=e-_,h=t-_,d=e+_,f=t+_,r=g.data}}return r},ee.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l,h,d,f=this._root,p=this._x0,g=this._y0,v=this._x1,m=this._y1;if(!f)return this;if(f.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(l=a>=(u=(g+m)/2))?g=u:m=u,t=f,!(f=f[h=l<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(o=f.next)&&delete f.next,r?(o?r.next=o:delete r.next,this):t?(o?t[h]=o:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=o,this)},ee.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},ee.root=function(){return this._root},ee.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},ee.visit=function(e){var t,n,r,o,i,a,s=[],u=this._root;for(u&&s.push(new Y(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,r=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(r+i)/2,l=(o+a)/2;(n=u[3])&&s.push(new Y(n,c,l,i,a)),(n=u[2])&&s.push(new Y(n,r,l,c,a)),(n=u[1])&&s.push(new Y(n,c,o,i,l)),(n=u[0])&&s.push(new Y(n,r,o,c,l))}return this},ee.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new Y(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,l=(a+u)/2,h=(s+c)/2;(i=o[0])&&n.push(new Y(i,a,s,l,h)),(i=o[1])&&n.push(new Y(i,l,s,u,h)),(i=o[2])&&n.push(new Y(i,a,h,l,c)),(i=o[3])&&n.push(new Y(i,l,h,u,c))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},ee.x=function(e){return arguments.length?(this._x=e,this):this._x},ee.y=function(e){return arguments.length?(this._y=e,this):this._y};var ce=ae.prototype=se.prototype;function le(){var e,t,n,r,o,i,a=N(-30),s=1,u=1/0,c=.81;function l(r){var i,a=e.length,s=(1===t?V(e,M):2===t?X(e,M,C):3===t?ae(e,M,C,A):null).visitAfter(d);for(o=r,i=0;i<a;++i)n=e[i],s.visit(f)}function h(){if(e){var t,n,r=e.length;for(i=new Array(r),t=0;t<r;++t)n=e[t],i[n.index]=+a(n,t,e)}}function d(e){var n,r,o,a,s,u,c=0,l=0,h=e.length;if(h){for(o=a=s=u=0;u<h;++u)(n=e[u])&&(r=Math.abs(n.value))&&(c+=n.value,l+=r,o+=r*(n.x||0),a+=r*(n.y||0),s+=r*(n.z||0));c*=Math.sqrt(4/h),e.x=o/l,t>1&&(e.y=a/l),t>2&&(e.z=s/l)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{c+=i[n.data.index]}while(n=n.next)}e.value=c}function f(e,a,l,h,d){if(!e.value)return!0;var f=[l,h,d][t-1],p=e.x-n.x,g=t>1?e.y-n.y:0,v=t>2?e.z-n.z:0,m=f-a,y=p*p+g*g+v*v;if(m*m/c<y)return y<u&&(0===p&&(y+=(p=D(r))*p),t>1&&0===g&&(y+=(g=D(r))*g),t>2&&0===v&&(y+=(v=D(r))*v),y<s&&(y=Math.sqrt(s*y)),n.vx+=p*e.value*o/y,t>1&&(n.vy+=g*e.value*o/y),t>2&&(n.vz+=v*e.value*o/y)),!0;if(!(e.length||y>=u)){(e.data!==n||e.next)&&(0===p&&(y+=(p=D(r))*p),t>1&&0===g&&(y+=(g=D(r))*g),t>2&&0===v&&(y+=(v=D(r))*v),y<s&&(y=Math.sqrt(s*y)));do{e.data!==n&&(m=i[e.data.index]*o/y,n.vx+=p*m,t>1&&(n.vy+=g*m),t>2&&(n.vz+=v*m))}while(e=e.next)}}return l.initialize=function(n,...o){e=n,r=o.find((e=>"function"===typeof e))||Math.random,t=o.find((e=>[1,2,3].includes(e)))||2,h()},l.strength=function(e){return arguments.length?(a="function"===typeof e?e:N(+e),h(),l):a},l.distanceMin=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.distanceMax=function(e){return arguments.length?(u=e*e,l):Math.sqrt(u)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function he(e,t,n){var r,o=1;function i(){var i,a,s=r.length,u=0,c=0,l=0;for(i=0;i<s;++i)u+=(a=r[i]).x||0,c+=a.y||0,l+=a.z||0;for(u=(u/s-e)*o,c=(c/s-t)*o,l=(l/s-n)*o,i=0;i<s;++i)a=r[i],u&&(a.x-=u),c&&(a.y-=c),l&&(a.z-=l)}return null==e&&(e=0),null==t&&(t=0),null==n&&(n=0),i.initialize=function(e){r=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.z=function(e){return arguments.length?(n=+e,i):n},i.strength=function(e){return arguments.length?(o=+e,i):o},i}ce.copy=function(){var e,t,n=new se(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=ue(r),n;for(e=[{source:r,target:n._root=new Array(8)}];r=e.pop();)for(var o=0;o<8;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(8)}):r.target[o]=ue(t));return n},ce.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e),r=+this._z.call(null,e);return te(this.cover(t,n,r),t,n,r,e)},ce.addAll=function(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),r=new Float64Array(t),o=new Float64Array(t);let i=1/0,a=1/0,s=1/0,u=-1/0,c=-1/0,l=-1/0;for(let h,d,f,p,g=0;g<t;++g)isNaN(d=+this._x.call(null,h=e[g]))||isNaN(f=+this._y.call(null,h))||isNaN(p=+this._z.call(null,h))||(n[g]=d,r[g]=f,o[g]=p,d<i&&(i=d),d>u&&(u=d),f<a&&(a=f),f>c&&(c=f),p<s&&(s=p),p>l&&(l=p));if(i>u||a>c||s>l)return this;this.cover(i,a,s).cover(u,c,l);for(let h=0;h<t;++h)te(this,n[h],r[h],o[h],e[h]);return this},ce.cover=function(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._z0,a=this._x1,s=this._y1,u=this._z1;if(isNaN(r))a=(r=Math.floor(e))+1,s=(o=Math.floor(t))+1,u=(i=Math.floor(n))+1;else{for(var c,l,h=a-r||1,d=this._root;r>e||e>=a||o>t||t>=s||i>n||n>=u;)switch(l=(n<i)<<2|(t<o)<<1|e<r,(c=new Array(8))[l]=d,d=c,h*=2,l){case 0:a=r+h,s=o+h,u=i+h;break;case 1:r=a-h,s=o+h,u=i+h;break;case 2:a=r+h,o=s-h,u=i+h;break;case 3:r=a-h,o=s-h,u=i+h;break;case 4:a=r+h,s=o+h,i=u-h;break;case 5:r=a-h,s=o+h,i=u-h;break;case 6:a=r+h,o=s-h,i=u-h;break;case 7:r=a-h,o=s-h,i=u-h}this._root&&this._root.length&&(this._root=d)}return this._x0=r,this._y0=o,this._z0=i,this._x1=a,this._y1=s,this._z1=u,this},ce.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},ce.extent=function(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]]},ce.find=function(e,t,n,r){var o,i,a,s,u,c,l,h,d,f=this._x0,p=this._y0,g=this._z0,v=this._x1,m=this._y1,y=this._z1,b=[],w=this._root;for(w&&b.push(new ne(w,f,p,g,v,m,y)),null==r?r=1/0:(f=e-r,p=t-r,g=n-r,v=e+r,m=t+r,y=n+r,r*=r);h=b.pop();)if(!(!(w=h.node)||(i=h.x0)>v||(a=h.y0)>m||(s=h.z0)>y||(u=h.x1)<f||(c=h.y1)<p||(l=h.z1)<g))if(w.length){var _=(i+u)/2,x=(a+c)/2,k=(s+l)/2;b.push(new ne(w[7],_,x,k,u,c,l),new ne(w[6],i,x,k,_,c,l),new ne(w[5],_,a,k,u,x,l),new ne(w[4],i,a,k,_,x,l),new ne(w[3],_,x,s,u,c,k),new ne(w[2],i,x,s,_,c,k),new ne(w[1],_,a,s,u,x,k),new ne(w[0],i,a,s,_,x,k)),(d=(n>=k)<<2|(t>=x)<<1|e>=_)&&(h=b[b.length-1],b[b.length-1]=b[b.length-1-d],b[b.length-1-d]=h)}else{var j=e-+this._x.call(null,w.data),O=t-+this._y.call(null,w.data),E=n-+this._z.call(null,w.data),P=j*j+O*O+E*E;if(P<r){var S=Math.sqrt(r=P);f=e-S,p=t-S,g=n-S,v=e+S,m=t+S,y=n+S,o=w.data}}return o},ce.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l,h,d,f,p,g,v=this._root,m=this._x0,y=this._y0,b=this._z0,w=this._x1,_=this._y1,x=this._z1;if(!v)return this;if(v.length)for(;;){if((h=i>=(u=(m+w)/2))?m=u:w=u,(d=a>=(c=(y+_)/2))?y=c:_=c,(f=s>=(l=(b+x)/2))?b=l:x=l,t=v,!(v=v[p=f<<2|d<<1|h]))return this;if(!v.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,g=p)}for(;v.data!==e;)if(r=v,!(v=v.next))return this;return(o=v.next)&&delete v.next,r?(o?r.next=o:delete r.next,this):t?(o?t[p]=o:delete t[p],(v=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&v===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!v.length&&(n?n[g]=v:this._root=v),this):(this._root=o,this)},ce.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},ce.root=function(){return this._root},ce.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},ce.visit=function(e){var t,n,r,o,i,a,s,u,c=[],l=this._root;for(l&&c.push(new ne(l,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=c.pop();)if(!e(l=t.node,r=t.x0,o=t.y0,i=t.z0,a=t.x1,s=t.y1,u=t.z1)&&l.length){var h=(r+a)/2,d=(o+s)/2,f=(i+u)/2;(n=l[7])&&c.push(new ne(n,h,d,f,a,s,u)),(n=l[6])&&c.push(new ne(n,r,d,f,h,s,u)),(n=l[5])&&c.push(new ne(n,h,o,f,a,d,u)),(n=l[4])&&c.push(new ne(n,r,o,f,h,d,u)),(n=l[3])&&c.push(new ne(n,h,d,i,a,s,f)),(n=l[2])&&c.push(new ne(n,r,d,i,h,s,f)),(n=l[1])&&c.push(new ne(n,h,o,i,a,d,f)),(n=l[0])&&c.push(new ne(n,r,o,i,h,d,f))}return this},ce.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new ne(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.z0,c=t.x1,l=t.y1,h=t.z1,d=(a+c)/2,f=(s+l)/2,p=(u+h)/2;(i=o[0])&&n.push(new ne(i,a,s,u,d,f,p)),(i=o[1])&&n.push(new ne(i,d,s,u,c,f,p)),(i=o[2])&&n.push(new ne(i,a,f,u,d,l,p)),(i=o[3])&&n.push(new ne(i,d,f,u,c,l,p)),(i=o[4])&&n.push(new ne(i,a,s,p,d,f,h)),(i=o[5])&&n.push(new ne(i,d,s,p,c,f,h)),(i=o[6])&&n.push(new ne(i,a,f,p,d,l,h)),(i=o[7])&&n.push(new ne(i,d,f,p,c,l,h))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},ce.x=function(e){return arguments.length?(this._x=e,this):this._x},ce.y=function(e){return arguments.length?(this._y=e,this):this._y},ce.z=function(e){return arguments.length?(this._z=e,this):this._z};var de=n(84368),fe=n(58736),pe=n(93122),ge=n(56068),ve=n(62875),me=Math.max,ye=Math.min;var be=function(e,t,n){var r,o,i,a,s,u,c=0,l=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function p(e){return c=e,s=setTimeout(v,t),l?f(e):a}function g(e){var n=e-u;return void 0===u||n>=t||n<0||h&&e-c>=i}function v(){var e=(0,ge.Z)();if(g(e))return m(e);s=setTimeout(v,function(e){var n=t-(e-u);return h?ye(n,i-(e-c)):n}(e))}function m(e){return s=void 0,d&&r?f(e):(r=o=void 0,a)}function y(){var e=(0,ge.Z)(),n=g(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,t),f(u)}return void 0===s&&(s=setTimeout(v,t)),a}return t=(0,ve.Z)(t)||0,(0,pe.Z)(n)&&(l=!!n.leading,i=(h="maxWait"in n)?me((0,ve.Z)(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=o=s=void 0},y.flush=function(){return void 0===s?a:m((0,ge.Z)())},y};function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,je(r.key),r)}}function _e(e,t,n){return t&&we(e.prototype,t),n&&we(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function je(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var Oe=_e((function e(t,n){var r=n.default,o=void 0===r?null:r,i=n.triggerUpdate,a=void 0===i||i,s=n.onChange,u=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=o,this.triggerUpdate=a,this.onChange=u}));function Ee(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,o=void 0===r?{}:r,i=e.methods,a=void 0===i?{}:i,s=e.aliases,u=void 0===s?{}:s,c=e.init,l=void 0===c?function(){}:c,h=e.update,d=void 0===h?function(){}:h,f=Object.keys(o).map((function(e){return new Oe(e,o[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function o(t){return i(t,e),s(),o}var i=function(e,n){l.call(o,e,t,n),t.initialised=!0},s=be((function(){t.initialised&&(d.call(o,t,r),r={})}),1);return f.forEach((function(e){o[e.name]=function(e){var n=e.name,i=e.triggerUpdate,a=void 0!==i&&i,u=e.onChange,c=void 0===u?function(e,t){}:u,l=e.defaultVal,h=void 0===l?null:l;return function(e){var i=t[n];if(!arguments.length)return i;var u=void 0===e?h:e;return t[n]=u,c.call(o,u,t,i),!r.hasOwnProperty(n)&&(r[n]=i),a&&s(),o}}(e)})),Object.keys(a).forEach((function(e){o[e]=function(){for(var n,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(n=a[e]).call.apply(n,[o,t].concat(i))}})),Object.entries(u).forEach((function(e){var t=xe(e,2),n=t[0],r=t[1];return o[n]=o[r]})),o.resetProps=function(){return f.forEach((function(e){o[e.name](e.defaultVal)})),o},o.resetProps(),t._rerender=s,o}}var Pe=function(e){return"function"===typeof e?e:"string"===typeof e?function(t){return t[e]}:function(t){return e}},Se=n(396),Me=n(61649);function Ce(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Le(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(e){return function(e){if(Array.isArray(e))return Re(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Le(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e,t){if(e){if("string"===typeof e)return Re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Re(e,t):void 0}}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ne(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),i=e.reduce((function(e,t){var r=e,i=t;return o.forEach((function(e,t){var a,s=e.keyAccessor;if(e.isProp){var u=i,c=u[s],l=Ce(u,[s].map(Ne));a=c,i=l}else a=s(i,t);t+1<o.length?(r.hasOwnProperty(a)||(r[a]={}),r=r[a]):n?(r.hasOwnProperty(a)||(r[a]=[]),r[a].push(i)):r[a]=i})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===o.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(i);var a=i;return r&&(a=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===o.length?a.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=Ae(t,2),o=r[0],i=r[1];return e(i,[].concat(Te(n),[o]))}))}(i),t instanceof Array&&0===t.length&&1===a.length&&(a[0].keys=[])),a};function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||$e(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$e(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(e,t){if(e){if("string"===typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qe=["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"];function He(e,t,n){var r=n.objBindAttr,o=void 0===r?"__obj":r,i=n.dataBindAttr,a=void 0===i?"__data":i,s=n.idAccessor,u=n.purge,c=void 0!==u&&u,l=function(e){return e.hasOwnProperty(a)},h=t.filter((function(e){return!l(e)})),d=t.filter(l).map((function(e){return e[a]})),f=c?{enter:e,exit:d,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var o=De(e,n,!1),i=De(t,n,!1),a=Object.assign({},o,i);Object.entries(a).forEach((function(e){var t=Be(e,2),n=t[0],a=t[1],s=o.hasOwnProperty(n)?i.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[o[n],i[n]]:a)}))}else{var s=new Set(e),u=new Set(t);new Set([].concat(Ue(s),Ue(u))).forEach((function(e){var t=s.has(e)?u.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(d,e,s);return f.update=f.update.map((function(e){var t=Be(e,2),n=t[0],r=t[1];return n!==r&&(r[o]=n[o],r[o][a]=r),r})),f.exit=f.exit.concat(h.map((function(e){return ze({},o,e)}))),f}function Ze(e,t,n,r,o){var i=o.createObj,a=void 0===i?function(e){return{}}:i,s=o.updateObj,u=void 0===s?function(e,t){}:s,c=o.exitObj,l=void 0===c?function(e){}:c,h=o.objBindAttr,d=void 0===h?"__obj":h,f=o.dataBindAttr,p=void 0===f?"__data":f,g=Fe(o,qe),v=He(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:d,dataBindAttr:p},g)),m=v.enter,y=v.update;v.exit.forEach((function(e){var t=e[d];delete e[d],l(t),r(t)}));var b=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[p]=e,e[d]=n,t.push(n))})),t}(m);!function(e){e.forEach((function(e){var t=e[d];t&&(t[p]=e,u(t,e))}))}([].concat(Ue(m),Ue(y))),b.forEach(n)}var Ge=n(93484),Ye=(0,n(67585).Z)("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}var We=/^\s+/,Xe=/\s+$/;function Qe(e,t){if(t=t||{},(e=e||"")instanceof Qe)return e;if(!(this instanceof Qe))return new Qe(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(We,"").replace(Xe,"").toLowerCase();var t,n=!1;if(gt[e])e=gt[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=Ot.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=Ot.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=Ot.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=Ot.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=Ot.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=Ot.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=Ot.hex8.exec(e))return{r:wt(t[1]),g:wt(t[2]),b:wt(t[3]),a:jt(t[4]),format:n?"name":"hex8"};if(t=Ot.hex6.exec(e))return{r:wt(t[1]),g:wt(t[2]),b:wt(t[3]),format:n?"name":"hex"};if(t=Ot.hex4.exec(e))return{r:wt(t[1]+""+t[1]),g:wt(t[2]+""+t[2]),b:wt(t[3]+""+t[3]),a:jt(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=Ot.hex3.exec(e))return{r:wt(t[1]+""+t[1]),g:wt(t[2]+""+t[2]),b:wt(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==Ke(e)&&(Et(e.r)&&Et(e.g)&&Et(e.b)?(u=e.r,c=e.g,l=e.b,t={r:255*yt(u,255),g:255*yt(c,255),b:255*yt(l,255)},a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Et(e.h)&&Et(e.s)&&Et(e.v)?(r=xt(e.s),o=xt(e.v),t=function(e,t,n){e=6*yt(e,360),t=yt(t,100),n=yt(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),u=r%6;return{r:255*[n,a,i,i,s,n][u],g:255*[s,n,n,a,i,i][u],b:255*[i,i,s,n,n,a][u]}}(e.h,r,o),a=!0,s="hsv"):Et(e.h)&&Et(e.s)&&Et(e.l)&&(r=xt(e.s),i=xt(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=yt(e,360),t=yt(t,100),n=yt(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),o=a(u,s,e),i=a(u,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var u,c,l;return n=mt(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.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=n.ok}function Je(e,t,n){e=yt(e,255),t=yt(t,255),n=yt(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var u=i-a;switch(o=s>.5?u/(2-i-a):u/(i+a),i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:o,l:s}}function et(e,t,n){e=yt(e,255),t=yt(t,255),n=yt(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=i,u=i-a;if(o=0===i?0:u/i,i==a)r=0;else{switch(i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:o,v:s}}function tt(e,t,n,r){var o=[_t(Math.round(e).toString(16)),_t(Math.round(t).toString(16)),_t(Math.round(n).toString(16))];return r&&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 nt(e,t,n,r){return[_t(kt(r)),_t(Math.round(e).toString(16)),_t(Math.round(t).toString(16)),_t(Math.round(n).toString(16))].join("")}function rt(e,t){t=0===t?0:t||10;var n=Qe(e).toHsl();return n.s-=t/100,n.s=bt(n.s),Qe(n)}function ot(e,t){t=0===t?0:t||10;var n=Qe(e).toHsl();return n.s+=t/100,n.s=bt(n.s),Qe(n)}function it(e){return Qe(e).desaturate(100)}function at(e,t){t=0===t?0:t||10;var n=Qe(e).toHsl();return n.l+=t/100,n.l=bt(n.l),Qe(n)}function st(e,t){t=0===t?0:t||10;var n=Qe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),Qe(n)}function ut(e,t){t=0===t?0:t||10;var n=Qe(e).toHsl();return n.l-=t/100,n.l=bt(n.l),Qe(n)}function ct(e,t){var n=Qe(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Qe(n)}function lt(e){var t=Qe(e).toHsl();return t.h=(t.h+180)%360,Qe(t)}function ht(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Qe(e).toHsl(),r=[Qe(e)],o=360/t,i=1;i<t;i++)r.push(Qe({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function dt(e){var t=Qe(e).toHsl(),n=t.h;return[Qe(e),Qe({h:(n+72)%360,s:t.s,l:t.l}),Qe({h:(n+216)%360,s:t.s,l:t.l})]}function ft(e,t,n){t=t||6,n=n||30;var r=Qe(e).toHsl(),o=360/n,i=[Qe(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Qe(r));return i}function pt(e,t){t=t||6;for(var n=Qe(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(Qe({h:r,s:o,v:i})),i=(i+s)%1;return a}Qe.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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=mt(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=et(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=et(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Je(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Je(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return tt(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[_t(Math.round(e).toString(16)),_t(Math.round(t).toString(16)),_t(Math.round(n).toString(16)),_t(kt(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"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(100*yt(this._r,255))+"%",g:Math.round(100*yt(this._g,255))+"%",b:Math.round(100*yt(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*yt(this._r,255))+"%, "+Math.round(100*yt(this._g,255))+"%, "+Math.round(100*yt(this._b,255))+"%)":"rgba("+Math.round(100*yt(this._r,255))+"%, "+Math.round(100*yt(this._g,255))+"%, "+Math.round(100*yt(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(vt[tt(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+nt(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=Qe(e);n="#"+nt(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Qe(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(at,arguments)},brighten:function(){return this._applyModification(st,arguments)},darken:function(){return this._applyModification(ut,arguments)},desaturate:function(){return this._applyModification(rt,arguments)},saturate:function(){return this._applyModification(ot,arguments)},greyscale:function(){return this._applyModification(it,arguments)},spin:function(){return this._applyModification(ct,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(ft,arguments)},complement:function(){return this._applyCombination(lt,arguments)},monochromatic:function(){return this._applyCombination(pt,arguments)},splitcomplement:function(){return this._applyCombination(dt,arguments)},triad:function(){return this._applyCombination(ht,[3])},tetrad:function(){return this._applyCombination(ht,[4])}},Qe.fromRatio=function(e,t){if("object"==Ke(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:xt(e[r]));e=n}return Qe(e,t)},Qe.equals=function(e,t){return!(!e||!t)&&Qe(e).toRgbString()==Qe(t).toRgbString()},Qe.random=function(){return Qe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Qe.mix=function(e,t,n){n=0===n?0:n||50;var r=Qe(e).toRgb(),o=Qe(t).toRgb(),i=n/100;return Qe({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},Qe.readability=function(e,t){var n=Qe(e),r=Qe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Qe.isReadable=function(e,t,n){var r,o,i=Qe.readability(e,t);switch(o=!1,r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},Qe.mostReadable=function(e,t,n){var r,o,i,a,s=null,u=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=Qe.readability(e,t[c]))>u&&(u=r,s=Qe(t[c]));return Qe.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,Qe.mostReadable(e,["#fff","#000"],n))};var gt=Qe.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"},vt=Qe.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(gt);function mt(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function yt(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function bt(e){return Math.min(1,Math.max(0,e))}function wt(e){return parseInt(e,16)}function _t(e){return 1==e.length?"0"+e:""+e}function xt(e){return e<=1&&(e=100*e+"%"),e}function kt(e){return Math.round(255*parseFloat(e)).toString(16)}function jt(e){return wt(e)/255}var Ot=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),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 Et(e){return!!Ot.CSS_UNIT.exec(e)}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gt(r.key),r)}}function Tt(e,t,n){return t&&At(e.prototype,t),n&&At(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lt(e,t,n){return(t=Gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dt(e,t)}function Nt(e){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nt(e)}function Dt(e,t){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dt(e,t)}function It(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function zt(e,t,n){return zt=It()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Dt(o,n.prototype),o},zt.apply(null,arguments)}function Ft(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Bt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bt(e)}function $t(e){var t=It();return function(){var n,r=Nt(e);if(t){var o=Nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ut(this,n)}}function Vt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Ht(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qt(e){return function(e){if(Array.isArray(e))return Zt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ht(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ht(e,t){if(e){if("string"===typeof e)return Zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,t):void 0}}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gt(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var Yt=function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())},Kt=function e(t){t.geometry&&t.geometry.dispose(),t.material&&Yt(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},Wt=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Kt(t)}},Xt=["objFilter"];function Qt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,o=void 0===r?function(){return!0}:r,i=Ft(n,Xt);return Ze(e,t.children.filter(o),(function(e){return t.add(e)}),(function(e){t.remove(e),Wt(e)}),St({objBindAttr:"__threeObj"},i))}var Jt=function(e){return isNaN(e)?parseInt(Qe(e).toHex(),16):e},en=function(e){return isNaN(e)?Qe(e).getAlpha():1},tn=(0,Ge.Z)(Ye);function nn(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=tn(t(e))}))}var rn=window.THREE?window.THREE:{Group:m.ZAu,Mesh:m.Kj0,MeshLambertMaterial:m.YBo,Color:m.Ilk,BufferGeometry:m.u9r,BufferAttribute:m.TlE,Matrix4:m.yGw,Vector3:m.Pa4,SphereGeometry:m.xo$,CylinderGeometry:m.fHI,TubeGeometry:m.WXh,ConeGeometry:m.b_z,Line:m.x12,LineBasicMaterial:m.nls,QuadraticBezierCurve3:m.mXe,CubicBezierCurve3:m.yj7,Box3:m.ZzF},on={graph:de,forcelayout:fe},an=(new rn.BufferGeometry).setAttribute?"setAttribute":"addAttribute",sn=(new rn.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",un=Ee({props:{jsonUrl:{onChange:function(e,t){var n=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then((function(e){return e.json()})).then((function(e){t.fetchingJson=!1,t.onFinishLoading(e),n.graphData(e)})))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var n=t.d3ForceLayout.force("charge");function r(e,t){e.forEach((function(e){delete e[t],delete e["v".concat(t)]}))}n&&n.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());var n=Pe(e.nodeThreeObjectExtend);e.graphData.nodes.forEach((function(r){var o=r.__threeObj;if(o){var i=t?r:e.layout.getNodePosition(r[e.nodeId]),a=n(r);e.nodePositionUpdate&&e.nodePositionUpdate(a?o.children[0]:o,{x:i.x,y:i.y,z:i.z},r)&&!a||(o.position.x=i.x,o.position.y=i.y||0,o.position.z=i.z||0)}}));var r=Pe(e.linkWidth),o=Pe(e.linkCurvature),i=Pe(e.linkCurveRotation),a=Pe(e.linkThreeObjectExtend);function s(n){var r=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),a=r[t?"source":"from"],s=r[t?"target":"to"];if(a&&s&&a.hasOwnProperty("x")&&s.hasOwnProperty("x")){var u=o(n);if(u){var c,l=new rn.Vector3(a.x,a.y||0,a.z||0),h=new rn.Vector3(s.x,s.y||0,s.z||0),d=l.distanceTo(h),f=i(n);if(d>0){var p=s.x-a.x,g=s.y-a.y||0,v=(new rn.Vector3).subVectors(h,l),m=v.clone().multiplyScalar(u).cross(0!==p||0!==g?new rn.Vector3(0,0,1):new rn.Vector3(0,1,0)).applyAxisAngle(v.normalize(),f).add((new rn.Vector3).addVectors(l,h).divideScalar(2));c=new rn.QuadraticBezierCurve3(l,m,h)}else{var y=70*u,b=-f,w=b+Math.PI/2;c=new rn.CubicBezierCurve3(l,new rn.Vector3(y*Math.cos(w),y*Math.sin(w),0).add(l),new rn.Vector3(y*Math.cos(b),y*Math.sin(b),0).add(l),h)}n.__curve=c}else n.__curve=null}}e.graphData.links.forEach((function(n){var o=n.__lineObj;if(o){var i=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),u=i[t?"source":"from"],c=i[t?"target":"to"];if(u&&c&&u.hasOwnProperty("x")&&c.hasOwnProperty("x")){s(n);var l=a(n);if(!e.linkPositionUpdate||!e.linkPositionUpdate(l?o.children[1]:o,{start:{x:u.x,y:u.y,z:u.z},end:{x:c.x,y:c.y,z:c.z}},n)||l){var h=30,d=n.__curve,f=o.children.length?o.children[0]:o;if("Line"===f.type){if(d)f.geometry.setFromPoints(d.getPoints(h));else{var p=f.geometry.getAttribute("position");p&&p.array&&6===p.array.length||f.geometry[an]("position",p=new rn.BufferAttribute(new Float32Array(6),3)),p.array[0]=u.x,p.array[1]=u.y||0,p.array[2]=u.z||0,p.array[3]=c.x,p.array[4]=c.y||0,p.array[5]=c.z||0,p.needsUpdate=!0}f.geometry.computeBoundingSphere()}else if("Mesh"===f.type)if(d){f.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(f.position.set(0,0,0),f.rotation.set(0,0,0),f.scale.set(1,1,1));var g=Math.ceil(10*r(n))/10/2,v=new rn.TubeGeometry(d,h,g,e.linkResolution,!1);f.geometry.dispose(),f.geometry=v}else{if(!f.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var m=Math.ceil(10*r(n))/10/2,y=new rn.CylinderGeometry(m,m,1,e.linkResolution,1,!1);y[sn]((new rn.Matrix4).makeTranslation(0,.5,0)),y[sn]((new rn.Matrix4).makeRotationX(Math.PI/2)),f.geometry.dispose(),f.geometry=y}var b=new rn.Vector3(u.x,u.y||0,u.z||0),w=new rn.Vector3(c.x,c.y||0,c.z||0),_=b.distanceTo(w);f.position.x=b.x,f.position.y=b.y,f.position.z=b.z,f.scale.z=_,f.parent.localToWorld(w),f.lookAt(w)}}}}}))}(),function(){var n=Pe(e.linkDirectionalArrowRelPos),r=Pe(e.linkDirectionalArrowLength),o=Pe(e.nodeVal);e.graphData.links.forEach((function(i){var a=i.__arrowObj;if(a){var s=t?i:e.layout.getLinkPosition(e.layout.graph.getLink(i.source,i.target).id),u=s[t?"source":"from"],c=s[t?"target":"to"];if(u&&c&&u.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=Math.cbrt(Math.max(0,o(u)||1))*e.nodeRelSize,h=Math.cbrt(Math.max(0,o(c)||1))*e.nodeRelSize,d=r(i),f=n(i),p=i.__curve?function(e){return i.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",u,c,e),y:t("y",u,c,e),z:t("z",u,c,e)}},g=i.__curve?i.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((c[e]||0)-(u[e]||0),2)})).reduce((function(e,t){return e+t}),0)),v=l+d+(g-l-h-d)*f,m=p(v/g),y=p((v-d)/g);["x","y","z"].forEach((function(e){return a.position[e]=y[e]}));var b=zt(rn.Vector3,qt(["x","y","z"].map((function(e){return m[e]}))));a.parent.localToWorld(b),a.lookAt(b)}}}))}(),function(){var n=Pe(e.linkDirectionalParticleSpeed);e.graphData.links.forEach((function(r){var o=r.__photonsObj&&r.__photonsObj.children,i=r.__singleHopPhotonsObj&&r.__singleHopPhotonsObj.children;if(i&&i.length||o&&o.length){var a=t?r:e.layout.getLinkPosition(e.layout.graph.getLink(r.source,r.target).id),s=a[t?"source":"from"],u=a[t?"target":"to"];if(s&&u&&s.hasOwnProperty("x")&&u.hasOwnProperty("x")){var c=n(r),l=r.__curve?function(e){return r.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,u,e),y:t("y",s,u,e),z:t("z",s,u,e)}};[].concat(qt(o||[]),qt(i||[])).forEach((function(e,t){var n="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=n?0:t/o.length),e.__progressRatio+=c,e.__progressRatio>=1){if(n)return e.parent.remove(e),void Wt(e);e.__progressRatio=e.__progressRatio%1}var r=e.__progressRatio,i=l(r);["x","y","z"].forEach((function(t){return e.position[t]=i[t]}))}))}}}))}(),this},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var n=new rn.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=Pe(e.linkDirectionalParticleWidth),o=Math.ceil(10*r(t))/10/2,i=e.linkDirectionalParticleResolution,a=new rn.SphereGeometry(o,i,i),s=Pe(e.linkColor),u=Pe(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",c=new rn.Color(Jt(u)),l=3*e.linkOpacity,h=new rn.MeshLambertMaterial({color:c,transparent:!0,opacity:l});t.__singleHopPhotonsObj.add(new rn.Mesh(a,h))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var o=new rn.Box3;o.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(o)}return r.concat.apply(r,qt((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,qt(["x","y","z"].map((function(e){return Lt({},e,[(0,Se.Z)(n,(function(t){return t.min[e]})),(0,Me.Z)(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:R().force("link",F()).force("charge",le()).force("center",he()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&nn(e.graphData.nodes,Pe(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&nn(e.graphData.links,Pe(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=Pe(e.nodeThreeObject),o=Pe(e.nodeThreeObjectExtend),i=Pe(e.nodeVal),a=Pe(e.nodeColor),s=Pe(e.nodeVisibility),u={},c={};Qt(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,i=r(t),a=o(t);return i&&e.nodeThreeObject===i&&(i=i.clone()),i&&!a?n=i:((n=new rn.Mesh).__graphDefaultObj=!0,i&&a&&n.add(i)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=i(n)||1,o=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===o&&t.geometry.parameters.widthSegments===s||(u.hasOwnProperty(r)||(u[r]=new rn.SphereGeometry(o,s,s)),t.geometry.dispose(),t.geometry=u[r]);var l=a(n),h=new rn.Color(Jt(l||"#ffffaa")),d=e.nodeOpacity*en(l);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(h)&&t.material.opacity===d||(c.hasOwnProperty(l)||(c[l]=new rn.MeshLambertMaterial({color:h,transparent:!0,opacity:d})),t.material.dispose(),t.material=c[l])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var l=Pe(e.linkThreeObject),h=Pe(e.linkThreeObjectExtend),d=Pe(e.linkMaterial),f=Pe(e.linkVisibility),p=Pe(e.linkColor),g=Pe(e.linkWidth),v={},m={},y={},b=e.graphData.links.filter(f);if(Qt(b,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},exitObj:function(e){var t=e.__data&&e.__data.__singleHopPhotonsObj;t&&(t.parent.remove(t),Wt(t),delete e.__data.__singleHopPhotonsObj)},createObj:function(t){var n,r,o=l(t),i=h(t);if(o&&e.linkThreeObject===o&&(o=o.clone()),!o||i)if(!!g(t))n=new rn.Mesh;else{var a=new rn.BufferGeometry;a[an]("position",new rn.BufferAttribute(new Float32Array(6),3)),n=new rn.Line(a)}return o?i?((r=new rn.Group).__graphDefaultObj=!0,r.add(n),r.add(o)):r=o:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,o=Math.ceil(10*g(n))/10,i=!!o;if(i){var a=o/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==a||r.geometry.parameters.radialSegments!==s){if(!v.hasOwnProperty(o)){var u=new rn.CylinderGeometry(a,a,1,s,1,!1);u[sn]((new rn.Matrix4).makeTranslation(0,.5,0)),u[sn]((new rn.Matrix4).makeRotationX(Math.PI/2)),v[o]=u}r.geometry.dispose(),r.geometry=v[o]}}var c=d(n);if(c)r.material=c;else{var l=p(n),h=new rn.Color(Jt(l||"#f0f0f0")),f=e.linkOpacity*en(l),b=i?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==b||!r.material.color.equals(h)||r.material.opacity!==f){var w=i?m:y;w.hasOwnProperty(l)||(w[l]=new rn[b]({color:h,transparent:f<1,opacity:f,depthWrite:f>=1})),r.material.dispose(),r.material=w[l]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var w=Pe(e.linkDirectionalArrowLength),_=Pe(e.linkDirectionalArrowColor);Qt(b.filter(w),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new rn.Mesh(void 0,new rn.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=w(n),o=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==o){var i=new rn.ConeGeometry(.25*r,r,o);i.translate(0,r/2,0),i.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=i}var a=_(n)||p(n)||"#f0f0f0";t.material.color=new rn.Color(Jt(a)),t.material.opacity=3*e.linkOpacity*en(a)}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var x=Pe(e.linkDirectionalParticles),k=Pe(e.linkDirectionalParticleWidth),j=Pe(e.linkDirectionalParticleColor),O={},E={};Qt(b.filter(x),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new rn.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,o=Math.round(Math.abs(x(n))),i=!!t.children.length&&t.children[0],a=Math.ceil(10*k(n))/10/2,s=e.linkDirectionalParticleResolution;i&&i.geometry.parameters.radius===a&&i.geometry.parameters.widthSegments===s?r=i.geometry:(E.hasOwnProperty(a)||(E[a]=new rn.SphereGeometry(a,s,s)),r=E[a],i&&i.geometry.dispose());var u,c=j(n)||p(n)||"#f0f0f0",l=new rn.Color(Jt(c)),h=3*e.linkOpacity;i&&i.material.color.equals(l)&&i.material.opacity===h?u=i.material:(O.hasOwnProperty(c)||(O[c]=new rn.MeshLambertMaterial({color:l,transparent:!0,opacity:h})),u=O[c],i&&i.material.dispose()),Qt(qt(new Array(o)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new rn.Mesh(r,u)},updateObj:function(e){e.geometry=r,e.material=u}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var P,S="ngraph"!==e.forceEngine;if(S){(P=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var M=e.d3ForceLayout.force("link");M&&M.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var C=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.nodeFilter,a=void 0===i?function(){return!0}:i,s=o.onLoopError,u=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,o=u(n),i=u(r);if(!c.hasOwnProperty(o))throw"Missing source node with id: ".concat(o);if(!c.hasOwnProperty(i))throw"Missing target node with id: ".concat(i);var a=c[o],s=c[i];function u(e){return"object"===Mt(e)?t(e):e}a.out.push(s)}));var l=[];return h(Object.values(c)),Object.assign.apply(Object,[{}].concat(qt(Object.entries(c).filter((function(e){return!Vt(e,2)[1].skip})).map((function(e){var t=Vt(e,2);return Lt({},t[0],t[1].depth)})))));function h(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=function(){var o=e[i];if(-1!==n.indexOf(o)){var a=[].concat(qt(n.slice(n.indexOf(o))),[o]).map((function(e){return t(e.data)}));return l.some((function(e){return e.length===a.length&&e.every((function(e,t){return e===a[t]}))}))||(l.push(a),u(a)),"continue"}r>o.depth&&(o.depth=r,h(o.out,[].concat(qt(n),[o]),r+(o.skip?0:1)))},i=0,a=e.length;i<a;i++)o()}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),A=Math.max.apply(Math,qt(Object.values(C||[]))),T=e.dagLevelDistance||e.graphData.nodes.length/(A||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var L=function(t,n){return function(r){return t?(C[r[e.nodeId]]-A/2)*T*(n?-1:1):void 0}},R=L(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),D=L(-1!==["td","bu"].indexOf(e.dagMode),"td"===e.dagMode),I=L(-1!==["zin","zout"].indexOf(e.dagMode),"zout"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=R(e),e.fy=D(e),e.fz=I(e)}))}e.d3ForceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?function(e,t,n,r){var o,i,a,s,u=N(.1);function c(e){for(var u=0,c=o.length;u<c;++u){var l=o[u],h=l.x-t||1e-6,d=(l.y||0)-n||1e-6,f=(l.z||0)-r||1e-6,p=Math.sqrt(h*h+d*d+f*f),g=(s[u]-p)*a[u]*e/p;l.vx+=h*g,i>1&&(l.vy+=d*g),i>2&&(l.vz+=f*g)}}function l(){if(o){var t,n=o.length;for(a=new Array(n),s=new Array(n),t=0;t<n;++t)s[t]=+e(o[t],t,o),a[t]=isNaN(s[t])?0:+u(o[t],t,o)}}return"function"!==typeof e&&(e=N(+e)),null==t&&(t=0),null==n&&(n=0),null==r&&(r=0),c.initialize=function(e,...t){o=e,i=t.find((e=>[1,2,3].includes(e)))||2,l()},c.strength=function(e){return arguments.length?(u="function"===typeof e?e:N(+e),l(),c):u},c.radius=function(t){return arguments.length?(e="function"===typeof t?t:N(+t),l(),c):e},c.x=function(e){return arguments.length?(t=+e,c):t},c.y=function(e){return arguments.length?(n=+e,c):n},c.z=function(e){return arguments.length?(r=+e,c):r},c}((function(t){var n=C[t[e.nodeId]]||-1;return("radialin"===e.dagMode?A-n:n)*T})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var z=on.graph();e.graphData.nodes.forEach((function(t){z.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){z.addLink(e.source,e.target)})),(P=on.forcelayout(z,St({dimensions:e.numDimensions},e.ngraphPhysics))).graph=z}for(var F=0;F<e.warmupTicks&&!(S&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);F++)P[S?"tick":"step"]();e.layout=P,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}});var cn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){Rt(o,t);var r=$t(o);function o(){var t;Ct(this,o);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e().apply(void 0,[].concat(qt(n?[Bt(t)]:[]),a)),t}return Tt(o)}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(un,(window.THREE?window.THREE:{Group:m.ZAu}).Group,!0);const ln={type:"change"},hn={type:"start"},dn={type:"end"};class fn extends m.pBf{constructor(e,t){super();const n=this,r=-1,o=0,i=1,a=2,s=3,u=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:m.RsA.ROTATE,MIDDLE:m.RsA.DOLLY,RIGHT:m.RsA.PAN},this.target=new m.Pa4;const c=1e-6,l=new m.Pa4;let h=1,d=r,f=r,p=0,g=0,v=0;const y=new m.Pa4,b=new m.FM8,w=new m.FM8,_=new m.Pa4,x=new m.FM8,k=new m.FM8,j=new m.FM8,O=new m.FM8,E=[],P={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const S=function(){const e=new m.FM8;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),M=function(){const e=new m.FM8;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function C(e){!1!==n.enabled&&(0===E.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",A),n.domElement.addEventListener("pointerup",T)),function(e){E.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(F(e),E.length))d=s,w.copy(M(E[0].pageX,E[0].pageY)),b.copy(w);else{d=u;const e=E[0].pageX-E[1].pageX,t=E[0].pageY-E[1].pageY;g=p=Math.sqrt(e*e+t*t);const n=(E[0].pageX+E[1].pageX)/2,r=(E[0].pageY+E[1].pageY)/2;j.copy(S(n,r)),O.copy(j)}n.dispatchEvent(hn)}(e):function(e){if(d===r)switch(e.button){case n.mouseButtons.LEFT:d=o;break;case n.mouseButtons.MIDDLE:d=i;break;case n.mouseButtons.RIGHT:d=a}const t=f!==r?f:d;t!==o||n.noRotate?t!==i||n.noZoom?t!==a||n.noPan||(j.copy(S(e.pageX,e.pageY)),O.copy(j)):(x.copy(S(e.pageX,e.pageY)),k.copy(x)):(w.copy(M(e.pageX,e.pageY)),b.copy(w));n.dispatchEvent(hn)}(e))}function A(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){if(1===(F(e),E.length))b.copy(w),w.copy(M(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===E[0].pointerId?E[1]:E[0];return P[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;g=Math.sqrt(n*n+r*r);const o=(e.pageX+t.x)/2,i=(e.pageY+t.y)/2;O.copy(S(o,i))}}(e):function(e){const t=f!==r?f:d;t!==o||n.noRotate?t!==i||n.noZoom?t!==a||n.noPan||O.copy(S(e.pageX,e.pageY)):k.copy(S(e.pageX,e.pageY)):(b.copy(w),w.copy(M(e.pageX,e.pageY)))}(e))}function T(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(E.length){case 0:d=r;break;case 1:d=s,w.copy(M(e.pageX,e.pageY)),b.copy(w);break;case 2:d=u;for(let t=0;t<E.length;t++)if(E[t].pointerId!==e.pointerId){const e=P[E[t].pointerId];w.copy(M(e.x,e.y)),b.copy(w);break}}n.dispatchEvent(dn)}(e):(d=r,n.dispatchEvent(dn)),z(e),0===E.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",A),n.domElement.removeEventListener("pointerup",T)))}function L(e){z(e)}function R(e){!1!==n.enabled&&(window.removeEventListener("keydown",R),f===r&&(e.code!==n.keys[o]||n.noRotate?e.code!==n.keys[i]||n.noZoom?e.code!==n.keys[a]||n.noPan||(f=a):f=i:f=o))}function N(){!1!==n.enabled&&(f=r,window.addEventListener("keydown",R))}function D(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:x.y-=.025*e.deltaY;break;case 1:x.y-=.01*e.deltaY;break;default:x.y-=25e-5*e.deltaY}n.dispatchEvent(hn),n.dispatchEvent(dn)}}function I(e){!1!==n.enabled&&e.preventDefault()}function z(e){delete P[e.pointerId];for(let t=0;t<E.length;t++)if(E[t].pointerId==e.pointerId)return void E.splice(t,1)}function F(e){let t=P[e.pointerId];void 0===t&&(t=new m.FM8,P[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new m.Pa4,t=new m._fP,r=new m.Pa4,o=new m.Pa4,i=new m.Pa4,a=new m.Pa4;return function(){a.set(w.x-b.x,w.y-b.y,0);let s=a.length();s?(y.copy(n.object.position).sub(n.target),r.copy(y).normalize(),o.copy(n.object.up).normalize(),i.crossVectors(o,r).normalize(),o.setLength(w.y-b.y),i.setLength(w.x-b.x),a.copy(o.add(i)),e.crossVectors(a,y).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),y.applyQuaternion(t),n.object.up.applyQuaternion(t),_.copy(e),v=s):!n.staticMoving&&v&&(v*=Math.sqrt(1-n.dynamicDampingFactor),y.copy(n.object.position).sub(n.target),t.setFromAxisAngle(_,v),y.applyQuaternion(t),n.object.up.applyQuaternion(t)),b.copy(w)}}(),this.zoomCamera=function(){let e;d===u?(e=p/g,p=g,n.object.isPerspectiveCamera?y.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom=m.M8C.clamp(n.object.zoom/e,n.minZoom,n.maxZoom),h!==n.object.zoom&&n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(k.y-x.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?y.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom=m.M8C.clamp(n.object.zoom/e,n.minZoom,n.maxZoom),h!==n.object.zoom&&n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?x.copy(k):x.y+=(k.y-x.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new m.FM8,t=new m.Pa4,r=new m.Pa4;return function(){if(e.copy(O).sub(j),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(y.length()*n.panSpeed),r.copy(y).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?j.copy(O):j.add(e.subVectors(O,j).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(y.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,y.setLength(n.maxDistance)),x.copy(k)),y.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,y.setLength(n.minDistance)),x.copy(k)))},this.update=function(){y.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,y),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),l.distanceToSquared(n.object.position)>c&&(n.dispatchEvent(ln),l.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(l.distanceToSquared(n.object.position)>c||h!==n.object.zoom)&&(n.dispatchEvent(ln),l.copy(n.object.position),h=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){d=r,f=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),y.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(ln),l.copy(n.object.position),h=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",I),n.domElement.removeEventListener("pointerdown",C),n.domElement.removeEventListener("pointercancel",L),n.domElement.removeEventListener("wheel",D),n.domElement.removeEventListener("pointermove",A),n.domElement.removeEventListener("pointerup",T),window.removeEventListener("keydown",R),window.removeEventListener("keyup",N)},this.domElement.addEventListener("contextmenu",I),this.domElement.addEventListener("pointerdown",C),this.domElement.addEventListener("pointercancel",L),this.domElement.addEventListener("wheel",D,{passive:!1}),window.addEventListener("keydown",R),window.addEventListener("keyup",N),this.handleResize(),this.update()}}const pn={type:"change"},gn={type:"start"},vn={type:"end"},mn=new m.zHn,yn=new m.JOQ,bn=Math.cos(70*m.M8C.DEG2RAD);class wn extends m.pBf{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new m.Pa4,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:m.RsA.ROTATE,MIDDLE:m.RsA.DOLLY,RIGHT:m.RsA.PAN},this.touches={ONE:m.QmN.ROTATE,TWO:m.QmN.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",G),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",G),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(pn),n.update(),o=r.NONE},this.update=function(){const t=new m.Pa4,l=(new m._fP).setFromUnitVectors(e.up,new m.Pa4(0,1,0)),h=l.clone().invert(),d=new m.Pa4,f=new m._fP,p=new m.Pa4,g=2*Math.PI;return function(){const v=n.object.position;t.copy(v).sub(n.target),t.applyQuaternion(l),a.setFromVector3(t),n.autoRotate&&o===r.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let y=n.minAzimuthAngle,b=n.maxAzimuthAngle;isFinite(y)&&isFinite(b)&&(y<-Math.PI?y+=g:y>Math.PI&&(y-=g),b<-Math.PI?b+=g:b>Math.PI&&(b-=g),a.theta=y<=b?Math.max(y,Math.min(b,a.theta)):a.theta>(y+b)/2?Math.max(y,a.theta):Math.min(b,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),n.zoomToCursor&&x||n.object.isOrthographicCamera?a.radius=R(a.radius):a.radius=R(a.radius*u),t.setFromSpherical(a),t.applyQuaternion(h),v.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0));let k=!1;if(n.zoomToCursor&&x){let r=null;if(n.object.isPerspectiveCamera){const e=t.length();r=R(e*u);const o=e-r;n.object.position.addScaledVector(w,o),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new m.Pa4(_.x,_.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),k=!0;const o=new m.Pa4(_.x,_.y,0);o.unproject(n.object),n.object.position.sub(o).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(mn.origin.copy(n.object.position),mn.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(mn.direction))<bn?e.lookAt(n.target):(yn.setFromNormalAndCoplanarPoint(n.object.up,n.target),mn.intersectPlane(yn,n.target))))}else n.object.isOrthographicCamera&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),k=!0);return u=1,x=!1,!!(k||d.distanceToSquared(n.object.position)>i||8*(1-f.dot(n.object.quaternion))>i||p.distanceToSquared(n.target)>0)&&(n.dispatchEvent(pn),d.copy(n.object.position),f.copy(n.object.quaternion),p.copy(n.target),k=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",Y),n.domElement.removeEventListener("pointerdown",V),n.domElement.removeEventListener("pointercancel",H),n.domElement.removeEventListener("wheel",Z),n.domElement.removeEventListener("pointermove",q),n.domElement.removeEventListener("pointerup",H),null!==n._domElementKeyEvents&&(n._domElementKeyEvents.removeEventListener("keydown",G),n._domElementKeyEvents=null)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=r.NONE;const i=1e-6,a=new m.$V,s=new m.$V;let u=1;const c=new m.Pa4,l=new m.FM8,h=new m.FM8,d=new m.FM8,f=new m.FM8,p=new m.FM8,g=new m.FM8,v=new m.FM8,y=new m.FM8,b=new m.FM8,w=new m.Pa4,_=new m.FM8;let x=!1;const k=[],j={};function O(){return Math.pow(.95,n.zoomSpeed)}function E(e){s.theta-=e}function P(e){s.phi-=e}const S=function(){const e=new m.Pa4;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),M=function(){const e=new m.Pa4;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),C=function(){const e=new m.Pa4;return function(t,r){const o=n.domElement;if(n.object.isPerspectiveCamera){const i=n.object.position;e.copy(i).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),S(2*t*a/o.clientHeight,n.object.matrix),M(2*r*a/o.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(S(t*(n.object.right-n.object.left)/n.object.zoom/o.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/o.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function A(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function T(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function L(t){if(!n.zoomToCursor)return;x=!0;const r=n.domElement.getBoundingClientRect(),o=t.clientX-r.left,i=t.clientY-r.top,a=r.width,s=r.height;_.x=o/a*2-1,_.y=-i/s*2+1,w.set(_.x,_.y,1).unproject(e).sub(e.position).normalize()}function R(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function N(e){l.set(e.clientX,e.clientY)}function D(e){f.set(e.clientX,e.clientY)}function I(){if(1===k.length)l.set(k[0].pageX,k[0].pageY);else{const e=.5*(k[0].pageX+k[1].pageX),t=.5*(k[0].pageY+k[1].pageY);l.set(e,t)}}function z(){if(1===k.length)f.set(k[0].pageX,k[0].pageY);else{const e=.5*(k[0].pageX+k[1].pageX),t=.5*(k[0].pageY+k[1].pageY);f.set(e,t)}}function F(){const e=k[0].pageX-k[1].pageX,t=k[0].pageY-k[1].pageY,n=Math.sqrt(e*e+t*t);v.set(0,n)}function B(e){if(1==k.length)h.set(e.pageX,e.pageY);else{const t=W(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);h.set(n,r)}d.subVectors(h,l).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*d.x/t.clientHeight),P(2*Math.PI*d.y/t.clientHeight),l.copy(h)}function U(e){if(1===k.length)p.set(e.pageX,e.pageY);else{const t=W(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}g.subVectors(p,f).multiplyScalar(n.panSpeed),C(g.x,g.y),f.copy(p)}function $(e){const t=W(e),r=e.pageX-t.x,o=e.pageY-t.y,i=Math.sqrt(r*r+o*o);y.set(0,i),b.set(0,Math.pow(y.y/v.y,n.zoomSpeed)),A(b.y),v.copy(y)}function V(e){!1!==n.enabled&&(0===k.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",q),n.domElement.addEventListener("pointerup",H)),function(e){k.push(e)}(e),"touch"===e.pointerType?function(e){switch(K(e),k.length){case 1:switch(n.touches.ONE){case m.QmN.ROTATE:if(!1===n.enableRotate)return;I(),o=r.TOUCH_ROTATE;break;case m.QmN.PAN:if(!1===n.enablePan)return;z(),o=r.TOUCH_PAN;break;default:o=r.NONE}break;case 2:switch(n.touches.TWO){case m.QmN.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&F(),n.enablePan&&z(),o=r.TOUCH_DOLLY_PAN;break;case m.QmN.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&F(),n.enableRotate&&I(),o=r.TOUCH_DOLLY_ROTATE;break;default:o=r.NONE}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(gn)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case m.RsA.DOLLY:if(!1===n.enableZoom)return;!function(e){L(e),v.set(e.clientX,e.clientY)}(e),o=r.DOLLY;break;case m.RsA.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;D(e),o=r.PAN}else{if(!1===n.enableRotate)return;N(e),o=r.ROTATE}break;case m.RsA.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;N(e),o=r.ROTATE}else{if(!1===n.enablePan)return;D(e),o=r.PAN}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(gn)}(e))}function q(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(K(e),o){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;B(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;U(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&$(e),n.enablePan&&U(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&$(e),n.enableRotate&&B(e)}(e),n.update();break;default:o=r.NONE}}(e):function(e){switch(o){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){h.set(e.clientX,e.clientY),d.subVectors(h,l).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*d.x/t.clientHeight),P(2*Math.PI*d.y/t.clientHeight),l.copy(h),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){y.set(e.clientX,e.clientY),b.subVectors(y,v),b.y>0?A(O()):b.y<0&&T(O()),v.copy(y),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){p.set(e.clientX,e.clientY),g.subVectors(p,f).multiplyScalar(n.panSpeed),C(g.x,g.y),f.copy(p),n.update()}(e)}}(e))}function H(e){!function(e){delete j[e.pointerId];for(let t=0;t<k.length;t++)if(k[t].pointerId==e.pointerId)return void k.splice(t,1)}(e),0===k.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",q),n.domElement.removeEventListener("pointerup",H)),n.dispatchEvent(vn),o=r.NONE}function Z(e){!1!==n.enabled&&!1!==n.enableZoom&&o===r.NONE&&(e.preventDefault(),n.dispatchEvent(gn),function(e){L(e),e.deltaY<0?T(O()):e.deltaY>0&&A(O()),n.update()}(e),n.dispatchEvent(vn))}function G(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):C(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):C(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?E(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):C(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?E(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):C(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function Y(e){!1!==n.enabled&&e.preventDefault()}function K(e){let t=j[e.pointerId];void 0===t&&(t=new m.FM8,j[e.pointerId]=t),t.set(e.pageX,e.pageY)}function W(e){const t=e.pointerId===k[0].pointerId?k[1]:k[0];return j[t.pointerId]}n.domElement.addEventListener("contextmenu",Y),n.domElement.addEventListener("pointerdown",V),n.domElement.addEventListener("pointercancel",H),n.domElement.addEventListener("wheel",Z,{passive:!1}),this.update()}}const _n={type:"change"};class xn extends m.pBf{constructor(e,t){super(),this.object=e,this.domElement=t,this.enabled=!0,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=1e-6,o=new m._fP,i=new m.Pa4;this.tmpQuaternion=new m._fP,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new m.Pa4(0,0,0),this.rotationVector=new m.Pa4(0,0,0),this.keydown=function(e){if(!e.altKey&&!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){if(!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()}},this.pointerdown=function(e){if(!1!==this.enabled)if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!1!==this.enabled&&(!this.dragToLook||this.status>0)){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.pointerup=function(e){if(!1!==this.enabled){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()}},this.contextMenu=function(e){!1!==this.enabled&&e.preventDefault()},this.update=function(e){if(!1===this.enabled)return;const t=e*n.movementSpeed,a=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*a,n.rotationVector.y*a,n.rotationVector.z*a,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(i.distanceToSquared(n.object.position)>r||8*(1-o.dot(n.object.quaternion))>r)&&(n.dispatchEvent(_n),o.copy(n.object.quaternion),i.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",a),this.domElement.removeEventListener("pointerdown",u),this.domElement.removeEventListener("pointermove",s),this.domElement.removeEventListener("pointerup",c),window.removeEventListener("keydown",l),window.removeEventListener("keyup",h)};const a=this.contextMenu.bind(this),s=this.pointermove.bind(this),u=this.pointerdown.bind(this),c=this.pointerup.bind(this),l=this.keydown.bind(this),h=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",a),this.domElement.addEventListener("pointerdown",u),this.domElement.addEventListener("pointermove",s),this.domElement.addEventListener("pointerup",c),window.addEventListener("keydown",l),window.addEventListener("keyup",h),this.updateMovementVector(),this.updateRotationVector()}}const kn={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class jn{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const On=new m.iKG(-1,1,1,-1,0,1),En=new m.u9r;En.setAttribute("position",new m.a$l([-1,3,0,-1,-1,0,3,-1,0],3)),En.setAttribute("uv",new m.a$l([0,2,0,0,2,0],2));class Pn{constructor(e){this._mesh=new m.Kj0(En,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,On)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class Sn extends jn{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof m.jyz?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=m.rDY.clone(e.uniforms),this.material=new m.jyz({name:void 0!==e.name?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new Pn(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Mn extends jn{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),o=e.state;let i,a;o.buffers.color.setMask(!1),o.buffers.depth.setMask(!1),o.buffers.color.setLocked(!0),o.buffers.depth.setLocked(!0),this.inverse?(i=0,a=1):(i=1,a=0),o.buffers.stencil.setTest(!0),o.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.buffers.stencil.setFunc(r.ALWAYS,i,4294967295),o.buffers.stencil.setClear(a),o.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),o.buffers.color.setLocked(!1),o.buffers.depth.setLocked(!1),o.buffers.color.setMask(!0),o.buffers.depth.setMask(!0),o.buffers.stencil.setLocked(!1),o.buffers.stencil.setFunc(r.EQUAL,1,4294967295),o.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.buffers.stencil.setLocked(!0)}}class Cn extends jn{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class An{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),void 0===t){const n=e.getSize(new m.FM8);this._width=n.width,this._height=n.height,(t=new m.dd2(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:m.cLu})).texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Sn(kn),this.copyPass.material.blending=m.jFi,this.clock=new m.SUY}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,o=this.passes.length;r<o;r++){const t=this.passes[r];if(!1!==t.enabled){if(t.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==Mn&&(t instanceof Mn?n=!0:t instanceof Cn&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new m.FM8);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let o=0;o<this.passes.length;o++)this.passes[o].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class Tn extends jn{constructor(e,t,n,r,o){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==o?o:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new m.Ilk}render(e,t,n){const r=e.autoClear;let o,i;e.autoClear=!1,void 0!==this.overrideMaterial&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),o=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,o),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=i),e.autoClear=r}}var Ln=n(13102),Rn=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return this.None(e)},Out:function(e){return this.None(e)},InOut:function(e){return this.None(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 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),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 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Rn.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?.5*Rn.Bounce.In(2*e):.5*Rn.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),Nn=function(){return performance.now()},Dn=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=Nn()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var o=this._tweens[n[r]],i=!t;o&&!1===o.update(e,i)&&!t&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),In={Linear:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),i=In.Utils.Linear;return t<0?i(e[0],e[1],r):t>1?i(e[n],e[n-1],n-r):i(e[o],e[o+1>n?n:o+1],r-o)},Bezier:function(e,t){for(var n=0,r=e.length-1,o=Math.pow,i=In.Utils.Bernstein,a=0;a<=r;a++)n+=o(1-t,r-a)*o(t,a)*e[a]*i(r,a);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),i=In.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(r=n*(1+t))),i(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],r-o)):t<0?e[0]-(i(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(i(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):i(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],r-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=In.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,o){var i=.5*(n-e),a=.5*(r-t),s=o*o;return(2*t-2*n+i+a)*(o*s)+(-3*t+3*n-2*i-a)*s+i*o+t}}},zn=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Fn=new Dn,Bn=function(){function e(e,t){void 0===t&&(t=Fn),this._object=e,this._group=t,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=Rn.Linear.None,this._interpolationFunction=In.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=zn.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){if(void 0===t&&(t=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=e,this._propertiesAreSetUp=!1,this._duration=t,this},e.prototype.duration=function(e){return void 0===e&&(e=1e3),this._duration=e,this},e.prototype.dynamic=function(e){return void 0===e&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,t){if(void 0===e&&(e=Nn()),void 0===t&&(t=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var n in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var r={};for(var o in this._valuesEnd)r[o]=this._valuesEnd[o];this._valuesEnd=r}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,t,n,r,o){for(var i in n){var a=e[i],s=Array.isArray(a),u=s?"array":typeof a,c=!s&&Array.isArray(n[i]);if("undefined"!==u&&"function"!==u){if(c){if(0===(v=n[i]).length)continue;for(var l=[a],h=0,d=v.length;h<d;h+=1){var f=this._handleRelativeValue(a,v[h]);if(isNaN(f)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}l.push(f)}c&&(n[i]=l)}if("object"!==u&&!s||!a||c)("undefined"===typeof t[i]||o)&&(t[i]=a),s||(t[i]*=1),r[i]=c?n[i].slice().reverse():t[i]||0;else{t[i]=s?[]:{};var p=a;for(var g in p)t[i][g]=p[g];r[i]=s?[]:{};var v=n[i];if(!this._isDynamic){var m={};for(var g in v)m[g]=v[g];n[i]=v=m}this._setupProperties(p,t[i],v,r[i],o)}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=Nn()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=Nn()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return void 0===e&&(e=Fn),this._group=e,this},e.prototype.delay=function(e){return void 0===e&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return void 0===e&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return void 0===e&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return void 0===e&&(e=Rn.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return void 0===e&&(e=In.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=Nn()),void 0===t&&(t=!0),this._isPaused)return!0;var n,r,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var i=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!==typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,s=this._chainedTweens.length;a<s;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var o in n)if(void 0!==t[o]){var i=t[o]||0,a=n[o],s=Array.isArray(e[o]),u=Array.isArray(a);!s&&u?e[o]=this._interpolationFunction(a,r):"object"===typeof a&&a?this._updateProperties(e[o],i,a,r):"number"===typeof(a=this._handleRelativeValue(i,a))&&(e[o]=i+(a-i)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!==typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"===typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),Un=(zn.nextId,Fn),$n=(Un.getAll.bind(Un),Un.removeAll.bind(Un),Un.add.bind(Un),Un.remove.bind(Un),Un.update.bind(Un));function Vn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Zn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hn(e){return function(e){if(Array.isArray(e))return Gn(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Zn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zn(e,t){if(e){if("string"===typeof e)return Gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gn(e,t):void 0}}function Gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n top: 0;\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n user-select: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var Yn=window.THREE?window.THREE:{WebGLRenderer:m.CP7,Scene:m.xsS,PerspectiveCamera:m.cPb,Raycaster:m.iMs,SRGBColorSpace:m.KI_,TextureLoader:m.dpR,Vector2:m.FM8,Vector3:m.Pa4,Box3:m.ZzF,Color:m.Ilk,Mesh:m.Kj0,SphereGeometry:m.xo$,MeshBasicMaterial:m.vBJ,BackSide:m._Li,EventDispatcher:m.pBf,MOUSE:m.RsA,Quaternion:m._fP,Spherical:m.$V,Clock:m.SUY},Kn=Ee({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Pe(e.tooltipContent)(t)||"",e.hoverObj=t)}$n()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var o=e.camera;if(t&&e.initialised){var i=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},o.position),u=h();new Bn(s).to(i,r).easing(Rn.Quadratic.Out).onUpdate(c).start(),new Bn(u).to(a,r/3).easing(Rn.Quadratic.Out).onUpdate(l).start()}else c(i),l(a);return this}return Object.assign({},o.position,{lookAt:h()});function c(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(o.position.x=t),void 0!==n&&(o.position.y=n),void 0!==r&&(o.position.z=r)}function l(t){var n=new Yn.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:o.lookAt(n)}function h(){return Object.assign(new Yn.Vector3(0,0,-1e3).applyQuaternion(o.quaternion).add(o.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return this.fitToBbox(this.getBbox.apply(this,o),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=e.camera;if(t){var i=new Yn.Vector3(0,0,0),a=2*Math.max.apply(Math,Hn(Object.entries(t).map((function(e){var t=qn(e,2),n=t[0],r=t[1];return Math.max.apply(Math,Hn(r.map((function(e){return Math.abs(i[n]-e)}))))})))),s=(1-2*r/e.height)*o.fov,u=a/Math.atan(s*Math.PI/180),c=u/o.aspect,l=Math.max(u,c);if(l>0){var h=i.clone().sub(o.position).normalize().multiplyScalar(-l);this.cameraPosition(h,i,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Yn.Box3(new Yn.Vector3(0,0,0),new Yn.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,Hn(["x","y","z"].map((function(e){return Vn({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var o=new Yn.Vector3(t,n,r);return o.project(this.camera()),{x:(o.x+1)*e.width/2,y:-(o.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=new Yn.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Yn.Raycaster;return i.setFromCamera(o,e.camera),Object.assign({},i.ray.at(r,new Yn.Vector3))},intersectingObjects:function(e,t,n){var r=new Yn.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new Yn.Raycaster;return o.params.Line.threshold=e.lineHoverPrecision,o.setFromCamera(r,e.camera),o.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Yn.Scene,camera:new Yn.PerspectiveCamera,clock:new Yn.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,o=void 0===r?"trackball":r,i=n.rendererConfig,a=void 0===i?{}:i,s=n.extraRenderers,u=void 0===s?[]:s,c=n.waitForLoadComplete,l=void 0===c||c;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[o]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Yn.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.container);t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Yn.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=u,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new An(t.renderer),t.postProcessingComposer.addPass(new Tn(t.scene,t.camera)),t.controls=new{trackball:fn,orbit:wn,fly:xn}[o](t.camera,t.renderer.domElement),"fly"===o&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==o&&"orbit"!==o||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(Hn(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Yn.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!l,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(Hn(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Yn.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=(0,Ln.Oq)(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Yn.Color((0,Ln.jb)(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Yn.TextureLoader).load(e.backgroundImageUrl,(function(t){t.colorSpace=Yn.SRGBColorSpace,e.skysphere.material=new Yn.MeshBasicMaterial({map:t,side:Yn.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(n),!0).forEach((function(t){Qn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e){return function(e){if(Array.isArray(e))return er(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return er(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tr(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var s=r[t].apply(r,i);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".graph-info-msg {\n top: 50%;\n width: 100%;\n text-align: center;\n color: lavender;\n opacity: 0.7;\n font-size: 22px;\n position: absolute;\n font-family: Sans-serif;\n}\n\n.scene-container .clickable {\n cursor: pointer;\n}\n\n.scene-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.scene-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}");var nr=window.THREE?window.THREE:{AmbientLight:m.Mig,DirectionalLight:m.Ox3,Vector3:m.Pa4},rr=tr("forceGraph",cn),or=Object.assign.apply(Object,Jn(["jsonUrl","graphData","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaDecay","d3VelocityDecay","d3AlphaMin","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return Qn({},e,rr.linkProp(e))})))),ir=Object.assign.apply(Object,Jn(["refresh","getGraphBbox","d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return Qn({},e,rr.linkMethod(e))})))),ar=tr("renderObjs",Kn),sr=Object.assign.apply(Object,Jn(["width","height","backgroundColor","showNavInfo","enablePointerInteraction"].map((function(e){return Qn({},e,ar.linkProp(e))})))),ur=Object.assign.apply(Object,Jn(["cameraPosition","postProcessingComposer"].map((function(e){return Qn({},e,ar.linkMethod(e))}))).concat([{graph2ScreenCoords:ar.linkMethod("getScreenCoords"),screen2GraphCoords:ar.linkMethod("getSceneCoords")}])),cr=Ee({props:Xn(Xn({nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)},triggerUpdate:!1},enableNavigationControls:{default:!0,onChange:function(e,t){var n=t.renderObjs.controls();n&&(n.enabled=e,e&&n.domElement&&n.domElement.dispatchEvent(new PointerEvent("pointerup")))},triggerUpdate:!1},enableNodeDrag:{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}},or),sr),methods:Xn(Xn({zoomToFit:function(e,t,n){for(var r,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return e.renderObjs.fitToBbox((r=e.forceGraph).getGraphBbox.apply(r,i),t,n),this},pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.enablePointerInteraction&&(this.renderer().domElement.style.cursor=null),e.forceGraph.tickFrame(),e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},tbControls:function(e){return e.renderObjs.tbControls()},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ir),ur),stateInit:function(e){var t=e.controlType,n=e.rendererConfig,r=e.extraRenderers;return{forceGraph:new cn,renderObjs:Kn({controlType:t,rendererConfig:n,extraRenderers:r})}},init:function(e,t){e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var n=document.createElement("div");t.container.appendChild(n),t.renderObjs(n);var r,o=t.renderObjs.camera(),i=t.renderObjs.renderer(),a=t.renderObjs.controls();a.enabled=!!t.enableNavigationControls,t.lastSetCameraZ=o.position.z,t.container.appendChild(r=document.createElement("div")),r.className="graph-info-msg",r.textContent="",t.forceGraph.onLoading((function(){r.textContent="Loading..."})).onFinishLoading((function(){r.textContent=""})).onUpdate((function(){t.graphData=t.forceGraph.graphData(),0===o.position.x&&0===o.position.y&&o.position.z===t.lastSetCameraZ&&t.graphData.nodes.length&&(o.lookAt(t.forceGraph.position),t.lastSetCameraZ=o.position.z=170*Math.cbrt(t.graphData.nodes.length))})).onFinishUpdate((function(){if(t._dragControls){var e=t.graphData.nodes.find((function(e){return e.__initialFixedPos&&!e.__disposeControlsAfterDrag}));e?e.__disposeControlsAfterDrag=!0:t._dragControls.dispose(),t._dragControls=void 0}if(t.enableNodeDrag&&t.enablePointerInteraction&&"d3"===t.forceEngine){var n=t._dragControls=new O(t.graphData.nodes.map((function(e){return e.__threeObj})).filter((function(e){return e})),o,i.domElement);n.addEventListener("dragstart",(function(e){a.enabled=!1,e.object.__initialPos=e.object.position.clone(),e.object.__prevPos=e.object.position.clone();var t=lr(e.object).__data;!t.__initialFixedPos&&(t.__initialFixedPos={fx:t.fx,fy:t.fy,fz:t.fz}),!t.__initialPos&&(t.__initialPos={x:t.x,y:t.y,z:t.z}),["x","y","z"].forEach((function(e){return t["f".concat(e)]=t[e]})),i.domElement.classList.add("grabbable")})),n.addEventListener("drag",(function(e){var n=lr(e.object);if(!e.object.hasOwnProperty("__graphObjType")){var r=e.object.__initialPos,o=e.object.__prevPos,i=e.object.position;n.position.add(i.clone().sub(o)),o.copy(i),i.copy(r)}var a=n.__data,s=n.position,u={x:s.x-a.x,y:s.y-a.y,z:s.z-a.z};["x","y","z"].forEach((function(e){return a["f".concat(e)]=a[e]=s[e]})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),a.__dragged=!0,t.onNodeDrag(a,u)})),n.addEventListener("dragend",(function(e){delete e.object.__initialPos,delete e.object.__prevPos;var r=lr(e.object).__data;r.__disposeControlsAfterDrag&&(n.dispose(),delete r.__disposeControlsAfterDrag);var o=r.__initialFixedPos,s=r.__initialPos,u={x:s.x-r.x,y:s.y-r.y,z:s.z-r.z};o&&(["x","y","z"].forEach((function(e){var t="f".concat(e);void 0===o[t]&&delete r[t]})),delete r.__initialFixedPos,delete r.__initialPos,r.__dragged&&(delete r.__dragged,t.onNodeDragEnd(r,u))),t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.enableNavigationControls&&(a.enabled=!0,a.domElement&&a.domElement.ownerDocument&&a.domElement.ownerDocument.dispatchEvent(new PointerEvent("pointerup",{pointerType:"touch"}))),i.domElement.classList.remove("grabbable")}))}})),t.renderObjs.renderer().useLegacyLights=!1,t.renderObjs.objects([new nr.AmbientLight(13421772,Math.PI),new nr.DirectionalLight(16777215,.6*Math.PI),t.forceGraph]).hoverOrderComparator((function(e,t){var n=lr(e);if(!n)return 1;var r=lr(t);if(!r)return-1;var o=function(e){return"node"===e.__graphObjType};return o(r)-o(n)})).tooltipContent((function(e){var n=lr(e);return n&&Pe(t["".concat(n.__graphObjType,"Label")])(n.__data)||""})).hoverDuringDrag(!1).onHover((function(e){var n=lr(e);if(n!==t.hoverObj){var r=t.hoverObj?t.hoverObj.__graphObjType:null,o=t.hoverObj?t.hoverObj.__data:null,a=n?n.__graphObjType:null,s=n?n.__data:null;if(r&&r!==a){var u=t["on".concat("node"===r?"Node":"Link","Hover")];u&&u(null,o)}if(a){var c=t["on".concat("node"===a?"Node":"Link","Hover")];c&&c(s,r===a?o:null)}i.domElement.classList[n&&t["on".concat("node"===a?"Node":"Link","Click")]||!n&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=n}})).clickAfterDrag(!1).onClick((function(e,n){var r=lr(e);if(r){var o=t["on".concat("node"===r.__graphObjType?"Node":"Link","Click")];o&&o(r.__data,n)}else t.onBackgroundClick&&t.onBackgroundClick(n)})).onRightClick((function(e,n){var r=lr(e);if(r){var o=t["on".concat("node"===r.__graphObjType?"Node":"Link","RightClick")];o&&o(r.__data,n)}else t.onBackgroundRightClick&&t.onBackgroundRightClick(n)})),this._animationCycle()}});function lr(e){for(var t=e;t&&!t.hasOwnProperty("__graphObjType");)t=t.parent;return t}var hr=n(13980);const dr={width:hr.number,height:hr.number,graphData:hr.shape({nodes:hr.arrayOf(hr.object).isRequired,links:hr.arrayOf(hr.object).isRequired}),backgroundColor:hr.string,nodeRelSize:hr.number,nodeId:hr.string,nodeLabel:hr.oneOfType([hr.string,hr.func]),nodeVal:hr.oneOfType([hr.number,hr.string,hr.func]),nodeVisibility:hr.oneOfType([hr.bool,hr.string,hr.func]),nodeColor:hr.oneOfType([hr.string,hr.func]),nodeAutoColorBy:hr.oneOfType([hr.string,hr.func]),onNodeHover:hr.func,onNodeClick:hr.func,linkSource:hr.string,linkTarget:hr.string,linkLabel:hr.oneOfType([hr.string,hr.func]),linkVisibility:hr.oneOfType([hr.bool,hr.string,hr.func]),linkColor:hr.oneOfType([hr.string,hr.func]),linkAutoColorBy:hr.oneOfType([hr.string,hr.func]),linkWidth:hr.oneOfType([hr.number,hr.string,hr.func]),linkCurvature:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalArrowLength:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalArrowColor:hr.oneOfType([hr.string,hr.func]),linkDirectionalArrowRelPos:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalParticles:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalParticleSpeed:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalParticleWidth:hr.oneOfType([hr.number,hr.string,hr.func]),linkDirectionalParticleColor:hr.oneOfType([hr.string,hr.func]),onLinkHover:hr.func,onLinkClick:hr.func,dagMode:hr.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:hr.number,dagNodeFilter:hr.func,onDagError:hr.func,d3AlphaMin:hr.number,d3AlphaDecay:hr.number,d3VelocityDecay:hr.number,warmupTicks:hr.number,cooldownTicks:hr.number,cooldownTime:hr.number,onEngineTick:hr.func,onEngineStop:hr.func,getGraphBbox:hr.func},fr={zoomToFit:hr.func,onNodeRightClick:hr.func,onNodeDrag:hr.func,onNodeDragEnd:hr.func,onLinkRightClick:hr.func,linkHoverPrecision:hr.number,onBackgroundClick:hr.func,onBackgroundRightClick:hr.func,enablePointerInteraction:hr.bool,enableNodeDrag:hr.bool},pr={showNavInfo:hr.bool,nodeOpacity:hr.number,nodeResolution:hr.number,nodeThreeObject:hr.oneOfType([hr.object,hr.string,hr.func]),nodeThreeObjectExtend:hr.oneOfType([hr.bool,hr.string,hr.func]),linkOpacity:hr.number,linkResolution:hr.number,linkCurveRotation:hr.oneOfType([hr.number,hr.string,hr.func]),linkMaterial:hr.oneOfType([hr.object,hr.string,hr.func]),linkThreeObject:hr.oneOfType([hr.object,hr.string,hr.func]),linkThreeObjectExtend:hr.oneOfType([hr.bool,hr.string,hr.func]),linkPositionUpdate:hr.func,linkDirectionalArrowResolution:hr.number,linkDirectionalParticleResolution:hr.number,forceEngine:hr.oneOf(["d3","ngraph"]),ngraphPhysics:hr.object,numDimensions:hr.oneOf([1,2,3])};Object.assign({},dr,fr,{linkLineDash:hr.oneOfType([hr.arrayOf(hr.number),hr.string,hr.func]),nodeCanvasObjectMode:hr.oneOfType([hr.string,hr.func]),nodeCanvasObject:hr.func,nodePointerAreaPaint:hr.func,linkCanvasObjectMode:hr.oneOfType([hr.string,hr.func]),linkCanvasObject:hr.func,linkPointerAreaPaint:hr.func,autoPauseRedraw:hr.bool,minZoom:hr.number,maxZoom:hr.number,enableZoomInteraction:hr.bool,enablePanInteraction:hr.bool,onZoom:hr.func,onZoomEnd:hr.func,onRenderFramePre:hr.func,onRenderFramePost:hr.func});const gr=Object.assign({},dr,fr,pr,{enableNavigationControls:hr.bool,controlType:hr.oneOf(["trackball","orbit","fly"]),rendererConfig:hr.object,extraRenderers:hr.arrayOf(hr.shape({render:hr.func.isRequired}))});Object.assign({},dr,pr,{nodeDesc:hr.oneOfType([hr.string,hr.func]),linkDesc:hr.oneOfType([hr.string,hr.func])}),Object.assign({},dr,pr,{markerAttrs:hr.object,yOffset:hr.number,glScale:hr.number});const vr=function(e,t){var n="object"===h(t)?t:{wrapperElementType:t,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},o=n.wrapperElementType,i=void 0===o?"div":o,a=n.nodeMapper,s=void 0===a?function(e){return e}:a,u=n.methodNames,p=void 0===u?[]:u,g=n.initPropNames,m=void 0===g?[]:g;return(0,r.forwardRef)((function(t,n){var o=(0,r.useRef)(),a=d((0,r.useState)({}),2),u=a[0],h=a[1];(0,r.useEffect)((function(){return h(t)}));var g=(0,r.useMemo)((function(){var n=l(m.filter((function(e){return t.hasOwnProperty(e)})).map((function(e){return[e,t[e]]})));return e(n)}),[]);v((function(){g(s(o.current))}),r.useLayoutEffect),v((function(){return g._destructor instanceof Function?g._destructor:void 0}));var y=(0,r.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return g[e]instanceof Function?g[e].apply(g,n):void 0}),[g]),b=c(t,[].concat(f(p),f(m)));return Object.keys(b).filter((function(e){return u[e]!==t[e]})).forEach((function(e){return y(e,t[e])})),(0,r.useImperativeHandle)(n,(function(){return l(p.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y.apply(void 0,[e].concat(n))}]})))})),r.createElement(i,{ref:o})}))}(cr,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","cameraPosition","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords","postProcessingComposer","scene","camera","renderer","controls","refresh"],initPropNames:["controlType","rendererConfig","extraRenderers"]});vr.displayName="ForceGraph3D",vr.propTypes=gr}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8897],{38897:function(){}}]);
|