@okhay-p/mivra 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +2 -0
  2. package/THIRD_PARTY_NOTICES.md +250 -0
  3. package/dist/chunk-B47HA6IQ.js +2294 -0
  4. package/dist/chunk-B47HA6IQ.js.map +7 -0
  5. package/dist/{chunk-ODFBAPPH.js → chunk-DYXNHODU.js} +9 -3
  6. package/dist/chunk-DYXNHODU.js.map +7 -0
  7. package/dist/{chunk-KUKQU7EQ.js → chunk-VHOVRHI3.js} +38 -10
  8. package/dist/{chunk-KUKQU7EQ.js.map → chunk-VHOVRHI3.js.map} +2 -2
  9. package/dist/cli.js +807 -44
  10. package/dist/cli.js.map +4 -4
  11. package/dist/{client-5YDLS4KV.js → client-4UG5W5NJ.js} +2 -2
  12. package/dist/exercise-child.js +37 -0
  13. package/dist/exercise-child.js.map +7 -0
  14. package/dist/extract-child.js +1 -1
  15. package/dist/python-child.js +51 -0
  16. package/dist/python-child.js.map +7 -0
  17. package/dist/{start-76LKE3DL.js → start-SX3BCBIN.js} +1215 -237
  18. package/dist/start-SX3BCBIN.js.map +7 -0
  19. package/drizzle/0019_public_doctor_faustus.sql +1 -0
  20. package/drizzle/0020_early_wolfpack.sql +3 -0
  21. package/drizzle/meta/0019_snapshot.json +2288 -0
  22. package/drizzle/meta/0020_snapshot.json +2297 -0
  23. package/drizzle/meta/_journal.json +14 -0
  24. package/package.json +6 -1
  25. package/web/assets/emscripten-module-uFzwHH0Y.wasm +0 -0
  26. package/web/assets/emscripten-module.browser-D72eEgXo.js +1 -0
  27. package/web/assets/exercise-workers/exercise.worker-DzC1lTCg.js +265 -0
  28. package/web/assets/exercise-workers/python-exercise.worker-CtSr-syJ.js +236 -0
  29. package/web/assets/ffi-4V2b7xu3.js +1 -0
  30. package/web/assets/index-D3M-SX0V.js +538 -0
  31. package/web/assets/index-DUFQVtIh.css +1 -0
  32. package/web/assets/module-ES6BEMUI-Chb6aYUZ.js +1 -0
  33. package/web/assets/notes-graph.worker-Dqb5HK34.js +1 -0
  34. package/web/assets/render.worker-D6KYAHiU.js +537 -0
  35. package/web/index.html +8 -3
  36. package/dist/chunk-ODFBAPPH.js.map +0 -7
  37. package/dist/chunk-YACRW47X.js +0 -1203
  38. package/dist/chunk-YACRW47X.js.map +0 -7
  39. package/dist/start-76LKE3DL.js.map +0 -7
  40. package/web/assets/index-C_DsRKCc.css +0 -1
  41. package/web/assets/index-DbKDW1xS.js +0 -413
  42. package/web/assets/notes-graph.worker-DaVQvftJ.js +0 -1
  43. package/web/assets/render.worker-BAfybD27.js +0 -416
  44. /package/dist/{client-5YDLS4KV.js.map → client-4UG5W5NJ.js.map} +0 -0
@@ -1 +0,0 @@
1
- (function(){function e(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return t(this.cover(n,r),n,r,e)}function t(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function n(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)t(this,s[r],c[r],e[r]);return this}function r(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function i(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function a(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function s(e,t,n){var r,i=this._x0,a=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new o(m,i,a,d,f)),n==null?n=1/0:(i=e-n,a=t-n,d=e+n,f=t+n,n*=n);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<i||(u=h.y1)<a)){if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new o(m[3],_,v,l,u),new o(m[2],s,v,_,u),new o(m[1],_,c,l,v),new o(m[0],s,c,_,v)),(g=(t>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),x=y*y+b*b;if(x<n){var S=Math.sqrt(n=x);i=e-S,a=t-S,d=e+S,f=t+S,r=m.data}}}return r}function c(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function l(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function u(){return this._root}function d(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function f(e){var t=[],n,r=this._root,i,a,s,c,l;for(r&&t.push(new o(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,s=n.y0,c=n.x1,l=n.y1)&&r.length){var u=(a+c)/2,d=(s+l)/2;(i=r[3])&&t.push(new o(i,u,d,c,l)),(i=r[2])&&t.push(new o(i,a,d,u,l)),(i=r[1])&&t.push(new o(i,u,s,c,d)),(i=r[0])&&t.push(new o(i,a,s,u,d))}return this}function p(e){var t=[],n=[],r;for(this._root&&t.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,s=r.x0,c=r.y0,l=r.x1,u=r.y1,d=(s+l)/2,f=(c+u)/2;(a=i[0])&&t.push(new o(a,s,c,d,f)),(a=i[1])&&t.push(new o(a,d,c,l,f)),(a=i[2])&&t.push(new o(a,s,f,d,u)),(a=i[3])&&t.push(new o(a,d,f,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function m(e){return e[0]}function h(e){return arguments.length?(this._x=e,this):this._x}function g(e){return e[1]}function _(e){return arguments.length?(this._y=e,this):this._y}function v(e,t,n){var r=new y(t??m,n??g,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function y(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function b(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var x=v.prototype=y.prototype;x.copy=function(){var e=new y(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=b(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=b(r));return e},x.add=e,x.addAll=n,x.cover=r,x.data=i,x.extent=a,x.find=s,x.remove=c,x.removeAll=l,x.root=u,x.size=d,x.visit=f,x.visitAfter=p,x.x=h,x.y=_;function S(e){return function(){return e}}function C(e){return(e()-.5)*1e-6}function ee(e){return e.x+e.vx}function w(e){return e.y+e.vy}function T(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=S(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=v(t,ee,w).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=C(r),_+=h*h),g===0&&(g=C(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}}else return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:S(+t),c(),o):e},o}function te(e){return e.index}function E(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function D(e){var t=te,n=d,r,i=S(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||C(l),m=f.y+f.vy-d.y-d.vy||C(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=E(u,d.source)),typeof d.target!=`object`&&(d.target=E(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:S(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:S(+e),h(),f):i},f}var ne={value:()=>{}};function O(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new k(n)}function k(e){this._=e}function A(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}k.prototype=O.prototype={constructor:k,on:function(e,t){var n=this._,r=A(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=re(n[i],e.name)))return i}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=j(n[i],e.name,t);else if(t==null)for(i in n)n[i]=j(n[i],e.name,null);return this}},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new k(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function re(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function j(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ne,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var M=0,N=0,P=0,F=1e3,I,L,R=0,z=0,B=0,V=typeof performance==`object`&&performance.now?performance:Date,H=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function U(){return z||=(H(W),V.now()+B)}function W(){z=0}function G(){this._call=this._time=this._next=null}G.prototype=K.prototype={constructor:G,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?U():+n)+(t==null?0:+t),!this._next&&L!==this&&(L?L._next=this:I=this,L=this),this._call=e,this._time=n,X()},stop:function(){this._call&&(this._call=null,this._time=1/0,X())}};function K(e,t,n){var r=new G;return r.restart(e,t,n),r}function q(){U(),++M;for(var e=I,t;e;)(t=z-e._time)>=0&&e._call.call(void 0,t),e=e._next;--M}function J(){z=(R=V.now())+B,M=N=0;try{q()}finally{M=0,ie(),z=0}}function Y(){var e=V.now(),t=e-R;t>F&&(B-=t,R=e)}function ie(){for(var e,t=I,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:I=n);L=e,X(r)}function X(e){M||(N&&=clearTimeout(N),e-z>24?(e<1/0&&(N=setTimeout(J,e-V.now()-B)),P&&=clearInterval(P)):(P||=(R=V.now(),setInterval(Y,F)),M=1,H(J)))}let Z=4294967296;function ae(){let e=1;return()=>(e=(1664525*e+1013904223)%Z)/Z}function oe(e){return e.x}function se(e){return e.y}var ce=10,le=Math.PI*(3-Math.sqrt(5));function ue(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=/* @__PURE__ */ new Map,c=K(d),l=O(`tick`,`end`),u=ae();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=ce*Math.sqrt(.5+t),a=t*le;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function Q(){var e,t,n,r,i=S(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=v(e,oe,se).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=C(n),m+=d*d),f===0&&(f=C(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=C(n),m+=d*d),f===0&&(f=C(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:S(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function de(e){var t=S(.1),n,r,i;typeof e!=`function`&&(e=S(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vx+=(i[t]-o.x)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:S(+e),o(),a):t},a.x=function(t){return arguments.length?(e=typeof t==`function`?t:S(+t),o(),a):e},a}function fe(e){var t=S(.1),n,r,i;typeof e!=`function`&&(e=S(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vy+=(i[t]-o.y)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:S(+e),o(),a):t},a.y=function(t){return arguments.length?(e=typeof t==`function`?t:S(+t),o(),a):e},a}function pe(e=1){let t=e;return()=>(t=(t*1664525+1013904223)%4294967296,t/4294967296)}function me(e,t){return e===`note`?5+Math.min(7,Math.sqrt(t)*1.4):e===`ghost`?4:5+Math.min(5,Math.sqrt(t))}function he(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.edges.flatMap(({from:e,to:n})=>{let r=t.get(e),i=t.get(n);return r===void 0||i===void 0||r===i?[]:[[r,i]]}),r=e.nodes.map(()=>0);for(let[e,t]of n)r[e]++,r[t]++;let i=e.nodes.map((e,t)=>({index:t,radius:me(e.kind,r[t])}));if(i.length>0){let e=Math.min(1,60/i.length),t=Math.round(Math.min(220,Math.max(70,4e4/i.length))),r=Math.round(t*.65);ue(i).stop().randomSource(pe()).alphaDecay(1-.001**(1/t)).force(`link`,D(n.map(([e,t])=>({source:e,target:t}))).id(e=>e.index).distance(e=>26+e.source.radius+e.target.radius)).force(`charge`,Q().strength(-90-120*e).theta(.9).distanceMax(250)).force(`x`,de().strength(.06)).force(`y`,fe().strength(.06)).tick(r).force(`collide`,T(e=>e.radius+14).iterations(1)).tick(t-r)}let a=i.length>0?i.map(e=>e.x):[0],o=i.length>0?i.map(e=>e.y):[0],s=Math.min(...a)-40,c=Math.min(...o)-40,l=Math.max(...a)+40-s,u=Math.max(...o)+40+14-c;return{width:Math.max(l,200),height:Math.max(u,160),nodes:i.map((t,n)=>({id:e.nodes[n].id,x:t.x-s,y:t.y-c,radius:t.radius})),edges:n}}let $=self;$.onmessage=e=>{let{id:t,view:n}=e.data;$.postMessage({id:t,layout:he(n)})}})();