├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── eslint.config.js ├── example ├── IEEEVIS2015_edges.csv ├── IEEEVIS2015_groups.csv ├── IEEEVIS2015_nodes.csv ├── forceInABox.gif ├── index.html ├── index_IEEE.html └── miserables.json ├── forceInABoxv3.js ├── package-lock.json ├── package.json ├── rollup.config.js └── src └── forceInABox.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /example 2 | forceInABoxv4.js 3 | forceInABoxv3.js 4 | .eslintrc.js -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 John Alexis Guerra Gómez 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # forceInABox.js 2 | 3 | 4 | Force in a Box animation demo 5 | 6 | 7 | [**Test forceInABox on this observableNotebook**](https://observablehq.com/@john-guerra/force-in-a-box) 8 | 9 | A d3.js v6 force that implements the [Group-in-a-box](http://hcil2.cs.umd.edu/trs/2011-24/2011-24.pdf) layout algorithm to distribute nodes in a network according to their clusters. The algorithm uses a treemap or a force diagram to compute focis that are later used to distribute each cluster into it's own box. 10 | 11 | To use it just add the forceInABox as another force in your simulation and make sure your other forces don't overpower it. 12 | 13 | a note on input data format: **forceInABox** expects a graph object, with a `links` array that contains `link` objects with `source` and `target` properties. the values of the `source` and `target` properties should refer to the index value of the source or target node. [example of this node-index convention](https://gist.github.com/john-guerra/830e536314436e2c6396484bcc1e3b3d#file-miserables-json) 14 | 15 | ```html 16 | 17 | 21 | ``` 22 | 23 | ```js 24 | // Create the simulation with a small forceX and Y towards the center 25 | let simulation = d3 26 | .forceSimulation() 27 | .force("charge", d3.forceManyBody()) 28 | .force("x", d3.forceX(width / 2).strength(0.05)) 29 | .force("y", d3.forceY(height / 2).strength(0.05)); 30 | 31 | // Instantiate the forceInABox force 32 | let groupingForce = forceInABox() 33 | .strength(0.1) // Strength to foci 34 | .template(template) // Either treemap or force 35 | .groupBy("group") // Node attribute to group 36 | .links(graph.links) // The graph links. Must be called after setting the grouping attribute 37 | .size([width, height]); // Size of the chart 38 | 39 | // Add your forceInABox to the simulation 40 | simulation.nodes(graph.nodes).force("group", groupingForce).force( 41 | "link", 42 | d3.forceLink(graph.links).distance(50).strength(groupingForce.getLinkStrength) // default link force will try to join nodes in the same group stronger than if they are in different groups 43 | ); 44 | ``` 45 | 46 | Here is a [forceInABox demo](https://observablehq.com/@john-guerra/force-in-a-box) 47 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import eslintConfigPrettier from "eslint-config-prettier"; 4 | 5 | export default [ 6 | { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, 7 | pluginJs.configs.recommended, 8 | eslintConfigPrettier, 9 | ]; -------------------------------------------------------------------------------- /example/IEEEVIS2015_edges.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john-guerra/forceInABox/2a0ed5752a3222f78faf468910f60c31b35cd32a/example/IEEEVIS2015_edges.csv -------------------------------------------------------------------------------- /example/IEEEVIS2015_groups.csv: -------------------------------------------------------------------------------- 1 | Group,Vertex,Vertex ID 2 | G1,sgeoviz,164 3 | G1,dollopcoffeeco,539 4 | G1,gicentre,504 5 | G1,monashuni,538 6 | G1,duto_guerra,398 7 | G1,hexenkoenig,158 8 | G1,nsousanis,532 9 | G1,mattbrehmer,270 10 | G1,cybunk,124 11 | G1,chrisnf,297 12 | G1,adilyalcin,147 13 | G1,flickr,510 14 | G1,cplaisant,509 15 | G1,jsndyks,84 16 | G1,jwolondon,264 17 | G1,city_cs,283 18 | G1,miriahmeyer,60 19 | G1,datastories,501 20 | G1,jofu_,370 21 | G1,uta_ente,161 22 | G1,nelmqvist,256 23 | G1,mikelupu,495 24 | G1,misscarriemah,305 25 | G1,kmlawson,491 26 | G1,uofcgibson,160 27 | G1,hcil_umd,363 28 | G1,intuinno,480 29 | G1,rlndscheepens,408 30 | G1,infoviskid,478 31 | G1,zirtech,477 32 | G1,dr_pi,159 33 | G1,veloclubdevis,474 34 | G1,colorbrewer,73 35 | G1,alangeovista,83 36 | G1,jdfaviz,188 37 | G1,myj,469 38 | G1,romsson,351 39 | G1,dufournaud,467 40 | G1,alexander_lex,29 41 | G1,henddkn,463 42 | G1,marc_streit,462 43 | G1,dr_floh,187 44 | G1,miguelnacenta,416 45 | G1,antmandan,77 46 | G1,ieeevis,74 47 | G1,chadstolper,423 48 | G1,markjstock,422 49 | G1,gruchallakenny,421 50 | G1,frajabiyazdi,420 51 | G1,sknudsendk,304 52 | G1,al_ice_t,130 53 | G1,v_isits,419 54 | G1,jazzshowcase,418 55 | G1,cagatay_turkay,417 56 | G1,udemsar,415 57 | G1,juliebee80,409 58 | G1,pbesh,62 59 | G1,charles_perin,267 60 | G1,hosseinkhani_m,266 61 | G1,myjyby,350 62 | G1,jawalnut,38 63 | G1,dowl4,400 64 | G1,bederson,255 65 | G1,austlit,395 66 | G1,wef,385 67 | G1,atlas_facts,383 68 | G1,harvardcid,384 69 | G1,manaswisaha,371 70 | G1,aqhat,369 71 | G1,umiacs,362 72 | G1,mjmcguffin,361 73 | G1,pkerpedjiev,355 74 | G1,dadideo,349 75 | G1,chrispudney,347 76 | G1,radio26k,331 77 | G1,standrewscs,307 78 | G1,aquigley,306 79 | G1,sachi_research,302 80 | G1,a,303 81 | G1,michaelmauderer,296 82 | G1,charliew_city,281 83 | G1,city,282 84 | G1,noreenkamal,113 85 | G1,pikkurii,265 86 | G1,hcilpanda,254 87 | G1,davemor,244 88 | G1,nodesign,225 89 | G1,carloscg86,220 90 | G1,omniahnagoor,215 91 | G1,tmrhyne,192 92 | G1,joininria,186 93 | G1,viche,183 94 | G1,myliminality,174 95 | G1,chillradio365,173 96 | G1,ipodling,171 97 | G1,sanegaytan,165 98 | G1,dataknut,163 99 | G1,jbrosz,156 100 | G1,sizeof,129 101 | G1,neekop,123 102 | G1,no,114 103 | G1,ritchiesking,100 104 | G1,ijturton,91 105 | G1,rpanczak,86 106 | G1,thomasg77,85 107 | G1,cartocalypse,82 108 | G1,sujinjang11,76 109 | G1,jtyll,72 110 | G1,snowflakesinmay,61 111 | G1,andriygazin,37 112 | G2,kimay,26 113 | G2,aedeegee,537 114 | G2,mikeherman,536 115 | G2,benjbach,376 116 | G2,sharoz,33 117 | G2,thefercook,531 118 | G2,christiansenjen,9 119 | G2,domesticstream,522 120 | G2,fyloso,521 121 | G2,ericcalexander,218 122 | G2,thomas__christy,514 123 | G2,jcrbrts,182 124 | G2,stonybrooku,513 125 | G2,heikeotten_,511 126 | G2,maximolly,329 127 | G2,bilalshussain,505 128 | G2,lydiacbyrne,367 129 | G2,yelperalp,391 130 | G2,samquinan,494 131 | G2,dalbersszafir,107 132 | G2,paulpunkt,484 133 | G2,ritsos_p,458 134 | G2,kildall,483 135 | G2,birdbassador,482 136 | G2,michelle_borkin,190 137 | G2,karthik_badam,481 138 | G2,houdescott,479 139 | G2,trebor,425 140 | G2,bilalalsallakh,402 141 | G2,eytanadar,344 142 | G2,chrisheadleand,460 143 | G2,martihearst,322 144 | G2,uocscieng,137 145 | G2,seecs,459 146 | G2,benbendc,434 147 | G2,gleichermike,219 148 | G2,eagereyes_feed,435 149 | G2,alark,310 150 | G2,karlhigley,437 151 | G2,stiivi,427 152 | G2,nils_gehlenborg,70 153 | G2,s_t_e_v_e_jones,330 154 | G2,fturner,424 155 | G2,smfrogers,414 156 | G2,visualized,410 157 | G2,vsetlur,380 158 | G2,stevefranconeri,200 159 | G2,scott_bot,407 160 | G2,rhodiuslin,406 161 | G2,davidgotz,405 162 | G2,luanamicallef,404 163 | G2,glk1,403 164 | G2,mencarna,141 165 | G2,paul_klemm,401 166 | G2,bmabey,399 167 | G2,karenbastienok,397 168 | G2,geovista_psu,393 169 | G2,a_c_robinson,392 170 | G2,evanmpeck,204 171 | G2,alvittao,203 172 | G2,drtjs_hat,388 173 | G2,namwkim85,379 174 | G2,schmidt_fu,368 175 | G2,vbyrdphd,168 176 | G2,pakstarr,366 177 | G2,heatherfro,365 178 | G2,emeramchugh,364 179 | G2,mentatseb,358 180 | G2,jakubdostal,356 181 | G2,jacomyma,343 182 | G2,aschrock,328 183 | G2,niais,324 184 | G2,stefanvdwalt,325 185 | G2,turkernational,321 186 | G2,sjengle,229 187 | G2,erdem303,216 188 | G2,uwdighum,217 189 | G2,jordancrouser,208 190 | G2,lulupinney,206 191 | G2,jodie_jenkinson,205 192 | G2,elitb,202 193 | G2,fabianodmiranda,197 194 | G2,physicalise,172 195 | G2,creativedynamix,169 196 | G2,paulsuvam,167 197 | G2,nucholab,166 198 | G2,parkvillegeek,162 199 | G2,danielsolis,155 200 | G2,khornbaek,154 201 | G2,wairathimo,144 202 | G2,melanietory,142 203 | G2,shadowcameron,138 204 | G2,colnels,131 205 | G2,pedadigigogy,122 206 | G2,cuboulderinfosc,106 207 | G2,danielscarvalho,103 208 | G2,ukdscensus,102 209 | G2,miishke,47 210 | G2,engagetheo,34 211 | G2,colditzjb,32 212 | G2,blaklaybul,8 213 | G3,kristw,56 214 | G3,crispamares,502 215 | G3,arnicas,247 216 | G3,dom,211 217 | G3,stefvandenelzen,28 218 | G3,kanitw,214 219 | G3,uwdata,17 220 | G3,jeffrey_heer,19 221 | G3,mjskay,18 222 | G3,domoritz,213 223 | G3,arvindsatya1,224 224 | G3,beck_fabian,453 225 | G3,vis_visus,452 226 | G3,nawadanp,431 227 | G3,jandot,105 228 | G3,jockmackinlay,428 229 | G3,basole,127 230 | G3,biovis_net,426 231 | G3,adamperer,53 232 | G3,hwpark,396 233 | G3,laneharrison,390 234 | G3,tueindhoven,374 235 | G3,edwindjonge,357 236 | G3,ilyabo,354 237 | G3,jmoconnor415,339 238 | G3,chrisdiehl,338 239 | G3,brittanykondo,335 240 | G3,shanlalit,334 241 | G3,valerieishida,333 242 | G3,amcrisan,43 243 | G3,tableau,319 244 | G3,stat545,318 245 | G3,marknca,316 246 | G3,istc_bigdata,278 247 | G3,thugmetricsnews,277 248 | G3,jeffsutch,268 249 | G3,ihansel,261 250 | G3,migueljvaz,251 251 | G3,heshamodoo,249 252 | G3,noahi,248 253 | G3,luiscarli,246 254 | G3,shumochu,242 255 | G3,grsprings,239 256 | G3,sbelak,237 257 | G3,tkb,233 258 | G3,devnambi,232 259 | G3,joe_hellerstein,90 260 | G3,serravis,223 261 | G3,dl_ally,222 262 | G3,paulzh,212 263 | G3,realpython,210 264 | G3,scottberinato,143 265 | G3,pevans_c,126 266 | G3,4eslclub,125 267 | G3,gepasi,109 268 | G3,aniversarioperu,104 269 | G3,synerscope,97 270 | G3,cmewillems,96 271 | G3,fisherdanyel,89 272 | G3,vlandham,57 273 | G3,hyperboreans,55 274 | G3,thenilaline,52 275 | G3,malpaso,42 276 | G3,mwestenberg,27 277 | G3,gregmci,16 278 | G4,len_hil,512 279 | G4,currankelleher,227 280 | G4,jschwabish,191 281 | G4,thugmetrics,487 282 | G4,continuumio,134 283 | G4,m_a_r_t_i_n,470 284 | G4,sciam,457 285 | G4,tacitia,450 286 | G4,ryodejaneiro,429 287 | G4,romanmars,430 288 | G4,scheidegger,286 289 | G4,duke_vis,93 290 | G4,megandweck,360 291 | G4,nigelhawtin,359 292 | G4,balsacanto,353 293 | G4,justechomike,352 294 | G4,cartografics,327 295 | G4,infobeautyaward,326 296 | G4,hypercubed,320 297 | G4,ericmjl,317 298 | G4,bloomberg,299 299 | G4,dashingd3js,315 300 | G4,tanykim,11 301 | G4,antarcticdesign,312 302 | G4,ieeevgtc,313 303 | G4,geoff_stone002,311 304 | G4,patterns_pixels,309 305 | G4,cerebrows,308 306 | G4,dshelley0,301 307 | G4,k4l4m4r1s,300 308 | G4,quantumpackets,298 309 | G4,dataanddataviz,295 310 | G4,7tev,288 311 | G4,graphomate,287 312 | G4,camoesjo,285 313 | G4,evergreendata,284 314 | G4,seecmb,280 315 | G4,dukeu,279 316 | G4,yelkhatib,271 317 | G4,littleark,269 318 | G4,hmollusc1,263 319 | G4,mikeblanko,262 320 | G4,thecristen,260 321 | G4,alvarograves,259 322 | G4,infovizard,257 323 | G4,michaelangeles,252 324 | G4,mbsmrtic,241 325 | G4,mpbgraph,235 326 | G4,nettiefouche,230 327 | G4,landa23,228 328 | G4,micahstubbs,226 329 | G4,cd_fuller,199 330 | G4,rodneyhoinkes,198 331 | G4,dmarron,196 332 | G4,jdrewes_,195 333 | G4,emmybetz,189 334 | G4,bokehplots,133 335 | G4,p_lindsay,132 336 | G4,gislibrarian,92 337 | G4,hanamanahansori,10 338 | G5,almereyda,535 339 | G5,uclab_potsdam,49 340 | G5,grahamjenson,534 341 | G5,nrchtct,21 342 | G5,zeto,439 343 | G5,laurakurgan,529 344 | G5,dominikus,527 345 | G5,werkstadt,526 346 | G5,wolfgangaigner,525 347 | G5,julians,20 348 | G5,codigt_zak,517 349 | G5,digiversity,507 350 | G5,conglei_shi,506 351 | G5,jaumetet,499 352 | G5,lesterlasrado,500 353 | G5,moritz_stefaner,274 354 | G5,enrico,273 355 | G5,candeira,498 356 | G5,denisparra,497 357 | G5,immersivecola,149 358 | G5,egleek,496 359 | G5,visualisingdata,332 360 | G5,nikkevmarshall,486 361 | G5,beeowbabe,476 362 | G5,ioanaferariu,475 363 | G5,sm_typ,473 364 | G5,berlinerlufti,472 365 | G5,pseudomanifold,464 366 | G5,tarakc02,455 367 | G5,neizod,451 368 | G5,openhypervideo,449 369 | G5,heavysixer,448 370 | G5,mwijnberger,447 371 | G5,graphichunters,446 372 | G5,gsa_dc,445 373 | G5,lambrechts,444 374 | G5,liamoconghaile,441 375 | G5,c_z,440 376 | G5,carnby,438 377 | G5,borism,25 378 | G5,medvisorg,179 379 | G5,ahseeder,387 380 | G5,jaukia,375 381 | G5,eltonteb,345 382 | G5,socialbeit,336 383 | G5,jeffrey_hee,337 384 | G5,juliansm,59 385 | G5,florianstoffel,88 386 | G5,jcukier,272 387 | G5,dominikjaeckle,201 388 | G5,notrimskiy,178 389 | G5,vpascual,145 390 | G5,rpgove,108 391 | G5,alex_j_bowers,94 392 | G5,f2cx,87 393 | G5,accidental_phd,58 394 | G5,taniki,50 395 | G5,liberalogica,48 396 | G5,giorgiocaviglia,24 397 | G6,acolt,533 398 | G6,filwd,36 399 | G6,eagereyes,15 400 | G6,drda5id,524 401 | G6,bessiehyde,433 402 | G6,bizarre07,413 403 | G6,yusef,412 404 | G6,iaaaan,411 405 | G6,ahmadeltannir,389 406 | G6,rsimmon,381 407 | G6,janwillemtulp,151 408 | G6,royhp,348 409 | G6,philninh,340 410 | G6,dr_tj,314 411 | G6,anthonyselino,148 412 | G6,danielnarey,258 413 | G6,fbahoken,253 414 | G6,van_instituteva,250 415 | G6,briantrice,245 416 | G6,pallureshu,243 417 | G6,kristinhenry,240 418 | G6,naveenma,238 419 | G6,tableautiff,236 420 | G6,esjewett,234 421 | G6,logodaedalus,231 422 | G6,rpyzh,209 423 | G6,mperezmontoro,207 424 | G6,_ambodi,194 425 | G6,iam_joshd,193 426 | G6,drfeldt,177 427 | G6,yo_thanland,175 428 | G6,dianamaps,170 429 | G6,danpaulsmith,150 430 | G6,magneticnorth,146 431 | G6,antaryaami,139 432 | G6,sahelanth,135 433 | G6,yprie,128 434 | G6,stewiekee,120 435 | G6,glennashaw,116 436 | G6,macarioxls,115 437 | G6,dr_eagan,112 438 | G6,paulagoodale,111 439 | G6,etarameshloo,110 440 | G6,benjgorman,101 441 | G6,iamgeorgekamau,80 442 | G6,mirkolorenz,79 443 | G6,jradavenport,78 444 | G6,fierst_lab,75 445 | G6,posas13,71 446 | G6,evenweirdermove,54 447 | G6,nadiehbremer,51 448 | G6,fitzgerald_matt,44 449 | G6,_cingraham,41 450 | G6,wdan_y,35 451 | G6,stevenbeeckman,31 452 | G6,kirel,23 453 | G6,danbras,14 454 | G7,higginsdes,530 455 | G7,tamaramunzner,13 456 | G7,jocelynng,528 457 | G7,katepatt,520 458 | G7,foreveremain,519 459 | G7,lsiwinski,442 460 | G7,misslake,66 461 | G7,yaxu,294 462 | G7,dvrnd,275 463 | G7,palmerhouse,394 464 | G7,bndktgrs,373 465 | G7,pmcruz,152 466 | G7,dietoff,372 467 | G7,luca_bard,346 468 | G7,seanboon,323 469 | G7,_sohalt,293 470 | G7,algebraicvis,40 471 | G7,amzoss,157 472 | G7,vis_hgc_jp,180 473 | G7,nu_camd,153 474 | G7,leejoeyk,4 475 | G7,odihq,65 476 | G7,thespacearts,64 477 | G7,natashacaruana,63 478 | G7,changgong_delft,39 479 | G7,riannone,12 480 | G7,mozillascience,3 481 | G8,bittle_simon,523 482 | G8,jscarto,378 483 | G8,smileliaohua,518 484 | G8,oolaiva,516 485 | G8,torstenwiebke,508 486 | G8,iludenus,503 487 | G8,monfera,485 488 | G8,segalop,471 489 | G8,statsepi,468 490 | G8,kncukier,466 491 | G8,johncmunoz,465 492 | G8,ralph_hansen,461 493 | G8,debidatta,456 494 | G8,ccvsonewbrain,454 495 | G8,cezucho,443 496 | G8,cursa,436 497 | G8,willschiller,432 498 | G8,collectivei,386 499 | G8,geschichtenpost,382 500 | G8,john_m_nelson,377 501 | G9,_plegg,6 502 | G9,researchdaniel,342 503 | G9,alexanderbock,341 504 | G9,uwe_csct,181 505 | G9,ncsaatillinois,7 506 | G9,lloydsavickas,5 507 | G10,harishd10,290 508 | G10,nivanferreira,292 509 | G10,mqolf,291 510 | G10,csilvanyc,289 511 | G10,jpocom,185 512 | G10,ncramer,184 513 | G11,apishift,493 514 | G11,datavizai,489 515 | G11,myjotown,492 516 | G11,newsfuns,490 517 | G11,mesurar,488 518 | G12,tomschenkjr,67 519 | G12,chicagodatavis,69 520 | G12,saic_news,68 521 | G13,wjrl59,99 522 | G13,briscoejames,98 523 | G14,galahesson,45 524 | G14,adonmoskal,46 525 | G15,mrola,515 526 | G16,tillnm,276 527 | G17,btcdiscounts,221 528 | G18,deepesulapkata4,176 529 | G19,wwhaveunlearned,140 530 | G20,wickedsweetcake,136 531 | G21,zoyathinks,121 532 | G22,datajourn,119 533 | G23,phenoblocks,118 534 | G24,ash_ashleyme,117 535 | G25,winnydejong,95 536 | G26,cleargrip,81 537 | G27,vedovitoday,30 538 | G28,jufa,22 -------------------------------------------------------------------------------- /example/IEEEVIS2015_nodes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john-guerra/forceInABox/2a0ed5752a3222f78faf468910f60c31b35cd32a/example/IEEEVIS2015_nodes.csv -------------------------------------------------------------------------------- /example/forceInABox.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john-guerra/forceInABox/2a0ed5752a3222f78faf468910f60c31b35cd32a/example/forceInABox.gif -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ForceInABox.js example 9 | 25 | 26 | 27 | 28 | 29 | 33 |
34 | 35 | 39 | 40 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /example/index_IEEE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | 24 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /example/miserables.json: -------------------------------------------------------------------------------- 1 | { 2 | "nodes":[ 3 | {"name":"Myriel","group":1}, 4 | {"name":"Napoleon","group":1}, 5 | {"name":"Mlle.Baptistine","group":1}, 6 | {"name":"Mme.Magloire","group":1}, 7 | {"name":"CountessdeLo","group":1}, 8 | {"name":"Geborand","group":1}, 9 | {"name":"Champtercier","group":1}, 10 | {"name":"Cravatte","group":1}, 11 | {"name":"Count","group":1}, 12 | {"name":"OldMan","group":1}, 13 | {"name":"Labarre","group":2}, 14 | {"name":"Valjean","group":2}, 15 | {"name":"Marguerite","group":3}, 16 | {"name":"Mme.deR","group":2}, 17 | {"name":"Isabeau","group":2}, 18 | {"name":"Gervais","group":2}, 19 | {"name":"Tholomyes","group":3}, 20 | {"name":"Listolier","group":3}, 21 | {"name":"Fameuil","group":3}, 22 | {"name":"Blacheville","group":3}, 23 | {"name":"Favourite","group":3}, 24 | {"name":"Dahlia","group":3}, 25 | {"name":"Zephine","group":3}, 26 | {"name":"Fantine","group":3}, 27 | {"name":"Mme.Thenardier","group":4}, 28 | {"name":"Thenardier","group":4}, 29 | {"name":"Cosette","group":5}, 30 | {"name":"Javert","group":4}, 31 | {"name":"Fauchelevent","group":0}, 32 | {"name":"Bamatabois","group":2}, 33 | {"name":"Perpetue","group":3}, 34 | {"name":"Simplice","group":2}, 35 | {"name":"Scaufflaire","group":2}, 36 | {"name":"Woman1","group":2}, 37 | {"name":"Judge","group":2}, 38 | {"name":"Champmathieu","group":2}, 39 | {"name":"Brevet","group":2}, 40 | {"name":"Chenildieu","group":2}, 41 | {"name":"Cochepaille","group":2}, 42 | {"name":"Pontmercy","group":4}, 43 | {"name":"Boulatruelle","group":6}, 44 | {"name":"Eponine","group":4}, 45 | {"name":"Anzelma","group":4}, 46 | {"name":"Woman2","group":5}, 47 | {"name":"MotherInnocent","group":0}, 48 | {"name":"Gribier","group":0}, 49 | {"name":"Jondrette","group":7}, 50 | {"name":"Mme.Burgon","group":7}, 51 | {"name":"Gavroche","group":8}, 52 | {"name":"Gillenormand","group":5}, 53 | {"name":"Magnon","group":5}, 54 | {"name":"Mlle.Gillenormand","group":5}, 55 | {"name":"Mme.Pontmercy","group":5}, 56 | {"name":"Mlle.Vaubois","group":5}, 57 | {"name":"Lt.Gillenormand","group":5}, 58 | {"name":"Marius","group":8}, 59 | {"name":"BaronessT","group":5}, 60 | {"name":"Mabeuf","group":8}, 61 | {"name":"Enjolras","group":8}, 62 | {"name":"Combeferre","group":8}, 63 | {"name":"Prouvaire","group":8}, 64 | {"name":"Feuilly","group":8}, 65 | {"name":"Courfeyrac","group":8}, 66 | {"name":"Bahorel","group":8}, 67 | {"name":"Bossuet","group":8}, 68 | {"name":"Joly","group":8}, 69 | {"name":"Grantaire","group":8}, 70 | {"name":"MotherPlutarch","group":9}, 71 | {"name":"Gueulemer","group":4}, 72 | {"name":"Babet","group":4}, 73 | {"name":"Claquesous","group":4}, 74 | {"name":"Montparnasse","group":4}, 75 | {"name":"Toussaint","group":5}, 76 | {"name":"Child1","group":10}, 77 | {"name":"Child2","group":10}, 78 | {"name":"Brujon","group":4}, 79 | {"name":"Mme.Hucheloup","group":8} 80 | ], 81 | "links":[ 82 | {"source":1,"target":0,"value":1}, 83 | {"source":2,"target":0,"value":8}, 84 | {"source":3,"target":0,"value":10}, 85 | {"source":3,"target":2,"value":6}, 86 | {"source":4,"target":0,"value":1}, 87 | {"source":5,"target":0,"value":1}, 88 | {"source":6,"target":0,"value":1}, 89 | {"source":7,"target":0,"value":1}, 90 | {"source":8,"target":0,"value":2}, 91 | {"source":9,"target":0,"value":1}, 92 | {"source":11,"target":10,"value":1}, 93 | {"source":11,"target":3,"value":3}, 94 | {"source":11,"target":2,"value":3}, 95 | {"source":11,"target":0,"value":5}, 96 | {"source":12,"target":11,"value":1}, 97 | {"source":13,"target":11,"value":1}, 98 | {"source":14,"target":11,"value":1}, 99 | {"source":15,"target":11,"value":1}, 100 | {"source":17,"target":16,"value":4}, 101 | {"source":18,"target":16,"value":4}, 102 | {"source":18,"target":17,"value":4}, 103 | {"source":19,"target":16,"value":4}, 104 | {"source":19,"target":17,"value":4}, 105 | {"source":19,"target":18,"value":4}, 106 | {"source":20,"target":16,"value":3}, 107 | {"source":20,"target":17,"value":3}, 108 | {"source":20,"target":18,"value":3}, 109 | {"source":20,"target":19,"value":4}, 110 | {"source":21,"target":16,"value":3}, 111 | {"source":21,"target":17,"value":3}, 112 | {"source":21,"target":18,"value":3}, 113 | {"source":21,"target":19,"value":3}, 114 | {"source":21,"target":20,"value":5}, 115 | {"source":22,"target":16,"value":3}, 116 | {"source":22,"target":17,"value":3}, 117 | {"source":22,"target":18,"value":3}, 118 | {"source":22,"target":19,"value":3}, 119 | {"source":22,"target":20,"value":4}, 120 | {"source":22,"target":21,"value":4}, 121 | {"source":23,"target":16,"value":3}, 122 | {"source":23,"target":17,"value":3}, 123 | {"source":23,"target":18,"value":3}, 124 | {"source":23,"target":19,"value":3}, 125 | {"source":23,"target":20,"value":4}, 126 | {"source":23,"target":21,"value":4}, 127 | {"source":23,"target":22,"value":4}, 128 | {"source":23,"target":12,"value":2}, 129 | {"source":23,"target":11,"value":9}, 130 | {"source":24,"target":23,"value":2}, 131 | {"source":24,"target":11,"value":7}, 132 | {"source":25,"target":24,"value":13}, 133 | {"source":25,"target":23,"value":1}, 134 | {"source":25,"target":11,"value":12}, 135 | {"source":26,"target":24,"value":4}, 136 | {"source":26,"target":11,"value":31}, 137 | {"source":26,"target":16,"value":1}, 138 | {"source":26,"target":25,"value":1}, 139 | {"source":27,"target":11,"value":17}, 140 | {"source":27,"target":23,"value":5}, 141 | {"source":27,"target":25,"value":5}, 142 | {"source":27,"target":24,"value":1}, 143 | {"source":27,"target":26,"value":1}, 144 | {"source":28,"target":11,"value":8}, 145 | {"source":28,"target":27,"value":1}, 146 | {"source":29,"target":23,"value":1}, 147 | {"source":29,"target":27,"value":1}, 148 | {"source":29,"target":11,"value":2}, 149 | {"source":30,"target":23,"value":1}, 150 | {"source":31,"target":30,"value":2}, 151 | {"source":31,"target":11,"value":3}, 152 | {"source":31,"target":23,"value":2}, 153 | {"source":31,"target":27,"value":1}, 154 | {"source":32,"target":11,"value":1}, 155 | {"source":33,"target":11,"value":2}, 156 | {"source":33,"target":27,"value":1}, 157 | {"source":34,"target":11,"value":3}, 158 | {"source":34,"target":29,"value":2}, 159 | {"source":35,"target":11,"value":3}, 160 | {"source":35,"target":34,"value":3}, 161 | {"source":35,"target":29,"value":2}, 162 | {"source":36,"target":34,"value":2}, 163 | {"source":36,"target":35,"value":2}, 164 | {"source":36,"target":11,"value":2}, 165 | {"source":36,"target":29,"value":1}, 166 | {"source":37,"target":34,"value":2}, 167 | {"source":37,"target":35,"value":2}, 168 | {"source":37,"target":36,"value":2}, 169 | {"source":37,"target":11,"value":2}, 170 | {"source":37,"target":29,"value":1}, 171 | {"source":38,"target":34,"value":2}, 172 | {"source":38,"target":35,"value":2}, 173 | {"source":38,"target":36,"value":2}, 174 | {"source":38,"target":37,"value":2}, 175 | {"source":38,"target":11,"value":2}, 176 | {"source":38,"target":29,"value":1}, 177 | {"source":39,"target":25,"value":1}, 178 | {"source":40,"target":25,"value":1}, 179 | {"source":41,"target":24,"value":2}, 180 | {"source":41,"target":25,"value":3}, 181 | {"source":42,"target":41,"value":2}, 182 | {"source":42,"target":25,"value":2}, 183 | {"source":42,"target":24,"value":1}, 184 | {"source":43,"target":11,"value":3}, 185 | {"source":43,"target":26,"value":1}, 186 | {"source":43,"target":27,"value":1}, 187 | {"source":44,"target":28,"value":3}, 188 | {"source":44,"target":11,"value":1}, 189 | {"source":45,"target":28,"value":2}, 190 | {"source":47,"target":46,"value":1}, 191 | {"source":48,"target":47,"value":2}, 192 | {"source":48,"target":25,"value":1}, 193 | {"source":48,"target":27,"value":1}, 194 | {"source":48,"target":11,"value":1}, 195 | {"source":49,"target":26,"value":3}, 196 | {"source":49,"target":11,"value":2}, 197 | {"source":50,"target":49,"value":1}, 198 | {"source":50,"target":24,"value":1}, 199 | {"source":51,"target":49,"value":9}, 200 | {"source":51,"target":26,"value":2}, 201 | {"source":51,"target":11,"value":2}, 202 | {"source":52,"target":51,"value":1}, 203 | {"source":52,"target":39,"value":1}, 204 | {"source":53,"target":51,"value":1}, 205 | {"source":54,"target":51,"value":2}, 206 | {"source":54,"target":49,"value":1}, 207 | {"source":54,"target":26,"value":1}, 208 | {"source":55,"target":51,"value":6}, 209 | {"source":55,"target":49,"value":12}, 210 | {"source":55,"target":39,"value":1}, 211 | {"source":55,"target":54,"value":1}, 212 | {"source":55,"target":26,"value":21}, 213 | {"source":55,"target":11,"value":19}, 214 | {"source":55,"target":16,"value":1}, 215 | {"source":55,"target":25,"value":2}, 216 | {"source":55,"target":41,"value":5}, 217 | {"source":55,"target":48,"value":4}, 218 | {"source":56,"target":49,"value":1}, 219 | {"source":56,"target":55,"value":1}, 220 | {"source":57,"target":55,"value":1}, 221 | {"source":57,"target":41,"value":1}, 222 | {"source":57,"target":48,"value":1}, 223 | {"source":58,"target":55,"value":7}, 224 | {"source":58,"target":48,"value":7}, 225 | {"source":58,"target":27,"value":6}, 226 | {"source":58,"target":57,"value":1}, 227 | {"source":58,"target":11,"value":4}, 228 | {"source":59,"target":58,"value":15}, 229 | {"source":59,"target":55,"value":5}, 230 | {"source":59,"target":48,"value":6}, 231 | {"source":59,"target":57,"value":2}, 232 | {"source":60,"target":48,"value":1}, 233 | {"source":60,"target":58,"value":4}, 234 | {"source":60,"target":59,"value":2}, 235 | {"source":61,"target":48,"value":2}, 236 | {"source":61,"target":58,"value":6}, 237 | {"source":61,"target":60,"value":2}, 238 | {"source":61,"target":59,"value":5}, 239 | {"source":61,"target":57,"value":1}, 240 | {"source":61,"target":55,"value":1}, 241 | {"source":62,"target":55,"value":9}, 242 | {"source":62,"target":58,"value":17}, 243 | {"source":62,"target":59,"value":13}, 244 | {"source":62,"target":48,"value":7}, 245 | {"source":62,"target":57,"value":2}, 246 | {"source":62,"target":41,"value":1}, 247 | {"source":62,"target":61,"value":6}, 248 | {"source":62,"target":60,"value":3}, 249 | {"source":63,"target":59,"value":5}, 250 | {"source":63,"target":48,"value":5}, 251 | {"source":63,"target":62,"value":6}, 252 | {"source":63,"target":57,"value":2}, 253 | {"source":63,"target":58,"value":4}, 254 | {"source":63,"target":61,"value":3}, 255 | {"source":63,"target":60,"value":2}, 256 | {"source":63,"target":55,"value":1}, 257 | {"source":64,"target":55,"value":5}, 258 | {"source":64,"target":62,"value":12}, 259 | {"source":64,"target":48,"value":5}, 260 | {"source":64,"target":63,"value":4}, 261 | {"source":64,"target":58,"value":10}, 262 | {"source":64,"target":61,"value":6}, 263 | {"source":64,"target":60,"value":2}, 264 | {"source":64,"target":59,"value":9}, 265 | {"source":64,"target":57,"value":1}, 266 | {"source":64,"target":11,"value":1}, 267 | {"source":65,"target":63,"value":5}, 268 | {"source":65,"target":64,"value":7}, 269 | {"source":65,"target":48,"value":3}, 270 | {"source":65,"target":62,"value":5}, 271 | {"source":65,"target":58,"value":5}, 272 | {"source":65,"target":61,"value":5}, 273 | {"source":65,"target":60,"value":2}, 274 | {"source":65,"target":59,"value":5}, 275 | {"source":65,"target":57,"value":1}, 276 | {"source":65,"target":55,"value":2}, 277 | {"source":66,"target":64,"value":3}, 278 | {"source":66,"target":58,"value":3}, 279 | {"source":66,"target":59,"value":1}, 280 | {"source":66,"target":62,"value":2}, 281 | {"source":66,"target":65,"value":2}, 282 | {"source":66,"target":48,"value":1}, 283 | {"source":66,"target":63,"value":1}, 284 | {"source":66,"target":61,"value":1}, 285 | {"source":66,"target":60,"value":1}, 286 | {"source":67,"target":57,"value":3}, 287 | {"source":68,"target":25,"value":5}, 288 | {"source":68,"target":11,"value":1}, 289 | {"source":68,"target":24,"value":1}, 290 | {"source":68,"target":27,"value":1}, 291 | {"source":68,"target":48,"value":1}, 292 | {"source":68,"target":41,"value":1}, 293 | {"source":69,"target":25,"value":6}, 294 | {"source":69,"target":68,"value":6}, 295 | {"source":69,"target":11,"value":1}, 296 | {"source":69,"target":24,"value":1}, 297 | {"source":69,"target":27,"value":2}, 298 | {"source":69,"target":48,"value":1}, 299 | {"source":69,"target":41,"value":1}, 300 | {"source":70,"target":25,"value":4}, 301 | {"source":70,"target":69,"value":4}, 302 | {"source":70,"target":68,"value":4}, 303 | {"source":70,"target":11,"value":1}, 304 | {"source":70,"target":24,"value":1}, 305 | {"source":70,"target":27,"value":1}, 306 | {"source":70,"target":41,"value":1}, 307 | {"source":70,"target":58,"value":1}, 308 | {"source":71,"target":27,"value":1}, 309 | {"source":71,"target":69,"value":2}, 310 | {"source":71,"target":68,"value":2}, 311 | {"source":71,"target":70,"value":2}, 312 | {"source":71,"target":11,"value":1}, 313 | {"source":71,"target":48,"value":1}, 314 | {"source":71,"target":41,"value":1}, 315 | {"source":71,"target":25,"value":1}, 316 | {"source":72,"target":26,"value":2}, 317 | {"source":72,"target":27,"value":1}, 318 | {"source":72,"target":11,"value":1}, 319 | {"source":73,"target":48,"value":2}, 320 | {"source":74,"target":48,"value":2}, 321 | {"source":74,"target":73,"value":3}, 322 | {"source":75,"target":69,"value":3}, 323 | {"source":75,"target":68,"value":3}, 324 | {"source":75,"target":25,"value":3}, 325 | {"source":75,"target":48,"value":1}, 326 | {"source":75,"target":41,"value":1}, 327 | {"source":75,"target":70,"value":1}, 328 | {"source":75,"target":71,"value":1}, 329 | {"source":76,"target":64,"value":1}, 330 | {"source":76,"target":65,"value":1}, 331 | {"source":76,"target":66,"value":1}, 332 | {"source":76,"target":63,"value":1}, 333 | {"source":76,"target":62,"value":1}, 334 | {"source":76,"target":48,"value":1}, 335 | {"source":76,"target":58,"value":1} 336 | ] 337 | } 338 | -------------------------------------------------------------------------------- /forceInABoxv3.js: -------------------------------------------------------------------------------- 1 | /* global d3 */ 2 | 3 | d3.layout.forceInABox = function () { 4 | "use strict"; 5 | var force = d3.layout.force(), 6 | tree, 7 | foci = {}, 8 | oldStart = force.start, 9 | oldLinkStrength = force.linkStrength(), 10 | oldGravity = force.gravity(), 11 | templateNodes = [], 12 | templateForce, 13 | templateNodesSel, 14 | groupBy = function (d) { return d.cluster; }, 15 | template = "treemap", 16 | enableGrouping = true, 17 | gravityToFoci = 0.1, 18 | gravityOverall = 0.01, 19 | linkStrengthInterCluster = 0.05, 20 | showingTemplate = false; 21 | 22 | force.template = function (x) { 23 | if (!arguments.length) return template; 24 | template = x; 25 | return force; 26 | }; 27 | 28 | force.groupBy = function (x) { 29 | if (!arguments.length) return groupBy; 30 | if (typeof x === "string") { 31 | groupBy = function (d) {return d[x]; }; 32 | return force; 33 | } 34 | groupBy = x; 35 | return force; 36 | }; 37 | 38 | var update = function () { 39 | if (enableGrouping) { 40 | force.gravity(gravityOverall); 41 | } else { 42 | force.gravity(oldGravity); 43 | } 44 | }; 45 | 46 | force.enableGrouping = function (x) { 47 | if (!arguments.length) return enableGrouping; 48 | enableGrouping = x; 49 | update(); 50 | return force; 51 | }; 52 | 53 | force.gravityToFoci = function (x) { 54 | if (!arguments.length) return gravityToFoci; 55 | gravityToFoci = x; 56 | return force; 57 | }; 58 | 59 | force.gravityOverall = function (x) { 60 | if (!arguments.length) return gravityOverall; 61 | gravityOverall = x; 62 | return force; 63 | }; 64 | 65 | force.linkStrengthInterCluster = function (x) { 66 | if (!arguments.length) return linkStrengthInterCluster; 67 | linkStrengthInterCluster = x; 68 | return force; 69 | }; 70 | 71 | 72 | force.linkStrength(function (e) { 73 | if (!enableGrouping || groupBy(e.source) === groupBy(e.target)) { 74 | if (typeof(oldLinkStrength)==="function") { 75 | return oldLinkStrength(e); 76 | } else { 77 | return oldLinkStrength; 78 | } 79 | } else { 80 | if (typeof(linkStrengthInterCluster)==="function") { 81 | return linkStrengthInterCluster(e); 82 | } else { 83 | return linkStrengthInterCluster; 84 | } 85 | } 86 | }); 87 | 88 | 89 | function getLinkKey(l) { 90 | var sourceID = groupBy(l.source), 91 | targetID = groupBy(l.target); 92 | 93 | return sourceID <= targetID ? 94 | sourceID + "~" + targetID : 95 | targetID + "~" + sourceID; 96 | } 97 | 98 | function computeClustersNodeCounts(nodes) { 99 | var clustersCounts = d3.map(); 100 | 101 | nodes.forEach(function (d) { 102 | if (!clustersCounts.has(groupBy(d))) { 103 | clustersCounts.set(groupBy(d), 0); 104 | } 105 | }); 106 | 107 | nodes.forEach(function (d) { 108 | // if (!d.show) { return; } 109 | clustersCounts.set(groupBy(d), clustersCounts.get(groupBy(d)) + 1); 110 | }); 111 | 112 | return clustersCounts; 113 | } 114 | 115 | //Returns 116 | function computeClustersLinkCounts(links) { 117 | var dClusterLinks = d3.map(), 118 | clusterLinks = []; 119 | links.forEach(function (l) { 120 | var key = getLinkKey(l), count; 121 | if (dClusterLinks.has(key)) { 122 | count = dClusterLinks.get(key); 123 | } else { 124 | count = 0; 125 | } 126 | count += 1; 127 | dClusterLinks.set(key, count); 128 | }); 129 | 130 | dClusterLinks.entries().forEach(function (d) { 131 | var source, target; 132 | source = d.key.split("~")[0]; 133 | target = d.key.split("~")[1]; 134 | clusterLinks.push({ 135 | "source":source, 136 | "target":target, 137 | "count":d.value, 138 | }); 139 | }); 140 | return clusterLinks; 141 | } 142 | 143 | //Returns the metagraph of the clusters 144 | function getGroupsGraph() { 145 | var nodes = [], 146 | links = [], 147 | edges = [], 148 | dNodes = d3.map(), 149 | totalSize = 0, 150 | clustersList, 151 | c, i, size, 152 | clustersCounts, 153 | clustersLinks; 154 | 155 | clustersCounts = computeClustersNodeCounts(force.nodes()); 156 | clustersLinks = computeClustersLinkCounts(force.links()); 157 | 158 | //map.keys() is really slow, it's crucial to have it outside the loop 159 | clustersList = clustersCounts.keys(); 160 | for (i = 0; i< clustersList.length ; i+=1) { 161 | c = clustersList[i]; 162 | size = clustersCounts.get(c); 163 | nodes.push({id : c, size :size }); 164 | dNodes.set(c, i); 165 | totalSize += size; 166 | } 167 | 168 | clustersLinks.forEach(function (l) { 169 | links.push({ 170 | "source":dNodes.get(l.source), 171 | "target":dNodes.get(l.target), 172 | "count":l.count 173 | }); 174 | }); 175 | 176 | 177 | return {nodes: nodes, links: links}; 178 | } 179 | 180 | 181 | function getGroupsTree() { 182 | var children = [], 183 | totalSize = 0, 184 | clustersList, 185 | c, i, size, clustersCounts; 186 | 187 | clustersCounts = computeClustersNodeCounts(force.nodes()); 188 | 189 | //map.keys() is really slow, it's crucial to have it outside the loop 190 | clustersList = clustersCounts.keys(); 191 | for (i = 0; i< clustersList.length ; i+=1) { 192 | c = clustersList[i]; 193 | size = clustersCounts.get(c); 194 | children.push({id : c, size :size }); 195 | totalSize += size; 196 | } 197 | return {id: "clustersTree", size: totalSize, children : children}; 198 | } 199 | 200 | 201 | function getFocisFromTemplate() { 202 | //compute foci 203 | foci.none = {x : 0, y : 0}; 204 | templateNodes.forEach(function (d) { 205 | if (template==="treemap") { 206 | foci[d.id] = { 207 | x : (d.x + d.dx / 2), 208 | y : (d.y + d.dy / 2) 209 | }; 210 | } else { 211 | foci[d.id] = {x : d.x , y : d.y }; 212 | 213 | } 214 | }); 215 | } 216 | function recomputeWithTreemap() { 217 | var treemap = d3.layout.treemap() 218 | .size(force.size()) 219 | .sort(function (p, q) { return d3.ascending(p.size, q.size); }) 220 | .value(function (d) { return d.size; }); 221 | 222 | tree = getGroupsTree(); 223 | templateNodes = treemap.nodes(tree); 224 | 225 | getFocisFromTemplate(); 226 | } 227 | 228 | function recomputeWithForce() { 229 | var net; 230 | 231 | templateForce = d3.layout.force() 232 | .size(force.size()) 233 | .gravity(0.5) 234 | .charge(function (d) { return -100 * d.size; }); 235 | 236 | net = getGroupsGraph(); 237 | templateForce.nodes(net.nodes); 238 | templateForce.links(net.links); 239 | 240 | 241 | templateForce.start(); 242 | templateNodes = templateForce.nodes(); 243 | 244 | getFocisFromTemplate(); 245 | } 246 | 247 | force.recompute = function () { 248 | if (template==="treemap") { 249 | recomputeWithTreemap(); 250 | } else { 251 | recomputeWithForce(); 252 | } 253 | // Draw the treemap 254 | return force; 255 | }; 256 | 257 | function drawTreemap(container) { 258 | container.selectAll("cell").remove(); 259 | container.selectAll("cell") 260 | .data(templateNodes) 261 | .enter().append("svg:rect") 262 | .attr("class", "cell") 263 | .attr("x", function (d) { return d.x; }) 264 | .attr("y", function (d) { return d.y; }) 265 | .attr("width", function (d) { return d.dx; }) 266 | .attr("height", function (d) { return d.dy; }); 267 | 268 | } 269 | 270 | function drawGraph(container) { 271 | container.selectAll("cell").remove(); 272 | templateNodesSel = container.selectAll("cell") 273 | .data(templateNodes); 274 | templateNodesSel 275 | .enter().append("svg:circle") 276 | .attr("class", "cell") 277 | .attr("cx", function (d) { return d.x; }) 278 | .attr("cy", function (d) { return d.y; }) 279 | .attr("r", function (d) { return d.size; }); 280 | 281 | } 282 | 283 | force.drawTemplate = function (container) { 284 | showingTemplate = true; 285 | if (template === "treemap") { 286 | drawTreemap(container); 287 | } else { 288 | drawGraph(container); 289 | } 290 | return force; 291 | }; 292 | 293 | 294 | 295 | 296 | 297 | //Backwards compatibility 298 | force.drawTreemap = force.drawTemplate; 299 | 300 | force.deleteTreemap = function (container) { 301 | showingTemplate = false; 302 | container.selectAll("rect.cell").remove(); 303 | 304 | return force; 305 | }; 306 | 307 | 308 | force.onTick = function (e) { 309 | if (!enableGrouping) { 310 | return force; 311 | } 312 | if (template==="force") { 313 | //Do the tick of the template force and get the new focis 314 | templateForce.tick(); 315 | getFocisFromTemplate(); 316 | } 317 | 318 | var k; 319 | k = force.gravityToFoci() * e.alpha; 320 | force.nodes().forEach(function (o) { 321 | if (!foci.hasOwnProperty(groupBy(o))) { return; } 322 | o.y += (foci[groupBy(o)].y - o.y) * k; 323 | o.x += (foci[groupBy(o)].x - o.x) * k; 324 | }); 325 | 326 | if (showingTemplate && template === "force") { 327 | templateNodesSel 328 | .attr("cx", function (d) { return d.x; }) 329 | .attr("cy", function (d) { return d.y; }) 330 | .attr("r", function (d) { return d.size; }); 331 | } 332 | return force; 333 | }; 334 | 335 | force.start = function () { 336 | update(); 337 | 338 | if (enableGrouping) { 339 | force.recompute(); 340 | } 341 | oldStart(); 342 | return force; 343 | }; 344 | 345 | return force; 346 | }; -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "force-in-a-box", 3 | "version": "1.0.2", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "force-in-a-box", 9 | "version": "1.0.2", 10 | "license": "MIT", 11 | "dependencies": { 12 | "d3": "^7.9.0" 13 | }, 14 | "devDependencies": { 15 | "@rollup/plugin-commonjs": "^28.0.1", 16 | "@rollup/plugin-node-resolve": "^15.3.0", 17 | "@rollup/plugin-terser": "^0.4.4", 18 | "eslint": "^9.13.0", 19 | "eslint-config-prettier": "^9.1.0", 20 | "prettier": "^3.3.3", 21 | "rollup": "^4.24.3", 22 | "rollup-plugin-ascii": "0.0.3", 23 | "rollup-plugin-commonjs": "^9.3.4" 24 | } 25 | }, 26 | "node_modules/@eslint-community/eslint-utils": { 27 | "version": "4.4.1", 28 | "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", 29 | "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", 30 | "dev": true, 31 | "license": "MIT", 32 | "dependencies": { 33 | "eslint-visitor-keys": "^3.4.3" 34 | }, 35 | "engines": { 36 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 37 | }, 38 | "funding": { 39 | "url": "https://opencollective.com/eslint" 40 | }, 41 | "peerDependencies": { 42 | "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" 43 | } 44 | }, 45 | "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { 46 | "version": "3.4.3", 47 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", 48 | "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", 49 | "dev": true, 50 | "license": "Apache-2.0", 51 | "engines": { 52 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 53 | }, 54 | "funding": { 55 | "url": "https://opencollective.com/eslint" 56 | } 57 | }, 58 | "node_modules/@eslint-community/regexpp": { 59 | "version": "4.12.1", 60 | "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", 61 | "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", 62 | "dev": true, 63 | "license": "MIT", 64 | "engines": { 65 | "node": "^12.0.0 || ^14.0.0 || >=16.0.0" 66 | } 67 | }, 68 | "node_modules/@eslint/config-array": { 69 | "version": "0.18.0", 70 | "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", 71 | "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", 72 | "dev": true, 73 | "license": "Apache-2.0", 74 | "dependencies": { 75 | "@eslint/object-schema": "^2.1.4", 76 | "debug": "^4.3.1", 77 | "minimatch": "^3.1.2" 78 | }, 79 | "engines": { 80 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 81 | } 82 | }, 83 | "node_modules/@eslint/core": { 84 | "version": "0.7.0", 85 | "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", 86 | "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", 87 | "dev": true, 88 | "license": "Apache-2.0", 89 | "engines": { 90 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 91 | } 92 | }, 93 | "node_modules/@eslint/eslintrc": { 94 | "version": "3.1.0", 95 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", 96 | "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", 97 | "dev": true, 98 | "license": "MIT", 99 | "dependencies": { 100 | "ajv": "^6.12.4", 101 | "debug": "^4.3.2", 102 | "espree": "^10.0.1", 103 | "globals": "^14.0.0", 104 | "ignore": "^5.2.0", 105 | "import-fresh": "^3.2.1", 106 | "js-yaml": "^4.1.0", 107 | "minimatch": "^3.1.2", 108 | "strip-json-comments": "^3.1.1" 109 | }, 110 | "engines": { 111 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 112 | }, 113 | "funding": { 114 | "url": "https://opencollective.com/eslint" 115 | } 116 | }, 117 | "node_modules/@eslint/js": { 118 | "version": "9.13.0", 119 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", 120 | "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", 121 | "dev": true, 122 | "license": "MIT", 123 | "engines": { 124 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 125 | } 126 | }, 127 | "node_modules/@eslint/object-schema": { 128 | "version": "2.1.4", 129 | "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", 130 | "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", 131 | "dev": true, 132 | "license": "Apache-2.0", 133 | "engines": { 134 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 135 | } 136 | }, 137 | "node_modules/@eslint/plugin-kit": { 138 | "version": "0.2.2", 139 | "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", 140 | "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", 141 | "dev": true, 142 | "license": "Apache-2.0", 143 | "dependencies": { 144 | "levn": "^0.4.1" 145 | }, 146 | "engines": { 147 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 148 | } 149 | }, 150 | "node_modules/@humanfs/core": { 151 | "version": "0.19.1", 152 | "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", 153 | "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", 154 | "dev": true, 155 | "license": "Apache-2.0", 156 | "engines": { 157 | "node": ">=18.18.0" 158 | } 159 | }, 160 | "node_modules/@humanfs/node": { 161 | "version": "0.16.6", 162 | "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", 163 | "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", 164 | "dev": true, 165 | "license": "Apache-2.0", 166 | "dependencies": { 167 | "@humanfs/core": "^0.19.1", 168 | "@humanwhocodes/retry": "^0.3.0" 169 | }, 170 | "engines": { 171 | "node": ">=18.18.0" 172 | } 173 | }, 174 | "node_modules/@humanwhocodes/module-importer": { 175 | "version": "1.0.1", 176 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", 177 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", 178 | "dev": true, 179 | "license": "Apache-2.0", 180 | "engines": { 181 | "node": ">=12.22" 182 | }, 183 | "funding": { 184 | "type": "github", 185 | "url": "https://github.com/sponsors/nzakas" 186 | } 187 | }, 188 | "node_modules/@humanwhocodes/retry": { 189 | "version": "0.3.1", 190 | "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", 191 | "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", 192 | "dev": true, 193 | "license": "Apache-2.0", 194 | "engines": { 195 | "node": ">=18.18" 196 | }, 197 | "funding": { 198 | "type": "github", 199 | "url": "https://github.com/sponsors/nzakas" 200 | } 201 | }, 202 | "node_modules/@jridgewell/gen-mapping": { 203 | "version": "0.3.5", 204 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", 205 | "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", 206 | "dev": true, 207 | "license": "MIT", 208 | "dependencies": { 209 | "@jridgewell/set-array": "^1.2.1", 210 | "@jridgewell/sourcemap-codec": "^1.4.10", 211 | "@jridgewell/trace-mapping": "^0.3.24" 212 | }, 213 | "engines": { 214 | "node": ">=6.0.0" 215 | } 216 | }, 217 | "node_modules/@jridgewell/resolve-uri": { 218 | "version": "3.1.2", 219 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", 220 | "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", 221 | "dev": true, 222 | "license": "MIT", 223 | "engines": { 224 | "node": ">=6.0.0" 225 | } 226 | }, 227 | "node_modules/@jridgewell/set-array": { 228 | "version": "1.2.1", 229 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", 230 | "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", 231 | "dev": true, 232 | "license": "MIT", 233 | "engines": { 234 | "node": ">=6.0.0" 235 | } 236 | }, 237 | "node_modules/@jridgewell/source-map": { 238 | "version": "0.3.6", 239 | "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", 240 | "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", 241 | "dev": true, 242 | "license": "MIT", 243 | "dependencies": { 244 | "@jridgewell/gen-mapping": "^0.3.5", 245 | "@jridgewell/trace-mapping": "^0.3.25" 246 | } 247 | }, 248 | "node_modules/@jridgewell/sourcemap-codec": { 249 | "version": "1.5.0", 250 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", 251 | "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", 252 | "dev": true, 253 | "license": "MIT" 254 | }, 255 | "node_modules/@jridgewell/trace-mapping": { 256 | "version": "0.3.25", 257 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", 258 | "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", 259 | "dev": true, 260 | "license": "MIT", 261 | "dependencies": { 262 | "@jridgewell/resolve-uri": "^3.1.0", 263 | "@jridgewell/sourcemap-codec": "^1.4.14" 264 | } 265 | }, 266 | "node_modules/@rollup/plugin-commonjs": { 267 | "version": "28.0.1", 268 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", 269 | "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", 270 | "dev": true, 271 | "license": "MIT", 272 | "dependencies": { 273 | "@rollup/pluginutils": "^5.0.1", 274 | "commondir": "^1.0.1", 275 | "estree-walker": "^2.0.2", 276 | "fdir": "^6.2.0", 277 | "is-reference": "1.2.1", 278 | "magic-string": "^0.30.3", 279 | "picomatch": "^4.0.2" 280 | }, 281 | "engines": { 282 | "node": ">=16.0.0 || 14 >= 14.17" 283 | }, 284 | "peerDependencies": { 285 | "rollup": "^2.68.0||^3.0.0||^4.0.0" 286 | }, 287 | "peerDependenciesMeta": { 288 | "rollup": { 289 | "optional": true 290 | } 291 | } 292 | }, 293 | "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { 294 | "version": "2.0.2", 295 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 296 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 297 | "dev": true, 298 | "license": "MIT" 299 | }, 300 | "node_modules/@rollup/plugin-commonjs/node_modules/magic-string": { 301 | "version": "0.30.12", 302 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", 303 | "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", 304 | "dev": true, 305 | "license": "MIT", 306 | "dependencies": { 307 | "@jridgewell/sourcemap-codec": "^1.5.0" 308 | } 309 | }, 310 | "node_modules/@rollup/plugin-node-resolve": { 311 | "version": "15.3.0", 312 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz", 313 | "integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==", 314 | "dev": true, 315 | "license": "MIT", 316 | "dependencies": { 317 | "@rollup/pluginutils": "^5.0.1", 318 | "@types/resolve": "1.20.2", 319 | "deepmerge": "^4.2.2", 320 | "is-module": "^1.0.0", 321 | "resolve": "^1.22.1" 322 | }, 323 | "engines": { 324 | "node": ">=14.0.0" 325 | }, 326 | "peerDependencies": { 327 | "rollup": "^2.78.0||^3.0.0||^4.0.0" 328 | }, 329 | "peerDependenciesMeta": { 330 | "rollup": { 331 | "optional": true 332 | } 333 | } 334 | }, 335 | "node_modules/@rollup/plugin-terser": { 336 | "version": "0.4.4", 337 | "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", 338 | "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", 339 | "dev": true, 340 | "license": "MIT", 341 | "dependencies": { 342 | "serialize-javascript": "^6.0.1", 343 | "smob": "^1.0.0", 344 | "terser": "^5.17.4" 345 | }, 346 | "engines": { 347 | "node": ">=14.0.0" 348 | }, 349 | "peerDependencies": { 350 | "rollup": "^2.0.0||^3.0.0||^4.0.0" 351 | }, 352 | "peerDependenciesMeta": { 353 | "rollup": { 354 | "optional": true 355 | } 356 | } 357 | }, 358 | "node_modules/@rollup/pluginutils": { 359 | "version": "5.1.3", 360 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", 361 | "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", 362 | "dev": true, 363 | "license": "MIT", 364 | "dependencies": { 365 | "@types/estree": "^1.0.0", 366 | "estree-walker": "^2.0.2", 367 | "picomatch": "^4.0.2" 368 | }, 369 | "engines": { 370 | "node": ">=14.0.0" 371 | }, 372 | "peerDependencies": { 373 | "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" 374 | }, 375 | "peerDependenciesMeta": { 376 | "rollup": { 377 | "optional": true 378 | } 379 | } 380 | }, 381 | "node_modules/@rollup/pluginutils/node_modules/estree-walker": { 382 | "version": "2.0.2", 383 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 384 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 385 | "dev": true, 386 | "license": "MIT" 387 | }, 388 | "node_modules/@rollup/rollup-android-arm-eabi": { 389 | "version": "4.24.3", 390 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.3.tgz", 391 | "integrity": "sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==", 392 | "cpu": [ 393 | "arm" 394 | ], 395 | "dev": true, 396 | "license": "MIT", 397 | "optional": true, 398 | "os": [ 399 | "android" 400 | ] 401 | }, 402 | "node_modules/@rollup/rollup-android-arm64": { 403 | "version": "4.24.3", 404 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.3.tgz", 405 | "integrity": "sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==", 406 | "cpu": [ 407 | "arm64" 408 | ], 409 | "dev": true, 410 | "license": "MIT", 411 | "optional": true, 412 | "os": [ 413 | "android" 414 | ] 415 | }, 416 | "node_modules/@rollup/rollup-darwin-arm64": { 417 | "version": "4.24.3", 418 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.3.tgz", 419 | "integrity": "sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==", 420 | "cpu": [ 421 | "arm64" 422 | ], 423 | "dev": true, 424 | "license": "MIT", 425 | "optional": true, 426 | "os": [ 427 | "darwin" 428 | ] 429 | }, 430 | "node_modules/@rollup/rollup-darwin-x64": { 431 | "version": "4.24.3", 432 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.3.tgz", 433 | "integrity": "sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==", 434 | "cpu": [ 435 | "x64" 436 | ], 437 | "dev": true, 438 | "license": "MIT", 439 | "optional": true, 440 | "os": [ 441 | "darwin" 442 | ] 443 | }, 444 | "node_modules/@rollup/rollup-freebsd-arm64": { 445 | "version": "4.24.3", 446 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.3.tgz", 447 | "integrity": "sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==", 448 | "cpu": [ 449 | "arm64" 450 | ], 451 | "dev": true, 452 | "license": "MIT", 453 | "optional": true, 454 | "os": [ 455 | "freebsd" 456 | ] 457 | }, 458 | "node_modules/@rollup/rollup-freebsd-x64": { 459 | "version": "4.24.3", 460 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.3.tgz", 461 | "integrity": "sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==", 462 | "cpu": [ 463 | "x64" 464 | ], 465 | "dev": true, 466 | "license": "MIT", 467 | "optional": true, 468 | "os": [ 469 | "freebsd" 470 | ] 471 | }, 472 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": { 473 | "version": "4.24.3", 474 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz", 475 | "integrity": "sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==", 476 | "cpu": [ 477 | "arm" 478 | ], 479 | "dev": true, 480 | "license": "MIT", 481 | "optional": true, 482 | "os": [ 483 | "linux" 484 | ] 485 | }, 486 | "node_modules/@rollup/rollup-linux-arm-musleabihf": { 487 | "version": "4.24.3", 488 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.3.tgz", 489 | "integrity": "sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==", 490 | "cpu": [ 491 | "arm" 492 | ], 493 | "dev": true, 494 | "license": "MIT", 495 | "optional": true, 496 | "os": [ 497 | "linux" 498 | ] 499 | }, 500 | "node_modules/@rollup/rollup-linux-arm64-gnu": { 501 | "version": "4.24.3", 502 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.3.tgz", 503 | "integrity": "sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==", 504 | "cpu": [ 505 | "arm64" 506 | ], 507 | "dev": true, 508 | "license": "MIT", 509 | "optional": true, 510 | "os": [ 511 | "linux" 512 | ] 513 | }, 514 | "node_modules/@rollup/rollup-linux-arm64-musl": { 515 | "version": "4.24.3", 516 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.3.tgz", 517 | "integrity": "sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==", 518 | "cpu": [ 519 | "arm64" 520 | ], 521 | "dev": true, 522 | "license": "MIT", 523 | "optional": true, 524 | "os": [ 525 | "linux" 526 | ] 527 | }, 528 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { 529 | "version": "4.24.3", 530 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.3.tgz", 531 | "integrity": "sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==", 532 | "cpu": [ 533 | "ppc64" 534 | ], 535 | "dev": true, 536 | "license": "MIT", 537 | "optional": true, 538 | "os": [ 539 | "linux" 540 | ] 541 | }, 542 | "node_modules/@rollup/rollup-linux-riscv64-gnu": { 543 | "version": "4.24.3", 544 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.3.tgz", 545 | "integrity": "sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==", 546 | "cpu": [ 547 | "riscv64" 548 | ], 549 | "dev": true, 550 | "license": "MIT", 551 | "optional": true, 552 | "os": [ 553 | "linux" 554 | ] 555 | }, 556 | "node_modules/@rollup/rollup-linux-s390x-gnu": { 557 | "version": "4.24.3", 558 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.3.tgz", 559 | "integrity": "sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==", 560 | "cpu": [ 561 | "s390x" 562 | ], 563 | "dev": true, 564 | "license": "MIT", 565 | "optional": true, 566 | "os": [ 567 | "linux" 568 | ] 569 | }, 570 | "node_modules/@rollup/rollup-linux-x64-gnu": { 571 | "version": "4.24.3", 572 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.3.tgz", 573 | "integrity": "sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==", 574 | "cpu": [ 575 | "x64" 576 | ], 577 | "dev": true, 578 | "license": "MIT", 579 | "optional": true, 580 | "os": [ 581 | "linux" 582 | ] 583 | }, 584 | "node_modules/@rollup/rollup-linux-x64-musl": { 585 | "version": "4.24.3", 586 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.3.tgz", 587 | "integrity": "sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==", 588 | "cpu": [ 589 | "x64" 590 | ], 591 | "dev": true, 592 | "license": "MIT", 593 | "optional": true, 594 | "os": [ 595 | "linux" 596 | ] 597 | }, 598 | "node_modules/@rollup/rollup-win32-arm64-msvc": { 599 | "version": "4.24.3", 600 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.3.tgz", 601 | "integrity": "sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==", 602 | "cpu": [ 603 | "arm64" 604 | ], 605 | "dev": true, 606 | "license": "MIT", 607 | "optional": true, 608 | "os": [ 609 | "win32" 610 | ] 611 | }, 612 | "node_modules/@rollup/rollup-win32-ia32-msvc": { 613 | "version": "4.24.3", 614 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.3.tgz", 615 | "integrity": "sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==", 616 | "cpu": [ 617 | "ia32" 618 | ], 619 | "dev": true, 620 | "license": "MIT", 621 | "optional": true, 622 | "os": [ 623 | "win32" 624 | ] 625 | }, 626 | "node_modules/@rollup/rollup-win32-x64-msvc": { 627 | "version": "4.24.3", 628 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.3.tgz", 629 | "integrity": "sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==", 630 | "cpu": [ 631 | "x64" 632 | ], 633 | "dev": true, 634 | "license": "MIT", 635 | "optional": true, 636 | "os": [ 637 | "win32" 638 | ] 639 | }, 640 | "node_modules/@types/estree": { 641 | "version": "1.0.6", 642 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", 643 | "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", 644 | "dev": true, 645 | "license": "MIT" 646 | }, 647 | "node_modules/@types/json-schema": { 648 | "version": "7.0.15", 649 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", 650 | "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", 651 | "dev": true, 652 | "license": "MIT" 653 | }, 654 | "node_modules/@types/resolve": { 655 | "version": "1.20.2", 656 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", 657 | "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", 658 | "dev": true, 659 | "license": "MIT" 660 | }, 661 | "node_modules/acorn": { 662 | "version": "8.14.0", 663 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", 664 | "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", 665 | "dev": true, 666 | "license": "MIT", 667 | "bin": { 668 | "acorn": "bin/acorn" 669 | }, 670 | "engines": { 671 | "node": ">=0.4.0" 672 | } 673 | }, 674 | "node_modules/acorn-jsx": { 675 | "version": "5.3.2", 676 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 677 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 678 | "dev": true, 679 | "license": "MIT", 680 | "peerDependencies": { 681 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 682 | } 683 | }, 684 | "node_modules/ajv": { 685 | "version": "6.12.6", 686 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 687 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 688 | "dev": true, 689 | "license": "MIT", 690 | "dependencies": { 691 | "fast-deep-equal": "^3.1.1", 692 | "fast-json-stable-stringify": "^2.0.0", 693 | "json-schema-traverse": "^0.4.1", 694 | "uri-js": "^4.2.2" 695 | }, 696 | "funding": { 697 | "type": "github", 698 | "url": "https://github.com/sponsors/epoberezkin" 699 | } 700 | }, 701 | "node_modules/argparse": { 702 | "version": "2.0.1", 703 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 704 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 705 | "dev": true, 706 | "license": "Python-2.0" 707 | }, 708 | "node_modules/balanced-match": { 709 | "version": "1.0.0", 710 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 711 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 712 | "dev": true 713 | }, 714 | "node_modules/brace-expansion": { 715 | "version": "1.1.11", 716 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 717 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 718 | "dev": true, 719 | "dependencies": { 720 | "balanced-match": "^1.0.0", 721 | "concat-map": "0.0.1" 722 | } 723 | }, 724 | "node_modules/buffer-from": { 725 | "version": "1.1.2", 726 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", 727 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", 728 | "dev": true, 729 | "license": "MIT" 730 | }, 731 | "node_modules/callsites": { 732 | "version": "3.1.0", 733 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 734 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 735 | "dev": true, 736 | "license": "MIT", 737 | "engines": { 738 | "node": ">=6" 739 | } 740 | }, 741 | "node_modules/commander": { 742 | "version": "2.20.3", 743 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 744 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 745 | "dev": true 746 | }, 747 | "node_modules/commondir": { 748 | "version": "1.0.1", 749 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 750 | "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", 751 | "dev": true, 752 | "license": "MIT" 753 | }, 754 | "node_modules/concat-map": { 755 | "version": "0.0.1", 756 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 757 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 758 | "dev": true 759 | }, 760 | "node_modules/cross-spawn": { 761 | "version": "7.0.3", 762 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 763 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 764 | "dev": true, 765 | "dependencies": { 766 | "path-key": "^3.1.0", 767 | "shebang-command": "^2.0.0", 768 | "which": "^2.0.1" 769 | }, 770 | "engines": { 771 | "node": ">= 8" 772 | } 773 | }, 774 | "node_modules/d3": { 775 | "version": "7.9.0", 776 | "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", 777 | "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", 778 | "license": "ISC", 779 | "dependencies": { 780 | "d3-array": "3", 781 | "d3-axis": "3", 782 | "d3-brush": "3", 783 | "d3-chord": "3", 784 | "d3-color": "3", 785 | "d3-contour": "4", 786 | "d3-delaunay": "6", 787 | "d3-dispatch": "3", 788 | "d3-drag": "3", 789 | "d3-dsv": "3", 790 | "d3-ease": "3", 791 | "d3-fetch": "3", 792 | "d3-force": "3", 793 | "d3-format": "3", 794 | "d3-geo": "3", 795 | "d3-hierarchy": "3", 796 | "d3-interpolate": "3", 797 | "d3-path": "3", 798 | "d3-polygon": "3", 799 | "d3-quadtree": "3", 800 | "d3-random": "3", 801 | "d3-scale": "4", 802 | "d3-scale-chromatic": "3", 803 | "d3-selection": "3", 804 | "d3-shape": "3", 805 | "d3-time": "3", 806 | "d3-time-format": "4", 807 | "d3-timer": "3", 808 | "d3-transition": "3", 809 | "d3-zoom": "3" 810 | }, 811 | "engines": { 812 | "node": ">=12" 813 | } 814 | }, 815 | "node_modules/d3-array": { 816 | "version": "3.2.4", 817 | "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", 818 | "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", 819 | "license": "ISC", 820 | "dependencies": { 821 | "internmap": "1 - 2" 822 | }, 823 | "engines": { 824 | "node": ">=12" 825 | } 826 | }, 827 | "node_modules/d3-axis": { 828 | "version": "3.0.0", 829 | "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", 830 | "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", 831 | "license": "ISC", 832 | "engines": { 833 | "node": ">=12" 834 | } 835 | }, 836 | "node_modules/d3-brush": { 837 | "version": "3.0.0", 838 | "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", 839 | "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", 840 | "license": "ISC", 841 | "dependencies": { 842 | "d3-dispatch": "1 - 3", 843 | "d3-drag": "2 - 3", 844 | "d3-interpolate": "1 - 3", 845 | "d3-selection": "3", 846 | "d3-transition": "3" 847 | }, 848 | "engines": { 849 | "node": ">=12" 850 | } 851 | }, 852 | "node_modules/d3-chord": { 853 | "version": "3.0.1", 854 | "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", 855 | "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", 856 | "license": "ISC", 857 | "dependencies": { 858 | "d3-path": "1 - 3" 859 | }, 860 | "engines": { 861 | "node": ">=12" 862 | } 863 | }, 864 | "node_modules/d3-color": { 865 | "version": "3.1.0", 866 | "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", 867 | "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", 868 | "license": "ISC", 869 | "engines": { 870 | "node": ">=12" 871 | } 872 | }, 873 | "node_modules/d3-contour": { 874 | "version": "4.0.2", 875 | "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", 876 | "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", 877 | "license": "ISC", 878 | "dependencies": { 879 | "d3-array": "^3.2.0" 880 | }, 881 | "engines": { 882 | "node": ">=12" 883 | } 884 | }, 885 | "node_modules/d3-delaunay": { 886 | "version": "6.0.4", 887 | "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", 888 | "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", 889 | "license": "ISC", 890 | "dependencies": { 891 | "delaunator": "5" 892 | }, 893 | "engines": { 894 | "node": ">=12" 895 | } 896 | }, 897 | "node_modules/d3-dispatch": { 898 | "version": "3.0.1", 899 | "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", 900 | "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", 901 | "license": "ISC", 902 | "engines": { 903 | "node": ">=12" 904 | } 905 | }, 906 | "node_modules/d3-drag": { 907 | "version": "3.0.0", 908 | "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", 909 | "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", 910 | "license": "ISC", 911 | "dependencies": { 912 | "d3-dispatch": "1 - 3", 913 | "d3-selection": "3" 914 | }, 915 | "engines": { 916 | "node": ">=12" 917 | } 918 | }, 919 | "node_modules/d3-dsv": { 920 | "version": "3.0.1", 921 | "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", 922 | "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", 923 | "license": "ISC", 924 | "dependencies": { 925 | "commander": "7", 926 | "iconv-lite": "0.6", 927 | "rw": "1" 928 | }, 929 | "bin": { 930 | "csv2json": "bin/dsv2json.js", 931 | "csv2tsv": "bin/dsv2dsv.js", 932 | "dsv2dsv": "bin/dsv2dsv.js", 933 | "dsv2json": "bin/dsv2json.js", 934 | "json2csv": "bin/json2dsv.js", 935 | "json2dsv": "bin/json2dsv.js", 936 | "json2tsv": "bin/json2dsv.js", 937 | "tsv2csv": "bin/dsv2dsv.js", 938 | "tsv2json": "bin/dsv2json.js" 939 | }, 940 | "engines": { 941 | "node": ">=12" 942 | } 943 | }, 944 | "node_modules/d3-dsv/node_modules/commander": { 945 | "version": "7.2.0", 946 | "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", 947 | "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", 948 | "license": "MIT", 949 | "engines": { 950 | "node": ">= 10" 951 | } 952 | }, 953 | "node_modules/d3-ease": { 954 | "version": "3.0.1", 955 | "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", 956 | "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", 957 | "license": "BSD-3-Clause", 958 | "engines": { 959 | "node": ">=12" 960 | } 961 | }, 962 | "node_modules/d3-fetch": { 963 | "version": "3.0.1", 964 | "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", 965 | "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", 966 | "license": "ISC", 967 | "dependencies": { 968 | "d3-dsv": "1 - 3" 969 | }, 970 | "engines": { 971 | "node": ">=12" 972 | } 973 | }, 974 | "node_modules/d3-force": { 975 | "version": "3.0.0", 976 | "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", 977 | "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", 978 | "license": "ISC", 979 | "dependencies": { 980 | "d3-dispatch": "1 - 3", 981 | "d3-quadtree": "1 - 3", 982 | "d3-timer": "1 - 3" 983 | }, 984 | "engines": { 985 | "node": ">=12" 986 | } 987 | }, 988 | "node_modules/d3-format": { 989 | "version": "3.1.0", 990 | "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", 991 | "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", 992 | "license": "ISC", 993 | "engines": { 994 | "node": ">=12" 995 | } 996 | }, 997 | "node_modules/d3-geo": { 998 | "version": "3.1.1", 999 | "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", 1000 | "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", 1001 | "license": "ISC", 1002 | "dependencies": { 1003 | "d3-array": "2.5.0 - 3" 1004 | }, 1005 | "engines": { 1006 | "node": ">=12" 1007 | } 1008 | }, 1009 | "node_modules/d3-hierarchy": { 1010 | "version": "3.1.2", 1011 | "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", 1012 | "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", 1013 | "license": "ISC", 1014 | "engines": { 1015 | "node": ">=12" 1016 | } 1017 | }, 1018 | "node_modules/d3-interpolate": { 1019 | "version": "3.0.1", 1020 | "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", 1021 | "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", 1022 | "license": "ISC", 1023 | "dependencies": { 1024 | "d3-color": "1 - 3" 1025 | }, 1026 | "engines": { 1027 | "node": ">=12" 1028 | } 1029 | }, 1030 | "node_modules/d3-path": { 1031 | "version": "3.1.0", 1032 | "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", 1033 | "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", 1034 | "license": "ISC", 1035 | "engines": { 1036 | "node": ">=12" 1037 | } 1038 | }, 1039 | "node_modules/d3-polygon": { 1040 | "version": "3.0.1", 1041 | "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", 1042 | "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", 1043 | "license": "ISC", 1044 | "engines": { 1045 | "node": ">=12" 1046 | } 1047 | }, 1048 | "node_modules/d3-quadtree": { 1049 | "version": "3.0.1", 1050 | "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", 1051 | "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", 1052 | "license": "ISC", 1053 | "engines": { 1054 | "node": ">=12" 1055 | } 1056 | }, 1057 | "node_modules/d3-random": { 1058 | "version": "3.0.1", 1059 | "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", 1060 | "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", 1061 | "license": "ISC", 1062 | "engines": { 1063 | "node": ">=12" 1064 | } 1065 | }, 1066 | "node_modules/d3-scale": { 1067 | "version": "4.0.2", 1068 | "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", 1069 | "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", 1070 | "license": "ISC", 1071 | "dependencies": { 1072 | "d3-array": "2.10.0 - 3", 1073 | "d3-format": "1 - 3", 1074 | "d3-interpolate": "1.2.0 - 3", 1075 | "d3-time": "2.1.1 - 3", 1076 | "d3-time-format": "2 - 4" 1077 | }, 1078 | "engines": { 1079 | "node": ">=12" 1080 | } 1081 | }, 1082 | "node_modules/d3-scale-chromatic": { 1083 | "version": "3.1.0", 1084 | "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", 1085 | "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", 1086 | "license": "ISC", 1087 | "dependencies": { 1088 | "d3-color": "1 - 3", 1089 | "d3-interpolate": "1 - 3" 1090 | }, 1091 | "engines": { 1092 | "node": ">=12" 1093 | } 1094 | }, 1095 | "node_modules/d3-selection": { 1096 | "version": "3.0.0", 1097 | "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", 1098 | "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", 1099 | "license": "ISC", 1100 | "engines": { 1101 | "node": ">=12" 1102 | } 1103 | }, 1104 | "node_modules/d3-shape": { 1105 | "version": "3.2.0", 1106 | "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", 1107 | "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", 1108 | "license": "ISC", 1109 | "dependencies": { 1110 | "d3-path": "^3.1.0" 1111 | }, 1112 | "engines": { 1113 | "node": ">=12" 1114 | } 1115 | }, 1116 | "node_modules/d3-time": { 1117 | "version": "3.1.0", 1118 | "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", 1119 | "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", 1120 | "license": "ISC", 1121 | "dependencies": { 1122 | "d3-array": "2 - 3" 1123 | }, 1124 | "engines": { 1125 | "node": ">=12" 1126 | } 1127 | }, 1128 | "node_modules/d3-time-format": { 1129 | "version": "4.1.0", 1130 | "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", 1131 | "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", 1132 | "license": "ISC", 1133 | "dependencies": { 1134 | "d3-time": "1 - 3" 1135 | }, 1136 | "engines": { 1137 | "node": ">=12" 1138 | } 1139 | }, 1140 | "node_modules/d3-timer": { 1141 | "version": "3.0.1", 1142 | "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", 1143 | "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", 1144 | "license": "ISC", 1145 | "engines": { 1146 | "node": ">=12" 1147 | } 1148 | }, 1149 | "node_modules/d3-transition": { 1150 | "version": "3.0.1", 1151 | "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", 1152 | "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", 1153 | "license": "ISC", 1154 | "dependencies": { 1155 | "d3-color": "1 - 3", 1156 | "d3-dispatch": "1 - 3", 1157 | "d3-ease": "1 - 3", 1158 | "d3-interpolate": "1 - 3", 1159 | "d3-timer": "1 - 3" 1160 | }, 1161 | "engines": { 1162 | "node": ">=12" 1163 | }, 1164 | "peerDependencies": { 1165 | "d3-selection": "2 - 3" 1166 | } 1167 | }, 1168 | "node_modules/d3-zoom": { 1169 | "version": "3.0.0", 1170 | "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", 1171 | "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", 1172 | "license": "ISC", 1173 | "dependencies": { 1174 | "d3-dispatch": "1 - 3", 1175 | "d3-drag": "2 - 3", 1176 | "d3-interpolate": "1 - 3", 1177 | "d3-selection": "2 - 3", 1178 | "d3-transition": "2 - 3" 1179 | }, 1180 | "engines": { 1181 | "node": ">=12" 1182 | } 1183 | }, 1184 | "node_modules/debug": { 1185 | "version": "4.3.7", 1186 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", 1187 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 1188 | "dev": true, 1189 | "license": "MIT", 1190 | "dependencies": { 1191 | "ms": "^2.1.3" 1192 | }, 1193 | "engines": { 1194 | "node": ">=6.0" 1195 | }, 1196 | "peerDependenciesMeta": { 1197 | "supports-color": { 1198 | "optional": true 1199 | } 1200 | } 1201 | }, 1202 | "node_modules/deep-is": { 1203 | "version": "0.1.4", 1204 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", 1205 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", 1206 | "dev": true, 1207 | "license": "MIT" 1208 | }, 1209 | "node_modules/deepmerge": { 1210 | "version": "4.3.1", 1211 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", 1212 | "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", 1213 | "dev": true, 1214 | "license": "MIT", 1215 | "engines": { 1216 | "node": ">=0.10.0" 1217 | } 1218 | }, 1219 | "node_modules/delaunator": { 1220 | "version": "5.0.1", 1221 | "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", 1222 | "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", 1223 | "license": "ISC", 1224 | "dependencies": { 1225 | "robust-predicates": "^3.0.2" 1226 | } 1227 | }, 1228 | "node_modules/escape-string-regexp": { 1229 | "version": "4.0.0", 1230 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1231 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1232 | "dev": true, 1233 | "license": "MIT", 1234 | "engines": { 1235 | "node": ">=10" 1236 | }, 1237 | "funding": { 1238 | "url": "https://github.com/sponsors/sindresorhus" 1239 | } 1240 | }, 1241 | "node_modules/eslint": { 1242 | "version": "9.13.0", 1243 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", 1244 | "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", 1245 | "dev": true, 1246 | "license": "MIT", 1247 | "dependencies": { 1248 | "@eslint-community/eslint-utils": "^4.2.0", 1249 | "@eslint-community/regexpp": "^4.11.0", 1250 | "@eslint/config-array": "^0.18.0", 1251 | "@eslint/core": "^0.7.0", 1252 | "@eslint/eslintrc": "^3.1.0", 1253 | "@eslint/js": "9.13.0", 1254 | "@eslint/plugin-kit": "^0.2.0", 1255 | "@humanfs/node": "^0.16.5", 1256 | "@humanwhocodes/module-importer": "^1.0.1", 1257 | "@humanwhocodes/retry": "^0.3.1", 1258 | "@types/estree": "^1.0.6", 1259 | "@types/json-schema": "^7.0.15", 1260 | "ajv": "^6.12.4", 1261 | "chalk": "^4.0.0", 1262 | "cross-spawn": "^7.0.2", 1263 | "debug": "^4.3.2", 1264 | "escape-string-regexp": "^4.0.0", 1265 | "eslint-scope": "^8.1.0", 1266 | "eslint-visitor-keys": "^4.1.0", 1267 | "espree": "^10.2.0", 1268 | "esquery": "^1.5.0", 1269 | "esutils": "^2.0.2", 1270 | "fast-deep-equal": "^3.1.3", 1271 | "file-entry-cache": "^8.0.0", 1272 | "find-up": "^5.0.0", 1273 | "glob-parent": "^6.0.2", 1274 | "ignore": "^5.2.0", 1275 | "imurmurhash": "^0.1.4", 1276 | "is-glob": "^4.0.0", 1277 | "json-stable-stringify-without-jsonify": "^1.0.1", 1278 | "lodash.merge": "^4.6.2", 1279 | "minimatch": "^3.1.2", 1280 | "natural-compare": "^1.4.0", 1281 | "optionator": "^0.9.3", 1282 | "text-table": "^0.2.0" 1283 | }, 1284 | "bin": { 1285 | "eslint": "bin/eslint.js" 1286 | }, 1287 | "engines": { 1288 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 1289 | }, 1290 | "funding": { 1291 | "url": "https://eslint.org/donate" 1292 | }, 1293 | "peerDependencies": { 1294 | "jiti": "*" 1295 | }, 1296 | "peerDependenciesMeta": { 1297 | "jiti": { 1298 | "optional": true 1299 | } 1300 | } 1301 | }, 1302 | "node_modules/eslint-config-prettier": { 1303 | "version": "9.1.0", 1304 | "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", 1305 | "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", 1306 | "dev": true, 1307 | "license": "MIT", 1308 | "bin": { 1309 | "eslint-config-prettier": "bin/cli.js" 1310 | }, 1311 | "peerDependencies": { 1312 | "eslint": ">=7.0.0" 1313 | } 1314 | }, 1315 | "node_modules/eslint-scope": { 1316 | "version": "8.2.0", 1317 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", 1318 | "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", 1319 | "dev": true, 1320 | "license": "BSD-2-Clause", 1321 | "dependencies": { 1322 | "esrecurse": "^4.3.0", 1323 | "estraverse": "^5.2.0" 1324 | }, 1325 | "engines": { 1326 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 1327 | }, 1328 | "funding": { 1329 | "url": "https://opencollective.com/eslint" 1330 | } 1331 | }, 1332 | "node_modules/eslint-visitor-keys": { 1333 | "version": "4.2.0", 1334 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", 1335 | "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", 1336 | "dev": true, 1337 | "license": "Apache-2.0", 1338 | "engines": { 1339 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 1340 | }, 1341 | "funding": { 1342 | "url": "https://opencollective.com/eslint" 1343 | } 1344 | }, 1345 | "node_modules/eslint/node_modules/chalk": { 1346 | "version": "4.1.0", 1347 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", 1348 | "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", 1349 | "dev": true, 1350 | "dependencies": { 1351 | "ansi-styles": "^4.1.0", 1352 | "supports-color": "^7.1.0" 1353 | }, 1354 | "engines": { 1355 | "node": ">=10" 1356 | }, 1357 | "funding": { 1358 | "url": "https://github.com/chalk/chalk?sponsor=1" 1359 | } 1360 | }, 1361 | "node_modules/eslint/node_modules/chalk/node_modules/ansi-styles": { 1362 | "version": "4.3.0", 1363 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1364 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1365 | "dev": true, 1366 | "dependencies": { 1367 | "color-convert": "^2.0.1" 1368 | }, 1369 | "engines": { 1370 | "node": ">=8" 1371 | }, 1372 | "funding": { 1373 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 1374 | } 1375 | }, 1376 | "node_modules/eslint/node_modules/chalk/node_modules/supports-color": { 1377 | "version": "7.2.0", 1378 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1379 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1380 | "dev": true, 1381 | "dependencies": { 1382 | "has-flag": "^4.0.0" 1383 | }, 1384 | "engines": { 1385 | "node": ">=8" 1386 | } 1387 | }, 1388 | "node_modules/eslint/node_modules/color-convert": { 1389 | "version": "2.0.1", 1390 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1391 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1392 | "dev": true, 1393 | "dependencies": { 1394 | "color-name": "~1.1.4" 1395 | }, 1396 | "engines": { 1397 | "node": ">=7.0.0" 1398 | } 1399 | }, 1400 | "node_modules/eslint/node_modules/color-name": { 1401 | "version": "1.1.4", 1402 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1403 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1404 | "dev": true 1405 | }, 1406 | "node_modules/eslint/node_modules/has-flag": { 1407 | "version": "4.0.0", 1408 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1409 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1410 | "dev": true, 1411 | "engines": { 1412 | "node": ">=8" 1413 | } 1414 | }, 1415 | "node_modules/espree": { 1416 | "version": "10.3.0", 1417 | "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", 1418 | "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", 1419 | "dev": true, 1420 | "license": "BSD-2-Clause", 1421 | "dependencies": { 1422 | "acorn": "^8.14.0", 1423 | "acorn-jsx": "^5.3.2", 1424 | "eslint-visitor-keys": "^4.2.0" 1425 | }, 1426 | "engines": { 1427 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 1428 | }, 1429 | "funding": { 1430 | "url": "https://opencollective.com/eslint" 1431 | } 1432 | }, 1433 | "node_modules/esquery": { 1434 | "version": "1.6.0", 1435 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", 1436 | "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", 1437 | "dev": true, 1438 | "license": "BSD-3-Clause", 1439 | "dependencies": { 1440 | "estraverse": "^5.1.0" 1441 | }, 1442 | "engines": { 1443 | "node": ">=0.10" 1444 | } 1445 | }, 1446 | "node_modules/esrecurse": { 1447 | "version": "4.3.0", 1448 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 1449 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 1450 | "dev": true, 1451 | "license": "BSD-2-Clause", 1452 | "dependencies": { 1453 | "estraverse": "^5.2.0" 1454 | }, 1455 | "engines": { 1456 | "node": ">=4.0" 1457 | } 1458 | }, 1459 | "node_modules/estraverse": { 1460 | "version": "5.3.0", 1461 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 1462 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 1463 | "dev": true, 1464 | "license": "BSD-2-Clause", 1465 | "engines": { 1466 | "node": ">=4.0" 1467 | } 1468 | }, 1469 | "node_modules/estree-walker": { 1470 | "version": "0.2.1", 1471 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", 1472 | "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=", 1473 | "dev": true 1474 | }, 1475 | "node_modules/esutils": { 1476 | "version": "2.0.3", 1477 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 1478 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 1479 | "dev": true, 1480 | "license": "BSD-2-Clause", 1481 | "engines": { 1482 | "node": ">=0.10.0" 1483 | } 1484 | }, 1485 | "node_modules/fast-deep-equal": { 1486 | "version": "3.1.3", 1487 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 1488 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 1489 | "dev": true, 1490 | "license": "MIT" 1491 | }, 1492 | "node_modules/fast-json-stable-stringify": { 1493 | "version": "2.1.0", 1494 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 1495 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 1496 | "dev": true, 1497 | "license": "MIT" 1498 | }, 1499 | "node_modules/fast-levenshtein": { 1500 | "version": "2.0.6", 1501 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 1502 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", 1503 | "dev": true, 1504 | "license": "MIT" 1505 | }, 1506 | "node_modules/fdir": { 1507 | "version": "6.4.2", 1508 | "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", 1509 | "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", 1510 | "dev": true, 1511 | "license": "MIT", 1512 | "peerDependencies": { 1513 | "picomatch": "^3 || ^4" 1514 | }, 1515 | "peerDependenciesMeta": { 1516 | "picomatch": { 1517 | "optional": true 1518 | } 1519 | } 1520 | }, 1521 | "node_modules/file-entry-cache": { 1522 | "version": "8.0.0", 1523 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", 1524 | "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", 1525 | "dev": true, 1526 | "license": "MIT", 1527 | "dependencies": { 1528 | "flat-cache": "^4.0.0" 1529 | }, 1530 | "engines": { 1531 | "node": ">=16.0.0" 1532 | } 1533 | }, 1534 | "node_modules/find-up": { 1535 | "version": "5.0.0", 1536 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1537 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1538 | "dev": true, 1539 | "license": "MIT", 1540 | "dependencies": { 1541 | "locate-path": "^6.0.0", 1542 | "path-exists": "^4.0.0" 1543 | }, 1544 | "engines": { 1545 | "node": ">=10" 1546 | }, 1547 | "funding": { 1548 | "url": "https://github.com/sponsors/sindresorhus" 1549 | } 1550 | }, 1551 | "node_modules/flat-cache": { 1552 | "version": "4.0.1", 1553 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", 1554 | "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", 1555 | "dev": true, 1556 | "license": "MIT", 1557 | "dependencies": { 1558 | "flatted": "^3.2.9", 1559 | "keyv": "^4.5.4" 1560 | }, 1561 | "engines": { 1562 | "node": ">=16" 1563 | } 1564 | }, 1565 | "node_modules/flatted": { 1566 | "version": "3.3.1", 1567 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", 1568 | "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", 1569 | "dev": true, 1570 | "license": "ISC" 1571 | }, 1572 | "node_modules/fsevents": { 1573 | "version": "2.3.2", 1574 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1575 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1576 | "dev": true, 1577 | "hasInstallScript": true, 1578 | "optional": true, 1579 | "os": [ 1580 | "darwin" 1581 | ], 1582 | "engines": { 1583 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 1584 | } 1585 | }, 1586 | "node_modules/function-bind": { 1587 | "version": "1.1.2", 1588 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 1589 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 1590 | "dev": true, 1591 | "license": "MIT", 1592 | "funding": { 1593 | "url": "https://github.com/sponsors/ljharb" 1594 | } 1595 | }, 1596 | "node_modules/glob-parent": { 1597 | "version": "6.0.2", 1598 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", 1599 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", 1600 | "dev": true, 1601 | "license": "ISC", 1602 | "dependencies": { 1603 | "is-glob": "^4.0.3" 1604 | }, 1605 | "engines": { 1606 | "node": ">=10.13.0" 1607 | } 1608 | }, 1609 | "node_modules/globals": { 1610 | "version": "14.0.0", 1611 | "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", 1612 | "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", 1613 | "dev": true, 1614 | "license": "MIT", 1615 | "engines": { 1616 | "node": ">=18" 1617 | }, 1618 | "funding": { 1619 | "url": "https://github.com/sponsors/sindresorhus" 1620 | } 1621 | }, 1622 | "node_modules/hasown": { 1623 | "version": "2.0.2", 1624 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 1625 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 1626 | "dev": true, 1627 | "license": "MIT", 1628 | "dependencies": { 1629 | "function-bind": "^1.1.2" 1630 | }, 1631 | "engines": { 1632 | "node": ">= 0.4" 1633 | } 1634 | }, 1635 | "node_modules/iconv-lite": { 1636 | "version": "0.6.3", 1637 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 1638 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 1639 | "license": "MIT", 1640 | "dependencies": { 1641 | "safer-buffer": ">= 2.1.2 < 3.0.0" 1642 | }, 1643 | "engines": { 1644 | "node": ">=0.10.0" 1645 | } 1646 | }, 1647 | "node_modules/ignore": { 1648 | "version": "5.3.2", 1649 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", 1650 | "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", 1651 | "dev": true, 1652 | "license": "MIT", 1653 | "engines": { 1654 | "node": ">= 4" 1655 | } 1656 | }, 1657 | "node_modules/import-fresh": { 1658 | "version": "3.3.0", 1659 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 1660 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 1661 | "dev": true, 1662 | "license": "MIT", 1663 | "dependencies": { 1664 | "parent-module": "^1.0.0", 1665 | "resolve-from": "^4.0.0" 1666 | }, 1667 | "engines": { 1668 | "node": ">=6" 1669 | }, 1670 | "funding": { 1671 | "url": "https://github.com/sponsors/sindresorhus" 1672 | } 1673 | }, 1674 | "node_modules/imurmurhash": { 1675 | "version": "0.1.4", 1676 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1677 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 1678 | "dev": true, 1679 | "engines": { 1680 | "node": ">=0.8.19" 1681 | } 1682 | }, 1683 | "node_modules/internmap": { 1684 | "version": "2.0.3", 1685 | "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", 1686 | "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", 1687 | "license": "ISC", 1688 | "engines": { 1689 | "node": ">=12" 1690 | } 1691 | }, 1692 | "node_modules/is-core-module": { 1693 | "version": "2.15.1", 1694 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", 1695 | "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", 1696 | "dev": true, 1697 | "license": "MIT", 1698 | "dependencies": { 1699 | "hasown": "^2.0.2" 1700 | }, 1701 | "engines": { 1702 | "node": ">= 0.4" 1703 | }, 1704 | "funding": { 1705 | "url": "https://github.com/sponsors/ljharb" 1706 | } 1707 | }, 1708 | "node_modules/is-extglob": { 1709 | "version": "2.1.1", 1710 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1711 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1712 | "dev": true, 1713 | "license": "MIT", 1714 | "engines": { 1715 | "node": ">=0.10.0" 1716 | } 1717 | }, 1718 | "node_modules/is-glob": { 1719 | "version": "4.0.3", 1720 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1721 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1722 | "dev": true, 1723 | "license": "MIT", 1724 | "dependencies": { 1725 | "is-extglob": "^2.1.1" 1726 | }, 1727 | "engines": { 1728 | "node": ">=0.10.0" 1729 | } 1730 | }, 1731 | "node_modules/is-module": { 1732 | "version": "1.0.0", 1733 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 1734 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 1735 | "dev": true 1736 | }, 1737 | "node_modules/is-reference": { 1738 | "version": "1.2.1", 1739 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", 1740 | "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", 1741 | "dev": true, 1742 | "license": "MIT", 1743 | "dependencies": { 1744 | "@types/estree": "*" 1745 | } 1746 | }, 1747 | "node_modules/isexe": { 1748 | "version": "2.0.0", 1749 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1750 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1751 | "dev": true 1752 | }, 1753 | "node_modules/js-yaml": { 1754 | "version": "4.1.0", 1755 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1756 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1757 | "dev": true, 1758 | "license": "MIT", 1759 | "dependencies": { 1760 | "argparse": "^2.0.1" 1761 | }, 1762 | "bin": { 1763 | "js-yaml": "bin/js-yaml.js" 1764 | } 1765 | }, 1766 | "node_modules/jsesc": { 1767 | "version": "2.5.2", 1768 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", 1769 | "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", 1770 | "dev": true, 1771 | "bin": { 1772 | "jsesc": "bin/jsesc" 1773 | }, 1774 | "engines": { 1775 | "node": ">=4" 1776 | } 1777 | }, 1778 | "node_modules/json-buffer": { 1779 | "version": "3.0.1", 1780 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", 1781 | "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", 1782 | "dev": true, 1783 | "license": "MIT" 1784 | }, 1785 | "node_modules/json-schema-traverse": { 1786 | "version": "0.4.1", 1787 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1788 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1789 | "dev": true, 1790 | "license": "MIT" 1791 | }, 1792 | "node_modules/json-stable-stringify-without-jsonify": { 1793 | "version": "1.0.1", 1794 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1795 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 1796 | "dev": true 1797 | }, 1798 | "node_modules/keyv": { 1799 | "version": "4.5.4", 1800 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", 1801 | "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", 1802 | "dev": true, 1803 | "license": "MIT", 1804 | "dependencies": { 1805 | "json-buffer": "3.0.1" 1806 | } 1807 | }, 1808 | "node_modules/levn": { 1809 | "version": "0.4.1", 1810 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 1811 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 1812 | "dev": true, 1813 | "license": "MIT", 1814 | "dependencies": { 1815 | "prelude-ls": "^1.2.1", 1816 | "type-check": "~0.4.0" 1817 | }, 1818 | "engines": { 1819 | "node": ">= 0.8.0" 1820 | } 1821 | }, 1822 | "node_modules/locate-path": { 1823 | "version": "6.0.0", 1824 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1825 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1826 | "dev": true, 1827 | "license": "MIT", 1828 | "dependencies": { 1829 | "p-locate": "^5.0.0" 1830 | }, 1831 | "engines": { 1832 | "node": ">=10" 1833 | }, 1834 | "funding": { 1835 | "url": "https://github.com/sponsors/sindresorhus" 1836 | } 1837 | }, 1838 | "node_modules/lodash.merge": { 1839 | "version": "4.6.2", 1840 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", 1841 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", 1842 | "dev": true, 1843 | "license": "MIT" 1844 | }, 1845 | "node_modules/magic-string": { 1846 | "version": "0.15.2", 1847 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.15.2.tgz", 1848 | "integrity": "sha1-BoHXOIdBu8Ot2qZQYJkmJMbAnpw=", 1849 | "dev": true, 1850 | "dependencies": { 1851 | "vlq": "^0.2.1" 1852 | } 1853 | }, 1854 | "node_modules/minimatch": { 1855 | "version": "3.1.2", 1856 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1857 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1858 | "dev": true, 1859 | "license": "ISC", 1860 | "dependencies": { 1861 | "brace-expansion": "^1.1.7" 1862 | }, 1863 | "engines": { 1864 | "node": "*" 1865 | } 1866 | }, 1867 | "node_modules/ms": { 1868 | "version": "2.1.3", 1869 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1870 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1871 | "dev": true, 1872 | "license": "MIT" 1873 | }, 1874 | "node_modules/natural-compare": { 1875 | "version": "1.4.0", 1876 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 1877 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 1878 | "dev": true 1879 | }, 1880 | "node_modules/optionator": { 1881 | "version": "0.9.4", 1882 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", 1883 | "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", 1884 | "dev": true, 1885 | "license": "MIT", 1886 | "dependencies": { 1887 | "deep-is": "^0.1.3", 1888 | "fast-levenshtein": "^2.0.6", 1889 | "levn": "^0.4.1", 1890 | "prelude-ls": "^1.2.1", 1891 | "type-check": "^0.4.0", 1892 | "word-wrap": "^1.2.5" 1893 | }, 1894 | "engines": { 1895 | "node": ">= 0.8.0" 1896 | } 1897 | }, 1898 | "node_modules/p-limit": { 1899 | "version": "3.1.0", 1900 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1901 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1902 | "dev": true, 1903 | "license": "MIT", 1904 | "dependencies": { 1905 | "yocto-queue": "^0.1.0" 1906 | }, 1907 | "engines": { 1908 | "node": ">=10" 1909 | }, 1910 | "funding": { 1911 | "url": "https://github.com/sponsors/sindresorhus" 1912 | } 1913 | }, 1914 | "node_modules/p-locate": { 1915 | "version": "5.0.0", 1916 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1917 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1918 | "dev": true, 1919 | "license": "MIT", 1920 | "dependencies": { 1921 | "p-limit": "^3.0.2" 1922 | }, 1923 | "engines": { 1924 | "node": ">=10" 1925 | }, 1926 | "funding": { 1927 | "url": "https://github.com/sponsors/sindresorhus" 1928 | } 1929 | }, 1930 | "node_modules/parent-module": { 1931 | "version": "1.0.1", 1932 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1933 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1934 | "dev": true, 1935 | "license": "MIT", 1936 | "dependencies": { 1937 | "callsites": "^3.0.0" 1938 | }, 1939 | "engines": { 1940 | "node": ">=6" 1941 | } 1942 | }, 1943 | "node_modules/path-exists": { 1944 | "version": "4.0.0", 1945 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1946 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1947 | "dev": true, 1948 | "license": "MIT", 1949 | "engines": { 1950 | "node": ">=8" 1951 | } 1952 | }, 1953 | "node_modules/path-key": { 1954 | "version": "3.1.1", 1955 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1956 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1957 | "dev": true, 1958 | "engines": { 1959 | "node": ">=8" 1960 | } 1961 | }, 1962 | "node_modules/path-parse": { 1963 | "version": "1.0.7", 1964 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1965 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1966 | "dev": true, 1967 | "license": "MIT" 1968 | }, 1969 | "node_modules/picomatch": { 1970 | "version": "4.0.2", 1971 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", 1972 | "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", 1973 | "dev": true, 1974 | "license": "MIT", 1975 | "engines": { 1976 | "node": ">=12" 1977 | }, 1978 | "funding": { 1979 | "url": "https://github.com/sponsors/jonschlinkert" 1980 | } 1981 | }, 1982 | "node_modules/prelude-ls": { 1983 | "version": "1.2.1", 1984 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 1985 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 1986 | "dev": true, 1987 | "license": "MIT", 1988 | "engines": { 1989 | "node": ">= 0.8.0" 1990 | } 1991 | }, 1992 | "node_modules/prettier": { 1993 | "version": "3.3.3", 1994 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", 1995 | "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", 1996 | "dev": true, 1997 | "license": "MIT", 1998 | "bin": { 1999 | "prettier": "bin/prettier.cjs" 2000 | }, 2001 | "engines": { 2002 | "node": ">=14" 2003 | }, 2004 | "funding": { 2005 | "url": "https://github.com/prettier/prettier?sponsor=1" 2006 | } 2007 | }, 2008 | "node_modules/punycode": { 2009 | "version": "2.3.1", 2010 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 2011 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 2012 | "dev": true, 2013 | "license": "MIT", 2014 | "engines": { 2015 | "node": ">=6" 2016 | } 2017 | }, 2018 | "node_modules/randombytes": { 2019 | "version": "2.1.0", 2020 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 2021 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 2022 | "dev": true, 2023 | "license": "MIT", 2024 | "dependencies": { 2025 | "safe-buffer": "^5.1.0" 2026 | } 2027 | }, 2028 | "node_modules/resolve": { 2029 | "version": "1.22.8", 2030 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", 2031 | "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", 2032 | "dev": true, 2033 | "license": "MIT", 2034 | "dependencies": { 2035 | "is-core-module": "^2.13.0", 2036 | "path-parse": "^1.0.7", 2037 | "supports-preserve-symlinks-flag": "^1.0.0" 2038 | }, 2039 | "bin": { 2040 | "resolve": "bin/resolve" 2041 | }, 2042 | "funding": { 2043 | "url": "https://github.com/sponsors/ljharb" 2044 | } 2045 | }, 2046 | "node_modules/resolve-from": { 2047 | "version": "4.0.0", 2048 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 2049 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 2050 | "dev": true, 2051 | "license": "MIT", 2052 | "engines": { 2053 | "node": ">=4" 2054 | } 2055 | }, 2056 | "node_modules/robust-predicates": { 2057 | "version": "3.0.2", 2058 | "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", 2059 | "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", 2060 | "license": "Unlicense" 2061 | }, 2062 | "node_modules/rollup": { 2063 | "version": "4.24.3", 2064 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", 2065 | "integrity": "sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==", 2066 | "dev": true, 2067 | "license": "MIT", 2068 | "dependencies": { 2069 | "@types/estree": "1.0.6" 2070 | }, 2071 | "bin": { 2072 | "rollup": "dist/bin/rollup" 2073 | }, 2074 | "engines": { 2075 | "node": ">=18.0.0", 2076 | "npm": ">=8.0.0" 2077 | }, 2078 | "optionalDependencies": { 2079 | "@rollup/rollup-android-arm-eabi": "4.24.3", 2080 | "@rollup/rollup-android-arm64": "4.24.3", 2081 | "@rollup/rollup-darwin-arm64": "4.24.3", 2082 | "@rollup/rollup-darwin-x64": "4.24.3", 2083 | "@rollup/rollup-freebsd-arm64": "4.24.3", 2084 | "@rollup/rollup-freebsd-x64": "4.24.3", 2085 | "@rollup/rollup-linux-arm-gnueabihf": "4.24.3", 2086 | "@rollup/rollup-linux-arm-musleabihf": "4.24.3", 2087 | "@rollup/rollup-linux-arm64-gnu": "4.24.3", 2088 | "@rollup/rollup-linux-arm64-musl": "4.24.3", 2089 | "@rollup/rollup-linux-powerpc64le-gnu": "4.24.3", 2090 | "@rollup/rollup-linux-riscv64-gnu": "4.24.3", 2091 | "@rollup/rollup-linux-s390x-gnu": "4.24.3", 2092 | "@rollup/rollup-linux-x64-gnu": "4.24.3", 2093 | "@rollup/rollup-linux-x64-musl": "4.24.3", 2094 | "@rollup/rollup-win32-arm64-msvc": "4.24.3", 2095 | "@rollup/rollup-win32-ia32-msvc": "4.24.3", 2096 | "@rollup/rollup-win32-x64-msvc": "4.24.3", 2097 | "fsevents": "~2.3.2" 2098 | } 2099 | }, 2100 | "node_modules/rollup-plugin-ascii": { 2101 | "version": "0.0.3", 2102 | "resolved": "https://registry.npmjs.org/rollup-plugin-ascii/-/rollup-plugin-ascii-0.0.3.tgz", 2103 | "integrity": "sha1-IFem1lwAVz0cpbJknOTlMbBCzec=", 2104 | "dev": true, 2105 | "dependencies": { 2106 | "acorn": "^3.2.0", 2107 | "estree-walker": "^0.2.1", 2108 | "jsesc": "^2.2.0", 2109 | "magic-string": "^0.15.1", 2110 | "rollup-pluginutils": "^1.5.0" 2111 | } 2112 | }, 2113 | "node_modules/rollup-plugin-ascii/node_modules/acorn": { 2114 | "version": "3.3.0", 2115 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", 2116 | "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", 2117 | "dev": true, 2118 | "bin": { 2119 | "acorn": "bin/acorn" 2120 | }, 2121 | "engines": { 2122 | "node": ">=0.4.0" 2123 | } 2124 | }, 2125 | "node_modules/rollup-plugin-commonjs": { 2126 | "version": "9.3.4", 2127 | "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz", 2128 | "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==", 2129 | "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.", 2130 | "dev": true, 2131 | "dependencies": { 2132 | "estree-walker": "^0.6.0", 2133 | "magic-string": "^0.25.2", 2134 | "resolve": "^1.10.0", 2135 | "rollup-pluginutils": "^2.6.0" 2136 | }, 2137 | "peerDependencies": { 2138 | "rollup": ">=0.56.0" 2139 | } 2140 | }, 2141 | "node_modules/rollup-plugin-commonjs/node_modules/estree-walker": { 2142 | "version": "0.6.1", 2143 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 2144 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 2145 | "dev": true 2146 | }, 2147 | "node_modules/rollup-plugin-commonjs/node_modules/magic-string": { 2148 | "version": "0.25.7", 2149 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 2150 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 2151 | "dev": true, 2152 | "dependencies": { 2153 | "sourcemap-codec": "^1.4.4" 2154 | } 2155 | }, 2156 | "node_modules/rollup-plugin-commonjs/node_modules/rollup-pluginutils": { 2157 | "version": "2.8.2", 2158 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 2159 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 2160 | "dev": true, 2161 | "dependencies": { 2162 | "estree-walker": "^0.6.1" 2163 | } 2164 | }, 2165 | "node_modules/rollup-pluginutils": { 2166 | "version": "1.5.2", 2167 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", 2168 | "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", 2169 | "dev": true, 2170 | "dependencies": { 2171 | "estree-walker": "^0.2.1", 2172 | "minimatch": "^3.0.2" 2173 | } 2174 | }, 2175 | "node_modules/rw": { 2176 | "version": "1.3.3", 2177 | "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", 2178 | "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", 2179 | "license": "BSD-3-Clause" 2180 | }, 2181 | "node_modules/safe-buffer": { 2182 | "version": "5.2.1", 2183 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 2184 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 2185 | "dev": true, 2186 | "funding": [ 2187 | { 2188 | "type": "github", 2189 | "url": "https://github.com/sponsors/feross" 2190 | }, 2191 | { 2192 | "type": "patreon", 2193 | "url": "https://www.patreon.com/feross" 2194 | }, 2195 | { 2196 | "type": "consulting", 2197 | "url": "https://feross.org/support" 2198 | } 2199 | ], 2200 | "license": "MIT" 2201 | }, 2202 | "node_modules/safer-buffer": { 2203 | "version": "2.1.2", 2204 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 2205 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 2206 | "license": "MIT" 2207 | }, 2208 | "node_modules/serialize-javascript": { 2209 | "version": "6.0.2", 2210 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 2211 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 2212 | "dev": true, 2213 | "license": "BSD-3-Clause", 2214 | "dependencies": { 2215 | "randombytes": "^2.1.0" 2216 | } 2217 | }, 2218 | "node_modules/shebang-command": { 2219 | "version": "2.0.0", 2220 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 2221 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 2222 | "dev": true, 2223 | "dependencies": { 2224 | "shebang-regex": "^3.0.0" 2225 | }, 2226 | "engines": { 2227 | "node": ">=8" 2228 | } 2229 | }, 2230 | "node_modules/shebang-regex": { 2231 | "version": "3.0.0", 2232 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 2233 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 2234 | "dev": true, 2235 | "engines": { 2236 | "node": ">=8" 2237 | } 2238 | }, 2239 | "node_modules/smob": { 2240 | "version": "1.5.0", 2241 | "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", 2242 | "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", 2243 | "dev": true, 2244 | "license": "MIT" 2245 | }, 2246 | "node_modules/source-map": { 2247 | "version": "0.6.1", 2248 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 2249 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 2250 | "dev": true, 2251 | "license": "BSD-3-Clause", 2252 | "engines": { 2253 | "node": ">=0.10.0" 2254 | } 2255 | }, 2256 | "node_modules/source-map-support": { 2257 | "version": "0.5.21", 2258 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", 2259 | "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", 2260 | "dev": true, 2261 | "license": "MIT", 2262 | "dependencies": { 2263 | "buffer-from": "^1.0.0", 2264 | "source-map": "^0.6.0" 2265 | } 2266 | }, 2267 | "node_modules/sourcemap-codec": { 2268 | "version": "1.4.8", 2269 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 2270 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 2271 | "deprecated": "Please use @jridgewell/sourcemap-codec instead", 2272 | "dev": true 2273 | }, 2274 | "node_modules/strip-json-comments": { 2275 | "version": "3.1.1", 2276 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2277 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2278 | "dev": true, 2279 | "license": "MIT", 2280 | "engines": { 2281 | "node": ">=8" 2282 | }, 2283 | "funding": { 2284 | "url": "https://github.com/sponsors/sindresorhus" 2285 | } 2286 | }, 2287 | "node_modules/supports-preserve-symlinks-flag": { 2288 | "version": "1.0.0", 2289 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 2290 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 2291 | "dev": true, 2292 | "license": "MIT", 2293 | "engines": { 2294 | "node": ">= 0.4" 2295 | }, 2296 | "funding": { 2297 | "url": "https://github.com/sponsors/ljharb" 2298 | } 2299 | }, 2300 | "node_modules/terser": { 2301 | "version": "5.36.0", 2302 | "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", 2303 | "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", 2304 | "dev": true, 2305 | "license": "BSD-2-Clause", 2306 | "dependencies": { 2307 | "@jridgewell/source-map": "^0.3.3", 2308 | "acorn": "^8.8.2", 2309 | "commander": "^2.20.0", 2310 | "source-map-support": "~0.5.20" 2311 | }, 2312 | "bin": { 2313 | "terser": "bin/terser" 2314 | }, 2315 | "engines": { 2316 | "node": ">=10" 2317 | } 2318 | }, 2319 | "node_modules/text-table": { 2320 | "version": "0.2.0", 2321 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2322 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2323 | "dev": true 2324 | }, 2325 | "node_modules/type-check": { 2326 | "version": "0.4.0", 2327 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 2328 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 2329 | "dev": true, 2330 | "license": "MIT", 2331 | "dependencies": { 2332 | "prelude-ls": "^1.2.1" 2333 | }, 2334 | "engines": { 2335 | "node": ">= 0.8.0" 2336 | } 2337 | }, 2338 | "node_modules/uri-js": { 2339 | "version": "4.4.1", 2340 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 2341 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 2342 | "dev": true, 2343 | "license": "BSD-2-Clause", 2344 | "dependencies": { 2345 | "punycode": "^2.1.0" 2346 | } 2347 | }, 2348 | "node_modules/vlq": { 2349 | "version": "0.2.3", 2350 | "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", 2351 | "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", 2352 | "dev": true 2353 | }, 2354 | "node_modules/which": { 2355 | "version": "2.0.2", 2356 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2357 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2358 | "dev": true, 2359 | "dependencies": { 2360 | "isexe": "^2.0.0" 2361 | }, 2362 | "bin": { 2363 | "node-which": "bin/node-which" 2364 | }, 2365 | "engines": { 2366 | "node": ">= 8" 2367 | } 2368 | }, 2369 | "node_modules/word-wrap": { 2370 | "version": "1.2.5", 2371 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", 2372 | "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", 2373 | "dev": true, 2374 | "license": "MIT", 2375 | "engines": { 2376 | "node": ">=0.10.0" 2377 | } 2378 | }, 2379 | "node_modules/yocto-queue": { 2380 | "version": "0.1.0", 2381 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2382 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2383 | "dev": true, 2384 | "license": "MIT", 2385 | "engines": { 2386 | "node": ">=10" 2387 | }, 2388 | "funding": { 2389 | "url": "https://github.com/sponsors/sindresorhus" 2390 | } 2391 | } 2392 | } 2393 | } 2394 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "force-in-a-box", 3 | "version": "1.0.2", 4 | "description": "forceInABox.js a d3 force for separating nodes in a d3.forceSimulation by their cluster or other attributes, using the group-in-a-box algorithm", 5 | "author": "John Alexis Guerra Gómez", 6 | "type": "module", 7 | "main": "src/forceInABox.js", 8 | "module": "dist/forceInABox.esm.js", 9 | "browser": "dist/forceInABox.min.js", 10 | "unpkg": "dist/forceInABox.min.js", 11 | "jsdelivr": "dist/forceInABox.min.js", 12 | "directories": { 13 | "example": "example" 14 | }, 15 | "scripts": { 16 | "build": "rollup -c", 17 | "dev": "rollup -c -w", 18 | "test": "node test/test.js", 19 | "pretest": "npm run build" 20 | }, 21 | "repository": { 22 | "type": "git", 23 | "url": "git+https://github.com/john-guerra/forceInABox.git" 24 | }, 25 | "keywords": [], 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/john-guerra/forceInABox/issues" 29 | }, 30 | "homepage": "https://github.com/john-guerra/forceInABox#readme", 31 | "dependencies": { 32 | "d3": "^7.9.0" 33 | }, 34 | "devDependencies": { 35 | "@rollup/plugin-commonjs": "^28.0.1", 36 | "@rollup/plugin-node-resolve": "^15.3.0", 37 | "@rollup/plugin-terser": "^0.4.4", 38 | "eslint": "^9.13.0", 39 | "eslint-config-prettier": "^9.1.0", 40 | "prettier": "^3.3.3", 41 | "rollup": "^4.24.3", 42 | "rollup-plugin-ascii": "0.0.3" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | // const definition = require("./package.json"); 2 | // const dependencies = Object.keys(definition.dependencies); 3 | 4 | // export default { 5 | // input: "index.js", 6 | // external: dependencies, 7 | // output: { 8 | // extend: true, 9 | // file: `build/${definition.name}.js`, 10 | // format: "umd", 11 | // globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}), 12 | // name: "d3" 13 | // } 14 | // }; 15 | 16 | import ascii from "rollup-plugin-ascii"; 17 | import node from "@rollup/plugin-node-resolve"; 18 | import commonjs from "@rollup/plugin-commonjs"; 19 | import terser from "@rollup/plugin-terser"; 20 | import meta from "./package.json" assert { type: "json" }; 21 | 22 | const copyright = `// ${meta.homepage} v${ 23 | meta.version 24 | } Copyright ${new Date().getFullYear()} ${meta.author.name}`; 25 | 26 | export default [ 27 | { 28 | input: "src/forceInABox.js", 29 | plugins: [ 30 | node({ 31 | jsxnext: true, 32 | main: true, 33 | browser: true, 34 | }), 35 | ascii(), 36 | ], 37 | external: ["d3"], 38 | output: { 39 | extend: true, 40 | banner: copyright, 41 | file: "dist/forceInABox.js", 42 | format: "umd", 43 | indent: false, 44 | name: "forceInABox", 45 | globals: { 46 | d3: "d3", 47 | "d3-scale-chromatic": "d3ScaleChromatic", 48 | }, 49 | }, 50 | }, 51 | { 52 | input: "src/forceInABox.js", 53 | plugins: [ 54 | node({ 55 | jsxnext: true, 56 | }), 57 | ascii(), 58 | commonjs(), 59 | ], 60 | external: ["d3"], 61 | output: { 62 | extend: true, 63 | banner: copyright, 64 | file: meta.module, 65 | format: "esm", 66 | indent: false, 67 | name: "forceInABox", 68 | globals: { 69 | d3: "d3", 70 | "d3-scale-chromatic": "d3ScaleChromatic", 71 | }, 72 | }, 73 | }, 74 | { 75 | input: "src/forceInABox", 76 | plugins: [ 77 | node({ 78 | jsxnext: true, 79 | main: true, 80 | browser: true, 81 | }), 82 | ascii(), 83 | terser({ output: { preamble: copyright } }), 84 | ], 85 | external: ["d3", "d3-scale-chromatic"], 86 | output: { 87 | extend: true, 88 | file: "dist/forceInABox.min.js", 89 | format: "umd", 90 | indent: false, 91 | name: "forceInABox", 92 | globals: { 93 | d3: "d3", 94 | "d3-scale-chromatic": "d3ScaleChromatic", 95 | }, 96 | }, 97 | }, 98 | ]; 99 | -------------------------------------------------------------------------------- /src/forceInABox.js: -------------------------------------------------------------------------------- 1 | import * as d3 from "d3"; 2 | 3 | export default function forceInABox() { 4 | // d3 style 5 | function constant(_) { 6 | return () => _; 7 | } 8 | 9 | function index(d) { 10 | return d.index; 11 | } 12 | 13 | let id = index, 14 | nodes = [], 15 | links = [], //needed for the force version 16 | tree, 17 | size = [100, 100], 18 | forceNodeSize = constant(1), // The expected node size used for computing the cluster node 19 | forceCharge = constant(-1), 20 | forceLinkDistance = constant(100), 21 | forceLinkStrength = constant(0.1), 22 | foci = {}, 23 | // oldStart = force.start, 24 | linkStrengthIntraCluster = 0.1, 25 | linkStrengthInterCluster = 0.001, 26 | // oldGravity = force.gravity(), 27 | templateNodes = [], 28 | offset = [0, 0], 29 | templateForce, 30 | groupBy = function (d) { 31 | return d.cluster; 32 | }, 33 | template = "treemap", 34 | enableGrouping = true, 35 | strength = 0.1; 36 | // showingTemplate = false; 37 | 38 | function force(alpha) { 39 | if (!enableGrouping) { 40 | return force; 41 | } 42 | if (template === "force") { 43 | //Do the tick of the template force and get the new focis 44 | templateForce.tick(); 45 | getFocisFromTemplate(); 46 | } 47 | 48 | for (let i = 0, n = nodes.length, node, k = alpha * strength; i < n; ++i) { 49 | node = nodes[i]; 50 | node.vx += (foci[groupBy(node)].x - node.x) * k; 51 | node.vy += (foci[groupBy(node)].y - node.y) * k; 52 | } 53 | } 54 | 55 | function initialize() { 56 | if (!nodes) return; 57 | 58 | // let i, 59 | // n = nodes.length, 60 | // m = links.length, 61 | // nodeById = map(nodes, id), 62 | // link; 63 | 64 | if (template === "treemap") { 65 | initializeWithTreemap(); 66 | } else { 67 | initializeWithForce(); 68 | } 69 | } 70 | 71 | force.initialize = function (_) { 72 | nodes = _; 73 | initialize(); 74 | }; 75 | 76 | function getLinkKey(l) { 77 | let sourceID = groupBy(l.source), 78 | targetID = groupBy(l.target); 79 | 80 | return sourceID <= targetID 81 | ? sourceID + "~" + targetID 82 | : targetID + "~" + sourceID; 83 | } 84 | 85 | function computeClustersNodeCounts(nodes) { 86 | let clustersCounts = new Map(), 87 | tmpCount = {}; 88 | 89 | nodes.forEach(function (d) { 90 | if (!clustersCounts.has(groupBy(d))) { 91 | clustersCounts.set(groupBy(d), { count: 0, sumforceNodeSize: 0 }); 92 | } 93 | }); 94 | 95 | nodes.forEach(function (d) { 96 | // if (!d.show) { return; } 97 | tmpCount = clustersCounts.get(groupBy(d)); 98 | tmpCount.count = tmpCount.count + 1; 99 | tmpCount.sumforceNodeSize = 100 | tmpCount.sumforceNodeSize + 101 | Math.PI * (forceNodeSize(d) * forceNodeSize(d)) * 1.3; 102 | clustersCounts.set(groupBy(d), tmpCount); 103 | }); 104 | 105 | return clustersCounts; 106 | } 107 | 108 | //Returns 109 | function computeClustersLinkCounts(links) { 110 | let dClusterLinks = new Map(), 111 | clusterLinks = []; 112 | 113 | links.forEach(function (l) { 114 | let key = getLinkKey(l), 115 | count; 116 | if (dClusterLinks.has(key)) { 117 | count = dClusterLinks.get(key); 118 | } else { 119 | count = 0; 120 | } 121 | count += 1; 122 | dClusterLinks.set(key, count); 123 | }); 124 | 125 | dClusterLinks.forEach(function (value, key) { 126 | let source, target; 127 | source = key.split("~")[0]; 128 | target = key.split("~")[1]; 129 | if (source !== undefined && target !== undefined) { 130 | clusterLinks.push({ 131 | source: source, 132 | target: target, 133 | count: value, 134 | }); 135 | } 136 | }); 137 | return clusterLinks; 138 | } 139 | 140 | //Returns the metagraph of the clusters 141 | function getGroupsGraph() { 142 | let gnodes = [], 143 | glinks = [], 144 | // edges = [], 145 | dNodes = new Map(), 146 | // totalSize = 0, 147 | c, 148 | i, 149 | cc, 150 | clustersCounts, 151 | clustersLinks; 152 | 153 | clustersCounts = computeClustersNodeCounts(nodes); 154 | clustersLinks = computeClustersLinkCounts(links); 155 | 156 | for (c of clustersCounts.keys()) { 157 | cc = clustersCounts.get(c); 158 | gnodes.push({ 159 | id: c, 160 | size: cc.count, 161 | r: Math.sqrt(cc.sumforceNodeSize / Math.PI), 162 | }); // Uses approx meta-node size 163 | dNodes.set(c, i); 164 | // totalSize += size; 165 | } 166 | 167 | clustersLinks.forEach(function (l) { 168 | let source = dNodes.get(l.source), 169 | target = dNodes.get(l.target); 170 | if (source !== undefined && target !== undefined) { 171 | glinks.push({ 172 | source: source, 173 | target: target, 174 | count: l.count, 175 | }); 176 | } else { 177 | // console.log("Force in a box error, couldn"t find the link source or target on the list of nodes"); 178 | } 179 | }); 180 | 181 | return { nodes: gnodes, links: glinks }; 182 | } 183 | 184 | function getGroupsTree() { 185 | let children = [], 186 | c, 187 | cc, 188 | clustersCounts; 189 | 190 | clustersCounts = computeClustersNodeCounts(force.nodes()); 191 | 192 | for (c of clustersCounts.keys()) { 193 | cc = clustersCounts.get(c); 194 | children.push({ id: c, size: cc.count }); 195 | } 196 | return { id: "clustersTree", children: children }; 197 | } 198 | 199 | function getFocisFromTemplate() { 200 | //compute foci 201 | foci.none = { x: 0, y: 0 }; 202 | templateNodes.forEach(function (d) { 203 | if (template === "treemap") { 204 | foci[d.data.id] = { 205 | x: d.x0 + (d.x1 - d.x0) / 2 - offset[0], 206 | y: d.y0 + (d.y1 - d.y0) / 2 - offset[1], 207 | }; 208 | } else { 209 | foci[d.id] = { 210 | x: d.x - offset[0], 211 | y: d.y - offset[1], 212 | }; 213 | } 214 | }); 215 | return foci; 216 | } 217 | 218 | function initializeWithTreemap() { 219 | let treemap = d3.treemap().size(force.size()); 220 | 221 | tree = d3 222 | .hierarchy(getGroupsTree()) 223 | .sum(function (d) { 224 | return d.size; 225 | }) 226 | .sort(function (a, b) { 227 | return b.height - a.height || b.value - a.value; 228 | }); 229 | 230 | templateNodes = treemap(tree).leaves(); 231 | getFocisFromTemplate(); 232 | } 233 | 234 | function checkLinksAsObjects() { 235 | // Check if links come in the format of indexes instead of objects 236 | let linkCount = 0; 237 | if (nodes.length === 0) return; 238 | 239 | links.forEach(function (link) { 240 | let source, target; 241 | if (!nodes) return; 242 | source = link.source; 243 | target = link.target; 244 | if (typeof link.source !== "object") source = nodes[link.source]; 245 | if (typeof link.target !== "object") target = nodes[link.target]; 246 | if (source === undefined || target === undefined) { 247 | // console.error(link); 248 | throw Error( 249 | "Error setting links, couldnt find nodes for a link (see it on the console)" 250 | ); 251 | } 252 | link.source = source; 253 | link.target = target; 254 | link.index = linkCount++; 255 | }); 256 | } 257 | 258 | function initializeWithForce() { 259 | let net; 260 | 261 | if (!nodes || !nodes.length) { 262 | return; 263 | } 264 | 265 | if (nodes && nodes.length > 0) { 266 | if (groupBy(nodes[0]) === undefined) { 267 | throw Error( 268 | "Couldnt find the grouping attribute for the nodes. Make sure to set it up with forceInABox.groupBy('clusterAttr') before calling .links()" 269 | ); 270 | } 271 | } 272 | 273 | checkLinksAsObjects(); 274 | 275 | net = getGroupsGraph(); 276 | templateForce = d3 277 | .forceSimulation(net.nodes) 278 | .force("x", d3.forceX(size[0] / 2).strength(0.1)) 279 | .force("y", d3.forceY(size[1] / 2).strength(0.1)) 280 | .force( 281 | "collide", 282 | d3 283 | .forceCollide(function (d) { 284 | return d.r; 285 | }) 286 | .iterations(4) 287 | ) 288 | .force("charge", d3.forceManyBody().strength(forceCharge)) 289 | .force( 290 | "links", 291 | d3 292 | .forceLink(net.nodes.length ? net.links : []) 293 | .distance(forceLinkDistance) 294 | .strength(forceLinkStrength) 295 | ); 296 | 297 | // console.log("Initialize with force ", templateForce.nodes().length, " ", templateForce.force("links").links().length); 298 | 299 | // let i = 0; 300 | // while (i++ < 500) templateForce.tick(); 301 | 302 | templateNodes = templateForce.nodes(); 303 | 304 | getFocisFromTemplate(); 305 | } 306 | 307 | function drawTreemap(container) { 308 | // Delete the circle Template if it exists 309 | container.selectAll("circle.cell").remove(); 310 | container.selectAll("line.cell").remove(); 311 | container 312 | .selectAll("rect.cell") 313 | .data(templateNodes) 314 | .enter() 315 | .append("svg:rect") 316 | .attr("class", "cell") 317 | .attr("x", function (d) { 318 | return d.x0; 319 | }) 320 | .attr("y", function (d) { 321 | return d.y0; 322 | }) 323 | .attr("width", function (d) { 324 | return d.x1 - d.x0; 325 | }) 326 | .attr("height", function (d) { 327 | return d.y1 - d.y0; 328 | }); 329 | } 330 | 331 | function drawGraph(container) { 332 | // Delete the treemap if any 333 | container.selectAll("rect.cell").remove(); 334 | let templateLinksSel = container 335 | .selectAll("line.cell") 336 | .data(templateForce.force("links").links()); 337 | templateLinksSel 338 | .enter() 339 | .append("line") 340 | .attr("class", "cell") 341 | .merge(templateLinksSel) 342 | .attr("x2", function (d) { 343 | return d.source.x; 344 | }) 345 | .attr("y2", function (d) { 346 | return d.source.y; 347 | }) 348 | .attr("x1", function (d) { 349 | return d.target.x; 350 | }) 351 | .attr("y1", function (d) { 352 | return d.target.y; 353 | }) 354 | .style("stroke-width", "1px") 355 | .style("stroke-opacity", "0.5"); 356 | 357 | let templateNodesSel = container 358 | .selectAll("circle.cell") 359 | .data(templateForce.nodes()); 360 | templateNodesSel 361 | .enter() 362 | .append("svg:circle") 363 | .attr("class", "cell") 364 | .merge(templateNodesSel) 365 | .attr("cx", function (d) { 366 | return d.x; 367 | }) 368 | .attr("cy", function (d) { 369 | return d.y; 370 | }) 371 | .attr("r", function (d) { 372 | return d.r; 373 | }); 374 | 375 | templateForce 376 | .on("tick", () => { 377 | // console.log("tick"); 378 | drawGraph(container); 379 | }) 380 | .restart(); 381 | 382 | templateNodesSel.exit().remove(); 383 | templateLinksSel.exit().remove(); 384 | } 385 | 386 | force.drawTemplate = function (container) { 387 | // showingTemplate = true; 388 | if (template === "treemap") { 389 | drawTreemap(container); 390 | } else { 391 | drawGraph(container); 392 | } 393 | return force; 394 | }; 395 | 396 | //Backwards compatibility 397 | force.drawTreemap = force.drawTemplate; 398 | 399 | force.deleteTemplate = function (container) { 400 | // showingTemplate = false; 401 | container.selectAll(".cell").remove(); 402 | 403 | if (templateForce) { 404 | templateForce.on("tick", null).restart(); 405 | } 406 | 407 | return force; 408 | }; 409 | 410 | force.template = function (x) { 411 | if (!arguments.length) return template; 412 | template = x; 413 | initialize(); 414 | return force; 415 | }; 416 | 417 | force.groupBy = function (x) { 418 | if (!arguments.length) return groupBy; 419 | if (typeof x === "string") { 420 | groupBy = function (d) { 421 | return d[x]; 422 | }; 423 | return force; 424 | } 425 | groupBy = x; 426 | return force; 427 | }; 428 | 429 | force.enableGrouping = function (x) { 430 | if (!arguments.length) return enableGrouping; 431 | enableGrouping = x; 432 | // update(); 433 | return force; 434 | }; 435 | 436 | force.strength = function (x) { 437 | if (!arguments.length) return strength; 438 | strength = x; 439 | return force; 440 | }; 441 | 442 | force.getLinkStrength = function (e) { 443 | if (enableGrouping) { 444 | if (groupBy(e.source) === groupBy(e.target)) { 445 | if (typeof linkStrengthIntraCluster === "function") { 446 | return linkStrengthIntraCluster(e); 447 | } else { 448 | return linkStrengthIntraCluster; 449 | } 450 | } else { 451 | if (typeof linkStrengthInterCluster === "function") { 452 | return linkStrengthInterCluster(e); 453 | } else { 454 | return linkStrengthInterCluster; 455 | } 456 | } 457 | } else { 458 | // Not grouping return the intracluster 459 | if (typeof linkStrengthIntraCluster === "function") { 460 | return linkStrengthIntraCluster(e); 461 | } else { 462 | return linkStrengthIntraCluster; 463 | } 464 | } 465 | }; 466 | 467 | force.id = function (_) { 468 | return arguments.length ? ((id = _), force) : id; 469 | }; 470 | 471 | force.size = function (_) { 472 | return arguments.length ? ((size = _), force) : size; 473 | }; 474 | 475 | force.linkStrengthInterCluster = function (_) { 476 | return arguments.length 477 | ? ((linkStrengthInterCluster = _), force) 478 | : linkStrengthInterCluster; 479 | }; 480 | 481 | force.linkStrengthIntraCluster = function (_) { 482 | return arguments.length 483 | ? ((linkStrengthIntraCluster = _), force) 484 | : linkStrengthIntraCluster; 485 | }; 486 | 487 | force.nodes = function (_) { 488 | return arguments.length ? ((nodes = _), force) : nodes; 489 | }; 490 | 491 | force.links = function (_) { 492 | if (!arguments.length) return links; 493 | if (_ === null) links = []; 494 | else links = _; 495 | initialize(); 496 | return force; 497 | }; 498 | 499 | force.forceNodeSize = function (_) { 500 | return arguments.length 501 | ? ((forceNodeSize = typeof _ === "function" ? _ : constant(+_)), 502 | initialize(), 503 | force) 504 | : forceNodeSize; 505 | }; 506 | 507 | // Legacy support 508 | force.nodeSize = force.forceNodeSize; 509 | 510 | force.forceCharge = function (_) { 511 | return arguments.length 512 | ? ((forceCharge = typeof _ === "function" ? _ : constant(+_)), 513 | initialize(), 514 | force) 515 | : forceCharge; 516 | }; 517 | 518 | force.forceLinkDistance = function (_) { 519 | return arguments.length 520 | ? ((forceLinkDistance = typeof _ === "function" ? _ : constant(+_)), 521 | initialize(), 522 | force) 523 | : forceLinkDistance; 524 | }; 525 | 526 | force.forceLinkStrength = function (_) { 527 | return arguments.length 528 | ? ((forceLinkStrength = typeof _ === "function" ? _ : constant(+_)), 529 | initialize(), 530 | force) 531 | : forceLinkStrength; 532 | }; 533 | 534 | force.offset = function (_) { 535 | return arguments.length 536 | ? ((offset = typeof _ === "function" ? _ : constant(+_)), force) 537 | : offset; 538 | }; 539 | 540 | force.getFocis = getFocisFromTemplate; 541 | 542 | return force; 543 | } 544 | 545 | // module.exports = forceInABox; 546 | --------------------------------------------------------------------------------