d3.v5.min.js 317 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985
  1. // https://d3js.org Version 5.5.0. Copyright 2018 Mike Bostock.
  2. (function(t, n) {
  3. "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define(["exports"], n) : n(t.d3 = t.d3 || {})
  4. })(this, function(t) {
  5. "use strict";
  6. function n(t, n) {
  7. return t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN
  8. }
  9. function e(t) {
  10. return 1 === t.length && (t = function(t) {
  11. return function(e, r) {
  12. return n(t(e), r)
  13. }
  14. }(t)), {
  15. left: function(n, e, r, i) {
  16. for (null == r && (r = 0), null == i && (i = n.length); r < i;) {
  17. var o = r + i >>> 1;
  18. t(n[o], e) < 0 ? r = o + 1 : i = o
  19. }
  20. return r
  21. },
  22. right: function(n, e, r, i) {
  23. for (null == r && (r = 0), null == i && (i = n.length); r < i;) {
  24. var o = r + i >>> 1;
  25. t(n[o], e) > 0 ? i = o : r = o + 1
  26. }
  27. return r
  28. }
  29. }
  30. }
  31. function r(t, n) {
  32. return [t, n]
  33. }
  34. function i(t) {
  35. return null === t ? NaN : +t
  36. }
  37. function o(t, n) {
  38. var e, r, o = t.length,
  39. a = 0,
  40. u = -1,
  41. f = 0,
  42. c = 0;
  43. if (null == n)
  44. for (; ++u < o;) isNaN(e = i(t[u])) || (c += (r = e - f) * (e - (f += r / ++a)));
  45. else
  46. for (; ++u < o;) isNaN(e = i(n(t[u], u, t))) || (c += (r = e - f) * (e - (f += r / ++a)));
  47. if (a > 1) return c / (a - 1)
  48. }
  49. function a(t, n) {
  50. var e = o(t, n);
  51. return e ? Math.sqrt(e) : e
  52. }
  53. function u(t, n) {
  54. var e, r, i, o = t.length,
  55. a = -1;
  56. if (null == n) {
  57. for (; ++a < o;)
  58. if (null != (e = t[a]) && e >= e)
  59. for (r = i = e; ++a < o;) null != (e = t[a]) && (r > e && (r = e), i < e && (i = e))
  60. } else
  61. for (; ++a < o;)
  62. if (null != (e = n(t[a], a, t)) && e >= e)
  63. for (r = i = e; ++a < o;) null != (e = n(t[a], a, t)) && (r > e && (r = e), i < e && (i = e));
  64. return [r, i]
  65. }
  66. function f(t) {
  67. return function() {
  68. return t
  69. }
  70. }
  71. function c(t) {
  72. return t
  73. }
  74. function s(t, n, e) {
  75. t = +t, n = +n, e = (i = arguments.length) < 2 ? (n = t, t = 0, 1) : i < 3 ? 1 : +e;
  76. for (var r = -1, i = 0 | Math.max(0, Math.ceil((n - t) / e)), o = new Array(i); ++r < i;) o[r] = t + r * e;
  77. return o
  78. }
  79. function l(t, n, e) {
  80. var r, i, o, a, u = -1;
  81. if (n = +n, t = +t, e = +e, t === n && e > 0) return [t];
  82. if ((r = n < t) && (i = t, t = n, n = i), 0 === (a = h(t, n, e)) || !isFinite(a)) return [];
  83. if (a > 0)
  84. for (t = Math.ceil(t / a), n = Math.floor(n / a), o = new Array(i = Math.ceil(n - t + 1)); ++u < i;) o[u] = (t + u) * a;
  85. else
  86. for (t = Math.floor(t * a), n = Math.ceil(n * a), o = new Array(i = Math.ceil(t - n + 1)); ++u < i;) o[u] = (t - u) / a;
  87. return r && o.reverse(), o
  88. }
  89. function h(t, n, e) {
  90. var r = (n - t) / Math.max(0, e),
  91. i = Math.floor(Math.log(r) / Math.LN10),
  92. o = r / Math.pow(10, i);
  93. return i >= 0 ? (o >= is ? 10 : o >= os ? 5 : o >= as ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (o >= is ? 10 : o >= os ? 5 : o >= as ? 2 : 1)
  94. }
  95. function d(t, n, e) {
  96. var r = Math.abs(n - t) / Math.max(0, e),
  97. i = Math.pow(10, Math.floor(Math.log(r) / Math.LN10)),
  98. o = r / i;
  99. return o >= is ? i *= 10 : o >= os ? i *= 5 : o >= as && (i *= 2), n < t ? -i : i
  100. }
  101. function p(t) {
  102. return Math.ceil(Math.log(t.length) / Math.LN2) + 1
  103. }
  104. function v(t, n, e) {
  105. if (null == e && (e = i), r = t.length) {
  106. if ((n = +n) <= 0 || r < 2) return +e(t[0], 0, t);
  107. if (n >= 1) return +e(t[r - 1], r - 1, t);
  108. var r, o = (r - 1) * n,
  109. a = Math.floor(o),
  110. u = +e(t[a], a, t);
  111. return u + (+e(t[a + 1], a + 1, t) - u) * (o - a)
  112. }
  113. }
  114. function g(t, n) {
  115. var e, r, i = t.length,
  116. o = -1;
  117. if (null == n) {
  118. for (; ++o < i;)
  119. if (null != (e = t[o]) && e >= e)
  120. for (r = e; ++o < i;) null != (e = t[o]) && e > r && (r = e)
  121. } else
  122. for (; ++o < i;)
  123. if (null != (e = n(t[o], o, t)) && e >= e)
  124. for (r = e; ++o < i;) null != (e = n(t[o], o, t)) && e > r && (r = e);
  125. return r
  126. }
  127. function y(t) {
  128. for (var n, e, r, i = t.length, o = -1, a = 0; ++o < i;) a += t[o].length;
  129. for (e = new Array(a); --i >= 0;)
  130. for (n = (r = t[i]).length; --n >= 0;) e[--a] = r[n];
  131. return e
  132. }
  133. function _(t, n) {
  134. var e, r, i = t.length,
  135. o = -1;
  136. if (null == n) {
  137. for (; ++o < i;)
  138. if (null != (e = t[o]) && e >= e)
  139. for (r = e; ++o < i;) null != (e = t[o]) && r > e && (r = e)
  140. } else
  141. for (; ++o < i;)
  142. if (null != (e = n(t[o], o, t)) && e >= e)
  143. for (r = e; ++o < i;) null != (e = n(t[o], o, t)) && r > e && (r = e);
  144. return r
  145. }
  146. function b(t) {
  147. if (!(i = t.length)) return [];
  148. for (var n = -1, e = _(t, m), r = new Array(e); ++n < e;)
  149. for (var i, o = -1, a = r[n] = new Array(i); ++o < i;) a[o] = t[o][n];
  150. return r
  151. }
  152. function m(t) {
  153. return t.length
  154. }
  155. function x(t) {
  156. return t
  157. }
  158. function w(t) {
  159. return "translate(" + (t + .5) + ",0)"
  160. }
  161. function M(t) {
  162. return "translate(0," + (t + .5) + ")"
  163. }
  164. function A() {
  165. return !this.__axis
  166. }
  167. function T(t, n) {
  168. function e(e) {
  169. var h = null == i ? n.ticks ? n.ticks.apply(n, r) : n.domain() : i,
  170. d = null == o ? n.tickFormat ? n.tickFormat.apply(n, r) : x : o,
  171. p = Math.max(a, 0) + f,
  172. v = n.range(),
  173. g = +v[0] + .5,
  174. y = +v[v.length - 1] + .5,
  175. _ = (n.bandwidth ? function(t) {
  176. var n = Math.max(0, t.bandwidth() - 1) / 2;
  177. return t.round() && (n = Math.round(n)),
  178. function(e) {
  179. return +t(e) + n
  180. }
  181. } : function(t) {
  182. return function(n) {
  183. return +t(n)
  184. }
  185. })(n.copy()),
  186. b = e.selection ? e.selection() : e,
  187. m = b.selectAll(".domain").data([null]),
  188. w = b.selectAll(".tick").data(h, n).order(),
  189. M = w.exit(),
  190. T = w.enter().append("g").attr("class", "tick"),
  191. N = w.select("line"),
  192. S = w.select("text");
  193. m = m.merge(m.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "#000")), w = w.merge(T), N = N.merge(T.append("line").attr("stroke", "#000").attr(s + "2", c * a)), S = S.merge(T.append("text").attr("fill", "#000").attr(s, c * p).attr("dy", t === fs ? "0em" : t === ss ? "0.71em" : "0.32em")), e !== b && (m = m.transition(e), w = w.transition(e), N = N.transition(e), S = S.transition(e), M = M.transition(e).attr("opacity", hs).attr("transform", function(t) {
  194. return isFinite(t = _(t)) ? l(t) : this.getAttribute("transform")
  195. }), T.attr("opacity", hs).attr("transform", function(t) {
  196. var n = this.parentNode.__axis;
  197. return l(n && isFinite(n = n(t)) ? n : _(t))
  198. })), M.remove(), m.attr("d", t === ls || t == cs ? "M" + c * u + "," + g + "H0.5V" + y + "H" + c * u : "M" + g + "," + c * u + "V0.5H" + y + "V" + c * u), w.attr("opacity", 1).attr("transform", function(t) {
  199. return l(_(t))
  200. }), N.attr(s + "2", c * a), S.attr(s, c * p).text(d), b.filter(A).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === cs ? "start" : t === ls ? "end" : "middle"), b.each(function() {
  201. this.__axis = _
  202. })
  203. }
  204. var r = [],
  205. i = null,
  206. o = null,
  207. a = 6,
  208. u = 6,
  209. f = 3,
  210. c = t === fs || t === ls ? -1 : 1,
  211. s = t === ls || t === cs ? "x" : "y",
  212. l = t === fs || t === ss ? w : M;
  213. return e.scale = function(t) {
  214. return arguments.length ? (n = t, e) : n
  215. }, e.ticks = function() {
  216. return r = us.call(arguments), e
  217. }, e.tickArguments = function(t) {
  218. return arguments.length ? (r = null == t ? [] : us.call(t), e) : r.slice()
  219. }, e.tickValues = function(t) {
  220. return arguments.length ? (i = null == t ? null : us.call(t), e) : i && i.slice()
  221. }, e.tickFormat = function(t) {
  222. return arguments.length ? (o = t, e) : o
  223. }, e.tickSize = function(t) {
  224. return arguments.length ? (a = u = +t, e) : a
  225. }, e.tickSizeInner = function(t) {
  226. return arguments.length ? (a = +t, e) : a
  227. }, e.tickSizeOuter = function(t) {
  228. return arguments.length ? (u = +t, e) : u
  229. }, e.tickPadding = function(t) {
  230. return arguments.length ? (f = +t, e) : f
  231. }, e
  232. }
  233. function N() {
  234. for (var t, n = 0, e = arguments.length, r = {}; n < e; ++n) {
  235. if (!(t = arguments[n] + "") || t in r) throw new Error("illegal type: " + t);
  236. r[t] = []
  237. }
  238. return new S(r)
  239. }
  240. function S(t) {
  241. this._ = t
  242. }
  243. function E(t, n, e) {
  244. for (var r = 0, i = t.length; r < i; ++r)
  245. if (t[r].name === n) {
  246. t[r] = ds, t = t.slice(0, r).concat(t.slice(r + 1));
  247. break
  248. }
  249. return null != e && t.push({
  250. name: n,
  251. value: e
  252. }), t
  253. }
  254. function k(t) {
  255. var n = t += "",
  256. e = n.indexOf(":");
  257. return e >= 0 && "xmlns" !== (n = t.slice(0, e)) && (t = t.slice(e + 1)), vs.hasOwnProperty(n) ? {
  258. space: vs[n],
  259. local: t
  260. } : t
  261. }
  262. function C(t) {
  263. var n = k(t);
  264. return (n.local ? function(t) {
  265. return function() {
  266. return this.ownerDocument.createElementNS(t.space, t.local)
  267. }
  268. } : function(t) {
  269. return function() {
  270. var n = this.ownerDocument,
  271. e = this.namespaceURI;
  272. return e === ps && n.documentElement.namespaceURI === ps ? n.createElement(t) : n.createElementNS(e, t)
  273. }
  274. })(n)
  275. }
  276. function P() {}
  277. function z(t) {
  278. return null == t ? P : function() {
  279. return this.querySelector(t)
  280. }
  281. }
  282. function R() {
  283. return []
  284. }
  285. function L(t) {
  286. return null == t ? R : function() {
  287. return this.querySelectorAll(t)
  288. }
  289. }
  290. function D(t) {
  291. return new Array(t.length)
  292. }
  293. function U(t, n) {
  294. this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = n
  295. }
  296. function q(t, n, e, r, i, o) {
  297. for (var a, u = 0, f = n.length, c = o.length; u < c; ++u)(a = n[u]) ? (a.__data__ = o[u], r[u] = a) : e[u] = new U(t, o[u]);
  298. for (; u < f; ++u)(a = n[u]) && (i[u] = a)
  299. }
  300. function O(t, n, e, r, i, o, a) {
  301. var u, f, c, s = {},
  302. l = n.length,
  303. h = o.length,
  304. d = new Array(l);
  305. for (u = 0; u < l; ++u)(f = n[u]) && (d[u] = c = ms + a.call(f, f.__data__, u, n), c in s ? i[u] = f : s[c] = f);
  306. for (u = 0; u < h; ++u)(f = s[c = ms + a.call(t, o[u], u, o)]) ? (r[u] = f, f.__data__ = o[u], s[c] = null) : e[u] = new U(t, o[u]);
  307. for (u = 0; u < l; ++u)(f = n[u]) && s[d[u]] === f && (i[u] = f)
  308. }
  309. function Y(t, n) {
  310. return t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN
  311. }
  312. function B(t) {
  313. return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView
  314. }
  315. function F(t, n) {
  316. return t.style.getPropertyValue(n) || B(t).getComputedStyle(t, null).getPropertyValue(n)
  317. }
  318. function I(t) {
  319. return t.trim().split(/^|\s+/)
  320. }
  321. function j(t) {
  322. return t.classList || new H(t)
  323. }
  324. function H(t) {
  325. this._node = t, this._names = I(t.getAttribute("class") || "")
  326. }
  327. function X(t, n) {
  328. for (var e = j(t), r = -1, i = n.length; ++r < i;) e.add(n[r])
  329. }
  330. function G(t, n) {
  331. for (var e = j(t), r = -1, i = n.length; ++r < i;) e.remove(n[r])
  332. }
  333. function V() {
  334. this.textContent = ""
  335. }
  336. function $() {
  337. this.innerHTML = ""
  338. }
  339. function W() {
  340. this.nextSibling && this.parentNode.appendChild(this)
  341. }
  342. function Z() {
  343. this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild)
  344. }
  345. function Q() {
  346. return null
  347. }
  348. function J() {
  349. var t = this.parentNode;
  350. t && t.removeChild(this)
  351. }
  352. function K() {
  353. return this.parentNode.insertBefore(this.cloneNode(!1), this.nextSibling)
  354. }
  355. function tt() {
  356. return this.parentNode.insertBefore(this.cloneNode(!0), this.nextSibling)
  357. }
  358. function nt(t, n, e) {
  359. return t = et(t, n, e),
  360. function(n) {
  361. var e = n.relatedTarget;
  362. e && (e === this || 8 & e.compareDocumentPosition(this)) || t.call(this, n)
  363. }
  364. }
  365. function et(n, e, r) {
  366. return function(i) {
  367. var o = t.event;
  368. t.event = i;
  369. try {
  370. n.call(this, this.__data__, e, r)
  371. } finally {
  372. t.event = o
  373. }
  374. }
  375. }
  376. function rt(t) {
  377. return function() {
  378. var n = this.__on;
  379. if (n) {
  380. for (var e, r = 0, i = -1, o = n.length; r < o; ++r) e = n[r], t.type && e.type !== t.type || e.name !== t.name ? n[++i] = e : this.removeEventListener(e.type, e.listener, e.capture);
  381. ++i ? n.length = i : delete this.__on
  382. }
  383. }
  384. }
  385. function it(t, n, e) {
  386. var r = xs.hasOwnProperty(t.type) ? nt : et;
  387. return function(i, o, a) {
  388. var u, f = this.__on,
  389. c = r(n, o, a);
  390. if (f)
  391. for (var s = 0, l = f.length; s < l; ++s)
  392. if ((u = f[s]).type === t.type && u.name === t.name) return this.removeEventListener(u.type, u.listener, u.capture), this.addEventListener(u.type, u.listener = c, u.capture = e), void(u.value = n);
  393. this.addEventListener(t.type, c, e), u = {
  394. type: t.type,
  395. name: t.name,
  396. value: n,
  397. listener: c,
  398. capture: e
  399. }, f ? f.push(u) : this.__on = [u]
  400. }
  401. }
  402. function ot(n, e, r, i) {
  403. var o = t.event;
  404. n.sourceEvent = t.event, t.event = n;
  405. try {
  406. return e.apply(r, i)
  407. } finally {
  408. t.event = o
  409. }
  410. }
  411. function at(t, n, e) {
  412. var r = B(t),
  413. i = r.CustomEvent;
  414. "function" == typeof i ? i = new i(n, e) : (i = r.document.createEvent("Event"), e ? (i.initEvent(n, e.bubbles, e.cancelable), i.detail = e.detail) : i.initEvent(n, !1, !1)), t.dispatchEvent(i)
  415. }
  416. function ut(t, n) {
  417. this._groups = t, this._parents = n
  418. }
  419. function ft() {
  420. return new ut([
  421. [document.documentElement]
  422. ], ws)
  423. }
  424. function ct(t) {
  425. return "string" == typeof t ? new ut([
  426. [document.querySelector(t)]
  427. ], [document.documentElement]) : new ut([
  428. [t]
  429. ], ws)
  430. }
  431. function st() {
  432. return new lt
  433. }
  434. function lt() {
  435. this._ = "@" + (++Ms).toString(36)
  436. }
  437. function ht() {
  438. for (var n, e = t.event; n = e.sourceEvent;) e = n;
  439. return e
  440. }
  441. function dt(t, n) {
  442. var e = t.ownerSVGElement || t;
  443. if (e.createSVGPoint) {
  444. var r = e.createSVGPoint();
  445. return r.x = n.clientX, r.y = n.clientY, r = r.matrixTransform(t.getScreenCTM().inverse()), [r.x, r.y]
  446. }
  447. var i = t.getBoundingClientRect();
  448. return [n.clientX - i.left - t.clientLeft, n.clientY - i.top - t.clientTop]
  449. }
  450. function pt(t) {
  451. var n = ht();
  452. return n.changedTouches && (n = n.changedTouches[0]), dt(t, n)
  453. }
  454. function vt(t, n, e) {
  455. arguments.length < 3 && (e = n, n = ht().changedTouches);
  456. for (var r, i = 0, o = n ? n.length : 0; i < o; ++i)
  457. if ((r = n[i]).identifier === e) return dt(t, r);
  458. return null
  459. }
  460. function gt() {
  461. t.event.stopImmediatePropagation()
  462. }
  463. function yt() {
  464. t.event.preventDefault(), t.event.stopImmediatePropagation()
  465. }
  466. function _t(t) {
  467. var n = t.document.documentElement,
  468. e = ct(t).on("dragstart.drag", yt, !0);
  469. "onselectstart" in n ? e.on("selectstart.drag", yt, !0) : (n.__noselect = n.style.MozUserSelect, n.style.MozUserSelect = "none")
  470. }
  471. function bt(t, n) {
  472. var e = t.document.documentElement,
  473. r = ct(t).on("dragstart.drag", null);
  474. n && (r.on("click.drag", yt, !0), setTimeout(function() {
  475. r.on("click.drag", null)
  476. }, 0)), "onselectstart" in e ? r.on("selectstart.drag", null) : (e.style.MozUserSelect = e.__noselect, delete e.__noselect)
  477. }
  478. function mt(t) {
  479. return function() {
  480. return t
  481. }
  482. }
  483. function xt(t, n, e, r, i, o, a, u, f, c) {
  484. this.target = t, this.type = n, this.subject = e, this.identifier = r, this.active = i, this.x = o, this.y = a, this.dx = u, this.dy = f, this._ = c
  485. }
  486. function wt() {
  487. return !t.event.button
  488. }
  489. function Mt() {
  490. return this.parentNode
  491. }
  492. function At(n) {
  493. return null == n ? {
  494. x: t.event.x,
  495. y: t.event.y
  496. } : n
  497. }
  498. function Tt() {
  499. return "ontouchstart" in this
  500. }
  501. function Nt(t, n, e) {
  502. t.prototype = n.prototype = e, e.constructor = t
  503. }
  504. function St(t, n) {
  505. var e = Object.create(t.prototype);
  506. for (var r in n) e[r] = n[r];
  507. return e
  508. }
  509. function Et() {}
  510. function kt(t) {
  511. var n;
  512. return t = (t + "").trim().toLowerCase(), (n = Ss.exec(t)) ? (n = parseInt(n[1], 16), new Lt(n >> 8 & 15 | n >> 4 & 240, n >> 4 & 15 | 240 & n, (15 & n) << 4 | 15 & n, 1)) : (n = Es.exec(t)) ? Ct(parseInt(n[1], 16)) : (n = ks.exec(t)) ? new Lt(n[1], n[2], n[3], 1) : (n = Cs.exec(t)) ? new Lt(255 * n[1] / 100, 255 * n[2] / 100, 255 * n[3] / 100, 1) : (n = Ps.exec(t)) ? Pt(n[1], n[2], n[3], n[4]) : (n = zs.exec(t)) ? Pt(255 * n[1] / 100, 255 * n[2] / 100, 255 * n[3] / 100, n[4]) : (n = Rs.exec(t)) ? Ut(n[1], n[2] / 100, n[3] / 100, 1) : (n = Ls.exec(t)) ? Ut(n[1], n[2] / 100, n[3] / 100, n[4]) : Ds.hasOwnProperty(t) ? Ct(Ds[t]) : "transparent" === t ? new Lt(NaN, NaN, NaN, 0) : null
  513. }
  514. function Ct(t) {
  515. return new Lt(t >> 16 & 255, t >> 8 & 255, 255 & t, 1)
  516. }
  517. function Pt(t, n, e, r) {
  518. return r <= 0 && (t = n = e = NaN), new Lt(t, n, e, r)
  519. }
  520. function zt(t) {
  521. return t instanceof Et || (t = kt(t)), t ? (t = t.rgb(), new Lt(t.r, t.g, t.b, t.opacity)) : new Lt
  522. }
  523. function Rt(t, n, e, r) {
  524. return 1 === arguments.length ? zt(t) : new Lt(t, n, e, null == r ? 1 : r)
  525. }
  526. function Lt(t, n, e, r) {
  527. this.r = +t, this.g = +n, this.b = +e, this.opacity = +r
  528. }
  529. function Dt(t) {
  530. return ((t = Math.max(0, Math.min(255, Math.round(t) || 0))) < 16 ? "0" : "") + t.toString(16)
  531. }
  532. function Ut(t, n, e, r) {
  533. return r <= 0 ? t = n = e = NaN : e <= 0 || e >= 1 ? t = n = NaN : n <= 0 && (t = NaN), new Ot(t, n, e, r)
  534. }
  535. function qt(t, n, e, r) {
  536. return 1 === arguments.length ? function(t) {
  537. if (t instanceof Ot) return new Ot(t.h, t.s, t.l, t.opacity);
  538. if (t instanceof Et || (t = kt(t)), !t) return new Ot;
  539. if (t instanceof Ot) return t;
  540. var n = (t = t.rgb()).r / 255,
  541. e = t.g / 255,
  542. r = t.b / 255,
  543. i = Math.min(n, e, r),
  544. o = Math.max(n, e, r),
  545. a = NaN,
  546. u = o - i,
  547. f = (o + i) / 2;
  548. return u ? (a = n === o ? (e - r) / u + 6 * (e < r) : e === o ? (r - n) / u + 2 : (n - e) / u + 4, u /= f < .5 ? o + i : 2 - o - i, a *= 60) : u = f > 0 && f < 1 ? 0 : a, new Ot(a, u, f, t.opacity)
  549. }(t) : new Ot(t, n, e, null == r ? 1 : r)
  550. }
  551. function Ot(t, n, e, r) {
  552. this.h = +t, this.s = +n, this.l = +e, this.opacity = +r
  553. }
  554. function Yt(t, n, e) {
  555. return 255 * (t < 60 ? n + (e - n) * t / 60 : t < 180 ? e : t < 240 ? n + (e - n) * (240 - t) / 60 : n)
  556. }
  557. function Bt(t) {
  558. if (t instanceof It) return new It(t.l, t.a, t.b, t.opacity);
  559. if (t instanceof Wt) {
  560. if (isNaN(t.h)) return new It(t.l, 0, 0, t.opacity);
  561. var n = t.h * Us;
  562. return new It(t.l, Math.cos(n) * t.c, Math.sin(n) * t.c, t.opacity)
  563. }
  564. t instanceof Lt || (t = zt(t));
  565. var e, r, i = Gt(t.r),
  566. o = Gt(t.g),
  567. a = Gt(t.b),
  568. u = jt((.2225045 * i + .7168786 * o + .0606169 * a) / Ys);
  569. return i === o && o === a ? e = r = u : (e = jt((.4360747 * i + .3850649 * o + .1430804 * a) / Os), r = jt((.0139322 * i + .0971045 * o + .7141733 * a) / Bs)), new It(116 * u - 16, 500 * (e - u), 200 * (u - r), t.opacity)
  570. }
  571. function Ft(t, n, e, r) {
  572. return 1 === arguments.length ? Bt(t) : new It(t, n, e, null == r ? 1 : r)
  573. }
  574. function It(t, n, e, r) {
  575. this.l = +t, this.a = +n, this.b = +e, this.opacity = +r
  576. }
  577. function jt(t) {
  578. return t > Hs ? Math.pow(t, 1 / 3) : t / js + Fs
  579. }
  580. function Ht(t) {
  581. return t > Is ? t * t * t : js * (t - Fs)
  582. }
  583. function Xt(t) {
  584. return 255 * (t <= .0031308 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - .055)
  585. }
  586. function Gt(t) {
  587. return (t /= 255) <= .04045 ? t / 12.92 : Math.pow((t + .055) / 1.055, 2.4)
  588. }
  589. function Vt(t) {
  590. if (t instanceof Wt) return new Wt(t.h, t.c, t.l, t.opacity);
  591. if (t instanceof It || (t = Bt(t)), 0 === t.a && 0 === t.b) return new Wt(NaN, 0, t.l, t.opacity);
  592. var n = Math.atan2(t.b, t.a) * qs;
  593. return new Wt(n < 0 ? n + 360 : n, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity)
  594. }
  595. function $t(t, n, e, r) {
  596. return 1 === arguments.length ? Vt(t) : new Wt(t, n, e, null == r ? 1 : r)
  597. }
  598. function Wt(t, n, e, r) {
  599. this.h = +t, this.c = +n, this.l = +e, this.opacity = +r
  600. }
  601. function Zt(t, n, e, r) {
  602. return 1 === arguments.length ? function(t) {
  603. if (t instanceof Qt) return new Qt(t.h, t.s, t.l, t.opacity);
  604. t instanceof Lt || (t = zt(t));
  605. var n = t.r / 255,
  606. e = t.g / 255,
  607. r = t.b / 255,
  608. i = (Zs * r + $s * n - Ws * e) / (Zs + $s - Ws),
  609. o = r - i,
  610. a = (Vs * (e - i) - Xs * o) / Gs,
  611. u = Math.sqrt(a * a + o * o) / (Vs * i * (1 - i)),
  612. f = u ? Math.atan2(a, o) * qs - 120 : NaN;
  613. return new Qt(f < 0 ? f + 360 : f, u, i, t.opacity)
  614. }(t) : new Qt(t, n, e, null == r ? 1 : r)
  615. }
  616. function Qt(t, n, e, r) {
  617. this.h = +t, this.s = +n, this.l = +e, this.opacity = +r
  618. }
  619. function Jt(t, n, e, r, i) {
  620. var o = t * t,
  621. a = o * t;
  622. return ((1 - 3 * t + 3 * o - a) * n + (4 - 6 * o + 3 * a) * e + (1 + 3 * t + 3 * o - 3 * a) * r + a * i) / 6
  623. }
  624. function Kt(t) {
  625. var n = t.length - 1;
  626. return function(e) {
  627. var r = e <= 0 ? e = 0 : e >= 1 ? (e = 1, n - 1) : Math.floor(e * n),
  628. i = t[r],
  629. o = t[r + 1],
  630. a = r > 0 ? t[r - 1] : 2 * i - o,
  631. u = r < n - 1 ? t[r + 2] : 2 * o - i;
  632. return Jt((e - r / n) * n, a, i, o, u)
  633. }
  634. }
  635. function tn(t) {
  636. var n = t.length;
  637. return function(e) {
  638. var r = Math.floor(((e %= 1) < 0 ? ++e : e) * n),
  639. i = t[(r + n - 1) % n],
  640. o = t[r % n],
  641. a = t[(r + 1) % n],
  642. u = t[(r + 2) % n];
  643. return Jt((e - r / n) * n, i, o, a, u)
  644. }
  645. }
  646. function nn(t) {
  647. return function() {
  648. return t
  649. }
  650. }
  651. function en(t, n) {
  652. return function(e) {
  653. return t + e * n
  654. }
  655. }
  656. function rn(t, n) {
  657. var e = n - t;
  658. return e ? en(t, e > 180 || e < -180 ? e - 360 * Math.round(e / 360) : e) : nn(isNaN(t) ? n : t)
  659. }
  660. function on(t) {
  661. return 1 == (t = +t) ? an : function(n, e) {
  662. return e - n ? function(t, n, e) {
  663. return t = Math.pow(t, e), n = Math.pow(n, e) - t, e = 1 / e,
  664. function(r) {
  665. return Math.pow(t + r * n, e)
  666. }
  667. }(n, e, t) : nn(isNaN(n) ? e : n)
  668. }
  669. }
  670. function an(t, n) {
  671. var e = n - t;
  672. return e ? en(t, e) : nn(isNaN(t) ? n : t)
  673. }
  674. function un(t) {
  675. return function(n) {
  676. var e, r, i = n.length,
  677. o = new Array(i),
  678. a = new Array(i),
  679. u = new Array(i);
  680. for (e = 0; e < i; ++e) r = Rt(n[e]), o[e] = r.r || 0, a[e] = r.g || 0, u[e] = r.b || 0;
  681. return o = t(o), a = t(a), u = t(u), r.opacity = 1,
  682. function(t) {
  683. return r.r = o(t), r.g = a(t), r.b = u(t), r + ""
  684. }
  685. }
  686. }
  687. function fn(t, n) {
  688. var e, r = n ? n.length : 0,
  689. i = t ? Math.min(r, t.length) : 0,
  690. o = new Array(i),
  691. a = new Array(r);
  692. for (e = 0; e < i; ++e) o[e] = dn(t[e], n[e]);
  693. for (; e < r; ++e) a[e] = n[e];
  694. return function(t) {
  695. for (e = 0; e < i; ++e) a[e] = o[e](t);
  696. return a
  697. }
  698. }
  699. function cn(t, n) {
  700. var e = new Date;
  701. return t = +t, n -= t,
  702. function(r) {
  703. return e.setTime(t + n * r), e
  704. }
  705. }
  706. function sn(t, n) {
  707. return t = +t, n -= t,
  708. function(e) {
  709. return t + n * e
  710. }
  711. }
  712. function ln(t, n) {
  713. var e, r = {},
  714. i = {};
  715. null !== t && "object" == typeof t || (t = {}), null !== n && "object" == typeof n || (n = {});
  716. for (e in n) e in t ? r[e] = dn(t[e], n[e]) : i[e] = n[e];
  717. return function(t) {
  718. for (e in r) i[e] = r[e](t);
  719. return i
  720. }
  721. }
  722. function hn(t, n) {
  723. var e, r, i, o = al.lastIndex = ul.lastIndex = 0,
  724. a = -1,
  725. u = [],
  726. f = [];
  727. for (t += "", n += "";
  728. (e = al.exec(t)) && (r = ul.exec(n));)(i = r.index) > o && (i = n.slice(o, i), u[a] ? u[a] += i : u[++a] = i), (e = e[0]) === (r = r[0]) ? u[a] ? u[a] += r : u[++a] = r : (u[++a] = null, f.push({
  729. i: a,
  730. x: sn(e, r)
  731. })), o = ul.lastIndex;
  732. return o < n.length && (i = n.slice(o), u[a] ? u[a] += i : u[++a] = i), u.length < 2 ? f[0] ? function(t) {
  733. return function(n) {
  734. return t(n) + ""
  735. }
  736. }(f[0].x) : function(t) {
  737. return function() {
  738. return t
  739. }
  740. }(n) : (n = f.length, function(t) {
  741. for (var e, r = 0; r < n; ++r) u[(e = f[r]).i] = e.x(t);
  742. return u.join("")
  743. })
  744. }
  745. function dn(t, n) {
  746. var e, r = typeof n;
  747. return null == n || "boolean" === r ? nn(n) : ("number" === r ? sn : "string" === r ? (e = kt(n)) ? (n = e, rl) : hn : n instanceof kt ? rl : n instanceof Date ? cn : Array.isArray(n) ? fn : "function" != typeof n.valueOf && "function" != typeof n.toString || isNaN(n) ? ln : sn)(t, n)
  748. }
  749. function pn(t, n) {
  750. return t = +t, n -= t,
  751. function(e) {
  752. return Math.round(t + n * e)
  753. }
  754. }
  755. function vn(t, n, e, r, i, o) {
  756. var a, u, f;
  757. return (a = Math.sqrt(t * t + n * n)) && (t /= a, n /= a), (f = t * e + n * r) && (e -= t * f, r -= n * f), (u = Math.sqrt(e * e + r * r)) && (e /= u, r /= u, f /= u), t * r < n * e && (t = -t, n = -n, f = -f, a = -a), {
  758. translateX: i,
  759. translateY: o,
  760. rotate: Math.atan2(n, t) * fl,
  761. skewX: Math.atan(f) * fl,
  762. scaleX: a,
  763. scaleY: u
  764. }
  765. }
  766. function gn(t, n, e, r) {
  767. function i(t) {
  768. return t.length ? t.pop() + " " : ""
  769. }
  770. return function(o, a) {
  771. var u = [],
  772. f = [];
  773. return o = t(o), a = t(a),
  774. function(t, r, i, o, a, u) {
  775. if (t !== i || r !== o) {
  776. var f = a.push("translate(", null, n, null, e);
  777. u.push({
  778. i: f - 4,
  779. x: sn(t, i)
  780. }, {
  781. i: f - 2,
  782. x: sn(r, o)
  783. })
  784. } else(i || o) && a.push("translate(" + i + n + o + e)
  785. }(o.translateX, o.translateY, a.translateX, a.translateY, u, f),
  786. function(t, n, e, o) {
  787. t !== n ? (t - n > 180 ? n += 360 : n - t > 180 && (t += 360), o.push({
  788. i: e.push(i(e) + "rotate(", null, r) - 2,
  789. x: sn(t, n)
  790. })) : n && e.push(i(e) + "rotate(" + n + r)
  791. }(o.rotate, a.rotate, u, f),
  792. function(t, n, e, o) {
  793. t !== n ? o.push({
  794. i: e.push(i(e) + "skewX(", null, r) - 2,
  795. x: sn(t, n)
  796. }) : n && e.push(i(e) + "skewX(" + n + r)
  797. }(o.skewX, a.skewX, u, f),
  798. function(t, n, e, r, o, a) {
  799. if (t !== e || n !== r) {
  800. var u = o.push(i(o) + "scale(", null, ",", null, ")");
  801. a.push({
  802. i: u - 4,
  803. x: sn(t, e)
  804. }, {
  805. i: u - 2,
  806. x: sn(n, r)
  807. })
  808. } else 1 === e && 1 === r || o.push(i(o) + "scale(" + e + "," + r + ")")
  809. }(o.scaleX, o.scaleY, a.scaleX, a.scaleY, u, f), o = a = null,
  810. function(t) {
  811. for (var n, e = -1, r = f.length; ++e < r;) u[(n = f[e]).i] = n.x(t);
  812. return u.join("")
  813. }
  814. }
  815. }
  816. function yn(t) {
  817. return ((t = Math.exp(t)) + 1 / t) / 2
  818. }
  819. function _n(t, n) {
  820. var e, r, i = t[0],
  821. o = t[1],
  822. a = t[2],
  823. u = n[0],
  824. f = n[1],
  825. c = n[2],
  826. s = u - i,
  827. l = f - o,
  828. h = s * s + l * l;
  829. if (h < vl) r = Math.log(c / a) / hl, e = function(t) {
  830. return [i + t * s, o + t * l, a * Math.exp(hl * t * r)]
  831. };
  832. else {
  833. var d = Math.sqrt(h),
  834. p = (c * c - a * a + pl * h) / (2 * a * dl * d),
  835. v = (c * c - a * a - pl * h) / (2 * c * dl * d),
  836. g = Math.log(Math.sqrt(p * p + 1) - p),
  837. y = Math.log(Math.sqrt(v * v + 1) - v);
  838. r = (y - g) / hl, e = function(t) {
  839. var n = t * r,
  840. e = yn(g),
  841. u = a / (dl * d) * (e * function(t) {
  842. return ((t = Math.exp(2 * t)) - 1) / (t + 1)
  843. }(hl * n + g) - function(t) {
  844. return ((t = Math.exp(t)) - 1 / t) / 2
  845. }(g));
  846. return [i + u * s, o + u * l, a * e / yn(hl * n + g)]
  847. }
  848. }
  849. return e.duration = 1e3 * r, e
  850. }
  851. function bn(t) {
  852. return function(n, e) {
  853. var r = t((n = qt(n)).h, (e = qt(e)).h),
  854. i = an(n.s, e.s),
  855. o = an(n.l, e.l),
  856. a = an(n.opacity, e.opacity);
  857. return function(t) {
  858. return n.h = r(t), n.s = i(t), n.l = o(t), n.opacity = a(t), n + ""
  859. }
  860. }
  861. }
  862. function mn(t) {
  863. return function(n, e) {
  864. var r = t((n = $t(n)).h, (e = $t(e)).h),
  865. i = an(n.c, e.c),
  866. o = an(n.l, e.l),
  867. a = an(n.opacity, e.opacity);
  868. return function(t) {
  869. return n.h = r(t), n.c = i(t), n.l = o(t), n.opacity = a(t), n + ""
  870. }
  871. }
  872. }
  873. function xn(t) {
  874. return function n(e) {
  875. function r(n, r) {
  876. var i = t((n = Zt(n)).h, (r = Zt(r)).h),
  877. o = an(n.s, r.s),
  878. a = an(n.l, r.l),
  879. u = an(n.opacity, r.opacity);
  880. return function(t) {
  881. return n.h = i(t), n.s = o(t), n.l = a(Math.pow(t, e)), n.opacity = u(t), n + ""
  882. }
  883. }
  884. return e = +e, r.gamma = n, r
  885. }(1)
  886. }
  887. function wn() {
  888. return Sl || (Cl(Mn), Sl = kl.now() + El)
  889. }
  890. function Mn() {
  891. Sl = 0
  892. }
  893. function An() {
  894. this._call = this._time = this._next = null
  895. }
  896. function Tn(t, n, e) {
  897. var r = new An;
  898. return r.restart(t, n, e), r
  899. }
  900. function Nn() {
  901. wn(), ++wl;
  902. for (var t, n = nl; n;)(t = Sl - n._time) >= 0 && n._call.call(null, t), n = n._next;
  903. --wl
  904. }
  905. function Sn() {
  906. Sl = (Nl = kl.now()) + El, wl = Ml = 0;
  907. try {
  908. Nn()
  909. } finally {
  910. wl = 0,
  911. function() {
  912. var t, n, e = nl,
  913. r = 1 / 0;
  914. for (; e;) e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : nl = n);
  915. el = t, kn(r)
  916. }(), Sl = 0
  917. }
  918. }
  919. function En() {
  920. var t = kl.now(),
  921. n = t - Nl;
  922. n > Tl && (El -= n, Nl = t)
  923. }
  924. function kn(t) {
  925. if (!wl) {
  926. Ml && (Ml = clearTimeout(Ml));
  927. t - Sl > 24 ? (t < 1 / 0 && (Ml = setTimeout(Sn, t - kl.now() - El)), Al && (Al = clearInterval(Al))) : (Al || (Nl = kl.now(), Al = setInterval(En, Tl)), wl = 1, Cl(Sn))
  928. }
  929. }
  930. function Cn(t, n, e) {
  931. var r = new An;
  932. return n = null == n ? 0 : +n, r.restart(function(e) {
  933. r.stop(), t(e + n)
  934. }, n, e), r
  935. }
  936. function Pn(t, n, e, r, i, o) {
  937. var a = t.__transition;
  938. if (a) {
  939. if (e in a) return
  940. } else t.__transition = {};
  941. (function(t, n, e) {
  942. function r(f) {
  943. var c, s, l, h;
  944. if (e.state !== Ll) return o();
  945. for (c in u)
  946. if ((h = u[c]).name === e.name) {
  947. if (h.state === Ul) return Cn(r);
  948. h.state === ql ? (h.state = Yl, h.timer.stop(), h.on.call("interrupt", t, t.__data__, h.index, h.group), delete u[c]) : +c < n && (h.state = Yl, h.timer.stop(), delete u[c])
  949. }
  950. if (Cn(function() {
  951. e.state === Ul && (e.state = ql, e.timer.restart(i, e.delay, e.time), i(f))
  952. }), e.state = Dl, e.on.call("start", t, t.__data__, e.index, e.group), e.state === Dl) {
  953. for (e.state = Ul, a = new Array(l = e.tween.length), c = 0, s = -1; c < l; ++c)(h = e.tween[c].value.call(t, t.__data__, e.index, e.group)) && (a[++s] = h);
  954. a.length = s + 1
  955. }
  956. }
  957. function i(n) {
  958. for (var r = n < e.duration ? e.ease.call(null, n / e.duration) : (e.timer.restart(o), e.state = Ol, 1), i = -1, u = a.length; ++i < u;) a[i].call(null, r);
  959. e.state === Ol && (e.on.call("end", t, t.__data__, e.index, e.group), o())
  960. }
  961. function o() {
  962. e.state = Yl, e.timer.stop(), delete u[n];
  963. for (var r in u) return;
  964. delete t.__transition
  965. }
  966. var a, u = t.__transition;
  967. u[n] = e, e.timer = Tn(function(t) {
  968. e.state = Ll, e.timer.restart(r, e.delay, e.time), e.delay <= t && r(t - e.delay)
  969. }, 0, e.time)
  970. })(t, e, {
  971. name: n,
  972. index: r,
  973. group: i,
  974. on: Pl,
  975. tween: zl,
  976. time: o.time,
  977. delay: o.delay,
  978. duration: o.duration,
  979. ease: o.ease,
  980. timer: null,
  981. state: Rl
  982. })
  983. }
  984. function zn(t, n) {
  985. var e = Ln(t, n);
  986. if (e.state > Rl) throw new Error("too late; already scheduled");
  987. return e
  988. }
  989. function Rn(t, n) {
  990. var e = Ln(t, n);
  991. if (e.state > Dl) throw new Error("too late; already started");
  992. return e
  993. }
  994. function Ln(t, n) {
  995. var e = t.__transition;
  996. if (!e || !(e = e[n])) throw new Error("transition not found");
  997. return e
  998. }
  999. function Dn(t, n) {
  1000. var e, r, i, o = t.__transition,
  1001. a = !0;
  1002. if (o) {
  1003. n = null == n ? null : n + "";
  1004. for (i in o)(e = o[i]).name === n ? (r = e.state > Dl && e.state < Ol, e.state = Yl, e.timer.stop(), r && e.on.call("interrupt", t, t.__data__, e.index, e.group), delete o[i]) : a = !1;
  1005. a && delete t.__transition
  1006. }
  1007. }
  1008. function Un(t, n, e) {
  1009. var r = t._id;
  1010. return t.each(function() {
  1011. var t = Rn(this, r);
  1012. (t.value || (t.value = {}))[n] = e.apply(this, arguments)
  1013. }),
  1014. function(t) {
  1015. return Ln(t, r).value[n]
  1016. }
  1017. }
  1018. function qn(t, n) {
  1019. var e;
  1020. return ("number" == typeof n ? sn : n instanceof kt ? rl : (e = kt(n)) ? (n = e, rl) : hn)(t, n)
  1021. }
  1022. function On(t, n, e, r) {
  1023. this._groups = t, this._parents = n, this._name = e, this._id = r
  1024. }
  1025. function Yn(t) {
  1026. return ft().transition(t)
  1027. }
  1028. function Bn() {
  1029. return ++Fl
  1030. }
  1031. function Fn(t) {
  1032. return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2
  1033. }
  1034. function In(t) {
  1035. return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2
  1036. }
  1037. function jn(t) {
  1038. return (1 - Math.cos(Gl * t)) / 2
  1039. }
  1040. function Hn(t) {
  1041. return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2
  1042. }
  1043. function Xn(t) {
  1044. return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2
  1045. }
  1046. function Gn(t) {
  1047. return (t = +t) < $l ? rh * t * t : t < Zl ? rh * (t -= Wl) * t + Ql : t < Kl ? rh * (t -= Jl) * t + th : rh * (t -= nh) * t + eh
  1048. }
  1049. function Vn(t, n) {
  1050. for (var e; !(e = t.__transition) || !(e = e[n]);)
  1051. if (!(t = t.parentNode)) return lh.time = wn(), lh;
  1052. return e
  1053. }
  1054. function $n(t) {
  1055. return function() {
  1056. return t
  1057. }
  1058. }
  1059. function Wn() {
  1060. t.event.stopImmediatePropagation()
  1061. }
  1062. function Zn() {
  1063. t.event.preventDefault(), t.event.stopImmediatePropagation()
  1064. }
  1065. function Qn(t) {
  1066. return {
  1067. type: t
  1068. }
  1069. }
  1070. function Jn() {
  1071. return !t.event.button
  1072. }
  1073. function Kn() {
  1074. var t = this.ownerSVGElement || this;
  1075. return [
  1076. [0, 0],
  1077. [t.width.baseVal.value, t.height.baseVal.value]
  1078. ]
  1079. }
  1080. function te(t) {
  1081. for (; !t.__brush;)
  1082. if (!(t = t.parentNode)) return;
  1083. return t.__brush
  1084. }
  1085. function ne(t) {
  1086. return t[0][0] === t[1][0] || t[0][1] === t[1][1]
  1087. }
  1088. function ee(n) {
  1089. function e(t) {
  1090. var e = t.property("__brush", u).selectAll(".overlay").data([Qn("overlay")]);
  1091. e.enter().append("rect").attr("class", "overlay").attr("pointer-events", "all").attr("cursor", mh.overlay).merge(e).each(function() {
  1092. var t = te(this).extent;
  1093. ct(this).attr("x", t[0][0]).attr("y", t[0][1]).attr("width", t[1][0] - t[0][0]).attr("height", t[1][1] - t[0][1])
  1094. }), t.selectAll(".selection").data([Qn("selection")]).enter().append("rect").attr("class", "selection").attr("cursor", mh.selection).attr("fill", "#777").attr("fill-opacity", .3).attr("stroke", "#fff").attr("shape-rendering", "crispEdges");
  1095. var i = t.selectAll(".handle").data(n.handles, function(t) {
  1096. return t.type
  1097. });
  1098. i.exit().remove(), i.enter().append("rect").attr("class", function(t) {
  1099. return "handle handle--" + t.type
  1100. }).attr("cursor", function(t) {
  1101. return mh[t.type]
  1102. }), t.each(r).attr("fill", "none").attr("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush touchstart.brush", a)
  1103. }
  1104. function r() {
  1105. var t = ct(this),
  1106. n = te(this).selection;
  1107. n ? (t.selectAll(".selection").style("display", null).attr("x", n[0][0]).attr("y", n[0][1]).attr("width", n[1][0] - n[0][0]).attr("height", n[1][1] - n[0][1]), t.selectAll(".handle").style("display", null).attr("x", function(t) {
  1108. return "e" === t.type[t.type.length - 1] ? n[1][0] - h / 2 : n[0][0] - h / 2
  1109. }).attr("y", function(t) {
  1110. return "s" === t.type[0] ? n[1][1] - h / 2 : n[0][1] - h / 2
  1111. }).attr("width", function(t) {
  1112. return "n" === t.type || "s" === t.type ? n[1][0] - n[0][0] + h : h
  1113. }).attr("height", function(t) {
  1114. return "e" === t.type || "w" === t.type ? n[1][1] - n[0][1] + h : h
  1115. })) : t.selectAll(".selection,.handle").style("display", "none").attr("x", null).attr("y", null).attr("width", null).attr("height", null)
  1116. }
  1117. function i(t, n) {
  1118. return t.__brush.emitter || new o(t, n)
  1119. }
  1120. function o(t, n) {
  1121. this.that = t, this.args = n, this.state = t.__brush, this.active = 0
  1122. }
  1123. function a() {
  1124. function e() {
  1125. var t = pt(w);
  1126. !L || m || x || (Math.abs(t[0] - U[0]) > Math.abs(t[1] - U[1]) ? x = !0 : m = !0), U = t, b = !0, Zn(), o()
  1127. }
  1128. function o() {
  1129. var t;
  1130. switch (y = U[0] - D[0], _ = U[1] - D[1], A) {
  1131. case ph:
  1132. case dh:
  1133. T && (y = Math.max(C - u, Math.min(z - d, y)), c = u + y, p = d + y), N && (_ = Math.max(P - l, Math.min(R - v, _)), h = l + _, g = v + _);
  1134. break;
  1135. case vh:
  1136. T < 0 ? (y = Math.max(C - u, Math.min(z - u, y)), c = u + y, p = d) : T > 0 && (y = Math.max(C - d, Math.min(z - d, y)), c = u, p = d + y), N < 0 ? (_ = Math.max(P - l, Math.min(R - l, _)), h = l + _, g = v) : N > 0 && (_ = Math.max(P - v, Math.min(R - v, _)), h = l, g = v + _);
  1137. break;
  1138. case gh:
  1139. T && (c = Math.max(C, Math.min(z, u - y * T)), p = Math.max(C, Math.min(z, d + y * T))), N && (h = Math.max(P, Math.min(R, l - _ * N)), g = Math.max(P, Math.min(R, v + _ * N)))
  1140. }
  1141. p < c && (T *= -1, t = u, u = d, d = t, t = c, c = p, p = t, M in xh && Y.attr("cursor", mh[M = xh[M]])), g < h && (N *= -1, t = l, l = v, v = t, t = h, h = g, g = t, M in wh && Y.attr("cursor", mh[M = wh[M]])), S.selection && (k = S.selection), m && (c = k[0][0], p = k[1][0]), x && (h = k[0][1], g = k[1][1]), k[0][0] === c && k[0][1] === h && k[1][0] === p && k[1][1] === g || (S.selection = [
  1142. [c, h],
  1143. [p, g]
  1144. ], r.call(w), q.brush())
  1145. }
  1146. function a() {
  1147. if (Wn(), t.event.touches) {
  1148. if (t.event.touches.length) return;
  1149. f && clearTimeout(f), f = setTimeout(function() {
  1150. f = null
  1151. }, 500), O.on("touchmove.brush touchend.brush touchcancel.brush", null)
  1152. } else bt(t.event.view, b), B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
  1153. O.attr("pointer-events", "all"), Y.attr("cursor", mh.overlay), S.selection && (k = S.selection), ne(k) && (S.selection = null, r.call(w)), q.end()
  1154. }
  1155. if (t.event.touches) {
  1156. if (t.event.changedTouches.length < t.event.touches.length) return Zn()
  1157. } else if (f) return;
  1158. if (s.apply(this, arguments)) {
  1159. var u, c, l, h, d, p, v, g, y, _, b, m, x, w = this,
  1160. M = t.event.target.__data__.type,
  1161. A = "selection" === (t.event.metaKey ? M = "overlay" : M) ? dh : t.event.altKey ? gh : vh,
  1162. T = n === _h ? null : Mh[M],
  1163. N = n === yh ? null : Ah[M],
  1164. S = te(w),
  1165. E = S.extent,
  1166. k = S.selection,
  1167. C = E[0][0],
  1168. P = E[0][1],
  1169. z = E[1][0],
  1170. R = E[1][1],
  1171. L = T && N && t.event.shiftKey,
  1172. D = pt(w),
  1173. U = D,
  1174. q = i(w, arguments).beforestart();
  1175. "overlay" === M ? S.selection = k = [
  1176. [u = n === _h ? C : D[0], l = n === yh ? P : D[1]],
  1177. [d = n === _h ? z : u, v = n === yh ? R : l]
  1178. ] : (u = k[0][0], l = k[0][1], d = k[1][0], v = k[1][1]), c = u, h = l, p = d, g = v;
  1179. var O = ct(w).attr("pointer-events", "none"),
  1180. Y = O.selectAll(".overlay").attr("cursor", mh[M]);
  1181. if (t.event.touches) O.on("touchmove.brush", e, !0).on("touchend.brush touchcancel.brush", a, !0);
  1182. else {
  1183. var B = ct(t.event.view).on("keydown.brush", function() {
  1184. switch (t.event.keyCode) {
  1185. case 16:
  1186. L = T && N;
  1187. break;
  1188. case 18:
  1189. A === vh && (T && (d = p - y * T, u = c + y * T), N && (v = g - _ * N, l = h + _ * N), A = gh, o());
  1190. break;
  1191. case 32:
  1192. A !== vh && A !== gh || (T < 0 ? d = p - y : T > 0 && (u = c - y), N < 0 ? v = g - _ : N > 0 && (l = h - _), A = ph, Y.attr("cursor", mh.selection), o());
  1193. break;
  1194. default:
  1195. return
  1196. }
  1197. Zn()
  1198. }, !0).on("keyup.brush", function() {
  1199. switch (t.event.keyCode) {
  1200. case 16:
  1201. L && (m = x = L = !1, o());
  1202. break;
  1203. case 18:
  1204. A === gh && (T < 0 ? d = p : T > 0 && (u = c), N < 0 ? v = g : N > 0 && (l = h), A = vh, o());
  1205. break;
  1206. case 32:
  1207. A === ph && (t.event.altKey ? (T && (d = p - y * T, u = c + y * T), N && (v = g - _ * N, l = h + _ * N), A = gh) : (T < 0 ? d = p : T > 0 && (u = c), N < 0 ? v = g : N > 0 && (l = h), A = vh), Y.attr("cursor", mh[M]), o());
  1208. break;
  1209. default:
  1210. return
  1211. }
  1212. Zn()
  1213. }, !0).on("mousemove.brush", e, !0).on("mouseup.brush", a, !0);
  1214. _t(t.event.view)
  1215. }
  1216. Wn(), Dn(w), r.call(w), q.start()
  1217. }
  1218. }
  1219. function u() {
  1220. var t = this.__brush || {
  1221. selection: null
  1222. };
  1223. return t.extent = c.apply(this, arguments), t.dim = n, t
  1224. }
  1225. var f, c = Kn,
  1226. s = Jn,
  1227. l = N(e, "start", "brush", "end"),
  1228. h = 6;
  1229. return e.move = function(t, e) {
  1230. t.selection ? t.on("start.brush", function() {
  1231. i(this, arguments).beforestart().start()
  1232. }).on("interrupt.brush end.brush", function() {
  1233. i(this, arguments).end()
  1234. }).tween("brush", function() {
  1235. function t(t) {
  1236. a.selection = 1 === t && ne(c) ? null : s(t), r.call(o), u.brush()
  1237. }
  1238. var o = this,
  1239. a = o.__brush,
  1240. u = i(o, arguments),
  1241. f = a.selection,
  1242. c = n.input("function" == typeof e ? e.apply(this, arguments) : e, a.extent),
  1243. s = dn(f, c);
  1244. return f && c ? t : t(1)
  1245. }) : t.each(function() {
  1246. var t = arguments,
  1247. o = this.__brush,
  1248. a = n.input("function" == typeof e ? e.apply(this, t) : e, o.extent),
  1249. u = i(this, t).beforestart();
  1250. Dn(this), o.selection = null == a || ne(a) ? null : a, r.call(this), u.start().brush().end()
  1251. })
  1252. }, o.prototype = {
  1253. beforestart: function() {
  1254. return 1 == ++this.active && (this.state.emitter = this, this.starting = !0), this
  1255. },
  1256. start: function() {
  1257. return this.starting && (this.starting = !1, this.emit("start")), this
  1258. },
  1259. brush: function() {
  1260. return this.emit("brush"), this
  1261. },
  1262. end: function() {
  1263. return 0 == --this.active && (delete this.state.emitter, this.emit("end")), this
  1264. },
  1265. emit: function(t) {
  1266. ot(new function(t, n, e) {
  1267. this.target = t, this.type = n, this.selection = e
  1268. }(e, t, n.output(this.state.selection)), l.apply, l, [t, this.that, this.args])
  1269. }
  1270. }, e.extent = function(t) {
  1271. return arguments.length ? (c = "function" == typeof t ? t : $n([
  1272. [+t[0][0], +t[0][1]],
  1273. [+t[1][0], +t[1][1]]
  1274. ]), e) : c
  1275. }, e.filter = function(t) {
  1276. return arguments.length ? (s = "function" == typeof t ? t : $n(!!t), e) : s
  1277. }, e.handleSize = function(t) {
  1278. return arguments.length ? (h = +t, e) : h
  1279. }, e.on = function() {
  1280. var t = l.on.apply(l, arguments);
  1281. return t === l ? e : t
  1282. }, e
  1283. }
  1284. function re(t) {
  1285. return function() {
  1286. return t
  1287. }
  1288. }
  1289. function ie() {
  1290. this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = ""
  1291. }
  1292. function oe() {
  1293. return new ie
  1294. }
  1295. function ae(t) {
  1296. return t.source
  1297. }
  1298. function ue(t) {
  1299. return t.target
  1300. }
  1301. function fe(t) {
  1302. return t.radius
  1303. }
  1304. function ce(t) {
  1305. return t.startAngle
  1306. }
  1307. function se(t) {
  1308. return t.endAngle
  1309. }
  1310. function le() {}
  1311. function he(t, n) {
  1312. var e = new le;
  1313. if (t instanceof le) t.each(function(t, n) {
  1314. e.set(n, t)
  1315. });
  1316. else if (Array.isArray(t)) {
  1317. var r, i = -1,
  1318. o = t.length;
  1319. if (null == n)
  1320. for (; ++i < o;) e.set(i, t[i]);
  1321. else
  1322. for (; ++i < o;) e.set(n(r = t[i], i, t), r)
  1323. } else if (t)
  1324. for (var a in t) e.set(a, t[a]);
  1325. return e
  1326. }
  1327. function de() {
  1328. return {}
  1329. }
  1330. function pe(t, n, e) {
  1331. t[n] = e
  1332. }
  1333. function ve() {
  1334. return he()
  1335. }
  1336. function ge(t, n, e) {
  1337. t.set(n, e)
  1338. }
  1339. function ye() {}
  1340. function _e(t, n) {
  1341. var e = new ye;
  1342. if (t instanceof ye) t.each(function(t) {
  1343. e.add(t)
  1344. });
  1345. else if (t) {
  1346. var r = -1,
  1347. i = t.length;
  1348. if (null == n)
  1349. for (; ++r < i;) e.add(t[r]);
  1350. else
  1351. for (; ++r < i;) e.add(n(t[r], r, t))
  1352. }
  1353. return e
  1354. }
  1355. function be(t, n) {
  1356. return t - n
  1357. }
  1358. function me(t) {
  1359. return function() {
  1360. return t
  1361. }
  1362. }
  1363. function xe(t, n) {
  1364. for (var e, r = -1, i = n.length; ++r < i;)
  1365. if (e = function(t, n) {
  1366. for (var e = n[0], r = n[1], i = -1, o = 0, a = t.length, u = a - 1; o < a; u = o++) {
  1367. var f = t[o],
  1368. c = f[0],
  1369. s = f[1],
  1370. l = t[u],
  1371. h = l[0],
  1372. d = l[1];
  1373. if (function(t, n, e) {
  1374. var r;
  1375. return function(t, n, e) {
  1376. return (n[0] - t[0]) * (e[1] - t[1]) == (e[0] - t[0]) * (n[1] - t[1])
  1377. }(t, n, e) && function(t, n, e) {
  1378. return t <= n && n <= e || e <= n && n <= t
  1379. }(t[r = +(t[0] === n[0])], e[r], n[r])
  1380. }(f, l, n)) return 0;
  1381. s > r != d > r && e < (h - c) * (r - s) / (d - s) + c && (i = -i)
  1382. }
  1383. return i
  1384. }(t, n[r])) return e;
  1385. return 0
  1386. }
  1387. function we() {}
  1388. function Me() {
  1389. function t(t) {
  1390. var e = a(t);
  1391. if (Array.isArray(e)) e = e.slice().sort(be);
  1392. else {
  1393. var r = u(t),
  1394. i = r[0],
  1395. o = r[1];
  1396. e = d(i, o, e), e = s(Math.floor(i / e) * e, Math.floor(o / e) * e, e)
  1397. }
  1398. return e.map(function(e) {
  1399. return n(t, e)
  1400. })
  1401. }
  1402. function n(t, n) {
  1403. var r = [],
  1404. a = [];
  1405. return function(t, n, r) {
  1406. function a(t) {
  1407. var n, i, o = [t[0][0] + u, t[0][1] + f],
  1408. a = [t[1][0] + u, t[1][1] + f],
  1409. c = e(o),
  1410. s = e(a);
  1411. (n = p[c]) ? (i = d[s]) ? (delete p[n.end], delete d[i.start], n === i ? (n.ring.push(a), r(n.ring)) : d[n.start] = p[i.end] = {
  1412. start: n.start,
  1413. end: i.end,
  1414. ring: n.ring.concat(i.ring)
  1415. }) : (delete p[n.end], n.ring.push(a), p[n.end = s] = n) : (n = d[s]) ? (i = p[c]) ? (delete d[n.start], delete p[i.end], n === i ? (n.ring.push(a), r(n.ring)) : d[i.start] = p[n.end] = {
  1416. start: i.start,
  1417. end: n.end,
  1418. ring: i.ring.concat(n.ring)
  1419. }) : (delete d[n.start], n.ring.unshift(o), d[n.start = c] = n) : d[c] = p[s] = {
  1420. start: c,
  1421. end: s,
  1422. ring: [o, a]
  1423. }
  1424. }
  1425. var u, f, c, s, l, h, d = new Array,
  1426. p = new Array;
  1427. u = f = -1, s = t[0] >= n, qh[s << 1].forEach(a);
  1428. for (; ++u < i - 1;) c = s, s = t[u + 1] >= n, qh[c | s << 1].forEach(a);
  1429. qh[s << 0].forEach(a);
  1430. for (; ++f < o - 1;) {
  1431. for (u = -1, s = t[f * i + i] >= n, l = t[f * i] >= n, qh[s << 1 | l << 2].forEach(a); ++u < i - 1;) c = s, s = t[f * i + i + u + 1] >= n, h = l, l = t[f * i + u + 1] >= n, qh[c | s << 1 | l << 2 | h << 3].forEach(a);
  1432. qh[s | l << 3].forEach(a)
  1433. }
  1434. u = -1, l = t[f * i] >= n, qh[l << 2].forEach(a);
  1435. for (; ++u < i - 1;) h = l, l = t[f * i + u + 1] >= n, qh[l << 2 | h << 3].forEach(a);
  1436. qh[l << 3].forEach(a)
  1437. }(t, n, function(e) {
  1438. f(e, t, n),
  1439. function(t) {
  1440. for (var n = 0, e = t.length, r = t[e - 1][1] * t[0][0] - t[e - 1][0] * t[0][1]; ++n < e;) r += t[n - 1][1] * t[n][0] - t[n - 1][0] * t[n][1];
  1441. return r
  1442. }(e) > 0 ? r.push([e]) : a.push(e)
  1443. }), a.forEach(function(t) {
  1444. for (var n, e = 0, i = r.length; e < i; ++e)
  1445. if (-1 !== xe((n = r[e])[0], t)) return void n.push(t)
  1446. }), {
  1447. type: "MultiPolygon",
  1448. value: n,
  1449. coordinates: r
  1450. }
  1451. }
  1452. function e(t) {
  1453. return 2 * t[0] + t[1] * (i + 1) * 4
  1454. }
  1455. function r(t, n, e) {
  1456. t.forEach(function(t) {
  1457. var r, a = t[0],
  1458. u = t[1],
  1459. f = 0 | a,
  1460. c = 0 | u,
  1461. s = n[c * i + f];
  1462. a > 0 && a < i && f === a && (r = n[c * i + f - 1], t[0] = a + (e - r) / (s - r) - .5), u > 0 && u < o && c === u && (r = n[(c - 1) * i + f], t[1] = u + (e - r) / (s - r) - .5)
  1463. })
  1464. }
  1465. var i = 1,
  1466. o = 1,
  1467. a = p,
  1468. f = r;
  1469. return t.contour = n, t.size = function(n) {
  1470. if (!arguments.length) return [i, o];
  1471. var e = Math.ceil(n[0]),
  1472. r = Math.ceil(n[1]);
  1473. if (!(e > 0 && r > 0)) throw new Error("invalid size");
  1474. return i = e, o = r, t
  1475. }, t.thresholds = function(n) {
  1476. return arguments.length ? (a = "function" == typeof n ? n : Array.isArray(n) ? me(Uh.call(n)) : me(n), t) : a
  1477. }, t.smooth = function(n) {
  1478. return arguments.length ? (f = n ? r : we, t) : f === r
  1479. }, t
  1480. }
  1481. function Ae(t, n, e) {
  1482. for (var r = t.width, i = t.height, o = 1 + (e << 1), a = 0; a < i; ++a)
  1483. for (var u = 0, f = 0; u < r + e; ++u) u < r && (f += t.data[u + a * r]), u >= e && (u >= o && (f -= t.data[u - o + a * r]), n.data[u - e + a * r] = f / Math.min(u + 1, r - 1 + o - u, o))
  1484. }
  1485. function Te(t, n, e) {
  1486. for (var r = t.width, i = t.height, o = 1 + (e << 1), a = 0; a < r; ++a)
  1487. for (var u = 0, f = 0; u < i + e; ++u) u < i && (f += t.data[a + u * r]), u >= e && (u >= o && (f -= t.data[a + (u - o) * r]), n.data[a + (u - e) * r] = f / Math.min(u + 1, i - 1 + o - u, o))
  1488. }
  1489. function Ne(t) {
  1490. return t[0]
  1491. }
  1492. function Se(t) {
  1493. return t[1]
  1494. }
  1495. function Ee(t) {
  1496. return new Function("d", "return {" + t.map(function(t, n) {
  1497. return JSON.stringify(t) + ": d[" + n + "]"
  1498. }).join(",") + "}")
  1499. }
  1500. function ke(t) {
  1501. function n(t, n) {
  1502. function e() {
  1503. if (c) return Yh;
  1504. if (s) return s = !1, Oh;
  1505. var n, e, r = u;
  1506. if (t.charCodeAt(r) === Bh) {
  1507. for (; u++ < a && t.charCodeAt(u) !== Bh || t.charCodeAt(++u) === Bh;);
  1508. return (n = u) >= a ? c = !0 : (e = t.charCodeAt(u++)) === Fh ? s = !0 : e === Ih && (s = !0, t.charCodeAt(u) === Fh && ++u), t.slice(r + 1, n - 1).replace(/""/g, '"')
  1509. }
  1510. for (; u < a;) {
  1511. if ((e = t.charCodeAt(n = u++)) === Fh) s = !0;
  1512. else if (e === Ih) s = !0, t.charCodeAt(u) === Fh && ++u;
  1513. else if (e !== o) continue;
  1514. return t.slice(r, n)
  1515. }
  1516. return c = !0, t.slice(r, a)
  1517. }
  1518. var r, i = [],
  1519. a = t.length,
  1520. u = 0,
  1521. f = 0,
  1522. c = a <= 0,
  1523. s = !1;
  1524. for (t.charCodeAt(a - 1) === Fh && --a, t.charCodeAt(a - 1) === Ih && --a;
  1525. (r = e()) !== Yh;) {
  1526. for (var l = []; r !== Oh && r !== Yh;) l.push(r), r = e();
  1527. n && null == (l = n(l, f++)) || i.push(l)
  1528. }
  1529. return i
  1530. }
  1531. function e(n) {
  1532. return n.map(r).join(t)
  1533. }
  1534. function r(t) {
  1535. return null == t ? "" : i.test(t += "") ? '"' + t.replace(/"/g, '""') + '"' : t
  1536. }
  1537. var i = new RegExp('["' + t + "\n\r]"),
  1538. o = t.charCodeAt(0);
  1539. return {
  1540. parse: function(t, e) {
  1541. var r, i, o = n(t, function(t, n) {
  1542. if (r) return r(t, n - 1);
  1543. i = t, r = e ? function(t, n) {
  1544. var e = Ee(t);
  1545. return function(r, i) {
  1546. return n(e(r), i, t)
  1547. }
  1548. }(t, e) : Ee(t)
  1549. });
  1550. return o.columns = i || [], o
  1551. },
  1552. parseRows: n,
  1553. format: function(n, e) {
  1554. return null == e && (e = function(t) {
  1555. var n = Object.create(null),
  1556. e = [];
  1557. return t.forEach(function(t) {
  1558. for (var r in t) r in n || e.push(n[r] = r)
  1559. }), e
  1560. }(n)), [e.map(r).join(t)].concat(n.map(function(n) {
  1561. return e.map(function(t) {
  1562. return r(n[t])
  1563. }).join(t)
  1564. })).join("\n")
  1565. },
  1566. formatRows: function(t) {
  1567. return t.map(e).join("\n")
  1568. }
  1569. }
  1570. }
  1571. function Ce(t) {
  1572. if (!t.ok) throw new Error(t.status + " " + t.statusText);
  1573. return t.blob()
  1574. }
  1575. function Pe(t) {
  1576. if (!t.ok) throw new Error(t.status + " " + t.statusText);
  1577. return t.arrayBuffer()
  1578. }
  1579. function ze(t) {
  1580. if (!t.ok) throw new Error(t.status + " " + t.statusText);
  1581. return t.text()
  1582. }
  1583. function Re(t, n) {
  1584. return fetch(t, n).then(ze)
  1585. }
  1586. function Le(t) {
  1587. return function(n, e, r) {
  1588. return 2 === arguments.length && "function" == typeof e && (r = e, e = void 0), Re(n, e).then(function(n) {
  1589. return t(n, r)
  1590. })
  1591. }
  1592. }
  1593. function De(t) {
  1594. if (!t.ok) throw new Error(t.status + " " + t.statusText);
  1595. return t.json()
  1596. }
  1597. function Ue(t) {
  1598. return function(n, e) {
  1599. return Re(n, e).then(function(n) {
  1600. return (new DOMParser).parseFromString(n, t)
  1601. })
  1602. }
  1603. }
  1604. function qe(t) {
  1605. return function() {
  1606. return t
  1607. }
  1608. }
  1609. function Oe() {
  1610. return 1e-6 * (Math.random() - .5)
  1611. }
  1612. function Ye(t, n, e, r) {
  1613. if (isNaN(n) || isNaN(e)) return t;
  1614. var i, o, a, u, f, c, s, l, h, d = t._root,
  1615. p = {
  1616. data: r
  1617. },
  1618. v = t._x0,
  1619. g = t._y0,
  1620. y = t._x1,
  1621. _ = t._y1;
  1622. if (!d) return t._root = p, t;
  1623. for (; d.length;)
  1624. if ((c = n >= (o = (v + y) / 2)) ? v = o : y = o, (s = e >= (a = (g + _) / 2)) ? g = a : _ = a, i = d, !(d = d[l = s << 1 | c])) return i[l] = p, t;
  1625. if (u = +t._x.call(null, d.data), f = +t._y.call(null, d.data), n === u && e === f) return p.next = d, i ? i[l] = p : t._root = p, t;
  1626. do {
  1627. i = i ? i[l] = new Array(4) : t._root = new Array(4), (c = n >= (o = (v + y) / 2)) ? v = o : y = o, (s = e >= (a = (g + _) / 2)) ? g = a : _ = a
  1628. } while ((l = s << 1 | c) == (h = (f >= a) << 1 | u >= o));
  1629. return i[h] = d, i[l] = p, t
  1630. }
  1631. function Be(t, n, e, r, i) {
  1632. this.node = t, this.x0 = n, this.y0 = e, this.x1 = r, this.y1 = i
  1633. }
  1634. function Fe(t) {
  1635. return t[0]
  1636. }
  1637. function Ie(t) {
  1638. return t[1]
  1639. }
  1640. function je(t, n, e) {
  1641. var r = new He(null == n ? Fe : n, null == e ? Ie : e, NaN, NaN, NaN, NaN);
  1642. return null == t ? r : r.addAll(t)
  1643. }
  1644. function He(t, n, e, r, i, o) {
  1645. this._x = t, this._y = n, this._x0 = e, this._y0 = r, this._x1 = i, this._y1 = o, this._root = void 0
  1646. }
  1647. function Xe(t) {
  1648. for (var n = {
  1649. data: t.data
  1650. }, e = n; t = t.next;) e = e.next = {
  1651. data: t.data
  1652. };
  1653. return n
  1654. }
  1655. function Ge(t) {
  1656. return t.x + t.vx
  1657. }
  1658. function Ve(t) {
  1659. return t.y + t.vy
  1660. }
  1661. function $e(t) {
  1662. return t.index
  1663. }
  1664. function We(t, n) {
  1665. var e = t.get(n);
  1666. if (!e) throw new Error("missing: " + n);
  1667. return e
  1668. }
  1669. function Ze(t) {
  1670. return t.x
  1671. }
  1672. function Qe(t) {
  1673. return t.y
  1674. }
  1675. function Je(t, n) {
  1676. if ((e = (t = n ? t.toExponential(n - 1) : t.toExponential()).indexOf("e")) < 0) return null;
  1677. var e, r = t.slice(0, e);
  1678. return [r.length > 1 ? r[0] + r.slice(2) : r, +t.slice(e + 1)]
  1679. }
  1680. function Ke(t) {
  1681. return (t = Je(Math.abs(t))) ? t[1] : NaN
  1682. }
  1683. function tr(t) {
  1684. return new nr(t)
  1685. }
  1686. function nr(t) {
  1687. if (!(n = ud.exec(t))) throw new Error("invalid format: " + t);
  1688. var n;
  1689. this.fill = n[1] || " ", this.align = n[2] || ">", this.sign = n[3] || "-", this.symbol = n[4] || "", this.zero = !!n[5], this.width = n[6] && +n[6], this.comma = !!n[7], this.precision = n[8] && +n[8].slice(1), this.trim = !!n[9], this.type = n[10] || ""
  1690. }
  1691. function er(t, n) {
  1692. var e = Je(t, n);
  1693. if (!e) return t + "";
  1694. var r = e[0],
  1695. i = e[1];
  1696. return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0")
  1697. }
  1698. function rr(t) {
  1699. return t
  1700. }
  1701. function ir(t) {
  1702. function n(t) {
  1703. function n(t) {
  1704. var n, r, a, s = y,
  1705. x = _;
  1706. if ("c" === g) x = b(t) + x, t = "";
  1707. else {
  1708. var w = (t = +t) < 0;
  1709. if (t = b(Math.abs(t), p), v && (t = function(t) {
  1710. t: for (var n, e = t.length, r = 1, i = -1; r < e; ++r) switch (t[r]) {
  1711. case ".":
  1712. i = n = r;
  1713. break;
  1714. case "0":
  1715. 0 === i && (i = r), n = r;
  1716. break;
  1717. default:
  1718. if (i > 0) {
  1719. if (!+t[r]) break t;
  1720. i = 0
  1721. }
  1722. }
  1723. return i > 0 ? t.slice(0, i) + t.slice(n + 1) : t
  1724. }(t)), w && 0 == +t && (w = !1), s = (w ? "(" === c ? c : "-" : "-" === c || "(" === c ? "" : c) + s, x = ("s" === g ? ld[8 + fd / 3] : "") + x + (w && "(" === c ? ")" : ""), m)
  1725. for (n = -1, r = t.length; ++n < r;)
  1726. if (48 > (a = t.charCodeAt(n)) || a > 57) {
  1727. x = (46 === a ? i + t.slice(n + 1) : t.slice(n)) + x, t = t.slice(0, n);
  1728. break
  1729. }
  1730. }
  1731. d && !l && (t = e(t, 1 / 0));
  1732. var M = s.length + t.length + x.length,
  1733. A = M < h ? new Array(h - M + 1).join(u) : "";
  1734. switch (d && l && (t = e(A + t, A.length ? h - x.length : 1 / 0), A = ""), f) {
  1735. case "<":
  1736. t = s + t + x + A;
  1737. break;
  1738. case "=":
  1739. t = s + A + t + x;
  1740. break;
  1741. case "^":
  1742. t = A.slice(0, M = A.length >> 1) + s + t + x + A.slice(M);
  1743. break;
  1744. default:
  1745. t = A + s + t + x
  1746. }
  1747. return o(t)
  1748. }
  1749. var u = (t = tr(t)).fill,
  1750. f = t.align,
  1751. c = t.sign,
  1752. s = t.symbol,
  1753. l = t.zero,
  1754. h = t.width,
  1755. d = t.comma,
  1756. p = t.precision,
  1757. v = t.trim,
  1758. g = t.type;
  1759. "n" === g ? (d = !0, g = "g") : sd[g] || (null == p && (p = 12), v = !0, g = "g"), (l || "0" === u && "=" === f) && (l = !0, u = "0", f = "=");
  1760. var y = "$" === s ? r[0] : "#" === s && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "",
  1761. _ = "$" === s ? r[1] : /[%p]/.test(g) ? a : "",
  1762. b = sd[g],
  1763. m = /[defgprs%]/.test(g);
  1764. return p = null == p ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, p)) : Math.max(0, Math.min(20, p)), n.toString = function() {
  1765. return t + ""
  1766. }, n
  1767. }
  1768. var e = t.grouping && t.thousands ? function(t, n) {
  1769. return function(e, r) {
  1770. for (var i = e.length, o = [], a = 0, u = t[0], f = 0; i > 0 && u > 0 && (f + u + 1 > r && (u = Math.max(1, r - f)), o.push(e.substring(i -= u, i + u)), !((f += u + 1) > r));) u = t[a = (a + 1) % t.length];
  1771. return o.reverse().join(n)
  1772. }
  1773. }(t.grouping, t.thousands) : rr,
  1774. r = t.currency,
  1775. i = t.decimal,
  1776. o = t.numerals ? function(t) {
  1777. return function(n) {
  1778. return n.replace(/[0-9]/g, function(n) {
  1779. return t[+n]
  1780. })
  1781. }
  1782. }(t.numerals) : rr,
  1783. a = t.percent || "%";
  1784. return {
  1785. format: n,
  1786. formatPrefix: function(t, e) {
  1787. var r = n((t = tr(t), t.type = "f", t)),
  1788. i = 3 * Math.max(-8, Math.min(8, Math.floor(Ke(e) / 3))),
  1789. o = Math.pow(10, -i),
  1790. a = ld[8 + i / 3];
  1791. return function(t) {
  1792. return r(o * t) + a
  1793. }
  1794. }
  1795. }
  1796. }
  1797. function or(n) {
  1798. return cd = ir(n), t.format = cd.format, t.formatPrefix = cd.formatPrefix, cd
  1799. }
  1800. function ar(t) {
  1801. return Math.max(0, -Ke(Math.abs(t)))
  1802. }
  1803. function ur(t, n) {
  1804. return Math.max(0, 3 * Math.max(-8, Math.min(8, Math.floor(Ke(n) / 3))) - Ke(Math.abs(t)))
  1805. }
  1806. function fr(t, n) {
  1807. return t = Math.abs(t), n = Math.abs(n) - t, Math.max(0, Ke(n) - Ke(t)) + 1
  1808. }
  1809. function cr() {
  1810. return new sr
  1811. }
  1812. function sr() {
  1813. this.reset()
  1814. }
  1815. function lr(t, n, e) {
  1816. var r = t.s = n + e,
  1817. i = r - n,
  1818. o = r - i;
  1819. t.t = n - o + (e - i)
  1820. }
  1821. function hr(t) {
  1822. return t > 1 ? 0 : t < -1 ? Gd : Math.acos(t)
  1823. }
  1824. function dr(t) {
  1825. return t > 1 ? Vd : t < -1 ? -Vd : Math.asin(t)
  1826. }
  1827. function pr(t) {
  1828. return (t = ap(t / 2)) * t
  1829. }
  1830. function vr() {}
  1831. function gr(t, n) {
  1832. t && lp.hasOwnProperty(t.type) && lp[t.type](t, n)
  1833. }
  1834. function yr(t, n, e) {
  1835. var r, i = -1,
  1836. o = t.length - e;
  1837. for (n.lineStart(); ++i < o;) r = t[i], n.point(r[0], r[1], r[2]);
  1838. n.lineEnd()
  1839. }
  1840. function _r(t, n) {
  1841. var e = -1,
  1842. r = t.length;
  1843. for (n.polygonStart(); ++e < r;) yr(t[e], n, 1);
  1844. n.polygonEnd()
  1845. }
  1846. function br(t, n) {
  1847. t && sp.hasOwnProperty(t.type) ? sp[t.type](t, n) : gr(t, n)
  1848. }
  1849. function mr() {
  1850. pp.point = wr
  1851. }
  1852. function xr() {
  1853. Mr(hd, dd)
  1854. }
  1855. function wr(t, n) {
  1856. pp.point = Mr, hd = t, dd = n, pd = t *= Qd, vd = np(n = (n *= Qd) / 2 + $d), gd = ap(n)
  1857. }
  1858. function Mr(t, n) {
  1859. n = (n *= Qd) / 2 + $d;
  1860. var e = (t *= Qd) - pd,
  1861. r = e >= 0 ? 1 : -1,
  1862. i = r * e,
  1863. o = np(n),
  1864. a = ap(n),
  1865. u = gd * a,
  1866. f = vd * o + u * np(i),
  1867. c = u * r * ap(i);
  1868. hp.add(tp(c, f)), pd = t, vd = o, gd = a
  1869. }
  1870. function Ar(t) {
  1871. return [tp(t[1], t[0]), dr(t[2])]
  1872. }
  1873. function Tr(t) {
  1874. var n = t[0],
  1875. e = t[1],
  1876. r = np(e);
  1877. return [r * np(n), r * ap(n), ap(e)]
  1878. }
  1879. function Nr(t, n) {
  1880. return t[0] * n[0] + t[1] * n[1] + t[2] * n[2]
  1881. }
  1882. function Sr(t, n) {
  1883. return [t[1] * n[2] - t[2] * n[1], t[2] * n[0] - t[0] * n[2], t[0] * n[1] - t[1] * n[0]]
  1884. }
  1885. function Er(t, n) {
  1886. t[0] += n[0], t[1] += n[1], t[2] += n[2]
  1887. }
  1888. function kr(t, n) {
  1889. return [t[0] * n, t[1] * n, t[2] * n]
  1890. }
  1891. function Cr(t) {
  1892. var n = fp(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);
  1893. t[0] /= n, t[1] /= n, t[2] /= n
  1894. }
  1895. function Pr(t, n) {
  1896. Td.push(Nd = [yd = t, bd = t]), n < _d && (_d = n), n > md && (md = n)
  1897. }
  1898. function zr(t, n) {
  1899. var e = Tr([t * Qd, n * Qd]);
  1900. if (Ad) {
  1901. var r = Sr(Ad, e),
  1902. i = Sr([r[1], -r[0], 0], r);
  1903. Cr(i), i = Ar(i);
  1904. var o, a = t - xd,
  1905. u = a > 0 ? 1 : -1,
  1906. f = i[0] * Zd * u,
  1907. c = Jd(a) > 180;
  1908. c ^ (u * xd < f && f < u * t) ? (o = i[1] * Zd) > md && (md = o) : (f = (f + 360) % 360 - 180, c ^ (u * xd < f && f < u * t) ? (o = -i[1] * Zd) < _d && (_d = o) : (n < _d && (_d = n), n > md && (md = n))), c ? t < xd ? Or(yd, t) > Or(yd, bd) && (bd = t) : Or(t, bd) > Or(yd, bd) && (yd = t) : bd >= yd ? (t < yd && (yd = t), t > bd && (bd = t)) : t > xd ? Or(yd, t) > Or(yd, bd) && (bd = t) : Or(t, bd) > Or(yd, bd) && (yd = t)
  1909. } else Td.push(Nd = [yd = t, bd = t]);
  1910. n < _d && (_d = n), n > md && (md = n), Ad = e, xd = t
  1911. }
  1912. function Rr() {
  1913. gp.point = zr
  1914. }
  1915. function Lr() {
  1916. Nd[0] = yd, Nd[1] = bd, gp.point = Pr, Ad = null
  1917. }
  1918. function Dr(t, n) {
  1919. if (Ad) {
  1920. var e = t - xd;
  1921. vp.add(Jd(e) > 180 ? e + (e > 0 ? 360 : -360) : e)
  1922. } else wd = t, Md = n;
  1923. pp.point(t, n), zr(t, n)
  1924. }
  1925. function Ur() {
  1926. pp.lineStart()
  1927. }
  1928. function qr() {
  1929. Dr(wd, Md), pp.lineEnd(), Jd(vp) > Hd && (yd = -(bd = 180)), Nd[0] = yd, Nd[1] = bd, Ad = null
  1930. }
  1931. function Or(t, n) {
  1932. return (n -= t) < 0 ? n + 360 : n
  1933. }
  1934. function Yr(t, n) {
  1935. return t[0] - n[0]
  1936. }
  1937. function Br(t, n) {
  1938. return t[0] <= t[1] ? t[0] <= n && n <= t[1] : n < t[0] || t[1] < n
  1939. }
  1940. function Fr(t, n) {
  1941. t *= Qd;
  1942. var e = np(n *= Qd);
  1943. Ir(e * np(t), e * ap(t), ap(n))
  1944. }
  1945. function Ir(t, n, e) {
  1946. kd += (t - kd) / ++Sd, Cd += (n - Cd) / Sd, Pd += (e - Pd) / Sd
  1947. }
  1948. function jr() {
  1949. yp.point = Hr
  1950. }
  1951. function Hr(t, n) {
  1952. t *= Qd;
  1953. var e = np(n *= Qd);
  1954. Bd = e * np(t), Fd = e * ap(t), Id = ap(n), yp.point = Xr, Ir(Bd, Fd, Id)
  1955. }
  1956. function Xr(t, n) {
  1957. t *= Qd;
  1958. var e = np(n *= Qd),
  1959. r = e * np(t),
  1960. i = e * ap(t),
  1961. o = ap(n),
  1962. a = tp(fp((a = Fd * o - Id * i) * a + (a = Id * r - Bd * o) * a + (a = Bd * i - Fd * r) * a), Bd * r + Fd * i + Id * o);
  1963. Ed += a, zd += a * (Bd + (Bd = r)), Rd += a * (Fd + (Fd = i)), Ld += a * (Id + (Id = o)), Ir(Bd, Fd, Id)
  1964. }
  1965. function Gr() {
  1966. yp.point = Fr
  1967. }
  1968. function Vr() {
  1969. yp.point = Wr
  1970. }
  1971. function $r() {
  1972. Zr(Od, Yd), yp.point = Fr
  1973. }
  1974. function Wr(t, n) {
  1975. Od = t, Yd = n, t *= Qd, n *= Qd, yp.point = Zr;
  1976. var e = np(n);
  1977. Bd = e * np(t), Fd = e * ap(t), Id = ap(n), Ir(Bd, Fd, Id)
  1978. }
  1979. function Zr(t, n) {
  1980. t *= Qd;
  1981. var e = np(n *= Qd),
  1982. r = e * np(t),
  1983. i = e * ap(t),
  1984. o = ap(n),
  1985. a = Fd * o - Id * i,
  1986. u = Id * r - Bd * o,
  1987. f = Bd * i - Fd * r,
  1988. c = fp(a * a + u * u + f * f),
  1989. s = dr(c),
  1990. l = c && -s / c;
  1991. Dd += l * a, Ud += l * u, qd += l * f, Ed += s, zd += s * (Bd + (Bd = r)), Rd += s * (Fd + (Fd = i)), Ld += s * (Id + (Id = o)), Ir(Bd, Fd, Id)
  1992. }
  1993. function Qr(t) {
  1994. return function() {
  1995. return t
  1996. }
  1997. }
  1998. function Jr(t, n) {
  1999. function e(e, r) {
  2000. return e = t(e, r), n(e[0], e[1])
  2001. }
  2002. return t.invert && n.invert && (e.invert = function(e, r) {
  2003. return (e = n.invert(e, r)) && t.invert(e[0], e[1])
  2004. }), e
  2005. }
  2006. function Kr(t, n) {
  2007. return [t > Gd ? t - Wd : t < -Gd ? t + Wd : t, n]
  2008. }
  2009. function ti(t, n, e) {
  2010. return (t %= Wd) ? n || e ? Jr(ei(t), ri(n, e)) : ei(t) : n || e ? ri(n, e) : Kr
  2011. }
  2012. function ni(t) {
  2013. return function(n, e) {
  2014. return n += t, [n > Gd ? n - Wd : n < -Gd ? n + Wd : n, e]
  2015. }
  2016. }
  2017. function ei(t) {
  2018. var n = ni(t);
  2019. return n.invert = ni(-t), n
  2020. }
  2021. function ri(t, n) {
  2022. function e(t, n) {
  2023. var e = np(n),
  2024. u = np(t) * e,
  2025. f = ap(t) * e,
  2026. c = ap(n),
  2027. s = c * r + u * i;
  2028. return [tp(f * o - s * a, u * r - c * i), dr(s * o + f * a)]
  2029. }
  2030. var r = np(t),
  2031. i = ap(t),
  2032. o = np(n),
  2033. a = ap(n);
  2034. return e.invert = function(t, n) {
  2035. var e = np(n),
  2036. u = np(t) * e,
  2037. f = ap(t) * e,
  2038. c = ap(n),
  2039. s = c * o - f * a;
  2040. return [tp(f * o + c * a, u * r + s * i), dr(s * r - u * i)]
  2041. }, e
  2042. }
  2043. function ii(t) {
  2044. function n(n) {
  2045. return n = t(n[0] * Qd, n[1] * Qd), n[0] *= Zd, n[1] *= Zd, n
  2046. }
  2047. return t = ti(t[0] * Qd, t[1] * Qd, t.length > 2 ? t[2] * Qd : 0), n.invert = function(n) {
  2048. return n = t.invert(n[0] * Qd, n[1] * Qd), n[0] *= Zd, n[1] *= Zd, n
  2049. }, n
  2050. }
  2051. function oi(t, n, e, r, i, o) {
  2052. if (e) {
  2053. var a = np(n),
  2054. u = ap(n),
  2055. f = r * e;
  2056. null == i ? (i = n + r * Wd, o = n - f / 2) : (i = ai(a, i), o = ai(a, o), (r > 0 ? i < o : i > o) && (i += r * Wd));
  2057. for (var c, s = i; r > 0 ? s > o : s < o; s -= f) c = Ar([a, -u * np(s), -u * ap(s)]), t.point(c[0], c[1])
  2058. }
  2059. }
  2060. function ai(t, n) {
  2061. (n = Tr(n))[0] -= t, Cr(n);
  2062. var e = hr(-n[1]);
  2063. return ((-n[2] < 0 ? -e : e) + Wd - Hd) % Wd
  2064. }
  2065. function ui() {
  2066. var t, n = [];
  2067. return {
  2068. point: function(n, e) {
  2069. t.push([n, e])
  2070. },
  2071. lineStart: function() {
  2072. n.push(t = [])
  2073. },
  2074. lineEnd: vr,
  2075. rejoin: function() {
  2076. n.length > 1 && n.push(n.pop().concat(n.shift()))
  2077. },
  2078. result: function() {
  2079. var e = n;
  2080. return n = [], t = null, e
  2081. }
  2082. }
  2083. }
  2084. function fi(t, n) {
  2085. return Jd(t[0] - n[0]) < Hd && Jd(t[1] - n[1]) < Hd
  2086. }
  2087. function ci(t, n, e, r) {
  2088. this.x = t, this.z = n, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
  2089. }
  2090. function si(t, n, e, r, i) {
  2091. var o, a, u = [],
  2092. f = [];
  2093. if (t.forEach(function(t) {
  2094. if (!((n = t.length - 1) <= 0)) {
  2095. var n, e, r = t[0],
  2096. a = t[n];
  2097. if (fi(r, a)) {
  2098. for (i.lineStart(), o = 0; o < n; ++o) i.point((r = t[o])[0], r[1]);
  2099. i.lineEnd()
  2100. } else u.push(e = new ci(r, t, null, !0)), f.push(e.o = new ci(r, null, e, !1)), u.push(e = new ci(a, t, null, !1)), f.push(e.o = new ci(a, null, e, !0))
  2101. }
  2102. }), u.length) {
  2103. for (f.sort(n), li(u), li(f), o = 0, a = f.length; o < a; ++o) f[o].e = e = !e;
  2104. for (var c, s, l = u[0];;) {
  2105. for (var h = l, d = !0; h.v;)
  2106. if ((h = h.n) === l) return;
  2107. c = h.z, i.lineStart();
  2108. do {
  2109. if (h.v = h.o.v = !0, h.e) {
  2110. if (d)
  2111. for (o = 0, a = c.length; o < a; ++o) i.point((s = c[o])[0], s[1]);
  2112. else r(h.x, h.n.x, 1, i);
  2113. h = h.n
  2114. } else {
  2115. if (d)
  2116. for (c = h.p.z, o = c.length - 1; o >= 0; --o) i.point((s = c[o])[0], s[1]);
  2117. else r(h.x, h.p.x, -1, i);
  2118. h = h.p
  2119. }
  2120. c = (h = h.o).z, d = !d
  2121. } while (!h.v);
  2122. i.lineEnd()
  2123. }
  2124. }
  2125. }
  2126. function li(t) {
  2127. if (n = t.length) {
  2128. for (var n, e, r = 0, i = t[0]; ++r < n;) i.n = e = t[r], e.p = i, i = e;
  2129. i.n = e = t[0], e.p = i
  2130. }
  2131. }
  2132. function hi(t, n) {
  2133. var e = n[0],
  2134. r = n[1],
  2135. i = ap(r),
  2136. o = [ap(e), -np(e), 0],
  2137. a = 0,
  2138. u = 0;
  2139. kp.reset(), 1 === i ? r = Vd + Hd : -1 === i && (r = -Vd - Hd);
  2140. for (var f = 0, c = t.length; f < c; ++f)
  2141. if (l = (s = t[f]).length)
  2142. for (var s, l, h = s[l - 1], d = h[0], p = h[1] / 2 + $d, v = ap(p), g = np(p), y = 0; y < l; ++y, d = b, v = x, g = w, h = _) {
  2143. var _ = s[y],
  2144. b = _[0],
  2145. m = _[1] / 2 + $d,
  2146. x = ap(m),
  2147. w = np(m),
  2148. M = b - d,
  2149. A = M >= 0 ? 1 : -1,
  2150. T = A * M,
  2151. N = T > Gd,
  2152. S = v * x;
  2153. if (kp.add(tp(S * A * ap(T), g * w + S * np(T))), a += N ? M + A * Wd : M, N ^ d >= e ^ b >= e) {
  2154. var E = Sr(Tr(h), Tr(_));
  2155. Cr(E);
  2156. var k = Sr(o, E);
  2157. Cr(k);
  2158. var C = (N ^ M >= 0 ? -1 : 1) * dr(k[2]);
  2159. (r > C || r === C && (E[0] || E[1])) && (u += N ^ M >= 0 ? 1 : -1)
  2160. }
  2161. }
  2162. return (a < -Hd || a < Hd && kp < -Hd) ^ 1 & u
  2163. }
  2164. function di(t, n, e, r) {
  2165. return function(i) {
  2166. function o(n, e) {
  2167. t(n, e) && i.point(n, e)
  2168. }
  2169. function a(t, n) {
  2170. v.point(t, n)
  2171. }
  2172. function u() {
  2173. m.point = a, v.lineStart()
  2174. }
  2175. function f() {
  2176. m.point = o, v.lineEnd()
  2177. }
  2178. function c(t, n) {
  2179. p.push([t, n]), _.point(t, n)
  2180. }
  2181. function s() {
  2182. _.lineStart(), p = []
  2183. }
  2184. function l() {
  2185. c(p[0][0], p[0][1]), _.lineEnd();
  2186. var t, n, e, r, o = _.clean(),
  2187. a = g.result(),
  2188. u = a.length;
  2189. if (p.pop(), h.push(p), p = null, u)
  2190. if (1 & o) {
  2191. if (e = a[0], (n = e.length - 1) > 0) {
  2192. for (b || (i.polygonStart(), b = !0), i.lineStart(), t = 0; t < n; ++t) i.point((r = e[t])[0], r[1]);
  2193. i.lineEnd()
  2194. }
  2195. } else u > 1 && 2 & o && a.push(a.pop().concat(a.shift())), d.push(a.filter(pi))
  2196. }
  2197. var h, d, p, v = n(i),
  2198. g = ui(),
  2199. _ = n(g),
  2200. b = !1,
  2201. m = {
  2202. point: o,
  2203. lineStart: u,
  2204. lineEnd: f,
  2205. polygonStart: function() {
  2206. m.point = c, m.lineStart = s, m.lineEnd = l, d = [], h = []
  2207. },
  2208. polygonEnd: function() {
  2209. m.point = o, m.lineStart = u, m.lineEnd = f, d = y(d);
  2210. var t = hi(h, r);
  2211. d.length ? (b || (i.polygonStart(), b = !0), si(d, vi, t, e, i)) : t && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), d = h = null
  2212. },
  2213. sphere: function() {
  2214. i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
  2215. }
  2216. };
  2217. return m
  2218. }
  2219. }
  2220. function pi(t) {
  2221. return t.length > 1
  2222. }
  2223. function vi(t, n) {
  2224. return ((t = t.x)[0] < 0 ? t[1] - Vd - Hd : Vd - t[1]) - ((n = n.x)[0] < 0 ? n[1] - Vd - Hd : Vd - n[1])
  2225. }
  2226. function gi(t) {
  2227. function n(t, n) {
  2228. return np(t) * np(n) > i
  2229. }
  2230. function e(t, n, e) {
  2231. var r = [1, 0, 0],
  2232. o = Sr(Tr(t), Tr(n)),
  2233. a = Nr(o, o),
  2234. u = o[0],
  2235. f = a - u * u;
  2236. if (!f) return !e && t;
  2237. var c = i * a / f,
  2238. s = -i * u / f,
  2239. l = Sr(r, o),
  2240. h = kr(r, c);
  2241. Er(h, kr(o, s));
  2242. var d = l,
  2243. p = Nr(h, d),
  2244. v = Nr(d, d),
  2245. g = p * p - v * (Nr(h, h) - 1);
  2246. if (!(g < 0)) {
  2247. var y = fp(g),
  2248. _ = kr(d, (-p - y) / v);
  2249. if (Er(_, h), _ = Ar(_), !e) return _;
  2250. var b, m = t[0],
  2251. x = n[0],
  2252. w = t[1],
  2253. M = n[1];
  2254. x < m && (b = m, m = x, x = b);
  2255. var A = x - m,
  2256. T = Jd(A - Gd) < Hd;
  2257. if (!T && M < w && (b = w, w = M, M = b), T || A < Hd ? T ? w + M > 0 ^ _[1] < (Jd(_[0] - m) < Hd ? w : M) : w <= _[1] && _[1] <= M : A > Gd ^ (m <= _[0] && _[0] <= x)) {
  2258. var N = kr(d, (-p + y) / v);
  2259. return Er(N, h), [_, Ar(N)]
  2260. }
  2261. }
  2262. }
  2263. function r(n, e) {
  2264. var r = a ? t : Gd - t,
  2265. i = 0;
  2266. return n < -r ? i |= 1 : n > r && (i |= 2), e < -r ? i |= 4 : e > r && (i |= 8), i
  2267. }
  2268. var i = np(t),
  2269. o = 6 * Qd,
  2270. a = i > 0,
  2271. u = Jd(i) > Hd;
  2272. return di(n, function(t) {
  2273. var i, o, f, c, s;
  2274. return {
  2275. lineStart: function() {
  2276. c = f = !1, s = 1
  2277. },
  2278. point: function(l, h) {
  2279. var d, p = [l, h],
  2280. v = n(l, h),
  2281. g = a ? v ? 0 : r(l, h) : v ? r(l + (l < 0 ? Gd : -Gd), h) : 0;
  2282. if (!i && (c = f = v) && t.lineStart(), v !== f && (!(d = e(i, p)) || fi(i, d) || fi(p, d)) && (p[0] += Hd, p[1] += Hd, v = n(p[0], p[1])), v !== f) s = 0, v ? (t.lineStart(), d = e(p, i), t.point(d[0], d[1])) : (d = e(i, p), t.point(d[0], d[1]), t.lineEnd()), i = d;
  2283. else if (u && i && a ^ v) {
  2284. var y;
  2285. g & o || !(y = e(p, i, !0)) || (s = 0, a ? (t.lineStart(), t.point(y[0][0], y[0][1]), t.point(y[1][0], y[1][1]), t.lineEnd()) : (t.point(y[1][0], y[1][1]), t.lineEnd(), t.lineStart(), t.point(y[0][0], y[0][1])))
  2286. }!v || i && fi(i, p) || t.point(p[0], p[1]), i = p, f = v, o = g
  2287. },
  2288. lineEnd: function() {
  2289. f && t.lineEnd(), i = null
  2290. },
  2291. clean: function() {
  2292. return s | (c && f) << 1
  2293. }
  2294. }
  2295. }, function(n, e, r, i) {
  2296. oi(i, t, o, r, n, e)
  2297. }, a ? [0, -t] : [-Gd, t - Gd])
  2298. }
  2299. function yi(t, n, e, r) {
  2300. function i(i, o) {
  2301. return t <= i && i <= e && n <= o && o <= r
  2302. }
  2303. function o(i, o, u, c) {
  2304. var s = 0,
  2305. l = 0;
  2306. if (null == i || (s = a(i, u)) !== (l = a(o, u)) || f(i, o) < 0 ^ u > 0)
  2307. do {
  2308. c.point(0 === s || 3 === s ? t : e, s > 1 ? r : n)
  2309. } while ((s = (s + u + 4) % 4) !== l);
  2310. else c.point(o[0], o[1])
  2311. }
  2312. function a(r, i) {
  2313. return Jd(r[0] - t) < Hd ? i > 0 ? 0 : 3 : Jd(r[0] - e) < Hd ? i > 0 ? 2 : 1 : Jd(r[1] - n) < Hd ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2
  2314. }
  2315. function u(t, n) {
  2316. return f(t.x, n.x)
  2317. }
  2318. function f(t, n) {
  2319. var e = a(t, 1),
  2320. r = a(n, 1);
  2321. return e !== r ? e - r : 0 === e ? n[1] - t[1] : 1 === e ? t[0] - n[0] : 2 === e ? t[1] - n[1] : n[0] - t[0]
  2322. }
  2323. return function(a) {
  2324. function f(t, n) {
  2325. i(t, n) && w.point(t, n)
  2326. }
  2327. function c(o, a) {
  2328. var u = i(o, a);
  2329. if (l && h.push([o, a]), m) d = o, p = a, v = u, m = !1, u && (w.lineStart(), w.point(o, a));
  2330. else if (u && b) w.point(o, a);
  2331. else {
  2332. var f = [g = Math.max(zp, Math.min(Pp, g)), _ = Math.max(zp, Math.min(Pp, _))],
  2333. c = [o = Math.max(zp, Math.min(Pp, o)), a = Math.max(zp, Math.min(Pp, a))];
  2334. ! function(t, n, e, r, i, o) {
  2335. var a, u = t[0],
  2336. f = t[1],
  2337. c = 0,
  2338. s = 1,
  2339. l = n[0] - u,
  2340. h = n[1] - f;
  2341. if (a = e - u, l || !(a > 0)) {
  2342. if (a /= l, l < 0) {
  2343. if (a < c) return;
  2344. a < s && (s = a)
  2345. } else if (l > 0) {
  2346. if (a > s) return;
  2347. a > c && (c = a)
  2348. }
  2349. if (a = i - u, l || !(a < 0)) {
  2350. if (a /= l, l < 0) {
  2351. if (a > s) return;
  2352. a > c && (c = a)
  2353. } else if (l > 0) {
  2354. if (a < c) return;
  2355. a < s && (s = a)
  2356. }
  2357. if (a = r - f, h || !(a > 0)) {
  2358. if (a /= h, h < 0) {
  2359. if (a < c) return;
  2360. a < s && (s = a)
  2361. } else if (h > 0) {
  2362. if (a > s) return;
  2363. a > c && (c = a)
  2364. }
  2365. if (a = o - f, h || !(a < 0)) {
  2366. if (a /= h, h < 0) {
  2367. if (a > s) return;
  2368. a > c && (c = a)
  2369. } else if (h > 0) {
  2370. if (a < c) return;
  2371. a < s && (s = a)
  2372. }
  2373. return c > 0 && (t[0] = u + c * l, t[1] = f + c * h), s < 1 && (n[0] = u + s * l, n[1] = f + s * h), !0
  2374. }
  2375. }
  2376. }
  2377. }
  2378. }(f, c, t, n, e, r) ? u && (w.lineStart(), w.point(o, a), x = !1): (b || (w.lineStart(), w.point(f[0], f[1])), w.point(c[0], c[1]), u || w.lineEnd(), x = !1)
  2379. }
  2380. g = o, _ = a, b = u
  2381. }
  2382. var s, l, h, d, p, v, g, _, b, m, x, w = a,
  2383. M = ui(),
  2384. A = {
  2385. point: f,
  2386. lineStart: function() {
  2387. A.point = c, l && l.push(h = []), m = !0, b = !1, g = _ = NaN
  2388. },
  2389. lineEnd: function() {
  2390. s && (c(d, p), v && b && M.rejoin(), s.push(M.result())), A.point = f, b && w.lineEnd()
  2391. },
  2392. polygonStart: function() {
  2393. w = M, s = [], l = [], x = !0
  2394. },
  2395. polygonEnd: function() {
  2396. var n = function() {
  2397. for (var n = 0, e = 0, i = l.length; e < i; ++e)
  2398. for (var o, a, u = l[e], f = 1, c = u.length, s = u[0], h = s[0], d = s[1]; f < c; ++f) o = h, a = d, h = (s = u[f])[0], d = s[1], a <= r ? d > r && (h - o) * (r - a) > (d - a) * (t - o) && ++n : d <= r && (h - o) * (r - a) < (d - a) * (t - o) && --n;
  2399. return n
  2400. }(),
  2401. e = x && n,
  2402. i = (s = y(s)).length;
  2403. (e || i) && (a.polygonStart(), e && (a.lineStart(), o(null, null, 1, a), a.lineEnd()), i && si(s, u, n, o, a), a.polygonEnd()), w = a, s = l = h = null
  2404. }
  2405. };
  2406. return A
  2407. }
  2408. }
  2409. function _i() {
  2410. Lp.point = Lp.lineEnd = vr
  2411. }
  2412. function bi(t, n) {
  2413. _p = t *= Qd, bp = ap(n *= Qd), mp = np(n), Lp.point = mi
  2414. }
  2415. function mi(t, n) {
  2416. t *= Qd;
  2417. var e = ap(n *= Qd),
  2418. r = np(n),
  2419. i = Jd(t - _p),
  2420. o = np(i),
  2421. a = r * ap(i),
  2422. u = mp * e - bp * r * o,
  2423. f = bp * e + mp * r * o;
  2424. Rp.add(tp(fp(a * a + u * u), f)), _p = t, bp = e, mp = r
  2425. }
  2426. function xi(t) {
  2427. return Rp.reset(), br(t, Lp), +Rp
  2428. }
  2429. function wi(t, n) {
  2430. return Dp[0] = t, Dp[1] = n, xi(Up)
  2431. }
  2432. function Mi(t, n) {
  2433. return !(!t || !Op.hasOwnProperty(t.type)) && Op[t.type](t, n)
  2434. }
  2435. function Ai(t, n) {
  2436. return 0 === wi(t, n)
  2437. }
  2438. function Ti(t, n) {
  2439. var e = wi(t[0], t[1]);
  2440. return wi(t[0], n) + wi(n, t[1]) <= e + Hd
  2441. }
  2442. function Ni(t, n) {
  2443. return !!hi(t.map(Si), Ei(n))
  2444. }
  2445. function Si(t) {
  2446. return (t = t.map(Ei)).pop(), t
  2447. }
  2448. function Ei(t) {
  2449. return [t[0] * Qd, t[1] * Qd]
  2450. }
  2451. function ki(t, n, e) {
  2452. var r = s(t, n - Hd, e).concat(n);
  2453. return function(t) {
  2454. return r.map(function(n) {
  2455. return [t, n]
  2456. })
  2457. }
  2458. }
  2459. function Ci(t, n, e) {
  2460. var r = s(t, n - Hd, e).concat(n);
  2461. return function(t) {
  2462. return r.map(function(n) {
  2463. return [n, t]
  2464. })
  2465. }
  2466. }
  2467. function Pi() {
  2468. function t() {
  2469. return {
  2470. type: "MultiLineString",
  2471. coordinates: n()
  2472. }
  2473. }
  2474. function n() {
  2475. return s(ep(o / y) * y, i, y).map(d).concat(s(ep(c / _) * _, f, _).map(p)).concat(s(ep(r / v) * v, e, v).filter(function(t) {
  2476. return Jd(t % y) > Hd
  2477. }).map(l)).concat(s(ep(u / g) * g, a, g).filter(function(t) {
  2478. return Jd(t % _) > Hd
  2479. }).map(h))
  2480. }
  2481. var e, r, i, o, a, u, f, c, l, h, d, p, v = 10,
  2482. g = v,
  2483. y = 90,
  2484. _ = 360,
  2485. b = 2.5;
  2486. return t.lines = function() {
  2487. return n().map(function(t) {
  2488. return {
  2489. type: "LineString",
  2490. coordinates: t
  2491. }
  2492. })
  2493. }, t.outline = function() {
  2494. return {
  2495. type: "Polygon",
  2496. coordinates: [d(o).concat(p(f).slice(1), d(i).reverse().slice(1), p(c).reverse().slice(1))]
  2497. }
  2498. }, t.extent = function(n) {
  2499. return arguments.length ? t.extentMajor(n).extentMinor(n) : t.extentMinor()
  2500. }, t.extentMajor = function(n) {
  2501. return arguments.length ? (o = +n[0][0], i = +n[1][0], c = +n[0][1], f = +n[1][1], o > i && (n = o, o = i, i = n), c > f && (n = c, c = f, f = n), t.precision(b)) : [
  2502. [o, c],
  2503. [i, f]
  2504. ]
  2505. }, t.extentMinor = function(n) {
  2506. return arguments.length ? (r = +n[0][0], e = +n[1][0], u = +n[0][1], a = +n[1][1], r > e && (n = r, r = e, e = n), u > a && (n = u, u = a, a = n), t.precision(b)) : [
  2507. [r, u],
  2508. [e, a]
  2509. ]
  2510. }, t.step = function(n) {
  2511. return arguments.length ? t.stepMajor(n).stepMinor(n) : t.stepMinor()
  2512. }, t.stepMajor = function(n) {
  2513. return arguments.length ? (y = +n[0], _ = +n[1], t) : [y, _]
  2514. }, t.stepMinor = function(n) {
  2515. return arguments.length ? (v = +n[0], g = +n[1], t) : [v, g]
  2516. }, t.precision = function(n) {
  2517. return arguments.length ? (b = +n, l = ki(u, a, 90), h = Ci(r, e, b), d = ki(c, f, 90), p = Ci(o, i, b), t) : b
  2518. }, t.extentMajor([
  2519. [-180, -90 + Hd],
  2520. [180, 90 - Hd]
  2521. ]).extentMinor([
  2522. [-180, -80 - Hd],
  2523. [180, 80 + Hd]
  2524. ])
  2525. }
  2526. function zi(t) {
  2527. return t
  2528. }
  2529. function Ri() {
  2530. Fp.point = Li
  2531. }
  2532. function Li(t, n) {
  2533. Fp.point = Di, xp = Mp = t, wp = Ap = n
  2534. }
  2535. function Di(t, n) {
  2536. Bp.add(Ap * t - Mp * n), Mp = t, Ap = n
  2537. }
  2538. function Ui() {
  2539. Di(xp, wp)
  2540. }
  2541. function qi(t, n) {
  2542. Vp += t, $p += n, ++Wp
  2543. }
  2544. function Oi() {
  2545. ev.point = Yi
  2546. }
  2547. function Yi(t, n) {
  2548. ev.point = Bi, qi(Sp = t, Ep = n)
  2549. }
  2550. function Bi(t, n) {
  2551. var e = t - Sp,
  2552. r = n - Ep,
  2553. i = fp(e * e + r * r);
  2554. Zp += i * (Sp + t) / 2, Qp += i * (Ep + n) / 2, Jp += i, qi(Sp = t, Ep = n)
  2555. }
  2556. function Fi() {
  2557. ev.point = qi
  2558. }
  2559. function Ii() {
  2560. ev.point = Hi
  2561. }
  2562. function ji() {
  2563. Xi(Tp, Np)
  2564. }
  2565. function Hi(t, n) {
  2566. ev.point = Xi, qi(Tp = Sp = t, Np = Ep = n)
  2567. }
  2568. function Xi(t, n) {
  2569. var e = t - Sp,
  2570. r = n - Ep,
  2571. i = fp(e * e + r * r);
  2572. Zp += i * (Sp + t) / 2, Qp += i * (Ep + n) / 2, Jp += i, Kp += (i = Ep * t - Sp * n) * (Sp + t), tv += i * (Ep + n), nv += 3 * i, qi(Sp = t, Ep = n)
  2573. }
  2574. function Gi(t) {
  2575. this._context = t
  2576. }
  2577. function Vi(t, n) {
  2578. cv.point = $i, iv = av = t, ov = uv = n
  2579. }
  2580. function $i(t, n) {
  2581. av -= t, uv -= n, fv.add(fp(av * av + uv * uv)), av = t, uv = n
  2582. }
  2583. function Wi() {
  2584. this._string = []
  2585. }
  2586. function Zi(t) {
  2587. return "m0," + t + "a" + t + "," + t + " 0 1,1 0," + -2 * t + "a" + t + "," + t + " 0 1,1 0," + 2 * t + "z"
  2588. }
  2589. function Qi(t) {
  2590. return function(n) {
  2591. var e = new Ji;
  2592. for (var r in t) e[r] = t[r];
  2593. return e.stream = n, e
  2594. }
  2595. }
  2596. function Ji() {}
  2597. function Ki(t, n, e) {
  2598. var r = t.clipExtent && t.clipExtent();
  2599. return t.scale(150).translate([0, 0]), null != r && t.clipExtent(null), br(e, t.stream(Gp)), n(Gp.result()), null != r && t.clipExtent(r), t
  2600. }
  2601. function to(t, n, e) {
  2602. return Ki(t, function(e) {
  2603. var r = n[1][0] - n[0][0],
  2604. i = n[1][1] - n[0][1],
  2605. o = Math.min(r / (e[1][0] - e[0][0]), i / (e[1][1] - e[0][1])),
  2606. a = +n[0][0] + (r - o * (e[1][0] + e[0][0])) / 2,
  2607. u = +n[0][1] + (i - o * (e[1][1] + e[0][1])) / 2;
  2608. t.scale(150 * o).translate([a, u])
  2609. }, e)
  2610. }
  2611. function no(t, n, e) {
  2612. return to(t, [
  2613. [0, 0], n
  2614. ], e)
  2615. }
  2616. function eo(t, n, e) {
  2617. return Ki(t, function(e) {
  2618. var r = +n,
  2619. i = r / (e[1][0] - e[0][0]),
  2620. o = (r - i * (e[1][0] + e[0][0])) / 2,
  2621. a = -i * e[0][1];
  2622. t.scale(150 * i).translate([o, a])
  2623. }, e)
  2624. }
  2625. function ro(t, n, e) {
  2626. return Ki(t, function(e) {
  2627. var r = +n,
  2628. i = r / (e[1][1] - e[0][1]),
  2629. o = -i * e[0][0],
  2630. a = (r - i * (e[1][1] + e[0][1])) / 2;
  2631. t.scale(150 * i).translate([o, a])
  2632. }, e)
  2633. }
  2634. function io(t, n) {
  2635. return +n ? function(t, n) {
  2636. function e(r, i, o, a, u, f, c, s, l, h, d, p, v, g) {
  2637. var y = c - r,
  2638. _ = s - i,
  2639. b = y * y + _ * _;
  2640. if (b > 4 * n && v--) {
  2641. var m = a + h,
  2642. x = u + d,
  2643. w = f + p,
  2644. M = fp(m * m + x * x + w * w),
  2645. A = dr(w /= M),
  2646. T = Jd(Jd(w) - 1) < Hd || Jd(o - l) < Hd ? (o + l) / 2 : tp(x, m),
  2647. N = t(T, A),
  2648. S = N[0],
  2649. E = N[1],
  2650. k = S - r,
  2651. C = E - i,
  2652. P = _ * k - y * C;
  2653. (P * P / b > n || Jd((y * k + _ * C) / b - .5) > .3 || a * h + u * d + f * p < lv) && (e(r, i, o, a, u, f, S, E, T, m /= M, x /= M, w, v, g), g.point(S, E), e(S, E, T, m, x, w, c, s, l, h, d, p, v, g))
  2654. }
  2655. }
  2656. return function(n) {
  2657. function r(e, r) {
  2658. e = t(e, r), n.point(e[0], e[1])
  2659. }
  2660. function i() {
  2661. y = NaN, w.point = o, n.lineStart()
  2662. }
  2663. function o(r, i) {
  2664. var o = Tr([r, i]),
  2665. a = t(r, i);
  2666. e(y, _, g, b, m, x, y = a[0], _ = a[1], g = r, b = o[0], m = o[1], x = o[2], sv, n), n.point(y, _)
  2667. }
  2668. function a() {
  2669. w.point = r, n.lineEnd()
  2670. }
  2671. function u() {
  2672. i(), w.point = f, w.lineEnd = c
  2673. }
  2674. function f(t, n) {
  2675. o(s = t, n), l = y, h = _, d = b, p = m, v = x, w.point = o
  2676. }
  2677. function c() {
  2678. e(y, _, g, b, m, x, l, h, s, d, p, v, sv, n), w.lineEnd = a, a()
  2679. }
  2680. var s, l, h, d, p, v, g, y, _, b, m, x, w = {
  2681. point: r,
  2682. lineStart: i,
  2683. lineEnd: a,
  2684. polygonStart: function() {
  2685. n.polygonStart(), w.lineStart = u
  2686. },
  2687. polygonEnd: function() {
  2688. n.polygonEnd(), w.lineStart = i
  2689. }
  2690. };
  2691. return w
  2692. }
  2693. }(t, n) : function(t) {
  2694. return Qi({
  2695. point: function(n, e) {
  2696. n = t(n, e), this.stream.point(n[0], n[1])
  2697. }
  2698. })
  2699. }(t)
  2700. }
  2701. function oo(t, n, e, r) {
  2702. function i(t, r) {
  2703. return [u * t - f * r + n, e - f * t - u * r]
  2704. }
  2705. var o = np(r),
  2706. a = ap(r),
  2707. u = o * t,
  2708. f = a * t,
  2709. c = o / t,
  2710. s = a / t,
  2711. l = (a * e - o * n) / t,
  2712. h = (a * n + o * e) / t;
  2713. return i.invert = function(t, n) {
  2714. return [c * t - s * n + l, h - s * t - c * n]
  2715. }, i
  2716. }
  2717. function ao(t) {
  2718. return uo(function() {
  2719. return t
  2720. })()
  2721. }
  2722. function uo(t) {
  2723. function n(t) {
  2724. return l(t[0] * Qd, t[1] * Qd)
  2725. }
  2726. function e() {
  2727. var t = oo(p, 0, 0, w).apply(null, i(y, _)),
  2728. n = (w ? oo : function(t, n, e) {
  2729. function r(r, i) {
  2730. return [n + t * r, e - t * i]
  2731. }
  2732. return r.invert = function(r, i) {
  2733. return [(r - n) / t, (e - i) / t]
  2734. }, r
  2735. })(p, v - t[0], g - t[1], w);
  2736. return o = ti(b, m, x), s = Jr(i, n), l = Jr(o, s), c = io(s, S), r()
  2737. }
  2738. function r() {
  2739. return h = d = null, n
  2740. }
  2741. var i, o, a, u, f, c, s, l, h, d, p = 150,
  2742. v = 480,
  2743. g = 250,
  2744. y = 0,
  2745. _ = 0,
  2746. b = 0,
  2747. m = 0,
  2748. x = 0,
  2749. w = 0,
  2750. M = null,
  2751. A = Cp,
  2752. T = null,
  2753. N = zi,
  2754. S = .5;
  2755. return n.stream = function(t) {
  2756. return h && d === t ? h : h = hv(function(t) {
  2757. return Qi({
  2758. point: function(n, e) {
  2759. var r = t(n, e);
  2760. return this.stream.point(r[0], r[1])
  2761. }
  2762. })
  2763. }(o)(A(c(N(d = t)))))
  2764. }, n.preclip = function(t) {
  2765. return arguments.length ? (A = t, M = void 0, r()) : A
  2766. }, n.postclip = function(t) {
  2767. return arguments.length ? (N = t, T = a = u = f = null, r()) : N
  2768. }, n.clipAngle = function(t) {
  2769. return arguments.length ? (A = +t ? gi(M = t * Qd) : (M = null, Cp), r()) : M * Zd
  2770. }, n.clipExtent = function(t) {
  2771. return arguments.length ? (N = null == t ? (T = a = u = f = null, zi) : yi(T = +t[0][0], a = +t[0][1], u = +t[1][0], f = +t[1][1]), r()) : null == T ? null : [
  2772. [T, a],
  2773. [u, f]
  2774. ]
  2775. }, n.scale = function(t) {
  2776. return arguments.length ? (p = +t, e()) : p
  2777. }, n.translate = function(t) {
  2778. return arguments.length ? (v = +t[0], g = +t[1], e()) : [v, g]
  2779. }, n.center = function(t) {
  2780. return arguments.length ? (y = t[0] % 360 * Qd, _ = t[1] % 360 * Qd, e()) : [y * Zd, _ * Zd]
  2781. }, n.rotate = function(t) {
  2782. return arguments.length ? (b = t[0] % 360 * Qd, m = t[1] % 360 * Qd, x = t.length > 2 ? t[2] % 360 * Qd : 0, e()) : [b * Zd, m * Zd, x * Zd]
  2783. }, n.angle = function(t) {
  2784. return arguments.length ? (w = t % 360 * Qd, e()) : w * Zd
  2785. }, n.precision = function(t) {
  2786. return arguments.length ? (c = io(s, S = t * t), r()) : fp(S)
  2787. }, n.fitExtent = function(t, e) {
  2788. return to(n, t, e)
  2789. }, n.fitSize = function(t, e) {
  2790. return no(n, t, e)
  2791. }, n.fitWidth = function(t, e) {
  2792. return eo(n, t, e)
  2793. }, n.fitHeight = function(t, e) {
  2794. return ro(n, t, e)
  2795. },
  2796. function() {
  2797. return i = t.apply(this, arguments), n.invert = i.invert && function(t) {
  2798. return (t = l.invert(t[0], t[1])) && [t[0] * Zd, t[1] * Zd]
  2799. }, e()
  2800. }
  2801. }
  2802. function fo(t) {
  2803. var n = 0,
  2804. e = Gd / 3,
  2805. r = uo(t),
  2806. i = r(n, e);
  2807. return i.parallels = function(t) {
  2808. return arguments.length ? r(n = t[0] * Qd, e = t[1] * Qd) : [n * Zd, e * Zd]
  2809. }, i
  2810. }
  2811. function co(t, n) {
  2812. function e(t, n) {
  2813. var e = fp(o - 2 * i * ap(n)) / i;
  2814. return [e * ap(t *= i), a - e * np(t)]
  2815. }
  2816. var r = ap(t),
  2817. i = (r + ap(n)) / 2;
  2818. if (Jd(i) < Hd) return function(t) {
  2819. function n(t, n) {
  2820. return [t * e, ap(n) / e]
  2821. }
  2822. var e = np(t);
  2823. return n.invert = function(t, n) {
  2824. return [t / e, dr(n * e)]
  2825. }, n
  2826. }(t);
  2827. var o = 1 + r * (2 * i - r),
  2828. a = fp(o) / i;
  2829. return e.invert = function(t, n) {
  2830. var e = a - n;
  2831. return [tp(t, Jd(e)) / i * up(e), dr((o - (t * t + e * e) * i * i) / (2 * i))]
  2832. }, e
  2833. }
  2834. function so() {
  2835. return fo(co).scale(155.424).center([0, 33.6442])
  2836. }
  2837. function lo() {
  2838. return so().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-.6, 38.7])
  2839. }
  2840. function ho(t) {
  2841. return function(n, e) {
  2842. var r = np(n),
  2843. i = np(e),
  2844. o = t(r * i);
  2845. return [o * i * ap(n), o * ap(e)]
  2846. }
  2847. }
  2848. function po(t) {
  2849. return function(n, e) {
  2850. var r = fp(n * n + e * e),
  2851. i = t(r),
  2852. o = ap(i),
  2853. a = np(i);
  2854. return [tp(n * o, r * a), dr(r && e * o / r)]
  2855. }
  2856. }
  2857. function vo(t, n) {
  2858. return [t, ip(cp((Vd + n) / 2))]
  2859. }
  2860. function go(t) {
  2861. function n() {
  2862. var n = Gd * u(),
  2863. a = o(ii(o.rotate()).invert([0, 0]));
  2864. return c(null == s ? [
  2865. [a[0] - n, a[1] - n],
  2866. [a[0] + n, a[1] + n]
  2867. ] : t === vo ? [
  2868. [Math.max(a[0] - n, s), e],
  2869. [Math.min(a[0] + n, r), i]
  2870. ] : [
  2871. [s, Math.max(a[1] - n, e)],
  2872. [r, Math.min(a[1] + n, i)]
  2873. ])
  2874. }
  2875. var e, r, i, o = ao(t),
  2876. a = o.center,
  2877. u = o.scale,
  2878. f = o.translate,
  2879. c = o.clipExtent,
  2880. s = null;
  2881. return o.scale = function(t) {
  2882. return arguments.length ? (u(t), n()) : u()
  2883. }, o.translate = function(t) {
  2884. return arguments.length ? (f(t), n()) : f()
  2885. }, o.center = function(t) {
  2886. return arguments.length ? (a(t), n()) : a()
  2887. }, o.clipExtent = function(t) {
  2888. return arguments.length ? (null == t ? s = e = r = i = null : (s = +t[0][0], e = +t[0][1], r = +t[1][0], i = +t[1][1]), n()) : null == s ? null : [
  2889. [s, e],
  2890. [r, i]
  2891. ]
  2892. }, n()
  2893. }
  2894. function yo(t) {
  2895. return cp((Vd + t) / 2)
  2896. }
  2897. function _o(t, n) {
  2898. function e(t, n) {
  2899. o > 0 ? n < -Vd + Hd && (n = -Vd + Hd) : n > Vd - Hd && (n = Vd - Hd);
  2900. var e = o / op(yo(n), i);
  2901. return [e * ap(i * t), o - e * np(i * t)]
  2902. }
  2903. var r = np(t),
  2904. i = t === n ? ap(t) : ip(r / np(n)) / ip(yo(n) / yo(t)),
  2905. o = r * op(yo(t), i) / i;
  2906. return i ? (e.invert = function(t, n) {
  2907. var e = o - n,
  2908. r = up(i) * fp(t * t + e * e);
  2909. return [tp(t, Jd(e)) / i * up(e), 2 * Kd(op(o / r, 1 / i)) - Vd]
  2910. }, e) : vo
  2911. }
  2912. function bo(t, n) {
  2913. return [t, n]
  2914. }
  2915. function mo(t, n) {
  2916. function e(t, n) {
  2917. var e = o - n,
  2918. r = i * t;
  2919. return [e * ap(r), o - e * np(r)]
  2920. }
  2921. var r = np(t),
  2922. i = t === n ? ap(t) : (r - np(n)) / (n - t),
  2923. o = r / i + t;
  2924. return Jd(i) < Hd ? bo : (e.invert = function(t, n) {
  2925. var e = o - n;
  2926. return [tp(t, Jd(e)) / i * up(e), o - up(i) * fp(t * t + e * e)]
  2927. }, e)
  2928. }
  2929. function xo(t, n) {
  2930. var e = np(n),
  2931. r = np(t) * e;
  2932. return [e * ap(t) / r, ap(n) / r]
  2933. }
  2934. function wo(t, n, e, r) {
  2935. return 1 === t && 1 === n && 0 === e && 0 === r ? zi : Qi({
  2936. point: function(i, o) {
  2937. this.stream.point(i * t + e, o * n + r)
  2938. }
  2939. })
  2940. }
  2941. function Mo(t, n) {
  2942. var e = n * n,
  2943. r = e * e;
  2944. return [t * (.8707 - .131979 * e + r * (r * (.003971 * e - .001529 * r) - .013791)), n * (1.007226 + e * (.015085 + r * (.028874 * e - .044475 - .005916 * r)))]
  2945. }
  2946. function Ao(t, n) {
  2947. return [np(n) * ap(t), ap(n)]
  2948. }
  2949. function To(t, n) {
  2950. var e = np(n),
  2951. r = 1 + np(t) * e;
  2952. return [e * ap(t) / r, ap(n) / r]
  2953. }
  2954. function No(t, n) {
  2955. return [ip(cp((Vd + n) / 2)), -t]
  2956. }
  2957. function So(t, n) {
  2958. return t.parent === n.parent ? 1 : 2
  2959. }
  2960. function Eo(t, n) {
  2961. return t + n.x
  2962. }
  2963. function ko(t, n) {
  2964. return Math.max(t, n.y)
  2965. }
  2966. function Co(t) {
  2967. var n = 0,
  2968. e = t.children,
  2969. r = e && e.length;
  2970. if (r)
  2971. for (; --r >= 0;) n += e[r].value;
  2972. else n = 1;
  2973. t.value = n
  2974. }
  2975. function Po(t, n) {
  2976. var e, r, i, o, a, u = new Do(t),
  2977. f = +t.value && (u.value = t.value),
  2978. c = [u];
  2979. for (null == n && (n = zo); e = c.pop();)
  2980. if (f && (e.value = +e.data.value), (i = n(e.data)) && (a = i.length))
  2981. for (e.children = new Array(a), o = a - 1; o >= 0; --o) c.push(r = e.children[o] = new Do(i[o])), r.parent = e, r.depth = e.depth + 1;
  2982. return u.eachBefore(Lo)
  2983. }
  2984. function zo(t) {
  2985. return t.children
  2986. }
  2987. function Ro(t) {
  2988. t.data = t.data.data
  2989. }
  2990. function Lo(t) {
  2991. var n = 0;
  2992. do {
  2993. t.height = n
  2994. } while ((t = t.parent) && t.height < ++n)
  2995. }
  2996. function Do(t) {
  2997. this.data = t, this.depth = this.height = 0, this.parent = null
  2998. }
  2999. function Uo(t) {
  3000. for (var n, e, r = 0, i = (t = function(t) {
  3001. for (var n, e, r = t.length; r;) e = Math.random() * r-- | 0, n = t[r], t[r] = t[e], t[e] = n;
  3002. return t
  3003. }(vv.call(t))).length, o = []; r < i;) n = t[r], e && Oo(e, n) ? ++r : (e = function(t) {
  3004. switch (t.length) {
  3005. case 1:
  3006. return function(t) {
  3007. return {
  3008. x: t.x,
  3009. y: t.y,
  3010. r: t.r
  3011. }
  3012. }(t[0]);
  3013. case 2:
  3014. return Bo(t[0], t[1]);
  3015. case 3:
  3016. return Fo(t[0], t[1], t[2])
  3017. }
  3018. }(o = function(t, n) {
  3019. var e, r;
  3020. if (Yo(n, t)) return [n];
  3021. for (e = 0; e < t.length; ++e)
  3022. if (qo(n, t[e]) && Yo(Bo(t[e], n), t)) return [t[e], n];
  3023. for (e = 0; e < t.length - 1; ++e)
  3024. for (r = e + 1; r < t.length; ++r)
  3025. if (qo(Bo(t[e], t[r]), n) && qo(Bo(t[e], n), t[r]) && qo(Bo(t[r], n), t[e]) && Yo(Fo(t[e], t[r], n), t)) return [t[e], t[r], n];
  3026. throw new Error
  3027. }(o, n)), r = 0);
  3028. return e
  3029. }
  3030. function qo(t, n) {
  3031. var e = t.r - n.r,
  3032. r = n.x - t.x,
  3033. i = n.y - t.y;
  3034. return e < 0 || e * e < r * r + i * i
  3035. }
  3036. function Oo(t, n) {
  3037. var e = t.r - n.r + 1e-6,
  3038. r = n.x - t.x,
  3039. i = n.y - t.y;
  3040. return e > 0 && e * e > r * r + i * i
  3041. }
  3042. function Yo(t, n) {
  3043. for (var e = 0; e < n.length; ++e)
  3044. if (!Oo(t, n[e])) return !1;
  3045. return !0
  3046. }
  3047. function Bo(t, n) {
  3048. var e = t.x,
  3049. r = t.y,
  3050. i = t.r,
  3051. o = n.x,
  3052. a = n.y,
  3053. u = n.r,
  3054. f = o - e,
  3055. c = a - r,
  3056. s = u - i,
  3057. l = Math.sqrt(f * f + c * c);
  3058. return {
  3059. x: (e + o + f / l * s) / 2,
  3060. y: (r + a + c / l * s) / 2,
  3061. r: (l + i + u) / 2
  3062. }
  3063. }
  3064. function Fo(t, n, e) {
  3065. var r = t.x,
  3066. i = t.y,
  3067. o = t.r,
  3068. a = n.x,
  3069. u = n.y,
  3070. f = n.r,
  3071. c = e.x,
  3072. s = e.y,
  3073. l = e.r,
  3074. h = r - a,
  3075. d = r - c,
  3076. p = i - u,
  3077. v = i - s,
  3078. g = f - o,
  3079. y = l - o,
  3080. _ = r * r + i * i - o * o,
  3081. b = _ - a * a - u * u + f * f,
  3082. m = _ - c * c - s * s + l * l,
  3083. x = d * p - h * v,
  3084. w = (p * m - v * b) / (2 * x) - r,
  3085. M = (v * g - p * y) / x,
  3086. A = (d * b - h * m) / (2 * x) - i,
  3087. T = (h * y - d * g) / x,
  3088. N = M * M + T * T - 1,
  3089. S = 2 * (o + w * M + A * T),
  3090. E = w * w + A * A - o * o,
  3091. k = -(N ? (S + Math.sqrt(S * S - 4 * N * E)) / (2 * N) : E / S);
  3092. return {
  3093. x: r + w + M * k,
  3094. y: i + A + T * k,
  3095. r: k
  3096. }
  3097. }
  3098. function Io(t, n, e) {
  3099. var r, i, o, a, u = t.x - n.x,
  3100. f = t.y - n.y,
  3101. c = u * u + f * f;
  3102. c ? (i = n.r + e.r, i *= i, a = t.r + e.r, i > (a *= a) ? (r = (c + a - i) / (2 * c), o = Math.sqrt(Math.max(0, a / c - r * r)), e.x = t.x - r * u - o * f, e.y = t.y - r * f + o * u) : (r = (c + i - a) / (2 * c), o = Math.sqrt(Math.max(0, i / c - r * r)), e.x = n.x + r * u - o * f, e.y = n.y + r * f + o * u)) : (e.x = n.x + e.r, e.y = n.y)
  3103. }
  3104. function jo(t, n) {
  3105. var e = t.r + n.r - 1e-6,
  3106. r = n.x - t.x,
  3107. i = n.y - t.y;
  3108. return e > 0 && e * e > r * r + i * i
  3109. }
  3110. function Ho(t) {
  3111. var n = t._,
  3112. e = t.next._,
  3113. r = n.r + e.r,
  3114. i = (n.x * e.r + e.x * n.r) / r,
  3115. o = (n.y * e.r + e.y * n.r) / r;
  3116. return i * i + o * o
  3117. }
  3118. function Xo(t) {
  3119. this._ = t, this.next = null, this.previous = null
  3120. }
  3121. function Go(t) {
  3122. if (!(i = t.length)) return 0;
  3123. var n, e, r, i, o, a, u, f, c, s, l;
  3124. if (n = t[0], n.x = 0, n.y = 0, !(i > 1)) return n.r;
  3125. if (e = t[1], n.x = -e.r, e.x = n.r, e.y = 0, !(i > 2)) return n.r + e.r;
  3126. Io(e, n, r = t[2]), n = new Xo(n), e = new Xo(e), r = new Xo(r), n.next = r.previous = e, e.next = n.previous = r, r.next = e.previous = n;
  3127. t: for (u = 3; u < i; ++u) {
  3128. Io(n._, e._, r = t[u]), r = new Xo(r), f = e.next, c = n.previous, s = e._.r, l = n._.r;
  3129. do {
  3130. if (s <= l) {
  3131. if (jo(f._, r._)) {
  3132. e = f, n.next = e, e.previous = n, --u;
  3133. continue t
  3134. }
  3135. s += f._.r, f = f.next
  3136. } else {
  3137. if (jo(c._, r._)) {
  3138. (n = c).next = e, e.previous = n, --u;
  3139. continue t
  3140. }
  3141. l += c._.r, c = c.previous
  3142. }
  3143. } while (f !== c.next);
  3144. for (r.previous = n, r.next = e, n.next = e.previous = e = r, o = Ho(n);
  3145. (r = r.next) !== e;)(a = Ho(r)) < o && (n = r, o = a);
  3146. e = n.next
  3147. }
  3148. for (n = [e._], r = e;
  3149. (r = r.next) !== e;) n.push(r._);
  3150. for (r = Uo(n), u = 0; u < i; ++u) n = t[u], n.x -= r.x, n.y -= r.y;
  3151. return r.r
  3152. }
  3153. function Vo(t) {
  3154. if ("function" != typeof t) throw new Error;
  3155. return t
  3156. }
  3157. function $o() {
  3158. return 0
  3159. }
  3160. function Wo(t) {
  3161. return function() {
  3162. return t
  3163. }
  3164. }
  3165. function Zo(t) {
  3166. return Math.sqrt(t.value)
  3167. }
  3168. function Qo(t) {
  3169. return function(n) {
  3170. n.children || (n.r = Math.max(0, +t(n) || 0))
  3171. }
  3172. }
  3173. function Jo(t, n) {
  3174. return function(e) {
  3175. if (r = e.children) {
  3176. var r, i, o, a = r.length,
  3177. u = t(e) * n || 0;
  3178. if (u)
  3179. for (i = 0; i < a; ++i) r[i].r += u;
  3180. if (o = Go(r), u)
  3181. for (i = 0; i < a; ++i) r[i].r -= u;
  3182. e.r = o + u
  3183. }
  3184. }
  3185. }
  3186. function Ko(t) {
  3187. return function(n) {
  3188. var e = n.parent;
  3189. n.r *= t, e && (n.x = e.x + t * n.x, n.y = e.y + t * n.y)
  3190. }
  3191. }
  3192. function ta(t) {
  3193. t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1)
  3194. }
  3195. function na(t, n, e, r, i) {
  3196. for (var o, a = t.children, u = -1, f = a.length, c = t.value && (r - n) / t.value; ++u < f;)(o = a[u]).y0 = e, o.y1 = i, o.x0 = n, o.x1 = n += o.value * c
  3197. }
  3198. function ea(t) {
  3199. return t.id
  3200. }
  3201. function ra(t) {
  3202. return t.parentId
  3203. }
  3204. function ia(t, n) {
  3205. return t.parent === n.parent ? 1 : 2
  3206. }
  3207. function oa(t) {
  3208. var n = t.children;
  3209. return n ? n[0] : t.t
  3210. }
  3211. function aa(t) {
  3212. var n = t.children;
  3213. return n ? n[n.length - 1] : t.t
  3214. }
  3215. function ua(t, n, e) {
  3216. var r = e / (n.i - t.i);
  3217. n.c -= r, n.s += e, t.c += r, n.z += e, n.m += e
  3218. }
  3219. function fa(t, n, e) {
  3220. return t.a.parent === n.parent ? t.a : e
  3221. }
  3222. function ca(t, n) {
  3223. this._ = t, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = n
  3224. }
  3225. function sa(t, n, e, r, i) {
  3226. for (var o, a = t.children, u = -1, f = a.length, c = t.value && (i - e) / t.value; ++u < f;)(o = a[u]).x0 = n, o.x1 = r, o.y0 = e, o.y1 = e += o.value * c
  3227. }
  3228. function la(t, n, e, r, i, o) {
  3229. for (var a, u, f, c, s, l, h, d, p, v, g, y = [], _ = n.children, b = 0, m = 0, x = _.length, w = n.value; b < x;) {
  3230. f = i - e, c = o - r;
  3231. do {
  3232. s = _[m++].value
  3233. } while (!s && m < x);
  3234. for (l = h = s, g = s * s * (v = Math.max(c / f, f / c) / (w * t)), p = Math.max(h / g, g / l); m < x; ++m) {
  3235. if (s += u = _[m].value, u < l && (l = u), u > h && (h = u), g = s * s * v, (d = Math.max(h / g, g / l)) > p) {
  3236. s -= u;
  3237. break
  3238. }
  3239. p = d
  3240. }
  3241. y.push(a = {
  3242. value: s,
  3243. dice: f < c,
  3244. children: _.slice(b, m)
  3245. }), a.dice ? na(a, e, r, i, w ? r += c * s / w : o) : sa(a, e, r, w ? e += f * s / w : i, o), w -= s, b = m
  3246. }
  3247. return y
  3248. }
  3249. function ha(t, n, e) {
  3250. return (n[0] - t[0]) * (e[1] - t[1]) - (n[1] - t[1]) * (e[0] - t[0])
  3251. }
  3252. function da(t, n) {
  3253. return t[0] - n[0] || t[1] - n[1]
  3254. }
  3255. function pa(t) {
  3256. for (var n = t.length, e = [0, 1], r = 2, i = 2; i < n; ++i) {
  3257. for (; r > 1 && ha(t[e[r - 2]], t[e[r - 1]], t[i]) <= 0;) --r;
  3258. e[r++] = i
  3259. }
  3260. return e.slice(0, r)
  3261. }
  3262. function va() {
  3263. return Math.random()
  3264. }
  3265. function ga(t) {
  3266. function n(n) {
  3267. var o = n + "",
  3268. a = e.get(o);
  3269. if (!a) {
  3270. if (i !== Pv) return i;
  3271. e.set(o, a = r.push(n))
  3272. }
  3273. return t[(a - 1) % t.length]
  3274. }
  3275. var e = he(),
  3276. r = [],
  3277. i = Pv;
  3278. return t = null == t ? [] : Cv.call(t), n.domain = function(t) {
  3279. if (!arguments.length) return r.slice();
  3280. r = [], e = he();
  3281. for (var i, o, a = -1, u = t.length; ++a < u;) e.has(o = (i = t[a]) + "") || e.set(o, r.push(i));
  3282. return n
  3283. }, n.range = function(e) {
  3284. return arguments.length ? (t = Cv.call(e), n) : t.slice()
  3285. }, n.unknown = function(t) {
  3286. return arguments.length ? (i = t, n) : i
  3287. }, n.copy = function() {
  3288. return ga().domain(r).range(t).unknown(i)
  3289. }, n
  3290. }
  3291. function ya() {
  3292. function t() {
  3293. var t = i().length,
  3294. r = a[1] < a[0],
  3295. h = a[r - 0],
  3296. d = a[1 - r];
  3297. n = (d - h) / Math.max(1, t - f + 2 * c), u && (n = Math.floor(n)), h += (d - h - n * (t - f)) * l, e = n * (1 - f), u && (h = Math.round(h), e = Math.round(e));
  3298. var p = s(t).map(function(t) {
  3299. return h + n * t
  3300. });
  3301. return o(r ? p.reverse() : p)
  3302. }
  3303. var n, e, r = ga().unknown(void 0),
  3304. i = r.domain,
  3305. o = r.range,
  3306. a = [0, 1],
  3307. u = !1,
  3308. f = 0,
  3309. c = 0,
  3310. l = .5;
  3311. return delete r.unknown, r.domain = function(n) {
  3312. return arguments.length ? (i(n), t()) : i()
  3313. }, r.range = function(n) {
  3314. return arguments.length ? (a = [+n[0], +n[1]], t()) : a.slice()
  3315. }, r.rangeRound = function(n) {
  3316. return a = [+n[0], +n[1]], u = !0, t()
  3317. }, r.bandwidth = function() {
  3318. return e
  3319. }, r.step = function() {
  3320. return n
  3321. }, r.round = function(n) {
  3322. return arguments.length ? (u = !!n, t()) : u
  3323. }, r.padding = function(n) {
  3324. return arguments.length ? (f = c = Math.max(0, Math.min(1, n)), t()) : f
  3325. }, r.paddingInner = function(n) {
  3326. return arguments.length ? (f = Math.max(0, Math.min(1, n)), t()) : f
  3327. }, r.paddingOuter = function(n) {
  3328. return arguments.length ? (c = Math.max(0, Math.min(1, n)), t()) : c
  3329. }, r.align = function(n) {
  3330. return arguments.length ? (l = Math.max(0, Math.min(1, n)), t()) : l
  3331. }, r.copy = function() {
  3332. return ya().domain(i()).range(a).round(u).paddingInner(f).paddingOuter(c).align(l)
  3333. }, t()
  3334. }
  3335. function _a(t) {
  3336. var n = t.copy;
  3337. return t.padding = t.paddingOuter, delete t.paddingInner, delete t.paddingOuter, t.copy = function() {
  3338. return _a(n())
  3339. }, t
  3340. }
  3341. function ba(t) {
  3342. return function() {
  3343. return t
  3344. }
  3345. }
  3346. function ma(t) {
  3347. return +t
  3348. }
  3349. function xa(t, n) {
  3350. return (n -= t = +t) ? function(e) {
  3351. return (e - t) / n
  3352. } : ba(n)
  3353. }
  3354. function wa(t, n, e, r) {
  3355. var i = t[0],
  3356. o = t[1],
  3357. a = n[0],
  3358. u = n[1];
  3359. return o < i ? (i = e(o, i), a = r(u, a)) : (i = e(i, o), a = r(a, u)),
  3360. function(t) {
  3361. return a(i(t))
  3362. }
  3363. }
  3364. function Ma(t, n, e, r) {
  3365. var i = Math.min(t.length, n.length) - 1,
  3366. o = new Array(i),
  3367. a = new Array(i),
  3368. u = -1;
  3369. for (t[i] < t[0] && (t = t.slice().reverse(), n = n.slice().reverse()); ++u < i;) o[u] = e(t[u], t[u + 1]), a[u] = r(n[u], n[u + 1]);
  3370. return function(n) {
  3371. var e = Kc(t, n, 1, i) - 1;
  3372. return a[e](o[e](n))
  3373. }
  3374. }
  3375. function Aa(t, n) {
  3376. return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())
  3377. }
  3378. function Ta(t, n) {
  3379. function e() {
  3380. return i = Math.min(u.length, f.length) > 2 ? Ma : wa, o = a = null, r
  3381. }
  3382. function r(n) {
  3383. return (o || (o = i(u, f, s ? function(t) {
  3384. return function(n, e) {
  3385. var r = t(n = +n, e = +e);
  3386. return function(t) {
  3387. return t <= n ? 0 : t >= e ? 1 : r(t)
  3388. }
  3389. }
  3390. }(t) : t, c)))(+n)
  3391. }
  3392. var i, o, a, u = zv,
  3393. f = zv,
  3394. c = dn,
  3395. s = !1;
  3396. return r.invert = function(t) {
  3397. return (a || (a = i(f, u, xa, s ? function(t) {
  3398. return function(n, e) {
  3399. var r = t(n = +n, e = +e);
  3400. return function(t) {
  3401. return t <= 0 ? n : t >= 1 ? e : r(t)
  3402. }
  3403. }
  3404. }(n) : n)))(+t)
  3405. }, r.domain = function(t) {
  3406. return arguments.length ? (u = kv.call(t, ma), e()) : u.slice()
  3407. }, r.range = function(t) {
  3408. return arguments.length ? (f = Cv.call(t), e()) : f.slice()
  3409. }, r.rangeRound = function(t) {
  3410. return f = Cv.call(t), c = pn, e()
  3411. }, r.clamp = function(t) {
  3412. return arguments.length ? (s = !!t, e()) : s
  3413. }, r.interpolate = function(t) {
  3414. return arguments.length ? (c = t, e()) : c
  3415. }, e()
  3416. }
  3417. function Na(n) {
  3418. var e = n.domain;
  3419. return n.ticks = function(t) {
  3420. var n = e();
  3421. return l(n[0], n[n.length - 1], null == t ? 10 : t)
  3422. }, n.tickFormat = function(n, r) {
  3423. return function(n, e, r) {
  3424. var i, o = n[0],
  3425. a = n[n.length - 1],
  3426. u = d(o, a, null == e ? 10 : e);
  3427. switch ((r = tr(null == r ? ",f" : r)).type) {
  3428. case "s":
  3429. var f = Math.max(Math.abs(o), Math.abs(a));
  3430. return null != r.precision || isNaN(i = ur(u, f)) || (r.precision = i), t.formatPrefix(r, f);
  3431. case "":
  3432. case "e":
  3433. case "g":
  3434. case "p":
  3435. case "r":
  3436. null != r.precision || isNaN(i = fr(u, Math.max(Math.abs(o), Math.abs(a)))) || (r.precision = i - ("e" === r.type));
  3437. break;
  3438. case "f":
  3439. case "%":
  3440. null != r.precision || isNaN(i = ar(u)) || (r.precision = i - 2 * ("%" === r.type))
  3441. }
  3442. return t.format(r)
  3443. }(e(), n, r)
  3444. }, n.nice = function(t) {
  3445. null == t && (t = 10);
  3446. var r, i = e(),
  3447. o = 0,
  3448. a = i.length - 1,
  3449. u = i[o],
  3450. f = i[a];
  3451. return f < u && (r = u, u = f, f = r, r = o, o = a, a = r), (r = h(u, f, t)) > 0 ? r = h(u = Math.floor(u / r) * r, f = Math.ceil(f / r) * r, t) : r < 0 && (r = h(u = Math.ceil(u * r) / r, f = Math.floor(f * r) / r, t)), r > 0 ? (i[o] = Math.floor(u / r) * r, i[a] = Math.ceil(f / r) * r, e(i)) : r < 0 && (i[o] = Math.ceil(u * r) / r, i[a] = Math.floor(f * r) / r, e(i)), n
  3452. }, n
  3453. }
  3454. function Sa() {
  3455. var t = Ta(xa, sn);
  3456. return t.copy = function() {
  3457. return Aa(t, Sa())
  3458. }, Na(t)
  3459. }
  3460. function Ea() {
  3461. function t(t) {
  3462. return +t
  3463. }
  3464. var n = [0, 1];
  3465. return t.invert = t, t.domain = t.range = function(e) {
  3466. return arguments.length ? (n = kv.call(e, ma), t) : n.slice()
  3467. }, t.copy = function() {
  3468. return Ea().domain(n)
  3469. }, Na(t)
  3470. }
  3471. function ka(t, n) {
  3472. var e, r = 0,
  3473. i = (t = t.slice()).length - 1,
  3474. o = t[r],
  3475. a = t[i];
  3476. return a < o && (e = r, r = i, i = e, e = o, o = a, a = e), t[r] = n.floor(o), t[i] = n.ceil(a), t
  3477. }
  3478. function Ca(t, n) {
  3479. return (n = Math.log(n / t)) ? function(e) {
  3480. return Math.log(e / t) / n
  3481. } : ba(n)
  3482. }
  3483. function Pa(t, n) {
  3484. return t < 0 ? function(e) {
  3485. return -Math.pow(-n, e) * Math.pow(-t, 1 - e)
  3486. } : function(e) {
  3487. return Math.pow(n, e) * Math.pow(t, 1 - e)
  3488. }
  3489. }
  3490. function za(t) {
  3491. return isFinite(t) ? +("1e" + t) : t < 0 ? 0 : t
  3492. }
  3493. function Ra(t) {
  3494. return 10 === t ? za : t === Math.E ? Math.exp : function(n) {
  3495. return Math.pow(t, n)
  3496. }
  3497. }
  3498. function La(t) {
  3499. return t === Math.E ? Math.log : 10 === t && Math.log10 || 2 === t && Math.log2 || (t = Math.log(t), function(n) {
  3500. return Math.log(n) / t
  3501. })
  3502. }
  3503. function Da(t) {
  3504. return function(n) {
  3505. return -t(-n)
  3506. }
  3507. }
  3508. function Ua() {
  3509. function n() {
  3510. return o = La(i), a = Ra(i), r()[0] < 0 && (o = Da(o), a = Da(a)), e
  3511. }
  3512. var e = Ta(Ca, Pa).domain([1, 10]),
  3513. r = e.domain,
  3514. i = 10,
  3515. o = La(10),
  3516. a = Ra(10);
  3517. return e.base = function(t) {
  3518. return arguments.length ? (i = +t, n()) : i
  3519. }, e.domain = function(t) {
  3520. return arguments.length ? (r(t), n()) : r()
  3521. }, e.ticks = function(t) {
  3522. var n, e = r(),
  3523. u = e[0],
  3524. f = e[e.length - 1];
  3525. (n = f < u) && (d = u, u = f, f = d);
  3526. var c, s, h, d = o(u),
  3527. p = o(f),
  3528. v = null == t ? 10 : +t,
  3529. g = [];
  3530. if (!(i % 1) && p - d < v) {
  3531. if (d = Math.round(d) - 1, p = Math.round(p) + 1, u > 0) {
  3532. for (; d < p; ++d)
  3533. for (s = 1, c = a(d); s < i; ++s)
  3534. if (!((h = c * s) < u)) {
  3535. if (h > f) break;
  3536. g.push(h)
  3537. }
  3538. } else
  3539. for (; d < p; ++d)
  3540. for (s = i - 1, c = a(d); s >= 1; --s)
  3541. if (!((h = c * s) < u)) {
  3542. if (h > f) break;
  3543. g.push(h)
  3544. }
  3545. } else g = l(d, p, Math.min(p - d, v)).map(a);
  3546. return n ? g.reverse() : g
  3547. }, e.tickFormat = function(n, r) {
  3548. if (null == r && (r = 10 === i ? ".0e" : ","), "function" != typeof r && (r = t.format(r)), n === 1 / 0) return r;
  3549. null == n && (n = 10);
  3550. var u = Math.max(1, i * n / e.ticks().length);
  3551. return function(t) {
  3552. var n = t / a(Math.round(o(t)));
  3553. return n * i < i - .5 && (n *= i), n <= u ? r(t) : ""
  3554. }
  3555. }, e.nice = function() {
  3556. return r(ka(r(), {
  3557. floor: function(t) {
  3558. return a(Math.floor(o(t)))
  3559. },
  3560. ceil: function(t) {
  3561. return a(Math.ceil(o(t)))
  3562. }
  3563. }))
  3564. }, e.copy = function() {
  3565. return Aa(e, Ua().base(i))
  3566. }, e
  3567. }
  3568. function qa(t, n) {
  3569. return t < 0 ? -Math.pow(-t, n) : Math.pow(t, n)
  3570. }
  3571. function Oa() {
  3572. var t = 1,
  3573. n = Ta(function(n, e) {
  3574. return (e = qa(e, t) - (n = qa(n, t))) ? function(r) {
  3575. return (qa(r, t) - n) / e
  3576. } : ba(e)
  3577. }, function(n, e) {
  3578. return e = qa(e, t) - (n = qa(n, t)),
  3579. function(r) {
  3580. return qa(n + e * r, 1 / t)
  3581. }
  3582. }),
  3583. e = n.domain;
  3584. return n.exponent = function(n) {
  3585. return arguments.length ? (t = +n, e(e())) : t
  3586. }, n.copy = function() {
  3587. return Aa(n, Oa().exponent(t))
  3588. }, Na(n)
  3589. }
  3590. function Ya() {
  3591. function t() {
  3592. var t = 0,
  3593. n = Math.max(1, i.length);
  3594. for (o = new Array(n - 1); ++t < n;) o[t - 1] = v(r, t / n);
  3595. return e
  3596. }
  3597. function e(t) {
  3598. if (!isNaN(t = +t)) return i[Kc(o, t)]
  3599. }
  3600. var r = [],
  3601. i = [],
  3602. o = [];
  3603. return e.invertExtent = function(t) {
  3604. var n = i.indexOf(t);
  3605. return n < 0 ? [NaN, NaN] : [n > 0 ? o[n - 1] : r[0], n < o.length ? o[n] : r[r.length - 1]]
  3606. }, e.domain = function(e) {
  3607. if (!arguments.length) return r.slice();
  3608. r = [];
  3609. for (var i, o = 0, a = e.length; o < a; ++o) null == (i = e[o]) || isNaN(i = +i) || r.push(i);
  3610. return r.sort(n), t()
  3611. }, e.range = function(n) {
  3612. return arguments.length ? (i = Cv.call(n), t()) : i.slice()
  3613. }, e.quantiles = function() {
  3614. return o.slice()
  3615. }, e.copy = function() {
  3616. return Ya().domain(r).range(i)
  3617. }, e
  3618. }
  3619. function Ba() {
  3620. function t(t) {
  3621. if (t <= t) return a[Kc(o, t, 0, i)]
  3622. }
  3623. function n() {
  3624. var n = -1;
  3625. for (o = new Array(i); ++n < i;) o[n] = ((n + 1) * r - (n - i) * e) / (i + 1);
  3626. return t
  3627. }
  3628. var e = 0,
  3629. r = 1,
  3630. i = 1,
  3631. o = [.5],
  3632. a = [0, 1];
  3633. return t.domain = function(t) {
  3634. return arguments.length ? (e = +t[0], r = +t[1], n()) : [e, r]
  3635. }, t.range = function(t) {
  3636. return arguments.length ? (i = (a = Cv.call(t)).length - 1, n()) : a.slice()
  3637. }, t.invertExtent = function(t) {
  3638. var n = a.indexOf(t);
  3639. return n < 0 ? [NaN, NaN] : n < 1 ? [e, o[0]] : n >= i ? [o[i - 1], r] : [o[n - 1], o[n]]
  3640. }, t.copy = function() {
  3641. return Ba().domain([e, r]).range(a)
  3642. }, Na(t)
  3643. }
  3644. function Fa() {
  3645. function t(t) {
  3646. if (t <= t) return e[Kc(n, t, 0, r)]
  3647. }
  3648. var n = [.5],
  3649. e = [0, 1],
  3650. r = 1;
  3651. return t.domain = function(i) {
  3652. return arguments.length ? (n = Cv.call(i), r = Math.min(n.length, e.length - 1), t) : n.slice()
  3653. }, t.range = function(i) {
  3654. return arguments.length ? (e = Cv.call(i), r = Math.min(n.length, e.length - 1), t) : e.slice()
  3655. }, t.invertExtent = function(t) {
  3656. var r = e.indexOf(t);
  3657. return [n[r - 1], n[r]]
  3658. }, t.copy = function() {
  3659. return Fa().domain(n).range(e)
  3660. }, t
  3661. }
  3662. function Ia(t, n, e, r) {
  3663. function i(n) {
  3664. return t(n = new Date(+n)), n
  3665. }
  3666. return i.floor = i, i.ceil = function(e) {
  3667. return t(e = new Date(e - 1)), n(e, 1), t(e), e
  3668. }, i.round = function(t) {
  3669. var n = i(t),
  3670. e = i.ceil(t);
  3671. return t - n < e - t ? n : e
  3672. }, i.offset = function(t, e) {
  3673. return n(t = new Date(+t), null == e ? 1 : Math.floor(e)), t
  3674. }, i.range = function(e, r, o) {
  3675. var a, u = [];
  3676. if (e = i.ceil(e), o = null == o ? 1 : Math.floor(o), !(e < r && o > 0)) return u;
  3677. do {
  3678. u.push(a = new Date(+e)), n(e, o), t(e)
  3679. } while (a < e && e < r);
  3680. return u
  3681. }, i.filter = function(e) {
  3682. return Ia(function(n) {
  3683. if (n >= n)
  3684. for (; t(n), !e(n);) n.setTime(n - 1)
  3685. }, function(t, r) {
  3686. if (t >= t)
  3687. if (r < 0)
  3688. for (; ++r <= 0;)
  3689. for (; n(t, -1), !e(t););
  3690. else
  3691. for (; --r >= 0;)
  3692. for (; n(t, 1), !e(t););
  3693. })
  3694. }, e && (i.count = function(n, r) {
  3695. return Rv.setTime(+n), Lv.setTime(+r), t(Rv), t(Lv), Math.floor(e(Rv, Lv))
  3696. }, i.every = function(t) {
  3697. return t = Math.floor(t), isFinite(t) && t > 0 ? t > 1 ? i.filter(r ? function(n) {
  3698. return r(n) % t == 0
  3699. } : function(n) {
  3700. return i.count(0, n) % t == 0
  3701. }) : i : null
  3702. }), i
  3703. }
  3704. function ja(t) {
  3705. return Ia(function(n) {
  3706. n.setDate(n.getDate() - (n.getDay() + 7 - t) % 7), n.setHours(0, 0, 0, 0)
  3707. }, function(t, n) {
  3708. t.setDate(t.getDate() + 7 * n)
  3709. }, function(t, n) {
  3710. return (n - t - (n.getTimezoneOffset() - t.getTimezoneOffset()) * qv) / Ov
  3711. })
  3712. }
  3713. function Ha(t) {
  3714. return Ia(function(n) {
  3715. n.setUTCDate(n.getUTCDate() - (n.getUTCDay() + 7 - t) % 7), n.setUTCHours(0, 0, 0, 0)
  3716. }, function(t, n) {
  3717. t.setUTCDate(t.getUTCDate() + 7 * n)
  3718. }, function(t, n) {
  3719. return (n - t) / Ov
  3720. })
  3721. }
  3722. function Xa(t) {
  3723. if (0 <= t.y && t.y < 100) {
  3724. var n = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
  3725. return n.setFullYear(t.y), n
  3726. }
  3727. return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L)
  3728. }
  3729. function Ga(t) {
  3730. if (0 <= t.y && t.y < 100) {
  3731. var n = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
  3732. return n.setUTCFullYear(t.y), n
  3733. }
  3734. return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L))
  3735. }
  3736. function Va(t) {
  3737. return {
  3738. y: t,
  3739. m: 0,
  3740. d: 1,
  3741. H: 0,
  3742. M: 0,
  3743. S: 0,
  3744. L: 0
  3745. }
  3746. }
  3747. function $a(t) {
  3748. function n(t, n) {
  3749. return function(e) {
  3750. var r, i, o, a = [],
  3751. u = -1,
  3752. f = 0,
  3753. c = t.length;
  3754. for (e instanceof Date || (e = new Date(+e)); ++u < c;) 37 === t.charCodeAt(u) && (a.push(t.slice(f, u)), null != (i = Ug[r = t.charAt(++u)]) ? r = t.charAt(++u) : i = "e" === r ? " " : "0", (o = n[r]) && (r = o(e, i)), a.push(r), f = u + 1);
  3755. return a.push(t.slice(f, u)), a.join("")
  3756. }
  3757. }
  3758. function e(t, n) {
  3759. return function(e) {
  3760. var i, o, a = Va(1900);
  3761. if (r(a, t, e += "", 0) != e.length) return null;
  3762. if ("Q" in a) return new Date(a.Q);
  3763. if ("p" in a && (a.H = a.H % 12 + 12 * a.p), "V" in a) {
  3764. if (a.V < 1 || a.V > 53) return null;
  3765. "w" in a || (a.w = 1), "Z" in a ? (i = (o = (i = Ga(Va(a.y))).getUTCDay()) > 4 || 0 === o ? _g.ceil(i) : _g(i), i = vg.offset(i, 7 * (a.V - 1)), a.y = i.getUTCFullYear(), a.m = i.getUTCMonth(), a.d = i.getUTCDate() + (a.w + 6) % 7) : (i = (o = (i = n(Va(a.y))).getDay()) > 4 || 0 === o ? $v.ceil(i) : $v(i), i = Xv.offset(i, 7 * (a.V - 1)), a.y = i.getFullYear(), a.m = i.getMonth(), a.d = i.getDate() + (a.w + 6) % 7)
  3766. } else("W" in a || "U" in a) && ("w" in a || (a.w = "u" in a ? a.u % 7 : "W" in a ? 1 : 0), o = "Z" in a ? Ga(Va(a.y)).getUTCDay() : n(Va(a.y)).getDay(), a.m = 0, a.d = "W" in a ? (a.w + 6) % 7 + 7 * a.W - (o + 5) % 7 : a.w + 7 * a.U - (o + 6) % 7);
  3767. return "Z" in a ? (a.H += a.Z / 100 | 0, a.M += a.Z % 100, Ga(a)) : n(a)
  3768. }
  3769. }
  3770. function r(t, n, e, r) {
  3771. for (var i, o, a = 0, u = n.length, f = e.length; a < u;) {
  3772. if (r >= f) return -1;
  3773. if (37 === (i = n.charCodeAt(a++))) {
  3774. if (i = n.charAt(a++), !(o = A[i in Ug ? n.charAt(a++) : i]) || (r = o(t, e, r)) < 0) return -1
  3775. } else if (i != e.charCodeAt(r++)) return -1
  3776. }
  3777. return r
  3778. }
  3779. var i = t.dateTime,
  3780. o = t.date,
  3781. a = t.time,
  3782. u = t.periods,
  3783. f = t.days,
  3784. c = t.shortDays,
  3785. s = t.months,
  3786. l = t.shortMonths,
  3787. h = Qa(u),
  3788. d = Ja(u),
  3789. p = Qa(f),
  3790. v = Ja(f),
  3791. g = Qa(c),
  3792. y = Ja(c),
  3793. _ = Qa(s),
  3794. b = Ja(s),
  3795. m = Qa(l),
  3796. x = Ja(l),
  3797. w = {
  3798. a: function(t) {
  3799. return c[t.getDay()]
  3800. },
  3801. A: function(t) {
  3802. return f[t.getDay()]
  3803. },
  3804. b: function(t) {
  3805. return l[t.getMonth()]
  3806. },
  3807. B: function(t) {
  3808. return s[t.getMonth()]
  3809. },
  3810. c: null,
  3811. d: _u,
  3812. e: _u,
  3813. f: Mu,
  3814. H: bu,
  3815. I: mu,
  3816. j: xu,
  3817. L: wu,
  3818. m: Au,
  3819. M: Tu,
  3820. p: function(t) {
  3821. return u[+(t.getHours() >= 12)]
  3822. },
  3823. Q: Ku,
  3824. s: tf,
  3825. S: Nu,
  3826. u: Su,
  3827. U: Eu,
  3828. V: ku,
  3829. w: Cu,
  3830. W: Pu,
  3831. x: null,
  3832. X: null,
  3833. y: zu,
  3834. Y: Ru,
  3835. Z: Lu,
  3836. "%": Ju
  3837. },
  3838. M = {
  3839. a: function(t) {
  3840. return c[t.getUTCDay()]
  3841. },
  3842. A: function(t) {
  3843. return f[t.getUTCDay()]
  3844. },
  3845. b: function(t) {
  3846. return l[t.getUTCMonth()]
  3847. },
  3848. B: function(t) {
  3849. return s[t.getUTCMonth()]
  3850. },
  3851. c: null,
  3852. d: Du,
  3853. e: Du,
  3854. f: Bu,
  3855. H: Uu,
  3856. I: qu,
  3857. j: Ou,
  3858. L: Yu,
  3859. m: Fu,
  3860. M: Iu,
  3861. p: function(t) {
  3862. return u[+(t.getUTCHours() >= 12)]
  3863. },
  3864. Q: Ku,
  3865. s: tf,
  3866. S: ju,
  3867. u: Hu,
  3868. U: Xu,
  3869. V: Gu,
  3870. w: Vu,
  3871. W: $u,
  3872. x: null,
  3873. X: null,
  3874. y: Wu,
  3875. Y: Zu,
  3876. Z: Qu,
  3877. "%": Ju
  3878. },
  3879. A = {
  3880. a: function(t, n, e) {
  3881. var r = g.exec(n.slice(e));
  3882. return r ? (t.w = y[r[0].toLowerCase()], e + r[0].length) : -1
  3883. },
  3884. A: function(t, n, e) {
  3885. var r = p.exec(n.slice(e));
  3886. return r ? (t.w = v[r[0].toLowerCase()], e + r[0].length) : -1
  3887. },
  3888. b: function(t, n, e) {
  3889. var r = m.exec(n.slice(e));
  3890. return r ? (t.m = x[r[0].toLowerCase()], e + r[0].length) : -1
  3891. },
  3892. B: function(t, n, e) {
  3893. var r = _.exec(n.slice(e));
  3894. return r ? (t.m = b[r[0].toLowerCase()], e + r[0].length) : -1
  3895. },
  3896. c: function(t, n, e) {
  3897. return r(t, i, n, e)
  3898. },
  3899. d: fu,
  3900. e: fu,
  3901. f: pu,
  3902. H: su,
  3903. I: su,
  3904. j: cu,
  3905. L: du,
  3906. m: uu,
  3907. M: lu,
  3908. p: function(t, n, e) {
  3909. var r = h.exec(n.slice(e));
  3910. return r ? (t.p = d[r[0].toLowerCase()], e + r[0].length) : -1
  3911. },
  3912. Q: gu,
  3913. s: yu,
  3914. S: hu,
  3915. u: tu,
  3916. U: nu,
  3917. V: eu,
  3918. w: Ka,
  3919. W: ru,
  3920. x: function(t, n, e) {
  3921. return r(t, o, n, e)
  3922. },
  3923. X: function(t, n, e) {
  3924. return r(t, a, n, e)
  3925. },
  3926. y: ou,
  3927. Y: iu,
  3928. Z: au,
  3929. "%": vu
  3930. };
  3931. return w.x = n(o, w), w.X = n(a, w), w.c = n(i, w), M.x = n(o, M), M.X = n(a, M), M.c = n(i, M), {
  3932. format: function(t) {
  3933. var e = n(t += "", w);
  3934. return e.toString = function() {
  3935. return t
  3936. }, e
  3937. },
  3938. parse: function(t) {
  3939. var n = e(t += "", Xa);
  3940. return n.toString = function() {
  3941. return t
  3942. }, n
  3943. },
  3944. utcFormat: function(t) {
  3945. var e = n(t += "", M);
  3946. return e.toString = function() {
  3947. return t
  3948. }, e
  3949. },
  3950. utcParse: function(t) {
  3951. var n = e(t, Ga);
  3952. return n.toString = function() {
  3953. return t
  3954. }, n
  3955. }
  3956. }
  3957. }
  3958. function Wa(t, n, e) {
  3959. var r = t < 0 ? "-" : "",
  3960. i = (r ? -t : t) + "",
  3961. o = i.length;
  3962. return r + (o < e ? new Array(e - o + 1).join(n) + i : i)
  3963. }
  3964. function Za(t) {
  3965. return t.replace(Yg, "\\$&")
  3966. }
  3967. function Qa(t) {
  3968. return new RegExp("^(?:" + t.map(Za).join("|") + ")", "i")
  3969. }
  3970. function Ja(t) {
  3971. for (var n = {}, e = -1, r = t.length; ++e < r;) n[t[e].toLowerCase()] = e;
  3972. return n
  3973. }
  3974. function Ka(t, n, e) {
  3975. var r = qg.exec(n.slice(e, e + 1));
  3976. return r ? (t.w = +r[0], e + r[0].length) : -1
  3977. }
  3978. function tu(t, n, e) {
  3979. var r = qg.exec(n.slice(e, e + 1));
  3980. return r ? (t.u = +r[0], e + r[0].length) : -1
  3981. }
  3982. function nu(t, n, e) {
  3983. var r = qg.exec(n.slice(e, e + 2));
  3984. return r ? (t.U = +r[0], e + r[0].length) : -1
  3985. }
  3986. function eu(t, n, e) {
  3987. var r = qg.exec(n.slice(e, e + 2));
  3988. return r ? (t.V = +r[0], e + r[0].length) : -1
  3989. }
  3990. function ru(t, n, e) {
  3991. var r = qg.exec(n.slice(e, e + 2));
  3992. return r ? (t.W = +r[0], e + r[0].length) : -1
  3993. }
  3994. function iu(t, n, e) {
  3995. var r = qg.exec(n.slice(e, e + 4));
  3996. return r ? (t.y = +r[0], e + r[0].length) : -1
  3997. }
  3998. function ou(t, n, e) {
  3999. var r = qg.exec(n.slice(e, e + 2));
  4000. return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), e + r[0].length) : -1
  4001. }
  4002. function au(t, n, e) {
  4003. var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e, e + 6));
  4004. return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), e + r[0].length) : -1
  4005. }
  4006. function uu(t, n, e) {
  4007. var r = qg.exec(n.slice(e, e + 2));
  4008. return r ? (t.m = r[0] - 1, e + r[0].length) : -1
  4009. }
  4010. function fu(t, n, e) {
  4011. var r = qg.exec(n.slice(e, e + 2));
  4012. return r ? (t.d = +r[0], e + r[0].length) : -1
  4013. }
  4014. function cu(t, n, e) {
  4015. var r = qg.exec(n.slice(e, e + 3));
  4016. return r ? (t.m = 0, t.d = +r[0], e + r[0].length) : -1
  4017. }
  4018. function su(t, n, e) {
  4019. var r = qg.exec(n.slice(e, e + 2));
  4020. return r ? (t.H = +r[0], e + r[0].length) : -1
  4021. }
  4022. function lu(t, n, e) {
  4023. var r = qg.exec(n.slice(e, e + 2));
  4024. return r ? (t.M = +r[0], e + r[0].length) : -1
  4025. }
  4026. function hu(t, n, e) {
  4027. var r = qg.exec(n.slice(e, e + 2));
  4028. return r ? (t.S = +r[0], e + r[0].length) : -1
  4029. }
  4030. function du(t, n, e) {
  4031. var r = qg.exec(n.slice(e, e + 3));
  4032. return r ? (t.L = +r[0], e + r[0].length) : -1
  4033. }
  4034. function pu(t, n, e) {
  4035. var r = qg.exec(n.slice(e, e + 6));
  4036. return r ? (t.L = Math.floor(r[0] / 1e3), e + r[0].length) : -1
  4037. }
  4038. function vu(t, n, e) {
  4039. var r = Og.exec(n.slice(e, e + 1));
  4040. return r ? e + r[0].length : -1
  4041. }
  4042. function gu(t, n, e) {
  4043. var r = qg.exec(n.slice(e));
  4044. return r ? (t.Q = +r[0], e + r[0].length) : -1
  4045. }
  4046. function yu(t, n, e) {
  4047. var r = qg.exec(n.slice(e));
  4048. return r ? (t.Q = 1e3 * +r[0], e + r[0].length) : -1
  4049. }
  4050. function _u(t, n) {
  4051. return Wa(t.getDate(), n, 2)
  4052. }
  4053. function bu(t, n) {
  4054. return Wa(t.getHours(), n, 2)
  4055. }
  4056. function mu(t, n) {
  4057. return Wa(t.getHours() % 12 || 12, n, 2)
  4058. }
  4059. function xu(t, n) {
  4060. return Wa(1 + Xv.count(cg(t), t), n, 3)
  4061. }
  4062. function wu(t, n) {
  4063. return Wa(t.getMilliseconds(), n, 3)
  4064. }
  4065. function Mu(t, n) {
  4066. return wu(t, n) + "000"
  4067. }
  4068. function Au(t, n) {
  4069. return Wa(t.getMonth() + 1, n, 2)
  4070. }
  4071. function Tu(t, n) {
  4072. return Wa(t.getMinutes(), n, 2)
  4073. }
  4074. function Nu(t, n) {
  4075. return Wa(t.getSeconds(), n, 2)
  4076. }
  4077. function Su(t) {
  4078. var n = t.getDay();
  4079. return 0 === n ? 7 : n
  4080. }
  4081. function Eu(t, n) {
  4082. return Wa(Vv.count(cg(t), t), n, 2)
  4083. }
  4084. function ku(t, n) {
  4085. var e = t.getDay();
  4086. return t = e >= 4 || 0 === e ? Qv(t) : Qv.ceil(t), Wa(Qv.count(cg(t), t) + (4 === cg(t).getDay()), n, 2)
  4087. }
  4088. function Cu(t) {
  4089. return t.getDay()
  4090. }
  4091. function Pu(t, n) {
  4092. return Wa($v.count(cg(t), t), n, 2)
  4093. }
  4094. function zu(t, n) {
  4095. return Wa(t.getFullYear() % 100, n, 2)
  4096. }
  4097. function Ru(t, n) {
  4098. return Wa(t.getFullYear() % 1e4, n, 4)
  4099. }
  4100. function Lu(t) {
  4101. var n = t.getTimezoneOffset();
  4102. return (n > 0 ? "-" : (n *= -1, "+")) + Wa(n / 60 | 0, "0", 2) + Wa(n % 60, "0", 2)
  4103. }
  4104. function Du(t, n) {
  4105. return Wa(t.getUTCDate(), n, 2)
  4106. }
  4107. function Uu(t, n) {
  4108. return Wa(t.getUTCHours(), n, 2)
  4109. }
  4110. function qu(t, n) {
  4111. return Wa(t.getUTCHours() % 12 || 12, n, 2)
  4112. }
  4113. function Ou(t, n) {
  4114. return Wa(1 + vg.count(Rg(t), t), n, 3)
  4115. }
  4116. function Yu(t, n) {
  4117. return Wa(t.getUTCMilliseconds(), n, 3)
  4118. }
  4119. function Bu(t, n) {
  4120. return Yu(t, n) + "000"
  4121. }
  4122. function Fu(t, n) {
  4123. return Wa(t.getUTCMonth() + 1, n, 2)
  4124. }
  4125. function Iu(t, n) {
  4126. return Wa(t.getUTCMinutes(), n, 2)
  4127. }
  4128. function ju(t, n) {
  4129. return Wa(t.getUTCSeconds(), n, 2)
  4130. }
  4131. function Hu(t) {
  4132. var n = t.getUTCDay();
  4133. return 0 === n ? 7 : n
  4134. }
  4135. function Xu(t, n) {
  4136. return Wa(yg.count(Rg(t), t), n, 2)
  4137. }
  4138. function Gu(t, n) {
  4139. var e = t.getUTCDay();
  4140. return t = e >= 4 || 0 === e ? xg(t) : xg.ceil(t), Wa(xg.count(Rg(t), t) + (4 === Rg(t).getUTCDay()), n, 2)
  4141. }
  4142. function Vu(t) {
  4143. return t.getUTCDay()
  4144. }
  4145. function $u(t, n) {
  4146. return Wa(_g.count(Rg(t), t), n, 2)
  4147. }
  4148. function Wu(t, n) {
  4149. return Wa(t.getUTCFullYear() % 100, n, 2)
  4150. }
  4151. function Zu(t, n) {
  4152. return Wa(t.getUTCFullYear() % 1e4, n, 4)
  4153. }
  4154. function Qu() {
  4155. return "+0000"
  4156. }
  4157. function Ju() {
  4158. return "%"
  4159. }
  4160. function Ku(t) {
  4161. return +t
  4162. }
  4163. function tf(t) {
  4164. return Math.floor(+t / 1e3)
  4165. }
  4166. function nf(n) {
  4167. return Lg = $a(n), t.timeFormat = Lg.format, t.timeParse = Lg.parse, t.utcFormat = Lg.utcFormat, t.utcParse = Lg.utcParse, Lg
  4168. }
  4169. function ef(t) {
  4170. return new Date(t)
  4171. }
  4172. function rf(t) {
  4173. return t instanceof Date ? +t : +new Date(+t)
  4174. }
  4175. function of (t, n, r, i, o, a, u, f, c) {
  4176. function s(e) {
  4177. return (u(e) < e ? g : a(e) < e ? y : o(e) < e ? _ : i(e) < e ? b : n(e) < e ? r(e) < e ? m : x : t(e) < e ? w : M)(e)
  4178. }
  4179. function l(n, r, i, o) {
  4180. if (null == n && (n = 10), "number" == typeof n) {
  4181. var a = Math.abs(i - r) / n,
  4182. u = e(function(t) {
  4183. return t[2]
  4184. }).right(A, a);
  4185. u === A.length ? (o = d(r / Wg, i / Wg, n), n = t) : u ? (o = (u = A[a / A[u - 1][2] < A[u][2] / a ? u - 1 : u])[1], n = u[0]) : (o = Math.max(d(r, i, n), 1), n = f)
  4186. }
  4187. return null == o ? n : n.every(o)
  4188. }
  4189. var h = Ta(xa, sn),
  4190. p = h.invert,
  4191. v = h.domain,
  4192. g = c(".%L"),
  4193. y = c(":%S"),
  4194. _ = c("%I:%M"),
  4195. b = c("%I %p"),
  4196. m = c("%a %d"),
  4197. x = c("%b %d"),
  4198. w = c("%B"),
  4199. M = c("%Y"),
  4200. A = [
  4201. [u, 1, jg],
  4202. [u, 5, 5 * jg],
  4203. [u, 15, 15 * jg],
  4204. [u, 30, 30 * jg],
  4205. [a, 1, Hg],
  4206. [a, 5, 5 * Hg],
  4207. [a, 15, 15 * Hg],
  4208. [a, 30, 30 * Hg],
  4209. [o, 1, Xg],
  4210. [o, 3, 3 * Xg],
  4211. [o, 6, 6 * Xg],
  4212. [o, 12, 12 * Xg],
  4213. [i, 1, Gg],
  4214. [i, 2, 2 * Gg],
  4215. [r, 1, Vg],
  4216. [n, 1, $g],
  4217. [n, 3, 3 * $g],
  4218. [t, 1, Wg]
  4219. ];
  4220. return h.invert = function(t) {
  4221. return new Date(p(t))
  4222. }, h.domain = function(t) {
  4223. return arguments.length ? v(kv.call(t, rf)) : v().map(ef)
  4224. }, h.ticks = function(t, n) {
  4225. var e, r = v(),
  4226. i = r[0],
  4227. o = r[r.length - 1],
  4228. a = o < i;
  4229. return a && (e = i, i = o, o = e), e = l(t, i, o, n), e = e ? e.range(i, o + 1) : [], a ? e.reverse() : e
  4230. }, h.tickFormat = function(t, n) {
  4231. return null == n ? s : c(n)
  4232. }, h.nice = function(t, n) {
  4233. var e = v();
  4234. return (t = l(t, e[0], e[e.length - 1], n)) ? v(ka(e, t)) : h
  4235. }, h.copy = function() {
  4236. return Aa(h, of (t, n, r, i, o, a, u, f, c))
  4237. }, h
  4238. }
  4239. function af(t) {
  4240. function n(n) {
  4241. var r = (n - e) * i;
  4242. return t(o ? Math.max(0, Math.min(1, r)) : r)
  4243. }
  4244. var e = 0,
  4245. r = 1,
  4246. i = 1,
  4247. o = !1;
  4248. return n.domain = function(t) {
  4249. return arguments.length ? (e = +t[0], r = +t[1], i = e === r ? 0 : 1 / (r - e), n) : [e, r]
  4250. }, n.clamp = function(t) {
  4251. return arguments.length ? (o = !!t, n) : o
  4252. }, n.interpolator = function(e) {
  4253. return arguments.length ? (t = e, n) : t
  4254. }, n.copy = function() {
  4255. return af(t).domain([e, r]).clamp(o)
  4256. }, Na(n)
  4257. }
  4258. function uf(t) {
  4259. function n(n) {
  4260. var e = .5 + ((n = +n) - r) * (n < r ? o : a);
  4261. return t(u ? Math.max(0, Math.min(1, e)) : e)
  4262. }
  4263. var e = 0,
  4264. r = .5,
  4265. i = 1,
  4266. o = 1,
  4267. a = 1,
  4268. u = !1;
  4269. return n.domain = function(t) {
  4270. return arguments.length ? (e = +t[0], r = +t[1], i = +t[2], o = e === r ? 0 : .5 / (r - e), a = r === i ? 0 : .5 / (i - r), n) : [e, r, i]
  4271. }, n.clamp = function(t) {
  4272. return arguments.length ? (u = !!t, n) : u
  4273. }, n.interpolator = function(e) {
  4274. return arguments.length ? (t = e, n) : t
  4275. }, n.copy = function() {
  4276. return uf(t).domain([e, r, i]).clamp(u)
  4277. }, Na(n)
  4278. }
  4279. function ff(t) {
  4280. for (var n = t.length / 6 | 0, e = new Array(n), r = 0; r < n;) e[r] = "#" + t.slice(6 * r, 6 * ++r);
  4281. return e
  4282. }
  4283. function cf(t) {
  4284. return il(t[t.length - 1])
  4285. }
  4286. function sf(t) {
  4287. var n = t.length;
  4288. return function(e) {
  4289. return t[Math.max(0, Math.min(n - 1, Math.floor(e * n)))]
  4290. }
  4291. }
  4292. function lf(t) {
  4293. return function() {
  4294. return t
  4295. }
  4296. }
  4297. function hf(t) {
  4298. return t >= 1 ? T_ : t <= -1 ? -T_ : Math.asin(t)
  4299. }
  4300. function df(t) {
  4301. return t.innerRadius
  4302. }
  4303. function pf(t) {
  4304. return t.outerRadius
  4305. }
  4306. function vf(t) {
  4307. return t.startAngle
  4308. }
  4309. function gf(t) {
  4310. return t.endAngle
  4311. }
  4312. function yf(t) {
  4313. return t && t.padAngle
  4314. }
  4315. function _f(t, n, e, r, i, o, a) {
  4316. var u = t - e,
  4317. f = n - r,
  4318. c = (a ? o : -o) / w_(u * u + f * f),
  4319. s = c * f,
  4320. l = -c * u,
  4321. h = t + s,
  4322. d = n + l,
  4323. p = e + s,
  4324. v = r + l,
  4325. g = (h + p) / 2,
  4326. y = (d + v) / 2,
  4327. _ = p - h,
  4328. b = v - d,
  4329. m = _ * _ + b * b,
  4330. x = i - o,
  4331. w = h * v - p * d,
  4332. M = (b < 0 ? -1 : 1) * w_(b_(0, x * x * m - w * w)),
  4333. A = (w * b - _ * M) / m,
  4334. T = (-w * _ - b * M) / m,
  4335. N = (w * b + _ * M) / m,
  4336. S = (-w * _ + b * M) / m,
  4337. E = A - g,
  4338. k = T - y,
  4339. C = N - g,
  4340. P = S - y;
  4341. return E * E + k * k > C * C + P * P && (A = N, T = S), {
  4342. cx: A,
  4343. cy: T,
  4344. x01: -s,
  4345. y01: -l,
  4346. x11: A * (i / x - 1),
  4347. y11: T * (i / x - 1)
  4348. }
  4349. }
  4350. function bf(t) {
  4351. this._context = t
  4352. }
  4353. function mf(t) {
  4354. return new bf(t)
  4355. }
  4356. function xf(t) {
  4357. return t[0]
  4358. }
  4359. function wf(t) {
  4360. return t[1]
  4361. }
  4362. function Mf() {
  4363. function t(t) {
  4364. var u, f, c, s = t.length,
  4365. l = !1;
  4366. for (null == i && (a = o(c = oe())), u = 0; u <= s; ++u) !(u < s && r(f = t[u], u, t)) === l && ((l = !l) ? a.lineStart() : a.lineEnd()), l && a.point(+n(f, u, t), +e(f, u, t));
  4367. if (c) return a = null, c + "" || null
  4368. }
  4369. var n = xf,
  4370. e = wf,
  4371. r = lf(!0),
  4372. i = null,
  4373. o = mf,
  4374. a = null;
  4375. return t.x = function(e) {
  4376. return arguments.length ? (n = "function" == typeof e ? e : lf(+e), t) : n
  4377. }, t.y = function(n) {
  4378. return arguments.length ? (e = "function" == typeof n ? n : lf(+n), t) : e
  4379. }, t.defined = function(n) {
  4380. return arguments.length ? (r = "function" == typeof n ? n : lf(!!n), t) : r
  4381. }, t.curve = function(n) {
  4382. return arguments.length ? (o = n, null != i && (a = o(i)), t) : o
  4383. }, t.context = function(n) {
  4384. return arguments.length ? (null == n ? i = a = null : a = o(i = n), t) : i
  4385. }, t
  4386. }
  4387. function Af() {
  4388. function t(t) {
  4389. var n, s, l, h, d, p = t.length,
  4390. v = !1,
  4391. g = new Array(p),
  4392. y = new Array(p);
  4393. for (null == u && (c = f(d = oe())), n = 0; n <= p; ++n) {
  4394. if (!(n < p && a(h = t[n], n, t)) === v)
  4395. if (v = !v) s = n, c.areaStart(), c.lineStart();
  4396. else {
  4397. for (c.lineEnd(), c.lineStart(), l = n - 1; l >= s; --l) c.point(g[l], y[l]);
  4398. c.lineEnd(), c.areaEnd()
  4399. }
  4400. v && (g[n] = +e(h, n, t), y[n] = +i(h, n, t), c.point(r ? +r(h, n, t) : g[n], o ? +o(h, n, t) : y[n]))
  4401. }
  4402. if (d) return c = null, d + "" || null
  4403. }
  4404. function n() {
  4405. return Mf().defined(a).curve(f).context(u)
  4406. }
  4407. var e = xf,
  4408. r = null,
  4409. i = lf(0),
  4410. o = wf,
  4411. a = lf(!0),
  4412. u = null,
  4413. f = mf,
  4414. c = null;
  4415. return t.x = function(n) {
  4416. return arguments.length ? (e = "function" == typeof n ? n : lf(+n), r = null, t) : e
  4417. }, t.x0 = function(n) {
  4418. return arguments.length ? (e = "function" == typeof n ? n : lf(+n), t) : e
  4419. }, t.x1 = function(n) {
  4420. return arguments.length ? (r = null == n ? null : "function" == typeof n ? n : lf(+n), t) : r
  4421. }, t.y = function(n) {
  4422. return arguments.length ? (i = "function" == typeof n ? n : lf(+n), o = null, t) : i
  4423. }, t.y0 = function(n) {
  4424. return arguments.length ? (i = "function" == typeof n ? n : lf(+n), t) : i
  4425. }, t.y1 = function(n) {
  4426. return arguments.length ? (o = null == n ? null : "function" == typeof n ? n : lf(+n), t) : o
  4427. }, t.lineX0 = t.lineY0 = function() {
  4428. return n().x(e).y(i)
  4429. }, t.lineY1 = function() {
  4430. return n().x(e).y(o)
  4431. }, t.lineX1 = function() {
  4432. return n().x(r).y(i)
  4433. }, t.defined = function(n) {
  4434. return arguments.length ? (a = "function" == typeof n ? n : lf(!!n), t) : a
  4435. }, t.curve = function(n) {
  4436. return arguments.length ? (f = n, null != u && (c = f(u)), t) : f
  4437. }, t.context = function(n) {
  4438. return arguments.length ? (null == n ? u = c = null : c = f(u = n), t) : u
  4439. }, t
  4440. }
  4441. function Tf(t, n) {
  4442. return n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN
  4443. }
  4444. function Nf(t) {
  4445. return t
  4446. }
  4447. function Sf(t) {
  4448. this._curve = t
  4449. }
  4450. function Ef(t) {
  4451. function n(n) {
  4452. return new Sf(t(n))
  4453. }
  4454. return n._curve = t, n
  4455. }
  4456. function kf(t) {
  4457. var n = t.curve;
  4458. return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t.curve = function(t) {
  4459. return arguments.length ? n(Ef(t)) : n()._curve
  4460. }, t
  4461. }
  4462. function Cf() {
  4463. return kf(Mf().curve(S_))
  4464. }
  4465. function Pf() {
  4466. var t = Af().curve(S_),
  4467. n = t.curve,
  4468. e = t.lineX0,
  4469. r = t.lineX1,
  4470. i = t.lineY0,
  4471. o = t.lineY1;
  4472. return t.angle = t.x, delete t.x, t.startAngle = t.x0, delete t.x0, t.endAngle = t.x1, delete t.x1, t.radius = t.y, delete t.y, t.innerRadius = t.y0, delete t.y0, t.outerRadius = t.y1, delete t.y1, t.lineStartAngle = function() {
  4473. return kf(e())
  4474. }, delete t.lineX0, t.lineEndAngle = function() {
  4475. return kf(r())
  4476. }, delete t.lineX1, t.lineInnerRadius = function() {
  4477. return kf(i())
  4478. }, delete t.lineY0, t.lineOuterRadius = function() {
  4479. return kf(o())
  4480. }, delete t.lineY1, t.curve = function(t) {
  4481. return arguments.length ? n(Ef(t)) : n()._curve
  4482. }, t
  4483. }
  4484. function zf(t, n) {
  4485. return [(n = +n) * Math.cos(t -= Math.PI / 2), n * Math.sin(t)]
  4486. }
  4487. function Rf(t) {
  4488. return t.source
  4489. }
  4490. function Lf(t) {
  4491. return t.target
  4492. }
  4493. function Df(t) {
  4494. function n() {
  4495. var n, u = E_.call(arguments),
  4496. f = e.apply(this, u),
  4497. c = r.apply(this, u);
  4498. if (a || (a = n = oe()), t(a, +i.apply(this, (u[0] = f, u)), +o.apply(this, u), +i.apply(this, (u[0] = c, u)), +o.apply(this, u)), n) return a = null, n + "" || null
  4499. }
  4500. var e = Rf,
  4501. r = Lf,
  4502. i = xf,
  4503. o = wf,
  4504. a = null;
  4505. return n.source = function(t) {
  4506. return arguments.length ? (e = t, n) : e
  4507. }, n.target = function(t) {
  4508. return arguments.length ? (r = t, n) : r
  4509. }, n.x = function(t) {
  4510. return arguments.length ? (i = "function" == typeof t ? t : lf(+t), n) : i
  4511. }, n.y = function(t) {
  4512. return arguments.length ? (o = "function" == typeof t ? t : lf(+t), n) : o
  4513. }, n.context = function(t) {
  4514. return arguments.length ? (a = null == t ? null : t, n) : a
  4515. }, n
  4516. }
  4517. function Uf(t, n, e, r, i) {
  4518. t.moveTo(n, e), t.bezierCurveTo(n = (n + r) / 2, e, n, i, r, i)
  4519. }
  4520. function qf(t, n, e, r, i) {
  4521. t.moveTo(n, e), t.bezierCurveTo(n, e = (e + i) / 2, r, e, r, i)
  4522. }
  4523. function Of(t, n, e, r, i) {
  4524. var o = zf(n, e),
  4525. a = zf(n, e = (e + i) / 2),
  4526. u = zf(r, e),
  4527. f = zf(r, i);
  4528. t.moveTo(o[0], o[1]), t.bezierCurveTo(a[0], a[1], u[0], u[1], f[0], f[1])
  4529. }
  4530. function Yf() {}
  4531. function Bf(t, n, e) {
  4532. t._context.bezierCurveTo((2 * t._x0 + t._x1) / 3, (2 * t._y0 + t._y1) / 3, (t._x0 + 2 * t._x1) / 3, (t._y0 + 2 * t._y1) / 3, (t._x0 + 4 * t._x1 + n) / 6, (t._y0 + 4 * t._y1 + e) / 6)
  4533. }
  4534. function Ff(t) {
  4535. this._context = t
  4536. }
  4537. function If(t) {
  4538. this._context = t
  4539. }
  4540. function jf(t) {
  4541. this._context = t
  4542. }
  4543. function Hf(t, n) {
  4544. this._basis = new Ff(t), this._beta = n
  4545. }
  4546. function Xf(t, n, e) {
  4547. t._context.bezierCurveTo(t._x1 + t._k * (t._x2 - t._x0), t._y1 + t._k * (t._y2 - t._y0), t._x2 + t._k * (t._x1 - n), t._y2 + t._k * (t._y1 - e), t._x2, t._y2)
  4548. }
  4549. function Gf(t, n) {
  4550. this._context = t, this._k = (1 - n) / 6
  4551. }
  4552. function Vf(t, n) {
  4553. this._context = t, this._k = (1 - n) / 6
  4554. }
  4555. function $f(t, n) {
  4556. this._context = t, this._k = (1 - n) / 6
  4557. }
  4558. function Wf(t, n, e) {
  4559. var r = t._x1,
  4560. i = t._y1,
  4561. o = t._x2,
  4562. a = t._y2;
  4563. if (t._l01_a > M_) {
  4564. var u = 2 * t._l01_2a + 3 * t._l01_a * t._l12_a + t._l12_2a,
  4565. f = 3 * t._l01_a * (t._l01_a + t._l12_a);
  4566. r = (r * u - t._x0 * t._l12_2a + t._x2 * t._l01_2a) / f, i = (i * u - t._y0 * t._l12_2a + t._y2 * t._l01_2a) / f
  4567. }
  4568. if (t._l23_a > M_) {
  4569. var c = 2 * t._l23_2a + 3 * t._l23_a * t._l12_a + t._l12_2a,
  4570. s = 3 * t._l23_a * (t._l23_a + t._l12_a);
  4571. o = (o * c + t._x1 * t._l23_2a - n * t._l12_2a) / s, a = (a * c + t._y1 * t._l23_2a - e * t._l12_2a) / s
  4572. }
  4573. t._context.bezierCurveTo(r, i, o, a, t._x2, t._y2)
  4574. }
  4575. function Zf(t, n) {
  4576. this._context = t, this._alpha = n
  4577. }
  4578. function Qf(t, n) {
  4579. this._context = t, this._alpha = n
  4580. }
  4581. function Jf(t, n) {
  4582. this._context = t, this._alpha = n
  4583. }
  4584. function Kf(t) {
  4585. this._context = t
  4586. }
  4587. function tc(t) {
  4588. return t < 0 ? -1 : 1
  4589. }
  4590. function nc(t, n, e) {
  4591. var r = t._x1 - t._x0,
  4592. i = n - t._x1,
  4593. o = (t._y1 - t._y0) / (r || i < 0 && -0),
  4594. a = (e - t._y1) / (i || r < 0 && -0),
  4595. u = (o * i + a * r) / (r + i);
  4596. return (tc(o) + tc(a)) * Math.min(Math.abs(o), Math.abs(a), .5 * Math.abs(u)) || 0
  4597. }
  4598. function ec(t, n) {
  4599. var e = t._x1 - t._x0;
  4600. return e ? (3 * (t._y1 - t._y0) / e - n) / 2 : n
  4601. }
  4602. function rc(t, n, e) {
  4603. var r = t._x0,
  4604. i = t._y0,
  4605. o = t._x1,
  4606. a = t._y1,
  4607. u = (o - r) / 3;
  4608. t._context.bezierCurveTo(r + u, i + u * n, o - u, a - u * e, o, a)
  4609. }
  4610. function ic(t) {
  4611. this._context = t
  4612. }
  4613. function oc(t) {
  4614. this._context = new ac(t)
  4615. }
  4616. function ac(t) {
  4617. this._context = t
  4618. }
  4619. function uc(t) {
  4620. this._context = t
  4621. }
  4622. function fc(t) {
  4623. var n, e, r = t.length - 1,
  4624. i = new Array(r),
  4625. o = new Array(r),
  4626. a = new Array(r);
  4627. for (i[0] = 0, o[0] = 2, a[0] = t[0] + 2 * t[1], n = 1; n < r - 1; ++n) i[n] = 1, o[n] = 4, a[n] = 4 * t[n] + 2 * t[n + 1];
  4628. for (i[r - 1] = 2, o[r - 1] = 7, a[r - 1] = 8 * t[r - 1] + t[r], n = 1; n < r; ++n) e = i[n] / o[n - 1], o[n] -= e, a[n] -= e * a[n - 1];
  4629. for (i[r - 1] = a[r - 1] / o[r - 1], n = r - 2; n >= 0; --n) i[n] = (a[n] - i[n + 1]) / o[n];
  4630. for (o[r - 1] = (t[r] + i[r - 1]) / 2, n = 0; n < r - 1; ++n) o[n] = 2 * t[n + 1] - i[n + 1];
  4631. return [i, o]
  4632. }
  4633. function cc(t, n) {
  4634. this._context = t, this._t = n
  4635. }
  4636. function sc(t, n) {
  4637. if ((i = t.length) > 1)
  4638. for (var e, r, i, o = 1, a = t[n[0]], u = a.length; o < i; ++o)
  4639. for (r = a, a = t[n[o]], e = 0; e < u; ++e) a[e][1] += a[e][0] = isNaN(r[e][1]) ? r[e][0] : r[e][1]
  4640. }
  4641. function lc(t) {
  4642. for (var n = t.length, e = new Array(n); --n >= 0;) e[n] = n;
  4643. return e
  4644. }
  4645. function hc(t, n) {
  4646. return t[n]
  4647. }
  4648. function dc(t) {
  4649. var n = t.map(pc);
  4650. return lc(t).sort(function(t, e) {
  4651. return n[t] - n[e]
  4652. })
  4653. }
  4654. function pc(t) {
  4655. for (var n, e = 0, r = -1, i = t.length; ++r < i;)(n = +t[r][1]) && (e += n);
  4656. return e
  4657. }
  4658. function vc(t) {
  4659. return function() {
  4660. return t
  4661. }
  4662. }
  4663. function gc(t) {
  4664. return t[0]
  4665. }
  4666. function yc(t) {
  4667. return t[1]
  4668. }
  4669. function _c() {
  4670. this._ = null
  4671. }
  4672. function bc(t) {
  4673. t.U = t.C = t.L = t.R = t.P = t.N = null
  4674. }
  4675. function mc(t, n) {
  4676. var e = n,
  4677. r = n.R,
  4678. i = e.U;
  4679. i ? i.L === e ? i.L = r : i.R = r : t._ = r, r.U = i, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
  4680. }
  4681. function xc(t, n) {
  4682. var e = n,
  4683. r = n.L,
  4684. i = e.U;
  4685. i ? i.L === e ? i.L = r : i.R = r : t._ = r, r.U = i, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
  4686. }
  4687. function wc(t) {
  4688. for (; t.L;) t = t.L;
  4689. return t
  4690. }
  4691. function Mc(t, n, e, r) {
  4692. var i = [null, null],
  4693. o = rb.push(i) - 1;
  4694. return i.left = t, i.right = n, e && Tc(i, t, n, e), r && Tc(i, n, t, r), nb[t.index].halfedges.push(o), nb[n.index].halfedges.push(o), i
  4695. }
  4696. function Ac(t, n, e) {
  4697. var r = [n, e];
  4698. return r.left = t, r
  4699. }
  4700. function Tc(t, n, e, r) {
  4701. t[0] || t[1] ? t.left === e ? t[1] = r : t[0] = r : (t[0] = r, t.left = n, t.right = e)
  4702. }
  4703. function Nc(t, n, e, r, i) {
  4704. var o, a = t[0],
  4705. u = t[1],
  4706. f = a[0],
  4707. c = a[1],
  4708. s = 0,
  4709. l = 1,
  4710. h = u[0] - f,
  4711. d = u[1] - c;
  4712. if (o = n - f, h || !(o > 0)) {
  4713. if (o /= h, h < 0) {
  4714. if (o < s) return;
  4715. o < l && (l = o)
  4716. } else if (h > 0) {
  4717. if (o > l) return;
  4718. o > s && (s = o)
  4719. }
  4720. if (o = r - f, h || !(o < 0)) {
  4721. if (o /= h, h < 0) {
  4722. if (o > l) return;
  4723. o > s && (s = o)
  4724. } else if (h > 0) {
  4725. if (o < s) return;
  4726. o < l && (l = o)
  4727. }
  4728. if (o = e - c, d || !(o > 0)) {
  4729. if (o /= d, d < 0) {
  4730. if (o < s) return;
  4731. o < l && (l = o)
  4732. } else if (d > 0) {
  4733. if (o > l) return;
  4734. o > s && (s = o)
  4735. }
  4736. if (o = i - c, d || !(o < 0)) {
  4737. if (o /= d, d < 0) {
  4738. if (o > l) return;
  4739. o > s && (s = o)
  4740. } else if (d > 0) {
  4741. if (o < s) return;
  4742. o < l && (l = o)
  4743. }
  4744. return !(s > 0 || l < 1) || (s > 0 && (t[0] = [f + s * h, c + s * d]), l < 1 && (t[1] = [f + l * h, c + l * d]), !0)
  4745. }
  4746. }
  4747. }
  4748. }
  4749. }
  4750. function Sc(t, n, e, r, i) {
  4751. var o = t[1];
  4752. if (o) return !0;
  4753. var a, u, f = t[0],
  4754. c = t.left,
  4755. s = t.right,
  4756. l = c[0],
  4757. h = c[1],
  4758. d = s[0],
  4759. p = s[1],
  4760. v = (l + d) / 2,
  4761. g = (h + p) / 2;
  4762. if (p === h) {
  4763. if (v < n || v >= r) return;
  4764. if (l > d) {
  4765. if (f) {
  4766. if (f[1] >= i) return
  4767. } else f = [v, e];
  4768. o = [v, i]
  4769. } else {
  4770. if (f) {
  4771. if (f[1] < e) return
  4772. } else f = [v, i];
  4773. o = [v, e]
  4774. }
  4775. } else if (a = (l - d) / (p - h), u = g - a * v, a < -1 || a > 1)
  4776. if (l > d) {
  4777. if (f) {
  4778. if (f[1] >= i) return
  4779. } else f = [(e - u) / a, e];
  4780. o = [(i - u) / a, i]
  4781. } else {
  4782. if (f) {
  4783. if (f[1] < e) return
  4784. } else f = [(i - u) / a, i];
  4785. o = [(e - u) / a, e]
  4786. }
  4787. else if (h < p) {
  4788. if (f) {
  4789. if (f[0] >= r) return
  4790. } else f = [n, a * n + u];
  4791. o = [r, a * r + u]
  4792. } else {
  4793. if (f) {
  4794. if (f[0] < n) return
  4795. } else f = [r, a * r + u];
  4796. o = [n, a * n + u]
  4797. }
  4798. return t[0] = f, t[1] = o, !0
  4799. }
  4800. function Ec(t, n) {
  4801. var e = t.site,
  4802. r = n.left,
  4803. i = n.right;
  4804. return e === i && (i = r, r = e), i ? Math.atan2(i[1] - r[1], i[0] - r[0]) : (e === r ? (r = n[1], i = n[0]) : (r = n[0], i = n[1]), Math.atan2(r[0] - i[0], i[1] - r[1]))
  4805. }
  4806. function kc(t, n) {
  4807. return n[+(n.left !== t.site)]
  4808. }
  4809. function Cc(t, n) {
  4810. return n[+(n.left === t.site)]
  4811. }
  4812. function Pc(t) {
  4813. var n = t.P,
  4814. e = t.N;
  4815. if (n && e) {
  4816. var r = n.site,
  4817. i = t.site,
  4818. o = e.site;
  4819. if (r !== o) {
  4820. var a = i[0],
  4821. u = i[1],
  4822. f = r[0] - a,
  4823. c = r[1] - u,
  4824. s = o[0] - a,
  4825. l = o[1] - u,
  4826. h = 2 * (f * l - c * s);
  4827. if (!(h >= -ub)) {
  4828. var d = f * f + c * c,
  4829. p = s * s + l * l,
  4830. v = (l * d - c * p) / h,
  4831. g = (f * p - s * d) / h,
  4832. y = ib.pop() || new function() {
  4833. bc(this), this.x = this.y = this.arc = this.site = this.cy = null
  4834. };
  4835. y.arc = t, y.site = i, y.x = v + a, y.y = (y.cy = g + u) + Math.sqrt(v * v + g * g), t.circle = y;
  4836. for (var _ = null, b = eb._; b;)
  4837. if (y.y < b.y || y.y === b.y && y.x <= b.x) {
  4838. if (!b.L) {
  4839. _ = b.P;
  4840. break
  4841. }
  4842. b = b.L
  4843. } else {
  4844. if (!b.R) {
  4845. _ = b;
  4846. break
  4847. }
  4848. b = b.R
  4849. }
  4850. eb.insert(_, y), _ || (K_ = y)
  4851. }
  4852. }
  4853. }
  4854. }
  4855. function zc(t) {
  4856. var n = t.circle;
  4857. n && (n.P || (K_ = n.N), eb.remove(n), ib.push(n), bc(n), t.circle = null)
  4858. }
  4859. function Rc(t) {
  4860. var n = ob.pop() || new function() {
  4861. bc(this), this.edge = this.site = this.circle = null
  4862. };
  4863. return n.site = t, n
  4864. }
  4865. function Lc(t) {
  4866. zc(t), tb.remove(t), ob.push(t), bc(t)
  4867. }
  4868. function Dc(t) {
  4869. var n = t.circle,
  4870. e = n.x,
  4871. r = n.cy,
  4872. i = [e, r],
  4873. o = t.P,
  4874. a = t.N,
  4875. u = [t];
  4876. Lc(t);
  4877. for (var f = o; f.circle && Math.abs(e - f.circle.x) < ab && Math.abs(r - f.circle.cy) < ab;) o = f.P, u.unshift(f), Lc(f), f = o;
  4878. u.unshift(f), zc(f);
  4879. for (var c = a; c.circle && Math.abs(e - c.circle.x) < ab && Math.abs(r - c.circle.cy) < ab;) a = c.N, u.push(c), Lc(c), c = a;
  4880. u.push(c), zc(c);
  4881. var s, l = u.length;
  4882. for (s = 1; s < l; ++s) c = u[s], f = u[s - 1], Tc(c.edge, f.site, c.site, i);
  4883. f = u[0], (c = u[l - 1]).edge = Mc(f.site, c.site, null, i), Pc(f), Pc(c)
  4884. }
  4885. function Uc(t) {
  4886. for (var n, e, r, i, o = t[0], a = t[1], u = tb._; u;)
  4887. if ((r = qc(u, a) - o) > ab) u = u.L;
  4888. else {
  4889. if (!((i = o - function(t, n) {
  4890. var e = t.N;
  4891. if (e) return qc(e, n);
  4892. var r = t.site;
  4893. return r[1] === n ? r[0] : 1 / 0
  4894. }(u, a)) > ab)) {
  4895. r > -ab ? (n = u.P, e = u) : i > -ab ? (n = u, e = u.N) : n = e = u;
  4896. break
  4897. }
  4898. if (!u.R) {
  4899. n = u;
  4900. break
  4901. }
  4902. u = u.R
  4903. }(function(t) {
  4904. nb[t.index] = {
  4905. site: t,
  4906. halfedges: []
  4907. }
  4908. })(t);
  4909. var f = Rc(t);
  4910. if (tb.insert(n, f), n || e) {
  4911. if (n === e) return zc(n), e = Rc(n.site), tb.insert(f, e), f.edge = e.edge = Mc(n.site, f.site), Pc(n), void Pc(e);
  4912. if (e) {
  4913. zc(n), zc(e);
  4914. var c = n.site,
  4915. s = c[0],
  4916. l = c[1],
  4917. h = t[0] - s,
  4918. d = t[1] - l,
  4919. p = e.site,
  4920. v = p[0] - s,
  4921. g = p[1] - l,
  4922. y = 2 * (h * g - d * v),
  4923. _ = h * h + d * d,
  4924. b = v * v + g * g,
  4925. m = [(g * _ - d * b) / y + s, (h * b - v * _) / y + l];
  4926. Tc(e.edge, c, p, m), f.edge = Mc(c, t, null, m), e.edge = Mc(t, p, null, m), Pc(n), Pc(e)
  4927. } else f.edge = Mc(n.site, f.site)
  4928. }
  4929. }
  4930. function qc(t, n) {
  4931. var e = t.site,
  4932. r = e[0],
  4933. i = e[1],
  4934. o = i - n;
  4935. if (!o) return r;
  4936. var a = t.P;
  4937. if (!a) return -1 / 0;
  4938. var u = (e = a.site)[0],
  4939. f = e[1],
  4940. c = f - n;
  4941. if (!c) return u;
  4942. var s = u - r,
  4943. l = 1 / o - 1 / c,
  4944. h = s / c;
  4945. return l ? (-h + Math.sqrt(h * h - 2 * l * (s * s / (-2 * c) - f + c / 2 + i - o / 2))) / l + r : (r + u) / 2
  4946. }
  4947. function Oc(t, n, e) {
  4948. return (t[0] - e[0]) * (n[1] - t[1]) - (t[0] - n[0]) * (e[1] - t[1])
  4949. }
  4950. function Yc(t, n) {
  4951. return n[1] - t[1] || n[0] - t[0]
  4952. }
  4953. function Bc(t, n) {
  4954. var e, r, i, o = t.sort(Yc).pop();
  4955. for (rb = [], nb = new Array(t.length), tb = new _c, eb = new _c;;)
  4956. if (i = K_, o && (!i || o[1] < i.y || o[1] === i.y && o[0] < i.x)) o[0] === e && o[1] === r || (Uc(o), e = o[0], r = o[1]), o = t.pop();
  4957. else {
  4958. if (!i) break;
  4959. Dc(i.arc)
  4960. }
  4961. if (function() {
  4962. for (var t, n, e, r, i = 0, o = nb.length; i < o; ++i)
  4963. if ((t = nb[i]) && (r = (n = t.halfedges).length)) {
  4964. var a = new Array(r),
  4965. u = new Array(r);
  4966. for (e = 0; e < r; ++e) a[e] = e, u[e] = Ec(t, rb[n[e]]);
  4967. for (a.sort(function(t, n) {
  4968. return u[n] - u[t]
  4969. }), e = 0; e < r; ++e) u[e] = n[a[e]];
  4970. for (e = 0; e < r; ++e) n[e] = u[e]
  4971. }
  4972. }(), n) {
  4973. var a = +n[0][0],
  4974. u = +n[0][1],
  4975. f = +n[1][0],
  4976. c = +n[1][1];
  4977. (function(t, n, e, r) {
  4978. for (var i, o = rb.length; o--;) Sc(i = rb[o], t, n, e, r) && Nc(i, t, n, e, r) && (Math.abs(i[0][0] - i[1][0]) > ab || Math.abs(i[0][1] - i[1][1]) > ab) || delete rb[o]
  4979. })(a, u, f, c),
  4980. function(t, n, e, r) {
  4981. var i, o, a, u, f, c, s, l, h, d, p, v, g = nb.length,
  4982. y = !0;
  4983. for (i = 0; i < g; ++i)
  4984. if (o = nb[i]) {
  4985. for (a = o.site, u = (f = o.halfedges).length; u--;) rb[f[u]] || f.splice(u, 1);
  4986. for (u = 0, c = f.length; u < c;) p = (d = Cc(o, rb[f[u]]))[0], v = d[1], l = (s = kc(o, rb[f[++u % c]]))[0], h = s[1], (Math.abs(p - l) > ab || Math.abs(v - h) > ab) && (f.splice(u, 0, rb.push(Ac(a, d, Math.abs(p - t) < ab && r - v > ab ? [t, Math.abs(l - t) < ab ? h : r] : Math.abs(v - r) < ab && e - p > ab ? [Math.abs(h - r) < ab ? l : e, r] : Math.abs(p - e) < ab && v - n > ab ? [e, Math.abs(l - e) < ab ? h : n] : Math.abs(v - n) < ab && p - t > ab ? [Math.abs(h - n) < ab ? l : t, n] : null)) - 1), ++c);
  4987. c && (y = !1)
  4988. }
  4989. if (y) {
  4990. var _, b, m, x = 1 / 0;
  4991. for (i = 0, y = null; i < g; ++i)(o = nb[i]) && (m = (_ = (a = o.site)[0] - t) * _ + (b = a[1] - n) * b) < x && (x = m, y = o);
  4992. if (y) {
  4993. var w = [t, n],
  4994. M = [t, r],
  4995. A = [e, r],
  4996. T = [e, n];
  4997. y.halfedges.push(rb.push(Ac(a = y.site, w, M)) - 1, rb.push(Ac(a, M, A)) - 1, rb.push(Ac(a, A, T)) - 1, rb.push(Ac(a, T, w)) - 1)
  4998. }
  4999. }
  5000. for (i = 0; i < g; ++i)(o = nb[i]) && (o.halfedges.length || delete nb[i])
  5001. }(a, u, f, c)
  5002. }
  5003. this.edges = rb, this.cells = nb, tb = eb = rb = nb = null
  5004. }
  5005. function Fc(t) {
  5006. return function() {
  5007. return t
  5008. }
  5009. }
  5010. function Ic(t, n, e) {
  5011. this.k = t, this.x = n, this.y = e
  5012. }
  5013. function jc(t) {
  5014. return t.__zoom || fb
  5015. }
  5016. function Hc() {
  5017. t.event.stopImmediatePropagation()
  5018. }
  5019. function Xc() {
  5020. t.event.preventDefault(), t.event.stopImmediatePropagation()
  5021. }
  5022. function Gc() {
  5023. return !t.event.button
  5024. }
  5025. function Vc() {
  5026. var t, n, e = this;
  5027. return e instanceof SVGElement ? (t = (e = e.ownerSVGElement || e).width.baseVal.value, n = e.height.baseVal.value) : (t = e.clientWidth, n = e.clientHeight), [
  5028. [0, 0],
  5029. [t, n]
  5030. ]
  5031. }
  5032. function $c() {
  5033. return this.__zoom || fb
  5034. }
  5035. function Wc() {
  5036. return -t.event.deltaY * (t.event.deltaMode ? 120 : 1) / 500
  5037. }
  5038. function Zc() {
  5039. return "ontouchstart" in this
  5040. }
  5041. function Qc(t, n, e) {
  5042. var r = t.invertX(n[0][0]) - e[0][0],
  5043. i = t.invertX(n[1][0]) - e[1][0],
  5044. o = t.invertY(n[0][1]) - e[0][1],
  5045. a = t.invertY(n[1][1]) - e[1][1];
  5046. return t.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), a > o ? (o + a) / 2 : Math.min(0, o) || Math.max(0, a))
  5047. }
  5048. var Jc = e(n),
  5049. Kc = Jc.right,
  5050. ts = Jc.left,
  5051. ns = Array.prototype,
  5052. es = ns.slice,
  5053. rs = ns.map,
  5054. is = Math.sqrt(50),
  5055. os = Math.sqrt(10),
  5056. as = Math.sqrt(2),
  5057. us = Array.prototype.slice,
  5058. fs = 1,
  5059. cs = 2,
  5060. ss = 3,
  5061. ls = 4,
  5062. hs = 1e-6,
  5063. ds = {
  5064. value: function() {}
  5065. };
  5066. S.prototype = N.prototype = {
  5067. constructor: S,
  5068. on: function(t, n) {
  5069. var e, r = this._,
  5070. i = function(t, n) {
  5071. return t.trim().split(/^|\s+/).map(function(t) {
  5072. var e = "",
  5073. r = t.indexOf(".");
  5074. if (r >= 0 && (e = t.slice(r + 1), t = t.slice(0, r)), t && !n.hasOwnProperty(t)) throw new Error("unknown type: " + t);
  5075. return {
  5076. type: t,
  5077. name: e
  5078. }
  5079. })
  5080. }(t + "", r),
  5081. o = -1,
  5082. a = i.length; {
  5083. if (!(arguments.length < 2)) {
  5084. if (null != n && "function" != typeof n) throw new Error("invalid callback: " + n);
  5085. for (; ++o < a;)
  5086. if (e = (t = i[o]).type) r[e] = E(r[e], t.name, n);
  5087. else if (null == n)
  5088. for (e in r) r[e] = E(r[e], t.name, null);
  5089. return this
  5090. }
  5091. for (; ++o < a;)
  5092. if ((e = (t = i[o]).type) && (e = function(t, n) {
  5093. for (var e, r = 0, i = t.length; r < i; ++r)
  5094. if ((e = t[r]).name === n) return e.value
  5095. }(r[e], t.name))) return e
  5096. }
  5097. },
  5098. copy: function() {
  5099. var t = {},
  5100. n = this._;
  5101. for (var e in n) t[e] = n[e].slice();
  5102. return new S(t)
  5103. },
  5104. call: function(t, n) {
  5105. if ((e = arguments.length - 2) > 0)
  5106. for (var e, r, i = new Array(e), o = 0; o < e; ++o) i[o] = arguments[o + 2];
  5107. if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
  5108. for (o = 0, e = (r = this._[t]).length; o < e; ++o) r[o].value.apply(n, i)
  5109. },
  5110. apply: function(t, n, e) {
  5111. if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
  5112. for (var r = this._[t], i = 0, o = r.length; i < o; ++i) r[i].value.apply(n, e)
  5113. }
  5114. };
  5115. var ps = "http://www.w3.org/1999/xhtml",
  5116. vs = {
  5117. svg: "http://www.w3.org/2000/svg",
  5118. xhtml: ps,
  5119. xlink: "http://www.w3.org/1999/xlink",
  5120. xml: "http://www.w3.org/XML/1998/namespace",
  5121. xmlns: "http://www.w3.org/2000/xmlns/"
  5122. },
  5123. gs = function(t) {
  5124. return function() {
  5125. return this.matches(t)
  5126. }
  5127. };
  5128. if ("undefined" != typeof document) {
  5129. var ys = document.documentElement;
  5130. if (!ys.matches) {
  5131. var _s = ys.webkitMatchesSelector || ys.msMatchesSelector || ys.mozMatchesSelector || ys.oMatchesSelector;
  5132. gs = function(t) {
  5133. return function() {
  5134. return _s.call(this, t)
  5135. }
  5136. }
  5137. }
  5138. }
  5139. var bs = gs;
  5140. U.prototype = {
  5141. constructor: U,
  5142. appendChild: function(t) {
  5143. return this._parent.insertBefore(t, this._next)
  5144. },
  5145. insertBefore: function(t, n) {
  5146. return this._parent.insertBefore(t, n)
  5147. },
  5148. querySelector: function(t) {
  5149. return this._parent.querySelector(t)
  5150. },
  5151. querySelectorAll: function(t) {
  5152. return this._parent.querySelectorAll(t)
  5153. }
  5154. };
  5155. var ms = "$";
  5156. H.prototype = {
  5157. add: function(t) {
  5158. this._names.indexOf(t) < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")))
  5159. },
  5160. remove: function(t) {
  5161. var n = this._names.indexOf(t);
  5162. n >= 0 && (this._names.splice(n, 1), this._node.setAttribute("class", this._names.join(" ")))
  5163. },
  5164. contains: function(t) {
  5165. return this._names.indexOf(t) >= 0
  5166. }
  5167. };
  5168. var xs = {};
  5169. if (t.event = null, "undefined" != typeof document) {
  5170. "onmouseenter" in document.documentElement || (xs = {
  5171. mouseenter: "mouseover",
  5172. mouseleave: "mouseout"
  5173. })
  5174. }
  5175. var ws = [null];
  5176. ut.prototype = ft.prototype = {
  5177. constructor: ut,
  5178. select: function(t) {
  5179. "function" != typeof t && (t = z(t));
  5180. for (var n = this._groups, e = n.length, r = new Array(e), i = 0; i < e; ++i)
  5181. for (var o, a, u = n[i], f = u.length, c = r[i] = new Array(f), s = 0; s < f; ++s)(o = u[s]) && (a = t.call(o, o.__data__, s, u)) && ("__data__" in o && (a.__data__ = o.__data__), c[s] = a);
  5182. return new ut(r, this._parents)
  5183. },
  5184. selectAll: function(t) {
  5185. "function" != typeof t && (t = L(t));
  5186. for (var n = this._groups, e = n.length, r = [], i = [], o = 0; o < e; ++o)
  5187. for (var a, u = n[o], f = u.length, c = 0; c < f; ++c)(a = u[c]) && (r.push(t.call(a, a.__data__, c, u)), i.push(a));
  5188. return new ut(r, i)
  5189. },
  5190. filter: function(t) {
  5191. "function" != typeof t && (t = bs(t));
  5192. for (var n = this._groups, e = n.length, r = new Array(e), i = 0; i < e; ++i)
  5193. for (var o, a = n[i], u = a.length, f = r[i] = [], c = 0; c < u; ++c)(o = a[c]) && t.call(o, o.__data__, c, a) && f.push(o);
  5194. return new ut(r, this._parents)
  5195. },
  5196. data: function(t, n) {
  5197. if (!t) return d = new Array(this.size()), c = -1, this.each(function(t) {
  5198. d[++c] = t
  5199. }), d;
  5200. var e = n ? O : q,
  5201. r = this._parents,
  5202. i = this._groups;
  5203. "function" != typeof t && (t = function(t) {
  5204. return function() {
  5205. return t
  5206. }
  5207. }(t));
  5208. for (var o = i.length, a = new Array(o), u = new Array(o), f = new Array(o), c = 0; c < o; ++c) {
  5209. var s = r[c],
  5210. l = i[c],
  5211. h = l.length,
  5212. d = t.call(s, s && s.__data__, c, r),
  5213. p = d.length,
  5214. v = u[c] = new Array(p),
  5215. g = a[c] = new Array(p);
  5216. e(s, l, v, g, f[c] = new Array(h), d, n);
  5217. for (var y, _, b = 0, m = 0; b < p; ++b)
  5218. if (y = v[b]) {
  5219. for (b >= m && (m = b + 1); !(_ = g[m]) && ++m < p;);
  5220. y._next = _ || null
  5221. }
  5222. }
  5223. return a = new ut(a, r), a._enter = u, a._exit = f, a
  5224. },
  5225. enter: function() {
  5226. return new ut(this._enter || this._groups.map(D), this._parents)
  5227. },
  5228. exit: function() {
  5229. return new ut(this._exit || this._groups.map(D), this._parents)
  5230. },
  5231. merge: function(t) {
  5232. for (var n = this._groups, e = t._groups, r = n.length, i = e.length, o = Math.min(r, i), a = new Array(r), u = 0; u < o; ++u)
  5233. for (var f, c = n[u], s = e[u], l = c.length, h = a[u] = new Array(l), d = 0; d < l; ++d)(f = c[d] || s[d]) && (h[d] = f);
  5234. for (; u < r; ++u) a[u] = n[u];
  5235. return new ut(a, this._parents)
  5236. },
  5237. order: function() {
  5238. for (var t = this._groups, n = -1, e = t.length; ++n < e;)
  5239. for (var r, i = t[n], o = i.length - 1, a = i[o]; --o >= 0;)(r = i[o]) && (a && a !== r.nextSibling && a.parentNode.insertBefore(r, a), a = r);
  5240. return this
  5241. },
  5242. sort: function(t) {
  5243. function n(n, e) {
  5244. return n && e ? t(n.__data__, e.__data__) : !n - !e
  5245. }
  5246. t || (t = Y);
  5247. for (var e = this._groups, r = e.length, i = new Array(r), o = 0; o < r; ++o) {
  5248. for (var a, u = e[o], f = u.length, c = i[o] = new Array(f), s = 0; s < f; ++s)(a = u[s]) && (c[s] = a);
  5249. c.sort(n)
  5250. }
  5251. return new ut(i, this._parents).order()
  5252. },
  5253. call: function() {
  5254. var t = arguments[0];
  5255. return arguments[0] = this, t.apply(null, arguments), this
  5256. },
  5257. nodes: function() {
  5258. var t = new Array(this.size()),
  5259. n = -1;
  5260. return this.each(function() {
  5261. t[++n] = this
  5262. }), t
  5263. },
  5264. node: function() {
  5265. for (var t = this._groups, n = 0, e = t.length; n < e; ++n)
  5266. for (var r = t[n], i = 0, o = r.length; i < o; ++i) {
  5267. var a = r[i];
  5268. if (a) return a
  5269. }
  5270. return null
  5271. },
  5272. size: function() {
  5273. var t = 0;
  5274. return this.each(function() {
  5275. ++t
  5276. }), t
  5277. },
  5278. empty: function() {
  5279. return !this.node()
  5280. },
  5281. each: function(t) {
  5282. for (var n = this._groups, e = 0, r = n.length; e < r; ++e)
  5283. for (var i, o = n[e], a = 0, u = o.length; a < u; ++a)(i = o[a]) && t.call(i, i.__data__, a, o);
  5284. return this
  5285. },
  5286. attr: function(t, n) {
  5287. var e = k(t);
  5288. if (arguments.length < 2) {
  5289. var r = this.node();
  5290. return e.local ? r.getAttributeNS(e.space, e.local) : r.getAttribute(e)
  5291. }
  5292. return this.each((null == n ? e.local ? function(t) {
  5293. return function() {
  5294. this.removeAttributeNS(t.space, t.local)
  5295. }
  5296. } : function(t) {
  5297. return function() {
  5298. this.removeAttribute(t)
  5299. }
  5300. } : "function" == typeof n ? e.local ? function(t, n) {
  5301. return function() {
  5302. var e = n.apply(this, arguments);
  5303. null == e ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, e)
  5304. }
  5305. } : function(t, n) {
  5306. return function() {
  5307. var e = n.apply(this, arguments);
  5308. null == e ? this.removeAttribute(t) : this.setAttribute(t, e)
  5309. }
  5310. } : e.local ? function(t, n) {
  5311. return function() {
  5312. this.setAttributeNS(t.space, t.local, n)
  5313. }
  5314. } : function(t, n) {
  5315. return function() {
  5316. this.setAttribute(t, n)
  5317. }
  5318. })(e, n))
  5319. },
  5320. style: function(t, n, e) {
  5321. return arguments.length > 1 ? this.each((null == n ? function(t) {
  5322. return function() {
  5323. this.style.removeProperty(t)
  5324. }
  5325. } : "function" == typeof n ? function(t, n, e) {
  5326. return function() {
  5327. var r = n.apply(this, arguments);
  5328. null == r ? this.style.removeProperty(t) : this.style.setProperty(t, r, e)
  5329. }
  5330. } : function(t, n, e) {
  5331. return function() {
  5332. this.style.setProperty(t, n, e)
  5333. }
  5334. })(t, n, null == e ? "" : e)) : F(this.node(), t)
  5335. },
  5336. property: function(t, n) {
  5337. return arguments.length > 1 ? this.each((null == n ? function(t) {
  5338. return function() {
  5339. delete this[t]
  5340. }
  5341. } : "function" == typeof n ? function(t, n) {
  5342. return function() {
  5343. var e = n.apply(this, arguments);
  5344. null == e ? delete this[t] : this[t] = e
  5345. }
  5346. } : function(t, n) {
  5347. return function() {
  5348. this[t] = n
  5349. }
  5350. })(t, n)) : this.node()[t]
  5351. },
  5352. classed: function(t, n) {
  5353. var e = I(t + "");
  5354. if (arguments.length < 2) {
  5355. for (var r = j(this.node()), i = -1, o = e.length; ++i < o;)
  5356. if (!r.contains(e[i])) return !1;
  5357. return !0
  5358. }
  5359. return this.each(("function" == typeof n ? function(t, n) {
  5360. return function() {
  5361. (n.apply(this, arguments) ? X : G)(this, t)
  5362. }
  5363. } : n ? function(t) {
  5364. return function() {
  5365. X(this, t)
  5366. }
  5367. } : function(t) {
  5368. return function() {
  5369. G(this, t)
  5370. }
  5371. })(e, n))
  5372. },
  5373. text: function(t) {
  5374. return arguments.length ? this.each(null == t ? V : ("function" == typeof t ? function(t) {
  5375. return function() {
  5376. var n = t.apply(this, arguments);
  5377. this.textContent = null == n ? "" : n
  5378. }
  5379. } : function(t) {
  5380. return function() {
  5381. this.textContent = t
  5382. }
  5383. })(t)) : this.node().textContent
  5384. },
  5385. html: function(t) {
  5386. return arguments.length ? this.each(null == t ? $ : ("function" == typeof t ? function(t) {
  5387. return function() {
  5388. var n = t.apply(this, arguments);
  5389. this.innerHTML = null == n ? "" : n
  5390. }
  5391. } : function(t) {
  5392. return function() {
  5393. this.innerHTML = t
  5394. }
  5395. })(t)) : this.node().innerHTML
  5396. },
  5397. raise: function() {
  5398. return this.each(W)
  5399. },
  5400. lower: function() {
  5401. return this.each(Z)
  5402. },
  5403. append: function(t) {
  5404. var n = "function" == typeof t ? t : C(t);
  5405. return this.select(function() {
  5406. return this.appendChild(n.apply(this, arguments))
  5407. })
  5408. },
  5409. insert: function(t, n) {
  5410. var e = "function" == typeof t ? t : C(t),
  5411. r = null == n ? Q : "function" == typeof n ? n : z(n);
  5412. return this.select(function() {
  5413. return this.insertBefore(e.apply(this, arguments), r.apply(this, arguments) || null)
  5414. })
  5415. },
  5416. remove: function() {
  5417. return this.each(J)
  5418. },
  5419. clone: function(t) {
  5420. return this.select(t ? tt : K)
  5421. },
  5422. datum: function(t) {
  5423. return arguments.length ? this.property("__data__", t) : this.node().__data__
  5424. },
  5425. on: function(t, n, e) {
  5426. var r, i, o = function(t) {
  5427. return t.trim().split(/^|\s+/).map(function(t) {
  5428. var n = "",
  5429. e = t.indexOf(".");
  5430. return e >= 0 && (n = t.slice(e + 1), t = t.slice(0, e)), {
  5431. type: t,
  5432. name: n
  5433. }
  5434. })
  5435. }(t + ""),
  5436. a = o.length;
  5437. if (!(arguments.length < 2)) {
  5438. for (u = n ? it : rt, null == e && (e = !1), r = 0; r < a; ++r) this.each(u(o[r], n, e));
  5439. return this
  5440. }
  5441. var u = this.node().__on;
  5442. if (u)
  5443. for (var f, c = 0, s = u.length; c < s; ++c)
  5444. for (r = 0, f = u[c]; r < a; ++r)
  5445. if ((i = o[r]).type === f.type && i.name === f.name) return f.value
  5446. },
  5447. dispatch: function(t, n) {
  5448. return this.each(("function" == typeof n ? function(t, n) {
  5449. return function() {
  5450. return at(this, t, n.apply(this, arguments))
  5451. }
  5452. } : function(t, n) {
  5453. return function() {
  5454. return at(this, t, n)
  5455. }
  5456. })(t, n))
  5457. }
  5458. };
  5459. var Ms = 0;
  5460. lt.prototype = st.prototype = {
  5461. constructor: lt,
  5462. get: function(t) {
  5463. for (var n = this._; !(n in t);)
  5464. if (!(t = t.parentNode)) return;
  5465. return t[n]
  5466. },
  5467. set: function(t, n) {
  5468. return t[this._] = n
  5469. },
  5470. remove: function(t) {
  5471. return this._ in t && delete t[this._]
  5472. },
  5473. toString: function() {
  5474. return this._
  5475. }
  5476. }, xt.prototype.on = function() {
  5477. var t = this._.on.apply(this._, arguments);
  5478. return t === this._ ? this : t
  5479. };
  5480. var As = "\\s*([+-]?\\d+)\\s*",
  5481. Ts = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
  5482. Ns = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
  5483. Ss = /^#([0-9a-f]{3})$/,
  5484. Es = /^#([0-9a-f]{6})$/,
  5485. ks = new RegExp("^rgb\\(" + [As, As, As] + "\\)$"),
  5486. Cs = new RegExp("^rgb\\(" + [Ns, Ns, Ns] + "\\)$"),
  5487. Ps = new RegExp("^rgba\\(" + [As, As, As, Ts] + "\\)$"),
  5488. zs = new RegExp("^rgba\\(" + [Ns, Ns, Ns, Ts] + "\\)$"),
  5489. Rs = new RegExp("^hsl\\(" + [Ts, Ns, Ns] + "\\)$"),
  5490. Ls = new RegExp("^hsla\\(" + [Ts, Ns, Ns, Ts] + "\\)$"),
  5491. Ds = {
  5492. aliceblue: 15792383,
  5493. antiquewhite: 16444375,
  5494. aqua: 65535,
  5495. aquamarine: 8388564,
  5496. azure: 15794175,
  5497. beige: 16119260,
  5498. bisque: 16770244,
  5499. black: 0,
  5500. blanchedalmond: 16772045,
  5501. blue: 255,
  5502. blueviolet: 9055202,
  5503. brown: 10824234,
  5504. burlywood: 14596231,
  5505. cadetblue: 6266528,
  5506. chartreuse: 8388352,
  5507. chocolate: 13789470,
  5508. coral: 16744272,
  5509. cornflowerblue: 6591981,
  5510. cornsilk: 16775388,
  5511. crimson: 14423100,
  5512. cyan: 65535,
  5513. darkblue: 139,
  5514. darkcyan: 35723,
  5515. darkgoldenrod: 12092939,
  5516. darkgray: 11119017,
  5517. darkgreen: 25600,
  5518. darkgrey: 11119017,
  5519. darkkhaki: 12433259,
  5520. darkmagenta: 9109643,
  5521. darkolivegreen: 5597999,
  5522. darkorange: 16747520,
  5523. darkorchid: 10040012,
  5524. darkred: 9109504,
  5525. darksalmon: 15308410,
  5526. darkseagreen: 9419919,
  5527. darkslateblue: 4734347,
  5528. darkslategray: 3100495,
  5529. darkslategrey: 3100495,
  5530. darkturquoise: 52945,
  5531. darkviolet: 9699539,
  5532. deeppink: 16716947,
  5533. deepskyblue: 49151,
  5534. dimgray: 6908265,
  5535. dimgrey: 6908265,
  5536. dodgerblue: 2003199,
  5537. firebrick: 11674146,
  5538. floralwhite: 16775920,
  5539. forestgreen: 2263842,
  5540. fuchsia: 16711935,
  5541. gainsboro: 14474460,
  5542. ghostwhite: 16316671,
  5543. gold: 16766720,
  5544. goldenrod: 14329120,
  5545. gray: 8421504,
  5546. green: 32768,
  5547. greenyellow: 11403055,
  5548. grey: 8421504,
  5549. honeydew: 15794160,
  5550. hotpink: 16738740,
  5551. indianred: 13458524,
  5552. indigo: 4915330,
  5553. ivory: 16777200,
  5554. khaki: 15787660,
  5555. lavender: 15132410,
  5556. lavenderblush: 16773365,
  5557. lawngreen: 8190976,
  5558. lemonchiffon: 16775885,
  5559. lightblue: 11393254,
  5560. lightcoral: 15761536,
  5561. lightcyan: 14745599,
  5562. lightgoldenrodyellow: 16448210,
  5563. lightgray: 13882323,
  5564. lightgreen: 9498256,
  5565. lightgrey: 13882323,
  5566. lightpink: 16758465,
  5567. lightsalmon: 16752762,
  5568. lightseagreen: 2142890,
  5569. lightskyblue: 8900346,
  5570. lightslategray: 7833753,
  5571. lightslategrey: 7833753,
  5572. lightsteelblue: 11584734,
  5573. lightyellow: 16777184,
  5574. lime: 65280,
  5575. limegreen: 3329330,
  5576. linen: 16445670,
  5577. magenta: 16711935,
  5578. maroon: 8388608,
  5579. mediumaquamarine: 6737322,
  5580. mediumblue: 205,
  5581. mediumorchid: 12211667,
  5582. mediumpurple: 9662683,
  5583. mediumseagreen: 3978097,
  5584. mediumslateblue: 8087790,
  5585. mediumspringgreen: 64154,
  5586. mediumturquoise: 4772300,
  5587. mediumvioletred: 13047173,
  5588. midnightblue: 1644912,
  5589. mintcream: 16121850,
  5590. mistyrose: 16770273,
  5591. moccasin: 16770229,
  5592. navajowhite: 16768685,
  5593. navy: 128,
  5594. oldlace: 16643558,
  5595. olive: 8421376,
  5596. olivedrab: 7048739,
  5597. orange: 16753920,
  5598. orangered: 16729344,
  5599. orchid: 14315734,
  5600. palegoldenrod: 15657130,
  5601. palegreen: 10025880,
  5602. paleturquoise: 11529966,
  5603. palevioletred: 14381203,
  5604. papayawhip: 16773077,
  5605. peachpuff: 16767673,
  5606. peru: 13468991,
  5607. pink: 16761035,
  5608. plum: 14524637,
  5609. powderblue: 11591910,
  5610. purple: 8388736,
  5611. rebeccapurple: 6697881,
  5612. red: 16711680,
  5613. rosybrown: 12357519,
  5614. royalblue: 4286945,
  5615. saddlebrown: 9127187,
  5616. salmon: 16416882,
  5617. sandybrown: 16032864,
  5618. seagreen: 3050327,
  5619. seashell: 16774638,
  5620. sienna: 10506797,
  5621. silver: 12632256,
  5622. skyblue: 8900331,
  5623. slateblue: 6970061,
  5624. slategray: 7372944,
  5625. slategrey: 7372944,
  5626. snow: 16775930,
  5627. springgreen: 65407,
  5628. steelblue: 4620980,
  5629. tan: 13808780,
  5630. teal: 32896,
  5631. thistle: 14204888,
  5632. tomato: 16737095,
  5633. turquoise: 4251856,
  5634. violet: 15631086,
  5635. wheat: 16113331,
  5636. white: 16777215,
  5637. whitesmoke: 16119285,
  5638. yellow: 16776960,
  5639. yellowgreen: 10145074
  5640. };
  5641. Nt(Et, kt, {
  5642. displayable: function() {
  5643. return this.rgb().displayable()
  5644. },
  5645. hex: function() {
  5646. return this.rgb().hex()
  5647. },
  5648. toString: function() {
  5649. return this.rgb() + ""
  5650. }
  5651. }), Nt(Lt, Rt, St(Et, {
  5652. brighter: function(t) {
  5653. return t = null == t ? 1 / .7 : Math.pow(1 / .7, t), new Lt(this.r * t, this.g * t, this.b * t, this.opacity)
  5654. },
  5655. darker: function(t) {
  5656. return t = null == t ? .7 : Math.pow(.7, t), new Lt(this.r * t, this.g * t, this.b * t, this.opacity)
  5657. },
  5658. rgb: function() {
  5659. return this
  5660. },
  5661. displayable: function() {
  5662. return 0 <= this.r && this.r <= 255 && 0 <= this.g && this.g <= 255 && 0 <= this.b && this.b <= 255 && 0 <= this.opacity && this.opacity <= 1
  5663. },
  5664. hex: function() {
  5665. return "#" + Dt(this.r) + Dt(this.g) + Dt(this.b)
  5666. },
  5667. toString: function() {
  5668. var t = this.opacity;
  5669. return (1 === (t = isNaN(t) ? 1 : Math.max(0, Math.min(1, t))) ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (1 === t ? ")" : ", " + t + ")")
  5670. }
  5671. })), Nt(Ot, qt, St(Et, {
  5672. brighter: function(t) {
  5673. return t = null == t ? 1 / .7 : Math.pow(1 / .7, t), new Ot(this.h, this.s, this.l * t, this.opacity)
  5674. },
  5675. darker: function(t) {
  5676. return t = null == t ? .7 : Math.pow(.7, t), new Ot(this.h, this.s, this.l * t, this.opacity)
  5677. },
  5678. rgb: function() {
  5679. var t = this.h % 360 + 360 * (this.h < 0),
  5680. n = isNaN(t) || isNaN(this.s) ? 0 : this.s,
  5681. e = this.l,
  5682. r = e + (e < .5 ? e : 1 - e) * n,
  5683. i = 2 * e - r;
  5684. return new Lt(Yt(t >= 240 ? t - 240 : t + 120, i, r), Yt(t, i, r), Yt(t < 120 ? t + 240 : t - 120, i, r), this.opacity)
  5685. },
  5686. displayable: function() {
  5687. return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1
  5688. }
  5689. }));
  5690. var Us = Math.PI / 180,
  5691. qs = 180 / Math.PI,
  5692. Os = .96422,
  5693. Ys = 1,
  5694. Bs = .82521,
  5695. Fs = 4 / 29,
  5696. Is = 6 / 29,
  5697. js = 3 * Is * Is,
  5698. Hs = Is * Is * Is;
  5699. Nt(It, Ft, St(Et, {
  5700. brighter: function(t) {
  5701. return new It(this.l + 18 * (null == t ? 1 : t), this.a, this.b, this.opacity)
  5702. },
  5703. darker: function(t) {
  5704. return new It(this.l - 18 * (null == t ? 1 : t), this.a, this.b, this.opacity)
  5705. },
  5706. rgb: function() {
  5707. var t = (this.l + 16) / 116,
  5708. n = isNaN(this.a) ? t : t + this.a / 500,
  5709. e = isNaN(this.b) ? t : t - this.b / 200;
  5710. return n = Os * Ht(n), t = Ys * Ht(t), e = Bs * Ht(e), new Lt(Xt(3.1338561 * n - 1.6168667 * t - .4906146 * e), Xt(-.9787684 * n + 1.9161415 * t + .033454 * e), Xt(.0719453 * n - .2289914 * t + 1.4052427 * e), this.opacity)
  5711. }
  5712. })), Nt(Wt, $t, St(Et, {
  5713. brighter: function(t) {
  5714. return new Wt(this.h, this.c, this.l + 18 * (null == t ? 1 : t), this.opacity)
  5715. },
  5716. darker: function(t) {
  5717. return new Wt(this.h, this.c, this.l - 18 * (null == t ? 1 : t), this.opacity)
  5718. },
  5719. rgb: function() {
  5720. return Bt(this).rgb()
  5721. }
  5722. }));
  5723. var Xs = -.29227,
  5724. Gs = -.90649,
  5725. Vs = 1.97294,
  5726. $s = Vs * Gs,
  5727. Ws = 1.78277 * Vs,
  5728. Zs = 1.78277 * Xs - -.14861 * Gs;
  5729. Nt(Qt, Zt, St(Et, {
  5730. brighter: function(t) {
  5731. return t = null == t ? 1 / .7 : Math.pow(1 / .7, t), new Qt(this.h, this.s, this.l * t, this.opacity)
  5732. },
  5733. darker: function(t) {
  5734. return t = null == t ? .7 : Math.pow(.7, t), new Qt(this.h, this.s, this.l * t, this.opacity)
  5735. },
  5736. rgb: function() {
  5737. var t = isNaN(this.h) ? 0 : (this.h + 120) * Us,
  5738. n = +this.l,
  5739. e = isNaN(this.s) ? 0 : this.s * n * (1 - n),
  5740. r = Math.cos(t),
  5741. i = Math.sin(t);
  5742. return new Lt(255 * (n + e * (-.14861 * r + 1.78277 * i)), 255 * (n + e * (Xs * r + Gs * i)), 255 * (n + e * (Vs * r)), this.opacity)
  5743. }
  5744. }));
  5745. var Qs, Js, Ks, tl, nl, el, rl = function t(n) {
  5746. function e(t, n) {
  5747. var e = r((t = Rt(t)).r, (n = Rt(n)).r),
  5748. i = r(t.g, n.g),
  5749. o = r(t.b, n.b),
  5750. a = an(t.opacity, n.opacity);
  5751. return function(n) {
  5752. return t.r = e(n), t.g = i(n), t.b = o(n), t.opacity = a(n), t + ""
  5753. }
  5754. }
  5755. var r = on(n);
  5756. return e.gamma = t, e
  5757. }(1),
  5758. il = un(Kt),
  5759. ol = un(tn),
  5760. al = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
  5761. ul = new RegExp(al.source, "g"),
  5762. fl = 180 / Math.PI,
  5763. cl = {
  5764. translateX: 0,
  5765. translateY: 0,
  5766. rotate: 0,
  5767. skewX: 0,
  5768. scaleX: 1,
  5769. scaleY: 1
  5770. },
  5771. sl = gn(function(t) {
  5772. return "none" === t ? cl : (Qs || (Qs = document.createElement("DIV"), Js = document.documentElement, Ks = document.defaultView), Qs.style.transform = t, t = Ks.getComputedStyle(Js.appendChild(Qs), null).getPropertyValue("transform"), Js.removeChild(Qs), t = t.slice(7, -1).split(","), vn(+t[0], +t[1], +t[2], +t[3], +t[4], +t[5]))
  5773. }, "px, ", "px)", "deg)"),
  5774. ll = gn(function(t) {
  5775. return null == t ? cl : (tl || (tl = document.createElementNS("http://www.w3.org/2000/svg", "g")), tl.setAttribute("transform", t), (t = tl.transform.baseVal.consolidate()) ? (t = t.matrix, vn(t.a, t.b, t.c, t.d, t.e, t.f)) : cl)
  5776. }, ", ", ")", ")"),
  5777. hl = Math.SQRT2,
  5778. dl = 2,
  5779. pl = 4,
  5780. vl = 1e-12,
  5781. gl = bn(rn),
  5782. yl = bn(an),
  5783. _l = mn(rn),
  5784. bl = mn(an),
  5785. ml = xn(rn),
  5786. xl = xn(an),
  5787. wl = 0,
  5788. Ml = 0,
  5789. Al = 0,
  5790. Tl = 1e3,
  5791. Nl = 0,
  5792. Sl = 0,
  5793. El = 0,
  5794. kl = "object" == typeof performance && performance.now ? performance : Date,
  5795. Cl = "object" == typeof window && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
  5796. setTimeout(t, 17)
  5797. };
  5798. An.prototype = Tn.prototype = {
  5799. constructor: An,
  5800. restart: function(t, n, e) {
  5801. if ("function" != typeof t) throw new TypeError("callback is not a function");
  5802. e = (null == e ? wn() : +e) + (null == n ? 0 : +n), this._next || el === this || (el ? el._next = this : nl = this, el = this), this._call = t, this._time = e, kn()
  5803. },
  5804. stop: function() {
  5805. this._call && (this._call = null, this._time = 1 / 0, kn())
  5806. }
  5807. };
  5808. var Pl = N("start", "end", "interrupt"),
  5809. zl = [],
  5810. Rl = 0,
  5811. Ll = 1,
  5812. Dl = 2,
  5813. Ul = 3,
  5814. ql = 4,
  5815. Ol = 5,
  5816. Yl = 6,
  5817. Bl = ft.prototype.constructor,
  5818. Fl = 0,
  5819. Il = ft.prototype;
  5820. On.prototype = Yn.prototype = {
  5821. constructor: On,
  5822. select: function(t) {
  5823. var n = this._name,
  5824. e = this._id;
  5825. "function" != typeof t && (t = z(t));
  5826. for (var r = this._groups, i = r.length, o = new Array(i), a = 0; a < i; ++a)
  5827. for (var u, f, c = r[a], s = c.length, l = o[a] = new Array(s), h = 0; h < s; ++h)(u = c[h]) && (f = t.call(u, u.__data__, h, c)) && ("__data__" in u && (f.__data__ = u.__data__), l[h] = f, Pn(l[h], n, e, h, l, Ln(u, e)));
  5828. return new On(o, this._parents, n, e)
  5829. },
  5830. selectAll: function(t) {
  5831. var n = this._name,
  5832. e = this._id;
  5833. "function" != typeof t && (t = L(t));
  5834. for (var r = this._groups, i = r.length, o = [], a = [], u = 0; u < i; ++u)
  5835. for (var f, c = r[u], s = c.length, l = 0; l < s; ++l)
  5836. if (f = c[l]) {
  5837. for (var h, d = t.call(f, f.__data__, l, c), p = Ln(f, e), v = 0, g = d.length; v < g; ++v)(h = d[v]) && Pn(h, n, e, v, d, p);
  5838. o.push(d), a.push(f)
  5839. }
  5840. return new On(o, a, n, e)
  5841. },
  5842. filter: function(t) {
  5843. "function" != typeof t && (t = bs(t));
  5844. for (var n = this._groups, e = n.length, r = new Array(e), i = 0; i < e; ++i)
  5845. for (var o, a = n[i], u = a.length, f = r[i] = [], c = 0; c < u; ++c)(o = a[c]) && t.call(o, o.__data__, c, a) && f.push(o);
  5846. return new On(r, this._parents, this._name, this._id)
  5847. },
  5848. merge: function(t) {
  5849. if (t._id !== this._id) throw new Error;
  5850. for (var n = this._groups, e = t._groups, r = n.length, i = e.length, o = Math.min(r, i), a = new Array(r), u = 0; u < o; ++u)
  5851. for (var f, c = n[u], s = e[u], l = c.length, h = a[u] = new Array(l), d = 0; d < l; ++d)(f = c[d] || s[d]) && (h[d] = f);
  5852. for (; u < r; ++u) a[u] = n[u];
  5853. return new On(a, this._parents, this._name, this._id)
  5854. },
  5855. selection: function() {
  5856. return new Bl(this._groups, this._parents)
  5857. },
  5858. transition: function() {
  5859. for (var t = this._name, n = this._id, e = Bn(), r = this._groups, i = r.length, o = 0; o < i; ++o)
  5860. for (var a, u = r[o], f = u.length, c = 0; c < f; ++c)
  5861. if (a = u[c]) {
  5862. var s = Ln(a, n);
  5863. Pn(a, t, e, c, u, {
  5864. time: s.time + s.delay + s.duration,
  5865. delay: 0,
  5866. duration: s.duration,
  5867. ease: s.ease
  5868. })
  5869. }
  5870. return new On(r, this._parents, t, e)
  5871. },
  5872. call: Il.call,
  5873. nodes: Il.nodes,
  5874. node: Il.node,
  5875. size: Il.size,
  5876. empty: Il.empty,
  5877. each: Il.each,
  5878. on: function(t, n) {
  5879. var e = this._id;
  5880. return arguments.length < 2 ? Ln(this.node(), e).on.on(t) : this.each(function(t, n, e) {
  5881. var r, i, o = function(t) {
  5882. return (t + "").trim().split(/^|\s+/).every(function(t) {
  5883. var n = t.indexOf(".");
  5884. return n >= 0 && (t = t.slice(0, n)), !t || "start" === t
  5885. })
  5886. }(n) ? zn : Rn;
  5887. return function() {
  5888. var a = o(this, t),
  5889. u = a.on;
  5890. u !== r && (i = (r = u).copy()).on(n, e), a.on = i
  5891. }
  5892. }(e, t, n))
  5893. },
  5894. attr: function(t, n) {
  5895. var e = k(t),
  5896. r = "transform" === e ? ll : qn;
  5897. return this.attrTween(t, "function" == typeof n ? (e.local ? function(t, n, e) {
  5898. var r, i, o;
  5899. return function() {
  5900. var a, u = e(this);
  5901. if (null != u) return (a = this.getAttributeNS(t.space, t.local)) === u ? null : a === r && u === i ? o : o = n(r = a, i = u);
  5902. this.removeAttributeNS(t.space, t.local)
  5903. }
  5904. } : function(t, n, e) {
  5905. var r, i, o;
  5906. return function() {
  5907. var a, u = e(this);
  5908. if (null != u) return (a = this.getAttribute(t)) === u ? null : a === r && u === i ? o : o = n(r = a, i = u);
  5909. this.removeAttribute(t)
  5910. }
  5911. })(e, r, Un(this, "attr." + t, n)) : null == n ? (e.local ? function(t) {
  5912. return function() {
  5913. this.removeAttributeNS(t.space, t.local)
  5914. }
  5915. } : function(t) {
  5916. return function() {
  5917. this.removeAttribute(t)
  5918. }
  5919. })(e) : (e.local ? function(t, n, e) {
  5920. var r, i;
  5921. return function() {
  5922. var o = this.getAttributeNS(t.space, t.local);
  5923. return o === e ? null : o === r ? i : i = n(r = o, e)
  5924. }
  5925. } : function(t, n, e) {
  5926. var r, i;
  5927. return function() {
  5928. var o = this.getAttribute(t);
  5929. return o === e ? null : o === r ? i : i = n(r = o, e)
  5930. }
  5931. })(e, r, n + ""))
  5932. },
  5933. attrTween: function(t, n) {
  5934. var e = "attr." + t;
  5935. if (arguments.length < 2) return (e = this.tween(e)) && e._value;
  5936. if (null == n) return this.tween(e, null);
  5937. if ("function" != typeof n) throw new Error;
  5938. var r = k(t);
  5939. return this.tween(e, (r.local ? function(t, n) {
  5940. function e() {
  5941. var e = this,
  5942. r = n.apply(e, arguments);
  5943. return r && function(n) {
  5944. e.setAttributeNS(t.space, t.local, r(n))
  5945. }
  5946. }
  5947. return e._value = n, e
  5948. } : function(t, n) {
  5949. function e() {
  5950. var e = this,
  5951. r = n.apply(e, arguments);
  5952. return r && function(n) {
  5953. e.setAttribute(t, r(n))
  5954. }
  5955. }
  5956. return e._value = n, e
  5957. })(r, n))
  5958. },
  5959. style: function(t, n, e) {
  5960. var r = "transform" == (t += "") ? sl : qn;
  5961. return null == n ? this.styleTween(t, function(t, n) {
  5962. var e, r, i;
  5963. return function() {
  5964. var o = F(this, t),
  5965. a = (this.style.removeProperty(t), F(this, t));
  5966. return o === a ? null : o === e && a === r ? i : i = n(e = o, r = a)
  5967. }
  5968. }(t, r)).on("end.style." + t, function(t) {
  5969. return function() {
  5970. this.style.removeProperty(t)
  5971. }
  5972. }(t)) : this.styleTween(t, "function" == typeof n ? function(t, n, e) {
  5973. var r, i, o;
  5974. return function() {
  5975. var a = F(this, t),
  5976. u = e(this);
  5977. return null == u && (this.style.removeProperty(t), u = F(this, t)), a === u ? null : a === r && u === i ? o : o = n(r = a, i = u)
  5978. }
  5979. }(t, r, Un(this, "style." + t, n)) : function(t, n, e) {
  5980. var r, i;
  5981. return function() {
  5982. var o = F(this, t);
  5983. return o === e ? null : o === r ? i : i = n(r = o, e)
  5984. }
  5985. }(t, r, n + ""), e)
  5986. },
  5987. styleTween: function(t, n, e) {
  5988. var r = "style." + (t += "");
  5989. if (arguments.length < 2) return (r = this.tween(r)) && r._value;
  5990. if (null == n) return this.tween(r, null);
  5991. if ("function" != typeof n) throw new Error;
  5992. return this.tween(r, function(t, n, e) {
  5993. function r() {
  5994. var r = this,
  5995. i = n.apply(r, arguments);
  5996. return i && function(n) {
  5997. r.style.setProperty(t, i(n), e)
  5998. }
  5999. }
  6000. return r._value = n, r
  6001. }(t, n, null == e ? "" : e))
  6002. },
  6003. text: function(t) {
  6004. return this.tween("text", "function" == typeof t ? function(t) {
  6005. return function() {
  6006. var n = t(this);
  6007. this.textContent = null == n ? "" : n
  6008. }
  6009. }(Un(this, "text", t)) : function(t) {
  6010. return function() {
  6011. this.textContent = t
  6012. }
  6013. }(null == t ? "" : t + ""))
  6014. },
  6015. remove: function() {
  6016. return this.on("end.remove", function(t) {
  6017. return function() {
  6018. var n = this.parentNode;
  6019. for (var e in this.__transition)
  6020. if (+e !== t) return;
  6021. n && n.removeChild(this)
  6022. }
  6023. }(this._id))
  6024. },
  6025. tween: function(t, n) {
  6026. var e = this._id;
  6027. if (t += "", arguments.length < 2) {
  6028. for (var r, i = Ln(this.node(), e).tween, o = 0, a = i.length; o < a; ++o)
  6029. if ((r = i[o]).name === t) return r.value;
  6030. return null
  6031. }
  6032. return this.each((null == n ? function(t, n) {
  6033. var e, r;
  6034. return function() {
  6035. var i = Rn(this, t),
  6036. o = i.tween;
  6037. if (o !== e)
  6038. for (var a = 0, u = (r = e = o).length; a < u; ++a)
  6039. if (r[a].name === n) {
  6040. (r = r.slice()).splice(a, 1);
  6041. break
  6042. }
  6043. i.tween = r
  6044. }
  6045. } : function(t, n, e) {
  6046. var r, i;
  6047. if ("function" != typeof e) throw new Error;
  6048. return function() {
  6049. var o = Rn(this, t),
  6050. a = o.tween;
  6051. if (a !== r) {
  6052. i = (r = a).slice();
  6053. for (var u = {
  6054. name: n,
  6055. value: e
  6056. }, f = 0, c = i.length; f < c; ++f)
  6057. if (i[f].name === n) {
  6058. i[f] = u;
  6059. break
  6060. }
  6061. f === c && i.push(u)
  6062. }
  6063. o.tween = i
  6064. }
  6065. })(e, t, n))
  6066. },
  6067. delay: function(t) {
  6068. var n = this._id;
  6069. return arguments.length ? this.each(("function" == typeof t ? function(t, n) {
  6070. return function() {
  6071. zn(this, t).delay = +n.apply(this, arguments)
  6072. }
  6073. } : function(t, n) {
  6074. return n = +n,
  6075. function() {
  6076. zn(this, t).delay = n
  6077. }
  6078. })(n, t)) : Ln(this.node(), n).delay
  6079. },
  6080. duration: function(t) {
  6081. var n = this._id;
  6082. return arguments.length ? this.each(("function" == typeof t ? function(t, n) {
  6083. return function() {
  6084. Rn(this, t).duration = +n.apply(this, arguments)
  6085. }
  6086. } : function(t, n) {
  6087. return n = +n,
  6088. function() {
  6089. Rn(this, t).duration = n
  6090. }
  6091. })(n, t)) : Ln(this.node(), n).duration
  6092. },
  6093. ease: function(t) {
  6094. var n = this._id;
  6095. return arguments.length ? this.each(function(t, n) {
  6096. if ("function" != typeof n) throw new Error;
  6097. return function() {
  6098. Rn(this, t).ease = n
  6099. }
  6100. }(n, t)) : Ln(this.node(), n).ease
  6101. }
  6102. };
  6103. var jl = function t(n) {
  6104. function e(t) {
  6105. return Math.pow(t, n)
  6106. }
  6107. return n = +n, e.exponent = t, e
  6108. }(3),
  6109. Hl = function t(n) {
  6110. function e(t) {
  6111. return 1 - Math.pow(1 - t, n)
  6112. }
  6113. return n = +n, e.exponent = t, e
  6114. }(3),
  6115. Xl = function t(n) {
  6116. function e(t) {
  6117. return ((t *= 2) <= 1 ? Math.pow(t, n) : 2 - Math.pow(2 - t, n)) / 2
  6118. }
  6119. return n = +n, e.exponent = t, e
  6120. }(3),
  6121. Gl = Math.PI,
  6122. Vl = Gl / 2,
  6123. $l = 4 / 11,
  6124. Wl = 6 / 11,
  6125. Zl = 8 / 11,
  6126. Ql = .75,
  6127. Jl = 9 / 11,
  6128. Kl = 10 / 11,
  6129. th = .9375,
  6130. nh = 21 / 22,
  6131. eh = 63 / 64,
  6132. rh = 1 / $l / $l,
  6133. ih = function t(n) {
  6134. function e(t) {
  6135. return t * t * ((n + 1) * t - n)
  6136. }
  6137. return n = +n, e.overshoot = t, e
  6138. }(1.70158),
  6139. oh = function t(n) {
  6140. function e(t) {
  6141. return --t * t * ((n + 1) * t + n) + 1
  6142. }
  6143. return n = +n, e.overshoot = t, e
  6144. }(1.70158),
  6145. ah = function t(n) {
  6146. function e(t) {
  6147. return ((t *= 2) < 1 ? t * t * ((n + 1) * t - n) : (t -= 2) * t * ((n + 1) * t + n) + 2) / 2
  6148. }
  6149. return n = +n, e.overshoot = t, e
  6150. }(1.70158),
  6151. uh = 2 * Math.PI,
  6152. fh = function t(n, e) {
  6153. function r(t) {
  6154. return n * Math.pow(2, 10 * --t) * Math.sin((i - t) / e)
  6155. }
  6156. var i = Math.asin(1 / (n = Math.max(1, n))) * (e /= uh);
  6157. return r.amplitude = function(n) {
  6158. return t(n, e * uh)
  6159. }, r.period = function(e) {
  6160. return t(n, e)
  6161. }, r
  6162. }(1, .3),
  6163. ch = function t(n, e) {
  6164. function r(t) {
  6165. return 1 - n * Math.pow(2, -10 * (t = +t)) * Math.sin((t + i) / e)
  6166. }
  6167. var i = Math.asin(1 / (n = Math.max(1, n))) * (e /= uh);
  6168. return r.amplitude = function(n) {
  6169. return t(n, e * uh)
  6170. }, r.period = function(e) {
  6171. return t(n, e)
  6172. }, r
  6173. }(1, .3),
  6174. sh = function t(n, e) {
  6175. function r(t) {
  6176. return ((t = 2 * t - 1) < 0 ? n * Math.pow(2, 10 * t) * Math.sin((i - t) / e) : 2 - n * Math.pow(2, -10 * t) * Math.sin((i + t) / e)) / 2
  6177. }
  6178. var i = Math.asin(1 / (n = Math.max(1, n))) * (e /= uh);
  6179. return r.amplitude = function(n) {
  6180. return t(n, e * uh)
  6181. }, r.period = function(e) {
  6182. return t(n, e)
  6183. }, r
  6184. }(1, .3),
  6185. lh = {
  6186. time: null,
  6187. delay: 0,
  6188. duration: 250,
  6189. ease: In
  6190. };
  6191. ft.prototype.interrupt = function(t) {
  6192. return this.each(function() {
  6193. Dn(this, t)
  6194. })
  6195. }, ft.prototype.transition = function(t) {
  6196. var n, e;
  6197. t instanceof On ? (n = t._id, t = t._name) : (n = Bn(), (e = lh).time = wn(), t = null == t ? null : t + "");
  6198. for (var r = this._groups, i = r.length, o = 0; o < i; ++o)
  6199. for (var a, u = r[o], f = u.length, c = 0; c < f; ++c)(a = u[c]) && Pn(a, t, n, c, u, e || Vn(a, n));
  6200. return new On(r, this._parents, t, n)
  6201. };
  6202. var hh = [null],
  6203. dh = {
  6204. name: "drag"
  6205. },
  6206. ph = {
  6207. name: "space"
  6208. },
  6209. vh = {
  6210. name: "handle"
  6211. },
  6212. gh = {
  6213. name: "center"
  6214. },
  6215. yh = {
  6216. name: "x",
  6217. handles: ["e", "w"].map(Qn),
  6218. input: function(t, n) {
  6219. return t && [
  6220. [t[0], n[0][1]],
  6221. [t[1], n[1][1]]
  6222. ]
  6223. },
  6224. output: function(t) {
  6225. return t && [t[0][0], t[1][0]]
  6226. }
  6227. },
  6228. _h = {
  6229. name: "y",
  6230. handles: ["n", "s"].map(Qn),
  6231. input: function(t, n) {
  6232. return t && [
  6233. [n[0][0], t[0]],
  6234. [n[1][0], t[1]]
  6235. ]
  6236. },
  6237. output: function(t) {
  6238. return t && [t[0][1], t[1][1]]
  6239. }
  6240. },
  6241. bh = {
  6242. name: "xy",
  6243. handles: ["n", "e", "s", "w", "nw", "ne", "se", "sw"].map(Qn),
  6244. input: function(t) {
  6245. return t
  6246. },
  6247. output: function(t) {
  6248. return t
  6249. }
  6250. },
  6251. mh = {
  6252. overlay: "crosshair",
  6253. selection: "move",
  6254. n: "ns-resize",
  6255. e: "ew-resize",
  6256. s: "ns-resize",
  6257. w: "ew-resize",
  6258. nw: "nwse-resize",
  6259. ne: "nesw-resize",
  6260. se: "nwse-resize",
  6261. sw: "nesw-resize"
  6262. },
  6263. xh = {
  6264. e: "w",
  6265. w: "e",
  6266. nw: "ne",
  6267. ne: "nw",
  6268. se: "sw",
  6269. sw: "se"
  6270. },
  6271. wh = {
  6272. n: "s",
  6273. s: "n",
  6274. nw: "sw",
  6275. ne: "se",
  6276. se: "ne",
  6277. sw: "nw"
  6278. },
  6279. Mh = {
  6280. overlay: 1,
  6281. selection: 1,
  6282. n: null,
  6283. e: 1,
  6284. s: null,
  6285. w: -1,
  6286. nw: -1,
  6287. ne: 1,
  6288. se: 1,
  6289. sw: -1
  6290. },
  6291. Ah = {
  6292. overlay: 1,
  6293. selection: 1,
  6294. n: -1,
  6295. e: null,
  6296. s: 1,
  6297. w: null,
  6298. nw: -1,
  6299. ne: -1,
  6300. se: 1,
  6301. sw: 1
  6302. },
  6303. Th = Math.cos,
  6304. Nh = Math.sin,
  6305. Sh = Math.PI,
  6306. Eh = Sh / 2,
  6307. kh = 2 * Sh,
  6308. Ch = Math.max,
  6309. Ph = Array.prototype.slice,
  6310. zh = Math.PI,
  6311. Rh = 2 * zh,
  6312. Lh = Rh - 1e-6;
  6313. ie.prototype = oe.prototype = {
  6314. constructor: ie,
  6315. moveTo: function(t, n) {
  6316. this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n)
  6317. },
  6318. closePath: function() {
  6319. null !== this._x1 && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z")
  6320. },
  6321. lineTo: function(t, n) {
  6322. this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n)
  6323. },
  6324. quadraticCurveTo: function(t, n, e, r) {
  6325. this._ += "Q" + +t + "," + +n + "," + (this._x1 = +e) + "," + (this._y1 = +r)
  6326. },
  6327. bezierCurveTo: function(t, n, e, r, i, o) {
  6328. this._ += "C" + +t + "," + +n + "," + +e + "," + +r + "," + (this._x1 = +i) + "," + (this._y1 = +o)
  6329. },
  6330. arcTo: function(t, n, e, r, i) {
  6331. t = +t, n = +n, e = +e, r = +r, i = +i;
  6332. var o = this._x1,
  6333. a = this._y1,
  6334. u = e - t,
  6335. f = r - n,
  6336. c = o - t,
  6337. s = a - n,
  6338. l = c * c + s * s;
  6339. if (i < 0) throw new Error("negative radius: " + i);
  6340. if (null === this._x1) this._ += "M" + (this._x1 = t) + "," + (this._y1 = n);
  6341. else if (l > 1e-6)
  6342. if (Math.abs(s * u - f * c) > 1e-6 && i) {
  6343. var h = e - o,
  6344. d = r - a,
  6345. p = u * u + f * f,
  6346. v = h * h + d * d,
  6347. g = Math.sqrt(p),
  6348. y = Math.sqrt(l),
  6349. _ = i * Math.tan((zh - Math.acos((p + l - v) / (2 * g * y))) / 2),
  6350. b = _ / y,
  6351. m = _ / g;
  6352. Math.abs(b - 1) > 1e-6 && (this._ += "L" + (t + b * c) + "," + (n + b * s)), this._ += "A" + i + "," + i + ",0,0," + +(s * h > c * d) + "," + (this._x1 = t + m * u) + "," + (this._y1 = n + m * f)
  6353. } else this._ += "L" + (this._x1 = t) + "," + (this._y1 = n);
  6354. else;
  6355. },
  6356. arc: function(t, n, e, r, i, o) {
  6357. t = +t, n = +n;
  6358. var a = (e = +e) * Math.cos(r),
  6359. u = e * Math.sin(r),
  6360. f = t + a,
  6361. c = n + u,
  6362. s = 1 ^ o,
  6363. l = o ? r - i : i - r;
  6364. if (e < 0) throw new Error("negative radius: " + e);
  6365. null === this._x1 ? this._ += "M" + f + "," + c : (Math.abs(this._x1 - f) > 1e-6 || Math.abs(this._y1 - c) > 1e-6) && (this._ += "L" + f + "," + c), e && (l < 0 && (l = l % Rh + Rh), l > Lh ? this._ += "A" + e + "," + e + ",0,1," + s + "," + (t - a) + "," + (n - u) + "A" + e + "," + e + ",0,1," + s + "," + (this._x1 = f) + "," + (this._y1 = c) : l > 1e-6 && (this._ += "A" + e + "," + e + ",0," + +(l >= zh) + "," + s + "," + (this._x1 = t + e * Math.cos(i)) + "," + (this._y1 = n + e * Math.sin(i))))
  6366. },
  6367. rect: function(t, n, e, r) {
  6368. this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +e + "v" + +r + "h" + -e + "Z"
  6369. },
  6370. toString: function() {
  6371. return this._
  6372. }
  6373. };
  6374. le.prototype = he.prototype = {
  6375. constructor: le,
  6376. has: function(t) {
  6377. return "$" + t in this
  6378. },
  6379. get: function(t) {
  6380. return this["$" + t]
  6381. },
  6382. set: function(t, n) {
  6383. return this["$" + t] = n, this
  6384. },
  6385. remove: function(t) {
  6386. var n = "$" + t;
  6387. return n in this && delete this[n]
  6388. },
  6389. clear: function() {
  6390. for (var t in this) "$" === t[0] && delete this[t]
  6391. },
  6392. keys: function() {
  6393. var t = [];
  6394. for (var n in this) "$" === n[0] && t.push(n.slice(1));
  6395. return t
  6396. },
  6397. values: function() {
  6398. var t = [];
  6399. for (var n in this) "$" === n[0] && t.push(this[n]);
  6400. return t
  6401. },
  6402. entries: function() {
  6403. var t = [];
  6404. for (var n in this) "$" === n[0] && t.push({
  6405. key: n.slice(1),
  6406. value: this[n]
  6407. });
  6408. return t
  6409. },
  6410. size: function() {
  6411. var t = 0;
  6412. for (var n in this) "$" === n[0] && ++t;
  6413. return t
  6414. },
  6415. empty: function() {
  6416. for (var t in this)
  6417. if ("$" === t[0]) return !1;
  6418. return !0
  6419. },
  6420. each: function(t) {
  6421. for (var n in this) "$" === n[0] && t(this[n], n.slice(1), this)
  6422. }
  6423. };
  6424. var Dh = he.prototype;
  6425. ye.prototype = _e.prototype = {
  6426. constructor: ye,
  6427. has: Dh.has,
  6428. add: function(t) {
  6429. return t += "", this["$" + t] = t, this
  6430. },
  6431. remove: Dh.remove,
  6432. clear: Dh.clear,
  6433. values: Dh.keys,
  6434. size: Dh.size,
  6435. empty: Dh.empty,
  6436. each: Dh.each
  6437. };
  6438. var Uh = Array.prototype.slice,
  6439. qh = [
  6440. [],
  6441. [
  6442. [
  6443. [1, 1.5],
  6444. [.5, 1]
  6445. ]
  6446. ],
  6447. [
  6448. [
  6449. [1.5, 1],
  6450. [1, 1.5]
  6451. ]
  6452. ],
  6453. [
  6454. [
  6455. [1.5, 1],
  6456. [.5, 1]
  6457. ]
  6458. ],
  6459. [
  6460. [
  6461. [1, .5],
  6462. [1.5, 1]
  6463. ]
  6464. ],
  6465. [
  6466. [
  6467. [1, 1.5],
  6468. [.5, 1]
  6469. ],
  6470. [
  6471. [1, .5],
  6472. [1.5, 1]
  6473. ]
  6474. ],
  6475. [
  6476. [
  6477. [1, .5],
  6478. [1, 1.5]
  6479. ]
  6480. ],
  6481. [
  6482. [
  6483. [1, .5],
  6484. [.5, 1]
  6485. ]
  6486. ],
  6487. [
  6488. [
  6489. [.5, 1],
  6490. [1, .5]
  6491. ]
  6492. ],
  6493. [
  6494. [
  6495. [1, 1.5],
  6496. [1, .5]
  6497. ]
  6498. ],
  6499. [
  6500. [
  6501. [.5, 1],
  6502. [1, .5]
  6503. ],
  6504. [
  6505. [1.5, 1],
  6506. [1, 1.5]
  6507. ]
  6508. ],
  6509. [
  6510. [
  6511. [1.5, 1],
  6512. [1, .5]
  6513. ]
  6514. ],
  6515. [
  6516. [
  6517. [.5, 1],
  6518. [1.5, 1]
  6519. ]
  6520. ],
  6521. [
  6522. [
  6523. [1, 1.5],
  6524. [1.5, 1]
  6525. ]
  6526. ],
  6527. [
  6528. [
  6529. [.5, 1],
  6530. [1, 1.5]
  6531. ]
  6532. ],
  6533. []
  6534. ],
  6535. Oh = {},
  6536. Yh = {},
  6537. Bh = 34,
  6538. Fh = 10,
  6539. Ih = 13,
  6540. jh = ke(","),
  6541. Hh = jh.parse,
  6542. Xh = jh.parseRows,
  6543. Gh = jh.format,
  6544. Vh = jh.formatRows,
  6545. $h = ke("\t"),
  6546. Wh = $h.parse,
  6547. Zh = $h.parseRows,
  6548. Qh = $h.format,
  6549. Jh = $h.formatRows,
  6550. Kh = Le(Hh),
  6551. td = Le(Wh),
  6552. nd = Ue("application/xml"),
  6553. ed = Ue("text/html"),
  6554. rd = Ue("image/svg+xml"),
  6555. id = je.prototype = He.prototype;
  6556. id.copy = function() {
  6557. var t, n, e = new He(this._x, this._y, this._x0, this._y0, this._x1, this._y1),
  6558. r = this._root;
  6559. if (!r) return e;
  6560. if (!r.length) return e._root = Xe(r), e;
  6561. for (t = [{
  6562. source: r,
  6563. target: e._root = new Array(4)
  6564. }]; r = t.pop();)
  6565. for (var i = 0; i < 4; ++i)(n = r.source[i]) && (n.length ? t.push({
  6566. source: n,
  6567. target: r.target[i] = new Array(4)
  6568. }) : r.target[i] = Xe(n));
  6569. return e
  6570. }, id.add = function(t) {
  6571. var n = +this._x.call(null, t),
  6572. e = +this._y.call(null, t);
  6573. return Ye(this.cover(n, e), n, e, t)
  6574. }, id.addAll = function(t) {
  6575. var n, e, r, i, o = t.length,
  6576. a = new Array(o),
  6577. u = new Array(o),
  6578. f = 1 / 0,
  6579. c = 1 / 0,
  6580. s = -1 / 0,
  6581. l = -1 / 0;
  6582. for (e = 0; e < o; ++e) isNaN(r = +this._x.call(null, n = t[e])) || isNaN(i = +this._y.call(null, n)) || (a[e] = r, u[e] = i, r < f && (f = r), r > s && (s = r), i < c && (c = i), i > l && (l = i));
  6583. for (s < f && (f = this._x0, s = this._x1), l < c && (c = this._y0, l = this._y1), this.cover(f, c).cover(s, l), e = 0; e < o; ++e) Ye(this, a[e], u[e], t[e]);
  6584. return this
  6585. }, id.cover = function(t, n) {
  6586. if (isNaN(t = +t) || isNaN(n = +n)) return this;
  6587. var e = this._x0,
  6588. r = this._y0,
  6589. i = this._x1,
  6590. o = this._y1;
  6591. if (isNaN(e)) i = (e = Math.floor(t)) + 1, o = (r = Math.floor(n)) + 1;
  6592. else {
  6593. if (!(e > t || t > i || r > n || n > o)) return this;
  6594. var a, u, f = i - e,
  6595. c = this._root;
  6596. switch (u = (n < (r + o) / 2) << 1 | t < (e + i) / 2) {
  6597. case 0:
  6598. do {
  6599. a = new Array(4), a[u] = c, c = a
  6600. } while (f *= 2, i = e + f, o = r + f, t > i || n > o);
  6601. break;
  6602. case 1:
  6603. do {
  6604. a = new Array(4), a[u] = c, c = a
  6605. } while (f *= 2, e = i - f, o = r + f, e > t || n > o);
  6606. break;
  6607. case 2:
  6608. do {
  6609. a = new Array(4), a[u] = c, c = a
  6610. } while (f *= 2, i = e + f, r = o - f, t > i || r > n);
  6611. break;
  6612. case 3:
  6613. do {
  6614. a = new Array(4), a[u] = c, c = a
  6615. } while (f *= 2, e = i - f, r = o - f, e > t || r > n)
  6616. }
  6617. this._root && this._root.length && (this._root = c)
  6618. }
  6619. return this._x0 = e, this._y0 = r, this._x1 = i, this._y1 = o, this
  6620. }, id.data = function() {
  6621. var t = [];
  6622. return this.visit(function(n) {
  6623. if (!n.length)
  6624. do {
  6625. t.push(n.data)
  6626. } while (n = n.next)
  6627. }), t
  6628. }, id.extent = function(t) {
  6629. return arguments.length ? this.cover(+t[0][0], +t[0][1]).cover(+t[1][0], +t[1][1]) : isNaN(this._x0) ? void 0 : [
  6630. [this._x0, this._y0],
  6631. [this._x1, this._y1]
  6632. ]
  6633. }, id.find = function(t, n, e) {
  6634. var r, i, o, a, u, f, c, s = this._x0,
  6635. l = this._y0,
  6636. h = this._x1,
  6637. d = this._y1,
  6638. p = [],
  6639. v = this._root;
  6640. for (v && p.push(new Be(v, s, l, h, d)), null == e ? e = 1 / 0 : (s = t - e, l = n - e, h = t + e, d = n + e, e *= e); f = p.pop();)
  6641. if (!(!(v = f.node) || (i = f.x0) > h || (o = f.y0) > d || (a = f.x1) < s || (u = f.y1) < l))
  6642. if (v.length) {
  6643. var g = (i + a) / 2,
  6644. y = (o + u) / 2;
  6645. p.push(new Be(v[3], g, y, a, u), new Be(v[2], i, y, g, u), new Be(v[1], g, o, a, y), new Be(v[0], i, o, g, y)), (c = (n >= y) << 1 | t >= g) && (f = p[p.length - 1], p[p.length - 1] = p[p.length - 1 - c], p[p.length - 1 - c] = f)
  6646. } else {
  6647. var _ = t - +this._x.call(null, v.data),
  6648. b = n - +this._y.call(null, v.data),
  6649. m = _ * _ + b * b;
  6650. if (m < e) {
  6651. var x = Math.sqrt(e = m);
  6652. s = t - x, l = n - x, h = t + x, d = n + x, r = v.data
  6653. }
  6654. }
  6655. return r
  6656. }, id.remove = function(t) {
  6657. if (isNaN(o = +this._x.call(null, t)) || isNaN(a = +this._y.call(null, t))) return this;
  6658. var n, e, r, i, o, a, u, f, c, s, l, h, d = this._root,
  6659. p = this._x0,
  6660. v = this._y0,
  6661. g = this._x1,
  6662. y = this._y1;
  6663. if (!d) return this;
  6664. if (d.length)
  6665. for (;;) {
  6666. if ((c = o >= (u = (p + g) / 2)) ? p = u : g = u, (s = a >= (f = (v + y) / 2)) ? v = f : y = f, n = d, !(d = d[l = s << 1 | c])) return this;
  6667. if (!d.length) break;
  6668. (n[l + 1 & 3] || n[l + 2 & 3] || n[l + 3 & 3]) && (e = n, h = l)
  6669. }
  6670. for (; d.data !== t;)
  6671. if (r = d, !(d = d.next)) return this;
  6672. return (i = d.next) && delete d.next, r ? (i ? r.next = i : delete r.next, this) : n ? (i ? n[l] = i : delete n[l], (d = n[0] || n[1] || n[2] || n[3]) && d === (n[3] || n[2] || n[1] || n[0]) && !d.length && (e ? e[h] = d : this._root = d), this) : (this._root = i, this)
  6673. }, id.removeAll = function(t) {
  6674. for (var n = 0, e = t.length; n < e; ++n) this.remove(t[n]);
  6675. return this
  6676. }, id.root = function() {
  6677. return this._root
  6678. }, id.size = function() {
  6679. var t = 0;
  6680. return this.visit(function(n) {
  6681. if (!n.length)
  6682. do {
  6683. ++t
  6684. } while (n = n.next)
  6685. }), t
  6686. }, id.visit = function(t) {
  6687. var n, e, r, i, o, a, u = [],
  6688. f = this._root;
  6689. for (f && u.push(new Be(f, this._x0, this._y0, this._x1, this._y1)); n = u.pop();)
  6690. if (!t(f = n.node, r = n.x0, i = n.y0, o = n.x1, a = n.y1) && f.length) {
  6691. var c = (r + o) / 2,
  6692. s = (i + a) / 2;
  6693. (e = f[3]) && u.push(new Be(e, c, s, o, a)), (e = f[2]) && u.push(new Be(e, r, s, c, a)), (e = f[1]) && u.push(new Be(e, c, i, o, s)), (e = f[0]) && u.push(new Be(e, r, i, c, s))
  6694. }
  6695. return this
  6696. }, id.visitAfter = function(t) {
  6697. var n, e = [],
  6698. r = [];
  6699. for (this._root && e.push(new Be(this._root, this._x0, this._y0, this._x1, this._y1)); n = e.pop();) {
  6700. var i = n.node;
  6701. if (i.length) {
  6702. var o, a = n.x0,
  6703. u = n.y0,
  6704. f = n.x1,
  6705. c = n.y1,
  6706. s = (a + f) / 2,
  6707. l = (u + c) / 2;
  6708. (o = i[0]) && e.push(new Be(o, a, u, s, l)), (o = i[1]) && e.push(new Be(o, s, u, f, l)), (o = i[2]) && e.push(new Be(o, a, l, s, c)), (o = i[3]) && e.push(new Be(o, s, l, f, c))
  6709. }
  6710. r.push(n)
  6711. }
  6712. for (; n = r.pop();) t(n.node, n.x0, n.y0, n.x1, n.y1);
  6713. return this
  6714. }, id.x = function(t) {
  6715. return arguments.length ? (this._x = t, this) : this._x
  6716. }, id.y = function(t) {
  6717. return arguments.length ? (this._y = t, this) : this._y
  6718. };
  6719. var od = 10,
  6720. ad = Math.PI * (3 - Math.sqrt(5)),
  6721. ud = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
  6722. tr.prototype = nr.prototype, nr.prototype.toString = function() {
  6723. return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (null == this.width ? "" : Math.max(1, 0 | this.width)) + (this.comma ? "," : "") + (null == this.precision ? "" : "." + Math.max(0, 0 | this.precision)) + (this.trim ? "~" : "") + this.type
  6724. };
  6725. var fd, cd, sd = {
  6726. "%": function(t, n) {
  6727. return (100 * t).toFixed(n)
  6728. },
  6729. b: function(t) {
  6730. return Math.round(t).toString(2)
  6731. },
  6732. c: function(t) {
  6733. return t + ""
  6734. },
  6735. d: function(t) {
  6736. return Math.round(t).toString(10)
  6737. },
  6738. e: function(t, n) {
  6739. return t.toExponential(n)
  6740. },
  6741. f: function(t, n) {
  6742. return t.toFixed(n)
  6743. },
  6744. g: function(t, n) {
  6745. return t.toPrecision(n)
  6746. },
  6747. o: function(t) {
  6748. return Math.round(t).toString(8)
  6749. },
  6750. p: function(t, n) {
  6751. return er(100 * t, n)
  6752. },
  6753. r: er,
  6754. s: function(t, n) {
  6755. var e = Je(t, n);
  6756. if (!e) return t + "";
  6757. var r = e[0],
  6758. i = e[1],
  6759. o = i - (fd = 3 * Math.max(-8, Math.min(8, Math.floor(i / 3)))) + 1,
  6760. a = r.length;
  6761. return o === a ? r : o > a ? r + new Array(o - a + 1).join("0") : o > 0 ? r.slice(0, o) + "." + r.slice(o) : "0." + new Array(1 - o).join("0") + Je(t, Math.max(0, n + o - 1))[0]
  6762. },
  6763. X: function(t) {
  6764. return Math.round(t).toString(16).toUpperCase()
  6765. },
  6766. x: function(t) {
  6767. return Math.round(t).toString(16)
  6768. }
  6769. },
  6770. ld = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
  6771. or({
  6772. decimal: ".",
  6773. thousands: ",",
  6774. grouping: [3],
  6775. currency: ["$", ""]
  6776. }), sr.prototype = {
  6777. constructor: sr,
  6778. reset: function() {
  6779. this.s = this.t = 0
  6780. },
  6781. add: function(t) {
  6782. lr(jd, t, this.t), lr(this, jd.s, this.s), this.s ? this.t += jd.t : this.s = jd.t
  6783. },
  6784. valueOf: function() {
  6785. return this.s
  6786. }
  6787. };
  6788. var hd, dd, pd, vd, gd, yd, _d, bd, md, xd, wd, Md, Ad, Td, Nd, Sd, Ed, kd, Cd, Pd, zd, Rd, Ld, Dd, Ud, qd, Od, Yd, Bd, Fd, Id, jd = new sr,
  6789. Hd = 1e-6,
  6790. Xd = 1e-12,
  6791. Gd = Math.PI,
  6792. Vd = Gd / 2,
  6793. $d = Gd / 4,
  6794. Wd = 2 * Gd,
  6795. Zd = 180 / Gd,
  6796. Qd = Gd / 180,
  6797. Jd = Math.abs,
  6798. Kd = Math.atan,
  6799. tp = Math.atan2,
  6800. np = Math.cos,
  6801. ep = Math.ceil,
  6802. rp = Math.exp,
  6803. ip = Math.log,
  6804. op = Math.pow,
  6805. ap = Math.sin,
  6806. up = Math.sign || function(t) {
  6807. return t > 0 ? 1 : t < 0 ? -1 : 0
  6808. },
  6809. fp = Math.sqrt,
  6810. cp = Math.tan,
  6811. sp = {
  6812. Feature: function(t, n) {
  6813. gr(t.geometry, n)
  6814. },
  6815. FeatureCollection: function(t, n) {
  6816. for (var e = t.features, r = -1, i = e.length; ++r < i;) gr(e[r].geometry, n)
  6817. }
  6818. },
  6819. lp = {
  6820. Sphere: function(t, n) {
  6821. n.sphere()
  6822. },
  6823. Point: function(t, n) {
  6824. t = t.coordinates, n.point(t[0], t[1], t[2])
  6825. },
  6826. MultiPoint: function(t, n) {
  6827. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;) t = e[r], n.point(t[0], t[1], t[2])
  6828. },
  6829. LineString: function(t, n) {
  6830. yr(t.coordinates, n, 0)
  6831. },
  6832. MultiLineString: function(t, n) {
  6833. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;) yr(e[r], n, 0)
  6834. },
  6835. Polygon: function(t, n) {
  6836. _r(t.coordinates, n)
  6837. },
  6838. MultiPolygon: function(t, n) {
  6839. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;) _r(e[r], n)
  6840. },
  6841. GeometryCollection: function(t, n) {
  6842. for (var e = t.geometries, r = -1, i = e.length; ++r < i;) gr(e[r], n)
  6843. }
  6844. },
  6845. hp = cr(),
  6846. dp = cr(),
  6847. pp = {
  6848. point: vr,
  6849. lineStart: vr,
  6850. lineEnd: vr,
  6851. polygonStart: function() {
  6852. hp.reset(), pp.lineStart = mr, pp.lineEnd = xr
  6853. },
  6854. polygonEnd: function() {
  6855. var t = +hp;
  6856. dp.add(t < 0 ? Wd + t : t), this.lineStart = this.lineEnd = this.point = vr
  6857. },
  6858. sphere: function() {
  6859. dp.add(Wd)
  6860. }
  6861. },
  6862. vp = cr(),
  6863. gp = {
  6864. point: Pr,
  6865. lineStart: Rr,
  6866. lineEnd: Lr,
  6867. polygonStart: function() {
  6868. gp.point = Dr, gp.lineStart = Ur, gp.lineEnd = qr, vp.reset(), pp.polygonStart()
  6869. },
  6870. polygonEnd: function() {
  6871. pp.polygonEnd(), gp.point = Pr, gp.lineStart = Rr, gp.lineEnd = Lr, hp < 0 ? (yd = -(bd = 180), _d = -(md = 90)) : vp > Hd ? md = 90 : vp < -Hd && (_d = -90), Nd[0] = yd, Nd[1] = bd
  6872. }
  6873. },
  6874. yp = {
  6875. sphere: vr,
  6876. point: Fr,
  6877. lineStart: jr,
  6878. lineEnd: Gr,
  6879. polygonStart: function() {
  6880. yp.lineStart = Vr, yp.lineEnd = $r
  6881. },
  6882. polygonEnd: function() {
  6883. yp.lineStart = jr, yp.lineEnd = Gr
  6884. }
  6885. };
  6886. Kr.invert = Kr;
  6887. var _p, bp, mp, xp, wp, Mp, Ap, Tp, Np, Sp, Ep, kp = cr(),
  6888. Cp = di(function() {
  6889. return !0
  6890. }, function(t) {
  6891. var n, e = NaN,
  6892. r = NaN,
  6893. i = NaN;
  6894. return {
  6895. lineStart: function() {
  6896. t.lineStart(), n = 1
  6897. },
  6898. point: function(o, a) {
  6899. var u = o > 0 ? Gd : -Gd,
  6900. f = Jd(o - e);
  6901. Jd(f - Gd) < Hd ? (t.point(e, r = (r + a) / 2 > 0 ? Vd : -Vd), t.point(i, r), t.lineEnd(), t.lineStart(), t.point(u, r), t.point(o, r), n = 0) : i !== u && f >= Gd && (Jd(e - i) < Hd && (e -= i * Hd), Jd(o - u) < Hd && (o -= u * Hd), r = function(t, n, e, r) {
  6902. var i, o, a = ap(t - e);
  6903. return Jd(a) > Hd ? Kd((ap(n) * (o = np(r)) * ap(e) - ap(r) * (i = np(n)) * ap(t)) / (i * o * a)) : (n + r) / 2
  6904. }(e, r, o, a), t.point(i, r), t.lineEnd(), t.lineStart(), t.point(u, r), n = 0), t.point(e = o, r = a), i = u
  6905. },
  6906. lineEnd: function() {
  6907. t.lineEnd(), e = r = NaN
  6908. },
  6909. clean: function() {
  6910. return 2 - n
  6911. }
  6912. }
  6913. }, function(t, n, e, r) {
  6914. var i;
  6915. if (null == t) i = e * Vd, r.point(-Gd, i), r.point(0, i), r.point(Gd, i), r.point(Gd, 0), r.point(Gd, -i), r.point(0, -i), r.point(-Gd, -i), r.point(-Gd, 0), r.point(-Gd, i);
  6916. else if (Jd(t[0] - n[0]) > Hd) {
  6917. var o = t[0] < n[0] ? Gd : -Gd;
  6918. i = e * o / 2, r.point(-o, i), r.point(0, i), r.point(o, i)
  6919. } else r.point(n[0], n[1])
  6920. }, [-Gd, -Vd]),
  6921. Pp = 1e9,
  6922. zp = -Pp,
  6923. Rp = cr(),
  6924. Lp = {
  6925. sphere: vr,
  6926. point: vr,
  6927. lineStart: function() {
  6928. Lp.point = bi, Lp.lineEnd = _i
  6929. },
  6930. lineEnd: vr,
  6931. polygonStart: vr,
  6932. polygonEnd: vr
  6933. },
  6934. Dp = [null, null],
  6935. Up = {
  6936. type: "LineString",
  6937. coordinates: Dp
  6938. },
  6939. qp = {
  6940. Feature: function(t, n) {
  6941. return Mi(t.geometry, n)
  6942. },
  6943. FeatureCollection: function(t, n) {
  6944. for (var e = t.features, r = -1, i = e.length; ++r < i;)
  6945. if (Mi(e[r].geometry, n)) return !0;
  6946. return !1
  6947. }
  6948. },
  6949. Op = {
  6950. Sphere: function() {
  6951. return !0
  6952. },
  6953. Point: function(t, n) {
  6954. return Ai(t.coordinates, n)
  6955. },
  6956. MultiPoint: function(t, n) {
  6957. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;)
  6958. if (Ai(e[r], n)) return !0;
  6959. return !1
  6960. },
  6961. LineString: function(t, n) {
  6962. return Ti(t.coordinates, n)
  6963. },
  6964. MultiLineString: function(t, n) {
  6965. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;)
  6966. if (Ti(e[r], n)) return !0;
  6967. return !1
  6968. },
  6969. Polygon: function(t, n) {
  6970. return Ni(t.coordinates, n)
  6971. },
  6972. MultiPolygon: function(t, n) {
  6973. for (var e = t.coordinates, r = -1, i = e.length; ++r < i;)
  6974. if (Ni(e[r], n)) return !0;
  6975. return !1
  6976. },
  6977. GeometryCollection: function(t, n) {
  6978. for (var e = t.geometries, r = -1, i = e.length; ++r < i;)
  6979. if (Mi(e[r], n)) return !0;
  6980. return !1
  6981. }
  6982. },
  6983. Yp = cr(),
  6984. Bp = cr(),
  6985. Fp = {
  6986. point: vr,
  6987. lineStart: vr,
  6988. lineEnd: vr,
  6989. polygonStart: function() {
  6990. Fp.lineStart = Ri, Fp.lineEnd = Ui
  6991. },
  6992. polygonEnd: function() {
  6993. Fp.lineStart = Fp.lineEnd = Fp.point = vr, Yp.add(Jd(Bp)), Bp.reset()
  6994. },
  6995. result: function() {
  6996. var t = Yp / 2;
  6997. return Yp.reset(), t
  6998. }
  6999. },
  7000. Ip = 1 / 0,
  7001. jp = Ip,
  7002. Hp = -Ip,
  7003. Xp = Hp,
  7004. Gp = {
  7005. point: function(t, n) {
  7006. t < Ip && (Ip = t), t > Hp && (Hp = t), n < jp && (jp = n), n > Xp && (Xp = n)
  7007. },
  7008. lineStart: vr,
  7009. lineEnd: vr,
  7010. polygonStart: vr,
  7011. polygonEnd: vr,
  7012. result: function() {
  7013. var t = [
  7014. [Ip, jp],
  7015. [Hp, Xp]
  7016. ];
  7017. return Hp = Xp = -(jp = Ip = 1 / 0), t
  7018. }
  7019. },
  7020. Vp = 0,
  7021. $p = 0,
  7022. Wp = 0,
  7023. Zp = 0,
  7024. Qp = 0,
  7025. Jp = 0,
  7026. Kp = 0,
  7027. tv = 0,
  7028. nv = 0,
  7029. ev = {
  7030. point: qi,
  7031. lineStart: Oi,
  7032. lineEnd: Fi,
  7033. polygonStart: function() {
  7034. ev.lineStart = Ii, ev.lineEnd = ji
  7035. },
  7036. polygonEnd: function() {
  7037. ev.point = qi, ev.lineStart = Oi, ev.lineEnd = Fi
  7038. },
  7039. result: function() {
  7040. var t = nv ? [Kp / nv, tv / nv] : Jp ? [Zp / Jp, Qp / Jp] : Wp ? [Vp / Wp, $p / Wp] : [NaN, NaN];
  7041. return Vp = $p = Wp = Zp = Qp = Jp = Kp = tv = nv = 0, t
  7042. }
  7043. };
  7044. Gi.prototype = {
  7045. _radius: 4.5,
  7046. pointRadius: function(t) {
  7047. return this._radius = t, this
  7048. },
  7049. polygonStart: function() {
  7050. this._line = 0
  7051. },
  7052. polygonEnd: function() {
  7053. this._line = NaN
  7054. },
  7055. lineStart: function() {
  7056. this._point = 0
  7057. },
  7058. lineEnd: function() {
  7059. 0 === this._line && this._context.closePath(), this._point = NaN
  7060. },
  7061. point: function(t, n) {
  7062. switch (this._point) {
  7063. case 0:
  7064. this._context.moveTo(t, n), this._point = 1;
  7065. break;
  7066. case 1:
  7067. this._context.lineTo(t, n);
  7068. break;
  7069. default:
  7070. this._context.moveTo(t + this._radius, n), this._context.arc(t, n, this._radius, 0, Wd)
  7071. }
  7072. },
  7073. result: vr
  7074. };
  7075. var rv, iv, ov, av, uv, fv = cr(),
  7076. cv = {
  7077. point: vr,
  7078. lineStart: function() {
  7079. cv.point = Vi
  7080. },
  7081. lineEnd: function() {
  7082. rv && $i(iv, ov), cv.point = vr
  7083. },
  7084. polygonStart: function() {
  7085. rv = !0
  7086. },
  7087. polygonEnd: function() {
  7088. rv = null
  7089. },
  7090. result: function() {
  7091. var t = +fv;
  7092. return fv.reset(), t
  7093. }
  7094. };
  7095. Wi.prototype = {
  7096. _radius: 4.5,
  7097. _circle: Zi(4.5),
  7098. pointRadius: function(t) {
  7099. return (t = +t) !== this._radius && (this._radius = t, this._circle = null), this
  7100. },
  7101. polygonStart: function() {
  7102. this._line = 0
  7103. },
  7104. polygonEnd: function() {
  7105. this._line = NaN
  7106. },
  7107. lineStart: function() {
  7108. this._point = 0
  7109. },
  7110. lineEnd: function() {
  7111. 0 === this._line && this._string.push("Z"), this._point = NaN
  7112. },
  7113. point: function(t, n) {
  7114. switch (this._point) {
  7115. case 0:
  7116. this._string.push("M", t, ",", n), this._point = 1;
  7117. break;
  7118. case 1:
  7119. this._string.push("L", t, ",", n);
  7120. break;
  7121. default:
  7122. null == this._circle && (this._circle = Zi(this._radius)), this._string.push("M", t, ",", n, this._circle)
  7123. }
  7124. },
  7125. result: function() {
  7126. if (this._string.length) {
  7127. var t = this._string.join("");
  7128. return this._string = [], t
  7129. }
  7130. return null
  7131. }
  7132. }, Ji.prototype = {
  7133. constructor: Ji,
  7134. point: function(t, n) {
  7135. this.stream.point(t, n)
  7136. },
  7137. sphere: function() {
  7138. this.stream.sphere()
  7139. },
  7140. lineStart: function() {
  7141. this.stream.lineStart()
  7142. },
  7143. lineEnd: function() {
  7144. this.stream.lineEnd()
  7145. },
  7146. polygonStart: function() {
  7147. this.stream.polygonStart()
  7148. },
  7149. polygonEnd: function() {
  7150. this.stream.polygonEnd()
  7151. }
  7152. };
  7153. var sv = 16,
  7154. lv = np(30 * Qd),
  7155. hv = Qi({
  7156. point: function(t, n) {
  7157. this.stream.point(t * Qd, n * Qd)
  7158. }
  7159. }),
  7160. dv = ho(function(t) {
  7161. return fp(2 / (1 + t))
  7162. });
  7163. dv.invert = po(function(t) {
  7164. return 2 * dr(t / 2)
  7165. });
  7166. var pv = ho(function(t) {
  7167. return (t = hr(t)) && t / ap(t)
  7168. });
  7169. pv.invert = po(function(t) {
  7170. return t
  7171. }), vo.invert = function(t, n) {
  7172. return [t, 2 * Kd(rp(n)) - Vd]
  7173. }, bo.invert = bo, xo.invert = po(Kd), Mo.invert = function(t, n) {
  7174. var e, r = n,
  7175. i = 25;
  7176. do {
  7177. var o = r * r,
  7178. a = o * o;
  7179. r -= e = (r * (1.007226 + o * (.015085 + a * (.028874 * o - .044475 - .005916 * a))) - n) / (1.007226 + o * (.045255 + a * (.259866 * o - .311325 - .005916 * 11 * a)))
  7180. } while (Jd(e) > Hd && --i > 0);
  7181. return [t / (.8707 + (o = r * r) * (o * (o * o * o * (.003971 - .001529 * o) - .013791) - .131979)), r]
  7182. }, Ao.invert = po(dr), To.invert = po(function(t) {
  7183. return 2 * Kd(t)
  7184. }), No.invert = function(t, n) {
  7185. return [-n, 2 * Kd(rp(t)) - Vd]
  7186. }, Do.prototype = Po.prototype = {
  7187. constructor: Do,
  7188. count: function() {
  7189. return this.eachAfter(Co)
  7190. },
  7191. each: function(t) {
  7192. var n, e, r, i, o = this,
  7193. a = [o];
  7194. do {
  7195. for (n = a.reverse(), a = []; o = n.pop();)
  7196. if (t(o), e = o.children)
  7197. for (r = 0, i = e.length; r < i; ++r) a.push(e[r])
  7198. } while (a.length);
  7199. return this
  7200. },
  7201. eachAfter: function(t) {
  7202. for (var n, e, r, i = this, o = [i], a = []; i = o.pop();)
  7203. if (a.push(i), n = i.children)
  7204. for (e = 0, r = n.length; e < r; ++e) o.push(n[e]);
  7205. for (; i = a.pop();) t(i);
  7206. return this
  7207. },
  7208. eachBefore: function(t) {
  7209. for (var n, e, r = this, i = [r]; r = i.pop();)
  7210. if (t(r), n = r.children)
  7211. for (e = n.length - 1; e >= 0; --e) i.push(n[e]);
  7212. return this
  7213. },
  7214. sum: function(t) {
  7215. return this.eachAfter(function(n) {
  7216. for (var e = +t(n.data) || 0, r = n.children, i = r && r.length; --i >= 0;) e += r[i].value;
  7217. n.value = e
  7218. })
  7219. },
  7220. sort: function(t) {
  7221. return this.eachBefore(function(n) {
  7222. n.children && n.children.sort(t)
  7223. })
  7224. },
  7225. path: function(t) {
  7226. for (var n = this, e = function(t, n) {
  7227. if (t === n) return t;
  7228. var e = t.ancestors(),
  7229. r = n.ancestors(),
  7230. i = null;
  7231. for (t = e.pop(), n = r.pop(); t === n;) i = t, t = e.pop(), n = r.pop();
  7232. return i
  7233. }(n, t), r = [n]; n !== e;) n = n.parent, r.push(n);
  7234. for (var i = r.length; t !== e;) r.splice(i, 0, t), t = t.parent;
  7235. return r
  7236. },
  7237. ancestors: function() {
  7238. for (var t = this, n = [t]; t = t.parent;) n.push(t);
  7239. return n
  7240. },
  7241. descendants: function() {
  7242. var t = [];
  7243. return this.each(function(n) {
  7244. t.push(n)
  7245. }), t
  7246. },
  7247. leaves: function() {
  7248. var t = [];
  7249. return this.eachBefore(function(n) {
  7250. n.children || t.push(n)
  7251. }), t
  7252. },
  7253. links: function() {
  7254. var t = this,
  7255. n = [];
  7256. return t.each(function(e) {
  7257. e !== t && n.push({
  7258. source: e.parent,
  7259. target: e
  7260. })
  7261. }), n
  7262. },
  7263. copy: function() {
  7264. return Po(this).eachBefore(Ro)
  7265. }
  7266. };
  7267. var vv = Array.prototype.slice,
  7268. gv = "$",
  7269. yv = {
  7270. depth: -1
  7271. },
  7272. _v = {};
  7273. ca.prototype = Object.create(Do.prototype);
  7274. var bv = (1 + Math.sqrt(5)) / 2,
  7275. mv = function t(n) {
  7276. function e(t, e, r, i, o) {
  7277. la(n, t, e, r, i, o)
  7278. }
  7279. return e.ratio = function(n) {
  7280. return t((n = +n) > 1 ? n : 1)
  7281. }, e
  7282. }(bv),
  7283. xv = function t(n) {
  7284. function e(t, e, r, i, o) {
  7285. if ((a = t._squarify) && a.ratio === n)
  7286. for (var a, u, f, c, s, l = -1, h = a.length, d = t.value; ++l < h;) {
  7287. for (f = (u = a[l]).children, c = u.value = 0, s = f.length; c < s; ++c) u.value += f[c].value;
  7288. u.dice ? na(u, e, r, i, r += (o - r) * u.value / d) : sa(u, e, r, e += (i - e) * u.value / d, o), d -= u.value
  7289. } else t._squarify = a = la(n, t, e, r, i, o), a.ratio = n
  7290. }
  7291. return e.ratio = function(n) {
  7292. return t((n = +n) > 1 ? n : 1)
  7293. }, e
  7294. }(bv),
  7295. wv = function t(n) {
  7296. function e(t, e) {
  7297. return t = null == t ? 0 : +t, e = null == e ? 1 : +e, 1 === arguments.length ? (e = t, t = 0) : e -= t,
  7298. function() {
  7299. return n() * e + t
  7300. }
  7301. }
  7302. return e.source = t, e
  7303. }(va),
  7304. Mv = function t(n) {
  7305. function e(t, e) {
  7306. var r, i;
  7307. return t = null == t ? 0 : +t, e = null == e ? 1 : +e,
  7308. function() {
  7309. var o;
  7310. if (null != r) o = r, r = null;
  7311. else
  7312. do {
  7313. r = 2 * n() - 1, o = 2 * n() - 1, i = r * r + o * o
  7314. } while (!i || i > 1);
  7315. return t + e * o * Math.sqrt(-2 * Math.log(i) / i)
  7316. }
  7317. }
  7318. return e.source = t, e
  7319. }(va),
  7320. Av = function t(n) {
  7321. function e() {
  7322. var t = Mv.source(n).apply(this, arguments);
  7323. return function() {
  7324. return Math.exp(t())
  7325. }
  7326. }
  7327. return e.source = t, e
  7328. }(va),
  7329. Tv = function t(n) {
  7330. function e(t) {
  7331. return function() {
  7332. for (var e = 0, r = 0; r < t; ++r) e += n();
  7333. return e
  7334. }
  7335. }
  7336. return e.source = t, e
  7337. }(va),
  7338. Nv = function t(n) {
  7339. function e(t) {
  7340. var e = Tv.source(n)(t);
  7341. return function() {
  7342. return e() / t
  7343. }
  7344. }
  7345. return e.source = t, e
  7346. }(va),
  7347. Sv = function t(n) {
  7348. function e(t) {
  7349. return function() {
  7350. return -Math.log(1 - n()) / t
  7351. }
  7352. }
  7353. return e.source = t, e
  7354. }(va),
  7355. Ev = Array.prototype,
  7356. kv = Ev.map,
  7357. Cv = Ev.slice,
  7358. Pv = {
  7359. name: "implicit"
  7360. },
  7361. zv = [0, 1],
  7362. Rv = new Date,
  7363. Lv = new Date,
  7364. Dv = Ia(function() {}, function(t, n) {
  7365. t.setTime(+t + n)
  7366. }, function(t, n) {
  7367. return n - t
  7368. });
  7369. Dv.every = function(t) {
  7370. return t = Math.floor(t), isFinite(t) && t > 0 ? t > 1 ? Ia(function(n) {
  7371. n.setTime(Math.floor(n / t) * t)
  7372. }, function(n, e) {
  7373. n.setTime(+n + e * t)
  7374. }, function(n, e) {
  7375. return (e - n) / t
  7376. }) : Dv : null
  7377. };
  7378. var Uv = Dv.range,
  7379. qv = 6e4,
  7380. Ov = 6048e5,
  7381. Yv = Ia(function(t) {
  7382. t.setTime(1e3 * Math.floor(t / 1e3))
  7383. }, function(t, n) {
  7384. t.setTime(+t + 1e3 * n)
  7385. }, function(t, n) {
  7386. return (n - t) / 1e3
  7387. }, function(t) {
  7388. return t.getUTCSeconds()
  7389. }),
  7390. Bv = Yv.range,
  7391. Fv = Ia(function(t) {
  7392. t.setTime(Math.floor(t / qv) * qv)
  7393. }, function(t, n) {
  7394. t.setTime(+t + n * qv)
  7395. }, function(t, n) {
  7396. return (n - t) / qv
  7397. }, function(t) {
  7398. return t.getMinutes()
  7399. }),
  7400. Iv = Fv.range,
  7401. jv = Ia(function(t) {
  7402. var n = t.getTimezoneOffset() * qv % 36e5;
  7403. n < 0 && (n += 36e5), t.setTime(36e5 * Math.floor((+t - n) / 36e5) + n)
  7404. }, function(t, n) {
  7405. t.setTime(+t + 36e5 * n)
  7406. }, function(t, n) {
  7407. return (n - t) / 36e5
  7408. }, function(t) {
  7409. return t.getHours()
  7410. }),
  7411. Hv = jv.range,
  7412. Xv = Ia(function(t) {
  7413. t.setHours(0, 0, 0, 0)
  7414. }, function(t, n) {
  7415. t.setDate(t.getDate() + n)
  7416. }, function(t, n) {
  7417. return (n - t - (n.getTimezoneOffset() - t.getTimezoneOffset()) * qv) / 864e5
  7418. }, function(t) {
  7419. return t.getDate() - 1
  7420. }),
  7421. Gv = Xv.range,
  7422. Vv = ja(0),
  7423. $v = ja(1),
  7424. Wv = ja(2),
  7425. Zv = ja(3),
  7426. Qv = ja(4),
  7427. Jv = ja(5),
  7428. Kv = ja(6),
  7429. tg = Vv.range,
  7430. ng = $v.range,
  7431. eg = Wv.range,
  7432. rg = Zv.range,
  7433. ig = Qv.range,
  7434. og = Jv.range,
  7435. ag = Kv.range,
  7436. ug = Ia(function(t) {
  7437. t.setDate(1), t.setHours(0, 0, 0, 0)
  7438. }, function(t, n) {
  7439. t.setMonth(t.getMonth() + n)
  7440. }, function(t, n) {
  7441. return n.getMonth() - t.getMonth() + 12 * (n.getFullYear() - t.getFullYear())
  7442. }, function(t) {
  7443. return t.getMonth()
  7444. }),
  7445. fg = ug.range,
  7446. cg = Ia(function(t) {
  7447. t.setMonth(0, 1), t.setHours(0, 0, 0, 0)
  7448. }, function(t, n) {
  7449. t.setFullYear(t.getFullYear() + n)
  7450. }, function(t, n) {
  7451. return n.getFullYear() - t.getFullYear()
  7452. }, function(t) {
  7453. return t.getFullYear()
  7454. });
  7455. cg.every = function(t) {
  7456. return isFinite(t = Math.floor(t)) && t > 0 ? Ia(function(n) {
  7457. n.setFullYear(Math.floor(n.getFullYear() / t) * t), n.setMonth(0, 1), n.setHours(0, 0, 0, 0)
  7458. }, function(n, e) {
  7459. n.setFullYear(n.getFullYear() + e * t)
  7460. }) : null
  7461. };
  7462. var sg = cg.range,
  7463. lg = Ia(function(t) {
  7464. t.setUTCSeconds(0, 0)
  7465. }, function(t, n) {
  7466. t.setTime(+t + n * qv)
  7467. }, function(t, n) {
  7468. return (n - t) / qv
  7469. }, function(t) {
  7470. return t.getUTCMinutes()
  7471. }),
  7472. hg = lg.range,
  7473. dg = Ia(function(t) {
  7474. t.setUTCMinutes(0, 0, 0)
  7475. }, function(t, n) {
  7476. t.setTime(+t + 36e5 * n)
  7477. }, function(t, n) {
  7478. return (n - t) / 36e5
  7479. }, function(t) {
  7480. return t.getUTCHours()
  7481. }),
  7482. pg = dg.range,
  7483. vg = Ia(function(t) {
  7484. t.setUTCHours(0, 0, 0, 0)
  7485. }, function(t, n) {
  7486. t.setUTCDate(t.getUTCDate() + n)
  7487. }, function(t, n) {
  7488. return (n - t) / 864e5
  7489. }, function(t) {
  7490. return t.getUTCDate() - 1
  7491. }),
  7492. gg = vg.range,
  7493. yg = Ha(0),
  7494. _g = Ha(1),
  7495. bg = Ha(2),
  7496. mg = Ha(3),
  7497. xg = Ha(4),
  7498. wg = Ha(5),
  7499. Mg = Ha(6),
  7500. Ag = yg.range,
  7501. Tg = _g.range,
  7502. Ng = bg.range,
  7503. Sg = mg.range,
  7504. Eg = xg.range,
  7505. kg = wg.range,
  7506. Cg = Mg.range,
  7507. Pg = Ia(function(t) {
  7508. t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0)
  7509. }, function(t, n) {
  7510. t.setUTCMonth(t.getUTCMonth() + n)
  7511. }, function(t, n) {
  7512. return n.getUTCMonth() - t.getUTCMonth() + 12 * (n.getUTCFullYear() - t.getUTCFullYear())
  7513. }, function(t) {
  7514. return t.getUTCMonth()
  7515. }),
  7516. zg = Pg.range,
  7517. Rg = Ia(function(t) {
  7518. t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0)
  7519. }, function(t, n) {
  7520. t.setUTCFullYear(t.getUTCFullYear() + n)
  7521. }, function(t, n) {
  7522. return n.getUTCFullYear() - t.getUTCFullYear()
  7523. }, function(t) {
  7524. return t.getUTCFullYear()
  7525. });
  7526. Rg.every = function(t) {
  7527. return isFinite(t = Math.floor(t)) && t > 0 ? Ia(function(n) {
  7528. n.setUTCFullYear(Math.floor(n.getUTCFullYear() / t) * t), n.setUTCMonth(0, 1), n.setUTCHours(0, 0, 0, 0)
  7529. }, function(n, e) {
  7530. n.setUTCFullYear(n.getUTCFullYear() + e * t)
  7531. }) : null
  7532. };
  7533. var Lg, Dg = Rg.range,
  7534. Ug = {
  7535. "-": "",
  7536. _: " ",
  7537. 0: "0"
  7538. },
  7539. qg = /^\s*\d+/,
  7540. Og = /^%/,
  7541. Yg = /[\\^$*+?|[\]().{}]/g;
  7542. nf({
  7543. dateTime: "%x, %X",
  7544. date: "%-m/%-d/%Y",
  7545. time: "%-I:%M:%S %p",
  7546. periods: ["AM", "PM"],
  7547. days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  7548. shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  7549. months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  7550. shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
  7551. });
  7552. var Bg = "%Y-%m-%dT%H:%M:%S.%LZ",
  7553. Fg = Date.prototype.toISOString ? function(t) {
  7554. return t.toISOString()
  7555. } : t.utcFormat(Bg),
  7556. Ig = +new Date("2000-01-01T00:00:00.000Z") ? function(t) {
  7557. var n = new Date(t);
  7558. return isNaN(n) ? null : n
  7559. } : t.utcParse(Bg),
  7560. jg = 1e3,
  7561. Hg = 60 * jg,
  7562. Xg = 60 * Hg,
  7563. Gg = 24 * Xg,
  7564. Vg = 7 * Gg,
  7565. $g = 30 * Gg,
  7566. Wg = 365 * Gg,
  7567. Zg = ff("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),
  7568. Qg = ff("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),
  7569. Jg = ff("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),
  7570. Kg = ff("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),
  7571. ty = ff("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),
  7572. ny = ff("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),
  7573. ey = ff("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),
  7574. ry = ff("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),
  7575. iy = ff("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),
  7576. oy = new Array(3).concat("d8b365f5f5f55ab4ac", "a6611adfc27d80cdc1018571", "a6611adfc27df5f5f580cdc1018571", "8c510ad8b365f6e8c3c7eae55ab4ac01665e", "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ff),
  7577. ay = cf(oy),
  7578. uy = new Array(3).concat("af8dc3f7f7f77fbf7b", "7b3294c2a5cfa6dba0008837", "7b3294c2a5cff7f7f7a6dba0008837", "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ff),
  7579. fy = cf(uy),
  7580. cy = new Array(3).concat("e9a3c9f7f7f7a1d76a", "d01c8bf1b6dab8e1864dac26", "d01c8bf1b6daf7f7f7b8e1864dac26", "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ff),
  7581. sy = cf(cy),
  7582. ly = new Array(3).concat("998ec3f7f7f7f1a340", "5e3c99b2abd2fdb863e66101", "5e3c99b2abd2f7f7f7fdb863e66101", "542788998ec3d8daebfee0b6f1a340b35806", "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ff),
  7583. hy = cf(ly),
  7584. dy = new Array(3).concat("ef8a62f7f7f767a9cf", "ca0020f4a58292c5de0571b0", "ca0020f4a582f7f7f792c5de0571b0", "b2182bef8a62fddbc7d1e5f067a9cf2166ac", "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ff),
  7585. py = cf(dy),
  7586. vy = new Array(3).concat("ef8a62ffffff999999", "ca0020f4a582bababa404040", "ca0020f4a582ffffffbababa404040", "b2182bef8a62fddbc7e0e0e09999994d4d4d", "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ff),
  7587. gy = cf(vy),
  7588. yy = new Array(3).concat("fc8d59ffffbf91bfdb", "d7191cfdae61abd9e92c7bb6", "d7191cfdae61ffffbfabd9e92c7bb6", "d73027fc8d59fee090e0f3f891bfdb4575b4", "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ff),
  7589. _y = cf(yy),
  7590. by = new Array(3).concat("fc8d59ffffbf91cf60", "d7191cfdae61a6d96a1a9641", "d7191cfdae61ffffbfa6d96a1a9641", "d73027fc8d59fee08bd9ef8b91cf601a9850", "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ff),
  7591. my = cf(by),
  7592. xy = new Array(3).concat("fc8d59ffffbf99d594", "d7191cfdae61abdda42b83ba", "d7191cfdae61ffffbfabdda42b83ba", "d53e4ffc8d59fee08be6f59899d5943288bd", "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ff),
  7593. wy = cf(xy),
  7594. My = new Array(3).concat("e5f5f999d8c92ca25f", "edf8fbb2e2e266c2a4238b45", "edf8fbb2e2e266c2a42ca25f006d2c", "edf8fbccece699d8c966c2a42ca25f006d2c", "edf8fbccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ff),
  7595. Ay = cf(My),
  7596. Ty = new Array(3).concat("e0ecf49ebcda8856a7", "edf8fbb3cde38c96c688419d", "edf8fbb3cde38c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ff),
  7597. Ny = cf(Ty),
  7598. Sy = new Array(3).concat("e0f3dba8ddb543a2ca", "f0f9e8bae4bc7bccc42b8cbe", "f0f9e8bae4bc7bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ff),
  7599. Ey = cf(Sy),
  7600. ky = new Array(3).concat("fee8c8fdbb84e34a33", "fef0d9fdcc8afc8d59d7301f", "fef0d9fdcc8afc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ff),
  7601. Cy = cf(ky),
  7602. Py = new Array(3).concat("ece2f0a6bddb1c9099", "f6eff7bdc9e167a9cf02818a", "f6eff7bdc9e167a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ff),
  7603. zy = cf(Py),
  7604. Ry = new Array(3).concat("ece7f2a6bddb2b8cbe", "f1eef6bdc9e174a9cf0570b0", "f1eef6bdc9e174a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ff),
  7605. Ly = cf(Ry),
  7606. Dy = new Array(3).concat("e7e1efc994c7dd1c77", "f1eef6d7b5d8df65b0ce1256", "f1eef6d7b5d8df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ff),
  7607. Uy = cf(Dy),
  7608. qy = new Array(3).concat("fde0ddfa9fb5c51b8a", "feebe2fbb4b9f768a1ae017e", "feebe2fbb4b9f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ff),
  7609. Oy = cf(qy),
  7610. Yy = new Array(3).concat("edf8b17fcdbb2c7fb8", "ffffcca1dab441b6c4225ea8", "ffffcca1dab441b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ff),
  7611. By = cf(Yy),
  7612. Fy = new Array(3).concat("f7fcb9addd8e31a354", "ffffccc2e69978c679238443", "ffffccc2e69978c67931a354006837", "ffffccd9f0a3addd8e78c67931a354006837", "ffffccd9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ff),
  7613. Iy = cf(Fy),
  7614. jy = new Array(3).concat("fff7bcfec44fd95f0e", "ffffd4fed98efe9929cc4c02", "ffffd4fed98efe9929d95f0e993404", "ffffd4fee391fec44ffe9929d95f0e993404", "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ff),
  7615. Hy = cf(jy),
  7616. Xy = new Array(3).concat("ffeda0feb24cf03b20", "ffffb2fecc5cfd8d3ce31a1c", "ffffb2fecc5cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ff),
  7617. Gy = cf(Xy),
  7618. Vy = new Array(3).concat("deebf79ecae13182bd", "eff3ffbdd7e76baed62171b5", "eff3ffbdd7e76baed63182bd08519c", "eff3ffc6dbef9ecae16baed63182bd08519c", "eff3ffc6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ff),
  7619. $y = cf(Vy),
  7620. Wy = new Array(3).concat("e5f5e0a1d99b31a354", "edf8e9bae4b374c476238b45", "edf8e9bae4b374c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ff),
  7621. Zy = cf(Wy),
  7622. Qy = new Array(3).concat("f0f0f0bdbdbd636363", "f7f7f7cccccc969696525252", "f7f7f7cccccc969696636363252525", "f7f7f7d9d9d9bdbdbd969696636363252525", "f7f7f7d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ff),
  7623. Jy = cf(Qy),
  7624. Ky = new Array(3).concat("efedf5bcbddc756bb1", "f2f0f7cbc9e29e9ac86a51a3", "f2f0f7cbc9e29e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ff),
  7625. t_ = cf(Ky),
  7626. n_ = new Array(3).concat("fee0d2fc9272de2d26", "fee5d9fcae91fb6a4acb181d", "fee5d9fcae91fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ff),
  7627. e_ = cf(n_),
  7628. r_ = new Array(3).concat("fee6cefdae6be6550d", "feeddefdbe85fd8d3cd94701", "feeddefdbe85fd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ff),
  7629. i_ = cf(r_),
  7630. o_ = xl(Zt(300, .5, 0), Zt(-240, .5, 1)),
  7631. a_ = xl(Zt(-100, .75, .35), Zt(80, 1.5, .8)),
  7632. u_ = xl(Zt(260, .75, .35), Zt(80, 1.5, .8)),
  7633. f_ = Zt(),
  7634. c_ = Rt(),
  7635. s_ = Math.PI / 3,
  7636. l_ = 2 * Math.PI / 3,
  7637. h_ = sf(ff("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),
  7638. d_ = sf(ff("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),
  7639. p_ = sf(ff("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),
  7640. v_ = sf(ff("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),
  7641. g_ = Math.abs,
  7642. y_ = Math.atan2,
  7643. __ = Math.cos,
  7644. b_ = Math.max,
  7645. m_ = Math.min,
  7646. x_ = Math.sin,
  7647. w_ = Math.sqrt,
  7648. M_ = 1e-12,
  7649. A_ = Math.PI,
  7650. T_ = A_ / 2,
  7651. N_ = 2 * A_;
  7652. bf.prototype = {
  7653. areaStart: function() {
  7654. this._line = 0
  7655. },
  7656. areaEnd: function() {
  7657. this._line = NaN
  7658. },
  7659. lineStart: function() {
  7660. this._point = 0
  7661. },
  7662. lineEnd: function() {
  7663. (this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line = 1 - this._line
  7664. },
  7665. point: function(t, n) {
  7666. switch (t = +t, n = +n, this._point) {
  7667. case 0:
  7668. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  7669. break;
  7670. case 1:
  7671. this._point = 2;
  7672. default:
  7673. this._context.lineTo(t, n)
  7674. }
  7675. }
  7676. };
  7677. var S_ = Ef(mf);
  7678. Sf.prototype = {
  7679. areaStart: function() {
  7680. this._curve.areaStart()
  7681. },
  7682. areaEnd: function() {
  7683. this._curve.areaEnd()
  7684. },
  7685. lineStart: function() {
  7686. this._curve.lineStart()
  7687. },
  7688. lineEnd: function() {
  7689. this._curve.lineEnd()
  7690. },
  7691. point: function(t, n) {
  7692. this._curve.point(n * Math.sin(t), n * -Math.cos(t))
  7693. }
  7694. };
  7695. var E_ = Array.prototype.slice,
  7696. k_ = {
  7697. draw: function(t, n) {
  7698. var e = Math.sqrt(n / A_);
  7699. t.moveTo(e, 0), t.arc(0, 0, e, 0, N_)
  7700. }
  7701. },
  7702. C_ = {
  7703. draw: function(t, n) {
  7704. var e = Math.sqrt(n / 5) / 2;
  7705. t.moveTo(-3 * e, -e), t.lineTo(-e, -e), t.lineTo(-e, -3 * e), t.lineTo(e, -3 * e), t.lineTo(e, -e), t.lineTo(3 * e, -e), t.lineTo(3 * e, e), t.lineTo(e, e), t.lineTo(e, 3 * e), t.lineTo(-e, 3 * e), t.lineTo(-e, e), t.lineTo(-3 * e, e), t.closePath()
  7706. }
  7707. },
  7708. P_ = Math.sqrt(1 / 3),
  7709. z_ = 2 * P_,
  7710. R_ = {
  7711. draw: function(t, n) {
  7712. var e = Math.sqrt(n / z_),
  7713. r = e * P_;
  7714. t.moveTo(0, -e), t.lineTo(r, 0), t.lineTo(0, e), t.lineTo(-r, 0), t.closePath()
  7715. }
  7716. },
  7717. L_ = Math.sin(A_ / 10) / Math.sin(7 * A_ / 10),
  7718. D_ = Math.sin(N_ / 10) * L_,
  7719. U_ = -Math.cos(N_ / 10) * L_,
  7720. q_ = {
  7721. draw: function(t, n) {
  7722. var e = Math.sqrt(.8908130915292852 * n),
  7723. r = D_ * e,
  7724. i = U_ * e;
  7725. t.moveTo(0, -e), t.lineTo(r, i);
  7726. for (var o = 1; o < 5; ++o) {
  7727. var a = N_ * o / 5,
  7728. u = Math.cos(a),
  7729. f = Math.sin(a);
  7730. t.lineTo(f * e, -u * e), t.lineTo(u * r - f * i, f * r + u * i)
  7731. }
  7732. t.closePath()
  7733. }
  7734. },
  7735. O_ = {
  7736. draw: function(t, n) {
  7737. var e = Math.sqrt(n),
  7738. r = -e / 2;
  7739. t.rect(r, r, e, e)
  7740. }
  7741. },
  7742. Y_ = Math.sqrt(3),
  7743. B_ = {
  7744. draw: function(t, n) {
  7745. var e = -Math.sqrt(n / (3 * Y_));
  7746. t.moveTo(0, 2 * e), t.lineTo(-Y_ * e, -e), t.lineTo(Y_ * e, -e), t.closePath()
  7747. }
  7748. },
  7749. F_ = Math.sqrt(3) / 2,
  7750. I_ = 1 / Math.sqrt(12),
  7751. j_ = 3 * (I_ / 2 + 1),
  7752. H_ = {
  7753. draw: function(t, n) {
  7754. var e = Math.sqrt(n / j_),
  7755. r = e / 2,
  7756. i = e * I_,
  7757. o = r,
  7758. a = e * I_ + e,
  7759. u = -o,
  7760. f = a;
  7761. t.moveTo(r, i), t.lineTo(o, a), t.lineTo(u, f), t.lineTo(-.5 * r - F_ * i, F_ * r + -.5 * i), t.lineTo(-.5 * o - F_ * a, F_ * o + -.5 * a), t.lineTo(-.5 * u - F_ * f, F_ * u + -.5 * f), t.lineTo(-.5 * r + F_ * i, -.5 * i - F_ * r), t.lineTo(-.5 * o + F_ * a, -.5 * a - F_ * o), t.lineTo(-.5 * u + F_ * f, -.5 * f - F_ * u), t.closePath()
  7762. }
  7763. },
  7764. X_ = [k_, C_, R_, O_, q_, B_, H_];
  7765. Ff.prototype = {
  7766. areaStart: function() {
  7767. this._line = 0
  7768. },
  7769. areaEnd: function() {
  7770. this._line = NaN
  7771. },
  7772. lineStart: function() {
  7773. this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0
  7774. },
  7775. lineEnd: function() {
  7776. switch (this._point) {
  7777. case 3:
  7778. Bf(this, this._x1, this._y1);
  7779. case 2:
  7780. this._context.lineTo(this._x1, this._y1)
  7781. }(this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line = 1 - this._line
  7782. },
  7783. point: function(t, n) {
  7784. switch (t = +t, n = +n, this._point) {
  7785. case 0:
  7786. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  7787. break;
  7788. case 1:
  7789. this._point = 2;
  7790. break;
  7791. case 2:
  7792. this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
  7793. default:
  7794. Bf(this, t, n)
  7795. }
  7796. this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = n
  7797. }
  7798. }, If.prototype = {
  7799. areaStart: Yf,
  7800. areaEnd: Yf,
  7801. lineStart: function() {
  7802. this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0
  7803. },
  7804. lineEnd: function() {
  7805. switch (this._point) {
  7806. case 1:
  7807. this._context.moveTo(this._x2, this._y2), this._context.closePath();
  7808. break;
  7809. case 2:
  7810. this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
  7811. break;
  7812. case 3:
  7813. this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4)
  7814. }
  7815. },
  7816. point: function(t, n) {
  7817. switch (t = +t, n = +n, this._point) {
  7818. case 0:
  7819. this._point = 1, this._x2 = t, this._y2 = n;
  7820. break;
  7821. case 1:
  7822. this._point = 2, this._x3 = t, this._y3 = n;
  7823. break;
  7824. case 2:
  7825. this._point = 3, this._x4 = t, this._y4 = n, this._context.moveTo((this._x0 + 4 * this._x1 + t) / 6, (this._y0 + 4 * this._y1 + n) / 6);
  7826. break;
  7827. default:
  7828. Bf(this, t, n)
  7829. }
  7830. this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = n
  7831. }
  7832. }, jf.prototype = {
  7833. areaStart: function() {
  7834. this._line = 0
  7835. },
  7836. areaEnd: function() {
  7837. this._line = NaN
  7838. },
  7839. lineStart: function() {
  7840. this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0
  7841. },
  7842. lineEnd: function() {
  7843. (this._line || 0 !== this._line && 3 === this._point) && this._context.closePath(), this._line = 1 - this._line
  7844. },
  7845. point: function(t, n) {
  7846. switch (t = +t, n = +n, this._point) {
  7847. case 0:
  7848. this._point = 1;
  7849. break;
  7850. case 1:
  7851. this._point = 2;
  7852. break;
  7853. case 2:
  7854. this._point = 3;
  7855. var e = (this._x0 + 4 * this._x1 + t) / 6,
  7856. r = (this._y0 + 4 * this._y1 + n) / 6;
  7857. this._line ? this._context.lineTo(e, r) : this._context.moveTo(e, r);
  7858. break;
  7859. case 3:
  7860. this._point = 4;
  7861. default:
  7862. Bf(this, t, n)
  7863. }
  7864. this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = n
  7865. }
  7866. }, Hf.prototype = {
  7867. lineStart: function() {
  7868. this._x = [], this._y = [], this._basis.lineStart()
  7869. },
  7870. lineEnd: function() {
  7871. var t = this._x,
  7872. n = this._y,
  7873. e = t.length - 1;
  7874. if (e > 0)
  7875. for (var r, i = t[0], o = n[0], a = t[e] - i, u = n[e] - o, f = -1; ++f <= e;) r = f / e, this._basis.point(this._beta * t[f] + (1 - this._beta) * (i + r * a), this._beta * n[f] + (1 - this._beta) * (o + r * u));
  7876. this._x = this._y = null, this._basis.lineEnd()
  7877. },
  7878. point: function(t, n) {
  7879. this._x.push(+t), this._y.push(+n)
  7880. }
  7881. };
  7882. var G_ = function t(n) {
  7883. function e(t) {
  7884. return 1 === n ? new Ff(t) : new Hf(t, n)
  7885. }
  7886. return e.beta = function(n) {
  7887. return t(+n)
  7888. }, e
  7889. }(.85);
  7890. Gf.prototype = {
  7891. areaStart: function() {
  7892. this._line = 0
  7893. },
  7894. areaEnd: function() {
  7895. this._line = NaN
  7896. },
  7897. lineStart: function() {
  7898. this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0
  7899. },
  7900. lineEnd: function() {
  7901. switch (this._point) {
  7902. case 2:
  7903. this._context.lineTo(this._x2, this._y2);
  7904. break;
  7905. case 3:
  7906. Xf(this, this._x1, this._y1)
  7907. }(this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line = 1 - this._line
  7908. },
  7909. point: function(t, n) {
  7910. switch (t = +t, n = +n, this._point) {
  7911. case 0:
  7912. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  7913. break;
  7914. case 1:
  7915. this._point = 2, this._x1 = t, this._y1 = n;
  7916. break;
  7917. case 2:
  7918. this._point = 3;
  7919. default:
  7920. Xf(this, t, n)
  7921. }
  7922. this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  7923. }
  7924. };
  7925. var V_ = function t(n) {
  7926. function e(t) {
  7927. return new Gf(t, n)
  7928. }
  7929. return e.tension = function(n) {
  7930. return t(+n)
  7931. }, e
  7932. }(0);
  7933. Vf.prototype = {
  7934. areaStart: Yf,
  7935. areaEnd: Yf,
  7936. lineStart: function() {
  7937. this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0
  7938. },
  7939. lineEnd: function() {
  7940. switch (this._point) {
  7941. case 1:
  7942. this._context.moveTo(this._x3, this._y3), this._context.closePath();
  7943. break;
  7944. case 2:
  7945. this._context.lineTo(this._x3, this._y3), this._context.closePath();
  7946. break;
  7947. case 3:
  7948. this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5)
  7949. }
  7950. },
  7951. point: function(t, n) {
  7952. switch (t = +t, n = +n, this._point) {
  7953. case 0:
  7954. this._point = 1, this._x3 = t, this._y3 = n;
  7955. break;
  7956. case 1:
  7957. this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = n);
  7958. break;
  7959. case 2:
  7960. this._point = 3, this._x5 = t, this._y5 = n;
  7961. break;
  7962. default:
  7963. Xf(this, t, n)
  7964. }
  7965. this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  7966. }
  7967. };
  7968. var $_ = function t(n) {
  7969. function e(t) {
  7970. return new Vf(t, n)
  7971. }
  7972. return e.tension = function(n) {
  7973. return t(+n)
  7974. }, e
  7975. }(0);
  7976. $f.prototype = {
  7977. areaStart: function() {
  7978. this._line = 0
  7979. },
  7980. areaEnd: function() {
  7981. this._line = NaN
  7982. },
  7983. lineStart: function() {
  7984. this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0
  7985. },
  7986. lineEnd: function() {
  7987. (this._line || 0 !== this._line && 3 === this._point) && this._context.closePath(), this._line = 1 - this._line
  7988. },
  7989. point: function(t, n) {
  7990. switch (t = +t, n = +n, this._point) {
  7991. case 0:
  7992. this._point = 1;
  7993. break;
  7994. case 1:
  7995. this._point = 2;
  7996. break;
  7997. case 2:
  7998. this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
  7999. break;
  8000. case 3:
  8001. this._point = 4;
  8002. default:
  8003. Xf(this, t, n)
  8004. }
  8005. this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  8006. }
  8007. };
  8008. var W_ = function t(n) {
  8009. function e(t) {
  8010. return new $f(t, n)
  8011. }
  8012. return e.tension = function(n) {
  8013. return t(+n)
  8014. }, e
  8015. }(0);
  8016. Zf.prototype = {
  8017. areaStart: function() {
  8018. this._line = 0
  8019. },
  8020. areaEnd: function() {
  8021. this._line = NaN
  8022. },
  8023. lineStart: function() {
  8024. this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0
  8025. },
  8026. lineEnd: function() {
  8027. switch (this._point) {
  8028. case 2:
  8029. this._context.lineTo(this._x2, this._y2);
  8030. break;
  8031. case 3:
  8032. this.point(this._x2, this._y2)
  8033. }(this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line = 1 - this._line
  8034. },
  8035. point: function(t, n) {
  8036. if (t = +t, n = +n, this._point) {
  8037. var e = this._x2 - t,
  8038. r = this._y2 - n;
  8039. this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + r * r, this._alpha))
  8040. }
  8041. switch (this._point) {
  8042. case 0:
  8043. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  8044. break;
  8045. case 1:
  8046. this._point = 2;
  8047. break;
  8048. case 2:
  8049. this._point = 3;
  8050. default:
  8051. Wf(this, t, n)
  8052. }
  8053. this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  8054. }
  8055. };
  8056. var Z_ = function t(n) {
  8057. function e(t) {
  8058. return n ? new Zf(t, n) : new Gf(t, 0)
  8059. }
  8060. return e.alpha = function(n) {
  8061. return t(+n)
  8062. }, e
  8063. }(.5);
  8064. Qf.prototype = {
  8065. areaStart: Yf,
  8066. areaEnd: Yf,
  8067. lineStart: function() {
  8068. this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0
  8069. },
  8070. lineEnd: function() {
  8071. switch (this._point) {
  8072. case 1:
  8073. this._context.moveTo(this._x3, this._y3), this._context.closePath();
  8074. break;
  8075. case 2:
  8076. this._context.lineTo(this._x3, this._y3), this._context.closePath();
  8077. break;
  8078. case 3:
  8079. this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5)
  8080. }
  8081. },
  8082. point: function(t, n) {
  8083. if (t = +t, n = +n, this._point) {
  8084. var e = this._x2 - t,
  8085. r = this._y2 - n;
  8086. this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + r * r, this._alpha))
  8087. }
  8088. switch (this._point) {
  8089. case 0:
  8090. this._point = 1, this._x3 = t, this._y3 = n;
  8091. break;
  8092. case 1:
  8093. this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = n);
  8094. break;
  8095. case 2:
  8096. this._point = 3, this._x5 = t, this._y5 = n;
  8097. break;
  8098. default:
  8099. Wf(this, t, n)
  8100. }
  8101. this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  8102. }
  8103. };
  8104. var Q_ = function t(n) {
  8105. function e(t) {
  8106. return n ? new Qf(t, n) : new Vf(t, 0)
  8107. }
  8108. return e.alpha = function(n) {
  8109. return t(+n)
  8110. }, e
  8111. }(.5);
  8112. Jf.prototype = {
  8113. areaStart: function() {
  8114. this._line = 0
  8115. },
  8116. areaEnd: function() {
  8117. this._line = NaN
  8118. },
  8119. lineStart: function() {
  8120. this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0
  8121. },
  8122. lineEnd: function() {
  8123. (this._line || 0 !== this._line && 3 === this._point) && this._context.closePath(), this._line = 1 - this._line
  8124. },
  8125. point: function(t, n) {
  8126. if (t = +t, n = +n, this._point) {
  8127. var e = this._x2 - t,
  8128. r = this._y2 - n;
  8129. this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + r * r, this._alpha))
  8130. }
  8131. switch (this._point) {
  8132. case 0:
  8133. this._point = 1;
  8134. break;
  8135. case 1:
  8136. this._point = 2;
  8137. break;
  8138. case 2:
  8139. this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
  8140. break;
  8141. case 3:
  8142. this._point = 4;
  8143. default:
  8144. Wf(this, t, n)
  8145. }
  8146. this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n
  8147. }
  8148. };
  8149. var J_ = function t(n) {
  8150. function e(t) {
  8151. return n ? new Jf(t, n) : new $f(t, 0)
  8152. }
  8153. return e.alpha = function(n) {
  8154. return t(+n)
  8155. }, e
  8156. }(.5);
  8157. Kf.prototype = {
  8158. areaStart: Yf,
  8159. areaEnd: Yf,
  8160. lineStart: function() {
  8161. this._point = 0
  8162. },
  8163. lineEnd: function() {
  8164. this._point && this._context.closePath()
  8165. },
  8166. point: function(t, n) {
  8167. t = +t, n = +n, this._point ? this._context.lineTo(t, n) : (this._point = 1, this._context.moveTo(t, n))
  8168. }
  8169. }, ic.prototype = {
  8170. areaStart: function() {
  8171. this._line = 0
  8172. },
  8173. areaEnd: function() {
  8174. this._line = NaN
  8175. },
  8176. lineStart: function() {
  8177. this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0
  8178. },
  8179. lineEnd: function() {
  8180. switch (this._point) {
  8181. case 2:
  8182. this._context.lineTo(this._x1, this._y1);
  8183. break;
  8184. case 3:
  8185. rc(this, this._t0, ec(this, this._t0))
  8186. }(this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line = 1 - this._line
  8187. },
  8188. point: function(t, n) {
  8189. var e = NaN;
  8190. if (t = +t, n = +n, t !== this._x1 || n !== this._y1) {
  8191. switch (this._point) {
  8192. case 0:
  8193. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  8194. break;
  8195. case 1:
  8196. this._point = 2;
  8197. break;
  8198. case 2:
  8199. this._point = 3, rc(this, ec(this, e = nc(this, t, n)), e);
  8200. break;
  8201. default:
  8202. rc(this, this._t0, e = nc(this, t, n))
  8203. }
  8204. this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = n, this._t0 = e
  8205. }
  8206. }
  8207. }, (oc.prototype = Object.create(ic.prototype)).point = function(t, n) {
  8208. ic.prototype.point.call(this, n, t)
  8209. }, ac.prototype = {
  8210. moveTo: function(t, n) {
  8211. this._context.moveTo(n, t)
  8212. },
  8213. closePath: function() {
  8214. this._context.closePath()
  8215. },
  8216. lineTo: function(t, n) {
  8217. this._context.lineTo(n, t)
  8218. },
  8219. bezierCurveTo: function(t, n, e, r, i, o) {
  8220. this._context.bezierCurveTo(n, t, r, e, o, i)
  8221. }
  8222. }, uc.prototype = {
  8223. areaStart: function() {
  8224. this._line = 0
  8225. },
  8226. areaEnd: function() {
  8227. this._line = NaN
  8228. },
  8229. lineStart: function() {
  8230. this._x = [], this._y = []
  8231. },
  8232. lineEnd: function() {
  8233. var t = this._x,
  8234. n = this._y,
  8235. e = t.length;
  8236. if (e)
  8237. if (this._line ? this._context.lineTo(t[0], n[0]) : this._context.moveTo(t[0], n[0]), 2 === e) this._context.lineTo(t[1], n[1]);
  8238. else
  8239. for (var r = fc(t), i = fc(n), o = 0, a = 1; a < e; ++o, ++a) this._context.bezierCurveTo(r[0][o], i[0][o], r[1][o], i[1][o], t[a], n[a]);
  8240. (this._line || 0 !== this._line && 1 === e) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null
  8241. },
  8242. point: function(t, n) {
  8243. this._x.push(+t), this._y.push(+n)
  8244. }
  8245. }, cc.prototype = {
  8246. areaStart: function() {
  8247. this._line = 0
  8248. },
  8249. areaEnd: function() {
  8250. this._line = NaN
  8251. },
  8252. lineStart: function() {
  8253. this._x = this._y = NaN, this._point = 0
  8254. },
  8255. lineEnd: function() {
  8256. 0 < this._t && this._t < 1 && 2 === this._point && this._context.lineTo(this._x, this._y), (this._line || 0 !== this._line && 1 === this._point) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line)
  8257. },
  8258. point: function(t, n) {
  8259. switch (t = +t, n = +n, this._point) {
  8260. case 0:
  8261. this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
  8262. break;
  8263. case 1:
  8264. this._point = 2;
  8265. default:
  8266. if (this._t <= 0) this._context.lineTo(this._x, n), this._context.lineTo(t, n);
  8267. else {
  8268. var e = this._x * (1 - this._t) + t * this._t;
  8269. this._context.lineTo(e, this._y), this._context.lineTo(e, n)
  8270. }
  8271. }
  8272. this._x = t, this._y = n
  8273. }
  8274. }, _c.prototype = {
  8275. constructor: _c,
  8276. insert: function(t, n) {
  8277. var e, r, i;
  8278. if (t) {
  8279. if (n.P = t, n.N = t.N, t.N && (t.N.P = n), t.N = n, t.R) {
  8280. for (t = t.R; t.L;) t = t.L;
  8281. t.L = n
  8282. } else t.R = n;
  8283. e = t
  8284. } else this._ ? (t = wc(this._), n.P = null, n.N = t, t.P = t.L = n, e = t) : (n.P = n.N = null, this._ = n, e = null);
  8285. for (n.L = n.R = null, n.U = e, n.C = !0, t = n; e && e.C;) e === (r = e.U).L ? (i = r.R) && i.C ? (e.C = i.C = !1, r.C = !0, t = r) : (t === e.R && (mc(this, e), e = (t = e).U), e.C = !1, r.C = !0, xc(this, r)) : (i = r.L) && i.C ? (e.C = i.C = !1, r.C = !0, t = r) : (t === e.L && (xc(this, e), e = (t = e).U), e.C = !1, r.C = !0, mc(this, r)), e = t.U;
  8286. this._.C = !1
  8287. },
  8288. remove: function(t) {
  8289. t.N && (t.N.P = t.P), t.P && (t.P.N = t.N), t.N = t.P = null;
  8290. var n, e, r, i = t.U,
  8291. o = t.L,
  8292. a = t.R;
  8293. if (e = o ? a ? wc(a) : o : a, i ? i.L === t ? i.L = e : i.R = e : this._ = e, o && a ? (r = e.C, e.C = t.C, e.L = o, o.U = e, e !== a ? (i = e.U, e.U = t.U, t = e.R, i.L = t, e.R = a, a.U = e) : (e.U = i, i = e, t = e.R)) : (r = t.C, t = e), t && (t.U = i), !r)
  8294. if (t && t.C) t.C = !1;
  8295. else {
  8296. do {
  8297. if (t === this._) break;
  8298. if (t === i.L) {
  8299. if ((n = i.R).C && (n.C = !1, i.C = !0, mc(this, i), n = i.R), n.L && n.L.C || n.R && n.R.C) {
  8300. n.R && n.R.C || (n.L.C = !1, n.C = !0, xc(this, n), n = i.R), n.C = i.C, i.C = n.R.C = !1, mc(this, i), t = this._;
  8301. break
  8302. }
  8303. } else if ((n = i.L).C && (n.C = !1, i.C = !0, xc(this, i), n = i.L), n.L && n.L.C || n.R && n.R.C) {
  8304. n.L && n.L.C || (n.R.C = !1, n.C = !0, mc(this, n), n = i.L), n.C = i.C, i.C = n.L.C = !1, xc(this, i), t = this._;
  8305. break
  8306. }
  8307. n.C = !0, t = i, i = i.U
  8308. } while (!t.C);
  8309. t && (t.C = !1)
  8310. }
  8311. }
  8312. };
  8313. var K_, tb, nb, eb, rb, ib = [],
  8314. ob = [],
  8315. ab = 1e-6,
  8316. ub = 1e-12;
  8317. Bc.prototype = {
  8318. constructor: Bc,
  8319. polygons: function() {
  8320. var t = this.edges;
  8321. return this.cells.map(function(n) {
  8322. var e = n.halfedges.map(function(e) {
  8323. return kc(n, t[e])
  8324. });
  8325. return e.data = n.site.data, e
  8326. })
  8327. },
  8328. triangles: function() {
  8329. var t = [],
  8330. n = this.edges;
  8331. return this.cells.forEach(function(e, r) {
  8332. if (o = (i = e.halfedges).length)
  8333. for (var i, o, a, u = e.site, f = -1, c = n[i[o - 1]], s = c.left === u ? c.right : c.left; ++f < o;) a = s, s = (c = n[i[f]]).left === u ? c.right : c.left, a && s && r < a.index && r < s.index && Oc(u, a, s) < 0 && t.push([u.data, a.data, s.data])
  8334. }), t
  8335. },
  8336. links: function() {
  8337. return this.edges.filter(function(t) {
  8338. return t.right
  8339. }).map(function(t) {
  8340. return {
  8341. source: t.left.data,
  8342. target: t.right.data
  8343. }
  8344. })
  8345. },
  8346. find: function(t, n, e) {
  8347. for (var r, i, o = this, a = o._found || 0, u = o.cells.length; !(i = o.cells[a]);)
  8348. if (++a >= u) return null;
  8349. var f = t - i.site[0],
  8350. c = n - i.site[1],
  8351. s = f * f + c * c;
  8352. do {
  8353. i = o.cells[r = a], a = null, i.halfedges.forEach(function(e) {
  8354. var r = o.edges[e],
  8355. u = r.left;
  8356. if (u !== i.site && u || (u = r.right)) {
  8357. var f = t - u[0],
  8358. c = n - u[1],
  8359. l = f * f + c * c;
  8360. l < s && (s = l, a = u.index)
  8361. }
  8362. })
  8363. } while (null !== a);
  8364. return o._found = r, null == e || s <= e * e ? i.site : null
  8365. }
  8366. }, Ic.prototype = {
  8367. constructor: Ic,
  8368. scale: function(t) {
  8369. return 1 === t ? this : new Ic(this.k * t, this.x, this.y)
  8370. },
  8371. translate: function(t, n) {
  8372. return 0 === t & 0 === n ? this : new Ic(this.k, this.x + this.k * t, this.y + this.k * n)
  8373. },
  8374. apply: function(t) {
  8375. return [t[0] * this.k + this.x, t[1] * this.k + this.y]
  8376. },
  8377. applyX: function(t) {
  8378. return t * this.k + this.x
  8379. },
  8380. applyY: function(t) {
  8381. return t * this.k + this.y
  8382. },
  8383. invert: function(t) {
  8384. return [(t[0] - this.x) / this.k, (t[1] - this.y) / this.k]
  8385. },
  8386. invertX: function(t) {
  8387. return (t - this.x) / this.k
  8388. },
  8389. invertY: function(t) {
  8390. return (t - this.y) / this.k
  8391. },
  8392. rescaleX: function(t) {
  8393. return t.copy().domain(t.range().map(this.invertX, this).map(t.invert, t))
  8394. },
  8395. rescaleY: function(t) {
  8396. return t.copy().domain(t.range().map(this.invertY, this).map(t.invert, t))
  8397. },
  8398. toString: function() {
  8399. return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"
  8400. }
  8401. };
  8402. var fb = new Ic(1, 0, 0);
  8403. jc.prototype = Ic.prototype, t.version = "5.5.0", t.bisect = Kc, t.bisectRight = Kc, t.bisectLeft = ts, t.ascending = n, t.bisector = e, t.cross = function(t, n, e) {
  8404. var i, o, a, u, f = t.length,
  8405. c = n.length,
  8406. s = new Array(f * c);
  8407. for (null == e && (e = r), i = a = 0; i < f; ++i)
  8408. for (u = t[i], o = 0; o < c; ++o, ++a) s[a] = e(u, n[o]);
  8409. return s
  8410. }, t.descending = function(t, n) {
  8411. return n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN
  8412. }, t.deviation = a, t.extent = u, t.histogram = function() {
  8413. function t(t) {
  8414. var i, o, a = t.length,
  8415. u = new Array(a);
  8416. for (i = 0; i < a; ++i) u[i] = n(t[i], i, t);
  8417. var f = e(u),
  8418. c = f[0],
  8419. l = f[1],
  8420. h = r(u, c, l);
  8421. Array.isArray(h) || (h = d(c, l, h), h = s(Math.ceil(c / h) * h, Math.floor(l / h) * h, h));
  8422. for (var p = h.length; h[0] <= c;) h.shift(), --p;
  8423. for (; h[p - 1] > l;) h.pop(), --p;
  8424. var v, g = new Array(p + 1);
  8425. for (i = 0; i <= p; ++i)(v = g[i] = []).x0 = i > 0 ? h[i - 1] : c, v.x1 = i < p ? h[i] : l;
  8426. for (i = 0; i < a; ++i) c <= (o = u[i]) && o <= l && g[Kc(h, o, 0, p)].push(t[i]);
  8427. return g
  8428. }
  8429. var n = c,
  8430. e = u,
  8431. r = p;
  8432. return t.value = function(e) {
  8433. return arguments.length ? (n = "function" == typeof e ? e : f(e), t) : n
  8434. }, t.domain = function(n) {
  8435. return arguments.length ? (e = "function" == typeof n ? n : f([n[0], n[1]]), t) : e
  8436. }, t.thresholds = function(n) {
  8437. return arguments.length ? (r = "function" == typeof n ? n : Array.isArray(n) ? f(es.call(n)) : f(n), t) : r
  8438. }, t
  8439. }, t.thresholdFreedmanDiaconis = function(t, e, r) {
  8440. return t = rs.call(t, i).sort(n), Math.ceil((r - e) / (2 * (v(t, .75) - v(t, .25)) * Math.pow(t.length, -1 / 3)))
  8441. }, t.thresholdScott = function(t, n, e) {
  8442. return Math.ceil((e - n) / (3.5 * a(t) * Math.pow(t.length, -1 / 3)))
  8443. }, t.thresholdSturges = p, t.max = g, t.mean = function(t, n) {
  8444. var e, r = t.length,
  8445. o = r,
  8446. a = -1,
  8447. u = 0;
  8448. if (null == n)
  8449. for (; ++a < r;) isNaN(e = i(t[a])) ? --o : u += e;
  8450. else
  8451. for (; ++a < r;) isNaN(e = i(n(t[a], a, t))) ? --o : u += e;
  8452. if (o) return u / o
  8453. }, t.median = function(t, e) {
  8454. var r, o = t.length,
  8455. a = -1,
  8456. u = [];
  8457. if (null == e)
  8458. for (; ++a < o;) isNaN(r = i(t[a])) || u.push(r);
  8459. else
  8460. for (; ++a < o;) isNaN(r = i(e(t[a], a, t))) || u.push(r);
  8461. return v(u.sort(n), .5)
  8462. }, t.merge = y, t.min = _, t.pairs = function(t, n) {
  8463. null == n && (n = r);
  8464. for (var e = 0, i = t.length - 1, o = t[0], a = new Array(i < 0 ? 0 : i); e < i;) a[e] = n(o, o = t[++e]);
  8465. return a
  8466. }, t.permute = function(t, n) {
  8467. for (var e = n.length, r = new Array(e); e--;) r[e] = t[n[e]];
  8468. return r
  8469. }, t.quantile = v, t.range = s, t.scan = function(t, e) {
  8470. if (r = t.length) {
  8471. var r, i, o = 0,
  8472. a = 0,
  8473. u = t[a];
  8474. for (null == e && (e = n); ++o < r;)(e(i = t[o], u) < 0 || 0 !== e(u, u)) && (u = i, a = o);
  8475. return 0 === e(u, u) ? a : void 0
  8476. }
  8477. }, t.shuffle = function(t, n, e) {
  8478. for (var r, i, o = (null == e ? t.length : e) - (n = null == n ? 0 : +n); o;) i = Math.random() * o-- | 0, r = t[o + n], t[o + n] = t[i + n], t[i + n] = r;
  8479. return t
  8480. }, t.sum = function(t, n) {
  8481. var e, r = t.length,
  8482. i = -1,
  8483. o = 0;
  8484. if (null == n)
  8485. for (; ++i < r;)(e = +t[i]) && (o += e);
  8486. else
  8487. for (; ++i < r;)(e = +n(t[i], i, t)) && (o += e);
  8488. return o
  8489. }, t.ticks = l, t.tickIncrement = h, t.tickStep = d, t.transpose = b, t.variance = o, t.zip = function() {
  8490. return b(arguments)
  8491. }, t.axisTop = function(t) {
  8492. return T(fs, t)
  8493. }, t.axisRight = function(t) {
  8494. return T(cs, t)
  8495. }, t.axisBottom = function(t) {
  8496. return T(ss, t)
  8497. }, t.axisLeft = function(t) {
  8498. return T(ls, t)
  8499. }, t.brush = function() {
  8500. return ee(bh)
  8501. }, t.brushX = function() {
  8502. return ee(yh)
  8503. }, t.brushY = function() {
  8504. return ee(_h)
  8505. }, t.brushSelection = function(t) {
  8506. var n = t.__brush;
  8507. return n ? n.dim.output(n.selection) : null
  8508. }, t.chord = function() {
  8509. function t(t) {
  8510. var o, a, u, f, c, l, h = t.length,
  8511. d = [],
  8512. p = s(h),
  8513. v = [],
  8514. g = [],
  8515. y = g.groups = new Array(h),
  8516. _ = new Array(h * h);
  8517. for (o = 0, c = -1; ++c < h;) {
  8518. for (a = 0, l = -1; ++l < h;) a += t[c][l];
  8519. d.push(a), v.push(s(h)), o += a
  8520. }
  8521. for (e && p.sort(function(t, n) {
  8522. return e(d[t], d[n])
  8523. }), r && v.forEach(function(n, e) {
  8524. n.sort(function(n, i) {
  8525. return r(t[e][n], t[e][i])
  8526. })
  8527. }), f = (o = Ch(0, kh - n * h) / o) ? n : kh / h, a = 0, c = -1; ++c < h;) {
  8528. for (u = a, l = -1; ++l < h;) {
  8529. var b = p[c],
  8530. m = v[b][l],
  8531. x = t[b][m],
  8532. w = a,
  8533. M = a += x * o;
  8534. _[m * h + b] = {
  8535. index: b,
  8536. subindex: m,
  8537. startAngle: w,
  8538. endAngle: M,
  8539. value: x
  8540. }
  8541. }
  8542. y[b] = {
  8543. index: b,
  8544. startAngle: u,
  8545. endAngle: a,
  8546. value: d[b]
  8547. }, a += f
  8548. }
  8549. for (c = -1; ++c < h;)
  8550. for (l = c - 1; ++l < h;) {
  8551. var A = _[l * h + c],
  8552. T = _[c * h + l];
  8553. (A.value || T.value) && g.push(A.value < T.value ? {
  8554. source: T,
  8555. target: A
  8556. } : {
  8557. source: A,
  8558. target: T
  8559. })
  8560. }
  8561. return i ? g.sort(i) : g
  8562. }
  8563. var n = 0,
  8564. e = null,
  8565. r = null,
  8566. i = null;
  8567. return t.padAngle = function(e) {
  8568. return arguments.length ? (n = Ch(0, e), t) : n
  8569. }, t.sortGroups = function(n) {
  8570. return arguments.length ? (e = n, t) : e
  8571. }, t.sortSubgroups = function(n) {
  8572. return arguments.length ? (r = n, t) : r
  8573. }, t.sortChords = function(n) {
  8574. return arguments.length ? (null == n ? i = null : (i = function(t) {
  8575. return function(n, e) {
  8576. return t(n.source.value + n.target.value, e.source.value + e.target.value)
  8577. }
  8578. }(n))._ = n, t) : i && i._
  8579. }, t
  8580. }, t.ribbon = function() {
  8581. function t() {
  8582. var t, u = Ph.call(arguments),
  8583. f = n.apply(this, u),
  8584. c = e.apply(this, u),
  8585. s = +r.apply(this, (u[0] = f, u)),
  8586. l = i.apply(this, u) - Eh,
  8587. h = o.apply(this, u) - Eh,
  8588. d = s * Th(l),
  8589. p = s * Nh(l),
  8590. v = +r.apply(this, (u[0] = c, u)),
  8591. g = i.apply(this, u) - Eh,
  8592. y = o.apply(this, u) - Eh;
  8593. if (a || (a = t = oe()), a.moveTo(d, p), a.arc(0, 0, s, l, h), l === g && h === y || (a.quadraticCurveTo(0, 0, v * Th(g), v * Nh(g)), a.arc(0, 0, v, g, y)), a.quadraticCurveTo(0, 0, d, p), a.closePath(), t) return a = null, t + "" || null
  8594. }
  8595. var n = ae,
  8596. e = ue,
  8597. r = fe,
  8598. i = ce,
  8599. o = se,
  8600. a = null;
  8601. return t.radius = function(n) {
  8602. return arguments.length ? (r = "function" == typeof n ? n : re(+n), t) : r
  8603. }, t.startAngle = function(n) {
  8604. return arguments.length ? (i = "function" == typeof n ? n : re(+n), t) : i
  8605. }, t.endAngle = function(n) {
  8606. return arguments.length ? (o = "function" == typeof n ? n : re(+n), t) : o
  8607. }, t.source = function(e) {
  8608. return arguments.length ? (n = e, t) : n
  8609. }, t.target = function(n) {
  8610. return arguments.length ? (e = n, t) : e
  8611. }, t.context = function(n) {
  8612. return arguments.length ? (a = null == n ? null : n, t) : a
  8613. }, t
  8614. }, t.nest = function() {
  8615. function t(n, i, a, u) {
  8616. if (i >= o.length) return null != e && n.sort(e), null != r ? r(n) : n;
  8617. for (var f, c, s, l = -1, h = n.length, d = o[i++], p = he(), v = a(); ++l < h;)(s = p.get(f = d(c = n[l]) + "")) ? s.push(c) : p.set(f, [c]);
  8618. return p.each(function(n, e) {
  8619. u(v, e, t(n, i, a, u))
  8620. }), v
  8621. }
  8622. function n(t, e) {
  8623. if (++e > o.length) return t;
  8624. var i, u = a[e - 1];
  8625. return null != r && e >= o.length ? i = t.entries() : (i = [], t.each(function(t, r) {
  8626. i.push({
  8627. key: r,
  8628. values: n(t, e)
  8629. })
  8630. })), null != u ? i.sort(function(t, n) {
  8631. return u(t.key, n.key)
  8632. }) : i
  8633. }
  8634. var e, r, i, o = [],
  8635. a = [];
  8636. return i = {
  8637. object: function(n) {
  8638. return t(n, 0, de, pe)
  8639. },
  8640. map: function(n) {
  8641. return t(n, 0, ve, ge)
  8642. },
  8643. entries: function(e) {
  8644. return n(t(e, 0, ve, ge), 0)
  8645. },
  8646. key: function(t) {
  8647. return o.push(t), i
  8648. },
  8649. sortKeys: function(t) {
  8650. return a[o.length - 1] = t, i
  8651. },
  8652. sortValues: function(t) {
  8653. return e = t, i
  8654. },
  8655. rollup: function(t) {
  8656. return r = t, i
  8657. }
  8658. }
  8659. }, t.set = _e, t.map = he, t.keys = function(t) {
  8660. var n = [];
  8661. for (var e in t) n.push(e);
  8662. return n
  8663. }, t.values = function(t) {
  8664. var n = [];
  8665. for (var e in t) n.push(t[e]);
  8666. return n
  8667. }, t.entries = function(t) {
  8668. var n = [];
  8669. for (var e in t) n.push({
  8670. key: e,
  8671. value: t[e]
  8672. });
  8673. return n
  8674. }, t.color = kt, t.rgb = Rt, t.hsl = qt, t.lab = Ft, t.hcl = $t, t.lch = function(t, n, e, r) {
  8675. return 1 === arguments.length ? Vt(t) : new Wt(e, n, t, null == r ? 1 : r)
  8676. }, t.gray = function(t, n) {
  8677. return new It(t, 0, 0, null == n ? 1 : n)
  8678. }, t.cubehelix = Zt, t.contours = Me, t.contourDensity = function() {
  8679. function t(t) {
  8680. var e = new Float32Array(v * y),
  8681. r = new Float32Array(v * y);
  8682. t.forEach(function(t, n, r) {
  8683. var i = a(t, n, r) + p >> h,
  8684. o = u(t, n, r) + p >> h;
  8685. i >= 0 && i < v && o >= 0 && o < y && ++e[i + o * v]
  8686. }), Ae({
  8687. width: v,
  8688. height: y,
  8689. data: e
  8690. }, {
  8691. width: v,
  8692. height: y,
  8693. data: r
  8694. }, l >> h), Te({
  8695. width: v,
  8696. height: y,
  8697. data: r
  8698. }, {
  8699. width: v,
  8700. height: y,
  8701. data: e
  8702. }, l >> h), Ae({
  8703. width: v,
  8704. height: y,
  8705. data: e
  8706. }, {
  8707. width: v,
  8708. height: y,
  8709. data: r
  8710. }, l >> h), Te({
  8711. width: v,
  8712. height: y,
  8713. data: r
  8714. }, {
  8715. width: v,
  8716. height: y,
  8717. data: e
  8718. }, l >> h), Ae({
  8719. width: v,
  8720. height: y,
  8721. data: e
  8722. }, {
  8723. width: v,
  8724. height: y,
  8725. data: r
  8726. }, l >> h), Te({
  8727. width: v,
  8728. height: y,
  8729. data: r
  8730. }, {
  8731. width: v,
  8732. height: y,
  8733. data: e
  8734. }, l >> h);
  8735. var i = _(e);
  8736. if (!Array.isArray(i)) {
  8737. var o = g(e);
  8738. i = d(0, o, i), (i = s(0, Math.floor(o / i) * i, i)).shift()
  8739. }
  8740. return Me().thresholds(i).size([v, y])(e).map(n)
  8741. }
  8742. function n(t) {
  8743. return t.value *= Math.pow(2, -2 * h), t.coordinates.forEach(e), t
  8744. }
  8745. function e(t) {
  8746. t.forEach(r)
  8747. }
  8748. function r(t) {
  8749. t.forEach(i)
  8750. }
  8751. function i(t) {
  8752. t[0] = t[0] * Math.pow(2, h) - p, t[1] = t[1] * Math.pow(2, h) - p
  8753. }
  8754. function o() {
  8755. return p = 3 * l, v = f + 2 * p >> h, y = c + 2 * p >> h, t
  8756. }
  8757. var a = Ne,
  8758. u = Se,
  8759. f = 960,
  8760. c = 500,
  8761. l = 20,
  8762. h = 2,
  8763. p = 3 * l,
  8764. v = f + 2 * p >> h,
  8765. y = c + 2 * p >> h,
  8766. _ = me(20);
  8767. return t.x = function(n) {
  8768. return arguments.length ? (a = "function" == typeof n ? n : me(+n), t) : a
  8769. }, t.y = function(n) {
  8770. return arguments.length ? (u = "function" == typeof n ? n : me(+n), t) : u
  8771. }, t.size = function(t) {
  8772. if (!arguments.length) return [f, c];
  8773. var n = Math.ceil(t[0]),
  8774. e = Math.ceil(t[1]);
  8775. if (!(n >= 0 || n >= 0)) throw new Error("invalid size");
  8776. return f = n, c = e, o()
  8777. }, t.cellSize = function(t) {
  8778. if (!arguments.length) return 1 << h;
  8779. if (!((t = +t) >= 1)) throw new Error("invalid cell size");
  8780. return h = Math.floor(Math.log(t) / Math.LN2), o()
  8781. }, t.thresholds = function(n) {
  8782. return arguments.length ? (_ = "function" == typeof n ? n : Array.isArray(n) ? me(Uh.call(n)) : me(n), t) : _
  8783. }, t.bandwidth = function(t) {
  8784. if (!arguments.length) return Math.sqrt(l * (l + 1));
  8785. if (!((t = +t) >= 0)) throw new Error("invalid bandwidth");
  8786. return l = Math.round((Math.sqrt(4 * t * t + 1) - 1) / 2), o()
  8787. }, t
  8788. }, t.dispatch = N, t.drag = function() {
  8789. function n(t) {
  8790. t.on("mousedown.drag", e).filter(g).on("touchstart.drag", o).on("touchmove.drag", a).on("touchend.drag touchcancel.drag", u).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)")
  8791. }
  8792. function e() {
  8793. if (!h && d.apply(this, arguments)) {
  8794. var n = f("mouse", p.apply(this, arguments), pt, this, arguments);
  8795. n && (ct(t.event.view).on("mousemove.drag", r, !0).on("mouseup.drag", i, !0), _t(t.event.view), gt(), l = !1, c = t.event.clientX, s = t.event.clientY, n("start"))
  8796. }
  8797. }
  8798. function r() {
  8799. if (yt(), !l) {
  8800. var n = t.event.clientX - c,
  8801. e = t.event.clientY - s;
  8802. l = n * n + e * e > m
  8803. }
  8804. y.mouse("drag")
  8805. }
  8806. function i() {
  8807. ct(t.event.view).on("mousemove.drag mouseup.drag", null), bt(t.event.view, l), yt(), y.mouse("end")
  8808. }
  8809. function o() {
  8810. if (d.apply(this, arguments)) {
  8811. var n, e, r = t.event.changedTouches,
  8812. i = p.apply(this, arguments),
  8813. o = r.length;
  8814. for (n = 0; n < o; ++n)(e = f(r[n].identifier, i, vt, this, arguments)) && (gt(), e("start"))
  8815. }
  8816. }
  8817. function a() {
  8818. var n, e, r = t.event.changedTouches,
  8819. i = r.length;
  8820. for (n = 0; n < i; ++n)(e = y[r[n].identifier]) && (yt(), e("drag"))
  8821. }
  8822. function u() {
  8823. var n, e, r = t.event.changedTouches,
  8824. i = r.length;
  8825. for (h && clearTimeout(h), h = setTimeout(function() {
  8826. h = null
  8827. }, 500), n = 0; n < i; ++n)(e = y[r[n].identifier]) && (gt(), e("end"))
  8828. }
  8829. function f(e, r, i, o, a) {
  8830. var u, f, c, s = i(r, e),
  8831. l = _.copy();
  8832. if (ot(new xt(n, "beforestart", u, e, b, s[0], s[1], 0, 0, l), function() {
  8833. return null != (t.event.subject = u = v.apply(o, a)) && (f = u.x - s[0] || 0, c = u.y - s[1] || 0, !0)
  8834. })) return function t(h) {
  8835. var d, p = s;
  8836. switch (h) {
  8837. case "start":
  8838. y[e] = t, d = b++;
  8839. break;
  8840. case "end":
  8841. delete y[e], --b;
  8842. case "drag":
  8843. s = i(r, e), d = b
  8844. }
  8845. ot(new xt(n, h, u, e, d, s[0] + f, s[1] + c, s[0] - p[0], s[1] - p[1], l), l.apply, l, [h, o, a])
  8846. }
  8847. }
  8848. var c, s, l, h, d = wt,
  8849. p = Mt,
  8850. v = At,
  8851. g = Tt,
  8852. y = {},
  8853. _ = N("start", "drag", "end"),
  8854. b = 0,
  8855. m = 0;
  8856. return n.filter = function(t) {
  8857. return arguments.length ? (d = "function" == typeof t ? t : mt(!!t), n) : d
  8858. }, n.container = function(t) {
  8859. return arguments.length ? (p = "function" == typeof t ? t : mt(t), n) : p
  8860. }, n.subject = function(t) {
  8861. return arguments.length ? (v = "function" == typeof t ? t : mt(t), n) : v
  8862. }, n.touchable = function(t) {
  8863. return arguments.length ? (g = "function" == typeof t ? t : mt(!!t), n) : g
  8864. }, n.on = function() {
  8865. var t = _.on.apply(_, arguments);
  8866. return t === _ ? n : t
  8867. }, n.clickDistance = function(t) {
  8868. return arguments.length ? (m = (t = +t) * t, n) : Math.sqrt(m)
  8869. }, n
  8870. }, t.dragDisable = _t, t.dragEnable = bt, t.dsvFormat = ke, t.csvParse = Hh, t.csvParseRows = Xh, t.csvFormat = Gh, t.csvFormatRows = Vh, t.tsvParse = Wh, t.tsvParseRows = Zh, t.tsvFormat = Qh, t.tsvFormatRows = Jh, t.easeLinear = function(t) {
  8871. return +t
  8872. }, t.easeQuad = Fn, t.easeQuadIn = function(t) {
  8873. return t * t
  8874. }, t.easeQuadOut = function(t) {
  8875. return t * (2 - t)
  8876. }, t.easeQuadInOut = Fn, t.easeCubic = In, t.easeCubicIn = function(t) {
  8877. return t * t * t
  8878. }, t.easeCubicOut = function(t) {
  8879. return --t * t * t + 1
  8880. }, t.easeCubicInOut = In, t.easePoly = Xl, t.easePolyIn = jl, t.easePolyOut = Hl, t.easePolyInOut = Xl, t.easeSin = jn, t.easeSinIn = function(t) {
  8881. return 1 - Math.cos(t * Vl)
  8882. }, t.easeSinOut = function(t) {
  8883. return Math.sin(t * Vl)
  8884. }, t.easeSinInOut = jn, t.easeExp = Hn, t.easeExpIn = function(t) {
  8885. return Math.pow(2, 10 * t - 10)
  8886. }, t.easeExpOut = function(t) {
  8887. return 1 - Math.pow(2, -10 * t)
  8888. }, t.easeExpInOut = Hn, t.easeCircle = Xn, t.easeCircleIn = function(t) {
  8889. return 1 - Math.sqrt(1 - t * t)
  8890. }, t.easeCircleOut = function(t) {
  8891. return Math.sqrt(1 - --t * t)
  8892. }, t.easeCircleInOut = Xn, t.easeBounce = Gn, t.easeBounceIn = function(t) {
  8893. return 1 - Gn(1 - t)
  8894. }, t.easeBounceOut = Gn, t.easeBounceInOut = function(t) {
  8895. return ((t *= 2) <= 1 ? 1 - Gn(1 - t) : Gn(t - 1) + 1) / 2
  8896. }, t.easeBack = ah, t.easeBackIn = ih, t.easeBackOut = oh, t.easeBackInOut = ah, t.easeElastic = ch, t.easeElasticIn = fh, t.easeElasticOut = ch, t.easeElasticInOut = sh, t.blob = function(t, n) {
  8897. return fetch(t, n).then(Ce)
  8898. }, t.buffer = function(t, n) {
  8899. return fetch(t, n).then(Pe)
  8900. }, t.dsv = function(t, n, e, r) {
  8901. 3 === arguments.length && "function" == typeof e && (r = e, e = void 0);
  8902. var i = ke(t);
  8903. return Re(n, e).then(function(t) {
  8904. return i.parse(t, r)
  8905. })
  8906. }, t.csv = Kh, t.tsv = td, t.image = function(t, n) {
  8907. return new Promise(function(e, r) {
  8908. var i = new Image;
  8909. for (var o in n) i[o] = n[o];
  8910. i.onerror = r, i.onload = function() {
  8911. e(i)
  8912. }, i.src = t
  8913. })
  8914. }, t.json = function(t, n) {
  8915. return fetch(t, n).then(De)
  8916. }, t.text = Re, t.xml = nd, t.html = ed, t.svg = rd, t.forceCenter = function(t, n) {
  8917. function e() {
  8918. var e, i, o = r.length,
  8919. a = 0,
  8920. u = 0;
  8921. for (e = 0; e < o; ++e) a += (i = r[e]).x, u += i.y;
  8922. for (a = a / o - t, u = u / o - n, e = 0; e < o; ++e)(i = r[e]).x -= a, i.y -= u
  8923. }
  8924. var r;
  8925. return null == t && (t = 0), null == n && (n = 0), e.initialize = function(t) {
  8926. r = t
  8927. }, e.x = function(n) {
  8928. return arguments.length ? (t = +n, e) : t
  8929. }, e.y = function(t) {
  8930. return arguments.length ? (n = +t, e) : n
  8931. }, e
  8932. }, t.forceCollide = function(t) {
  8933. function n() {
  8934. for (var t, n, r, f, c, s, l, h = i.length, d = 0; d < u; ++d)
  8935. for (n = je(i, Ge, Ve).visitAfter(e), t = 0; t < h; ++t) r = i[t], s = o[r.index], l = s * s, f = r.x + r.vx, c = r.y + r.vy, n.visit(function(t, n, e, i, o) {
  8936. var u = t.data,
  8937. h = t.r,
  8938. d = s + h;
  8939. if (!u) return n > f + d || i < f - d || e > c + d || o < c - d;
  8940. if (u.index > r.index) {
  8941. var p = f - u.x - u.vx,
  8942. v = c - u.y - u.vy,
  8943. g = p * p + v * v;
  8944. g < d * d && (0 === p && (p = Oe(), g += p * p), 0 === v && (v = Oe(), g += v * v), g = (d - (g = Math.sqrt(g))) / g * a, r.vx += (p *= g) * (d = (h *= h) / (l + h)), r.vy += (v *= g) * d, u.vx -= p * (d = 1 - d), u.vy -= v * d)
  8945. }
  8946. })
  8947. }
  8948. function e(t) {
  8949. if (t.data) return t.r = o[t.data.index];
  8950. for (var n = t.r = 0; n < 4; ++n) t[n] && t[n].r > t.r && (t.r = t[n].r)
  8951. }
  8952. function r() {
  8953. if (i) {
  8954. var n, e, r = i.length;
  8955. for (o = new Array(r), n = 0; n < r; ++n) e = i[n], o[e.index] = +t(e, n, i)
  8956. }
  8957. }
  8958. var i, o, a = 1,
  8959. u = 1;
  8960. return "function" != typeof t && (t = qe(null == t ? 1 : +t)), n.initialize = function(t) {
  8961. i = t, r()
  8962. }, n.iterations = function(t) {
  8963. return arguments.length ? (u = +t, n) : u
  8964. }, n.strength = function(t) {
  8965. return arguments.length ? (a = +t, n) : a
  8966. }, n.radius = function(e) {
  8967. return arguments.length ? (t = "function" == typeof e ? e : qe(+e), r(), n) : t
  8968. }, n
  8969. }, t.forceLink = function(t) {
  8970. function n(n) {
  8971. for (var e = 0, r = t.length; e < d; ++e)
  8972. for (var i, u, f, s, l, h, p, v = 0; v < r; ++v) u = (i = t[v]).source, s = (f = i.target).x + f.vx - u.x - u.vx || Oe(), l = f.y + f.vy - u.y - u.vy || Oe(), s *= h = ((h = Math.sqrt(s * s + l * l)) - a[v]) / h * n * o[v], l *= h, f.vx -= s * (p = c[v]), f.vy -= l * p, u.vx += s * (p = 1 - p), u.vy += l * p
  8973. }
  8974. function e() {
  8975. if (u) {
  8976. var n, e, l = u.length,
  8977. h = t.length,
  8978. d = he(u, s);
  8979. for (n = 0, f = new Array(l); n < h; ++n)(e = t[n]).index = n, "object" != typeof e.source && (e.source = We(d, e.source)), "object" != typeof e.target && (e.target = We(d, e.target)), f[e.source.index] = (f[e.source.index] || 0) + 1, f[e.target.index] = (f[e.target.index] || 0) + 1;
  8980. for (n = 0, c = new Array(h); n < h; ++n) e = t[n], c[n] = f[e.source.index] / (f[e.source.index] + f[e.target.index]);
  8981. o = new Array(h), r(), a = new Array(h), i()
  8982. }
  8983. }
  8984. function r() {
  8985. if (u)
  8986. for (var n = 0, e = t.length; n < e; ++n) o[n] = +l(t[n], n, t)
  8987. }
  8988. function i() {
  8989. if (u)
  8990. for (var n = 0, e = t.length; n < e; ++n) a[n] = +h(t[n], n, t)
  8991. }
  8992. var o, a, u, f, c, s = $e,
  8993. l = function(t) {
  8994. return 1 / Math.min(f[t.source.index], f[t.target.index])
  8995. },
  8996. h = qe(30),
  8997. d = 1;
  8998. return null == t && (t = []), n.initialize = function(t) {
  8999. u = t, e()
  9000. }, n.links = function(r) {
  9001. return arguments.length ? (t = r, e(), n) : t
  9002. }, n.id = function(t) {
  9003. return arguments.length ? (s = t, n) : s
  9004. }, n.iterations = function(t) {
  9005. return arguments.length ? (d = +t, n) : d
  9006. }, n.strength = function(t) {
  9007. return arguments.length ? (l = "function" == typeof t ? t : qe(+t), r(), n) : l
  9008. }, n.distance = function(t) {
  9009. return arguments.length ? (h = "function" == typeof t ? t : qe(+t), i(), n) : h
  9010. }, n
  9011. }, t.forceManyBody = function() {
  9012. function t(t) {
  9013. var n, u = i.length,
  9014. f = je(i, Ze, Qe).visitAfter(e);
  9015. for (a = t, n = 0; n < u; ++n) o = i[n], f.visit(r)
  9016. }
  9017. function n() {
  9018. if (i) {
  9019. var t, n, e = i.length;
  9020. for (u = new Array(e), t = 0; t < e; ++t) n = i[t], u[n.index] = +f(n, t, i)
  9021. }
  9022. }
  9023. function e(t) {
  9024. var n, e, r, i, o, a = 0,
  9025. f = 0;
  9026. if (t.length) {
  9027. for (r = i = o = 0; o < 4; ++o)(n = t[o]) && (e = Math.abs(n.value)) && (a += n.value, f += e, r += e * n.x, i += e * n.y);
  9028. t.x = r / f, t.y = i / f
  9029. } else {
  9030. (n = t).x = n.data.x, n.y = n.data.y;
  9031. do {
  9032. a += u[n.data.index]
  9033. } while (n = n.next)
  9034. }
  9035. t.value = a
  9036. }
  9037. function r(t, n, e, r) {
  9038. if (!t.value) return !0;
  9039. var i = t.x - o.x,
  9040. f = t.y - o.y,
  9041. h = r - n,
  9042. d = i * i + f * f;
  9043. if (h * h / l < d) return d < s && (0 === i && (i = Oe(), d += i * i), 0 === f && (f = Oe(), d += f * f), d < c && (d = Math.sqrt(c * d)), o.vx += i * t.value * a / d, o.vy += f * t.value * a / d), !0;
  9044. if (!(t.length || d >= s)) {
  9045. (t.data !== o || t.next) && (0 === i && (i = Oe(), d += i * i), 0 === f && (f = Oe(), d += f * f), d < c && (d = Math.sqrt(c * d)));
  9046. do {
  9047. t.data !== o && (h = u[t.data.index] * a / d, o.vx += i * h, o.vy += f * h)
  9048. } while (t = t.next)
  9049. }
  9050. }
  9051. var i, o, a, u, f = qe(-30),
  9052. c = 1,
  9053. s = 1 / 0,
  9054. l = .81;
  9055. return t.initialize = function(t) {
  9056. i = t, n()
  9057. }, t.strength = function(e) {
  9058. return arguments.length ? (f = "function" == typeof e ? e : qe(+e), n(), t) : f
  9059. }, t.distanceMin = function(n) {
  9060. return arguments.length ? (c = n * n, t) : Math.sqrt(c)
  9061. }, t.distanceMax = function(n) {
  9062. return arguments.length ? (s = n * n, t) : Math.sqrt(s)
  9063. }, t.theta = function(n) {
  9064. return arguments.length ? (l = n * n, t) : Math.sqrt(l)
  9065. }, t
  9066. }, t.forceRadial = function(t, n, e) {
  9067. function r(t) {
  9068. for (var r = 0, i = o.length; r < i; ++r) {
  9069. var f = o[r],
  9070. c = f.x - n || 1e-6,
  9071. s = f.y - e || 1e-6,
  9072. l = Math.sqrt(c * c + s * s),
  9073. h = (u[r] - l) * a[r] * t / l;
  9074. f.vx += c * h, f.vy += s * h
  9075. }
  9076. }
  9077. function i() {
  9078. if (o) {
  9079. var n, e = o.length;
  9080. for (a = new Array(e), u = new Array(e), n = 0; n < e; ++n) u[n] = +t(o[n], n, o), a[n] = isNaN(u[n]) ? 0 : +f(o[n], n, o)
  9081. }
  9082. }
  9083. var o, a, u, f = qe(.1);
  9084. return "function" != typeof t && (t = qe(+t)), null == n && (n = 0), null == e && (e = 0), r.initialize = function(t) {
  9085. o = t, i()
  9086. }, r.strength = function(t) {
  9087. return arguments.length ? (f = "function" == typeof t ? t : qe(+t), i(), r) : f
  9088. }, r.radius = function(n) {
  9089. return arguments.length ? (t = "function" == typeof n ? n : qe(+n), i(), r) : t
  9090. }, r.x = function(t) {
  9091. return arguments.length ? (n = +t, r) : n
  9092. }, r.y = function(t) {
  9093. return arguments.length ? (e = +t, r) : e
  9094. }, r
  9095. }, t.forceSimulation = function(t) {
  9096. function n() {
  9097. e(), d.call("tick", o), a < u && (h.stop(), d.call("end", o))
  9098. }
  9099. function e() {
  9100. var n, e, r = t.length;
  9101. for (a += (c - a) * f, l.each(function(t) {
  9102. t(a)
  9103. }), n = 0; n < r; ++n) null == (e = t[n]).fx ? e.x += e.vx *= s : (e.x = e.fx, e.vx = 0), null == e.fy ? e.y += e.vy *= s : (e.y = e.fy, e.vy = 0)
  9104. }
  9105. function r() {
  9106. for (var n, e = 0, r = t.length; e < r; ++e) {
  9107. if (n = t[e], n.index = e, isNaN(n.x) || isNaN(n.y)) {
  9108. var i = od * Math.sqrt(e),
  9109. o = e * ad;
  9110. n.x = i * Math.cos(o), n.y = i * Math.sin(o)
  9111. }(isNaN(n.vx) || isNaN(n.vy)) && (n.vx = n.vy = 0)
  9112. }
  9113. }
  9114. function i(n) {
  9115. return n.initialize && n.initialize(t), n
  9116. }
  9117. var o, a = 1,
  9118. u = .001,
  9119. f = 1 - Math.pow(u, 1 / 300),
  9120. c = 0,
  9121. s = .6,
  9122. l = he(),
  9123. h = Tn(n),
  9124. d = N("tick", "end");
  9125. return null == t && (t = []), r(), o = {
  9126. tick: e,
  9127. restart: function() {
  9128. return h.restart(n), o
  9129. },
  9130. stop: function() {
  9131. return h.stop(), o
  9132. },
  9133. nodes: function(n) {
  9134. return arguments.length ? (t = n, r(), l.each(i), o) : t
  9135. },
  9136. alpha: function(t) {
  9137. return arguments.length ? (a = +t, o) : a
  9138. },
  9139. alphaMin: function(t) {
  9140. return arguments.length ? (u = +t, o) : u
  9141. },
  9142. alphaDecay: function(t) {
  9143. return arguments.length ? (f = +t, o) : +f
  9144. },
  9145. alphaTarget: function(t) {
  9146. return arguments.length ? (c = +t, o) : c
  9147. },
  9148. velocityDecay: function(t) {
  9149. return arguments.length ? (s = 1 - t, o) : 1 - s
  9150. },
  9151. force: function(t, n) {
  9152. return arguments.length > 1 ? (null == n ? l.remove(t) : l.set(t, i(n)), o) : l.get(t)
  9153. },
  9154. find: function(n, e, r) {
  9155. var i, o, a, u, f, c = 0,
  9156. s = t.length;
  9157. for (null == r ? r = 1 / 0 : r *= r, c = 0; c < s; ++c)(a = (i = n - (u = t[c]).x) * i + (o = e - u.y) * o) < r && (f = u, r = a);
  9158. return f
  9159. },
  9160. on: function(t, n) {
  9161. return arguments.length > 1 ? (d.on(t, n), o) : d.on(t)
  9162. }
  9163. }
  9164. }, t.forceX = function(t) {
  9165. function n(t) {
  9166. for (var n, e = 0, a = r.length; e < a; ++e)(n = r[e]).vx += (o[e] - n.x) * i[e] * t
  9167. }
  9168. function e() {
  9169. if (r) {
  9170. var n, e = r.length;
  9171. for (i = new Array(e), o = new Array(e), n = 0; n < e; ++n) i[n] = isNaN(o[n] = +t(r[n], n, r)) ? 0 : +a(r[n], n, r)
  9172. }
  9173. }
  9174. var r, i, o, a = qe(.1);
  9175. return "function" != typeof t && (t = qe(null == t ? 0 : +t)), n.initialize = function(t) {
  9176. r = t, e()
  9177. }, n.strength = function(t) {
  9178. return arguments.length ? (a = "function" == typeof t ? t : qe(+t), e(), n) : a
  9179. }, n.x = function(r) {
  9180. return arguments.length ? (t = "function" == typeof r ? r : qe(+r), e(), n) : t
  9181. }, n
  9182. }, t.forceY = function(t) {
  9183. function n(t) {
  9184. for (var n, e = 0, a = r.length; e < a; ++e)(n = r[e]).vy += (o[e] - n.y) * i[e] * t
  9185. }
  9186. function e() {
  9187. if (r) {
  9188. var n, e = r.length;
  9189. for (i = new Array(e), o = new Array(e), n = 0; n < e; ++n) i[n] = isNaN(o[n] = +t(r[n], n, r)) ? 0 : +a(r[n], n, r)
  9190. }
  9191. }
  9192. var r, i, o, a = qe(.1);
  9193. return "function" != typeof t && (t = qe(null == t ? 0 : +t)), n.initialize = function(t) {
  9194. r = t, e()
  9195. }, n.strength = function(t) {
  9196. return arguments.length ? (a = "function" == typeof t ? t : qe(+t), e(), n) : a
  9197. }, n.y = function(r) {
  9198. return arguments.length ? (t = "function" == typeof r ? r : qe(+r), e(), n) : t
  9199. }, n
  9200. }, t.formatDefaultLocale = or, t.formatLocale = ir, t.formatSpecifier = tr, t.precisionFixed = ar, t.precisionPrefix = ur, t.precisionRound = fr, t.geoArea = function(t) {
  9201. return dp.reset(), br(t, pp), 2 * dp
  9202. }, t.geoBounds = function(t) {
  9203. var n, e, r, i, o, a, u;
  9204. if (md = bd = -(yd = _d = 1 / 0), Td = [], br(t, gp), e = Td.length) {
  9205. for (Td.sort(Yr), n = 1, o = [r = Td[0]]; n < e; ++n) Br(r, (i = Td[n])[0]) || Br(r, i[1]) ? (Or(r[0], i[1]) > Or(r[0], r[1]) && (r[1] = i[1]), Or(i[0], r[1]) > Or(r[0], r[1]) && (r[0] = i[0])) : o.push(r = i);
  9206. for (a = -1 / 0, n = 0, r = o[e = o.length - 1]; n <= e; r = i, ++n) i = o[n], (u = Or(r[1], i[0])) > a && (a = u, yd = i[0], bd = r[1])
  9207. }
  9208. return Td = Nd = null, yd === 1 / 0 || _d === 1 / 0 ? [
  9209. [NaN, NaN],
  9210. [NaN, NaN]
  9211. ] : [
  9212. [yd, _d],
  9213. [bd, md]
  9214. ]
  9215. }, t.geoCentroid = function(t) {
  9216. Sd = Ed = kd = Cd = Pd = zd = Rd = Ld = Dd = Ud = qd = 0, br(t, yp);
  9217. var n = Dd,
  9218. e = Ud,
  9219. r = qd,
  9220. i = n * n + e * e + r * r;
  9221. return i < Xd && (n = zd, e = Rd, r = Ld, Ed < Hd && (n = kd, e = Cd, r = Pd), (i = n * n + e * e + r * r) < Xd) ? [NaN, NaN] : [tp(e, n) * Zd, dr(r / fp(i)) * Zd]
  9222. }, t.geoCircle = function() {
  9223. function t() {
  9224. var t = r.apply(this, arguments),
  9225. u = i.apply(this, arguments) * Qd,
  9226. f = o.apply(this, arguments) * Qd;
  9227. return n = [], e = ti(-t[0] * Qd, -t[1] * Qd, 0).invert, oi(a, u, f, 1), t = {
  9228. type: "Polygon",
  9229. coordinates: [n]
  9230. }, n = e = null, t
  9231. }
  9232. var n, e, r = Qr([0, 0]),
  9233. i = Qr(90),
  9234. o = Qr(6),
  9235. a = {
  9236. point: function(t, r) {
  9237. n.push(t = e(t, r)), t[0] *= Zd, t[1] *= Zd
  9238. }
  9239. };
  9240. return t.center = function(n) {
  9241. return arguments.length ? (r = "function" == typeof n ? n : Qr([+n[0], +n[1]]), t) : r
  9242. }, t.radius = function(n) {
  9243. return arguments.length ? (i = "function" == typeof n ? n : Qr(+n), t) : i
  9244. }, t.precision = function(n) {
  9245. return arguments.length ? (o = "function" == typeof n ? n : Qr(+n), t) : o
  9246. }, t
  9247. }, t.geoClipAntimeridian = Cp, t.geoClipCircle = gi, t.geoClipExtent = function() {
  9248. var t, n, e, r = 0,
  9249. i = 0,
  9250. o = 960,
  9251. a = 500;
  9252. return e = {
  9253. stream: function(e) {
  9254. return t && n === e ? t : t = yi(r, i, o, a)(n = e)
  9255. },
  9256. extent: function(u) {
  9257. return arguments.length ? (r = +u[0][0], i = +u[0][1], o = +u[1][0], a = +u[1][1], t = n = null, e) : [
  9258. [r, i],
  9259. [o, a]
  9260. ]
  9261. }
  9262. }
  9263. }, t.geoClipRectangle = yi, t.geoContains = function(t, n) {
  9264. return (t && qp.hasOwnProperty(t.type) ? qp[t.type] : Mi)(t, n)
  9265. }, t.geoDistance = wi, t.geoGraticule = Pi, t.geoGraticule10 = function() {
  9266. return Pi()()
  9267. }, t.geoInterpolate = function(t, n) {
  9268. var e = t[0] * Qd,
  9269. r = t[1] * Qd,
  9270. i = n[0] * Qd,
  9271. o = n[1] * Qd,
  9272. a = np(r),
  9273. u = ap(r),
  9274. f = np(o),
  9275. c = ap(o),
  9276. s = a * np(e),
  9277. l = a * ap(e),
  9278. h = f * np(i),
  9279. d = f * ap(i),
  9280. p = 2 * dr(fp(pr(o - r) + a * f * pr(i - e))),
  9281. v = ap(p),
  9282. g = p ? function(t) {
  9283. var n = ap(t *= p) / v,
  9284. e = ap(p - t) / v,
  9285. r = e * s + n * h,
  9286. i = e * l + n * d,
  9287. o = e * u + n * c;
  9288. return [tp(i, r) * Zd, tp(o, fp(r * r + i * i)) * Zd]
  9289. } : function() {
  9290. return [e * Zd, r * Zd]
  9291. };
  9292. return g.distance = p, g
  9293. }, t.geoLength = xi, t.geoPath = function(t, n) {
  9294. function e(t) {
  9295. return t && ("function" == typeof o && i.pointRadius(+o.apply(this, arguments)), br(t, r(i))), i.result()
  9296. }
  9297. var r, i, o = 4.5;
  9298. return e.area = function(t) {
  9299. return br(t, r(Fp)), Fp.result()
  9300. }, e.measure = function(t) {
  9301. return br(t, r(cv)), cv.result()
  9302. }, e.bounds = function(t) {
  9303. return br(t, r(Gp)), Gp.result()
  9304. }, e.centroid = function(t) {
  9305. return br(t, r(ev)), ev.result()
  9306. }, e.projection = function(n) {
  9307. return arguments.length ? (r = null == n ? (t = null, zi) : (t = n).stream, e) : t
  9308. }, e.context = function(t) {
  9309. return arguments.length ? (i = null == t ? (n = null, new Wi) : new Gi(n = t), "function" != typeof o && i.pointRadius(o), e) : n
  9310. }, e.pointRadius = function(t) {
  9311. return arguments.length ? (o = "function" == typeof t ? t : (i.pointRadius(+t), +t), e) : o
  9312. }, e.projection(t).context(n)
  9313. }, t.geoAlbers = lo, t.geoAlbersUsa = function() {
  9314. function t(t) {
  9315. var n = t[0],
  9316. e = t[1];
  9317. return u = null, i.point(n, e), u || (o.point(n, e), u) || (a.point(n, e), u)
  9318. }
  9319. function n() {
  9320. return e = r = null, t
  9321. }
  9322. var e, r, i, o, a, u, f = lo(),
  9323. c = so().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]),
  9324. s = so().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]),
  9325. l = {
  9326. point: function(t, n) {
  9327. u = [t, n]
  9328. }
  9329. };
  9330. return t.invert = function(t) {
  9331. var n = f.scale(),
  9332. e = f.translate(),
  9333. r = (t[0] - e[0]) / n,
  9334. i = (t[1] - e[1]) / n;
  9335. return (i >= .12 && i < .234 && r >= -.425 && r < -.214 ? c : i >= .166 && i < .234 && r >= -.214 && r < -.115 ? s : f).invert(t)
  9336. }, t.stream = function(t) {
  9337. return e && r === t ? e : e = function(t) {
  9338. var n = t.length;
  9339. return {
  9340. point: function(e, r) {
  9341. for (var i = -1; ++i < n;) t[i].point(e, r)
  9342. },
  9343. sphere: function() {
  9344. for (var e = -1; ++e < n;) t[e].sphere()
  9345. },
  9346. lineStart: function() {
  9347. for (var e = -1; ++e < n;) t[e].lineStart()
  9348. },
  9349. lineEnd: function() {
  9350. for (var e = -1; ++e < n;) t[e].lineEnd()
  9351. },
  9352. polygonStart: function() {
  9353. for (var e = -1; ++e < n;) t[e].polygonStart()
  9354. },
  9355. polygonEnd: function() {
  9356. for (var e = -1; ++e < n;) t[e].polygonEnd()
  9357. }
  9358. }
  9359. }([f.stream(r = t), c.stream(t), s.stream(t)])
  9360. }, t.precision = function(t) {
  9361. return arguments.length ? (f.precision(t), c.precision(t), s.precision(t), n()) : f.precision()
  9362. }, t.scale = function(n) {
  9363. return arguments.length ? (f.scale(n), c.scale(.35 * n), s.scale(n), t.translate(f.translate())) : f.scale()
  9364. }, t.translate = function(t) {
  9365. if (!arguments.length) return f.translate();
  9366. var e = f.scale(),
  9367. r = +t[0],
  9368. u = +t[1];
  9369. return i = f.translate(t).clipExtent([
  9370. [r - .455 * e, u - .238 * e],
  9371. [r + .455 * e, u + .238 * e]
  9372. ]).stream(l), o = c.translate([r - .307 * e, u + .201 * e]).clipExtent([
  9373. [r - .425 * e + Hd, u + .12 * e + Hd],
  9374. [r - .214 * e - Hd, u + .234 * e - Hd]
  9375. ]).stream(l), a = s.translate([r - .205 * e, u + .212 * e]).clipExtent([
  9376. [r - .214 * e + Hd, u + .166 * e + Hd],
  9377. [r - .115 * e - Hd, u + .234 * e - Hd]
  9378. ]).stream(l), n()
  9379. }, t.fitExtent = function(n, e) {
  9380. return to(t, n, e)
  9381. }, t.fitSize = function(n, e) {
  9382. return no(t, n, e)
  9383. }, t.fitWidth = function(n, e) {
  9384. return eo(t, n, e)
  9385. }, t.fitHeight = function(n, e) {
  9386. return ro(t, n, e)
  9387. }, t.scale(1070)
  9388. }, t.geoAzimuthalEqualArea = function() {
  9389. return ao(dv).scale(124.75).clipAngle(179.999)
  9390. }, t.geoAzimuthalEqualAreaRaw = dv, t.geoAzimuthalEquidistant = function() {
  9391. return ao(pv).scale(79.4188).clipAngle(179.999)
  9392. }, t.geoAzimuthalEquidistantRaw = pv, t.geoConicConformal = function() {
  9393. return fo(_o).scale(109.5).parallels([30, 30])
  9394. }, t.geoConicConformalRaw = _o, t.geoConicEqualArea = so, t.geoConicEqualAreaRaw = co, t.geoConicEquidistant = function() {
  9395. return fo(mo).scale(131.154).center([0, 13.9389])
  9396. }, t.geoConicEquidistantRaw = mo, t.geoEquirectangular = function() {
  9397. return ao(bo).scale(152.63)
  9398. }, t.geoEquirectangularRaw = bo, t.geoGnomonic = function() {
  9399. return ao(xo).scale(144.049).clipAngle(60)
  9400. }, t.geoGnomonicRaw = xo, t.geoIdentity = function() {
  9401. function t() {
  9402. return i = o = null, a
  9403. }
  9404. var n, e, r, i, o, a, u = 1,
  9405. f = 0,
  9406. c = 0,
  9407. s = 1,
  9408. l = 1,
  9409. h = zi,
  9410. d = null,
  9411. p = zi;
  9412. return a = {
  9413. stream: function(t) {
  9414. return i && o === t ? i : i = h(p(o = t))
  9415. },
  9416. postclip: function(i) {
  9417. return arguments.length ? (p = i, d = n = e = r = null, t()) : p
  9418. },
  9419. clipExtent: function(i) {
  9420. return arguments.length ? (p = null == i ? (d = n = e = r = null, zi) : yi(d = +i[0][0], n = +i[0][1], e = +i[1][0], r = +i[1][1]), t()) : null == d ? null : [
  9421. [d, n],
  9422. [e, r]
  9423. ]
  9424. },
  9425. scale: function(n) {
  9426. return arguments.length ? (h = wo((u = +n) * s, u * l, f, c), t()) : u
  9427. },
  9428. translate: function(n) {
  9429. return arguments.length ? (h = wo(u * s, u * l, f = +n[0], c = +n[1]), t()) : [f, c]
  9430. },
  9431. reflectX: function(n) {
  9432. return arguments.length ? (h = wo(u * (s = n ? -1 : 1), u * l, f, c), t()) : s < 0
  9433. },
  9434. reflectY: function(n) {
  9435. return arguments.length ? (h = wo(u * s, u * (l = n ? -1 : 1), f, c), t()) : l < 0
  9436. },
  9437. fitExtent: function(t, n) {
  9438. return to(a, t, n)
  9439. },
  9440. fitSize: function(t, n) {
  9441. return no(a, t, n)
  9442. },
  9443. fitWidth: function(t, n) {
  9444. return eo(a, t, n)
  9445. },
  9446. fitHeight: function(t, n) {
  9447. return ro(a, t, n)
  9448. }
  9449. }
  9450. }, t.geoProjection = ao, t.geoProjectionMutator = uo, t.geoMercator = function() {
  9451. return go(vo).scale(961 / Wd)
  9452. }, t.geoMercatorRaw = vo, t.geoNaturalEarth1 = function() {
  9453. return ao(Mo).scale(175.295)
  9454. }, t.geoNaturalEarth1Raw = Mo, t.geoOrthographic = function() {
  9455. return ao(Ao).scale(249.5).clipAngle(90 + Hd)
  9456. }, t.geoOrthographicRaw = Ao, t.geoStereographic = function() {
  9457. return ao(To).scale(250).clipAngle(142)
  9458. }, t.geoStereographicRaw = To, t.geoTransverseMercator = function() {
  9459. var t = go(No),
  9460. n = t.center,
  9461. e = t.rotate;
  9462. return t.center = function(t) {
  9463. return arguments.length ? n([-t[1], t[0]]) : (t = n(), [t[1], -t[0]])
  9464. }, t.rotate = function(t) {
  9465. return arguments.length ? e([t[0], t[1], t.length > 2 ? t[2] + 90 : 90]) : (t = e(), [t[0], t[1], t[2] - 90])
  9466. }, e([0, 0, 90]).scale(159.155)
  9467. }, t.geoTransverseMercatorRaw = No, t.geoRotation = ii, t.geoStream = br, t.geoTransform = function(t) {
  9468. return {
  9469. stream: Qi(t)
  9470. }
  9471. }, t.cluster = function() {
  9472. function t(t) {
  9473. var o, a = 0;
  9474. t.eachAfter(function(t) {
  9475. var e = t.children;
  9476. e ? (t.x = function(t) {
  9477. return t.reduce(Eo, 0) / t.length
  9478. }(e), t.y = function(t) {
  9479. return 1 + t.reduce(ko, 0)
  9480. }(e)) : (t.x = o ? a += n(t, o) : 0, t.y = 0, o = t)
  9481. });
  9482. var u = function(t) {
  9483. for (var n; n = t.children;) t = n[0];
  9484. return t
  9485. }(t),
  9486. f = function(t) {
  9487. for (var n; n = t.children;) t = n[n.length - 1];
  9488. return t
  9489. }(t),
  9490. c = u.x - n(u, f) / 2,
  9491. s = f.x + n(f, u) / 2;
  9492. return t.eachAfter(i ? function(n) {
  9493. n.x = (n.x - t.x) * e, n.y = (t.y - n.y) * r
  9494. } : function(n) {
  9495. n.x = (n.x - c) / (s - c) * e, n.y = (1 - (t.y ? n.y / t.y : 1)) * r
  9496. })
  9497. }
  9498. var n = So,
  9499. e = 1,
  9500. r = 1,
  9501. i = !1;
  9502. return t.separation = function(e) {
  9503. return arguments.length ? (n = e, t) : n
  9504. }, t.size = function(n) {
  9505. return arguments.length ? (i = !1, e = +n[0], r = +n[1], t) : i ? null : [e, r]
  9506. }, t.nodeSize = function(n) {
  9507. return arguments.length ? (i = !0, e = +n[0], r = +n[1], t) : i ? [e, r] : null
  9508. }, t
  9509. }, t.hierarchy = Po, t.pack = function() {
  9510. function t(t) {
  9511. return t.x = e / 2, t.y = r / 2, n ? t.eachBefore(Qo(n)).eachAfter(Jo(i, .5)).eachBefore(Ko(1)) : t.eachBefore(Qo(Zo)).eachAfter(Jo($o, 1)).eachAfter(Jo(i, t.r / Math.min(e, r))).eachBefore(Ko(Math.min(e, r) / (2 * t.r))), t
  9512. }
  9513. var n = null,
  9514. e = 1,
  9515. r = 1,
  9516. i = $o;
  9517. return t.radius = function(e) {
  9518. return arguments.length ? (n = function(t) {
  9519. return null == t ? null : Vo(t)
  9520. }(e), t) : n
  9521. }, t.size = function(n) {
  9522. return arguments.length ? (e = +n[0], r = +n[1], t) : [e, r]
  9523. }, t.padding = function(n) {
  9524. return arguments.length ? (i = "function" == typeof n ? n : Wo(+n), t) : i
  9525. }, t
  9526. }, t.packSiblings = function(t) {
  9527. return Go(t), t
  9528. }, t.packEnclose = Uo, t.partition = function() {
  9529. function t(t) {
  9530. var o = t.height + 1;
  9531. return t.x0 = t.y0 = r, t.x1 = n, t.y1 = e / o, t.eachBefore(function(t, n) {
  9532. return function(e) {
  9533. e.children && na(e, e.x0, t * (e.depth + 1) / n, e.x1, t * (e.depth + 2) / n);
  9534. var i = e.x0,
  9535. o = e.y0,
  9536. a = e.x1 - r,
  9537. u = e.y1 - r;
  9538. a < i && (i = a = (i + a) / 2), u < o && (o = u = (o + u) / 2), e.x0 = i, e.y0 = o, e.x1 = a, e.y1 = u
  9539. }
  9540. }(e, o)), i && t.eachBefore(ta), t
  9541. }
  9542. var n = 1,
  9543. e = 1,
  9544. r = 0,
  9545. i = !1;
  9546. return t.round = function(n) {
  9547. return arguments.length ? (i = !!n, t) : i
  9548. }, t.size = function(r) {
  9549. return arguments.length ? (n = +r[0], e = +r[1], t) : [n, e]
  9550. }, t.padding = function(n) {
  9551. return arguments.length ? (r = +n, t) : r
  9552. }, t
  9553. }, t.stratify = function() {
  9554. function t(t) {
  9555. var r, i, o, a, u, f, c, s = t.length,
  9556. l = new Array(s),
  9557. h = {};
  9558. for (i = 0; i < s; ++i) r = t[i], u = l[i] = new Do(r), null != (f = n(r, i, t)) && (f += "") && (h[c = gv + (u.id = f)] = c in h ? _v : u);
  9559. for (i = 0; i < s; ++i)
  9560. if (u = l[i], null != (f = e(t[i], i, t)) && (f += "")) {
  9561. if (!(a = h[gv + f])) throw new Error("missing: " + f);
  9562. if (a === _v) throw new Error("ambiguous: " + f);
  9563. a.children ? a.children.push(u) : a.children = [u], u.parent = a
  9564. } else {
  9565. if (o) throw new Error("multiple roots");
  9566. o = u
  9567. }
  9568. if (!o) throw new Error("no root");
  9569. if (o.parent = yv, o.eachBefore(function(t) {
  9570. t.depth = t.parent.depth + 1, --s
  9571. }).eachBefore(Lo), o.parent = null, s > 0) throw new Error("cycle");
  9572. return o
  9573. }
  9574. var n = ea,
  9575. e = ra;
  9576. return t.id = function(e) {
  9577. return arguments.length ? (n = Vo(e), t) : n
  9578. }, t.parentId = function(n) {
  9579. return arguments.length ? (e = Vo(n), t) : e
  9580. }, t
  9581. }, t.tree = function() {
  9582. function t(t) {
  9583. var f = function(t) {
  9584. for (var n, e, r, i, o, a = new ca(t, 0), u = [a]; n = u.pop();)
  9585. if (r = n._.children)
  9586. for (n.children = new Array(o = r.length), i = o - 1; i >= 0; --i) u.push(e = n.children[i] = new ca(r[i], i)), e.parent = n;
  9587. return (a.parent = new ca(null, 0)).children = [a], a
  9588. }(t);
  9589. if (f.eachAfter(n), f.parent.m = -f.z, f.eachBefore(e), u) t.eachBefore(r);
  9590. else {
  9591. var c = t,
  9592. s = t,
  9593. l = t;
  9594. t.eachBefore(function(t) {
  9595. t.x < c.x && (c = t), t.x > s.x && (s = t), t.depth > l.depth && (l = t)
  9596. });
  9597. var h = c === s ? 1 : i(c, s) / 2,
  9598. d = h - c.x,
  9599. p = o / (s.x + h + d),
  9600. v = a / (l.depth || 1);
  9601. t.eachBefore(function(t) {
  9602. t.x = (t.x + d) * p, t.y = t.depth * v
  9603. })
  9604. }
  9605. return t
  9606. }
  9607. function n(t) {
  9608. var n = t.children,
  9609. e = t.parent.children,
  9610. r = t.i ? e[t.i - 1] : null;
  9611. if (n) {
  9612. (function(t) {
  9613. for (var n, e = 0, r = 0, i = t.children, o = i.length; --o >= 0;)(n = i[o]).z += e, n.m += e, e += n.s + (r += n.c)
  9614. })(t);
  9615. var o = (n[0].z + n[n.length - 1].z) / 2;
  9616. r ? (t.z = r.z + i(t._, r._), t.m = t.z - o) : t.z = o
  9617. } else r && (t.z = r.z + i(t._, r._));
  9618. t.parent.A = function(t, n, e) {
  9619. if (n) {
  9620. for (var r, o = t, a = t, u = n, f = o.parent.children[0], c = o.m, s = a.m, l = u.m, h = f.m; u = aa(u), o = oa(o), u && o;) f = oa(f), (a = aa(a)).a = t, (r = u.z + l - o.z - c + i(u._, o._)) > 0 && (ua(fa(u, t, e), t, r), c += r, s += r), l += u.m, c += o.m, h += f.m, s += a.m;
  9621. u && !aa(a) && (a.t = u, a.m += l - s), o && !oa(f) && (f.t = o, f.m += c - h, e = t)
  9622. }
  9623. return e
  9624. }(t, r, t.parent.A || e[0])
  9625. }
  9626. function e(t) {
  9627. t._.x = t.z + t.parent.m, t.m += t.parent.m
  9628. }
  9629. function r(t) {
  9630. t.x *= o, t.y = t.depth * a
  9631. }
  9632. var i = ia,
  9633. o = 1,
  9634. a = 1,
  9635. u = null;
  9636. return t.separation = function(n) {
  9637. return arguments.length ? (i = n, t) : i
  9638. }, t.size = function(n) {
  9639. return arguments.length ? (u = !1, o = +n[0], a = +n[1], t) : u ? null : [o, a]
  9640. }, t.nodeSize = function(n) {
  9641. return arguments.length ? (u = !0, o = +n[0], a = +n[1], t) : u ? [o, a] : null
  9642. }, t
  9643. }, t.treemap = function() {
  9644. function t(t) {
  9645. return t.x0 = t.y0 = 0, t.x1 = i, t.y1 = o, t.eachBefore(n), a = [0], r && t.eachBefore(ta), t
  9646. }
  9647. function n(t) {
  9648. var n = a[t.depth],
  9649. r = t.x0 + n,
  9650. i = t.y0 + n,
  9651. o = t.x1 - n,
  9652. h = t.y1 - n;
  9653. o < r && (r = o = (r + o) / 2), h < i && (i = h = (i + h) / 2), t.x0 = r, t.y0 = i, t.x1 = o, t.y1 = h, t.children && (n = a[t.depth + 1] = u(t) / 2, r += l(t) - n, i += f(t) - n, o -= c(t) - n, h -= s(t) - n, o < r && (r = o = (r + o) / 2), h < i && (i = h = (i + h) / 2), e(t, r, i, o, h))
  9654. }
  9655. var e = mv,
  9656. r = !1,
  9657. i = 1,
  9658. o = 1,
  9659. a = [0],
  9660. u = $o,
  9661. f = $o,
  9662. c = $o,
  9663. s = $o,
  9664. l = $o;
  9665. return t.round = function(n) {
  9666. return arguments.length ? (r = !!n, t) : r
  9667. }, t.size = function(n) {
  9668. return arguments.length ? (i = +n[0], o = +n[1], t) : [i, o]
  9669. }, t.tile = function(n) {
  9670. return arguments.length ? (e = Vo(n), t) : e
  9671. }, t.padding = function(n) {
  9672. return arguments.length ? t.paddingInner(n).paddingOuter(n) : t.paddingInner()
  9673. }, t.paddingInner = function(n) {
  9674. return arguments.length ? (u = "function" == typeof n ? n : Wo(+n), t) : u
  9675. }, t.paddingOuter = function(n) {
  9676. return arguments.length ? t.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n) : t.paddingTop()
  9677. }, t.paddingTop = function(n) {
  9678. return arguments.length ? (f = "function" == typeof n ? n : Wo(+n), t) : f
  9679. }, t.paddingRight = function(n) {
  9680. return arguments.length ? (c = "function" == typeof n ? n : Wo(+n), t) : c
  9681. }, t.paddingBottom = function(n) {
  9682. return arguments.length ? (s = "function" == typeof n ? n : Wo(+n), t) : s
  9683. }, t.paddingLeft = function(n) {
  9684. return arguments.length ? (l = "function" == typeof n ? n : Wo(+n), t) : l
  9685. }, t
  9686. }, t.treemapBinary = function(t, n, e, r, i) {
  9687. function o(t, n, e, r, i, a, u) {
  9688. if (t >= n - 1) {
  9689. var c = f[t];
  9690. return c.x0 = r, c.y0 = i, c.x1 = a, void(c.y1 = u)
  9691. }
  9692. for (var l = s[t], h = e / 2 + l, d = t + 1, p = n - 1; d < p;) {
  9693. var v = d + p >>> 1;
  9694. s[v] < h ? d = v + 1 : p = v
  9695. }
  9696. h - s[d - 1] < s[d] - h && t + 1 < d && --d;
  9697. var g = s[d] - l,
  9698. y = e - g;
  9699. if (a - r > u - i) {
  9700. var _ = (r * y + a * g) / e;
  9701. o(t, d, g, r, i, _, u), o(d, n, y, _, i, a, u)
  9702. } else {
  9703. var b = (i * y + u * g) / e;
  9704. o(t, d, g, r, i, a, b), o(d, n, y, r, b, a, u)
  9705. }
  9706. }
  9707. var a, u, f = t.children,
  9708. c = f.length,
  9709. s = new Array(c + 1);
  9710. for (s[0] = u = a = 0; a < c; ++a) s[a + 1] = u += f[a].value;
  9711. o(0, c, t.value, n, e, r, i)
  9712. }, t.treemapDice = na, t.treemapSlice = sa, t.treemapSliceDice = function(t, n, e, r, i) {
  9713. (1 & t.depth ? sa : na)(t, n, e, r, i)
  9714. }, t.treemapSquarify = mv, t.treemapResquarify = xv, t.interpolate = dn, t.interpolateArray = fn, t.interpolateBasis = Kt, t.interpolateBasisClosed = tn, t.interpolateDate = cn, t.interpolateNumber = sn, t.interpolateObject = ln, t.interpolateRound = pn, t.interpolateString = hn, t.interpolateTransformCss = sl, t.interpolateTransformSvg = ll, t.interpolateZoom = _n, t.interpolateRgb = rl, t.interpolateRgbBasis = il, t.interpolateRgbBasisClosed = ol, t.interpolateHsl = gl, t.interpolateHslLong = yl, t.interpolateLab = function(t, n) {
  9715. var e = an((t = Ft(t)).l, (n = Ft(n)).l),
  9716. r = an(t.a, n.a),
  9717. i = an(t.b, n.b),
  9718. o = an(t.opacity, n.opacity);
  9719. return function(n) {
  9720. return t.l = e(n), t.a = r(n), t.b = i(n), t.opacity = o(n), t + ""
  9721. }
  9722. }, t.interpolateHcl = _l, t.interpolateHclLong = bl, t.interpolateCubehelix = ml, t.interpolateCubehelixLong = xl, t.piecewise = function(t, n) {
  9723. for (var e = 0, r = n.length - 1, i = n[0], o = new Array(r < 0 ? 0 : r); e < r;) o[e] = t(i, i = n[++e]);
  9724. return function(t) {
  9725. var n = Math.max(0, Math.min(r - 1, Math.floor(t *= r)));
  9726. return o[n](t - n)
  9727. }
  9728. }, t.quantize = function(t, n) {
  9729. for (var e = new Array(n), r = 0; r < n; ++r) e[r] = t(r / (n - 1));
  9730. return e
  9731. }, t.path = oe, t.polygonArea = function(t) {
  9732. for (var n, e = -1, r = t.length, i = t[r - 1], o = 0; ++e < r;) n = i, i = t[e], o += n[1] * i[0] - n[0] * i[1];
  9733. return o / 2
  9734. }, t.polygonCentroid = function(t) {
  9735. for (var n, e, r = -1, i = t.length, o = 0, a = 0, u = t[i - 1], f = 0; ++r < i;) n = u, u = t[r], f += e = n[0] * u[1] - u[0] * n[1], o += (n[0] + u[0]) * e, a += (n[1] + u[1]) * e;
  9736. return f *= 3, [o / f, a / f]
  9737. }, t.polygonHull = function(t) {
  9738. if ((e = t.length) < 3) return null;
  9739. var n, e, r = new Array(e),
  9740. i = new Array(e);
  9741. for (n = 0; n < e; ++n) r[n] = [+t[n][0], +t[n][1], n];
  9742. for (r.sort(da), n = 0; n < e; ++n) i[n] = [r[n][0], -r[n][1]];
  9743. var o = pa(r),
  9744. a = pa(i),
  9745. u = a[0] === o[0],
  9746. f = a[a.length - 1] === o[o.length - 1],
  9747. c = [];
  9748. for (n = o.length - 1; n >= 0; --n) c.push(t[r[o[n]][2]]);
  9749. for (n = +u; n < a.length - f; ++n) c.push(t[r[a[n]][2]]);
  9750. return c
  9751. }, t.polygonContains = function(t, n) {
  9752. for (var e, r, i = t.length, o = t[i - 1], a = n[0], u = n[1], f = o[0], c = o[1], s = !1, l = 0; l < i; ++l) e = (o = t[l])[0], (r = o[1]) > u != c > u && a < (f - e) * (u - r) / (c - r) + e && (s = !s), f = e, c = r;
  9753. return s
  9754. }, t.polygonLength = function(t) {
  9755. for (var n, e, r = -1, i = t.length, o = t[i - 1], a = o[0], u = o[1], f = 0; ++r < i;) n = a, e = u, n -= a = (o = t[r])[0], e -= u = o[1], f += Math.sqrt(n * n + e * e);
  9756. return f
  9757. }, t.quadtree = je, t.randomUniform = wv, t.randomNormal = Mv, t.randomLogNormal = Av, t.randomBates = Nv, t.randomIrwinHall = Tv, t.randomExponential = Sv, t.scaleBand = ya, t.scalePoint = function() {
  9758. return _a(ya().paddingInner(1))
  9759. }, t.scaleIdentity = Ea, t.scaleLinear = Sa, t.scaleLog = Ua, t.scaleOrdinal = ga, t.scaleImplicit = Pv, t.scalePow = Oa, t.scaleSqrt = function() {
  9760. return Oa().exponent(.5)
  9761. }, t.scaleQuantile = Ya, t.scaleQuantize = Ba, t.scaleThreshold = Fa, t.scaleTime = function() {
  9762. return of(cg, ug, Vv, Xv, jv, Fv, Yv, Dv, t.timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)])
  9763. }, t.scaleUtc = function() {
  9764. return of(Rg, Pg, yg, vg, dg, lg, Yv, Dv, t.utcFormat).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)])
  9765. }, t.scaleSequential = af, t.scaleDiverging = uf, t.schemeCategory10 = Zg, t.schemeAccent = Qg, t.schemeDark2 = Jg, t.schemePaired = Kg, t.schemePastel1 = ty, t.schemePastel2 = ny, t.schemeSet1 = ey, t.schemeSet2 = ry, t.schemeSet3 = iy, t.interpolateBrBG = ay, t.schemeBrBG = oy, t.interpolatePRGn = fy, t.schemePRGn = uy, t.interpolatePiYG = sy, t.schemePiYG = cy, t.interpolatePuOr = hy, t.schemePuOr = ly, t.interpolateRdBu = py, t.schemeRdBu = dy, t.interpolateRdGy = gy, t.schemeRdGy = vy, t.interpolateRdYlBu = _y, t.schemeRdYlBu = yy, t.interpolateRdYlGn = my, t.schemeRdYlGn = by, t.interpolateSpectral = wy, t.schemeSpectral = xy, t.interpolateBuGn = Ay, t.schemeBuGn = My, t.interpolateBuPu = Ny, t.schemeBuPu = Ty, t.interpolateGnBu = Ey, t.schemeGnBu = Sy, t.interpolateOrRd = Cy, t.schemeOrRd = ky, t.interpolatePuBuGn = zy, t.schemePuBuGn = Py, t.interpolatePuBu = Ly, t.schemePuBu = Ry, t.interpolatePuRd = Uy, t.schemePuRd = Dy, t.interpolateRdPu = Oy, t.schemeRdPu = qy, t.interpolateYlGnBu = By, t.schemeYlGnBu = Yy, t.interpolateYlGn = Iy, t.schemeYlGn = Fy, t.interpolateYlOrBr = Hy, t.schemeYlOrBr = jy, t.interpolateYlOrRd = Gy, t.schemeYlOrRd = Xy, t.interpolateBlues = $y, t.schemeBlues = Vy, t.interpolateGreens = Zy, t.schemeGreens = Wy, t.interpolateGreys = Jy, t.schemeGreys = Qy, t.interpolatePurples = t_, t.schemePurples = Ky, t.interpolateReds = e_, t.schemeReds = n_, t.interpolateOranges = i_, t.schemeOranges = r_, t.interpolateCubehelixDefault = o_, t.interpolateRainbow = function(t) {
  9766. (t < 0 || t > 1) && (t -= Math.floor(t));
  9767. var n = Math.abs(t - .5);
  9768. return f_.h = 360 * t - 100, f_.s = 1.5 - 1.5 * n, f_.l = .8 - .9 * n, f_ + ""
  9769. }, t.interpolateWarm = a_, t.interpolateCool = u_, t.interpolateSinebow = function(t) {
  9770. var n;
  9771. return t = (.5 - t) * Math.PI, c_.r = 255 * (n = Math.sin(t)) * n, c_.g = 255 * (n = Math.sin(t + s_)) * n, c_.b = 255 * (n = Math.sin(t + l_)) * n, c_ + ""
  9772. }, t.interpolateViridis = h_, t.interpolateMagma = d_, t.interpolateInferno = p_, t.interpolatePlasma = v_, t.create = function(t) {
  9773. return ct(C(t).call(document.documentElement))
  9774. }, t.creator = C, t.local = st, t.matcher = bs, t.mouse = pt, t.namespace = k, t.namespaces = vs, t.clientPoint = dt, t.select = ct, t.selectAll = function(t) {
  9775. return "string" == typeof t ? new ut([document.querySelectorAll(t)], [document.documentElement]) : new ut([null == t ? [] : t], ws)
  9776. }, t.selection = ft, t.selector = z, t.selectorAll = L, t.style = F, t.touch = vt, t.touches = function(t, n) {
  9777. null == n && (n = ht().touches);
  9778. for (var e = 0, r = n ? n.length : 0, i = new Array(r); e < r; ++e) i[e] = dt(t, n[e]);
  9779. return i
  9780. }, t.window = B, t.customEvent = ot, t.arc = function() {
  9781. function t() {
  9782. var t, c, s = +n.apply(this, arguments),
  9783. l = +e.apply(this, arguments),
  9784. h = o.apply(this, arguments) - T_,
  9785. d = a.apply(this, arguments) - T_,
  9786. p = g_(d - h),
  9787. v = d > h;
  9788. if (f || (f = t = oe()), l < s && (c = l, l = s, s = c), l > M_)
  9789. if (p > N_ - M_) f.moveTo(l * __(h), l * x_(h)), f.arc(0, 0, l, h, d, !v), s > M_ && (f.moveTo(s * __(d), s * x_(d)), f.arc(0, 0, s, d, h, v));
  9790. else {
  9791. var g, y, _ = h,
  9792. b = d,
  9793. m = h,
  9794. x = d,
  9795. w = p,
  9796. M = p,
  9797. A = u.apply(this, arguments) / 2,
  9798. T = A > M_ && (i ? +i.apply(this, arguments) : w_(s * s + l * l)),
  9799. N = m_(g_(l - s) / 2, +r.apply(this, arguments)),
  9800. S = N,
  9801. E = N;
  9802. if (T > M_) {
  9803. var k = hf(T / s * x_(A)),
  9804. C = hf(T / l * x_(A));
  9805. (w -= 2 * k) > M_ ? (k *= v ? 1 : -1, m += k, x -= k) : (w = 0, m = x = (h + d) / 2), (M -= 2 * C) > M_ ? (C *= v ? 1 : -1, _ += C, b -= C) : (M = 0, _ = b = (h + d) / 2)
  9806. }
  9807. var P = l * __(_),
  9808. z = l * x_(_),
  9809. R = s * __(x),
  9810. L = s * x_(x);
  9811. if (N > M_) {
  9812. var D = l * __(b),
  9813. U = l * x_(b),
  9814. q = s * __(m),
  9815. O = s * x_(m);
  9816. if (p < A_) {
  9817. var Y = w > M_ ? function(t, n, e, r, i, o, a, u) {
  9818. var f = e - t,
  9819. c = r - n,
  9820. s = a - i,
  9821. l = u - o,
  9822. h = (s * (n - o) - l * (t - i)) / (l * f - s * c);
  9823. return [t + h * f, n + h * c]
  9824. }(P, z, q, O, D, U, R, L) : [R, L],
  9825. B = P - Y[0],
  9826. F = z - Y[1],
  9827. I = D - Y[0],
  9828. j = U - Y[1],
  9829. H = 1 / x_(function(t) {
  9830. return t > 1 ? 0 : t < -1 ? A_ : Math.acos(t)
  9831. }((B * I + F * j) / (w_(B * B + F * F) * w_(I * I + j * j))) / 2),
  9832. X = w_(Y[0] * Y[0] + Y[1] * Y[1]);
  9833. S = m_(N, (s - X) / (H - 1)), E = m_(N, (l - X) / (H + 1))
  9834. }
  9835. }
  9836. M > M_ ? E > M_ ? (g = _f(q, O, P, z, l, E, v), y = _f(D, U, R, L, l, E, v), f.moveTo(g.cx + g.x01, g.cy + g.y01), E < N ? f.arc(g.cx, g.cy, E, y_(g.y01, g.x01), y_(y.y01, y.x01), !v) : (f.arc(g.cx, g.cy, E, y_(g.y01, g.x01), y_(g.y11, g.x11), !v), f.arc(0, 0, l, y_(g.cy + g.y11, g.cx + g.x11), y_(y.cy + y.y11, y.cx + y.x11), !v), f.arc(y.cx, y.cy, E, y_(y.y11, y.x11), y_(y.y01, y.x01), !v))) : (f.moveTo(P, z), f.arc(0, 0, l, _, b, !v)) : f.moveTo(P, z), s > M_ && w > M_ ? S > M_ ? (g = _f(R, L, D, U, s, -S, v), y = _f(P, z, q, O, s, -S, v), f.lineTo(g.cx + g.x01, g.cy + g.y01), S < N ? f.arc(g.cx, g.cy, S, y_(g.y01, g.x01), y_(y.y01, y.x01), !v) : (f.arc(g.cx, g.cy, S, y_(g.y01, g.x01), y_(g.y11, g.x11), !v), f.arc(0, 0, s, y_(g.cy + g.y11, g.cx + g.x11), y_(y.cy + y.y11, y.cx + y.x11), v), f.arc(y.cx, y.cy, S, y_(y.y11, y.x11), y_(y.y01, y.x01), !v))) : f.arc(0, 0, s, x, m, v) : f.lineTo(R, L)
  9837. }
  9838. else f.moveTo(0, 0);
  9839. if (f.closePath(), t) return f = null, t + "" || null
  9840. }
  9841. var n = df,
  9842. e = pf,
  9843. r = lf(0),
  9844. i = null,
  9845. o = vf,
  9846. a = gf,
  9847. u = yf,
  9848. f = null;
  9849. return t.centroid = function() {
  9850. var t = (+n.apply(this, arguments) + +e.apply(this, arguments)) / 2,
  9851. r = (+o.apply(this, arguments) + +a.apply(this, arguments)) / 2 - A_ / 2;
  9852. return [__(r) * t, x_(r) * t]
  9853. }, t.innerRadius = function(e) {
  9854. return arguments.length ? (n = "function" == typeof e ? e : lf(+e), t) : n
  9855. }, t.outerRadius = function(n) {
  9856. return arguments.length ? (e = "function" == typeof n ? n : lf(+n), t) : e
  9857. }, t.cornerRadius = function(n) {
  9858. return arguments.length ? (r = "function" == typeof n ? n : lf(+n), t) : r
  9859. }, t.padRadius = function(n) {
  9860. return arguments.length ? (i = null == n ? null : "function" == typeof n ? n : lf(+n), t) : i
  9861. }, t.startAngle = function(n) {
  9862. return arguments.length ? (o = "function" == typeof n ? n : lf(+n), t) : o
  9863. }, t.endAngle = function(n) {
  9864. return arguments.length ? (a = "function" == typeof n ? n : lf(+n), t) : a
  9865. }, t.padAngle = function(n) {
  9866. return arguments.length ? (u = "function" == typeof n ? n : lf(+n), t) : u
  9867. }, t.context = function(n) {
  9868. return arguments.length ? (f = null == n ? null : n, t) : f
  9869. }, t
  9870. }, t.area = Af, t.line = Mf, t.pie = function() {
  9871. function t(t) {
  9872. var u, f, c, s, l, h = t.length,
  9873. d = 0,
  9874. p = new Array(h),
  9875. v = new Array(h),
  9876. g = +i.apply(this, arguments),
  9877. y = Math.min(N_, Math.max(-N_, o.apply(this, arguments) - g)),
  9878. _ = Math.min(Math.abs(y) / h, a.apply(this, arguments)),
  9879. b = _ * (y < 0 ? -1 : 1);
  9880. for (u = 0; u < h; ++u)(l = v[p[u] = u] = +n(t[u], u, t)) > 0 && (d += l);
  9881. for (null != e ? p.sort(function(t, n) {
  9882. return e(v[t], v[n])
  9883. }) : null != r && p.sort(function(n, e) {
  9884. return r(t[n], t[e])
  9885. }), u = 0, c = d ? (y - h * b) / d : 0; u < h; ++u, g = s) f = p[u], s = g + ((l = v[f]) > 0 ? l * c : 0) + b, v[f] = {
  9886. data: t[f],
  9887. index: u,
  9888. value: l,
  9889. startAngle: g,
  9890. endAngle: s,
  9891. padAngle: _
  9892. };
  9893. return v
  9894. }
  9895. var n = Nf,
  9896. e = Tf,
  9897. r = null,
  9898. i = lf(0),
  9899. o = lf(N_),
  9900. a = lf(0);
  9901. return t.value = function(e) {
  9902. return arguments.length ? (n = "function" == typeof e ? e : lf(+e), t) : n
  9903. }, t.sortValues = function(n) {
  9904. return arguments.length ? (e = n, r = null, t) : e
  9905. }, t.sort = function(n) {
  9906. return arguments.length ? (r = n, e = null, t) : r
  9907. }, t.startAngle = function(n) {
  9908. return arguments.length ? (i = "function" == typeof n ? n : lf(+n), t) : i
  9909. }, t.endAngle = function(n) {
  9910. return arguments.length ? (o = "function" == typeof n ? n : lf(+n), t) : o
  9911. }, t.padAngle = function(n) {
  9912. return arguments.length ? (a = "function" == typeof n ? n : lf(+n), t) : a
  9913. }, t
  9914. }, t.areaRadial = Pf, t.radialArea = Pf, t.lineRadial = Cf, t.radialLine = Cf, t.pointRadial = zf, t.linkHorizontal = function() {
  9915. return Df(Uf)
  9916. }, t.linkVertical = function() {
  9917. return Df(qf)
  9918. }, t.linkRadial = function() {
  9919. var t = Df(Of);
  9920. return t.angle = t.x, delete t.x, t.radius = t.y, delete t.y, t
  9921. }, t.symbol = function() {
  9922. function t() {
  9923. var t;
  9924. if (r || (r = t = oe()), n.apply(this, arguments).draw(r, +e.apply(this, arguments)), t) return r = null, t + "" || null
  9925. }
  9926. var n = lf(k_),
  9927. e = lf(64),
  9928. r = null;
  9929. return t.type = function(e) {
  9930. return arguments.length ? (n = "function" == typeof e ? e : lf(e), t) : n
  9931. }, t.size = function(n) {
  9932. return arguments.length ? (e = "function" == typeof n ? n : lf(+n), t) : e
  9933. }, t.context = function(n) {
  9934. return arguments.length ? (r = null == n ? null : n, t) : r
  9935. }, t
  9936. }, t.symbols = X_, t.symbolCircle = k_, t.symbolCross = C_, t.symbolDiamond = R_, t.symbolSquare = O_, t.symbolStar = q_, t.symbolTriangle = B_, t.symbolWye = H_, t.curveBasisClosed = function(t) {
  9937. return new If(t)
  9938. }, t.curveBasisOpen = function(t) {
  9939. return new jf(t)
  9940. }, t.curveBasis = function(t) {
  9941. return new Ff(t)
  9942. }, t.curveBundle = G_, t.curveCardinalClosed = $_, t.curveCardinalOpen = W_, t.curveCardinal = V_, t.curveCatmullRomClosed = Q_, t.curveCatmullRomOpen = J_, t.curveCatmullRom = Z_, t.curveLinearClosed = function(t) {
  9943. return new Kf(t)
  9944. }, t.curveLinear = mf, t.curveMonotoneX = function(t) {
  9945. return new ic(t)
  9946. }, t.curveMonotoneY = function(t) {
  9947. return new oc(t)
  9948. }, t.curveNatural = function(t) {
  9949. return new uc(t)
  9950. }, t.curveStep = function(t) {
  9951. return new cc(t, .5)
  9952. }, t.curveStepAfter = function(t) {
  9953. return new cc(t, 1)
  9954. }, t.curveStepBefore = function(t) {
  9955. return new cc(t, 0)
  9956. }, t.stack = function() {
  9957. function t(t) {
  9958. var o, a, u = n.apply(this, arguments),
  9959. f = t.length,
  9960. c = u.length,
  9961. s = new Array(c);
  9962. for (o = 0; o < c; ++o) {
  9963. for (var l, h = u[o], d = s[o] = new Array(f), p = 0; p < f; ++p) d[p] = l = [0, +i(t[p], h, p, t)], l.data = t[p];
  9964. d.key = h
  9965. }
  9966. for (o = 0, a = e(s); o < c; ++o) s[a[o]].index = o;
  9967. return r(s, a), s
  9968. }
  9969. var n = lf([]),
  9970. e = lc,
  9971. r = sc,
  9972. i = hc;
  9973. return t.keys = function(e) {
  9974. return arguments.length ? (n = "function" == typeof e ? e : lf(E_.call(e)), t) : n
  9975. }, t.value = function(n) {
  9976. return arguments.length ? (i = "function" == typeof n ? n : lf(+n), t) : i
  9977. }, t.order = function(n) {
  9978. return arguments.length ? (e = null == n ? lc : "function" == typeof n ? n : lf(E_.call(n)), t) : e
  9979. }, t.offset = function(n) {
  9980. return arguments.length ? (r = null == n ? sc : n, t) : r
  9981. }, t
  9982. }, t.stackOffsetExpand = function(t, n) {
  9983. if ((r = t.length) > 0) {
  9984. for (var e, r, i, o = 0, a = t[0].length; o < a; ++o) {
  9985. for (i = e = 0; e < r; ++e) i += t[e][o][1] || 0;
  9986. if (i)
  9987. for (e = 0; e < r; ++e) t[e][o][1] /= i
  9988. }
  9989. sc(t, n)
  9990. }
  9991. }, t.stackOffsetDiverging = function(t, n) {
  9992. if ((u = t.length) > 1)
  9993. for (var e, r, i, o, a, u, f = 0, c = t[n[0]].length; f < c; ++f)
  9994. for (o = a = 0, e = 0; e < u; ++e)(i = (r = t[n[e]][f])[1] - r[0]) >= 0 ? (r[0] = o, r[1] = o += i) : i < 0 ? (r[1] = a, r[0] = a += i) : r[0] = o
  9995. }, t.stackOffsetNone = sc, t.stackOffsetSilhouette = function(t, n) {
  9996. if ((e = t.length) > 0) {
  9997. for (var e, r = 0, i = t[n[0]], o = i.length; r < o; ++r) {
  9998. for (var a = 0, u = 0; a < e; ++a) u += t[a][r][1] || 0;
  9999. i[r][1] += i[r][0] = -u / 2
  10000. }
  10001. sc(t, n)
  10002. }
  10003. }, t.stackOffsetWiggle = function(t, n) {
  10004. if ((i = t.length) > 0 && (r = (e = t[n[0]]).length) > 0) {
  10005. for (var e, r, i, o = 0, a = 1; a < r; ++a) {
  10006. for (var u = 0, f = 0, c = 0; u < i; ++u) {
  10007. for (var s = t[n[u]], l = s[a][1] || 0, h = (l - (s[a - 1][1] || 0)) / 2, d = 0; d < u; ++d) {
  10008. var p = t[n[d]];
  10009. h += (p[a][1] || 0) - (p[a - 1][1] || 0)
  10010. }
  10011. f += l, c += h * l
  10012. }
  10013. e[a - 1][1] += e[a - 1][0] = o, f && (o -= c / f)
  10014. }
  10015. e[a - 1][1] += e[a - 1][0] = o, sc(t, n)
  10016. }
  10017. }, t.stackOrderAscending = dc, t.stackOrderDescending = function(t) {
  10018. return dc(t).reverse()
  10019. }, t.stackOrderInsideOut = function(t) {
  10020. var n, e, r = t.length,
  10021. i = t.map(pc),
  10022. o = lc(t).sort(function(t, n) {
  10023. return i[n] - i[t]
  10024. }),
  10025. a = 0,
  10026. u = 0,
  10027. f = [],
  10028. c = [];
  10029. for (n = 0; n < r; ++n) e = o[n], a < u ? (a += i[e], f.push(e)) : (u += i[e], c.push(e));
  10030. return c.reverse().concat(f)
  10031. }, t.stackOrderNone = lc, t.stackOrderReverse = function(t) {
  10032. return lc(t).reverse()
  10033. }, t.timeInterval = Ia, t.timeMillisecond = Dv, t.timeMilliseconds = Uv, t.utcMillisecond = Dv, t.utcMilliseconds = Uv, t.timeSecond = Yv, t.timeSeconds = Bv, t.utcSecond = Yv, t.utcSeconds = Bv, t.timeMinute = Fv, t.timeMinutes = Iv, t.timeHour = jv, t.timeHours = Hv, t.timeDay = Xv, t.timeDays = Gv, t.timeWeek = Vv, t.timeWeeks = tg, t.timeSunday = Vv, t.timeSundays = tg, t.timeMonday = $v, t.timeMondays = ng, t.timeTuesday = Wv, t.timeTuesdays = eg, t.timeWednesday = Zv, t.timeWednesdays = rg, t.timeThursday = Qv, t.timeThursdays = ig, t.timeFriday = Jv, t.timeFridays = og, t.timeSaturday = Kv, t.timeSaturdays = ag, t.timeMonth = ug, t.timeMonths = fg, t.timeYear = cg, t.timeYears = sg, t.utcMinute = lg, t.utcMinutes = hg, t.utcHour = dg, t.utcHours = pg, t.utcDay = vg, t.utcDays = gg, t.utcWeek = yg, t.utcWeeks = Ag, t.utcSunday = yg, t.utcSundays = Ag, t.utcMonday = _g, t.utcMondays = Tg, t.utcTuesday = bg, t.utcTuesdays = Ng, t.utcWednesday = mg, t.utcWednesdays = Sg, t.utcThursday = xg, t.utcThursdays = Eg, t.utcFriday = wg, t.utcFridays = kg, t.utcSaturday = Mg, t.utcSaturdays = Cg, t.utcMonth = Pg, t.utcMonths = zg, t.utcYear = Rg, t.utcYears = Dg, t.timeFormatDefaultLocale = nf, t.timeFormatLocale = $a, t.isoFormat = Fg, t.isoParse = Ig, t.now = wn, t.timer = Tn, t.timerFlush = Nn, t.timeout = Cn, t.interval = function(t, n, e) {
  10034. var r = new An,
  10035. i = n;
  10036. return null == n ? (r.restart(t, n, e), r) : (n = +n, e = null == e ? wn() : +e, r.restart(function o(a) {
  10037. a += i, r.restart(o, i += n, e), t(a)
  10038. }, n, e), r)
  10039. }, t.transition = Yn, t.active = function(t, n) {
  10040. var e, r, i = t.__transition;
  10041. if (i) {
  10042. n = null == n ? null : n + "";
  10043. for (r in i)
  10044. if ((e = i[r]).state > Ll && e.name === n) return new On([
  10045. [t]
  10046. ], hh, n, +r)
  10047. }
  10048. return null
  10049. }, t.interrupt = Dn, t.voronoi = function() {
  10050. function t(t) {
  10051. return new Bc(t.map(function(r, i) {
  10052. var o = [Math.round(n(r, i, t) / ab) * ab, Math.round(e(r, i, t) / ab) * ab];
  10053. return o.index = i, o.data = r, o
  10054. }), r)
  10055. }
  10056. var n = gc,
  10057. e = yc,
  10058. r = null;
  10059. return t.polygons = function(n) {
  10060. return t(n).polygons()
  10061. }, t.links = function(n) {
  10062. return t(n).links()
  10063. }, t.triangles = function(n) {
  10064. return t(n).triangles()
  10065. }, t.x = function(e) {
  10066. return arguments.length ? (n = "function" == typeof e ? e : vc(+e), t) : n
  10067. }, t.y = function(n) {
  10068. return arguments.length ? (e = "function" == typeof n ? n : vc(+n), t) : e
  10069. }, t.extent = function(n) {
  10070. return arguments.length ? (r = null == n ? null : [
  10071. [+n[0][0], +n[0][1]],
  10072. [+n[1][0], +n[1][1]]
  10073. ], t) : r && [
  10074. [r[0][0], r[0][1]],
  10075. [r[1][0], r[1][1]]
  10076. ]
  10077. }, t.size = function(n) {
  10078. return arguments.length ? (r = null == n ? null : [
  10079. [0, 0],
  10080. [+n[0], +n[1]]
  10081. ], t) : r && [r[1][0] - r[0][0], r[1][1] - r[0][1]]
  10082. }, t
  10083. }, t.zoom = function() {
  10084. function n(t) {
  10085. t.property("__zoom", $c).on("wheel.zoom", f).on("mousedown.zoom", c).on("dblclick.zoom", s).filter(m).on("touchstart.zoom", l).on("touchmove.zoom", h).on("touchend.zoom touchcancel.zoom", d).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)")
  10086. }
  10087. function e(t, n) {
  10088. return (n = Math.max(x[0], Math.min(x[1], n))) === t.k ? t : new Ic(n, t.x, t.y)
  10089. }
  10090. function r(t, n, e) {
  10091. var r = n[0] - e[0] * t.k,
  10092. i = n[1] - e[1] * t.k;
  10093. return r === t.x && i === t.y ? t : new Ic(t.k, r, i)
  10094. }
  10095. function i(t) {
  10096. return [(+t[0][0] + +t[1][0]) / 2, (+t[0][1] + +t[1][1]) / 2]
  10097. }
  10098. function o(t, n, e) {
  10099. t.on("start.zoom", function() {
  10100. a(this, arguments).start()
  10101. }).on("interrupt.zoom end.zoom", function() {
  10102. a(this, arguments).end()
  10103. }).tween("zoom", function() {
  10104. var t = arguments,
  10105. r = a(this, t),
  10106. o = y.apply(this, t),
  10107. u = e || i(o),
  10108. f = Math.max(o[1][0] - o[0][0], o[1][1] - o[0][1]),
  10109. c = this.__zoom,
  10110. s = "function" == typeof n ? n.apply(this, t) : n,
  10111. l = A(c.invert(u).concat(f / c.k), s.invert(u).concat(f / s.k));
  10112. return function(t) {
  10113. if (1 === t) t = s;
  10114. else {
  10115. var n = l(t),
  10116. e = f / n[2];
  10117. t = new Ic(e, u[0] - n[0] * e, u[1] - n[1] * e)
  10118. }
  10119. r.zoom(null, t)
  10120. }
  10121. })
  10122. }
  10123. function a(t, n) {
  10124. for (var e, r = 0, i = T.length; r < i; ++r)
  10125. if ((e = T[r]).that === t) return e;
  10126. return new u(t, n)
  10127. }
  10128. function u(t, n) {
  10129. this.that = t, this.args = n, this.index = -1, this.active = 0, this.extent = y.apply(t, n)
  10130. }
  10131. function f() {
  10132. if (g.apply(this, arguments)) {
  10133. var t = a(this, arguments),
  10134. n = this.__zoom,
  10135. i = Math.max(x[0], Math.min(x[1], n.k * Math.pow(2, b.apply(this, arguments)))),
  10136. o = pt(this);
  10137. if (t.wheel) t.mouse[0][0] === o[0] && t.mouse[0][1] === o[1] || (t.mouse[1] = n.invert(t.mouse[0] = o)), clearTimeout(t.wheel);
  10138. else {
  10139. if (n.k === i) return;
  10140. t.mouse = [o, n.invert(o)], Dn(this), t.start()
  10141. }
  10142. Xc(), t.wheel = setTimeout(function() {
  10143. t.wheel = null, t.end()
  10144. }, k), t.zoom("mouse", _(r(e(n, i), t.mouse[0], t.mouse[1]), t.extent, w))
  10145. }
  10146. }
  10147. function c() {
  10148. if (!v && g.apply(this, arguments)) {
  10149. var n = a(this, arguments),
  10150. e = ct(t.event.view).on("mousemove.zoom", function() {
  10151. if (Xc(), !n.moved) {
  10152. var e = t.event.clientX - o,
  10153. i = t.event.clientY - u;
  10154. n.moved = e * e + i * i > C
  10155. }
  10156. n.zoom("mouse", _(r(n.that.__zoom, n.mouse[0] = pt(n.that), n.mouse[1]), n.extent, w))
  10157. }, !0).on("mouseup.zoom", function() {
  10158. e.on("mousemove.zoom mouseup.zoom", null), bt(t.event.view, n.moved), Xc(), n.end()
  10159. }, !0),
  10160. i = pt(this),
  10161. o = t.event.clientX,
  10162. u = t.event.clientY;
  10163. _t(t.event.view), Hc(), n.mouse = [i, this.__zoom.invert(i)], Dn(this), n.start()
  10164. }
  10165. }
  10166. function s() {
  10167. if (g.apply(this, arguments)) {
  10168. var i = this.__zoom,
  10169. a = pt(this),
  10170. u = i.invert(a),
  10171. f = i.k * (t.event.shiftKey ? .5 : 2),
  10172. c = _(r(e(i, f), a, u), y.apply(this, arguments), w);
  10173. Xc(), M > 0 ? ct(this).transition().duration(M).call(o, c, a) : ct(this).call(n.transform, c)
  10174. }
  10175. }
  10176. function l() {
  10177. if (g.apply(this, arguments)) {
  10178. var n, e, r, i, o = a(this, arguments),
  10179. u = t.event.changedTouches,
  10180. f = u.length;
  10181. for (Hc(), e = 0; e < f; ++e) i = [i = vt(this, u, (r = u[e]).identifier), this.__zoom.invert(i), r.identifier], o.touch0 ? o.touch1 || (o.touch1 = i) : (o.touch0 = i, n = !0);
  10182. if (p && (p = clearTimeout(p), !o.touch1)) return o.end(), void((i = ct(this).on("dblclick.zoom")) && i.apply(this, arguments));
  10183. n && (p = setTimeout(function() {
  10184. p = null
  10185. }, E), Dn(this), o.start())
  10186. }
  10187. }
  10188. function h() {
  10189. var n, i, o, u, f = a(this, arguments),
  10190. c = t.event.changedTouches,
  10191. s = c.length;
  10192. for (Xc(), p && (p = clearTimeout(p)), n = 0; n < s; ++n) o = vt(this, c, (i = c[n]).identifier), f.touch0 && f.touch0[2] === i.identifier ? f.touch0[0] = o : f.touch1 && f.touch1[2] === i.identifier && (f.touch1[0] = o);
  10193. if (i = f.that.__zoom, f.touch1) {
  10194. var l = f.touch0[0],
  10195. h = f.touch0[1],
  10196. d = f.touch1[0],
  10197. v = f.touch1[1],
  10198. g = (g = d[0] - l[0]) * g + (g = d[1] - l[1]) * g,
  10199. y = (y = v[0] - h[0]) * y + (y = v[1] - h[1]) * y;
  10200. i = e(i, Math.sqrt(g / y)), o = [(l[0] + d[0]) / 2, (l[1] + d[1]) / 2], u = [(h[0] + v[0]) / 2, (h[1] + v[1]) / 2]
  10201. } else {
  10202. if (!f.touch0) return;
  10203. o = f.touch0[0], u = f.touch0[1]
  10204. }
  10205. f.zoom("touch", _(r(i, o, u), f.extent, w))
  10206. }
  10207. function d() {
  10208. var n, e, r = a(this, arguments),
  10209. i = t.event.changedTouches,
  10210. o = i.length;
  10211. for (Hc(), v && clearTimeout(v), v = setTimeout(function() {
  10212. v = null
  10213. }, E), n = 0; n < o; ++n) e = i[n], r.touch0 && r.touch0[2] === e.identifier ? delete r.touch0 : r.touch1 && r.touch1[2] === e.identifier && delete r.touch1;
  10214. r.touch1 && !r.touch0 && (r.touch0 = r.touch1, delete r.touch1), r.touch0 ? r.touch0[1] = this.__zoom.invert(r.touch0[0]) : r.end()
  10215. }
  10216. var p, v, g = Gc,
  10217. y = Vc,
  10218. _ = Qc,
  10219. b = Wc,
  10220. m = Zc,
  10221. x = [0, 1 / 0],
  10222. w = [
  10223. [-1 / 0, -1 / 0],
  10224. [1 / 0, 1 / 0]
  10225. ],
  10226. M = 250,
  10227. A = _n,
  10228. T = [],
  10229. S = N("start", "zoom", "end"),
  10230. E = 500,
  10231. k = 150,
  10232. C = 0;
  10233. return n.transform = function(t, n) {
  10234. var e = t.selection ? t.selection() : t;
  10235. e.property("__zoom", $c), t !== e ? o(t, n) : e.interrupt().each(function() {
  10236. a(this, arguments).start().zoom(null, "function" == typeof n ? n.apply(this, arguments) : n).end()
  10237. })
  10238. }, n.scaleBy = function(t, e) {
  10239. n.scaleTo(t, function() {
  10240. return this.__zoom.k * ("function" == typeof e ? e.apply(this, arguments) : e)
  10241. })
  10242. }, n.scaleTo = function(t, o) {
  10243. n.transform(t, function() {
  10244. var t = y.apply(this, arguments),
  10245. n = this.__zoom,
  10246. a = i(t),
  10247. u = n.invert(a),
  10248. f = "function" == typeof o ? o.apply(this, arguments) : o;
  10249. return _(r(e(n, f), a, u), t, w)
  10250. })
  10251. }, n.translateBy = function(t, e, r) {
  10252. n.transform(t, function() {
  10253. return _(this.__zoom.translate("function" == typeof e ? e.apply(this, arguments) : e, "function" == typeof r ? r.apply(this, arguments) : r), y.apply(this, arguments), w)
  10254. })
  10255. }, n.translateTo = function(t, e, r) {
  10256. n.transform(t, function() {
  10257. var t = y.apply(this, arguments),
  10258. n = this.__zoom,
  10259. o = i(t);
  10260. return _(fb.translate(o[0], o[1]).scale(n.k).translate("function" == typeof e ? -e.apply(this, arguments) : -e, "function" == typeof r ? -r.apply(this, arguments) : -r), t, w)
  10261. })
  10262. }, u.prototype = {
  10263. start: function() {
  10264. return 1 == ++this.active && (this.index = T.push(this) - 1, this.emit("start")), this
  10265. },
  10266. zoom: function(t, n) {
  10267. return this.mouse && "mouse" !== t && (this.mouse[1] = n.invert(this.mouse[0])), this.touch0 && "touch" !== t && (this.touch0[1] = n.invert(this.touch0[0])), this.touch1 && "touch" !== t && (this.touch1[1] = n.invert(this.touch1[0])), this.that.__zoom = n, this.emit("zoom"), this
  10268. },
  10269. end: function() {
  10270. return 0 == --this.active && (T.splice(this.index, 1), this.index = -1, this.emit("end")), this
  10271. },
  10272. emit: function(t) {
  10273. ot(new function(t, n, e) {
  10274. this.target = t, this.type = n, this.transform = e
  10275. }(n, t, this.that.__zoom), S.apply, S, [t, this.that, this.args])
  10276. }
  10277. }, n.wheelDelta = function(t) {
  10278. return arguments.length ? (b = "function" == typeof t ? t : Fc(+t), n) : b
  10279. }, n.filter = function(t) {
  10280. return arguments.length ? (g = "function" == typeof t ? t : Fc(!!t), n) : g
  10281. }, n.touchable = function(t) {
  10282. return arguments.length ? (m = "function" == typeof t ? t : Fc(!!t), n) : m
  10283. }, n.extent = function(t) {
  10284. return arguments.length ? (y = "function" == typeof t ? t : Fc([
  10285. [+t[0][0], +t[0][1]],
  10286. [+t[1][0], +t[1][1]]
  10287. ]), n) : y
  10288. }, n.scaleExtent = function(t) {
  10289. return arguments.length ? (x[0] = +t[0], x[1] = +t[1], n) : [x[0], x[1]]
  10290. }, n.translateExtent = function(t) {
  10291. return arguments.length ? (w[0][0] = +t[0][0], w[1][0] = +t[1][0], w[0][1] = +t[0][1], w[1][1] = +t[1][1], n) : [
  10292. [w[0][0], w[0][1]],
  10293. [w[1][0], w[1][1]]
  10294. ]
  10295. }, n.constrain = function(t) {
  10296. return arguments.length ? (_ = t, n) : _
  10297. }, n.duration = function(t) {
  10298. return arguments.length ? (M = +t, n) : M
  10299. }, n.interpolate = function(t) {
  10300. return arguments.length ? (A = t, n) : A
  10301. }, n.on = function() {
  10302. var t = S.on.apply(S, arguments);
  10303. return t === S ? n : t
  10304. }, n.clickDistance = function(t) {
  10305. return arguments.length ? (C = (t = +t) * t, n) : Math.sqrt(C)
  10306. }, n
  10307. }, t.zoomTransform = jc, t.zoomIdentity = fb, Object.defineProperty(t, "__esModule", {
  10308. value: !0
  10309. })
  10310. });