1(self.webpackChunkberry_material_react=self.webpackChunkberry_material_react||[]).push([[2042],{83519:(t,e,r)=>{"use strict";var n=r(71892);e.A=void 0;var i=n(r(46069)),o=r(7017);e.A=(0,i.default)((0,o.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutlineOutlined")},19664:(t,e,r)=>{"use strict";var n=r(71892);e.A=void 0;var i=n(r(46069)),o=r(7017);e.A=(0,i.default)((0,o.jsx)("path",{d:"M14.06 9.94 13 9.45c-.39-.18-.39-.73 0-.91l1.06-.49.49-1.05c.18-.39.73-.39.91 0l.49 1.06 1.05.49c.39.18.39.73 0 .91l-1.06.49-.49 1.05c-.18.39-.73.39-.91 0zM4.45 13l.49-1.06L6 11.45c.39-.18.39-.73 0-.91l-1.06-.49L4.45 9c-.17-.39-.73-.39-.9 0l-.49 1.06-1.06.49c-.39.18-.39.73 0 .91l1.06.49.49 1.05c.17.39.73.39.9 0m4.51-5.01.63-1.4 1.4-.63c.39-.18.39-.73 0-.91l-1.4-.63-.63-1.4c-.18-.39-.73-.39-.91 0l-.63 1.4-1.4.63c-.39.18-.39.73 0 .91l1.4.63.63 1.4c.17.39.73.39.91 0m13.38.28c-.4-.4-1.07-.39-1.45.04l-6.39 7.18-3.29-3.29a.9959.9959 0 0 0-1.41 0l-6.04 6.05c-.41.41-.41 1.09 0 1.5.41.41 1.09.41 1.5 0l5.25-5.26 3.25 3.25c.41.41 1.07.39 1.45-.04l7.17-8.07c.35-.39.33-.99-.04-1.36"}),"AutoGraphRounded")},19123:(t,e,r)=>{"use strict";var n=r(71892);e.A=void 0;var i=n(r(46069)),o=r(7017);e.A=(0,i.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"MenuTwoTone")},31165:(t,e,r)=>{"use strict";r.d(e,{A:()=>x});var n=r(71389),i=r(47514),o=r(61437),a=r(1041),s=r(77344),c=r(44421),u=r(78779),h=r(89719),d=r(90663),l=r(45229),f=r(92554),p=r(36658);function g(t){return(0,p.Ay)("MuiInputAdornment",t)}const v=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var m,y=r(41280),b=r(7017);const w=["children","className","component","disablePointerEvents","disableTypography","position","variant"],_=(0,l.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${(0,c.A)(r.position)}`],!0===r.disablePointerEvents&&e.disablePointerEvents,e[r.variant]]}})((t=>{let{theme:e,ownerState:r}=t;return(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===r.variant&&{[`&.${v.positionStart}&:not(.${v.hiddenLabel})`]:{marginTop:16}},"start"===r.position&&{marginRight:8},"end"===r.position&&{marginLeft:8},!0===r.disablePointerEvents&&{pointerEvents:"none"})})),x=o.forwardRef((function(t,e){const r=(0,y.b)({props:t,name:"MuiInputAdornment"}),{children:l,className:f,component:p="div",disablePointerEvents:v=!1,disableTypography:x=!1,position:E,variant:L}=r,A=(0,n.A)(r,w),C=(0,d.A)()||{};let k=L;L&&C.variant,C&&!k&&(k=C.variant);const S=(0,i.A)({},r,{hiddenLabel:C.hiddenLabel,size:C.size,disablePointerEvents:v,position:E,variant:k}),M=(t=>{const{classes:e,disablePointerEvents:r,hiddenLabel:n,position:i,size:o,variant:a}=t,u={root:["root",r&&"disablePointerEvents",i&&`position${(0,c.A)(i)}`,a,n&&"hiddenLabel",o&&`size${(0,c.A)(o)}`]};return(0,s.A)(u,g,e)})(S);return(0,b.jsx)(h.A.Provider,{value:null,children:(0,b.jsx)(_,(0,i.A)({as:p,ownerState:S,className:(0,a.A)(M.root,f),ref:e},A,{children:"string"!==typeof l||x?(0,b.jsxs)(o.Fragment,{children:["start"===E?m||(m=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,l]}):(0,b.jsx)(u.A,{color:"text.secondary",children:l})}))})}))},73501:(t,e,r)=>{"use strict";r.d(e,{Bx:()=>d,Su:()=>m,_d:()=>w,hF:()=>b,pj:()=>G,qz:()=>j,t_:()=>N});var n=r(61437),i=r(9550),o=r(3849),a=r.n(o),s=r(24673);const c=(0,n.createContext)(null),u=c.Provider;function h(){const t=(0,n.useContext)(c);if(null==t)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}function d(){return h().sigma}const l=["clickNode","rightClickNode","downNode","enterNode","leaveNode","doubleClickNode","wheelNode","clickEdge","rightClickEdge","downEdge","enterEdge","leaveEdge","doubleClickEdge","wheelEdge","clickStage","rightClickStage","downStage","doubleClickStage","wheelStage","beforeRender","afterRe
1nder","kill"],f=["click","rightClick","mouseup","mousedown","mousemove","mousemovebody","doubleClick","wheel"],p=["touchup","touchdown","touchmove"],g=["updated"];function v(){const t=d(),e=function(){const{sigma:t,container:e}=h(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n={};return Object.keys(r).forEach((e=>{n[e]=r[e],t.setSetting(e,r[e])})),()=>{t&&e&&e.offsetWidth>0&&e.offsetHeight>0&&Object.keys(n).forEach((e=>{t.setSetting(e,n[e])}))}}),[t,r,e]),i}(),[r,i]=(0,n.useState)({});return(0,n.useEffect)((()=>{if(!t||!r)return;const n=r,i=Object.keys(n),o={},a={},s=t.getSettings();return i.some((t=>["clickEdge","rightClickEdge","doubleClickEdge","downEdge"].includes(t)))&&!1===s.enableEdgeClickEvents&&(o.enableEdgeClickEvents=!0,a.enableEdgeClickEvents=!1),i.some((t=>["enterEdge","leaveEdge"].includes(t)))&&!1===s.enableEdgeHoverEvents&&(o.enableEdgeHoverEvents=!0,a.enableEdgeHoverEvents=!1),i.some((t=>["wheelEdge"].includes(t)))&&!1===s.enableEdgeWheelEvents&&(o.enableEdgeWheelEvents=!0,a.enableEdgeWheelEvents=!1),Object.keys(o).length>0&&e(o),i.forEach((e=>{const r=n[e];l.find((t=>t===e))&&t.on(e,r),f.find((t=>t===e))&&t.getMouseCaptor().on(e,r),p.find((t=>t===e))&&t.getTouchCaptor().on(e,r),g.find((t=>t===e))&&t.getCamera().on(e,r)})),()=>{Object.keys(a).length>0&&e(a),t&&i.forEach((e=>{const r=n[e];l.find((t=>t===e))&&t.off(e,r),f.find((t=>t===e))&&t.getMouseCaptor().off(e,r),p.find((t=>t===e))&&t.getTouchCaptor().off(e,r),g.find((t=>t===e))&&t.getCamera().off(e,r)}))}}),[t,r,e]),i}function m(){const t=d();return(0,n.useCallback)((function(e){t&&e&&((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}function y(t){const e=d(),r=(0,n.useRef)();(0,i.isEqual)(r.current,t)||(r.current=t);const o=(0,n.useCallback)((t=>{e.getCamera().animatedZoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),a=(0,n.useCallback)((t=>{e.getCamera().animatedUnzoom(Object.assign(Object.assign({},r.current),t))}),[e,r]),s=(0,n.useCallback)((t=>{e.getCamera().animatedReset(Object.assign(Object.assign({},r.current),t))}),[e,r]),c=(0,n.useCallback)(((t,n)=>{e.getCamera().animate(t,Object.assign(Object.assign({},r.current),n))}),[e,r]),u=(0,n.useCallback)(((t,n)=>{const i=e.getNodeDisplayData(t);i?e.getCamera().animate(i,Object.assign(Object.assign({},r.current),n)):console.log(`Node ${t} not found`)}),[e,r]);return{zoomIn:o,zoomOut:a,reset:s,goto:c,gotoNode:u}}const b=(0,n.forwardRef)(((t,e)=>{let{graph:r,id:o,className:c,style:h,settings:d,children:l}=t;const f=(0,n.useRef)(null),p=(0,n.useRef)(null),g={className:`react-sigma ${c||""}`,id:o,style:h},[v,m]=(0,n.useState)(null),y=(0,n.useRef)({});(0,i.isEqual)(y.current,d)||(y.current=d||{}),(0,n.useEffect)((()=>{let t=null;if(null!==p.current){const e=r?"function"==typeof r?new r:r:new(a());t=new s.Sigma(e,p.current,Object.assign({allowInvalidContainer:!0},y.current)),v&&t.getCamera().setState(v.getCamera().getState())}return m(t),()=>{t&&t.kill(),m(null)}}),[p,r,y]),(0,n.useImperativeHandle)(e,(()=>v),[v]);const b=(0,n.useMemo)((()=>v&&f.current?{sigma:v,container:f.current}:null),[v,f.current]),w=null!==b?n.createElement(u,{value:b},l):null;return n.createElement("div",Object.assign({},g,{ref:f}),n.createElement("div",{className:"sigma-container",ref:p}),w)})),w=t=>{let{id:e,className:r,style:i,children:o,position:a="bottom-left"}=t;const s={className:`react-sigma-controls ${r||""} ${a}`,id:e,style:i};return n.createElement("div",Object.assign({},s),o)};var _;function x(){return x=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},x.apply(this,arguments)}var E,L=function(t){return n.createElement("svg",x({"aria-hidden":"true","data-prefix":"fas","data-icon":"plus",className:"plus-solid_svg__svg-inline--fa plus-solid_svg__fa-plus plus-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),_||(_=n.createElement("path",{fill:"currentColor",d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"})))};function A(){return A=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},A.apply(this,arguments)}var C,k=function(t){return n.createElement("svg",A({"aria-hidden":"true","data-prefix":"fas","data-icon":"minus",className:"minus-solid_svg__svg-inline--fa minus-solid_svg__fa-minus minus-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),E||(E=n.createElement("path",{fill:"currentColor",d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"})))};function S(){return S=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},S.apply(this,arguments)}var M=function(t){return n.createElement("svg",S({"aria-hidden":"true","data-prefix":"far","data-icon":"dot-circle",className:"dot-circle-regular_svg__svg-inline--fa dot-circle-regular_svg__fa-dot-circle dot-circle-regular_svg__fa-w-16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},t),C||(C=n.createElement("path",{fill:"currentColor",d:"M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"})))};const G=t=>{let{className:e,style:r,animationDuration:i=200,children:o,labels:a={}}=t;const{zoomIn:s,zoomOut:c,reset:u}=y({duration:i,factor:1.5}),h={style:r,className:`react-sigma-control ${e||""}`};return n.createElement(n.Fragment,null,n.createElement("div",Object.assign({},h),n.createElement("button",{onClick:()=>s(),title:a.zoomIn||"Zoom In"},o?o[0]:n.createElement(L,{style:{width:"1em"}}))),n.createElement("div",Object.assign({},h),n.createElement("button",{onClick:()=>c(),title:a.zoomOut||"Zoom Out"},o?o[1]:n.createElement(k,{style:{width:"1em"}}))),n.createElement("div",Object.assign({},h),n.createElement("button",{onClick:()=>u(),title:a.reset||"See whole graph"},o?o[2]:n.createElement(M,{style:{width:"1em"}}))))};var O;function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},F.apply(this,arguments)}var D,P=function(t){return n.createElement("svg",F({"aria-hidden":"true","data-prefix":"fas","data-icon":"expand",className:"expand-solid_svg__svg-inline--fa expand-solid_svg__fa-expand expand-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),O||(O=n.createElement("path",{fill:"currentColor",d:"M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z"})))};function T(){return T=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(this,arguments)}var R=function(t){return n.createElement("svg",T({"aria-hidden":"true","data-prefix":"fas","data-icon":"compress",className:"compress-solid_svg__svg-inline--fa compress-solid_svg__fa-compress compress-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),D||(D=n.createElement("path",{fill:"currentColor",d:"M436 192H312c-13.3 0-24-10.7-24-24V44c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v84h84c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm-276-24V44c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v84H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24zm
10 300V344c0-13.3-10.7-24-24-24H12c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-84h84c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12H312c-13.3 0-24 10.7-24 24v124c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12z"})))};const N=t=>{let{id:e,className:r,style:i,container:o,children:a,labels:s={}}=t;const{isFullScreen:c,toggle:u}=function(t){const e=h(),[r,i]=(0,n.useState)(!1),[o,a]=(0,n.useState)(t||e.container),s=()=>i((t=>!t));return(0,n.useEffect)((()=>(document.addEventListener("fullscreenchange",s),()=>document.removeEventListener("fullscreenchange",s))),[s]),(0,n.useEffect)((()=>{a(t||e.container)}),[t,e.container]),{toggle:(0,n.useCallback)((()=>{var t;t=o,document.fullscreenElement!==t?t.requestFullscreen():document.exitFullscreen&&document.exitFullscreen()}),[o]),isFullScreen:r}}(null==o?void 0:o.current),d={className:`react-sigma-control ${r||""}`,id:e,style:i};return document.fullscreenEnabled?n.createElement("div",Object.assign({},d),n.createElement("button",{onClick:u,title:c?s.exit||"Exit fullscreen":s.enter||"Enter fullscreen"},a&&!c&&a[0],a&&c&&a[1],!a&&!c&&n.createElement(P,{style:{width:"1em"}}),!a&&c&&n.createElement(R,{style:{width:"1em"}}))):null},j=t=>{let{id:e,className:r,style:i,labels:o={}}=t;const a=d(),s=v(),{gotoNode:c}=y(),[u,h]=(0,n.useState)(""),[l,f]=(0,n.useState)([]),[p,g]=(0,n.useState)(null),[m,b]=(0,n.useState)("");(0,n.useEffect)((()=>{b(`search-${Math.random().toString(36).slice(2)}`)}),[]),(0,n.useEffect)((()=>{const t=[];!p&&u.length>1&&a.getGraph().forEachNode(((e,r)=>{r.label&&r.label.toLowerCase().includes(u.toLowerCase())&&t.push({id:e,label:r.label})})),f(t)}),[u]),(0,n.useEffect)((()=>{s({clickStage:()=>{g(null),h("")}})}),[s]),(0,n.useEffect)((()=>{if(p)return a.getGraph().setNodeAttribute(p,"highlighted",!0),c(p),()=>{a.getGraph().setNodeAttribute(p,"highlighted",!1)}}),[p]);const w={className:`react-sigma-search ${r||""}`,id:e,style:i};return n.createElement("div",Object.assign({},w),n.createElement("label",{htmlFor:m,style:{display:"none"}},o.text||"Search a node"),n.createElement("input",{id:m,type:"text",placeholder:o.placeholder||"Search...",list:`${m}-datalist`,value:u,onChange:t=>{const e=t.target.value,r=l.find((t=>t.label===e));r?(h(r.label),f([]),g(r.id)):(g(null),h(e))}}),n.createElement("datalist",{id:`${m}-datalist`},l.map((t=>n.createElement("option",{key:t.id,value:t.label},t.label)))))}},30563:(t,e,r)=>{"use strict";r.d(e,{sE:()=>y});var n,i=r(54422),o=r.n(i),a=r(9550),s=r(61437),c=r(73501);function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u.apply(this,arguments)}var h,d=function(t){return s.createElement("svg",u({"aria-hidden":"true","data-prefix":"fas","data-icon":"play",className:"play-solid_svg__svg-inline--fa play-solid_svg__fa-play play-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),n||(n=s.createElement("path",{fill:"currentColor",d:"M424.4 214.7 72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})))};function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l.apply(this,arguments)}var f=function(t){return s.createElement("svg",l({"aria-hidden":"true","data-prefix":"fas","data-icon":"stop",className:"stop-solid_svg__svg-inline--fa stop-solid_svg__fa-stop stop-solid_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},t),h||(h=s.createElement("path",{fill:"currentColor",d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})))};function p(t){let{id:e,className:r,style:n,layout:i,settings:o,autoRunFor:a,children:u,labels:h={}}=t;const l=(0,c.Bx)(),{stop:p,start:g,isRunning:v}=i(o),m={className:`react-sigma-control ${r||""}`,id:e,style:n};return(0,s.useEffect)((()=>
1{if(!l)return;let t=null;return void 0!==a&&a>-1&&l.getGraph().order>0&&(g(),t=a>0?window.setTimeout((()=>{p()}),a):null),()=>{t&&clearTimeout(t)}}),[a,g,p,l]),s.createElement("div",Object.assign({},m),s.createElement("button",{onClick:()=>v?p():g(),title:v?h.stop||"Stop the layout animation":h.start||"Start the layout animation"},u&&!v&&u[0],u&&v&&u[1],!u&&!v&&s.createElement(d,{style:{width:"1em"}}),!u&&v&&s.createElement(f,{style:{width:"1em"}})))}var g=r(84774),v=r.n(g);b=o(),w={iterations:100};const m=function(t){return e=>{const r=(0,c.Bx)(),[n,i]=(0,s.useState)(!1),[o,u]=(0,s.useState)(null),h=(0,s.useRef)();return(0,a.isEqual)(h.current,e)||(h.current=e),(0,s.useEffect)((()=>{i(!1);let e=null;return h.current&&(e=new t(r.getGraph(),h.current)),u(e),()=>{null!==e&&e.kill()}}),[r,h,u,i]),{stop:(0,s.useCallback)((()=>{o&&(o.stop(),i(!1))}),[o,i]),start:(0,s.useCallback)((()=>{o&&(o.start(),i(!0))}),[o,i]),kill:(0,s.useCallback)((()=>{o&&o.kill(),i(!1)}),[o,i]),isRunning:n}}}(v()),y=t=>{let{id:e,className:r,style:n,settings:i={},autoRunFor:o,children:a,labels:c}=t;const u={id:e,className:r,style:n,settings:i,autoRunFor:o,labels:c,layout:m};return s.createElement(p,Object.assign({},u),a)};var b,w},77677:t=>{t.exports=function(t,e){var r=e.length;if(0!==r){var n=t.length;t.length+=r;for(var i=0;i<r;i++)t[n+i]=e[i]}}},56298:t=>{"use strict";var e,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!==t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"===typeof t.on&&g(t,"error",e,r)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,a,u;if(s(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"===typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(t))>0&&a.length>i&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,u=h,console&&console.warn&&console.warn(u)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"===typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!==typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
1,set:function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[t];if(void 0===c)return!1;if("function"===typeof c)n(c,this,e);else{var u=c.length,h=p(c,u);for(r=0;r<u;++r)n(h[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return s(e),this.on(t,d(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,d(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,a;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!==typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},18298:t=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}},5383:(t,e)=>{e.assign=function(t){t=t||{};var e,r,n,i=Array.prototype.slice.call(arguments).slice(1);for(e=0,n=i.length;e<n;e++)if(i[e])for(r in i[e])t[r]=i[e][r];return t},e.validateSettings=function(t){return"linLogMode"in t&&"boolean"!==typeof t.linLogMode?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&"boolean"!==typeof t.outboundAttractionDistribution?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&"boolean"!==typeof t.adjustSizes?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&"number"!==typeof t.edgeWeightInfluence?{message:"the `edgeWeightInfluence` setting should be a number."}:!("scalingRatio"in t)||"number"===typeof t.scalingRatio&&t.scalingRatio>=0?"strongGravityMode"in t&&"boolean"!==typeof t.strongGravityMode?{message:"the `strongGravityMode` setting should be a boolean."}:!("gravity"in t)||"number"===typeof t.gravity&&t.gravity>=0?"slowDown"in t&&!("number"===typeof t.slowDown||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&"boolean"!==typeof t.barnesHutOptimize?{message:"the `barnesHutOptimize` setting should be a boolean."}:!("barnesHutTheta"in t)||"number"===typeof t.barnesHutTheta&&t.barnesHutTheta>=0?null:{message:"the `barnesHutTheta` setting should be a number >= 0."}:{message:"the `gravity` setting should be a number >= 0."}:{message:"the `scalingRatio` setting should be a number >= 0."}},e.graphToByteArrays=function(t,e){var r,n=t.order,i=t.size,o={},a=new Float32Array(10*n),s=new Float32Array(3*i);return r=0,t.forEachNode((function(t,e){o[t]=r,a[r]=e.x,a[r+1]=e.y,a[r+2]=0,a[r+3]=0,a[r+4]=0,a[r+5]=0,a[r+6]=1,a[r+7]=1,a[r+8]=e.size||1,a[r+9]=e.fixed?1:0,r+=10})),r=0,t.forEachEdge((function(t,n,i,c,u,h,d){var l=o[i],f=o[c],p=e(t,n,i,c,u,h,d);a[l+6]+=p,a[f+6]+=p,s[r]=l,s[r+1]=f,s[r+2]=p,r+=3})),{nodes:a,edges:s}},e.assignLayoutChanges=function(t,e,r){var n=0;t.updateEachNodeAttributes((function(t,i){return i.x=e[n],i.y=e[n+1],n+=10,r?r(t,i):i}))},e.readGraphPositions=function(t,e){var r=0;t.forEachNode((function(t,n){e[r]=n.x,e[r+1]=n.y,r+=10}))},e.collectLayoutChanges=function(t,e,r){for(var n=t.nodes(),i={},o=0,a=0,s=e.length;o<s;o+=10){if(r){var c=Object.assign({},t.getNodeAttributes(n[a]));c.x=e[o],c.y=e[o+1],c=r(n[a],c),i[n[a]]={x:c.x,y:c.y}}else i[n[a]]={x:e[o],y:e[o+1]};a++}return i},e.createWorker=function(t){var e=window.URL||window.webkitURL,r=t.toString(),n=e.createObjectURL(new Blob(["("+r+").call(this);"],{type:"text/javascript"})),i=new Worker(n);return e.revokeObjectURL(n),i}},54422:(t,e,r)=>{var n=r(78665),i=r(24818).Fd,o=r(96844),a=r(5383),s=r(18298);function c(t,e,r){if(!n(e))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");"number"===typeof r&&(r={iterations:r});var c=r.iterations;if("number"!==typeof c)throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(c<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var u=i("getEdgeWeight"in r?r.getEdgeWeight:"weight").fromEntry,h="function"===typeof r.outputReducer?r.outputReducer:null,d=a.assign({},s,r.settings),l=a.validateSettings(d);if(l)throw new Error("graphology-layout-forceatlas2: "+l.message);var f,p=a.graphToByteArrays(e,u);for(f=0;f<c;f++)o(d,p.nodes,p.edges);if(!t)return a.collectLayoutChanges(e,p.nodes);a.assignLayoutChanges(e,p.nodes,h)}var u=c.bind(null,!1);u.assign=c.bind(null,!0),u.inferSettings=function(t){var e="number"===typeof t?t:t.order;return{barnesHutOptimize:e>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(e)}},t.exports=u},96844:t=>{var e=10;t.exports=function(t,r,n){var i,o,a,s,c,u,h,d,l,f,p,g,v,m,y,b,w,_,x,E,L,A,C,k=r.length,S=n.length,M=t.adjustSizes,G=t.barnesHutTheta*t.barnesHutTheta,O=[];for(a=0;a<k;a+=e)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(t.outboundAttractionDistribution){for(p=0,a=0;a<k;a+=e)p+=r[a+6];p/=k/e}if(t.barnesHutOptimize){var F,D,P,T=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<k;a+=e)T=Math.min(T,r[a+0]),R=Math.max(R,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=R-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+R)/2,O[2]=(N+j)/2,O[3]=Math.max(R-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<k;a+=e)for(o=0,P=3;;){if(!(O[o+5]>
1=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,d=O[o+3]/2,O[(l=O[o+5])+0]=-1,O[l+1]=O[o+1]-d,O[l+2]=O[o+2]-d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]-d,O[l+2]=O[o+2]+d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]+d,O[l+2]=O[o+2]-d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]+d,O[l+2]=O[o+2]+d,O[l+3]=d,O[l+4]=O[o+4],O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,i+=4,F=r[O[o+0]+0]<O[o+1]?r[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:r[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=r[O[o+0]+6],O[o+7]=r[O[o+0]+0],O[o+8]=r[O[o+0]+1],O[F+0]=O[o+0],O[o+0]=-1,F===(D=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(P--){o=F;continue}P=3;break}O[D+0]=a;break}F=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+r[a+0]*r[a+6])/(O[o+6]+r[a+6]),O[o+8]=(O[o+8]*O[o+6]+r[a+1]*r[a+6])/(O[o+6]+r[a+6]),O[o+6]+=r[a+6],o=F}}if(t.barnesHutOptimize){for(g=t.scalingRatio,a=0;a<k;a+=e)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(r[a+0]-O[o+7],2)+Math.pow(r[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<G){if(v=r[a+0]-O[o+7],m=r[a+1]-O[o+8],!0===M?b>0?(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=m*w):b<0&&(w=-g*r[a+6]*O[o+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=m*w):b>0&&(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=m*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((u=O[o+0])>=0&&u!==a&&(b=(v=r[a+0]-r[u+0])*v+(m=r[a+1]-r[u+1])*m,!0===M?b>0?(w=g*r[a+6]*r[u+6]/b,r[a+2]+=v*w,r[a+3]+=m*w):b<0&&(w=-g*r[a+6]*r[u+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=m*w):b>0&&(w=g*r[a+6]*r[u+6]/b,r[a+2]+=v*w,r[a+3]+=m*w)),(o=O[o+4])<0)break}else for(g=t.scalingRatio,s=0;s<k;s+=e)for(c=0;c<s;c+=e)v=r[s+0]-r[c+0],m=r[s+1]-r[c+1],!0===M?(b=Math.sqrt(v*v+m*m)-r[s+8]-r[c+8])>0?(w=g*r[s+6]*r[c+6]/b/b,r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w):b<0&&(w=100*g*r[s+6]*r[c+6],r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w):(b=Math.sqrt(v*v+m*m))>0&&(w=g*r[s+6]*r[c+6]/b/b,r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w);for(l=t.gravity/t.scalingRatio,g=t.scalingRatio,a=0;a<k;a+=e)w=0,v=r[a+0],m=r[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(m,2)),t.strongGravityMode?b>0&&(w=g*r[a+6]*l):b>0&&(w=g*r[a+6]*l/b),r[a+2]-=v*w,r[a+3]-=m*w;for(g=1*(t.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)s=n[h+0],c=n[h+1],d=n[h+2],y=Math.pow(d,t.edgeWeightInfluence),v=r[s+0]-r[c+0],m=r[s+1]-r[c+1],!0===M?(b=Math.sqrt(v*v+m*m)-r[s+8]-r[c+8],t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*y*Math.log(1+b)/b/r[s+6]):b>0&&(w=-g*y*Math.log(1+b)/b):t.outboundAttractionDistribution?b>0&&(w=-g*y/r[s+6]):b>0&&(w=-g*y)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(m,2)),t.linLogMode?t.outboundAttractionDistribution?b>0&&(w=-g*y*Math.log(1+b)/b/r[s+6]):b>0&&(w=-g*y*Math.log(1+b)/b):t.outboundAttractionDistribution?(b=1,w=-g*y/r[s+6]):(b=1,w=-g*y)),b>0&&(r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w);if(!0===M)for(a=0;a<k;a+=e)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])
1*(r[a+5]+r[a+3]))/2,L=.1*Math.log(1+E)/(1+Math.sqrt(x)),A=r[a+0]+r[a+2]*(L/t.slowDown),r[a+0]=A,C=r[a+1]+r[a+3]*(L/t.slowDown),r[a+1]=C);else for(a=0;a<k;a+=e)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,L=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(L*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),A=r[a+0]+r[a+2]*(L/t.slowDown),r[a+0]=A,C=r[a+1]+r[a+3]*(L/t.slowDown),r[a+1]=C);return{}}},83438:t=>{t.exports=function(){var t,e,r={};!function(){var t=10;r.exports=function(e,r,n){var i,o,a,s,c,u,h,d,l,f,p,g,v,m,y,b,w,_,x,E,L,A,C,k=r.length,S=n.length,M=e.adjustSizes,G=e.barnesHutTheta*e.barnesHutTheta,O=[];for(a=0;a<k;a+=t)r[a+4]=r[a+2],r[a+5]=r[a+3],r[a+2]=0,r[a+3]=0;if(e.outboundAttractionDistribution){for(p=0,a=0;a<k;a+=t)p+=r[a+6];p/=k/t}if(e.barnesHutOptimize){var F,D,P,T=1/0,R=-1/0,N=1/0,j=-1/0;for(a=0;a<k;a+=t)T=Math.min(T,r[a+0]),R=Math.max(R,r[a+0]),N=Math.min(N,r[a+1]),j=Math.max(j,r[a+1]);var z=R-T,U=j-N;for(z>U?j=(N-=(z-U)/2)+z:R=(T-=(U-z)/2)+U,O[0]=-1,O[1]=(T+R)/2,O[2]=(N+j)/2,O[3]=Math.max(R-T,j-N),O[4]=-1,O[5]=-1,O[6]=0,O[7]=0,O[8]=0,i=1,a=0;a<k;a+=t)for(o=0,P=3;;){if(!(O[o+5]>=0)){if(O[o+0]<0){O[o+0]=a;break}if(O[o+5]=9*i,d=O[o+3]/2,O[(l=O[o+5])+0]=-1,O[l+1]=O[o+1]-d,O[l+2]=O[o+2]-d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]-d,O[l+2]=O[o+2]+d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]+d,O[l+2]=O[o+2]-d,O[l+3]=d,O[l+4]=l+9,O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,O[(l+=9)+0]=-1,O[l+1]=O[o+1]+d,O[l+2]=O[o+2]+d,O[l+3]=d,O[l+4]=O[o+4],O[l+5]=-1,O[l+6]=0,O[l+7]=0,O[l+8]=0,i+=4,F=r[O[o+0]+0]<O[o+1]?r[O[o+0]+1]<O[o+2]?O[o+5]:O[o+5]+9:r[O[o+0]+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+6]=r[O[o+0]+6],O[o+7]=r[O[o+0]+0],O[o+8]=r[O[o+0]+1],O[F+0]=O[o+0],O[o+0]=-1,F===(D=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27)){if(P--){o=F;continue}P=3;break}O[D+0]=a;break}F=r[a+0]<O[o+1]?r[a+1]<O[o+2]?O[o+5]:O[o+5]+9:r[a+1]<O[o+2]?O[o+5]+18:O[o+5]+27,O[o+7]=(O[o+7]*O[o+6]+r[a+0]*r[a+6])/(O[o+6]+r[a+6]),O[o+8]=(O[o+8]*O[o+6]+r[a+1]*r[a+6])/(O[o+6]+r[a+6]),O[o+6]+=r[a+6],o=F}}if(e.barnesHutOptimize){for(g=e.scalingRatio,a=0;a<k;a+=t)for(o=0;;)if(O[o+5]>=0){if(b=Math.pow(r[a+0]-O[o+7],2)+Math.pow(r[a+1]-O[o+8],2),4*(f=O[o+3])*f/b<G){if(v=r[a+0]-O[o+7],m=r[a+1]-O[o+8],!0===M?b>0?(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=m*w):b<0&&(w=-g*r[a+6]*O[o+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=m*w):b>0&&(w=g*r[a+6]*O[o+6]/b,r[a+2]+=v*w,r[a+3]+=m*w),(o=O[o+4])<0)break;continue}o=O[o+5]}else if((u=O[o+0])>=0&&u!==a&&(b=(v=r[a+0]-r[u+0])*v+(m=r[a+1]-r[u+1])*m,!0===M?b>0?(w=g*r[a+6]*r[u+6]/b,r[a+2]+=v*w,r[a+3]+=m*w):b<0&&(w=-g*r[a+6]*r[u+6]/Math.sqrt(b),r[a+2]+=v*w,r[a+3]+=m*w):b>0&&(w=g*r[a+6]*r[u+6]/b,r[a+2]+=v*w,r[a+3]+=m*w)),(o=O[o+4])<0)break}else for(g=e.scalingRatio,s=0;s<k;s+=t)for(c=0;c<s;c+=t)v=r[s+0]-r[c+0],m=r[s+1]-r[c+1],!0===M?(b=Math.sqrt(v*v+m*m)-r[s+8]-r[c+8])>0?(w=g*r[s+6]*r[c+6]/b/b,r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w):b<0&&(w=100*g*r[s+6]*r[c+6],r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w):(b=Math.sqrt(v*v+m*m))>0&&(w=g*r[s+6]*r[c+6]/b/b,r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w);for(l=e.gravity/e.scalingRatio,g=e.scalingRatio,a=0;a<k;a+=t)w=0,v=r[a+0],m=r[a+1],b=Math.sqrt(Math.pow(v,2)+Math.pow(m,2)),e.strongGravityMode?b>0&&(w=g*r[a+6]*l):b>0&&(w=g*r[a+6]*l/b),r[a+2]-=v*w,r[a+3]-=m*w;for(g=1*(e.outboundAttractionDistribution?p:1),h=0;h<S;h+=3)s=n[h+0],c=n[h+1],d=n[h+2],y=Math.pow(d,e.edgeWeightInfluence),v=r[s+0]-r[c+0],m=r[s+1]-r[c+1],!0===M?(b=Math.sqrt(v*v+m*m)-r[s+8]-r[c+8],e.linLogMode?e.outboundAttractionDistribution?b>0&&(w=-g*y*Math.log(1+b)/b/r[s+6]):b>0&&(w=-g*y*Math.log(1+b)/b):e.outboundAttractionDistribution?b>0&&(w=-g*y/r[s+6]):b>0&&(w=-g*y)):(b=Math.sqrt(Math.pow(v,2)+Math.pow(m,2)),e.linLogMode?e.outboundAttractionDistribution?b>0&&(w=-g*y*Math.log(1+b)/b/r[s+6]):b>0&&(w=-g*y*Math.log(1+b)/b):e.outboundAttractionDistribution?(b=1,w=-g*y/r[s+6]):(b=1,w=-g*y)),b>0&&(r[s+2]+=v*w,r[s+3]+=m*w,r[c+2]-=v*w,r[c+3]-=m*w);if(!0===M)for(a=0;a<k;
1a+=t)1!==r[a+9]&&((_=Math.sqrt(Math.pow(r[a+2],2)+Math.pow(r[a+3],2)))>10&&(r[a+2]=10*r[a+2]/_,r[a+3]=10*r[a+3]/_),x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,L=.1*Math.log(1+E)/(1+Math.sqrt(x)),A=r[a+0]+r[a+2]*(L/e.slowDown),r[a+0]=A,C=r[a+1]+r[a+3]*(L/e.slowDown),r[a+1]=C);else for(a=0;a<k;a+=t)1!==r[a+9]&&(x=r[a+6]*Math.sqrt((r[a+4]-r[a+2])*(r[a+4]-r[a+2])+(r[a+5]-r[a+3])*(r[a+5]-r[a+3])),E=Math.sqrt((r[a+4]+r[a+2])*(r[a+4]+r[a+2])+(r[a+5]+r[a+3])*(r[a+5]+r[a+3]))/2,L=r[a+7]*Math.log(1+E)/(1+Math.sqrt(x)),r[a+7]=Math.min(1,Math.sqrt(L*(Math.pow(r[a+2],2)+Math.pow(r[a+3],2))/(1+Math.sqrt(x)))),A=r[a+0]+r[a+2]*(L/e.slowDown),r[a+0]=A,C=r[a+1]+r[a+3]*(L/e.slowDown),r[a+1]=C);return{}}}();var n=r.exports;self.addEventListener("message",(function(r){var i=r.data;t=new Float32Array(i.nodes),i.edges&&(e=new Float32Array(i.edges)),n(i.settings,t,e),self.postMessage({nodes:t.buffer},[t.buffer])}))}},84774:(t,e,r)=>{var n=r(83438),i=r(78665),o=r(24818).Fd,a=r(5383),s=r(18298);function c(t,e){if(e=e||{},!i(t))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var r=o("getEdgeWeight"in e?e.getEdgeWeight:"weight").fromEntry,n=a.assign({},s,e.settings),c=a.validateSettings(n);if(c)throw new Error("graphology-layout-forceatlas2/worker: "+c.message);this.worker=null,this.graph=t,this.settings=n,this.getEdgeWeight=r,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer="function"===typeof e.outputReducer?e.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var u=void 0,h=this;this.handleGraphUpdate=function(){h.worker&&h.worker.terminate(),u&&clearTimeout(u),u=setTimeout((function(){u=void 0,h.spawnWorker()}),0)},t.on("nodeAdded",this.handleGraphUpdate),t.on("edgeAdded",this.handleGraphUpdate),t.on("nodeDropped",this.handleGraphUpdate),t.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}c.prototype.isRunning=function(){return this.running},c.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},c.prototype.handleMessage=function(t){if(this.running){var e=new Float32Array(t.data.nodes);a.assignLayoutChanges(this.graph,e,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,e),this.matrices.nodes=e,this.askForIterations()}},c.prototype.askForIterations=function(t){var e=this.matrices,r={settings:this.settings,nodes:e.nodes.buffer},n=[e.nodes.buffer];return t&&(r.edges=e.edges.buffer,n.push(e.edges.buffer)),this.worker.postMessage(r,n),this},c.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running||(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0)),this},c.prototype.stop=function(){return this.running=!1,this},c.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},t.exports=c},47660:(t,e,r)=>{var n=r(57982),i=r(78665),o={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function a(t,e,r){if(!i(e))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var a=(r=n(r,o)).dimensions;if(!Array.isArray(a)||a.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var s=a.length,c=r.center,u=r.rng,h=r.scale,d=(c-.5)*h;function l(t){for(var e=0;e<s;e++)t[a[e]]=u()*h+d;return t}if(!t){var f={};return e.forEachNode((function(t){f[t]=l({})})),f}e.updateEachNodeAttributes((function(t,e){return l(e),e}),{attributes:a})}var s=a.bind(null,!1);s.assign=a.bind(null,!0),t.exports=s},57982:t=>{t.exports=function t(e,r){e=e||{};var n,i={};for(var o in r){var a=e[o],s=r[o];!(n=s)||"object"!==typeof n||"function"===typeof n||Array.isArray(n)||n instanceof Set||n instanceof Map||n instanceof RegExp||n instanceof Date?i[o]=void 0===a?s:a:i[o]=t(a,s)}return i}},24818:(t,e)=>{function r(t){return"number"!==typeof t||isNaN(t)?1:t}function n(t,e){var r={},n=function(t){return"undefined"===typeof t?e:t};"function"===typeof e&&(n=e);var i=function(e){return n(e[t])},o=function(){return n(void 0)};return"string"===typeof t?(r.fromAttributes=i,r.fromGraph=function(t,e){return i(t.getEdgeAttributes(e))},r.fromEntry=function(t,e){return i(e)},r.fromPartialEntry=r.fromEntry,r.fromMinimalEntry=r.fromEntry):"function"===typeof t?(r.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},r.fromGraph=function(e,r){var i=e.extremities(r);return n(t(r,e.getEdgeAttributes(r),i[0],i[1],e.getNodeAttributes(i[0]),e.getNodeAttributes(i[1]),e.isUndirected(r)))},r.fromEntry=function(e,r,i,o,a,s,c){return n(t(e,r,i,o,a,s,c))},r.fromPartialEntry=function(e,r,i,o){return n(t(e,r,i,o))},r.fromMinimalEntry=function(e,r){return n(t(e,r))}):(r.fromAttributes=o,r.fromGraph=o,r.fromEntry=o,r.fromMinimalEntry=o),r}e.Fd=function(t){return n(t,r)}},78665:t=>{t.exports=function(t){return null!==t&&"object"===typeof t&&"function"===typeof t.addUndirectedEdgeWithKey&&"function"===typeof t.dropNode&&"boolean"===typeof t.multi}},3849:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}
vendor: 17,271 bytes, line 1
1function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function i(){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(t){return!1}}function o(t,e,r){return o=i()?Reflect.construct.bind():function(t,e,r){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return r&&n(o,r.prototype),o},o.apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return o(t,arguments,r(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,t)},a(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var c=function(){for(var t=arguments[0],e=1,r=arguments.length;e<r;e++)if(arguments[e])for(var n in arguments[e])t[n]=arguments[e][n];return t};function u(t,e,r,n){var i=t._nodes.get(e),o=null;return i?o="mixed"===n?i.out&&i.out[r]||i.undirected&&i.undirected[r]:"directed"===n?i.out&&i.out[r]:i.undirected&&i.undirected[r]:o}function h(e){return"object"===t(e)&&null!==e}function d(t){var e;for(e in t)return!1;return!0}function l(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function f(t,e,r){var n={enumerable:!0,configurable:!0};"function"==typeof r?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function p(t){return!!h(t)&&!(t.attributes&&!Array.isArray(t.attributes))}"function"==typeof Object.assign&&(c=Object.assign);var g,v={exports:{}},m="object"==typeof Reflect?Reflect:null,y=m&&"function"==typeof m.apply?m.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};g=m&&"function"==typeof m.ownKeys?m.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var b=Number.isNaN||function(t){return t!=t};function w(){w.init.call(this)}v.exports=w,v.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}G(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&G(t,"error",e,r)}(t,i,{once:!0})}))},w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var _=10;function x(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function E(t){return void 0===t._maxListeners?w.defaultMaxListeners:t._maxListeners}function L(t,e,r,n){var i,o,a,s;if(x(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=E(t))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return t}function A(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=A.bind(n);return i.listener=r,n.wrapFn=i,i}function k(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):M(i,i.length)}function S(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function M(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function G(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}function O(t){if("function"!=typeof t)throw new Error("obliterator/iterator: expecting a function!");this.next=t}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(t){if("number"!=typeof t||t<0||b(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");_=t}}),w.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||b(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},w.prototype.getMaxListeners=function(){return E(this)},w.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)y(s,this,e);else{var c=s.length,u=M(s,c);for(r=0;r<c;++r)y(u[r],this,e)}return!0},w.prototype.addListener=function(t,e){return L(this,t,e,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(t,e){return L(this,t,e,!0)},w.prototype.once=function(t,e){return x(e),this.on(t,C(this,t,e)),this},w.prototype.prependOnceListener=function(t,e){return x(e),this.prependListener(t,C(this,t,e)),this},w.prototype.removeListener=function(t,e){var r,n,i,o,a;if(x(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},w.prototype.listeners=function(t){return k(this,t,!0)},w.prototype.rawListeners=function(t){return k(this,t,!1)},w.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):S.call(t,e)},w.prototype.listenerCount=S,w.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]},"undefined"!=typeof Symbol&&(O.prototype[Symbol.iterator]=function(){return this}),O.of=function(){var t=arguments,e=t.length,r=0;return new O((function(){return r>=e?{done:!0}:{done:!1,value:t[r++]}}))},O.empty=function(){return new O((function(){return{done:!0}}))},O.fromSequence=function(t){var e=0,r=t.length;return new O((function(){return e>=r?{done:!0}:{done:!1,value:t[e++]}}))},O.is=function(t){return t instanceof O||"object"==typeof t&&null!==t&&"function"==typeof t.next};var F=O,D={};D.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,D.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var P=F,T=D,R=T.ARRAY_BUFFER_SUPPORT,N=T.SYMBOL_SUPPORT,j=function(t){var e=function(t){return"string"==typeof t||Array.isArray(t)||R&&ArrayBuffer.isView(t)?P.fromSequence(t):"object"!=typeof t||null===t?null:N&&"function"==typeof t[Symbol.iterator]?t[Symbol.iterator]():"function"==typeof t.next?t:null}(t);if(!e)throw new Error("obliterator: target is not iterable nor a valid iterator.");return e},z=j,U=function(t,e){for(var r,n=arguments.length>1?e:1/0,i=n!==1/0?new Array(n):[],o=0,a=z(t);;){if(o===n)return i;if((r=a.next()).done)return o!==e&&(i.length=o),i;i[o++]=r.value}},I=function(t){function r(e){var r;return(r=t.call(this)||this).name="GraphError",r.message=e,r}return e(r,t),r}(a(Error)),B=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(n),r.prototype.constructor),n}return e(r,t),r}(I),W=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(n),r.prototype.constructor),n}return e(r,t),r}(I),q=function(t){function r(e){var n;return(n=t.call(this,e)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(n),r.prototype.constructor),n}return e(r,t),r}(I);function H(t,e){this.key=t,this.attributes=e,this.clear()}function V(t,e){this.key=t,this.attributes=e,this.clear()}function Y(t,e){this.key=t,this.attributes=e,this.clear()}function Z(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}function K(t,e,r,n,i,o,a){var s,c,u,h;if(n=""+n,0===r){if(!(s=t._nodes.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" node in the graph.'));u=i,h=o}else if(3===r){if(i=""+i,!(c=t._edges.get(i)))throw new W("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));var d=c.source.key,l=c.target.key;if(n===d)s=c.target;else{if(n!==l)throw new W("Graph.".concat(e,': the "').concat(n,'" node is not attached to the "').concat(i,'" edge (').concat(d,", ").concat(l,")."));s=c.source}u=o,h=a}else{if(!(c=t._edges.get(n)))throw new W("Graph.".concat(e,': could not find the "').concat(n,'" edge in the graph.'));s=1===r?c.source:c.target,u=i,h=o}return[s,u,h]}H.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},V.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},Y.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},Z.prototype.attach=function(){var t="out",e="in";this.undirected&&(t=e="undirected");var r=this.source.key,n=this.target.key;this.source[t][n]=this,this.undirected&&r===n||(this.target[e][r]=this)},Z.prototype.attachMulti=function(){var t="out",e="in",r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");var i=this.source[t],o=i[n];if(void 0===o)return i[n]=this,void(this.undirected&&r===n||(this.target[e][r]=this));o.previous=this,this.next=o,i[n]=this,this.target[e][r]=this},Z.prototype.detach=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]},Z.prototype.detachMulti=function(){var t=this.source.key,e=this.target.key,r="out",n="in";this.undirected&&(r=n="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var X=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];return a.attributes[s]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){return K(this,e,r,t,n)[0].attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];return a.attributes.hasOwnProperty(s)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),s=a[0],c=a[1],u=a[2];return s.attributes[c]=u,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:c}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i,o){var a=K(this,e,r,t,n,i,o),s=a[0],c=a[1],u=a[2];if("function"!=typeof u)throw new B("Graph.".concat(e,": updater should be a function."));var h=s.attributes,d=u(h[c]);return h[c]=d,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:c}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];return delete a.attributes[s],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:s}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];if(!h(s))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=s,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];if(!h(s))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return c(a.attributes,s),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:s}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o=K(this,e,r,t,n,i),a=o[0],s=o[1];if("function"!=typeof s)throw new B("Graph.".concat(e,": provided updater is not a function."));return a.attributes=s(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}}],$=[{name:function(t){return"get".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes[n]}}},{name:function(t){return"get".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t){var n;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+t,o=""+arguments[1];if(!(n=u(this,i,o,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(i,'" - "').concat(o,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(n=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return n.attributes}}},{name:function(t){return"has".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.t
vendor: 4,084 bytes, line 1
1ype," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return i.attributes.hasOwnProperty(n)}}},{name:function(t){return"set".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,s=""+n;if(n=arguments[2],i=arguments[3],!(o=u(this,a,s,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(s,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}return o.attributes[n]=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"update".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n,i){var o;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+t,s=""+n;if(n=arguments[2],i=arguments[3],!(o=u(this,a,s,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(s,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(o=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof i)throw new B("Graph.".concat(e,": updater should be a function."));return o.attributes[n]=i(o.attributes[n]),this.emit("edgeAttributesUpdated",{key:o.key,type:"set",attributes:o.attributes,name:n}),this}}},{name:function(t){return"remove".concat(t,"Attribute")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}
vendor: 12,005 bytes, line 1
1return delete i.attributes[n],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:n}),this}}},{name:function(t){return"replace".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return i.attributes=n,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(t){return"merge".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if(!h(n))throw new B("Graph.".concat(e,": provided attributes are not a plain object."));return c(i.attributes,n),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:n}),this}}},{name:function(t){return"update".concat(t,"Attributes")},attacher:function(t,e,r){t.prototype[e]=function(t,n){var i;if("mixed"!==this.type&&"mixed"!==r&&r!==this.type)throw new q("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new q("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+t,a=""+n;if(n=arguments[2],!(i=u(this,o,a,r)))throw new W("Graph.".concat(e,': could not find an edge for the given path ("').concat(o,'" - "').concat(a,'").'))}else{if("mixed"!==r)throw new q("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(t=""+t,!(i=this._edges.get(t)))throw new W("Graph.".concat(e,': could not find the "').concat(t,'" edge in the graph.'))}if("function"!=typeof n)throw new B("Graph.".concat(e,": provided updater is not a function."));return i.attributes=n(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],Q=F,J=j,tt=function(){var t=arguments,e=null,r=-1;return new Q((function(){for(var n=null;;){if(null===e){if(++r>=t.length)return{done:!0};e=J(t[r])}if(!0!==(n=e.next()).done)break;e=null}return n}))},et=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function rt(t,e,r,n){var i=!1;for(var o in e)if(o!==n){var a=e[o];if(i=r(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),t&&i)return a.key}}function nt(t,e,r,n){var i,o,a,s=!1;for(var c in e)if(c!==n){i=e[c];do{if(o=i.source,a=i.target,s=r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),t&&s)return i.key;i=i.next}while(void 0!==i)}}function it(t,e){var r,n=Object.keys(t),i=n.length,o=0;return new F((function(){do{if(r)r=r.next;else{if(o>=i)return{done:!0};var a=n[o++];if(a===e){r=void 0;continue}r=t[a]}}while(!r);return{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}}}))}function ot(t,e,r,n){var i=e[r];if(i){var o=i.source,a=i.target;return n(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&t?i.key:void 0}}function at(t,e,r,n){var i=e[r];if(i){var o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&o)return i.key;i=i.next}while(void 0!==i)}}function st(t,e){var r=t[e];return void 0!==r.next?new F((function(){if(!r)return{done:!0};var t={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:t}})):F.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function ct(t,e){if(0===t.size)return[];if("mixed"===e||e===t.type)return"function"==typeof Array.from?Array.from(t._edges.keys()):U(t._edges.keys(),t._edges.size);for(var r,n,i="undirected"===e?t.undirectedSize:t.directedSize,o=new Array(i),a="undirected"===e,s=t._edges.values(),c=0;!0!==(r=s.next()).done;)(n=r.value).undirected===a&&(o[c++]=n.key);return o}function ut(t,e,r,n){if(0!==e.size)for(var i,o,a="mixed"!==r&&r!==e.type,s="undirected"===r,c=!1,u=e._edges.values();!0!==(i=u.next()).done;)if(o=i.value,!a||o.undirected===s){var h=o,d=h.key,l=h.attributes,f=h.source,p=h.target;if(c=n(d,l,f.key,p.key,f.attributes,p.attributes,o.undirected),t&&c)return d}}function ht(t,e){if(0===t.size)return F.empty();var r="mixed"!==e&&e!==t.type,n="undirected"===e,i=t._edges.values();return new F((function(){for(var t,e;;){if((t=i.next()).done)return t;if(e=t.value,!r||e.undirected===n)break}return{value:{edge:e.key,attributes:e.attributes,source:e.source.key,target:e.target.key,sourceAttributes:e.source.attributes,targetAttributes:e.target.attributes,undirected:e.undirected},done:!1}}))}function dt(t,e,r,n,i,o){var a,s=e?nt:rt;if("undirected"!==r){if("out"!==n&&(a=s(t,i.in,o),t&&a))return a;if("in"!==n&&(a=s(t,i.out,o,n?void 0:i.key),t&&a))return a}if("directed"!==r&&(a=s(t,i.undirected,o),t&&a))return a}function lt(t,e,r,n){var i=[];return dt(!1,t,e,r,n,(function(t){i.push(t)})),i}function ft(t,e,r){var n=F.empty();return"undirected"!==t&&("out"!==e&&void 0!==r.in&&(n=tt(n,it(r.in))),"in"!==e&&void 0!==r.out&&(n=tt(n,it(r.out,e?void 0:r.key)))),"directed"!==t&&void 0!==r.undirected&&(n=tt(n,it(r.undirected))),n}function pt(t,e,r,n,i,o,a){var s,c=r?at:ot;if("undirected"!==e){if(void 0!==i.in&&"out"!==n&&(s=c(t,i.in,o,a),t&&s))return s;if(void 0!==i.out&&"in"!==n&&(n||i.key!==o)&&(s=c(t,i.out,o,a),t&&s))return s}if("directed"!==e&&void 0!==i.undirected&&(s=c(t,i.undirected,o,a),t&&s))return s}function gt(t,e,r,n,i){var o=[];return pt(!1,t,e,r,n,i,(function(t){o.push(t)})),o}function vt(t,e,r,n){var i=F.empty();return"undirected"!==t&&(void 0!==r.in&&"out"!==e&&n in r.in&&(i=tt(i,st(r.in,n))),void 0!==r.out&&"in"!==e&&n in r.out&&(e||r.key!==n)&&(i=tt(i,st(r.out,n)))),"directed"!==t&&void 0!==r.undirected&&n in r.undirected&&(i=tt(i,st(r.undirected,n))),i}var mt=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function yt(){this.A=null,this.B=null}function bt(t,e,r,n,i){for(var o in n){var a=n[o],s=a.source,c=a.target,u=s===r?c:s;if(!e||!e.has(u.key)){var h=i(u.key,u.attributes);if(t&&h)return u.key}}}function wt(t,e,r,n,i){if("mixed"!==e){if("undirected"===e)return bt(t,null,n,n.undirected,i);if("string"==typeof r)return bt(t,null,n,n[r],i)}var o,a=new yt;if("undirected"!==e){if("out"!==r){if(o=bt(t,null,n,n.in,i),t&&o)return o;a.wrap(n.in)}if("in"!==r){if(o=bt(t,a,n,n.out,i),t&&o)return o;a.wrap(n.out)}}if("directed"!==e&&(o=bt(t,a,n,n.undirected,i),t&&o))return o}function _t(t,e,r){var n=Object.keys(r),i=n.length,o=0;return new F((function(){var a=null;do{if(o>=i)return t&&t.wrap(r),{done:!0};var s=r[n[o++]],c=s.source,u=s.target;a=c===e?u:c,t&&t.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function xt(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return Object.keys(r.undirected);if("string"==typeof e)return Object.keys(r[e])}var n=[];return wt(!1,t,e,r,(function(t){n.push(t)})),n}("mixed"===n?this.type:n,i,e)}}function Et(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return F.empty();t=""+t;var e=this._nodes.get(t);if(void 0===e)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return function(t,e,r){if("mixed"!==t){if("undirected"===t)return _t(null,r,r.undirected);if("string"==typeof e)return _t(null,r,r[e])}var n=F.empty(),i=new yt;return"undirected"!==t&&("out"!==e&&(n=tt(n,_t(i,r,r.in))),"in"!==e&&(n=tt(n,_t(i,r,r.out)))),"directed"!==t&&(n=tt(n,_t(i,r,r.undirected))),n}("mixed"===n?this.type:n,i,e)}}function Lt(t,e,r,n,i){for(var o,a,s,c,u,h,d,l=n._nodes.values(),f=n.type;!0!==(o=l.next()).done;){var p=!1;if(a=o.value,"undirected"!==f)for(s in c=a.out){u=c[s];do{if(h=u.target,p=!0,d=i(a.key,h.key,a.attributes,h.attributes,u.key,u.attributes,u.undirected),t&&d)return u;u=u.next}while(u)}if("directed"!==f)for(s in c=a.undirected)if(!(e&&a.key>s)){u=c[s];do{if((h=u.target).key!==s&&(h=u.source),p=!0,d=i(a.key,h.key,a.attributes,h.attributes,u.key,u.attributes,u.undirected),t&&d)return u;u=u.next}while(u)}if(r&&!p&&(d=i(a.key,null,a.attributes,null,null,null,null),t&&d))return null}}function At(t){if(!h(t))throw new B('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new B("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Ct(t){if(!h(t))throw new B('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new B("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new B("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!h(t.attributes)||null===t.attributes))throw new B("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");
vendor: 23,232 bytes, line 1
1if("undirected"in t&&"boolean"!=typeof t.undirected)throw new B("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}yt.prototype.wrap=function(t){null===this.A?this.A=t:null===this.B&&(this.B=t)},yt.prototype.has=function(t){return null!==this.A&&t in this.A||null!==this.B&&t in this.B};var kt,St=(kt=255&Math.floor(256*Math.random()),function(){return kt++}),Mt=new Set(["directed","undirected","mixed"]),Gt=new Set(["domain","_events","_eventsCount","_maxListeners"]),Ot={allowSelfLoops:!0,multi:!1,type:"mixed"};function Ft(t,e,r){var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function Dt(t,e,r,n,i,o,a,s){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(s&&!h(s))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(s,'"'));if(o=""+o,a=""+a,s=s||{},!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var c=t._nodes.get(o),u=t._nodes.get(a);if(!c)throw new W("Graph.".concat(e,': source node "').concat(o,'" not found.'));if(!u)throw new W("Graph.".concat(e,': target node "').concat(a,'" not found.'));var d={key:null,undirected:n,source:o,target:a,attributes:s};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));if(!t.multi&&(n?void 0!==c.undirected[a]:void 0!==c.out[a]))throw new q("Graph.".concat(e,': an edge linking "').concat(o,'" to "').concat(a,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var l=new Z(n,i,c,u,s);t._edges.set(i,l);var f=o===a;return n?(c.undirectedDegree++,u.undirectedDegree++,f&&(c.undirectedLoops++,t._undirectedSelfLoopCount++)):(c.outDegree++,u.inDegree++,f&&(c.directedLoops++,t._directedSelfLoopCount++)),t.multi?l.attachMulti():l.attach(),n?t._undirectedSize++:t._directedSize++,d.key=i,t.emit("edgeAdded",d),i}function Pt(t,e,r,n,i,o,a,s,u){if(!n&&"undirected"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(n&&"directed"===t.type)throw new q("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(s)if(u){if("function"!=typeof s)throw new B("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(s,'"'))}else if(!h(s))throw new B("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(s,'"'));var d;if(o=""+o,a=""+a,u&&(d=s,s=void 0),!t.allowSelfLoops&&o===a)throw new q("Graph.".concat(e,': source & target are the same ("').concat(o,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var l,f,p=t._nodes.get(o),g=t._nodes.get(a);if(!r&&(l=t._edges.get(i))){if(!(l.source.key===o&&l.target.key===a||n&&l.source.key===a&&l.target.key===o))throw new q("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(o,'" source & "').concat(a,'" target vs. ("').concat(l.source.key,'", "').concat(l.target.key,'").'));f=l}if(f||t.multi||!p||(f=n?p.undirected[a]:p.out[a]),f){var v=[f.key,!1,!1,!1];if(u?!d:!s)return v;if(u){var m=f.attributes;f.attributes=d(m),t.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else c(f.attributes,s),t.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:s});return v}s=s||{},u&&d&&(s=d(s));var y={key:null,undirected:n,source:o,target:a,attributes:s};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new q("Graph.".concat(e,': the "').concat(i,'" edge already exists in the graph.'));var b=!1,w=!1;p||(p=Ft(t,o,{}),b=!0,o===a&&(g=p,w=!0)),g||(g=Ft(t,a,{}),w=!0),l=new Z(n,i,p,g,s),t._edges.set(i,l);var _=o===a;return n?(p.undirectedDegree++,g.undirectedDegree++,_&&(p.undirectedLoops++,t._undirectedSelfLoopCount++)):(p.outDegree++,g.inDegree++,_&&(p.directedLoops++,t._directedSelfLoopCount++)),t.multi?l.attachMulti():l.attach(),n?t._undirectedSize++:t._directedSize++,y.key=i,t.emit("edgeAdded",y),[i,!0,b,w]}function Tt(t,e){t._edges.delete(e.key);var r=e.source,n=e.target,i=e.attributes,o=e.undirected,a=r===n;o?(r.undirectedDegree--,n.undirectedDegree--,a&&(r.undirectedLoops--,t._undirectedSelfLoopCount--)):(r.outDegree--,n.inDegree--,a&&(r.directedLoops--,t._directedSelfLoopCount--)),t.multi?e.detachMulti():e.detach(),o?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:o})}var Rt=function(r){function n(t){var e;if(e=r.call(this)||this,"boolean"!=typeof(t=c({},Ot,t)).multi)throw new B("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(t.multi,'".'));if(!Mt.has(t.type))throw new B('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(t.type,'".'));if("boolean"!=typeof t.allowSelfLoops)throw new B("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(t.allowSelfLoops,'".'));var n="mixed"===t.type?H:"directed"===t.type?V:Y;l(s(e),"NodeDataClass",n);var i="geid_"+St()+"_",o=0;return l(s(e),"_attributes",{}),l(s(e),"_nodes",new Map),l(s(e),"_edges",new Map),l(s(e),"_directedSize",0),l(s(e),"_undirectedSize",0),l(s(e),"_directedSelfLoopCount",0),l(s(e),"_undirectedSelfLoopCount",0),l(s(e),"_edgeKeyGenerator",(function(){var t;do{t=i+o++}while(e._edges.has(t));return t})),l(s(e),"_options",t),Gt.forEach((function(t){return l(s(e),t,e[t])})),f(s(e),"order",(function(){return e._nodes.size})),f(s(e),"size",(function(){return e._edges.size})),f(s(e),"directedSize",(function(){return e._directedSize})),f(s(e),"undirectedSize",(function(){return e._undirectedSize})),f(s(e),"selfLoopCount",(function(){return e._directedSelfLoopCount+e._undirectedSelfLoopCount})),f(s(e),"directedSelfLoopCount",(function(){return e._directedSelfLoopCount})),f(s(e),"undirectedSelfLoopCount",(function(){return e._undirectedSelfLoopCount})),f(s(e),"multi",e._options.multi),f(s(e),"type",e._options.type),f(s(e),"allowSelfLoops",e._options.allowSelfLoops),f(s(e),"implementation",(function(){return"graphology"})),e}e(n,r);var i=n.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(t){return this._nodes.has(""+t)},i.hasDirectedEdge=function(t,e){if("undirected"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&!n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.out.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasUndirectedEdge=function(t,e){if("directed"===this.type)return!1;if(1===arguments.length){var r=""+t,n=this._edges.get(r);return!!n&&n.undirected}if(2===arguments.length){t=""+t,e=""+e;var i=this._nodes.get(t);return!!i&&i.undirected.hasOwnProperty(e)}throw new B("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasEdge=function(t,e){if(1===arguments.length){var r=""+t;return this._edges.has(r)}if(2===arguments.length){t=""+t,e=""+e;var n=this._nodes.get(t);return!!n&&(void 0!==n.out&&n.out.hasOwnProperty(e)||void 0!==n.undirected&&n.undirected.hasOwnProperty(e))}throw new B("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.directedEdge=function(t,e){if("undirected"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.directedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.directedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||void 0;return n?n.key:void 0}},i.undirectedEdge=function(t,e){if("directed"!==this.type){if(t=""+t,e=""+e,this.multi)throw new q("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var r=this._nodes.get(t);if(!r)throw new W('Graph.undirectedEdge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.undirectedEdge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.undirected&&r.undirected[e]||void 0;return n?n.key:void 0}},i.edge=function(t,e){if(this.multi)throw new q("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.edge: could not find the "'.concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W('Graph.edge: could not find the "'.concat(e,'" target node in the graph.'));var n=r.out&&r.out[e]||r.undirected&&r.undirected[e]||void 0;if(n)return n.key},i.areDirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areDirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)},i.areOutNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out},i.areInNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in},i.areUndirectedNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areUndirectedNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"directed"!==this.type&&e in r.undirected},i.areNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&(e in r.in||e in r.out)||"directed"!==this.type&&e in r.undirected},i.areInboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areInboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.in||"directed"!==this.type&&e in r.undirected},i.areOutboundNeighbors=function(t,e){t=""+t,e=""+e;var r=this._nodes.get(t);if(!r)throw new W('Graph.areOutboundNeighbors: could not find the "'.concat(t,'" node in the graph.'));return"undirected"!==this.type&&e in r.out||"directed"!==this.type&&e in r.undirected},i.inDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree},i.outDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree},i.directedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegree: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree},i.undirectedDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegree: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree},i.inboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree),r},i.outboundDegree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.outDegree),r},i.degree=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degree: could not find the "'.concat(t,'" node in the graph.'));var r=0;return"directed"!==this.type&&(r+=e.undirectedDegree),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree),r},i.inDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree-e.directedLoops},i.outDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.outDegree-e.directedLoops},i.directedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"undirected"===this.type?0:e.inDegree+e.outDegree-2*e.directedLoops},i.undirectedDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));return"directed"===this.type?0:e.undirectedDegree-2*e.undirectedLoops},i.inboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree,n+=e.directedLoops),r-n},i.outboundDegreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.outDegree,n+=e.directedLoops),r-n},i.degreeWithoutSelfLoops=function(t){t=""+t;var e=this._nodes.get(t);if(!e)throw new W('Graph.degreeWithoutSelfLoops: could not find the "'.concat(t,'" node in the graph.'));var r=0,n=0;return"directed"!==this.type&&(r+=e.undirectedDegree,n+=2*e.undirectedLoops),"undirected"!==this.type&&(r+=e.inDegree+e.outDegree,n+=2*e.directedLoops),r-n},i.source=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.source: could not find the "'.concat(t,'" edge in the graph.'));return e.source.key},i.target=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.target: could not find the "'.concat(t,'" edge in the graph.'));return e.target.key},i.extremities=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.extremities: could not find the "'.concat(t,'" edge in the graph.'));return[e.source.key,e.target.key]},i.opposite=function(t,e){t=""+t,e=""+e;var r=this._edges.get(e);if(!r)throw new W('Graph.opposite: could not find the "'.concat(e,'" edge in the graph.'));var n=r.source.key,i=r.target.key;if(t===n)return i;if(t===i)return n;throw new W('Graph.opposite: the "'.concat(t,'" node is not attached to the "').concat(e,'" edge (').concat(n,", ").concat(i,")."))},i.hasExtremity=function(t,e){t=""+t,e=""+e;var r=this._edges.get(t);if(!r)throw new W('Graph.hasExtremity: could not find the "'.concat(t,'" edge in the graph.'));return r.source.key===e||r.target.key===e},i.isUndirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isUndirected: could not find the "'.concat(t,'" edge in the graph.'));return e.undirected},i.isDirected=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isDirected: could not find the "'.concat(t,'" edge in the graph.'));return!e.undirected},i.isSelfLoop=function(t){t=""+t;var e=this._edges.get(t);if(!e)throw new W('Graph.isSelfLoop: could not find the "'.concat(t,'" edge in the graph.'));return e.source===e.target},i.addNode=function(t,e){var r=function(t,e,r){if(r&&!h(r))throw new B('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},t._nodes.has(e))throw new q('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));var n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}(this,t,e);return r.key},i.mergeNode=function(t,e){if(e&&!h(e))throw new B('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(e,'"'));t=""+t,e=e||{};var r=this._nodes.get(t);return r?(e&&(c(r.attributes,e),this.emit("nodeAttributesUpdated",{type:"merge",key:t,attributes:r.attributes,data:e})),[t,!1]):(r=new this.NodeDataClass(t,e),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:e}),[t,!0])},i.updateNode=function(t,e){if(e&&"function"!=typeof e)throw new B('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(e,'"'));t=""+t;var r=this._nodes.get(t);if(r){if(e){var n=r.attributes;r.attributes=e(n),this.emit("nodeAttributesUpdated",{type:"replace",key:t,attributes:r.attributes})}return[t,!1]}var i=e?e({}):{};return r=new this.NodeDataClass(t,i),this._nodes.set(t,r),this.emit("nodeAdded",{key:t,attributes:i}),[t,!0]},i.dropNode=function(t){t=""+t;var e,r=this._nodes.get(t);if(!r)throw new W('Graph.dropNode: could not find the "'.concat(t,'" node in the graph.'));if("undirected"!==this.type){for(var n in r.out){e=r.out[n];do{Tt(this,e),e=e.next}while(e)}for(var i in r.in){e=r.in[i];do{Tt(this,e),e=e.next}while(e)}}if("directed"!==this.type)for(var o in r.undirected){e=r.undirected[o];do{Tt(this,e),e=e.next}while(e)}this._nodes.delete(t),this.emit("nodeDropped",{key:t,attributes:r.attributes})},i.dropEdge=function(t){var e;if(arguments.length>1){var r=""+arguments[0],n=""+arguments[1];if(!(e=u(this,r,n,this.type)))throw new W('Graph.dropEdge: could not find the "'.concat(r,'" -> "').concat(n,'" edge in the graph.'))}else if(t=""+t,!(e=this._edges.get(t)))throw new W('Graph.dropEdge: could not find the "'.concat(t,'" edge in the graph.'));return Tt(this,e),this},i.dropDirectedEdge=function(t,e){if(arguments.length<2)throw new q("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new q("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=u(this,t=""+t,e=""+e,"directed");if(!r)throw new W('Graph.dropDirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Tt(this,r),this},i.dropUndirectedEdge=function(t,e){if(arguments.length<2)throw new q("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new q("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var r=u(this,t,e,"undirected");if(!r)throw new W('Graph.dropUndirectedEdge: could not find a "'.concat(t,'" -> "').concat(e,'" edge in the graph.'));return Tt(this,r),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var t,e=this._nodes.values();!0!==(t=e.next()).done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(t){return this._attributes[t]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(t){return this._attributes.hasOwnProperty(t)},i.setAttribute=function(t,e){return this._attributes[t]=e,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.updateAttribute=function(t,e){if("function"!=typeof e)throw new B("Graph.updateAttribute: updater should be a function.");var r=this._attributes[t];return this._attributes[t]=e(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:t}),this},i.removeAttribute=function(t){return delete this._attributes[t],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:t}),this},i.replaceAttributes=function(t){if(!h(t))throw new B("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=t,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(t){if(!h(t))throw new B("Graph.mergeAttributes: provided attributes are not a plain object.");return c(this._attributes,t),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:t}),this},i.updateAttributes=function(t){if("function"!=typeof t)throw new B("Graph.updateAttributes: provided updater is not a function.");return this._attributes=t(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachNodeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i=this._nodes.values();!0!==(r=i.next()).done;)(n=r.value).attributes=t(n.key,n.attributes);this.emit("eachNodeAttributesUpdated",{hints:e||null})},i.updateEachEdgeAttributes=function(t,e){if("function"!=typeof t)throw new B("Graph.updateEachEdgeAttributes: expecting an updater function.");if(e&&!p(e))throw new B("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var r,n,i,o,a=this._edges.values();!0!==(r=a.next()).done;)i=(n=r.value).source,o=n.target,n.attributes=t(n.key,n.attributes,i.key,o.key,i.attributes,o.attributes,n.undirected);this.emit("eachEdgeAttributesUpdated",{hints:e||null})},i.forEachAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntry: expecting a callback.");Lt(!1,!1,!1,this,t)}
vendor: 2,839 bytes, line 1
1,i.forEachAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Lt(!1,!1,!0,this,t)},i.forEachAssymetricAdjacencyEntry=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Lt(!1,!0,!1,this,t)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(t){if("function"!=typeof t)throw new B("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Lt(!1,!0,!0,this,t)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):U(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(t){if("function"!=typeof t)throw new B("Graph.forEachNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)},i.findNode=function(t){if("function"!=typeof t)throw new B("Graph.findNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return r.key},i.mapNodes=function(t){if("function"!=typeof t)throw new B("Graph.mapNode: expecting a callback.");for(var e,r,n=this._nodes.values(),i=new Array(this.order),o=0;!0!==(e=n.next()).done;)r=e.value,i[o++]=t(r.key,r.attributes);return i},i.someNode=function(t){if("function"!=typeof t)throw new B("Graph.someNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(t((r=e.value).key,r.attributes))return!0;return!1},i.everyNode=function(t){if("function"!=typeof t)throw new B("Graph.everyNode: expecting a callback.");for(var e,r,n=this._nodes.values();!0!==(e=n.next()).done;)if(!t((r=e.value).key,r.attributes))return!1;return!0},i.filterNodes=function(t){if("function"!=typeof t)throw new B("Graph.filterNodes: expecting a callback.");for(var e,r,n=this._nodes.values(),i=[];!0!==(e=n.next()).done;)t((r=e.value).key,r.attributes)&&i.push(r.key);return i},i.reduceNodes=function(t,e){if("function"!=typeof t)throw new B("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new B("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var r,n,i=e,o=this._nodes.values();!0!==(r=o.next()).done;)i=t(i,(n=r.value).key,n.attributes);return i},i.nodeEntries=function(){var t=this._nodes.values();return new F((function(){var e=t.next();if(e.done)return e;var r=e.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}))},i.export=function(){var t=this,e=new Array(this._nodes.size),r=0;this._nodes.forEach((function(t,n){e[r++]=function(t,e){var r={key:t};return d(e.attributes)||(r.attributes=c({},e.attributes)),r}(n,t)}));var n=new Array(this._edges.size);
vendor: 3,302 bytes, line 1
1return r=0,this._edges.forEach((function(e,i){n[r++]=function(t,e,r){var n={key:e,source:r.source.key,target:r.target.key};return d(r.attributes)||(n.attributes=c({},r.attributes)),"mixed"===t&&r.undirected&&(n.undirected=!0),n}(t.type,i,e)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}},i.import=function(t){var e,r,i,o,a,s=this,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof n)return t.forEachNode((function(t,e){c?s.mergeNode(t,e):s.addNode(t,e)})),t.forEachEdge((function(t,e,r,n,i,o,a){c?a?s.mergeUndirectedEdgeWithKey(t,r,n,e):s.mergeDirectedEdgeWithKey(t,r,n,e):a?s.addUndirectedEdgeWithKey(t,r,n,e):s.addDirectedEdgeWithKey(t,r,n,e)})),this;if(!h(t))throw new B("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(t.attributes){if(!h(t.attributes))throw new B("Graph.import: invalid attributes. Expecting a plain object.");c?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}if(t.nodes){if(i=t.nodes,!Array.isArray(i))throw new B("Graph.import: invalid nodes. Expecting an array.");for(e=0,r=i.length;e<r;e++){At(o=i[e]);var u=o,d=u.key,l=u.attributes;c?this.mergeNode(d,l):this.addNode(d,l)}}if(t.edges){var f=!1;if("undirected"===this.type&&(f=!0),i=t.edges,!Array.isArray(i))throw new B("Graph.import: invalid edges. Expecting an array.");for(e=0,r=i.length;e<r;e++){Ct(a=i[e]);var p=a,g=p.source,v=p.target,m=p.attributes,y=p.undirected,b=void 0===y?f:y;"key"in a?(c?b?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:b?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,a.key,g,v,m):(c?b?this.mergeUndirectedEdge:this.mergeDirectedEdge:b?this.addUndirectedEdge:this.addDirectedEdge).call(this,g,v,m)}}return this},i.nullCopy=function(t){var e=new n(c({},this._options,t));return e.replaceAttributes(c({},this.getAttributes())),e},i.emptyCopy=function(t){var e=this.nullCopy(t);return this._nodes.forEach((function(t,r){var n=c({},t.attributes);t=new e.NodeDataClass(r,n),e._nodes.set(r,t)})),e},i.copy=function(t){if("string"==typeof(t=t||{}).type&&t.type!==this.type&&"mixed"!==t.type)throw new q('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(t.type,'" because this would mean losing information about the current graph.'));if("boolean"==typeof t.multi&&t.multi!==this.multi&&!0!==t.multi)throw new q("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof t.allowSelfLoops&&t.allowSelfLoops!==this.allowSelfLoops&&!0!==t.allowSelfLoops)throw new q("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var e,r,n=this.emptyCopy(t),i=this._edges.values();!0!==(e=i.next()).done;)Dt(n,"copy",!1,(r=e.value).undirected,r.key,r.source.key,r.target.key,c({},r.attributes));return n},i.toJSON=function(){return this.export()},i.toString=function(){return"[object Graph]"},i.inspect=function(){var e=this,r={};this._nodes.forEach((function(t,e){r[e]=t.attributes}));var n={},i={};
vendor: 7,197 bytes, line 1
1this._edges.forEach((function(t,r){var o,a=t.undirected?"--":"->",s="",c=t.source.key,u=t.target.key;t.undirected&&c>u&&(o=c,c=u,u=o);var h="(".concat(c,")").concat(a,"(").concat(u,")");r.startsWith("geid_")?e.multi&&(void 0===i[h]?i[h]=0:i[h]++,s+="".concat(i[h],". ")):s+="[".concat(r,"]: "),n[s+=h]=t.attributes}));var o={};for(var a in this)this.hasOwnProperty(a)&&!Gt.has(a)&&"function"!=typeof this[a]&&"symbol"!==t(a)&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=r,o.edges=n,l(o,"constructor",this.constructor),o},n}(v.exports.EventEmitter);"undefined"!=typeof Symbol&&(Rt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Rt.prototype.inspect),[{name:function(t){return"".concat(t,"Edge")},generateKey:!0},{name:function(t){return"".concat(t,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(t){return"".concat(t,"EdgeWithKey")}},{name:function(t){return"".concat(t,"DirectedEdgeWithKey")},type:"directed"},{name:function(t){return"".concat(t,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(t){["add","merge","update"].forEach((function(e){var r=t.name(e),n="add"===e?Dt:Pt;t.generateKey?Rt.prototype[r]=function(i,o,a){return n(this,r,!0,"undirected"===(t.type||this.type),null,i,o,a,"update"===e)}:Rt.prototype[r]=function(i,o,a,s){return n(this,r,!1,"undirected"===(t.type||this.type),i,o,a,s,"update"===e)}}))})),function(t){X.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Node"),0),n(t,r("Source"),1),n(t,r("Target"),2),n(t,r("Opposite"),3)}))}(Rt),function(t){$.forEach((function(e){var r=e.name,n=e.attacher;n(t,r("Edge"),"mixed"),n(t,r("DirectedEdge"),"directed"),n(t,r("UndirectedEdge"),"undirected")}))}(Rt),function(t){et.forEach((function(e){!function(t,e){var r=e.name,n=e.type,i=e.direction;t.prototype[r]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return[];if(!arguments.length)return ct(this,n);if(1===arguments.length){t=""+t;var o=this._nodes.get(t);if(void 0===o)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" node in the graph.'));return lt(this.multi,"mixed"===n?this.type:n,i,o)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(r,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(r,': could not find the "').concat(e,'" target node in the graph.'));return gt(n,this.multi,i,a,e)}throw new B("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"===n||"mixed"===this.type||n===this.type){if(1===arguments.length)return ut(!1,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!1,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var s=this._nodes.get(t);if(!s)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!1,n,this.multi,i,s,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(){var t,e=Array.prototype.slice.call(arguments),r=e.pop();if(0===e.length){var i=0;"directed"!==n&&(i+=this.undirectedSize),"undirected"!==n&&(i+=this.directedSize),t=new Array(i);var a=0;e.push((function(e,n,i,o,s,c,u){t[a++]=r(e,n,i,o,s,c,u)}))}else t=[],e.push((function(e,n,i,o,a,s,c){t.push(r(e,n,i,o,a,s,c))}));return this[o].apply(this,e),t};var s="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),r=[];return t.push((function(t,n,i,o,a,s,c){e(t,n,i,o,a,s,c)&&r.push(t)})),this[o].apply(this,t),r};var c="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[c]=function(){var t,e,r=Array.prototype.slice.call(arguments);if(r.length<2||r.length>4)throw new B("Graph.".concat(c,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(r.length,")."));if("function"==typeof r[r.length-1]&&"function"!=typeof r[r.length-2])throw new B("Graph.".concat(c,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));2===r.length?(t=r[0],e=r[1],r=[]):3===r.length?(t=r[1],e=r[2],r=[r[0]]):4===r.length&&(t=r[2],e=r[3],r=[r[0],r[1]]);var n=e;return r.push((function(e,r,i,o,a,s,c){n=t(n,e,r,i,o,a,s,c)})),this[o].apply(this,r),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e,r){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return!1;if(1===arguments.length)return ut(!0,this,n,r=t);if(2===arguments.length){t=""+t,r=e;var a=this._nodes.get(t);if(void 0===a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return dt(!0,this.multi,"mixed"===n?this.type:n,i,a,r)}if(3===arguments.length){t=""+t,e=""+e;var s=this._nodes.get(t);if(!s)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return pt(!0,n,this.multi,i,s,e,r)}throw new B("Graph.".concat(o,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var a="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,s){return e(t,r,n,i,o,a,s)})),!!this[o].apply(this,t)};var s="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[s]=function(){var t=Array.prototype.slice.call(arguments),e=t.pop();return t.push((function(t,r,n,i,o,a,s){return!e(t,r,n,i,o,a,s)})),!this[o].apply(this,t)}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r.slice(0,-1)+"Entries";t.prototype[o]=function(t,e){if("mixed"!==n&&"mixed"!==this.type&&n!==this.type)return F.empty();if(!arguments.length)return ht(this,n);if(1===arguments.length){t=""+t;var r=this._nodes.get(t);if(!r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));return ft(n,i,r)}if(2===arguments.length){t=""+t,e=""+e;var a=this._nodes.get(t);if(!a)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" source node in the graph.'));if(!this._nodes.has(e))throw new W("Graph.".concat(o,': could not find the "').concat(e,'" target node in the graph.'));return vt(n,i,a,e)}throw new B("Graph.".concat(o,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(t,e)}))}(Rt),function(t){mt.forEach((function(e){xt(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o="forEac
1h"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[o]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(o,': could not find the "').concat(t,'" node in the graph.'));wt(!1,"mixed"===n?this.type:n,i,r,e)}};var a="map"+r[0].toUpperCase()+r.slice(1);t.prototype[a]=function(t,e){var r=[];return this[o](t,(function(t,n){r.push(e(t,n))})),r};var s="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(t,e){var r=[];return this[o](t,(function(t,n){e(t,n)&&r.push(t)})),r};var c="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[c]=function(t,e,r){if(arguments.length<3)throw new B("Graph.".concat(c,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var n=r;return this[o](t,(function(t,r){n=e(n,t,r)})),n}}(t,e),function(t,e){var r=e.name,n=e.type,i=e.direction,o=r[0].toUpperCase()+r.slice(1,-1),a="find"+o;t.prototype[a]=function(t,e){if("mixed"===n||"mixed"===this.type||n===this.type){t=""+t;var r=this._nodes.get(t);if(void 0===r)throw new W("Graph.".concat(a,': could not find the "').concat(t,'" node in the graph.'));return wt(!0,"mixed"===n?this.type:n,i,r,e)}};var s="some"+o;t.prototype[s]=function(t,e){return!!this[a](t,e)};var c="every"+o;t.prototype[c]=function(t,e){return!this[a](t,(function(t,r){return!e(t,r)}))}}(t,e),Et(t,e)}))}(Rt);var Nt=function(t){function r(e){var r=c({type:"directed"},e);if("multi"in r&&!1!==r.multi)throw new B("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==r.type)throw new B('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),jt=function(t){function r(e){var r=c({type:"undirected"},e);if("multi"in r&&!1!==r.multi)throw new B("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==r.type)throw new B('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),zt=function(t){function r(e){var r=c({multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return t.call(this,r)||this}return e(r,t),r}(Rt),Ut=function(t){function r(e){var r=c({type:"directed",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==r.type)throw new B('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt),It=function(t){function r(e){var r=c({type:"undirected",multi:!0},e);if("multi"in r&&!0!==r.multi)throw new B("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==r.type)throw new B('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');return t.call(this,r)||this}return e(r,t),r}(Rt);function Bt(t){t.from=function(e,r){var n=c({},e.options,r),i=new t(n);return i.import(e),i}}return Bt(Rt),Bt(Nt),Bt(jt),Bt(zt),Bt(Ut),Bt(It),Rt.Graph=Rt,Rt.DirectedGraph=Nt,Rt.UndirectedGraph=jt,Rt.MultiGraph=zt,Rt.MultiDirectedGraph=Ut,Rt.MultiUndirectedGraph=It,Rt.InvalidArgumentsGraphError=B,Rt.NotFoundGra
1phError=W,Rt.UsageGraphError=q,Rt}()},99022:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(53884),a=i(r(74765)),s=r(79779),c=r(6160),u=1.5,h=function(t){function e(){var e=t.call(this)||this;return e.x=.5,e.y=.5,e.angle=0,e.ratio=1,e.minRatio=null,e.maxRatio=null,e.nextFrame=null,e.previousState=null,e.enabled=!0,e.previousState=e.getState(),e}return n(e,t),e.from=function(t){return(new e).setState(t)},e.prototype.enable=function(){return this.enabled=!0,this},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.getState=function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}},e.prototype.hasState=function(t){return this.x===t.x&&this.y===t.y&&this.ratio===t.ratio&&this.angle===t.angle},e.prototype.getPreviousState=function(){var t=this.previousState;return t?{x:t.x,y:t.y,angle:t.angle,ratio:t.ratio}:null},e.prototype.getBoundedRatio=function(t){var e=t;return"number"===typeof this.minRatio&&(e=Math.max(e,this.minRatio)),"number"===typeof this.maxRatio&&(e=Math.min(e,this.maxRatio)),e},e.prototype.validateState=function(t){var e={};return"number"===typeof t.x&&(e.x=t.x),"number"===typeof t.y&&(e.y=t.y),"number"===typeof t.angle&&(e.angle=t.angle),"number"===typeof t.ratio&&(e.ratio=this.getBoundedRatio(t.ratio)),e},e.prototype.isAnimated=function(){return!!this.nextFrame},e.prototype.setState=function(t){if(!this.enabled)return this;this.previousState=this.getState();var e=this.validateState(t);return"number"===typeof e.x&&(this.x=e.x),"number"===typeof e.y&&(this.y=e.y),"number"===typeof e.angle&&(this.angle=e.angle),"number"===typeof e.ratio&&(this.ratio=e.ratio),this.hasState(this.previousState)||this.emit("updated",this.getState()),this},e.prototype.updateState=function(t){return this.setState(t(this.getState())),this},e.prototype.animate=function(t,e,r){var n=this;if(this.enabled){var i=Object.assign({},o.ANIMATE_DEFAULTS,e),c=this.validateState(t),u="function"===typeof i.easing?i.easing:a.default[i.easing],h=Date.now(),d=this.getState(),l=function(){var t=(Date.now()-h)/i.duration;if(t>=1)return n.nextFrame=null,n.setState(c),void(n.animationCallback&&(n.animationCallback.call(null),n.animationCallback=void 0));var e=u(t),r={};"number"===typeof c.x&&(r.x=d.x+(c.x-d.x)*e),"number"===typeof c.y&&(r.y=d.y+(c.y-d.y)*e),"number"===typeof c.angle&&(r.angle=d.angle+(c.angle-d.angle)*e),"number"===typeof c.ratio&&(r.ratio=d.ratio+(c.ratio-d.ratio)*e),n.setState(r),n.nextFrame=(0,s.requestFrame)(l)};this.nextFrame?((0,s.cancelFrame)(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=(0,s.requestFrame)(l)):l(),this.animationCallback=r}},e.prototype.animatedZoom=function(t){if(t){if("number"===typeof t)return this.animate({ratio:this.ratio/t});this.animate({ratio:this.ratio/(t.factor||u)},t)}else this.animate({ratio:this.ratio/u})},e.prototype.animatedUnzoom=function(t){if(t){if("number"===typeof t)return this.animate({ratio:this.ratio*t});this.animate({ratio:this.ratio*(t.factor||u)},t)}else this.animate({ratio:this.ratio*u})},e.prototype.animatedReset=function(t){this.animate({x:.5,y:.5,ratio:1,angle:0},t)},e.prototype.copy=function(){return e.from(this.getState())},e}(c.TypedEventEmitter);e.default=h},4651:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};
1Object.defineProperty(e,"__esModule",{value:!0}),e.getWheelDelta=e.getTouchCoords=e.getTouchesArray=e.getWheelCoords=e.getMouseCoords=e.getPosition=void 0;var o=r(6160);function a(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function s(t,e){var r=i(i({},a(t,e)),{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:t});return r}e.getPosition=a,e.getMouseCoords=s,e.getWheelCoords=function(t,e){return i(i({},s(t,e)),{delta:h(t)})};var c=2;function u(t){for(var e=[],r=0,n=Math.min(t.length,c);r<n;r++)e.push(t[r]);return e}function h(t){if("undefined"!==typeof t.deltaY)return-3*t.deltaY/360;if("undefined"!==typeof t.detail)return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}e.getTouchesArray=u,e.getTouchCoords=function(t,e){return{touches:u(t.touches).map((function(t){return a(t,e)})),original:t}},e.getWheelDelta=h;var d=function(t){function e(e,r){var n=t.call(this)||this;return n.container=e,n.renderer=r,n}return n(e,t),e}(o.TypedEventEmitter);e.default=d},5979:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});
1var s=a(r(4651)),c=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.draggedEvents=0,n.downStartTime=null,n.lastMouseX=null,n.lastMouseY=null,n.isMouseDown=!1,n.isMoving=!1,n.movingTimeout=null,n.startCameraState=null,n.clicks=0,n.doubleClickTimeout=null,n.currentWheelDirection=0,n.handleClick=n.handleClick.bind(n),n.handleRightClick=n.handleRightClick.bind(n),n.handleDown=n.handleDown.bind(n),n.handleUp=n.handleUp.bind(n),n.handleMove=n.handleMove.bind(n),n.handleWheel=n.handleWheel.bind(n),n.handleOut=n.handleOut.bind(n),e.addEventListener("click",n.handleClick,!1),e.addEventListener("contextmenu",n.handleRightClick,!1),e.addEventListener("mousedown",n.handleDown,!1),e.addEventListener("wheel",n.handleWheel,!1),e.addEventListener("mouseout",n.handleOut,!1),document.addEventListener("mousemove",n.handleMove,!1),document.addEventListener("mouseup",n.handleUp,!1),n}return n(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("click",this.handleClick),t.removeEventListener("contextmenu",this.handleRightClick),t.removeEventListener("mousedown",this.handleDown),t.removeEventListener("wheel",this.handleWheel),t.removeEventListener("mouseout",this.handleOut),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)},e.prototype.handleClick=function(t){var e=this;if(this.enabled){if(this.clicks++,2===this.clicks)return this.clicks=0,"number"===typeof this.doubleClickTimeout&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(t);setTimeout((function(){e.clicks=0,e.doubleClickTimeout=null}),300),this.draggedEvents<3&&this.emit("click",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleRightClick=function(t){this.enabled&&this.emit("rightClick",(0,s.getMouseCoords)(t,this.container))},e.prototype.handleDoubleClick=function(t){if(this.enabled){t.preventDefault(),t.stopPropagation();var e=(0,s.getMouseCoords)(t,this.container);if(this.emit("doubleClick",e),!e.sigmaDefaultPrevented){var r=this.renderer.getCamera(),n=r.getBoundedRatio(r.getState().ratio/2.2);r.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),n),{easing:"quadraticInOut",duration:200})}}},e.prototype.handleDown=function(t){if(this.enabled){if(0===t.button){this.startCameraState=this.renderer.getCamera().getState();var e=(0,s.getPosition)(t,this.container),r=e.x,n=e.y;this.lastMouseX=r,this.lastMouseY=n,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleUp=function(t){var e=this;if(this.enabled&&this.isMouseDown){var r=this.renderer.getCamera();this.isMouseDown=!1,"number"===typeof this.movingTimeout&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var n=(0,s.getPosition)(t,this.container),i=n.x,o=n.y,a=r.getState(),c=r.getPreviousState()||{x:0,y:0};this.isMoving?r.animate({x:a.x+3*(a.x-c.x),y:a.y+3*(a.y-c.y)},{duration:200,easing:"quadraticOut"}):this.lastMouseX===i&&this.lastMouseY===o||r.setState({x:a.x,y:a.y}),this.isMoving=!1,setTimeout((function(){e.draggedEvents=0,e.renderer.refresh()}),0),this.emit("mouseup",(0,s.getMouseCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e=this;if(this.enabled){var r=(0,s.getMouseCoords)(t,this.container);if(this.emit("mousemovebody",r),t.target===this.container&&this.emit("mousemove",r),!r.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,"number"===typeof this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){e.movingTimeout=null,e.isMoving=!1}),100);var n=this.renderer.getCamera(),i=(0,s.getPosition)(t,this.container),o=i.x,a=i.y,c=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),u=this.renderer.viewportToFramedGraph({x:o,y:a}),h=c.x-u.x,d=c.y-u.y,l=n.getState(),f=l.x+h,p=l.y+d;n.setState({x:f,y:p}),this.lastMouseX=o,this.lastMouseY=a,t.preventDefault(),t.stopPropagation()}}},e.prototype.handleWheel=function(t){var e=this;if(this.enabled){t.preventDefault(),t.stopPropagation();var r=(0,s.getWheelDelta)(t);if(r){var n=(0,s.getWheelCoords)(t,this.container);
1if(this.emit("wheel",n),!n.sigmaDefaultPrevented){var i=r>0?1/1.7:1.7,o=this.renderer.getCamera(),a=o.getBoundedRatio(o.getState().ratio*i),c=r>0?1:-1,u=Date.now();this.currentWheelDirection===c&&this.lastWheelTriggerTime&&u-this.lastWheelTriggerTime<50||(o.animate(this.renderer.getViewportZoomedState((0,s.getPosition)(t,this.container),a),{easing:"quadraticOut",duration:250},(function(){e.currentWheelDirection=0})),this.currentWheelDirection=c,this.lastWheelTriggerTime=u)}}}},e.prototype.handleOut=function(){},e}(s.default);e.default=c},54911:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},s=this&&this.__read||function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var c=a(r(4651)),u=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.enabled=!0,n.isMoving=!1,n.hasMoved=!1,n.touchMode=0,n.startTouchesPositions=[],n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n.handleMove=n.handleMove.bind(n),e.addEventListener("touchstart",n.handleStart,!1),e.addEventListener("touchend",n.handleLeave,!1),e.addEventListener("touchcancel",n.handleLeave,!1),e.addEventListener("touchmove",n.handleMove,!1),n}return n(e,t),e.prototype.kill=function(){var t=this.container;t.removeEventListener("touchstart",this.handleStart),t.removeEventListener("touchend",this.handleLeave),t.removeEventListener("touchcancel",this.handleLeave),t.removeEventListener("touchmove",this.handleMove)},e.prototype.getDimensions=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},e.prototype.dispatchRelatedMouseEvent=function(t,e,r,n){var i=r||e.touches[0],o=new MouseEvent(t,{clientX:i.clientX,clientY:i.clientY,altKey:e.altKey,ctrlKey:e.ctrlKey});o.isFakeSigmaMouseEvent=!0,(n||this.container).dispatchEvent(o)},e.prototype.handleStart=function(t){var e=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousedown",t);var r=(0,c.getTouchesArray)(t.touches);if(this.touchMode=r.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=r.map((function(t){return(0,c.getPosition)(t,e.container)})),this.lastTouches=r,this.lastTouchesPositions=this.startTouchesPositions,2===this.touchMode){var n=s(this.startTouchesPositions,2),i=n[0],o=i.x,a=i.y,u=n[1],h=u.x,d=u.y;this.startTouchesAngle=Math.atan2(d-a,h-o),this.startTouchesDistance=Math.sqrt(Math.pow(h-o,2)+Math.pow(d-a,2))}this.emit("touchdown",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleLeave=function(t){if(this.enabled){switch(t.preventDefault(),0===t.touches.length&&this.lastTouches&&this.lastTouches.length&&(this.dispatchRelatedMouseEvent("mouseup",t,this.lastTouches[0],document),this.hasMoved||this.dispatchRelatedMouseEvent("click",t,this.lastTouches[0])),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(1===t.touches.length){this.handleStart(t),t.preventDefault();break}case 1:if(this.isMoving){var e=this.renderer.getCamera(),r=e.getState(),n=e.getPreviousState()||{x:0,y:0};e.animate({x:r.x+3*(r.x-n.x),y:r.y+3*(r.y-n.y)},{duration:200,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0}
1this.emit("touchup",(0,c.getTouchCoords)(t,this.container))}},e.prototype.handleMove=function(t){var e,r=this;if(this.enabled){t.preventDefault(),1===t.touches.length&&this.dispatchRelatedMouseEvent("mousemove",t);var n=(0,c.getTouchesArray)(t.touches),i=n.map((function(t){return(0,c.getPosition)(t,r.container)}));if(this.lastTouches=n,this.lastTouchesPositions=i,this.hasMoved||(this.hasMoved=i.some((function(t,e){var n=r.startTouchesPositions[e];return t.x!==n.x||t.y!==n.y}))),this.hasMoved){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout((function(){r.isMoving=!1}),200);var o=this.renderer.getCamera(),a=this.startCameraState;switch(this.touchMode){case 1:var u=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),h=u.x,d=u.y,l=this.renderer.viewportToFramedGraph(i[0]),f=l.x,p=l.y;o.setState({x:a.x+h-f,y:a.y+d-p});break;case 2:var g={},v=i[0],m=v.x,y=v.y,b=i[1],w=b.x,_=b.y,x=Math.atan2(_-y,w-m)-this.startTouchesAngle,E=Math.hypot(_-y,w-m)/this.startTouchesDistance,L=o.getBoundedRatio(a.ratio/E);g.ratio=L,g.angle=a.angle+x;var A=this.getDimensions(),C=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:a}),k=Math.min(A.width,A.height),S=k/A.width,M=L/k;p=y-k/2/(k/A.height);f=(e=s([(f=m-k/2/S)*Math.cos(-g.angle)-p*Math.sin(-g.angle),p*Math.cos(-g.angle)+f*Math.sin(-g.angle)],2))[0],p=e[1],g.x=C.x-f*M,g.y=C.y+p*M,o.setState(g)}this.emit("touchmove",(0,c.getTouchCoords)(t,this.container))}}},e}(c.default);e.default=u},44686:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.edgeLabelsToDisplayFromNodes=e.LabelGrid=void 0;var r=function(){function t(t,e){this.key=t,this.size=e}return t.compare=function(t,e){return t.size>e.size?-1:t.size<e.size||t.key>e.key?1:-1},t}(),n=function(){function t(){this.width=0,this.height=0,this.cellSize=0,this.columns=0,this.rows=0,this.cells={}}return t.prototype.resizeAndClear=function(t,e){this.width=t.width,this.height=t.height,this.cellSize=e,this.columns=Math.ceil(t.width/e),this.rows=Math.ceil(t.height/e),this.cells={}},t.prototype.getIndex=function(t){var e=Math.floor(t.x/this.cellSize);return Math.floor(t.y/this.cellSize)*this.columns+e},t.prototype.add=function(t,e,n){var i=new r(t,e),o=this.getIndex(n),a=this.cells[o];a||(a=[],this.cells[o]=a),a.push(i)},t.prototype.organize=function(){for(var t in this.cells){this.cells[t].sort(r.compare)}},t.prototype.getLabelsToDisplay=function(t,e){var r=this.cellSize*this.cellSize,n=r/t/t*e/r,i=Math.ceil(n),o=[];for(var a in this.cells)for(var s=this.cells[a],c=0;c<Math.min(i,s.length);c++)o.push(s[c].key);return o},t}();e.LabelGrid=n,e.edgeLabelsToDisplayFromNodes=function(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,o=[];return e.forEachEdge((function(t,e,a,s){(a===r||s===r||n.has(a)||n.has(s)||i.has(a)&&i.has(s))&&o.push(t)})),o}},81414:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.rectangleCollidesWithQuad=e.squareCollidesWithQuad=e.getCircumscribedAlignedRectangle=e.isRectangleAligned=void 0;var i=n(r(77677)),o=!1;function a(t){return t.x1===t.x2||t.y1===t.y2}function s(t){var e=Math.sqrt(Math.pow(t.x2-t.x1,2)+Math.pow(t.y2-t.y1,2)),r=(t.y1-t.y2)*t.height/e,n=(t.x2-t.x1)*t.height/e,i={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},a={x:t.x1+r,y:t.y1+n},s={x:t.x2+r,y:t.y2+n},c=Math.min(i.x,o.x,a.x,s.x),u=Math.max(i.x,o.x,a.x,s.x),h=Math.min(i.y,o.y,a.y,s.y);return{x1:c,y1:h,x2:u,y2:h,height:Math.max(i.y,o.y,a.y,s.y)-h}}function c(t,e,r,n,i,o,a){return t<n+o&&t+r>n&&e<i+a&&e+r>i}function u(t,e,r,n,i,o,a,s){return t<i+a&&t+r>i&&e<o+s&&e+n>o}function h(t,e,r,n,i,o){var a=t<r+i/2;return e<n+o/2?a?1:2:a?3:4}e.isRectangleAligned=a,e.getCircumscribedAlignedRectangle=s,e.squareCollidesWithQuad=c,e.rectangleCollidesWithQuad=u;var d=function(){function t(t){var e;void 0===t&&(t={}),this.containers=((e={})[5460]=[],e),this.cache=null,this.lastRectangle=null;var r=Math.pow(4,5);this.data=new Float32Array((4*r-1)/3*4),t.boundaries?this.resize(t.boun
1daries):this.resize({x:0,y:0,width:1,height:1})}return t.prototype.add=function(t,e,r,n){return function(t,e,r,n,i,a,s){for(var u=i-s,h=a-s,d=2*s,l=0,f=0;;){if(l>=t)return r[f]=r[f]||[],void r[f].push(n);var p=4*f+4,g=4*f+8,v=4*f+12,m=4*f+16,y=c(u,h,d,e[p+0],e[p+1],e[p+2],e[p+3]),b=c(u,h,d,e[g+0],e[g+1],e[g+2],e[g+3]),w=c(u,h,d,e[v+0],e[v+1],e[v+2],e[v+3]),_=c(u,h,d,e[m+0],e[m+1],e[m+2],e[m+3]),x=[y,b,w,_].reduce((function(t,e){return e?t+1:t}),0);if(0===x&&0===l)return r[5460].push(n),void(!o&&r[5460].length>=5&&(o=!0,console.warn("sigma/quadtree.insertNode: At least 5 nodes are outside the global quadtree zone. You might have a problem with the normalization function or the custom bounding box.")));if(0===x)throw new Error("sigma/quadtree.insertNode: no collision (level: ".concat(l,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(s,")."));if(3===x)throw new Error("sigma/quadtree.insertNode: 3 impossible collisions (level: ".concat(l,", key: ").concat(n,", x: ").concat(i,", y: ").concat(a,", size: ").concat(s,")."));if(x>1)return r[f]=r[f]||[],void r[f].push(n);l++,y&&(f=p),b&&(f=g),w&&(f=v),_&&(f=m)}}(5,this.data,this.containers,t,e,r,n),this},t.prototype.resize=function(t){this.clear(),this.data[0]=t.x,this.data[1]=t.y,this.data[2]=t.width,this.data[3]=t.height,function(t,e){for(var r=[0,0];r.length;){var n=r.pop(),i=r.pop(),o=4*i+4,a=4*i+8,s=4*i+12,c=4*i+16,u=e[i+0],h=e[i+1],d=e[i+2]/2,l=e[i+3]/2;e[o+0]=u,e[o+1]=h,e[o+2]=d,e[o+3]=l,e[a+0]=u+d,e[a+1]=h,e[a+2]=d,e[a+3]=l,e[s+0]=u,e[s+1]=h+l,e[s+2]=d,e[s+3]=l,e[c+0]=u+d,e[c+1]=h+l,e[c+2]=d,e[c+3]=l,n<t-1&&(r.push(c,n+1),r.push(s,n+1),r.push(a,n+1),r.push(o,n+1))}}(5,this.data)},t.prototype.clear=function(){var t;return this.containers=((t={})[5460]=[],t),this},t.prototype.point=function(t,e){var r=this.containers[5460].slice(),n=0,o=0;do{this.containers[n]&&(0,i.default)(r,this.containers[n]),n=4*n+4*h(t,e,this.data[n+0],this.data[n+1],this.data[n+2],this.data[n+3]),o++}while(o<=5);return r},t.prototype.rectangle=function(t,e,r,n,o){var c=this.lastRectangle;return c&&t===c.x1&&r===c.x2&&e===c.y1&&n===c.y2&&o===c.height||(this.lastRectangle={x1:t,y1:e,x2:r,y2:n,height:o},a(this.lastRectangle)||(this.lastRectangle=s(this.lastRectangle)),this.cache=function(t,e,r,n,o,a,s){for(var c,h=[0,0],d=[];h.length;){var l=h.pop(),f=h.pop();if((c=r[f])&&(0,i.default)(d,c),!(l>=t)){var p=4*f+4,g=4*f+8,v=4*f+12,m=4*f+16,y=u(n,o,a,s,e[p+0],e[p+1],e[p+2],e[p+3]),b=u(n,o,a,s,e[g+0],e[g+1],e[g+2],e[g+3]),w=u(n,o,a,s,e[v+0],e[v+1],e[v+2],e[v+3]),_=u(n,o,a,s,e[m+0],e[m+1],e[m+2],e[m+3]);y&&h.push(p,l+1),b&&h.push(g,l+1),w&&h.push(v,l+1),_&&h.push(m,l+1)}}return d}(5,this.data,this.containers,t,e,Math.abs(t-r)||Math.abs(e-n),o),(0,i.default)(this.cache,this.containers[5460])),this.cache},t}();e.default=d},24673:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Sigma=e.MouseCaptor=e.QuadTree=e.Camera=void 0;var i=n(r(47210));e.Sigma=i.default;var o=n(r(99022));e.Camera=o.default;var a=n(r(81414));e.QuadTree=a.default;var s=n(r(5979));e.MouseCaptor=s.default,e.default=i.default},57037:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,n,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,s=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,u=e.label;if(u){t.fillStyle=c,t.font="".concat(s," ").concat(o,"px ").concat(a);var h,d,l=r.size,f=n.size,p=r.x,g=r.y,v=n.x,m=n.y,y=v-p,b=m-g,w=Math.sqrt(y*y+b*b);if(!(w<l+f)){h=((p+=y*l/w)+(v-=y*f/w))/2,d=((g+=b*l/w)+(m-=b*f/w))/2,y=v-p,b=m-g,w=Math.sqrt(y*y+b*b);var _,x=t.measureText(u).width;if(x>w){for(u+="\u2026",x=t.measureText(u).width;x>w&&u.length>1;)u=u.slice(0,-2)+"\u2026",x=t.measureText(u).width;if(u.length<4)return}_=y>0?b>0?Math.acos(y/w):Math.asin(b/w):b>0?Math.acos(y/w)+Math.PI:Math.asin(y/w)+Math.PI/2,t.save(),t.translate(h,d),t.rotate(_),t.fillText(u,-x/2,e.size/2+o),t.restore()}}}},99041:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(85429));e.default=function(t,e,r){var n=r.labelSize,o=r.labelFont,a=r.labelWeight;if(t.font="".concat(a," ").concat(n,"px ").concat(o),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000","string"===typeof e.label){var s=t.measureText(e.label).width,c=Math.round(s+5),u=Math.round(n+4),h=Math.max(e.size,n/2)+2,d=Math.asin(u/2/h),l=Math.sqrt(Math.abs(Math.pow(h,2)-Math.pow(u/2,2)));t.beginPath(),t.moveTo(e.x+l,e.y+u/2),t.lineTo(e.x+h+c,e.y+u/2),t.lineTo(e.x+h+c,e.y-u/2),t.lineTo(e.x+l,e.y-u/2),t.arc(e.x,e.y,h,d,-d),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+2,0,2*Math.PI),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,(0,i.default)(t,e,r)}},85429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,o=r.labelWeight,a=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=a,t.font="".concat(o," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}},10899:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createEdgeCompoundProgram=e.AbstractEdgeProgram=void 0;var i=function(t){function e(e,r,n,i,o){return t.call(this,e,r,n,i,o)||this}return n(e,t),e}(r(98032).AbstractProgram);e.AbstractEdgeProgram=i,e.createEdgeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.computeIndices=function(){this.programs.forEach((function(t){return t.computeIndices()}))},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r,n,i){this.programs.forEach((function(o){return o.process(t,e,r,n,i)}))},e}()}},97614:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.createNodeCompoundProgram=e.AbstractNodeProgram=void 0;var i=function(t){function e(e,r,n,i,o){var a=t.call(this,e,r,n,i,o)||this;a.positionLocation=e.getAttribLocation(a.program,"a_position"),a.sizeLocation=e.getAttribLocation(a.program,"a_size"),a.colorLocation=e.getAttribLocation(a.program,"a_color");var s=e.getUniformLocation(a.program,"u_matrix");if(null===s)throw new Error("AbstractNodeProgram: error while getting matrixLocation");a.matrixLocation=s;var c=e.getUniformLocation(a.program,"u_ratio");if(null===c)throw new Error("AbstractNodeProgram: error while getting ratioLocation");a.ratioLocation=c;var u=e.getUniformLocation(a.program,"u_scale");if(null===u)throw new Error("AbstractNodeProgram: error while getting scaleLocation");return a.scaleLocation=u,a}return n(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.sizeLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.sizeLocation,1,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,this.attributes*Float32Array.BYTES_PER_ELEMENT,12)},e}(r(98032).AbstractProgram);e.AbstractNodeProgram=i,e.createNodeCompoundProgram=function(t){return function(){function e(e,r){this.programs=t.map((function(t){return new t(e,r)}))}
1return e.prototype.bufferData=function(){this.programs.forEach((function(t){return t.bufferData()}))},e.prototype.allocate=function(t){this.programs.forEach((function(e){return e.allocate(t)}))},e.prototype.bind=function(){},e.prototype.render=function(t){this.programs.forEach((function(e){e.bind(),e.bufferData(),e.render(t)}))},e.prototype.process=function(t,e,r){this.programs.forEach((function(n){return n.process(t,e,r)}))},e}()}},98032:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgram=void 0;var n=r(39024),i=function(){function t(t,e,r,i,o){this.array=new Float32Array,this.points=i,this.attributes=o,this.gl=t,this.vertexShaderSource=e,this.fragmentShaderSource=r;var a=t.createBuffer();if(null===a)throw new Error("AbstractProgram: error while creating the buffer");this.buffer=a,t.bindBuffer(t.ARRAY_BUFFER,this.buffer),this.vertexShader=(0,n.loadVertexShader)(t,this.vertexShaderSource),this.fragmentShader=(0,n.loadFragmentShader)(t,this.fragmentShaderSource),this.program=(0,n.loadProgram)(t,[this.vertexShader,this.fragmentShader])}return t.prototype.bufferData=function(){var t=this.gl;t.bufferData(t.ARRAY_BUFFER,this.array,t.DYNAMIC_DRAW)},t.prototype.allocate=function(t){this.array=new Float32Array(this.points*this.attributes*t)},t.prototype.hasNothingToRender=function(){return 0===this.array.length},t}();e.AbstractProgram=i},23516:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(10899),o=n(r(81158)),a=n(r(51767)),s=(0,i.createEdgeCompoundProgram)([a.default,o.default]);e.default=s},81158:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(79779),a=i(r(22324)),s=i(r(24921)),c=r(10899),u=function(t){function e(e){var r=t.call(this,e,a.default,s.default,3,9)||this;r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius"),r.barycentricLocation=e.getAttribLocation(r.program,"a_barycentric");var n=e.getUniformLocation(r.program,"u_matrix");if(null===n)throw new Error("EdgeArrowHeadProgram: error while getting matrixLocation");r.matrixLocation=n;var i=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===i)throw new Error("EdgeArrowHeadProgram: error while getting sqrtZoomRatioLocation");r.sqrtZoomRatioLocation=i;var o=e.getUniformLocation(r.program,"u_correctionRatio");if(null===o)throw new Error("EdgeArrowHeadProgram: error while getting correctionRatioLocation");return r.correctionRatioLocation=o,r.bind(),r}return n(e,t),e.prototype.bind=function(){var t=this.gl;t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.radiusLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.barycentricLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,9*Float32Array.BYTES_PER_ELEMENT,20),t.vertexAttribPointer(this.barycentricLocation,3,t.FLOAT,!1,9*Float32Array.BYTES_PER_ELEMENT,24)},e.prototype.computeIndices=function(){},e.prototype.process=function(t,e,r,n,i){if(n)for(var a=27*i,s=a+27;a<s;a++)this.array[a]=0;else{var c=r.size||1,u=e.size||1,h=t.x,d=t.y,l=e.x,f=e.y,p=(0,o.floatColor)(r.color),g=l-h,v=f-d,m=g*g+v*v,y=0,b=0;m&&(y=-v*(m=1/Math.sqrt(m))*c,b=g*m*c);var w=27*i,_=this.array;_[w++]=l,_[w++]=f,_[w++]=-y,_[w++]=-b,_[w++]=u,_[w++]=p,_[w++]=1,_[w++]=0,_[w++]=0,_[w++]=l,_[w++]=f,_[w++]=-y,_[w++]=-b,_[w++]=u,_[w++]=p,_[w++]=0,_[w++]=1,_[w++]=0,_[w++]=l,_[w++]=f,_[w++]=-y,_[w++]=-b,_[w++]=u,_[w++]=p,_[w++]=0,_[w++]=0,_[w]=1}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawArrays(e.TRIANGLES,0,this.array.length/9)}},e}(c.AbstractEdgeProgram);e.default=u},51767:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0});var o=r(10899),a=r(79779),s=i(r(20645)),c=i(r(97756)),u=function(t){function e(e){var r=t.call(this,e,s.default,c.default,4,6)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeClampedProgram: error while getting resolutionLocation");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal"),r.radiusLocation=e.getAttribLocation(r.program,"a_radius");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeClampedProgram: error while getting matrixLocation");r.matrixLocation=i;var o=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===o)throw new Error("EdgeClampedProgram: error while getting cameraRatioLocation");r.sqrtZoomRatioLocation=o;var u=e.getUniformLocation(r.program,"u_correctionRatio");if(null===u)throw new Error("EdgeClampedProgram: error while getting viewportRatioLocation");return r.correctionRatioLocation=u,r.canUse32BitsIndices=(0,a.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return n(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.enableVertexAttribArray(this.radiusLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,6*Float32Array.BYTES_PER_ELEMENT,16),t.vertexAttribPointer(this.radiusLocation,1,t.FLOAT,!1,6*Float32Array.BYTES_PER_ELEMENT,20)},e.prototype.process=function(t,e,r,n,i){if(n)for(var o=24*i,s=o+24;o<s;o++)this.array[o]=0;else{var c=r.size||1,u=t.x,h=t.y,d=e.x,l=e.y,f=e.size||1,p=(0,a.floatColor)(r.color),g=d-u,v=l-h,m=g*g+v*v,y=0,b=0;m&&(y=-v*(m=1/Math.sqrt(m))*c,b=g*m*c);var w=24*i,_=this.array;_[w++]=u,_[w++]=h,_[w++]=y,_[w++]=b,_[w++]=p,_[w++]=0,_[w++]=u,_[w++]=h,_[w++]=-y,_[w++]=-b,_[w++]=p,_[w++]=0,_[w++]=d,_[w++]=l,_[w++]=y,_[w++]=b,_[w++]=p,_[w++]=f,_[w++]=d,_[w++]=l,_[w++]=-y,_[w++]=-b,_[w++]=p,_[w]=-f}},e.prototype.computeIndices=function(){for(var t=this.array.length/6,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(o.AbstractEdgeProgram);e.default=u},84303:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(79779),a=i(r(11281)),s=i(r(97756)),c=r(10899),u=function(t){function e(e){var r=t.call(this,e,a.default,s.default,4,5)||this,n=e.createBuffer();if(null===n)throw new Error("EdgeProgram: error while creating indicesBuffer");r.indicesBuffer=n,r.positionLocation=e.getAttribLocation(r.program,"a_position"),r.colorLocation=e.getAttribLocation(r.program,"a_color"),r.normalLocation=e.getAttribLocation(r.program,"a_normal");var i=e.getUniformLocation(r.program,"u_matrix");if(null===i)throw new Error("EdgeProgram: error while getting matrixLocation");r.matrixLocation=i;var c=e.getUniformLocation(r.program,"u_correctionRatio");if(null===c)throw new Error("EdgeProgram: error while getting correctionRatioLocation");r.correctionRatioLocation=c;var u=e.getUniformLocation(r.program,"u_sqrtZoomRatio");if(null===u)throw new Error("EdgeProgram: error while getting sqrtZoomRatioLocation");return r.sqrtZoomRatioLocation=u,r.canUse32BitsIndices=(0,o.canUse32BitsIndices)(e),r.IndicesArray=r.canUse32BitsIndices?Uint32Array:Uint16Array,r.indicesArray=new r.IndicesArray,r.indicesType=r.canUse32BitsIndices?e.UNSIGNED_INT:e.UNSIGNED_SHORT,r.bind(),r}return n(e,t),e.prototype.bind=function(){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.normalLocation),t.enableVertexAttribArray(this.colorLocation),t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,0),t.vertexAttribPointer(this.normalLocation,2,t.FLOAT,!1,5*Float32Array.BYTES_PER_ELEMENT,8),t.vertexAttribPointer(this.colorLocation,4,t.UNSIGNED_BYTE,!0,5*Float32Array.BYTES_PER_ELEMENT,16)},e.prototype.computeIndices=function(){for(var t=this.array.length/5,e=t+t/2,r=new this.IndicesArray(e),n=0,i=0;n<t;n+=4)r[i++]=n,r[i++]=n+1,r[i++]=n+2,r[i++]=n+2,r[i++]=n+1,r[i++]=n+3;this.indicesArray=r},e.prototype.bufferData=function(){t.prototype.bufferData.call(this);var e=this.gl;e.bufferData(e.ELEMENT_ARRAY_BUFFER,this.indicesArray,e.STATIC_DRAW)},e.prototype.process=function(t,e,r,n,i){if(n)for(var a=20*i,s=a+20;a<s;a++)this.array[a]=0;else{var c=r.size||1,u=t.x,h=t.y,d=e.x,l=e.y,f=(0,o.floatColor)(r.color),p=d-u,g=l-h,v=p*p+g*g,m=0,y=0;v&&(m=-g*(v=1/Math.sqrt(v))*c,y=p*v*c);var b=20*i,w=this.array;w[b++]=u,w[b++]=h,w[b++]=m,w[b++]=y,w[b++]=f,w[b++]=u,w[b++]=h,w[b++]=-m,w[b++]=-y,w[b++]=f,w[b++]=d,w[b++]=l,w[b++]=m,w[b++]=y,w[b++]=f,w[b++]=d,w[b++]=l,w[b++]=-m,w[b++]=-y,w[b]=f}},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(t.ratio)),e.uniform1f(this.correctionRatioLocation,t.correctionRatio),e.drawElements(e.TRIANGLES,this.indicesArray.length,this.indicesType,0)}},e}(c.AbstractEdgeProgram);e.default=u},13460:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0});var o=r(79779),a=i(r(55348)),s=i(r(17369)),c=r(97614),u=function(t){function e(e){var r=t.call(this,e,a.default,s.default,1,4)||this;return r.bind(),r}return n(e,t),e.prototype.process=function(t,e,r){var n=this.array,i=1*r*4;if(e)return n[i++]=0,n[i++]=0,n[i++]=0,void(n[i++]=0);var a=(0,o.floatColor)(t.color);n[i++]=t.x,n[i++]=t.y,n[i++]=t.size,n[i]=a},e.prototype.render=function(t){if(!this.hasNothingToRender()){var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.drawArrays(e.POINTS,0,this.array.length/4)}},e}(c.AbstractNodeProgram);e.default=u},76181:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(79779),a=i(r(28503)),s=i(r(49185)),c=r(97614),u=192,h=3072;!function(t){function e(e,r){return t.call(this,e,a.default,s.default,1,8)||this}n(e,t),e.prototype.bind=function(){},e.prototype.process=function(t,e,r){},e.prototype.render=function(t){},e.prototype.rebindTexture=function(){}}(c.AbstractNodeProgram);e.default=function(){var t,e=[],r={},i=!1,d=void 0,l=0,f=0,p=0;function g(n){if(!r[n]){var o=new Image;o.addEventListener("load",(function(){r[n]={status:"pending",image:o},"number"!==typeof d&&(d=requestAnimationFrame((function(){return function(){d=void 0;var n=[];for(var o in r){var a=r[o];"pending"===a.status&&n.push({id:o,image:a.image,size:Math.min(a.image.width,a.image.height)||1})}var s=document.createElement("canvas"),c=s.getContext("2d",{willReadFrequently:!0}),g=i?t.width:0,v=i?t.height:0,m=l,y=f,b=function(e){s.width===g&&s.height===v||(s.width=Math.min(h,g),s.height=v,i&&c.putImageData(t,0,0)),e.forEach((function(t){var e=t.id,n=t.image,i=t.size,o=Math.min(u,i),a=0,s=0;(n.width||0)>(n.height||0)?a=(n.width-n.height)/2:s=(n.height-n.width)/2,c.drawImage(n,a,s,i,i,m,y,o,o),r[e]={status:"ready",x:m,y:y,width:o,height:o},m+=o})),i=!0,t=c.getImageData(0,0,s.width,s.height)},w=[];n.forEach((function(t){var e=t.size,r=Math.min(e,u);l+r>h&&(w.length>0&&(g=Math.max(l,g),v=Math.max(f+p,v),b(w),w=[],p=0),l=0,f=v,m=0,y=v),w.push(t),l+=r,p=Math.max(p,r)})),g=Math.max(l,g),v=Math.max(f+p,v),b(w),w=[],e.forEach((function(t){return t()}))}()})))})),o.addEventListener("error",(function(){r[n]={status:"error"}})),r[n]={status:"loading"},o.setAttribute("crossOrigin",""),o.src=n}}return function(i){function c(r,n){var o=i.call(this,r,a.default,s.default,1,8)||this;e.push((function(){o&&o.rebindTexture&&o.rebindTexture(),n&&n.refresh&&n.refresh()})),t=new ImageData(1,1),o.textureLocation=r.getAttribLocation(o.program,"a_texture");var c=r.getUniformLocation(o.program,"u_atlas");if(null===c)throw new Error("NodeProgramImage: error while getting atlasLocation");return o.atlasLocation=c,o.texture=r.createTexture(),r.bindTexture(r.TEXTURE_2D,o.texture),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),o.bind(),o}return n(c,i),c.prototype.bind=function(){i.prototype.bind.call(this);var t=this.gl;t.enableVertexAttribArray(this.textureLocation),t.vertexAttribPointer(this.textureLocation,4,t.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16)},c.prototype.process=function(e,n,i){var a=this.array,s=1*i*8,c=e.image,u=c&&r[c];if("string"!==typeof c||u||g(c),n)return a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,void(a[s++]=0);if(a[s++]=e.x,a[s++]=e.y,a[s++]=e.size,a[s++]=(0,o.floatColor)(e.color),u&&"ready"===u.status){var h=t.width,d=t.height;a[s++]=u.x/h,a[s++]=u.y/d,a[s++]=u.width/h,a[s++]=u.height/d}else a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0},c.prototype.render=function(t){if(!this.hasNothingToRender()){this.latestRenderParams=t;var e=this.gl,r=this.program;e.useProgram(r),e.uniform1f(this.ratioLocation,1/Math.sqrt(t.ratio)),e.uniform1f(this.scaleLocation,t.scalingRatio),e.uniformMatrix3fv(this.matrixLocation,!1,t.matrix),e.uniform1i(this.atlasLocation,
10),e.drawArrays(e.POINTS,0,this.array.length/8)}},c.prototype.rebindTexture=function(){var e=this.gl;e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))},c}(c.AbstractNodeProgram)}},24921:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\n\nvoid main(void) {\n gl_FragColor = v_color;\n}\n";t.exports=r})()},22324:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute vec2 a_normal;\nattribute float a_radius;\nattribute vec4 a_color;\nattribute vec3 a_barycentric;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadWidthLengthRatio = 0.66;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl and\n // edge.clamped.vert.glsl. Please read it to get better comments on what's\n // happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;
1\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n float adaptedWebGLNodeRadius = a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n float adaptedWebGLArrowHeadHalfWidth = adaptedWebGLArrowHeadLength * arrowHeadWidthLengthRatio / 2.0;\n\n float da = a_barycentric.x;\n float db = a_barycentric.y;\n float dc = a_barycentric.z;\n\n vec2 delta = vec2(\n da * (adaptedWebGLNodeRadius * unitNormal.y)\n + db * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y + adaptedWebGLArrowHeadHalfWidth * unitNormal.x)\n + dc * ((adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.y - adaptedWebGLArrowHeadHalfWidth * unitNormal.x),\n\n da * (-adaptedWebGLNodeRadius * unitNormal.x)\n + db * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x + adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n + dc * (-(adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength) * unitNormal.x - adaptedWebGLArrowHeadHalfWidth * unitNormal.y)\n );\n\n vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;\n\n gl_Position = vec4(position, 0, 1);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},20645:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\nattribute float a_radius;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\nconst float arrowHeadLengthThicknessRatio = 2.5;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // These first computations are taken from edge.vert.glsl. Please read it to\n // get better comments on what's happening:\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;
1\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here, we move the point to leave space for the arrow head:\n float direction = sign(a_radius);\n float adaptedWebGLNodeRadius = direction * a_radius * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n float adaptedWebGLArrowHeadLength = adaptedWebGLThickness * 2.0 * arrowHeadLengthThicknessRatio;\n\n vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (adaptedWebGLNodeRadius + adaptedWebGLArrowHeadLength);\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness + compensationVector, 1)).xy, 0, 1);\n\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},97756:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float feather = 0.001;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n float dist = length(v_normal) * v_thickness;\n\n float t = smoothstep(\n v_thickness - feather,\n v_thickness,\n dist\n );\n\n gl_FragColor = mix(v_color, transparent, t);\n}\n";t.exports=r})()},11281:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n='attribute vec4 a_color;\nattribute vec2 a_normal;\nattribute vec2 a_position;\n\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying vec4 v_color;\nvarying vec2 v_normal;\nvarying float v_thickness;\n\nconst float minThickness = 1.7;\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normal);\n vec2 unitNormal = a_normal / normalLength;\n\n // We require edges to be at least `minThickness` pixels thick *on screen*\n // (so we need to compensate the SQRT zoom ratio):\n float pixelsThickness = max(normalLength, minThickness * u_sqrtZoomRatio);\n\n // Then, we need to retrieve the normalized thickness of the edge in the WebGL\n // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction\n // ratio:\n float webGLThickness = pixelsThickness * u_correctionRatio;\n\n // Finally, we adapt the edge thickness to the "SQRT rule" in sigma (so that\n // items are not too big when zoomed in, and not too small when zoomed out).\n // The exact computation should be `adapted = value * zoom / sqrt(zoom)`, but\n // it\'s simpler like this:\n float adaptedWebG
1LThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Here is the proper position of the vertex\n gl_Position = vec4((u_matrix * vec3(a_position + unitNormal * adaptedWebGLThickness, 1)).xy, 0, 1);\n\n // For the fragment shader though, we need a thickness that takes the "magic"\n // correction ratio into account (as in webGLThickness), but so that the\n // antialiasing effect does not depend on the zoom level. So here\'s yet\n // another thickness version:\n v_thickness = webGLThickness / u_sqrtZoomRatio;\n\n v_normal = unitNormal;\n v_color = a_color;\n v_color.a *= bias;\n}\n';t.exports=r})()},17369:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = radius - length(m);\n\n float t = 0.0;\n if (dist > v_border)\n t = 1.0;\n else if (dist > 0.0)\n t = dist / v_border;\n\n gl_FragColor = mix(transparent, v_color, t);\n}\n";t.exports=r})()},55348:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}\n";t.exports=r})()},49185:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="precision mediump float;\n\nvarying vec4 v_color;\nvarying float v_border;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst float radius = 0.5;\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\n\nvoid main(void) {\n vec4 color;\n\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));\n } else {\n color = v_color;\n }\n\n vec2 m = gl_PointCoord - vec2(0.5, 0.5);\n float dist = length(m);\n\n if (dist < radius - v_border) {\n gl_FragColor = color;\n } else if (dist < radius) {\n gl_FragColor = mix(transparent, color, (radius - dist) / v_border);\n } else {\n gl_FragColor = transparent;\n }\n}\n";t.exports=r})()},28503:t=>{(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>n});const n="attribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute vec4 a_texture;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\nvarying vec4 v_texture;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4(\n (u_matrix * vec3(a_position, 1)).xy,\n 0,\n 1\n );\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n}\n";t.exports=r})()},39024:(t,e)=>{"use strict";function r(t,e,r){var n="VERTEX"===t?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(null===i)throw new Error("loadShader: error while creating the shader");if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error("loadShader: error while compiling the shader:\n".concat(o,"\n").concat(r))}return i}
1Object.defineProperty(e,"__esModule",{value:!0}),e.loadProgram=e.loadFragmentShader=e.loadVertexShader=void 0,e.loadVertexShader=function(t,e){return r("VERTEX",t,e)},e.loadFragmentShader=function(t,e){return r("FRAGMENT",t,e)},e.loadProgram=function(t,e){var r,n,i=t.createProgram();if(null===i)throw new Error("loadProgram: error while creating the program.");for(r=0,n=e.length;r<n;r++)t.attachShader(i,e[r]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw t.deleteProgram(i),new Error("loadProgram: error while linking the program.");return i}},65788:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSettings=e.validateSettings=e.DEFAULT_EDGE_PROGRAM_CLASSES=e.DEFAULT_NODE_PROGRAM_CLASSES=e.DEFAULT_SETTINGS=void 0;var i=r(79779),o=n(r(85429)),a=n(r(99041)),s=n(r(57037)),c=n(r(13460)),u=n(r(84303)),h=n(r(23516));e.DEFAULT_SETTINGS={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeClickEvents:!1,enableEdgeWheelEvents:!1,enableEdgeHoverEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,labelRenderer:o.default,hoverRenderer:a.default,edgeLabelRenderer:s.default,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},e.DEFAULT_NODE_PROGRAM_CLASSES={circle:c.default},e.DEFAULT_EDGE_PROGRAM_CLASSES={arrow:h.default,line:u.default},e.validateSettings=function(t){if("number"!==typeof t.labelDensity||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if("number"===typeof e&&"number"===typeof r&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")},e.resolveSettings=function(t){var r=(0,i.assign)({},e.DEFAULT_SETTINGS,t);return r.nodeProgramClasses=(0,i.assign)({},e.DEFAULT_NODE_PROGRAM_CLASSES,r.nodeProgramClasses),r.edgeProgramClasses=(0,i.assign)({},e.DEFAULT_EDGE_PROGRAM_CLASSES,r.edgeProgramClasses),r}},47210:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},o=this&&this.__values||function(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});
1var s=a(r(77677)),c=a(r(99022)),u=a(r(5979)),h=a(r(81414)),d=r(6160),l=r(79779),f=r(44686),p=r(65788),g=a(r(54911)),v=r(29627),m=r(80218);function y(t,e,r){if(!r.hasOwnProperty("x")||!r.hasOwnProperty("y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),r.label||""===r.label||(r.label=null),void 0!==r.label&&null!==r.label?r.label=""+r.label:r.label=null,r.size||(r.size=2),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("highlighted")||(r.highlighted=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function b(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),r.hasOwnProperty("hidden")||(r.hidden=!1),r.hasOwnProperty("forceLabel")||(r.forceLabel=!1),r.type&&""!==r.type||(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var w=function(t){function e(e,r,n){void 0===n&&(n={});var i=t.call(this)||this;if(i.elements={},i.canvasContexts={},i.webGLContexts={},i.activeListeners={},i.quadtree=new h.default,i.labelGrid=new f.LabelGrid,i.nodeDataCache={},i.edgeDataCache={},i.nodesWithForcedLabels=[],i.edgesWithForcedLabels=[],i.nodeExtent={x:[0,1],y:[0,1]},i.matrix=(0,v.identity)(),i.invMatrix=(0,v.identity)(),i.correctionRatio=1,i.customBBox=null,i.normalizationFunction=(0,l.createNormalizationFunction)({x:[0,1],y:[0,1]}),i.cameraSizeRatio=1,i.width=0,i.height=0,i.pixelRatio=(0,l.getPixelRatio)(),i.displayedLabels=new Set,i.highlightedNodes=new Set,i.hoveredNode=null,i.hoveredEdge=null,i.renderFrame=null,i.renderHighlightedNodesFrame=null,i.needToProcess=!1,i.needToSoftProcess=!1,i.checkEdgesEventsFrame=null,i.nodePrograms={},i.nodeHoverPrograms={},i.edgePrograms={},i.settings=(0,p.resolveSettings)(n),(0,p.validateSettings)(i.settings),(0,l.validateGraph)(e),!(r instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");for(var o in i.graph=e,i.container=r,i.createWebGLContext("edges",{preserveDrawingBuffer:!0}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes"),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse"),i.webGLContexts){var a=i.webGLContexts[o];a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.enable(a.BLEND)}for(var s in i.settings.nodeProgramClasses){var d=i.settings.nodeProgramClasses[s];i.nodePrograms[s]=new d(i.webGLContexts.nodes,i);var m=d;s in i.settings.nodeHoverProgramClasses&&(m=i.settings.nodeHoverProgramClasses[s]),i.nodeHoverPrograms[s]=new m(i.webGLContexts.hoverNodes,i)}for(var s in i.settings.edgeProgramClasses){var y=i.settings.edgeProgramClasses[s];i.edgePrograms[s]=new y(i.webGLContexts.edges,i)}return i.resize(),i.camera=new c.default,i.bindCameraHandlers(),i.mouseCaptor=new u.default(i.elements.mouse,i),i.touchCaptor=new g.default(i.elements.mouse,i),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.process(),i.render(),i}return n(e,t),e.prototype.createCanvas=function(t){var e=(0,l.createElement)("canvas",{position:"absolute"},{class:"sigma-".concat(t)});return this.elements[t]=e,this.container.appendChild(e),e},e.prototype.createCanvasContext=function(t){var e=this.createCanvas(t);return this.canvasContexts[t]=e.getContext("2d",{preserveDrawingBuffer:!1,antialias:!1}),this},e.prototype.createWebGLContext=function(t,e){var r,n=this.createCanvas(t),o=i({preserveDrawingBuffer:!1,antialias:!1},e||{});return(r=n.getContext("webgl2",o))||(r=n.getContext("webgl",o)),r||(r=n.getContext("experimental-webgl",o)),this.webGLContexts[t]=r,this},e.prototype.bindCameraHandlers=function(){var t=this;return this.activeListeners.camera=function(){t._scheduleRefresh()},this.camera.on("updated",this.activeListeners.camera),this},e.prototype.mouseIsOnNode=function(t,e,r){var n=t.x,i=t.y,o=e.x,a=e.y;return n>o-r&&n<o+r&&i>a-r&&i<a+r&&Math.sqrt(Math.pow(n-o,2)+Math.pow(i-a,2))<r},e.prototype.getQuadNodes=function(t){var e=this.viewportToFramedGraph(t);return this.quadtree.point(e.x,1-e.y)},e.prototype.getNodeAtPosition=function(t){for(var e=t.x,r=t.y,n=this.getQuadNodes(t),i=1/0,o=null,a=0,s=n.length;a<s;a++){var c=n[a],u=this.nodeDataCache[c],h=this.framedGraphToViewport(u),d=this.scaleSize(u.size);
1if(!u.hidden&&this.mouseIsOnNode(t,h,d)){var l=Math.sqrt(Math.pow(e-h.x,2)+Math.pow(r-h.y,2));l<i&&(i=l,o=c)}}return o},e.prototype.bindEventHandlers=function(){var t=this;this.activeListeners.handleResize=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(e){var r={event:e,preventSigmaDefault:function(){e.preventSigmaDefault()}},n=t.getNodeAtPosition(e);if(n&&t.hoveredNode!==n&&!t.nodeDataCache[n].hidden)return t.hoveredNode&&t.emit("leaveNode",i(i({},r),{node:t.hoveredNode})),t.hoveredNode=n,t.emit("enterNode",i(i({},r),{node:n})),void t.scheduleHighlightedNodesRender();if(t.hoveredNode){var o=t.nodeDataCache[t.hoveredNode],a=t.framedGraphToViewport(o),s=t.scaleSize(o.size);if(!t.mouseIsOnNode(e,a,s)){var c=t.hoveredNode;return t.hoveredNode=null,t.emit("leaveNode",i(i({},r),{node:c})),void t.scheduleHighlightedNodesRender()}}!0===t.settings.enableEdgeHoverEvents?t.checkEdgeHoverEvents(r):"debounce"===t.settings.enableEdgeHoverEvents&&(t.checkEdgesEventsFrame||(t.checkEdgesEventsFrame=(0,l.requestFrame)((function(){t.checkEdgeHoverEvents(r),t.checkEdgesEventsFrame=null}))))};var e=function(e){return function(r){var n={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},o=r.original.isFakeSigmaMouseEvent?t.getNodeAtPosition(r):t.hoveredNode;if(o)return t.emit("".concat(e,"Node"),i(i({},n),{node:o}));if("wheel"===e?t.settings.enableEdgeWheelEvents:t.settings.enableEdgeClickEvents){var a=t.getEdgeAtPoint(r.x,r.y);if(a)return t.emit("".concat(e,"Edge"),i(i({},n),{edge:a}))}return t.emit("".concat(e,"Stage"),n)}};return this.activeListeners.handleClick=e("click"),this.activeListeners.handleRightClick=e("rightClick"),this.activeListeners.handleDoubleClick=e("doubleClick"),this.activeListeners.handleWheel=e("wheel"),this.activeListeners.handleDown=e("down"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this},e.prototype.bindGraphHandlers=function(){var t=this,e=this.graph;return this.activeListeners.graphUpdate=function(){t.needToProcess=!0,t._scheduleRefresh()},this.activeListeners.softGraphUpdate=function(){t.needToSoftProcess=!0,t._scheduleRefresh()},this.activeListeners.dropNodeGraphUpdate=function(e){delete t.nodeDataCache[e.key],t.hoveredNode===e.key&&(t.hoveredNode=null),t.activeListeners.graphUpdate()},this.activeListeners.dropEdgeGraphUpdate=function(e){delete t.edgeDataCache[e.key],t.hoveredEdge===e.key&&(t.hoveredEdge=null),t.activeListeners.graphUpdate()},this.activeListeners.clearEdgesGraphUpdate=function(){t.edgeDataCache={},t.hoveredEdge=null,t.activeListeners.graphUpdate()},this.activeListeners.clearGraphUpdate=function(){t.nodeDataCache={},t.hoveredNode=null,t.activeListeners.clearEdgesGraphUpdate()},e.on("nodeAdded",this.activeListeners.graphUpdate),e.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.on("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgeAdded",this.activeListeners.graphUpdate),e.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.on("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),e.on("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),e.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.on("cleared",this.activeListeners.clearGraphUpdate),this},e.prototype.unbindGraphHandlers=function(){var t=this.graph;t.removeListener("nodeAdded",this.activeListeners.graphUpdate),t.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),t.removeListener("nodeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachNodeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgeAdded",this.activeListeners.graphUpdate),t.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.removeListener("edgeAttributesUpdated",this.activeListeners.softGraphUpdate),t.removeListener("eachEdgeAttributesUpdated",this.activeListeners.graphUpdate),t.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.removeListener("cleared",this.activeListeners.clearGraphUpdate)},e.prototype.checkEdgeHoverEvents=function(t){var e=this.hoveredNode?null:this.getEdgeAtPoint(t.event.x,t.event.y);
1return e!==this.hoveredEdge&&(this.hoveredEdge&&this.emit("leaveEdge",i(i({},t),{edge:this.hoveredEdge})),e&&this.emit("enterEdge",i(i({},t),{edge:e})),this.hoveredEdge=e),this},e.prototype.getEdgeAtPoint=function(t,e){var r,n,i=this,a=this.edgeDataCache,s=this.nodeDataCache;if(!(0,m.isPixelColored)(this.webGLContexts.edges,t*this.pixelRatio,e*this.pixelRatio))return null;var c=this.viewportToGraph({x:t,y:e}),u=c.x,h=c.y,d=0;if(this.graph.someEdge((function(t,e,r,n,o,c){var u=o.x,h=o.y,l=c.x,f=c.y;if(a[t].hidden||s[r].hidden||s[n].hidden)return!1;if(u!==l||h!==f){var p=Math.sqrt(Math.pow(l-u,2)+Math.pow(f-h,2)),g=i.graphToViewport({x:u,y:h}),v=g.x,m=g.y,y=i.graphToViewport({x:l,y:f}),b=y.x,w=y.y,_=Math.sqrt(Math.pow(b-v,2)+Math.pow(w-m,2));return d=p/_,!0}})),!d)return null;var l=this.graph.filterEdges((function(t,e,r,n,o,c){return!(a[t].hidden||s[r].hidden||s[n].hidden)&&(!!(0,m.doEdgeCollideWithPoint)(u,h,o.x,o.y,c.x,c.y,a[t].size*d/i.cameraSizeRatio)||void 0)}));if(0===l.length)return null;var f=l[l.length-1],p=-1/0;try{for(var g=o(l),v=g.next();!v.done;v=g.next()){var y=v.value,b=this.graph.getEdgeAttribute(y,"zIndex");b>=p&&(f=y,p=b)}}catch(w){r={error:w}}finally{try{v&&!v.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}return f},e.prototype.process=function(t){var e=this;void 0===t&&(t=!1);var r=this.graph,n=this.settings,i=this.getDimensions(),o=[1/0,-1/0],a=[1/0,-1/0];this.quadtree.clear(),this.labelGrid.resizeAndClear(i,n.labelGridCellSize),this.highlightedNodes=new Set,this.nodeExtent=(0,l.graphExtent)(r),this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[];var s=new c.default,u=(0,l.matrixFromCamera)(s.getState(),this.getDimensions(),this.getGraphDimensions(),this.get
1Setting("stagePadding")||0);this.normalizationFunction=(0,l.createNormalizationFunction)(this.customBBox||this.nodeExtent);for(var h={},d=r.nodes(),f=0,p=d.length;f<p;f++){var g=d[f],v=Object.assign({},r.getNodeAttributes(g));n.nodeReducer&&(v=n.nodeReducer(g,v)),h[(w=y(this.settings,g,v)).type]=(h[w.type]||0)+1,this.nodeDataCache[g]=w,this.normalizationFunction.applyTo(w),w.forceLabel&&this.nodesWithForcedLabels.push(g),this.settings.zIndex&&(w.zIndex<o[0]&&(o[0]=w.zIndex),w.zIndex>o[1]&&(o[1]=w.zIndex))}for(var m in this.nodePrograms){if(!this.nodePrograms.hasOwnProperty(m))throw new Error('Sigma: could not find a suitable program for node type "'.concat(m,'"!'));t||this.nodePrograms[m].allocate(h[m]||0),h[m]=0}this.settings.zIndex&&o[0]!==o[1]&&(d=(0,l.zIndexOrdering)(o,(function(t){return e.nodeDataCache[t].zIndex}),d));for(f=0,p=d.length;f<p;f++){g=d[f];var w=this.nodeDataCache[g];this.quadtree.add(g,w.x,1-w.y,w.size/this.width),"string"!==typeof w.label||w.hidden||this.labelGrid.add(g,w.size,this.framedGraphToViewport(w,{matrix:u}));var _=this.nodePrograms[w.type];if(!_)throw new Error('Sigma: could not find a suitable program for node type "'.concat(w.type,'"!'));_.process(w,w.hidden,h[w.type]++),w.highlighted&&!w.hidden&&this.highlightedNodes.add(g)}this.labelGrid.organize();var x={},E=r.edges();for(f=0,p=E.length;f<p;f++){var L=E[f];v=Object.assign({},r.getEdgeAttributes(L));n.edgeReducer&&(v=n.edgeReducer(L,v)),x[(w=b(this.settings,0,v)).type]=(x[w.type]||0)+1,this.edgeDataCache[
1L]=w,w.forceLabel&&!w.hidden&&this.edgesWithForcedLabels.push(L),this.settings.zIndex&&(w.zIndex<a[0]&&(a[0]=w.zIndex),w.zIndex>a[1]&&(a[1]=w.zIndex))}for(var m in this.edgePrograms){if(!this.edgePrograms.hasOwnProperty(m))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(m,'"!'));t||this.edgePrograms[m].allocate(x[m]||0),x[m]=0}this.settings.zIndex&&a[0]!==a[1]&&(E=(0,l.zIndexOrdering)(a,(function(t){return e.edgeDataCache[t].zIndex}),E));for(f=0,p=E.length;f<p;f++){L=E[f],w=this.edgeDataCache[L];var A=r.extremities(L),C=this.nodeDataCache[A[0]],k=this.nodeDataCache[A[1]],S=w.hidden||C.hidden||k.hidden;this.edgePrograms[w.type].process(C,k,w,S,x[w.type]++)}for(var m in this.edgePrograms){var M=this.edgePrograms[m];t||"function"!==typeof M.computeIndices||M.computeIndices()}return this},e.prototype.handleSettingsUpdate=function(){return this.camera.minRatio=this.settings.minCameraRatio,this.camera.maxRatio=this.settings.maxCameraRatio,this.camera.setState(this.camera.validateState(this.camera.getState())),this},e.prototype._refresh=function(){return this.needToProcess?this.process():this.needToSoftProcess&&this.process(!0),this.needToProcess=!1,this.needToSoftProcess=!1,this.render(),this},e.prototype._scheduleRefresh=function(){var t=this;return this.renderFrame||(this.renderFrame=(0,l.requestFrame)((function(){t._refresh(),t.renderFrame=null}))),this},e.prototype.renderLabels=function(){if(!this.settings.renderLabels)return this;var t=this.camera.getState(),e=this.labelGrid.getLabelsToDisplay(t.ratio,this.settings.labelDensity);(0,s.default)(e,this.nodesWithForcedLabels),this.displayedLabels=new Set;for(var r=this.canvasContexts.labels,n=0,o=e.length;n<o;n++){var a=e[n],c=this.nodeDataCache[a];if(!this.displayedLabels.has(a)&&!c.hidden){var u=this.framedGraphToViewport(c),h=u.x,d=u.y,l=this.scaleSize(c.size);!c.forceLabel&&l<this.settings.labelRenderedSizeThreshold||h<-150||h>this.width+150||d<-50||d>this.height+50||(this.displayedLabels.add(a),this.settings.labelRenderer(r,i(i({key:a},c),{size:l,x:h,y:d}),this.settings))}}return this},e.prototype.renderEdgeLabels=function(){if(!this.settings.renderEdgeLabels)return this;var t=this.canvasContexts.edgeLabels;t.clearRect(0,0,this.width,this.height);for(var e=(0,f.edgeLabelsToDisplayFromNodes)({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedLabels,highlightedNodes:this.highlightedNodes}).concat(this.edgesWithForcedLabels),r=new Set,n=0,o=e.length;n<o;n++){var a=e[n],s=this.graph.extremities(a),c=this.nodeDataCache[s[0]],u=this.nodeDataCache[s[1]],h=this.edgeDataCache[a];r.has(a)||(h.hidden||c.hidden||u.hidden||(this.settings.edgeLabelRenderer(t,i(i({key:a},h),{size:this.scaleSize(h.size)}),i(i(i({key:s[0]},c),this.framedGraphToViewport(c)),{size:this.scaleSize(c.size)}),i(i(i({key:s[1]},u),this.framedGraphToViewport(u)),{size:this.scaleSize(u.size)}),this.settings),r.add(a)))}return this},e.prototype.renderHighlightedNodes=function(){var t=this,e=this.canvasContexts.hovers;e.clearRect(0,0,this.width,this.height);var r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach((function(e){e!==t.hoveredNode&&r.push(e)})),r.forEach((function(r){return function(r){var n=t.nodeDataCache[r],o=t.framedGraphToViewport(n),a=o.x,s=o.y,c=t.scaleSize(n.size);t.settings.hoverRenderer(e,i(i({key:r},n),{size:c,x:a,y:s}),t.settings)}(r)}));var n={};for(var o in r.forEach((function(e){var r=t.nodeDataCache[e].type;n[r]=(n[r]||0)+1})),this.nodeHoverPrograms)this.nodeHoverPrograms[o].allocate(n[o]||0),n[o]=0;for(var o in r.forEach((function(e){var r=t.nodeDataCache[e];t.nodeHoverPrograms[r.type].process(r,r.hidden,n[r.type]++)})),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.nodeHoverPrograms){var a=this.nodeHoverPrograms[o];a.bind(),a.bufferData(),a.render({matrix:this.matrix,width:this.width,height:this.height,ratio:this.camera.ratio,correctionRatio:this.correctionRatio/this.camera.ratio,scalingRatio:this.pixelRatio})}},e.prototype.scheduleHighlightedNodesRender=function(){var t=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=(0,l.requestFrame)((function(){t.renderHighlightedNodesFrame=null,t.renderHighlightedNodes(),t.renderEdgeLabels()})))},e.prototype.render=function(){var t=this;
1this.emit("beforeRender");var e=function(){return t.emit("afterRender"),t};if(this.renderFrame&&((0,l.cancelFrame)(this.renderFrame),this.renderFrame=null,this.needToProcess=!1,this.needToSoftProcess=!1),this.resize(),this.clear(),this.updateCachedValues(),!this.graph.order)return e();var r=this.mouseCaptor,n=this.camera.isAnimated()||r.isMoving||r.draggedEvents||r.currentWheelDirection,i=this.camera.getState(),o=this.getDimensions(),a=this.getGraphDimensions(),s=this.getSetting("stagePadding")||0;for(var c in this.matrix=(0,l.matrixFromCamera)(i,o,a,s),this.invMatrix=(0,l.matrixFromCamera)(i,o,a,s,!0),this.correctionRatio=(0,l.getMatrixImpact)(this.matrix,i,o),this.nodePrograms){(u=this.nodePrograms[c]).bind(),u.bufferData(),u.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio})}if(!this.settings.hideEdgesOnMove||!n)for(var c in this.edgePrograms){var u;(u=this.edgePrograms[c]).bind(),u.bufferData(),u.render({matrix:this.matrix,width:this.width,height:this.height,ratio:i.ratio,correctionRatio:this.correctionRatio/i.ratio,scalingRatio:this.pixelRatio})}return this.settings.hideLabelsOnMove&&n||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),e()},e.prototype.updateCachedValues=function(){var t=this.camera.getState().ratio;this.cameraSizeRatio=Math.sqrt(t)},e.prototype.getCamera=function(){return this.camera},e.prototype.getContainer=function(){return this.container},e.prototype.getGraph=function(){return this.graph},e.prototype.setGraph=function(t){t!==this.graph&&(this.unbindGraphHandlers(),this.nodeDataCache={},this.edgeDataCache={},this.displayedLabels.clear(),this.highlightedNodes.clear(),this.hoveredNode=null,this.hoveredEdge=null,this.nodesWithForcedLabels.length=0,this.edgesWithForcedLabels.length=0,null!==this.checkEdgesEventsFrame&&((0,l.cancelFrame)(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=t,this.bindGraphHandlers(),this.process(),this.render())},e.prototype.getMouseCaptor=function(){return this.mouseCaptor},e.prototype.getTouchCaptor=function(){return this.touchCaptor},e.prototype.getDimensions=function(){return{width:this.width,height:this.height}},e.prototype.getGraphDimensions=function(){var t=this.customBBox||this.nodeExtent;return{width:t.x[1]-t.x[0]||1,height:t.y[1]-t.y[0]||1}},e.prototype.getNodeDisplayData=function(t){var e=this.nodeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getEdgeDisplayData=function(t){var e=this.edgeDataCache[t];return e?Object.assign({},e):void 0},e.prototype.getSettings=function(){return i({},this.settings)},e.prototype.getSetting=function(t){return this.settings[t]},e.prototype.setSetting=function(t,e){return this.settings[t]=e,(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.updateSetting=function(t,e){return this.settings[t]=e(this.settings[t]),(0,p.validateSettings)(this.settings),this.handleSettingsUpdate(),this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.resize=function(){var t=this.width,e=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=(0,l.getPixelRatio)(),0===this.width){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.width=1}if(0===this.height){if(!this.settings.allowInvalidContainer)throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");this.height=1}if(t===this.width&&e===this.height)return this;for(var r in this.emit("resize"),this.elements){var n=this.elements[r];n.style.width=this.width+"px",n.style.height=this.height+"px"}for(var r in this.canvasContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),1!==this.pixelRatio&&this.canvasContexts[r].scale(this.pixelRatio,this.pixelRatio);for(var r in this.webGLContexts)this.elements[r].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[r].setAttribute("height",this.height*this.pixelRatio+"px"),this.webGLContexts[r].viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio);return this},e.prototype.clear=function(){return this.webGLContexts.nodes.clear(this.webGLContexts.nodes.COLOR_BUFFER_BIT),this.webGLContexts.edges.clear(this.webGLContexts.edges.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this},e.prototype.refresh=function(){return this.needToProcess=!0,this._refresh(),this},e.prototype.scheduleRefresh=function(){return this.needToProcess=!0,this._scheduleRefresh(),this},e.prototype.getViewportZoomedState=function(t,e){var r=this.camera.getState(),n=r.ratio,i=r.angle,o=r.x,a=r.y,s=e/n,c={x:this.width/2,y:this.height/2},u=this.viewportToFramedGraph(t),h=this.viewportToFramedGraph(c);
1return{angle:i,x:(u.x-h.x)*(1-s)+o,y:(u.y-h.y)*(1-s)+a,ratio:e}},e.prototype.viewRectangle=function(){var t=0*this.width/8,e=0*this.height/8,r=this.viewportToFramedGraph({x:0-t,y:0-e}),n=this.viewportToFramedGraph({x:this.width+t,y:0-e}),i=this.viewportToFramedGraph({x:0,y:this.height+e});return{x1:r.x,y1:r.y,x2:n.x,y2:n.y,height:n.y-i.y}},e.prototype.framedGraphToViewport=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!!e.graphDimensions,n=e.matrix?e.matrix:r?(0,l.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0):this.matrix,i=(0,v.multiplyVec2)(n,t);return{x:(1+i.x)*this.width/2,y:(1-i.y)*this.height/2}},e.prototype.viewportToFramedGraph=function(t,e){void 0===e&&(e={});var r=!!e.cameraState||!!e.viewportDimensions||!e.graphDimensions,n=e.matrix?e.matrix:r?(0,l.matrixFromCamera)(e.cameraState||this.camera.getState(),e.viewportDimensions||this.getDimensions(),e.graphDimensions||this.getGraphDimensions(),e.padding||this.getSetting("stagePadding")||0,!0):this.invMatrix,i=(0,v.multiplyVec2)(n,{x:t.x/this.width*2-1,y:1-t.y/this.height*2});return isNaN(i.x)&&(i.x=0),isNaN(i.y)&&(i.y=0),i},e.prototype.viewportToGraph=function(t,e){return void 0===e&&(e={}),this.normalizationFunction.inverse(this.viewportToFramedGraph(t,e))},e.prototype.graphToViewport=function(t,e){return void 0===e&&(e={}),this.framedGraphToViewport(this.normalizationFunction(t),e)},e.prototype.getBBox=function(){return(0,l.graphExtent)(this.graph)},e.prototype.getCustomBBox=function(){return this.customBBox},e.prototype.setCustomBBox=function(t){return this.customBBox=t,this._scheduleRefresh(),this},e.prototype.kill=function(){this.emit("kill"),this.removeAllListeners(),this.camera.removeListener("updated",this.activeListeners.camera),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.quadtree=new h.default,this.nodeDataCache={},this.edgeDataCache={},this.nodesWithForcedLabels=[],this.edgesWithForcedLabels=[],this.highlightedNodes.clear(),this.renderFrame&&((0,l.cancelFrame)(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&((0,l.cancelFrame)(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var t=this.container;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.scaleSize=function(t){return t/this.cameraSizeRatio},e.prototype.getCanvases=function(){return i({},this.elements)},e}(d.TypedEventEmitter);e.default=w},6160:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var i=function(t){function e(){var e=t.call(this)||this;return e.rawEmitter=e,e}return n(e,t),e}(r(56298).EventEmitter);e.TypedEventEmitter=i},53884:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.animateNodes=e.ANIMATE_DEFAULTS=void 0;var i=r(79779),o=n(r(74765));e.ANIMATE_DEFAULTS={easing:"quadraticInOut",duration:150},e.animateNodes=function(t,r,n,a){var s=Object.assign({},e.ANIMATE_DEFAULTS,n),c="function"===typeof s.easing?s.easing:o.default[s.easing],u=Date.now(),h={};for(var d in r){var l=r[d];for(var f in h[d]={},l)h[d][f]=t.getNodeAttribute(d,f)}var p=null,g=function(){p=null;var e=(Date.now()-u)/s.duration;if(e>=1){for(var n in r){var o=r[n];for(var d in o)t.setNodeAttribute(n,d,o[d])}"function"===typeof a&&a()}else{for(var n in e=c(e),r){o=r[n];var l=h[n];for(var d in o)t.setNodeAttribute(n,d,o[d]*e+l[d]*(1-e))}p=(0,i.requestFrame)(g)}};return g(),function(){p&&(0,i.cancelFrame)(p)}}},84231:(t,e)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.HTML_COLORS=void 0,e.HTML_COLORS={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"}},74765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cubicInOut=e.cubicOut=e.cubicIn=e.quadraticInOut=e.quadraticOut=e.quadraticIn=e.linear=void 0;e.linear=function(t){return t};e.quadraticIn=function(t){return t*t};e.quadraticOut=function(t){return t*(2-t)};e.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};e.cubicIn=function(t){return t*t*t};e.cubicOut=function(t){return--t*t*t+1};e.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};var r={linear:e.linear,quadraticIn:e.quadraticIn,quadraticOut:e.quadraticOut,quadraticInOut:e.quadraticInOut,cubicIn:e.cubicIn,cubicOut:e.cubicOut,cubicInOut:e.cubicInOut};e.default=r},80218:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.doEdgeCollideWithPoint=e.isPixelColored=void 0,e.isPixelColored=function(t,e,r){var n=new Uint8Array(4);return t.readPixels(e,t.drawingBufferHeight-r,1,1,t.RGBA,t.UNSIGNED_BYTE,n),n[3]>0},e.doEdgeCollideWithPoint=function(t,e,r,n,i,o,a){return!(t<r-a&&t<i-a)&&(!(e<n-a&&e<o-a)&&(!(t>r+a&&t>i+a)&&(!(e>n+a&&e>o+a)&&Math.abs((i-r)*(n-e)-(r-t)*(o-n))/Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2))<a/2)))}},79779:function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0}),e.validateGraph=e.canUse32BitsIndices=e.extractPixel=e.getMatrixImpact=e.matrixFromCamera=e.getCorrectionRatio=e.floatColor=e.floatArrayColor=e.parseColor=e.zIndexOrdering=e.createNormalizationFunction=e.graphExtent=e.getPixelRatio=e.createElement=e.cancelFrame=e.requestFrame=e.assignDeep=e.assign=e.isPlainObject=void 0;var o=i(r(78665)),a=r(29627),s=r(84231);function c(t){return"object"===typeof t&&null!==t&&t.constructor===Object}e.isPlainObject=c,e.assign=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t=t||{};for(var n=0,i=e.length;n<i;n++){var o=e[n];o&&Object.assign(t,o)}return t},e.assignDeep=function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e=e||{};for(var i=0,o=r.length;i<o;i++){var a=r[i];if(a)for(var s in a)c(a[s])?e[s]=t(e[s],a[s]):e[s]=a[s]}return e},e.requestFrame="undefined"!==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,0)},e.cancelFrame="undefined"!==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:function(t){return clearTimeout(t)},e.createElement=function(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var i in r)n.setAttribute(i,r[i]);return n},e.getPixelRatio=function(){return"undefined"!==typeof window.devicePixelRatio?window.devicePixelRatio:1},e.graphExtent=function(t){if(!t.order)return{x:[0,1],y:[0,1]};var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode((function(t,o){var a=o.x,s=o.y;a<e&&(e=a),a>r&&(r=a),s<n&&(n=s),s>i&&(i=s)})),{x:[e,r],y:[n,i]}},e.createNormalizationFunction=function(t){var e=n(t.x,2),r=e[0],i=e[1],o=n(t.y,2),a=o[0],s=o[1],c=Math.max(i-r,s-a),u=(i+r)/2,h=(s+a)/2;(0===c||Math.abs(c)===1/0||isNaN(c))&&(c=1),isNaN(u)&&(u=0),isNaN(h)&&(h=0);var d=function(t){return{x:.5+(t.x-u)/c,y:.5+(t.y-h)/c}};return d.applyTo=function(t){t.x=.5+(t.x-u)/c,t.y=.5+(t.y-h)/c},d.inverse=function(t){return{x:u+c*(t.x-.5),y:h+c*(t.y-.5)}},d.ratio=c,d},e.zIndexOrdering=function(t,e,r){return r.sort((function(t,r){var n=e(t)||0,i=e(r)||0;return n<i?-1:n>i?1:0}))};var u=new Int8Array(4),h=new Int32Array(u.buffer,0,1),d=new Float32Array(u.buffer,0,1),l=/^\s*rgba?\s*\(/,f=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function p(t){var e=0,r=0,n=0,i=1;if("#"===t[0])4===t.length?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16)),9===t.length&&(i=parseInt(t.charAt(7)+t.charAt(8),16)/255);else if(l.test(t)){var o=t.match(f);o&&(e=+o[1],r=+o[2],n=+o[3],o[4]&&(i=+o[4]))}return{r:e,g:r,b:n,a:i}}e.parseColor=p;var g={};for(var v in s.HTML_COLORS)g[v]=m(s.HTML_COLORS[v]),g[s.HTML_COLORS[v]]=g[v];function m(t){if("undefined"!==typeof g[t])return g[t];var e=p(t),r=e.r,n=e.g,i=e.b,o=e.a;o=255*o|0,h[0]=4278190079&(o<<24|i<<16|n<<8|r);var a=d[0];return g[t]=a,a}function y(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}e.floatArrayColor=function(t){var e=p(t=s.HTML_COLORS[t]||t),r=e.r,n=e.g,i=e.b,o=e.a;return new Float32Array([r/255,n/255,i/255,o])},e.floatColor=m,e.getCorrectionRatio=y,e.matrixFromCamera=function(t,e,r,n,i){var o=t.angle,s=t.ratio,c=t.x,u=t.y,h=e.width,d=e.height,l=(0,a.identity)(),f=Math.min(h,d)-2*n,p=y(e,r);return i?((0,a.multiply)(l,(0,a.translate)((0,a.identity)(),c,u)),(0,a.multiply)(l,(0,a.scale)((0,a.identity)(),s)),(0,a.multiply)(l,(0,a.rotate)((0,a.identity)(),o)),(0,a.multiply)(l,(0,a.scale)((0,a.identity)(),h/f/2/p,d/f/2/p))):((0,a.multiply)(l,(0,a.scale)((0,a.identity)(),f/h*2*p,f/d*2*p)),(0,a.multiply)(l,(0,a.rotate)((0,a.identity)(),-o)),(0,a.multiply)(l,(0,a.scale)((0,a.identity)(),1/s)),(0,a.multiply)(l,(0,a.translate)((0,a.identity)(),-c,-u))),l},e.getMatrixImpact=function(t,e,r){var n=(0,a.multiplyVec2)(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,o=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/r.width},e.extractPixel=function(t,e,r,n){var i=n||new Uint8Array(4);return t.readPixels(e,r,1,1,t.RGBA,t.UNSIGNED_BYTE,i),i},e.canUse32BitsIndices=function(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint")},e.validateGraph=function(t){if(!(0,o.default)(t))throw new Error("Sigma: invali
1d graph instance.");t.forEachNode((function(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y))throw new Error("Sigma: Coordinates of node ".concat(t," are invalid. A node must have a numeric 'x' and 'y' attribute."))}))}},29627:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiplyVec2=e.multiply=e.translate=e.rotate=e.scale=e.identity=void 0,e.identity=function(){return Float32Array.of(1,0,0,0,1,0,0,0,1)},e.scale=function(t,e,r){return t[0]=e,t[4]="number"===typeof r?r:e,t},e.rotate=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t},e.translate=function(t,e,r){return t[6]=e,t[7]=r,t},e.multiply=function(t,e){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],h=t[8],d=e[0],l=e[1],f=e[2],p=e[3],g=e[4],v=e[5],m=e[6],y=e[7],b=e[8];return t[0]=d*r+l*o+f*c,t[1]=d*n+l*a+f*u,t[2]=d*i+l*s+f*h,t[3]=p*r+g*o+v*c,t[4]=p*n+g*a+v*u,t[5]=p*i+g*s+v*h,t[6]=m*r+y*o+b*c,t[7]=m*n+y*a+b*u,t[8]=m*i+y*s+b*h,t},e.multiplyVec2=function(t,e,r){void 0===r&&(r=1);var n=t[0],i=t[1],o=t[3],a=t[4],s=t[6],c=t[7],u=e.x,h=e.y;return{x:u*n+h*o+s*r,y:u*i+h*a+c*r}}},27496:()=>{}}]); 2//# sourceMappingURL=2042.e754839a.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.