PageSourceSearch

https://repression.net/_npm/[email protected]/5cedd0be.js

js repression.net collected 2026-09-26 02:16:16 UTC 4,337 bytes, 7 lines download raw bytes

1/**
2 * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1.
3 * Original file: /npm/[email protected]/src/index.js
4 *
5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 */
7import{path as V}from"../[email protected]/f9e9e0ab.js";var j=Math.abs,m=Math.cos,w=Math.sin,k=Math.PI,S=k/2,D=k*2,E=Math.max,P=1e-12;function q(a,b){return Array.from({length:b-a},(d,p)=>a+p)}function z(a){return function(b,d){return a(b.source.value+b.target.value,d.source.value+d.target.value)}}function B(){return R(!1,!1)}function H(){return R(!1,!0)}function J(){return R(!0,!1)}function R(a,b){var d=0,p=null,A=null,v=null;function i(u){var e=u.length,l=new Array(e),r=q(0,e),g=new Array(e*e),C=new Array(e),c=0,y;u=Float64Array.from({length:e*e},b?(s,n)=>u[n%e][n/e|0]:(s,n)=>u[n/e|0][n%e]);for(let s=0;s<e;++s){let n=0;for(let f=0;f<e;++f)n+=u[s*e+f]+a*u[f*e+s];c+=l[s]=n}c=E(0,D-d*e)/c,y=c?d:D/e;{let s=0;p&&r.sort((n,f)=>p(l[n],l[f]));for(const n of r){const f=s;if(a){const h=q(~e+1,e).filter(t=>t<0?u[~t*e+n]:u[n*e+t]);A&&h.sort((t,o)=>A(t<0?-u[~t*e+n]:u[n*e+t],o<0?-u[~o*e+n]:u[n*e+o]));for(const t of h)if(t<0){const o=g[~t*e+n]||(g[~t*e+n]={source:null,target:null});o.target={index:n,startAngle:s,endAngle:s+=u[~t*e+n]*c,value:u[~t*e+n]}}else{const o=g[n*e+t]||(g[n*e+t]={source:null,target:null});o.source={index:n,startAngle:s,endAngle:s+=u[n*e+t]*c,value:u[n*e+t]}}C[n]={index:n,startAngle:f,endAngle:s,value:l[n]}}else{const h=q(0,e).filter(t=>u[n*e+t]||u[t*e+n]);A&&h.sort((t,o)=>A(u[n*e+t],u[n*e+o]));for(const t of h){let o;if(n<t?(o=g[n*e+t]||(g[n*e+t]={source:null,target:null}),o.source={index:n,startAngle:s,endAngle:s+=u[n*e+t]*c,value:u[n*e+t]}):(o=g[t*e+n]||(g[t*e+n]={source:null,target:null}),o.target={index:n,startAngle:s,endAngle:s+=u[n*e+t]*c,value:u[n*e+t]},n===t&&(o.source=o.target)),o.source&&o.target&&o.source.value<o.target.value){const I=o.source;o.source=o.target,o.target=I}}C[n]={index:n,startAngle:f,endAngle:s,value:l[n]}}s+=y}}return g=Object.values(g),g.groups=C,v?g.sort(v):g}return i.padAngle=function(u){return arguments.length?(d=E(0,u),i):d},i.sortGroups=function(u){return arguments.length?(p=u,i):p},i.sortSubgroups=function(u){return arguments.length?(A=u,i):A},i.sortChords=function(u){return arguments.length?(u==null?v=null:(v=z(u))._=u,i):v&&v._},i}var K=Array.prototype.slice;function T(a){return function(){return a}}function L(a){return a.source}function N(a){return a.target}function F(a){return a.radius}function Q(a){return a.startAngle}function U(a){return a.endAngle}function W(){return 0}function X(){return 10}function O(a){var b=L,d=N,p=F,A=F,v=Q,i=U,u=W,e=null;function l(){var r,g=b.apply(this,arguments),C=d.apply(this,arguments),c=u.apply(this,arguments)/2,y=K.call(arguments),s=+p.apply(this,(y[0]=g,y)),n=v.apply(this,y)-S,f=i.apply(this,y)-S,h=+A.apply(this,(y[0]=C,y)),t=v.apply(this,y)-S,o=i.apply(this,y)-S;if(e||(e=r=V()),c>P&&(j(f-n)>c*2+P?f>n?(n+=c,f-=c):(n-=c,f+=c):n=f=(n+f)/2,j(o-t)>c*2+P?o>t?(t+=c,o-=c):(t-=c,o+=c):t=o=(t+o)/2),e.moveTo(s*m(n),s*w(n)),e.arc(0,0,s,n,f),n!==t||f!==o)if(a){var I=+a.apply(this,arguments),M=h-I,G=(t+o)/2;e.quadraticCurveTo(0,0,M*m(t),M*w(t)),e.lineTo(h*m(G),h*w(G)),e.lineTo(M*m(o),M*w(o))}else e.quadraticCurveTo(0,0,h*m(t),h*w(t)),e.arc(0,0,h,t,o);if(e.quadraticCurveTo(0,0,s*m(n),s*w(n)),e.closePath(),r)return e=null,r+""||null}return a&&(l.headRadius=function(r){return arguments.length?(a=typeof r=="function"?r:T(+r),l):a}),l.radius=function(r){return arguments.length?(p=A=typeof r=="function"?r:T(+r),l):p},l.sourceRadius=function(r){return arguments.length?(p=typeof r=="function"?r:T(+r),l):p},l.targetRadius=function(r){return arguments.length?(A=typeof r=="function"?r:T(+r),l):A},l.startAngle=function(r){return arguments.length?(v=typeof r=="function"?r:T(+r),l):v},l.endAngle=function(r){return arguments.length?(i=typeof r=="function"?r:T(+r),l):i},l.padAngle=function(r){return arguments.length?(u=typeof r=="function"?r:T(+r),l):u},l.source=function(r){return arguments.length?(b=r,l):b},l.target=function(r){return arguments.length?(d=r,l):d},l.context=function(r){return arguments.length?(e=r??null,l):e},l}function Y(){return O()}function Z(){return O(X)}export{B as chord,J as chordDirected,H as chordTranspose,Y as ribbon,Z as ribbonArrow};

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.