echarts.min.js 1.5 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. ! function (t, e) {
  20. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).echarts = {})
  21. }(this, (function (t) {
  22. "use strict";
  23. /*! *****************************************************************************
  24. Copyright (c) Microsoft Corporation.
  25. Permission to use, copy, modify, and/or distribute this software for any
  26. purpose with or without fee is hereby granted.
  27. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  28. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  29. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  30. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  31. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  32. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  33. PERFORMANCE OF THIS SOFTWARE.
  34. ***************************************************************************** */
  35. var e = function (t, n) {
  36. return e = Object.setPrototypeOf || {
  37. __proto__: []
  38. }
  39. instanceof Array && function (t, e) {
  40. t.__proto__ = e
  41. } || function (t, e) {
  42. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
  43. }, e(t, n)
  44. };
  45. function n(t, n) {
  46. if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
  47. function i() {
  48. this.constructor = t
  49. }
  50. e(t, n), t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype, new i)
  51. }
  52. var i = function () {
  53. this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1
  54. },
  55. r = new function () {
  56. this.browser = new i, this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = "undefined" != typeof window
  57. };
  58. "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? (r.wxa = !0, r.touchEventsSupported = !0) : "undefined" == typeof document && "undefined" != typeof self ? r.worker = !0 : "undefined" == typeof navigator || 0 === navigator.userAgent.indexOf("Node.js") ? (r.node = !0, r.svgSupported = !0) : function (t, e) {
  59. var n = e.browser,
  60. i = t.match(/Firefox\/([\d.]+)/),
  61. r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/),
  62. o = t.match(/Edge?\/([\d.]+)/),
  63. a = /micromessenger/i.test(t);
  64. i && (n.firefox = !0, n.version = i[1]);
  65. r && (n.ie = !0, n.version = r[1]);
  66. o && (n.edge = !0, n.version = o[1], n.newEdge = +o[1].split(".")[0] > 18);
  67. a && (n.weChat = !0);
  68. e.svgSupported = "undefined" != typeof SVGRect, e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = "undefined" != typeof document;
  69. var s = document.documentElement.style;
  70. e.transform3dSupported = (n.ie && "transition" in s || n.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9
  71. }(navigator.userAgent, r);
  72. var o = "sans-serif",
  73. a = "12px " + o;
  74. var s, l, u = function (t) {
  75. var e = {};
  76. if ("undefined" == typeof JSON) return e;
  77. for (var n = 0; n < t.length; n++) {
  78. var i = String.fromCharCode(n + 32),
  79. r = (t.charCodeAt(n) - 20) / 100;
  80. e[i] = r
  81. }
  82. return e
  83. }("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),
  84. h = {
  85. createCanvas: function () {
  86. return "undefined" != typeof document && document.createElement("canvas")
  87. },
  88. measureText: function (t, e) {
  89. if (!s) {
  90. var n = h.createCanvas();
  91. s = n && n.getContext("2d")
  92. }
  93. if (s) return l !== e && (l = s.font = e || a), s.measureText(t);
  94. t = t || "";
  95. var i = /(\d+)px/.exec(e = e || a),
  96. r = i && +i[1] || 12,
  97. o = 0;
  98. if (e.indexOf("mono") >= 0) o = r * t.length;
  99. else
  100. for (var c = 0; c < t.length; c++) {
  101. var p = u[t[c]];
  102. o += null == p ? r : p * r
  103. }
  104. return {
  105. width: o
  106. }
  107. },
  108. loadImage: function (t, e, n) {
  109. var i = new Image;
  110. return i.onload = e, i.onerror = n, i.src = t, i
  111. }
  112. };
  113. function c(t) {
  114. for (var e in h) t[e] && (h[e] = t[e])
  115. }
  116. var p = V(["Function", "RegExp", "Date", "Error", "CanvasGradient", "CanvasPattern", "Image", "Canvas"], (function (t, e) {
  117. return t["[object " + e + "]"] = !0, t
  118. }), {}),
  119. d = V(["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64"], (function (t, e) {
  120. return t["[object " + e + "Array]"] = !0, t
  121. }), {}),
  122. f = Object.prototype.toString,
  123. g = Array.prototype,
  124. y = g.forEach,
  125. v = g.filter,
  126. m = g.slice,
  127. x = g.map,
  128. _ = function () {}.constructor,
  129. b = _ ? _.prototype : null,
  130. w = "__proto__",
  131. S = 2311;
  132. function M() {
  133. return S++
  134. }
  135. function I() {
  136. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
  137. "undefined" != typeof console && console.error.apply(console, t)
  138. }
  139. function T(t) {
  140. if (null == t || "object" != typeof t) return t;
  141. var e = t,
  142. n = f.call(t);
  143. if ("[object Array]" === n) {
  144. if (!pt(t)) {
  145. e = [];
  146. for (var i = 0, r = t.length; i < r; i++) e[i] = T(t[i])
  147. }
  148. } else if (d[n]) {
  149. if (!pt(t)) {
  150. var o = t.constructor;
  151. if (o.from) e = o.from(t);
  152. else {
  153. e = new o(t.length);
  154. for (i = 0, r = t.length; i < r; i++) e[i] = t[i]
  155. }
  156. }
  157. } else if (!p[n] && !pt(t) && !J(t))
  158. for (var a in e = {}, t) t.hasOwnProperty(a) && a !== w && (e[a] = T(t[a]));
  159. return e
  160. }
  161. function C(t, e, n) {
  162. if (!q(e) || !q(t)) return n ? T(e) : t;
  163. for (var i in e)
  164. if (e.hasOwnProperty(i) && i !== w) {
  165. var r = t[i],
  166. o = e[i];
  167. !q(o) || !q(r) || Y(o) || Y(r) || J(o) || J(r) || K(o) || K(r) || pt(o) || pt(r) ? !n && i in t || (t[i] = T(e[i])) : C(r, o, n)
  168. } return t
  169. }
  170. function D(t, e) {
  171. for (var n = t[0], i = 1, r = t.length; i < r; i++) n = C(n, t[i], e);
  172. return n
  173. }
  174. function A(t, e) {
  175. if (Object.assign) Object.assign(t, e);
  176. else
  177. for (var n in e) e.hasOwnProperty(n) && n !== w && (t[n] = e[n]);
  178. return t
  179. }
  180. function k(t, e, n) {
  181. for (var i = G(e), r = 0; r < i.length; r++) {
  182. var o = i[r];
  183. (n ? null != e[o] : null == t[o]) && (t[o] = e[o])
  184. }
  185. return t
  186. }
  187. var L = h.createCanvas;
  188. function P(t, e) {
  189. if (t) {
  190. if (t.indexOf) return t.indexOf(e);
  191. for (var n = 0, i = t.length; n < i; n++)
  192. if (t[n] === e) return n
  193. }
  194. return -1
  195. }
  196. function O(t, e) {
  197. var n = t.prototype;
  198. function i() {}
  199. for (var r in i.prototype = e.prototype, t.prototype = new i, n) n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
  200. t.prototype.constructor = t, t.superClass = e
  201. }
  202. function R(t, e, n) {
  203. if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
  204. for (var i = Object.getOwnPropertyNames(e), r = 0; r < i.length; r++) {
  205. var o = i[r];
  206. "constructor" !== o && (n ? null != e[o] : null == t[o]) && (t[o] = e[o])
  207. } else k(t, e, n)
  208. }
  209. function N(t) {
  210. return !!t && ("string" != typeof t && "number" == typeof t.length)
  211. }
  212. function E(t, e, n) {
  213. if (t && e)
  214. if (t.forEach && t.forEach === y) t.forEach(e, n);
  215. else if (t.length === +t.length)
  216. for (var i = 0, r = t.length; i < r; i++) e.call(n, t[i], i, t);
  217. else
  218. for (var o in t) t.hasOwnProperty(o) && e.call(n, t[o], o, t)
  219. }
  220. function z(t, e, n) {
  221. if (!t) return [];
  222. if (!e) return at(t);
  223. if (t.map && t.map === x) return t.map(e, n);
  224. for (var i = [], r = 0, o = t.length; r < o; r++) i.push(e.call(n, t[r], r, t));
  225. return i
  226. }
  227. function V(t, e, n, i) {
  228. if (t && e) {
  229. for (var r = 0, o = t.length; r < o; r++) n = e.call(i, n, t[r], r, t);
  230. return n
  231. }
  232. }
  233. function B(t, e, n) {
  234. if (!t) return [];
  235. if (!e) return at(t);
  236. if (t.filter && t.filter === v) return t.filter(e, n);
  237. for (var i = [], r = 0, o = t.length; r < o; r++) e.call(n, t[r], r, t) && i.push(t[r]);
  238. return i
  239. }
  240. function F(t, e, n) {
  241. if (t && e)
  242. for (var i = 0, r = t.length; i < r; i++)
  243. if (e.call(n, t[i], i, t)) return t[i]
  244. }
  245. function G(t) {
  246. if (!t) return [];
  247. if (Object.keys) return Object.keys(t);
  248. var e = [];
  249. for (var n in t) t.hasOwnProperty(n) && e.push(n);
  250. return e
  251. }
  252. var W = b && X(b.bind) ? b.call.bind(b.bind) : function (t, e) {
  253. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  254. return function () {
  255. return t.apply(e, n.concat(m.call(arguments)))
  256. }
  257. };
  258. function H(t) {
  259. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  260. return function () {
  261. return t.apply(this, e.concat(m.call(arguments)))
  262. }
  263. }
  264. function Y(t) {
  265. return Array.isArray ? Array.isArray(t) : "[object Array]" === f.call(t)
  266. }
  267. function X(t) {
  268. return "function" == typeof t
  269. }
  270. function U(t) {
  271. return "string" == typeof t
  272. }
  273. function Z(t) {
  274. return "[object String]" === f.call(t)
  275. }
  276. function j(t) {
  277. return "number" == typeof t
  278. }
  279. function q(t) {
  280. var e = typeof t;
  281. return "function" === e || !!t && "object" === e
  282. }
  283. function K(t) {
  284. return !!p[f.call(t)]
  285. }
  286. function $(t) {
  287. return !!d[f.call(t)]
  288. }
  289. function J(t) {
  290. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
  291. }
  292. function Q(t) {
  293. return null != t.colorStops
  294. }
  295. function tt(t) {
  296. return null != t.image
  297. }
  298. function et(t) {
  299. return "[object RegExp]" === f.call(t)
  300. }
  301. function nt(t) {
  302. return t != t
  303. }
  304. function it() {
  305. for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
  306. for (var n = 0, i = t.length; n < i; n++)
  307. if (null != t[n]) return t[n]
  308. }
  309. function rt(t, e) {
  310. return null != t ? t : e
  311. }
  312. function ot(t, e, n) {
  313. return null != t ? t : null != e ? e : n
  314. }
  315. function at(t) {
  316. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  317. return m.apply(t, e)
  318. }
  319. function st(t) {
  320. if ("number" == typeof t) return [t, t, t, t];
  321. var e = t.length;
  322. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
  323. }
  324. function lt(t, e) {
  325. if (!t) throw new Error(e)
  326. }
  327. function ut(t) {
  328. return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
  329. }
  330. var ht = "__ec_primitive__";
  331. function ct(t) {
  332. t[ht] = !0
  333. }
  334. function pt(t) {
  335. return t[ht]
  336. }
  337. var dt = function () {
  338. function t() {
  339. this.data = {}
  340. }
  341. return t.prototype.delete = function (t) {
  342. var e = this.has(t);
  343. return e && delete this.data[t], e
  344. }, t.prototype.has = function (t) {
  345. return this.data.hasOwnProperty(t)
  346. }, t.prototype.get = function (t) {
  347. return this.data[t]
  348. }, t.prototype.set = function (t, e) {
  349. return this.data[t] = e, this
  350. }, t.prototype.keys = function () {
  351. return G(this.data)
  352. }, t.prototype.forEach = function (t) {
  353. var e = this.data;
  354. for (var n in e) e.hasOwnProperty(n) && t(e[n], n)
  355. }, t
  356. }(),
  357. ft = "function" == typeof Map;
  358. var gt = function () {
  359. function t(e) {
  360. var n = Y(e);
  361. this.data = ft ? new Map : new dt;
  362. var i = this;
  363. function r(t, e) {
  364. n ? i.set(t, e) : i.set(e, t)
  365. }
  366. e instanceof t ? e.each(r) : e && E(e, r)
  367. }
  368. return t.prototype.hasKey = function (t) {
  369. return this.data.has(t)
  370. }, t.prototype.get = function (t) {
  371. return this.data.get(t)
  372. }, t.prototype.set = function (t, e) {
  373. return this.data.set(t, e), e
  374. }, t.prototype.each = function (t, e) {
  375. this.data.forEach((function (n, i) {
  376. t.call(e, n, i)
  377. }))
  378. }, t.prototype.keys = function () {
  379. var t = this.data.keys();
  380. return ft ? Array.from(t) : t
  381. }, t.prototype.removeKey = function (t) {
  382. this.data.delete(t)
  383. }, t
  384. }();
  385. function yt(t) {
  386. return new gt(t)
  387. }
  388. function vt(t, e) {
  389. for (var n = new t.constructor(t.length + e.length), i = 0; i < t.length; i++) n[i] = t[i];
  390. var r = t.length;
  391. for (i = 0; i < e.length; i++) n[i + r] = e[i];
  392. return n
  393. }
  394. function mt(t, e) {
  395. var n;
  396. if (Object.create) n = Object.create(t);
  397. else {
  398. var i = function () {};
  399. i.prototype = t, n = new i
  400. }
  401. return e && A(n, e), n
  402. }
  403. function xt(t) {
  404. var e = t.style;
  405. e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none"
  406. }
  407. function _t(t, e) {
  408. return t.hasOwnProperty(e)
  409. }
  410. function bt() {}
  411. var wt = 180 / Math.PI,
  412. St = Object.freeze({
  413. __proto__: null,
  414. guid: M,
  415. logError: I,
  416. clone: T,
  417. merge: C,
  418. mergeAll: D,
  419. extend: A,
  420. defaults: k,
  421. createCanvas: L,
  422. indexOf: P,
  423. inherits: O,
  424. mixin: R,
  425. isArrayLike: N,
  426. each: E,
  427. map: z,
  428. reduce: V,
  429. filter: B,
  430. find: F,
  431. keys: G,
  432. bind: W,
  433. curry: H,
  434. isArray: Y,
  435. isFunction: X,
  436. isString: U,
  437. isStringSafe: Z,
  438. isNumber: j,
  439. isObject: q,
  440. isBuiltInObject: K,
  441. isTypedArray: $,
  442. isDom: J,
  443. isGradientObject: Q,
  444. isImagePatternObject: tt,
  445. isRegExp: et,
  446. eqNaN: nt,
  447. retrieve: it,
  448. retrieve2: rt,
  449. retrieve3: ot,
  450. slice: at,
  451. normalizeCssArray: st,
  452. assert: lt,
  453. trim: ut,
  454. setAsPrimitive: ct,
  455. isPrimitive: pt,
  456. HashMap: gt,
  457. createHashMap: yt,
  458. concatArray: vt,
  459. createObject: mt,
  460. disableUserSelect: xt,
  461. hasOwn: _t,
  462. noop: bt,
  463. RADIAN_TO_DEGREE: wt
  464. });
  465. function Mt(t, e) {
  466. return null == t && (t = 0), null == e && (e = 0), [t, e]
  467. }
  468. function It(t, e) {
  469. return t[0] = e[0], t[1] = e[1], t
  470. }
  471. function Tt(t) {
  472. return [t[0], t[1]]
  473. }
  474. function Ct(t, e, n) {
  475. return t[0] = e, t[1] = n, t
  476. }
  477. function Dt(t, e, n) {
  478. return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t
  479. }
  480. function At(t, e, n, i) {
  481. return t[0] = e[0] + n[0] * i, t[1] = e[1] + n[1] * i, t
  482. }
  483. function kt(t, e, n) {
  484. return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t
  485. }
  486. function Lt(t) {
  487. return Math.sqrt(Ot(t))
  488. }
  489. var Pt = Lt;
  490. function Ot(t) {
  491. return t[0] * t[0] + t[1] * t[1]
  492. }
  493. var Rt = Ot;
  494. function Nt(t, e, n) {
  495. return t[0] = e[0] * n, t[1] = e[1] * n, t
  496. }
  497. function Et(t, e) {
  498. var n = Lt(e);
  499. return 0 === n ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t
  500. }
  501. function zt(t, e) {
  502. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
  503. }
  504. var Vt = zt;
  505. function Bt(t, e) {
  506. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
  507. }
  508. var Ft = Bt;
  509. function Gt(t, e, n, i) {
  510. return t[0] = e[0] + i * (n[0] - e[0]), t[1] = e[1] + i * (n[1] - e[1]), t
  511. }
  512. function Wt(t, e, n) {
  513. var i = e[0],
  514. r = e[1];
  515. return t[0] = n[0] * i + n[2] * r + n[4], t[1] = n[1] * i + n[3] * r + n[5], t
  516. }
  517. function Ht(t, e, n) {
  518. return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t
  519. }
  520. function Yt(t, e, n) {
  521. return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t
  522. }
  523. var Xt = Object.freeze({
  524. __proto__: null,
  525. create: Mt,
  526. copy: It,
  527. clone: Tt,
  528. set: Ct,
  529. add: Dt,
  530. scaleAndAdd: At,
  531. sub: kt,
  532. len: Lt,
  533. length: Pt,
  534. lenSquare: Ot,
  535. lengthSquare: Rt,
  536. mul: function (t, e, n) {
  537. return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t
  538. },
  539. div: function (t, e, n) {
  540. return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t
  541. },
  542. dot: function (t, e) {
  543. return t[0] * e[0] + t[1] * e[1]
  544. },
  545. scale: Nt,
  546. normalize: Et,
  547. distance: zt,
  548. dist: Vt,
  549. distanceSquare: Bt,
  550. distSquare: Ft,
  551. negate: function (t, e) {
  552. return t[0] = -e[0], t[1] = -e[1], t
  553. },
  554. lerp: Gt,
  555. applyTransform: Wt,
  556. min: Ht,
  557. max: Yt
  558. }),
  559. Ut = function (t, e) {
  560. this.target = t, this.topTarget = e && e.topTarget
  561. },
  562. Zt = function () {
  563. function t(t) {
  564. this.handler = t, t.on("mousedown", this._dragStart, this), t.on("mousemove", this._drag, this), t.on("mouseup", this._dragEnd, this)
  565. }
  566. return t.prototype._dragStart = function (t) {
  567. for (var e = t.target; e && !e.draggable;) e = e.parent || e.__hostTarget;
  568. e && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.handler.dispatchToElement(new Ut(e, t), "dragstart", t.event))
  569. }, t.prototype._drag = function (t) {
  570. var e = this._draggingTarget;
  571. if (e) {
  572. var n = t.offsetX,
  573. i = t.offsetY,
  574. r = n - this._x,
  575. o = i - this._y;
  576. this._x = n, this._y = i, e.drift(r, o, t), this.handler.dispatchToElement(new Ut(e, t), "drag", t.event);
  577. var a = this.handler.findHover(n, i, e).target,
  578. s = this._dropTarget;
  579. this._dropTarget = a, e !== a && (s && a !== s && this.handler.dispatchToElement(new Ut(s, t), "dragleave", t.event), a && a !== s && this.handler.dispatchToElement(new Ut(a, t), "dragenter", t.event))
  580. }
  581. }, t.prototype._dragEnd = function (t) {
  582. var e = this._draggingTarget;
  583. e && (e.dragging = !1), this.handler.dispatchToElement(new Ut(e, t), "dragend", t.event), this._dropTarget && this.handler.dispatchToElement(new Ut(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null
  584. }, t
  585. }(),
  586. jt = function () {
  587. function t(t) {
  588. t && (this._$eventProcessor = t)
  589. }
  590. return t.prototype.on = function (t, e, n, i) {
  591. this._$handlers || (this._$handlers = {});
  592. var r = this._$handlers;
  593. if ("function" == typeof e && (i = n, n = e, e = null), !n || !t) return this;
  594. var o = this._$eventProcessor;
  595. null != e && o && o.normalizeQuery && (e = o.normalizeQuery(e)), r[t] || (r[t] = []);
  596. for (var a = 0; a < r[t].length; a++)
  597. if (r[t][a].h === n) return this;
  598. var s = {
  599. h: n,
  600. query: e,
  601. ctx: i || this,
  602. callAtLast: n.zrEventfulCallAtLast
  603. },
  604. l = r[t].length - 1,
  605. u = r[t][l];
  606. return u && u.callAtLast ? r[t].splice(l, 0, s) : r[t].push(s), this
  607. }, t.prototype.isSilent = function (t) {
  608. var e = this._$handlers;
  609. return !e || !e[t] || !e[t].length
  610. }, t.prototype.off = function (t, e) {
  611. var n = this._$handlers;
  612. if (!n) return this;
  613. if (!t) return this._$handlers = {}, this;
  614. if (e) {
  615. if (n[t]) {
  616. for (var i = [], r = 0, o = n[t].length; r < o; r++) n[t][r].h !== e && i.push(n[t][r]);
  617. n[t] = i
  618. }
  619. n[t] && 0 === n[t].length && delete n[t]
  620. } else delete n[t];
  621. return this
  622. }, t.prototype.trigger = function (t) {
  623. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  624. if (!this._$handlers) return this;
  625. var i = this._$handlers[t],
  626. r = this._$eventProcessor;
  627. if (i)
  628. for (var o = e.length, a = i.length, s = 0; s < a; s++) {
  629. var l = i[s];
  630. if (!r || !r.filter || null == l.query || r.filter(t, l.query)) switch (o) {
  631. case 0:
  632. l.h.call(l.ctx);
  633. break;
  634. case 1:
  635. l.h.call(l.ctx, e[0]);
  636. break;
  637. case 2:
  638. l.h.call(l.ctx, e[0], e[1]);
  639. break;
  640. default:
  641. l.h.apply(l.ctx, e)
  642. }
  643. }
  644. return r && r.afterTrigger && r.afterTrigger(t), this
  645. }, t.prototype.triggerWithContext = function (t) {
  646. for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  647. if (!this._$handlers) return this;
  648. var i = this._$handlers[t],
  649. r = this._$eventProcessor;
  650. if (i)
  651. for (var o = e.length, a = e[o - 1], s = i.length, l = 0; l < s; l++) {
  652. var u = i[l];
  653. if (!r || !r.filter || null == u.query || r.filter(t, u.query)) switch (o) {
  654. case 0:
  655. u.h.call(a);
  656. break;
  657. case 1:
  658. u.h.call(a, e[0]);
  659. break;
  660. case 2:
  661. u.h.call(a, e[0], e[1]);
  662. break;
  663. default:
  664. u.h.apply(a, e.slice(1, o - 1))
  665. }
  666. }
  667. return r && r.afterTrigger && r.afterTrigger(t), this
  668. }, t
  669. }(),
  670. qt = Math.log(2);
  671. function Kt(t, e, n, i, r, o) {
  672. var a = i + "-" + r,
  673. s = t.length;
  674. if (o.hasOwnProperty(a)) return o[a];
  675. if (1 === e) {
  676. var l = Math.round(Math.log((1 << s) - 1 & ~r) / qt);
  677. return t[n][l]
  678. }
  679. for (var u = i | 1 << n, h = n + 1; i & 1 << h;) h++;
  680. for (var c = 0, p = 0, d = 0; p < s; p++) {
  681. var f = 1 << p;
  682. f & r || (c += (d % 2 ? -1 : 1) * t[n][p] * Kt(t, e - 1, h, u, r | f, o), d++)
  683. }
  684. return o[a] = c, c
  685. }
  686. function $t(t, e) {
  687. var n = [
  688. [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
  689. [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
  690. [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
  691. [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
  692. [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
  693. [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
  694. [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
  695. [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  696. ],
  697. i = {},
  698. r = Kt(n, 8, 0, 0, 0, i);
  699. if (0 !== r) {
  700. for (var o = [], a = 0; a < 8; a++)
  701. for (var s = 0; s < 8; s++) null == o[s] && (o[s] = 0), o[s] += ((a + s) % 2 ? -1 : 1) * Kt(n, 7, 0 === a ? 1 : 0, 1 << a, 1 << s, i) / r * e[a];
  702. return function (t, e, n) {
  703. var i = e * o[6] + n * o[7] + 1;
  704. t[0] = (e * o[0] + n * o[1] + o[2]) / i, t[1] = (e * o[3] + n * o[4] + o[5]) / i
  705. }
  706. }
  707. }
  708. var Jt = "___zrEVENTSAVED",
  709. Qt = [];
  710. function te(t, e, n, i, o) {
  711. if (e.getBoundingClientRect && r.domSupported && !ee(e)) {
  712. var a = e[Jt] || (e[Jt] = {}),
  713. s = function (t, e) {
  714. var n = e.markers;
  715. if (n) return n;
  716. n = e.markers = [];
  717. for (var i = ["left", "right"], r = ["top", "bottom"], o = 0; o < 4; o++) {
  718. var a = document.createElement("div"),
  719. s = o % 2,
  720. l = (o >> 1) % 2;
  721. a.style.cssText = ["position: absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "user-select: none", "width:0", "height:0", i[s] + ":0", r[l] + ":0", i[1 - s] + ":auto", r[1 - l] + ":auto", ""].join("!important;"), t.appendChild(a), n.push(a)
  722. }
  723. return n
  724. }(e, a),
  725. l = function (t, e, n) {
  726. for (var i = n ? "invTrans" : "trans", r = e[i], o = e.srcCoords, a = [], s = [], l = !0, u = 0; u < 4; u++) {
  727. var h = t[u].getBoundingClientRect(),
  728. c = 2 * u,
  729. p = h.left,
  730. d = h.top;
  731. a.push(p, d), l = l && o && p === o[c] && d === o[c + 1], s.push(t[u].offsetLeft, t[u].offsetTop)
  732. }
  733. return l && r ? r : (e.srcCoords = a, e[i] = n ? $t(s, a) : $t(a, s))
  734. }(s, a, o);
  735. if (l) return l(t, n, i), !0
  736. }
  737. return !1
  738. }
  739. function ee(t) {
  740. return "CANVAS" === t.nodeName.toUpperCase()
  741. }
  742. var ne = /([&<>"'])/g,
  743. ie = {
  744. "&": "&amp;",
  745. "<": "&lt;",
  746. ">": "&gt;",
  747. '"': "&quot;",
  748. "'": "&#39;"
  749. };
  750. function re(t) {
  751. return null == t ? "" : (t + "").replace(ne, (function (t, e) {
  752. return ie[e]
  753. }))
  754. }
  755. var oe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  756. ae = [],
  757. se = r.browser.firefox && +r.browser.version.split(".")[0] < 39;
  758. function le(t, e, n, i) {
  759. return n = n || {}, i ? ue(t, e, n) : se && null != e.layerX && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : null != e.offsetX ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : ue(t, e, n), n
  760. }
  761. function ue(t, e, n) {
  762. if (r.domSupported && t.getBoundingClientRect) {
  763. var i = e.clientX,
  764. o = e.clientY;
  765. if (ee(t)) {
  766. var a = t.getBoundingClientRect();
  767. return n.zrX = i - a.left, void(n.zrY = o - a.top)
  768. }
  769. if (te(ae, t, i, o)) return n.zrX = ae[0], void(n.zrY = ae[1])
  770. }
  771. n.zrX = n.zrY = 0
  772. }
  773. function he(t) {
  774. return t || window.event
  775. }
  776. function ce(t, e, n) {
  777. if (null != (e = he(e)).zrX) return e;
  778. var i = e.type;
  779. if (i && i.indexOf("touch") >= 0) {
  780. var r = "touchend" !== i ? e.targetTouches[0] : e.changedTouches[0];
  781. r && le(t, r, e, n)
  782. } else {
  783. le(t, e, e, n);
  784. var o = function (t) {
  785. var e = t.wheelDelta;
  786. if (e) return e;
  787. var n = t.deltaX,
  788. i = t.deltaY;
  789. if (null == n || null == i) return e;
  790. return 3 * (0 !== i ? Math.abs(i) : Math.abs(n)) * (i > 0 ? -1 : i < 0 ? 1 : n > 0 ? -1 : 1)
  791. }(e);
  792. e.zrDelta = o ? o / 120 : -(e.detail || 0) / 3
  793. }
  794. var a = e.button;
  795. return null == e.which && void 0 !== a && oe.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e
  796. }
  797. function pe(t, e, n, i) {
  798. t.addEventListener(e, n, i)
  799. }
  800. var de = function (t) {
  801. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0
  802. };
  803. function fe(t) {
  804. return 2 === t.which || 3 === t.which
  805. }
  806. var ge = function () {
  807. function t() {
  808. this._track = []
  809. }
  810. return t.prototype.recognize = function (t, e, n) {
  811. return this._doTrack(t, e, n), this._recognize(t)
  812. }, t.prototype.clear = function () {
  813. return this._track.length = 0, this
  814. }, t.prototype._doTrack = function (t, e, n) {
  815. var i = t.touches;
  816. if (i) {
  817. for (var r = {
  818. points: [],
  819. touches: [],
  820. target: e,
  821. event: t
  822. }, o = 0, a = i.length; o < a; o++) {
  823. var s = i[o],
  824. l = le(n, s, {});
  825. r.points.push([l.zrX, l.zrY]), r.touches.push(s)
  826. }
  827. this._track.push(r)
  828. }
  829. }, t.prototype._recognize = function (t) {
  830. for (var e in ve)
  831. if (ve.hasOwnProperty(e)) {
  832. var n = ve[e](this._track, t);
  833. if (n) return n
  834. }
  835. }, t
  836. }();
  837. function ye(t) {
  838. var e = t[1][0] - t[0][0],
  839. n = t[1][1] - t[0][1];
  840. return Math.sqrt(e * e + n * n)
  841. }
  842. var ve = {
  843. pinch: function (t, e) {
  844. var n = t.length;
  845. if (n) {
  846. var i, r = (t[n - 1] || {}).points,
  847. o = (t[n - 2] || {}).points || r;
  848. if (o && o.length > 1 && r && r.length > 1) {
  849. var a = ye(r) / ye(o);
  850. !isFinite(a) && (a = 1), e.pinchScale = a;
  851. var s = [((i = r)[0][0] + i[1][0]) / 2, (i[0][1] + i[1][1]) / 2];
  852. return e.pinchX = s[0], e.pinchY = s[1], {
  853. type: "pinch",
  854. target: t[0].target,
  855. event: e
  856. }
  857. }
  858. }
  859. }
  860. };
  861. function me() {
  862. return [1, 0, 0, 1, 0, 0]
  863. }
  864. function xe(t) {
  865. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t
  866. }
  867. function _e(t, e) {
  868. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t
  869. }
  870. function be(t, e, n) {
  871. var i = e[0] * n[0] + e[2] * n[1],
  872. r = e[1] * n[0] + e[3] * n[1],
  873. o = e[0] * n[2] + e[2] * n[3],
  874. a = e[1] * n[2] + e[3] * n[3],
  875. s = e[0] * n[4] + e[2] * n[5] + e[4],
  876. l = e[1] * n[4] + e[3] * n[5] + e[5];
  877. return t[0] = i, t[1] = r, t[2] = o, t[3] = a, t[4] = s, t[5] = l, t
  878. }
  879. function we(t, e, n) {
  880. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + n[0], t[5] = e[5] + n[1], t
  881. }
  882. function Se(t, e, n, i) {
  883. void 0 === i && (i = [0, 0]);
  884. var r = e[0],
  885. o = e[2],
  886. a = e[4],
  887. s = e[1],
  888. l = e[3],
  889. u = e[5],
  890. h = Math.sin(n),
  891. c = Math.cos(n);
  892. return t[0] = r * c + s * h, t[1] = -r * h + s * c, t[2] = o * c + l * h, t[3] = -o * h + c * l, t[4] = c * (a - i[0]) + h * (u - i[1]) + i[0], t[5] = c * (u - i[1]) - h * (a - i[0]) + i[1], t
  893. }
  894. function Me(t, e, n) {
  895. var i = n[0],
  896. r = n[1];
  897. return t[0] = e[0] * i, t[1] = e[1] * r, t[2] = e[2] * i, t[3] = e[3] * r, t[4] = e[4] * i, t[5] = e[5] * r, t
  898. }
  899. function Ie(t, e) {
  900. var n = e[0],
  901. i = e[2],
  902. r = e[4],
  903. o = e[1],
  904. a = e[3],
  905. s = e[5],
  906. l = n * a - o * i;
  907. return l ? (l = 1 / l, t[0] = a * l, t[1] = -o * l, t[2] = -i * l, t[3] = n * l, t[4] = (i * s - a * r) * l, t[5] = (o * r - n * s) * l, t) : null
  908. }
  909. function Te(t) {
  910. var e = [1, 0, 0, 1, 0, 0];
  911. return _e(e, t), e
  912. }
  913. var Ce = Object.freeze({
  914. __proto__: null,
  915. create: me,
  916. identity: xe,
  917. copy: _e,
  918. mul: be,
  919. translate: we,
  920. rotate: Se,
  921. scale: Me,
  922. invert: Ie,
  923. clone: Te
  924. }),
  925. De = function () {
  926. function t(t, e) {
  927. this.x = t || 0, this.y = e || 0
  928. }
  929. return t.prototype.copy = function (t) {
  930. return this.x = t.x, this.y = t.y, this
  931. }, t.prototype.clone = function () {
  932. return new t(this.x, this.y)
  933. }, t.prototype.set = function (t, e) {
  934. return this.x = t, this.y = e, this
  935. }, t.prototype.equal = function (t) {
  936. return t.x === this.x && t.y === this.y
  937. }, t.prototype.add = function (t) {
  938. return this.x += t.x, this.y += t.y, this
  939. }, t.prototype.scale = function (t) {
  940. this.x *= t, this.y *= t
  941. }, t.prototype.scaleAndAdd = function (t, e) {
  942. this.x += t.x * e, this.y += t.y * e
  943. }, t.prototype.sub = function (t) {
  944. return this.x -= t.x, this.y -= t.y, this
  945. }, t.prototype.dot = function (t) {
  946. return this.x * t.x + this.y * t.y
  947. }, t.prototype.len = function () {
  948. return Math.sqrt(this.x * this.x + this.y * this.y)
  949. }, t.prototype.lenSquare = function () {
  950. return this.x * this.x + this.y * this.y
  951. }, t.prototype.normalize = function () {
  952. var t = this.len();
  953. return this.x /= t, this.y /= t, this
  954. }, t.prototype.distance = function (t) {
  955. var e = this.x - t.x,
  956. n = this.y - t.y;
  957. return Math.sqrt(e * e + n * n)
  958. }, t.prototype.distanceSquare = function (t) {
  959. var e = this.x - t.x,
  960. n = this.y - t.y;
  961. return e * e + n * n
  962. }, t.prototype.negate = function () {
  963. return this.x = -this.x, this.y = -this.y, this
  964. }, t.prototype.transform = function (t) {
  965. if (t) {
  966. var e = this.x,
  967. n = this.y;
  968. return this.x = t[0] * e + t[2] * n + t[4], this.y = t[1] * e + t[3] * n + t[5], this
  969. }
  970. }, t.prototype.toArray = function (t) {
  971. return t[0] = this.x, t[1] = this.y, t
  972. }, t.prototype.fromArray = function (t) {
  973. this.x = t[0], this.y = t[1]
  974. }, t.set = function (t, e, n) {
  975. t.x = e, t.y = n
  976. }, t.copy = function (t, e) {
  977. t.x = e.x, t.y = e.y
  978. }, t.len = function (t) {
  979. return Math.sqrt(t.x * t.x + t.y * t.y)
  980. }, t.lenSquare = function (t) {
  981. return t.x * t.x + t.y * t.y
  982. }, t.dot = function (t, e) {
  983. return t.x * e.x + t.y * e.y
  984. }, t.add = function (t, e, n) {
  985. t.x = e.x + n.x, t.y = e.y + n.y
  986. }, t.sub = function (t, e, n) {
  987. t.x = e.x - n.x, t.y = e.y - n.y
  988. }, t.scale = function (t, e, n) {
  989. t.x = e.x * n, t.y = e.y * n
  990. }, t.scaleAndAdd = function (t, e, n, i) {
  991. t.x = e.x + n.x * i, t.y = e.y + n.y * i
  992. }, t.lerp = function (t, e, n, i) {
  993. var r = 1 - i;
  994. t.x = r * e.x + i * n.x, t.y = r * e.y + i * n.y
  995. }, t
  996. }(),
  997. Ae = Math.min,
  998. ke = Math.max,
  999. Le = new De,
  1000. Pe = new De,
  1001. Oe = new De,
  1002. Re = new De,
  1003. Ne = new De,
  1004. Ee = new De,
  1005. ze = function () {
  1006. function t(t, e, n, i) {
  1007. n < 0 && (t += n, n = -n), i < 0 && (e += i, i = -i), this.x = t, this.y = e, this.width = n, this.height = i
  1008. }
  1009. return t.prototype.union = function (t) {
  1010. var e = Ae(t.x, this.x),
  1011. n = Ae(t.y, this.y);
  1012. isFinite(this.x) && isFinite(this.width) ? this.width = ke(t.x + t.width, this.x + this.width) - e : this.width = t.width, isFinite(this.y) && isFinite(this.height) ? this.height = ke(t.y + t.height, this.y + this.height) - n : this.height = t.height, this.x = e, this.y = n
  1013. }, t.prototype.applyTransform = function (e) {
  1014. t.applyTransform(this, this, e)
  1015. }, t.prototype.calculateTransform = function (t) {
  1016. var e = this,
  1017. n = t.width / e.width,
  1018. i = t.height / e.height,
  1019. r = [1, 0, 0, 1, 0, 0];
  1020. return we(r, r, [-e.x, -e.y]), Me(r, r, [n, i]), we(r, r, [t.x, t.y]), r
  1021. }, t.prototype.intersect = function (e, n) {
  1022. if (!e) return !1;
  1023. e instanceof t || (e = t.create(e));
  1024. var i = this,
  1025. r = i.x,
  1026. o = i.x + i.width,
  1027. a = i.y,
  1028. s = i.y + i.height,
  1029. l = e.x,
  1030. u = e.x + e.width,
  1031. h = e.y,
  1032. c = e.y + e.height,
  1033. p = !(o < l || u < r || s < h || c < a);
  1034. if (n) {
  1035. var d = 1 / 0,
  1036. f = 0,
  1037. g = Math.abs(o - l),
  1038. y = Math.abs(u - r),
  1039. v = Math.abs(s - h),
  1040. m = Math.abs(c - a),
  1041. x = Math.min(g, y),
  1042. _ = Math.min(v, m);
  1043. o < l || u < r ? x > f && (f = x, g < y ? De.set(Ee, -g, 0) : De.set(Ee, y, 0)) : x < d && (d = x, g < y ? De.set(Ne, g, 0) : De.set(Ne, -y, 0)), s < h || c < a ? _ > f && (f = _, v < m ? De.set(Ee, 0, -v) : De.set(Ee, 0, m)) : x < d && (d = x, v < m ? De.set(Ne, 0, v) : De.set(Ne, 0, -m))
  1044. }
  1045. return n && De.copy(n, p ? Ne : Ee), p
  1046. }, t.prototype.contain = function (t, e) {
  1047. var n = this;
  1048. return t >= n.x && t <= n.x + n.width && e >= n.y && e <= n.y + n.height
  1049. }, t.prototype.clone = function () {
  1050. return new t(this.x, this.y, this.width, this.height)
  1051. }, t.prototype.copy = function (e) {
  1052. t.copy(this, e)
  1053. }, t.prototype.plain = function () {
  1054. return {
  1055. x: this.x,
  1056. y: this.y,
  1057. width: this.width,
  1058. height: this.height
  1059. }
  1060. }, t.prototype.isFinite = function () {
  1061. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height)
  1062. }, t.prototype.isZero = function () {
  1063. return 0 === this.width || 0 === this.height
  1064. }, t.create = function (e) {
  1065. return new t(e.x, e.y, e.width, e.height)
  1066. }, t.copy = function (t, e) {
  1067. t.x = e.x, t.y = e.y, t.width = e.width, t.height = e.height
  1068. }, t.applyTransform = function (e, n, i) {
  1069. if (i) {
  1070. if (i[1] < 1e-5 && i[1] > -1e-5 && i[2] < 1e-5 && i[2] > -1e-5) {
  1071. var r = i[0],
  1072. o = i[3],
  1073. a = i[4],
  1074. s = i[5];
  1075. return e.x = n.x * r + a, e.y = n.y * o + s, e.width = n.width * r, e.height = n.height * o, e.width < 0 && (e.x += e.width, e.width = -e.width), void(e.height < 0 && (e.y += e.height, e.height = -e.height))
  1076. }
  1077. Le.x = Oe.x = n.x, Le.y = Re.y = n.y, Pe.x = Re.x = n.x + n.width, Pe.y = Oe.y = n.y + n.height, Le.transform(i), Re.transform(i), Pe.transform(i), Oe.transform(i), e.x = Ae(Le.x, Pe.x, Oe.x, Re.x), e.y = Ae(Le.y, Pe.y, Oe.y, Re.y);
  1078. var l = ke(Le.x, Pe.x, Oe.x, Re.x),
  1079. u = ke(Le.y, Pe.y, Oe.y, Re.y);
  1080. e.width = l - e.x, e.height = u - e.y
  1081. } else e !== n && t.copy(e, n)
  1082. }, t
  1083. }(),
  1084. Ve = "silent";
  1085. function Be() {
  1086. de(this.event)
  1087. }
  1088. var Fe = function (t) {
  1089. function e() {
  1090. var e = null !== t && t.apply(this, arguments) || this;
  1091. return e.handler = null, e
  1092. }
  1093. return n(e, t), e.prototype.dispose = function () {}, e.prototype.setCursor = function () {}, e
  1094. }(jt),
  1095. Ge = function (t, e) {
  1096. this.x = t, this.y = e
  1097. },
  1098. We = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  1099. He = new ze(0, 0, 0, 0),
  1100. Ye = function (t) {
  1101. function e(e, n, i, r, o) {
  1102. var a = t.call(this) || this;
  1103. return a._hovered = new Ge(0, 0), a.storage = e, a.painter = n, a.painterRoot = r, a._pointerSize = o, i = i || new Fe, a.proxy = null, a.setHandlerProxy(i), a._draggingMgr = new Zt(a), a
  1104. }
  1105. return n(e, t), e.prototype.setHandlerProxy = function (t) {
  1106. this.proxy && this.proxy.dispose(), t && (E(We, (function (e) {
  1107. t.on && t.on(e, this[e], this)
  1108. }), this), t.handler = this), this.proxy = t
  1109. }, e.prototype.mousemove = function (t) {
  1110. var e = t.zrX,
  1111. n = t.zrY,
  1112. i = Ze(this, e, n),
  1113. r = this._hovered,
  1114. o = r.target;
  1115. o && !o.__zr && (o = (r = this.findHover(r.x, r.y)).target);
  1116. var a = this._hovered = i ? new Ge(e, n) : this.findHover(e, n),
  1117. s = a.target,
  1118. l = this.proxy;
  1119. l.setCursor && l.setCursor(s ? s.cursor : "default"), o && s !== o && this.dispatchToElement(r, "mouseout", t), this.dispatchToElement(a, "mousemove", t), s && s !== o && this.dispatchToElement(a, "mouseover", t)
  1120. }, e.prototype.mouseout = function (t) {
  1121. var e = t.zrEventControl;
  1122. "only_globalout" !== e && this.dispatchToElement(this._hovered, "mouseout", t), "no_globalout" !== e && this.trigger("globalout", {
  1123. type: "globalout",
  1124. event: t
  1125. })
  1126. }, e.prototype.resize = function () {
  1127. this._hovered = new Ge(0, 0)
  1128. }, e.prototype.dispatch = function (t, e) {
  1129. var n = this[t];
  1130. n && n.call(this, e)
  1131. }, e.prototype.dispose = function () {
  1132. this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null
  1133. }, e.prototype.setCursorStyle = function (t) {
  1134. var e = this.proxy;
  1135. e.setCursor && e.setCursor(t)
  1136. }, e.prototype.dispatchToElement = function (t, e, n) {
  1137. var i = (t = t || {}).target;
  1138. if (!i || !i.silent) {
  1139. for (var r = "on" + e, o = function (t, e, n) {
  1140. return {
  1141. type: t,
  1142. event: n,
  1143. target: e.target,
  1144. topTarget: e.topTarget,
  1145. cancelBubble: !1,
  1146. offsetX: n.zrX,
  1147. offsetY: n.zrY,
  1148. gestureEvent: n.gestureEvent,
  1149. pinchX: n.pinchX,
  1150. pinchY: n.pinchY,
  1151. pinchScale: n.pinchScale,
  1152. wheelDelta: n.zrDelta,
  1153. zrByTouch: n.zrByTouch,
  1154. which: n.which,
  1155. stop: Be
  1156. }
  1157. }(e, t, n); i && (i[r] && (o.cancelBubble = !!i[r].call(i, o)), i.trigger(e, o), i = i.__hostTarget ? i.__hostTarget : i.parent, !o.cancelBubble););
  1158. o.cancelBubble || (this.trigger(e, o), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer((function (t) {
  1159. "function" == typeof t[r] && t[r].call(t, o), t.trigger && t.trigger(e, o)
  1160. })))
  1161. }
  1162. }, e.prototype.findHover = function (t, e, n) {
  1163. var i = this.storage.getDisplayList(),
  1164. r = new Ge(t, e);
  1165. if (Ue(i, r, t, e, n), this._pointerSize && !r.target) {
  1166. for (var o = [], a = this._pointerSize, s = a / 2, l = new ze(t - s, e - s, a, a), u = i.length - 1; u >= 0; u--) {
  1167. var h = i[u];
  1168. h === n || h.ignore || h.ignoreCoarsePointer || h.parent && h.parent.ignoreCoarsePointer || (He.copy(h.getBoundingRect()), h.transform && He.applyTransform(h.transform), He.intersect(l) && o.push(h))
  1169. }
  1170. if (o.length)
  1171. for (var c = Math.PI / 12, p = 2 * Math.PI, d = 0; d < s; d += 4)
  1172. for (var f = 0; f < p; f += c) {
  1173. if (Ue(o, r, t + d * Math.cos(f), e + d * Math.sin(f), n), r.target) return r
  1174. }
  1175. }
  1176. return r
  1177. }, e.prototype.processGesture = function (t, e) {
  1178. this._gestureMgr || (this._gestureMgr = new ge);
  1179. var n = this._gestureMgr;
  1180. "start" === e && n.clear();
  1181. var i = n.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
  1182. if ("end" === e && n.clear(), i) {
  1183. var r = i.type;
  1184. t.gestureEvent = r;
  1185. var o = new Ge;
  1186. o.target = i.target, this.dispatchToElement(o, r, i.event)
  1187. }
  1188. }, e
  1189. }(jt);
  1190. function Xe(t, e, n) {
  1191. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  1192. for (var i = t, r = void 0, o = !1; i;) {
  1193. if (i.ignoreClip && (o = !0), !o) {
  1194. var a = i.getClipPath();
  1195. if (a && !a.contain(e, n)) return !1
  1196. }
  1197. i.silent && (r = !0);
  1198. var s = i.__hostTarget;
  1199. i = s || i.parent
  1200. }
  1201. return !r || Ve
  1202. }
  1203. return !1
  1204. }
  1205. function Ue(t, e, n, i, r) {
  1206. for (var o = t.length - 1; o >= 0; o--) {
  1207. var a = t[o],
  1208. s = void 0;
  1209. if (a !== r && !a.ignore && (s = Xe(a, n, i)) && (!e.topTarget && (e.topTarget = a), s !== Ve)) {
  1210. e.target = a;
  1211. break
  1212. }
  1213. }
  1214. }
  1215. function Ze(t, e, n) {
  1216. var i = t.painter;
  1217. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  1218. }
  1219. E(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], (function (t) {
  1220. Ye.prototype[t] = function (e) {
  1221. var n, i, r = e.zrX,
  1222. o = e.zrY,
  1223. a = Ze(this, r, o);
  1224. if ("mouseup" === t && a || (i = (n = this.findHover(r, o)).target), "mousedown" === t) this._downEl = i, this._downPoint = [e.zrX, e.zrY], this._upEl = i;
  1225. else if ("mouseup" === t) this._upEl = i;
  1226. else if ("click" === t) {
  1227. if (this._downEl !== this._upEl || !this._downPoint || Vt(this._downPoint, [e.zrX, e.zrY]) > 4) return;
  1228. this._downPoint = null
  1229. }
  1230. this.dispatchToElement(n, t, e)
  1231. }
  1232. }));
  1233. function je(t, e, n, i) {
  1234. var r = e + 1;
  1235. if (r === n) return 1;
  1236. if (i(t[r++], t[e]) < 0) {
  1237. for (; r < n && i(t[r], t[r - 1]) < 0;) r++;
  1238. ! function (t, e, n) {
  1239. n--;
  1240. for (; e < n;) {
  1241. var i = t[e];
  1242. t[e++] = t[n], t[n--] = i
  1243. }
  1244. }(t, e, r)
  1245. } else
  1246. for (; r < n && i(t[r], t[r - 1]) >= 0;) r++;
  1247. return r - e
  1248. }
  1249. function qe(t, e, n, i, r) {
  1250. for (i === e && i++; i < n; i++) {
  1251. for (var o, a = t[i], s = e, l = i; s < l;) r(a, t[o = s + l >>> 1]) < 0 ? l = o : s = o + 1;
  1252. var u = i - s;
  1253. switch (u) {
  1254. case 3:
  1255. t[s + 3] = t[s + 2];
  1256. case 2:
  1257. t[s + 2] = t[s + 1];
  1258. case 1:
  1259. t[s + 1] = t[s];
  1260. break;
  1261. default:
  1262. for (; u > 0;) t[s + u] = t[s + u - 1], u--
  1263. }
  1264. t[s] = a
  1265. }
  1266. }
  1267. function Ke(t, e, n, i, r, o) {
  1268. var a = 0,
  1269. s = 0,
  1270. l = 1;
  1271. if (o(t, e[n + r]) > 0) {
  1272. for (s = i - r; l < s && o(t, e[n + r + l]) > 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1273. l > s && (l = s), a += r, l += r
  1274. } else {
  1275. for (s = r + 1; l < s && o(t, e[n + r - l]) <= 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1276. l > s && (l = s);
  1277. var u = a;
  1278. a = r - l, l = r - u
  1279. }
  1280. for (a++; a < l;) {
  1281. var h = a + (l - a >>> 1);
  1282. o(t, e[n + h]) > 0 ? a = h + 1 : l = h
  1283. }
  1284. return l
  1285. }
  1286. function $e(t, e, n, i, r, o) {
  1287. var a = 0,
  1288. s = 0,
  1289. l = 1;
  1290. if (o(t, e[n + r]) < 0) {
  1291. for (s = r + 1; l < s && o(t, e[n + r - l]) < 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1292. l > s && (l = s);
  1293. var u = a;
  1294. a = r - l, l = r - u
  1295. } else {
  1296. for (s = i - r; l < s && o(t, e[n + r + l]) >= 0;) a = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  1297. l > s && (l = s), a += r, l += r
  1298. }
  1299. for (a++; a < l;) {
  1300. var h = a + (l - a >>> 1);
  1301. o(t, e[n + h]) < 0 ? l = h : a = h + 1
  1302. }
  1303. return l
  1304. }
  1305. function Je(t, e) {
  1306. var n, i, r = 7,
  1307. o = 0,
  1308. a = [];
  1309. function s(s) {
  1310. var l = n[s],
  1311. u = i[s],
  1312. h = n[s + 1],
  1313. c = i[s + 1];
  1314. i[s] = u + c, s === o - 3 && (n[s + 1] = n[s + 2], i[s + 1] = i[s + 2]), o--;
  1315. var p = $e(t[h], t, l, u, 0, e);
  1316. l += p, 0 !== (u -= p) && 0 !== (c = Ke(t[l + u - 1], t, h, c, c - 1, e)) && (u <= c ? function (n, i, o, s) {
  1317. var l = 0;
  1318. for (l = 0; l < i; l++) a[l] = t[n + l];
  1319. var u = 0,
  1320. h = o,
  1321. c = n;
  1322. if (t[c++] = t[h++], 0 == --s) {
  1323. for (l = 0; l < i; l++) t[c + l] = a[u + l];
  1324. return
  1325. }
  1326. if (1 === i) {
  1327. for (l = 0; l < s; l++) t[c + l] = t[h + l];
  1328. return void(t[c + s] = a[u])
  1329. }
  1330. var p, d, f, g = r;
  1331. for (;;) {
  1332. p = 0, d = 0, f = !1;
  1333. do {
  1334. if (e(t[h], a[u]) < 0) {
  1335. if (t[c++] = t[h++], d++, p = 0, 0 == --s) {
  1336. f = !0;
  1337. break
  1338. }
  1339. } else if (t[c++] = a[u++], p++, d = 0, 1 == --i) {
  1340. f = !0;
  1341. break
  1342. }
  1343. } while ((p | d) < g);
  1344. if (f) break;
  1345. do {
  1346. if (0 !== (p = $e(t[h], a, u, i, 0, e))) {
  1347. for (l = 0; l < p; l++) t[c + l] = a[u + l];
  1348. if (c += p, u += p, (i -= p) <= 1) {
  1349. f = !0;
  1350. break
  1351. }
  1352. }
  1353. if (t[c++] = t[h++], 0 == --s) {
  1354. f = !0;
  1355. break
  1356. }
  1357. if (0 !== (d = Ke(a[u], t, h, s, 0, e))) {
  1358. for (l = 0; l < d; l++) t[c + l] = t[h + l];
  1359. if (c += d, h += d, 0 === (s -= d)) {
  1360. f = !0;
  1361. break
  1362. }
  1363. }
  1364. if (t[c++] = a[u++], 1 == --i) {
  1365. f = !0;
  1366. break
  1367. }
  1368. g--
  1369. } while (p >= 7 || d >= 7);
  1370. if (f) break;
  1371. g < 0 && (g = 0), g += 2
  1372. }
  1373. if ((r = g) < 1 && (r = 1), 1 === i) {
  1374. for (l = 0; l < s; l++) t[c + l] = t[h + l];
  1375. t[c + s] = a[u]
  1376. } else {
  1377. if (0 === i) throw new Error;
  1378. for (l = 0; l < i; l++) t[c + l] = a[u + l]
  1379. }
  1380. }(l, u, h, c) : function (n, i, o, s) {
  1381. var l = 0;
  1382. for (l = 0; l < s; l++) a[l] = t[o + l];
  1383. var u = n + i - 1,
  1384. h = s - 1,
  1385. c = o + s - 1,
  1386. p = 0,
  1387. d = 0;
  1388. if (t[c--] = t[u--], 0 == --i) {
  1389. for (p = c - (s - 1), l = 0; l < s; l++) t[p + l] = a[l];
  1390. return
  1391. }
  1392. if (1 === s) {
  1393. for (d = (c -= i) + 1, p = (u -= i) + 1, l = i - 1; l >= 0; l--) t[d + l] = t[p + l];
  1394. return void(t[c] = a[h])
  1395. }
  1396. var f = r;
  1397. for (;;) {
  1398. var g = 0,
  1399. y = 0,
  1400. v = !1;
  1401. do {
  1402. if (e(a[h], t[u]) < 0) {
  1403. if (t[c--] = t[u--], g++, y = 0, 0 == --i) {
  1404. v = !0;
  1405. break
  1406. }
  1407. } else if (t[c--] = a[h--], y++, g = 0, 1 == --s) {
  1408. v = !0;
  1409. break
  1410. }
  1411. } while ((g | y) < f);
  1412. if (v) break;
  1413. do {
  1414. if (0 !== (g = i - $e(a[h], t, n, i, i - 1, e))) {
  1415. for (i -= g, d = (c -= g) + 1, p = (u -= g) + 1, l = g - 1; l >= 0; l--) t[d + l] = t[p + l];
  1416. if (0 === i) {
  1417. v = !0;
  1418. break
  1419. }
  1420. }
  1421. if (t[c--] = a[h--], 1 == --s) {
  1422. v = !0;
  1423. break
  1424. }
  1425. if (0 !== (y = s - Ke(t[u], a, 0, s, s - 1, e))) {
  1426. for (s -= y, d = (c -= y) + 1, p = (h -= y) + 1, l = 0; l < y; l++) t[d + l] = a[p + l];
  1427. if (s <= 1) {
  1428. v = !0;
  1429. break
  1430. }
  1431. }
  1432. if (t[c--] = t[u--], 0 == --i) {
  1433. v = !0;
  1434. break
  1435. }
  1436. f--
  1437. } while (g >= 7 || y >= 7);
  1438. if (v) break;
  1439. f < 0 && (f = 0), f += 2
  1440. }(r = f) < 1 && (r = 1);
  1441. if (1 === s) {
  1442. for (d = (c -= i) + 1, p = (u -= i) + 1, l = i - 1; l >= 0; l--) t[d + l] = t[p + l];
  1443. t[c] = a[h]
  1444. } else {
  1445. if (0 === s) throw new Error;
  1446. for (p = c - (s - 1), l = 0; l < s; l++) t[p + l] = a[l]
  1447. }
  1448. }(l, u, h, c))
  1449. }
  1450. return n = [], i = [], {
  1451. mergeRuns: function () {
  1452. for (; o > 1;) {
  1453. var t = o - 2;
  1454. if (t >= 1 && i[t - 1] <= i[t] + i[t + 1] || t >= 2 && i[t - 2] <= i[t] + i[t - 1]) i[t - 1] < i[t + 1] && t--;
  1455. else if (i[t] > i[t + 1]) break;
  1456. s(t)
  1457. }
  1458. },
  1459. forceMergeRuns: function () {
  1460. for (; o > 1;) {
  1461. var t = o - 2;
  1462. t > 0 && i[t - 1] < i[t + 1] && t--, s(t)
  1463. }
  1464. },
  1465. pushRun: function (t, e) {
  1466. n[o] = t, i[o] = e, o += 1
  1467. }
  1468. }
  1469. }
  1470. function Qe(t, e, n, i) {
  1471. n || (n = 0), i || (i = t.length);
  1472. var r = i - n;
  1473. if (!(r < 2)) {
  1474. var o = 0;
  1475. if (r < 32) qe(t, n, i, n + (o = je(t, n, i, e)), e);
  1476. else {
  1477. var a = Je(t, e),
  1478. s = function (t) {
  1479. for (var e = 0; t >= 32;) e |= 1 & t, t >>= 1;
  1480. return t + e
  1481. }(r);
  1482. do {
  1483. if ((o = je(t, n, i, e)) < s) {
  1484. var l = r;
  1485. l > s && (l = s), qe(t, n, n + l, n + o, e), o = l
  1486. }
  1487. a.pushRun(n, o), a.mergeRuns(), r -= o, n += o
  1488. } while (0 !== r);
  1489. a.forceMergeRuns()
  1490. }
  1491. }
  1492. }
  1493. var tn = !1;
  1494. function en() {
  1495. tn || (tn = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))
  1496. }
  1497. function nn(t, e) {
  1498. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
  1499. }
  1500. var rn = function () {
  1501. function t() {
  1502. this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = nn
  1503. }
  1504. return t.prototype.traverse = function (t, e) {
  1505. for (var n = 0; n < this._roots.length; n++) this._roots[n].traverse(t, e)
  1506. }, t.prototype.getDisplayList = function (t, e) {
  1507. e = e || !1;
  1508. var n = this._displayList;
  1509. return !t && n.length || this.updateDisplayList(e), n
  1510. }, t.prototype.updateDisplayList = function (t) {
  1511. this._displayListLen = 0;
  1512. for (var e = this._roots, n = this._displayList, i = 0, r = e.length; i < r; i++) this._updateAndAddDisplayable(e[i], null, t);
  1513. n.length = this._displayListLen, Qe(n, nn)
  1514. }, t.prototype._updateAndAddDisplayable = function (t, e, n) {
  1515. if (!t.ignore || n) {
  1516. t.beforeUpdate(), t.update(), t.afterUpdate();
  1517. var i = t.getClipPath();
  1518. if (t.ignoreClip) e = null;
  1519. else if (i) {
  1520. e = e ? e.slice() : [];
  1521. for (var r = i, o = t; r;) r.parent = o, r.updateTransform(), e.push(r), o = r, r = r.getClipPath()
  1522. }
  1523. if (t.childrenRef) {
  1524. for (var a = t.childrenRef(), s = 0; s < a.length; s++) {
  1525. var l = a[s];
  1526. t.__dirty && (l.__dirty |= 1), this._updateAndAddDisplayable(l, e, n)
  1527. }
  1528. t.__dirty = 0
  1529. } else {
  1530. var u = t;
  1531. e && e.length ? u.__clipPaths = e : u.__clipPaths && u.__clipPaths.length > 0 && (u.__clipPaths = []), isNaN(u.z) && (en(), u.z = 0), isNaN(u.z2) && (en(), u.z2 = 0), isNaN(u.zlevel) && (en(), u.zlevel = 0), this._displayList[this._displayListLen++] = u
  1532. }
  1533. var h = t.getDecalElement && t.getDecalElement();
  1534. h && this._updateAndAddDisplayable(h, e, n);
  1535. var c = t.getTextGuideLine();
  1536. c && this._updateAndAddDisplayable(c, e, n);
  1537. var p = t.getTextContent();
  1538. p && this._updateAndAddDisplayable(p, e, n)
  1539. }
  1540. }, t.prototype.addRoot = function (t) {
  1541. t.__zr && t.__zr.storage === this || this._roots.push(t)
  1542. }, t.prototype.delRoot = function (t) {
  1543. if (t instanceof Array)
  1544. for (var e = 0, n = t.length; e < n; e++) this.delRoot(t[e]);
  1545. else {
  1546. var i = P(this._roots, t);
  1547. i >= 0 && this._roots.splice(i, 1)
  1548. }
  1549. }, t.prototype.delAllRoots = function () {
  1550. this._roots = [], this._displayList = [], this._displayListLen = 0
  1551. }, t.prototype.getRoots = function () {
  1552. return this._roots
  1553. }, t.prototype.dispose = function () {
  1554. this._displayList = null, this._roots = null
  1555. }, t
  1556. }(),
  1557. on = r.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) {
  1558. return setTimeout(t, 16)
  1559. },
  1560. an = {
  1561. linear: function (t) {
  1562. return t
  1563. },
  1564. quadraticIn: function (t) {
  1565. return t * t
  1566. },
  1567. quadraticOut: function (t) {
  1568. return t * (2 - t)
  1569. },
  1570. quadraticInOut: function (t) {
  1571. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
  1572. },
  1573. cubicIn: function (t) {
  1574. return t * t * t
  1575. },
  1576. cubicOut: function (t) {
  1577. return --t * t * t + 1
  1578. },
  1579. cubicInOut: function (t) {
  1580. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
  1581. },
  1582. quarticIn: function (t) {
  1583. return t * t * t * t
  1584. },
  1585. quarticOut: function (t) {
  1586. return 1 - --t * t * t * t
  1587. },
  1588. quarticInOut: function (t) {
  1589. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
  1590. },
  1591. quinticIn: function (t) {
  1592. return t * t * t * t * t
  1593. },
  1594. quinticOut: function (t) {
  1595. return --t * t * t * t * t + 1
  1596. },
  1597. quinticInOut: function (t) {
  1598. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
  1599. },
  1600. sinusoidalIn: function (t) {
  1601. return 1 - Math.cos(t * Math.PI / 2)
  1602. },
  1603. sinusoidalOut: function (t) {
  1604. return Math.sin(t * Math.PI / 2)
  1605. },
  1606. sinusoidalInOut: function (t) {
  1607. return .5 * (1 - Math.cos(Math.PI * t))
  1608. },
  1609. exponentialIn: function (t) {
  1610. return 0 === t ? 0 : Math.pow(1024, t - 1)
  1611. },
  1612. exponentialOut: function (t) {
  1613. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
  1614. },
  1615. exponentialInOut: function (t) {
  1616. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1)))
  1617. },
  1618. circularIn: function (t) {
  1619. return 1 - Math.sqrt(1 - t * t)
  1620. },
  1621. circularOut: function (t) {
  1622. return Math.sqrt(1 - --t * t)
  1623. },
  1624. circularInOut: function (t) {
  1625. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  1626. },
  1627. elasticIn: function (t) {
  1628. var e, n = .1;
  1629. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI), -n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4))
  1630. },
  1631. elasticOut: function (t) {
  1632. var e, n = .1;
  1633. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / .4) + 1)
  1634. },
  1635. elasticInOut: function (t) {
  1636. var e, n = .1,
  1637. i = .4;
  1638. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1, e = .1) : e = i * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / i) * -.5 : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / i) * .5 + 1)
  1639. },
  1640. backIn: function (t) {
  1641. var e = 1.70158;
  1642. return t * t * ((e + 1) * t - e)
  1643. },
  1644. backOut: function (t) {
  1645. var e = 1.70158;
  1646. return --t * t * ((e + 1) * t + e) + 1
  1647. },
  1648. backInOut: function (t) {
  1649. var e = 2.5949095;
  1650. return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  1651. },
  1652. bounceIn: function (t) {
  1653. return 1 - an.bounceOut(1 - t)
  1654. },
  1655. bounceOut: function (t) {
  1656. return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  1657. },
  1658. bounceInOut: function (t) {
  1659. return t < .5 ? .5 * an.bounceIn(2 * t) : .5 * an.bounceOut(2 * t - 1) + .5
  1660. }
  1661. },
  1662. sn = Math.pow,
  1663. ln = Math.sqrt,
  1664. un = 1e-8,
  1665. hn = 1e-4,
  1666. cn = ln(3),
  1667. pn = 1 / 3,
  1668. dn = Mt(),
  1669. fn = Mt(),
  1670. gn = Mt();
  1671. function yn(t) {
  1672. return t > -1e-8 && t < un
  1673. }
  1674. function vn(t) {
  1675. return t > un || t < -1e-8
  1676. }
  1677. function mn(t, e, n, i, r) {
  1678. var o = 1 - r;
  1679. return o * o * (o * t + 3 * r * e) + r * r * (r * i + 3 * o * n)
  1680. }
  1681. function xn(t, e, n, i, r) {
  1682. var o = 1 - r;
  1683. return 3 * (((e - t) * o + 2 * (n - e) * r) * o + (i - n) * r * r)
  1684. }
  1685. function _n(t, e, n, i, r, o) {
  1686. var a = i + 3 * (e - n) - t,
  1687. s = 3 * (n - 2 * e + t),
  1688. l = 3 * (e - t),
  1689. u = t - r,
  1690. h = s * s - 3 * a * l,
  1691. c = s * l - 9 * a * u,
  1692. p = l * l - 3 * s * u,
  1693. d = 0;
  1694. if (yn(h) && yn(c)) {
  1695. if (yn(s)) o[0] = 0;
  1696. else(M = -l / s) >= 0 && M <= 1 && (o[d++] = M)
  1697. } else {
  1698. var f = c * c - 4 * h * p;
  1699. if (yn(f)) {
  1700. var g = c / h,
  1701. y = -g / 2;
  1702. (M = -s / a + g) >= 0 && M <= 1 && (o[d++] = M), y >= 0 && y <= 1 && (o[d++] = y)
  1703. } else if (f > 0) {
  1704. var v = ln(f),
  1705. m = h * s + 1.5 * a * (-c + v),
  1706. x = h * s + 1.5 * a * (-c - v);
  1707. (M = (-s - ((m = m < 0 ? -sn(-m, pn) : sn(m, pn)) + (x = x < 0 ? -sn(-x, pn) : sn(x, pn)))) / (3 * a)) >= 0 && M <= 1 && (o[d++] = M)
  1708. } else {
  1709. var _ = (2 * h * s - 3 * a * c) / (2 * ln(h * h * h)),
  1710. b = Math.acos(_) / 3,
  1711. w = ln(h),
  1712. S = Math.cos(b),
  1713. M = (-s - 2 * w * S) / (3 * a),
  1714. I = (y = (-s + w * (S + cn * Math.sin(b))) / (3 * a), (-s + w * (S - cn * Math.sin(b))) / (3 * a));
  1715. M >= 0 && M <= 1 && (o[d++] = M), y >= 0 && y <= 1 && (o[d++] = y), I >= 0 && I <= 1 && (o[d++] = I)
  1716. }
  1717. }
  1718. return d
  1719. }
  1720. function bn(t, e, n, i, r) {
  1721. var o = 6 * n - 12 * e + 6 * t,
  1722. a = 9 * e + 3 * i - 3 * t - 9 * n,
  1723. s = 3 * e - 3 * t,
  1724. l = 0;
  1725. if (yn(a)) {
  1726. if (vn(o))(h = -s / o) >= 0 && h <= 1 && (r[l++] = h)
  1727. } else {
  1728. var u = o * o - 4 * a * s;
  1729. if (yn(u)) r[0] = -o / (2 * a);
  1730. else if (u > 0) {
  1731. var h, c = ln(u),
  1732. p = (-o - c) / (2 * a);
  1733. (h = (-o + c) / (2 * a)) >= 0 && h <= 1 && (r[l++] = h), p >= 0 && p <= 1 && (r[l++] = p)
  1734. }
  1735. }
  1736. return l
  1737. }
  1738. function wn(t, e, n, i, r, o) {
  1739. var a = (e - t) * r + t,
  1740. s = (n - e) * r + e,
  1741. l = (i - n) * r + n,
  1742. u = (s - a) * r + a,
  1743. h = (l - s) * r + s,
  1744. c = (h - u) * r + u;
  1745. o[0] = t, o[1] = a, o[2] = u, o[3] = c, o[4] = c, o[5] = h, o[6] = l, o[7] = i
  1746. }
  1747. function Sn(t, e, n, i, r, o, a, s, l, u, h) {
  1748. var c, p, d, f, g, y = .005,
  1749. v = 1 / 0;
  1750. dn[0] = l, dn[1] = u;
  1751. for (var m = 0; m < 1; m += .05) fn[0] = mn(t, n, r, a, m), fn[1] = mn(e, i, o, s, m), (f = Ft(dn, fn)) < v && (c = m, v = f);
  1752. v = 1 / 0;
  1753. for (var x = 0; x < 32 && !(y < hn); x++) p = c - y, d = c + y, fn[0] = mn(t, n, r, a, p), fn[1] = mn(e, i, o, s, p), f = Ft(fn, dn), p >= 0 && f < v ? (c = p, v = f) : (gn[0] = mn(t, n, r, a, d), gn[1] = mn(e, i, o, s, d), g = Ft(gn, dn), d <= 1 && g < v ? (c = d, v = g) : y *= .5);
  1754. return h && (h[0] = mn(t, n, r, a, c), h[1] = mn(e, i, o, s, c)), ln(v)
  1755. }
  1756. function Mn(t, e, n, i, r, o, a, s, l) {
  1757. for (var u = t, h = e, c = 0, p = 1 / l, d = 1; d <= l; d++) {
  1758. var f = d * p,
  1759. g = mn(t, n, r, a, f),
  1760. y = mn(e, i, o, s, f),
  1761. v = g - u,
  1762. m = y - h;
  1763. c += Math.sqrt(v * v + m * m), u = g, h = y
  1764. }
  1765. return c
  1766. }
  1767. function In(t, e, n, i) {
  1768. var r = 1 - i;
  1769. return r * (r * t + 2 * i * e) + i * i * n
  1770. }
  1771. function Tn(t, e, n, i) {
  1772. return 2 * ((1 - i) * (e - t) + i * (n - e))
  1773. }
  1774. function Cn(t, e, n) {
  1775. var i = t + n - 2 * e;
  1776. return 0 === i ? .5 : (t - e) / i
  1777. }
  1778. function Dn(t, e, n, i, r) {
  1779. var o = (e - t) * i + t,
  1780. a = (n - e) * i + e,
  1781. s = (a - o) * i + o;
  1782. r[0] = t, r[1] = o, r[2] = s, r[3] = s, r[4] = a, r[5] = n
  1783. }
  1784. function An(t, e, n, i, r, o, a, s, l) {
  1785. var u, h = .005,
  1786. c = 1 / 0;
  1787. dn[0] = a, dn[1] = s;
  1788. for (var p = 0; p < 1; p += .05) {
  1789. fn[0] = In(t, n, r, p), fn[1] = In(e, i, o, p), (y = Ft(dn, fn)) < c && (u = p, c = y)
  1790. }
  1791. c = 1 / 0;
  1792. for (var d = 0; d < 32 && !(h < hn); d++) {
  1793. var f = u - h,
  1794. g = u + h;
  1795. fn[0] = In(t, n, r, f), fn[1] = In(e, i, o, f);
  1796. var y = Ft(fn, dn);
  1797. if (f >= 0 && y < c) u = f, c = y;
  1798. else {
  1799. gn[0] = In(t, n, r, g), gn[1] = In(e, i, o, g);
  1800. var v = Ft(gn, dn);
  1801. g <= 1 && v < c ? (u = g, c = v) : h *= .5
  1802. }
  1803. }
  1804. return l && (l[0] = In(t, n, r, u), l[1] = In(e, i, o, u)), ln(c)
  1805. }
  1806. function kn(t, e, n, i, r, o, a) {
  1807. for (var s = t, l = e, u = 0, h = 1 / a, c = 1; c <= a; c++) {
  1808. var p = c * h,
  1809. d = In(t, n, r, p),
  1810. f = In(e, i, o, p),
  1811. g = d - s,
  1812. y = f - l;
  1813. u += Math.sqrt(g * g + y * y), s = d, l = f
  1814. }
  1815. return u
  1816. }
  1817. var Ln = /cubic-bezier\(([0-9,\.e ]+)\)/;
  1818. function Pn(t) {
  1819. var e = t && Ln.exec(t);
  1820. if (e) {
  1821. var n = e[1].split(","),
  1822. i = +ut(n[0]),
  1823. r = +ut(n[1]),
  1824. o = +ut(n[2]),
  1825. a = +ut(n[3]);
  1826. if (isNaN(i + r + o + a)) return;
  1827. var s = [];
  1828. return function (t) {
  1829. return t <= 0 ? 0 : t >= 1 ? 1 : _n(0, i, o, 1, t, s) && mn(0, r, a, 1, s[0])
  1830. }
  1831. }
  1832. }
  1833. var On = function () {
  1834. function t(t) {
  1835. this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = t.life || 1e3, this._delay = t.delay || 0, this.loop = t.loop || !1, this.onframe = t.onframe || bt, this.ondestroy = t.ondestroy || bt, this.onrestart = t.onrestart || bt, t.easing && this.setEasing(t.easing)
  1836. }
  1837. return t.prototype.step = function (t, e) {
  1838. if (this._inited || (this._startTime = t + this._delay, this._inited = !0), !this._paused) {
  1839. var n = this._life,
  1840. i = t - this._startTime - this._pausedTime,
  1841. r = i / n;
  1842. r < 0 && (r = 0), r = Math.min(r, 1);
  1843. var o = this.easingFunc,
  1844. a = o ? o(r) : r;
  1845. if (this.onframe(a), 1 === r) {
  1846. if (!this.loop) return !0;
  1847. var s = i % n;
  1848. this._startTime = t - s, this._pausedTime = 0, this.onrestart()
  1849. }
  1850. return !1
  1851. }
  1852. this._pausedTime += e
  1853. }, t.prototype.pause = function () {
  1854. this._paused = !0
  1855. }, t.prototype.resume = function () {
  1856. this._paused = !1
  1857. }, t.prototype.setEasing = function (t) {
  1858. this.easing = t, this.easingFunc = X(t) ? t : an[t] || Pn(t)
  1859. }, t
  1860. }(),
  1861. Rn = function (t) {
  1862. this.value = t
  1863. },
  1864. Nn = function () {
  1865. function t() {
  1866. this._len = 0
  1867. }
  1868. return t.prototype.insert = function (t) {
  1869. var e = new Rn(t);
  1870. return this.insertEntry(e), e
  1871. }, t.prototype.insertEntry = function (t) {
  1872. this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t, this._len++
  1873. }, t.prototype.remove = function (t) {
  1874. var e = t.prev,
  1875. n = t.next;
  1876. e ? e.next = n : this.head = n, n ? n.prev = e : this.tail = e, t.next = t.prev = null, this._len--
  1877. }, t.prototype.len = function () {
  1878. return this._len
  1879. }, t.prototype.clear = function () {
  1880. this.head = this.tail = null, this._len = 0
  1881. }, t
  1882. }(),
  1883. En = function () {
  1884. function t(t) {
  1885. this._list = new Nn, this._maxSize = 10, this._map = {}, this._maxSize = t
  1886. }
  1887. return t.prototype.put = function (t, e) {
  1888. var n = this._list,
  1889. i = this._map,
  1890. r = null;
  1891. if (null == i[t]) {
  1892. var o = n.len(),
  1893. a = this._lastRemovedEntry;
  1894. if (o >= this._maxSize && o > 0) {
  1895. var s = n.head;
  1896. n.remove(s), delete i[s.key], r = s.value, this._lastRemovedEntry = s
  1897. }
  1898. a ? a.value = e : a = new Rn(e), a.key = t, n.insertEntry(a), i[t] = a
  1899. }
  1900. return r
  1901. }, t.prototype.get = function (t) {
  1902. var e = this._map[t],
  1903. n = this._list;
  1904. if (null != e) return e !== n.tail && (n.remove(e), n.insertEntry(e)), e.value
  1905. }, t.prototype.clear = function () {
  1906. this._list.clear(), this._map = {}
  1907. }, t.prototype.len = function () {
  1908. return this._list.len()
  1909. }, t
  1910. }(),
  1911. zn = {
  1912. transparent: [0, 0, 0, 0],
  1913. aliceblue: [240, 248, 255, 1],
  1914. antiquewhite: [250, 235, 215, 1],
  1915. aqua: [0, 255, 255, 1],
  1916. aquamarine: [127, 255, 212, 1],
  1917. azure: [240, 255, 255, 1],
  1918. beige: [245, 245, 220, 1],
  1919. bisque: [255, 228, 196, 1],
  1920. black: [0, 0, 0, 1],
  1921. blanchedalmond: [255, 235, 205, 1],
  1922. blue: [0, 0, 255, 1],
  1923. blueviolet: [138, 43, 226, 1],
  1924. brown: [165, 42, 42, 1],
  1925. burlywood: [222, 184, 135, 1],
  1926. cadetblue: [95, 158, 160, 1],
  1927. chartreuse: [127, 255, 0, 1],
  1928. chocolate: [210, 105, 30, 1],
  1929. coral: [255, 127, 80, 1],
  1930. cornflowerblue: [100, 149, 237, 1],
  1931. cornsilk: [255, 248, 220, 1],
  1932. crimson: [220, 20, 60, 1],
  1933. cyan: [0, 255, 255, 1],
  1934. darkblue: [0, 0, 139, 1],
  1935. darkcyan: [0, 139, 139, 1],
  1936. darkgoldenrod: [184, 134, 11, 1],
  1937. darkgray: [169, 169, 169, 1],
  1938. darkgreen: [0, 100, 0, 1],
  1939. darkgrey: [169, 169, 169, 1],
  1940. darkkhaki: [189, 183, 107, 1],
  1941. darkmagenta: [139, 0, 139, 1],
  1942. darkolivegreen: [85, 107, 47, 1],
  1943. darkorange: [255, 140, 0, 1],
  1944. darkorchid: [153, 50, 204, 1],
  1945. darkred: [139, 0, 0, 1],
  1946. darksalmon: [233, 150, 122, 1],
  1947. darkseagreen: [143, 188, 143, 1],
  1948. darkslateblue: [72, 61, 139, 1],
  1949. darkslategray: [47, 79, 79, 1],
  1950. darkslategrey: [47, 79, 79, 1],
  1951. darkturquoise: [0, 206, 209, 1],
  1952. darkviolet: [148, 0, 211, 1],
  1953. deeppink: [255, 20, 147, 1],
  1954. deepskyblue: [0, 191, 255, 1],
  1955. dimgray: [105, 105, 105, 1],
  1956. dimgrey: [105, 105, 105, 1],
  1957. dodgerblue: [30, 144, 255, 1],
  1958. firebrick: [178, 34, 34, 1],
  1959. floralwhite: [255, 250, 240, 1],
  1960. forestgreen: [34, 139, 34, 1],
  1961. fuchsia: [255, 0, 255, 1],
  1962. gainsboro: [220, 220, 220, 1],
  1963. ghostwhite: [248, 248, 255, 1],
  1964. gold: [255, 215, 0, 1],
  1965. goldenrod: [218, 165, 32, 1],
  1966. gray: [128, 128, 128, 1],
  1967. green: [0, 128, 0, 1],
  1968. greenyellow: [173, 255, 47, 1],
  1969. grey: [128, 128, 128, 1],
  1970. honeydew: [240, 255, 240, 1],
  1971. hotpink: [255, 105, 180, 1],
  1972. indianred: [205, 92, 92, 1],
  1973. indigo: [75, 0, 130, 1],
  1974. ivory: [255, 255, 240, 1],
  1975. khaki: [240, 230, 140, 1],
  1976. lavender: [230, 230, 250, 1],
  1977. lavenderblush: [255, 240, 245, 1],
  1978. lawngreen: [124, 252, 0, 1],
  1979. lemonchiffon: [255, 250, 205, 1],
  1980. lightblue: [173, 216, 230, 1],
  1981. lightcoral: [240, 128, 128, 1],
  1982. lightcyan: [224, 255, 255, 1],
  1983. lightgoldenrodyellow: [250, 250, 210, 1],
  1984. lightgray: [211, 211, 211, 1],
  1985. lightgreen: [144, 238, 144, 1],
  1986. lightgrey: [211, 211, 211, 1],
  1987. lightpink: [255, 182, 193, 1],
  1988. lightsalmon: [255, 160, 122, 1],
  1989. lightseagreen: [32, 178, 170, 1],
  1990. lightskyblue: [135, 206, 250, 1],
  1991. lightslategray: [119, 136, 153, 1],
  1992. lightslategrey: [119, 136, 153, 1],
  1993. lightsteelblue: [176, 196, 222, 1],
  1994. lightyellow: [255, 255, 224, 1],
  1995. lime: [0, 255, 0, 1],
  1996. limegreen: [50, 205, 50, 1],
  1997. linen: [250, 240, 230, 1],
  1998. magenta: [255, 0, 255, 1],
  1999. maroon: [128, 0, 0, 1],
  2000. mediumaquamarine: [102, 205, 170, 1],
  2001. mediumblue: [0, 0, 205, 1],
  2002. mediumorchid: [186, 85, 211, 1],
  2003. mediumpurple: [147, 112, 219, 1],
  2004. mediumseagreen: [60, 179, 113, 1],
  2005. mediumslateblue: [123, 104, 238, 1],
  2006. mediumspringgreen: [0, 250, 154, 1],
  2007. mediumturquoise: [72, 209, 204, 1],
  2008. mediumvioletred: [199, 21, 133, 1],
  2009. midnightblue: [25, 25, 112, 1],
  2010. mintcream: [245, 255, 250, 1],
  2011. mistyrose: [255, 228, 225, 1],
  2012. moccasin: [255, 228, 181, 1],
  2013. navajowhite: [255, 222, 173, 1],
  2014. navy: [0, 0, 128, 1],
  2015. oldlace: [253, 245, 230, 1],
  2016. olive: [128, 128, 0, 1],
  2017. olivedrab: [107, 142, 35, 1],
  2018. orange: [255, 165, 0, 1],
  2019. orangered: [255, 69, 0, 1],
  2020. orchid: [218, 112, 214, 1],
  2021. palegoldenrod: [238, 232, 170, 1],
  2022. palegreen: [152, 251, 152, 1],
  2023. paleturquoise: [175, 238, 238, 1],
  2024. palevioletred: [219, 112, 147, 1],
  2025. papayawhip: [255, 239, 213, 1],
  2026. peachpuff: [255, 218, 185, 1],
  2027. peru: [205, 133, 63, 1],
  2028. pink: [255, 192, 203, 1],
  2029. plum: [221, 160, 221, 1],
  2030. powderblue: [176, 224, 230, 1],
  2031. purple: [128, 0, 128, 1],
  2032. red: [255, 0, 0, 1],
  2033. rosybrown: [188, 143, 143, 1],
  2034. royalblue: [65, 105, 225, 1],
  2035. saddlebrown: [139, 69, 19, 1],
  2036. salmon: [250, 128, 114, 1],
  2037. sandybrown: [244, 164, 96, 1],
  2038. seagreen: [46, 139, 87, 1],
  2039. seashell: [255, 245, 238, 1],
  2040. sienna: [160, 82, 45, 1],
  2041. silver: [192, 192, 192, 1],
  2042. skyblue: [135, 206, 235, 1],
  2043. slateblue: [106, 90, 205, 1],
  2044. slategray: [112, 128, 144, 1],
  2045. slategrey: [112, 128, 144, 1],
  2046. snow: [255, 250, 250, 1],
  2047. springgreen: [0, 255, 127, 1],
  2048. steelblue: [70, 130, 180, 1],
  2049. tan: [210, 180, 140, 1],
  2050. teal: [0, 128, 128, 1],
  2051. thistle: [216, 191, 216, 1],
  2052. tomato: [255, 99, 71, 1],
  2053. turquoise: [64, 224, 208, 1],
  2054. violet: [238, 130, 238, 1],
  2055. wheat: [245, 222, 179, 1],
  2056. white: [255, 255, 255, 1],
  2057. whitesmoke: [245, 245, 245, 1],
  2058. yellow: [255, 255, 0, 1],
  2059. yellowgreen: [154, 205, 50, 1]
  2060. };
  2061. function Vn(t) {
  2062. return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
  2063. }
  2064. function Bn(t) {
  2065. return t < 0 ? 0 : t > 1 ? 1 : t
  2066. }
  2067. function Fn(t) {
  2068. var e = t;
  2069. return e.length && "%" === e.charAt(e.length - 1) ? Vn(parseFloat(e) / 100 * 255) : Vn(parseInt(e, 10))
  2070. }
  2071. function Gn(t) {
  2072. var e = t;
  2073. return e.length && "%" === e.charAt(e.length - 1) ? Bn(parseFloat(e) / 100) : Bn(parseFloat(e))
  2074. }
  2075. function Wn(t, e, n) {
  2076. return n < 0 ? n += 1 : n > 1 && (n -= 1), 6 * n < 1 ? t + (e - t) * n * 6 : 2 * n < 1 ? e : 3 * n < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t
  2077. }
  2078. function Hn(t, e, n) {
  2079. return t + (e - t) * n
  2080. }
  2081. function Yn(t, e, n, i, r) {
  2082. return t[0] = e, t[1] = n, t[2] = i, t[3] = r, t
  2083. }
  2084. function Xn(t, e) {
  2085. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t
  2086. }
  2087. var Un = new En(20),
  2088. Zn = null;
  2089. function jn(t, e) {
  2090. Zn && Xn(Zn, e), Zn = Un.put(t, Zn || e.slice())
  2091. }
  2092. function qn(t, e) {
  2093. if (t) {
  2094. e = e || [];
  2095. var n = Un.get(t);
  2096. if (n) return Xn(e, n);
  2097. var i = (t += "").replace(/ /g, "").toLowerCase();
  2098. if (i in zn) return Xn(e, zn[i]), jn(t, e), e;
  2099. var r, o = i.length;
  2100. if ("#" === i.charAt(0)) return 4 === o || 5 === o ? (r = parseInt(i.slice(1, 4), 16)) >= 0 && r <= 4095 ? (Yn(e, (3840 & r) >> 4 | (3840 & r) >> 8, 240 & r | (240 & r) >> 4, 15 & r | (15 & r) << 4, 5 === o ? parseInt(i.slice(4), 16) / 15 : 1), jn(t, e), e) : void Yn(e, 0, 0, 0, 1) : 7 === o || 9 === o ? (r = parseInt(i.slice(1, 7), 16)) >= 0 && r <= 16777215 ? (Yn(e, (16711680 & r) >> 16, (65280 & r) >> 8, 255 & r, 9 === o ? parseInt(i.slice(7), 16) / 255 : 1), jn(t, e), e) : void Yn(e, 0, 0, 0, 1) : void 0;
  2101. var a = i.indexOf("("),
  2102. s = i.indexOf(")");
  2103. if (-1 !== a && s + 1 === o) {
  2104. var l = i.substr(0, a),
  2105. u = i.substr(a + 1, s - (a + 1)).split(","),
  2106. h = 1;
  2107. switch (l) {
  2108. case "rgba":
  2109. if (4 !== u.length) return 3 === u.length ? Yn(e, +u[0], +u[1], +u[2], 1) : Yn(e, 0, 0, 0, 1);
  2110. h = Gn(u.pop());
  2111. case "rgb":
  2112. return u.length >= 3 ? (Yn(e, Fn(u[0]), Fn(u[1]), Fn(u[2]), 3 === u.length ? h : Gn(u[3])), jn(t, e), e) : void Yn(e, 0, 0, 0, 1);
  2113. case "hsla":
  2114. return 4 !== u.length ? void Yn(e, 0, 0, 0, 1) : (u[3] = Gn(u[3]), Kn(u, e), jn(t, e), e);
  2115. case "hsl":
  2116. return 3 !== u.length ? void Yn(e, 0, 0, 0, 1) : (Kn(u, e), jn(t, e), e);
  2117. default:
  2118. return
  2119. }
  2120. }
  2121. Yn(e, 0, 0, 0, 1)
  2122. }
  2123. }
  2124. function Kn(t, e) {
  2125. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360,
  2126. i = Gn(t[1]),
  2127. r = Gn(t[2]),
  2128. o = r <= .5 ? r * (i + 1) : r + i - r * i,
  2129. a = 2 * r - o;
  2130. return Yn(e = e || [], Vn(255 * Wn(a, o, n + 1 / 3)), Vn(255 * Wn(a, o, n)), Vn(255 * Wn(a, o, n - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e
  2131. }
  2132. function $n(t, e) {
  2133. var n = qn(t);
  2134. if (n) {
  2135. for (var i = 0; i < 3; i++) n[i] = e < 0 ? n[i] * (1 - e) | 0 : (255 - n[i]) * e + n[i] | 0, n[i] > 255 ? n[i] = 255 : n[i] < 0 && (n[i] = 0);
  2136. return ri(n, 4 === n.length ? "rgba" : "rgb")
  2137. }
  2138. }
  2139. function Jn(t, e, n) {
  2140. if (e && e.length && t >= 0 && t <= 1) {
  2141. n = n || [];
  2142. var i = t * (e.length - 1),
  2143. r = Math.floor(i),
  2144. o = Math.ceil(i),
  2145. a = e[r],
  2146. s = e[o],
  2147. l = i - r;
  2148. return n[0] = Vn(Hn(a[0], s[0], l)), n[1] = Vn(Hn(a[1], s[1], l)), n[2] = Vn(Hn(a[2], s[2], l)), n[3] = Bn(Hn(a[3], s[3], l)), n
  2149. }
  2150. }
  2151. var Qn = Jn;
  2152. function ti(t, e, n) {
  2153. if (e && e.length && t >= 0 && t <= 1) {
  2154. var i = t * (e.length - 1),
  2155. r = Math.floor(i),
  2156. o = Math.ceil(i),
  2157. a = qn(e[r]),
  2158. s = qn(e[o]),
  2159. l = i - r,
  2160. u = ri([Vn(Hn(a[0], s[0], l)), Vn(Hn(a[1], s[1], l)), Vn(Hn(a[2], s[2], l)), Bn(Hn(a[3], s[3], l))], "rgba");
  2161. return n ? {
  2162. color: u,
  2163. leftIndex: r,
  2164. rightIndex: o,
  2165. value: i
  2166. } : u
  2167. }
  2168. }
  2169. var ei = ti;
  2170. function ni(t, e, n, i) {
  2171. var r = qn(t);
  2172. if (t) return r = function (t) {
  2173. if (t) {
  2174. var e, n, i = t[0] / 255,
  2175. r = t[1] / 255,
  2176. o = t[2] / 255,
  2177. a = Math.min(i, r, o),
  2178. s = Math.max(i, r, o),
  2179. l = s - a,
  2180. u = (s + a) / 2;
  2181. if (0 === l) e = 0, n = 0;
  2182. else {
  2183. n = u < .5 ? l / (s + a) : l / (2 - s - a);
  2184. var h = ((s - i) / 6 + l / 2) / l,
  2185. c = ((s - r) / 6 + l / 2) / l,
  2186. p = ((s - o) / 6 + l / 2) / l;
  2187. i === s ? e = p - c : r === s ? e = 1 / 3 + h - p : o === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -= 1)
  2188. }
  2189. var d = [360 * e, n, u];
  2190. return null != t[3] && d.push(t[3]), d
  2191. }
  2192. }(r), null != e && (r[0] = function (t) {
  2193. return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
  2194. }(e)), null != n && (r[1] = Gn(n)), null != i && (r[2] = Gn(i)), ri(Kn(r), "rgba")
  2195. }
  2196. function ii(t, e) {
  2197. var n = qn(t);
  2198. if (n && null != e) return n[3] = Bn(e), ri(n, "rgba")
  2199. }
  2200. function ri(t, e) {
  2201. if (t && t.length) {
  2202. var n = t[0] + "," + t[1] + "," + t[2];
  2203. return "rgba" !== e && "hsva" !== e && "hsla" !== e || (n += "," + t[3]), e + "(" + n + ")"
  2204. }
  2205. }
  2206. function oi(t, e) {
  2207. var n = qn(t);
  2208. return n ? (.299 * n[0] + .587 * n[1] + .114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0
  2209. }
  2210. var ai = new En(100);
  2211. function si(t) {
  2212. if (U(t)) {
  2213. var e = ai.get(t);
  2214. return e || (e = $n(t, -.1), ai.put(t, e)), e
  2215. }
  2216. if (Q(t)) {
  2217. var n = A({}, t);
  2218. return n.colorStops = z(t.colorStops, (function (t) {
  2219. return {
  2220. offset: t.offset,
  2221. color: $n(t.color, -.1)
  2222. }
  2223. })), n
  2224. }
  2225. return t
  2226. }
  2227. var li = Object.freeze({
  2228. __proto__: null,
  2229. parse: qn,
  2230. lift: $n,
  2231. toHex: function (t) {
  2232. var e = qn(t);
  2233. if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1)
  2234. },
  2235. fastLerp: Jn,
  2236. fastMapToColor: Qn,
  2237. lerp: ti,
  2238. mapToColor: ei,
  2239. modifyHSL: ni,
  2240. modifyAlpha: ii,
  2241. stringify: ri,
  2242. lum: oi,
  2243. random: function () {
  2244. return ri([Math.round(255 * Math.random()), Math.round(255 * Math.random()), Math.round(255 * Math.random())], "rgb")
  2245. },
  2246. liftColor: si
  2247. }),
  2248. ui = Math.round;
  2249. function hi(t) {
  2250. var e;
  2251. if (t && "transparent" !== t) {
  2252. if ("string" == typeof t && t.indexOf("rgba") > -1) {
  2253. var n = qn(t);
  2254. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3])
  2255. }
  2256. } else t = "none";
  2257. return {
  2258. color: t,
  2259. opacity: null == e ? 1 : e
  2260. }
  2261. }
  2262. var ci = 1e-4;
  2263. function pi(t) {
  2264. return t < ci && t > -1e-4
  2265. }
  2266. function di(t) {
  2267. return ui(1e3 * t) / 1e3
  2268. }
  2269. function fi(t) {
  2270. return ui(1e4 * t) / 1e4
  2271. }
  2272. var gi = {
  2273. left: "start",
  2274. right: "end",
  2275. center: "middle",
  2276. middle: "middle"
  2277. };
  2278. function yi(t) {
  2279. return t && !!t.image
  2280. }
  2281. function vi(t) {
  2282. return yi(t) || function (t) {
  2283. return t && !!t.svgElement
  2284. }(t)
  2285. }
  2286. function mi(t) {
  2287. return "linear" === t.type
  2288. }
  2289. function xi(t) {
  2290. return "radial" === t.type
  2291. }
  2292. function _i(t) {
  2293. return t && ("linear" === t.type || "radial" === t.type)
  2294. }
  2295. function bi(t) {
  2296. return "url(#" + t + ")"
  2297. }
  2298. function wi(t) {
  2299. var e = t.getGlobalScale(),
  2300. n = Math.max(e[0], e[1]);
  2301. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1)
  2302. }
  2303. function Si(t) {
  2304. var e = t.x || 0,
  2305. n = t.y || 0,
  2306. i = (t.rotation || 0) * wt,
  2307. r = rt(t.scaleX, 1),
  2308. o = rt(t.scaleY, 1),
  2309. a = t.skewX || 0,
  2310. s = t.skewY || 0,
  2311. l = [];
  2312. return (e || n) && l.push("translate(" + e + "px," + n + "px)"), i && l.push("rotate(" + i + ")"), 1 === r && 1 === o || l.push("scale(" + r + "," + o + ")"), (a || s) && l.push("skew(" + ui(a * wt) + "deg, " + ui(s * wt) + "deg)"), l.join(" ")
  2313. }
  2314. var Mi = r.hasGlobalWindow && X(window.btoa) ? function (t) {
  2315. return window.btoa(unescape(encodeURIComponent(t)))
  2316. } : "undefined" != typeof Buffer ? function (t) {
  2317. return Buffer.from(t).toString("base64")
  2318. } : function (t) {
  2319. return null
  2320. },
  2321. Ii = Array.prototype.slice;
  2322. function Ti(t, e, n) {
  2323. return (e - t) * n + t
  2324. }
  2325. function Ci(t, e, n, i) {
  2326. for (var r = e.length, o = 0; o < r; o++) t[o] = Ti(e[o], n[o], i);
  2327. return t
  2328. }
  2329. function Di(t, e, n, i) {
  2330. for (var r = e.length, o = 0; o < r; o++) t[o] = e[o] + n[o] * i;
  2331. return t
  2332. }
  2333. function Ai(t, e, n, i) {
  2334. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  2335. t[a] || (t[a] = []);
  2336. for (var s = 0; s < o; s++) t[a][s] = e[a][s] + n[a][s] * i
  2337. }
  2338. return t
  2339. }
  2340. function ki(t, e) {
  2341. for (var n = t.length, i = e.length, r = n > i ? e : t, o = Math.min(n, i), a = r[o - 1] || {
  2342. color: [0, 0, 0, 0],
  2343. offset: 0
  2344. }, s = o; s < Math.max(n, i); s++) r.push({
  2345. offset: a.offset,
  2346. color: a.color.slice()
  2347. })
  2348. }
  2349. function Li(t, e, n) {
  2350. var i = t,
  2351. r = e;
  2352. if (i.push && r.push) {
  2353. var o = i.length,
  2354. a = r.length;
  2355. if (o !== a)
  2356. if (o > a) i.length = a;
  2357. else
  2358. for (var s = o; s < a; s++) i.push(1 === n ? r[s] : Ii.call(r[s]));
  2359. var l = i[0] && i[0].length;
  2360. for (s = 0; s < i.length; s++)
  2361. if (1 === n) isNaN(i[s]) && (i[s] = r[s]);
  2362. else
  2363. for (var u = 0; u < l; u++) isNaN(i[s][u]) && (i[s][u] = r[s][u])
  2364. }
  2365. }
  2366. function Pi(t) {
  2367. if (N(t)) {
  2368. var e = t.length;
  2369. if (N(t[0])) {
  2370. for (var n = [], i = 0; i < e; i++) n.push(Ii.call(t[i]));
  2371. return n
  2372. }
  2373. return Ii.call(t)
  2374. }
  2375. return t
  2376. }
  2377. function Oi(t) {
  2378. return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = null == t[3] ? 1 : t[3], "rgba(" + t.join(",") + ")"
  2379. }
  2380. function Ri(t) {
  2381. return 4 === t || 5 === t
  2382. }
  2383. function Ni(t) {
  2384. return 1 === t || 2 === t
  2385. }
  2386. var Ei = [0, 0, 0, 0],
  2387. zi = function () {
  2388. function t(t) {
  2389. this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = t
  2390. }
  2391. return t.prototype.isFinished = function () {
  2392. return this._finished
  2393. }, t.prototype.setFinished = function () {
  2394. this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished()
  2395. }, t.prototype.needsAnimate = function () {
  2396. return this.keyframes.length >= 1
  2397. }, t.prototype.getAdditiveTrack = function () {
  2398. return this._additiveTrack
  2399. }, t.prototype.addKeyframe = function (t, e, n) {
  2400. this._needsSort = !0;
  2401. var i = this.keyframes,
  2402. r = i.length,
  2403. o = !1,
  2404. a = 6,
  2405. s = e;
  2406. if (N(e)) {
  2407. var l = function (t) {
  2408. return N(t && t[0]) ? 2 : 1
  2409. }(e);
  2410. a = l, (1 === l && !j(e[0]) || 2 === l && !j(e[0][0])) && (o = !0)
  2411. } else if (j(e) && !nt(e)) a = 0;
  2412. else if (U(e))
  2413. if (isNaN(+e)) {
  2414. var u = qn(e);
  2415. u && (s = u, a = 3)
  2416. } else a = 0;
  2417. else if (Q(e)) {
  2418. var h = A({}, s);
  2419. h.colorStops = z(e.colorStops, (function (t) {
  2420. return {
  2421. offset: t.offset,
  2422. color: qn(t.color)
  2423. }
  2424. })), mi(e) ? a = 4 : xi(e) && (a = 5), s = h
  2425. }
  2426. 0 === r ? this.valType = a : a === this.valType && 6 !== a || (o = !0), this.discrete = this.discrete || o;
  2427. var c = {
  2428. time: t,
  2429. value: s,
  2430. rawValue: e,
  2431. percent: 0
  2432. };
  2433. return n && (c.easing = n, c.easingFunc = X(n) ? n : an[n] || Pn(n)), i.push(c), c
  2434. }, t.prototype.prepare = function (t, e) {
  2435. var n = this.keyframes;
  2436. this._needsSort && n.sort((function (t, e) {
  2437. return t.time - e.time
  2438. }));
  2439. for (var i = this.valType, r = n.length, o = n[r - 1], a = this.discrete, s = Ni(i), l = Ri(i), u = 0; u < r; u++) {
  2440. var h = n[u],
  2441. c = h.value,
  2442. p = o.value;
  2443. h.percent = h.time / t, a || (s && u !== r - 1 ? Li(c, p, i) : l && ki(c.colorStops, p.colorStops))
  2444. }
  2445. if (!a && 5 !== i && e && this.needsAnimate() && e.needsAnimate() && i === e.valType && !e._finished) {
  2446. this._additiveTrack = e;
  2447. var d = n[0].value;
  2448. for (u = 0; u < r; u++) 0 === i ? n[u].additiveValue = n[u].value - d : 3 === i ? n[u].additiveValue = Di([], n[u].value, d, -1) : Ni(i) && (n[u].additiveValue = 1 === i ? Di([], n[u].value, d, -1) : Ai([], n[u].value, d, -1))
  2449. }
  2450. }, t.prototype.step = function (t, e) {
  2451. if (!this._finished) {
  2452. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  2453. var n, i, r, o = null != this._additiveTrack,
  2454. a = o ? "additiveValue" : "value",
  2455. s = this.valType,
  2456. l = this.keyframes,
  2457. u = l.length,
  2458. h = this.propName,
  2459. c = 3 === s,
  2460. p = this._lastFr,
  2461. d = Math.min;
  2462. if (1 === u) i = r = l[0];
  2463. else {
  2464. if (e < 0) n = 0;
  2465. else if (e < this._lastFrP) {
  2466. for (n = d(p + 1, u - 1); n >= 0 && !(l[n].percent <= e); n--);
  2467. n = d(n, u - 2)
  2468. } else {
  2469. for (n = p; n < u && !(l[n].percent > e); n++);
  2470. n = d(n - 1, u - 2)
  2471. }
  2472. r = l[n + 1], i = l[n]
  2473. }
  2474. if (i && r) {
  2475. this._lastFr = n, this._lastFrP = e;
  2476. var f = r.percent - i.percent,
  2477. g = 0 === f ? 1 : d((e - i.percent) / f, 1);
  2478. r.easingFunc && (g = r.easingFunc(g));
  2479. var y = o ? this._additiveValue : c ? Ei : t[h];
  2480. if (!Ni(s) && !c || y || (y = this._additiveValue = []), this.discrete) t[h] = g < 1 ? i.rawValue : r.rawValue;
  2481. else if (Ni(s)) 1 === s ? Ci(y, i[a], r[a], g) : function (t, e, n, i) {
  2482. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  2483. t[a] || (t[a] = []);
  2484. for (var s = 0; s < o; s++) t[a][s] = Ti(e[a][s], n[a][s], i)
  2485. }
  2486. }(y, i[a], r[a], g);
  2487. else if (Ri(s)) {
  2488. var v = i[a],
  2489. m = r[a],
  2490. x = 4 === s;
  2491. t[h] = {
  2492. type: x ? "linear" : "radial",
  2493. x: Ti(v.x, m.x, g),
  2494. y: Ti(v.y, m.y, g),
  2495. colorStops: z(v.colorStops, (function (t, e) {
  2496. var n = m.colorStops[e];
  2497. return {
  2498. offset: Ti(t.offset, n.offset, g),
  2499. color: Oi(Ci([], t.color, n.color, g))
  2500. }
  2501. })),
  2502. global: m.global
  2503. }, x ? (t[h].x2 = Ti(v.x2, m.x2, g), t[h].y2 = Ti(v.y2, m.y2, g)) : t[h].r = Ti(v.r, m.r, g)
  2504. } else if (c) Ci(y, i[a], r[a], g), o || (t[h] = Oi(y));
  2505. else {
  2506. var _ = Ti(i[a], r[a], g);
  2507. o ? this._additiveValue = _ : t[h] = _
  2508. }
  2509. o && this._addToTarget(t)
  2510. }
  2511. }
  2512. }, t.prototype._addToTarget = function (t) {
  2513. var e = this.valType,
  2514. n = this.propName,
  2515. i = this._additiveValue;
  2516. 0 === e ? t[n] = t[n] + i : 3 === e ? (qn(t[n], Ei), Di(Ei, Ei, i, 1), t[n] = Oi(Ei)) : 1 === e ? Di(t[n], t[n], i, 1) : 2 === e && Ai(t[n], t[n], i, 1)
  2517. }, t
  2518. }(),
  2519. Vi = function () {
  2520. function t(t, e, n, i) {
  2521. this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = t, this._loop = e, e && i ? I("Can' use additive animation on looped animation.") : (this._additiveAnimators = i, this._allowDiscrete = n)
  2522. }
  2523. return t.prototype.getMaxTime = function () {
  2524. return this._maxTime
  2525. }, t.prototype.getDelay = function () {
  2526. return this._delay
  2527. }, t.prototype.getLoop = function () {
  2528. return this._loop
  2529. }, t.prototype.getTarget = function () {
  2530. return this._target
  2531. }, t.prototype.changeTarget = function (t) {
  2532. this._target = t
  2533. }, t.prototype.when = function (t, e, n) {
  2534. return this.whenWithKeys(t, e, G(e), n)
  2535. }, t.prototype.whenWithKeys = function (t, e, n, i) {
  2536. for (var r = this._tracks, o = 0; o < n.length; o++) {
  2537. var a = n[o],
  2538. s = r[a];
  2539. if (!s) {
  2540. s = r[a] = new zi(a);
  2541. var l = void 0,
  2542. u = this._getAdditiveTrack(a);
  2543. if (u) {
  2544. var h = u.keyframes,
  2545. c = h[h.length - 1];
  2546. l = c && c.value, 3 === u.valType && l && (l = Oi(l))
  2547. } else l = this._target[a];
  2548. if (null == l) continue;
  2549. t > 0 && s.addKeyframe(0, Pi(l), i), this._trackKeys.push(a)
  2550. }
  2551. s.addKeyframe(t, Pi(e[a]), i)
  2552. }
  2553. return this._maxTime = Math.max(this._maxTime, t), this
  2554. }, t.prototype.pause = function () {
  2555. this._clip.pause(), this._paused = !0
  2556. }, t.prototype.resume = function () {
  2557. this._clip.resume(), this._paused = !1
  2558. }, t.prototype.isPaused = function () {
  2559. return !!this._paused
  2560. }, t.prototype.duration = function (t) {
  2561. return this._maxTime = t, this._force = !0, this
  2562. }, t.prototype._doneCallback = function () {
  2563. this._setTracksFinished(), this._clip = null;
  2564. var t = this._doneCbs;
  2565. if (t)
  2566. for (var e = t.length, n = 0; n < e; n++) t[n].call(this)
  2567. }, t.prototype._abortedCallback = function () {
  2568. this._setTracksFinished();
  2569. var t = this.animation,
  2570. e = this._abortedCbs;
  2571. if (t && t.removeClip(this._clip), this._clip = null, e)
  2572. for (var n = 0; n < e.length; n++) e[n].call(this)
  2573. }, t.prototype._setTracksFinished = function () {
  2574. for (var t = this._tracks, e = this._trackKeys, n = 0; n < e.length; n++) t[e[n]].setFinished()
  2575. }, t.prototype._getAdditiveTrack = function (t) {
  2576. var e, n = this._additiveAnimators;
  2577. if (n)
  2578. for (var i = 0; i < n.length; i++) {
  2579. var r = n[i].getTrack(t);
  2580. r && (e = r)
  2581. }
  2582. return e
  2583. }, t.prototype.start = function (t) {
  2584. if (!(this._started > 0)) {
  2585. this._started = 1;
  2586. for (var e = this, n = [], i = this._maxTime || 0, r = 0; r < this._trackKeys.length; r++) {
  2587. var o = this._trackKeys[r],
  2588. a = this._tracks[o],
  2589. s = this._getAdditiveTrack(o),
  2590. l = a.keyframes,
  2591. u = l.length;
  2592. if (a.prepare(i, s), a.needsAnimate())
  2593. if (!this._allowDiscrete && a.discrete) {
  2594. var h = l[u - 1];
  2595. h && (e._target[a.propName] = h.rawValue), a.setFinished()
  2596. } else n.push(a)
  2597. }
  2598. if (n.length || this._force) {
  2599. var c = new On({
  2600. life: i,
  2601. loop: this._loop,
  2602. delay: this._delay || 0,
  2603. onframe: function (t) {
  2604. e._started = 2;
  2605. var i = e._additiveAnimators;
  2606. if (i) {
  2607. for (var r = !1, o = 0; o < i.length; o++)
  2608. if (i[o]._clip) {
  2609. r = !0;
  2610. break
  2611. } r || (e._additiveAnimators = null)
  2612. }
  2613. for (o = 0; o < n.length; o++) n[o].step(e._target, t);
  2614. var a = e._onframeCbs;
  2615. if (a)
  2616. for (o = 0; o < a.length; o++) a[o](e._target, t)
  2617. },
  2618. ondestroy: function () {
  2619. e._doneCallback()
  2620. }
  2621. });
  2622. this._clip = c, this.animation && this.animation.addClip(c), t && c.setEasing(t)
  2623. } else this._doneCallback();
  2624. return this
  2625. }
  2626. }, t.prototype.stop = function (t) {
  2627. if (this._clip) {
  2628. var e = this._clip;
  2629. t && e.onframe(1), this._abortedCallback()
  2630. }
  2631. }, t.prototype.delay = function (t) {
  2632. return this._delay = t, this
  2633. }, t.prototype.during = function (t) {
  2634. return t && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(t)), this
  2635. }, t.prototype.done = function (t) {
  2636. return t && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(t)), this
  2637. }, t.prototype.aborted = function (t) {
  2638. return t && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(t)), this
  2639. }, t.prototype.getClip = function () {
  2640. return this._clip
  2641. }, t.prototype.getTrack = function (t) {
  2642. return this._tracks[t]
  2643. }, t.prototype.getTracks = function () {
  2644. var t = this;
  2645. return z(this._trackKeys, (function (e) {
  2646. return t._tracks[e]
  2647. }))
  2648. }, t.prototype.stopTracks = function (t, e) {
  2649. if (!t.length || !this._clip) return !0;
  2650. for (var n = this._tracks, i = this._trackKeys, r = 0; r < t.length; r++) {
  2651. var o = n[t[r]];
  2652. o && !o.isFinished() && (e ? o.step(this._target, 1) : 1 === this._started && o.step(this._target, 0), o.setFinished())
  2653. }
  2654. var a = !0;
  2655. for (r = 0; r < i.length; r++)
  2656. if (!n[i[r]].isFinished()) {
  2657. a = !1;
  2658. break
  2659. } return a && this._abortedCallback(), a
  2660. }, t.prototype.saveTo = function (t, e, n) {
  2661. if (t) {
  2662. e = e || this._trackKeys;
  2663. for (var i = 0; i < e.length; i++) {
  2664. var r = e[i],
  2665. o = this._tracks[r];
  2666. if (o && !o.isFinished()) {
  2667. var a = o.keyframes,
  2668. s = a[n ? 0 : a.length - 1];
  2669. s && (t[r] = Pi(s.rawValue))
  2670. }
  2671. }
  2672. }
  2673. }, t.prototype.__changeFinalValue = function (t, e) {
  2674. e = e || G(t);
  2675. for (var n = 0; n < e.length; n++) {
  2676. var i = e[n],
  2677. r = this._tracks[i];
  2678. if (r) {
  2679. var o = r.keyframes;
  2680. if (o.length > 1) {
  2681. var a = o.pop();
  2682. r.addKeyframe(a.time, t[i]), r.prepare(this._maxTime, r.getAdditiveTrack())
  2683. }
  2684. }
  2685. }
  2686. }, t
  2687. }();
  2688. function Bi() {
  2689. return (new Date).getTime()
  2690. }
  2691. var Fi, Gi, Wi = function (t) {
  2692. function e(e) {
  2693. var n = t.call(this) || this;
  2694. return n._running = !1, n._time = 0, n._pausedTime = 0, n._pauseStart = 0, n._paused = !1, e = e || {}, n.stage = e.stage || {}, n
  2695. }
  2696. return n(e, t), e.prototype.addClip = function (t) {
  2697. t.animation && this.removeClip(t), this._head ? (this._tail.next = t, t.prev = this._tail, t.next = null, this._tail = t) : this._head = this._tail = t, t.animation = this
  2698. }, e.prototype.addAnimator = function (t) {
  2699. t.animation = this;
  2700. var e = t.getClip();
  2701. e && this.addClip(e)
  2702. }, e.prototype.removeClip = function (t) {
  2703. if (t.animation) {
  2704. var e = t.prev,
  2705. n = t.next;
  2706. e ? e.next = n : this._head = n, n ? n.prev = e : this._tail = e, t.next = t.prev = t.animation = null
  2707. }
  2708. }, e.prototype.removeAnimator = function (t) {
  2709. var e = t.getClip();
  2710. e && this.removeClip(e), t.animation = null
  2711. }, e.prototype.update = function (t) {
  2712. for (var e = Bi() - this._pausedTime, n = e - this._time, i = this._head; i;) {
  2713. var r = i.next;
  2714. i.step(e, n) ? (i.ondestroy(), this.removeClip(i), i = r) : i = r
  2715. }
  2716. this._time = e, t || (this.trigger("frame", n), this.stage.update && this.stage.update())
  2717. }, e.prototype._startLoop = function () {
  2718. var t = this;
  2719. this._running = !0, on((function e() {
  2720. t._running && (on(e), !t._paused && t.update())
  2721. }))
  2722. }, e.prototype.start = function () {
  2723. this._running || (this._time = Bi(), this._pausedTime = 0, this._startLoop())
  2724. }, e.prototype.stop = function () {
  2725. this._running = !1
  2726. }, e.prototype.pause = function () {
  2727. this._paused || (this._pauseStart = Bi(), this._paused = !0)
  2728. }, e.prototype.resume = function () {
  2729. this._paused && (this._pausedTime += Bi() - this._pauseStart, this._paused = !1)
  2730. }, e.prototype.clear = function () {
  2731. for (var t = this._head; t;) {
  2732. var e = t.next;
  2733. t.prev = t.next = t.animation = null, t = e
  2734. }
  2735. this._head = this._tail = null
  2736. }, e.prototype.isFinished = function () {
  2737. return null == this._head
  2738. }, e.prototype.animate = function (t, e) {
  2739. e = e || {}, this.start();
  2740. var n = new Vi(t, e.loop);
  2741. return this.addAnimator(n), n
  2742. }, e
  2743. }(jt),
  2744. Hi = r.domSupported,
  2745. Yi = (Gi = {
  2746. pointerdown: 1,
  2747. pointerup: 1,
  2748. pointermove: 1,
  2749. pointerout: 1
  2750. }, {
  2751. mouse: Fi = ["click", "dblclick", "mousewheel", "wheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  2752. touch: ["touchstart", "touchend", "touchmove"],
  2753. pointer: z(Fi, (function (t) {
  2754. var e = t.replace("mouse", "pointer");
  2755. return Gi.hasOwnProperty(e) ? e : t
  2756. }))
  2757. }),
  2758. Xi = ["mousemove", "mouseup"],
  2759. Ui = ["pointermove", "pointerup"],
  2760. Zi = !1;
  2761. function ji(t) {
  2762. var e = t.pointerType;
  2763. return "pen" === e || "touch" === e
  2764. }
  2765. function qi(t) {
  2766. t && (t.zrByTouch = !0)
  2767. }
  2768. function Ki(t, e) {
  2769. for (var n = e, i = !1; n && 9 !== n.nodeType && !(i = n.domBelongToZr || n !== e && n === t.painterRoot);) n = n.parentNode;
  2770. return i
  2771. }
  2772. var $i = function (t, e) {
  2773. this.stopPropagation = bt, this.stopImmediatePropagation = bt, this.preventDefault = bt, this.type = e.type, this.target = this.currentTarget = t.dom, this.pointerType = e.pointerType, this.clientX = e.clientX, this.clientY = e.clientY
  2774. },
  2775. Ji = {
  2776. mousedown: function (t) {
  2777. t = ce(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t)
  2778. },
  2779. mousemove: function (t) {
  2780. t = ce(this.dom, t);
  2781. var e = this.__mayPointerCapture;
  2782. !e || t.zrX === e[0] && t.zrY === e[1] || this.__togglePointerCapture(!0), this.trigger("mousemove", t)
  2783. },
  2784. mouseup: function (t) {
  2785. t = ce(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t)
  2786. },
  2787. mouseout: function (t) {
  2788. Ki(this, (t = ce(this.dom, t)).toElement || t.relatedTarget) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t))
  2789. },
  2790. wheel: function (t) {
  2791. Zi = !0, t = ce(this.dom, t), this.trigger("mousewheel", t)
  2792. },
  2793. mousewheel: function (t) {
  2794. Zi || (t = ce(this.dom, t), this.trigger("mousewheel", t))
  2795. },
  2796. touchstart: function (t) {
  2797. qi(t = ce(this.dom, t)), this.__lastTouchMoment = new Date, this.handler.processGesture(t, "start"), Ji.mousemove.call(this, t), Ji.mousedown.call(this, t)
  2798. },
  2799. touchmove: function (t) {
  2800. qi(t = ce(this.dom, t)), this.handler.processGesture(t, "change"), Ji.mousemove.call(this, t)
  2801. },
  2802. touchend: function (t) {
  2803. qi(t = ce(this.dom, t)), this.handler.processGesture(t, "end"), Ji.mouseup.call(this, t), +new Date - +this.__lastTouchMoment < 300 && Ji.click.call(this, t)
  2804. },
  2805. pointerdown: function (t) {
  2806. Ji.mousedown.call(this, t)
  2807. },
  2808. pointermove: function (t) {
  2809. ji(t) || Ji.mousemove.call(this, t)
  2810. },
  2811. pointerup: function (t) {
  2812. Ji.mouseup.call(this, t)
  2813. },
  2814. pointerout: function (t) {
  2815. ji(t) || Ji.mouseout.call(this, t)
  2816. }
  2817. };
  2818. E(["click", "dblclick", "contextmenu"], (function (t) {
  2819. Ji[t] = function (e) {
  2820. e = ce(this.dom, e), this.trigger(t, e)
  2821. }
  2822. }));
  2823. var Qi = {
  2824. pointermove: function (t) {
  2825. ji(t) || Qi.mousemove.call(this, t)
  2826. },
  2827. pointerup: function (t) {
  2828. Qi.mouseup.call(this, t)
  2829. },
  2830. mousemove: function (t) {
  2831. this.trigger("mousemove", t)
  2832. },
  2833. mouseup: function (t) {
  2834. var e = this.__pointerCapturing;
  2835. this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t))
  2836. }
  2837. };
  2838. function tr(t, e) {
  2839. var n = e.domHandlers;
  2840. r.pointerEventsSupported ? E(Yi.pointer, (function (i) {
  2841. nr(e, i, (function (e) {
  2842. n[i].call(t, e)
  2843. }))
  2844. })) : (r.touchEventsSupported && E(Yi.touch, (function (i) {
  2845. nr(e, i, (function (r) {
  2846. n[i].call(t, r),
  2847. function (t) {
  2848. t.touching = !0, null != t.touchTimer && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout((function () {
  2849. t.touching = !1, t.touchTimer = null
  2850. }), 700)
  2851. }(e)
  2852. }))
  2853. })), E(Yi.mouse, (function (i) {
  2854. nr(e, i, (function (r) {
  2855. r = he(r), e.touching || n[i].call(t, r)
  2856. }))
  2857. })))
  2858. }
  2859. function er(t, e) {
  2860. function n(n) {
  2861. nr(e, n, (function (i) {
  2862. i = he(i), Ki(t, i.target) || (i = function (t, e) {
  2863. return ce(t.dom, new $i(t, e), !0)
  2864. }(t, i), e.domHandlers[n].call(t, i))
  2865. }), {
  2866. capture: !0
  2867. })
  2868. }
  2869. r.pointerEventsSupported ? E(Ui, n) : r.touchEventsSupported || E(Xi, n)
  2870. }
  2871. function nr(t, e, n, i) {
  2872. t.mounted[e] = n, t.listenerOpts[e] = i, pe(t.domTarget, e, n, i)
  2873. }
  2874. function ir(t) {
  2875. var e, n, i, r, o = t.mounted;
  2876. for (var a in o) o.hasOwnProperty(a) && (e = t.domTarget, n = a, i = o[a], r = t.listenerOpts[a], e.removeEventListener(n, i, r));
  2877. t.mounted = {}
  2878. }
  2879. var rr = function (t, e) {
  2880. this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = t, this.domHandlers = e
  2881. },
  2882. or = function (t) {
  2883. function e(e, n) {
  2884. var i = t.call(this) || this;
  2885. return i.__pointerCapturing = !1, i.dom = e, i.painterRoot = n, i._localHandlerScope = new rr(e, Ji), Hi && (i._globalHandlerScope = new rr(document, Qi)), tr(i, i._localHandlerScope), i
  2886. }
  2887. return n(e, t), e.prototype.dispose = function () {
  2888. ir(this._localHandlerScope), Hi && ir(this._globalHandlerScope)
  2889. }, e.prototype.setCursor = function (t) {
  2890. this.dom.style && (this.dom.style.cursor = t || "default")
  2891. }, e.prototype.__togglePointerCapture = function (t) {
  2892. if (this.__mayPointerCapture = null, Hi && +this.__pointerCapturing ^ +t) {
  2893. this.__pointerCapturing = t;
  2894. var e = this._globalHandlerScope;
  2895. t ? er(this, e) : ir(e)
  2896. }
  2897. }, e
  2898. }(jt),
  2899. ar = 1;
  2900. r.hasGlobalWindow && (ar = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  2901. var sr = ar,
  2902. lr = "#333",
  2903. ur = "#ccc",
  2904. hr = xe,
  2905. cr = 5e-5;
  2906. function pr(t) {
  2907. return t > cr || t < -5e-5
  2908. }
  2909. var dr = [],
  2910. fr = [],
  2911. gr = [1, 0, 0, 1, 0, 0],
  2912. yr = Math.abs,
  2913. vr = function () {
  2914. function t() {}
  2915. return t.prototype.getLocalTransform = function (e) {
  2916. return t.getLocalTransform(this, e)
  2917. }, t.prototype.setPosition = function (t) {
  2918. this.x = t[0], this.y = t[1]
  2919. }, t.prototype.setScale = function (t) {
  2920. this.scaleX = t[0], this.scaleY = t[1]
  2921. }, t.prototype.setSkew = function (t) {
  2922. this.skewX = t[0], this.skewY = t[1]
  2923. }, t.prototype.setOrigin = function (t) {
  2924. this.originX = t[0], this.originY = t[1]
  2925. }, t.prototype.needLocalTransform = function () {
  2926. return pr(this.rotation) || pr(this.x) || pr(this.y) || pr(this.scaleX - 1) || pr(this.scaleY - 1) || pr(this.skewX) || pr(this.skewY)
  2927. }, t.prototype.updateTransform = function () {
  2928. var t = this.parent && this.parent.transform,
  2929. e = this.needLocalTransform(),
  2930. n = this.transform;
  2931. e || t ? (n = n || [1, 0, 0, 1, 0, 0], e ? this.getLocalTransform(n) : hr(n), t && (e ? be(n, t, n) : _e(n, t)), this.transform = n, this._resolveGlobalScaleRatio(n)) : n && (hr(n), this.invTransform = null)
  2932. }, t.prototype._resolveGlobalScaleRatio = function (t) {
  2933. var e = this.globalScaleRatio;
  2934. if (null != e && 1 !== e) {
  2935. this.getGlobalScale(dr);
  2936. var n = dr[0] < 0 ? -1 : 1,
  2937. i = dr[1] < 0 ? -1 : 1,
  2938. r = ((dr[0] - n) * e + n) / dr[0] || 0,
  2939. o = ((dr[1] - i) * e + i) / dr[1] || 0;
  2940. t[0] *= r, t[1] *= r, t[2] *= o, t[3] *= o
  2941. }
  2942. this.invTransform = this.invTransform || [1, 0, 0, 1, 0, 0], Ie(this.invTransform, t)
  2943. }, t.prototype.getComputedTransform = function () {
  2944. for (var t = this, e = []; t;) e.push(t), t = t.parent;
  2945. for (; t = e.pop();) t.updateTransform();
  2946. return this.transform
  2947. }, t.prototype.setLocalTransform = function (t) {
  2948. if (t) {
  2949. var e = t[0] * t[0] + t[1] * t[1],
  2950. n = t[2] * t[2] + t[3] * t[3],
  2951. i = Math.atan2(t[1], t[0]),
  2952. r = Math.PI / 2 + i - Math.atan2(t[3], t[2]);
  2953. n = Math.sqrt(n) * Math.cos(r), e = Math.sqrt(e), this.skewX = r, this.skewY = 0, this.rotation = -i, this.x = +t[4], this.y = +t[5], this.scaleX = e, this.scaleY = n, this.originX = 0, this.originY = 0
  2954. }
  2955. }, t.prototype.decomposeTransform = function () {
  2956. if (this.transform) {
  2957. var t = this.parent,
  2958. e = this.transform;
  2959. t && t.transform && (t.invTransform = t.invTransform || [1, 0, 0, 1, 0, 0], be(fr, t.invTransform, e), e = fr);
  2960. var n = this.originX,
  2961. i = this.originY;
  2962. (n || i) && (gr[4] = n, gr[5] = i, be(fr, e, gr), fr[4] -= n, fr[5] -= i, e = fr), this.setLocalTransform(e)
  2963. }
  2964. }, t.prototype.getGlobalScale = function (t) {
  2965. var e = this.transform;
  2966. return t = t || [], e ? (t[0] = Math.sqrt(e[0] * e[0] + e[1] * e[1]), t[1] = Math.sqrt(e[2] * e[2] + e[3] * e[3]), e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t)
  2967. }, t.prototype.transformCoordToLocal = function (t, e) {
  2968. var n = [t, e],
  2969. i = this.invTransform;
  2970. return i && Wt(n, n, i), n
  2971. }, t.prototype.transformCoordToGlobal = function (t, e) {
  2972. var n = [t, e],
  2973. i = this.transform;
  2974. return i && Wt(n, n, i), n
  2975. }, t.prototype.getLineScale = function () {
  2976. var t = this.transform;
  2977. return t && yr(t[0] - 1) > 1e-10 && yr(t[3] - 1) > 1e-10 ? Math.sqrt(yr(t[0] * t[3] - t[2] * t[1])) : 1
  2978. }, t.prototype.copyTransform = function (t) {
  2979. xr(this, t)
  2980. }, t.getLocalTransform = function (t, e) {
  2981. e = e || [];
  2982. var n = t.originX || 0,
  2983. i = t.originY || 0,
  2984. r = t.scaleX,
  2985. o = t.scaleY,
  2986. a = t.anchorX,
  2987. s = t.anchorY,
  2988. l = t.rotation || 0,
  2989. u = t.x,
  2990. h = t.y,
  2991. c = t.skewX ? Math.tan(t.skewX) : 0,
  2992. p = t.skewY ? Math.tan(-t.skewY) : 0;
  2993. if (n || i || a || s) {
  2994. var d = n + a,
  2995. f = i + s;
  2996. e[4] = -d * r - c * f * o, e[5] = -f * o - p * d * r
  2997. } else e[4] = e[5] = 0;
  2998. return e[0] = r, e[3] = o, e[1] = p * r, e[2] = c * o, l && Se(e, e, l), e[4] += n + u, e[5] += i + h, e
  2999. }, t.initDefaultProps = function () {
  3000. var e = t.prototype;
  3001. e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0
  3002. }(), t
  3003. }(),
  3004. mr = ["x", "y", "originX", "originY", "anchorX", "anchorY", "rotation", "scaleX", "scaleY", "skewX", "skewY"];
  3005. function xr(t, e) {
  3006. for (var n = 0; n < mr.length; n++) {
  3007. var i = mr[n];
  3008. t[i] = e[i]
  3009. }
  3010. }
  3011. var _r = {};
  3012. function br(t, e) {
  3013. var n = _r[e = e || a];
  3014. n || (n = _r[e] = new En(500));
  3015. var i = n.get(t);
  3016. return null == i && (i = h.measureText(t, e).width, n.put(t, i)), i
  3017. }
  3018. function wr(t, e, n, i) {
  3019. var r = br(t, e),
  3020. o = Tr(e),
  3021. a = Mr(0, r, n),
  3022. s = Ir(0, o, i);
  3023. return new ze(a, s, r, o)
  3024. }
  3025. function Sr(t, e, n, i) {
  3026. var r = ((t || "") + "").split("\n");
  3027. if (1 === r.length) return wr(r[0], e, n, i);
  3028. for (var o = new ze(0, 0, 0, 0), a = 0; a < r.length; a++) {
  3029. var s = wr(r[a], e, n, i);
  3030. 0 === a ? o.copy(s) : o.union(s)
  3031. }
  3032. return o
  3033. }
  3034. function Mr(t, e, n) {
  3035. return "right" === n ? t -= e : "center" === n && (t -= e / 2), t
  3036. }
  3037. function Ir(t, e, n) {
  3038. return "middle" === n ? t -= e / 2 : "bottom" === n && (t -= e), t
  3039. }
  3040. function Tr(t) {
  3041. return br("国", t)
  3042. }
  3043. function Cr(t, e) {
  3044. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  3045. }
  3046. function Dr(t, e, n) {
  3047. var i = e.position || "inside",
  3048. r = null != e.distance ? e.distance : 5,
  3049. o = n.height,
  3050. a = n.width,
  3051. s = o / 2,
  3052. l = n.x,
  3053. u = n.y,
  3054. h = "left",
  3055. c = "top";
  3056. if (i instanceof Array) l += Cr(i[0], n.width), u += Cr(i[1], n.height), h = null, c = null;
  3057. else switch (i) {
  3058. case "left":
  3059. l -= r, u += s, h = "right", c = "middle";
  3060. break;
  3061. case "right":
  3062. l += r + a, u += s, c = "middle";
  3063. break;
  3064. case "top":
  3065. l += a / 2, u -= r, h = "center", c = "bottom";
  3066. break;
  3067. case "bottom":
  3068. l += a / 2, u += o + r, h = "center";
  3069. break;
  3070. case "inside":
  3071. l += a / 2, u += s, h = "center", c = "middle";
  3072. break;
  3073. case "insideLeft":
  3074. l += r, u += s, c = "middle";
  3075. break;
  3076. case "insideRight":
  3077. l += a - r, u += s, h = "right", c = "middle";
  3078. break;
  3079. case "insideTop":
  3080. l += a / 2, u += r, h = "center";
  3081. break;
  3082. case "insideBottom":
  3083. l += a / 2, u += o - r, h = "center", c = "bottom";
  3084. break;
  3085. case "insideTopLeft":
  3086. l += r, u += r;
  3087. break;
  3088. case "insideTopRight":
  3089. l += a - r, u += r, h = "right";
  3090. break;
  3091. case "insideBottomLeft":
  3092. l += r, u += o - r, c = "bottom";
  3093. break;
  3094. case "insideBottomRight":
  3095. l += a - r, u += o - r, h = "right", c = "bottom"
  3096. }
  3097. return (t = t || {}).x = l, t.y = u, t.align = h, t.verticalAlign = c, t
  3098. }
  3099. var Ar = "__zr_normal__",
  3100. kr = mr.concat(["ignore"]),
  3101. Lr = V(mr, (function (t, e) {
  3102. return t[e] = !0, t
  3103. }), {
  3104. ignore: !1
  3105. }),
  3106. Pr = {},
  3107. Or = new ze(0, 0, 0, 0),
  3108. Rr = function () {
  3109. function t(t) {
  3110. this.id = M(), this.animators = [], this.currentStates = [], this.states = {}, this._init(t)
  3111. }
  3112. return t.prototype._init = function (t) {
  3113. this.attr(t)
  3114. }, t.prototype.drift = function (t, e, n) {
  3115. switch (this.draggable) {
  3116. case "horizontal":
  3117. e = 0;
  3118. break;
  3119. case "vertical":
  3120. t = 0
  3121. }
  3122. var i = this.transform;
  3123. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.markRedraw()
  3124. }, t.prototype.beforeUpdate = function () {}, t.prototype.afterUpdate = function () {}, t.prototype.update = function () {
  3125. this.updateTransform(), this.__dirty && this.updateInnerText()
  3126. }, t.prototype.updateInnerText = function (t) {
  3127. var e = this._textContent;
  3128. if (e && (!e.ignore || t)) {
  3129. this.textConfig || (this.textConfig = {});
  3130. var n = this.textConfig,
  3131. i = n.local,
  3132. r = e.innerTransformable,
  3133. o = void 0,
  3134. a = void 0,
  3135. s = !1;
  3136. r.parent = i ? this : null;
  3137. var l = !1;
  3138. if (r.copyTransform(e), null != n.position) {
  3139. var u = Or;
  3140. n.layoutRect ? u.copy(n.layoutRect) : u.copy(this.getBoundingRect()), i || u.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(Pr, n, u) : Dr(Pr, n, u), r.x = Pr.x, r.y = Pr.y, o = Pr.align, a = Pr.verticalAlign;
  3141. var h = n.origin;
  3142. if (h && null != n.rotation) {
  3143. var c = void 0,
  3144. p = void 0;
  3145. "center" === h ? (c = .5 * u.width, p = .5 * u.height) : (c = Cr(h[0], u.width), p = Cr(h[1], u.height)), l = !0, r.originX = -r.x + c + (i ? 0 : u.x), r.originY = -r.y + p + (i ? 0 : u.y)
  3146. }
  3147. }
  3148. null != n.rotation && (r.rotation = n.rotation);
  3149. var d = n.offset;
  3150. d && (r.x += d[0], r.y += d[1], l || (r.originX = -d[0], r.originY = -d[1]));
  3151. var f = null == n.inside ? "string" == typeof n.position && n.position.indexOf("inside") >= 0 : n.inside,
  3152. g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}),
  3153. y = void 0,
  3154. v = void 0,
  3155. m = void 0;
  3156. f && this.canBeInsideText() ? (y = n.insideFill, v = n.insideStroke, null != y && "auto" !== y || (y = this.getInsideTextFill()), null != v && "auto" !== v || (v = this.getInsideTextStroke(y), m = !0)) : (y = n.outsideFill, v = n.outsideStroke, null != y && "auto" !== y || (y = this.getOutsideFill()), null != v && "auto" !== v || (v = this.getOutsideStroke(y), m = !0)), (y = y || "#000") === g.fill && v === g.stroke && m === g.autoStroke && o === g.align && a === g.verticalAlign || (s = !0, g.fill = y, g.stroke = v, g.autoStroke = m, g.align = o, g.verticalAlign = a, e.setDefaultTextStyle(g)), e.__dirty |= 1, s && e.dirtyStyle(!0)
  3157. }
  3158. }, t.prototype.canBeInsideText = function () {
  3159. return !0
  3160. }, t.prototype.getInsideTextFill = function () {
  3161. return "#fff"
  3162. }, t.prototype.getInsideTextStroke = function (t) {
  3163. return "#000"
  3164. }, t.prototype.getOutsideFill = function () {
  3165. return this.__zr && this.__zr.isDarkMode() ? ur : lr
  3166. }, t.prototype.getOutsideStroke = function (t) {
  3167. var e = this.__zr && this.__zr.getBackgroundColor(),
  3168. n = "string" == typeof e && qn(e);
  3169. n || (n = [255, 255, 255, 1]);
  3170. for (var i = n[3], r = this.__zr.isDarkMode(), o = 0; o < 3; o++) n[o] = n[o] * i + (r ? 0 : 255) * (1 - i);
  3171. return n[3] = 1, ri(n, "rgba")
  3172. }, t.prototype.traverse = function (t, e) {}, t.prototype.attrKV = function (t, e) {
  3173. "textConfig" === t ? this.setTextConfig(e) : "textContent" === t ? this.setTextContent(e) : "clipPath" === t ? this.setClipPath(e) : "extra" === t ? (this.extra = this.extra || {}, A(this.extra, e)) : this[t] = e
  3174. }, t.prototype.hide = function () {
  3175. this.ignore = !0, this.markRedraw()
  3176. }, t.prototype.show = function () {
  3177. this.ignore = !1, this.markRedraw()
  3178. }, t.prototype.attr = function (t, e) {
  3179. if ("string" == typeof t) this.attrKV(t, e);
  3180. else if (q(t))
  3181. for (var n = G(t), i = 0; i < n.length; i++) {
  3182. var r = n[i];
  3183. this.attrKV(r, t[r])
  3184. }
  3185. return this.markRedraw(), this
  3186. }, t.prototype.saveCurrentToNormalState = function (t) {
  3187. this._innerSaveToNormal(t);
  3188. for (var e = this._normalState, n = 0; n < this.animators.length; n++) {
  3189. var i = this.animators[n],
  3190. r = i.__fromStateTransition;
  3191. if (!(i.getLoop() || r && r !== Ar)) {
  3192. var o = i.targetName,
  3193. a = o ? e[o] : e;
  3194. i.saveTo(a)
  3195. }
  3196. }
  3197. }, t.prototype._innerSaveToNormal = function (t) {
  3198. var e = this._normalState;
  3199. e || (e = this._normalState = {}), t.textConfig && !e.textConfig && (e.textConfig = this.textConfig), this._savePrimaryToNormal(t, e, kr)
  3200. }, t.prototype._savePrimaryToNormal = function (t, e, n) {
  3201. for (var i = 0; i < n.length; i++) {
  3202. var r = n[i];
  3203. null == t[r] || r in e || (e[r] = this[r])
  3204. }
  3205. }, t.prototype.hasState = function () {
  3206. return this.currentStates.length > 0
  3207. }, t.prototype.getState = function (t) {
  3208. return this.states[t]
  3209. }, t.prototype.ensureState = function (t) {
  3210. var e = this.states;
  3211. return e[t] || (e[t] = {}), e[t]
  3212. }, t.prototype.clearStates = function (t) {
  3213. this.useState(Ar, !1, t)
  3214. }, t.prototype.useState = function (t, e, n, i) {
  3215. var r = t === Ar;
  3216. if (this.hasState() || !r) {
  3217. var o = this.currentStates,
  3218. a = this.stateTransition;
  3219. if (!(P(o, t) >= 0) || !e && 1 !== o.length) {
  3220. var s;
  3221. if (this.stateProxy && !r && (s = this.stateProxy(t)), s || (s = this.states && this.states[t]), s || r) {
  3222. r || this.saveCurrentToNormalState(s);
  3223. var l = !!(s && s.hoverLayer || i);
  3224. l && this._toggleHoverLayerFlag(!0), this._applyStateObj(t, s, this._normalState, e, !n && !this.__inHover && a && a.duration > 0, a);
  3225. var u = this._textContent,
  3226. h = this._textGuide;
  3227. return u && u.useState(t, e, n, l), h && h.useState(t, e, n, l), r ? (this.currentStates = [], this._normalState = {}) : e ? this.currentStates.push(t) : this.currentStates = [t], this._updateAnimationTargets(), this.markRedraw(), !l && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= -2), s
  3228. }
  3229. I("State " + t + " not exists.")
  3230. }
  3231. }
  3232. }, t.prototype.useStates = function (t, e, n) {
  3233. if (t.length) {
  3234. var i = [],
  3235. r = this.currentStates,
  3236. o = t.length,
  3237. a = o === r.length;
  3238. if (a)
  3239. for (var s = 0; s < o; s++)
  3240. if (t[s] !== r[s]) {
  3241. a = !1;
  3242. break
  3243. } if (a) return;
  3244. for (s = 0; s < o; s++) {
  3245. var l = t[s],
  3246. u = void 0;
  3247. this.stateProxy && (u = this.stateProxy(l, t)), u || (u = this.states[l]), u && i.push(u)
  3248. }
  3249. var h = i[o - 1],
  3250. c = !!(h && h.hoverLayer || n);
  3251. c && this._toggleHoverLayerFlag(!0);
  3252. var p = this._mergeStates(i),
  3253. d = this.stateTransition;
  3254. this.saveCurrentToNormalState(p), this._applyStateObj(t.join(","), p, this._normalState, !1, !e && !this.__inHover && d && d.duration > 0, d);
  3255. var f = this._textContent,
  3256. g = this._textGuide;
  3257. f && f.useStates(t, e, c), g && g.useStates(t, e, c), this._updateAnimationTargets(), this.currentStates = t.slice(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= -2)
  3258. } else this.clearStates()
  3259. }, t.prototype.isSilent = function () {
  3260. for (var t = this.silent, e = this.parent; !t && e;) {
  3261. if (e.silent) {
  3262. t = !0;
  3263. break
  3264. }
  3265. e = e.parent
  3266. }
  3267. return t
  3268. }, t.prototype._updateAnimationTargets = function () {
  3269. for (var t = 0; t < this.animators.length; t++) {
  3270. var e = this.animators[t];
  3271. e.targetName && e.changeTarget(this[e.targetName])
  3272. }
  3273. }, t.prototype.removeState = function (t) {
  3274. var e = P(this.currentStates, t);
  3275. if (e >= 0) {
  3276. var n = this.currentStates.slice();
  3277. n.splice(e, 1), this.useStates(n)
  3278. }
  3279. }, t.prototype.replaceState = function (t, e, n) {
  3280. var i = this.currentStates.slice(),
  3281. r = P(i, t),
  3282. o = P(i, e) >= 0;
  3283. r >= 0 ? o ? i.splice(r, 1) : i[r] = e : n && !o && i.push(e), this.useStates(i)
  3284. }, t.prototype.toggleState = function (t, e) {
  3285. e ? this.useState(t, !0) : this.removeState(t)
  3286. }, t.prototype._mergeStates = function (t) {
  3287. for (var e, n = {}, i = 0; i < t.length; i++) {
  3288. var r = t[i];
  3289. A(n, r), r.textConfig && A(e = e || {}, r.textConfig)
  3290. }
  3291. return e && (n.textConfig = e), n
  3292. }, t.prototype._applyStateObj = function (t, e, n, i, r, o) {
  3293. var a = !(e && i);
  3294. e && e.textConfig ? (this.textConfig = A({}, i ? this.textConfig : n.textConfig), A(this.textConfig, e.textConfig)) : a && n.textConfig && (this.textConfig = n.textConfig);
  3295. for (var s = {}, l = !1, u = 0; u < kr.length; u++) {
  3296. var h = kr[u],
  3297. c = r && Lr[h];
  3298. e && null != e[h] ? c ? (l = !0, s[h] = e[h]) : this[h] = e[h] : a && null != n[h] && (c ? (l = !0, s[h] = n[h]) : this[h] = n[h])
  3299. }
  3300. if (!r)
  3301. for (u = 0; u < this.animators.length; u++) {
  3302. var p = this.animators[u],
  3303. d = p.targetName;
  3304. p.getLoop() || p.__changeFinalValue(d ? (e || n)[d] : e || n)
  3305. }
  3306. l && this._transitionState(t, s, o)
  3307. }, t.prototype._attachComponent = function (t) {
  3308. if ((!t.__zr || t.__hostTarget) && t !== this) {
  3309. var e = this.__zr;
  3310. e && t.addSelfToZr(e), t.__zr = e, t.__hostTarget = this
  3311. }
  3312. }, t.prototype._detachComponent = function (t) {
  3313. t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__hostTarget = null
  3314. }, t.prototype.getClipPath = function () {
  3315. return this._clipPath
  3316. }, t.prototype.setClipPath = function (t) {
  3317. this._clipPath && this._clipPath !== t && this.removeClipPath(), this._attachComponent(t), this._clipPath = t, this.markRedraw()
  3318. }, t.prototype.removeClipPath = function () {
  3319. var t = this._clipPath;
  3320. t && (this._detachComponent(t), this._clipPath = null, this.markRedraw())
  3321. }, t.prototype.getTextContent = function () {
  3322. return this._textContent
  3323. }, t.prototype.setTextContent = function (t) {
  3324. var e = this._textContent;
  3325. e !== t && (e && e !== t && this.removeTextContent(), t.innerTransformable = new vr, this._attachComponent(t), this._textContent = t, this.markRedraw())
  3326. }, t.prototype.setTextConfig = function (t) {
  3327. this.textConfig || (this.textConfig = {}), A(this.textConfig, t), this.markRedraw()
  3328. }, t.prototype.removeTextConfig = function () {
  3329. this.textConfig = null, this.markRedraw()
  3330. }, t.prototype.removeTextContent = function () {
  3331. var t = this._textContent;
  3332. t && (t.innerTransformable = null, this._detachComponent(t), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw())
  3333. }, t.prototype.getTextGuideLine = function () {
  3334. return this._textGuide
  3335. }, t.prototype.setTextGuideLine = function (t) {
  3336. this._textGuide && this._textGuide !== t && this.removeTextGuideLine(), this._attachComponent(t), this._textGuide = t, this.markRedraw()
  3337. }, t.prototype.removeTextGuideLine = function () {
  3338. var t = this._textGuide;
  3339. t && (this._detachComponent(t), this._textGuide = null, this.markRedraw())
  3340. }, t.prototype.markRedraw = function () {
  3341. this.__dirty |= 1;
  3342. var t = this.__zr;
  3343. t && (this.__inHover ? t.refreshHover() : t.refresh()), this.__hostTarget && this.__hostTarget.markRedraw()
  3344. }, t.prototype.dirty = function () {
  3345. this.markRedraw()
  3346. }, t.prototype._toggleHoverLayerFlag = function (t) {
  3347. this.__inHover = t;
  3348. var e = this._textContent,
  3349. n = this._textGuide;
  3350. e && (e.__inHover = t), n && (n.__inHover = t)
  3351. }, t.prototype.addSelfToZr = function (t) {
  3352. if (this.__zr !== t) {
  3353. this.__zr = t;
  3354. var e = this.animators;
  3355. if (e)
  3356. for (var n = 0; n < e.length; n++) t.animation.addAnimator(e[n]);
  3357. this._clipPath && this._clipPath.addSelfToZr(t), this._textContent && this._textContent.addSelfToZr(t), this._textGuide && this._textGuide.addSelfToZr(t)
  3358. }
  3359. }, t.prototype.removeSelfFromZr = function (t) {
  3360. if (this.__zr) {
  3361. this.__zr = null;
  3362. var e = this.animators;
  3363. if (e)
  3364. for (var n = 0; n < e.length; n++) t.animation.removeAnimator(e[n]);
  3365. this._clipPath && this._clipPath.removeSelfFromZr(t), this._textContent && this._textContent.removeSelfFromZr(t), this._textGuide && this._textGuide.removeSelfFromZr(t)
  3366. }
  3367. }, t.prototype.animate = function (t, e, n) {
  3368. var i = t ? this[t] : this;
  3369. var r = new Vi(i, e, n);
  3370. return t && (r.targetName = t), this.addAnimator(r, t), r
  3371. }, t.prototype.addAnimator = function (t, e) {
  3372. var n = this.__zr,
  3373. i = this;
  3374. t.during((function () {
  3375. i.updateDuringAnimation(e)
  3376. })).done((function () {
  3377. var e = i.animators,
  3378. n = P(e, t);
  3379. n >= 0 && e.splice(n, 1)
  3380. })), this.animators.push(t), n && n.animation.addAnimator(t), n && n.wakeUp()
  3381. }, t.prototype.updateDuringAnimation = function (t) {
  3382. this.markRedraw()
  3383. }, t.prototype.stopAnimation = function (t, e) {
  3384. for (var n = this.animators, i = n.length, r = [], o = 0; o < i; o++) {
  3385. var a = n[o];
  3386. t && t !== a.scope ? r.push(a) : a.stop(e)
  3387. }
  3388. return this.animators = r, this
  3389. }, t.prototype.animateTo = function (t, e, n) {
  3390. Nr(this, t, e, n)
  3391. }, t.prototype.animateFrom = function (t, e, n) {
  3392. Nr(this, t, e, n, !0)
  3393. }, t.prototype._transitionState = function (t, e, n, i) {
  3394. for (var r = Nr(this, e, n, i), o = 0; o < r.length; o++) r[o].__fromStateTransition = t
  3395. }, t.prototype.getBoundingRect = function () {
  3396. return null
  3397. }, t.prototype.getPaintRect = function () {
  3398. return null
  3399. }, t.initDefaultProps = function () {
  3400. var e = t.prototype;
  3401. e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = 1;
  3402. function n(t, n, i, r) {
  3403. function o(t, e) {
  3404. Object.defineProperty(e, 0, {
  3405. get: function () {
  3406. return t[i]
  3407. },
  3408. set: function (e) {
  3409. t[i] = e
  3410. }
  3411. }), Object.defineProperty(e, 1, {
  3412. get: function () {
  3413. return t[r]
  3414. },
  3415. set: function (e) {
  3416. t[r] = e
  3417. }
  3418. })
  3419. }
  3420. Object.defineProperty(e, t, {
  3421. get: function () {
  3422. this[n] || o(this, this[n] = []);
  3423. return this[n]
  3424. },
  3425. set: function (t) {
  3426. this[i] = t[0], this[r] = t[1], this[n] = t, o(this, t)
  3427. }
  3428. })
  3429. }
  3430. Object.defineProperty && (n("position", "_legacyPos", "x", "y"), n("scale", "_legacyScale", "scaleX", "scaleY"), n("origin", "_legacyOrigin", "originX", "originY"))
  3431. }(), t
  3432. }();
  3433. function Nr(t, e, n, i, r) {
  3434. var o = [];
  3435. Vr(t, "", t, e, n = n || {}, i, o, r);
  3436. var a = o.length,
  3437. s = !1,
  3438. l = n.done,
  3439. u = n.aborted,
  3440. h = function () {
  3441. s = !0, --a <= 0 && (s ? l && l() : u && u())
  3442. },
  3443. c = function () {
  3444. --a <= 0 && (s ? l && l() : u && u())
  3445. };
  3446. a || l && l(), o.length > 0 && n.during && o[0].during((function (t, e) {
  3447. n.during(e)
  3448. }));
  3449. for (var p = 0; p < o.length; p++) {
  3450. var d = o[p];
  3451. h && d.done(h), c && d.aborted(c), n.force && d.duration(n.duration), d.start(n.easing)
  3452. }
  3453. return o
  3454. }
  3455. function Er(t, e, n) {
  3456. for (var i = 0; i < n; i++) t[i] = e[i]
  3457. }
  3458. function zr(t, e, n) {
  3459. if (N(e[n]))
  3460. if (N(t[n]) || (t[n] = []), $(e[n])) {
  3461. var i = e[n].length;
  3462. t[n].length !== i && (t[n] = new e[n].constructor(i), Er(t[n], e[n], i))
  3463. } else {
  3464. var r = e[n],
  3465. o = t[n],
  3466. a = r.length;
  3467. if (N(r[0]))
  3468. for (var s = r[0].length, l = 0; l < a; l++) o[l] ? Er(o[l], r[l], s) : o[l] = Array.prototype.slice.call(r[l]);
  3469. else Er(o, r, a);
  3470. o.length = r.length
  3471. }
  3472. else t[n] = e[n]
  3473. }
  3474. function Vr(t, e, n, i, r, o, a, s) {
  3475. for (var l = G(i), u = r.duration, h = r.delay, c = r.additive, p = r.setToFinal, d = !q(o), f = t.animators, g = [], y = 0; y < l.length; y++) {
  3476. var v = l[y],
  3477. m = i[v];
  3478. if (null != m && null != n[v] && (d || o[v]))
  3479. if (!q(m) || N(m) || Q(m)) g.push(v);
  3480. else {
  3481. if (e) {
  3482. s || (n[v] = m, t.updateDuringAnimation(e));
  3483. continue
  3484. }
  3485. Vr(t, v, n[v], m, r, o && o[v], a, s)
  3486. }
  3487. else s || (n[v] = m, t.updateDuringAnimation(e), g.push(v))
  3488. }
  3489. var x = g.length;
  3490. if (!c && x)
  3491. for (var _ = 0; _ < f.length; _++) {
  3492. if ((w = f[_]).targetName === e)
  3493. if (w.stopTracks(g)) {
  3494. var b = P(f, w);
  3495. f.splice(b, 1)
  3496. }
  3497. }
  3498. if (r.force || (g = B(g, (function (t) {
  3499. return e = i[t], r = n[t], !(e === r || N(e) && N(r) && function (t, e) {
  3500. var n = t.length;
  3501. if (n !== e.length) return !1;
  3502. for (var i = 0; i < n; i++)
  3503. if (t[i] !== e[i]) return !1;
  3504. return !0
  3505. }(e, r));
  3506. var e, r
  3507. })), x = g.length), x > 0 || r.force && !a.length) {
  3508. var w, S = void 0,
  3509. M = void 0,
  3510. I = void 0;
  3511. if (s) {
  3512. M = {}, p && (S = {});
  3513. for (_ = 0; _ < x; _++) {
  3514. M[v = g[_]] = n[v], p ? S[v] = i[v] : n[v] = i[v]
  3515. }
  3516. } else if (p) {
  3517. I = {};
  3518. for (_ = 0; _ < x; _++) {
  3519. I[v = g[_]] = Pi(n[v]), zr(n, i, v)
  3520. }
  3521. }(w = new Vi(n, !1, !1, c ? B(f, (function (t) {
  3522. return t.targetName === e
  3523. })) : null)).targetName = e, r.scope && (w.scope = r.scope), p && S && w.whenWithKeys(0, S, g), I && w.whenWithKeys(0, I, g), w.whenWithKeys(null == u ? 500 : u, s ? M : i, g).delay(h || 0), t.addAnimator(w, e), a.push(w)
  3524. }
  3525. }
  3526. R(Rr, jt), R(Rr, vr);
  3527. var Br = function (t) {
  3528. function e(e) {
  3529. var n = t.call(this) || this;
  3530. return n.isGroup = !0, n._children = [], n.attr(e), n
  3531. }
  3532. return n(e, t), e.prototype.childrenRef = function () {
  3533. return this._children
  3534. }, e.prototype.children = function () {
  3535. return this._children.slice()
  3536. }, e.prototype.childAt = function (t) {
  3537. return this._children[t]
  3538. }, e.prototype.childOfName = function (t) {
  3539. for (var e = this._children, n = 0; n < e.length; n++)
  3540. if (e[n].name === t) return e[n]
  3541. }, e.prototype.childCount = function () {
  3542. return this._children.length
  3543. }, e.prototype.add = function (t) {
  3544. return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this
  3545. }, e.prototype.addBefore = function (t, e) {
  3546. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  3547. var n = this._children,
  3548. i = n.indexOf(e);
  3549. i >= 0 && (n.splice(i, 0, t), this._doAdd(t))
  3550. }
  3551. return this
  3552. }, e.prototype.replace = function (t, e) {
  3553. var n = P(this._children, t);
  3554. return n >= 0 && this.replaceAt(e, n), this
  3555. }, e.prototype.replaceAt = function (t, e) {
  3556. var n = this._children,
  3557. i = n[e];
  3558. if (t && t !== this && t.parent !== this && t !== i) {
  3559. n[e] = t, i.parent = null;
  3560. var r = this.__zr;
  3561. r && i.removeSelfFromZr(r), this._doAdd(t)
  3562. }
  3563. return this
  3564. }, e.prototype._doAdd = function (t) {
  3565. t.parent && t.parent.remove(t), t.parent = this;
  3566. var e = this.__zr;
  3567. e && e !== t.__zr && t.addSelfToZr(e), e && e.refresh()
  3568. }, e.prototype.remove = function (t) {
  3569. var e = this.__zr,
  3570. n = this._children,
  3571. i = P(n, t);
  3572. return i < 0 || (n.splice(i, 1), t.parent = null, e && t.removeSelfFromZr(e), e && e.refresh()), this
  3573. }, e.prototype.removeAll = function () {
  3574. for (var t = this._children, e = this.__zr, n = 0; n < t.length; n++) {
  3575. var i = t[n];
  3576. e && i.removeSelfFromZr(e), i.parent = null
  3577. }
  3578. return t.length = 0, this
  3579. }, e.prototype.eachChild = function (t, e) {
  3580. for (var n = this._children, i = 0; i < n.length; i++) {
  3581. var r = n[i];
  3582. t.call(e, r, i)
  3583. }
  3584. return this
  3585. }, e.prototype.traverse = function (t, e) {
  3586. for (var n = 0; n < this._children.length; n++) {
  3587. var i = this._children[n],
  3588. r = t.call(e, i);
  3589. i.isGroup && !r && i.traverse(t, e)
  3590. }
  3591. return this
  3592. }, e.prototype.addSelfToZr = function (e) {
  3593. t.prototype.addSelfToZr.call(this, e);
  3594. for (var n = 0; n < this._children.length; n++) {
  3595. this._children[n].addSelfToZr(e)
  3596. }
  3597. }, e.prototype.removeSelfFromZr = function (e) {
  3598. t.prototype.removeSelfFromZr.call(this, e);
  3599. for (var n = 0; n < this._children.length; n++) {
  3600. this._children[n].removeSelfFromZr(e)
  3601. }
  3602. }, e.prototype.getBoundingRect = function (t) {
  3603. for (var e = new ze(0, 0, 0, 0), n = t || this._children, i = [], r = null, o = 0; o < n.length; o++) {
  3604. var a = n[o];
  3605. if (!a.ignore && !a.invisible) {
  3606. var s = a.getBoundingRect(),
  3607. l = a.getLocalTransform(i);
  3608. l ? (ze.applyTransform(e, s, l), (r = r || e.clone()).union(e)) : (r = r || s.clone()).union(s)
  3609. }
  3610. }
  3611. return r || e
  3612. }, e
  3613. }(Rr);
  3614. Br.prototype.type = "group";
  3615. /*!
  3616. * ZRender, a high performance 2d drawing library.
  3617. *
  3618. * Copyright (c) 2013, Baidu Inc.
  3619. * All rights reserved.
  3620. *
  3621. * LICENSE
  3622. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  3623. */
  3624. var Fr = {},
  3625. Gr = {};
  3626. var Wr, Hr = function () {
  3627. function t(t, e, n) {
  3628. var i = this;
  3629. this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, n = n || {}, this.dom = e, this.id = t;
  3630. var o = new rn,
  3631. a = n.renderer || "canvas";
  3632. Fr[a] || (a = G(Fr)[0]), n.useDirtyRect = null != n.useDirtyRect && n.useDirtyRect;
  3633. var s = new Fr[a](e, o, n, t),
  3634. l = n.ssr || s.ssrOnly;
  3635. this.storage = o, this.painter = s;
  3636. var u, h = r.node || r.worker || l ? null : new or(s.getViewportRoot(), s.root),
  3637. c = n.useCoarsePointer;
  3638. (null == c || "auto" === c ? r.touchEventsSupported : !!c) && (u = rt(n.pointerSize, 44)), this.handler = new Ye(o, s, h, s.root, u), this.animation = new Wi({
  3639. stage: {
  3640. update: l ? null : function () {
  3641. return i._flush(!0)
  3642. }
  3643. }
  3644. }), l || this.animation.start()
  3645. }
  3646. return t.prototype.add = function (t) {
  3647. !this._disposed && t && (this.storage.addRoot(t), t.addSelfToZr(this), this.refresh())
  3648. }, t.prototype.remove = function (t) {
  3649. !this._disposed && t && (this.storage.delRoot(t), t.removeSelfFromZr(this), this.refresh())
  3650. }, t.prototype.configLayer = function (t, e) {
  3651. this._disposed || (this.painter.configLayer && this.painter.configLayer(t, e), this.refresh())
  3652. }, t.prototype.setBackgroundColor = function (t) {
  3653. this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this.refresh(), this._backgroundColor = t, this._darkMode = function (t) {
  3654. if (!t) return !1;
  3655. if ("string" == typeof t) return oi(t, 1) < .4;
  3656. if (t.colorStops) {
  3657. for (var e = t.colorStops, n = 0, i = e.length, r = 0; r < i; r++) n += oi(e[r].color, 1);
  3658. return (n /= i) < .4
  3659. }
  3660. return !1
  3661. }(t))
  3662. }, t.prototype.getBackgroundColor = function () {
  3663. return this._backgroundColor
  3664. }, t.prototype.setDarkMode = function (t) {
  3665. this._darkMode = t
  3666. }, t.prototype.isDarkMode = function () {
  3667. return this._darkMode
  3668. }, t.prototype.refreshImmediately = function (t) {
  3669. this._disposed || (t || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1)
  3670. }, t.prototype.refresh = function () {
  3671. this._disposed || (this._needsRefresh = !0, this.animation.start())
  3672. }, t.prototype.flush = function () {
  3673. this._disposed || this._flush(!1)
  3674. }, t.prototype._flush = function (t) {
  3675. var e, n = Bi();
  3676. this._needsRefresh && (e = !0, this.refreshImmediately(t)), this._needsRefreshHover && (e = !0, this.refreshHoverImmediately());
  3677. var i = Bi();
  3678. e ? (this._stillFrameAccum = 0, this.trigger("rendered", {
  3679. elapsedTime: i - n
  3680. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop())
  3681. }, t.prototype.setSleepAfterStill = function (t) {
  3682. this._sleepAfterStill = t
  3683. }, t.prototype.wakeUp = function () {
  3684. this._disposed || (this.animation.start(), this._stillFrameAccum = 0)
  3685. }, t.prototype.refreshHover = function () {
  3686. this._needsRefreshHover = !0
  3687. }, t.prototype.refreshHoverImmediately = function () {
  3688. this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && "canvas" === this.painter.getType() && this.painter.refreshHover())
  3689. }, t.prototype.resize = function (t) {
  3690. this._disposed || (t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize())
  3691. }, t.prototype.clearAnimation = function () {
  3692. this._disposed || this.animation.clear()
  3693. }, t.prototype.getWidth = function () {
  3694. if (!this._disposed) return this.painter.getWidth()
  3695. }, t.prototype.getHeight = function () {
  3696. if (!this._disposed) return this.painter.getHeight()
  3697. }, t.prototype.setCursorStyle = function (t) {
  3698. this._disposed || this.handler.setCursorStyle(t)
  3699. }, t.prototype.findHover = function (t, e) {
  3700. if (!this._disposed) return this.handler.findHover(t, e)
  3701. }, t.prototype.on = function (t, e, n) {
  3702. return this._disposed || this.handler.on(t, e, n), this
  3703. }, t.prototype.off = function (t, e) {
  3704. this._disposed || this.handler.off(t, e)
  3705. }, t.prototype.trigger = function (t, e) {
  3706. this._disposed || this.handler.trigger(t, e)
  3707. }, t.prototype.clear = function () {
  3708. if (!this._disposed) {
  3709. for (var t = this.storage.getRoots(), e = 0; e < t.length; e++) t[e] instanceof Br && t[e].removeSelfFromZr(this);
  3710. this.storage.delAllRoots(), this.painter.clear()
  3711. }
  3712. }, t.prototype.dispose = function () {
  3713. var t;
  3714. this._disposed || (this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, this._disposed = !0, t = this.id, delete Gr[t])
  3715. }, t
  3716. }();
  3717. function Yr(t, e) {
  3718. var n = new Hr(M(), t, e);
  3719. return Gr[n.id] = n, n
  3720. }
  3721. function Xr(t, e) {
  3722. Fr[t] = e
  3723. }
  3724. function Ur(t) {
  3725. if ("function" == typeof Wr) return Wr(t)
  3726. }
  3727. function Zr(t) {
  3728. Wr = t
  3729. }
  3730. var jr = Object.freeze({
  3731. __proto__: null,
  3732. init: Yr,
  3733. dispose: function (t) {
  3734. t.dispose()
  3735. },
  3736. disposeAll: function () {
  3737. for (var t in Gr) Gr.hasOwnProperty(t) && Gr[t].dispose();
  3738. Gr = {}
  3739. },
  3740. getInstance: function (t) {
  3741. return Gr[t]
  3742. },
  3743. registerPainter: Xr,
  3744. getElementSSRData: Ur,
  3745. registerSSRDataGetter: Zr,
  3746. version: "5.5.0"
  3747. }),
  3748. qr = 1e-4;
  3749. function Kr(t, e, n, i) {
  3750. var r = e[0],
  3751. o = e[1],
  3752. a = n[0],
  3753. s = n[1],
  3754. l = o - r,
  3755. u = s - a;
  3756. if (0 === l) return 0 === u ? a : (a + s) / 2;
  3757. if (i)
  3758. if (l > 0) {
  3759. if (t <= r) return a;
  3760. if (t >= o) return s
  3761. } else {
  3762. if (t >= r) return a;
  3763. if (t <= o) return s
  3764. }
  3765. else {
  3766. if (t === r) return a;
  3767. if (t === o) return s
  3768. }
  3769. return (t - r) / l * u + a
  3770. }
  3771. function $r(t, e) {
  3772. switch (t) {
  3773. case "center":
  3774. case "middle":
  3775. t = "50%";
  3776. break;
  3777. case "left":
  3778. case "top":
  3779. t = "0%";
  3780. break;
  3781. case "right":
  3782. case "bottom":
  3783. t = "100%"
  3784. }
  3785. return U(t) ? (n = t, n.replace(/^\s+|\s+$/g, "")).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t;
  3786. var n
  3787. }
  3788. function Jr(t, e, n) {
  3789. return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), n ? t : +t
  3790. }
  3791. function Qr(t) {
  3792. return t.sort((function (t, e) {
  3793. return t - e
  3794. })), t
  3795. }
  3796. function to(t) {
  3797. if (t = +t, isNaN(t)) return 0;
  3798. if (t > 1e-14)
  3799. for (var e = 1, n = 0; n < 15; n++, e *= 10)
  3800. if (Math.round(t * e) / e === t) return n;
  3801. return eo(t)
  3802. }
  3803. function eo(t) {
  3804. var e = t.toString().toLowerCase(),
  3805. n = e.indexOf("e"),
  3806. i = n > 0 ? +e.slice(n + 1) : 0,
  3807. r = n > 0 ? n : e.length,
  3808. o = e.indexOf("."),
  3809. a = o < 0 ? 0 : r - 1 - o;
  3810. return Math.max(0, a - i)
  3811. }
  3812. function no(t, e) {
  3813. var n = Math.log,
  3814. i = Math.LN10,
  3815. r = Math.floor(n(t[1] - t[0]) / i),
  3816. o = Math.round(n(Math.abs(e[1] - e[0])) / i),
  3817. a = Math.min(Math.max(-r + o, 0), 20);
  3818. return isFinite(a) ? a : 20
  3819. }
  3820. function io(t, e) {
  3821. var n = V(t, (function (t, e) {
  3822. return t + (isNaN(e) ? 0 : e)
  3823. }), 0);
  3824. if (0 === n) return [];
  3825. for (var i = Math.pow(10, e), r = z(t, (function (t) {
  3826. return (isNaN(t) ? 0 : t) / n * i * 100
  3827. })), o = 100 * i, a = z(r, (function (t) {
  3828. return Math.floor(t)
  3829. })), s = V(a, (function (t, e) {
  3830. return t + e
  3831. }), 0), l = z(r, (function (t, e) {
  3832. return t - a[e]
  3833. })); s < o;) {
  3834. for (var u = Number.NEGATIVE_INFINITY, h = null, c = 0, p = l.length; c < p; ++c) l[c] > u && (u = l[c], h = c);
  3835. ++a[h], l[h] = 0, ++s
  3836. }
  3837. return z(a, (function (t) {
  3838. return t / i
  3839. }))
  3840. }
  3841. function ro(t, e) {
  3842. var n = Math.max(to(t), to(e)),
  3843. i = t + e;
  3844. return n > 20 ? i : Jr(i, n)
  3845. }
  3846. var oo = 9007199254740991;
  3847. function ao(t) {
  3848. var e = 2 * Math.PI;
  3849. return (t % e + e) % e
  3850. }
  3851. function so(t) {
  3852. return t > -1e-4 && t < qr
  3853. }
  3854. var lo = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
  3855. function uo(t) {
  3856. if (t instanceof Date) return t;
  3857. if (U(t)) {
  3858. var e = lo.exec(t);
  3859. if (!e) return new Date(NaN);
  3860. if (e[8]) {
  3861. var n = +e[4] || 0;
  3862. return "Z" !== e[8].toUpperCase() && (n -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0))
  3863. }
  3864. return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0)
  3865. }
  3866. return null == t ? new Date(NaN) : new Date(Math.round(t))
  3867. }
  3868. function ho(t) {
  3869. return Math.pow(10, co(t))
  3870. }
  3871. function co(t) {
  3872. if (0 === t) return 0;
  3873. var e = Math.floor(Math.log(t) / Math.LN10);
  3874. return t / Math.pow(10, e) >= 10 && e++, e
  3875. }
  3876. function po(t, e) {
  3877. var n = co(t),
  3878. i = Math.pow(10, n),
  3879. r = t / i;
  3880. return t = (e ? r < 1.5 ? 1 : r < 2.5 ? 2 : r < 4 ? 3 : r < 7 ? 5 : 10 : r < 1 ? 1 : r < 2 ? 2 : r < 3 ? 3 : r < 5 ? 5 : 10) * i, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t
  3881. }
  3882. function fo(t, e) {
  3883. var n = (t.length - 1) * e + 1,
  3884. i = Math.floor(n),
  3885. r = +t[i - 1],
  3886. o = n - i;
  3887. return o ? r + o * (t[i] - r) : r
  3888. }
  3889. function go(t) {
  3890. t.sort((function (t, e) {
  3891. return s(t, e, 0) ? -1 : 1
  3892. }));
  3893. for (var e = -1 / 0, n = 1, i = 0; i < t.length;) {
  3894. for (var r = t[i].interval, o = t[i].close, a = 0; a < 2; a++) r[a] <= e && (r[a] = e, o[a] = a ? 1 : 1 - n), e = r[a], n = o[a];
  3895. r[0] === r[1] && o[0] * o[1] != 1 ? t.splice(i, 1) : i++
  3896. }
  3897. return t;
  3898. function s(t, e, n) {
  3899. return t.interval[n] < e.interval[n] || t.interval[n] === e.interval[n] && (t.close[n] - e.close[n] == (n ? -1 : 1) || !n && s(t, e, 1))
  3900. }
  3901. }
  3902. function yo(t) {
  3903. var e = parseFloat(t);
  3904. return e == t && (0 !== e || !U(t) || t.indexOf("x") <= 0) ? e : NaN
  3905. }
  3906. function vo(t) {
  3907. return !isNaN(yo(t))
  3908. }
  3909. function mo() {
  3910. return Math.round(9 * Math.random())
  3911. }
  3912. function xo(t, e) {
  3913. return 0 === e ? t : xo(e, t % e)
  3914. }
  3915. function _o(t, e) {
  3916. return null == t ? e : null == e ? t : t * e / xo(t, e)
  3917. }
  3918. "undefined" != typeof console && console.warn && console.log;
  3919. function bo(t) {
  3920. 0
  3921. }
  3922. function wo(t) {
  3923. throw new Error(t)
  3924. }
  3925. function So(t, e, n) {
  3926. return (e - t) * n + t
  3927. }
  3928. var Mo = "series\0",
  3929. Io = "\0_ec_\0";
  3930. function To(t) {
  3931. return t instanceof Array ? t : null == t ? [] : [t]
  3932. }
  3933. function Co(t, e, n) {
  3934. if (t) {
  3935. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  3936. for (var i = 0, r = n.length; i < r; i++) {
  3937. var o = n[i];
  3938. !t.emphasis[e].hasOwnProperty(o) && t[e].hasOwnProperty(o) && (t.emphasis[e][o] = t[e][o])
  3939. }
  3940. }
  3941. }
  3942. var Do = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
  3943. function Ao(t) {
  3944. return !q(t) || Y(t) || t instanceof Date ? t : t.value
  3945. }
  3946. function ko(t) {
  3947. return q(t) && !(t instanceof Array)
  3948. }
  3949. function Lo(t, e, n) {
  3950. var i = "normalMerge" === n,
  3951. r = "replaceMerge" === n,
  3952. o = "replaceAll" === n;
  3953. t = t || [], e = (e || []).slice();
  3954. var a = yt();
  3955. E(e, (function (t, n) {
  3956. q(t) || (e[n] = null)
  3957. }));
  3958. var s, l, u = function (t, e, n) {
  3959. var i = [];
  3960. if ("replaceAll" === n) return i;
  3961. for (var r = 0; r < t.length; r++) {
  3962. var o = t[r];
  3963. o && null != o.id && e.set(o.id, r), i.push({
  3964. existing: "replaceMerge" === n || Eo(o) ? null : o,
  3965. newOption: null,
  3966. keyInfo: null,
  3967. brandNew: null
  3968. })
  3969. }
  3970. return i
  3971. }(t, a, n);
  3972. return (i || r) && function (t, e, n, i) {
  3973. E(i, (function (r, o) {
  3974. if (r && null != r.id) {
  3975. var a = Oo(r.id),
  3976. s = n.get(a);
  3977. if (null != s) {
  3978. var l = t[s];
  3979. lt(!l.newOption, 'Duplicated option on id "' + a + '".'), l.newOption = r, l.existing = e[s], i[o] = null
  3980. }
  3981. }
  3982. }))
  3983. }(u, t, a, e), i && function (t, e) {
  3984. E(e, (function (n, i) {
  3985. if (n && null != n.name)
  3986. for (var r = 0; r < t.length; r++) {
  3987. var o = t[r].existing;
  3988. if (!t[r].newOption && o && (null == o.id || null == n.id) && !Eo(n) && !Eo(o) && Po("name", o, n)) return t[r].newOption = n, void(e[i] = null)
  3989. }
  3990. }))
  3991. }(u, e), i || r ? function (t, e, n) {
  3992. E(e, (function (e) {
  3993. if (e) {
  3994. for (var i, r = 0;
  3995. (i = t[r]) && (i.newOption || Eo(i.existing) || i.existing && null != e.id && !Po("id", e, i.existing));) r++;
  3996. i ? (i.newOption = e, i.brandNew = n) : t.push({
  3997. newOption: e,
  3998. brandNew: n,
  3999. existing: null,
  4000. keyInfo: null
  4001. }), r++
  4002. }
  4003. }))
  4004. }(u, e, r) : o && function (t, e) {
  4005. E(e, (function (e) {
  4006. t.push({
  4007. newOption: e,
  4008. brandNew: !0,
  4009. existing: null,
  4010. keyInfo: null
  4011. })
  4012. }))
  4013. }(u, e), s = u, l = yt(), E(s, (function (t) {
  4014. var e = t.existing;
  4015. e && l.set(e.id, t)
  4016. })), E(s, (function (t) {
  4017. var e = t.newOption;
  4018. lt(!e || null == e.id || !l.get(e.id) || l.get(e.id) === t, "id duplicates: " + (e && e.id)), e && null != e.id && l.set(e.id, t), !t.keyInfo && (t.keyInfo = {})
  4019. })), E(s, (function (t, e) {
  4020. var n = t.existing,
  4021. i = t.newOption,
  4022. r = t.keyInfo;
  4023. if (q(i)) {
  4024. if (r.name = null != i.name ? Oo(i.name) : n ? n.name : Mo + e, n) r.id = Oo(n.id);
  4025. else if (null != i.id) r.id = Oo(i.id);
  4026. else {
  4027. var o = 0;
  4028. do {
  4029. r.id = "\0" + r.name + "\0" + o++
  4030. } while (l.get(r.id))
  4031. }
  4032. l.set(r.id, t)
  4033. }
  4034. })), u
  4035. }
  4036. function Po(t, e, n) {
  4037. var i = Ro(e[t], null),
  4038. r = Ro(n[t], null);
  4039. return null != i && null != r && i === r
  4040. }
  4041. function Oo(t) {
  4042. return Ro(t, "")
  4043. }
  4044. function Ro(t, e) {
  4045. return null == t ? e : U(t) ? t : j(t) || Z(t) ? t + "" : e
  4046. }
  4047. function No(t) {
  4048. var e = t.name;
  4049. return !(!e || !e.indexOf(Mo))
  4050. }
  4051. function Eo(t) {
  4052. return t && null != t.id && 0 === Oo(t.id).indexOf(Io)
  4053. }
  4054. function zo(t, e) {
  4055. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? Y(e.dataIndex) ? z(e.dataIndex, (function (e) {
  4056. return t.indexOfRawIndex(e)
  4057. })) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? Y(e.name) ? z(e.name, (function (e) {
  4058. return t.indexOfName(e)
  4059. })) : t.indexOfName(e.name) : void 0
  4060. }
  4061. function Vo() {
  4062. var t = "__ec_inner_" + Bo++;
  4063. return function (e) {
  4064. return e[t] || (e[t] = {})
  4065. }
  4066. }
  4067. var Bo = mo();
  4068. function Fo(t, e, n) {
  4069. var i = Go(e, n),
  4070. r = i.mainTypeSpecified,
  4071. o = i.queryOptionMap,
  4072. a = i.others,
  4073. s = n ? n.defaultMainType : null;
  4074. return !r && s && o.set(s, {}), o.each((function (e, i) {
  4075. var r = Yo(t, i, e, {
  4076. useDefault: s === i,
  4077. enableAll: !n || null == n.enableAll || n.enableAll,
  4078. enableNone: !n || null == n.enableNone || n.enableNone
  4079. });
  4080. a[i + "Models"] = r.models, a[i + "Model"] = r.models[0]
  4081. })), a
  4082. }
  4083. function Go(t, e) {
  4084. var n;
  4085. if (U(t)) {
  4086. var i = {};
  4087. i[t + "Index"] = 0, n = i
  4088. } else n = t;
  4089. var r = yt(),
  4090. o = {},
  4091. a = !1;
  4092. return E(n, (function (t, n) {
  4093. if ("dataIndex" !== n && "dataIndexInside" !== n) {
  4094. var i = n.match(/^(\w+)(Index|Id|Name)$/) || [],
  4095. s = i[1],
  4096. l = (i[2] || "").toLowerCase();
  4097. if (s && l && !(e && e.includeMainTypes && P(e.includeMainTypes, s) < 0)) a = a || !!s, (r.get(s) || r.set(s, {}))[l] = t
  4098. } else o[n] = t
  4099. })), {
  4100. mainTypeSpecified: a,
  4101. queryOptionMap: r,
  4102. others: o
  4103. }
  4104. }
  4105. var Wo = {
  4106. useDefault: !0,
  4107. enableAll: !1,
  4108. enableNone: !1
  4109. },
  4110. Ho = {
  4111. useDefault: !1,
  4112. enableAll: !0,
  4113. enableNone: !0
  4114. };
  4115. function Yo(t, e, n, i) {
  4116. i = i || Wo;
  4117. var r = n.index,
  4118. o = n.id,
  4119. a = n.name,
  4120. s = {
  4121. models: null,
  4122. specified: null != r || null != o || null != a
  4123. };
  4124. if (!s.specified) {
  4125. var l = void 0;
  4126. return s.models = i.useDefault && (l = t.getComponent(e)) ? [l] : [], s
  4127. }
  4128. return "none" === r || !1 === r ? (lt(i.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : ("all" === r && (lt(i.enableAll, '`"all"` is not a valid value on index option.'), r = o = a = null), s.models = t.queryComponents({
  4129. mainType: e,
  4130. index: r,
  4131. id: o,
  4132. name: a
  4133. }), s)
  4134. }
  4135. function Xo(t, e, n) {
  4136. t.setAttribute ? t.setAttribute(e, n) : t[e] = n
  4137. }
  4138. function Uo(t, e) {
  4139. var n = yt(),
  4140. i = [];
  4141. return E(t, (function (t) {
  4142. var r = e(t);
  4143. (n.get(r) || (i.push(r), n.set(r, []))).push(t)
  4144. })), {
  4145. keys: i,
  4146. buckets: n
  4147. }
  4148. }
  4149. function Zo(t, e, n, i, r) {
  4150. var o = null == e || "auto" === e;
  4151. if (null == i) return i;
  4152. if (j(i)) return Jr(f = So(n || 0, i, r), o ? Math.max(to(n || 0), to(i)) : e);
  4153. if (U(i)) return r < 1 ? n : i;
  4154. for (var a = [], s = n, l = i, u = Math.max(s ? s.length : 0, l.length), h = 0; h < u; ++h) {
  4155. var c = t.getDimensionInfo(h);
  4156. if (c && "ordinal" === c.type) a[h] = (r < 1 && s ? s : l)[h];
  4157. else {
  4158. var p = s && s[h] ? s[h] : 0,
  4159. d = l[h],
  4160. f = So(p, d, r);
  4161. a[h] = Jr(f, o ? Math.max(to(p), to(d)) : e)
  4162. }
  4163. }
  4164. return a
  4165. }
  4166. var jo = "___EC__COMPONENT__CONTAINER___",
  4167. qo = "___EC__EXTENDED_CLASS___";
  4168. function Ko(t) {
  4169. var e = {
  4170. main: "",
  4171. sub: ""
  4172. };
  4173. if (t) {
  4174. var n = t.split(".");
  4175. e.main = n[0] || "", e.sub = n[1] || ""
  4176. }
  4177. return e
  4178. }
  4179. function $o(t, e) {
  4180. t.$constructor = t, t.extend = function (t) {
  4181. var e, i, r = this;
  4182. return X(i = r) && /^class\s/.test(Function.prototype.toString.call(i)) ? e = function (t) {
  4183. function e() {
  4184. return t.apply(this, arguments) || this
  4185. }
  4186. return n(e, t), e
  4187. }(r) : (e = function () {
  4188. (t.$constructor || r).apply(this, arguments)
  4189. }, O(e, this)), A(e.prototype, t), e[qo] = !0, e.extend = this.extend, e.superCall = ta, e.superApply = ea, e.superClass = r, e
  4190. }
  4191. }
  4192. function Jo(t, e) {
  4193. t.extend = e.extend
  4194. }
  4195. var Qo = Math.round(10 * Math.random());
  4196. function ta(t, e) {
  4197. for (var n = [], i = 2; i < arguments.length; i++) n[i - 2] = arguments[i];
  4198. return this.superClass.prototype[e].apply(t, n)
  4199. }
  4200. function ea(t, e, n) {
  4201. return this.superClass.prototype[e].apply(t, n)
  4202. }
  4203. function na(t) {
  4204. var e = {};
  4205. t.registerClass = function (t) {
  4206. var n, i = t.type || t.prototype.type;
  4207. if (i) {
  4208. lt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n = i), 'componentType "' + n + '" illegal'), t.prototype.type = i;
  4209. var r = Ko(i);
  4210. if (r.sub) {
  4211. if (r.sub !== jo) {
  4212. var o = function (t) {
  4213. var n = e[t.main];
  4214. n && n[jo] || ((n = e[t.main] = {})[jo] = !0);
  4215. return n
  4216. }(r);
  4217. o[r.sub] = t
  4218. }
  4219. } else e[r.main] = t
  4220. }
  4221. return t
  4222. }, t.getClass = function (t, n, i) {
  4223. var r = e[t];
  4224. if (r && r[jo] && (r = n ? r[n] : null), i && !r) throw new Error(n ? "Component " + t + "." + (n || "") + " is used but not imported." : t + ".type should be specified.");
  4225. return r
  4226. }, t.getClassesByMainType = function (t) {
  4227. var n = Ko(t),
  4228. i = [],
  4229. r = e[n.main];
  4230. return r && r[jo] ? E(r, (function (t, e) {
  4231. e !== jo && i.push(t)
  4232. })) : i.push(r), i
  4233. }, t.hasClass = function (t) {
  4234. var n = Ko(t);
  4235. return !!e[n.main]
  4236. }, t.getAllClassMainTypes = function () {
  4237. var t = [];
  4238. return E(e, (function (e, n) {
  4239. t.push(n)
  4240. })), t
  4241. }, t.hasSubTypes = function (t) {
  4242. var n = Ko(t),
  4243. i = e[n.main];
  4244. return i && i[jo]
  4245. }
  4246. }
  4247. function ia(t, e) {
  4248. for (var n = 0; n < t.length; n++) t[n][1] || (t[n][1] = t[n][0]);
  4249. return e = e || !1,
  4250. function (n, i, r) {
  4251. for (var o = {}, a = 0; a < t.length; a++) {
  4252. var s = t[a][1];
  4253. if (!(i && P(i, s) >= 0 || r && P(r, s) < 0)) {
  4254. var l = n.getShallow(s, e);
  4255. null != l && (o[t[a][0]] = l)
  4256. }
  4257. }
  4258. return o
  4259. }
  4260. }
  4261. var ra = ia([
  4262. ["fill", "color"],
  4263. ["shadowBlur"],
  4264. ["shadowOffsetX"],
  4265. ["shadowOffsetY"],
  4266. ["opacity"],
  4267. ["shadowColor"]
  4268. ]),
  4269. oa = function () {
  4270. function t() {}
  4271. return t.prototype.getAreaStyle = function (t, e) {
  4272. return ra(this, t, e)
  4273. }, t
  4274. }(),
  4275. aa = new En(50);
  4276. function sa(t) {
  4277. if ("string" == typeof t) {
  4278. var e = aa.get(t);
  4279. return e && e.image
  4280. }
  4281. return t
  4282. }
  4283. function la(t, e, n, i, r) {
  4284. if (t) {
  4285. if ("string" == typeof t) {
  4286. if (e && e.__zrImageSrc === t || !n) return e;
  4287. var o = aa.get(t),
  4288. a = {
  4289. hostEl: n,
  4290. cb: i,
  4291. cbPayload: r
  4292. };
  4293. return o ? !ha(e = o.image) && o.pending.push(a) : ((e = h.loadImage(t, ua, ua)).__zrImageSrc = t, aa.put(t, e.__cachedImgObj = {
  4294. image: e,
  4295. pending: [a]
  4296. })), e
  4297. }
  4298. return t
  4299. }
  4300. return e
  4301. }
  4302. function ua() {
  4303. var t = this.__cachedImgObj;
  4304. this.onload = this.onerror = this.__cachedImgObj = null;
  4305. for (var e = 0; e < t.pending.length; e++) {
  4306. var n = t.pending[e],
  4307. i = n.cb;
  4308. i && i(this, n.cbPayload), n.hostEl.dirty()
  4309. }
  4310. t.pending.length = 0
  4311. }
  4312. function ha(t) {
  4313. return t && t.width && t.height
  4314. }
  4315. var ca = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  4316. function pa(t, e, n, i, r) {
  4317. if (!e) return "";
  4318. var o = (t + "").split("\n");
  4319. r = da(e, n, i, r);
  4320. for (var a = 0, s = o.length; a < s; a++) o[a] = fa(o[a], r);
  4321. return o.join("\n")
  4322. }
  4323. function da(t, e, n, i) {
  4324. var r = A({}, i = i || {});
  4325. r.font = e, n = rt(n, "..."), r.maxIterations = rt(i.maxIterations, 2);
  4326. var o = r.minChar = rt(i.minChar, 0);
  4327. r.cnCharWidth = br("国", e);
  4328. var a = r.ascCharWidth = br("a", e);
  4329. r.placeholder = rt(i.placeholder, "");
  4330. for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= a; l++) s -= a;
  4331. var u = br(n, e);
  4332. return u > s && (n = "", u = 0), s = t - u, r.ellipsis = n, r.ellipsisWidth = u, r.contentWidth = s, r.containerWidth = t, r
  4333. }
  4334. function fa(t, e) {
  4335. var n = e.containerWidth,
  4336. i = e.font,
  4337. r = e.contentWidth;
  4338. if (!n) return "";
  4339. var o = br(t, i);
  4340. if (o <= n) return t;
  4341. for (var a = 0;; a++) {
  4342. if (o <= r || a >= e.maxIterations) {
  4343. t += e.ellipsis;
  4344. break
  4345. }
  4346. var s = 0 === a ? ga(t, r, e.ascCharWidth, e.cnCharWidth) : o > 0 ? Math.floor(t.length * r / o) : 0;
  4347. o = br(t = t.substr(0, s), i)
  4348. }
  4349. return "" === t && (t = e.placeholder), t
  4350. }
  4351. function ga(t, e, n, i) {
  4352. for (var r = 0, o = 0, a = t.length; o < a && r < e; o++) {
  4353. var s = t.charCodeAt(o);
  4354. r += 0 <= s && s <= 127 ? n : i
  4355. }
  4356. return o
  4357. }
  4358. var ya = function () {},
  4359. va = function (t) {
  4360. this.tokens = [], t && (this.tokens = t)
  4361. },
  4362. ma = function () {
  4363. this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = []
  4364. };
  4365. function xa(t, e, n, i, r) {
  4366. var o, a, s = "" === e,
  4367. l = r && n.rich[r] || {},
  4368. u = t.lines,
  4369. h = l.font || n.font,
  4370. c = !1;
  4371. if (i) {
  4372. var p = l.padding,
  4373. d = p ? p[1] + p[3] : 0;
  4374. if (null != l.width && "auto" !== l.width) {
  4375. var f = Cr(l.width, i.width) + d;
  4376. u.length > 0 && f + i.accumWidth > i.width && (o = e.split("\n"), c = !0), i.accumWidth = f
  4377. } else {
  4378. var g = wa(e, h, i.width, i.breakAll, i.accumWidth);
  4379. i.accumWidth = g.accumWidth + d, a = g.linesWidths, o = g.lines
  4380. }
  4381. } else o = e.split("\n");
  4382. for (var y = 0; y < o.length; y++) {
  4383. var v = o[y],
  4384. m = new ya;
  4385. if (m.styleName = r, m.text = v, m.isLineHolder = !v && !s, "number" == typeof l.width ? m.width = l.width : m.width = a ? a[y] : br(v, h), y || c) u.push(new va([m]));
  4386. else {
  4387. var x = (u[u.length - 1] || (u[0] = new va)).tokens,
  4388. _ = x.length;
  4389. 1 === _ && x[0].isLineHolder ? x[0] = m : (v || !_ || s) && x.push(m)
  4390. }
  4391. }
  4392. }
  4393. var _a = V(",&?/;] ".split(""), (function (t, e) {
  4394. return t[e] = !0, t
  4395. }), {});
  4396. function ba(t) {
  4397. return ! function (t) {
  4398. var e = t.charCodeAt(0);
  4399. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303
  4400. }(t) || !!_a[t]
  4401. }
  4402. function wa(t, e, n, i, r) {
  4403. for (var o = [], a = [], s = "", l = "", u = 0, h = 0, c = 0; c < t.length; c++) {
  4404. var p = t.charAt(c);
  4405. if ("\n" !== p) {
  4406. var d = br(p, e),
  4407. f = !i && !ba(p);
  4408. (o.length ? h + d > n : r + h + d > n) ? h ? (s || l) && (f ? (s || (s = l, l = "", h = u = 0), o.push(s), a.push(h - u), l += p, s = "", h = u += d) : (l && (s += l, l = "", u = 0), o.push(s), a.push(h), s = p, h = d)) : f ? (o.push(l), a.push(u), l = p, u = d) : (o.push(p), a.push(d)): (h += d, f ? (l += p, u += d) : (l && (s += l, l = "", u = 0), s += p))
  4409. } else l && (s += l, h += u), o.push(s), a.push(h), s = "", l = "", u = 0, h = 0
  4410. }
  4411. return o.length || s || (s = t, l = "", u = 0), l && (s += l), s && (o.push(s), a.push(h)), 1 === o.length && (h += r), {
  4412. accumWidth: h,
  4413. lines: o,
  4414. linesWidths: a
  4415. }
  4416. }
  4417. var Sa = "__zr_style_" + Math.round(10 * Math.random()),
  4418. Ma = {
  4419. shadowBlur: 0,
  4420. shadowOffsetX: 0,
  4421. shadowOffsetY: 0,
  4422. shadowColor: "#000",
  4423. opacity: 1,
  4424. blend: "source-over"
  4425. },
  4426. Ia = {
  4427. style: {
  4428. shadowBlur: !0,
  4429. shadowOffsetX: !0,
  4430. shadowOffsetY: !0,
  4431. shadowColor: !0,
  4432. opacity: !0
  4433. }
  4434. };
  4435. Ma[Sa] = !0;
  4436. var Ta = ["z", "z2", "invisible"],
  4437. Ca = ["invisible"],
  4438. Da = function (t) {
  4439. function e(e) {
  4440. return t.call(this, e) || this
  4441. }
  4442. var i;
  4443. return n(e, t), e.prototype._init = function (e) {
  4444. for (var n = G(e), i = 0; i < n.length; i++) {
  4445. var r = n[i];
  4446. "style" === r ? this.useStyle(e[r]) : t.prototype.attrKV.call(this, r, e[r])
  4447. }
  4448. this.style || this.useStyle({})
  4449. }, e.prototype.beforeBrush = function () {}, e.prototype.afterBrush = function () {}, e.prototype.innerBeforeBrush = function () {}, e.prototype.innerAfterBrush = function () {}, e.prototype.shouldBePainted = function (t, e, n, i) {
  4450. var r = this.transform;
  4451. if (this.ignore || this.invisible || 0 === this.style.opacity || this.culling && function (t, e, n) {
  4452. Aa.copy(t.getBoundingRect()), t.transform && Aa.applyTransform(t.transform);
  4453. return ka.width = e, ka.height = n, !Aa.intersect(ka)
  4454. }(this, t, e) || r && !r[0] && !r[3]) return !1;
  4455. if (n && this.__clipPaths)
  4456. for (var o = 0; o < this.__clipPaths.length; ++o)
  4457. if (this.__clipPaths[o].isZeroArea()) return !1;
  4458. if (i && this.parent)
  4459. for (var a = this.parent; a;) {
  4460. if (a.ignore) return !1;
  4461. a = a.parent
  4462. }
  4463. return !0
  4464. }, e.prototype.contain = function (t, e) {
  4465. return this.rectContain(t, e)
  4466. }, e.prototype.traverse = function (t, e) {
  4467. t.call(e, this)
  4468. }, e.prototype.rectContain = function (t, e) {
  4469. var n = this.transformCoordToLocal(t, e);
  4470. return this.getBoundingRect().contain(n[0], n[1])
  4471. }, e.prototype.getPaintRect = function () {
  4472. var t = this._paintRect;
  4473. if (!this._paintRect || this.__dirty) {
  4474. var e = this.transform,
  4475. n = this.getBoundingRect(),
  4476. i = this.style,
  4477. r = i.shadowBlur || 0,
  4478. o = i.shadowOffsetX || 0,
  4479. a = i.shadowOffsetY || 0;
  4480. t = this._paintRect || (this._paintRect = new ze(0, 0, 0, 0)), e ? ze.applyTransform(t, n, e) : t.copy(n), (r || o || a) && (t.width += 2 * r + Math.abs(o), t.height += 2 * r + Math.abs(a), t.x = Math.min(t.x, t.x + o - r), t.y = Math.min(t.y, t.y + a - r));
  4481. var s = this.dirtyRectTolerance;
  4482. t.isZero() || (t.x = Math.floor(t.x - s), t.y = Math.floor(t.y - s), t.width = Math.ceil(t.width + 1 + 2 * s), t.height = Math.ceil(t.height + 1 + 2 * s))
  4483. }
  4484. return t
  4485. }, e.prototype.setPrevPaintRect = function (t) {
  4486. t ? (this._prevPaintRect = this._prevPaintRect || new ze(0, 0, 0, 0), this._prevPaintRect.copy(t)) : this._prevPaintRect = null
  4487. }, e.prototype.getPrevPaintRect = function () {
  4488. return this._prevPaintRect
  4489. }, e.prototype.animateStyle = function (t) {
  4490. return this.animate("style", t)
  4491. }, e.prototype.updateDuringAnimation = function (t) {
  4492. "style" === t ? this.dirtyStyle() : this.markRedraw()
  4493. }, e.prototype.attrKV = function (e, n) {
  4494. "style" !== e ? t.prototype.attrKV.call(this, e, n) : this.style ? this.setStyle(n) : this.useStyle(n)
  4495. }, e.prototype.setStyle = function (t, e) {
  4496. return "string" == typeof t ? this.style[t] = e : A(this.style, t), this.dirtyStyle(), this
  4497. }, e.prototype.dirtyStyle = function (t) {
  4498. t || this.markRedraw(), this.__dirty |= 2, this._rect && (this._rect = null)
  4499. }, e.prototype.dirty = function () {
  4500. this.dirtyStyle()
  4501. }, e.prototype.styleChanged = function () {
  4502. return !!(2 & this.__dirty)
  4503. }, e.prototype.styleUpdated = function () {
  4504. this.__dirty &= -3
  4505. }, e.prototype.createStyle = function (t) {
  4506. return mt(Ma, t)
  4507. }, e.prototype.useStyle = function (t) {
  4508. t[Sa] || (t = this.createStyle(t)), this.__inHover ? this.__hoverStyle = t : this.style = t, this.dirtyStyle()
  4509. }, e.prototype.isStyleObject = function (t) {
  4510. return t[Sa]
  4511. }, e.prototype._innerSaveToNormal = function (e) {
  4512. t.prototype._innerSaveToNormal.call(this, e);
  4513. var n = this._normalState;
  4514. e.style && !n.style && (n.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(e, n, Ta)
  4515. }, e.prototype._applyStateObj = function (e, n, i, r, o, a) {
  4516. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  4517. var s, l = !(n && r);
  4518. if (n && n.style ? o ? r ? s = n.style : (s = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(s, n.style)) : (s = this._mergeStyle(this.createStyle(), r ? this.style : i.style), this._mergeStyle(s, n.style)) : l && (s = i.style), s)
  4519. if (o) {
  4520. var u = this.style;
  4521. if (this.style = this.createStyle(l ? {} : u), l)
  4522. for (var h = G(u), c = 0; c < h.length; c++) {
  4523. (d = h[c]) in s && (s[d] = s[d], this.style[d] = u[d])
  4524. }
  4525. var p = G(s);
  4526. for (c = 0; c < p.length; c++) {
  4527. var d = p[c];
  4528. this.style[d] = this.style[d]
  4529. }
  4530. this._transitionState(e, {
  4531. style: s
  4532. }, a, this.getAnimationStyleProps())
  4533. } else this.useStyle(s);
  4534. var f = this.__inHover ? Ca : Ta;
  4535. for (c = 0; c < f.length; c++) {
  4536. d = f[c];
  4537. n && null != n[d] ? this[d] = n[d] : l && null != i[d] && (this[d] = i[d])
  4538. }
  4539. }, e.prototype._mergeStates = function (e) {
  4540. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  4541. var o = e[r];
  4542. o.style && (n = n || {}, this._mergeStyle(n, o.style))
  4543. }
  4544. return n && (i.style = n), i
  4545. }, e.prototype._mergeStyle = function (t, e) {
  4546. return A(t, e), t
  4547. }, e.prototype.getAnimationStyleProps = function () {
  4548. return Ia
  4549. }, e.initDefaultProps = ((i = e.prototype).type = "displayable", i.invisible = !1, i.z = 0, i.z2 = 0, i.zlevel = 0, i.culling = !1, i.cursor = "pointer", i.rectHover = !1, i.incremental = !1, i._rect = null, i.dirtyRectTolerance = 0, void(i.__dirty = 3)), e
  4550. }(Rr),
  4551. Aa = new ze(0, 0, 0, 0),
  4552. ka = new ze(0, 0, 0, 0);
  4553. var La = Math.min,
  4554. Pa = Math.max,
  4555. Oa = Math.sin,
  4556. Ra = Math.cos,
  4557. Na = 2 * Math.PI,
  4558. Ea = Mt(),
  4559. za = Mt(),
  4560. Va = Mt();
  4561. function Ba(t, e, n) {
  4562. if (0 !== t.length) {
  4563. for (var i = t[0], r = i[0], o = i[0], a = i[1], s = i[1], l = 1; l < t.length; l++) i = t[l], r = La(r, i[0]), o = Pa(o, i[0]), a = La(a, i[1]), s = Pa(s, i[1]);
  4564. e[0] = r, e[1] = a, n[0] = o, n[1] = s
  4565. }
  4566. }
  4567. function Fa(t, e, n, i, r, o) {
  4568. r[0] = La(t, n), r[1] = La(e, i), o[0] = Pa(t, n), o[1] = Pa(e, i)
  4569. }
  4570. var Ga = [],
  4571. Wa = [];
  4572. function Ha(t, e, n, i, r, o, a, s, l, u) {
  4573. var h = bn,
  4574. c = mn,
  4575. p = h(t, n, r, a, Ga);
  4576. l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  4577. for (var d = 0; d < p; d++) {
  4578. var f = c(t, n, r, a, Ga[d]);
  4579. l[0] = La(f, l[0]), u[0] = Pa(f, u[0])
  4580. }
  4581. p = h(e, i, o, s, Wa);
  4582. for (d = 0; d < p; d++) {
  4583. var g = c(e, i, o, s, Wa[d]);
  4584. l[1] = La(g, l[1]), u[1] = Pa(g, u[1])
  4585. }
  4586. l[0] = La(t, l[0]), u[0] = Pa(t, u[0]), l[0] = La(a, l[0]), u[0] = Pa(a, u[0]), l[1] = La(e, l[1]), u[1] = Pa(e, u[1]), l[1] = La(s, l[1]), u[1] = Pa(s, u[1])
  4587. }
  4588. function Ya(t, e, n, i, r, o, a, s) {
  4589. var l = Cn,
  4590. u = In,
  4591. h = Pa(La(l(t, n, r), 1), 0),
  4592. c = Pa(La(l(e, i, o), 1), 0),
  4593. p = u(t, n, r, h),
  4594. d = u(e, i, o, c);
  4595. a[0] = La(t, r, p), a[1] = La(e, o, d), s[0] = Pa(t, r, p), s[1] = Pa(e, o, d)
  4596. }
  4597. function Xa(t, e, n, i, r, o, a, s, l) {
  4598. var u = Ht,
  4599. h = Yt,
  4600. c = Math.abs(r - o);
  4601. if (c % Na < 1e-4 && c > 1e-4) return s[0] = t - n, s[1] = e - i, l[0] = t + n, void(l[1] = e + i);
  4602. if (Ea[0] = Ra(r) * n + t, Ea[1] = Oa(r) * i + e, za[0] = Ra(o) * n + t, za[1] = Oa(o) * i + e, u(s, Ea, za), h(l, Ea, za), (r %= Na) < 0 && (r += Na), (o %= Na) < 0 && (o += Na), r > o && !a ? o += Na : r < o && a && (r += Na), a) {
  4603. var p = o;
  4604. o = r, r = p
  4605. }
  4606. for (var d = 0; d < o; d += Math.PI / 2) d > r && (Va[0] = Ra(d) * n + t, Va[1] = Oa(d) * i + e, u(s, Va, s), h(l, Va, l))
  4607. }
  4608. var Ua = {
  4609. M: 1,
  4610. L: 2,
  4611. C: 3,
  4612. Q: 4,
  4613. A: 5,
  4614. Z: 6,
  4615. R: 7
  4616. },
  4617. Za = [],
  4618. ja = [],
  4619. qa = [],
  4620. Ka = [],
  4621. $a = [],
  4622. Ja = [],
  4623. Qa = Math.min,
  4624. ts = Math.max,
  4625. es = Math.cos,
  4626. ns = Math.sin,
  4627. is = Math.abs,
  4628. rs = Math.PI,
  4629. os = 2 * rs,
  4630. as = "undefined" != typeof Float32Array,
  4631. ss = [];
  4632. function ls(t) {
  4633. return Math.round(t / rs * 1e8) / 1e8 % 2 * rs
  4634. }
  4635. function us(t, e) {
  4636. var n = ls(t[0]);
  4637. n < 0 && (n += os);
  4638. var i = n - t[0],
  4639. r = t[1];
  4640. r += i, !e && r - n >= os ? r = n + os : e && n - r >= os ? r = n - os : !e && n > r ? r = n + (os - ls(n - r)) : e && n < r && (r = n - (os - ls(r - n))), t[0] = n, t[1] = r
  4641. }
  4642. var hs = function () {
  4643. function t(t) {
  4644. this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, t && (this._saveData = !1), this._saveData && (this.data = [])
  4645. }
  4646. return t.prototype.increaseVersion = function () {
  4647. this._version++
  4648. }, t.prototype.getVersion = function () {
  4649. return this._version
  4650. }, t.prototype.setScale = function (t, e, n) {
  4651. (n = n || 0) > 0 && (this._ux = is(n / sr / t) || 0, this._uy = is(n / sr / e) || 0)
  4652. }, t.prototype.setDPR = function (t) {
  4653. this.dpr = t
  4654. }, t.prototype.setContext = function (t) {
  4655. this._ctx = t
  4656. }, t.prototype.getContext = function () {
  4657. return this._ctx
  4658. }, t.prototype.beginPath = function () {
  4659. return this._ctx && this._ctx.beginPath(), this.reset(), this
  4660. }, t.prototype.reset = function () {
  4661. this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++
  4662. }, t.prototype.moveTo = function (t, e) {
  4663. return this._drawPendingPt(), this.addData(Ua.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this
  4664. }, t.prototype.lineTo = function (t, e) {
  4665. var n = is(t - this._xi),
  4666. i = is(e - this._yi),
  4667. r = n > this._ux || i > this._uy;
  4668. if (this.addData(Ua.L, t, e), this._ctx && r && this._ctx.lineTo(t, e), r) this._xi = t, this._yi = e, this._pendingPtDist = 0;
  4669. else {
  4670. var o = n * n + i * i;
  4671. o > this._pendingPtDist && (this._pendingPtX = t, this._pendingPtY = e, this._pendingPtDist = o)
  4672. }
  4673. return this
  4674. }, t.prototype.bezierCurveTo = function (t, e, n, i, r, o) {
  4675. return this._drawPendingPt(), this.addData(Ua.C, t, e, n, i, r, o), this._ctx && this._ctx.bezierCurveTo(t, e, n, i, r, o), this._xi = r, this._yi = o, this
  4676. }, t.prototype.quadraticCurveTo = function (t, e, n, i) {
  4677. return this._drawPendingPt(), this.addData(Ua.Q, t, e, n, i), this._ctx && this._ctx.quadraticCurveTo(t, e, n, i), this._xi = n, this._yi = i, this
  4678. }, t.prototype.arc = function (t, e, n, i, r, o) {
  4679. this._drawPendingPt(), ss[0] = i, ss[1] = r, us(ss, o), i = ss[0];
  4680. var a = (r = ss[1]) - i;
  4681. return this.addData(Ua.A, t, e, n, n, i, a, 0, o ? 0 : 1), this._ctx && this._ctx.arc(t, e, n, i, r, o), this._xi = es(r) * n + t, this._yi = ns(r) * n + e, this
  4682. }, t.prototype.arcTo = function (t, e, n, i, r) {
  4683. return this._drawPendingPt(), this._ctx && this._ctx.arcTo(t, e, n, i, r), this
  4684. }, t.prototype.rect = function (t, e, n, i) {
  4685. return this._drawPendingPt(), this._ctx && this._ctx.rect(t, e, n, i), this.addData(Ua.R, t, e, n, i), this
  4686. }, t.prototype.closePath = function () {
  4687. this._drawPendingPt(), this.addData(Ua.Z);
  4688. var t = this._ctx,
  4689. e = this._x0,
  4690. n = this._y0;
  4691. return t && t.closePath(), this._xi = e, this._yi = n, this
  4692. }, t.prototype.fill = function (t) {
  4693. t && t.fill(), this.toStatic()
  4694. }, t.prototype.stroke = function (t) {
  4695. t && t.stroke(), this.toStatic()
  4696. }, t.prototype.len = function () {
  4697. return this._len
  4698. }, t.prototype.setData = function (t) {
  4699. var e = t.length;
  4700. this.data && this.data.length === e || !as || (this.data = new Float32Array(e));
  4701. for (var n = 0; n < e; n++) this.data[n] = t[n];
  4702. this._len = e
  4703. }, t.prototype.appendPath = function (t) {
  4704. t instanceof Array || (t = [t]);
  4705. for (var e = t.length, n = 0, i = this._len, r = 0; r < e; r++) n += t[r].len();
  4706. as && this.data instanceof Float32Array && (this.data = new Float32Array(i + n));
  4707. for (r = 0; r < e; r++)
  4708. for (var o = t[r].data, a = 0; a < o.length; a++) this.data[i++] = o[a];
  4709. this._len = i
  4710. }, t.prototype.addData = function (t, e, n, i, r, o, a, s, l) {
  4711. if (this._saveData) {
  4712. var u = this.data;
  4713. this._len + arguments.length > u.length && (this._expandData(), u = this.data);
  4714. for (var h = 0; h < arguments.length; h++) u[this._len++] = arguments[h]
  4715. }
  4716. }, t.prototype._drawPendingPt = function () {
  4717. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0)
  4718. }, t.prototype._expandData = function () {
  4719. if (!(this.data instanceof Array)) {
  4720. for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
  4721. this.data = t
  4722. }
  4723. }, t.prototype.toStatic = function () {
  4724. if (this._saveData) {
  4725. this._drawPendingPt();
  4726. var t = this.data;
  4727. t instanceof Array && (t.length = this._len, as && this._len > 11 && (this.data = new Float32Array(t)))
  4728. }
  4729. }, t.prototype.getBoundingRect = function () {
  4730. qa[0] = qa[1] = $a[0] = $a[1] = Number.MAX_VALUE, Ka[0] = Ka[1] = Ja[0] = Ja[1] = -Number.MAX_VALUE;
  4731. var t, e = this.data,
  4732. n = 0,
  4733. i = 0,
  4734. r = 0,
  4735. o = 0;
  4736. for (t = 0; t < this._len;) {
  4737. var a = e[t++],
  4738. s = 1 === t;
  4739. switch (s && (r = n = e[t], o = i = e[t + 1]), a) {
  4740. case Ua.M:
  4741. n = r = e[t++], i = o = e[t++], $a[0] = r, $a[1] = o, Ja[0] = r, Ja[1] = o;
  4742. break;
  4743. case Ua.L:
  4744. Fa(n, i, e[t], e[t + 1], $a, Ja), n = e[t++], i = e[t++];
  4745. break;
  4746. case Ua.C:
  4747. Ha(n, i, e[t++], e[t++], e[t++], e[t++], e[t], e[t + 1], $a, Ja), n = e[t++], i = e[t++];
  4748. break;
  4749. case Ua.Q:
  4750. Ya(n, i, e[t++], e[t++], e[t], e[t + 1], $a, Ja), n = e[t++], i = e[t++];
  4751. break;
  4752. case Ua.A:
  4753. var l = e[t++],
  4754. u = e[t++],
  4755. h = e[t++],
  4756. c = e[t++],
  4757. p = e[t++],
  4758. d = e[t++] + p;
  4759. t += 1;
  4760. var f = !e[t++];
  4761. s && (r = es(p) * h + l, o = ns(p) * c + u), Xa(l, u, h, c, p, d, f, $a, Ja), n = es(d) * h + l, i = ns(d) * c + u;
  4762. break;
  4763. case Ua.R:
  4764. Fa(r = n = e[t++], o = i = e[t++], r + e[t++], o + e[t++], $a, Ja);
  4765. break;
  4766. case Ua.Z:
  4767. n = r, i = o
  4768. }
  4769. Ht(qa, qa, $a), Yt(Ka, Ka, Ja)
  4770. }
  4771. return 0 === t && (qa[0] = qa[1] = Ka[0] = Ka[1] = 0), new ze(qa[0], qa[1], Ka[0] - qa[0], Ka[1] - qa[1])
  4772. }, t.prototype._calculateLength = function () {
  4773. var t = this.data,
  4774. e = this._len,
  4775. n = this._ux,
  4776. i = this._uy,
  4777. r = 0,
  4778. o = 0,
  4779. a = 0,
  4780. s = 0;
  4781. this._pathSegLen || (this._pathSegLen = []);
  4782. for (var l = this._pathSegLen, u = 0, h = 0, c = 0; c < e;) {
  4783. var p = t[c++],
  4784. d = 1 === c;
  4785. d && (a = r = t[c], s = o = t[c + 1]);
  4786. var f = -1;
  4787. switch (p) {
  4788. case Ua.M:
  4789. r = a = t[c++], o = s = t[c++];
  4790. break;
  4791. case Ua.L:
  4792. var g = t[c++],
  4793. y = (x = t[c++]) - o;
  4794. (is(A = g - r) > n || is(y) > i || c === e - 1) && (f = Math.sqrt(A * A + y * y), r = g, o = x);
  4795. break;
  4796. case Ua.C:
  4797. var v = t[c++],
  4798. m = t[c++],
  4799. x = (g = t[c++], t[c++]),
  4800. _ = t[c++],
  4801. b = t[c++];
  4802. f = Mn(r, o, v, m, g, x, _, b, 10), r = _, o = b;
  4803. break;
  4804. case Ua.Q:
  4805. f = kn(r, o, v = t[c++], m = t[c++], g = t[c++], x = t[c++], 10), r = g, o = x;
  4806. break;
  4807. case Ua.A:
  4808. var w = t[c++],
  4809. S = t[c++],
  4810. M = t[c++],
  4811. I = t[c++],
  4812. T = t[c++],
  4813. C = t[c++],
  4814. D = C + T;
  4815. c += 1, d && (a = es(T) * M + w, s = ns(T) * I + S), f = ts(M, I) * Qa(os, Math.abs(C)), r = es(D) * M + w, o = ns(D) * I + S;
  4816. break;
  4817. case Ua.R:
  4818. a = r = t[c++], s = o = t[c++], f = 2 * t[c++] + 2 * t[c++];
  4819. break;
  4820. case Ua.Z:
  4821. var A = a - r;
  4822. y = s - o;
  4823. f = Math.sqrt(A * A + y * y), r = a, o = s
  4824. }
  4825. f >= 0 && (l[h++] = f, u += f)
  4826. }
  4827. return this._pathLen = u, u
  4828. }, t.prototype.rebuildPath = function (t, e) {
  4829. var n, i, r, o, a, s, l, u, h, c, p = this.data,
  4830. d = this._ux,
  4831. f = this._uy,
  4832. g = this._len,
  4833. y = e < 1,
  4834. v = 0,
  4835. m = 0,
  4836. x = 0;
  4837. if (!y || (this._pathSegLen || this._calculateLength(), l = this._pathSegLen, u = e * this._pathLen)) t: for (var _ = 0; _ < g;) {
  4838. var b = p[_++],
  4839. w = 1 === _;
  4840. switch (w && (n = r = p[_], i = o = p[_ + 1]), b !== Ua.L && x > 0 && (t.lineTo(h, c), x = 0), b) {
  4841. case Ua.M:
  4842. n = r = p[_++], i = o = p[_++], t.moveTo(r, o);
  4843. break;
  4844. case Ua.L:
  4845. a = p[_++], s = p[_++];
  4846. var S = is(a - r),
  4847. M = is(s - o);
  4848. if (S > d || M > f) {
  4849. if (y) {
  4850. if (v + (j = l[m++]) > u) {
  4851. var I = (u - v) / j;
  4852. t.lineTo(r * (1 - I) + a * I, o * (1 - I) + s * I);
  4853. break t
  4854. }
  4855. v += j
  4856. }
  4857. t.lineTo(a, s), r = a, o = s, x = 0
  4858. } else {
  4859. var T = S * S + M * M;
  4860. T > x && (h = a, c = s, x = T)
  4861. }
  4862. break;
  4863. case Ua.C:
  4864. var C = p[_++],
  4865. D = p[_++],
  4866. A = p[_++],
  4867. k = p[_++],
  4868. L = p[_++],
  4869. P = p[_++];
  4870. if (y) {
  4871. if (v + (j = l[m++]) > u) {
  4872. wn(r, C, A, L, I = (u - v) / j, Za), wn(o, D, k, P, I, ja), t.bezierCurveTo(Za[1], ja[1], Za[2], ja[2], Za[3], ja[3]);
  4873. break t
  4874. }
  4875. v += j
  4876. }
  4877. t.bezierCurveTo(C, D, A, k, L, P), r = L, o = P;
  4878. break;
  4879. case Ua.Q:
  4880. C = p[_++], D = p[_++], A = p[_++], k = p[_++];
  4881. if (y) {
  4882. if (v + (j = l[m++]) > u) {
  4883. Dn(r, C, A, I = (u - v) / j, Za), Dn(o, D, k, I, ja), t.quadraticCurveTo(Za[1], ja[1], Za[2], ja[2]);
  4884. break t
  4885. }
  4886. v += j
  4887. }
  4888. t.quadraticCurveTo(C, D, A, k), r = A, o = k;
  4889. break;
  4890. case Ua.A:
  4891. var O = p[_++],
  4892. R = p[_++],
  4893. N = p[_++],
  4894. E = p[_++],
  4895. z = p[_++],
  4896. V = p[_++],
  4897. B = p[_++],
  4898. F = !p[_++],
  4899. G = N > E ? N : E,
  4900. W = is(N - E) > .001,
  4901. H = z + V,
  4902. Y = !1;
  4903. if (y) v + (j = l[m++]) > u && (H = z + V * (u - v) / j, Y = !0), v += j;
  4904. if (W && t.ellipse ? t.ellipse(O, R, N, E, B, z, H, F) : t.arc(O, R, G, z, H, F), Y) break t;
  4905. w && (n = es(z) * N + O, i = ns(z) * E + R), r = es(H) * N + O, o = ns(H) * E + R;
  4906. break;
  4907. case Ua.R:
  4908. n = r = p[_], i = o = p[_ + 1], a = p[_++], s = p[_++];
  4909. var X = p[_++],
  4910. U = p[_++];
  4911. if (y) {
  4912. if (v + (j = l[m++]) > u) {
  4913. var Z = u - v;
  4914. t.moveTo(a, s), t.lineTo(a + Qa(Z, X), s), (Z -= X) > 0 && t.lineTo(a + X, s + Qa(Z, U)), (Z -= U) > 0 && t.lineTo(a + ts(X - Z, 0), s + U), (Z -= X) > 0 && t.lineTo(a, s + ts(U - Z, 0));
  4915. break t
  4916. }
  4917. v += j
  4918. }
  4919. t.rect(a, s, X, U);
  4920. break;
  4921. case Ua.Z:
  4922. if (y) {
  4923. var j;
  4924. if (v + (j = l[m++]) > u) {
  4925. I = (u - v) / j;
  4926. t.lineTo(r * (1 - I) + n * I, o * (1 - I) + i * I);
  4927. break t
  4928. }
  4929. v += j
  4930. }
  4931. t.closePath(), r = n, o = i
  4932. }
  4933. }
  4934. }, t.prototype.clone = function () {
  4935. var e = new t,
  4936. n = this.data;
  4937. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e
  4938. }, t.CMD = Ua, t.initDefaultProps = function () {
  4939. var e = t.prototype;
  4940. e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0
  4941. }(), t
  4942. }();
  4943. function cs(t, e, n, i, r, o, a) {
  4944. if (0 === r) return !1;
  4945. var s = r,
  4946. l = 0;
  4947. if (a > e + s && a > i + s || a < e - s && a < i - s || o > t + s && o > n + s || o < t - s && o < n - s) return !1;
  4948. if (t === n) return Math.abs(o - t) <= s / 2;
  4949. var u = (l = (e - i) / (t - n)) * o - a + (t * i - n * e) / (t - n);
  4950. return u * u / (l * l + 1) <= s / 2 * s / 2
  4951. }
  4952. function ps(t, e, n, i, r, o, a, s, l, u, h) {
  4953. if (0 === l) return !1;
  4954. var c = l;
  4955. return !(h > e + c && h > i + c && h > o + c && h > s + c || h < e - c && h < i - c && h < o - c && h < s - c || u > t + c && u > n + c && u > r + c && u > a + c || u < t - c && u < n - c && u < r - c && u < a - c) && Sn(t, e, n, i, r, o, a, s, u, h, null) <= c / 2
  4956. }
  4957. function ds(t, e, n, i, r, o, a, s, l) {
  4958. if (0 === a) return !1;
  4959. var u = a;
  4960. return !(l > e + u && l > i + u && l > o + u || l < e - u && l < i - u && l < o - u || s > t + u && s > n + u && s > r + u || s < t - u && s < n - u && s < r - u) && An(t, e, n, i, r, o, s, l, null) <= u / 2
  4961. }
  4962. var fs = 2 * Math.PI;
  4963. function gs(t) {
  4964. return (t %= fs) < 0 && (t += fs), t
  4965. }
  4966. var ys = 2 * Math.PI;
  4967. function vs(t, e, n, i, r, o, a, s, l) {
  4968. if (0 === a) return !1;
  4969. var u = a;
  4970. s -= t, l -= e;
  4971. var h = Math.sqrt(s * s + l * l);
  4972. if (h - u > n || h + u < n) return !1;
  4973. if (Math.abs(i - r) % ys < 1e-4) return !0;
  4974. if (o) {
  4975. var c = i;
  4976. i = gs(r), r = gs(c)
  4977. } else i = gs(i), r = gs(r);
  4978. i > r && (r += ys);
  4979. var p = Math.atan2(l, s);
  4980. return p < 0 && (p += ys), p >= i && p <= r || p + ys >= i && p + ys <= r
  4981. }
  4982. function ms(t, e, n, i, r, o) {
  4983. if (o > e && o > i || o < e && o < i) return 0;
  4984. if (i === e) return 0;
  4985. var a = (o - e) / (i - e),
  4986. s = i < e ? 1 : -1;
  4987. 1 !== a && 0 !== a || (s = i < e ? .5 : -.5);
  4988. var l = a * (n - t) + t;
  4989. return l === r ? 1 / 0 : l > r ? s : 0
  4990. }
  4991. var xs = hs.CMD,
  4992. _s = 2 * Math.PI;
  4993. var bs = [-1, -1, -1],
  4994. ws = [-1, -1];
  4995. function Ss(t, e, n, i, r, o, a, s, l, u) {
  4996. if (u > e && u > i && u > o && u > s || u < e && u < i && u < o && u < s) return 0;
  4997. var h, c = _n(e, i, o, s, u, bs);
  4998. if (0 === c) return 0;
  4999. for (var p = 0, d = -1, f = void 0, g = void 0, y = 0; y < c; y++) {
  5000. var v = bs[y],
  5001. m = 0 === v || 1 === v ? .5 : 1;
  5002. mn(t, n, r, a, v) < l || (d < 0 && (d = bn(e, i, o, s, ws), ws[1] < ws[0] && d > 1 && (h = void 0, h = ws[0], ws[0] = ws[1], ws[1] = h), f = mn(e, i, o, s, ws[0]), d > 1 && (g = mn(e, i, o, s, ws[1]))), 2 === d ? v < ws[0] ? p += f < e ? m : -m : v < ws[1] ? p += g < f ? m : -m : p += s < g ? m : -m : v < ws[0] ? p += f < e ? m : -m : p += s < f ? m : -m)
  5003. }
  5004. return p
  5005. }
  5006. function Ms(t, e, n, i, r, o, a, s) {
  5007. if (s > e && s > i && s > o || s < e && s < i && s < o) return 0;
  5008. var l = function (t, e, n, i, r) {
  5009. var o = t - 2 * e + n,
  5010. a = 2 * (e - t),
  5011. s = t - i,
  5012. l = 0;
  5013. if (yn(o)) vn(a) && (h = -s / a) >= 0 && h <= 1 && (r[l++] = h);
  5014. else {
  5015. var u = a * a - 4 * o * s;
  5016. if (yn(u))(h = -a / (2 * o)) >= 0 && h <= 1 && (r[l++] = h);
  5017. else if (u > 0) {
  5018. var h, c = ln(u),
  5019. p = (-a - c) / (2 * o);
  5020. (h = (-a + c) / (2 * o)) >= 0 && h <= 1 && (r[l++] = h), p >= 0 && p <= 1 && (r[l++] = p)
  5021. }
  5022. }
  5023. return l
  5024. }(e, i, o, s, bs);
  5025. if (0 === l) return 0;
  5026. var u = Cn(e, i, o);
  5027. if (u >= 0 && u <= 1) {
  5028. for (var h = 0, c = In(e, i, o, u), p = 0; p < l; p++) {
  5029. var d = 0 === bs[p] || 1 === bs[p] ? .5 : 1;
  5030. In(t, n, r, bs[p]) < a || (bs[p] < u ? h += c < e ? d : -d : h += o < c ? d : -d)
  5031. }
  5032. return h
  5033. }
  5034. d = 0 === bs[0] || 1 === bs[0] ? .5 : 1;
  5035. return In(t, n, r, bs[0]) < a ? 0 : o < e ? d : -d
  5036. }
  5037. function Is(t, e, n, i, r, o, a, s) {
  5038. if ((s -= e) > n || s < -n) return 0;
  5039. var l = Math.sqrt(n * n - s * s);
  5040. bs[0] = -l, bs[1] = l;
  5041. var u = Math.abs(i - r);
  5042. if (u < 1e-4) return 0;
  5043. if (u >= _s - 1e-4) {
  5044. i = 0, r = _s;
  5045. var h = o ? 1 : -1;
  5046. return a >= bs[0] + t && a <= bs[1] + t ? h : 0
  5047. }
  5048. if (i > r) {
  5049. var c = i;
  5050. i = r, r = c
  5051. }
  5052. i < 0 && (i += _s, r += _s);
  5053. for (var p = 0, d = 0; d < 2; d++) {
  5054. var f = bs[d];
  5055. if (f + t > a) {
  5056. var g = Math.atan2(s, f);
  5057. h = o ? 1 : -1;
  5058. g < 0 && (g = _s + g), (g >= i && g <= r || g + _s >= i && g + _s <= r) && (g > Math.PI / 2 && g < 1.5 * Math.PI && (h = -h), p += h)
  5059. }
  5060. }
  5061. return p
  5062. }
  5063. function Ts(t, e, n, i, r) {
  5064. for (var o, a, s, l, u = t.data, h = t.len(), c = 0, p = 0, d = 0, f = 0, g = 0, y = 0; y < h;) {
  5065. var v = u[y++],
  5066. m = 1 === y;
  5067. switch (v === xs.M && y > 1 && (n || (c += ms(p, d, f, g, i, r))), m && (f = p = u[y], g = d = u[y + 1]), v) {
  5068. case xs.M:
  5069. p = f = u[y++], d = g = u[y++];
  5070. break;
  5071. case xs.L:
  5072. if (n) {
  5073. if (cs(p, d, u[y], u[y + 1], e, i, r)) return !0
  5074. } else c += ms(p, d, u[y], u[y + 1], i, r) || 0;
  5075. p = u[y++], d = u[y++];
  5076. break;
  5077. case xs.C:
  5078. if (n) {
  5079. if (ps(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], e, i, r)) return !0
  5080. } else c += Ss(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  5081. p = u[y++], d = u[y++];
  5082. break;
  5083. case xs.Q:
  5084. if (n) {
  5085. if (ds(p, d, u[y++], u[y++], u[y], u[y + 1], e, i, r)) return !0
  5086. } else c += Ms(p, d, u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  5087. p = u[y++], d = u[y++];
  5088. break;
  5089. case xs.A:
  5090. var x = u[y++],
  5091. _ = u[y++],
  5092. b = u[y++],
  5093. w = u[y++],
  5094. S = u[y++],
  5095. M = u[y++];
  5096. y += 1;
  5097. var I = !!(1 - u[y++]);
  5098. o = Math.cos(S) * b + x, a = Math.sin(S) * w + _, m ? (f = o, g = a) : c += ms(p, d, o, a, i, r);
  5099. var T = (i - x) * w / b + x;
  5100. if (n) {
  5101. if (vs(x, _, w, S, S + M, I, e, T, r)) return !0
  5102. } else c += Is(x, _, w, S, S + M, I, T, r);
  5103. p = Math.cos(S + M) * b + x, d = Math.sin(S + M) * w + _;
  5104. break;
  5105. case xs.R:
  5106. if (f = p = u[y++], g = d = u[y++], o = f + u[y++], a = g + u[y++], n) {
  5107. if (cs(f, g, o, g, e, i, r) || cs(o, g, o, a, e, i, r) || cs(o, a, f, a, e, i, r) || cs(f, a, f, g, e, i, r)) return !0
  5108. } else c += ms(o, g, o, a, i, r), c += ms(f, a, f, g, i, r);
  5109. break;
  5110. case xs.Z:
  5111. if (n) {
  5112. if (cs(p, d, f, g, e, i, r)) return !0
  5113. } else c += ms(p, d, f, g, i, r);
  5114. p = f, d = g
  5115. }
  5116. }
  5117. return n || (s = d, l = g, Math.abs(s - l) < 1e-4) || (c += ms(p, d, f, g, i, r) || 0), 0 !== c
  5118. }
  5119. var Cs = k({
  5120. fill: "#000",
  5121. stroke: null,
  5122. strokePercent: 1,
  5123. fillOpacity: 1,
  5124. strokeOpacity: 1,
  5125. lineDashOffset: 0,
  5126. lineWidth: 1,
  5127. lineCap: "butt",
  5128. miterLimit: 10,
  5129. strokeNoScale: !1,
  5130. strokeFirst: !1
  5131. }, Ma),
  5132. Ds = {
  5133. style: k({
  5134. fill: !0,
  5135. stroke: !0,
  5136. strokePercent: !0,
  5137. fillOpacity: !0,
  5138. strokeOpacity: !0,
  5139. lineDashOffset: !0,
  5140. lineWidth: !0,
  5141. miterLimit: !0
  5142. }, Ia.style)
  5143. },
  5144. As = mr.concat(["invisible", "culling", "z", "z2", "zlevel", "parent"]),
  5145. ks = function (t) {
  5146. function e(e) {
  5147. return t.call(this, e) || this
  5148. }
  5149. var i;
  5150. return n(e, t), e.prototype.update = function () {
  5151. var n = this;
  5152. t.prototype.update.call(this);
  5153. var i = this.style;
  5154. if (i.decal) {
  5155. var r = this._decalEl = this._decalEl || new e;
  5156. r.buildPath === e.prototype.buildPath && (r.buildPath = function (t) {
  5157. n.buildPath(t, n.shape)
  5158. }), r.silent = !0;
  5159. var o = r.style;
  5160. for (var a in i) o[a] !== i[a] && (o[a] = i[a]);
  5161. o.fill = i.fill ? i.decal : null, o.decal = null, o.shadowColor = null, i.strokeFirst && (o.stroke = null);
  5162. for (var s = 0; s < As.length; ++s) r[As[s]] = this[As[s]];
  5163. r.__dirty |= 1
  5164. } else this._decalEl && (this._decalEl = null)
  5165. }, e.prototype.getDecalElement = function () {
  5166. return this._decalEl
  5167. }, e.prototype._init = function (e) {
  5168. var n = G(e);
  5169. this.shape = this.getDefaultShape();
  5170. var i = this.getDefaultStyle();
  5171. i && this.useStyle(i);
  5172. for (var r = 0; r < n.length; r++) {
  5173. var o = n[r],
  5174. a = e[o];
  5175. "style" === o ? this.style ? A(this.style, a) : this.useStyle(a) : "shape" === o ? A(this.shape, a) : t.prototype.attrKV.call(this, o, a)
  5176. }
  5177. this.style || this.useStyle({})
  5178. }, e.prototype.getDefaultStyle = function () {
  5179. return null
  5180. }, e.prototype.getDefaultShape = function () {
  5181. return {}
  5182. }, e.prototype.canBeInsideText = function () {
  5183. return this.hasFill()
  5184. }, e.prototype.getInsideTextFill = function () {
  5185. var t = this.style.fill;
  5186. if ("none" !== t) {
  5187. if (U(t)) {
  5188. var e = oi(t, 0);
  5189. return e > .5 ? lr : e > .2 ? "#eee" : ur
  5190. }
  5191. if (t) return ur
  5192. }
  5193. return lr
  5194. }, e.prototype.getInsideTextStroke = function (t) {
  5195. var e = this.style.fill;
  5196. if (U(e)) {
  5197. var n = this.__zr;
  5198. if (!(!n || !n.isDarkMode()) === oi(t, 0) < .4) return e
  5199. }
  5200. }, e.prototype.buildPath = function (t, e, n) {}, e.prototype.pathUpdated = function () {
  5201. this.__dirty &= -5
  5202. }, e.prototype.getUpdatedPathProxy = function (t) {
  5203. return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, t), this.path
  5204. }, e.prototype.createPathProxy = function () {
  5205. this.path = new hs(!1)
  5206. }, e.prototype.hasStroke = function () {
  5207. var t = this.style,
  5208. e = t.stroke;
  5209. return !(null == e || "none" === e || !(t.lineWidth > 0))
  5210. }, e.prototype.hasFill = function () {
  5211. var t = this.style.fill;
  5212. return null != t && "none" !== t
  5213. }, e.prototype.getBoundingRect = function () {
  5214. var t = this._rect,
  5215. e = this.style,
  5216. n = !t;
  5217. if (n) {
  5218. var i = !1;
  5219. this.path || (i = !0, this.createPathProxy());
  5220. var r = this.path;
  5221. (i || 4 & this.__dirty) && (r.beginPath(), this.buildPath(r, this.shape, !1), this.pathUpdated()), t = r.getBoundingRect()
  5222. }
  5223. if (this._rect = t, this.hasStroke() && this.path && this.path.len() > 0) {
  5224. var o = this._rectStroke || (this._rectStroke = t.clone());
  5225. if (this.__dirty || n) {
  5226. o.copy(t);
  5227. var a = e.strokeNoScale ? this.getLineScale() : 1,
  5228. s = e.lineWidth;
  5229. if (!this.hasFill()) {
  5230. var l = this.strokeContainThreshold;
  5231. s = Math.max(s, null == l ? 4 : l)
  5232. }
  5233. a > 1e-10 && (o.width += s / a, o.height += s / a, o.x -= s / a / 2, o.y -= s / a / 2)
  5234. }
  5235. return o
  5236. }
  5237. return t
  5238. }, e.prototype.contain = function (t, e) {
  5239. var n = this.transformCoordToLocal(t, e),
  5240. i = this.getBoundingRect(),
  5241. r = this.style;
  5242. if (t = n[0], e = n[1], i.contain(t, e)) {
  5243. var o = this.path;
  5244. if (this.hasStroke()) {
  5245. var a = r.lineWidth,
  5246. s = r.strokeNoScale ? this.getLineScale() : 1;
  5247. if (s > 1e-10 && (this.hasFill() || (a = Math.max(a, this.strokeContainThreshold)), function (t, e, n, i) {
  5248. return Ts(t, e, !0, n, i)
  5249. }(o, a / s, t, e))) return !0
  5250. }
  5251. if (this.hasFill()) return function (t, e, n) {
  5252. return Ts(t, 0, !1, e, n)
  5253. }(o, t, e)
  5254. }
  5255. return !1
  5256. }, e.prototype.dirtyShape = function () {
  5257. this.__dirty |= 4, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw()
  5258. }, e.prototype.dirty = function () {
  5259. this.dirtyStyle(), this.dirtyShape()
  5260. }, e.prototype.animateShape = function (t) {
  5261. return this.animate("shape", t)
  5262. }, e.prototype.updateDuringAnimation = function (t) {
  5263. "style" === t ? this.dirtyStyle() : "shape" === t ? this.dirtyShape() : this.markRedraw()
  5264. }, e.prototype.attrKV = function (e, n) {
  5265. "shape" === e ? this.setShape(n) : t.prototype.attrKV.call(this, e, n)
  5266. }, e.prototype.setShape = function (t, e) {
  5267. var n = this.shape;
  5268. return n || (n = this.shape = {}), "string" == typeof t ? n[t] = e : A(n, t), this.dirtyShape(), this
  5269. }, e.prototype.shapeChanged = function () {
  5270. return !!(4 & this.__dirty)
  5271. }, e.prototype.createStyle = function (t) {
  5272. return mt(Cs, t)
  5273. }, e.prototype._innerSaveToNormal = function (e) {
  5274. t.prototype._innerSaveToNormal.call(this, e);
  5275. var n = this._normalState;
  5276. e.shape && !n.shape && (n.shape = A({}, this.shape))
  5277. }, e.prototype._applyStateObj = function (e, n, i, r, o, a) {
  5278. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  5279. var s, l = !(n && r);
  5280. if (n && n.shape ? o ? r ? s = n.shape : (s = A({}, i.shape), A(s, n.shape)) : (s = A({}, r ? this.shape : i.shape), A(s, n.shape)) : l && (s = i.shape), s)
  5281. if (o) {
  5282. this.shape = A({}, this.shape);
  5283. for (var u = {}, h = G(s), c = 0; c < h.length; c++) {
  5284. var p = h[c];
  5285. "object" == typeof s[p] ? this.shape[p] = s[p] : u[p] = s[p]
  5286. }
  5287. this._transitionState(e, {
  5288. shape: u
  5289. }, a)
  5290. } else this.shape = s, this.dirtyShape()
  5291. }, e.prototype._mergeStates = function (e) {
  5292. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  5293. var o = e[r];
  5294. o.shape && (n = n || {}, this._mergeStyle(n, o.shape))
  5295. }
  5296. return n && (i.shape = n), i
  5297. }, e.prototype.getAnimationStyleProps = function () {
  5298. return Ds
  5299. }, e.prototype.isZeroArea = function () {
  5300. return !1
  5301. }, e.extend = function (t) {
  5302. var i = function (e) {
  5303. function i(n) {
  5304. var i = e.call(this, n) || this;
  5305. return t.init && t.init.call(i, n), i
  5306. }
  5307. return n(i, e), i.prototype.getDefaultStyle = function () {
  5308. return T(t.style)
  5309. }, i.prototype.getDefaultShape = function () {
  5310. return T(t.shape)
  5311. }, i
  5312. }(e);
  5313. for (var r in t) "function" == typeof t[r] && (i.prototype[r] = t[r]);
  5314. return i
  5315. }, e.initDefaultProps = ((i = e.prototype).type = "path", i.strokeContainThreshold = 5, i.segmentIgnoreThreshold = 0, i.subPixelOptimize = !1, i.autoBatch = !1, void(i.__dirty = 7)), e
  5316. }(Da),
  5317. Ls = k({
  5318. strokeFirst: !0,
  5319. font: a,
  5320. x: 0,
  5321. y: 0,
  5322. textAlign: "left",
  5323. textBaseline: "top",
  5324. miterLimit: 2
  5325. }, Cs),
  5326. Ps = function (t) {
  5327. function e() {
  5328. return null !== t && t.apply(this, arguments) || this
  5329. }
  5330. return n(e, t), e.prototype.hasStroke = function () {
  5331. var t = this.style,
  5332. e = t.stroke;
  5333. return null != e && "none" !== e && t.lineWidth > 0
  5334. }, e.prototype.hasFill = function () {
  5335. var t = this.style.fill;
  5336. return null != t && "none" !== t
  5337. }, e.prototype.createStyle = function (t) {
  5338. return mt(Ls, t)
  5339. }, e.prototype.setBoundingRect = function (t) {
  5340. this._rect = t
  5341. }, e.prototype.getBoundingRect = function () {
  5342. var t = this.style;
  5343. if (!this._rect) {
  5344. var e = t.text;
  5345. null != e ? e += "" : e = "";
  5346. var n = Sr(e, t.font, t.textAlign, t.textBaseline);
  5347. if (n.x += t.x || 0, n.y += t.y || 0, this.hasStroke()) {
  5348. var i = t.lineWidth;
  5349. n.x -= i / 2, n.y -= i / 2, n.width += i, n.height += i
  5350. }
  5351. this._rect = n
  5352. }
  5353. return this._rect
  5354. }, e.initDefaultProps = void(e.prototype.dirtyRectTolerance = 10), e
  5355. }(Da);
  5356. Ps.prototype.type = "tspan";
  5357. var Os = k({
  5358. x: 0,
  5359. y: 0
  5360. }, Ma),
  5361. Rs = {
  5362. style: k({
  5363. x: !0,
  5364. y: !0,
  5365. width: !0,
  5366. height: !0,
  5367. sx: !0,
  5368. sy: !0,
  5369. sWidth: !0,
  5370. sHeight: !0
  5371. }, Ia.style)
  5372. };
  5373. var Ns = function (t) {
  5374. function e() {
  5375. return null !== t && t.apply(this, arguments) || this
  5376. }
  5377. return n(e, t), e.prototype.createStyle = function (t) {
  5378. return mt(Os, t)
  5379. }, e.prototype._getSize = function (t) {
  5380. var e = this.style,
  5381. n = e[t];
  5382. if (null != n) return n;
  5383. var i, r = (i = e.image) && "string" != typeof i && i.width && i.height ? e.image : this.__image;
  5384. if (!r) return 0;
  5385. var o = "width" === t ? "height" : "width",
  5386. a = e[o];
  5387. return null == a ? r[t] : r[t] / r[o] * a
  5388. }, e.prototype.getWidth = function () {
  5389. return this._getSize("width")
  5390. }, e.prototype.getHeight = function () {
  5391. return this._getSize("height")
  5392. }, e.prototype.getAnimationStyleProps = function () {
  5393. return Rs
  5394. }, e.prototype.getBoundingRect = function () {
  5395. var t = this.style;
  5396. return this._rect || (this._rect = new ze(t.x || 0, t.y || 0, this.getWidth(), this.getHeight())), this._rect
  5397. }, e
  5398. }(Da);
  5399. Ns.prototype.type = "image";
  5400. var Es = Math.round;
  5401. function zs(t, e, n) {
  5402. if (e) {
  5403. var i = e.x1,
  5404. r = e.x2,
  5405. o = e.y1,
  5406. a = e.y2;
  5407. t.x1 = i, t.x2 = r, t.y1 = o, t.y2 = a;
  5408. var s = n && n.lineWidth;
  5409. return s ? (Es(2 * i) === Es(2 * r) && (t.x1 = t.x2 = Bs(i, s, !0)), Es(2 * o) === Es(2 * a) && (t.y1 = t.y2 = Bs(o, s, !0)), t) : t
  5410. }
  5411. }
  5412. function Vs(t, e, n) {
  5413. if (e) {
  5414. var i = e.x,
  5415. r = e.y,
  5416. o = e.width,
  5417. a = e.height;
  5418. t.x = i, t.y = r, t.width = o, t.height = a;
  5419. var s = n && n.lineWidth;
  5420. return s ? (t.x = Bs(i, s, !0), t.y = Bs(r, s, !0), t.width = Math.max(Bs(i + o, s, !1) - t.x, 0 === o ? 0 : 1), t.height = Math.max(Bs(r + a, s, !1) - t.y, 0 === a ? 0 : 1), t) : t
  5421. }
  5422. }
  5423. function Bs(t, e, n) {
  5424. if (!e) return t;
  5425. var i = Es(2 * t);
  5426. return (i + Es(e)) % 2 == 0 ? i / 2 : (i + (n ? 1 : -1)) / 2
  5427. }
  5428. var Fs = function () {
  5429. this.x = 0, this.y = 0, this.width = 0, this.height = 0
  5430. },
  5431. Gs = {},
  5432. Ws = function (t) {
  5433. function e(e) {
  5434. return t.call(this, e) || this
  5435. }
  5436. return n(e, t), e.prototype.getDefaultShape = function () {
  5437. return new Fs
  5438. }, e.prototype.buildPath = function (t, e) {
  5439. var n, i, r, o;
  5440. if (this.subPixelOptimize) {
  5441. var a = Vs(Gs, e, this.style);
  5442. n = a.x, i = a.y, r = a.width, o = a.height, a.r = e.r, e = a
  5443. } else n = e.x, i = e.y, r = e.width, o = e.height;
  5444. e.r ? function (t, e) {
  5445. var n, i, r, o, a, s = e.x,
  5446. l = e.y,
  5447. u = e.width,
  5448. h = e.height,
  5449. c = e.r;
  5450. u < 0 && (s += u, u = -u), h < 0 && (l += h, h = -h), "number" == typeof c ? n = i = r = o = c : c instanceof Array ? 1 === c.length ? n = i = r = o = c[0] : 2 === c.length ? (n = r = c[0], i = o = c[1]) : 3 === c.length ? (n = c[0], i = o = c[1], r = c[2]) : (n = c[0], i = c[1], r = c[2], o = c[3]) : n = i = r = o = 0, n + i > u && (n *= u / (a = n + i), i *= u / a), r + o > u && (r *= u / (a = r + o), o *= u / a), i + r > h && (i *= h / (a = i + r), r *= h / a), n + o > h && (n *= h / (a = n + o), o *= h / a), t.moveTo(s + n, l), t.lineTo(s + u - i, l), 0 !== i && t.arc(s + u - i, l + i, i, -Math.PI / 2, 0), t.lineTo(s + u, l + h - r), 0 !== r && t.arc(s + u - r, l + h - r, r, 0, Math.PI / 2), t.lineTo(s + o, l + h), 0 !== o && t.arc(s + o, l + h - o, o, Math.PI / 2, Math.PI), t.lineTo(s, l + n), 0 !== n && t.arc(s + n, l + n, n, Math.PI, 1.5 * Math.PI)
  5451. }(t, e) : t.rect(n, i, r, o)
  5452. }, e.prototype.isZeroArea = function () {
  5453. return !this.shape.width || !this.shape.height
  5454. }, e
  5455. }(ks);
  5456. Ws.prototype.type = "rect";
  5457. var Hs = {
  5458. fill: "#000"
  5459. },
  5460. Ys = {
  5461. style: k({
  5462. fill: !0,
  5463. stroke: !0,
  5464. fillOpacity: !0,
  5465. strokeOpacity: !0,
  5466. lineWidth: !0,
  5467. fontSize: !0,
  5468. lineHeight: !0,
  5469. width: !0,
  5470. height: !0,
  5471. textShadowColor: !0,
  5472. textShadowBlur: !0,
  5473. textShadowOffsetX: !0,
  5474. textShadowOffsetY: !0,
  5475. backgroundColor: !0,
  5476. padding: !0,
  5477. borderColor: !0,
  5478. borderWidth: !0,
  5479. borderRadius: !0
  5480. }, Ia.style)
  5481. },
  5482. Xs = function (t) {
  5483. function e(e) {
  5484. var n = t.call(this) || this;
  5485. return n.type = "text", n._children = [], n._defaultStyle = Hs, n.attr(e), n
  5486. }
  5487. return n(e, t), e.prototype.childrenRef = function () {
  5488. return this._children
  5489. }, e.prototype.update = function () {
  5490. t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
  5491. for (var e = 0; e < this._children.length; e++) {
  5492. var n = this._children[e];
  5493. n.zlevel = this.zlevel, n.z = this.z, n.z2 = this.z2, n.culling = this.culling, n.cursor = this.cursor, n.invisible = this.invisible
  5494. }
  5495. }, e.prototype.updateTransform = function () {
  5496. var e = this.innerTransformable;
  5497. e ? (e.updateTransform(), e.transform && (this.transform = e.transform)) : t.prototype.updateTransform.call(this)
  5498. }, e.prototype.getLocalTransform = function (e) {
  5499. var n = this.innerTransformable;
  5500. return n ? n.getLocalTransform(e) : t.prototype.getLocalTransform.call(this, e)
  5501. }, e.prototype.getComputedTransform = function () {
  5502. return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this)
  5503. }, e.prototype._updateSubTexts = function () {
  5504. var t;
  5505. this._childCursor = 0, Js(t = this.style), E(t.rich, Js), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated()
  5506. }, e.prototype.addSelfToZr = function (e) {
  5507. t.prototype.addSelfToZr.call(this, e);
  5508. for (var n = 0; n < this._children.length; n++) this._children[n].__zr = e
  5509. }, e.prototype.removeSelfFromZr = function (e) {
  5510. t.prototype.removeSelfFromZr.call(this, e);
  5511. for (var n = 0; n < this._children.length; n++) this._children[n].__zr = null
  5512. }, e.prototype.getBoundingRect = function () {
  5513. if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
  5514. for (var t = new ze(0, 0, 0, 0), e = this._children, n = [], i = null, r = 0; r < e.length; r++) {
  5515. var o = e[r],
  5516. a = o.getBoundingRect(),
  5517. s = o.getLocalTransform(n);
  5518. s ? (t.copy(a), t.applyTransform(s), (i = i || t.clone()).union(t)) : (i = i || a.clone()).union(a)
  5519. }
  5520. this._rect = i || t
  5521. }
  5522. return this._rect
  5523. }, e.prototype.setDefaultTextStyle = function (t) {
  5524. this._defaultStyle = t || Hs
  5525. }, e.prototype.setTextContent = function (t) {
  5526. 0
  5527. }, e.prototype._mergeStyle = function (t, e) {
  5528. if (!e) return t;
  5529. var n = e.rich,
  5530. i = t.rich || n && {};
  5531. return A(t, e), n && i ? (this._mergeRich(i, n), t.rich = i) : i && (t.rich = i), t
  5532. }, e.prototype._mergeRich = function (t, e) {
  5533. for (var n = G(e), i = 0; i < n.length; i++) {
  5534. var r = n[i];
  5535. t[r] = t[r] || {}, A(t[r], e[r])
  5536. }
  5537. }, e.prototype.getAnimationStyleProps = function () {
  5538. return Ys
  5539. }, e.prototype._getOrCreateChild = function (t) {
  5540. var e = this._children[this._childCursor];
  5541. return e && e instanceof t || (e = new t), this._children[this._childCursor++] = e, e.__zr = this.__zr, e.parent = this, e
  5542. }, e.prototype._updatePlainTexts = function () {
  5543. var t = this.style,
  5544. e = t.font || a,
  5545. n = t.padding,
  5546. i = function (t, e) {
  5547. null != t && (t += "");
  5548. var n, i = e.overflow,
  5549. r = e.padding,
  5550. o = e.font,
  5551. a = "truncate" === i,
  5552. s = Tr(o),
  5553. l = rt(e.lineHeight, s),
  5554. u = !!e.backgroundColor,
  5555. h = "truncate" === e.lineOverflow,
  5556. c = e.width,
  5557. p = (n = null == c || "break" !== i && "breakAll" !== i ? t ? t.split("\n") : [] : t ? wa(t, e.font, c, "breakAll" === i, 0).lines : []).length * l,
  5558. d = rt(e.height, p);
  5559. if (p > d && h) {
  5560. var f = Math.floor(d / l);
  5561. n = n.slice(0, f)
  5562. }
  5563. if (t && a && null != c)
  5564. for (var g = da(c, o, e.ellipsis, {
  5565. minChar: e.truncateMinChar,
  5566. placeholder: e.placeholder
  5567. }), y = 0; y < n.length; y++) n[y] = fa(n[y], g);
  5568. var v = d,
  5569. m = 0;
  5570. for (y = 0; y < n.length; y++) m = Math.max(br(n[y], o), m);
  5571. null == c && (c = m);
  5572. var x = m;
  5573. return r && (v += r[0] + r[2], x += r[1] + r[3], c += r[1] + r[3]), u && (x = c), {
  5574. lines: n,
  5575. height: d,
  5576. outerWidth: x,
  5577. outerHeight: v,
  5578. lineHeight: l,
  5579. calculatedLineHeight: s,
  5580. contentWidth: m,
  5581. contentHeight: p,
  5582. width: c
  5583. }
  5584. }(nl(t), t),
  5585. r = il(t),
  5586. o = !!t.backgroundColor,
  5587. s = i.outerHeight,
  5588. l = i.outerWidth,
  5589. u = i.contentWidth,
  5590. h = i.lines,
  5591. c = i.lineHeight,
  5592. p = this._defaultStyle,
  5593. d = t.x || 0,
  5594. f = t.y || 0,
  5595. g = t.align || p.align || "left",
  5596. y = t.verticalAlign || p.verticalAlign || "top",
  5597. v = d,
  5598. m = Ir(f, i.contentHeight, y);
  5599. if (r || n) {
  5600. var x = Mr(d, l, g),
  5601. _ = Ir(f, s, y);
  5602. r && this._renderBackground(t, t, x, _, l, s)
  5603. }
  5604. m += c / 2, n && (v = el(d, g, n), "top" === y ? m += n[0] : "bottom" === y && (m -= n[2]));
  5605. for (var b = 0, w = !1, S = (tl("fill" in t ? t.fill : (w = !0, p.fill))), M = (Qs("stroke" in t ? t.stroke : o || p.autoStroke && !w ? null : (b = 2, p.stroke))), I = t.textShadowBlur > 0, T = null != t.width && ("truncate" === t.overflow || "break" === t.overflow || "breakAll" === t.overflow), C = i.calculatedLineHeight, D = 0; D < h.length; D++) {
  5606. var A = this._getOrCreateChild(Ps),
  5607. k = A.createStyle();
  5608. A.useStyle(k), k.text = h[D], k.x = v, k.y = m, g && (k.textAlign = g), k.textBaseline = "middle", k.opacity = t.opacity, k.strokeFirst = !0, I && (k.shadowBlur = t.textShadowBlur || 0, k.shadowColor = t.textShadowColor || "transparent", k.shadowOffsetX = t.textShadowOffsetX || 0, k.shadowOffsetY = t.textShadowOffsetY || 0), k.stroke = M, k.fill = S, M && (k.lineWidth = t.lineWidth || b, k.lineDash = t.lineDash, k.lineDashOffset = t.lineDashOffset || 0), k.font = e, Ks(k, t), m += c, T && A.setBoundingRect(new ze(Mr(k.x, t.width, k.textAlign), Ir(k.y, C, k.textBaseline), u, C))
  5609. }
  5610. }, e.prototype._updateRichTexts = function () {
  5611. var t = this.style,
  5612. e = function (t, e) {
  5613. var n = new ma;
  5614. if (null != t && (t += ""), !t) return n;
  5615. for (var i, r = e.width, o = e.height, a = e.overflow, s = "break" !== a && "breakAll" !== a || null == r ? null : {
  5616. width: r,
  5617. accumWidth: 0,
  5618. breakAll: "breakAll" === a
  5619. }, l = ca.lastIndex = 0; null != (i = ca.exec(t));) {
  5620. var u = i.index;
  5621. u > l && xa(n, t.substring(l, u), e, s), xa(n, i[2], e, s, i[1]), l = ca.lastIndex
  5622. }
  5623. l < t.length && xa(n, t.substring(l, t.length), e, s);
  5624. var h = [],
  5625. c = 0,
  5626. p = 0,
  5627. d = e.padding,
  5628. f = "truncate" === a,
  5629. g = "truncate" === e.lineOverflow;
  5630. function y(t, e, n) {
  5631. t.width = e, t.lineHeight = n, c += n, p = Math.max(p, e)
  5632. }
  5633. t: for (var v = 0; v < n.lines.length; v++) {
  5634. for (var m = n.lines[v], x = 0, _ = 0, b = 0; b < m.tokens.length; b++) {
  5635. var w = (P = m.tokens[b]).styleName && e.rich[P.styleName] || {},
  5636. S = P.textPadding = w.padding,
  5637. M = S ? S[1] + S[3] : 0,
  5638. I = P.font = w.font || e.font;
  5639. P.contentHeight = Tr(I);
  5640. var T = rt(w.height, P.contentHeight);
  5641. if (P.innerHeight = T, S && (T += S[0] + S[2]), P.height = T, P.lineHeight = ot(w.lineHeight, e.lineHeight, T), P.align = w && w.align || e.align, P.verticalAlign = w && w.verticalAlign || "middle", g && null != o && c + P.lineHeight > o) {
  5642. b > 0 ? (m.tokens = m.tokens.slice(0, b), y(m, _, x), n.lines = n.lines.slice(0, v + 1)) : n.lines = n.lines.slice(0, v);
  5643. break t
  5644. }
  5645. var C = w.width,
  5646. D = null == C || "auto" === C;
  5647. if ("string" == typeof C && "%" === C.charAt(C.length - 1)) P.percentWidth = C, h.push(P), P.contentWidth = br(P.text, I);
  5648. else {
  5649. if (D) {
  5650. var A = w.backgroundColor,
  5651. k = A && A.image;
  5652. k && ha(k = sa(k)) && (P.width = Math.max(P.width, k.width * T / k.height))
  5653. }
  5654. var L = f && null != r ? r - _ : null;
  5655. null != L && L < P.width ? !D || L < M ? (P.text = "", P.width = P.contentWidth = 0) : (P.text = pa(P.text, L - M, I, e.ellipsis, {
  5656. minChar: e.truncateMinChar
  5657. }), P.width = P.contentWidth = br(P.text, I)) : P.contentWidth = br(P.text, I)
  5658. }
  5659. P.width += M, _ += P.width, w && (x = Math.max(x, P.lineHeight))
  5660. }
  5661. y(m, _, x)
  5662. }
  5663. for (n.outerWidth = n.width = rt(r, p), n.outerHeight = n.height = rt(o, c), n.contentHeight = c, n.contentWidth = p, d && (n.outerWidth += d[1] + d[3], n.outerHeight += d[0] + d[2]), v = 0; v < h.length; v++) {
  5664. var P, O = (P = h[v]).percentWidth;
  5665. P.width = parseInt(O, 10) / 100 * n.width
  5666. }
  5667. return n
  5668. }(nl(t), t),
  5669. n = e.width,
  5670. i = e.outerWidth,
  5671. r = e.outerHeight,
  5672. o = t.padding,
  5673. a = t.x || 0,
  5674. s = t.y || 0,
  5675. l = this._defaultStyle,
  5676. u = t.align || l.align,
  5677. h = t.verticalAlign || l.verticalAlign,
  5678. c = Mr(a, i, u),
  5679. p = Ir(s, r, h),
  5680. d = c,
  5681. f = p;
  5682. o && (d += o[3], f += o[0]);
  5683. var g = d + n;
  5684. il(t) && this._renderBackground(t, t, c, p, i, r);
  5685. for (var y = !!t.backgroundColor, v = 0; v < e.lines.length; v++) {
  5686. for (var m = e.lines[v], x = m.tokens, _ = x.length, b = m.lineHeight, w = m.width, S = 0, M = d, I = g, T = _ - 1, C = void 0; S < _ && (!(C = x[S]).align || "left" === C.align);) this._placeToken(C, t, b, f, M, "left", y), w -= C.width, M += C.width, S++;
  5687. for (; T >= 0 && "right" === (C = x[T]).align;) this._placeToken(C, t, b, f, I, "right", y), w -= C.width, I -= C.width, T--;
  5688. for (M += (n - (M - d) - (g - I) - w) / 2; S <= T;) C = x[S], this._placeToken(C, t, b, f, M + C.width / 2, "center", y), M += C.width, S++;
  5689. f += b
  5690. }
  5691. }, e.prototype._placeToken = function (t, e, n, i, r, o, s) {
  5692. var l = e.rich[t.styleName] || {};
  5693. l.text = t.text;
  5694. var u = t.verticalAlign,
  5695. h = i + n / 2;
  5696. "top" === u ? h = i + t.height / 2 : "bottom" === u && (h = i + n - t.height / 2), !t.isLineHolder && il(l) && this._renderBackground(l, e, "right" === o ? r - t.width : "center" === o ? r - t.width / 2 : r, h - t.height / 2, t.width, t.height);
  5697. var c = !!l.backgroundColor,
  5698. p = t.textPadding;
  5699. p && (r = el(r, o, p), h -= t.height / 2 - p[0] - t.innerHeight / 2);
  5700. var d = this._getOrCreateChild(Ps),
  5701. f = d.createStyle();
  5702. d.useStyle(f);
  5703. var g = this._defaultStyle,
  5704. y = !1,
  5705. v = 0,
  5706. m = tl("fill" in l ? l.fill : "fill" in e ? e.fill : (y = !0, g.fill)),
  5707. x = Qs("stroke" in l ? l.stroke : "stroke" in e ? e.stroke : c || s || g.autoStroke && !y ? null : (v = 2, g.stroke)),
  5708. _ = l.textShadowBlur > 0 || e.textShadowBlur > 0;
  5709. f.text = t.text, f.x = r, f.y = h, _ && (f.shadowBlur = l.textShadowBlur || e.textShadowBlur || 0, f.shadowColor = l.textShadowColor || e.textShadowColor || "transparent", f.shadowOffsetX = l.textShadowOffsetX || e.textShadowOffsetX || 0, f.shadowOffsetY = l.textShadowOffsetY || e.textShadowOffsetY || 0), f.textAlign = o, f.textBaseline = "middle", f.font = t.font || a, f.opacity = ot(l.opacity, e.opacity, 1), Ks(f, l), x && (f.lineWidth = ot(l.lineWidth, e.lineWidth, v), f.lineDash = rt(l.lineDash, e.lineDash), f.lineDashOffset = e.lineDashOffset || 0, f.stroke = x), m && (f.fill = m);
  5710. var b = t.contentWidth,
  5711. w = t.contentHeight;
  5712. d.setBoundingRect(new ze(Mr(f.x, b, f.textAlign), Ir(f.y, w, f.textBaseline), b, w))
  5713. }, e.prototype._renderBackground = function (t, e, n, i, r, o) {
  5714. var a, s, l, u = t.backgroundColor,
  5715. h = t.borderWidth,
  5716. c = t.borderColor,
  5717. p = u && u.image,
  5718. d = u && !p,
  5719. f = t.borderRadius,
  5720. g = this;
  5721. if (d || t.lineHeight || h && c) {
  5722. (a = this._getOrCreateChild(Ws)).useStyle(a.createStyle()), a.style.fill = null;
  5723. var y = a.shape;
  5724. y.x = n, y.y = i, y.width = r, y.height = o, y.r = f, a.dirtyShape()
  5725. }
  5726. if (d)(l = a.style).fill = u || null, l.fillOpacity = rt(t.fillOpacity, 1);
  5727. else if (p) {
  5728. (s = this._getOrCreateChild(Ns)).onload = function () {
  5729. g.dirtyStyle()
  5730. };
  5731. var v = s.style;
  5732. v.image = u.image, v.x = n, v.y = i, v.width = r, v.height = o
  5733. }
  5734. h && c && ((l = a.style).lineWidth = h, l.stroke = c, l.strokeOpacity = rt(t.strokeOpacity, 1), l.lineDash = t.borderDash, l.lineDashOffset = t.borderDashOffset || 0, a.strokeContainThreshold = 0, a.hasFill() && a.hasStroke() && (l.strokeFirst = !0, l.lineWidth *= 2));
  5735. var m = (a || s).style;
  5736. m.shadowBlur = t.shadowBlur || 0, m.shadowColor = t.shadowColor || "transparent", m.shadowOffsetX = t.shadowOffsetX || 0, m.shadowOffsetY = t.shadowOffsetY || 0, m.opacity = ot(t.opacity, e.opacity, 1)
  5737. }, e.makeFont = function (t) {
  5738. var e = "";
  5739. return $s(t) && (e = [t.fontStyle, t.fontWeight, qs(t.fontSize), t.fontFamily || "sans-serif"].join(" ")), e && ut(e) || t.textFont || t.font
  5740. }, e
  5741. }(Da),
  5742. Us = {
  5743. left: !0,
  5744. right: 1,
  5745. center: 1
  5746. },
  5747. Zs = {
  5748. top: 1,
  5749. bottom: 1,
  5750. middle: 1
  5751. },
  5752. js = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  5753. function qs(t) {
  5754. return "string" != typeof t || -1 === t.indexOf("px") && -1 === t.indexOf("rem") && -1 === t.indexOf("em") ? isNaN(+t) ? "12px" : t + "px" : t
  5755. }
  5756. function Ks(t, e) {
  5757. for (var n = 0; n < js.length; n++) {
  5758. var i = js[n],
  5759. r = e[i];
  5760. null != r && (t[i] = r)
  5761. }
  5762. }
  5763. function $s(t) {
  5764. return null != t.fontSize || t.fontFamily || t.fontWeight
  5765. }
  5766. function Js(t) {
  5767. if (t) {
  5768. t.font = Xs.makeFont(t);
  5769. var e = t.align;
  5770. "middle" === e && (e = "center"), t.align = null == e || Us[e] ? e : "left";
  5771. var n = t.verticalAlign;
  5772. "center" === n && (n = "middle"), t.verticalAlign = null == n || Zs[n] ? n : "top", t.padding && (t.padding = st(t.padding))
  5773. }
  5774. }
  5775. function Qs(t, e) {
  5776. return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  5777. }
  5778. function tl(t) {
  5779. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  5780. }
  5781. function el(t, e, n) {
  5782. return "right" === e ? t - n[1] : "center" === e ? t + n[3] / 2 - n[1] / 2 : t + n[3]
  5783. }
  5784. function nl(t) {
  5785. var e = t.text;
  5786. return null != e && (e += ""), e
  5787. }
  5788. function il(t) {
  5789. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor)
  5790. }
  5791. var rl = Vo(),
  5792. ol = function (t, e, n, i) {
  5793. if (i) {
  5794. var r = rl(i);
  5795. r.dataIndex = n, r.dataType = e, r.seriesIndex = t, r.ssrType = "chart", "group" === i.type && i.traverse((function (i) {
  5796. var r = rl(i);
  5797. r.seriesIndex = t, r.dataIndex = n, r.dataType = e, r.ssrType = "chart"
  5798. }))
  5799. }
  5800. },
  5801. al = 1,
  5802. sl = {},
  5803. ll = Vo(),
  5804. ul = Vo(),
  5805. hl = ["emphasis", "blur", "select"],
  5806. cl = ["normal", "emphasis", "blur", "select"],
  5807. pl = 10,
  5808. dl = "highlight",
  5809. fl = "downplay",
  5810. gl = "select",
  5811. yl = "unselect",
  5812. vl = "toggleSelect";
  5813. function ml(t) {
  5814. return null != t && "none" !== t
  5815. }
  5816. function xl(t, e, n) {
  5817. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n
  5818. }
  5819. function _l(t) {
  5820. xl(t, "emphasis", 2)
  5821. }
  5822. function bl(t) {
  5823. 2 === t.hoverState && xl(t, "normal", 0)
  5824. }
  5825. function wl(t) {
  5826. xl(t, "blur", 1)
  5827. }
  5828. function Sl(t) {
  5829. 1 === t.hoverState && xl(t, "normal", 0)
  5830. }
  5831. function Ml(t) {
  5832. t.selected = !0
  5833. }
  5834. function Il(t) {
  5835. t.selected = !1
  5836. }
  5837. function Tl(t, e, n) {
  5838. e(t, n)
  5839. }
  5840. function Cl(t, e, n) {
  5841. Tl(t, e, n), t.isGroup && t.traverse((function (t) {
  5842. Tl(t, e, n)
  5843. }))
  5844. }
  5845. function Dl(t, e) {
  5846. switch (e) {
  5847. case "emphasis":
  5848. t.hoverState = 2;
  5849. break;
  5850. case "normal":
  5851. t.hoverState = 0;
  5852. break;
  5853. case "blur":
  5854. t.hoverState = 1;
  5855. break;
  5856. case "select":
  5857. t.selected = !0
  5858. }
  5859. }
  5860. function Al(t, e) {
  5861. var n = this.states[t];
  5862. if (this.style) {
  5863. if ("emphasis" === t) return function (t, e, n, i) {
  5864. var r = n && P(n, "select") >= 0,
  5865. o = !1;
  5866. if (t instanceof ks) {
  5867. var a = ll(t),
  5868. s = r && a.selectFill || a.normalFill,
  5869. l = r && a.selectStroke || a.normalStroke;
  5870. if (ml(s) || ml(l)) {
  5871. var u = (i = i || {}).style || {};
  5872. "inherit" === u.fill ? (o = !0, i = A({}, i), (u = A({}, u)).fill = s) : !ml(u.fill) && ml(s) ? (o = !0, i = A({}, i), (u = A({}, u)).fill = si(s)) : !ml(u.stroke) && ml(l) && (o || (i = A({}, i), u = A({}, u)), u.stroke = si(l)), i.style = u
  5873. }
  5874. }
  5875. if (i && null == i.z2) {
  5876. o || (i = A({}, i));
  5877. var h = t.z2EmphasisLift;
  5878. i.z2 = t.z2 + (null != h ? h : pl)
  5879. }
  5880. return i
  5881. }(this, 0, e, n);
  5882. if ("blur" === t) return function (t, e, n) {
  5883. var i = P(t.currentStates, e) >= 0,
  5884. r = t.style.opacity,
  5885. o = i ? null : function (t, e, n, i) {
  5886. for (var r = t.style, o = {}, a = 0; a < e.length; a++) {
  5887. var s = e[a],
  5888. l = r[s];
  5889. o[s] = null == l ? i && i[s] : l
  5890. }
  5891. for (a = 0; a < t.animators.length; a++) {
  5892. var u = t.animators[a];
  5893. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && "style" === u.targetName && u.saveTo(o, e)
  5894. }
  5895. return o
  5896. }(t, ["opacity"], e, {
  5897. opacity: 1
  5898. }),
  5899. a = (n = n || {}).style || {};
  5900. return null == a.opacity && (n = A({}, n), a = A({
  5901. opacity: i ? r : .1 * o.opacity
  5902. }, a), n.style = a), n
  5903. }(this, t, n);
  5904. if ("select" === t) return function (t, e, n) {
  5905. if (n && null == n.z2) {
  5906. n = A({}, n);
  5907. var i = t.z2SelectLift;
  5908. n.z2 = t.z2 + (null != i ? i : 9)
  5909. }
  5910. return n
  5911. }(this, 0, n)
  5912. }
  5913. return n
  5914. }
  5915. function kl(t) {
  5916. t.stateProxy = Al;
  5917. var e = t.getTextContent(),
  5918. n = t.getTextGuideLine();
  5919. e && (e.stateProxy = Al), n && (n.stateProxy = Al)
  5920. }
  5921. function Ll(t, e) {
  5922. !Bl(t, e) && !t.__highByOuter && Cl(t, _l)
  5923. }
  5924. function Pl(t, e) {
  5925. !Bl(t, e) && !t.__highByOuter && Cl(t, bl)
  5926. }
  5927. function Ol(t, e) {
  5928. t.__highByOuter |= 1 << (e || 0), Cl(t, _l)
  5929. }
  5930. function Rl(t, e) {
  5931. !(t.__highByOuter &= ~(1 << (e || 0))) && Cl(t, bl)
  5932. }
  5933. function Nl(t) {
  5934. Cl(t, wl)
  5935. }
  5936. function El(t) {
  5937. Cl(t, Sl)
  5938. }
  5939. function zl(t) {
  5940. Cl(t, Ml)
  5941. }
  5942. function Vl(t) {
  5943. Cl(t, Il)
  5944. }
  5945. function Bl(t, e) {
  5946. return t.__highDownSilentOnTouch && e.zrByTouch
  5947. }
  5948. function Fl(t) {
  5949. var e = t.getModel(),
  5950. n = [],
  5951. i = [];
  5952. e.eachComponent((function (e, r) {
  5953. var o = ul(r),
  5954. a = "series" === e,
  5955. s = a ? t.getViewOfSeriesModel(r) : t.getViewOfComponentModel(r);
  5956. !a && i.push(s), o.isBlured && (s.group.traverse((function (t) {
  5957. Sl(t)
  5958. })), a && n.push(r)), o.isBlured = !1
  5959. })), E(i, (function (t) {
  5960. t && t.toggleBlurSeries && t.toggleBlurSeries(n, !1, e)
  5961. }))
  5962. }
  5963. function Gl(t, e, n, i) {
  5964. var r = i.getModel();
  5965. function o(t, e) {
  5966. for (var n = 0; n < e.length; n++) {
  5967. var i = t.getItemGraphicEl(e[n]);
  5968. i && El(i)
  5969. }
  5970. }
  5971. if (n = n || "coordinateSystem", null != t && e && "none" !== e) {
  5972. var a = r.getSeriesByIndex(t),
  5973. s = a.coordinateSystem;
  5974. s && s.master && (s = s.master);
  5975. var l = [];
  5976. r.eachSeries((function (t) {
  5977. var r = a === t,
  5978. u = t.coordinateSystem;
  5979. if (u && u.master && (u = u.master), !("series" === n && !r || "coordinateSystem" === n && !(u && s ? u === s : r) || "series" === e && r)) {
  5980. if (i.getViewOfSeriesModel(t).group.traverse((function (t) {
  5981. t.__highByOuter && r && "self" === e || wl(t)
  5982. })), N(e)) o(t.getData(), e);
  5983. else if (q(e))
  5984. for (var h = G(e), c = 0; c < h.length; c++) o(t.getData(h[c]), e[h[c]]);
  5985. l.push(t), ul(t).isBlured = !0
  5986. }
  5987. })), r.eachComponent((function (t, e) {
  5988. if ("series" !== t) {
  5989. var n = i.getViewOfComponentModel(e);
  5990. n && n.toggleBlurSeries && n.toggleBlurSeries(l, !0, r)
  5991. }
  5992. }))
  5993. }
  5994. }
  5995. function Wl(t, e, n) {
  5996. if (null != t && null != e) {
  5997. var i = n.getModel().getComponent(t, e);
  5998. if (i) {
  5999. ul(i).isBlured = !0;
  6000. var r = n.getViewOfComponentModel(i);
  6001. r && r.focusBlurEnabled && r.group.traverse((function (t) {
  6002. wl(t)
  6003. }))
  6004. }
  6005. }
  6006. }
  6007. function Hl(t, e, n, i) {
  6008. var r = {
  6009. focusSelf: !1,
  6010. dispatchers: null
  6011. };
  6012. if (null == t || "series" === t || null == e || null == n) return r;
  6013. var o = i.getModel().getComponent(t, e);
  6014. if (!o) return r;
  6015. var a = i.getViewOfComponentModel(o);
  6016. if (!a || !a.findHighDownDispatchers) return r;
  6017. for (var s, l = a.findHighDownDispatchers(n), u = 0; u < l.length; u++)
  6018. if ("self" === rl(l[u]).focus) {
  6019. s = !0;
  6020. break
  6021. } return {
  6022. focusSelf: s,
  6023. dispatchers: l
  6024. }
  6025. }
  6026. function Yl(t) {
  6027. E(t.getAllData(), (function (e) {
  6028. var n = e.data,
  6029. i = e.type;
  6030. n.eachItemGraphicEl((function (e, n) {
  6031. t.isSelected(n, i) ? zl(e) : Vl(e)
  6032. }))
  6033. }))
  6034. }
  6035. function Xl(t) {
  6036. var e = [];
  6037. return t.eachSeries((function (t) {
  6038. E(t.getAllData(), (function (n) {
  6039. n.data;
  6040. var i = n.type,
  6041. r = t.getSelectedDataIndices();
  6042. if (r.length > 0) {
  6043. var o = {
  6044. dataIndex: r,
  6045. seriesIndex: t.seriesIndex
  6046. };
  6047. null != i && (o.dataType = i), e.push(o)
  6048. }
  6049. }))
  6050. })), e
  6051. }
  6052. function Ul(t, e, n) {
  6053. Jl(t, !0), Cl(t, kl), jl(t, e, n)
  6054. }
  6055. function Zl(t, e, n, i) {
  6056. i ? function (t) {
  6057. Jl(t, !1)
  6058. }(t) : Ul(t, e, n)
  6059. }
  6060. function jl(t, e, n) {
  6061. var i = rl(t);
  6062. null != e ? (i.focus = e, i.blurScope = n) : i.focus && (i.focus = null)
  6063. }
  6064. var ql = ["emphasis", "blur", "select"],
  6065. Kl = {
  6066. itemStyle: "getItemStyle",
  6067. lineStyle: "getLineStyle",
  6068. areaStyle: "getAreaStyle"
  6069. };
  6070. function $l(t, e, n, i) {
  6071. n = n || "itemStyle";
  6072. for (var r = 0; r < ql.length; r++) {
  6073. var o = ql[r],
  6074. a = e.getModel([o, n]);
  6075. t.ensureState(o).style = i ? i(a) : a[Kl[n]]()
  6076. }
  6077. }
  6078. function Jl(t, e) {
  6079. var n = !1 === e,
  6080. i = t;
  6081. t.highDownSilentOnTouch && (i.__highDownSilentOnTouch = t.highDownSilentOnTouch), n && !i.__highDownDispatcher || (i.__highByOuter = i.__highByOuter || 0, i.__highDownDispatcher = !n)
  6082. }
  6083. function Ql(t) {
  6084. return !(!t || !t.__highDownDispatcher)
  6085. }
  6086. function tu(t) {
  6087. var e = t.type;
  6088. return e === gl || e === yl || e === vl
  6089. }
  6090. function eu(t) {
  6091. var e = t.type;
  6092. return e === dl || e === fl
  6093. }
  6094. var nu = hs.CMD,
  6095. iu = [
  6096. [],
  6097. [],
  6098. []
  6099. ],
  6100. ru = Math.sqrt,
  6101. ou = Math.atan2;
  6102. function au(t, e) {
  6103. if (e) {
  6104. var n, i, r, o, a, s, l = t.data,
  6105. u = t.len(),
  6106. h = nu.M,
  6107. c = nu.C,
  6108. p = nu.L,
  6109. d = nu.R,
  6110. f = nu.A,
  6111. g = nu.Q;
  6112. for (r = 0, o = 0; r < u;) {
  6113. switch (n = l[r++], o = r, i = 0, n) {
  6114. case h:
  6115. case p:
  6116. i = 1;
  6117. break;
  6118. case c:
  6119. i = 3;
  6120. break;
  6121. case g:
  6122. i = 2;
  6123. break;
  6124. case f:
  6125. var y = e[4],
  6126. v = e[5],
  6127. m = ru(e[0] * e[0] + e[1] * e[1]),
  6128. x = ru(e[2] * e[2] + e[3] * e[3]),
  6129. _ = ou(-e[1] / x, e[0] / m);
  6130. l[r] *= m, l[r++] += y, l[r] *= x, l[r++] += v, l[r++] *= m, l[r++] *= x, l[r++] += _, l[r++] += _, o = r += 2;
  6131. break;
  6132. case d:
  6133. s[0] = l[r++], s[1] = l[r++], Wt(s, s, e), l[o++] = s[0], l[o++] = s[1], s[0] += l[r++], s[1] += l[r++], Wt(s, s, e), l[o++] = s[0], l[o++] = s[1]
  6134. }
  6135. for (a = 0; a < i; a++) {
  6136. var b = iu[a];
  6137. b[0] = l[r++], b[1] = l[r++], Wt(b, b, e), l[o++] = b[0], l[o++] = b[1]
  6138. }
  6139. }
  6140. t.increaseVersion()
  6141. }
  6142. }
  6143. var su = Math.sqrt,
  6144. lu = Math.sin,
  6145. uu = Math.cos,
  6146. hu = Math.PI;
  6147. function cu(t) {
  6148. return Math.sqrt(t[0] * t[0] + t[1] * t[1])
  6149. }
  6150. function pu(t, e) {
  6151. return (t[0] * e[0] + t[1] * e[1]) / (cu(t) * cu(e))
  6152. }
  6153. function du(t, e) {
  6154. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(pu(t, e))
  6155. }
  6156. function fu(t, e, n, i, r, o, a, s, l, u, h) {
  6157. var c = l * (hu / 180),
  6158. p = uu(c) * (t - n) / 2 + lu(c) * (e - i) / 2,
  6159. d = -1 * lu(c) * (t - n) / 2 + uu(c) * (e - i) / 2,
  6160. f = p * p / (a * a) + d * d / (s * s);
  6161. f > 1 && (a *= su(f), s *= su(f));
  6162. var g = (r === o ? -1 : 1) * su((a * a * (s * s) - a * a * (d * d) - s * s * (p * p)) / (a * a * (d * d) + s * s * (p * p))) || 0,
  6163. y = g * a * d / s,
  6164. v = g * -s * p / a,
  6165. m = (t + n) / 2 + uu(c) * y - lu(c) * v,
  6166. x = (e + i) / 2 + lu(c) * y + uu(c) * v,
  6167. _ = du([1, 0], [(p - y) / a, (d - v) / s]),
  6168. b = [(p - y) / a, (d - v) / s],
  6169. w = [(-1 * p - y) / a, (-1 * d - v) / s],
  6170. S = du(b, w);
  6171. if (pu(b, w) <= -1 && (S = hu), pu(b, w) >= 1 && (S = 0), S < 0) {
  6172. var M = Math.round(S / hu * 1e6) / 1e6;
  6173. S = 2 * hu + M % 2 * hu
  6174. }
  6175. h.addData(u, m, x, a, s, _, S, c, o)
  6176. }
  6177. var gu = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
  6178. yu = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  6179. var vu = function (t) {
  6180. function e() {
  6181. return null !== t && t.apply(this, arguments) || this
  6182. }
  6183. return n(e, t), e.prototype.applyTransform = function (t) {}, e
  6184. }(ks);
  6185. function mu(t) {
  6186. return null != t.setData
  6187. }
  6188. function xu(t, e) {
  6189. var n = function (t) {
  6190. var e = new hs;
  6191. if (!t) return e;
  6192. var n, i = 0,
  6193. r = 0,
  6194. o = i,
  6195. a = r,
  6196. s = hs.CMD,
  6197. l = t.match(gu);
  6198. if (!l) return e;
  6199. for (var u = 0; u < l.length; u++) {
  6200. for (var h = l[u], c = h.charAt(0), p = void 0, d = h.match(yu) || [], f = d.length, g = 0; g < f; g++) d[g] = parseFloat(d[g]);
  6201. for (var y = 0; y < f;) {
  6202. var v = void 0,
  6203. m = void 0,
  6204. x = void 0,
  6205. _ = void 0,
  6206. b = void 0,
  6207. w = void 0,
  6208. S = void 0,
  6209. M = i,
  6210. I = r,
  6211. T = void 0,
  6212. C = void 0;
  6213. switch (c) {
  6214. case "l":
  6215. i += d[y++], r += d[y++], p = s.L, e.addData(p, i, r);
  6216. break;
  6217. case "L":
  6218. i = d[y++], r = d[y++], p = s.L, e.addData(p, i, r);
  6219. break;
  6220. case "m":
  6221. i += d[y++], r += d[y++], p = s.M, e.addData(p, i, r), o = i, a = r, c = "l";
  6222. break;
  6223. case "M":
  6224. i = d[y++], r = d[y++], p = s.M, e.addData(p, i, r), o = i, a = r, c = "L";
  6225. break;
  6226. case "h":
  6227. i += d[y++], p = s.L, e.addData(p, i, r);
  6228. break;
  6229. case "H":
  6230. i = d[y++], p = s.L, e.addData(p, i, r);
  6231. break;
  6232. case "v":
  6233. r += d[y++], p = s.L, e.addData(p, i, r);
  6234. break;
  6235. case "V":
  6236. r = d[y++], p = s.L, e.addData(p, i, r);
  6237. break;
  6238. case "C":
  6239. p = s.C, e.addData(p, d[y++], d[y++], d[y++], d[y++], d[y++], d[y++]), i = d[y - 2], r = d[y - 1];
  6240. break;
  6241. case "c":
  6242. p = s.C, e.addData(p, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r), i += d[y - 2], r += d[y - 1];
  6243. break;
  6244. case "S":
  6245. v = i, m = r, T = e.len(), C = e.data, n === s.C && (v += i - C[T - 4], m += r - C[T - 3]), p = s.C, M = d[y++], I = d[y++], i = d[y++], r = d[y++], e.addData(p, v, m, M, I, i, r);
  6246. break;
  6247. case "s":
  6248. v = i, m = r, T = e.len(), C = e.data, n === s.C && (v += i - C[T - 4], m += r - C[T - 3]), p = s.C, M = i + d[y++], I = r + d[y++], i += d[y++], r += d[y++], e.addData(p, v, m, M, I, i, r);
  6249. break;
  6250. case "Q":
  6251. M = d[y++], I = d[y++], i = d[y++], r = d[y++], p = s.Q, e.addData(p, M, I, i, r);
  6252. break;
  6253. case "q":
  6254. M = d[y++] + i, I = d[y++] + r, i += d[y++], r += d[y++], p = s.Q, e.addData(p, M, I, i, r);
  6255. break;
  6256. case "T":
  6257. v = i, m = r, T = e.len(), C = e.data, n === s.Q && (v += i - C[T - 4], m += r - C[T - 3]), i = d[y++], r = d[y++], p = s.Q, e.addData(p, v, m, i, r);
  6258. break;
  6259. case "t":
  6260. v = i, m = r, T = e.len(), C = e.data, n === s.Q && (v += i - C[T - 4], m += r - C[T - 3]), i += d[y++], r += d[y++], p = s.Q, e.addData(p, v, m, i, r);
  6261. break;
  6262. case "A":
  6263. x = d[y++], _ = d[y++], b = d[y++], w = d[y++], S = d[y++], fu(M = i, I = r, i = d[y++], r = d[y++], w, S, x, _, b, p = s.A, e);
  6264. break;
  6265. case "a":
  6266. x = d[y++], _ = d[y++], b = d[y++], w = d[y++], S = d[y++], fu(M = i, I = r, i += d[y++], r += d[y++], w, S, x, _, b, p = s.A, e)
  6267. }
  6268. }
  6269. "z" !== c && "Z" !== c || (p = s.Z, e.addData(p), i = o, r = a), n = p
  6270. }
  6271. return e.toStatic(), e
  6272. }(t),
  6273. i = A({}, e);
  6274. return i.buildPath = function (t) {
  6275. if (mu(t)) {
  6276. t.setData(n.data), (e = t.getContext()) && t.rebuildPath(e, 1)
  6277. } else {
  6278. var e = t;
  6279. n.rebuildPath(e, 1)
  6280. }
  6281. }, i.applyTransform = function (t) {
  6282. au(n, t), this.dirtyShape()
  6283. }, i
  6284. }
  6285. function _u(t, e) {
  6286. return new vu(xu(t, e))
  6287. }
  6288. function bu(t, e) {
  6289. e = e || {};
  6290. var n = new ks;
  6291. return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? au(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t), n.buildPath = t.buildPath, n.applyTransform = n.applyTransform, n.z = t.z, n.z2 = t.z2, n.zlevel = t.zlevel, n
  6292. }
  6293. var wu = function () {
  6294. this.cx = 0, this.cy = 0, this.r = 0
  6295. },
  6296. Su = function (t) {
  6297. function e(e) {
  6298. return t.call(this, e) || this
  6299. }
  6300. return n(e, t), e.prototype.getDefaultShape = function () {
  6301. return new wu
  6302. }, e.prototype.buildPath = function (t, e) {
  6303. t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI)
  6304. }, e
  6305. }(ks);
  6306. Su.prototype.type = "circle";
  6307. var Mu = function () {
  6308. this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0
  6309. },
  6310. Iu = function (t) {
  6311. function e(e) {
  6312. return t.call(this, e) || this
  6313. }
  6314. return n(e, t), e.prototype.getDefaultShape = function () {
  6315. return new Mu
  6316. }, e.prototype.buildPath = function (t, e) {
  6317. var n = .5522848,
  6318. i = e.cx,
  6319. r = e.cy,
  6320. o = e.rx,
  6321. a = e.ry,
  6322. s = o * n,
  6323. l = a * n;
  6324. t.moveTo(i - o, r), t.bezierCurveTo(i - o, r - l, i - s, r - a, i, r - a), t.bezierCurveTo(i + s, r - a, i + o, r - l, i + o, r), t.bezierCurveTo(i + o, r + l, i + s, r + a, i, r + a), t.bezierCurveTo(i - s, r + a, i - o, r + l, i - o, r), t.closePath()
  6325. }, e
  6326. }(ks);
  6327. Iu.prototype.type = "ellipse";
  6328. var Tu = Math.PI,
  6329. Cu = 2 * Tu,
  6330. Du = Math.sin,
  6331. Au = Math.cos,
  6332. ku = Math.acos,
  6333. Lu = Math.atan2,
  6334. Pu = Math.abs,
  6335. Ou = Math.sqrt,
  6336. Ru = Math.max,
  6337. Nu = Math.min,
  6338. Eu = 1e-4;
  6339. function zu(t, e, n, i, r, o, a) {
  6340. var s = t - n,
  6341. l = e - i,
  6342. u = (a ? o : -o) / Ou(s * s + l * l),
  6343. h = u * l,
  6344. c = -u * s,
  6345. p = t + h,
  6346. d = e + c,
  6347. f = n + h,
  6348. g = i + c,
  6349. y = (p + f) / 2,
  6350. v = (d + g) / 2,
  6351. m = f - p,
  6352. x = g - d,
  6353. _ = m * m + x * x,
  6354. b = r - o,
  6355. w = p * g - f * d,
  6356. S = (x < 0 ? -1 : 1) * Ou(Ru(0, b * b * _ - w * w)),
  6357. M = (w * x - m * S) / _,
  6358. I = (-w * m - x * S) / _,
  6359. T = (w * x + m * S) / _,
  6360. C = (-w * m + x * S) / _,
  6361. D = M - y,
  6362. A = I - v,
  6363. k = T - y,
  6364. L = C - v;
  6365. return D * D + A * A > k * k + L * L && (M = T, I = C), {
  6366. cx: M,
  6367. cy: I,
  6368. x0: -h,
  6369. y0: -c,
  6370. x1: M * (r / b - 1),
  6371. y1: I * (r / b - 1)
  6372. }
  6373. }
  6374. function Vu(t, e) {
  6375. var n, i = Ru(e.r, 0),
  6376. r = Ru(e.r0 || 0, 0),
  6377. o = i > 0;
  6378. if (o || r > 0) {
  6379. if (o || (i = r, r = 0), r > i) {
  6380. var a = i;
  6381. i = r, r = a
  6382. }
  6383. var s = e.startAngle,
  6384. l = e.endAngle;
  6385. if (!isNaN(s) && !isNaN(l)) {
  6386. var u = e.cx,
  6387. h = e.cy,
  6388. c = !!e.clockwise,
  6389. p = Pu(l - s),
  6390. d = p > Cu && p % Cu;
  6391. if (d > Eu && (p = d), i > Eu)
  6392. if (p > Cu - Eu) t.moveTo(u + i * Au(s), h + i * Du(s)), t.arc(u, h, i, s, l, !c), r > Eu && (t.moveTo(u + r * Au(l), h + r * Du(l)), t.arc(u, h, r, l, s, c));
  6393. else {
  6394. var f = void 0,
  6395. g = void 0,
  6396. y = void 0,
  6397. v = void 0,
  6398. m = void 0,
  6399. x = void 0,
  6400. _ = void 0,
  6401. b = void 0,
  6402. w = void 0,
  6403. S = void 0,
  6404. M = void 0,
  6405. I = void 0,
  6406. T = void 0,
  6407. C = void 0,
  6408. D = void 0,
  6409. A = void 0,
  6410. k = i * Au(s),
  6411. L = i * Du(s),
  6412. P = r * Au(l),
  6413. O = r * Du(l),
  6414. R = p > Eu;
  6415. if (R) {
  6416. var N = e.cornerRadius;
  6417. N && (n = function (t) {
  6418. var e;
  6419. if (Y(t)) {
  6420. var n = t.length;
  6421. if (!n) return t;
  6422. e = 1 === n ? [t[0], t[0], 0, 0] : 2 === n ? [t[0], t[0], t[1], t[1]] : 3 === n ? t.concat(t[2]) : t
  6423. } else e = [t, t, t, t];
  6424. return e
  6425. }(N), f = n[0], g = n[1], y = n[2], v = n[3]);
  6426. var E = Pu(i - r) / 2;
  6427. if (m = Nu(E, y), x = Nu(E, v), _ = Nu(E, f), b = Nu(E, g), M = w = Ru(m, x), I = S = Ru(_, b), (w > Eu || S > Eu) && (T = i * Au(l), C = i * Du(l), D = r * Au(s), A = r * Du(s), p < Tu)) {
  6428. var z = function (t, e, n, i, r, o, a, s) {
  6429. var l = n - t,
  6430. u = i - e,
  6431. h = a - r,
  6432. c = s - o,
  6433. p = c * l - h * u;
  6434. if (!(p * p < Eu)) return [t + (p = (h * (e - o) - c * (t - r)) / p) * l, e + p * u]
  6435. }(k, L, D, A, T, C, P, O);
  6436. if (z) {
  6437. var V = k - z[0],
  6438. B = L - z[1],
  6439. F = T - z[0],
  6440. G = C - z[1],
  6441. W = 1 / Du(ku((V * F + B * G) / (Ou(V * V + B * B) * Ou(F * F + G * G))) / 2),
  6442. H = Ou(z[0] * z[0] + z[1] * z[1]);
  6443. M = Nu(w, (i - H) / (W + 1)), I = Nu(S, (r - H) / (W - 1))
  6444. }
  6445. }
  6446. }
  6447. if (R)
  6448. if (M > Eu) {
  6449. var X = Nu(y, M),
  6450. U = Nu(v, M),
  6451. Z = zu(D, A, k, L, i, X, c),
  6452. j = zu(T, C, P, O, i, U, c);
  6453. t.moveTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0), M < w && X === U ? t.arc(u + Z.cx, h + Z.cy, M, Lu(Z.y0, Z.x0), Lu(j.y0, j.x0), !c) : (X > 0 && t.arc(u + Z.cx, h + Z.cy, X, Lu(Z.y0, Z.x0), Lu(Z.y1, Z.x1), !c), t.arc(u, h, i, Lu(Z.cy + Z.y1, Z.cx + Z.x1), Lu(j.cy + j.y1, j.cx + j.x1), !c), U > 0 && t.arc(u + j.cx, h + j.cy, U, Lu(j.y1, j.x1), Lu(j.y0, j.x0), !c))
  6454. } else t.moveTo(u + k, h + L), t.arc(u, h, i, s, l, !c);
  6455. else t.moveTo(u + k, h + L);
  6456. if (r > Eu && R)
  6457. if (I > Eu) {
  6458. X = Nu(f, I), Z = zu(P, O, T, C, r, -(U = Nu(g, I)), c), j = zu(k, L, D, A, r, -X, c);
  6459. t.lineTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0), I < S && X === U ? t.arc(u + Z.cx, h + Z.cy, I, Lu(Z.y0, Z.x0), Lu(j.y0, j.x0), !c) : (U > 0 && t.arc(u + Z.cx, h + Z.cy, U, Lu(Z.y0, Z.x0), Lu(Z.y1, Z.x1), !c), t.arc(u, h, r, Lu(Z.cy + Z.y1, Z.cx + Z.x1), Lu(j.cy + j.y1, j.cx + j.x1), c), X > 0 && t.arc(u + j.cx, h + j.cy, X, Lu(j.y1, j.x1), Lu(j.y0, j.x0), !c))
  6460. } else t.lineTo(u + P, h + O), t.arc(u, h, r, l, s, c);
  6461. else t.lineTo(u + P, h + O)
  6462. }
  6463. else t.moveTo(u, h);
  6464. t.closePath()
  6465. }
  6466. }
  6467. }
  6468. var Bu = function () {
  6469. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0, this.cornerRadius = 0
  6470. },
  6471. Fu = function (t) {
  6472. function e(e) {
  6473. return t.call(this, e) || this
  6474. }
  6475. return n(e, t), e.prototype.getDefaultShape = function () {
  6476. return new Bu
  6477. }, e.prototype.buildPath = function (t, e) {
  6478. Vu(t, e)
  6479. }, e.prototype.isZeroArea = function () {
  6480. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0
  6481. }, e
  6482. }(ks);
  6483. Fu.prototype.type = "sector";
  6484. var Gu = function () {
  6485. this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0
  6486. },
  6487. Wu = function (t) {
  6488. function e(e) {
  6489. return t.call(this, e) || this
  6490. }
  6491. return n(e, t), e.prototype.getDefaultShape = function () {
  6492. return new Gu
  6493. }, e.prototype.buildPath = function (t, e) {
  6494. var n = e.cx,
  6495. i = e.cy,
  6496. r = 2 * Math.PI;
  6497. t.moveTo(n + e.r, i), t.arc(n, i, e.r, 0, r, !1), t.moveTo(n + e.r0, i), t.arc(n, i, e.r0, 0, r, !0)
  6498. }, e
  6499. }(ks);
  6500. function Hu(t, e, n) {
  6501. var i = e.smooth,
  6502. r = e.points;
  6503. if (r && r.length >= 2) {
  6504. if (i) {
  6505. var o = function (t, e, n, i) {
  6506. var r, o, a, s, l = [],
  6507. u = [],
  6508. h = [],
  6509. c = [];
  6510. if (i) {
  6511. a = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
  6512. for (var p = 0, d = t.length; p < d; p++) Ht(a, a, t[p]), Yt(s, s, t[p]);
  6513. Ht(a, a, i[0]), Yt(s, s, i[1])
  6514. }
  6515. for (p = 0, d = t.length; p < d; p++) {
  6516. var f = t[p];
  6517. if (n) r = t[p ? p - 1 : d - 1], o = t[(p + 1) % d];
  6518. else {
  6519. if (0 === p || p === d - 1) {
  6520. l.push(Tt(t[p]));
  6521. continue
  6522. }
  6523. r = t[p - 1], o = t[p + 1]
  6524. }
  6525. kt(u, o, r), Nt(u, u, e);
  6526. var g = zt(f, r),
  6527. y = zt(f, o),
  6528. v = g + y;
  6529. 0 !== v && (g /= v, y /= v), Nt(h, u, -g), Nt(c, u, y);
  6530. var m = Dt([], f, h),
  6531. x = Dt([], f, c);
  6532. i && (Yt(m, m, a), Ht(m, m, s), Yt(x, x, a), Ht(x, x, s)), l.push(m), l.push(x)
  6533. }
  6534. return n && l.push(l.shift()), l
  6535. }(r, i, n, e.smoothConstraint);
  6536. t.moveTo(r[0][0], r[0][1]);
  6537. for (var a = r.length, s = 0; s < (n ? a : a - 1); s++) {
  6538. var l = o[2 * s],
  6539. u = o[2 * s + 1],
  6540. h = r[(s + 1) % a];
  6541. t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1])
  6542. }
  6543. } else {
  6544. t.moveTo(r[0][0], r[0][1]);
  6545. s = 1;
  6546. for (var c = r.length; s < c; s++) t.lineTo(r[s][0], r[s][1])
  6547. }
  6548. n && t.closePath()
  6549. }
  6550. }
  6551. Wu.prototype.type = "ring";
  6552. var Yu = function () {
  6553. this.points = null, this.smooth = 0, this.smoothConstraint = null
  6554. },
  6555. Xu = function (t) {
  6556. function e(e) {
  6557. return t.call(this, e) || this
  6558. }
  6559. return n(e, t), e.prototype.getDefaultShape = function () {
  6560. return new Yu
  6561. }, e.prototype.buildPath = function (t, e) {
  6562. Hu(t, e, !0)
  6563. }, e
  6564. }(ks);
  6565. Xu.prototype.type = "polygon";
  6566. var Uu = function () {
  6567. this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null
  6568. },
  6569. Zu = function (t) {
  6570. function e(e) {
  6571. return t.call(this, e) || this
  6572. }
  6573. return n(e, t), e.prototype.getDefaultStyle = function () {
  6574. return {
  6575. stroke: "#000",
  6576. fill: null
  6577. }
  6578. }, e.prototype.getDefaultShape = function () {
  6579. return new Uu
  6580. }, e.prototype.buildPath = function (t, e) {
  6581. Hu(t, e, !1)
  6582. }, e
  6583. }(ks);
  6584. Zu.prototype.type = "polyline";
  6585. var ju = {},
  6586. qu = function () {
  6587. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1
  6588. },
  6589. Ku = function (t) {
  6590. function e(e) {
  6591. return t.call(this, e) || this
  6592. }
  6593. return n(e, t), e.prototype.getDefaultStyle = function () {
  6594. return {
  6595. stroke: "#000",
  6596. fill: null
  6597. }
  6598. }, e.prototype.getDefaultShape = function () {
  6599. return new qu
  6600. }, e.prototype.buildPath = function (t, e) {
  6601. var n, i, r, o;
  6602. if (this.subPixelOptimize) {
  6603. var a = zs(ju, e, this.style);
  6604. n = a.x1, i = a.y1, r = a.x2, o = a.y2
  6605. } else n = e.x1, i = e.y1, r = e.x2, o = e.y2;
  6606. var s = e.percent;
  6607. 0 !== s && (t.moveTo(n, i), s < 1 && (r = n * (1 - s) + r * s, o = i * (1 - s) + o * s), t.lineTo(r, o))
  6608. }, e.prototype.pointAt = function (t) {
  6609. var e = this.shape;
  6610. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
  6611. }, e
  6612. }(ks);
  6613. Ku.prototype.type = "line";
  6614. var $u = [],
  6615. Ju = function () {
  6616. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1
  6617. };
  6618. function Qu(t, e, n) {
  6619. var i = t.cpx2,
  6620. r = t.cpy2;
  6621. return null != i || null != r ? [(n ? xn : mn)(t.x1, t.cpx1, t.cpx2, t.x2, e), (n ? xn : mn)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(n ? Tn : In)(t.x1, t.cpx1, t.x2, e), (n ? Tn : In)(t.y1, t.cpy1, t.y2, e)]
  6622. }
  6623. var th = function (t) {
  6624. function e(e) {
  6625. return t.call(this, e) || this
  6626. }
  6627. return n(e, t), e.prototype.getDefaultStyle = function () {
  6628. return {
  6629. stroke: "#000",
  6630. fill: null
  6631. }
  6632. }, e.prototype.getDefaultShape = function () {
  6633. return new Ju
  6634. }, e.prototype.buildPath = function (t, e) {
  6635. var n = e.x1,
  6636. i = e.y1,
  6637. r = e.x2,
  6638. o = e.y2,
  6639. a = e.cpx1,
  6640. s = e.cpy1,
  6641. l = e.cpx2,
  6642. u = e.cpy2,
  6643. h = e.percent;
  6644. 0 !== h && (t.moveTo(n, i), null == l || null == u ? (h < 1 && (Dn(n, a, r, h, $u), a = $u[1], r = $u[2], Dn(i, s, o, h, $u), s = $u[1], o = $u[2]), t.quadraticCurveTo(a, s, r, o)) : (h < 1 && (wn(n, a, l, r, h, $u), a = $u[1], l = $u[2], r = $u[3], wn(i, s, u, o, h, $u), s = $u[1], u = $u[2], o = $u[3]), t.bezierCurveTo(a, s, l, u, r, o)))
  6645. }, e.prototype.pointAt = function (t) {
  6646. return Qu(this.shape, t, !1)
  6647. }, e.prototype.tangentAt = function (t) {
  6648. var e = Qu(this.shape, t, !0);
  6649. return Et(e, e)
  6650. }, e
  6651. }(ks);
  6652. th.prototype.type = "bezier-curve";
  6653. var eh = function () {
  6654. this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0
  6655. },
  6656. nh = function (t) {
  6657. function e(e) {
  6658. return t.call(this, e) || this
  6659. }
  6660. return n(e, t), e.prototype.getDefaultStyle = function () {
  6661. return {
  6662. stroke: "#000",
  6663. fill: null
  6664. }
  6665. }, e.prototype.getDefaultShape = function () {
  6666. return new eh
  6667. }, e.prototype.buildPath = function (t, e) {
  6668. var n = e.cx,
  6669. i = e.cy,
  6670. r = Math.max(e.r, 0),
  6671. o = e.startAngle,
  6672. a = e.endAngle,
  6673. s = e.clockwise,
  6674. l = Math.cos(o),
  6675. u = Math.sin(o);
  6676. t.moveTo(l * r + n, u * r + i), t.arc(n, i, r, o, a, !s)
  6677. }, e
  6678. }(ks);
  6679. nh.prototype.type = "arc";
  6680. var ih = function (t) {
  6681. function e() {
  6682. var e = null !== t && t.apply(this, arguments) || this;
  6683. return e.type = "compound", e
  6684. }
  6685. return n(e, t), e.prototype._updatePathDirty = function () {
  6686. for (var t = this.shape.paths, e = this.shapeChanged(), n = 0; n < t.length; n++) e = e || t[n].shapeChanged();
  6687. e && this.dirtyShape()
  6688. }, e.prototype.beforeBrush = function () {
  6689. this._updatePathDirty();
  6690. for (var t = this.shape.paths || [], e = this.getGlobalScale(), n = 0; n < t.length; n++) t[n].path || t[n].createPathProxy(), t[n].path.setScale(e[0], e[1], t[n].segmentIgnoreThreshold)
  6691. }, e.prototype.buildPath = function (t, e) {
  6692. for (var n = e.paths || [], i = 0; i < n.length; i++) n[i].buildPath(t, n[i].shape, !0)
  6693. }, e.prototype.afterBrush = function () {
  6694. for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].pathUpdated()
  6695. }, e.prototype.getBoundingRect = function () {
  6696. return this._updatePathDirty.call(this), ks.prototype.getBoundingRect.call(this)
  6697. }, e
  6698. }(ks),
  6699. rh = function () {
  6700. function t(t) {
  6701. this.colorStops = t || []
  6702. }
  6703. return t.prototype.addColorStop = function (t, e) {
  6704. this.colorStops.push({
  6705. offset: t,
  6706. color: e
  6707. })
  6708. }, t
  6709. }(),
  6710. oh = function (t) {
  6711. function e(e, n, i, r, o, a) {
  6712. var s = t.call(this, o) || this;
  6713. return s.x = null == e ? 0 : e, s.y = null == n ? 0 : n, s.x2 = null == i ? 1 : i, s.y2 = null == r ? 0 : r, s.type = "linear", s.global = a || !1, s
  6714. }
  6715. return n(e, t), e
  6716. }(rh),
  6717. ah = function (t) {
  6718. function e(e, n, i, r, o) {
  6719. var a = t.call(this, r) || this;
  6720. return a.x = null == e ? .5 : e, a.y = null == n ? .5 : n, a.r = null == i ? .5 : i, a.type = "radial", a.global = o || !1, a
  6721. }
  6722. return n(e, t), e
  6723. }(rh),
  6724. sh = [0, 0],
  6725. lh = [0, 0],
  6726. uh = new De,
  6727. hh = new De,
  6728. ch = function () {
  6729. function t(t, e) {
  6730. this._corners = [], this._axes = [], this._origin = [0, 0];
  6731. for (var n = 0; n < 4; n++) this._corners[n] = new De;
  6732. for (n = 0; n < 2; n++) this._axes[n] = new De;
  6733. t && this.fromBoundingRect(t, e)
  6734. }
  6735. return t.prototype.fromBoundingRect = function (t, e) {
  6736. var n = this._corners,
  6737. i = this._axes,
  6738. r = t.x,
  6739. o = t.y,
  6740. a = r + t.width,
  6741. s = o + t.height;
  6742. if (n[0].set(r, o), n[1].set(a, o), n[2].set(a, s), n[3].set(r, s), e)
  6743. for (var l = 0; l < 4; l++) n[l].transform(e);
  6744. De.sub(i[0], n[1], n[0]), De.sub(i[1], n[3], n[0]), i[0].normalize(), i[1].normalize();
  6745. for (l = 0; l < 2; l++) this._origin[l] = i[l].dot(n[0])
  6746. }, t.prototype.intersect = function (t, e) {
  6747. var n = !0,
  6748. i = !e;
  6749. return uh.set(1 / 0, 1 / 0), hh.set(0, 0), !this._intersectCheckOneSide(this, t, uh, hh, i, 1) && (n = !1, i) || !this._intersectCheckOneSide(t, this, uh, hh, i, -1) && (n = !1, i) || i || De.copy(e, n ? uh : hh), n
  6750. }, t.prototype._intersectCheckOneSide = function (t, e, n, i, r, o) {
  6751. for (var a = !0, s = 0; s < 2; s++) {
  6752. var l = this._axes[s];
  6753. if (this._getProjMinMaxOnAxis(s, t._corners, sh), this._getProjMinMaxOnAxis(s, e._corners, lh), sh[1] < lh[0] || sh[0] > lh[1]) {
  6754. if (a = !1, r) return a;
  6755. var u = Math.abs(lh[0] - sh[1]),
  6756. h = Math.abs(sh[0] - lh[1]);
  6757. Math.min(u, h) > i.len() && (u < h ? De.scale(i, l, -u * o) : De.scale(i, l, h * o))
  6758. } else if (n) {
  6759. u = Math.abs(lh[0] - sh[1]), h = Math.abs(sh[0] - lh[1]);
  6760. Math.min(u, h) < n.len() && (u < h ? De.scale(n, l, u * o) : De.scale(n, l, -h * o))
  6761. }
  6762. }
  6763. return a
  6764. }, t.prototype._getProjMinMaxOnAxis = function (t, e, n) {
  6765. for (var i = this._axes[t], r = this._origin, o = e[0].dot(i) + r[t], a = o, s = o, l = 1; l < e.length; l++) {
  6766. var u = e[l].dot(i) + r[t];
  6767. a = Math.min(u, a), s = Math.max(u, s)
  6768. }
  6769. n[0] = a, n[1] = s
  6770. }, t
  6771. }(),
  6772. ph = [],
  6773. dh = function (t) {
  6774. function e() {
  6775. var e = null !== t && t.apply(this, arguments) || this;
  6776. return e.notClear = !0, e.incremental = !0, e._displayables = [], e._temporaryDisplayables = [], e._cursor = 0, e
  6777. }
  6778. return n(e, t), e.prototype.traverse = function (t, e) {
  6779. t.call(e, this)
  6780. }, e.prototype.useStyle = function () {
  6781. this.style = {}
  6782. }, e.prototype.getCursor = function () {
  6783. return this._cursor
  6784. }, e.prototype.innerAfterBrush = function () {
  6785. this._cursor = this._displayables.length
  6786. }, e.prototype.clearDisplaybles = function () {
  6787. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1
  6788. }, e.prototype.clearTemporalDisplayables = function () {
  6789. this._temporaryDisplayables = []
  6790. }, e.prototype.addDisplayable = function (t, e) {
  6791. e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.markRedraw()
  6792. }, e.prototype.addDisplayables = function (t, e) {
  6793. e = e || !1;
  6794. for (var n = 0; n < t.length; n++) this.addDisplayable(t[n], e)
  6795. }, e.prototype.getDisplayables = function () {
  6796. return this._displayables
  6797. }, e.prototype.getTemporalDisplayables = function () {
  6798. return this._temporaryDisplayables
  6799. }, e.prototype.eachPendingDisplayable = function (t) {
  6800. for (var e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
  6801. for (e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e])
  6802. }, e.prototype.update = function () {
  6803. this.updateTransform();
  6804. for (var t = this._cursor; t < this._displayables.length; t++) {
  6805. (e = this._displayables[t]).parent = this, e.update(), e.parent = null
  6806. }
  6807. for (t = 0; t < this._temporaryDisplayables.length; t++) {
  6808. var e;
  6809. (e = this._temporaryDisplayables[t]).parent = this, e.update(), e.parent = null
  6810. }
  6811. }, e.prototype.getBoundingRect = function () {
  6812. if (!this._rect) {
  6813. for (var t = new ze(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
  6814. var n = this._displayables[e],
  6815. i = n.getBoundingRect().clone();
  6816. n.needLocalTransform() && i.applyTransform(n.getLocalTransform(ph)), t.union(i)
  6817. }
  6818. this._rect = t
  6819. }
  6820. return this._rect
  6821. }, e.prototype.contain = function (t, e) {
  6822. var n = this.transformCoordToLocal(t, e);
  6823. if (this.getBoundingRect().contain(n[0], n[1]))
  6824. for (var i = 0; i < this._displayables.length; i++) {
  6825. if (this._displayables[i].contain(t, e)) return !0
  6826. }
  6827. return !1
  6828. }, e
  6829. }(Da),
  6830. fh = Vo();
  6831. function gh(t, e, n, i, r) {
  6832. var o;
  6833. if (e && e.ecModel) {
  6834. var a = e.ecModel.getUpdatePayload();
  6835. o = a && a.animation
  6836. }
  6837. var s = "update" === t;
  6838. if (e && e.isAnimationEnabled()) {
  6839. var l = void 0,
  6840. u = void 0,
  6841. h = void 0;
  6842. return i ? (l = rt(i.duration, 200), u = rt(i.easing, "cubicOut"), h = 0) : (l = e.getShallow(s ? "animationDurationUpdate" : "animationDuration"), u = e.getShallow(s ? "animationEasingUpdate" : "animationEasing"), h = e.getShallow(s ? "animationDelayUpdate" : "animationDelay")), o && (null != o.duration && (l = o.duration), null != o.easing && (u = o.easing), null != o.delay && (h = o.delay)), X(h) && (h = h(n, r)), X(l) && (l = l(n)), {
  6843. duration: l || 0,
  6844. delay: h,
  6845. easing: u
  6846. }
  6847. }
  6848. return null
  6849. }
  6850. function yh(t, e, n, i, r, o, a) {
  6851. var s, l = !1;
  6852. X(r) ? (a = o, o = r, r = null) : q(r) && (o = r.cb, a = r.during, l = r.isFrom, s = r.removeOpt, r = r.dataIndex);
  6853. var u = "leave" === t;
  6854. u || e.stopAnimation("leave");
  6855. var h = gh(t, i, r, u ? s || {} : null, i && i.getAnimationDelayParams ? i.getAnimationDelayParams(e, r) : null);
  6856. if (h && h.duration > 0) {
  6857. var c = {
  6858. duration: h.duration,
  6859. delay: h.delay || 0,
  6860. easing: h.easing,
  6861. done: o,
  6862. force: !!o || !!a,
  6863. setToFinal: !u,
  6864. scope: t,
  6865. during: a
  6866. };
  6867. l ? e.animateFrom(n, c) : e.animateTo(n, c)
  6868. } else e.stopAnimation(), !l && e.attr(n), a && a(1), o && o()
  6869. }
  6870. function vh(t, e, n, i, r, o) {
  6871. yh("update", t, e, n, i, r, o)
  6872. }
  6873. function mh(t, e, n, i, r, o) {
  6874. yh("enter", t, e, n, i, r, o)
  6875. }
  6876. function xh(t) {
  6877. if (!t.__zr) return !0;
  6878. for (var e = 0; e < t.animators.length; e++) {
  6879. if ("leave" === t.animators[e].scope) return !0
  6880. }
  6881. return !1
  6882. }
  6883. function _h(t, e, n, i, r, o) {
  6884. xh(t) || yh("leave", t, e, n, i, r, o)
  6885. }
  6886. function bh(t, e, n, i) {
  6887. t.removeTextContent(), t.removeTextGuideLine(), _h(t, {
  6888. style: {
  6889. opacity: 0
  6890. }
  6891. }, e, n, i)
  6892. }
  6893. function wh(t, e, n) {
  6894. function i() {
  6895. t.parent && t.parent.remove(t)
  6896. }
  6897. t.isGroup ? t.traverse((function (t) {
  6898. t.isGroup || bh(t, e, n, i)
  6899. })) : bh(t, e, n, i)
  6900. }
  6901. function Sh(t) {
  6902. fh(t).oldStyle = t.style
  6903. }
  6904. var Mh = Math.max,
  6905. Ih = Math.min,
  6906. Th = {};
  6907. function Ch(t) {
  6908. return ks.extend(t)
  6909. }
  6910. var Dh = function (t, e) {
  6911. var i = xu(t, e);
  6912. return function (t) {
  6913. function e(e) {
  6914. var n = t.call(this, e) || this;
  6915. return n.applyTransform = i.applyTransform, n.buildPath = i.buildPath, n
  6916. }
  6917. return n(e, t), e
  6918. }(vu)
  6919. };
  6920. function Ah(t, e) {
  6921. return Dh(t, e)
  6922. }
  6923. function kh(t, e) {
  6924. Th[t] = e
  6925. }
  6926. function Lh(t) {
  6927. if (Th.hasOwnProperty(t)) return Th[t]
  6928. }
  6929. function Ph(t, e, n, i) {
  6930. var r = _u(t, e);
  6931. return n && ("center" === i && (n = Rh(n, r.getBoundingRect())), Eh(r, n)), r
  6932. }
  6933. function Oh(t, e, n) {
  6934. var i = new Ns({
  6935. style: {
  6936. image: t,
  6937. x: e.x,
  6938. y: e.y,
  6939. width: e.width,
  6940. height: e.height
  6941. },
  6942. onload: function (t) {
  6943. if ("center" === n) {
  6944. var r = {
  6945. width: t.width,
  6946. height: t.height
  6947. };
  6948. i.setStyle(Rh(e, r))
  6949. }
  6950. }
  6951. });
  6952. return i
  6953. }
  6954. function Rh(t, e) {
  6955. var n, i = e.width / e.height,
  6956. r = t.height * i;
  6957. return n = r <= t.width ? t.height : (r = t.width) / i, {
  6958. x: t.x + t.width / 2 - r / 2,
  6959. y: t.y + t.height / 2 - n / 2,
  6960. width: r,
  6961. height: n
  6962. }
  6963. }
  6964. var Nh = function (t, e) {
  6965. for (var n = [], i = t.length, r = 0; r < i; r++) {
  6966. var o = t[r];
  6967. n.push(o.getUpdatedPathProxy(!0))
  6968. }
  6969. var a = new ks(e);
  6970. return a.createPathProxy(), a.buildPath = function (t) {
  6971. if (mu(t)) {
  6972. t.appendPath(n);
  6973. var e = t.getContext();
  6974. e && t.rebuildPath(e, 1)
  6975. }
  6976. }, a
  6977. };
  6978. function Eh(t, e) {
  6979. if (t.applyTransform) {
  6980. var n = t.getBoundingRect().calculateTransform(e);
  6981. t.applyTransform(n)
  6982. }
  6983. }
  6984. function zh(t, e) {
  6985. return zs(t, t, {
  6986. lineWidth: e
  6987. }), t
  6988. }
  6989. var Vh = Bs;
  6990. function Bh(t, e) {
  6991. for (var n = xe([]); t && t !== e;) be(n, t.getLocalTransform(), n), t = t.parent;
  6992. return n
  6993. }
  6994. function Fh(t, e, n) {
  6995. return e && !N(e) && (e = vr.getLocalTransform(e)), n && (e = Ie([], e)), Wt([], t, e)
  6996. }
  6997. function Gh(t, e, n) {
  6998. var i = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
  6999. r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
  7000. o = ["left" === t ? -i : "right" === t ? i : 0, "top" === t ? -r : "bottom" === t ? r : 0];
  7001. return o = Fh(o, e, n), Math.abs(o[0]) > Math.abs(o[1]) ? o[0] > 0 ? "right" : "left" : o[1] > 0 ? "bottom" : "top"
  7002. }
  7003. function Wh(t) {
  7004. return !t.isGroup
  7005. }
  7006. function Hh(t, e, n) {
  7007. if (t && e) {
  7008. var i, r = (i = {}, t.traverse((function (t) {
  7009. Wh(t) && t.anid && (i[t.anid] = t)
  7010. })), i);
  7011. e.traverse((function (t) {
  7012. if (Wh(t) && t.anid) {
  7013. var e = r[t.anid];
  7014. if (e) {
  7015. var i = o(t);
  7016. t.attr(o(e)), vh(t, i, n, rl(t).dataIndex)
  7017. }
  7018. }
  7019. }))
  7020. }
  7021. function o(t) {
  7022. var e = {
  7023. x: t.x,
  7024. y: t.y,
  7025. rotation: t.rotation
  7026. };
  7027. return function (t) {
  7028. return null != t.shape
  7029. }(t) && (e.shape = A({}, t.shape)), e
  7030. }
  7031. }
  7032. function Yh(t, e) {
  7033. return z(t, (function (t) {
  7034. var n = t[0];
  7035. n = Mh(n, e.x), n = Ih(n, e.x + e.width);
  7036. var i = t[1];
  7037. return i = Mh(i, e.y), [n, i = Ih(i, e.y + e.height)]
  7038. }))
  7039. }
  7040. function Xh(t, e) {
  7041. var n = Mh(t.x, e.x),
  7042. i = Ih(t.x + t.width, e.x + e.width),
  7043. r = Mh(t.y, e.y),
  7044. o = Ih(t.y + t.height, e.y + e.height);
  7045. if (i >= n && o >= r) return {
  7046. x: n,
  7047. y: r,
  7048. width: i - n,
  7049. height: o - r
  7050. }
  7051. }
  7052. function Uh(t, e, n) {
  7053. var i = A({
  7054. rectHover: !0
  7055. }, e),
  7056. r = i.style = {
  7057. strokeNoScale: !0
  7058. };
  7059. if (n = n || {
  7060. x: -1,
  7061. y: -1,
  7062. width: 2,
  7063. height: 2
  7064. }, t) return 0 === t.indexOf("image://") ? (r.image = t.slice(8), k(r, n), new Ns(i)) : Ph(t.replace("path://", ""), i, n, "center")
  7065. }
  7066. function Zh(t, e, n, i, r) {
  7067. for (var o = 0, a = r[r.length - 1]; o < r.length; o++) {
  7068. var s = r[o];
  7069. if (jh(t, e, n, i, s[0], s[1], a[0], a[1])) return !0;
  7070. a = s
  7071. }
  7072. }
  7073. function jh(t, e, n, i, r, o, a, s) {
  7074. var l, u = n - t,
  7075. h = i - e,
  7076. c = a - r,
  7077. p = s - o,
  7078. d = qh(c, p, u, h);
  7079. if ((l = d) <= 1e-6 && l >= -1e-6) return !1;
  7080. var f = t - r,
  7081. g = e - o,
  7082. y = qh(f, g, u, h) / d;
  7083. if (y < 0 || y > 1) return !1;
  7084. var v = qh(f, g, c, p) / d;
  7085. return !(v < 0 || v > 1)
  7086. }
  7087. function qh(t, e, n, i) {
  7088. return t * i - n * e
  7089. }
  7090. function Kh(t) {
  7091. var e = t.itemTooltipOption,
  7092. n = t.componentModel,
  7093. i = t.itemName,
  7094. r = U(e) ? {
  7095. formatter: e
  7096. } : e,
  7097. o = n.mainType,
  7098. a = n.componentIndex,
  7099. s = {
  7100. componentType: o,
  7101. name: i,
  7102. $vars: ["name"]
  7103. };
  7104. s[o + "Index"] = a;
  7105. var l = t.formatterParamsExtra;
  7106. l && E(G(l), (function (t) {
  7107. _t(s, t) || (s[t] = l[t], s.$vars.push(t))
  7108. }));
  7109. var u = rl(t.el);
  7110. u.componentMainType = o, u.componentIndex = a, u.tooltipConfig = {
  7111. name: i,
  7112. option: k({
  7113. content: i,
  7114. formatterParams: s
  7115. }, r)
  7116. }
  7117. }
  7118. function $h(t, e) {
  7119. var n;
  7120. t.isGroup && (n = e(t)), n || t.traverse(e)
  7121. }
  7122. function Jh(t, e) {
  7123. if (t)
  7124. if (Y(t))
  7125. for (var n = 0; n < t.length; n++) $h(t[n], e);
  7126. else $h(t, e)
  7127. }
  7128. kh("circle", Su), kh("ellipse", Iu), kh("sector", Fu), kh("ring", Wu), kh("polygon", Xu), kh("polyline", Zu), kh("rect", Ws), kh("line", Ku), kh("bezierCurve", th), kh("arc", nh);
  7129. var Qh = Object.freeze({
  7130. __proto__: null,
  7131. updateProps: vh,
  7132. initProps: mh,
  7133. removeElement: _h,
  7134. removeElementWithFadeOut: wh,
  7135. isElementRemoved: xh,
  7136. extendShape: Ch,
  7137. extendPath: Ah,
  7138. registerShape: kh,
  7139. getShapeClass: Lh,
  7140. makePath: Ph,
  7141. makeImage: Oh,
  7142. mergePath: Nh,
  7143. resizePath: Eh,
  7144. subPixelOptimizeLine: zh,
  7145. subPixelOptimizeRect: function (t) {
  7146. return Vs(t.shape, t.shape, t.style), t
  7147. },
  7148. subPixelOptimize: Vh,
  7149. getTransform: Bh,
  7150. applyTransform: Fh,
  7151. transformDirection: Gh,
  7152. groupTransition: Hh,
  7153. clipPointsByRect: Yh,
  7154. clipRectByRect: Xh,
  7155. createIcon: Uh,
  7156. linePolygonIntersect: Zh,
  7157. lineLineIntersect: jh,
  7158. setTooltipConfig: Kh,
  7159. traverseElements: Jh,
  7160. Group: Br,
  7161. Image: Ns,
  7162. Text: Xs,
  7163. Circle: Su,
  7164. Ellipse: Iu,
  7165. Sector: Fu,
  7166. Ring: Wu,
  7167. Polygon: Xu,
  7168. Polyline: Zu,
  7169. Rect: Ws,
  7170. Line: Ku,
  7171. BezierCurve: th,
  7172. Arc: nh,
  7173. IncrementalDisplayable: dh,
  7174. CompoundPath: ih,
  7175. LinearGradient: oh,
  7176. RadialGradient: ah,
  7177. BoundingRect: ze,
  7178. OrientedBoundingRect: ch,
  7179. Point: De,
  7180. Path: ks
  7181. }),
  7182. tc = {};
  7183. function ec(t, e) {
  7184. for (var n = 0; n < hl.length; n++) {
  7185. var i = hl[n],
  7186. r = e[i],
  7187. o = t.ensureState(i);
  7188. o.style = o.style || {}, o.style.text = r
  7189. }
  7190. var a = t.currentStates.slice();
  7191. t.clearStates(!0), t.setStyle({
  7192. text: e.normal
  7193. }), t.useStates(a, !0)
  7194. }
  7195. function nc(t, e, n) {
  7196. var i, r = t.labelFetcher,
  7197. o = t.labelDataIndex,
  7198. a = t.labelDimIndex,
  7199. s = e.normal;
  7200. r && (i = r.getFormattedLabel(o, "normal", null, a, s && s.get("formatter"), null != n ? {
  7201. interpolatedValue: n
  7202. } : null)), null == i && (i = X(t.defaultText) ? t.defaultText(o, t, n) : t.defaultText);
  7203. for (var l = {
  7204. normal: i
  7205. }, u = 0; u < hl.length; u++) {
  7206. var h = hl[u],
  7207. c = e[h];
  7208. l[h] = rt(r ? r.getFormattedLabel(o, h, null, a, c && c.get("formatter")) : null, i)
  7209. }
  7210. return l
  7211. }
  7212. function ic(t, e, n, i) {
  7213. n = n || tc;
  7214. for (var r = t instanceof Xs, o = !1, a = 0; a < cl.length; a++) {
  7215. if ((p = e[cl[a]]) && p.getShallow("show")) {
  7216. o = !0;
  7217. break
  7218. }
  7219. }
  7220. var s = r ? t : t.getTextContent();
  7221. if (o) {
  7222. r || (s || (s = new Xs, t.setTextContent(s)), t.stateProxy && (s.stateProxy = t.stateProxy));
  7223. var l = nc(n, e),
  7224. u = e.normal,
  7225. h = !!u.getShallow("show"),
  7226. c = oc(u, i && i.normal, n, !1, !r);
  7227. c.text = l.normal, r || t.setTextConfig(ac(u, n, !1));
  7228. for (a = 0; a < hl.length; a++) {
  7229. var p, d = hl[a];
  7230. if (p = e[d]) {
  7231. var f = s.ensureState(d),
  7232. g = !!rt(p.getShallow("show"), h);
  7233. if (g !== h && (f.ignore = !g), f.style = oc(p, i && i[d], n, !0, !r), f.style.text = l[d], !r) t.ensureState(d).textConfig = ac(p, n, !0)
  7234. }
  7235. }
  7236. s.silent = !!u.getShallow("silent"), null != s.style.x && (c.x = s.style.x), null != s.style.y && (c.y = s.style.y), s.ignore = !h, s.useStyle(c), s.dirty(), n.enableTextSetter && (pc(s).setLabelText = function (t) {
  7237. var i = nc(n, e, t);
  7238. ec(s, i)
  7239. })
  7240. } else s && (s.ignore = !0);
  7241. t.dirty()
  7242. }
  7243. function rc(t, e) {
  7244. e = e || "label";
  7245. for (var n = {
  7246. normal: t.getModel(e)
  7247. }, i = 0; i < hl.length; i++) {
  7248. var r = hl[i];
  7249. n[r] = t.getModel([r, e])
  7250. }
  7251. return n
  7252. }
  7253. function oc(t, e, n, i, r) {
  7254. var o = {};
  7255. return function (t, e, n, i, r) {
  7256. n = n || tc;
  7257. var o, a = e.ecModel,
  7258. s = a && a.option.textStyle,
  7259. l = function (t) {
  7260. var e;
  7261. for (; t && t !== t.ecModel;) {
  7262. var n = (t.option || tc).rich;
  7263. if (n) {
  7264. e = e || {};
  7265. for (var i = G(n), r = 0; r < i.length; r++) {
  7266. e[i[r]] = 1
  7267. }
  7268. }
  7269. t = t.parentModel
  7270. }
  7271. return e
  7272. }(e);
  7273. if (l)
  7274. for (var u in o = {}, l)
  7275. if (l.hasOwnProperty(u)) {
  7276. var h = e.getModel(["rich", u]);
  7277. hc(o[u] = {}, h, s, n, i, r, !1, !0)
  7278. } o && (t.rich = o);
  7279. var c = e.get("overflow");
  7280. c && (t.overflow = c);
  7281. var p = e.get("minMargin");
  7282. null != p && (t.margin = p);
  7283. hc(t, e, s, n, i, r, !0, !1)
  7284. }(o, t, n, i, r), e && A(o, e), o
  7285. }
  7286. function ac(t, e, n) {
  7287. e = e || {};
  7288. var i, r = {},
  7289. o = t.getShallow("rotate"),
  7290. a = rt(t.getShallow("distance"), n ? null : 5),
  7291. s = t.getShallow("offset");
  7292. return "outside" === (i = t.getShallow("position") || (n ? null : "inside")) && (i = e.defaultOutsidePosition || "top"), null != i && (r.position = i), null != s && (r.offset = s), null != o && (o *= Math.PI / 180, r.rotation = o), null != a && (r.distance = a), r.outsideFill = "inherit" === t.get("color") ? e.inheritColor || null : "auto", r
  7293. }
  7294. var sc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"],
  7295. lc = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"],
  7296. uc = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  7297. function hc(t, e, n, i, r, o, a, s) {
  7298. n = !r && n || tc;
  7299. var l = i && i.inheritColor,
  7300. u = e.getShallow("color"),
  7301. h = e.getShallow("textBorderColor"),
  7302. c = rt(e.getShallow("opacity"), n.opacity);
  7303. "inherit" !== u && "auto" !== u || (u = l || null), "inherit" !== h && "auto" !== h || (h = l || null), o || (u = u || n.color, h = h || n.textBorderColor), null != u && (t.fill = u), null != h && (t.stroke = h);
  7304. var p = rt(e.getShallow("textBorderWidth"), n.textBorderWidth);
  7305. null != p && (t.lineWidth = p);
  7306. var d = rt(e.getShallow("textBorderType"), n.textBorderType);
  7307. null != d && (t.lineDash = d);
  7308. var f = rt(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  7309. null != f && (t.lineDashOffset = f), r || null != c || s || (c = i && i.defaultOpacity), null != c && (t.opacity = c), r || o || null == t.fill && i.inheritColor && (t.fill = i.inheritColor);
  7310. for (var g = 0; g < sc.length; g++) {
  7311. var y = sc[g];
  7312. null != (m = rt(e.getShallow(y), n[y])) && (t[y] = m)
  7313. }
  7314. for (g = 0; g < lc.length; g++) {
  7315. y = lc[g];
  7316. null != (m = e.getShallow(y)) && (t[y] = m)
  7317. }
  7318. if (null == t.verticalAlign) {
  7319. var v = e.getShallow("baseline");
  7320. null != v && (t.verticalAlign = v)
  7321. }
  7322. if (!a || !i.disableBox) {
  7323. for (g = 0; g < uc.length; g++) {
  7324. var m;
  7325. y = uc[g];
  7326. null != (m = e.getShallow(y)) && (t[y] = m)
  7327. }
  7328. var x = e.getShallow("borderType");
  7329. null != x && (t.borderDash = x), "auto" !== t.backgroundColor && "inherit" !== t.backgroundColor || !l || (t.backgroundColor = l), "auto" !== t.borderColor && "inherit" !== t.borderColor || !l || (t.borderColor = l)
  7330. }
  7331. }
  7332. function cc(t, e) {
  7333. var n = e && e.getModel("textStyle");
  7334. return ut([t.fontStyle || n && n.getShallow("fontStyle") || "", t.fontWeight || n && n.getShallow("fontWeight") || "", (t.fontSize || n && n.getShallow("fontSize") || 12) + "px", t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"].join(" "))
  7335. }
  7336. var pc = Vo();
  7337. function dc(t, e, n, i) {
  7338. if (t) {
  7339. var r = pc(t);
  7340. r.prevValue = r.value, r.value = n;
  7341. var o = e.normal;
  7342. r.valueAnimation = o.get("valueAnimation"), r.valueAnimation && (r.precision = o.get("precision"), r.defaultInterpolatedText = i, r.statesModels = e)
  7343. }
  7344. }
  7345. function fc(t, e, n, i, r) {
  7346. var o = pc(t);
  7347. if (o.valueAnimation && o.prevValue !== o.value) {
  7348. var a = o.defaultInterpolatedText,
  7349. s = rt(o.interpolatedValue, o.prevValue),
  7350. l = o.value;
  7351. t.percent = 0, (null == o.prevValue ? mh : vh)(t, {
  7352. percent: 1
  7353. }, i, e, null, (function (i) {
  7354. var u = Zo(n, o.precision, s, l, i);
  7355. o.interpolatedValue = 1 === i ? null : u;
  7356. var h = nc({
  7357. labelDataIndex: e,
  7358. labelFetcher: r,
  7359. defaultText: a ? a(u) : u + ""
  7360. }, o.statesModels, u);
  7361. ec(t, h)
  7362. }))
  7363. }
  7364. }
  7365. var gc, yc, vc = ["textStyle", "color"],
  7366. mc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"],
  7367. xc = new Xs,
  7368. _c = function () {
  7369. function t() {}
  7370. return t.prototype.getTextColor = function (t) {
  7371. var e = this.ecModel;
  7372. return this.getShallow("color") || (!t && e ? e.get(vc) : null)
  7373. }, t.prototype.getFont = function () {
  7374. return cc({
  7375. fontStyle: this.getShallow("fontStyle"),
  7376. fontWeight: this.getShallow("fontWeight"),
  7377. fontSize: this.getShallow("fontSize"),
  7378. fontFamily: this.getShallow("fontFamily")
  7379. }, this.ecModel)
  7380. }, t.prototype.getTextRect = function (t) {
  7381. for (var e = {
  7382. text: t,
  7383. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  7384. }, n = 0; n < mc.length; n++) e[mc[n]] = this.getShallow(mc[n]);
  7385. return xc.useStyle(e), xc.update(), xc.getBoundingRect()
  7386. }, t
  7387. }(),
  7388. bc = [
  7389. ["lineWidth", "width"],
  7390. ["stroke", "color"],
  7391. ["opacity"],
  7392. ["shadowBlur"],
  7393. ["shadowOffsetX"],
  7394. ["shadowOffsetY"],
  7395. ["shadowColor"],
  7396. ["lineDash", "type"],
  7397. ["lineDashOffset", "dashOffset"],
  7398. ["lineCap", "cap"],
  7399. ["lineJoin", "join"],
  7400. ["miterLimit"]
  7401. ],
  7402. wc = ia(bc),
  7403. Sc = function () {
  7404. function t() {}
  7405. return t.prototype.getLineStyle = function (t) {
  7406. return wc(this, t)
  7407. }, t
  7408. }(),
  7409. Mc = [
  7410. ["fill", "color"],
  7411. ["stroke", "borderColor"],
  7412. ["lineWidth", "borderWidth"],
  7413. ["opacity"],
  7414. ["shadowBlur"],
  7415. ["shadowOffsetX"],
  7416. ["shadowOffsetY"],
  7417. ["shadowColor"],
  7418. ["lineDash", "borderType"],
  7419. ["lineDashOffset", "borderDashOffset"],
  7420. ["lineCap", "borderCap"],
  7421. ["lineJoin", "borderJoin"],
  7422. ["miterLimit", "borderMiterLimit"]
  7423. ],
  7424. Ic = ia(Mc),
  7425. Tc = function () {
  7426. function t() {}
  7427. return t.prototype.getItemStyle = function (t, e) {
  7428. return Ic(this, t, e)
  7429. }, t
  7430. }(),
  7431. Cc = function () {
  7432. function t(t, e, n) {
  7433. this.parentModel = e, this.ecModel = n, this.option = t
  7434. }
  7435. return t.prototype.init = function (t, e, n) {
  7436. for (var i = [], r = 3; r < arguments.length; r++) i[r - 3] = arguments[r]
  7437. }, t.prototype.mergeOption = function (t, e) {
  7438. C(this.option, t, !0)
  7439. }, t.prototype.get = function (t, e) {
  7440. return null == t ? this.option : this._doGet(this.parsePath(t), !e && this.parentModel)
  7441. }, t.prototype.getShallow = function (t, e) {
  7442. var n = this.option,
  7443. i = null == n ? n : n[t];
  7444. if (null == i && !e) {
  7445. var r = this.parentModel;
  7446. r && (i = r.getShallow(t))
  7447. }
  7448. return i
  7449. }, t.prototype.getModel = function (e, n) {
  7450. var i = null != e,
  7451. r = i ? this.parsePath(e) : null;
  7452. return new t(i ? this._doGet(r) : this.option, n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(r)), this.ecModel)
  7453. }, t.prototype.isEmpty = function () {
  7454. return null == this.option
  7455. }, t.prototype.restoreData = function () {}, t.prototype.clone = function () {
  7456. return new(0, this.constructor)(T(this.option))
  7457. }, t.prototype.parsePath = function (t) {
  7458. return "string" == typeof t ? t.split(".") : t
  7459. }, t.prototype.resolveParentPath = function (t) {
  7460. return t
  7461. }, t.prototype.isAnimationEnabled = function () {
  7462. if (!r.node && this.option) {
  7463. if (null != this.option.animation) return !!this.option.animation;
  7464. if (this.parentModel) return this.parentModel.isAnimationEnabled()
  7465. }
  7466. }, t.prototype._doGet = function (t, e) {
  7467. var n = this.option;
  7468. if (!t) return n;
  7469. for (var i = 0; i < t.length && (!t[i] || null != (n = n && "object" == typeof n ? n[t[i]] : null)); i++);
  7470. return null == n && e && (n = e._doGet(this.resolveParentPath(t), e.parentModel)), n
  7471. }, t
  7472. }();
  7473. $o(Cc), gc = Cc, yc = ["__\0is_clz", Qo++].join("_"), gc.prototype[yc] = !0, gc.isInstance = function (t) {
  7474. return !(!t || !t[yc])
  7475. }, R(Cc, Sc), R(Cc, Tc), R(Cc, oa), R(Cc, _c);
  7476. var Dc = Math.round(10 * Math.random());
  7477. function Ac(t) {
  7478. return [t || "", Dc++].join("_")
  7479. }
  7480. function kc(t, e) {
  7481. return C(C({}, t, !0), e, !0)
  7482. }
  7483. var Lc = "ZH",
  7484. Pc = "EN",
  7485. Oc = Pc,
  7486. Rc = {},
  7487. Nc = {},
  7488. Ec = r.domSupported && (document.documentElement.lang || navigator.language || navigator.browserLanguage || Oc).toUpperCase().indexOf(Lc) > -1 ? Lc : Oc;
  7489. function zc(t, e) {
  7490. t = t.toUpperCase(), Nc[t] = new Cc(e), Rc[t] = e
  7491. }
  7492. function Vc(t) {
  7493. return Nc[t]
  7494. }
  7495. zc(Pc, {
  7496. time: {
  7497. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  7498. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  7499. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  7500. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  7501. },
  7502. legend: {
  7503. selector: {
  7504. all: "All",
  7505. inverse: "Inv"
  7506. }
  7507. },
  7508. toolbox: {
  7509. brush: {
  7510. title: {
  7511. rect: "Box Select",
  7512. polygon: "Lasso Select",
  7513. lineX: "Horizontally Select",
  7514. lineY: "Vertically Select",
  7515. keep: "Keep Selections",
  7516. clear: "Clear Selections"
  7517. }
  7518. },
  7519. dataView: {
  7520. title: "Data View",
  7521. lang: ["Data View", "Close", "Refresh"]
  7522. },
  7523. dataZoom: {
  7524. title: {
  7525. zoom: "Zoom",
  7526. back: "Zoom Reset"
  7527. }
  7528. },
  7529. magicType: {
  7530. title: {
  7531. line: "Switch to Line Chart",
  7532. bar: "Switch to Bar Chart",
  7533. stack: "Stack",
  7534. tiled: "Tile"
  7535. }
  7536. },
  7537. restore: {
  7538. title: "Restore"
  7539. },
  7540. saveAsImage: {
  7541. title: "Save as Image",
  7542. lang: ["Right Click to Save Image"]
  7543. }
  7544. },
  7545. series: {
  7546. typeNames: {
  7547. pie: "Pie chart",
  7548. bar: "Bar chart",
  7549. line: "Line chart",
  7550. scatter: "Scatter plot",
  7551. effectScatter: "Ripple scatter plot",
  7552. radar: "Radar chart",
  7553. tree: "Tree",
  7554. treemap: "Treemap",
  7555. boxplot: "Boxplot",
  7556. candlestick: "Candlestick",
  7557. k: "K line chart",
  7558. heatmap: "Heat map",
  7559. map: "Map",
  7560. parallel: "Parallel coordinate map",
  7561. lines: "Line graph",
  7562. graph: "Relationship graph",
  7563. sankey: "Sankey diagram",
  7564. funnel: "Funnel chart",
  7565. gauge: "Gauge",
  7566. pictorialBar: "Pictorial bar",
  7567. themeRiver: "Theme River Map",
  7568. sunburst: "Sunburst",
  7569. custom: "Custom chart",
  7570. chart: "Chart"
  7571. }
  7572. },
  7573. aria: {
  7574. general: {
  7575. withTitle: 'This is a chart about "{title}"',
  7576. withoutTitle: "This is a chart"
  7577. },
  7578. series: {
  7579. single: {
  7580. prefix: "",
  7581. withName: " with type {seriesType} named {seriesName}.",
  7582. withoutName: " with type {seriesType}."
  7583. },
  7584. multiple: {
  7585. prefix: ". It consists of {seriesCount} series count.",
  7586. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  7587. withoutName: " The {seriesId} series is a {seriesType}.",
  7588. separator: {
  7589. middle: "",
  7590. end: ""
  7591. }
  7592. }
  7593. },
  7594. data: {
  7595. allData: "The data is as follows: ",
  7596. partialData: "The first {displayCnt} items are: ",
  7597. withName: "the data for {name} is {value}",
  7598. withoutName: "{value}",
  7599. separator: {
  7600. middle: ", ",
  7601. end: ". "
  7602. }
  7603. }
  7604. }
  7605. }), zc(Lc, {
  7606. time: {
  7607. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  7608. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  7609. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  7610. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  7611. },
  7612. legend: {
  7613. selector: {
  7614. all: "全选",
  7615. inverse: "反选"
  7616. }
  7617. },
  7618. toolbox: {
  7619. brush: {
  7620. title: {
  7621. rect: "矩形选择",
  7622. polygon: "圈选",
  7623. lineX: "横向选择",
  7624. lineY: "纵向选择",
  7625. keep: "保持选择",
  7626. clear: "清除选择"
  7627. }
  7628. },
  7629. dataView: {
  7630. title: "数据视图",
  7631. lang: ["数据视图", "关闭", "刷新"]
  7632. },
  7633. dataZoom: {
  7634. title: {
  7635. zoom: "区域缩放",
  7636. back: "区域缩放还原"
  7637. }
  7638. },
  7639. magicType: {
  7640. title: {
  7641. line: "切换为折线图",
  7642. bar: "切换为柱状图",
  7643. stack: "切换为堆叠",
  7644. tiled: "切换为平铺"
  7645. }
  7646. },
  7647. restore: {
  7648. title: "还原"
  7649. },
  7650. saveAsImage: {
  7651. title: "保存为图片",
  7652. lang: ["右键另存为图片"]
  7653. }
  7654. },
  7655. series: {
  7656. typeNames: {
  7657. pie: "饼图",
  7658. bar: "柱状图",
  7659. line: "折线图",
  7660. scatter: "散点图",
  7661. effectScatter: "涟漪散点图",
  7662. radar: "雷达图",
  7663. tree: "树图",
  7664. treemap: "矩形树图",
  7665. boxplot: "箱型图",
  7666. candlestick: "K线图",
  7667. k: "K线图",
  7668. heatmap: "热力图",
  7669. map: "地图",
  7670. parallel: "平行坐标图",
  7671. lines: "线图",
  7672. graph: "关系图",
  7673. sankey: "桑基图",
  7674. funnel: "漏斗图",
  7675. gauge: "仪表盘图",
  7676. pictorialBar: "象形柱图",
  7677. themeRiver: "主题河流图",
  7678. sunburst: "旭日图",
  7679. custom: "自定义图表",
  7680. chart: "图表"
  7681. }
  7682. },
  7683. aria: {
  7684. general: {
  7685. withTitle: "这是一个关于“{title}”的图表。",
  7686. withoutTitle: "这是一个图表,"
  7687. },
  7688. series: {
  7689. single: {
  7690. prefix: "",
  7691. withName: "图表类型是{seriesType},表示{seriesName}。",
  7692. withoutName: "图表类型是{seriesType}。"
  7693. },
  7694. multiple: {
  7695. prefix: "它由{seriesCount}个图表系列组成。",
  7696. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  7697. withoutName: "第{seriesId}个系列是一个{seriesType},",
  7698. separator: {
  7699. middle: ";",
  7700. end: "。"
  7701. }
  7702. }
  7703. },
  7704. data: {
  7705. allData: "其数据是——",
  7706. partialData: "其中,前{displayCnt}项是——",
  7707. withName: "{name}的数据是{value}",
  7708. withoutName: "{value}",
  7709. separator: {
  7710. middle: ",",
  7711. end: ""
  7712. }
  7713. }
  7714. }
  7715. });
  7716. var Bc = 1e3,
  7717. Fc = 6e4,
  7718. Gc = 36e5,
  7719. Wc = 864e5,
  7720. Hc = 31536e6,
  7721. Yc = {
  7722. year: "{yyyy}",
  7723. month: "{MMM}",
  7724. day: "{d}",
  7725. hour: "{HH}:{mm}",
  7726. minute: "{HH}:{mm}",
  7727. second: "{HH}:{mm}:{ss}",
  7728. millisecond: "{HH}:{mm}:{ss} {SSS}",
  7729. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  7730. },
  7731. Xc = "{yyyy}-{MM}-{dd}",
  7732. Uc = {
  7733. year: "{yyyy}",
  7734. month: "{yyyy}-{MM}",
  7735. day: Xc,
  7736. hour: Xc + " " + Yc.hour,
  7737. minute: Xc + " " + Yc.minute,
  7738. second: Xc + " " + Yc.second,
  7739. millisecond: Yc.none
  7740. },
  7741. Zc = ["year", "month", "day", "hour", "minute", "second", "millisecond"],
  7742. jc = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  7743. function qc(t, e) {
  7744. return "0000".substr(0, e - (t += "").length) + t
  7745. }
  7746. function Kc(t) {
  7747. switch (t) {
  7748. case "half-year":
  7749. case "quarter":
  7750. return "month";
  7751. case "week":
  7752. case "half-week":
  7753. return "day";
  7754. case "half-day":
  7755. case "quarter-day":
  7756. return "hour";
  7757. default:
  7758. return t
  7759. }
  7760. }
  7761. function $c(t) {
  7762. return t === Kc(t)
  7763. }
  7764. function Jc(t, e, n, i) {
  7765. var r = uo(t),
  7766. o = r[ep(n)](),
  7767. a = r[np(n)]() + 1,
  7768. s = Math.floor((a - 1) / 3) + 1,
  7769. l = r[ip(n)](),
  7770. u = r["get" + (n ? "UTC" : "") + "Day"](),
  7771. h = r[rp(n)](),
  7772. c = (h - 1) % 12 + 1,
  7773. p = r[op(n)](),
  7774. d = r[ap(n)](),
  7775. f = r[sp(n)](),
  7776. g = (i instanceof Cc ? i : Vc(i || Ec) || Nc[Oc]).getModel("time"),
  7777. y = g.get("month"),
  7778. v = g.get("monthAbbr"),
  7779. m = g.get("dayOfWeek"),
  7780. x = g.get("dayOfWeekAbbr");
  7781. return (e || "").replace(/{yyyy}/g, o + "").replace(/{yy}/g, qc(o % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, y[a - 1]).replace(/{MMM}/g, v[a - 1]).replace(/{MM}/g, qc(a, 2)).replace(/{M}/g, a + "").replace(/{dd}/g, qc(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, m[u]).replace(/{ee}/g, x[u]).replace(/{e}/g, u + "").replace(/{HH}/g, qc(h, 2)).replace(/{H}/g, h + "").replace(/{hh}/g, qc(c + "", 2)).replace(/{h}/g, c + "").replace(/{mm}/g, qc(p, 2)).replace(/{m}/g, p + "").replace(/{ss}/g, qc(d, 2)).replace(/{s}/g, d + "").replace(/{SSS}/g, qc(f, 3)).replace(/{S}/g, f + "")
  7782. }
  7783. function Qc(t, e) {
  7784. var n = uo(t),
  7785. i = n[np(e)]() + 1,
  7786. r = n[ip(e)](),
  7787. o = n[rp(e)](),
  7788. a = n[op(e)](),
  7789. s = n[ap(e)](),
  7790. l = 0 === n[sp(e)](),
  7791. u = l && 0 === s,
  7792. h = u && 0 === a,
  7793. c = h && 0 === o,
  7794. p = c && 1 === r;
  7795. return p && 1 === i ? "year" : p ? "month" : c ? "day" : h ? "hour" : u ? "minute" : l ? "second" : "millisecond"
  7796. }
  7797. function tp(t, e, n) {
  7798. var i = j(t) ? uo(t) : t;
  7799. switch (e = e || Qc(t, n)) {
  7800. case "year":
  7801. return i[ep(n)]();
  7802. case "half-year":
  7803. return i[np(n)]() >= 6 ? 1 : 0;
  7804. case "quarter":
  7805. return Math.floor((i[np(n)]() + 1) / 4);
  7806. case "month":
  7807. return i[np(n)]();
  7808. case "day":
  7809. return i[ip(n)]();
  7810. case "half-day":
  7811. return i[rp(n)]() / 24;
  7812. case "hour":
  7813. return i[rp(n)]();
  7814. case "minute":
  7815. return i[op(n)]();
  7816. case "second":
  7817. return i[ap(n)]();
  7818. case "millisecond":
  7819. return i[sp(n)]()
  7820. }
  7821. }
  7822. function ep(t) {
  7823. return t ? "getUTCFullYear" : "getFullYear"
  7824. }
  7825. function np(t) {
  7826. return t ? "getUTCMonth" : "getMonth"
  7827. }
  7828. function ip(t) {
  7829. return t ? "getUTCDate" : "getDate"
  7830. }
  7831. function rp(t) {
  7832. return t ? "getUTCHours" : "getHours"
  7833. }
  7834. function op(t) {
  7835. return t ? "getUTCMinutes" : "getMinutes"
  7836. }
  7837. function ap(t) {
  7838. return t ? "getUTCSeconds" : "getSeconds"
  7839. }
  7840. function sp(t) {
  7841. return t ? "getUTCMilliseconds" : "getMilliseconds"
  7842. }
  7843. function lp(t) {
  7844. return t ? "setUTCFullYear" : "setFullYear"
  7845. }
  7846. function up(t) {
  7847. return t ? "setUTCMonth" : "setMonth"
  7848. }
  7849. function hp(t) {
  7850. return t ? "setUTCDate" : "setDate"
  7851. }
  7852. function cp(t) {
  7853. return t ? "setUTCHours" : "setHours"
  7854. }
  7855. function pp(t) {
  7856. return t ? "setUTCMinutes" : "setMinutes"
  7857. }
  7858. function dp(t) {
  7859. return t ? "setUTCSeconds" : "setSeconds"
  7860. }
  7861. function fp(t) {
  7862. return t ? "setUTCMilliseconds" : "setMilliseconds"
  7863. }
  7864. function gp(t) {
  7865. if (!vo(t)) return U(t) ? t : "-";
  7866. var e = (t + "").split(".");
  7867. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "")
  7868. }
  7869. function yp(t, e) {
  7870. return t = (t || "").toLowerCase().replace(/-(.)/g, (function (t, e) {
  7871. return e.toUpperCase()
  7872. })), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t
  7873. }
  7874. var vp = st;
  7875. function mp(t, e, n) {
  7876. function i(t) {
  7877. return t && ut(t) ? t : "-"
  7878. }
  7879. function r(t) {
  7880. return !(null == t || isNaN(t) || !isFinite(t))
  7881. }
  7882. var o = "time" === e,
  7883. a = t instanceof Date;
  7884. if (o || a) {
  7885. var s = o ? uo(t) : t;
  7886. if (!isNaN(+s)) return Jc(s, "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}", n);
  7887. if (a) return "-"
  7888. }
  7889. if ("ordinal" === e) return Z(t) ? i(t) : j(t) && r(t) ? t + "" : "-";
  7890. var l = yo(t);
  7891. return r(l) ? gp(l) : Z(t) ? i(t) : "boolean" == typeof t ? t + "" : "-"
  7892. }
  7893. var xp = ["a", "b", "c", "d", "e", "f", "g"],
  7894. _p = function (t, e) {
  7895. return "{" + t + (null == e ? "" : e) + "}"
  7896. };
  7897. function bp(t, e, n) {
  7898. Y(e) || (e = [e]);
  7899. var i = e.length;
  7900. if (!i) return "";
  7901. for (var r = e[0].$vars || [], o = 0; o < r.length; o++) {
  7902. var a = xp[o];
  7903. t = t.replace(_p(a), _p(a, 0))
  7904. }
  7905. for (var s = 0; s < i; s++)
  7906. for (var l = 0; l < r.length; l++) {
  7907. var u = e[s][r[l]];
  7908. t = t.replace(_p(xp[l], s), n ? re(u) : u)
  7909. }
  7910. return t
  7911. }
  7912. function wp(t, e) {
  7913. var n = U(t) ? {
  7914. color: t,
  7915. extraCssText: e
  7916. } : t || {},
  7917. i = n.color,
  7918. r = n.type;
  7919. e = n.extraCssText;
  7920. var o = n.renderMode || "html";
  7921. return i ? "html" === o ? "subItem" === r ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + re(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + re(i) + ";" + (e || "") + '"></span>' : {
  7922. renderMode: o,
  7923. content: "{" + (n.markerId || "markerX") + "|} ",
  7924. style: "subItem" === r ? {
  7925. width: 4,
  7926. height: 4,
  7927. borderRadius: 2,
  7928. backgroundColor: i
  7929. } : {
  7930. width: 10,
  7931. height: 10,
  7932. borderRadius: 5,
  7933. backgroundColor: i
  7934. }
  7935. } : ""
  7936. }
  7937. function Sp(t, e) {
  7938. return e = e || "transparent", U(t) ? t : q(t) && t.colorStops && (t.colorStops[0] || {}).color || e
  7939. }
  7940. function Mp(t, e) {
  7941. if ("_blank" === e || "blank" === e) {
  7942. var n = window.open();
  7943. n.opener = null, n.location.href = t
  7944. } else window.open(t, e)
  7945. }
  7946. var Ip = E,
  7947. Tp = ["left", "right", "top", "bottom", "width", "height"],
  7948. Cp = [
  7949. ["width", "left", "right"],
  7950. ["height", "top", "bottom"]
  7951. ];
  7952. function Dp(t, e, n, i, r) {
  7953. var o = 0,
  7954. a = 0;
  7955. null == i && (i = 1 / 0), null == r && (r = 1 / 0);
  7956. var s = 0;
  7957. e.eachChild((function (l, u) {
  7958. var h, c, p = l.getBoundingRect(),
  7959. d = e.childAt(u + 1),
  7960. f = d && d.getBoundingRect();
  7961. if ("horizontal" === t) {
  7962. var g = p.width + (f ? -f.x + p.x : 0);
  7963. (h = o + g) > i || l.newline ? (o = 0, h = g, a += s + n, s = p.height) : s = Math.max(s, p.height)
  7964. } else {
  7965. var y = p.height + (f ? -f.y + p.y : 0);
  7966. (c = a + y) > r || l.newline ? (o += s + n, a = 0, c = y, s = p.width) : s = Math.max(s, p.width)
  7967. }
  7968. l.newline || (l.x = o, l.y = a, l.markRedraw(), "horizontal" === t ? o = h + n : a = c + n)
  7969. }))
  7970. }
  7971. var Ap = Dp;
  7972. H(Dp, "vertical"), H(Dp, "horizontal");
  7973. function kp(t, e, n) {
  7974. n = vp(n || 0);
  7975. var i = e.width,
  7976. r = e.height,
  7977. o = $r(t.left, i),
  7978. a = $r(t.top, r),
  7979. s = $r(t.right, i),
  7980. l = $r(t.bottom, r),
  7981. u = $r(t.width, i),
  7982. h = $r(t.height, r),
  7983. c = n[2] + n[0],
  7984. p = n[1] + n[3],
  7985. d = t.aspect;
  7986. switch (isNaN(u) && (u = i - s - p - o), isNaN(h) && (h = r - l - c - a), null != d && (isNaN(u) && isNaN(h) && (d > i / r ? u = .8 * i : h = .8 * r), isNaN(u) && (u = d * h), isNaN(h) && (h = u / d)), isNaN(o) && (o = i - s - u - p), isNaN(a) && (a = r - l - h - c), t.left || t.right) {
  7987. case "center":
  7988. o = i / 2 - u / 2 - n[3];
  7989. break;
  7990. case "right":
  7991. o = i - u - p
  7992. }
  7993. switch (t.top || t.bottom) {
  7994. case "middle":
  7995. case "center":
  7996. a = r / 2 - h / 2 - n[0];
  7997. break;
  7998. case "bottom":
  7999. a = r - h - c
  8000. }
  8001. o = o || 0, a = a || 0, isNaN(u) && (u = i - p - o - (s || 0)), isNaN(h) && (h = r - c - a - (l || 0));
  8002. var f = new ze(o + n[3], a + n[0], u, h);
  8003. return f.margin = n, f
  8004. }
  8005. function Lp(t, e, n, i, r, o) {
  8006. var a, s = !r || !r.hv || r.hv[0],
  8007. l = !r || !r.hv || r.hv[1],
  8008. u = r && r.boundingMode || "all";
  8009. if ((o = o || t).x = t.x, o.y = t.y, !s && !l) return !1;
  8010. if ("raw" === u) a = "group" === t.type ? new ze(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  8011. else if (a = t.getBoundingRect(), t.needLocalTransform()) {
  8012. var h = t.getLocalTransform();
  8013. (a = a.clone()).applyTransform(h)
  8014. }
  8015. var c = kp(k({
  8016. width: a.width,
  8017. height: a.height
  8018. }, e), n, i),
  8019. p = s ? c.x - a.x : 0,
  8020. d = l ? c.y - a.y : 0;
  8021. return "raw" === u ? (o.x = p, o.y = d) : (o.x += p, o.y += d), o === t && t.markRedraw(), !0
  8022. }
  8023. function Pp(t) {
  8024. var e = t.layoutMode || t.constructor.layoutMode;
  8025. return q(e) ? e : e ? {
  8026. type: e
  8027. } : null
  8028. }
  8029. function Op(t, e, n) {
  8030. var i = n && n.ignoreSize;
  8031. !Y(i) && (i = [i, i]);
  8032. var r = a(Cp[0], 0),
  8033. o = a(Cp[1], 1);
  8034. function a(n, r) {
  8035. var o = {},
  8036. a = 0,
  8037. u = {},
  8038. h = 0;
  8039. if (Ip(n, (function (e) {
  8040. u[e] = t[e]
  8041. })), Ip(n, (function (t) {
  8042. s(e, t) && (o[t] = u[t] = e[t]), l(o, t) && a++, l(u, t) && h++
  8043. })), i[r]) return l(e, n[1]) ? u[n[2]] = null : l(e, n[2]) && (u[n[1]] = null), u;
  8044. if (2 !== h && a) {
  8045. if (a >= 2) return o;
  8046. for (var c = 0; c < n.length; c++) {
  8047. var p = n[c];
  8048. if (!s(o, p) && s(t, p)) {
  8049. o[p] = t[p];
  8050. break
  8051. }
  8052. }
  8053. return o
  8054. }
  8055. return u
  8056. }
  8057. function s(t, e) {
  8058. return t.hasOwnProperty(e)
  8059. }
  8060. function l(t, e) {
  8061. return null != t[e] && "auto" !== t[e]
  8062. }
  8063. function u(t, e, n) {
  8064. Ip(t, (function (t) {
  8065. e[t] = n[t]
  8066. }))
  8067. }
  8068. u(Cp[0], t, r), u(Cp[1], t, o)
  8069. }
  8070. function Rp(t) {
  8071. return Np({}, t)
  8072. }
  8073. function Np(t, e) {
  8074. return e && t && Ip(Tp, (function (n) {
  8075. e.hasOwnProperty(n) && (t[n] = e[n])
  8076. })), t
  8077. }
  8078. var Ep = Vo(),
  8079. zp = function (t) {
  8080. function e(e, n, i) {
  8081. var r = t.call(this, e, n, i) || this;
  8082. return r.uid = Ac("ec_cpt_model"), r
  8083. }
  8084. return n(e, t), e.prototype.init = function (t, e, n) {
  8085. this.mergeDefaultAndTheme(t, n)
  8086. }, e.prototype.mergeDefaultAndTheme = function (t, e) {
  8087. var n = Pp(this),
  8088. i = n ? Rp(t) : {};
  8089. C(t, e.getTheme().get(this.mainType)), C(t, this.getDefaultOption()), n && Op(t, i, n)
  8090. }, e.prototype.mergeOption = function (t, e) {
  8091. C(this.option, t, !0);
  8092. var n = Pp(this);
  8093. n && Op(this.option, t, n)
  8094. }, e.prototype.optionUpdated = function (t, e) {}, e.prototype.getDefaultOption = function () {
  8095. var t = this.constructor;
  8096. if (! function (t) {
  8097. return !(!t || !t[qo])
  8098. }(t)) return t.defaultOption;
  8099. var e = Ep(this);
  8100. if (!e.defaultOption) {
  8101. for (var n = [], i = t; i;) {
  8102. var r = i.prototype.defaultOption;
  8103. r && n.push(r), i = i.superClass
  8104. }
  8105. for (var o = {}, a = n.length - 1; a >= 0; a--) o = C(o, n[a], !0);
  8106. e.defaultOption = o
  8107. }
  8108. return e.defaultOption
  8109. }, e.prototype.getReferringComponents = function (t, e) {
  8110. var n = t + "Index",
  8111. i = t + "Id";
  8112. return Yo(this.ecModel, t, {
  8113. index: this.get(n, !0),
  8114. id: this.get(i, !0)
  8115. }, e)
  8116. }, e.prototype.getBoxLayoutParams = function () {
  8117. var t = this;
  8118. return {
  8119. left: t.get("left"),
  8120. top: t.get("top"),
  8121. right: t.get("right"),
  8122. bottom: t.get("bottom"),
  8123. width: t.get("width"),
  8124. height: t.get("height")
  8125. }
  8126. }, e.prototype.getZLevelKey = function () {
  8127. return ""
  8128. }, e.prototype.setZLevel = function (t) {
  8129. this.option.zlevel = t
  8130. }, e.protoInitialize = function () {
  8131. var t = e.prototype;
  8132. t.type = "component", t.id = "", t.name = "", t.mainType = "", t.subType = "", t.componentIndex = 0
  8133. }(), e
  8134. }(Cc);
  8135. Jo(zp, Cc), na(zp),
  8136. function (t) {
  8137. var e = {};
  8138. t.registerSubTypeDefaulter = function (t, n) {
  8139. var i = Ko(t);
  8140. e[i.main] = n
  8141. }, t.determineSubType = function (n, i) {
  8142. var r = i.type;
  8143. if (!r) {
  8144. var o = Ko(n).main;
  8145. t.hasSubTypes(n) && e[o] && (r = e[o](i))
  8146. }
  8147. return r
  8148. }
  8149. }(zp),
  8150. function (t, e) {
  8151. function n(t, e) {
  8152. return t[e] || (t[e] = {
  8153. predecessor: [],
  8154. successor: []
  8155. }), t[e]
  8156. }
  8157. t.topologicalTravel = function (t, i, r, o) {
  8158. if (t.length) {
  8159. var a = function (t) {
  8160. var i = {},
  8161. r = [];
  8162. return E(t, (function (o) {
  8163. var a = n(i, o),
  8164. s = function (t, e) {
  8165. var n = [];
  8166. return E(t, (function (t) {
  8167. P(e, t) >= 0 && n.push(t)
  8168. })), n
  8169. }(a.originalDeps = e(o), t);
  8170. a.entryCount = s.length, 0 === a.entryCount && r.push(o), E(s, (function (t) {
  8171. P(a.predecessor, t) < 0 && a.predecessor.push(t);
  8172. var e = n(i, t);
  8173. P(e.successor, t) < 0 && e.successor.push(o)
  8174. }))
  8175. })), {
  8176. graph: i,
  8177. noEntryList: r
  8178. }
  8179. }(i),
  8180. s = a.graph,
  8181. l = a.noEntryList,
  8182. u = {};
  8183. for (E(t, (function (t) {
  8184. u[t] = !0
  8185. })); l.length;) {
  8186. var h = l.pop(),
  8187. c = s[h],
  8188. p = !!u[h];
  8189. p && (r.call(o, h, c.originalDeps.slice()), delete u[h]), E(c.successor, p ? f : d)
  8190. }
  8191. E(u, (function () {
  8192. var t = "";
  8193. throw new Error(t)
  8194. }))
  8195. }
  8196. function d(t) {
  8197. s[t].entryCount--, 0 === s[t].entryCount && l.push(t)
  8198. }
  8199. function f(t) {
  8200. u[t] = !0, d(t)
  8201. }
  8202. }
  8203. }(zp, (function (t) {
  8204. var e = [];
  8205. E(zp.getClassesByMainType(t), (function (t) {
  8206. e = e.concat(t.dependencies || t.prototype.dependencies || [])
  8207. })), e = z(e, (function (t) {
  8208. return Ko(t).main
  8209. })), "dataset" !== t && P(e, "dataset") <= 0 && e.unshift("dataset");
  8210. return e
  8211. }));
  8212. var Vp = "";
  8213. "undefined" != typeof navigator && (Vp = navigator.platform || "");
  8214. var Bp = "rgba(0, 0, 0, 0.2)",
  8215. Fp = {
  8216. darkMode: "auto",
  8217. colorBy: "series",
  8218. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  8219. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  8220. aria: {
  8221. decal: {
  8222. decals: [{
  8223. color: Bp,
  8224. dashArrayX: [1, 0],
  8225. dashArrayY: [2, 5],
  8226. symbolSize: 1,
  8227. rotation: Math.PI / 6
  8228. }, {
  8229. color: Bp,
  8230. symbol: "circle",
  8231. dashArrayX: [
  8232. [8, 8],
  8233. [0, 8, 8, 0]
  8234. ],
  8235. dashArrayY: [6, 0],
  8236. symbolSize: .8
  8237. }, {
  8238. color: Bp,
  8239. dashArrayX: [1, 0],
  8240. dashArrayY: [4, 3],
  8241. rotation: -Math.PI / 4
  8242. }, {
  8243. color: Bp,
  8244. dashArrayX: [
  8245. [6, 6],
  8246. [0, 6, 6, 0]
  8247. ],
  8248. dashArrayY: [6, 0]
  8249. }, {
  8250. color: Bp,
  8251. dashArrayX: [
  8252. [1, 0],
  8253. [1, 6]
  8254. ],
  8255. dashArrayY: [1, 0, 6, 0],
  8256. rotation: Math.PI / 4
  8257. }, {
  8258. color: Bp,
  8259. symbol: "triangle",
  8260. dashArrayX: [
  8261. [9, 9],
  8262. [0, 9, 9, 0]
  8263. ],
  8264. dashArrayY: [7, 2],
  8265. symbolSize: .75
  8266. }]
  8267. }
  8268. },
  8269. textStyle: {
  8270. fontFamily: Vp.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  8271. fontSize: 12,
  8272. fontStyle: "normal",
  8273. fontWeight: "normal"
  8274. },
  8275. blendMode: null,
  8276. stateAnimation: {
  8277. duration: 300,
  8278. easing: "cubicOut"
  8279. },
  8280. animation: "auto",
  8281. animationDuration: 1e3,
  8282. animationDurationUpdate: 500,
  8283. animationEasing: "cubicInOut",
  8284. animationEasingUpdate: "cubicInOut",
  8285. animationThreshold: 2e3,
  8286. progressiveThreshold: 3e3,
  8287. progressive: 400,
  8288. hoverLayerThreshold: 3e3,
  8289. useUTC: !1
  8290. },
  8291. Gp = yt(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]),
  8292. Wp = "original",
  8293. Hp = "arrayRows",
  8294. Yp = "objectRows",
  8295. Xp = "keyedColumns",
  8296. Up = "typedArray",
  8297. Zp = "unknown",
  8298. jp = "column",
  8299. qp = "row",
  8300. Kp = 1,
  8301. $p = 2,
  8302. Jp = 3,
  8303. Qp = Vo();
  8304. function td(t, e, n) {
  8305. var i = {},
  8306. r = nd(e);
  8307. if (!r || !t) return i;
  8308. var o, a, s = [],
  8309. l = [],
  8310. u = e.ecModel,
  8311. h = Qp(u).datasetMap,
  8312. c = r.uid + "_" + n.seriesLayoutBy;
  8313. E(t = t.slice(), (function (e, n) {
  8314. var r = q(e) ? e : t[n] = {
  8315. name: e
  8316. };
  8317. "ordinal" === r.type && null == o && (o = n, a = f(r)), i[r.name] = []
  8318. }));
  8319. var p = h.get(c) || h.set(c, {
  8320. categoryWayDim: a,
  8321. valueWayDim: 0
  8322. });
  8323. function d(t, e, n) {
  8324. for (var i = 0; i < n; i++) t.push(e + i)
  8325. }
  8326. function f(t) {
  8327. var e = t.dimsDef;
  8328. return e ? e.length : 1
  8329. }
  8330. return E(t, (function (t, e) {
  8331. var n = t.name,
  8332. r = f(t);
  8333. if (null == o) {
  8334. var a = p.valueWayDim;
  8335. d(i[n], a, r), d(l, a, r), p.valueWayDim += r
  8336. } else if (o === e) d(i[n], 0, r), d(s, 0, r);
  8337. else {
  8338. a = p.categoryWayDim;
  8339. d(i[n], a, r), d(l, a, r), p.categoryWayDim += r
  8340. }
  8341. })), s.length && (i.itemName = s), l.length && (i.seriesName = l), i
  8342. }
  8343. function ed(t, e, n) {
  8344. var i = {};
  8345. if (!nd(t)) return i;
  8346. var r, o = e.sourceFormat,
  8347. a = e.dimensionsDefine;
  8348. o !== Yp && o !== Xp || E(a, (function (t, e) {
  8349. "name" === (q(t) ? t.name : t) && (r = e)
  8350. }));
  8351. var s = function () {
  8352. for (var t = {}, i = {}, s = [], l = 0, u = Math.min(5, n); l < u; l++) {
  8353. var h = rd(e.data, o, e.seriesLayoutBy, a, e.startIndex, l);
  8354. s.push(h);
  8355. var c = h === Jp;
  8356. if (c && null == t.v && l !== r && (t.v = l), (null == t.n || t.n === t.v || !c && s[t.n] === Jp) && (t.n = l), p(t) && s[t.n] !== Jp) return t;
  8357. c || (h === $p && null == i.v && l !== r && (i.v = l), null != i.n && i.n !== i.v || (i.n = l))
  8358. }
  8359. function p(t) {
  8360. return null != t.v && null != t.n
  8361. }
  8362. return p(t) ? t : p(i) ? i : null
  8363. }();
  8364. if (s) {
  8365. i.value = [s.v];
  8366. var l = null != r ? r : s.n;
  8367. i.itemName = [l], i.seriesName = [l]
  8368. }
  8369. return i
  8370. }
  8371. function nd(t) {
  8372. if (!t.get("data", !0)) return Yo(t.ecModel, "dataset", {
  8373. index: t.get("datasetIndex", !0),
  8374. id: t.get("datasetId", !0)
  8375. }, Wo).models[0]
  8376. }
  8377. function id(t, e) {
  8378. return rd(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e)
  8379. }
  8380. function rd(t, e, n, i, r, o) {
  8381. var a, s, l;
  8382. if ($(t)) return Jp;
  8383. if (i) {
  8384. var u = i[o];
  8385. q(u) ? (s = u.name, l = u.type) : U(u) && (s = u)
  8386. }
  8387. if (null != l) return "ordinal" === l ? Kp : Jp;
  8388. if (e === Hp) {
  8389. var h = t;
  8390. if (n === qp) {
  8391. for (var c = h[o], p = 0; p < (c || []).length && p < 5; p++)
  8392. if (null != (a = m(c[r + p]))) return a
  8393. } else
  8394. for (p = 0; p < h.length && p < 5; p++) {
  8395. var d = h[r + p];
  8396. if (d && null != (a = m(d[o]))) return a
  8397. }
  8398. } else if (e === Yp) {
  8399. var f = t;
  8400. if (!s) return Jp;
  8401. for (p = 0; p < f.length && p < 5; p++) {
  8402. if ((y = f[p]) && null != (a = m(y[s]))) return a
  8403. }
  8404. } else if (e === Xp) {
  8405. if (!s) return Jp;
  8406. if (!(c = t[s]) || $(c)) return Jp;
  8407. for (p = 0; p < c.length && p < 5; p++)
  8408. if (null != (a = m(c[p]))) return a
  8409. } else if (e === Wp) {
  8410. var g = t;
  8411. for (p = 0; p < g.length && p < 5; p++) {
  8412. var y, v = Ao(y = g[p]);
  8413. if (!Y(v)) return Jp;
  8414. if (null != (a = m(v[o]))) return a
  8415. }
  8416. }
  8417. function m(t) {
  8418. var e = U(t);
  8419. return null != t && isFinite(t) && "" !== t ? e ? $p : Jp : e && "-" !== t ? Kp : void 0
  8420. }
  8421. return Jp
  8422. }
  8423. var od = yt();
  8424. var ad, sd, ld, ud = Vo(),
  8425. hd = Vo(),
  8426. cd = function () {
  8427. function t() {}
  8428. return t.prototype.getColorFromPalette = function (t, e, n) {
  8429. var i = To(this.get("color", !0)),
  8430. r = this.get("colorLayer", !0);
  8431. return dd(this, ud, i, r, t, e, n)
  8432. }, t.prototype.clearColorPalette = function () {
  8433. ! function (t, e) {
  8434. e(t).paletteIdx = 0, e(t).paletteNameMap = {}
  8435. }(this, ud)
  8436. }, t
  8437. }();
  8438. function pd(t, e, n, i) {
  8439. var r = To(t.get(["aria", "decal", "decals"]));
  8440. return dd(t, hd, r, null, e, n, i)
  8441. }
  8442. function dd(t, e, n, i, r, o, a) {
  8443. var s = e(o = o || t),
  8444. l = s.paletteIdx || 0,
  8445. u = s.paletteNameMap = s.paletteNameMap || {};
  8446. if (u.hasOwnProperty(r)) return u[r];
  8447. var h = null != a && i ? function (t, e) {
  8448. for (var n = t.length, i = 0; i < n; i++)
  8449. if (t[i].length > e) return t[i];
  8450. return t[n - 1]
  8451. }(i, a) : n;
  8452. if ((h = h || n) && h.length) {
  8453. var c = h[l];
  8454. return r && (u[r] = c), s.paletteIdx = (l + 1) % h.length, c
  8455. }
  8456. }
  8457. var fd = "\0_ec_inner";
  8458. var gd = function (t) {
  8459. function e() {
  8460. return null !== t && t.apply(this, arguments) || this
  8461. }
  8462. return n(e, t), e.prototype.init = function (t, e, n, i, r, o) {
  8463. i = i || {}, this.option = null, this._theme = new Cc(i), this._locale = new Cc(r), this._optionManager = o
  8464. }, e.prototype.setOption = function (t, e, n) {
  8465. var i = md(e);
  8466. this._optionManager.setOption(t, n, i), this._resetOption(null, i)
  8467. }, e.prototype.resetOption = function (t, e) {
  8468. return this._resetOption(t, md(e))
  8469. }, e.prototype._resetOption = function (t, e) {
  8470. var n = !1,
  8471. i = this._optionManager;
  8472. if (!t || "recreate" === t) {
  8473. var r = i.mountOption("recreate" === t);
  8474. 0, this.option && "recreate" !== t ? (this.restoreData(), this._mergeOption(r, e)) : ld(this, r), n = !0
  8475. }
  8476. if ("timeline" !== t && "media" !== t || this.restoreData(), !t || "recreate" === t || "timeline" === t) {
  8477. var o = i.getTimelineOption(this);
  8478. o && (n = !0, this._mergeOption(o, e))
  8479. }
  8480. if (!t || "recreate" === t || "media" === t) {
  8481. var a = i.getMediaOption(this);
  8482. a.length && E(a, (function (t) {
  8483. n = !0, this._mergeOption(t, e)
  8484. }), this)
  8485. }
  8486. return n
  8487. }, e.prototype.mergeOption = function (t) {
  8488. this._mergeOption(t, null)
  8489. }, e.prototype._mergeOption = function (t, e) {
  8490. var n = this.option,
  8491. i = this._componentsMap,
  8492. r = this._componentsCount,
  8493. o = [],
  8494. a = yt(),
  8495. s = e && e.replaceMergeMainTypeMap;
  8496. Qp(this).datasetMap = yt(), E(t, (function (t, e) {
  8497. null != t && (zp.hasClass(e) ? e && (o.push(e), a.set(e, !0)) : n[e] = null == n[e] ? T(t) : C(n[e], t, !0))
  8498. })), s && s.each((function (t, e) {
  8499. zp.hasClass(e) && !a.get(e) && (o.push(e), a.set(e, !0))
  8500. })), zp.topologicalTravel(o, zp.getAllClassMainTypes(), (function (e) {
  8501. var o = function (t, e, n) {
  8502. var i = od.get(e);
  8503. if (!i) return n;
  8504. var r = i(t);
  8505. return r ? n.concat(r) : n
  8506. }(this, e, To(t[e])),
  8507. a = i.get(e),
  8508. l = a ? s && s.get(e) ? "replaceMerge" : "normalMerge" : "replaceAll",
  8509. u = Lo(a, o, l);
  8510. (function (t, e, n) {
  8511. E(t, (function (t) {
  8512. var i = t.newOption;
  8513. q(i) && (t.keyInfo.mainType = e, t.keyInfo.subType = function (t, e, n, i) {
  8514. return e.type ? e.type : n ? n.subType : i.determineSubType(t, e)
  8515. }(e, i, t.existing, n))
  8516. }))
  8517. })(u, e, zp), n[e] = null, i.set(e, null), r.set(e, 0);
  8518. var h, c = [],
  8519. p = [],
  8520. d = 0;
  8521. E(u, (function (t, n) {
  8522. var i = t.existing,
  8523. r = t.newOption;
  8524. if (r) {
  8525. var o = "series" === e,
  8526. a = zp.getClass(e, t.keyInfo.subType, !o);
  8527. if (!a) return;
  8528. if ("tooltip" === e) {
  8529. if (h) return void 0;
  8530. h = !0
  8531. }
  8532. if (i && i.constructor === a) i.name = t.keyInfo.name, i.mergeOption(r, this), i.optionUpdated(r, !1);
  8533. else {
  8534. var s = A({
  8535. componentIndex: n
  8536. }, t.keyInfo);
  8537. A(i = new a(r, this, this, s), s), t.brandNew && (i.__requireNewView = !0), i.init(r, this, this), i.optionUpdated(null, !0)
  8538. }
  8539. } else i && (i.mergeOption({}, this), i.optionUpdated({}, !1));
  8540. i ? (c.push(i.option), p.push(i), d++) : (c.push(void 0), p.push(void 0))
  8541. }), this), n[e] = c, i.set(e, p), r.set(e, d), "series" === e && ad(this)
  8542. }), this), this._seriesIndices || ad(this)
  8543. }, e.prototype.getOption = function () {
  8544. var t = T(this.option);
  8545. return E(t, (function (e, n) {
  8546. if (zp.hasClass(n)) {
  8547. for (var i = To(e), r = i.length, o = !1, a = r - 1; a >= 0; a--) i[a] && !Eo(i[a]) ? o = !0 : (i[a] = null, !o && r--);
  8548. i.length = r, t[n] = i
  8549. }
  8550. })), delete t[fd], t
  8551. }, e.prototype.getTheme = function () {
  8552. return this._theme
  8553. }, e.prototype.getLocaleModel = function () {
  8554. return this._locale
  8555. }, e.prototype.setUpdatePayload = function (t) {
  8556. this._payload = t
  8557. }, e.prototype.getUpdatePayload = function () {
  8558. return this._payload
  8559. }, e.prototype.getComponent = function (t, e) {
  8560. var n = this._componentsMap.get(t);
  8561. if (n) {
  8562. var i = n[e || 0];
  8563. if (i) return i;
  8564. if (null == e)
  8565. for (var r = 0; r < n.length; r++)
  8566. if (n[r]) return n[r]
  8567. }
  8568. }, e.prototype.queryComponents = function (t) {
  8569. var e = t.mainType;
  8570. if (!e) return [];
  8571. var n, i = t.index,
  8572. r = t.id,
  8573. o = t.name,
  8574. a = this._componentsMap.get(e);
  8575. return a && a.length ? (null != i ? (n = [], E(To(i), (function (t) {
  8576. a[t] && n.push(a[t])
  8577. }))) : n = null != r ? yd("id", r, a) : null != o ? yd("name", o, a) : B(a, (function (t) {
  8578. return !!t
  8579. })), vd(n, t)) : []
  8580. }, e.prototype.findComponents = function (t) {
  8581. var e, n, i, r, o, a = t.query,
  8582. s = t.mainType,
  8583. l = (n = s + "Index", i = s + "Id", r = s + "Name", !(e = a) || null == e[n] && null == e[i] && null == e[r] ? null : {
  8584. mainType: s,
  8585. index: e[n],
  8586. id: e[i],
  8587. name: e[r]
  8588. }),
  8589. u = l ? this.queryComponents(l) : B(this._componentsMap.get(s), (function (t) {
  8590. return !!t
  8591. }));
  8592. return o = vd(u, t), t.filter ? B(o, t.filter) : o
  8593. }, e.prototype.eachComponent = function (t, e, n) {
  8594. var i = this._componentsMap;
  8595. if (X(t)) {
  8596. var r = e,
  8597. o = t;
  8598. i.each((function (t, e) {
  8599. for (var n = 0; t && n < t.length; n++) {
  8600. var i = t[n];
  8601. i && o.call(r, e, i, i.componentIndex)
  8602. }
  8603. }))
  8604. } else
  8605. for (var a = U(t) ? i.get(t) : q(t) ? this.findComponents(t) : null, s = 0; a && s < a.length; s++) {
  8606. var l = a[s];
  8607. l && e.call(n, l, l.componentIndex)
  8608. }
  8609. }, e.prototype.getSeriesByName = function (t) {
  8610. var e = Ro(t, null);
  8611. return B(this._componentsMap.get("series"), (function (t) {
  8612. return !!t && null != e && t.name === e
  8613. }))
  8614. }, e.prototype.getSeriesByIndex = function (t) {
  8615. return this._componentsMap.get("series")[t]
  8616. }, e.prototype.getSeriesByType = function (t) {
  8617. return B(this._componentsMap.get("series"), (function (e) {
  8618. return !!e && e.subType === t
  8619. }))
  8620. }, e.prototype.getSeries = function () {
  8621. return B(this._componentsMap.get("series"), (function (t) {
  8622. return !!t
  8623. }))
  8624. }, e.prototype.getSeriesCount = function () {
  8625. return this._componentsCount.get("series")
  8626. }, e.prototype.eachSeries = function (t, e) {
  8627. sd(this), E(this._seriesIndices, (function (n) {
  8628. var i = this._componentsMap.get("series")[n];
  8629. t.call(e, i, n)
  8630. }), this)
  8631. }, e.prototype.eachRawSeries = function (t, e) {
  8632. E(this._componentsMap.get("series"), (function (n) {
  8633. n && t.call(e, n, n.componentIndex)
  8634. }))
  8635. }, e.prototype.eachSeriesByType = function (t, e, n) {
  8636. sd(this), E(this._seriesIndices, (function (i) {
  8637. var r = this._componentsMap.get("series")[i];
  8638. r.subType === t && e.call(n, r, i)
  8639. }), this)
  8640. }, e.prototype.eachRawSeriesByType = function (t, e, n) {
  8641. return E(this.getSeriesByType(t), e, n)
  8642. }, e.prototype.isSeriesFiltered = function (t) {
  8643. return sd(this), null == this._seriesIndicesMap.get(t.componentIndex)
  8644. }, e.prototype.getCurrentSeriesIndices = function () {
  8645. return (this._seriesIndices || []).slice()
  8646. }, e.prototype.filterSeries = function (t, e) {
  8647. sd(this);
  8648. var n = [];
  8649. E(this._seriesIndices, (function (i) {
  8650. var r = this._componentsMap.get("series")[i];
  8651. t.call(e, r, i) && n.push(i)
  8652. }), this), this._seriesIndices = n, this._seriesIndicesMap = yt(n)
  8653. }, e.prototype.restoreData = function (t) {
  8654. ad(this);
  8655. var e = this._componentsMap,
  8656. n = [];
  8657. e.each((function (t, e) {
  8658. zp.hasClass(e) && n.push(e)
  8659. })), zp.topologicalTravel(n, zp.getAllClassMainTypes(), (function (n) {
  8660. E(e.get(n), (function (e) {
  8661. !e || "series" === n && function (t, e) {
  8662. if (e) {
  8663. var n = e.seriesIndex,
  8664. i = e.seriesId,
  8665. r = e.seriesName;
  8666. return null != n && t.componentIndex !== n || null != i && t.id !== i || null != r && t.name !== r
  8667. }
  8668. }(e, t) || e.restoreData()
  8669. }))
  8670. }))
  8671. }, e.internalField = (ad = function (t) {
  8672. var e = t._seriesIndices = [];
  8673. E(t._componentsMap.get("series"), (function (t) {
  8674. t && e.push(t.componentIndex)
  8675. })), t._seriesIndicesMap = yt(e)
  8676. }, sd = function (t) {}, void(ld = function (t, e) {
  8677. t.option = {}, t.option[fd] = 1, t._componentsMap = yt({
  8678. series: []
  8679. }), t._componentsCount = yt();
  8680. var n = e.aria;
  8681. q(n) && null == n.enabled && (n.enabled = !0),
  8682. function (t, e) {
  8683. var n = t.color && !t.colorLayer;
  8684. E(e, (function (e, i) {
  8685. "colorLayer" === i && n || zp.hasClass(i) || ("object" == typeof e ? t[i] = t[i] ? C(t[i], e, !1) : T(e) : null == t[i] && (t[i] = e))
  8686. }))
  8687. }(e, t._theme.option), C(e, Fp, !1), t._mergeOption(e, null)
  8688. })), e
  8689. }(Cc);
  8690. function yd(t, e, n) {
  8691. if (Y(e)) {
  8692. var i = yt();
  8693. return E(e, (function (t) {
  8694. null != t && (null != Ro(t, null) && i.set(t, !0))
  8695. })), B(n, (function (e) {
  8696. return e && i.get(e[t])
  8697. }))
  8698. }
  8699. var r = Ro(e, null);
  8700. return B(n, (function (e) {
  8701. return e && null != r && e[t] === r
  8702. }))
  8703. }
  8704. function vd(t, e) {
  8705. return e.hasOwnProperty("subType") ? B(t, (function (t) {
  8706. return t && t.subType === e.subType
  8707. })) : t
  8708. }
  8709. function md(t) {
  8710. var e = yt();
  8711. return t && E(To(t.replaceMerge), (function (t) {
  8712. e.set(t, !0)
  8713. })), {
  8714. replaceMergeMainTypeMap: e
  8715. }
  8716. }
  8717. R(gd, cd);
  8718. var xd = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isSSR", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getOption", "getId", "updateLabelLayout"],
  8719. _d = function (t) {
  8720. E(xd, (function (e) {
  8721. this[e] = W(t[e], t)
  8722. }), this)
  8723. },
  8724. bd = {},
  8725. wd = function () {
  8726. function t() {
  8727. this._coordinateSystems = []
  8728. }
  8729. return t.prototype.create = function (t, e) {
  8730. var n = [];
  8731. E(bd, (function (i, r) {
  8732. var o = i.create(t, e);
  8733. n = n.concat(o || [])
  8734. })), this._coordinateSystems = n
  8735. }, t.prototype.update = function (t, e) {
  8736. E(this._coordinateSystems, (function (n) {
  8737. n.update && n.update(t, e)
  8738. }))
  8739. }, t.prototype.getCoordinateSystems = function () {
  8740. return this._coordinateSystems.slice()
  8741. }, t.register = function (t, e) {
  8742. bd[t] = e
  8743. }, t.get = function (t) {
  8744. return bd[t]
  8745. }, t
  8746. }(),
  8747. Sd = /^(min|max)?(.+)$/,
  8748. Md = function () {
  8749. function t(t) {
  8750. this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = t
  8751. }
  8752. return t.prototype.setOption = function (t, e, n) {
  8753. t && (E(To(t.series), (function (t) {
  8754. t && t.data && $(t.data) && ct(t.data)
  8755. })), E(To(t.dataset), (function (t) {
  8756. t && t.source && $(t.source) && ct(t.source)
  8757. }))), t = T(t);
  8758. var i = this._optionBackup,
  8759. r = function (t, e, n) {
  8760. var i, r, o = [],
  8761. a = t.baseOption,
  8762. s = t.timeline,
  8763. l = t.options,
  8764. u = t.media,
  8765. h = !!t.media,
  8766. c = !!(l || s || a && a.timeline);
  8767. a ? (r = a).timeline || (r.timeline = s) : ((c || h) && (t.options = t.media = null), r = t);
  8768. h && Y(u) && E(u, (function (t) {
  8769. t && t.option && (t.query ? o.push(t) : i || (i = t))
  8770. }));
  8771. function p(t) {
  8772. E(e, (function (e) {
  8773. e(t, n)
  8774. }))
  8775. }
  8776. return p(r), E(l, (function (t) {
  8777. return p(t)
  8778. })), E(o, (function (t) {
  8779. return p(t.option)
  8780. })), {
  8781. baseOption: r,
  8782. timelineOptions: l || [],
  8783. mediaDefault: i,
  8784. mediaList: o
  8785. }
  8786. }(t, e, !i);
  8787. this._newBaseOption = r.baseOption, i ? (r.timelineOptions.length && (i.timelineOptions = r.timelineOptions), r.mediaList.length && (i.mediaList = r.mediaList), r.mediaDefault && (i.mediaDefault = r.mediaDefault)) : this._optionBackup = r
  8788. }, t.prototype.mountOption = function (t) {
  8789. var e = this._optionBackup;
  8790. return this._timelineOptions = e.timelineOptions, this._mediaList = e.mediaList, this._mediaDefault = e.mediaDefault, this._currentMediaIndices = [], T(t ? e.baseOption : this._newBaseOption)
  8791. }, t.prototype.getTimelineOption = function (t) {
  8792. var e, n = this._timelineOptions;
  8793. if (n.length) {
  8794. var i = t.getComponent("timeline");
  8795. i && (e = T(n[i.getCurrentIndex()]))
  8796. }
  8797. return e
  8798. }, t.prototype.getMediaOption = function (t) {
  8799. var e, n, i = this._api.getWidth(),
  8800. r = this._api.getHeight(),
  8801. o = this._mediaList,
  8802. a = this._mediaDefault,
  8803. s = [],
  8804. l = [];
  8805. if (!o.length && !a) return l;
  8806. for (var u = 0, h = o.length; u < h; u++) Id(o[u].query, i, r) && s.push(u);
  8807. return !s.length && a && (s = [-1]), s.length && (e = s, n = this._currentMediaIndices, e.join(",") !== n.join(",")) && (l = z(s, (function (t) {
  8808. return T(-1 === t ? a.option : o[t].option)
  8809. }))), this._currentMediaIndices = s, l
  8810. }, t
  8811. }();
  8812. function Id(t, e, n) {
  8813. var i = {
  8814. width: e,
  8815. height: n,
  8816. aspectratio: e / n
  8817. },
  8818. r = !0;
  8819. return E(t, (function (t, e) {
  8820. var n = e.match(Sd);
  8821. if (n && n[1] && n[2]) {
  8822. var o = n[1],
  8823. a = n[2].toLowerCase();
  8824. (function (t, e, n) {
  8825. return "min" === n ? t >= e : "max" === n ? t <= e : t === e
  8826. })(i[a], t, o) || (r = !1)
  8827. }
  8828. })), r
  8829. }
  8830. var Td = E,
  8831. Cd = q,
  8832. Dd = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  8833. function Ad(t) {
  8834. var e = t && t.itemStyle;
  8835. if (e)
  8836. for (var n = 0, i = Dd.length; n < i; n++) {
  8837. var r = Dd[n],
  8838. o = e.normal,
  8839. a = e.emphasis;
  8840. o && o[r] && (t[r] = t[r] || {}, t[r].normal ? C(t[r].normal, o[r]) : t[r].normal = o[r], o[r] = null), a && a[r] && (t[r] = t[r] || {}, t[r].emphasis ? C(t[r].emphasis, a[r]) : t[r].emphasis = a[r], a[r] = null)
  8841. }
  8842. }
  8843. function kd(t, e, n) {
  8844. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  8845. var i = t[e].normal,
  8846. r = t[e].emphasis;
  8847. i && (n ? (t[e].normal = t[e].emphasis = null, k(t[e], i)) : t[e] = i), r && (t.emphasis = t.emphasis || {}, t.emphasis[e] = r, r.focus && (t.emphasis.focus = r.focus), r.blurScope && (t.emphasis.blurScope = r.blurScope))
  8848. }
  8849. }
  8850. function Ld(t) {
  8851. kd(t, "itemStyle"), kd(t, "lineStyle"), kd(t, "areaStyle"), kd(t, "label"), kd(t, "labelLine"), kd(t, "upperLabel"), kd(t, "edgeLabel")
  8852. }
  8853. function Pd(t, e) {
  8854. var n = Cd(t) && t[e],
  8855. i = Cd(n) && n.textStyle;
  8856. if (i) {
  8857. 0;
  8858. for (var r = 0, o = Do.length; r < o; r++) {
  8859. var a = Do[r];
  8860. i.hasOwnProperty(a) && (n[a] = i[a])
  8861. }
  8862. }
  8863. }
  8864. function Od(t) {
  8865. t && (Ld(t), Pd(t, "label"), t.emphasis && Pd(t.emphasis, "label"))
  8866. }
  8867. function Rd(t) {
  8868. return Y(t) ? t : t ? [t] : []
  8869. }
  8870. function Nd(t) {
  8871. return (Y(t) ? t[0] : t) || {}
  8872. }
  8873. function Ed(t, e) {
  8874. Td(Rd(t.series), (function (t) {
  8875. Cd(t) && function (t) {
  8876. if (Cd(t)) {
  8877. Ad(t), Ld(t), Pd(t, "label"), Pd(t, "upperLabel"), Pd(t, "edgeLabel"), t.emphasis && (Pd(t.emphasis, "label"), Pd(t.emphasis, "upperLabel"), Pd(t.emphasis, "edgeLabel"));
  8878. var e = t.markPoint;
  8879. e && (Ad(e), Od(e));
  8880. var n = t.markLine;
  8881. n && (Ad(n), Od(n));
  8882. var i = t.markArea;
  8883. i && Od(i);
  8884. var r = t.data;
  8885. if ("graph" === t.type) {
  8886. r = r || t.nodes;
  8887. var o = t.links || t.edges;
  8888. if (o && !$(o))
  8889. for (var a = 0; a < o.length; a++) Od(o[a]);
  8890. E(t.categories, (function (t) {
  8891. Ld(t)
  8892. }))
  8893. }
  8894. if (r && !$(r))
  8895. for (a = 0; a < r.length; a++) Od(r[a]);
  8896. if ((e = t.markPoint) && e.data) {
  8897. var s = e.data;
  8898. for (a = 0; a < s.length; a++) Od(s[a])
  8899. }
  8900. if ((n = t.markLine) && n.data) {
  8901. var l = n.data;
  8902. for (a = 0; a < l.length; a++) Y(l[a]) ? (Od(l[a][0]), Od(l[a][1])) : Od(l[a])
  8903. }
  8904. "gauge" === t.type ? (Pd(t, "axisLabel"), Pd(t, "title"), Pd(t, "detail")) : "treemap" === t.type ? (kd(t.breadcrumb, "itemStyle"), E(t.levels, (function (t) {
  8905. Ld(t)
  8906. }))) : "tree" === t.type && Ld(t.leaves)
  8907. }
  8908. }(t)
  8909. }));
  8910. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  8911. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Td(n, (function (e) {
  8912. Td(Rd(t[e]), (function (t) {
  8913. t && (Pd(t, "axisLabel"), Pd(t.axisPointer, "label"))
  8914. }))
  8915. })), Td(Rd(t.parallel), (function (t) {
  8916. var e = t && t.parallelAxisDefault;
  8917. Pd(e, "axisLabel"), Pd(e && e.axisPointer, "label")
  8918. })), Td(Rd(t.calendar), (function (t) {
  8919. kd(t, "itemStyle"), Pd(t, "dayLabel"), Pd(t, "monthLabel"), Pd(t, "yearLabel")
  8920. })), Td(Rd(t.radar), (function (t) {
  8921. Pd(t, "name"), t.name && null == t.axisName && (t.axisName = t.name, delete t.name), null != t.nameGap && null == t.axisNameGap && (t.axisNameGap = t.nameGap, delete t.nameGap)
  8922. })), Td(Rd(t.geo), (function (t) {
  8923. Cd(t) && (Od(t), Td(Rd(t.regions), (function (t) {
  8924. Od(t)
  8925. })))
  8926. })), Td(Rd(t.timeline), (function (t) {
  8927. Od(t), kd(t, "label"), kd(t, "itemStyle"), kd(t, "controlStyle", !0);
  8928. var e = t.data;
  8929. Y(e) && E(e, (function (t) {
  8930. q(t) && (kd(t, "label"), kd(t, "itemStyle"))
  8931. }))
  8932. })), Td(Rd(t.toolbox), (function (t) {
  8933. kd(t, "iconStyle"), Td(t.feature, (function (t) {
  8934. kd(t, "iconStyle")
  8935. }))
  8936. })), Pd(Nd(t.axisPointer), "label"), Pd(Nd(t.tooltip).axisPointer, "label")
  8937. }
  8938. function zd(t) {
  8939. t && E(Vd, (function (e) {
  8940. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]])
  8941. }))
  8942. }
  8943. var Vd = [
  8944. ["x", "left"],
  8945. ["y", "top"],
  8946. ["x2", "right"],
  8947. ["y2", "bottom"]
  8948. ],
  8949. Bd = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
  8950. Fd = [
  8951. ["borderRadius", "barBorderRadius"],
  8952. ["borderColor", "barBorderColor"],
  8953. ["borderWidth", "barBorderWidth"]
  8954. ];
  8955. function Gd(t) {
  8956. var e = t && t.itemStyle;
  8957. if (e)
  8958. for (var n = 0; n < Fd.length; n++) {
  8959. var i = Fd[n][1],
  8960. r = Fd[n][0];
  8961. null != e[i] && (e[r] = e[i])
  8962. }
  8963. }
  8964. function Wd(t) {
  8965. t && "edge" === t.alignTo && null != t.margin && null == t.edgeDistance && (t.edgeDistance = t.margin)
  8966. }
  8967. function Hd(t) {
  8968. t && t.downplay && !t.blur && (t.blur = t.downplay)
  8969. }
  8970. function Yd(t, e) {
  8971. if (t)
  8972. for (var n = 0; n < t.length; n++) e(t[n]), t[n] && Yd(t[n].children, e)
  8973. }
  8974. function Xd(t, e) {
  8975. Ed(t, e), t.series = To(t.series), E(t.series, (function (t) {
  8976. if (q(t)) {
  8977. var e = t.type;
  8978. if ("line" === e) null != t.clipOverflow && (t.clip = t.clipOverflow);
  8979. else if ("pie" === e || "gauge" === e) {
  8980. if (null != t.clockWise && (t.clockwise = t.clockWise), Wd(t.label), (r = t.data) && !$(r))
  8981. for (var n = 0; n < r.length; n++) Wd(r[n]);
  8982. null != t.hoverOffset && (t.emphasis = t.emphasis || {}, (t.emphasis.scaleSize = null) && (t.emphasis.scaleSize = t.hoverOffset))
  8983. } else if ("gauge" === e) {
  8984. var i = function (t, e) {
  8985. for (var n = e.split(","), i = t, r = 0; r < n.length && null != (i = i && i[n[r]]); r++);
  8986. return i
  8987. }(t, "pointer.color");
  8988. null != i && function (t, e, n, i) {
  8989. for (var r, o = e.split(","), a = t, s = 0; s < o.length - 1; s++) null == a[r = o[s]] && (a[r] = {}), a = a[r];
  8990. (i || null == a[o[s]]) && (a[o[s]] = n)
  8991. }(t, "itemStyle.color", i)
  8992. } else if ("bar" === e) {
  8993. var r;
  8994. if (Gd(t), Gd(t.backgroundStyle), Gd(t.emphasis), (r = t.data) && !$(r))
  8995. for (n = 0; n < r.length; n++) "object" == typeof r[n] && (Gd(r[n]), Gd(r[n] && r[n].emphasis))
  8996. } else if ("sunburst" === e) {
  8997. var o = t.highlightPolicy;
  8998. o && (t.emphasis = t.emphasis || {}, t.emphasis.focus || (t.emphasis.focus = o)), Hd(t), Yd(t.data, Hd)
  8999. } else "graph" === e || "sankey" === e ? function (t) {
  9000. t && null != t.focusNodeAdjacency && (t.emphasis = t.emphasis || {}, null == t.emphasis.focus && (t.emphasis.focus = "adjacency"))
  9001. }(t) : "map" === e && (t.mapType && !t.map && (t.map = t.mapType), t.mapLocation && k(t, t.mapLocation));
  9002. null != t.hoverAnimation && (t.emphasis = t.emphasis || {}, t.emphasis && null == t.emphasis.scale && (t.emphasis.scale = t.hoverAnimation)), zd(t)
  9003. }
  9004. })), t.dataRange && (t.visualMap = t.dataRange), E(Bd, (function (e) {
  9005. var n = t[e];
  9006. n && (Y(n) || (n = [n]), E(n, (function (t) {
  9007. zd(t)
  9008. })))
  9009. }))
  9010. }
  9011. function Ud(t) {
  9012. E(t, (function (e, n) {
  9013. var i = [],
  9014. r = [NaN, NaN],
  9015. o = [e.stackResultDimension, e.stackedOverDimension],
  9016. a = e.data,
  9017. s = e.isStackedByIndex,
  9018. l = e.seriesModel.get("stackStrategy") || "samesign";
  9019. a.modify(o, (function (o, u, h) {
  9020. var c, p, d = a.get(e.stackedDimension, h);
  9021. if (isNaN(d)) return r;
  9022. s ? p = a.getRawIndex(h) : c = a.get(e.stackedByDimension, h);
  9023. for (var f = NaN, g = n - 1; g >= 0; g--) {
  9024. var y = t[g];
  9025. if (s || (p = y.data.rawIndexOf(y.stackedByDimension, c)), p >= 0) {
  9026. var v = y.data.getByRawIndex(y.stackResultDimension, p);
  9027. if ("all" === l || "positive" === l && v > 0 || "negative" === l && v < 0 || "samesign" === l && d >= 0 && v > 0 || "samesign" === l && d <= 0 && v < 0) {
  9028. d = ro(d, v), f = v;
  9029. break
  9030. }
  9031. }
  9032. }
  9033. return i[0] = d, i[1] = f, i
  9034. }))
  9035. }))
  9036. }
  9037. var Zd, jd, qd, Kd, $d, Jd = function (t) {
  9038. this.data = t.data || (t.sourceFormat === Xp ? {} : []), this.sourceFormat = t.sourceFormat || Zp, this.seriesLayoutBy = t.seriesLayoutBy || jp, this.startIndex = t.startIndex || 0, this.dimensionsDetectedCount = t.dimensionsDetectedCount, this.metaRawOption = t.metaRawOption;
  9039. var e = this.dimensionsDefine = t.dimensionsDefine;
  9040. if (e)
  9041. for (var n = 0; n < e.length; n++) {
  9042. var i = e[n];
  9043. null == i.type && id(this, n) === Kp && (i.type = "ordinal")
  9044. }
  9045. };
  9046. function Qd(t) {
  9047. return t instanceof Jd
  9048. }
  9049. function tf(t, e, n) {
  9050. n = n || nf(t);
  9051. var i = e.seriesLayoutBy,
  9052. r = function (t, e, n, i, r) {
  9053. var o, a;
  9054. if (!t) return {
  9055. dimensionsDefine: rf(r),
  9056. startIndex: a,
  9057. dimensionsDetectedCount: o
  9058. };
  9059. if (e === Hp) {
  9060. var s = t;
  9061. "auto" === i || null == i ? of ((function (t) {
  9062. null != t && "-" !== t && (U(t) ? null == a && (a = 1) : a = 0)
  9063. }), n, s, 10) : a = j(i) ? i : i ? 1 : 0, r || 1 !== a || (r = [], of ((function (t, e) {
  9064. r[e] = null != t ? t + "" : ""
  9065. }), n, s, 1 / 0)), o = r ? r.length : n === qp ? s.length : s[0] ? s[0].length : null
  9066. } else if (e === Yp) r || (r = function (t) {
  9067. var e, n = 0;
  9068. for (; n < t.length && !(e = t[n++]););
  9069. if (e) return G(e)
  9070. }(t));
  9071. else if (e === Xp) r || (r = [], E(t, (function (t, e) {
  9072. r.push(e)
  9073. })));
  9074. else if (e === Wp) {
  9075. var l = Ao(t[0]);
  9076. o = Y(l) && l.length || 1
  9077. }
  9078. return {
  9079. startIndex: a,
  9080. dimensionsDefine: rf(r),
  9081. dimensionsDetectedCount: o
  9082. }
  9083. }(t, n, i, e.sourceHeader, e.dimensions);
  9084. return new Jd({
  9085. data: t,
  9086. sourceFormat: n,
  9087. seriesLayoutBy: i,
  9088. dimensionsDefine: r.dimensionsDefine,
  9089. startIndex: r.startIndex,
  9090. dimensionsDetectedCount: r.dimensionsDetectedCount,
  9091. metaRawOption: T(e)
  9092. })
  9093. }
  9094. function ef(t) {
  9095. return new Jd({
  9096. data: t,
  9097. sourceFormat: $(t) ? Up : Wp
  9098. })
  9099. }
  9100. function nf(t) {
  9101. var e = Zp;
  9102. if ($(t)) e = Up;
  9103. else if (Y(t)) {
  9104. 0 === t.length && (e = Hp);
  9105. for (var n = 0, i = t.length; n < i; n++) {
  9106. var r = t[n];
  9107. if (null != r) {
  9108. if (Y(r) || $(r)) {
  9109. e = Hp;
  9110. break
  9111. }
  9112. if (q(r)) {
  9113. e = Yp;
  9114. break
  9115. }
  9116. }
  9117. }
  9118. } else if (q(t))
  9119. for (var o in t)
  9120. if (_t(t, o) && N(t[o])) {
  9121. e = Xp;
  9122. break
  9123. } return e
  9124. }
  9125. function rf(t) {
  9126. if (t) {
  9127. var e = yt();
  9128. return z(t, (function (t, n) {
  9129. var i = {
  9130. name: (t = q(t) ? t : {
  9131. name: t
  9132. }).name,
  9133. displayName: t.displayName,
  9134. type: t.type
  9135. };
  9136. if (null == i.name) return i;
  9137. i.name += "", null == i.displayName && (i.displayName = i.name);
  9138. var r = e.get(i.name);
  9139. return r ? i.name += "-" + r.count++ : e.set(i.name, {
  9140. count: 1
  9141. }), i
  9142. }))
  9143. }
  9144. }
  9145. function of (t, e, n, i) {
  9146. if (e === qp)
  9147. for (var r = 0; r < n.length && r < i; r++) t(n[r] ? n[r][0] : null, r);
  9148. else {
  9149. var o = n[0] || [];
  9150. for (r = 0; r < o.length && r < i; r++) t(o[r], r)
  9151. }
  9152. }
  9153. function af(t) {
  9154. var e = t.sourceFormat;
  9155. return e === Yp || e === Xp
  9156. }
  9157. var sf = function () {
  9158. function t(t, e) {
  9159. var n = Qd(t) ? t : ef(t);
  9160. this._source = n;
  9161. var i = this._data = n.data;
  9162. n.sourceFormat === Up && (this._offset = 0, this._dimSize = e, this._data = i), $d(this, i, n)
  9163. }
  9164. return t.prototype.getSource = function () {
  9165. return this._source
  9166. }, t.prototype.count = function () {
  9167. return 0
  9168. }, t.prototype.getItem = function (t, e) {}, t.prototype.appendData = function (t) {}, t.prototype.clean = function () {}, t.protoInitialize = function () {
  9169. var e = t.prototype;
  9170. e.pure = !1, e.persistent = !0
  9171. }(), t.internalField = function () {
  9172. var t;
  9173. $d = function (t, r, o) {
  9174. var a = o.sourceFormat,
  9175. s = o.seriesLayoutBy,
  9176. l = o.startIndex,
  9177. u = o.dimensionsDefine,
  9178. h = Kd[vf(a, s)];
  9179. if (A(t, h), a === Up) t.getItem = e, t.count = i, t.fillStorage = n;
  9180. else {
  9181. var c = hf(a, s);
  9182. t.getItem = W(c, null, r, l, u);
  9183. var p = df(a, s);
  9184. t.count = W(p, null, r, l, u)
  9185. }
  9186. };
  9187. var e = function (t, e) {
  9188. t -= this._offset, e = e || [];
  9189. for (var n = this._data, i = this._dimSize, r = i * t, o = 0; o < i; o++) e[o] = n[r + o];
  9190. return e
  9191. },
  9192. n = function (t, e, n, i) {
  9193. for (var r = this._data, o = this._dimSize, a = 0; a < o; a++) {
  9194. for (var s = i[a], l = null == s[0] ? 1 / 0 : s[0], u = null == s[1] ? -1 / 0 : s[1], h = e - t, c = n[a], p = 0; p < h; p++) {
  9195. var d = r[p * o + a];
  9196. c[t + p] = d, d < l && (l = d), d > u && (u = d)
  9197. }
  9198. s[0] = l, s[1] = u
  9199. }
  9200. },
  9201. i = function () {
  9202. return this._data ? this._data.length / this._dimSize : 0
  9203. };
  9204. function r(t) {
  9205. for (var e = 0; e < t.length; e++) this._data.push(t[e])
  9206. }(t = {})[Hp + "_" + jp] = {
  9207. pure: !0,
  9208. appendData: r
  9209. }, t[Hp + "_" + qp] = {
  9210. pure: !0,
  9211. appendData: function () {
  9212. throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
  9213. }
  9214. }, t[Yp] = {
  9215. pure: !0,
  9216. appendData: r
  9217. }, t[Xp] = {
  9218. pure: !0,
  9219. appendData: function (t) {
  9220. var e = this._data;
  9221. E(t, (function (t, n) {
  9222. for (var i = e[n] || (e[n] = []), r = 0; r < (t || []).length; r++) i.push(t[r])
  9223. }))
  9224. }
  9225. }, t[Wp] = {
  9226. appendData: r
  9227. }, t[Up] = {
  9228. persistent: !1,
  9229. pure: !0,
  9230. appendData: function (t) {
  9231. this._data = t
  9232. },
  9233. clean: function () {
  9234. this._offset += this.count(), this._data = null
  9235. }
  9236. }, Kd = t
  9237. }(), t
  9238. }(),
  9239. lf = function (t, e, n, i) {
  9240. return t[i]
  9241. },
  9242. uf = ((Zd = {})[Hp + "_" + jp] = function (t, e, n, i) {
  9243. return t[i + e]
  9244. }, Zd[Hp + "_" + qp] = function (t, e, n, i, r) {
  9245. i += e;
  9246. for (var o = r || [], a = t, s = 0; s < a.length; s++) {
  9247. var l = a[s];
  9248. o[s] = l ? l[i] : null
  9249. }
  9250. return o
  9251. }, Zd[Yp] = lf, Zd[Xp] = function (t, e, n, i, r) {
  9252. for (var o = r || [], a = 0; a < n.length; a++) {
  9253. var s = n[a].name;
  9254. 0;
  9255. var l = t[s];
  9256. o[a] = l ? l[i] : null
  9257. }
  9258. return o
  9259. }, Zd[Wp] = lf, Zd);
  9260. function hf(t, e) {
  9261. var n = uf[vf(t, e)];
  9262. return n
  9263. }
  9264. var cf = function (t, e, n) {
  9265. return t.length
  9266. },
  9267. pf = ((jd = {})[Hp + "_" + jp] = function (t, e, n) {
  9268. return Math.max(0, t.length - e)
  9269. }, jd[Hp + "_" + qp] = function (t, e, n) {
  9270. var i = t[0];
  9271. return i ? Math.max(0, i.length - e) : 0
  9272. }, jd[Yp] = cf, jd[Xp] = function (t, e, n) {
  9273. var i = n[0].name;
  9274. var r = t[i];
  9275. return r ? r.length : 0
  9276. }, jd[Wp] = cf, jd);
  9277. function df(t, e) {
  9278. var n = pf[vf(t, e)];
  9279. return n
  9280. }
  9281. var ff = function (t, e, n) {
  9282. return t[e]
  9283. },
  9284. gf = ((qd = {})[Hp] = ff, qd[Yp] = function (t, e, n) {
  9285. return t[n]
  9286. }, qd[Xp] = ff, qd[Wp] = function (t, e, n) {
  9287. var i = Ao(t);
  9288. return i instanceof Array ? i[e] : i
  9289. }, qd[Up] = ff, qd);
  9290. function yf(t) {
  9291. var e = gf[t];
  9292. return e
  9293. }
  9294. function vf(t, e) {
  9295. return t === Hp ? t + "_" + e : t
  9296. }
  9297. function mf(t, e, n) {
  9298. if (t) {
  9299. var i = t.getRawDataItem(e);
  9300. if (null != i) {
  9301. var r = t.getStore(),
  9302. o = r.getSource().sourceFormat;
  9303. if (null != n) {
  9304. var a = t.getDimensionIndex(n),
  9305. s = r.getDimensionProperty(a);
  9306. return yf(o)(i, a, s)
  9307. }
  9308. var l = i;
  9309. return o === Wp && (l = Ao(i)), l
  9310. }
  9311. }
  9312. }
  9313. var xf = /\{@(.+?)\}/g,
  9314. _f = function () {
  9315. function t() {}
  9316. return t.prototype.getDataParams = function (t, e) {
  9317. var n = this.getData(e),
  9318. i = this.getRawValue(t, e),
  9319. r = n.getRawIndex(t),
  9320. o = n.getName(t),
  9321. a = n.getRawDataItem(t),
  9322. s = n.getItemVisual(t, "style"),
  9323. l = s && s[n.getItemVisual(t, "drawType") || "fill"],
  9324. u = s && s.stroke,
  9325. h = this.mainType,
  9326. c = "series" === h,
  9327. p = n.userOutput && n.userOutput.get();
  9328. return {
  9329. componentType: h,
  9330. componentSubType: this.subType,
  9331. componentIndex: this.componentIndex,
  9332. seriesType: c ? this.subType : null,
  9333. seriesIndex: this.seriesIndex,
  9334. seriesId: c ? this.id : null,
  9335. seriesName: c ? this.name : null,
  9336. name: o,
  9337. dataIndex: r,
  9338. data: a,
  9339. dataType: e,
  9340. value: i,
  9341. color: l,
  9342. borderColor: u,
  9343. dimensionNames: p ? p.fullDimensions : null,
  9344. encode: p ? p.encode : null,
  9345. $vars: ["seriesName", "name", "value"]
  9346. }
  9347. }, t.prototype.getFormattedLabel = function (t, e, n, i, r, o) {
  9348. e = e || "normal";
  9349. var a = this.getData(n),
  9350. s = this.getDataParams(t, n);
  9351. (o && (s.value = o.interpolatedValue), null != i && Y(s.value) && (s.value = s.value[i]), r) || (r = a.getItemModel(t).get("normal" === e ? ["label", "formatter"] : [e, "label", "formatter"]));
  9352. return X(r) ? (s.status = e, s.dimensionIndex = i, r(s)) : U(r) ? bp(r, s).replace(xf, (function (e, n) {
  9353. var i = n.length,
  9354. r = n;
  9355. "[" === r.charAt(0) && "]" === r.charAt(i - 1) && (r = +r.slice(1, i - 1));
  9356. var s = mf(a, t, r);
  9357. if (o && Y(o.interpolatedValue)) {
  9358. var l = a.getDimensionIndex(r);
  9359. l >= 0 && (s = o.interpolatedValue[l])
  9360. }
  9361. return null != s ? s + "" : ""
  9362. })) : void 0
  9363. }, t.prototype.getRawValue = function (t, e) {
  9364. return mf(this.getData(e), t)
  9365. }, t.prototype.formatTooltip = function (t, e, n) {}, t
  9366. }();
  9367. function bf(t) {
  9368. var e, n;
  9369. return q(t) ? t.type && (n = t) : e = t, {
  9370. text: e,
  9371. frag: n
  9372. }
  9373. }
  9374. function wf(t) {
  9375. return new Sf(t)
  9376. }
  9377. var Sf = function () {
  9378. function t(t) {
  9379. t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0
  9380. }
  9381. return t.prototype.perform = function (t) {
  9382. var e, n = this._upstream,
  9383. i = t && t.skip;
  9384. if (this._dirty && n) {
  9385. var r = this.context;
  9386. r.data = r.outputData = n.context.outputData
  9387. }
  9388. this.__pipeline && (this.__pipeline.currentTask = this), this._plan && !i && (e = this._plan(this.context));
  9389. var o, a = h(this._modBy),
  9390. s = this._modDataCount || 0,
  9391. l = h(t && t.modBy),
  9392. u = t && t.modDataCount || 0;
  9393. function h(t) {
  9394. return !(t >= 1) && (t = 1), t
  9395. }
  9396. a === l && s === u || (e = "reset"), (this._dirty || "reset" === e) && (this._dirty = !1, o = this._doReset(i)), this._modBy = l, this._modDataCount = u;
  9397. var c = t && t.step;
  9398. if (this._dueEnd = n ? n._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
  9399. var p = this._dueIndex,
  9400. d = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
  9401. if (!i && (o || p < d)) {
  9402. var f = this._progress;
  9403. if (Y(f))
  9404. for (var g = 0; g < f.length; g++) this._doProgress(f[g], p, d, l, u);
  9405. else this._doProgress(f, p, d, l, u)
  9406. }
  9407. this._dueIndex = d;
  9408. var y = null != this._settedOutputEnd ? this._settedOutputEnd : d;
  9409. 0, this._outputDueEnd = y
  9410. } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
  9411. return this.unfinished()
  9412. }, t.prototype.dirty = function () {
  9413. this._dirty = !0, this._onDirty && this._onDirty(this.context)
  9414. }, t.prototype._doProgress = function (t, e, n, i, r) {
  9415. Mf.reset(e, n, i, r), this._callingProgress = t, this._callingProgress({
  9416. start: e,
  9417. end: n,
  9418. count: n - e,
  9419. next: Mf.next
  9420. }, this.context)
  9421. }, t.prototype._doReset = function (t) {
  9422. var e, n;
  9423. this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null, !t && this._reset && ((e = this._reset(this.context)) && e.progress && (n = e.forceFirstProgress, e = e.progress), Y(e) && !e.length && (e = null)), this._progress = e, this._modBy = this._modDataCount = null;
  9424. var i = this._downstream;
  9425. return i && i.dirty(), n
  9426. }, t.prototype.unfinished = function () {
  9427. return this._progress && this._dueIndex < this._dueEnd
  9428. }, t.prototype.pipe = function (t) {
  9429. (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty())
  9430. }, t.prototype.dispose = function () {
  9431. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
  9432. }, t.prototype.getUpstream = function () {
  9433. return this._upstream
  9434. }, t.prototype.getDownstream = function () {
  9435. return this._downstream
  9436. }, t.prototype.setOutputEnd = function (t) {
  9437. this._outputDueEnd = this._settedOutputEnd = t
  9438. }, t
  9439. }(),
  9440. Mf = function () {
  9441. var t, e, n, i, r, o = {
  9442. reset: function (l, u, h, c) {
  9443. e = l, t = u, n = h, i = c, r = Math.ceil(i / n), o.next = n > 1 && i > 0 ? s : a
  9444. }
  9445. };
  9446. return o;
  9447. function a() {
  9448. return e < t ? e++ : null
  9449. }
  9450. function s() {
  9451. var o = e % r * n + Math.ceil(e / r),
  9452. a = e >= t ? null : o < i ? o : e;
  9453. return e++, a
  9454. }
  9455. }();
  9456. function If(t, e) {
  9457. var n = e && e.type;
  9458. return "ordinal" === n ? t : ("time" !== n || j(t) || null == t || "-" === t || (t = +uo(t)), null == t || "" === t ? NaN : +t)
  9459. }
  9460. var Tf = yt({
  9461. number: function (t) {
  9462. return parseFloat(t)
  9463. },
  9464. time: function (t) {
  9465. return +uo(t)
  9466. },
  9467. trim: function (t) {
  9468. return U(t) ? ut(t) : t
  9469. }
  9470. });
  9471. function Cf(t) {
  9472. return Tf.get(t)
  9473. }
  9474. var Df = {
  9475. lt: function (t, e) {
  9476. return t < e
  9477. },
  9478. lte: function (t, e) {
  9479. return t <= e
  9480. },
  9481. gt: function (t, e) {
  9482. return t > e
  9483. },
  9484. gte: function (t, e) {
  9485. return t >= e
  9486. }
  9487. },
  9488. Af = function () {
  9489. function t(t, e) {
  9490. if (!j(e)) {
  9491. var n = "";
  9492. 0, wo(n)
  9493. }
  9494. this._opFn = Df[t], this._rvalFloat = yo(e)
  9495. }
  9496. return t.prototype.evaluate = function (t) {
  9497. return j(t) ? this._opFn(t, this._rvalFloat) : this._opFn(yo(t), this._rvalFloat)
  9498. }, t
  9499. }(),
  9500. kf = function () {
  9501. function t(t, e) {
  9502. var n = "desc" === t;
  9503. this._resultLT = n ? 1 : -1, null == e && (e = n ? "min" : "max"), this._incomparable = "min" === e ? -1 / 0 : 1 / 0
  9504. }
  9505. return t.prototype.evaluate = function (t, e) {
  9506. var n = j(t) ? t : yo(t),
  9507. i = j(e) ? e : yo(e),
  9508. r = isNaN(n),
  9509. o = isNaN(i);
  9510. if (r && (n = this._incomparable), o && (i = this._incomparable), r && o) {
  9511. var a = U(t),
  9512. s = U(e);
  9513. a && (n = s ? t : 0), s && (i = a ? e : 0)
  9514. }
  9515. return n < i ? this._resultLT : n > i ? -this._resultLT : 0
  9516. }, t
  9517. }(),
  9518. Lf = function () {
  9519. function t(t, e) {
  9520. this._rval = e, this._isEQ = t, this._rvalTypeof = typeof e, this._rvalFloat = yo(e)
  9521. }
  9522. return t.prototype.evaluate = function (t) {
  9523. var e = t === this._rval;
  9524. if (!e) {
  9525. var n = typeof t;
  9526. n === this._rvalTypeof || "number" !== n && "number" !== this._rvalTypeof || (e = yo(t) === this._rvalFloat)
  9527. }
  9528. return this._isEQ ? e : !e
  9529. }, t
  9530. }();
  9531. function Pf(t, e) {
  9532. return "eq" === t || "ne" === t ? new Lf("eq" === t, e) : _t(Df, t) ? new Af(t, e) : null
  9533. }
  9534. var Of = function () {
  9535. function t() {}
  9536. return t.prototype.getRawData = function () {
  9537. throw new Error("not supported")
  9538. }, t.prototype.getRawDataItem = function (t) {
  9539. throw new Error("not supported")
  9540. }, t.prototype.cloneRawData = function () {}, t.prototype.getDimensionInfo = function (t) {}, t.prototype.cloneAllDimensionInfo = function () {}, t.prototype.count = function () {}, t.prototype.retrieveValue = function (t, e) {}, t.prototype.retrieveValueFromItem = function (t, e) {}, t.prototype.convertValue = function (t, e) {
  9541. return If(t, e)
  9542. }, t
  9543. }();
  9544. function Rf(t) {
  9545. var e = t.sourceFormat;
  9546. if (!Ff(e)) {
  9547. var n = "";
  9548. 0, wo(n)
  9549. }
  9550. return t.data
  9551. }
  9552. function Nf(t) {
  9553. var e = t.sourceFormat,
  9554. n = t.data;
  9555. if (!Ff(e)) {
  9556. var i = "";
  9557. 0, wo(i)
  9558. }
  9559. if (e === Hp) {
  9560. for (var r = [], o = 0, a = n.length; o < a; o++) r.push(n[o].slice());
  9561. return r
  9562. }
  9563. if (e === Yp) {
  9564. for (r = [], o = 0, a = n.length; o < a; o++) r.push(A({}, n[o]));
  9565. return r
  9566. }
  9567. }
  9568. function Ef(t, e, n) {
  9569. if (null != n) return j(n) || !isNaN(n) && !_t(e, n) ? t[n] : _t(e, n) ? e[n] : void 0
  9570. }
  9571. function zf(t) {
  9572. return T(t)
  9573. }
  9574. var Vf = yt();
  9575. function Bf(t, e, n, i) {
  9576. var r = "";
  9577. e.length || wo(r), q(t) || wo(r);
  9578. var o = t.type,
  9579. a = Vf.get(o);
  9580. a || wo(r);
  9581. var s = z(e, (function (t) {
  9582. return function (t, e) {
  9583. var n = new Of,
  9584. i = t.data,
  9585. r = n.sourceFormat = t.sourceFormat,
  9586. o = t.startIndex,
  9587. a = "";
  9588. t.seriesLayoutBy !== jp && wo(a);
  9589. var s = [],
  9590. l = {},
  9591. u = t.dimensionsDefine;
  9592. if (u) E(u, (function (t, e) {
  9593. var n = t.name,
  9594. i = {
  9595. index: e,
  9596. name: n,
  9597. displayName: t.displayName
  9598. };
  9599. if (s.push(i), null != n) {
  9600. var r = "";
  9601. _t(l, n) && wo(r), l[n] = i
  9602. }
  9603. }));
  9604. else
  9605. for (var h = 0; h < t.dimensionsDetectedCount; h++) s.push({
  9606. index: h
  9607. });
  9608. var c = hf(r, jp);
  9609. e.__isBuiltIn && (n.getRawDataItem = function (t) {
  9610. return c(i, o, s, t)
  9611. }, n.getRawData = W(Rf, null, t)), n.cloneRawData = W(Nf, null, t);
  9612. var p = df(r, jp);
  9613. n.count = W(p, null, i, o, s);
  9614. var d = yf(r);
  9615. n.retrieveValue = function (t, e) {
  9616. var n = c(i, o, s, t);
  9617. return f(n, e)
  9618. };
  9619. var f = n.retrieveValueFromItem = function (t, e) {
  9620. if (null != t) {
  9621. var n = s[e];
  9622. return n ? d(t, e, n.name) : void 0
  9623. }
  9624. };
  9625. return n.getDimensionInfo = W(Ef, null, s, l), n.cloneAllDimensionInfo = W(zf, null, s), n
  9626. }(t, a)
  9627. })),
  9628. l = To(a.transform({
  9629. upstream: s[0],
  9630. upstreamList: s,
  9631. config: T(t.config)
  9632. }));
  9633. return z(l, (function (t, n) {
  9634. var i, r = "";
  9635. q(t) || wo(r), t.data || wo(r), Ff(nf(t.data)) || wo(r);
  9636. var o = e[0];
  9637. if (o && 0 === n && !t.dimensions) {
  9638. var a = o.startIndex;
  9639. a && (t.data = o.data.slice(0, a).concat(t.data)), i = {
  9640. seriesLayoutBy: jp,
  9641. sourceHeader: a,
  9642. dimensions: o.metaRawOption.dimensions
  9643. }
  9644. } else i = {
  9645. seriesLayoutBy: jp,
  9646. sourceHeader: 0,
  9647. dimensions: t.dimensions
  9648. };
  9649. return tf(t.data, i, null)
  9650. }))
  9651. }
  9652. function Ff(t) {
  9653. return t === Hp || t === Yp
  9654. }
  9655. var Gf, Wf = "undefined",
  9656. Hf = typeof Uint32Array === Wf ? Array : Uint32Array,
  9657. Yf = typeof Uint16Array === Wf ? Array : Uint16Array,
  9658. Xf = typeof Int32Array === Wf ? Array : Int32Array,
  9659. Uf = typeof Float64Array === Wf ? Array : Float64Array,
  9660. Zf = {
  9661. float: Uf,
  9662. int: Xf,
  9663. ordinal: Array,
  9664. number: Array,
  9665. time: Uf
  9666. };
  9667. function jf(t) {
  9668. return t > 65535 ? Hf : Yf
  9669. }
  9670. function qf(t, e, n, i, r) {
  9671. var o = Zf[n || "float"];
  9672. if (r) {
  9673. var a = t[e],
  9674. s = a && a.length;
  9675. if (s !== i) {
  9676. for (var l = new o(i), u = 0; u < s; u++) l[u] = a[u];
  9677. t[e] = l
  9678. }
  9679. } else t[e] = new o(i)
  9680. }
  9681. var Kf = function () {
  9682. function t() {
  9683. this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = yt()
  9684. }
  9685. return t.prototype.initData = function (t, e, n) {
  9686. this._provider = t, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
  9687. var i = t.getSource(),
  9688. r = this.defaultDimValueGetter = Gf[i.sourceFormat];
  9689. this._dimValueGetter = n || r, this._rawExtent = [];
  9690. af(i);
  9691. this._dimensions = z(e, (function (t) {
  9692. return {
  9693. type: t.type,
  9694. property: t.property
  9695. }
  9696. })), this._initDataFromProvider(0, t.count())
  9697. }, t.prototype.getProvider = function () {
  9698. return this._provider
  9699. }, t.prototype.getSource = function () {
  9700. return this._provider.getSource()
  9701. }, t.prototype.ensureCalculationDimension = function (t, e) {
  9702. var n = this._calcDimNameToIdx,
  9703. i = this._dimensions,
  9704. r = n.get(t);
  9705. if (null != r) {
  9706. if (i[r].type === e) return r
  9707. } else r = i.length;
  9708. return i[r] = {
  9709. type: e
  9710. }, n.set(t, r), this._chunks[r] = new Zf[e || "float"](this._rawCount), this._rawExtent[r] = [1 / 0, -1 / 0], r
  9711. }, t.prototype.collectOrdinalMeta = function (t, e) {
  9712. var n = this._chunks[t],
  9713. i = this._dimensions[t],
  9714. r = this._rawExtent,
  9715. o = i.ordinalOffset || 0,
  9716. a = n.length;
  9717. 0 === o && (r[t] = [1 / 0, -1 / 0]);
  9718. for (var s = r[t], l = o; l < a; l++) {
  9719. var u = n[l] = e.parseAndCollect(n[l]);
  9720. isNaN(u) || (s[0] = Math.min(u, s[0]), s[1] = Math.max(u, s[1]))
  9721. }
  9722. i.ordinalMeta = e, i.ordinalOffset = a, i.type = "ordinal"
  9723. }, t.prototype.getOrdinalMeta = function (t) {
  9724. return this._dimensions[t].ordinalMeta
  9725. }, t.prototype.getDimensionProperty = function (t) {
  9726. var e = this._dimensions[t];
  9727. return e && e.property
  9728. }, t.prototype.appendData = function (t) {
  9729. var e = this._provider,
  9730. n = this.count();
  9731. e.appendData(t);
  9732. var i = e.count();
  9733. return e.persistent || (i += n), n < i && this._initDataFromProvider(n, i, !0), [n, i]
  9734. }, t.prototype.appendValues = function (t, e) {
  9735. for (var n = this._chunks, i = this._dimensions, r = i.length, o = this._rawExtent, a = this.count(), s = a + Math.max(t.length, e || 0), l = 0; l < r; l++) {
  9736. qf(n, l, (d = i[l]).type, s, !0)
  9737. }
  9738. for (var u = [], h = a; h < s; h++)
  9739. for (var c = h - a, p = 0; p < r; p++) {
  9740. var d = i[p],
  9741. f = Gf.arrayRows.call(this, t[c] || u, d.property, c, p);
  9742. n[p][h] = f;
  9743. var g = o[p];
  9744. f < g[0] && (g[0] = f), f > g[1] && (g[1] = f)
  9745. }
  9746. return this._rawCount = this._count = s, {
  9747. start: a,
  9748. end: s
  9749. }
  9750. }, t.prototype._initDataFromProvider = function (t, e, n) {
  9751. for (var i = this._provider, r = this._chunks, o = this._dimensions, a = o.length, s = this._rawExtent, l = z(o, (function (t) {
  9752. return t.property
  9753. })), u = 0; u < a; u++) {
  9754. var h = o[u];
  9755. s[u] || (s[u] = [1 / 0, -1 / 0]), qf(r, u, h.type, e, n)
  9756. }
  9757. if (i.fillStorage) i.fillStorage(t, e, r, s);
  9758. else
  9759. for (var c = [], p = t; p < e; p++) {
  9760. c = i.getItem(p, c);
  9761. for (var d = 0; d < a; d++) {
  9762. var f = r[d],
  9763. g = this._dimValueGetter(c, l[d], p, d);
  9764. f[p] = g;
  9765. var y = s[d];
  9766. g < y[0] && (y[0] = g), g > y[1] && (y[1] = g)
  9767. }
  9768. }!i.persistent && i.clean && i.clean(), this._rawCount = this._count = e, this._extent = []
  9769. }, t.prototype.count = function () {
  9770. return this._count
  9771. }, t.prototype.get = function (t, e) {
  9772. if (!(e >= 0 && e < this._count)) return NaN;
  9773. var n = this._chunks[t];
  9774. return n ? n[this.getRawIndex(e)] : NaN
  9775. }, t.prototype.getValues = function (t, e) {
  9776. var n = [],
  9777. i = [];
  9778. if (null == e) {
  9779. e = t, t = [];
  9780. for (var r = 0; r < this._dimensions.length; r++) i.push(r)
  9781. } else i = t;
  9782. r = 0;
  9783. for (var o = i.length; r < o; r++) n.push(this.get(i[r], e));
  9784. return n
  9785. }, t.prototype.getByRawIndex = function (t, e) {
  9786. if (!(e >= 0 && e < this._rawCount)) return NaN;
  9787. var n = this._chunks[t];
  9788. return n ? n[e] : NaN
  9789. }, t.prototype.getSum = function (t) {
  9790. var e = 0;
  9791. if (this._chunks[t])
  9792. for (var n = 0, i = this.count(); n < i; n++) {
  9793. var r = this.get(t, n);
  9794. isNaN(r) || (e += r)
  9795. }
  9796. return e
  9797. }, t.prototype.getMedian = function (t) {
  9798. var e = [];
  9799. this.each([t], (function (t) {
  9800. isNaN(t) || e.push(t)
  9801. }));
  9802. var n = e.sort((function (t, e) {
  9803. return t - e
  9804. })),
  9805. i = this.count();
  9806. return 0 === i ? 0 : i % 2 == 1 ? n[(i - 1) / 2] : (n[i / 2] + n[i / 2 - 1]) / 2
  9807. }, t.prototype.indexOfRawIndex = function (t) {
  9808. if (t >= this._rawCount || t < 0) return -1;
  9809. if (!this._indices) return t;
  9810. var e = this._indices,
  9811. n = e[t];
  9812. if (null != n && n < this._count && n === t) return t;
  9813. for (var i = 0, r = this._count - 1; i <= r;) {
  9814. var o = (i + r) / 2 | 0;
  9815. if (e[o] < t) i = o + 1;
  9816. else {
  9817. if (!(e[o] > t)) return o;
  9818. r = o - 1
  9819. }
  9820. }
  9821. return -1
  9822. }, t.prototype.indicesOfNearest = function (t, e, n) {
  9823. var i = this._chunks[t],
  9824. r = [];
  9825. if (!i) return r;
  9826. null == n && (n = 1 / 0);
  9827. for (var o = 1 / 0, a = -1, s = 0, l = 0, u = this.count(); l < u; l++) {
  9828. var h = e - i[this.getRawIndex(l)],
  9829. c = Math.abs(h);
  9830. c <= n && ((c < o || c === o && h >= 0 && a < 0) && (o = c, a = h, s = 0), h === a && (r[s++] = l))
  9831. }
  9832. return r.length = s, r
  9833. }, t.prototype.getIndices = function () {
  9834. var t, e = this._indices;
  9835. if (e) {
  9836. var n = e.constructor,
  9837. i = this._count;
  9838. if (n === Array) {
  9839. t = new n(i);
  9840. for (var r = 0; r < i; r++) t[r] = e[r]
  9841. } else t = new n(e.buffer, 0, i)
  9842. } else {
  9843. t = new(n = jf(this._rawCount))(this.count());
  9844. for (r = 0; r < t.length; r++) t[r] = r
  9845. }
  9846. return t
  9847. }, t.prototype.filter = function (t, e) {
  9848. if (!this._count) return this;
  9849. for (var n = this.clone(), i = n.count(), r = new(jf(n._rawCount))(i), o = [], a = t.length, s = 0, l = t[0], u = n._chunks, h = 0; h < i; h++) {
  9850. var c = void 0,
  9851. p = n.getRawIndex(h);
  9852. if (0 === a) c = e(h);
  9853. else if (1 === a) {
  9854. c = e(u[l][p], h)
  9855. } else {
  9856. for (var d = 0; d < a; d++) o[d] = u[t[d]][p];
  9857. o[d] = h, c = e.apply(null, o)
  9858. }
  9859. c && (r[s++] = p)
  9860. }
  9861. return s < i && (n._indices = r), n._count = s, n._extent = [], n._updateGetRawIdx(), n
  9862. }, t.prototype.selectRange = function (t) {
  9863. var e = this.clone(),
  9864. n = e._count;
  9865. if (!n) return this;
  9866. var i = G(t),
  9867. r = i.length;
  9868. if (!r) return this;
  9869. var o = e.count(),
  9870. a = new(jf(e._rawCount))(o),
  9871. s = 0,
  9872. l = i[0],
  9873. u = t[l][0],
  9874. h = t[l][1],
  9875. c = e._chunks,
  9876. p = !1;
  9877. if (!e._indices) {
  9878. var d = 0;
  9879. if (1 === r) {
  9880. for (var f = c[i[0]], g = 0; g < n; g++) {
  9881. ((x = f[g]) >= u && x <= h || isNaN(x)) && (a[s++] = d), d++
  9882. }
  9883. p = !0
  9884. } else if (2 === r) {
  9885. f = c[i[0]];
  9886. var y = c[i[1]],
  9887. v = t[i[1]][0],
  9888. m = t[i[1]][1];
  9889. for (g = 0; g < n; g++) {
  9890. var x = f[g],
  9891. _ = y[g];
  9892. (x >= u && x <= h || isNaN(x)) && (_ >= v && _ <= m || isNaN(_)) && (a[s++] = d), d++
  9893. }
  9894. p = !0
  9895. }
  9896. }
  9897. if (!p)
  9898. if (1 === r)
  9899. for (g = 0; g < o; g++) {
  9900. var b = e.getRawIndex(g);
  9901. ((x = c[i[0]][b]) >= u && x <= h || isNaN(x)) && (a[s++] = b)
  9902. } else
  9903. for (g = 0; g < o; g++) {
  9904. for (var w = !0, S = (b = e.getRawIndex(g), 0); S < r; S++) {
  9905. var M = i[S];
  9906. ((x = c[M][b]) < t[M][0] || x > t[M][1]) && (w = !1)
  9907. }
  9908. w && (a[s++] = e.getRawIndex(g))
  9909. }
  9910. return s < o && (e._indices = a), e._count = s, e._extent = [], e._updateGetRawIdx(), e
  9911. }, t.prototype.map = function (t, e) {
  9912. var n = this.clone(t);
  9913. return this._updateDims(n, t, e), n
  9914. }, t.prototype.modify = function (t, e) {
  9915. this._updateDims(this, t, e)
  9916. }, t.prototype._updateDims = function (t, e, n) {
  9917. for (var i = t._chunks, r = [], o = e.length, a = t.count(), s = [], l = t._rawExtent, u = 0; u < e.length; u++) l[e[u]] = [1 / 0, -1 / 0];
  9918. for (var h = 0; h < a; h++) {
  9919. for (var c = t.getRawIndex(h), p = 0; p < o; p++) s[p] = i[e[p]][c];
  9920. s[o] = h;
  9921. var d = n && n.apply(null, s);
  9922. if (null != d) {
  9923. "object" != typeof d && (r[0] = d, d = r);
  9924. for (u = 0; u < d.length; u++) {
  9925. var f = e[u],
  9926. g = d[u],
  9927. y = l[f],
  9928. v = i[f];
  9929. v && (v[c] = g), g < y[0] && (y[0] = g), g > y[1] && (y[1] = g)
  9930. }
  9931. }
  9932. }
  9933. }, t.prototype.lttbDownSample = function (t, e) {
  9934. var n, i, r, o = this.clone([t], !0),
  9935. a = o._chunks[t],
  9936. s = this.count(),
  9937. l = 0,
  9938. u = Math.floor(1 / e),
  9939. h = this.getRawIndex(0),
  9940. c = new(jf(this._rawCount))(Math.min(2 * (Math.ceil(s / u) + 2), s));
  9941. c[l++] = h;
  9942. for (var p = 1; p < s - 1; p += u) {
  9943. for (var d = Math.min(p + u, s - 1), f = Math.min(p + 2 * u, s), g = (f + d) / 2, y = 0, v = d; v < f; v++) {
  9944. var m = a[I = this.getRawIndex(v)];
  9945. isNaN(m) || (y += m)
  9946. }
  9947. y /= f - d;
  9948. var x = p,
  9949. _ = Math.min(p + u, s),
  9950. b = p - 1,
  9951. w = a[h];
  9952. n = -1, r = x;
  9953. var S = -1,
  9954. M = 0;
  9955. for (v = x; v < _; v++) {
  9956. var I;
  9957. m = a[I = this.getRawIndex(v)];
  9958. isNaN(m) ? (M++, S < 0 && (S = I)) : (i = Math.abs((b - g) * (m - w) - (b - v) * (y - w))) > n && (n = i, r = I)
  9959. }
  9960. M > 0 && M < _ - x && (c[l++] = Math.min(S, r), r = Math.max(S, r)), c[l++] = r, h = r
  9961. }
  9962. return c[l++] = this.getRawIndex(s - 1), o._count = l, o._indices = c, o.getRawIndex = this._getRawIdx, o
  9963. }, t.prototype.downSample = function (t, e, n, i) {
  9964. for (var r = this.clone([t], !0), o = r._chunks, a = [], s = Math.floor(1 / e), l = o[t], u = this.count(), h = r._rawExtent[t] = [1 / 0, -1 / 0], c = new(jf(this._rawCount))(Math.ceil(u / s)), p = 0, d = 0; d < u; d += s) {
  9965. s > u - d && (s = u - d, a.length = s);
  9966. for (var f = 0; f < s; f++) {
  9967. var g = this.getRawIndex(d + f);
  9968. a[f] = l[g]
  9969. }
  9970. var y = n(a),
  9971. v = this.getRawIndex(Math.min(d + i(a, y) || 0, u - 1));
  9972. l[v] = y, y < h[0] && (h[0] = y), y > h[1] && (h[1] = y), c[p++] = v
  9973. }
  9974. return r._count = p, r._indices = c, r._updateGetRawIdx(), r
  9975. }, t.prototype.each = function (t, e) {
  9976. if (this._count)
  9977. for (var n = t.length, i = this._chunks, r = 0, o = this.count(); r < o; r++) {
  9978. var a = this.getRawIndex(r);
  9979. switch (n) {
  9980. case 0:
  9981. e(r);
  9982. break;
  9983. case 1:
  9984. e(i[t[0]][a], r);
  9985. break;
  9986. case 2:
  9987. e(i[t[0]][a], i[t[1]][a], r);
  9988. break;
  9989. default:
  9990. for (var s = 0, l = []; s < n; s++) l[s] = i[t[s]][a];
  9991. l[s] = r, e.apply(null, l)
  9992. }
  9993. }
  9994. }, t.prototype.getDataExtent = function (t) {
  9995. var e = this._chunks[t],
  9996. n = [1 / 0, -1 / 0];
  9997. if (!e) return n;
  9998. var i, r = this.count();
  9999. if (!this._indices) return this._rawExtent[t].slice();
  10000. if (i = this._extent[t]) return i.slice();
  10001. for (var o = (i = n)[0], a = i[1], s = 0; s < r; s++) {
  10002. var l = e[this.getRawIndex(s)];
  10003. l < o && (o = l), l > a && (a = l)
  10004. }
  10005. return i = [o, a], this._extent[t] = i, i
  10006. }, t.prototype.getRawDataItem = function (t) {
  10007. var e = this.getRawIndex(t);
  10008. if (this._provider.persistent) return this._provider.getItem(e);
  10009. for (var n = [], i = this._chunks, r = 0; r < i.length; r++) n.push(i[r][e]);
  10010. return n
  10011. }, t.prototype.clone = function (e, n) {
  10012. var i, r, o = new t,
  10013. a = this._chunks,
  10014. s = e && V(e, (function (t, e) {
  10015. return t[e] = !0, t
  10016. }), {});
  10017. if (s)
  10018. for (var l = 0; l < a.length; l++) o._chunks[l] = s[l] ? (i = a[l], r = void 0, (r = i.constructor) === Array ? i.slice() : new r(i)) : a[l];
  10019. else o._chunks = a;
  10020. return this._copyCommonProps(o), n || (o._indices = this._cloneIndices()), o._updateGetRawIdx(), o
  10021. }, t.prototype._copyCommonProps = function (t) {
  10022. t._count = this._count, t._rawCount = this._rawCount, t._provider = this._provider, t._dimensions = this._dimensions, t._extent = T(this._extent), t._rawExtent = T(this._rawExtent)
  10023. }, t.prototype._cloneIndices = function () {
  10024. if (this._indices) {
  10025. var t = this._indices.constructor,
  10026. e = void 0;
  10027. if (t === Array) {
  10028. var n = this._indices.length;
  10029. e = new t(n);
  10030. for (var i = 0; i < n; i++) e[i] = this._indices[i]
  10031. } else e = new t(this._indices);
  10032. return e
  10033. }
  10034. return null
  10035. }, t.prototype._getRawIdxIdentity = function (t) {
  10036. return t
  10037. }, t.prototype._getRawIdx = function (t) {
  10038. return t < this._count && t >= 0 ? this._indices[t] : -1
  10039. }, t.prototype._updateGetRawIdx = function () {
  10040. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity
  10041. }, t.internalField = function () {
  10042. function t(t, e, n, i) {
  10043. return If(t[i], this._dimensions[i])
  10044. }
  10045. Gf = {
  10046. arrayRows: t,
  10047. objectRows: function (t, e, n, i) {
  10048. return If(t[e], this._dimensions[i])
  10049. },
  10050. keyedColumns: t,
  10051. original: function (t, e, n, i) {
  10052. var r = t && (null == t.value ? t : t.value);
  10053. return If(r instanceof Array ? r[i] : r, this._dimensions[i])
  10054. },
  10055. typedArray: function (t, e, n, i) {
  10056. return t[i]
  10057. }
  10058. }
  10059. }(), t
  10060. }(),
  10061. $f = function () {
  10062. function t(t) {
  10063. this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = t
  10064. }
  10065. return t.prototype.dirty = function () {
  10066. this._setLocalSource([], []), this._storeList = [], this._dirty = !0
  10067. }, t.prototype._setLocalSource = function (t, e) {
  10068. this._sourceList = t, this._upstreamSignList = e, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0)
  10069. }, t.prototype._getVersionSign = function () {
  10070. return this._sourceHost.uid + "_" + this._versionSignBase
  10071. }, t.prototype.prepareSource = function () {
  10072. this._isDirty() && (this._createSource(), this._dirty = !1)
  10073. }, t.prototype._createSource = function () {
  10074. this._setLocalSource([], []);
  10075. var t, e, n = this._sourceHost,
  10076. i = this._getUpstreamSourceManagers(),
  10077. r = !!i.length;
  10078. if (Qf(n)) {
  10079. var o = n,
  10080. a = void 0,
  10081. s = void 0,
  10082. l = void 0;
  10083. if (r) {
  10084. var u = i[0];
  10085. u.prepareSource(), a = (l = u.getSource()).data, s = l.sourceFormat, e = [u._getVersionSign()]
  10086. } else s = $(a = o.get("data", !0)) ? Up : Wp, e = [];
  10087. var h = this._getSourceMetaRawOption() || {},
  10088. c = l && l.metaRawOption || {},
  10089. p = rt(h.seriesLayoutBy, c.seriesLayoutBy) || null,
  10090. d = rt(h.sourceHeader, c.sourceHeader),
  10091. f = rt(h.dimensions, c.dimensions);
  10092. t = p !== c.seriesLayoutBy || !!d != !!c.sourceHeader || f ? [tf(a, {
  10093. seriesLayoutBy: p,
  10094. sourceHeader: d,
  10095. dimensions: f
  10096. }, s)] : []
  10097. } else {
  10098. var g = n;
  10099. if (r) {
  10100. var y = this._applyTransform(i);
  10101. t = y.sourceList, e = y.upstreamSignList
  10102. } else {
  10103. t = [tf(g.get("source", !0), this._getSourceMetaRawOption(), null)], e = []
  10104. }
  10105. }
  10106. this._setLocalSource(t, e)
  10107. }, t.prototype._applyTransform = function (t) {
  10108. var e, n = this._sourceHost,
  10109. i = n.get("transform", !0),
  10110. r = n.get("fromTransformResult", !0);
  10111. if (null != r) {
  10112. var o = "";
  10113. 1 !== t.length && tg(o)
  10114. }
  10115. var a, s = [],
  10116. l = [];
  10117. return E(t, (function (t) {
  10118. t.prepareSource();
  10119. var e = t.getSource(r || 0),
  10120. n = "";
  10121. null == r || e || tg(n), s.push(e), l.push(t._getVersionSign())
  10122. })), i ? e = function (t, e, n) {
  10123. var i = To(t),
  10124. r = i.length,
  10125. o = "";
  10126. r || wo(o);
  10127. for (var a = 0, s = r; a < s; a++) e = Bf(i[a], e), a !== s - 1 && (e.length = Math.max(e.length, 1));
  10128. return e
  10129. }(i, s, n.componentIndex) : null != r && (e = [(a = s[0], new Jd({
  10130. data: a.data,
  10131. sourceFormat: a.sourceFormat,
  10132. seriesLayoutBy: a.seriesLayoutBy,
  10133. dimensionsDefine: T(a.dimensionsDefine),
  10134. startIndex: a.startIndex,
  10135. dimensionsDetectedCount: a.dimensionsDetectedCount
  10136. }))]), {
  10137. sourceList: e,
  10138. upstreamSignList: l
  10139. }
  10140. }, t.prototype._isDirty = function () {
  10141. if (this._dirty) return !0;
  10142. for (var t = this._getUpstreamSourceManagers(), e = 0; e < t.length; e++) {
  10143. var n = t[e];
  10144. if (n._isDirty() || this._upstreamSignList[e] !== n._getVersionSign()) return !0
  10145. }
  10146. }, t.prototype.getSource = function (t) {
  10147. t = t || 0;
  10148. var e = this._sourceList[t];
  10149. if (!e) {
  10150. var n = this._getUpstreamSourceManagers();
  10151. return n[0] && n[0].getSource(t)
  10152. }
  10153. return e
  10154. }, t.prototype.getSharedDataStore = function (t) {
  10155. var e = t.makeStoreSchema();
  10156. return this._innerGetDataStore(e.dimensions, t.source, e.hash)
  10157. }, t.prototype._innerGetDataStore = function (t, e, n) {
  10158. var i = this._storeList,
  10159. r = i[0];
  10160. r || (r = i[0] = {});
  10161. var o = r[n];
  10162. if (!o) {
  10163. var a = this._getUpstreamSourceManagers()[0];
  10164. Qf(this._sourceHost) && a ? o = a._innerGetDataStore(t, e, n) : (o = new Kf).initData(new sf(e, t.length), t), r[n] = o
  10165. }
  10166. return o
  10167. }, t.prototype._getUpstreamSourceManagers = function () {
  10168. var t = this._sourceHost;
  10169. if (Qf(t)) {
  10170. var e = nd(t);
  10171. return e ? [e.getSourceManager()] : []
  10172. }
  10173. return z(function (t) {
  10174. return t.get("transform", !0) || t.get("fromTransformResult", !0) ? Yo(t.ecModel, "dataset", {
  10175. index: t.get("fromDatasetIndex", !0),
  10176. id: t.get("fromDatasetId", !0)
  10177. }, Wo).models : []
  10178. }(t), (function (t) {
  10179. return t.getSourceManager()
  10180. }))
  10181. }, t.prototype._getSourceMetaRawOption = function () {
  10182. var t, e, n, i = this._sourceHost;
  10183. if (Qf(i)) t = i.get("seriesLayoutBy", !0), e = i.get("sourceHeader", !0), n = i.get("dimensions", !0);
  10184. else if (!this._getUpstreamSourceManagers().length) {
  10185. var r = i;
  10186. t = r.get("seriesLayoutBy", !0), e = r.get("sourceHeader", !0), n = r.get("dimensions", !0)
  10187. }
  10188. return {
  10189. seriesLayoutBy: t,
  10190. sourceHeader: e,
  10191. dimensions: n
  10192. }
  10193. }, t
  10194. }();
  10195. function Jf(t) {
  10196. t.option.transform && ct(t.option.transform)
  10197. }
  10198. function Qf(t) {
  10199. return "series" === t.mainType
  10200. }
  10201. function tg(t) {
  10202. throw new Error(t)
  10203. }
  10204. var eg = "line-height:1";
  10205. function ng(t, e) {
  10206. var n = t.color || "#6e7079",
  10207. i = t.fontSize || 12,
  10208. r = t.fontWeight || "400",
  10209. o = t.color || "#464646",
  10210. a = t.fontSize || 14,
  10211. s = t.fontWeight || "900";
  10212. return "html" === e ? {
  10213. nameStyle: "font-size:" + re(i + "") + "px;color:" + re(n) + ";font-weight:" + re(r + ""),
  10214. valueStyle: "font-size:" + re(a + "") + "px;color:" + re(o) + ";font-weight:" + re(s + "")
  10215. } : {
  10216. nameStyle: {
  10217. fontSize: i,
  10218. fill: n,
  10219. fontWeight: r
  10220. },
  10221. valueStyle: {
  10222. fontSize: a,
  10223. fill: o,
  10224. fontWeight: s
  10225. }
  10226. }
  10227. }
  10228. var ig = [0, 10, 20, 30],
  10229. rg = ["", "\n", "\n\n", "\n\n\n"];
  10230. function og(t, e) {
  10231. return e.type = t, e
  10232. }
  10233. function ag(t) {
  10234. return "section" === t.type
  10235. }
  10236. function sg(t) {
  10237. return ag(t) ? ug : hg
  10238. }
  10239. function lg(t) {
  10240. if (ag(t)) {
  10241. var e = 0,
  10242. n = t.blocks.length,
  10243. i = n > 1 || n > 0 && !t.noHeader;
  10244. return E(t.blocks, (function (t) {
  10245. var n = lg(t);
  10246. n >= e && (e = n + +(i && (!n || ag(t) && !t.noHeader)))
  10247. })), e
  10248. }
  10249. return 0
  10250. }
  10251. function ug(t, e, n, i) {
  10252. var r, o = e.noHeader,
  10253. a = (r = lg(e), {
  10254. html: ig[r],
  10255. richText: rg[r]
  10256. }),
  10257. s = [],
  10258. l = e.blocks || [];
  10259. lt(!l || Y(l)), l = l || [];
  10260. var u = t.orderMode;
  10261. if (e.sortBlocks && u) {
  10262. l = l.slice();
  10263. var h = {
  10264. valueAsc: "asc",
  10265. valueDesc: "desc"
  10266. };
  10267. if (_t(h, u)) {
  10268. var c = new kf(h[u], null);
  10269. l.sort((function (t, e) {
  10270. return c.evaluate(t.sortParam, e.sortParam)
  10271. }))
  10272. } else "seriesDesc" === u && l.reverse()
  10273. }
  10274. E(l, (function (n, r) {
  10275. var o = e.valueFormatter,
  10276. l = sg(n)(o ? A(A({}, t), {
  10277. valueFormatter: o
  10278. }) : t, n, r > 0 ? a.html : 0, i);
  10279. null != l && s.push(l)
  10280. }));
  10281. var p = "richText" === t.renderMode ? s.join(a.richText) : pg(s.join(""), o ? n : a.html);
  10282. if (o) return p;
  10283. var d = mp(e.header, "ordinal", t.useUTC),
  10284. f = ng(i, t.renderMode).nameStyle;
  10285. return "richText" === t.renderMode ? dg(t, d, f) + a.richText + p : pg('<div style="' + f + ";" + eg + ';">' + re(d) + "</div>" + p, n)
  10286. }
  10287. function hg(t, e, n, i) {
  10288. var r = t.renderMode,
  10289. o = e.noName,
  10290. a = e.noValue,
  10291. s = !e.markerType,
  10292. l = e.name,
  10293. u = t.useUTC,
  10294. h = e.valueFormatter || t.valueFormatter || function (t) {
  10295. return z(t = Y(t) ? t : [t], (function (t, e) {
  10296. return mp(t, Y(d) ? d[e] : d, u)
  10297. }))
  10298. };
  10299. if (!o || !a) {
  10300. var c = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", r),
  10301. p = o ? "" : mp(l, "ordinal", u),
  10302. d = e.valueType,
  10303. f = a ? [] : h(e.value, e.dataIndex),
  10304. g = !s || !o,
  10305. y = !s && o,
  10306. v = ng(i, r),
  10307. m = v.nameStyle,
  10308. x = v.valueStyle;
  10309. return "richText" === r ? (s ? "" : c) + (o ? "" : dg(t, p, m)) + (a ? "" : function (t, e, n, i, r) {
  10310. var o = [r],
  10311. a = i ? 10 : 20;
  10312. return n && o.push({
  10313. padding: [0, 0, 0, a],
  10314. align: "right"
  10315. }), t.markupStyleCreator.wrapRichTextStyle(Y(e) ? e.join(" ") : e, o)
  10316. }(t, f, g, y, x)) : pg((s ? "" : c) + (o ? "" : function (t, e, n) {
  10317. return '<span style="' + n + ";" + (e ? "margin-left:2px" : "") + '">' + re(t) + "</span>"
  10318. }(p, !s, m)) + (a ? "" : function (t, e, n, i) {
  10319. var r = n ? "10px" : "20px",
  10320. o = e ? "float:right;margin-left:" + r : "";
  10321. return t = Y(t) ? t : [t], '<span style="' + o + ";" + i + '">' + z(t, (function (t) {
  10322. return re(t)
  10323. })).join("&nbsp;&nbsp;") + "</span>"
  10324. }(f, g, y, x)), n)
  10325. }
  10326. }
  10327. function cg(t, e, n, i, r, o) {
  10328. if (t) return sg(t)({
  10329. useUTC: r,
  10330. renderMode: n,
  10331. orderMode: i,
  10332. markupStyleCreator: e,
  10333. valueFormatter: t.valueFormatter
  10334. }, t, 0, o)
  10335. }
  10336. function pg(t, e) {
  10337. return '<div style="' + ("margin: " + e + "px 0 0") + ";" + eg + ';">' + t + '<div style="clear:both"></div></div>'
  10338. }
  10339. function dg(t, e, n) {
  10340. return t.markupStyleCreator.wrapRichTextStyle(e, n)
  10341. }
  10342. function fg(t, e) {
  10343. return Sp(t.getData().getItemVisual(e, "style")[t.visualDrawType])
  10344. }
  10345. function gg(t, e) {
  10346. var n = t.get("padding");
  10347. return null != n ? n : "richText" === e ? [8, 10] : 10
  10348. }
  10349. var yg = function () {
  10350. function t() {
  10351. this.richTextStyles = {}, this._nextStyleNameId = mo()
  10352. }
  10353. return t.prototype._generateStyleName = function () {
  10354. return "__EC_aUTo_" + this._nextStyleNameId++
  10355. }, t.prototype.makeTooltipMarker = function (t, e, n) {
  10356. var i = "richText" === n ? this._generateStyleName() : null,
  10357. r = wp({
  10358. color: e,
  10359. type: t,
  10360. renderMode: n,
  10361. markerId: i
  10362. });
  10363. return U(r) ? r : (this.richTextStyles[i] = r.style, r.content)
  10364. }, t.prototype.wrapRichTextStyle = function (t, e) {
  10365. var n = {};
  10366. Y(e) ? E(e, (function (t) {
  10367. return A(n, t)
  10368. })) : A(n, e);
  10369. var i = this._generateStyleName();
  10370. return this.richTextStyles[i] = n, "{" + i + "|" + t + "}"
  10371. }, t
  10372. }();
  10373. function vg(t) {
  10374. var e, n, i, r, o = t.series,
  10375. a = t.dataIndex,
  10376. s = t.multipleSeries,
  10377. l = o.getData(),
  10378. u = l.mapDimensionsAll("defaultedTooltip"),
  10379. h = u.length,
  10380. c = o.getRawValue(a),
  10381. p = Y(c),
  10382. d = fg(o, a);
  10383. if (h > 1 || p && !h) {
  10384. var f = function (t, e, n, i, r) {
  10385. var o = e.getData(),
  10386. a = V(t, (function (t, e, n) {
  10387. var i = o.getDimensionInfo(n);
  10388. return t || i && !1 !== i.tooltip && null != i.displayName
  10389. }), !1),
  10390. s = [],
  10391. l = [],
  10392. u = [];
  10393. function h(t, e) {
  10394. var n = o.getDimensionInfo(e);
  10395. n && !1 !== n.otherDims.tooltip && (a ? u.push(og("nameValue", {
  10396. markerType: "subItem",
  10397. markerColor: r,
  10398. name: n.displayName,
  10399. value: t,
  10400. valueType: n.type
  10401. })) : (s.push(t), l.push(n.type)))
  10402. }
  10403. return i.length ? E(i, (function (t) {
  10404. h(mf(o, n, t), t)
  10405. })) : E(t, h), {
  10406. inlineValues: s,
  10407. inlineValueTypes: l,
  10408. blocks: u
  10409. }
  10410. }(c, o, a, u, d);
  10411. e = f.inlineValues, n = f.inlineValueTypes, i = f.blocks, r = f.inlineValues[0]
  10412. } else if (h) {
  10413. var g = l.getDimensionInfo(u[0]);
  10414. r = e = mf(l, a, u[0]), n = g.type
  10415. } else r = e = p ? c[0] : c;
  10416. var y = No(o),
  10417. v = y && o.name || "",
  10418. m = l.getName(a),
  10419. x = s ? v : m;
  10420. return og("section", {
  10421. header: v,
  10422. noHeader: s || !y,
  10423. sortParam: r,
  10424. blocks: [og("nameValue", {
  10425. markerType: "item",
  10426. markerColor: d,
  10427. name: x,
  10428. noName: !ut(x),
  10429. value: e,
  10430. valueType: n,
  10431. dataIndex: a
  10432. })].concat(i || [])
  10433. })
  10434. }
  10435. var mg = Vo();
  10436. function xg(t, e) {
  10437. return t.getName(e) || t.getId(e)
  10438. }
  10439. var _g = "__universalTransitionEnabled",
  10440. bg = function (t) {
  10441. function e() {
  10442. var e = null !== t && t.apply(this, arguments) || this;
  10443. return e._selectedDataIndicesMap = {}, e
  10444. }
  10445. return n(e, t), e.prototype.init = function (t, e, n) {
  10446. this.seriesIndex = this.componentIndex, this.dataTask = wf({
  10447. count: Sg,
  10448. reset: Mg
  10449. }), this.dataTask.context = {
  10450. model: this
  10451. }, this.mergeDefaultAndTheme(t, n), (mg(this).sourceManager = new $f(this)).prepareSource();
  10452. var i = this.getInitialData(t, n);
  10453. Tg(i, this), this.dataTask.context.data = i, mg(this).dataBeforeProcessed = i, wg(this), this._initSelectedMapFromData(i)
  10454. }, e.prototype.mergeDefaultAndTheme = function (t, e) {
  10455. var n = Pp(this),
  10456. i = n ? Rp(t) : {},
  10457. r = this.subType;
  10458. zp.hasClass(r) && (r += "Series"), C(t, e.getTheme().get(this.subType)), C(t, this.getDefaultOption()), Co(t, "label", ["show"]), this.fillDataTextStyle(t.data), n && Op(t, i, n)
  10459. }, e.prototype.mergeOption = function (t, e) {
  10460. t = C(this.option, t, !0), this.fillDataTextStyle(t.data);
  10461. var n = Pp(this);
  10462. n && Op(this.option, t, n);
  10463. var i = mg(this).sourceManager;
  10464. i.dirty(), i.prepareSource();
  10465. var r = this.getInitialData(t, e);
  10466. Tg(r, this), this.dataTask.dirty(), this.dataTask.context.data = r, mg(this).dataBeforeProcessed = r, wg(this), this._initSelectedMapFromData(r)
  10467. }, e.prototype.fillDataTextStyle = function (t) {
  10468. if (t && !$(t))
  10469. for (var e = ["show"], n = 0; n < t.length; n++) t[n] && t[n].label && Co(t[n], "label", e)
  10470. }, e.prototype.getInitialData = function (t, e) {}, e.prototype.appendData = function (t) {
  10471. this.getRawData().appendData(t.data)
  10472. }, e.prototype.getData = function (t) {
  10473. var e = Dg(this);
  10474. if (e) {
  10475. var n = e.context.data;
  10476. return null == t ? n : n.getLinkedData(t)
  10477. }
  10478. return mg(this).data
  10479. }, e.prototype.getAllData = function () {
  10480. var t = this.getData();
  10481. return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{
  10482. data: t
  10483. }]
  10484. }, e.prototype.setData = function (t) {
  10485. var e = Dg(this);
  10486. if (e) {
  10487. var n = e.context;
  10488. n.outputData = t, e !== this.dataTask && (n.data = t)
  10489. }
  10490. mg(this).data = t
  10491. }, e.prototype.getEncode = function () {
  10492. var t = this.get("encode", !0);
  10493. if (t) return yt(t)
  10494. }, e.prototype.getSourceManager = function () {
  10495. return mg(this).sourceManager
  10496. }, e.prototype.getSource = function () {
  10497. return this.getSourceManager().getSource()
  10498. }, e.prototype.getRawData = function () {
  10499. return mg(this).dataBeforeProcessed
  10500. }, e.prototype.getColorBy = function () {
  10501. return this.get("colorBy") || "series"
  10502. }, e.prototype.isColorBySeries = function () {
  10503. return "series" === this.getColorBy()
  10504. }, e.prototype.getBaseAxis = function () {
  10505. var t = this.coordinateSystem;
  10506. return t && t.getBaseAxis && t.getBaseAxis()
  10507. }, e.prototype.formatTooltip = function (t, e, n) {
  10508. return vg({
  10509. series: this,
  10510. dataIndex: t,
  10511. multipleSeries: e
  10512. })
  10513. }, e.prototype.isAnimationEnabled = function () {
  10514. var t = this.ecModel;
  10515. if (r.node && (!t || !t.ssr)) return !1;
  10516. var e = this.getShallow("animation");
  10517. return e && this.getData().count() > this.getShallow("animationThreshold") && (e = !1), !!e
  10518. }, e.prototype.restoreData = function () {
  10519. this.dataTask.dirty()
  10520. }, e.prototype.getColorFromPalette = function (t, e, n) {
  10521. var i = this.ecModel,
  10522. r = cd.prototype.getColorFromPalette.call(this, t, e, n);
  10523. return r || (r = i.getColorFromPalette(t, e, n)), r
  10524. }, e.prototype.coordDimToDataDim = function (t) {
  10525. return this.getRawData().mapDimensionsAll(t)
  10526. }, e.prototype.getProgressive = function () {
  10527. return this.get("progressive")
  10528. }, e.prototype.getProgressiveThreshold = function () {
  10529. return this.get("progressiveThreshold")
  10530. }, e.prototype.select = function (t, e) {
  10531. this._innerSelect(this.getData(e), t)
  10532. }, e.prototype.unselect = function (t, e) {
  10533. var n = this.option.selectedMap;
  10534. if (n) {
  10535. var i = this.option.selectedMode,
  10536. r = this.getData(e);
  10537. if ("series" === i || "all" === n) return this.option.selectedMap = {}, void(this._selectedDataIndicesMap = {});
  10538. for (var o = 0; o < t.length; o++) {
  10539. var a = xg(r, t[o]);
  10540. n[a] = !1, this._selectedDataIndicesMap[a] = -1
  10541. }
  10542. }
  10543. }, e.prototype.toggleSelect = function (t, e) {
  10544. for (var n = [], i = 0; i < t.length; i++) n[0] = t[i], this.isSelected(t[i], e) ? this.unselect(n, e) : this.select(n, e)
  10545. }, e.prototype.getSelectedDataIndices = function () {
  10546. if ("all" === this.option.selectedMap) return [].slice.call(this.getData().getIndices());
  10547. for (var t = this._selectedDataIndicesMap, e = G(t), n = [], i = 0; i < e.length; i++) {
  10548. var r = t[e[i]];
  10549. r >= 0 && n.push(r)
  10550. }
  10551. return n
  10552. }, e.prototype.isSelected = function (t, e) {
  10553. var n = this.option.selectedMap;
  10554. if (!n) return !1;
  10555. var i = this.getData(e);
  10556. return ("all" === n || n[xg(i, t)]) && !i.getItemModel(t).get(["select", "disabled"])
  10557. }, e.prototype.isUniversalTransitionEnabled = function () {
  10558. if (this[_g]) return !0;
  10559. var t = this.option.universalTransition;
  10560. return !!t && (!0 === t || t && t.enabled)
  10561. }, e.prototype._innerSelect = function (t, e) {
  10562. var n, i, r = this.option,
  10563. o = r.selectedMode,
  10564. a = e.length;
  10565. if (o && a)
  10566. if ("series" === o) r.selectedMap = "all";
  10567. else if ("multiple" === o) {
  10568. q(r.selectedMap) || (r.selectedMap = {});
  10569. for (var s = r.selectedMap, l = 0; l < a; l++) {
  10570. var u = e[l];
  10571. s[c = xg(t, u)] = !0, this._selectedDataIndicesMap[c] = t.getRawIndex(u)
  10572. }
  10573. } else if ("single" === o || !0 === o) {
  10574. var h = e[a - 1],
  10575. c = xg(t, h);
  10576. r.selectedMap = ((n = {})[c] = !0, n), this._selectedDataIndicesMap = ((i = {})[c] = t.getRawIndex(h), i)
  10577. }
  10578. }, e.prototype._initSelectedMapFromData = function (t) {
  10579. if (!this.option.selectedMap) {
  10580. var e = [];
  10581. t.hasItemOption && t.each((function (n) {
  10582. var i = t.getRawDataItem(n);
  10583. i && i.selected && e.push(n)
  10584. })), e.length > 0 && this._innerSelect(t, e)
  10585. }
  10586. }, e.registerClass = function (t) {
  10587. return zp.registerClass(t)
  10588. }, e.protoInitialize = function () {
  10589. var t = e.prototype;
  10590. t.type = "series.__base__", t.seriesIndex = 0, t.ignoreStyleOnData = !1, t.hasSymbolVisual = !1, t.defaultSymbol = "circle", t.visualStyleAccessPath = "itemStyle", t.visualDrawType = "fill"
  10591. }(), e
  10592. }(zp);
  10593. function wg(t) {
  10594. var e = t.name;
  10595. No(t) || (t.name = function (t) {
  10596. var e = t.getRawData(),
  10597. n = e.mapDimensionsAll("seriesName"),
  10598. i = [];
  10599. return E(n, (function (t) {
  10600. var n = e.getDimensionInfo(t);
  10601. n.displayName && i.push(n.displayName)
  10602. })), i.join(" ")
  10603. }(t) || e)
  10604. }
  10605. function Sg(t) {
  10606. return t.model.getRawData().count()
  10607. }
  10608. function Mg(t) {
  10609. var e = t.model;
  10610. return e.setData(e.getRawData().cloneShallow()), Ig
  10611. }
  10612. function Ig(t, e) {
  10613. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData)
  10614. }
  10615. function Tg(t, e) {
  10616. E(vt(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), (function (n) {
  10617. t.wrapMethod(n, H(Cg, e))
  10618. }))
  10619. }
  10620. function Cg(t, e) {
  10621. var n = Dg(t);
  10622. return n && n.setOutputEnd((e || this).count()), e
  10623. }
  10624. function Dg(t) {
  10625. var e = (t.ecModel || {}).scheduler,
  10626. n = e && e.getPipeline(t.uid);
  10627. if (n) {
  10628. var i = n.currentTask;
  10629. if (i) {
  10630. var r = i.agentStubMap;
  10631. r && (i = r.get(t.uid))
  10632. }
  10633. return i
  10634. }
  10635. }
  10636. R(bg, _f), R(bg, cd), Jo(bg, zp);
  10637. var Ag = function () {
  10638. function t() {
  10639. this.group = new Br, this.uid = Ac("viewComponent")
  10640. }
  10641. return t.prototype.init = function (t, e) {}, t.prototype.render = function (t, e, n, i) {}, t.prototype.dispose = function (t, e) {}, t.prototype.updateView = function (t, e, n, i) {}, t.prototype.updateLayout = function (t, e, n, i) {}, t.prototype.updateVisual = function (t, e, n, i) {}, t.prototype.toggleBlurSeries = function (t, e, n) {}, t.prototype.eachRendered = function (t) {
  10642. var e = this.group;
  10643. e && e.traverse(t)
  10644. }, t
  10645. }();
  10646. function kg() {
  10647. var t = Vo();
  10648. return function (e) {
  10649. var n = t(e),
  10650. i = e.pipelineContext,
  10651. r = !!n.large,
  10652. o = !!n.progressiveRender,
  10653. a = n.large = !(!i || !i.large),
  10654. s = n.progressiveRender = !(!i || !i.progressiveRender);
  10655. return !(r === a && o === s) && "reset"
  10656. }
  10657. }
  10658. $o(Ag), na(Ag);
  10659. var Lg = Vo(),
  10660. Pg = kg(),
  10661. Og = function () {
  10662. function t() {
  10663. this.group = new Br, this.uid = Ac("viewChart"), this.renderTask = wf({
  10664. plan: Eg,
  10665. reset: zg
  10666. }), this.renderTask.context = {
  10667. view: this
  10668. }
  10669. }
  10670. return t.prototype.init = function (t, e) {}, t.prototype.render = function (t, e, n, i) {
  10671. 0
  10672. }, t.prototype.highlight = function (t, e, n, i) {
  10673. var r = t.getData(i && i.dataType);
  10674. r && Ng(r, i, "emphasis")
  10675. }, t.prototype.downplay = function (t, e, n, i) {
  10676. var r = t.getData(i && i.dataType);
  10677. r && Ng(r, i, "normal")
  10678. }, t.prototype.remove = function (t, e) {
  10679. this.group.removeAll()
  10680. }, t.prototype.dispose = function (t, e) {}, t.prototype.updateView = function (t, e, n, i) {
  10681. this.render(t, e, n, i)
  10682. }, t.prototype.updateLayout = function (t, e, n, i) {
  10683. this.render(t, e, n, i)
  10684. }, t.prototype.updateVisual = function (t, e, n, i) {
  10685. this.render(t, e, n, i)
  10686. }, t.prototype.eachRendered = function (t) {
  10687. Jh(this.group, t)
  10688. }, t.markUpdateMethod = function (t, e) {
  10689. Lg(t).updateMethod = e
  10690. }, t.protoInitialize = void(t.prototype.type = "chart"), t
  10691. }();
  10692. function Rg(t, e, n) {
  10693. t && Ql(t) && ("emphasis" === e ? Ol : Rl)(t, n)
  10694. }
  10695. function Ng(t, e, n) {
  10696. var i = zo(t, e),
  10697. r = e && null != e.highlightKey ? function (t) {
  10698. var e = sl[t];
  10699. return null == e && al <= 32 && (e = sl[t] = al++), e
  10700. }(e.highlightKey) : null;
  10701. null != i ? E(To(i), (function (e) {
  10702. Rg(t.getItemGraphicEl(e), n, r)
  10703. })) : t.eachItemGraphicEl((function (t) {
  10704. Rg(t, n, r)
  10705. }))
  10706. }
  10707. function Eg(t) {
  10708. return Pg(t.model)
  10709. }
  10710. function zg(t) {
  10711. var e = t.model,
  10712. n = t.ecModel,
  10713. i = t.api,
  10714. r = t.payload,
  10715. o = e.pipelineContext.progressiveRender,
  10716. a = t.view,
  10717. s = r && Lg(r).updateMethod,
  10718. l = o ? "incrementalPrepareRender" : s && a[s] ? s : "render";
  10719. return "render" !== l && a[l](e, n, i, r), Vg[l]
  10720. }
  10721. $o(Og), na(Og);
  10722. var Vg = {
  10723. incrementalPrepareRender: {
  10724. progress: function (t, e) {
  10725. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload)
  10726. }
  10727. },
  10728. render: {
  10729. forceFirstProgress: !0,
  10730. progress: function (t, e) {
  10731. e.view.render(e.model, e.ecModel, e.api, e.payload)
  10732. }
  10733. }
  10734. },
  10735. Bg = "\0__throttleOriginMethod",
  10736. Fg = "\0__throttleRate",
  10737. Gg = "\0__throttleType";
  10738. function Wg(t, e, n) {
  10739. var i, r, o, a, s, l = 0,
  10740. u = 0,
  10741. h = null;
  10742. function c() {
  10743. u = (new Date).getTime(), h = null, t.apply(o, a || [])
  10744. }
  10745. e = e || 0;
  10746. var p = function () {
  10747. for (var t = [], p = 0; p < arguments.length; p++) t[p] = arguments[p];
  10748. i = (new Date).getTime(), o = this, a = t;
  10749. var d = s || e,
  10750. f = s || n;
  10751. s = null, r = i - (f ? l : u) - d, clearTimeout(h), f ? h = setTimeout(c, d) : r >= 0 ? c() : h = setTimeout(c, -r), l = i
  10752. };
  10753. return p.clear = function () {
  10754. h && (clearTimeout(h), h = null)
  10755. }, p.debounceNextCall = function (t) {
  10756. s = t
  10757. }, p
  10758. }
  10759. function Hg(t, e, n, i) {
  10760. var r = t[e];
  10761. if (r) {
  10762. var o = r[Bg] || r,
  10763. a = r[Gg];
  10764. if (r[Fg] !== n || a !== i) {
  10765. if (null == n || !i) return t[e] = o;
  10766. (r = t[e] = Wg(o, n, "debounce" === i))[Bg] = o, r[Gg] = i, r[Fg] = n
  10767. }
  10768. return r
  10769. }
  10770. }
  10771. function Yg(t, e) {
  10772. var n = t[e];
  10773. n && n[Bg] && (n.clear && n.clear(), t[e] = n[Bg])
  10774. }
  10775. var Xg = Vo(),
  10776. Ug = {
  10777. itemStyle: ia(Mc, !0),
  10778. lineStyle: ia(bc, !0)
  10779. },
  10780. Zg = {
  10781. lineStyle: "stroke",
  10782. itemStyle: "fill"
  10783. };
  10784. function jg(t, e) {
  10785. var n = t.visualStyleMapper || Ug[e];
  10786. return n || (console.warn("Unknown style type '" + e + "'."), Ug.itemStyle)
  10787. }
  10788. function qg(t, e) {
  10789. var n = t.visualDrawType || Zg[e];
  10790. return n || (console.warn("Unknown style type '" + e + "'."), "fill")
  10791. }
  10792. var Kg = {
  10793. createOnAllSeries: !0,
  10794. performRawSeries: !0,
  10795. reset: function (t, e) {
  10796. var n = t.getData(),
  10797. i = t.visualStyleAccessPath || "itemStyle",
  10798. r = t.getModel(i),
  10799. o = jg(t, i)(r),
  10800. a = r.getShallow("decal");
  10801. a && (n.setVisual("decal", a), a.dirty = !0);
  10802. var s = qg(t, i),
  10803. l = o[s],
  10804. u = X(l) ? l : null,
  10805. h = "auto" === o.fill || "auto" === o.stroke;
  10806. if (!o[s] || u || h) {
  10807. var c = t.getColorFromPalette(t.name, null, e.getSeriesCount());
  10808. o[s] || (o[s] = c, n.setVisual("colorFromPalette", !0)), o.fill = "auto" === o.fill || X(o.fill) ? c : o.fill, o.stroke = "auto" === o.stroke || X(o.stroke) ? c : o.stroke
  10809. }
  10810. if (n.setVisual("style", o), n.setVisual("drawType", s), !e.isSeriesFiltered(t) && u) return n.setVisual("colorFromPalette", !1), {
  10811. dataEach: function (e, n) {
  10812. var i = t.getDataParams(n),
  10813. r = A({}, o);
  10814. r[s] = u(i), e.setItemVisual(n, "style", r)
  10815. }
  10816. }
  10817. }
  10818. },
  10819. $g = new Cc,
  10820. Jg = {
  10821. createOnAllSeries: !0,
  10822. performRawSeries: !0,
  10823. reset: function (t, e) {
  10824. if (!t.ignoreStyleOnData && !e.isSeriesFiltered(t)) {
  10825. var n = t.getData(),
  10826. i = t.visualStyleAccessPath || "itemStyle",
  10827. r = jg(t, i),
  10828. o = n.getVisual("drawType");
  10829. return {
  10830. dataEach: n.hasItemOption ? function (t, e) {
  10831. var n = t.getRawDataItem(e);
  10832. if (n && n[i]) {
  10833. $g.option = n[i];
  10834. var a = r($g);
  10835. A(t.ensureUniqueItemVisual(e, "style"), a), $g.option.decal && (t.setItemVisual(e, "decal", $g.option.decal), $g.option.decal.dirty = !0), o in a && t.setItemVisual(e, "colorFromPalette", !1)
  10836. }
  10837. } : null
  10838. }
  10839. }
  10840. }
  10841. },
  10842. Qg = {
  10843. performRawSeries: !0,
  10844. overallReset: function (t) {
  10845. var e = yt();
  10846. t.eachSeries((function (t) {
  10847. var n = t.getColorBy();
  10848. if (!t.isColorBySeries()) {
  10849. var i = t.type + "-" + n,
  10850. r = e.get(i);
  10851. r || (r = {}, e.set(i, r)), Xg(t).scope = r
  10852. }
  10853. })), t.eachSeries((function (e) {
  10854. if (!e.isColorBySeries() && !t.isSeriesFiltered(e)) {
  10855. var n = e.getRawData(),
  10856. i = {},
  10857. r = e.getData(),
  10858. o = Xg(e).scope,
  10859. a = e.visualStyleAccessPath || "itemStyle",
  10860. s = qg(e, a);
  10861. r.each((function (t) {
  10862. var e = r.getRawIndex(t);
  10863. i[e] = t
  10864. })), n.each((function (t) {
  10865. var a = i[t];
  10866. if (r.getItemVisual(a, "colorFromPalette")) {
  10867. var l = r.ensureUniqueItemVisual(a, "style"),
  10868. u = n.getName(t) || t + "",
  10869. h = n.count();
  10870. l[s] = e.getColorFromPalette(u, o, h)
  10871. }
  10872. }))
  10873. }
  10874. }))
  10875. }
  10876. },
  10877. ty = Math.PI;
  10878. var ey = function () {
  10879. function t(t, e, n, i) {
  10880. this._stageTaskMap = yt(), this.ecInstance = t, this.api = e, n = this._dataProcessorHandlers = n.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = n.concat(i)
  10881. }
  10882. return t.prototype.restoreData = function (t, e) {
  10883. t.restoreData(e), this._stageTaskMap.each((function (t) {
  10884. var e = t.overallTask;
  10885. e && e.dirty()
  10886. }))
  10887. }, t.prototype.getPerformArgs = function (t, e) {
  10888. if (t.__pipeline) {
  10889. var n = this._pipelineMap.get(t.__pipeline.id),
  10890. i = n.context,
  10891. r = !e && n.progressiveEnabled && (!i || i.progressiveRender) && t.__idxInPipeline > n.blockIndex ? n.step : null,
  10892. o = i && i.modDataCount;
  10893. return {
  10894. step: r,
  10895. modBy: null != o ? Math.ceil(o / r) : null,
  10896. modDataCount: o
  10897. }
  10898. }
  10899. }, t.prototype.getPipeline = function (t) {
  10900. return this._pipelineMap.get(t)
  10901. }, t.prototype.updateStreamModes = function (t, e) {
  10902. var n = this._pipelineMap.get(t.uid),
  10903. i = t.getData().count(),
  10904. r = n.progressiveEnabled && e.incrementalPrepareRender && i >= n.threshold,
  10905. o = t.get("large") && i >= t.get("largeThreshold"),
  10906. a = "mod" === t.get("progressiveChunkMode") ? i : null;
  10907. t.pipelineContext = n.context = {
  10908. progressiveRender: r,
  10909. modDataCount: a,
  10910. large: o
  10911. }
  10912. }, t.prototype.restorePipelines = function (t) {
  10913. var e = this,
  10914. n = e._pipelineMap = yt();
  10915. t.eachSeries((function (t) {
  10916. var i = t.getProgressive(),
  10917. r = t.uid;
  10918. n.set(r, {
  10919. id: r,
  10920. head: null,
  10921. tail: null,
  10922. threshold: t.getProgressiveThreshold(),
  10923. progressiveEnabled: i && !(t.preventIncremental && t.preventIncremental()),
  10924. blockIndex: -1,
  10925. step: Math.round(i || 700),
  10926. count: 0
  10927. }), e._pipe(t, t.dataTask)
  10928. }))
  10929. }, t.prototype.prepareStageTasks = function () {
  10930. var t = this._stageTaskMap,
  10931. e = this.api.getModel(),
  10932. n = this.api;
  10933. E(this._allHandlers, (function (i) {
  10934. var r = t.get(i.uid) || t.set(i.uid, {}),
  10935. o = "";
  10936. lt(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, r, e, n), i.overallReset && this._createOverallStageTask(i, r, e, n)
  10937. }), this)
  10938. }, t.prototype.prepareView = function (t, e, n, i) {
  10939. var r = t.renderTask,
  10940. o = r.context;
  10941. o.model = e, o.ecModel = n, o.api = i, r.__block = !t.incrementalPrepareRender, this._pipe(e, r)
  10942. }, t.prototype.performDataProcessorTasks = function (t, e) {
  10943. this._performStageTasks(this._dataProcessorHandlers, t, e, {
  10944. block: !0
  10945. })
  10946. }, t.prototype.performVisualTasks = function (t, e, n) {
  10947. this._performStageTasks(this._visualHandlers, t, e, n)
  10948. }, t.prototype._performStageTasks = function (t, e, n, i) {
  10949. i = i || {};
  10950. var r = !1,
  10951. o = this;
  10952. function a(t, e) {
  10953. return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id))
  10954. }
  10955. E(t, (function (t, s) {
  10956. if (!i.visualType || i.visualType === t.visualType) {
  10957. var l = o._stageTaskMap.get(t.uid),
  10958. u = l.seriesTaskMap,
  10959. h = l.overallTask;
  10960. if (h) {
  10961. var c, p = h.agentStubMap;
  10962. p.each((function (t) {
  10963. a(i, t) && (t.dirty(), c = !0)
  10964. })), c && h.dirty(), o.updatePayload(h, n);
  10965. var d = o.getPerformArgs(h, i.block);
  10966. p.each((function (t) {
  10967. t.perform(d)
  10968. })), h.perform(d) && (r = !0)
  10969. } else u && u.each((function (s, l) {
  10970. a(i, s) && s.dirty();
  10971. var u = o.getPerformArgs(s, i.block);
  10972. u.skip = !t.performRawSeries && e.isSeriesFiltered(s.context.model), o.updatePayload(s, n), s.perform(u) && (r = !0)
  10973. }))
  10974. }
  10975. })), this.unfinished = r || this.unfinished
  10976. }, t.prototype.performSeriesTasks = function (t) {
  10977. var e;
  10978. t.eachSeries((function (t) {
  10979. e = t.dataTask.perform() || e
  10980. })), this.unfinished = e || this.unfinished
  10981. }, t.prototype.plan = function () {
  10982. this._pipelineMap.each((function (t) {
  10983. var e = t.tail;
  10984. do {
  10985. if (e.__block) {
  10986. t.blockIndex = e.__idxInPipeline;
  10987. break
  10988. }
  10989. e = e.getUpstream()
  10990. } while (e)
  10991. }))
  10992. }, t.prototype.updatePayload = function (t, e) {
  10993. "remain" !== e && (t.context.payload = e)
  10994. }, t.prototype._createSeriesStageTask = function (t, e, n, i) {
  10995. var r = this,
  10996. o = e.seriesTaskMap,
  10997. a = e.seriesTaskMap = yt(),
  10998. s = t.seriesType,
  10999. l = t.getTargetSeries;
  11000. function u(e) {
  11001. var s = e.uid,
  11002. l = a.set(s, o && o.get(s) || wf({
  11003. plan: ay,
  11004. reset: sy,
  11005. count: hy
  11006. }));
  11007. l.context = {
  11008. model: e,
  11009. ecModel: n,
  11010. api: i,
  11011. useClearVisual: t.isVisual && !t.isLayout,
  11012. plan: t.plan,
  11013. reset: t.reset,
  11014. scheduler: r
  11015. }, r._pipe(e, l)
  11016. }
  11017. t.createOnAllSeries ? n.eachRawSeries(u) : s ? n.eachRawSeriesByType(s, u) : l && l(n, i).each(u)
  11018. }, t.prototype._createOverallStageTask = function (t, e, n, i) {
  11019. var r = this,
  11020. o = e.overallTask = e.overallTask || wf({
  11021. reset: ny
  11022. });
  11023. o.context = {
  11024. ecModel: n,
  11025. api: i,
  11026. overallReset: t.overallReset,
  11027. scheduler: r
  11028. };
  11029. var a = o.agentStubMap,
  11030. s = o.agentStubMap = yt(),
  11031. l = t.seriesType,
  11032. u = t.getTargetSeries,
  11033. h = !0,
  11034. c = !1,
  11035. p = "";
  11036. function d(t) {
  11037. var e = t.uid,
  11038. n = s.set(e, a && a.get(e) || (c = !0, wf({
  11039. reset: iy,
  11040. onDirty: oy
  11041. })));
  11042. n.context = {
  11043. model: t,
  11044. overallProgress: h
  11045. }, n.agent = o, n.__block = h, r._pipe(t, n)
  11046. }
  11047. lt(!t.createOnAllSeries, p), l ? n.eachRawSeriesByType(l, d) : u ? u(n, i).each(d) : (h = !1, E(n.getSeries(), d)), c && o.dirty()
  11048. }, t.prototype._pipe = function (t, e) {
  11049. var n = t.uid,
  11050. i = this._pipelineMap.get(n);
  11051. !i.head && (i.head = e), i.tail && i.tail.pipe(e), i.tail = e, e.__idxInPipeline = i.count++, e.__pipeline = i
  11052. }, t.wrapStageHandler = function (t, e) {
  11053. return X(t) && (t = {
  11054. overallReset: t,
  11055. seriesType: cy(t)
  11056. }), t.uid = Ac("stageHandler"), e && (t.visualType = e), t
  11057. }, t
  11058. }();
  11059. function ny(t) {
  11060. t.overallReset(t.ecModel, t.api, t.payload)
  11061. }
  11062. function iy(t) {
  11063. return t.overallProgress && ry
  11064. }
  11065. function ry() {
  11066. this.agent.dirty(), this.getDownstream().dirty()
  11067. }
  11068. function oy() {
  11069. this.agent && this.agent.dirty()
  11070. }
  11071. function ay(t) {
  11072. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null
  11073. }
  11074. function sy(t) {
  11075. t.useClearVisual && t.data.clearAllVisual();
  11076. var e = t.resetDefines = To(t.reset(t.model, t.ecModel, t.api, t.payload));
  11077. return e.length > 1 ? z(e, (function (t, e) {
  11078. return uy(e)
  11079. })) : ly
  11080. }
  11081. var ly = uy(0);
  11082. function uy(t) {
  11083. return function (e, n) {
  11084. var i = n.data,
  11085. r = n.resetDefines[t];
  11086. if (r && r.dataEach)
  11087. for (var o = e.start; o < e.end; o++) r.dataEach(i, o);
  11088. else r && r.progress && r.progress(e, i)
  11089. }
  11090. }
  11091. function hy(t) {
  11092. return t.data.count()
  11093. }
  11094. function cy(t) {
  11095. py = null;
  11096. try {
  11097. t(dy, fy)
  11098. } catch (t) {}
  11099. return py
  11100. }
  11101. var py, dy = {},
  11102. fy = {};
  11103. function gy(t, e) {
  11104. for (var n in e.prototype) t[n] = bt
  11105. }
  11106. gy(dy, gd), gy(fy, _d), dy.eachSeriesByType = dy.eachRawSeriesByType = function (t) {
  11107. py = t
  11108. }, dy.eachComponent = function (t) {
  11109. "series" === t.mainType && t.subType && (py = t.subType)
  11110. };
  11111. var yy = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
  11112. vy = {
  11113. color: yy,
  11114. colorLayer: [
  11115. ["#37A2DA", "#ffd85c", "#fd7b5f"],
  11116. ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"],
  11117. ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], yy
  11118. ]
  11119. },
  11120. my = "#B9B8CE",
  11121. xy = "#100C2A",
  11122. _y = function () {
  11123. return {
  11124. axisLine: {
  11125. lineStyle: {
  11126. color: my
  11127. }
  11128. },
  11129. splitLine: {
  11130. lineStyle: {
  11131. color: "#484753"
  11132. }
  11133. },
  11134. splitArea: {
  11135. areaStyle: {
  11136. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  11137. }
  11138. },
  11139. minorSplitLine: {
  11140. lineStyle: {
  11141. color: "#20203B"
  11142. }
  11143. }
  11144. }
  11145. },
  11146. by = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"],
  11147. wy = {
  11148. darkMode: !0,
  11149. color: by,
  11150. backgroundColor: xy,
  11151. axisPointer: {
  11152. lineStyle: {
  11153. color: "#817f91"
  11154. },
  11155. crossStyle: {
  11156. color: "#817f91"
  11157. },
  11158. label: {
  11159. color: "#fff"
  11160. }
  11161. },
  11162. legend: {
  11163. textStyle: {
  11164. color: my
  11165. }
  11166. },
  11167. textStyle: {
  11168. color: my
  11169. },
  11170. title: {
  11171. textStyle: {
  11172. color: "#EEF1FA"
  11173. },
  11174. subtextStyle: {
  11175. color: "#B9B8CE"
  11176. }
  11177. },
  11178. toolbox: {
  11179. iconStyle: {
  11180. borderColor: my
  11181. }
  11182. },
  11183. dataZoom: {
  11184. borderColor: "#71708A",
  11185. textStyle: {
  11186. color: my
  11187. },
  11188. brushStyle: {
  11189. color: "rgba(135,163,206,0.3)"
  11190. },
  11191. handleStyle: {
  11192. color: "#353450",
  11193. borderColor: "#C5CBE3"
  11194. },
  11195. moveHandleStyle: {
  11196. color: "#B0B6C3",
  11197. opacity: .3
  11198. },
  11199. fillerColor: "rgba(135,163,206,0.2)",
  11200. emphasis: {
  11201. handleStyle: {
  11202. borderColor: "#91B7F2",
  11203. color: "#4D587D"
  11204. },
  11205. moveHandleStyle: {
  11206. color: "#636D9A",
  11207. opacity: .7
  11208. }
  11209. },
  11210. dataBackground: {
  11211. lineStyle: {
  11212. color: "#71708A",
  11213. width: 1
  11214. },
  11215. areaStyle: {
  11216. color: "#71708A"
  11217. }
  11218. },
  11219. selectedDataBackground: {
  11220. lineStyle: {
  11221. color: "#87A3CE"
  11222. },
  11223. areaStyle: {
  11224. color: "#87A3CE"
  11225. }
  11226. }
  11227. },
  11228. visualMap: {
  11229. textStyle: {
  11230. color: my
  11231. }
  11232. },
  11233. timeline: {
  11234. lineStyle: {
  11235. color: my
  11236. },
  11237. label: {
  11238. color: my
  11239. },
  11240. controlStyle: {
  11241. color: my,
  11242. borderColor: my
  11243. }
  11244. },
  11245. calendar: {
  11246. itemStyle: {
  11247. color: xy
  11248. },
  11249. dayLabel: {
  11250. color: my
  11251. },
  11252. monthLabel: {
  11253. color: my
  11254. },
  11255. yearLabel: {
  11256. color: my
  11257. }
  11258. },
  11259. timeAxis: _y(),
  11260. logAxis: _y(),
  11261. valueAxis: _y(),
  11262. categoryAxis: _y(),
  11263. line: {
  11264. symbol: "circle"
  11265. },
  11266. graph: {
  11267. color: by
  11268. },
  11269. gauge: {
  11270. title: {
  11271. color: my
  11272. },
  11273. axisLine: {
  11274. lineStyle: {
  11275. color: [
  11276. [1, "rgba(207,212,219,0.2)"]
  11277. ]
  11278. }
  11279. },
  11280. axisLabel: {
  11281. color: my
  11282. },
  11283. detail: {
  11284. color: "#EEF1FA"
  11285. }
  11286. },
  11287. candlestick: {
  11288. itemStyle: {
  11289. color: "#f64e56",
  11290. color0: "#54ea92",
  11291. borderColor: "#f64e56",
  11292. borderColor0: "#54ea92"
  11293. }
  11294. }
  11295. };
  11296. wy.categoryAxis.splitLine.show = !1;
  11297. var Sy = function () {
  11298. function t() {}
  11299. return t.prototype.normalizeQuery = function (t) {
  11300. var e = {},
  11301. n = {},
  11302. i = {};
  11303. if (U(t)) {
  11304. var r = Ko(t);
  11305. e.mainType = r.main || null, e.subType = r.sub || null
  11306. } else {
  11307. var o = ["Index", "Name", "Id"],
  11308. a = {
  11309. name: 1,
  11310. dataIndex: 1,
  11311. dataType: 1
  11312. };
  11313. E(t, (function (t, r) {
  11314. for (var s = !1, l = 0; l < o.length; l++) {
  11315. var u = o[l],
  11316. h = r.lastIndexOf(u);
  11317. if (h > 0 && h === r.length - u.length) {
  11318. var c = r.slice(0, h);
  11319. "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0)
  11320. }
  11321. }
  11322. a.hasOwnProperty(r) && (n[r] = t, s = !0), s || (i[r] = t)
  11323. }))
  11324. }
  11325. return {
  11326. cptQuery: e,
  11327. dataQuery: n,
  11328. otherQuery: i
  11329. }
  11330. }, t.prototype.filter = function (t, e) {
  11331. var n = this.eventInfo;
  11332. if (!n) return !0;
  11333. var i = n.targetEl,
  11334. r = n.packedEvent,
  11335. o = n.model,
  11336. a = n.view;
  11337. if (!o || !a) return !0;
  11338. var s = e.cptQuery,
  11339. l = e.dataQuery;
  11340. return u(s, o, "mainType") && u(s, o, "subType") && u(s, o, "index", "componentIndex") && u(s, o, "name") && u(s, o, "id") && u(l, r, "name") && u(l, r, "dataIndex") && u(l, r, "dataType") && (!a.filterForExposedEvent || a.filterForExposedEvent(t, e.otherQuery, i, r));
  11341. function u(t, e, n, i) {
  11342. return null == t[n] || e[i || n] === t[n]
  11343. }
  11344. }, t.prototype.afterTrigger = function () {
  11345. this.eventInfo = null
  11346. }, t
  11347. }(),
  11348. My = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"],
  11349. Iy = My.concat(["symbolKeepAspect"]),
  11350. Ty = {
  11351. createOnAllSeries: !0,
  11352. performRawSeries: !0,
  11353. reset: function (t, e) {
  11354. var n = t.getData();
  11355. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), t.hasSymbolVisual) {
  11356. for (var i = {}, r = {}, o = !1, a = 0; a < My.length; a++) {
  11357. var s = My[a],
  11358. l = t.get(s);
  11359. X(l) ? (o = !0, r[s] = l) : i[s] = l
  11360. }
  11361. if (i.symbol = i.symbol || t.defaultSymbol, n.setVisual(A({
  11362. legendIcon: t.legendIcon || i.symbol,
  11363. symbolKeepAspect: t.get("symbolKeepAspect")
  11364. }, i)), !e.isSeriesFiltered(t)) {
  11365. var u = G(r);
  11366. return {
  11367. dataEach: o ? function (e, n) {
  11368. for (var i = t.getRawValue(n), o = t.getDataParams(n), a = 0; a < u.length; a++) {
  11369. var s = u[a];
  11370. e.setItemVisual(n, s, r[s](i, o))
  11371. }
  11372. } : null
  11373. }
  11374. }
  11375. }
  11376. }
  11377. },
  11378. Cy = {
  11379. createOnAllSeries: !0,
  11380. performRawSeries: !0,
  11381. reset: function (t, e) {
  11382. if (t.hasSymbolVisual && !e.isSeriesFiltered(t)) return {
  11383. dataEach: t.getData().hasItemOption ? function (t, e) {
  11384. for (var n = t.getItemModel(e), i = 0; i < Iy.length; i++) {
  11385. var r = Iy[i],
  11386. o = n.getShallow(r, !0);
  11387. null != o && t.setItemVisual(e, r, o)
  11388. }
  11389. } : null
  11390. }
  11391. }
  11392. };
  11393. function Dy(t, e, n) {
  11394. switch (n) {
  11395. case "color":
  11396. return t.getItemVisual(e, "style")[t.getVisual("drawType")];
  11397. case "opacity":
  11398. return t.getItemVisual(e, "style").opacity;
  11399. case "symbol":
  11400. case "symbolSize":
  11401. case "liftZ":
  11402. return t.getItemVisual(e, n)
  11403. }
  11404. }
  11405. function Ay(t, e) {
  11406. switch (e) {
  11407. case "color":
  11408. return t.getVisual("style")[t.getVisual("drawType")];
  11409. case "opacity":
  11410. return t.getVisual("style").opacity;
  11411. case "symbol":
  11412. case "symbolSize":
  11413. case "liftZ":
  11414. return t.getVisual(e)
  11415. }
  11416. }
  11417. function ky(t, e, n, i) {
  11418. switch (n) {
  11419. case "color":
  11420. t.ensureUniqueItemVisual(e, "style")[t.getVisual("drawType")] = i, t.setItemVisual(e, "colorFromPalette", !1);
  11421. break;
  11422. case "opacity":
  11423. t.ensureUniqueItemVisual(e, "style").opacity = i;
  11424. break;
  11425. case "symbol":
  11426. case "symbolSize":
  11427. case "liftZ":
  11428. t.setItemVisual(e, n, i)
  11429. }
  11430. }
  11431. function Ly(t, e) {
  11432. function n(e, n) {
  11433. var i = [];
  11434. return e.eachComponent({
  11435. mainType: "series",
  11436. subType: t,
  11437. query: n
  11438. }, (function (t) {
  11439. i.push(t.seriesIndex)
  11440. })), i
  11441. }
  11442. E([
  11443. [t + "ToggleSelect", "toggleSelect"],
  11444. [t + "Select", "select"],
  11445. [t + "UnSelect", "unselect"]
  11446. ], (function (t) {
  11447. e(t[0], (function (e, i, r) {
  11448. e = A({}, e), r.dispatchAction(A(e, {
  11449. type: t[1],
  11450. seriesIndex: n(i, e)
  11451. }))
  11452. }))
  11453. }))
  11454. }
  11455. function Py(t, e, n, i, r) {
  11456. var o = t + e;
  11457. n.isSilent(o) || i.eachComponent({
  11458. mainType: "series",
  11459. subType: "pie"
  11460. }, (function (t) {
  11461. for (var e = t.seriesIndex, i = t.option.selectedMap, a = r.selected, s = 0; s < a.length; s++)
  11462. if (a[s].seriesIndex === e) {
  11463. var l = t.getData(),
  11464. u = zo(l, r.fromActionPayload);
  11465. n.trigger(o, {
  11466. type: o,
  11467. seriesId: t.id,
  11468. name: Y(u) ? l.getName(u[0]) : l.getName(u),
  11469. selected: U(i) ? i : A({}, i)
  11470. })
  11471. }
  11472. }))
  11473. }
  11474. function Oy(t, e, n) {
  11475. for (var i; t && (!e(t) || (i = t, !n));) t = t.__hostTarget || t.parent;
  11476. return i
  11477. }
  11478. var Ry = Math.round(9 * Math.random()),
  11479. Ny = "function" == typeof Object.defineProperty,
  11480. Ey = function () {
  11481. function t() {
  11482. this._id = "__ec_inner_" + Ry++
  11483. }
  11484. return t.prototype.get = function (t) {
  11485. return this._guard(t)[this._id]
  11486. }, t.prototype.set = function (t, e) {
  11487. var n = this._guard(t);
  11488. return Ny ? Object.defineProperty(n, this._id, {
  11489. value: e,
  11490. enumerable: !1,
  11491. configurable: !0
  11492. }) : n[this._id] = e, this
  11493. }, t.prototype.delete = function (t) {
  11494. return !!this.has(t) && (delete this._guard(t)[this._id], !0)
  11495. }, t.prototype.has = function (t) {
  11496. return !!this._guard(t)[this._id]
  11497. }, t.prototype._guard = function (t) {
  11498. if (t !== Object(t)) throw TypeError("Value of WeakMap is not a non-null object.");
  11499. return t
  11500. }, t
  11501. }(),
  11502. zy = ks.extend({
  11503. type: "triangle",
  11504. shape: {
  11505. cx: 0,
  11506. cy: 0,
  11507. width: 0,
  11508. height: 0
  11509. },
  11510. buildPath: function (t, e) {
  11511. var n = e.cx,
  11512. i = e.cy,
  11513. r = e.width / 2,
  11514. o = e.height / 2;
  11515. t.moveTo(n, i - o), t.lineTo(n + r, i + o), t.lineTo(n - r, i + o), t.closePath()
  11516. }
  11517. }),
  11518. Vy = ks.extend({
  11519. type: "diamond",
  11520. shape: {
  11521. cx: 0,
  11522. cy: 0,
  11523. width: 0,
  11524. height: 0
  11525. },
  11526. buildPath: function (t, e) {
  11527. var n = e.cx,
  11528. i = e.cy,
  11529. r = e.width / 2,
  11530. o = e.height / 2;
  11531. t.moveTo(n, i - o), t.lineTo(n + r, i), t.lineTo(n, i + o), t.lineTo(n - r, i), t.closePath()
  11532. }
  11533. }),
  11534. By = ks.extend({
  11535. type: "pin",
  11536. shape: {
  11537. x: 0,
  11538. y: 0,
  11539. width: 0,
  11540. height: 0
  11541. },
  11542. buildPath: function (t, e) {
  11543. var n = e.x,
  11544. i = e.y,
  11545. r = e.width / 5 * 3,
  11546. o = Math.max(r, e.height),
  11547. a = r / 2,
  11548. s = a * a / (o - a),
  11549. l = i - o + a + s,
  11550. u = Math.asin(s / a),
  11551. h = Math.cos(u) * a,
  11552. c = Math.sin(u),
  11553. p = Math.cos(u),
  11554. d = .6 * a,
  11555. f = .7 * a;
  11556. t.moveTo(n - h, l + s), t.arc(n, l, a, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(n + h - c * d, l + s + p * d, n, i - f, n, i), t.bezierCurveTo(n, i - f, n - h + c * d, l + s + p * d, n - h, l + s), t.closePath()
  11557. }
  11558. }),
  11559. Fy = ks.extend({
  11560. type: "arrow",
  11561. shape: {
  11562. x: 0,
  11563. y: 0,
  11564. width: 0,
  11565. height: 0
  11566. },
  11567. buildPath: function (t, e) {
  11568. var n = e.height,
  11569. i = e.width,
  11570. r = e.x,
  11571. o = e.y,
  11572. a = i / 3 * 2;
  11573. t.moveTo(r, o), t.lineTo(r + a, o + n), t.lineTo(r, o + n / 4 * 3), t.lineTo(r - a, o + n), t.lineTo(r, o), t.closePath()
  11574. }
  11575. }),
  11576. Gy = {
  11577. line: function (t, e, n, i, r) {
  11578. r.x1 = t, r.y1 = e + i / 2, r.x2 = t + n, r.y2 = e + i / 2
  11579. },
  11580. rect: function (t, e, n, i, r) {
  11581. r.x = t, r.y = e, r.width = n, r.height = i
  11582. },
  11583. roundRect: function (t, e, n, i, r) {
  11584. r.x = t, r.y = e, r.width = n, r.height = i, r.r = Math.min(n, i) / 4
  11585. },
  11586. square: function (t, e, n, i, r) {
  11587. var o = Math.min(n, i);
  11588. r.x = t, r.y = e, r.width = o, r.height = o
  11589. },
  11590. circle: function (t, e, n, i, r) {
  11591. r.cx = t + n / 2, r.cy = e + i / 2, r.r = Math.min(n, i) / 2
  11592. },
  11593. diamond: function (t, e, n, i, r) {
  11594. r.cx = t + n / 2, r.cy = e + i / 2, r.width = n, r.height = i
  11595. },
  11596. pin: function (t, e, n, i, r) {
  11597. r.x = t + n / 2, r.y = e + i / 2, r.width = n, r.height = i
  11598. },
  11599. arrow: function (t, e, n, i, r) {
  11600. r.x = t + n / 2, r.y = e + i / 2, r.width = n, r.height = i
  11601. },
  11602. triangle: function (t, e, n, i, r) {
  11603. r.cx = t + n / 2, r.cy = e + i / 2, r.width = n, r.height = i
  11604. }
  11605. },
  11606. Wy = {};
  11607. E({
  11608. line: Ku,
  11609. rect: Ws,
  11610. roundRect: Ws,
  11611. square: Ws,
  11612. circle: Su,
  11613. diamond: Vy,
  11614. pin: By,
  11615. arrow: Fy,
  11616. triangle: zy
  11617. }, (function (t, e) {
  11618. Wy[e] = new t
  11619. }));
  11620. var Hy = ks.extend({
  11621. type: "symbol",
  11622. shape: {
  11623. symbolType: "",
  11624. x: 0,
  11625. y: 0,
  11626. width: 0,
  11627. height: 0
  11628. },
  11629. calculateTextPosition: function (t, e, n) {
  11630. var i = Dr(t, e, n),
  11631. r = this.shape;
  11632. return r && "pin" === r.symbolType && "inside" === e.position && (i.y = n.y + .4 * n.height), i
  11633. },
  11634. buildPath: function (t, e, n) {
  11635. var i = e.symbolType;
  11636. if ("none" !== i) {
  11637. var r = Wy[i];
  11638. r || (r = Wy[i = "rect"]), Gy[i](e.x, e.y, e.width, e.height, r.shape), r.buildPath(t, r.shape, n)
  11639. }
  11640. }
  11641. });
  11642. function Yy(t, e) {
  11643. if ("image" !== this.type) {
  11644. var n = this.style;
  11645. this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : "line" === this.shape.symbolType ? n.stroke = t : n.fill = t, this.markRedraw()
  11646. }
  11647. }
  11648. function Xy(t, e, n, i, r, o, a) {
  11649. var s, l = 0 === t.indexOf("empty");
  11650. return l && (t = t.substr(5, 1).toLowerCase() + t.substr(6)), (s = 0 === t.indexOf("image://") ? Oh(t.slice(8), new ze(e, n, i, r), a ? "center" : "cover") : 0 === t.indexOf("path://") ? Ph(t.slice(7), {}, new ze(e, n, i, r), a ? "center" : "cover") : new Hy({
  11651. shape: {
  11652. symbolType: t,
  11653. x: e,
  11654. y: n,
  11655. width: i,
  11656. height: r
  11657. }
  11658. })).__isEmptyBrush = l, s.setColor = Yy, o && s.setColor(o), s
  11659. }
  11660. function Uy(t) {
  11661. return Y(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0]
  11662. }
  11663. function Zy(t, e) {
  11664. if (null != t) return Y(t) || (t = [t, t]), [$r(t[0], e[0]) || 0, $r(rt(t[1], t[0]), e[1]) || 0]
  11665. }
  11666. function jy(t) {
  11667. return isFinite(t)
  11668. }
  11669. function qy(t, e, n) {
  11670. for (var i = "radial" === e.type ? function (t, e, n) {
  11671. var i = n.width,
  11672. r = n.height,
  11673. o = Math.min(i, r),
  11674. a = null == e.x ? .5 : e.x,
  11675. s = null == e.y ? .5 : e.y,
  11676. l = null == e.r ? .5 : e.r;
  11677. return e.global || (a = a * i + n.x, s = s * r + n.y, l *= o), a = jy(a) ? a : .5, s = jy(s) ? s : .5, l = l >= 0 && jy(l) ? l : .5, t.createRadialGradient(a, s, 0, a, s, l)
  11678. }(t, e, n) : function (t, e, n) {
  11679. var i = null == e.x ? 0 : e.x,
  11680. r = null == e.x2 ? 1 : e.x2,
  11681. o = null == e.y ? 0 : e.y,
  11682. a = null == e.y2 ? 0 : e.y2;
  11683. return e.global || (i = i * n.width + n.x, r = r * n.width + n.x, o = o * n.height + n.y, a = a * n.height + n.y), i = jy(i) ? i : 0, r = jy(r) ? r : 1, o = jy(o) ? o : 0, a = jy(a) ? a : 0, t.createLinearGradient(i, o, r, a)
  11684. }(t, e, n), r = e.colorStops, o = 0; o < r.length; o++) i.addColorStop(r[o].offset, r[o].color);
  11685. return i
  11686. }
  11687. function Ky(t) {
  11688. return parseInt(t, 10)
  11689. }
  11690. function $y(t, e, n) {
  11691. var i = ["width", "height"][e],
  11692. r = ["clientWidth", "clientHeight"][e],
  11693. o = ["paddingLeft", "paddingTop"][e],
  11694. a = ["paddingRight", "paddingBottom"][e];
  11695. if (null != n[i] && "auto" !== n[i]) return parseFloat(n[i]);
  11696. var s = document.defaultView.getComputedStyle(t);
  11697. return (t[r] || Ky(s[i]) || Ky(t.style[i])) - (Ky(s[o]) || 0) - (Ky(s[a]) || 0) | 0
  11698. }
  11699. function Jy(t) {
  11700. var e, n, i = t.style,
  11701. r = i.lineDash && i.lineWidth > 0 && (e = i.lineDash, n = i.lineWidth, e && "solid" !== e && n > 0 ? "dashed" === e ? [4 * n, 2 * n] : "dotted" === e ? [n] : j(e) ? [e] : Y(e) ? e : null : null),
  11702. o = i.lineDashOffset;
  11703. if (r) {
  11704. var a = i.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  11705. a && 1 !== a && (r = z(r, (function (t) {
  11706. return t / a
  11707. })), o /= a)
  11708. }
  11709. return [r, o]
  11710. }
  11711. var Qy = new hs(!0);
  11712. function tv(t) {
  11713. var e = t.stroke;
  11714. return !(null == e || "none" === e || !(t.lineWidth > 0))
  11715. }
  11716. function ev(t) {
  11717. return "string" == typeof t && "none" !== t
  11718. }
  11719. function nv(t) {
  11720. var e = t.fill;
  11721. return null != e && "none" !== e
  11722. }
  11723. function iv(t, e) {
  11724. if (null != e.fillOpacity && 1 !== e.fillOpacity) {
  11725. var n = t.globalAlpha;
  11726. t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n
  11727. } else t.fill()
  11728. }
  11729. function rv(t, e) {
  11730. if (null != e.strokeOpacity && 1 !== e.strokeOpacity) {
  11731. var n = t.globalAlpha;
  11732. t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n
  11733. } else t.stroke()
  11734. }
  11735. function ov(t, e, n) {
  11736. var i = la(e.image, e.__image, n);
  11737. if (ha(i)) {
  11738. var r = t.createPattern(i, e.repeat || "repeat");
  11739. if ("function" == typeof DOMMatrix && r && r.setTransform) {
  11740. var o = new DOMMatrix;
  11741. o.translateSelf(e.x || 0, e.y || 0), o.rotateSelf(0, 0, (e.rotation || 0) * wt), o.scaleSelf(e.scaleX || 1, e.scaleY || 1), r.setTransform(o)
  11742. }
  11743. return r
  11744. }
  11745. }
  11746. var av = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"],
  11747. sv = [
  11748. ["lineCap", "butt"],
  11749. ["lineJoin", "miter"],
  11750. ["miterLimit", 10]
  11751. ];
  11752. function lv(t, e, n, i, r) {
  11753. var o = !1;
  11754. if (!i && e === (n = n || {})) return !1;
  11755. if (i || e.opacity !== n.opacity) {
  11756. cv(t, r), o = !0;
  11757. var a = Math.max(Math.min(e.opacity, 1), 0);
  11758. t.globalAlpha = isNaN(a) ? Ma.opacity : a
  11759. }(i || e.blend !== n.blend) && (o || (cv(t, r), o = !0), t.globalCompositeOperation = e.blend || Ma.blend);
  11760. for (var s = 0; s < av.length; s++) {
  11761. var l = av[s];
  11762. (i || e[l] !== n[l]) && (o || (cv(t, r), o = !0), t[l] = t.dpr * (e[l] || 0))
  11763. }
  11764. return (i || e.shadowColor !== n.shadowColor) && (o || (cv(t, r), o = !0), t.shadowColor = e.shadowColor || Ma.shadowColor), o
  11765. }
  11766. function uv(t, e, n, i, r) {
  11767. var o = pv(e, r.inHover),
  11768. a = i ? null : n && pv(n, r.inHover) || {};
  11769. if (o === a) return !1;
  11770. var s = lv(t, o, a, i, r);
  11771. if ((i || o.fill !== a.fill) && (s || (cv(t, r), s = !0), ev(o.fill) && (t.fillStyle = o.fill)), (i || o.stroke !== a.stroke) && (s || (cv(t, r), s = !0), ev(o.stroke) && (t.strokeStyle = o.stroke)), (i || o.opacity !== a.opacity) && (s || (cv(t, r), s = !0), t.globalAlpha = null == o.opacity ? 1 : o.opacity), e.hasStroke()) {
  11772. var l = o.lineWidth / (o.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  11773. t.lineWidth !== l && (s || (cv(t, r), s = !0), t.lineWidth = l)
  11774. }
  11775. for (var u = 0; u < sv.length; u++) {
  11776. var h = sv[u],
  11777. c = h[0];
  11778. (i || o[c] !== a[c]) && (s || (cv(t, r), s = !0), t[c] = o[c] || h[1])
  11779. }
  11780. return s
  11781. }
  11782. function hv(t, e) {
  11783. var n = e.transform,
  11784. i = t.dpr || 1;
  11785. n ? t.setTransform(i * n[0], i * n[1], i * n[2], i * n[3], i * n[4], i * n[5]) : t.setTransform(i, 0, 0, i, 0, 0)
  11786. }
  11787. function cv(t, e) {
  11788. e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = ""
  11789. }
  11790. function pv(t, e) {
  11791. return e && t.__hoverStyle || t.style
  11792. }
  11793. function dv(t, e) {
  11794. fv(t, e, {
  11795. inHover: !1,
  11796. viewWidth: 0,
  11797. viewHeight: 0
  11798. }, !0)
  11799. }
  11800. function fv(t, e, n, i) {
  11801. var r = e.transform;
  11802. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) return e.__dirty &= -2, void(e.__isRendered = !1);
  11803. var o = e.__clipPaths,
  11804. s = n.prevElClipPaths,
  11805. l = !1,
  11806. u = !1;
  11807. if (s && ! function (t, e) {
  11808. if (t === e || !t && !e) return !1;
  11809. if (!t || !e || t.length !== e.length) return !0;
  11810. for (var n = 0; n < t.length; n++)
  11811. if (t[n] !== e[n]) return !0;
  11812. return !1
  11813. }(o, s) || (s && s.length && (cv(t, n), t.restore(), u = l = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), o && o.length && (cv(t, n), t.save(), function (t, e, n) {
  11814. for (var i = !1, r = 0; r < t.length; r++) {
  11815. var o = t[r];
  11816. i = i || o.isZeroArea(), hv(e, o), e.beginPath(), o.buildPath(e, o.shape), e.clip()
  11817. }
  11818. n.allClipped = i
  11819. }(o, t, n), l = !0), n.prevElClipPaths = o), n.allClipped) e.__isRendered = !1;
  11820. else {
  11821. e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  11822. var h = n.prevEl;
  11823. h || (u = l = !0);
  11824. var c, p, d = e instanceof ks && e.autoBatch && function (t) {
  11825. var e = nv(t),
  11826. n = tv(t);
  11827. return !(t.lineDash || !(+e ^ +n) || e && "string" != typeof t.fill || n && "string" != typeof t.stroke || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1)
  11828. }(e.style);
  11829. l || (c = r, p = h.transform, c && p ? c[0] !== p[0] || c[1] !== p[1] || c[2] !== p[2] || c[3] !== p[3] || c[4] !== p[4] || c[5] !== p[5] : c || p) ? (cv(t, n), hv(t, e)) : d || cv(t, n);
  11830. var f = pv(e, n.inHover);
  11831. e instanceof ks ? (1 !== n.lastDrawType && (u = !0, n.lastDrawType = 1), uv(t, e, h, u, n), d && (n.batchFill || n.batchStroke) || t.beginPath(), function (t, e, n, i) {
  11832. var r, o = tv(n),
  11833. a = nv(n),
  11834. s = n.strokePercent,
  11835. l = s < 1,
  11836. u = !e.path;
  11837. e.silent && !l || !u || e.createPathProxy();
  11838. var h = e.path || Qy,
  11839. c = e.__dirty;
  11840. if (!i) {
  11841. var p = n.fill,
  11842. d = n.stroke,
  11843. f = a && !!p.colorStops,
  11844. g = o && !!d.colorStops,
  11845. y = a && !!p.image,
  11846. v = o && !!d.image,
  11847. m = void 0,
  11848. x = void 0,
  11849. _ = void 0,
  11850. b = void 0,
  11851. w = void 0;
  11852. (f || g) && (w = e.getBoundingRect()), f && (m = c ? qy(t, p, w) : e.__canvasFillGradient, e.__canvasFillGradient = m), g && (x = c ? qy(t, d, w) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = x), y && (_ = c || !e.__canvasFillPattern ? ov(t, p, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), v && (b = c || !e.__canvasStrokePattern ? ov(t, d, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = _), f ? t.fillStyle = m : y && (_ ? t.fillStyle = _ : a = !1), g ? t.strokeStyle = x : v && (b ? t.strokeStyle = b : o = !1)
  11853. }
  11854. var S, M, I = e.getGlobalScale();
  11855. h.setScale(I[0], I[1], e.segmentIgnoreThreshold), t.setLineDash && n.lineDash && (S = (r = Jy(e))[0], M = r[1]);
  11856. var T = !0;
  11857. (u || 4 & c) && (h.setDPR(t.dpr), l ? h.setContext(null) : (h.setContext(t), T = !1), h.reset(), e.buildPath(h, e.shape, i), h.toStatic(), e.pathUpdated()), T && h.rebuildPath(t, l ? s : 1), S && (t.setLineDash(S), t.lineDashOffset = M), i || (n.strokeFirst ? (o && rv(t, n), a && iv(t, n)) : (a && iv(t, n), o && rv(t, n))), S && t.setLineDash([])
  11858. }(t, e, f, d), d && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Ps ? (3 !== n.lastDrawType && (u = !0, n.lastDrawType = 3), uv(t, e, h, u, n), function (t, e, n) {
  11859. var i, r = n.text;
  11860. if (null != r && (r += ""), r) {
  11861. t.font = n.font || a, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
  11862. var o = void 0,
  11863. s = void 0;
  11864. t.setLineDash && n.lineDash && (o = (i = Jy(e))[0], s = i[1]), o && (t.setLineDash(o), t.lineDashOffset = s), n.strokeFirst ? (tv(n) && t.strokeText(r, n.x, n.y), nv(n) && t.fillText(r, n.x, n.y)) : (nv(n) && t.fillText(r, n.x, n.y), tv(n) && t.strokeText(r, n.x, n.y)), o && t.setLineDash([])
  11865. }
  11866. }(t, e, f)) : e instanceof Ns ? (2 !== n.lastDrawType && (u = !0, n.lastDrawType = 2), function (t, e, n, i, r) {
  11867. lv(t, pv(e, r.inHover), n && pv(n, r.inHover), i, r)
  11868. }(t, e, h, u, n), function (t, e, n) {
  11869. var i = e.__image = la(n.image, e.__image, e, e.onload);
  11870. if (i && ha(i)) {
  11871. var r = n.x || 0,
  11872. o = n.y || 0,
  11873. a = e.getWidth(),
  11874. s = e.getHeight(),
  11875. l = i.width / i.height;
  11876. if (null == a && null != s ? a = s * l : null == s && null != a ? s = a / l : null == a && null == s && (a = i.width, s = i.height), n.sWidth && n.sHeight) {
  11877. var u = n.sx || 0,
  11878. h = n.sy || 0;
  11879. t.drawImage(i, u, h, n.sWidth, n.sHeight, r, o, a, s)
  11880. } else if (n.sx && n.sy) {
  11881. var c = a - (u = n.sx),
  11882. p = s - (h = n.sy);
  11883. t.drawImage(i, u, h, c, p, r, o, a, s)
  11884. } else t.drawImage(i, r, o, a, s)
  11885. }
  11886. }(t, e, f)) : e.getTemporalDisplayables && (4 !== n.lastDrawType && (u = !0, n.lastDrawType = 4), function (t, e, n) {
  11887. var i = e.getDisplayables(),
  11888. r = e.getTemporalDisplayables();
  11889. t.save();
  11890. var o, a, s = {
  11891. prevElClipPaths: null,
  11892. prevEl: null,
  11893. allClipped: !1,
  11894. viewWidth: n.viewWidth,
  11895. viewHeight: n.viewHeight,
  11896. inHover: n.inHover
  11897. };
  11898. for (o = e.getCursor(), a = i.length; o < a; o++) {
  11899. (h = i[o]).beforeBrush && h.beforeBrush(), h.innerBeforeBrush(), fv(t, h, s, o === a - 1), h.innerAfterBrush(), h.afterBrush && h.afterBrush(), s.prevEl = h
  11900. }
  11901. for (var l = 0, u = r.length; l < u; l++) {
  11902. var h;
  11903. (h = r[l]).beforeBrush && h.beforeBrush(), h.innerBeforeBrush(), fv(t, h, s, l === u - 1), h.innerAfterBrush(), h.afterBrush && h.afterBrush(), s.prevEl = h
  11904. }
  11905. e.clearTemporalDisplayables(), e.notClear = !0, t.restore()
  11906. }(t, e, n)), d && i && cv(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0
  11907. }
  11908. }
  11909. var gv = new Ey,
  11910. yv = new En(100),
  11911. vv = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  11912. function mv(t, e) {
  11913. if ("none" === t) return null;
  11914. var n = e.getDevicePixelRatio(),
  11915. i = e.getZr(),
  11916. r = "svg" === i.painter.type;
  11917. t.dirty && gv.delete(t);
  11918. var o = gv.get(t);
  11919. if (o) return o;
  11920. var a = k(t, {
  11921. symbol: "rect",
  11922. symbolSize: 1,
  11923. symbolKeepAspect: !0,
  11924. color: "rgba(0, 0, 0, 0.2)",
  11925. backgroundColor: null,
  11926. dashArrayX: 5,
  11927. dashArrayY: 5,
  11928. rotation: 0,
  11929. maxTileWidth: 512,
  11930. maxTileHeight: 512
  11931. });
  11932. "none" === a.backgroundColor && (a.backgroundColor = null);
  11933. var s = {
  11934. repeat: "repeat"
  11935. };
  11936. return function (t) {
  11937. for (var e, o = [n], s = !0, l = 0; l < vv.length; ++l) {
  11938. var u = a[vv[l]];
  11939. if (null != u && !Y(u) && !U(u) && !j(u) && "boolean" != typeof u) {
  11940. s = !1;
  11941. break
  11942. }
  11943. o.push(u)
  11944. }
  11945. if (s) {
  11946. e = o.join(",") + (r ? "-svg" : "");
  11947. var c = yv.get(e);
  11948. c && (r ? t.svgElement = c : t.image = c)
  11949. }
  11950. var p, d = _v(a.dashArrayX),
  11951. f = function (t) {
  11952. if (!t || "object" == typeof t && 0 === t.length) return [0, 0];
  11953. if (j(t)) {
  11954. var e = Math.ceil(t);
  11955. return [e, e]
  11956. }
  11957. var n = z(t, (function (t) {
  11958. return Math.ceil(t)
  11959. }));
  11960. return t.length % 2 ? n.concat(n) : n
  11961. }(a.dashArrayY),
  11962. g = xv(a.symbol),
  11963. y = (b = d, z(b, (function (t) {
  11964. return bv(t)
  11965. }))),
  11966. v = bv(f),
  11967. m = !r && h.createCanvas(),
  11968. x = r && {
  11969. tag: "g",
  11970. attrs: {},
  11971. key: "dcl",
  11972. children: []
  11973. },
  11974. _ = function () {
  11975. for (var t = 1, e = 0, n = y.length; e < n; ++e) t = _o(t, y[e]);
  11976. var i = 1;
  11977. for (e = 0, n = g.length; e < n; ++e) i = _o(i, g[e].length);
  11978. t *= i;
  11979. var r = v * y.length * g.length;
  11980. return {
  11981. width: Math.max(1, Math.min(t, a.maxTileWidth)),
  11982. height: Math.max(1, Math.min(r, a.maxTileHeight))
  11983. }
  11984. }();
  11985. var b;
  11986. m && (m.width = _.width * n, m.height = _.height * n, p = m.getContext("2d"));
  11987. (function () {
  11988. p && (p.clearRect(0, 0, m.width, m.height), a.backgroundColor && (p.fillStyle = a.backgroundColor, p.fillRect(0, 0, m.width, m.height)));
  11989. for (var t = 0, e = 0; e < f.length; ++e) t += f[e];
  11990. if (t <= 0) return;
  11991. var o = -v,
  11992. s = 0,
  11993. l = 0,
  11994. u = 0;
  11995. for (; o < _.height;) {
  11996. if (s % 2 == 0) {
  11997. for (var h = l / 2 % g.length, c = 0, y = 0, b = 0; c < 2 * _.width;) {
  11998. var w = 0;
  11999. for (e = 0; e < d[u].length; ++e) w += d[u][e];
  12000. if (w <= 0) break;
  12001. if (y % 2 == 0) {
  12002. var S = .5 * (1 - a.symbolSize),
  12003. M = c + d[u][y] * S,
  12004. I = o + f[s] * S,
  12005. T = d[u][y] * a.symbolSize,
  12006. C = f[s] * a.symbolSize,
  12007. D = b / 2 % g[h].length;
  12008. A(M, I, T, C, g[h][D])
  12009. }
  12010. c += d[u][y], ++b, ++y === d[u].length && (y = 0)
  12011. }++u === d.length && (u = 0)
  12012. }
  12013. o += f[s], ++l, ++s === f.length && (s = 0)
  12014. }
  12015. function A(t, e, o, s, l) {
  12016. var u = r ? 1 : n,
  12017. h = Xy(l, t * u, e * u, o * u, s * u, a.color, a.symbolKeepAspect);
  12018. if (r) {
  12019. var c = i.painter.renderOneToVNode(h);
  12020. c && x.children.push(c)
  12021. } else dv(p, h)
  12022. }
  12023. })(), s && yv.put(e, m || x);
  12024. t.image = m, t.svgElement = x, t.svgWidth = _.width, t.svgHeight = _.height
  12025. }(s), s.rotation = a.rotation, s.scaleX = s.scaleY = r ? 1 : 1 / n, gv.set(t, s), t.dirty = !1, s
  12026. }
  12027. function xv(t) {
  12028. if (!t || 0 === t.length) return [
  12029. ["rect"]
  12030. ];
  12031. if (U(t)) return [
  12032. [t]
  12033. ];
  12034. for (var e = !0, n = 0; n < t.length; ++n)
  12035. if (!U(t[n])) {
  12036. e = !1;
  12037. break
  12038. } if (e) return xv([t]);
  12039. var i = [];
  12040. for (n = 0; n < t.length; ++n) U(t[n]) ? i.push([t[n]]) : i.push(t[n]);
  12041. return i
  12042. }
  12043. function _v(t) {
  12044. if (!t || 0 === t.length) return [
  12045. [0, 0]
  12046. ];
  12047. if (j(t)) return [
  12048. [r = Math.ceil(t), r]
  12049. ];
  12050. for (var e = !0, n = 0; n < t.length; ++n)
  12051. if (!j(t[n])) {
  12052. e = !1;
  12053. break
  12054. } if (e) return _v([t]);
  12055. var i = [];
  12056. for (n = 0; n < t.length; ++n)
  12057. if (j(t[n])) {
  12058. var r = Math.ceil(t[n]);
  12059. i.push([r, r])
  12060. } else {
  12061. (r = z(t[n], (function (t) {
  12062. return Math.ceil(t)
  12063. }))).length % 2 == 1 ? i.push(r.concat(r)) : i.push(r)
  12064. } return i
  12065. }
  12066. function bv(t) {
  12067. for (var e = 0, n = 0; n < t.length; ++n) e += t[n];
  12068. return t.length % 2 == 1 ? 2 * e : e
  12069. }
  12070. var wv = new jt,
  12071. Sv = {};
  12072. function Mv(t) {
  12073. return Sv[t]
  12074. }
  12075. var Iv = 2e3,
  12076. Tv = 4500,
  12077. Cv = {
  12078. PROCESSOR: {
  12079. FILTER: 1e3,
  12080. SERIES_FILTER: 800,
  12081. STATISTIC: 5e3
  12082. },
  12083. VISUAL: {
  12084. LAYOUT: 1e3,
  12085. PROGRESSIVE_LAYOUT: 1100,
  12086. GLOBAL: Iv,
  12087. CHART: 3e3,
  12088. POST_CHART_LAYOUT: 4600,
  12089. COMPONENT: 4e3,
  12090. BRUSH: 5e3,
  12091. CHART_ITEM: Tv,
  12092. ARIA: 6e3,
  12093. DECAL: 7e3
  12094. }
  12095. },
  12096. Dv = "__flagInMainProcess",
  12097. Av = "__pendingUpdate",
  12098. kv = "__needsUpdateStatus",
  12099. Lv = /^[a-zA-Z0-9_]+$/,
  12100. Pv = "__connectUpdateStatus";
  12101. function Ov(t) {
  12102. return function () {
  12103. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  12104. if (!this.isDisposed()) return Nv(this, t, e);
  12105. om(this.id)
  12106. }
  12107. }
  12108. function Rv(t) {
  12109. return function () {
  12110. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  12111. return Nv(this, t, e)
  12112. }
  12113. }
  12114. function Nv(t, e, n) {
  12115. return n[0] = n[0] && n[0].toLowerCase(), jt.prototype[e].apply(t, n)
  12116. }
  12117. var Ev, zv, Vv, Bv, Fv, Gv, Wv, Hv, Yv, Xv, Uv, Zv, jv, qv, Kv, $v, Jv, Qv, tm = function (t) {
  12118. function e() {
  12119. return null !== t && t.apply(this, arguments) || this
  12120. }
  12121. return n(e, t), e
  12122. }(jt),
  12123. em = tm.prototype;
  12124. em.on = Rv("on"), em.off = Rv("off");
  12125. var nm = function (t) {
  12126. function e(e, n, i) {
  12127. var r = t.call(this, new Sy) || this;
  12128. r._chartsViews = [], r._chartsMap = {}, r._componentsViews = [], r._componentsMap = {}, r._pendingActions = [], i = i || {}, U(n) && (n = cm[n]), r._dom = e;
  12129. var o = "canvas",
  12130. a = "auto",
  12131. s = !1;
  12132. i.ssr && Zr((function (t) {
  12133. var e = rl(t),
  12134. n = e.dataIndex;
  12135. if (null != n) {
  12136. var i = yt();
  12137. return i.set("series_index", e.seriesIndex), i.set("data_index", n), e.ssrType && i.set("ssr_type", e.ssrType), i
  12138. }
  12139. }));
  12140. var l = r._zr = Yr(e, {
  12141. renderer: i.renderer || o,
  12142. devicePixelRatio: i.devicePixelRatio,
  12143. width: i.width,
  12144. height: i.height,
  12145. ssr: i.ssr,
  12146. useDirtyRect: rt(i.useDirtyRect, s),
  12147. useCoarsePointer: rt(i.useCoarsePointer, a),
  12148. pointerSize: i.pointerSize
  12149. });
  12150. r._ssr = i.ssr, r._throttledZrFlush = Wg(W(l.flush, l), 17), (n = T(n)) && Xd(n, !0), r._theme = n, r._locale = function (t) {
  12151. if (U(t)) {
  12152. var e = Rc[t.toUpperCase()] || {};
  12153. return t === Lc || t === Pc ? T(e) : C(T(e), T(Rc[Oc]), !1)
  12154. }
  12155. return C(T(t), T(Rc[Oc]), !1)
  12156. }(i.locale || Ec), r._coordSysMgr = new wd;
  12157. var u = r._api = Kv(r);
  12158. function h(t, e) {
  12159. return t.__prio - e.__prio
  12160. }
  12161. return Qe(hm, h), Qe(lm, h), r._scheduler = new ey(r, u, lm, hm), r._messageCenter = new tm, r._initEvents(), r.resize = W(r.resize, r), l.animation.on("frame", r._onframe, r), Xv(l, r), Uv(l, r), ct(r), r
  12162. }
  12163. return n(e, t), e.prototype._onframe = function () {
  12164. if (!this._disposed) {
  12165. Qv(this);
  12166. var t = this._scheduler;
  12167. if (this[Av]) {
  12168. var e = this[Av].silent;
  12169. this[Dv] = !0;
  12170. try {
  12171. Ev(this), Bv.update.call(this, null, this[Av].updateParams)
  12172. } catch (t) {
  12173. throw this[Dv] = !1, this[Av] = null, t
  12174. }
  12175. this._zr.flush(), this[Dv] = !1, this[Av] = null, Hv.call(this, e), Yv.call(this, e)
  12176. } else if (t.unfinished) {
  12177. var n = 1,
  12178. i = this._model,
  12179. r = this._api;
  12180. t.unfinished = !1;
  12181. do {
  12182. var o = +new Date;
  12183. t.performSeriesTasks(i), t.performDataProcessorTasks(i), Gv(this, i), t.performVisualTasks(i), qv(this, this._model, r, "remain", {}), n -= +new Date - o
  12184. } while (n > 0 && t.unfinished);
  12185. t.unfinished || this._zr.flush()
  12186. }
  12187. }
  12188. }, e.prototype.getDom = function () {
  12189. return this._dom
  12190. }, e.prototype.getId = function () {
  12191. return this.id
  12192. }, e.prototype.getZr = function () {
  12193. return this._zr
  12194. }, e.prototype.isSSR = function () {
  12195. return this._ssr
  12196. }, e.prototype.setOption = function (t, e, n) {
  12197. if (!this[Dv])
  12198. if (this._disposed) om(this.id);
  12199. else {
  12200. var i, r, o;
  12201. if (q(e) && (n = e.lazyUpdate, i = e.silent, r = e.replaceMerge, o = e.transition, e = e.notMerge), this[Dv] = !0, !this._model || e) {
  12202. var a = new Md(this._api),
  12203. s = this._theme,
  12204. l = this._model = new gd;
  12205. l.scheduler = this._scheduler, l.ssr = this._ssr, l.init(null, null, null, s, this._locale, a)
  12206. }
  12207. this._model.setOption(t, {
  12208. replaceMerge: r
  12209. }, um);
  12210. var u = {
  12211. seriesTransition: o,
  12212. optionChanged: !0
  12213. };
  12214. if (n) this[Av] = {
  12215. silent: i,
  12216. updateParams: u
  12217. }, this[Dv] = !1, this.getZr().wakeUp();
  12218. else {
  12219. try {
  12220. Ev(this), Bv.update.call(this, null, u)
  12221. } catch (t) {
  12222. throw this[Av] = null, this[Dv] = !1, t
  12223. }
  12224. this._ssr || this._zr.flush(), this[Av] = null, this[Dv] = !1, Hv.call(this, i), Yv.call(this, i)
  12225. }
  12226. }
  12227. }, e.prototype.setTheme = function () {
  12228. bo()
  12229. }, e.prototype.getModel = function () {
  12230. return this._model
  12231. }, e.prototype.getOption = function () {
  12232. return this._model && this._model.getOption()
  12233. }, e.prototype.getWidth = function () {
  12234. return this._zr.getWidth()
  12235. }, e.prototype.getHeight = function () {
  12236. return this._zr.getHeight()
  12237. }, e.prototype.getDevicePixelRatio = function () {
  12238. return this._zr.painter.dpr || r.hasGlobalWindow && window.devicePixelRatio || 1
  12239. }, e.prototype.getRenderedCanvas = function (t) {
  12240. return this.renderToCanvas(t)
  12241. }, e.prototype.renderToCanvas = function (t) {
  12242. t = t || {};
  12243. var e = this._zr.painter;
  12244. return e.getRenderedCanvas({
  12245. backgroundColor: t.backgroundColor || this._model.get("backgroundColor"),
  12246. pixelRatio: t.pixelRatio || this.getDevicePixelRatio()
  12247. })
  12248. }, e.prototype.renderToSVGString = function (t) {
  12249. t = t || {};
  12250. var e = this._zr.painter;
  12251. return e.renderToString({
  12252. useViewBox: t.useViewBox
  12253. })
  12254. }, e.prototype.getSvgDataURL = function () {
  12255. if (r.svgSupported) {
  12256. var t = this._zr;
  12257. return E(t.storage.getDisplayList(), (function (t) {
  12258. t.stopAnimation(null, !0)
  12259. })), t.painter.toDataURL()
  12260. }
  12261. }, e.prototype.getDataURL = function (t) {
  12262. if (!this._disposed) {
  12263. var e = (t = t || {}).excludeComponents,
  12264. n = this._model,
  12265. i = [],
  12266. r = this;
  12267. E(e, (function (t) {
  12268. n.eachComponent({
  12269. mainType: t
  12270. }, (function (t) {
  12271. var e = r._componentsMap[t.__viewId];
  12272. e.group.ignore || (i.push(e), e.group.ignore = !0)
  12273. }))
  12274. }));
  12275. var o = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png"));
  12276. return E(i, (function (t) {
  12277. t.group.ignore = !1
  12278. })), o
  12279. }
  12280. om(this.id)
  12281. }, e.prototype.getConnectedDataURL = function (t) {
  12282. if (!this._disposed) {
  12283. var e = "svg" === t.type,
  12284. n = this.group,
  12285. i = Math.min,
  12286. r = Math.max,
  12287. o = 1 / 0;
  12288. if (fm[n]) {
  12289. var a = o,
  12290. s = o,
  12291. l = -1 / 0,
  12292. u = -1 / 0,
  12293. c = [],
  12294. p = t && t.pixelRatio || this.getDevicePixelRatio();
  12295. E(dm, (function (o, h) {
  12296. if (o.group === n) {
  12297. var p = e ? o.getZr().painter.getSvgDom().innerHTML : o.renderToCanvas(T(t)),
  12298. d = o.getDom().getBoundingClientRect();
  12299. a = i(d.left, a), s = i(d.top, s), l = r(d.right, l), u = r(d.bottom, u), c.push({
  12300. dom: p,
  12301. left: d.left,
  12302. top: d.top
  12303. })
  12304. }
  12305. }));
  12306. var d = (l *= p) - (a *= p),
  12307. f = (u *= p) - (s *= p),
  12308. g = h.createCanvas(),
  12309. y = Yr(g, {
  12310. renderer: e ? "svg" : "canvas"
  12311. });
  12312. if (y.resize({
  12313. width: d,
  12314. height: f
  12315. }), e) {
  12316. var v = "";
  12317. return E(c, (function (t) {
  12318. var e = t.left - a,
  12319. n = t.top - s;
  12320. v += '<g transform="translate(' + e + "," + n + ')">' + t.dom + "</g>"
  12321. })), y.painter.getSvgRoot().innerHTML = v, t.connectedBackgroundColor && y.painter.setBackgroundColor(t.connectedBackgroundColor), y.refreshImmediately(), y.painter.toDataURL()
  12322. }
  12323. return t.connectedBackgroundColor && y.add(new Ws({
  12324. shape: {
  12325. x: 0,
  12326. y: 0,
  12327. width: d,
  12328. height: f
  12329. },
  12330. style: {
  12331. fill: t.connectedBackgroundColor
  12332. }
  12333. })), E(c, (function (t) {
  12334. var e = new Ns({
  12335. style: {
  12336. x: t.left * p - a,
  12337. y: t.top * p - s,
  12338. image: t.dom
  12339. }
  12340. });
  12341. y.add(e)
  12342. })), y.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"))
  12343. }
  12344. return this.getDataURL(t)
  12345. }
  12346. om(this.id)
  12347. }, e.prototype.convertToPixel = function (t, e) {
  12348. return Fv(this, "convertToPixel", t, e)
  12349. }, e.prototype.convertFromPixel = function (t, e) {
  12350. return Fv(this, "convertFromPixel", t, e)
  12351. }, e.prototype.containPixel = function (t, e) {
  12352. var n;
  12353. if (!this._disposed) return E(Fo(this._model, t), (function (t, i) {
  12354. i.indexOf("Models") >= 0 && E(t, (function (t) {
  12355. var r = t.coordinateSystem;
  12356. if (r && r.containPoint) n = n || !!r.containPoint(e);
  12357. else if ("seriesModels" === i) {
  12358. var o = this._chartsMap[t.__viewId];
  12359. o && o.containPoint && (n = n || o.containPoint(e, t))
  12360. } else 0
  12361. }), this)
  12362. }), this), !!n;
  12363. om(this.id)
  12364. }, e.prototype.getVisual = function (t, e) {
  12365. var n = Fo(this._model, t, {
  12366. defaultMainType: "series"
  12367. }),
  12368. i = n.seriesModel;
  12369. var r = i.getData(),
  12370. o = n.hasOwnProperty("dataIndexInside") ? n.dataIndexInside : n.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(n.dataIndex) : null;
  12371. return null != o ? Dy(r, o, e) : Ay(r, e)
  12372. }, e.prototype.getViewOfComponentModel = function (t) {
  12373. return this._componentsMap[t.__viewId]
  12374. }, e.prototype.getViewOfSeriesModel = function (t) {
  12375. return this._chartsMap[t.__viewId]
  12376. }, e.prototype._initEvents = function () {
  12377. var t, e, n, i = this;
  12378. E(rm, (function (t) {
  12379. var e = function (e) {
  12380. var n, r = i.getModel(),
  12381. o = e.target,
  12382. a = "globalout" === t;
  12383. if (a ? n = {} : o && Oy(o, (function (t) {
  12384. var e = rl(t);
  12385. if (e && null != e.dataIndex) {
  12386. var i = e.dataModel || r.getSeriesByIndex(e.seriesIndex);
  12387. return n = i && i.getDataParams(e.dataIndex, e.dataType, o) || {}, !0
  12388. }
  12389. if (e.eventData) return n = A({}, e.eventData), !0
  12390. }), !0), n) {
  12391. var s = n.componentType,
  12392. l = n.componentIndex;
  12393. "markLine" !== s && "markPoint" !== s && "markArea" !== s || (s = "series", l = n.seriesIndex);
  12394. var u = s && null != l && r.getComponent(s, l),
  12395. h = u && i["series" === u.mainType ? "_chartsMap" : "_componentsMap"][u.__viewId];
  12396. 0, n.event = e, n.type = t, i._$eventProcessor.eventInfo = {
  12397. targetEl: o,
  12398. packedEvent: n,
  12399. model: u,
  12400. view: h
  12401. }, i.trigger(t, n)
  12402. }
  12403. };
  12404. e.zrEventfulCallAtLast = !0, i._zr.on(t, e, i)
  12405. })), E(sm, (function (t, e) {
  12406. i._messageCenter.on(e, (function (t) {
  12407. this.trigger(e, t)
  12408. }), i)
  12409. })), E(["selectchanged"], (function (t) {
  12410. i._messageCenter.on(t, (function (e) {
  12411. this.trigger(t, e)
  12412. }), i)
  12413. })), t = this._messageCenter, e = this, n = this._api, t.on("selectchanged", (function (t) {
  12414. var i = n.getModel();
  12415. t.isFromClick ? (Py("map", "selectchanged", e, i, t), Py("pie", "selectchanged", e, i, t)) : "select" === t.fromAction ? (Py("map", "selected", e, i, t), Py("pie", "selected", e, i, t)) : "unselect" === t.fromAction && (Py("map", "unselected", e, i, t), Py("pie", "unselected", e, i, t))
  12416. }))
  12417. }, e.prototype.isDisposed = function () {
  12418. return this._disposed
  12419. }, e.prototype.clear = function () {
  12420. this._disposed ? om(this.id) : this.setOption({
  12421. series: []
  12422. }, !0)
  12423. }, e.prototype.dispose = function () {
  12424. if (this._disposed) om(this.id);
  12425. else {
  12426. this._disposed = !0, this.getDom() && Xo(this.getDom(), vm, "");
  12427. var t = this,
  12428. e = t._api,
  12429. n = t._model;
  12430. E(t._componentsViews, (function (t) {
  12431. t.dispose(n, e)
  12432. })), E(t._chartsViews, (function (t) {
  12433. t.dispose(n, e)
  12434. })), t._zr.dispose(), t._dom = t._model = t._chartsMap = t._componentsMap = t._chartsViews = t._componentsViews = t._scheduler = t._api = t._zr = t._throttledZrFlush = t._theme = t._coordSysMgr = t._messageCenter = null, delete dm[t.id]
  12435. }
  12436. }, e.prototype.resize = function (t) {
  12437. if (!this[Dv])
  12438. if (this._disposed) om(this.id);
  12439. else {
  12440. this._zr.resize(t);
  12441. var e = this._model;
  12442. if (this._loadingFX && this._loadingFX.resize(), e) {
  12443. var n = e.resetOption("media"),
  12444. i = t && t.silent;
  12445. this[Av] && (null == i && (i = this[Av].silent), n = !0, this[Av] = null), this[Dv] = !0;
  12446. try {
  12447. n && Ev(this), Bv.update.call(this, {
  12448. type: "resize",
  12449. animation: A({
  12450. duration: 0
  12451. }, t && t.animation)
  12452. })
  12453. } catch (t) {
  12454. throw this[Dv] = !1, t
  12455. }
  12456. this[Dv] = !1, Hv.call(this, i), Yv.call(this, i)
  12457. }
  12458. }
  12459. }, e.prototype.showLoading = function (t, e) {
  12460. if (this._disposed) om(this.id);
  12461. else if (q(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), pm[t]) {
  12462. var n = pm[t](this._api, e),
  12463. i = this._zr;
  12464. this._loadingFX = n, i.add(n)
  12465. }
  12466. }, e.prototype.hideLoading = function () {
  12467. this._disposed ? om(this.id) : (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null)
  12468. }, e.prototype.makeActionFromEvent = function (t) {
  12469. var e = A({}, t);
  12470. return e.type = sm[t.type], e
  12471. }, e.prototype.dispatchAction = function (t, e) {
  12472. if (this._disposed) om(this.id);
  12473. else if (q(e) || (e = {
  12474. silent: !!e
  12475. }), am[t.type] && this._model)
  12476. if (this[Dv]) this._pendingActions.push(t);
  12477. else {
  12478. var n = e.silent;
  12479. Wv.call(this, t, n);
  12480. var i = e.flush;
  12481. i ? this._zr.flush() : !1 !== i && r.browser.weChat && this._throttledZrFlush(), Hv.call(this, n), Yv.call(this, n)
  12482. }
  12483. }, e.prototype.updateLabelLayout = function () {
  12484. wv.trigger("series:layoutlabels", this._model, this._api, {
  12485. updatedSeries: []
  12486. })
  12487. }, e.prototype.appendData = function (t) {
  12488. if (this._disposed) om(this.id);
  12489. else {
  12490. var e = t.seriesIndex,
  12491. n = this.getModel().getSeriesByIndex(e);
  12492. 0, n.appendData(t), this._scheduler.unfinished = !0, this.getZr().wakeUp()
  12493. }
  12494. }, e.internalField = function () {
  12495. function t(t) {
  12496. t.clearColorPalette(), t.eachSeries((function (t) {
  12497. t.clearColorPalette()
  12498. }))
  12499. }
  12500. function e(t) {
  12501. for (var e = [], n = t.currentStates, i = 0; i < n.length; i++) {
  12502. var r = n[i];
  12503. "emphasis" !== r && "blur" !== r && "select" !== r && e.push(r)
  12504. }
  12505. t.selected && t.states.select && e.push("select"), 2 === t.hoverState && t.states.emphasis ? e.push("emphasis") : 1 === t.hoverState && t.states.blur && e.push("blur"), t.useStates(e)
  12506. }
  12507. function i(t, e) {
  12508. if (!t.preventAutoZ) {
  12509. var n = t.get("z") || 0,
  12510. i = t.get("zlevel") || 0;
  12511. e.eachRendered((function (t) {
  12512. return o(t, n, i, -1 / 0), !0
  12513. }))
  12514. }
  12515. }
  12516. function o(t, e, n, i) {
  12517. var r = t.getTextContent(),
  12518. a = t.getTextGuideLine();
  12519. if (t.isGroup)
  12520. for (var s = t.childrenRef(), l = 0; l < s.length; l++) i = Math.max(o(s[l], e, n, i), i);
  12521. else t.z = e, t.zlevel = n, i = Math.max(t.z2, i);
  12522. if (r && (r.z = e, r.zlevel = n, isFinite(i) && (r.z2 = i + 2)), a) {
  12523. var u = t.textGuideLineConfig;
  12524. a.z = e, a.zlevel = n, isFinite(i) && (a.z2 = i + (u && u.showAbove ? 1 : -1))
  12525. }
  12526. return i
  12527. }
  12528. function a(t, e) {
  12529. e.eachRendered((function (t) {
  12530. if (!xh(t)) {
  12531. var e = t.getTextContent(),
  12532. n = t.getTextGuideLine();
  12533. t.stateTransition && (t.stateTransition = null), e && e.stateTransition && (e.stateTransition = null), n && n.stateTransition && (n.stateTransition = null), t.hasState() ? (t.prevStates = t.currentStates, t.clearStates()) : t.prevStates && (t.prevStates = null)
  12534. }
  12535. }))
  12536. }
  12537. function s(t, n) {
  12538. var i = t.getModel("stateAnimation"),
  12539. r = t.isAnimationEnabled(),
  12540. o = i.get("duration"),
  12541. a = o > 0 ? {
  12542. duration: o,
  12543. delay: i.get("delay"),
  12544. easing: i.get("easing")
  12545. } : null;
  12546. n.eachRendered((function (t) {
  12547. if (t.states && t.states.emphasis) {
  12548. if (xh(t)) return;
  12549. if (t instanceof ks && function (t) {
  12550. var e = ll(t);
  12551. e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  12552. var n = t.states.select || {};
  12553. e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null
  12554. }(t), t.__dirty) {
  12555. var n = t.prevStates;
  12556. n && t.useStates(n)
  12557. }
  12558. if (r) {
  12559. t.stateTransition = a;
  12560. var i = t.getTextContent(),
  12561. o = t.getTextGuideLine();
  12562. i && (i.stateTransition = a), o && (o.stateTransition = a)
  12563. }
  12564. t.__dirty && e(t)
  12565. }
  12566. }))
  12567. }
  12568. Ev = function (t) {
  12569. var e = t._scheduler;
  12570. e.restorePipelines(t._model), e.prepareStageTasks(), zv(t, !0), zv(t, !1), e.plan()
  12571. }, zv = function (t, e) {
  12572. for (var n = t._model, i = t._scheduler, r = e ? t._componentsViews : t._chartsViews, o = e ? t._componentsMap : t._chartsMap, a = t._zr, s = t._api, l = 0; l < r.length; l++) r[l].__alive = !1;
  12573. function u(t) {
  12574. var l = t.__requireNewView;
  12575. t.__requireNewView = !1;
  12576. var u = "_ec_" + t.id + "_" + t.type,
  12577. h = !l && o[u];
  12578. if (!h) {
  12579. var c = Ko(t.type),
  12580. p = e ? Ag.getClass(c.main, c.sub) : Og.getClass(c.sub);
  12581. 0, (h = new p).init(n, s), o[u] = h, r.push(h), a.add(h.group)
  12582. }
  12583. t.__viewId = h.__id = u, h.__alive = !0, h.__model = t, h.group.__ecComponentInfo = {
  12584. mainType: t.mainType,
  12585. index: t.componentIndex
  12586. }, !e && i.prepareView(h, t, n, s)
  12587. }
  12588. e ? n.eachComponent((function (t, e) {
  12589. "series" !== t && u(e)
  12590. })) : n.eachSeries(u);
  12591. for (l = 0; l < r.length;) {
  12592. var h = r[l];
  12593. h.__alive ? l++ : (!e && h.renderTask.dispose(), a.remove(h.group), h.dispose(n, s), r.splice(l, 1), o[h.__id] === h && delete o[h.__id], h.__id = h.group.__ecComponentInfo = null)
  12594. }
  12595. }, Vv = function (t, e, n, i, r) {
  12596. var o = t._model;
  12597. if (o.setUpdatePayload(n), i) {
  12598. var a = {};
  12599. a[i + "Id"] = n[i + "Id"], a[i + "Index"] = n[i + "Index"], a[i + "Name"] = n[i + "Name"];
  12600. var s = {
  12601. mainType: i,
  12602. query: a
  12603. };
  12604. r && (s.subType = r);
  12605. var l, u = n.excludeSeriesId;
  12606. null != u && (l = yt(), E(To(u), (function (t) {
  12607. var e = Ro(t, null);
  12608. null != e && l.set(e, !0)
  12609. }))), o && o.eachComponent(s, (function (e) {
  12610. if (!(l && null != l.get(e.id)))
  12611. if (eu(n))
  12612. if (e instanceof bg) n.type !== dl || n.notBlur || e.get(["emphasis", "disabled"]) || function (t, e, n) {
  12613. var i = t.seriesIndex,
  12614. r = t.getData(e.dataType);
  12615. if (r) {
  12616. var o = zo(r, e);
  12617. o = (Y(o) ? o[0] : o) || 0;
  12618. var a = r.getItemGraphicEl(o);
  12619. if (!a)
  12620. for (var s = r.count(), l = 0; !a && l < s;) a = r.getItemGraphicEl(l++);
  12621. if (a) {
  12622. var u = rl(a);
  12623. Gl(i, u.focus, u.blurScope, n)
  12624. } else {
  12625. var h = t.get(["emphasis", "focus"]),
  12626. c = t.get(["emphasis", "blurScope"]);
  12627. null != h && Gl(i, h, c, n)
  12628. }
  12629. }
  12630. }(e, n, t._api);
  12631. else {
  12632. var i = Hl(e.mainType, e.componentIndex, n.name, t._api),
  12633. r = i.focusSelf,
  12634. o = i.dispatchers;
  12635. n.type === dl && r && !n.notBlur && Wl(e.mainType, e.componentIndex, t._api), o && E(o, (function (t) {
  12636. n.type === dl ? Ol(t) : Rl(t)
  12637. }))
  12638. }
  12639. else tu(n) && e instanceof bg && (! function (t, e, n) {
  12640. if (tu(e)) {
  12641. var i = e.dataType,
  12642. r = zo(t.getData(i), e);
  12643. Y(r) || (r = [r]), t[e.type === vl ? "toggleSelect" : e.type === gl ? "select" : "unselect"](r, i)
  12644. }
  12645. }(e, n, t._api), Yl(e), Jv(t))
  12646. }), t), o && o.eachComponent(s, (function (e) {
  12647. l && null != l.get(e.id) || h(t["series" === i ? "_chartsMap" : "_componentsMap"][e.__viewId])
  12648. }), t)
  12649. } else E([].concat(t._componentsViews).concat(t._chartsViews), h);
  12650. function h(i) {
  12651. i && i.__alive && i[e] && i[e](i.__model, o, t._api, n)
  12652. }
  12653. }, Bv = {
  12654. prepareAndUpdate: function (t) {
  12655. Ev(this), Bv.update.call(this, t, {
  12656. optionChanged: null != t.newOption
  12657. })
  12658. },
  12659. update: function (e, n) {
  12660. var i = this._model,
  12661. r = this._api,
  12662. o = this._zr,
  12663. a = this._coordSysMgr,
  12664. s = this._scheduler;
  12665. if (i) {
  12666. i.setUpdatePayload(e), s.restoreData(i, e), s.performSeriesTasks(i), a.create(i, r), s.performDataProcessorTasks(i, e), Gv(this, i), a.update(i, r), t(i), s.performVisualTasks(i, e), Zv(this, i, r, e, n);
  12667. var l = i.get("backgroundColor") || "transparent",
  12668. u = i.get("darkMode");
  12669. o.setBackgroundColor(l), null != u && "auto" !== u && o.setDarkMode(u), wv.trigger("afterupdate", i, r)
  12670. }
  12671. },
  12672. updateTransform: function (e) {
  12673. var n = this,
  12674. i = this._model,
  12675. r = this._api;
  12676. if (i) {
  12677. i.setUpdatePayload(e);
  12678. var o = [];
  12679. i.eachComponent((function (t, a) {
  12680. if ("series" !== t) {
  12681. var s = n.getViewOfComponentModel(a);
  12682. if (s && s.__alive)
  12683. if (s.updateTransform) {
  12684. var l = s.updateTransform(a, i, r, e);
  12685. l && l.update && o.push(s)
  12686. } else o.push(s)
  12687. }
  12688. }));
  12689. var a = yt();
  12690. i.eachSeries((function (t) {
  12691. var o = n._chartsMap[t.__viewId];
  12692. if (o.updateTransform) {
  12693. var s = o.updateTransform(t, i, r, e);
  12694. s && s.update && a.set(t.uid, 1)
  12695. } else a.set(t.uid, 1)
  12696. })), t(i), this._scheduler.performVisualTasks(i, e, {
  12697. setDirty: !0,
  12698. dirtyMap: a
  12699. }), qv(this, i, r, e, {}, a), wv.trigger("afterupdate", i, r)
  12700. }
  12701. },
  12702. updateView: function (e) {
  12703. var n = this._model;
  12704. n && (n.setUpdatePayload(e), Og.markUpdateMethod(e, "updateView"), t(n), this._scheduler.performVisualTasks(n, e, {
  12705. setDirty: !0
  12706. }), Zv(this, n, this._api, e, {}), wv.trigger("afterupdate", n, this._api))
  12707. },
  12708. updateVisual: function (e) {
  12709. var n = this,
  12710. i = this._model;
  12711. i && (i.setUpdatePayload(e), i.eachSeries((function (t) {
  12712. t.getData().clearAllVisual()
  12713. })), Og.markUpdateMethod(e, "updateVisual"), t(i), this._scheduler.performVisualTasks(i, e, {
  12714. visualType: "visual",
  12715. setDirty: !0
  12716. }), i.eachComponent((function (t, r) {
  12717. if ("series" !== t) {
  12718. var o = n.getViewOfComponentModel(r);
  12719. o && o.__alive && o.updateVisual(r, i, n._api, e)
  12720. }
  12721. })), i.eachSeries((function (t) {
  12722. n._chartsMap[t.__viewId].updateVisual(t, i, n._api, e)
  12723. })), wv.trigger("afterupdate", i, this._api))
  12724. },
  12725. updateLayout: function (t) {
  12726. Bv.update.call(this, t)
  12727. }
  12728. }, Fv = function (t, e, n, i) {
  12729. if (t._disposed) om(t.id);
  12730. else {
  12731. for (var r, o = t._model, a = t._coordSysMgr.getCoordinateSystems(), s = Fo(o, n), l = 0; l < a.length; l++) {
  12732. var u = a[l];
  12733. if (u[e] && null != (r = u[e](o, s, i))) return r
  12734. }
  12735. 0
  12736. }
  12737. }, Gv = function (t, e) {
  12738. var n = t._chartsMap,
  12739. i = t._scheduler;
  12740. e.eachSeries((function (t) {
  12741. i.updateStreamModes(t, n[t.__viewId])
  12742. }))
  12743. }, Wv = function (t, e) {
  12744. var n = this,
  12745. i = this.getModel(),
  12746. r = t.type,
  12747. o = t.escapeConnect,
  12748. a = am[r],
  12749. s = a.actionInfo,
  12750. l = (s.update || "update").split(":"),
  12751. u = l.pop(),
  12752. h = null != l[0] && Ko(l[0]);
  12753. this[Dv] = !0;
  12754. var c = [t],
  12755. p = !1;
  12756. t.batch && (p = !0, c = z(t.batch, (function (e) {
  12757. return (e = k(A({}, e), t)).batch = null, e
  12758. })));
  12759. var d, f = [],
  12760. g = tu(t),
  12761. y = eu(t);
  12762. if (y && Fl(this._api), E(c, (function (e) {
  12763. if ((d = (d = a.action(e, n._model, n._api)) || A({}, e)).type = s.event || d.type, f.push(d), y) {
  12764. var i = Go(t),
  12765. r = i.queryOptionMap,
  12766. o = i.mainTypeSpecified ? r.keys()[0] : "series";
  12767. Vv(n, u, e, o), Jv(n)
  12768. } else g ? (Vv(n, u, e, "series"), Jv(n)) : h && Vv(n, u, e, h.main, h.sub)
  12769. })), "none" !== u && !y && !g && !h) try {
  12770. this[Av] ? (Ev(this), Bv.update.call(this, t), this[Av] = null) : Bv[u].call(this, t)
  12771. } catch (t) {
  12772. throw this[Dv] = !1, t
  12773. }
  12774. if (d = p ? {
  12775. type: s.event || r,
  12776. escapeConnect: o,
  12777. batch: f
  12778. } : f[0], this[Dv] = !1, !e) {
  12779. var v = this._messageCenter;
  12780. if (v.trigger(d.type, d), g) {
  12781. var m = {
  12782. type: "selectchanged",
  12783. escapeConnect: o,
  12784. selected: Xl(i),
  12785. isFromClick: t.isFromClick || !1,
  12786. fromAction: t.type,
  12787. fromActionPayload: t
  12788. };
  12789. v.trigger(m.type, m)
  12790. }
  12791. }
  12792. }, Hv = function (t) {
  12793. for (var e = this._pendingActions; e.length;) {
  12794. var n = e.shift();
  12795. Wv.call(this, n, t)
  12796. }
  12797. }, Yv = function (t) {
  12798. !t && this.trigger("updated")
  12799. }, Xv = function (t, e) {
  12800. t.on("rendered", (function (n) {
  12801. e.trigger("rendered", n), !t.animation.isFinished() || e[Av] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished")
  12802. }))
  12803. }, Uv = function (t, e) {
  12804. t.on("mouseover", (function (t) {
  12805. var n = Oy(t.target, Ql);
  12806. n && (! function (t, e, n) {
  12807. var i = rl(t),
  12808. r = Hl(i.componentMainType, i.componentIndex, i.componentHighDownName, n),
  12809. o = r.dispatchers,
  12810. a = r.focusSelf;
  12811. o ? (a && Wl(i.componentMainType, i.componentIndex, n), E(o, (function (t) {
  12812. return Ll(t, e)
  12813. }))) : (Gl(i.seriesIndex, i.focus, i.blurScope, n), "self" === i.focus && Wl(i.componentMainType, i.componentIndex, n), Ll(t, e))
  12814. }(n, t, e._api), Jv(e))
  12815. })).on("mouseout", (function (t) {
  12816. var n = Oy(t.target, Ql);
  12817. n && (! function (t, e, n) {
  12818. Fl(n);
  12819. var i = rl(t),
  12820. r = Hl(i.componentMainType, i.componentIndex, i.componentHighDownName, n).dispatchers;
  12821. r ? E(r, (function (t) {
  12822. return Pl(t, e)
  12823. })) : Pl(t, e)
  12824. }(n, t, e._api), Jv(e))
  12825. })).on("click", (function (t) {
  12826. var n = Oy(t.target, (function (t) {
  12827. return null != rl(t).dataIndex
  12828. }), !0);
  12829. if (n) {
  12830. var i = n.selected ? "unselect" : "select",
  12831. r = rl(n);
  12832. e._api.dispatchAction({
  12833. type: i,
  12834. dataType: r.dataType,
  12835. dataIndexInside: r.dataIndex,
  12836. seriesIndex: r.seriesIndex,
  12837. isFromClick: !0
  12838. })
  12839. }
  12840. }))
  12841. }, Zv = function (t, e, n, i, r) {
  12842. ! function (t) {
  12843. var e = [],
  12844. n = [],
  12845. i = !1;
  12846. if (t.eachComponent((function (t, r) {
  12847. var o = r.get("zlevel") || 0,
  12848. a = r.get("z") || 0,
  12849. s = r.getZLevelKey();
  12850. i = i || !!s, ("series" === t ? n : e).push({
  12851. zlevel: o,
  12852. z: a,
  12853. idx: r.componentIndex,
  12854. type: t,
  12855. key: s
  12856. })
  12857. })), i) {
  12858. var r, o, a = e.concat(n);
  12859. Qe(a, (function (t, e) {
  12860. return t.zlevel === e.zlevel ? t.z - e.z : t.zlevel - e.zlevel
  12861. })), E(a, (function (e) {
  12862. var n = t.getComponent(e.type, e.idx),
  12863. i = e.zlevel,
  12864. a = e.key;
  12865. null != r && (i = Math.max(r, i)), a ? (i === r && a !== o && i++, o = a) : o && (i === r && i++, o = ""), r = i, n.setZLevel(i)
  12866. }))
  12867. }
  12868. }(e), jv(t, e, n, i, r), E(t._chartsViews, (function (t) {
  12869. t.__alive = !1
  12870. })), qv(t, e, n, i, r), E(t._chartsViews, (function (t) {
  12871. t.__alive || t.remove(e, n)
  12872. }))
  12873. }, jv = function (t, e, n, r, o, l) {
  12874. E(l || t._componentsViews, (function (t) {
  12875. var o = t.__model;
  12876. a(o, t), t.render(o, e, n, r), i(o, t), s(o, t)
  12877. }))
  12878. }, qv = function (t, e, n, o, l, u) {
  12879. var h = t._scheduler;
  12880. l = A(l || {}, {
  12881. updatedSeries: e.getSeries()
  12882. }), wv.trigger("series:beforeupdate", e, n, l);
  12883. var c = !1;
  12884. e.eachSeries((function (e) {
  12885. var n = t._chartsMap[e.__viewId];
  12886. n.__alive = !0;
  12887. var i = n.renderTask;
  12888. h.updatePayload(i, o), a(e, n), u && u.get(e.uid) && i.dirty(), i.perform(h.getPerformArgs(i)) && (c = !0), n.group.silent = !!e.get("silent"),
  12889. function (t, e) {
  12890. var n = t.get("blendMode") || null;
  12891. e.eachRendered((function (t) {
  12892. t.isGroup || (t.style.blend = n)
  12893. }))
  12894. }(e, n), Yl(e)
  12895. })), h.unfinished = c || h.unfinished, wv.trigger("series:layoutlabels", e, n, l), wv.trigger("series:transition", e, n, l), e.eachSeries((function (e) {
  12896. var n = t._chartsMap[e.__viewId];
  12897. i(e, n), s(e, n)
  12898. })),
  12899. function (t, e) {
  12900. var n = t._zr,
  12901. i = n.storage,
  12902. o = 0;
  12903. i.traverse((function (t) {
  12904. t.isGroup || o++
  12905. })), o > e.get("hoverLayerThreshold") && !r.node && !r.worker && e.eachSeries((function (e) {
  12906. if (!e.preventUsingHoverLayer) {
  12907. var n = t._chartsMap[e.__viewId];
  12908. n.__alive && n.eachRendered((function (t) {
  12909. t.states.emphasis && (t.states.emphasis.hoverLayer = !0)
  12910. }))
  12911. }
  12912. }))
  12913. }(t, e), wv.trigger("series:afterupdate", e, n, l)
  12914. }, Jv = function (t) {
  12915. t[kv] = !0, t.getZr().wakeUp()
  12916. }, Qv = function (t) {
  12917. t[kv] && (t.getZr().storage.traverse((function (t) {
  12918. xh(t) || e(t)
  12919. })), t[kv] = !1)
  12920. }, Kv = function (t) {
  12921. return new(function (e) {
  12922. function i() {
  12923. return null !== e && e.apply(this, arguments) || this
  12924. }
  12925. return n(i, e), i.prototype.getCoordinateSystems = function () {
  12926. return t._coordSysMgr.getCoordinateSystems()
  12927. }, i.prototype.getComponentByElement = function (e) {
  12928. for (; e;) {
  12929. var n = e.__ecComponentInfo;
  12930. if (null != n) return t._model.getComponent(n.mainType, n.index);
  12931. e = e.parent
  12932. }
  12933. }, i.prototype.enterEmphasis = function (e, n) {
  12934. Ol(e, n), Jv(t)
  12935. }, i.prototype.leaveEmphasis = function (e, n) {
  12936. Rl(e, n), Jv(t)
  12937. }, i.prototype.enterBlur = function (e) {
  12938. Nl(e), Jv(t)
  12939. }, i.prototype.leaveBlur = function (e) {
  12940. El(e), Jv(t)
  12941. }, i.prototype.enterSelect = function (e) {
  12942. zl(e), Jv(t)
  12943. }, i.prototype.leaveSelect = function (e) {
  12944. Vl(e), Jv(t)
  12945. }, i.prototype.getModel = function () {
  12946. return t.getModel()
  12947. }, i.prototype.getViewOfComponentModel = function (e) {
  12948. return t.getViewOfComponentModel(e)
  12949. }, i.prototype.getViewOfSeriesModel = function (e) {
  12950. return t.getViewOfSeriesModel(e)
  12951. }, i
  12952. }(_d))(t)
  12953. }, $v = function (t) {
  12954. function e(t, e) {
  12955. for (var n = 0; n < t.length; n++) {
  12956. t[n][Pv] = e
  12957. }
  12958. }
  12959. E(sm, (function (n, i) {
  12960. t._messageCenter.on(i, (function (n) {
  12961. if (fm[t.group] && 0 !== t[Pv]) {
  12962. if (n && n.escapeConnect) return;
  12963. var i = t.makeActionFromEvent(n),
  12964. r = [];
  12965. E(dm, (function (e) {
  12966. e !== t && e.group === t.group && r.push(e)
  12967. })), e(r, 0), E(r, (function (t) {
  12968. 1 !== t[Pv] && t.dispatchAction(i)
  12969. })), e(r, 2)
  12970. }
  12971. }))
  12972. }))
  12973. }
  12974. }(), e
  12975. }(jt),
  12976. im = nm.prototype;
  12977. im.on = Ov("on"), im.off = Ov("off"), im.one = function (t, e, n) {
  12978. var i = this;
  12979. bo(), this.on.call(this, t, (function n() {
  12980. for (var r = [], o = 0; o < arguments.length; o++) r[o] = arguments[o];
  12981. e && e.apply && e.apply(this, r), i.off(t, n)
  12982. }), n)
  12983. };
  12984. var rm = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  12985. function om(t) {
  12986. 0
  12987. }
  12988. var am = {},
  12989. sm = {},
  12990. lm = [],
  12991. um = [],
  12992. hm = [],
  12993. cm = {},
  12994. pm = {},
  12995. dm = {},
  12996. fm = {},
  12997. gm = +new Date - 0,
  12998. ym = +new Date - 0,
  12999. vm = "_echarts_instance_";
  13000. function mm(t) {
  13001. fm[t] = !1
  13002. }
  13003. var xm = mm;
  13004. function _m(t) {
  13005. return dm[function (t, e) {
  13006. return t.getAttribute ? t.getAttribute(e) : t[e]
  13007. }(t, vm)]
  13008. }
  13009. function bm(t, e) {
  13010. cm[t] = e
  13011. }
  13012. function wm(t) {
  13013. P(um, t) < 0 && um.push(t)
  13014. }
  13015. function Sm(t, e) {
  13016. Pm(lm, t, e, 2e3)
  13017. }
  13018. function Mm(t) {
  13019. Tm("afterinit", t)
  13020. }
  13021. function Im(t) {
  13022. Tm("afterupdate", t)
  13023. }
  13024. function Tm(t, e) {
  13025. wv.on(t, e)
  13026. }
  13027. function Cm(t, e, n) {
  13028. X(e) && (n = e, e = "");
  13029. var i = q(t) ? t.type : [t, t = {
  13030. event: e
  13031. }][0];
  13032. t.event = (t.event || i).toLowerCase(), e = t.event, sm[e] || (lt(Lv.test(i) && Lv.test(e)), am[i] || (am[i] = {
  13033. action: n,
  13034. actionInfo: t
  13035. }), sm[e] = i)
  13036. }
  13037. function Dm(t, e) {
  13038. wd.register(t, e)
  13039. }
  13040. function Am(t, e) {
  13041. Pm(hm, t, e, 1e3, "layout")
  13042. }
  13043. function km(t, e) {
  13044. Pm(hm, t, e, 3e3, "visual")
  13045. }
  13046. var Lm = [];
  13047. function Pm(t, e, n, i, r) {
  13048. if ((X(e) || q(e)) && (n = e, e = i), !(P(Lm, n) >= 0)) {
  13049. Lm.push(n);
  13050. var o = ey.wrapStageHandler(n, r);
  13051. o.__prio = e, o.__raw = n, t.push(o)
  13052. }
  13053. }
  13054. function Om(t, e) {
  13055. pm[t] = e
  13056. }
  13057. function Rm(t, e, n) {
  13058. var i = Mv("registerMap");
  13059. i && i(t, e, n)
  13060. }
  13061. var Nm = function (t) {
  13062. var e = (t = T(t)).type,
  13063. n = "";
  13064. e || wo(n);
  13065. var i = e.split(":");
  13066. 2 !== i.length && wo(n);
  13067. var r = !1;
  13068. "echarts" === i[0] && (e = i[1], r = !0), t.__isBuiltIn = r, Vf.set(e, t)
  13069. };
  13070. km(Iv, Kg), km(Tv, Jg), km(Tv, Qg), km(Iv, Ty), km(Tv, Cy), km(7e3, (function (t, e) {
  13071. t.eachRawSeries((function (n) {
  13072. if (!t.isSeriesFiltered(n)) {
  13073. var i = n.getData();
  13074. i.hasItemVisual() && i.each((function (t) {
  13075. var n = i.getItemVisual(t, "decal");
  13076. n && (i.ensureUniqueItemVisual(t, "style").decal = mv(n, e))
  13077. }));
  13078. var r = i.getVisual("decal");
  13079. if (r) i.getVisual("style").decal = mv(r, e)
  13080. }
  13081. }))
  13082. })), wm(Xd), Sm(900, (function (t) {
  13083. var e = yt();
  13084. t.eachSeries((function (t) {
  13085. var n = t.get("stack");
  13086. if (n) {
  13087. var i = e.get(n) || e.set(n, []),
  13088. r = t.getData(),
  13089. o = {
  13090. stackResultDimension: r.getCalculationInfo("stackResultDimension"),
  13091. stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
  13092. stackedDimension: r.getCalculationInfo("stackedDimension"),
  13093. stackedByDimension: r.getCalculationInfo("stackedByDimension"),
  13094. isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
  13095. data: r,
  13096. seriesModel: t
  13097. };
  13098. if (!o.stackedDimension || !o.isStackedByIndex && !o.stackedByDimension) return;
  13099. i.length && r.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o)
  13100. }
  13101. })), e.each(Ud)
  13102. })), Om("default", (function (t, e) {
  13103. k(e = e || {}, {
  13104. text: "loading",
  13105. textColor: "#000",
  13106. fontSize: 12,
  13107. fontWeight: "normal",
  13108. fontStyle: "normal",
  13109. fontFamily: "sans-serif",
  13110. maskColor: "rgba(255, 255, 255, 0.8)",
  13111. showSpinner: !0,
  13112. color: "#5470c6",
  13113. spinnerRadius: 10,
  13114. lineWidth: 5,
  13115. zlevel: 0
  13116. });
  13117. var n = new Br,
  13118. i = new Ws({
  13119. style: {
  13120. fill: e.maskColor
  13121. },
  13122. zlevel: e.zlevel,
  13123. z: 1e4
  13124. });
  13125. n.add(i);
  13126. var r, o = new Xs({
  13127. style: {
  13128. text: e.text,
  13129. fill: e.textColor,
  13130. fontSize: e.fontSize,
  13131. fontWeight: e.fontWeight,
  13132. fontStyle: e.fontStyle,
  13133. fontFamily: e.fontFamily
  13134. },
  13135. zlevel: e.zlevel,
  13136. z: 10001
  13137. }),
  13138. a = new Ws({
  13139. style: {
  13140. fill: "none"
  13141. },
  13142. textContent: o,
  13143. textConfig: {
  13144. position: "right",
  13145. distance: 10
  13146. },
  13147. zlevel: e.zlevel,
  13148. z: 10001
  13149. });
  13150. return n.add(a), e.showSpinner && ((r = new nh({
  13151. shape: {
  13152. startAngle: -ty / 2,
  13153. endAngle: -ty / 2 + .1,
  13154. r: e.spinnerRadius
  13155. },
  13156. style: {
  13157. stroke: e.color,
  13158. lineCap: "round",
  13159. lineWidth: e.lineWidth
  13160. },
  13161. zlevel: e.zlevel,
  13162. z: 10001
  13163. })).animateShape(!0).when(1e3, {
  13164. endAngle: 3 * ty / 2
  13165. }).start("circularInOut"), r.animateShape(!0).when(1e3, {
  13166. startAngle: 3 * ty / 2
  13167. }).delay(300).start("circularInOut"), n.add(r)), n.resize = function () {
  13168. var n = o.getBoundingRect().width,
  13169. s = e.showSpinner ? e.spinnerRadius : 0,
  13170. l = (t.getWidth() - 2 * s - (e.showSpinner && n ? 10 : 0) - n) / 2 - (e.showSpinner && n ? 0 : 5 + n / 2) + (e.showSpinner ? 0 : n / 2) + (n ? 0 : s),
  13171. u = t.getHeight() / 2;
  13172. e.showSpinner && r.setShape({
  13173. cx: l,
  13174. cy: u
  13175. }), a.setShape({
  13176. x: l - s,
  13177. y: u - s,
  13178. width: 2 * s,
  13179. height: 2 * s
  13180. }), i.setShape({
  13181. x: 0,
  13182. y: 0,
  13183. width: t.getWidth(),
  13184. height: t.getHeight()
  13185. })
  13186. }, n.resize(), n
  13187. })), Cm({
  13188. type: dl,
  13189. event: dl,
  13190. update: dl
  13191. }, bt), Cm({
  13192. type: fl,
  13193. event: fl,
  13194. update: fl
  13195. }, bt), Cm({
  13196. type: gl,
  13197. event: gl,
  13198. update: gl
  13199. }, bt), Cm({
  13200. type: yl,
  13201. event: yl,
  13202. update: yl
  13203. }, bt), Cm({
  13204. type: vl,
  13205. event: vl,
  13206. update: vl
  13207. }, bt), bm("light", vy), bm("dark", wy);
  13208. var Em = [],
  13209. zm = {
  13210. registerPreprocessor: wm,
  13211. registerProcessor: Sm,
  13212. registerPostInit: Mm,
  13213. registerPostUpdate: Im,
  13214. registerUpdateLifecycle: Tm,
  13215. registerAction: Cm,
  13216. registerCoordinateSystem: Dm,
  13217. registerLayout: Am,
  13218. registerVisual: km,
  13219. registerTransform: Nm,
  13220. registerLoading: Om,
  13221. registerMap: Rm,
  13222. registerImpl: function (t, e) {
  13223. Sv[t] = e
  13224. },
  13225. PRIORITY: Cv,
  13226. ComponentModel: zp,
  13227. ComponentView: Ag,
  13228. SeriesModel: bg,
  13229. ChartView: Og,
  13230. registerComponentModel: function (t) {
  13231. zp.registerClass(t)
  13232. },
  13233. registerComponentView: function (t) {
  13234. Ag.registerClass(t)
  13235. },
  13236. registerSeriesModel: function (t) {
  13237. bg.registerClass(t)
  13238. },
  13239. registerChartView: function (t) {
  13240. Og.registerClass(t)
  13241. },
  13242. registerSubTypeDefaulter: function (t, e) {
  13243. zp.registerSubTypeDefaulter(t, e)
  13244. },
  13245. registerPainter: function (t, e) {
  13246. Xr(t, e)
  13247. }
  13248. };
  13249. function Vm(t) {
  13250. Y(t) ? E(t, (function (t) {
  13251. Vm(t)
  13252. })) : P(Em, t) >= 0 || (Em.push(t), X(t) && (t = {
  13253. install: t
  13254. }), t.install(zm))
  13255. }
  13256. function Bm(t) {
  13257. return null == t ? 0 : t.length || 1
  13258. }
  13259. function Fm(t) {
  13260. return t
  13261. }
  13262. var Gm = function () {
  13263. function t(t, e, n, i, r, o) {
  13264. this._old = t, this._new = e, this._oldKeyGetter = n || Fm, this._newKeyGetter = i || Fm, this.context = r, this._diffModeMultiple = "multiple" === o
  13265. }
  13266. return t.prototype.add = function (t) {
  13267. return this._add = t, this
  13268. }, t.prototype.update = function (t) {
  13269. return this._update = t, this
  13270. }, t.prototype.updateManyToOne = function (t) {
  13271. return this._updateManyToOne = t, this
  13272. }, t.prototype.updateOneToMany = function (t) {
  13273. return this._updateOneToMany = t, this
  13274. }, t.prototype.updateManyToMany = function (t) {
  13275. return this._updateManyToMany = t, this
  13276. }, t.prototype.remove = function (t) {
  13277. return this._remove = t, this
  13278. }, t.prototype.execute = function () {
  13279. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]()
  13280. }, t.prototype._executeOneToOne = function () {
  13281. var t = this._old,
  13282. e = this._new,
  13283. n = {},
  13284. i = new Array(t.length),
  13285. r = new Array(e.length);
  13286. this._initIndexMap(t, null, i, "_oldKeyGetter"), this._initIndexMap(e, n, r, "_newKeyGetter");
  13287. for (var o = 0; o < t.length; o++) {
  13288. var a = i[o],
  13289. s = n[a],
  13290. l = Bm(s);
  13291. if (l > 1) {
  13292. var u = s.shift();
  13293. 1 === s.length && (n[a] = s[0]), this._update && this._update(u, o)
  13294. } else 1 === l ? (n[a] = null, this._update && this._update(s, o)) : this._remove && this._remove(o)
  13295. }
  13296. this._performRestAdd(r, n)
  13297. }, t.prototype._executeMultiple = function () {
  13298. var t = this._old,
  13299. e = this._new,
  13300. n = {},
  13301. i = {},
  13302. r = [],
  13303. o = [];
  13304. this._initIndexMap(t, n, r, "_oldKeyGetter"), this._initIndexMap(e, i, o, "_newKeyGetter");
  13305. for (var a = 0; a < r.length; a++) {
  13306. var s = r[a],
  13307. l = n[s],
  13308. u = i[s],
  13309. h = Bm(l),
  13310. c = Bm(u);
  13311. if (h > 1 && 1 === c) this._updateManyToOne && this._updateManyToOne(u, l), i[s] = null;
  13312. else if (1 === h && c > 1) this._updateOneToMany && this._updateOneToMany(u, l), i[s] = null;
  13313. else if (1 === h && 1 === c) this._update && this._update(u, l), i[s] = null;
  13314. else if (h > 1 && c > 1) this._updateManyToMany && this._updateManyToMany(u, l), i[s] = null;
  13315. else if (h > 1)
  13316. for (var p = 0; p < h; p++) this._remove && this._remove(l[p]);
  13317. else this._remove && this._remove(l)
  13318. }
  13319. this._performRestAdd(o, i)
  13320. }, t.prototype._performRestAdd = function (t, e) {
  13321. for (var n = 0; n < t.length; n++) {
  13322. var i = t[n],
  13323. r = e[i],
  13324. o = Bm(r);
  13325. if (o > 1)
  13326. for (var a = 0; a < o; a++) this._add && this._add(r[a]);
  13327. else 1 === o && this._add && this._add(r);
  13328. e[i] = null
  13329. }
  13330. }, t.prototype._initIndexMap = function (t, e, n, i) {
  13331. for (var r = this._diffModeMultiple, o = 0; o < t.length; o++) {
  13332. var a = "_ec_" + this[i](t[o], o);
  13333. if (r || (n[o] = a), e) {
  13334. var s = e[a],
  13335. l = Bm(s);
  13336. 0 === l ? (e[a] = o, r && n.push(a)) : 1 === l ? e[a] = [s, o] : s.push(o)
  13337. }
  13338. }
  13339. }, t
  13340. }(),
  13341. Wm = function () {
  13342. function t(t, e) {
  13343. this._encode = t, this._schema = e
  13344. }
  13345. return t.prototype.get = function () {
  13346. return {
  13347. fullDimensions: this._getFullDimensionNames(),
  13348. encode: this._encode
  13349. }
  13350. }, t.prototype._getFullDimensionNames = function () {
  13351. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames
  13352. }, t
  13353. }();
  13354. function Hm(t, e) {
  13355. return t.hasOwnProperty(e) || (t[e] = []), t[e]
  13356. }
  13357. function Ym(t) {
  13358. return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
  13359. }
  13360. var Xm = function (t) {
  13361. this.otherDims = {}, null != t && A(this, t)
  13362. },
  13363. Um = Vo(),
  13364. Zm = {
  13365. float: "f",
  13366. int: "i",
  13367. ordinal: "o",
  13368. number: "n",
  13369. time: "t"
  13370. },
  13371. jm = function () {
  13372. function t(t) {
  13373. this.dimensions = t.dimensions, this._dimOmitted = t.dimensionOmitted, this.source = t.source, this._fullDimCount = t.fullDimensionCount, this._updateDimOmitted(t.dimensionOmitted)
  13374. }
  13375. return t.prototype.isDimensionOmitted = function () {
  13376. return this._dimOmitted
  13377. }, t.prototype._updateDimOmitted = function (t) {
  13378. this._dimOmitted = t, t && (this._dimNameMap || (this._dimNameMap = $m(this.source)))
  13379. }, t.prototype.getSourceDimensionIndex = function (t) {
  13380. return rt(this._dimNameMap.get(t), -1)
  13381. }, t.prototype.getSourceDimension = function (t) {
  13382. var e = this.source.dimensionsDefine;
  13383. if (e) return e[t]
  13384. }, t.prototype.makeStoreSchema = function () {
  13385. for (var t = this._fullDimCount, e = af(this.source), n = !Jm(t), i = "", r = [], o = 0, a = 0; o < t; o++) {
  13386. var s = void 0,
  13387. l = void 0,
  13388. u = void 0,
  13389. h = this.dimensions[a];
  13390. if (h && h.storeDimIndex === o) s = e ? h.name : null, l = h.type, u = h.ordinalMeta, a++;
  13391. else {
  13392. var c = this.getSourceDimension(o);
  13393. c && (s = e ? c.name : null, l = c.type)
  13394. }
  13395. r.push({
  13396. property: s,
  13397. type: l,
  13398. ordinalMeta: u
  13399. }), !e || null == s || h && h.isCalculationCoord || (i += n ? s.replace(/\`/g, "`1").replace(/\$/g, "`2") : s), i += "$", i += Zm[l] || "f", u && (i += u.uid), i += "$"
  13400. }
  13401. var p = this.source;
  13402. return {
  13403. dimensions: r,
  13404. hash: [p.seriesLayoutBy, p.startIndex, i].join("$$")
  13405. }
  13406. }, t.prototype.makeOutputDimensionNames = function () {
  13407. for (var t = [], e = 0, n = 0; e < this._fullDimCount; e++) {
  13408. var i = void 0,
  13409. r = this.dimensions[n];
  13410. if (r && r.storeDimIndex === e) r.isCalculationCoord || (i = r.name), n++;
  13411. else {
  13412. var o = this.getSourceDimension(e);
  13413. o && (i = o.name)
  13414. }
  13415. t.push(i)
  13416. }
  13417. return t
  13418. }, t.prototype.appendCalculationDimension = function (t) {
  13419. this.dimensions.push(t), t.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0)
  13420. }, t
  13421. }();
  13422. function qm(t) {
  13423. return t instanceof jm
  13424. }
  13425. function Km(t) {
  13426. for (var e = yt(), n = 0; n < (t || []).length; n++) {
  13427. var i = t[n],
  13428. r = q(i) ? i.name : i;
  13429. null != r && null == e.get(r) && e.set(r, n)
  13430. }
  13431. return e
  13432. }
  13433. function $m(t) {
  13434. var e = Um(t);
  13435. return e.dimNameMap || (e.dimNameMap = Km(t.dimensionsDefine))
  13436. }
  13437. function Jm(t) {
  13438. return t > 30
  13439. }
  13440. var Qm, tx, ex, nx, ix, rx, ox, ax = q,
  13441. sx = z,
  13442. lx = "undefined" == typeof Int32Array ? Array : Int32Array,
  13443. ux = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"],
  13444. hx = ["_approximateExtent"],
  13445. cx = function () {
  13446. function t(t, e) {
  13447. var n;
  13448. this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
  13449. var i = !1;
  13450. qm(t) ? (n = t.dimensions, this._dimOmitted = t.isDimensionOmitted(), this._schema = t) : (i = !0, n = t), n = n || ["x", "y"];
  13451. for (var r = {}, o = [], a = {}, s = !1, l = {}, u = 0; u < n.length; u++) {
  13452. var h = n[u],
  13453. c = U(h) ? new Xm({
  13454. name: h
  13455. }) : h instanceof Xm ? h : new Xm(h),
  13456. p = c.name;
  13457. c.type = c.type || "float", c.coordDim || (c.coordDim = p, c.coordDimIndex = 0);
  13458. var d = c.otherDims = c.otherDims || {};
  13459. o.push(p), r[p] = c, null != l[p] && (s = !0), c.createInvertedIndices && (a[p] = []), 0 === d.itemName && (this._nameDimIdx = u), 0 === d.itemId && (this._idDimIdx = u), i && (c.storeDimIndex = u)
  13460. }
  13461. if (this.dimensions = o, this._dimInfos = r, this._initGetDimensionInfo(s), this.hostModel = e, this._invertedIndicesMap = a, this._dimOmitted) {
  13462. var f = this._dimIdxToName = yt();
  13463. E(o, (function (t) {
  13464. f.set(r[t].storeDimIndex, t)
  13465. }))
  13466. }
  13467. }
  13468. return t.prototype.getDimension = function (t) {
  13469. var e = this._recognizeDimIndex(t);
  13470. if (null == e) return t;
  13471. if (e = t, !this._dimOmitted) return this.dimensions[e];
  13472. var n = this._dimIdxToName.get(e);
  13473. if (null != n) return n;
  13474. var i = this._schema.getSourceDimension(e);
  13475. return i ? i.name : void 0
  13476. }, t.prototype.getDimensionIndex = function (t) {
  13477. var e = this._recognizeDimIndex(t);
  13478. if (null != e) return e;
  13479. if (null == t) return -1;
  13480. var n = this._getDimInfo(t);
  13481. return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(t) : -1
  13482. }, t.prototype._recognizeDimIndex = function (t) {
  13483. if (j(t) || null != t && !isNaN(t) && !this._getDimInfo(t) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(t) < 0)) return +t
  13484. }, t.prototype._getStoreDimIndex = function (t) {
  13485. var e = this.getDimensionIndex(t);
  13486. return e
  13487. }, t.prototype.getDimensionInfo = function (t) {
  13488. return this._getDimInfo(this.getDimension(t))
  13489. }, t.prototype._initGetDimensionInfo = function (t) {
  13490. var e = this._dimInfos;
  13491. this._getDimInfo = t ? function (t) {
  13492. return e.hasOwnProperty(t) ? e[t] : void 0
  13493. } : function (t) {
  13494. return e[t]
  13495. }
  13496. }, t.prototype.getDimensionsOnCoord = function () {
  13497. return this._dimSummary.dataDimsOnCoord.slice()
  13498. }, t.prototype.mapDimension = function (t, e) {
  13499. var n = this._dimSummary;
  13500. if (null == e) return n.encodeFirstDimNotExtra[t];
  13501. var i = n.encode[t];
  13502. return i ? i[e] : null
  13503. }, t.prototype.mapDimensionsAll = function (t) {
  13504. return (this._dimSummary.encode[t] || []).slice()
  13505. }, t.prototype.getStore = function () {
  13506. return this._store
  13507. }, t.prototype.initData = function (t, e, n) {
  13508. var i, r = this;
  13509. if (t instanceof Kf && (i = t), !i) {
  13510. var o = this.dimensions,
  13511. a = Qd(t) || N(t) ? new sf(t, o.length) : t;
  13512. i = new Kf;
  13513. var s = sx(o, (function (t) {
  13514. return {
  13515. type: r._dimInfos[t].type,
  13516. property: t
  13517. }
  13518. }));
  13519. i.initData(a, s, n)
  13520. }
  13521. this._store = i, this._nameList = (e || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, i.count()), this._dimSummary = function (t, e) {
  13522. var n = {},
  13523. i = n.encode = {},
  13524. r = yt(),
  13525. o = [],
  13526. a = [],
  13527. s = {};
  13528. E(t.dimensions, (function (e) {
  13529. var n, l = t.getDimensionInfo(e),
  13530. u = l.coordDim;
  13531. if (u) {
  13532. var h = l.coordDimIndex;
  13533. Hm(i, u)[h] = e, l.isExtraCoord || (r.set(u, 1), "ordinal" !== (n = l.type) && "time" !== n && (o[0] = e), Hm(s, u)[h] = t.getDimensionIndex(l.name)), l.defaultTooltip && a.push(e)
  13534. }
  13535. Gp.each((function (t, e) {
  13536. var n = Hm(i, e),
  13537. r = l.otherDims[e];
  13538. null != r && !1 !== r && (n[r] = l.name)
  13539. }))
  13540. }));
  13541. var l = [],
  13542. u = {};
  13543. r.each((function (t, e) {
  13544. var n = i[e];
  13545. u[e] = n[0], l = l.concat(n)
  13546. })), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = z(l, (function (e) {
  13547. return t.getDimensionInfo(e).storeDimIndex
  13548. })), n.encodeFirstDimNotExtra = u;
  13549. var h = i.label;
  13550. h && h.length && (o = h.slice());
  13551. var c = i.tooltip;
  13552. return c && c.length ? a = c.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, n.userOutput = new Wm(s, e), n
  13553. }(this, this._schema), this.userOutput = this._dimSummary.userOutput
  13554. }, t.prototype.appendData = function (t) {
  13555. var e = this._store.appendData(t);
  13556. this._doInit(e[0], e[1])
  13557. }, t.prototype.appendValues = function (t, e) {
  13558. var n = this._store.appendValues(t, e.length),
  13559. i = n.start,
  13560. r = n.end,
  13561. o = this._shouldMakeIdFromName();
  13562. if (this._updateOrdinalMeta(), e)
  13563. for (var a = i; a < r; a++) {
  13564. var s = a - i;
  13565. this._nameList[a] = e[s], o && ox(this, a)
  13566. }
  13567. }, t.prototype._updateOrdinalMeta = function () {
  13568. for (var t = this._store, e = this.dimensions, n = 0; n < e.length; n++) {
  13569. var i = this._dimInfos[e[n]];
  13570. i.ordinalMeta && t.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta)
  13571. }
  13572. }, t.prototype._shouldMakeIdFromName = function () {
  13573. var t = this._store.getProvider();
  13574. return null == this._idDimIdx && t.getSource().sourceFormat !== Up && !t.fillStorage
  13575. }, t.prototype._doInit = function (t, e) {
  13576. if (!(t >= e)) {
  13577. var n = this._store.getProvider();
  13578. this._updateOrdinalMeta();
  13579. var i = this._nameList,
  13580. r = this._idList;
  13581. if (n.getSource().sourceFormat === Wp && !n.pure)
  13582. for (var o = [], a = t; a < e; a++) {
  13583. var s = n.getItem(a, o);
  13584. if (!this.hasItemOption && ko(s) && (this.hasItemOption = !0), s) {
  13585. var l = s.name;
  13586. null == i[a] && null != l && (i[a] = Ro(l, null));
  13587. var u = s.id;
  13588. null == r[a] && null != u && (r[a] = Ro(u, null))
  13589. }
  13590. }
  13591. if (this._shouldMakeIdFromName())
  13592. for (a = t; a < e; a++) ox(this, a);
  13593. Qm(this)
  13594. }
  13595. }, t.prototype.getApproximateExtent = function (t) {
  13596. return this._approximateExtent[t] || this._store.getDataExtent(this._getStoreDimIndex(t))
  13597. }, t.prototype.setApproximateExtent = function (t, e) {
  13598. e = this.getDimension(e), this._approximateExtent[e] = t.slice()
  13599. }, t.prototype.getCalculationInfo = function (t) {
  13600. return this._calculationInfo[t]
  13601. }, t.prototype.setCalculationInfo = function (t, e) {
  13602. ax(t) ? A(this._calculationInfo, t) : this._calculationInfo[t] = e
  13603. }, t.prototype.getName = function (t) {
  13604. var e = this.getRawIndex(t),
  13605. n = this._nameList[e];
  13606. return null == n && null != this._nameDimIdx && (n = ex(this, this._nameDimIdx, e)), null == n && (n = ""), n
  13607. }, t.prototype._getCategory = function (t, e) {
  13608. var n = this._store.get(t, e),
  13609. i = this._store.getOrdinalMeta(t);
  13610. return i ? i.categories[n] : n
  13611. }, t.prototype.getId = function (t) {
  13612. return tx(this, this.getRawIndex(t))
  13613. }, t.prototype.count = function () {
  13614. return this._store.count()
  13615. }, t.prototype.get = function (t, e) {
  13616. var n = this._store,
  13617. i = this._dimInfos[t];
  13618. if (i) return n.get(i.storeDimIndex, e)
  13619. }, t.prototype.getByRawIndex = function (t, e) {
  13620. var n = this._store,
  13621. i = this._dimInfos[t];
  13622. if (i) return n.getByRawIndex(i.storeDimIndex, e)
  13623. }, t.prototype.getIndices = function () {
  13624. return this._store.getIndices()
  13625. }, t.prototype.getDataExtent = function (t) {
  13626. return this._store.getDataExtent(this._getStoreDimIndex(t))
  13627. }, t.prototype.getSum = function (t) {
  13628. return this._store.getSum(this._getStoreDimIndex(t))
  13629. }, t.prototype.getMedian = function (t) {
  13630. return this._store.getMedian(this._getStoreDimIndex(t))
  13631. }, t.prototype.getValues = function (t, e) {
  13632. var n = this,
  13633. i = this._store;
  13634. return Y(t) ? i.getValues(sx(t, (function (t) {
  13635. return n._getStoreDimIndex(t)
  13636. })), e) : i.getValues(t)
  13637. }, t.prototype.hasValue = function (t) {
  13638. for (var e = this._dimSummary.dataDimIndicesOnCoord, n = 0, i = e.length; n < i; n++)
  13639. if (isNaN(this._store.get(e[n], t))) return !1;
  13640. return !0
  13641. }, t.prototype.indexOfName = function (t) {
  13642. for (var e = 0, n = this._store.count(); e < n; e++)
  13643. if (this.getName(e) === t) return e;
  13644. return -1
  13645. }, t.prototype.getRawIndex = function (t) {
  13646. return this._store.getRawIndex(t)
  13647. }, t.prototype.indexOfRawIndex = function (t) {
  13648. return this._store.indexOfRawIndex(t)
  13649. }, t.prototype.rawIndexOf = function (t, e) {
  13650. var n = t && this._invertedIndicesMap[t];
  13651. var i = n[e];
  13652. return null == i || isNaN(i) ? -1 : i
  13653. }, t.prototype.indicesOfNearest = function (t, e, n) {
  13654. return this._store.indicesOfNearest(this._getStoreDimIndex(t), e, n)
  13655. }, t.prototype.each = function (t, e, n) {
  13656. X(t) && (n = e, e = t, t = []);
  13657. var i = n || this,
  13658. r = sx(nx(t), this._getStoreDimIndex, this);
  13659. this._store.each(r, i ? W(e, i) : e)
  13660. }, t.prototype.filterSelf = function (t, e, n) {
  13661. X(t) && (n = e, e = t, t = []);
  13662. var i = n || this,
  13663. r = sx(nx(t), this._getStoreDimIndex, this);
  13664. return this._store = this._store.filter(r, i ? W(e, i) : e), this
  13665. }, t.prototype.selectRange = function (t) {
  13666. var e = this,
  13667. n = {};
  13668. return E(G(t), (function (i) {
  13669. var r = e._getStoreDimIndex(i);
  13670. n[r] = t[i]
  13671. })), this._store = this._store.selectRange(n), this
  13672. }, t.prototype.mapArray = function (t, e, n) {
  13673. X(t) && (n = e, e = t, t = []), n = n || this;
  13674. var i = [];
  13675. return this.each(t, (function () {
  13676. i.push(e && e.apply(this, arguments))
  13677. }), n), i
  13678. }, t.prototype.map = function (t, e, n, i) {
  13679. var r = n || i || this,
  13680. o = sx(nx(t), this._getStoreDimIndex, this),
  13681. a = rx(this);
  13682. return a._store = this._store.map(o, r ? W(e, r) : e), a
  13683. }, t.prototype.modify = function (t, e, n, i) {
  13684. var r = n || i || this;
  13685. var o = sx(nx(t), this._getStoreDimIndex, this);
  13686. this._store.modify(o, r ? W(e, r) : e)
  13687. }, t.prototype.downSample = function (t, e, n, i) {
  13688. var r = rx(this);
  13689. return r._store = this._store.downSample(this._getStoreDimIndex(t), e, n, i), r
  13690. }, t.prototype.lttbDownSample = function (t, e) {
  13691. var n = rx(this);
  13692. return n._store = this._store.lttbDownSample(this._getStoreDimIndex(t), e), n
  13693. }, t.prototype.getRawDataItem = function (t) {
  13694. return this._store.getRawDataItem(t)
  13695. }, t.prototype.getItemModel = function (t) {
  13696. var e = this.hostModel,
  13697. n = this.getRawDataItem(t);
  13698. return new Cc(n, e, e && e.ecModel)
  13699. }, t.prototype.diff = function (t) {
  13700. var e = this;
  13701. return new Gm(t ? t.getStore().getIndices() : [], this.getStore().getIndices(), (function (e) {
  13702. return tx(t, e)
  13703. }), (function (t) {
  13704. return tx(e, t)
  13705. }))
  13706. }, t.prototype.getVisual = function (t) {
  13707. var e = this._visual;
  13708. return e && e[t]
  13709. }, t.prototype.setVisual = function (t, e) {
  13710. this._visual = this._visual || {}, ax(t) ? A(this._visual, t) : this._visual[t] = e
  13711. }, t.prototype.getItemVisual = function (t, e) {
  13712. var n = this._itemVisuals[t],
  13713. i = n && n[e];
  13714. return null == i ? this.getVisual(e) : i
  13715. }, t.prototype.hasItemVisual = function () {
  13716. return this._itemVisuals.length > 0
  13717. }, t.prototype.ensureUniqueItemVisual = function (t, e) {
  13718. var n = this._itemVisuals,
  13719. i = n[t];
  13720. i || (i = n[t] = {});
  13721. var r = i[e];
  13722. return null == r && (Y(r = this.getVisual(e)) ? r = r.slice() : ax(r) && (r = A({}, r)), i[e] = r), r
  13723. }, t.prototype.setItemVisual = function (t, e, n) {
  13724. var i = this._itemVisuals[t] || {};
  13725. this._itemVisuals[t] = i, ax(e) ? A(i, e) : i[e] = n
  13726. }, t.prototype.clearAllVisual = function () {
  13727. this._visual = {}, this._itemVisuals = []
  13728. }, t.prototype.setLayout = function (t, e) {
  13729. ax(t) ? A(this._layout, t) : this._layout[t] = e
  13730. }, t.prototype.getLayout = function (t) {
  13731. return this._layout[t]
  13732. }, t.prototype.getItemLayout = function (t) {
  13733. return this._itemLayouts[t]
  13734. }, t.prototype.setItemLayout = function (t, e, n) {
  13735. this._itemLayouts[t] = n ? A(this._itemLayouts[t] || {}, e) : e
  13736. }, t.prototype.clearItemLayouts = function () {
  13737. this._itemLayouts.length = 0
  13738. }, t.prototype.setItemGraphicEl = function (t, e) {
  13739. var n = this.hostModel && this.hostModel.seriesIndex;
  13740. ol(n, this.dataType, t, e), this._graphicEls[t] = e
  13741. }, t.prototype.getItemGraphicEl = function (t) {
  13742. return this._graphicEls[t]
  13743. }, t.prototype.eachItemGraphicEl = function (t, e) {
  13744. E(this._graphicEls, (function (n, i) {
  13745. n && t && t.call(e, n, i)
  13746. }))
  13747. }, t.prototype.cloneShallow = function (e) {
  13748. return e || (e = new t(this._schema ? this._schema : sx(this.dimensions, this._getDimInfo, this), this.hostModel)), ix(e, this), e._store = this._store, e
  13749. }, t.prototype.wrapMethod = function (t, e) {
  13750. var n = this[t];
  13751. X(n) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[t] = function () {
  13752. var t = n.apply(this, arguments);
  13753. return e.apply(this, [t].concat(at(arguments)))
  13754. })
  13755. }, t.internalField = (Qm = function (t) {
  13756. var e = t._invertedIndicesMap;
  13757. E(e, (function (n, i) {
  13758. var r = t._dimInfos[i],
  13759. o = r.ordinalMeta,
  13760. a = t._store;
  13761. if (o) {
  13762. n = e[i] = new lx(o.categories.length);
  13763. for (var s = 0; s < n.length; s++) n[s] = -1;
  13764. for (s = 0; s < a.count(); s++) n[a.get(r.storeDimIndex, s)] = s
  13765. }
  13766. }))
  13767. }, ex = function (t, e, n) {
  13768. return Ro(t._getCategory(e, n), null)
  13769. }, tx = function (t, e) {
  13770. var n = t._idList[e];
  13771. return null == n && null != t._idDimIdx && (n = ex(t, t._idDimIdx, e)), null == n && (n = "e\0\0" + e), n
  13772. }, nx = function (t) {
  13773. return Y(t) || (t = null != t ? [t] : []), t
  13774. }, rx = function (e) {
  13775. var n = new t(e._schema ? e._schema : sx(e.dimensions, e._getDimInfo, e), e.hostModel);
  13776. return ix(n, e), n
  13777. }, ix = function (t, e) {
  13778. E(ux.concat(e.__wrappedMethods || []), (function (n) {
  13779. e.hasOwnProperty(n) && (t[n] = e[n])
  13780. })), t.__wrappedMethods = e.__wrappedMethods, E(hx, (function (n) {
  13781. t[n] = T(e[n])
  13782. })), t._calculationInfo = A({}, e._calculationInfo)
  13783. }, void(ox = function (t, e) {
  13784. var n = t._nameList,
  13785. i = t._idList,
  13786. r = t._nameDimIdx,
  13787. o = t._idDimIdx,
  13788. a = n[e],
  13789. s = i[e];
  13790. if (null == a && null != r && (n[e] = a = ex(t, r, e)), null == s && null != o && (i[e] = s = ex(t, o, e)), null == s && null != a) {
  13791. var l = t._nameRepeatCount,
  13792. u = l[a] = (l[a] || 0) + 1;
  13793. s = a, u > 1 && (s += "__ec__" + u), i[e] = s
  13794. }
  13795. })), t
  13796. }();
  13797. function px(t, e) {
  13798. Qd(t) || (t = ef(t));
  13799. var n = (e = e || {}).coordDimensions || [],
  13800. i = e.dimensionsDefine || t.dimensionsDefine || [],
  13801. r = yt(),
  13802. o = [],
  13803. a = function (t, e, n, i) {
  13804. var r = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, i || 0);
  13805. return E(e, (function (t) {
  13806. var e;
  13807. q(t) && (e = t.dimsDef) && (r = Math.max(r, e.length))
  13808. })), r
  13809. }(t, n, i, e.dimensionsCount),
  13810. s = e.canOmitUnusedDimensions && Jm(a),
  13811. l = i === t.dimensionsDefine,
  13812. u = l ? $m(t) : Km(i),
  13813. h = e.encodeDefine;
  13814. !h && e.encodeDefaulter && (h = e.encodeDefaulter(t, a));
  13815. for (var c = yt(h), p = new Xf(a), d = 0; d < p.length; d++) p[d] = -1;
  13816. function f(t) {
  13817. var e = p[t];
  13818. if (e < 0) {
  13819. var n = i[t],
  13820. r = q(n) ? n : {
  13821. name: n
  13822. },
  13823. a = new Xm,
  13824. s = r.name;
  13825. null != s && null != u.get(s) && (a.name = a.displayName = s), null != r.type && (a.type = r.type), null != r.displayName && (a.displayName = r.displayName);
  13826. var l = o.length;
  13827. return p[t] = l, a.storeDimIndex = t, o.push(a), a
  13828. }
  13829. return o[e]
  13830. }
  13831. if (!s)
  13832. for (d = 0; d < a; d++) f(d);
  13833. c.each((function (t, e) {
  13834. var n = To(t).slice();
  13835. if (1 === n.length && !U(n[0]) && n[0] < 0) c.set(e, !1);
  13836. else {
  13837. var i = c.set(e, []);
  13838. E(n, (function (t, n) {
  13839. var r = U(t) ? u.get(t) : t;
  13840. null != r && r < a && (i[n] = r, y(f(r), e, n))
  13841. }))
  13842. }
  13843. }));
  13844. var g = 0;
  13845. function y(t, e, n) {
  13846. null != Gp.get(e) ? t.otherDims[e] = n : (t.coordDim = e, t.coordDimIndex = n, r.set(e, !0))
  13847. }
  13848. E(n, (function (t) {
  13849. var e, n, i, r;
  13850. if (U(t)) e = t, r = {};
  13851. else {
  13852. e = (r = t).name;
  13853. var o = r.ordinalMeta;
  13854. r.ordinalMeta = null, (r = A({}, r)).ordinalMeta = o, n = r.dimsDef, i = r.otherDims, r.name = r.coordDim = r.coordDimIndex = r.dimsDef = r.otherDims = null
  13855. }
  13856. var s = c.get(e);
  13857. if (!1 !== s) {
  13858. if (!(s = To(s)).length)
  13859. for (var u = 0; u < (n && n.length || 1); u++) {
  13860. for (; g < a && null != f(g).coordDim;) g++;
  13861. g < a && s.push(g++)
  13862. }
  13863. E(s, (function (t, o) {
  13864. var a = f(t);
  13865. if (l && null != r.type && (a.type = r.type), y(k(a, r), e, o), null == a.name && n) {
  13866. var s = n[o];
  13867. !q(s) && (s = {
  13868. name: s
  13869. }), a.name = a.displayName = s.name, a.defaultTooltip = s.defaultTooltip
  13870. }
  13871. i && k(a.otherDims, i)
  13872. }))
  13873. }
  13874. }));
  13875. var v = e.generateCoord,
  13876. m = e.generateCoordCount,
  13877. x = null != m;
  13878. m = v ? m || 1 : 0;
  13879. var _ = v || "value";
  13880. function b(t) {
  13881. null == t.name && (t.name = t.coordDim)
  13882. }
  13883. if (s) E(o, (function (t) {
  13884. b(t)
  13885. })), o.sort((function (t, e) {
  13886. return t.storeDimIndex - e.storeDimIndex
  13887. }));
  13888. else
  13889. for (var w = 0; w < a; w++) {
  13890. var S = f(w);
  13891. null == S.coordDim && (S.coordDim = dx(_, r, x), S.coordDimIndex = 0, (!v || m <= 0) && (S.isExtraCoord = !0), m--), b(S), null != S.type || id(t, w) !== Kp && (!S.isExtraCoord || null == S.otherDims.itemName && null == S.otherDims.seriesName) || (S.type = "ordinal")
  13892. }
  13893. return function (t) {
  13894. for (var e = yt(), n = 0; n < t.length; n++) {
  13895. var i = t[n],
  13896. r = i.name,
  13897. o = e.get(r) || 0;
  13898. o > 0 && (i.name = r + (o - 1)), o++, e.set(r, o)
  13899. }
  13900. }(o), new jm({
  13901. source: t,
  13902. dimensions: o,
  13903. fullDimensionCount: a,
  13904. dimensionOmitted: s
  13905. })
  13906. }
  13907. function dx(t, e, n) {
  13908. if (n || e.hasKey(t)) {
  13909. for (var i = 0; e.hasKey(t + i);) i++;
  13910. t += i
  13911. }
  13912. return e.set(t, !0), t
  13913. }
  13914. var fx = function (t) {
  13915. this.coordSysDims = [], this.axisMap = yt(), this.categoryAxisMap = yt(), this.coordSysName = t
  13916. };
  13917. var gx = {
  13918. cartesian2d: function (t, e, n, i) {
  13919. var r = t.getReferringComponents("xAxis", Wo).models[0],
  13920. o = t.getReferringComponents("yAxis", Wo).models[0];
  13921. e.coordSysDims = ["x", "y"], n.set("x", r), n.set("y", o), yx(r) && (i.set("x", r), e.firstCategoryDimIndex = 0), yx(o) && (i.set("y", o), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  13922. },
  13923. singleAxis: function (t, e, n, i) {
  13924. var r = t.getReferringComponents("singleAxis", Wo).models[0];
  13925. e.coordSysDims = ["single"], n.set("single", r), yx(r) && (i.set("single", r), e.firstCategoryDimIndex = 0)
  13926. },
  13927. polar: function (t, e, n, i) {
  13928. var r = t.getReferringComponents("polar", Wo).models[0],
  13929. o = r.findAxisModel("radiusAxis"),
  13930. a = r.findAxisModel("angleAxis");
  13931. e.coordSysDims = ["radius", "angle"], n.set("radius", o), n.set("angle", a), yx(o) && (i.set("radius", o), e.firstCategoryDimIndex = 0), yx(a) && (i.set("angle", a), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  13932. },
  13933. geo: function (t, e, n, i) {
  13934. e.coordSysDims = ["lng", "lat"]
  13935. },
  13936. parallel: function (t, e, n, i) {
  13937. var r = t.ecModel,
  13938. o = r.getComponent("parallel", t.get("parallelIndex")),
  13939. a = e.coordSysDims = o.dimensions.slice();
  13940. E(o.parallelAxisIndex, (function (t, o) {
  13941. var s = r.getComponent("parallelAxis", t),
  13942. l = a[o];
  13943. n.set(l, s), yx(s) && (i.set(l, s), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = o))
  13944. }))
  13945. }
  13946. };
  13947. function yx(t) {
  13948. return "category" === t.get("type")
  13949. }
  13950. function vx(t, e, n) {
  13951. var i, r, o, a = (n = n || {}).byIndex,
  13952. s = n.stackedCoordDimension;
  13953. ! function (t) {
  13954. return !qm(t.schema)
  13955. }(e) ? (r = e.schema, i = r.dimensions, o = e.store) : i = e;
  13956. var l, u, h, c, p = !(!t || !t.get("stack"));
  13957. if (E(i, (function (t, e) {
  13958. U(t) && (i[e] = t = {
  13959. name: t
  13960. }), p && !t.isExtraCoord && (a || l || !t.ordinalMeta || (l = t), u || "ordinal" === t.type || "time" === t.type || s && s !== t.coordDim || (u = t))
  13961. })), !u || a || l || (a = !0), u) {
  13962. h = "__\0ecstackresult_" + t.id, c = "__\0ecstackedover_" + t.id, l && (l.createInvertedIndices = !0);
  13963. var d = u.coordDim,
  13964. f = u.type,
  13965. g = 0;
  13966. E(i, (function (t) {
  13967. t.coordDim === d && g++
  13968. }));
  13969. var y = {
  13970. name: h,
  13971. coordDim: d,
  13972. coordDimIndex: g,
  13973. type: f,
  13974. isExtraCoord: !0,
  13975. isCalculationCoord: !0,
  13976. storeDimIndex: i.length
  13977. },
  13978. v = {
  13979. name: c,
  13980. coordDim: c,
  13981. coordDimIndex: g + 1,
  13982. type: f,
  13983. isExtraCoord: !0,
  13984. isCalculationCoord: !0,
  13985. storeDimIndex: i.length + 1
  13986. };
  13987. r ? (o && (y.storeDimIndex = o.ensureCalculationDimension(c, f), v.storeDimIndex = o.ensureCalculationDimension(h, f)), r.appendCalculationDimension(y), r.appendCalculationDimension(v)) : (i.push(y), i.push(v))
  13988. }
  13989. return {
  13990. stackedDimension: u && u.name,
  13991. stackedByDimension: l && l.name,
  13992. isStackedByIndex: a,
  13993. stackedOverDimension: c,
  13994. stackResultDimension: h
  13995. }
  13996. }
  13997. function mx(t, e) {
  13998. return !!e && e === t.getCalculationInfo("stackedDimension")
  13999. }
  14000. function xx(t, e) {
  14001. return mx(t, e) ? t.getCalculationInfo("stackResultDimension") : e
  14002. }
  14003. function _x(t, e, n) {
  14004. n = n || {};
  14005. var i, r = e.getSourceManager(),
  14006. o = !1;
  14007. t ? (o = !0, i = ef(t)) : o = (i = r.getSource()).sourceFormat === Wp;
  14008. var a = function (t) {
  14009. var e = t.get("coordinateSystem"),
  14010. n = new fx(e),
  14011. i = gx[e];
  14012. if (i) return i(t, n, n.axisMap, n.categoryAxisMap), n
  14013. }(e),
  14014. s = function (t, e) {
  14015. var n, i = t.get("coordinateSystem"),
  14016. r = wd.get(i);
  14017. return e && e.coordSysDims && (n = z(e.coordSysDims, (function (t) {
  14018. var n = {
  14019. name: t
  14020. },
  14021. i = e.axisMap.get(t);
  14022. if (i) {
  14023. var r = i.get("type");
  14024. n.type = Ym(r)
  14025. }
  14026. return n
  14027. }))), n || (n = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), n
  14028. }(e, a),
  14029. l = n.useEncodeDefaulter,
  14030. u = X(l) ? l : l ? H(td, s, e) : null,
  14031. h = px(i, {
  14032. coordDimensions: s,
  14033. generateCoord: n.generateCoord,
  14034. encodeDefine: e.getEncode(),
  14035. encodeDefaulter: u,
  14036. canOmitUnusedDimensions: !o
  14037. }),
  14038. c = function (t, e, n) {
  14039. var i, r;
  14040. return n && E(t, (function (t, o) {
  14041. var a = t.coordDim,
  14042. s = n.categoryAxisMap.get(a);
  14043. s && (null == i && (i = o), t.ordinalMeta = s.getOrdinalMeta(), e && (t.createInvertedIndices = !0)), null != t.otherDims.itemName && (r = !0)
  14044. })), r || null == i || (t[i].otherDims.itemName = 0), i
  14045. }(h.dimensions, n.createInvertedIndices, a),
  14046. p = o ? null : r.getSharedDataStore(h),
  14047. d = vx(e, {
  14048. schema: h,
  14049. store: p
  14050. }),
  14051. f = new cx(h, e);
  14052. f.setCalculationInfo(d);
  14053. var g = null != c && function (t) {
  14054. if (t.sourceFormat === Wp) {
  14055. var e = function (t) {
  14056. var e = 0;
  14057. for (; e < t.length && null == t[e];) e++;
  14058. return t[e]
  14059. }(t.data || []);
  14060. return !Y(Ao(e))
  14061. }
  14062. }(i) ? function (t, e, n, i) {
  14063. return i === c ? n : this.defaultDimValueGetter(t, e, n, i)
  14064. } : null;
  14065. return f.hasItemOption = !1, f.initData(o ? i : p, null, g), f
  14066. }
  14067. var bx = function () {
  14068. function t(t) {
  14069. this._setting = t || {}, this._extent = [1 / 0, -1 / 0]
  14070. }
  14071. return t.prototype.getSetting = function (t) {
  14072. return this._setting[t]
  14073. }, t.prototype.unionExtent = function (t) {
  14074. var e = this._extent;
  14075. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1])
  14076. }, t.prototype.unionExtentFromData = function (t, e) {
  14077. this.unionExtent(t.getApproximateExtent(e))
  14078. }, t.prototype.getExtent = function () {
  14079. return this._extent.slice()
  14080. }, t.prototype.setExtent = function (t, e) {
  14081. var n = this._extent;
  14082. isNaN(t) || (n[0] = t), isNaN(e) || (n[1] = e)
  14083. }, t.prototype.isInExtentRange = function (t) {
  14084. return this._extent[0] <= t && this._extent[1] >= t
  14085. }, t.prototype.isBlank = function () {
  14086. return this._isBlank
  14087. }, t.prototype.setBlank = function (t) {
  14088. this._isBlank = t
  14089. }, t
  14090. }();
  14091. na(bx);
  14092. var Sx = 0,
  14093. Mx = function () {
  14094. function t(t) {
  14095. this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this.uid = ++Sx
  14096. }
  14097. return t.createByAxisModel = function (e) {
  14098. var n = e.option,
  14099. i = n.data,
  14100. r = i && z(i, Ix);
  14101. return new t({
  14102. categories: r,
  14103. needCollect: !r,
  14104. deduplication: !1 !== n.dedplication
  14105. })
  14106. }, t.prototype.getOrdinal = function (t) {
  14107. return this._getOrCreateMap().get(t)
  14108. }, t.prototype.parseAndCollect = function (t) {
  14109. var e, n = this._needCollect;
  14110. if (!U(t) && !n) return t;
  14111. if (n && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
  14112. var i = this._getOrCreateMap();
  14113. return null == (e = i.get(t)) && (n ? (e = this.categories.length, this.categories[e] = t, i.set(t, e)) : e = NaN), e
  14114. }, t.prototype._getOrCreateMap = function () {
  14115. return this._map || (this._map = yt(this.categories))
  14116. }, t
  14117. }();
  14118. function Ix(t) {
  14119. return q(t) && null != t.value ? t.value : t + ""
  14120. }
  14121. function Tx(t) {
  14122. return "interval" === t.type || "log" === t.type
  14123. }
  14124. function Cx(t, e, n, i) {
  14125. var r = {},
  14126. o = t[1] - t[0],
  14127. a = r.interval = po(o / e, !0);
  14128. null != n && a < n && (a = r.interval = n), null != i && a > i && (a = r.interval = i);
  14129. var s = r.intervalPrecision = Ax(a);
  14130. return function (t, e) {
  14131. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), kx(t, 0, e), kx(t, 1, e), t[0] > t[1] && (t[0] = t[1])
  14132. }(r.niceTickExtent = [Jr(Math.ceil(t[0] / a) * a, s), Jr(Math.floor(t[1] / a) * a, s)], t), r
  14133. }
  14134. function Dx(t) {
  14135. var e = Math.pow(10, co(t)),
  14136. n = t / e;
  14137. return n ? 2 === n ? n = 3 : 3 === n ? n = 5 : n *= 2 : n = 1, Jr(n * e)
  14138. }
  14139. function Ax(t) {
  14140. return to(t) + 2
  14141. }
  14142. function kx(t, e, n) {
  14143. t[e] = Math.max(Math.min(t[e], n[1]), n[0])
  14144. }
  14145. function Lx(t, e) {
  14146. return t >= e[0] && t <= e[1]
  14147. }
  14148. function Px(t, e) {
  14149. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
  14150. }
  14151. function Ox(t, e) {
  14152. return t * (e[1] - e[0]) + e[0]
  14153. }
  14154. var Rx = function (t) {
  14155. function e(e) {
  14156. var n = t.call(this, e) || this;
  14157. n.type = "ordinal";
  14158. var i = n.getSetting("ordinalMeta");
  14159. return i || (i = new Mx({})), Y(i) && (i = new Mx({
  14160. categories: z(i, (function (t) {
  14161. return q(t) ? t.value : t
  14162. }))
  14163. })), n._ordinalMeta = i, n._extent = n.getSetting("extent") || [0, i.categories.length - 1], n
  14164. }
  14165. return n(e, t), e.prototype.parse = function (t) {
  14166. return null == t ? NaN : U(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t)
  14167. }, e.prototype.contain = function (t) {
  14168. return Lx(t = this.parse(t), this._extent) && null != this._ordinalMeta.categories[t]
  14169. }, e.prototype.normalize = function (t) {
  14170. return Px(t = this._getTickNumber(this.parse(t)), this._extent)
  14171. }, e.prototype.scale = function (t) {
  14172. return t = Math.round(Ox(t, this._extent)), this.getRawOrdinalNumber(t)
  14173. }, e.prototype.getTicks = function () {
  14174. for (var t = [], e = this._extent, n = e[0]; n <= e[1];) t.push({
  14175. value: n
  14176. }), n++;
  14177. return t
  14178. }, e.prototype.getMinorTicks = function (t) {}, e.prototype.setSortInfo = function (t) {
  14179. if (null != t) {
  14180. for (var e = t.ordinalNumbers, n = this._ordinalNumbersByTick = [], i = this._ticksByOrdinalNumber = [], r = 0, o = this._ordinalMeta.categories.length, a = Math.min(o, e.length); r < a; ++r) {
  14181. var s = e[r];
  14182. n[r] = s, i[s] = r
  14183. }
  14184. for (var l = 0; r < o; ++r) {
  14185. for (; null != i[l];) l++;
  14186. n.push(l), i[l] = r
  14187. }
  14188. } else this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null
  14189. }, e.prototype._getTickNumber = function (t) {
  14190. var e = this._ticksByOrdinalNumber;
  14191. return e && t >= 0 && t < e.length ? e[t] : t
  14192. }, e.prototype.getRawOrdinalNumber = function (t) {
  14193. var e = this._ordinalNumbersByTick;
  14194. return e && t >= 0 && t < e.length ? e[t] : t
  14195. }, e.prototype.getLabel = function (t) {
  14196. if (!this.isBlank()) {
  14197. var e = this.getRawOrdinalNumber(t.value),
  14198. n = this._ordinalMeta.categories[e];
  14199. return null == n ? "" : n + ""
  14200. }
  14201. }, e.prototype.count = function () {
  14202. return this._extent[1] - this._extent[0] + 1
  14203. }, e.prototype.unionExtentFromData = function (t, e) {
  14204. this.unionExtent(t.getApproximateExtent(e))
  14205. }, e.prototype.isInExtentRange = function (t) {
  14206. return t = this._getTickNumber(t), this._extent[0] <= t && this._extent[1] >= t
  14207. }, e.prototype.getOrdinalMeta = function () {
  14208. return this._ordinalMeta
  14209. }, e.prototype.calcNiceTicks = function () {}, e.prototype.calcNiceExtent = function () {}, e.type = "ordinal", e
  14210. }(bx);
  14211. bx.registerClass(Rx);
  14212. var Nx = Jr,
  14213. Ex = function (t) {
  14214. function e() {
  14215. var e = null !== t && t.apply(this, arguments) || this;
  14216. return e.type = "interval", e._interval = 0, e._intervalPrecision = 2, e
  14217. }
  14218. return n(e, t), e.prototype.parse = function (t) {
  14219. return t
  14220. }, e.prototype.contain = function (t) {
  14221. return Lx(t, this._extent)
  14222. }, e.prototype.normalize = function (t) {
  14223. return Px(t, this._extent)
  14224. }, e.prototype.scale = function (t) {
  14225. return Ox(t, this._extent)
  14226. }, e.prototype.setExtent = function (t, e) {
  14227. var n = this._extent;
  14228. isNaN(t) || (n[0] = parseFloat(t)), isNaN(e) || (n[1] = parseFloat(e))
  14229. }, e.prototype.unionExtent = function (t) {
  14230. var e = this._extent;
  14231. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), this.setExtent(e[0], e[1])
  14232. }, e.prototype.getInterval = function () {
  14233. return this._interval
  14234. }, e.prototype.setInterval = function (t) {
  14235. this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = Ax(t)
  14236. }, e.prototype.getTicks = function (t) {
  14237. var e = this._interval,
  14238. n = this._extent,
  14239. i = this._niceExtent,
  14240. r = this._intervalPrecision,
  14241. o = [];
  14242. if (!e) return o;
  14243. n[0] < i[0] && (t ? o.push({
  14244. value: Nx(i[0] - e, r)
  14245. }) : o.push({
  14246. value: n[0]
  14247. }));
  14248. for (var a = i[0]; a <= i[1] && (o.push({
  14249. value: a
  14250. }), (a = Nx(a + e, r)) !== o[o.length - 1].value);)
  14251. if (o.length > 1e4) return [];
  14252. var s = o.length ? o[o.length - 1].value : i[1];
  14253. return n[1] > s && (t ? o.push({
  14254. value: Nx(s + e, r)
  14255. }) : o.push({
  14256. value: n[1]
  14257. })), o
  14258. }, e.prototype.getMinorTicks = function (t) {
  14259. for (var e = this.getTicks(!0), n = [], i = this.getExtent(), r = 1; r < e.length; r++) {
  14260. for (var o = e[r], a = e[r - 1], s = 0, l = [], u = (o.value - a.value) / t; s < t - 1;) {
  14261. var h = Nx(a.value + (s + 1) * u);
  14262. h > i[0] && h < i[1] && l.push(h), s++
  14263. }
  14264. n.push(l)
  14265. }
  14266. return n
  14267. }, e.prototype.getLabel = function (t, e) {
  14268. if (null == t) return "";
  14269. var n = e && e.precision;
  14270. return null == n ? n = to(t.value) || 0 : "auto" === n && (n = this._intervalPrecision), gp(Nx(t.value, n, !0))
  14271. }, e.prototype.calcNiceTicks = function (t, e, n) {
  14272. t = t || 5;
  14273. var i = this._extent,
  14274. r = i[1] - i[0];
  14275. if (isFinite(r)) {
  14276. r < 0 && (r = -r, i.reverse());
  14277. var o = Cx(i, t, e, n);
  14278. this._intervalPrecision = o.intervalPrecision, this._interval = o.interval, this._niceExtent = o.niceTickExtent
  14279. }
  14280. }, e.prototype.calcNiceExtent = function (t) {
  14281. var e = this._extent;
  14282. if (e[0] === e[1])
  14283. if (0 !== e[0]) {
  14284. var n = Math.abs(e[0]);
  14285. t.fixMax || (e[1] += n / 2), e[0] -= n / 2
  14286. } else e[1] = 1;
  14287. var i = e[1] - e[0];
  14288. isFinite(i) || (e[0] = 0, e[1] = 1), this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  14289. var r = this._interval;
  14290. t.fixMin || (e[0] = Nx(Math.floor(e[0] / r) * r)), t.fixMax || (e[1] = Nx(Math.ceil(e[1] / r) * r))
  14291. }, e.prototype.setNiceExtent = function (t, e) {
  14292. this._niceExtent = [t, e]
  14293. }, e.type = "interval", e
  14294. }(bx);
  14295. bx.registerClass(Ex);
  14296. var zx = "undefined" != typeof Float32Array,
  14297. Vx = zx ? Float32Array : Array;
  14298. function Bx(t) {
  14299. return Y(t) ? zx ? new Float32Array(t) : t : new Vx(t)
  14300. }
  14301. var Fx = "__ec_stack_";
  14302. function Gx(t) {
  14303. return t.get("stack") || Fx + t.seriesIndex
  14304. }
  14305. function Wx(t) {
  14306. return t.dim + t.index
  14307. }
  14308. function Hx(t, e) {
  14309. var n = [];
  14310. return e.eachSeriesByType(t, (function (t) {
  14311. jx(t) && n.push(t)
  14312. })), n
  14313. }
  14314. function Yx(t) {
  14315. var e = function (t) {
  14316. var e = {};
  14317. E(t, (function (t) {
  14318. var n = t.coordinateSystem.getBaseAxis();
  14319. if ("time" === n.type || "value" === n.type)
  14320. for (var i = t.getData(), r = n.dim + "_" + n.index, o = i.getDimensionIndex(i.mapDimension(n.dim)), a = i.getStore(), s = 0, l = a.count(); s < l; ++s) {
  14321. var u = a.get(o, s);
  14322. e[r] ? e[r].push(u) : e[r] = [u]
  14323. }
  14324. }));
  14325. var n = {};
  14326. for (var i in e)
  14327. if (e.hasOwnProperty(i)) {
  14328. var r = e[i];
  14329. if (r) {
  14330. r.sort((function (t, e) {
  14331. return t - e
  14332. }));
  14333. for (var o = null, a = 1; a < r.length; ++a) {
  14334. var s = r[a] - r[a - 1];
  14335. s > 0 && (o = null === o ? s : Math.min(o, s))
  14336. }
  14337. n[i] = o
  14338. }
  14339. } return n
  14340. }(t),
  14341. n = [];
  14342. return E(t, (function (t) {
  14343. var i, r = t.coordinateSystem.getBaseAxis(),
  14344. o = r.getExtent();
  14345. if ("category" === r.type) i = r.getBandWidth();
  14346. else if ("value" === r.type || "time" === r.type) {
  14347. var a = r.dim + "_" + r.index,
  14348. s = e[a],
  14349. l = Math.abs(o[1] - o[0]),
  14350. u = r.scale.getExtent(),
  14351. h = Math.abs(u[1] - u[0]);
  14352. i = s ? l / h * s : l
  14353. } else {
  14354. var c = t.getData();
  14355. i = Math.abs(o[1] - o[0]) / c.count()
  14356. }
  14357. var p = $r(t.get("barWidth"), i),
  14358. d = $r(t.get("barMaxWidth"), i),
  14359. f = $r(t.get("barMinWidth") || (qx(t) ? .5 : 1), i),
  14360. g = t.get("barGap"),
  14361. y = t.get("barCategoryGap");
  14362. n.push({
  14363. bandWidth: i,
  14364. barWidth: p,
  14365. barMaxWidth: d,
  14366. barMinWidth: f,
  14367. barGap: g,
  14368. barCategoryGap: y,
  14369. axisKey: Wx(r),
  14370. stackId: Gx(t)
  14371. })
  14372. })), Xx(n)
  14373. }
  14374. function Xx(t) {
  14375. var e = {};
  14376. E(t, (function (t, n) {
  14377. var i = t.axisKey,
  14378. r = t.bandWidth,
  14379. o = e[i] || {
  14380. bandWidth: r,
  14381. remainedWidth: r,
  14382. autoWidthCount: 0,
  14383. categoryGap: null,
  14384. gap: "20%",
  14385. stacks: {}
  14386. },
  14387. a = o.stacks;
  14388. e[i] = o;
  14389. var s = t.stackId;
  14390. a[s] || o.autoWidthCount++, a[s] = a[s] || {
  14391. width: 0,
  14392. maxWidth: 0
  14393. };
  14394. var l = t.barWidth;
  14395. l && !a[s].width && (a[s].width = l, l = Math.min(o.remainedWidth, l), o.remainedWidth -= l);
  14396. var u = t.barMaxWidth;
  14397. u && (a[s].maxWidth = u);
  14398. var h = t.barMinWidth;
  14399. h && (a[s].minWidth = h);
  14400. var c = t.barGap;
  14401. null != c && (o.gap = c);
  14402. var p = t.barCategoryGap;
  14403. null != p && (o.categoryGap = p)
  14404. }));
  14405. var n = {};
  14406. return E(e, (function (t, e) {
  14407. n[e] = {};
  14408. var i = t.stacks,
  14409. r = t.bandWidth,
  14410. o = t.categoryGap;
  14411. if (null == o) {
  14412. var a = G(i).length;
  14413. o = Math.max(35 - 4 * a, 15) + "%"
  14414. }
  14415. var s = $r(o, r),
  14416. l = $r(t.gap, 1),
  14417. u = t.remainedWidth,
  14418. h = t.autoWidthCount,
  14419. c = (u - s) / (h + (h - 1) * l);
  14420. c = Math.max(c, 0), E(i, (function (t) {
  14421. var e = t.maxWidth,
  14422. n = t.minWidth;
  14423. if (t.width) {
  14424. i = t.width;
  14425. e && (i = Math.min(i, e)), n && (i = Math.max(i, n)), t.width = i, u -= i + l * i, h--
  14426. } else {
  14427. var i = c;
  14428. e && e < i && (i = Math.min(e, u)), n && n > i && (i = n), i !== c && (t.width = i, u -= i + l * i, h--)
  14429. }
  14430. })), c = (u - s) / (h + (h - 1) * l), c = Math.max(c, 0);
  14431. var p, d = 0;
  14432. E(i, (function (t, e) {
  14433. t.width || (t.width = c), p = t, d += t.width * (1 + l)
  14434. })), p && (d -= p.width * l);
  14435. var f = -d / 2;
  14436. E(i, (function (t, i) {
  14437. n[e][i] = n[e][i] || {
  14438. bandWidth: r,
  14439. offset: f,
  14440. width: t.width
  14441. }, f += t.width * (1 + l)
  14442. }))
  14443. })), n
  14444. }
  14445. function Ux(t, e) {
  14446. var n = Hx(t, e),
  14447. i = Yx(n);
  14448. E(n, (function (t) {
  14449. var e = t.getData(),
  14450. n = t.coordinateSystem.getBaseAxis(),
  14451. r = Gx(t),
  14452. o = i[Wx(n)][r],
  14453. a = o.offset,
  14454. s = o.width;
  14455. e.setLayout({
  14456. bandWidth: o.bandWidth,
  14457. offset: a,
  14458. size: s
  14459. })
  14460. }))
  14461. }
  14462. function Zx(t) {
  14463. return {
  14464. seriesType: t,
  14465. plan: kg(),
  14466. reset: function (t) {
  14467. if (jx(t)) {
  14468. var e = t.getData(),
  14469. n = t.coordinateSystem,
  14470. i = n.getBaseAxis(),
  14471. r = n.getOtherAxis(i),
  14472. o = e.getDimensionIndex(e.mapDimension(r.dim)),
  14473. a = e.getDimensionIndex(e.mapDimension(i.dim)),
  14474. s = t.get("showBackground", !0),
  14475. l = e.mapDimension(r.dim),
  14476. u = e.getCalculationInfo("stackResultDimension"),
  14477. h = mx(e, l) && !!e.getCalculationInfo("stackedOnSeries"),
  14478. c = r.isHorizontal(),
  14479. p = function (t, e) {
  14480. return e.toGlobalCoord(e.dataToCoord("log" === e.type ? 1 : 0))
  14481. }(0, r),
  14482. d = qx(t),
  14483. f = t.get("barMinHeight") || 0,
  14484. g = u && e.getDimensionIndex(u),
  14485. y = e.getLayout("size"),
  14486. v = e.getLayout("offset");
  14487. return {
  14488. progress: function (t, e) {
  14489. for (var i, r = t.count, l = d && Bx(3 * r), u = d && s && Bx(3 * r), m = d && Bx(r), x = n.master.getRect(), _ = c ? x.width : x.height, b = e.getStore(), w = 0; null != (i = t.next());) {
  14490. var S = b.get(h ? g : o, i),
  14491. M = b.get(a, i),
  14492. I = p,
  14493. T = void 0;
  14494. h && (T = +S - b.get(o, i));
  14495. var C = void 0,
  14496. D = void 0,
  14497. A = void 0,
  14498. k = void 0;
  14499. if (c) {
  14500. var L = n.dataToPoint([S, M]);
  14501. if (h) I = n.dataToPoint([T, M])[0];
  14502. C = I, D = L[1] + v, A = L[0] - I, k = y, Math.abs(A) < f && (A = (A < 0 ? -1 : 1) * f)
  14503. } else {
  14504. L = n.dataToPoint([M, S]);
  14505. if (h) I = n.dataToPoint([M, T])[1];
  14506. C = L[0] + v, D = I, A = y, k = L[1] - I, Math.abs(k) < f && (k = (k <= 0 ? -1 : 1) * f)
  14507. }
  14508. d ? (l[w] = C, l[w + 1] = D, l[w + 2] = c ? A : k, u && (u[w] = c ? x.x : C, u[w + 1] = c ? D : x.y, u[w + 2] = _), m[i] = i) : e.setItemLayout(i, {
  14509. x: C,
  14510. y: D,
  14511. width: A,
  14512. height: k
  14513. }), w += 3
  14514. }
  14515. d && e.setLayout({
  14516. largePoints: l,
  14517. largeDataIndices: m,
  14518. largeBackgroundPoints: u,
  14519. valueAxisHorizontal: c
  14520. })
  14521. }
  14522. }
  14523. }
  14524. }
  14525. }
  14526. }
  14527. function jx(t) {
  14528. return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
  14529. }
  14530. function qx(t) {
  14531. return t.pipelineContext && t.pipelineContext.large
  14532. }
  14533. var Kx = function (t) {
  14534. function e(e) {
  14535. var n = t.call(this, e) || this;
  14536. return n.type = "time", n
  14537. }
  14538. return n(e, t), e.prototype.getLabel = function (t) {
  14539. var e = this.getSetting("useUTC");
  14540. return Jc(t.value, Uc[function (t) {
  14541. switch (t) {
  14542. case "year":
  14543. case "month":
  14544. return "day";
  14545. case "millisecond":
  14546. return "millisecond";
  14547. default:
  14548. return "second"
  14549. }
  14550. }(Kc(this._minLevelUnit))] || Uc.second, e, this.getSetting("locale"))
  14551. }, e.prototype.getFormattedLabel = function (t, e, n) {
  14552. var i = this.getSetting("useUTC");
  14553. return function (t, e, n, i, r) {
  14554. var o = null;
  14555. if (U(n)) o = n;
  14556. else if (X(n)) o = n(t.value, e, {
  14557. level: t.level
  14558. });
  14559. else {
  14560. var a = A({}, Yc);
  14561. if (t.level > 0)
  14562. for (var s = 0; s < Zc.length; ++s) a[Zc[s]] = "{primary|" + a[Zc[s]] + "}";
  14563. var l = n ? !1 === n.inherit ? n : k(n, a) : a,
  14564. u = Qc(t.value, r);
  14565. if (l[u]) o = l[u];
  14566. else if (l.inherit) {
  14567. for (s = jc.indexOf(u) - 1; s >= 0; --s)
  14568. if (l[u]) {
  14569. o = l[u];
  14570. break
  14571. } o = o || a.none
  14572. }
  14573. if (Y(o)) {
  14574. var h = null == t.level ? 0 : t.level >= 0 ? t.level : o.length + t.level;
  14575. o = o[h = Math.min(h, o.length - 1)]
  14576. }
  14577. }
  14578. return Jc(new Date(t.value), o, r, i)
  14579. }(t, e, n, this.getSetting("locale"), i)
  14580. }, e.prototype.getTicks = function () {
  14581. var t = this._interval,
  14582. e = this._extent,
  14583. n = [];
  14584. if (!t) return n;
  14585. n.push({
  14586. value: e[0],
  14587. level: 0
  14588. });
  14589. var i = this.getSetting("useUTC"),
  14590. r = function (t, e, n, i) {
  14591. var r = 1e4,
  14592. o = jc,
  14593. a = 0;
  14594. function s(t, e, n, r, o, a, s) {
  14595. for (var l = new Date(e), u = e, h = l[r](); u < n && u <= i[1];) s.push({
  14596. value: u
  14597. }), h += t, l[o](h), u = l.getTime();
  14598. s.push({
  14599. value: u,
  14600. notAdd: !0
  14601. })
  14602. }
  14603. function l(t, r, o) {
  14604. var a = [],
  14605. l = !r.length;
  14606. if (! function (t, e, n, i) {
  14607. var r = uo(e),
  14608. o = uo(n),
  14609. a = function (t) {
  14610. return tp(r, t, i) === tp(o, t, i)
  14611. },
  14612. s = function () {
  14613. return a("year")
  14614. },
  14615. l = function () {
  14616. return s() && a("month")
  14617. },
  14618. u = function () {
  14619. return l() && a("day")
  14620. },
  14621. h = function () {
  14622. return u() && a("hour")
  14623. },
  14624. c = function () {
  14625. return h() && a("minute")
  14626. },
  14627. p = function () {
  14628. return c() && a("second")
  14629. },
  14630. d = function () {
  14631. return p() && a("millisecond")
  14632. };
  14633. switch (t) {
  14634. case "year":
  14635. return s();
  14636. case "month":
  14637. return l();
  14638. case "day":
  14639. return u();
  14640. case "hour":
  14641. return h();
  14642. case "minute":
  14643. return c();
  14644. case "second":
  14645. return p();
  14646. case "millisecond":
  14647. return d()
  14648. }
  14649. }(Kc(t), i[0], i[1], n)) {
  14650. l && (r = [{
  14651. value: i_(new Date(i[0]), t, n)
  14652. }, {
  14653. value: i[1]
  14654. }]);
  14655. for (var u = 0; u < r.length - 1; u++) {
  14656. var h = r[u].value,
  14657. c = r[u + 1].value;
  14658. if (h !== c) {
  14659. var p = void 0,
  14660. d = void 0,
  14661. f = void 0,
  14662. g = !1;
  14663. switch (t) {
  14664. case "year":
  14665. p = Math.max(1, Math.round(e / Wc / 365)), d = ep(n), f = lp(n);
  14666. break;
  14667. case "half-year":
  14668. case "quarter":
  14669. case "month":
  14670. p = Qx(e), d = np(n), f = up(n);
  14671. break;
  14672. case "week":
  14673. case "half-week":
  14674. case "day":
  14675. p = Jx(e), d = ip(n), f = hp(n), g = !0;
  14676. break;
  14677. case "half-day":
  14678. case "quarter-day":
  14679. case "hour":
  14680. p = t_(e), d = rp(n), f = cp(n);
  14681. break;
  14682. case "minute":
  14683. p = e_(e, !0), d = op(n), f = pp(n);
  14684. break;
  14685. case "second":
  14686. p = e_(e, !1), d = ap(n), f = dp(n);
  14687. break;
  14688. case "millisecond":
  14689. p = n_(e), d = sp(n), f = fp(n)
  14690. }
  14691. s(p, h, c, d, f, g, a), "year" === t && o.length > 1 && 0 === u && o.unshift({
  14692. value: o[0].value - p
  14693. })
  14694. }
  14695. }
  14696. for (u = 0; u < a.length; u++) o.push(a[u]);
  14697. return a
  14698. }
  14699. }
  14700. for (var u = [], h = [], c = 0, p = 0, d = 0; d < o.length && a++ < r; ++d) {
  14701. var f = Kc(o[d]);
  14702. if ($c(o[d]))
  14703. if (l(o[d], u[u.length - 1] || [], h), f !== (o[d + 1] ? Kc(o[d + 1]) : null)) {
  14704. if (h.length) {
  14705. p = c, h.sort((function (t, e) {
  14706. return t.value - e.value
  14707. }));
  14708. for (var g = [], y = 0; y < h.length; ++y) {
  14709. var v = h[y].value;
  14710. 0 !== y && h[y - 1].value === v || (g.push(h[y]), v >= i[0] && v <= i[1] && c++)
  14711. }
  14712. var m = (i[1] - i[0]) / e;
  14713. if (c > 1.5 * m && p > m / 1.5) break;
  14714. if (u.push(g), c > m || t === o[d]) break
  14715. }
  14716. h = []
  14717. }
  14718. }
  14719. 0;
  14720. var x = B(z(u, (function (t) {
  14721. return B(t, (function (t) {
  14722. return t.value >= i[0] && t.value <= i[1] && !t.notAdd
  14723. }))
  14724. })), (function (t) {
  14725. return t.length > 0
  14726. })),
  14727. _ = [],
  14728. b = x.length - 1;
  14729. for (d = 0; d < x.length; ++d)
  14730. for (var w = x[d], S = 0; S < w.length; ++S) _.push({
  14731. value: w[S].value,
  14732. level: b - d
  14733. });
  14734. _.sort((function (t, e) {
  14735. return t.value - e.value
  14736. }));
  14737. var M = [];
  14738. for (d = 0; d < _.length; ++d) 0 !== d && _[d].value === _[d - 1].value || M.push(_[d]);
  14739. return M
  14740. }(this._minLevelUnit, this._approxInterval, i, e);
  14741. return (n = n.concat(r)).push({
  14742. value: e[1],
  14743. level: 0
  14744. }), n
  14745. }, e.prototype.calcNiceExtent = function (t) {
  14746. var e = this._extent;
  14747. if (e[0] === e[1] && (e[0] -= Wc, e[1] += Wc), e[1] === -1 / 0 && e[0] === 1 / 0) {
  14748. var n = new Date;
  14749. e[1] = +new Date(n.getFullYear(), n.getMonth(), n.getDate()), e[0] = e[1] - Wc
  14750. }
  14751. this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval)
  14752. }, e.prototype.calcNiceTicks = function (t, e, n) {
  14753. t = t || 10;
  14754. var i = this._extent,
  14755. r = i[1] - i[0];
  14756. this._approxInterval = r / t, null != e && this._approxInterval < e && (this._approxInterval = e), null != n && this._approxInterval > n && (this._approxInterval = n);
  14757. var o = $x.length,
  14758. a = Math.min(function (t, e, n, i) {
  14759. for (; n < i;) {
  14760. var r = n + i >>> 1;
  14761. t[r][1] < e ? n = r + 1 : i = r
  14762. }
  14763. return n
  14764. }($x, this._approxInterval, 0, o), o - 1);
  14765. this._interval = $x[a][1], this._minLevelUnit = $x[Math.max(a - 1, 0)][0]
  14766. }, e.prototype.parse = function (t) {
  14767. return j(t) ? t : +uo(t)
  14768. }, e.prototype.contain = function (t) {
  14769. return Lx(this.parse(t), this._extent)
  14770. }, e.prototype.normalize = function (t) {
  14771. return Px(this.parse(t), this._extent)
  14772. }, e.prototype.scale = function (t) {
  14773. return Ox(t, this._extent)
  14774. }, e.type = "time", e
  14775. }(Ex),
  14776. $x = [
  14777. ["second", Bc],
  14778. ["minute", Fc],
  14779. ["hour", Gc],
  14780. ["quarter-day", 216e5],
  14781. ["half-day", 432e5],
  14782. ["day", 10368e4],
  14783. ["half-week", 3024e5],
  14784. ["week", 6048e5],
  14785. ["month", 26784e5],
  14786. ["quarter", 8208e6],
  14787. ["half-year", Hc / 2],
  14788. ["year", Hc]
  14789. ];
  14790. function Jx(t, e) {
  14791. return (t /= Wc) > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1
  14792. }
  14793. function Qx(t) {
  14794. return (t /= 2592e6) > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1
  14795. }
  14796. function t_(t) {
  14797. return (t /= Gc) > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1
  14798. }
  14799. function e_(t, e) {
  14800. return (t /= e ? Fc : Bc) > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1
  14801. }
  14802. function n_(t) {
  14803. return po(t, !0)
  14804. }
  14805. function i_(t, e, n) {
  14806. var i = new Date(t);
  14807. switch (Kc(e)) {
  14808. case "year":
  14809. case "month":
  14810. i[up(n)](0);
  14811. case "day":
  14812. i[hp(n)](1);
  14813. case "hour":
  14814. i[cp(n)](0);
  14815. case "minute":
  14816. i[pp(n)](0);
  14817. case "second":
  14818. i[dp(n)](0), i[fp(n)](0)
  14819. }
  14820. return i.getTime()
  14821. }
  14822. bx.registerClass(Kx);
  14823. var r_ = bx.prototype,
  14824. o_ = Ex.prototype,
  14825. a_ = Jr,
  14826. s_ = Math.floor,
  14827. l_ = Math.ceil,
  14828. u_ = Math.pow,
  14829. h_ = Math.log,
  14830. c_ = function (t) {
  14831. function e() {
  14832. var e = null !== t && t.apply(this, arguments) || this;
  14833. return e.type = "log", e.base = 10, e._originalScale = new Ex, e._interval = 0, e
  14834. }
  14835. return n(e, t), e.prototype.getTicks = function (t) {
  14836. var e = this._originalScale,
  14837. n = this._extent,
  14838. i = e.getExtent();
  14839. return z(o_.getTicks.call(this, t), (function (t) {
  14840. var e = t.value,
  14841. r = Jr(u_(this.base, e));
  14842. return r = e === n[0] && this._fixMin ? d_(r, i[0]) : r, {
  14843. value: r = e === n[1] && this._fixMax ? d_(r, i[1]) : r
  14844. }
  14845. }), this)
  14846. }, e.prototype.setExtent = function (t, e) {
  14847. var n = h_(this.base);
  14848. t = h_(Math.max(0, t)) / n, e = h_(Math.max(0, e)) / n, o_.setExtent.call(this, t, e)
  14849. }, e.prototype.getExtent = function () {
  14850. var t = this.base,
  14851. e = r_.getExtent.call(this);
  14852. e[0] = u_(t, e[0]), e[1] = u_(t, e[1]);
  14853. var n = this._originalScale.getExtent();
  14854. return this._fixMin && (e[0] = d_(e[0], n[0])), this._fixMax && (e[1] = d_(e[1], n[1])), e
  14855. }, e.prototype.unionExtent = function (t) {
  14856. this._originalScale.unionExtent(t);
  14857. var e = this.base;
  14858. t[0] = h_(t[0]) / h_(e), t[1] = h_(t[1]) / h_(e), r_.unionExtent.call(this, t)
  14859. }, e.prototype.unionExtentFromData = function (t, e) {
  14860. this.unionExtent(t.getApproximateExtent(e))
  14861. }, e.prototype.calcNiceTicks = function (t) {
  14862. t = t || 10;
  14863. var e = this._extent,
  14864. n = e[1] - e[0];
  14865. if (!(n === 1 / 0 || n <= 0)) {
  14866. var i = ho(n);
  14867. for (t / n * i <= .5 && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0;) i *= 10;
  14868. var r = [Jr(l_(e[0] / i) * i), Jr(s_(e[1] / i) * i)];
  14869. this._interval = i, this._niceExtent = r
  14870. }
  14871. }, e.prototype.calcNiceExtent = function (t) {
  14872. o_.calcNiceExtent.call(this, t), this._fixMin = t.fixMin, this._fixMax = t.fixMax
  14873. }, e.prototype.parse = function (t) {
  14874. return t
  14875. }, e.prototype.contain = function (t) {
  14876. return Lx(t = h_(t) / h_(this.base), this._extent)
  14877. }, e.prototype.normalize = function (t) {
  14878. return Px(t = h_(t) / h_(this.base), this._extent)
  14879. }, e.prototype.scale = function (t) {
  14880. return t = Ox(t, this._extent), u_(this.base, t)
  14881. }, e.type = "log", e
  14882. }(bx),
  14883. p_ = c_.prototype;
  14884. function d_(t, e) {
  14885. return a_(t, to(e))
  14886. }
  14887. p_.getMinorTicks = o_.getMinorTicks, p_.getLabel = o_.getLabel, bx.registerClass(c_);
  14888. var f_ = function () {
  14889. function t(t, e, n) {
  14890. this._prepareParams(t, e, n)
  14891. }
  14892. return t.prototype._prepareParams = function (t, e, n) {
  14893. n[1] < n[0] && (n = [NaN, NaN]), this._dataMin = n[0], this._dataMax = n[1];
  14894. var i = this._isOrdinal = "ordinal" === t.type;
  14895. this._needCrossZero = "interval" === t.type && e.getNeedCrossZero && e.getNeedCrossZero();
  14896. var r = this._modelMinRaw = e.get("min", !0);
  14897. X(r) ? this._modelMinNum = m_(t, r({
  14898. min: n[0],
  14899. max: n[1]
  14900. })) : "dataMin" !== r && (this._modelMinNum = m_(t, r));
  14901. var o = this._modelMaxRaw = e.get("max", !0);
  14902. if (X(o) ? this._modelMaxNum = m_(t, o({
  14903. min: n[0],
  14904. max: n[1]
  14905. })) : "dataMax" !== o && (this._modelMaxNum = m_(t, o)), i) this._axisDataLen = e.getCategories().length;
  14906. else {
  14907. var a = e.get("boundaryGap"),
  14908. s = Y(a) ? a : [a || 0, a || 0];
  14909. "boolean" == typeof s[0] || "boolean" == typeof s[1] ? this._boundaryGapInner = [0, 0] : this._boundaryGapInner = [Cr(s[0], 1), Cr(s[1], 1)]
  14910. }
  14911. }, t.prototype.calculate = function () {
  14912. var t = this._isOrdinal,
  14913. e = this._dataMin,
  14914. n = this._dataMax,
  14915. i = this._axisDataLen,
  14916. r = this._boundaryGapInner,
  14917. o = t ? null : n - e || Math.abs(e),
  14918. a = "dataMin" === this._modelMinRaw ? e : this._modelMinNum,
  14919. s = "dataMax" === this._modelMaxRaw ? n : this._modelMaxNum,
  14920. l = null != a,
  14921. u = null != s;
  14922. null == a && (a = t ? i ? 0 : NaN : e - r[0] * o), null == s && (s = t ? i ? i - 1 : NaN : n + r[1] * o), (null == a || !isFinite(a)) && (a = NaN), (null == s || !isFinite(s)) && (s = NaN);
  14923. var h = nt(a) || nt(s) || t && !i;
  14924. this._needCrossZero && (a > 0 && s > 0 && !l && (a = 0), a < 0 && s < 0 && !u && (s = 0));
  14925. var c = this._determinedMin,
  14926. p = this._determinedMax;
  14927. return null != c && (a = c, l = !0), null != p && (s = p, u = !0), {
  14928. min: a,
  14929. max: s,
  14930. minFixed: l,
  14931. maxFixed: u,
  14932. isBlank: h
  14933. }
  14934. }, t.prototype.modifyDataMinMax = function (t, e) {
  14935. this[y_[t]] = e
  14936. }, t.prototype.setDeterminedMinMax = function (t, e) {
  14937. var n = g_[t];
  14938. this[n] = e
  14939. }, t.prototype.freeze = function () {
  14940. this.frozen = !0
  14941. }, t
  14942. }(),
  14943. g_ = {
  14944. min: "_determinedMin",
  14945. max: "_determinedMax"
  14946. },
  14947. y_ = {
  14948. min: "_dataMin",
  14949. max: "_dataMax"
  14950. };
  14951. function v_(t, e, n) {
  14952. var i = t.rawExtentInfo;
  14953. return i || (i = new f_(t, e, n), t.rawExtentInfo = i, i)
  14954. }
  14955. function m_(t, e) {
  14956. return null == e ? null : nt(e) ? NaN : t.parse(e)
  14957. }
  14958. function x_(t, e) {
  14959. var n = t.type,
  14960. i = v_(t, e, t.getExtent()).calculate();
  14961. t.setBlank(i.isBlank);
  14962. var r = i.min,
  14963. o = i.max,
  14964. a = e.ecModel;
  14965. if (a && "time" === n) {
  14966. var s = Hx("bar", a),
  14967. l = !1;
  14968. if (E(s, (function (t) {
  14969. l = l || t.getBaseAxis() === e.axis
  14970. })), l) {
  14971. var u = Yx(s),
  14972. h = function (t, e, n, i) {
  14973. var r = n.axis.getExtent(),
  14974. o = r[1] - r[0],
  14975. a = function (t, e, n) {
  14976. if (t && e) {
  14977. var i = t[Wx(e)];
  14978. return null != i && null != n ? i[Gx(n)] : i
  14979. }
  14980. }(i, n.axis);
  14981. if (void 0 === a) return {
  14982. min: t,
  14983. max: e
  14984. };
  14985. var s = 1 / 0;
  14986. E(a, (function (t) {
  14987. s = Math.min(t.offset, s)
  14988. }));
  14989. var l = -1 / 0;
  14990. E(a, (function (t) {
  14991. l = Math.max(t.offset + t.width, l)
  14992. })), s = Math.abs(s), l = Math.abs(l);
  14993. var u = s + l,
  14994. h = e - t,
  14995. c = h / (1 - (s + l) / o) - h;
  14996. return e += c * (l / u), t -= c * (s / u), {
  14997. min: t,
  14998. max: e
  14999. }
  15000. }(r, o, e, u);
  15001. r = h.min, o = h.max
  15002. }
  15003. }
  15004. return {
  15005. extent: [r, o],
  15006. fixMin: i.minFixed,
  15007. fixMax: i.maxFixed
  15008. }
  15009. }
  15010. function __(t, e) {
  15011. var n = e,
  15012. i = x_(t, n),
  15013. r = i.extent,
  15014. o = n.get("splitNumber");
  15015. t instanceof c_ && (t.base = n.get("logBase"));
  15016. var a = t.type,
  15017. s = n.get("interval"),
  15018. l = "interval" === a || "time" === a;
  15019. t.setExtent(r[0], r[1]), t.calcNiceExtent({
  15020. splitNumber: o,
  15021. fixMin: i.fixMin,
  15022. fixMax: i.fixMax,
  15023. minInterval: l ? n.get("minInterval") : null,
  15024. maxInterval: l ? n.get("maxInterval") : null
  15025. }), null != s && t.setInterval && t.setInterval(s)
  15026. }
  15027. function b_(t, e) {
  15028. if (e = e || t.get("type")) switch (e) {
  15029. case "category":
  15030. return new Rx({
  15031. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  15032. extent: [1 / 0, -1 / 0]
  15033. });
  15034. case "time":
  15035. return new Kx({
  15036. locale: t.ecModel.getLocaleModel(),
  15037. useUTC: t.ecModel.get("useUTC")
  15038. });
  15039. default:
  15040. return new(bx.getClass(e) || Ex)
  15041. }
  15042. }
  15043. function w_(t) {
  15044. var e, n, i = t.getLabelModel().get("formatter"),
  15045. r = "category" === t.type ? t.scale.getExtent()[0] : null;
  15046. return "time" === t.scale.type ? (n = i, function (e, i) {
  15047. return t.scale.getFormattedLabel(e, i, n)
  15048. }) : U(i) ? function (e) {
  15049. return function (n) {
  15050. var i = t.scale.getLabel(n);
  15051. return e.replace("{value}", null != i ? i : "")
  15052. }
  15053. }(i) : X(i) ? (e = i, function (n, i) {
  15054. return null != r && (i = n.value - r), e(S_(t, n), i, null != n.level ? {
  15055. level: n.level
  15056. } : null)
  15057. }) : function (e) {
  15058. return t.scale.getLabel(e)
  15059. }
  15060. }
  15061. function S_(t, e) {
  15062. return "category" === t.type ? t.scale.getLabel(e) : e.value
  15063. }
  15064. function M_(t, e) {
  15065. var n = e * Math.PI / 180,
  15066. i = t.width,
  15067. r = t.height,
  15068. o = i * Math.abs(Math.cos(n)) + Math.abs(r * Math.sin(n)),
  15069. a = i * Math.abs(Math.sin(n)) + Math.abs(r * Math.cos(n));
  15070. return new ze(t.x, t.y, o, a)
  15071. }
  15072. function I_(t) {
  15073. var e = t.get("interval");
  15074. return null == e ? "auto" : e
  15075. }
  15076. function T_(t) {
  15077. return "category" === t.type && 0 === I_(t.getLabelModel())
  15078. }
  15079. function C_(t, e) {
  15080. var n = {};
  15081. return E(t.mapDimensionsAll(e), (function (e) {
  15082. n[xx(t, e)] = !0
  15083. })), G(n)
  15084. }
  15085. var D_ = function () {
  15086. function t() {}
  15087. return t.prototype.getNeedCrossZero = function () {
  15088. return !this.option.scale
  15089. }, t.prototype.getCoordSysModel = function () {}, t
  15090. }();
  15091. var A_ = {
  15092. isDimensionStacked: mx,
  15093. enableDataStack: vx,
  15094. getStackedDimension: xx
  15095. };
  15096. var k_ = Object.freeze({
  15097. __proto__: null,
  15098. createList: function (t) {
  15099. return _x(null, t)
  15100. },
  15101. getLayoutRect: kp,
  15102. dataStack: A_,
  15103. createScale: function (t, e) {
  15104. var n = e;
  15105. e instanceof Cc || (n = new Cc(e));
  15106. var i = b_(n);
  15107. return i.setExtent(t[0], t[1]), __(i, n), i
  15108. },
  15109. mixinAxisModelCommonMethods: function (t) {
  15110. R(t, D_)
  15111. },
  15112. getECData: rl,
  15113. createTextStyle: function (t, e) {
  15114. return oc(t, null, null, "normal" !== (e = e || {}).state)
  15115. },
  15116. createDimensions: function (t, e) {
  15117. return px(t, e).dimensions
  15118. },
  15119. createSymbol: Xy,
  15120. enableHoverEmphasis: Ul
  15121. });
  15122. function L_(t, e) {
  15123. return Math.abs(t - e) < 1e-8
  15124. }
  15125. function P_(t, e, n) {
  15126. var i = 0,
  15127. r = t[0];
  15128. if (!r) return !1;
  15129. for (var o = 1; o < t.length; o++) {
  15130. var a = t[o];
  15131. i += ms(r[0], r[1], a[0], a[1], e, n), r = a
  15132. }
  15133. var s = t[0];
  15134. return L_(r[0], s[0]) && L_(r[1], s[1]) || (i += ms(r[0], r[1], s[0], s[1], e, n)), 0 !== i
  15135. }
  15136. var O_ = [];
  15137. function R_(t, e) {
  15138. for (var n = 0; n < t.length; n++) Wt(t[n], t[n], e)
  15139. }
  15140. function N_(t, e, n, i) {
  15141. for (var r = 0; r < t.length; r++) {
  15142. var o = t[r];
  15143. i && (o = i.project(o)), o && isFinite(o[0]) && isFinite(o[1]) && (Ht(e, e, o), Yt(n, n, o))
  15144. }
  15145. }
  15146. var E_ = function () {
  15147. function t(t) {
  15148. this.name = t
  15149. }
  15150. return t.prototype.setCenter = function (t) {
  15151. this._center = t
  15152. }, t.prototype.getCenter = function () {
  15153. var t = this._center;
  15154. return t || (t = this._center = this.calcCenter()), t
  15155. }, t
  15156. }(),
  15157. z_ = function (t, e) {
  15158. this.type = "polygon", this.exterior = t, this.interiors = e
  15159. },
  15160. V_ = function (t) {
  15161. this.type = "linestring", this.points = t
  15162. },
  15163. B_ = function (t) {
  15164. function e(e, n, i) {
  15165. var r = t.call(this, e) || this;
  15166. return r.type = "geoJSON", r.geometries = n, r._center = i && [i[0], i[1]], r
  15167. }
  15168. return n(e, t), e.prototype.calcCenter = function () {
  15169. for (var t, e = this.geometries, n = 0, i = 0; i < e.length; i++) {
  15170. var r = e[i],
  15171. o = r.exterior,
  15172. a = o && o.length;
  15173. a > n && (t = r, n = a)
  15174. }
  15175. if (t) return function (t) {
  15176. for (var e = 0, n = 0, i = 0, r = t.length, o = t[r - 1][0], a = t[r - 1][1], s = 0; s < r; s++) {
  15177. var l = t[s][0],
  15178. u = t[s][1],
  15179. h = o * u - l * a;
  15180. e += h, n += (o + l) * h, i += (a + u) * h, o = l, a = u
  15181. }
  15182. return e ? [n / e / 3, i / e / 3, e] : [t[0][0] || 0, t[0][1] || 0]
  15183. }(t.exterior);
  15184. var s = this.getBoundingRect();
  15185. return [s.x + s.width / 2, s.y + s.height / 2]
  15186. }, e.prototype.getBoundingRect = function (t) {
  15187. var e = this._rect;
  15188. if (e && !t) return e;
  15189. var n = [1 / 0, 1 / 0],
  15190. i = [-1 / 0, -1 / 0];
  15191. return E(this.geometries, (function (e) {
  15192. "polygon" === e.type ? N_(e.exterior, n, i, t) : E(e.points, (function (e) {
  15193. N_(e, n, i, t)
  15194. }))
  15195. })), isFinite(n[0]) && isFinite(n[1]) && isFinite(i[0]) && isFinite(i[1]) || (n[0] = n[1] = i[0] = i[1] = 0), e = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]), t || (this._rect = e), e
  15196. }, e.prototype.contain = function (t) {
  15197. var e = this.getBoundingRect(),
  15198. n = this.geometries;
  15199. if (!e.contain(t[0], t[1])) return !1;
  15200. t: for (var i = 0, r = n.length; i < r; i++) {
  15201. var o = n[i];
  15202. if ("polygon" === o.type) {
  15203. var a = o.exterior,
  15204. s = o.interiors;
  15205. if (P_(a, t[0], t[1])) {
  15206. for (var l = 0; l < (s ? s.length : 0); l++)
  15207. if (P_(s[l], t[0], t[1])) continue t;
  15208. return !0
  15209. }
  15210. }
  15211. }
  15212. return !1
  15213. }, e.prototype.transformTo = function (t, e, n, i) {
  15214. var r = this.getBoundingRect(),
  15215. o = r.width / r.height;
  15216. n ? i || (i = n / o) : n = o * i;
  15217. for (var a = new ze(t, e, n, i), s = r.calculateTransform(a), l = this.geometries, u = 0; u < l.length; u++) {
  15218. var h = l[u];
  15219. "polygon" === h.type ? (R_(h.exterior, s), E(h.interiors, (function (t) {
  15220. R_(t, s)
  15221. }))) : E(h.points, (function (t) {
  15222. R_(t, s)
  15223. }))
  15224. }(r = this._rect).copy(a), this._center = [r.x + r.width / 2, r.y + r.height / 2]
  15225. }, e.prototype.cloneShallow = function (t) {
  15226. null == t && (t = this.name);
  15227. var n = new e(t, this.geometries, this._center);
  15228. return n._rect = this._rect, n.transformTo = null, n
  15229. }, e
  15230. }(E_),
  15231. F_ = function (t) {
  15232. function e(e, n) {
  15233. var i = t.call(this, e) || this;
  15234. return i.type = "geoSVG", i._elOnlyForCalculate = n, i
  15235. }
  15236. return n(e, t), e.prototype.calcCenter = function () {
  15237. for (var t = this._elOnlyForCalculate, e = t.getBoundingRect(), n = [e.x + e.width / 2, e.y + e.height / 2], i = xe(O_), r = t; r && !r.isGeoSVGGraphicRoot;) be(i, r.getLocalTransform(), i), r = r.parent;
  15238. return Ie(i, i), Wt(n, n, i), n
  15239. }, e
  15240. }(E_);
  15241. function G_(t, e, n) {
  15242. for (var i = 0; i < t.length; i++) t[i] = W_(t[i], e[i], n)
  15243. }
  15244. function W_(t, e, n) {
  15245. for (var i = [], r = e[0], o = e[1], a = 0; a < t.length; a += 2) {
  15246. var s = t.charCodeAt(a) - 64,
  15247. l = t.charCodeAt(a + 1) - 64;
  15248. s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), r = s += r, o = l += o, i.push([s / n, l / n])
  15249. }
  15250. return i
  15251. }
  15252. function H_(t, e) {
  15253. return z(B((t = function (t) {
  15254. if (!t.UTF8Encoding) return t;
  15255. var e = t,
  15256. n = e.UTF8Scale;
  15257. return null == n && (n = 1024), E(e.features, (function (t) {
  15258. var e = t.geometry,
  15259. i = e.encodeOffsets,
  15260. r = e.coordinates;
  15261. if (i) switch (e.type) {
  15262. case "LineString":
  15263. e.coordinates = W_(r, i, n);
  15264. break;
  15265. case "Polygon":
  15266. case "MultiLineString":
  15267. G_(r, i, n);
  15268. break;
  15269. case "MultiPolygon":
  15270. E(r, (function (t, e) {
  15271. return G_(t, i[e], n)
  15272. }))
  15273. }
  15274. })), e.UTF8Encoding = !1, e
  15275. }(t)).features, (function (t) {
  15276. return t.geometry && t.properties && t.geometry.coordinates.length > 0
  15277. })), (function (t) {
  15278. var n = t.properties,
  15279. i = t.geometry,
  15280. r = [];
  15281. switch (i.type) {
  15282. case "Polygon":
  15283. var o = i.coordinates;
  15284. r.push(new z_(o[0], o.slice(1)));
  15285. break;
  15286. case "MultiPolygon":
  15287. E(i.coordinates, (function (t) {
  15288. t[0] && r.push(new z_(t[0], t.slice(1)))
  15289. }));
  15290. break;
  15291. case "LineString":
  15292. r.push(new V_([i.coordinates]));
  15293. break;
  15294. case "MultiLineString":
  15295. r.push(new V_(i.coordinates))
  15296. }
  15297. var a = new B_(n[e || "name"], r, n.cp);
  15298. return a.properties = n, a
  15299. }))
  15300. }
  15301. var Y_ = Object.freeze({
  15302. __proto__: null,
  15303. linearMap: Kr,
  15304. round: Jr,
  15305. asc: Qr,
  15306. getPrecision: to,
  15307. getPrecisionSafe: eo,
  15308. getPixelPrecision: no,
  15309. getPercentWithPrecision: function (t, e, n) {
  15310. return t[e] && io(t, n)[e] || 0
  15311. },
  15312. MAX_SAFE_INTEGER: oo,
  15313. remRadian: ao,
  15314. isRadianAroundZero: so,
  15315. parseDate: uo,
  15316. quantity: ho,
  15317. quantityExponent: co,
  15318. nice: po,
  15319. quantile: fo,
  15320. reformIntervals: go,
  15321. isNumeric: vo,
  15322. numericToNumber: yo
  15323. }),
  15324. X_ = Object.freeze({
  15325. __proto__: null,
  15326. parse: uo,
  15327. format: Jc
  15328. }),
  15329. U_ = Object.freeze({
  15330. __proto__: null,
  15331. extendShape: Ch,
  15332. extendPath: Ah,
  15333. makePath: Ph,
  15334. makeImage: Oh,
  15335. mergePath: Nh,
  15336. resizePath: Eh,
  15337. createIcon: Uh,
  15338. updateProps: vh,
  15339. initProps: mh,
  15340. getTransform: Bh,
  15341. clipPointsByRect: Yh,
  15342. clipRectByRect: Xh,
  15343. registerShape: kh,
  15344. getShapeClass: Lh,
  15345. Group: Br,
  15346. Image: Ns,
  15347. Text: Xs,
  15348. Circle: Su,
  15349. Ellipse: Iu,
  15350. Sector: Fu,
  15351. Ring: Wu,
  15352. Polygon: Xu,
  15353. Polyline: Zu,
  15354. Rect: Ws,
  15355. Line: Ku,
  15356. BezierCurve: th,
  15357. Arc: nh,
  15358. IncrementalDisplayable: dh,
  15359. CompoundPath: ih,
  15360. LinearGradient: oh,
  15361. RadialGradient: ah,
  15362. BoundingRect: ze
  15363. }),
  15364. Z_ = Object.freeze({
  15365. __proto__: null,
  15366. addCommas: gp,
  15367. toCamelCase: yp,
  15368. normalizeCssArray: vp,
  15369. encodeHTML: re,
  15370. formatTpl: bp,
  15371. getTooltipMarker: wp,
  15372. formatTime: function (t, e, n) {
  15373. "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy");
  15374. var i = uo(e),
  15375. r = n ? "getUTC" : "get",
  15376. o = i[r + "FullYear"](),
  15377. a = i[r + "Month"]() + 1,
  15378. s = i[r + "Date"](),
  15379. l = i[r + "Hours"](),
  15380. u = i[r + "Minutes"](),
  15381. h = i[r + "Seconds"](),
  15382. c = i[r + "Milliseconds"]();
  15383. return t = t.replace("MM", qc(a, 2)).replace("M", a).replace("yyyy", o).replace("yy", qc(o % 100 + "", 2)).replace("dd", qc(s, 2)).replace("d", s).replace("hh", qc(l, 2)).replace("h", l).replace("mm", qc(u, 2)).replace("m", u).replace("ss", qc(h, 2)).replace("s", h).replace("SSS", qc(c, 3))
  15384. },
  15385. capitalFirst: function (t) {
  15386. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
  15387. },
  15388. truncateText: pa,
  15389. getTextRect: function (t, e, n, i, r, o, a, s) {
  15390. return new Xs({
  15391. style: {
  15392. text: t,
  15393. font: e,
  15394. align: n,
  15395. verticalAlign: i,
  15396. padding: r,
  15397. rich: o,
  15398. overflow: a ? "truncate" : null,
  15399. lineHeight: s
  15400. }
  15401. }).getBoundingRect()
  15402. }
  15403. }),
  15404. j_ = Object.freeze({
  15405. __proto__: null,
  15406. map: z,
  15407. each: E,
  15408. indexOf: P,
  15409. inherits: O,
  15410. reduce: V,
  15411. filter: B,
  15412. bind: W,
  15413. curry: H,
  15414. isArray: Y,
  15415. isString: U,
  15416. isObject: q,
  15417. isFunction: X,
  15418. extend: A,
  15419. defaults: k,
  15420. clone: T,
  15421. merge: C
  15422. }),
  15423. q_ = Vo();
  15424. function K_(t) {
  15425. return "category" === t.type ? function (t) {
  15426. var e = t.getLabelModel(),
  15427. n = J_(t, e);
  15428. return !e.get("show") || t.scale.isBlank() ? {
  15429. labels: [],
  15430. labelCategoryInterval: n.labelCategoryInterval
  15431. } : n
  15432. }(t) : function (t) {
  15433. var e = t.scale.getTicks(),
  15434. n = w_(t);
  15435. return {
  15436. labels: z(e, (function (e, i) {
  15437. return {
  15438. level: e.level,
  15439. formattedLabel: n(e, i),
  15440. rawLabel: t.scale.getLabel(e),
  15441. tickValue: e.value
  15442. }
  15443. }))
  15444. }
  15445. }(t)
  15446. }
  15447. function $_(t, e) {
  15448. return "category" === t.type ? function (t, e) {
  15449. var n, i, r = Q_(t, "ticks"),
  15450. o = I_(e),
  15451. a = tb(r, o);
  15452. if (a) return a;
  15453. e.get("show") && !t.scale.isBlank() || (n = []);
  15454. if (X(o)) n = ib(t, o, !0);
  15455. else if ("auto" === o) {
  15456. var s = J_(t, t.getLabelModel());
  15457. i = s.labelCategoryInterval, n = z(s.labels, (function (t) {
  15458. return t.tickValue
  15459. }))
  15460. } else n = nb(t, i = o, !0);
  15461. return eb(r, o, {
  15462. ticks: n,
  15463. tickCategoryInterval: i
  15464. })
  15465. }(t, e) : {
  15466. ticks: z(t.scale.getTicks(), (function (t) {
  15467. return t.value
  15468. }))
  15469. }
  15470. }
  15471. function J_(t, e) {
  15472. var n, i, r = Q_(t, "labels"),
  15473. o = I_(e),
  15474. a = tb(r, o);
  15475. return a || (X(o) ? n = ib(t, o) : (i = "auto" === o ? function (t) {
  15476. var e = q_(t).autoInterval;
  15477. return null != e ? e : q_(t).autoInterval = t.calculateCategoryInterval()
  15478. }(t) : o, n = nb(t, i)), eb(r, o, {
  15479. labels: n,
  15480. labelCategoryInterval: i
  15481. }))
  15482. }
  15483. function Q_(t, e) {
  15484. return q_(t)[e] || (q_(t)[e] = [])
  15485. }
  15486. function tb(t, e) {
  15487. for (var n = 0; n < t.length; n++)
  15488. if (t[n].key === e) return t[n].value
  15489. }
  15490. function eb(t, e, n) {
  15491. return t.push({
  15492. key: e,
  15493. value: n
  15494. }), n
  15495. }
  15496. function nb(t, e, n) {
  15497. var i = w_(t),
  15498. r = t.scale,
  15499. o = r.getExtent(),
  15500. a = t.getLabelModel(),
  15501. s = [],
  15502. l = Math.max((e || 0) + 1, 1),
  15503. u = o[0],
  15504. h = r.count();
  15505. 0 !== u && l > 1 && h / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  15506. var c = T_(t),
  15507. p = a.get("showMinLabel") || c,
  15508. d = a.get("showMaxLabel") || c;
  15509. p && u !== o[0] && g(o[0]);
  15510. for (var f = u; f <= o[1]; f += l) g(f);
  15511. function g(t) {
  15512. var e = {
  15513. value: t
  15514. };
  15515. s.push(n ? t : {
  15516. formattedLabel: i(e),
  15517. rawLabel: r.getLabel(e),
  15518. tickValue: t
  15519. })
  15520. }
  15521. return d && f - l !== o[1] && g(o[1]), s
  15522. }
  15523. function ib(t, e, n) {
  15524. var i = t.scale,
  15525. r = w_(t),
  15526. o = [];
  15527. return E(i.getTicks(), (function (t) {
  15528. var a = i.getLabel(t),
  15529. s = t.value;
  15530. e(t.value, a) && o.push(n ? s : {
  15531. formattedLabel: r(t),
  15532. rawLabel: a,
  15533. tickValue: s
  15534. })
  15535. })), o
  15536. }
  15537. var rb = [0, 1],
  15538. ob = function () {
  15539. function t(t, e, n) {
  15540. this.onBand = !1, this.inverse = !1, this.dim = t, this.scale = e, this._extent = n || [0, 0]
  15541. }
  15542. return t.prototype.contain = function (t) {
  15543. var e = this._extent,
  15544. n = Math.min(e[0], e[1]),
  15545. i = Math.max(e[0], e[1]);
  15546. return t >= n && t <= i
  15547. }, t.prototype.containData = function (t) {
  15548. return this.scale.contain(t)
  15549. }, t.prototype.getExtent = function () {
  15550. return this._extent.slice()
  15551. }, t.prototype.getPixelPrecision = function (t) {
  15552. return no(t || this.scale.getExtent(), this._extent)
  15553. }, t.prototype.setExtent = function (t, e) {
  15554. var n = this._extent;
  15555. n[0] = t, n[1] = e
  15556. }, t.prototype.dataToCoord = function (t, e) {
  15557. var n = this._extent,
  15558. i = this.scale;
  15559. return t = i.normalize(t), this.onBand && "ordinal" === i.type && ab(n = n.slice(), i.count()), Kr(t, rb, n, e)
  15560. }, t.prototype.coordToData = function (t, e) {
  15561. var n = this._extent,
  15562. i = this.scale;
  15563. this.onBand && "ordinal" === i.type && ab(n = n.slice(), i.count());
  15564. var r = Kr(t, n, rb, e);
  15565. return this.scale.scale(r)
  15566. }, t.prototype.pointToData = function (t, e) {}, t.prototype.getTicksCoords = function (t) {
  15567. var e = (t = t || {}).tickModel || this.getTickModel(),
  15568. n = z($_(this, e).ticks, (function (t) {
  15569. return {
  15570. coord: this.dataToCoord("ordinal" === this.scale.type ? this.scale.getRawOrdinalNumber(t) : t),
  15571. tickValue: t
  15572. }
  15573. }), this);
  15574. return function (t, e, n, i) {
  15575. var r = e.length;
  15576. if (!t.onBand || n || !r) return;
  15577. var o, a, s = t.getExtent();
  15578. if (1 === r) e[0].coord = s[0], o = e[1] = {
  15579. coord: s[1]
  15580. };
  15581. else {
  15582. var l = e[r - 1].tickValue - e[0].tickValue,
  15583. u = (e[r - 1].coord - e[0].coord) / l;
  15584. E(e, (function (t) {
  15585. t.coord -= u / 2
  15586. })), a = 1 + t.scale.getExtent()[1] - e[r - 1].tickValue, o = {
  15587. coord: e[r - 1].coord + u * a
  15588. }, e.push(o)
  15589. }
  15590. var h = s[0] > s[1];
  15591. c(e[0].coord, s[0]) && (i ? e[0].coord = s[0] : e.shift());
  15592. i && c(s[0], e[0].coord) && e.unshift({
  15593. coord: s[0]
  15594. });
  15595. c(s[1], o.coord) && (i ? o.coord = s[1] : e.pop());
  15596. i && c(o.coord, s[1]) && e.push({
  15597. coord: s[1]
  15598. });
  15599. function c(t, e) {
  15600. return t = Jr(t), e = Jr(e), h ? t > e : t < e
  15601. }
  15602. }(this, n, e.get("alignWithLabel"), t.clamp), n
  15603. }, t.prototype.getMinorTicksCoords = function () {
  15604. if ("ordinal" === this.scale.type) return [];
  15605. var t = this.model.getModel("minorTick").get("splitNumber");
  15606. return t > 0 && t < 100 || (t = 5), z(this.scale.getMinorTicks(t), (function (t) {
  15607. return z(t, (function (t) {
  15608. return {
  15609. coord: this.dataToCoord(t),
  15610. tickValue: t
  15611. }
  15612. }), this)
  15613. }), this)
  15614. }, t.prototype.getViewLabels = function () {
  15615. return K_(this).labels
  15616. }, t.prototype.getLabelModel = function () {
  15617. return this.model.getModel("axisLabel")
  15618. }, t.prototype.getTickModel = function () {
  15619. return this.model.getModel("axisTick")
  15620. }, t.prototype.getBandWidth = function () {
  15621. var t = this._extent,
  15622. e = this.scale.getExtent(),
  15623. n = e[1] - e[0] + (this.onBand ? 1 : 0);
  15624. 0 === n && (n = 1);
  15625. var i = Math.abs(t[1] - t[0]);
  15626. return Math.abs(i) / n
  15627. }, t.prototype.calculateCategoryInterval = function () {
  15628. return function (t) {
  15629. var e = function (t) {
  15630. var e = t.getLabelModel();
  15631. return {
  15632. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  15633. labelRotate: e.get("rotate") || 0,
  15634. font: e.getFont()
  15635. }
  15636. }(t),
  15637. n = w_(t),
  15638. i = (e.axisRotate - e.labelRotate) / 180 * Math.PI,
  15639. r = t.scale,
  15640. o = r.getExtent(),
  15641. a = r.count();
  15642. if (o[1] - o[0] < 1) return 0;
  15643. var s = 1;
  15644. a > 40 && (s = Math.max(1, Math.floor(a / 40)));
  15645. for (var l = o[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(i)), c = Math.abs(u * Math.sin(i)), p = 0, d = 0; l <= o[1]; l += s) {
  15646. var f, g, y = Sr(n({
  15647. value: l
  15648. }), e.font, "center", "top");
  15649. f = 1.3 * y.width, g = 1.3 * y.height, p = Math.max(p, f, 7), d = Math.max(d, g, 7)
  15650. }
  15651. var v = p / h,
  15652. m = d / c;
  15653. isNaN(v) && (v = 1 / 0), isNaN(m) && (m = 1 / 0);
  15654. var x = Math.max(0, Math.floor(Math.min(v, m))),
  15655. _ = q_(t.model),
  15656. b = t.getExtent(),
  15657. w = _.lastAutoInterval,
  15658. S = _.lastTickCount;
  15659. return null != w && null != S && Math.abs(w - x) <= 1 && Math.abs(S - a) <= 1 && w > x && _.axisExtent0 === b[0] && _.axisExtent1 === b[1] ? x = w : (_.lastTickCount = a, _.lastAutoInterval = x, _.axisExtent0 = b[0], _.axisExtent1 = b[1]), x
  15660. }(this)
  15661. }, t
  15662. }();
  15663. function ab(t, e) {
  15664. var n = (t[1] - t[0]) / e / 2;
  15665. t[0] += n, t[1] -= n
  15666. }
  15667. var sb = 2 * Math.PI,
  15668. lb = hs.CMD,
  15669. ub = ["top", "right", "bottom", "left"];
  15670. function hb(t, e, n, i, r) {
  15671. var o = n.width,
  15672. a = n.height;
  15673. switch (t) {
  15674. case "top":
  15675. i.set(n.x + o / 2, n.y - e), r.set(0, -1);
  15676. break;
  15677. case "bottom":
  15678. i.set(n.x + o / 2, n.y + a + e), r.set(0, 1);
  15679. break;
  15680. case "left":
  15681. i.set(n.x - e, n.y + a / 2), r.set(-1, 0);
  15682. break;
  15683. case "right":
  15684. i.set(n.x + o + e, n.y + a / 2), r.set(1, 0)
  15685. }
  15686. }
  15687. function cb(t, e, n, i, r, o, a, s, l) {
  15688. a -= t, s -= e;
  15689. var u = Math.sqrt(a * a + s * s),
  15690. h = (a /= u) * n + t,
  15691. c = (s /= u) * n + e;
  15692. if (Math.abs(i - r) % sb < 1e-4) return l[0] = h, l[1] = c, u - n;
  15693. if (o) {
  15694. var p = i;
  15695. i = gs(r), r = gs(p)
  15696. } else i = gs(i), r = gs(r);
  15697. i > r && (r += sb);
  15698. var d = Math.atan2(s, a);
  15699. if (d < 0 && (d += sb), d >= i && d <= r || d + sb >= i && d + sb <= r) return l[0] = h, l[1] = c, u - n;
  15700. var f = n * Math.cos(i) + t,
  15701. g = n * Math.sin(i) + e,
  15702. y = n * Math.cos(r) + t,
  15703. v = n * Math.sin(r) + e,
  15704. m = (f - a) * (f - a) + (g - s) * (g - s),
  15705. x = (y - a) * (y - a) + (v - s) * (v - s);
  15706. return m < x ? (l[0] = f, l[1] = g, Math.sqrt(m)) : (l[0] = y, l[1] = v, Math.sqrt(x))
  15707. }
  15708. function pb(t, e, n, i, r, o, a, s) {
  15709. var l = r - t,
  15710. u = o - e,
  15711. h = n - t,
  15712. c = i - e,
  15713. p = Math.sqrt(h * h + c * c),
  15714. d = (l * (h /= p) + u * (c /= p)) / p;
  15715. s && (d = Math.min(Math.max(d, 0), 1)), d *= p;
  15716. var f = a[0] = t + d * h,
  15717. g = a[1] = e + d * c;
  15718. return Math.sqrt((f - r) * (f - r) + (g - o) * (g - o))
  15719. }
  15720. function db(t, e, n, i, r, o, a) {
  15721. n < 0 && (t += n, n = -n), i < 0 && (e += i, i = -i);
  15722. var s = t + n,
  15723. l = e + i,
  15724. u = a[0] = Math.min(Math.max(r, t), s),
  15725. h = a[1] = Math.min(Math.max(o, e), l);
  15726. return Math.sqrt((u - r) * (u - r) + (h - o) * (h - o))
  15727. }
  15728. var fb = [];
  15729. function gb(t, e, n) {
  15730. var i = db(e.x, e.y, e.width, e.height, t.x, t.y, fb);
  15731. return n.set(fb[0], fb[1]), i
  15732. }
  15733. function yb(t, e, n) {
  15734. for (var i, r, o = 0, a = 0, s = 0, l = 0, u = 1 / 0, h = e.data, c = t.x, p = t.y, d = 0; d < h.length;) {
  15735. var f = h[d++];
  15736. 1 === d && (s = o = h[d], l = a = h[d + 1]);
  15737. var g = u;
  15738. switch (f) {
  15739. case lb.M:
  15740. o = s = h[d++], a = l = h[d++];
  15741. break;
  15742. case lb.L:
  15743. g = pb(o, a, h[d], h[d + 1], c, p, fb, !0), o = h[d++], a = h[d++];
  15744. break;
  15745. case lb.C:
  15746. g = Sn(o, a, h[d++], h[d++], h[d++], h[d++], h[d], h[d + 1], c, p, fb), o = h[d++], a = h[d++];
  15747. break;
  15748. case lb.Q:
  15749. g = An(o, a, h[d++], h[d++], h[d], h[d + 1], c, p, fb), o = h[d++], a = h[d++];
  15750. break;
  15751. case lb.A:
  15752. var y = h[d++],
  15753. v = h[d++],
  15754. m = h[d++],
  15755. x = h[d++],
  15756. _ = h[d++],
  15757. b = h[d++];
  15758. d += 1;
  15759. var w = !!(1 - h[d++]);
  15760. i = Math.cos(_) * m + y, r = Math.sin(_) * x + v, d <= 1 && (s = i, l = r), g = cb(y, v, x, _, _ + b, w, (c - y) * x / m + y, p, fb), o = Math.cos(_ + b) * m + y, a = Math.sin(_ + b) * x + v;
  15761. break;
  15762. case lb.R:
  15763. g = db(s = o = h[d++], l = a = h[d++], h[d++], h[d++], c, p, fb);
  15764. break;
  15765. case lb.Z:
  15766. g = pb(o, a, s, l, c, p, fb, !0), o = s, a = l
  15767. }
  15768. g < u && (u = g, n.set(fb[0], fb[1]))
  15769. }
  15770. return u
  15771. }
  15772. var vb = new De,
  15773. mb = new De,
  15774. xb = new De,
  15775. _b = new De,
  15776. bb = new De;
  15777. function wb(t, e) {
  15778. if (t) {
  15779. var n = t.getTextGuideLine(),
  15780. i = t.getTextContent();
  15781. if (i && n) {
  15782. var r = t.textGuideLineConfig || {},
  15783. o = [
  15784. [0, 0],
  15785. [0, 0],
  15786. [0, 0]
  15787. ],
  15788. a = r.candidates || ub,
  15789. s = i.getBoundingRect().clone();
  15790. s.applyTransform(i.getComputedTransform());
  15791. var l = 1 / 0,
  15792. u = r.anchor,
  15793. h = t.getComputedTransform(),
  15794. c = h && Ie([], h),
  15795. p = e.get("length2") || 0;
  15796. u && xb.copy(u);
  15797. for (var d = 0; d < a.length; d++) {
  15798. hb(a[d], 0, s, vb, _b), De.scaleAndAdd(mb, vb, _b, p), mb.transform(c);
  15799. var f = t.getBoundingRect(),
  15800. g = u ? u.distance(mb) : t instanceof ks ? yb(mb, t.path, xb) : gb(mb, f, xb);
  15801. g < l && (l = g, mb.transform(h), xb.transform(h), xb.toArray(o[0]), mb.toArray(o[1]), vb.toArray(o[2]))
  15802. }
  15803. Ib(o, e.get("minTurnAngle")), n.setShape({
  15804. points: o
  15805. })
  15806. }
  15807. }
  15808. }
  15809. var Sb = [],
  15810. Mb = new De;
  15811. function Ib(t, e) {
  15812. if (e <= 180 && e > 0) {
  15813. e = e / 180 * Math.PI, vb.fromArray(t[0]), mb.fromArray(t[1]), xb.fromArray(t[2]), De.sub(_b, vb, mb), De.sub(bb, xb, mb);
  15814. var n = _b.len(),
  15815. i = bb.len();
  15816. if (!(n < .001 || i < .001)) {
  15817. _b.scale(1 / n), bb.scale(1 / i);
  15818. var r = _b.dot(bb);
  15819. if (Math.cos(e) < r) {
  15820. var o = pb(mb.x, mb.y, xb.x, xb.y, vb.x, vb.y, Sb, !1);
  15821. Mb.fromArray(Sb), Mb.scaleAndAdd(bb, o / Math.tan(Math.PI - e));
  15822. var a = xb.x !== mb.x ? (Mb.x - mb.x) / (xb.x - mb.x) : (Mb.y - mb.y) / (xb.y - mb.y);
  15823. if (isNaN(a)) return;
  15824. a < 0 ? De.copy(Mb, mb) : a > 1 && De.copy(Mb, xb), Mb.toArray(t[1])
  15825. }
  15826. }
  15827. }
  15828. }
  15829. function Tb(t, e, n) {
  15830. if (n <= 180 && n > 0) {
  15831. n = n / 180 * Math.PI, vb.fromArray(t[0]), mb.fromArray(t[1]), xb.fromArray(t[2]), De.sub(_b, mb, vb), De.sub(bb, xb, mb);
  15832. var i = _b.len(),
  15833. r = bb.len();
  15834. if (!(i < .001 || r < .001))
  15835. if (_b.scale(1 / i), bb.scale(1 / r), _b.dot(e) < Math.cos(n)) {
  15836. var o = pb(mb.x, mb.y, xb.x, xb.y, vb.x, vb.y, Sb, !1);
  15837. Mb.fromArray(Sb);
  15838. var a = Math.PI / 2,
  15839. s = a + Math.acos(bb.dot(e)) - n;
  15840. if (s >= a) De.copy(Mb, xb);
  15841. else {
  15842. Mb.scaleAndAdd(bb, o / Math.tan(Math.PI / 2 - s));
  15843. var l = xb.x !== mb.x ? (Mb.x - mb.x) / (xb.x - mb.x) : (Mb.y - mb.y) / (xb.y - mb.y);
  15844. if (isNaN(l)) return;
  15845. l < 0 ? De.copy(Mb, mb) : l > 1 && De.copy(Mb, xb)
  15846. }
  15847. Mb.toArray(t[1])
  15848. }
  15849. }
  15850. }
  15851. function Cb(t, e, n, i) {
  15852. var r = "normal" === n,
  15853. o = r ? t : t.ensureState(n);
  15854. o.ignore = e;
  15855. var a = i.get("smooth");
  15856. a && !0 === a && (a = .3), o.shape = o.shape || {}, a > 0 && (o.shape.smooth = a);
  15857. var s = i.getModel("lineStyle").getLineStyle();
  15858. r ? t.useStyle(s) : o.style = s
  15859. }
  15860. function Db(t, e) {
  15861. var n = e.smooth,
  15862. i = e.points;
  15863. if (i)
  15864. if (t.moveTo(i[0][0], i[0][1]), n > 0 && i.length >= 3) {
  15865. var r = Vt(i[0], i[1]),
  15866. o = Vt(i[1], i[2]);
  15867. if (!r || !o) return t.lineTo(i[1][0], i[1][1]), void t.lineTo(i[2][0], i[2][1]);
  15868. var a = Math.min(r, o) * n,
  15869. s = Gt([], i[1], i[0], a / r),
  15870. l = Gt([], i[1], i[2], a / o),
  15871. u = Gt([], s, l, .5);
  15872. t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], i[2][0], i[2][1])
  15873. } else
  15874. for (var h = 1; h < i.length; h++) t.lineTo(i[h][0], i[h][1])
  15875. }
  15876. function Ab(t, e, n) {
  15877. var i = t.getTextGuideLine(),
  15878. r = t.getTextContent();
  15879. if (r) {
  15880. for (var o = e.normal, a = o.get("show"), s = r.ignore, l = 0; l < cl.length; l++) {
  15881. var u = cl[l],
  15882. h = e[u],
  15883. c = "normal" === u;
  15884. if (h) {
  15885. var p = h.get("show");
  15886. if ((c ? s : rt(r.states[u] && r.states[u].ignore, s)) || !rt(p, a)) {
  15887. var d = c ? i : i && i.states[u];
  15888. d && (d.ignore = !0), i && Cb(i, !0, u, h);
  15889. continue
  15890. }
  15891. i || (i = new Zu, t.setTextGuideLine(i), c || !s && a || Cb(i, !0, "normal", e.normal), t.stateProxy && (i.stateProxy = t.stateProxy)), Cb(i, !1, u, h)
  15892. }
  15893. }
  15894. if (i) {
  15895. k(i.style, n), i.style.fill = null;
  15896. var f = o.get("showAbove");
  15897. (t.textGuideLineConfig = t.textGuideLineConfig || {}).showAbove = f || !1, i.buildPath = Db
  15898. }
  15899. } else i && t.removeTextGuideLine()
  15900. }
  15901. function kb(t, e) {
  15902. e = e || "labelLine";
  15903. for (var n = {
  15904. normal: t.getModel(e)
  15905. }, i = 0; i < hl.length; i++) {
  15906. var r = hl[i];
  15907. n[r] = t.getModel([r, e])
  15908. }
  15909. return n
  15910. }
  15911. function Lb(t) {
  15912. for (var e = [], n = 0; n < t.length; n++) {
  15913. var i = t[n];
  15914. if (!i.defaultAttr.ignore) {
  15915. var r = i.label,
  15916. o = r.getComputedTransform(),
  15917. a = r.getBoundingRect(),
  15918. s = !o || o[1] < 1e-5 && o[2] < 1e-5,
  15919. l = r.style.margin || 0,
  15920. u = a.clone();
  15921. u.applyTransform(o), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
  15922. var h = s ? new ch(a, o) : null;
  15923. e.push({
  15924. label: r,
  15925. labelLine: i.labelLine,
  15926. rect: u,
  15927. localRect: a,
  15928. obb: h,
  15929. priority: i.priority,
  15930. defaultAttr: i.defaultAttr,
  15931. layoutOption: i.computedLayoutOption,
  15932. axisAligned: s,
  15933. transform: o
  15934. })
  15935. }
  15936. }
  15937. return e
  15938. }
  15939. function Pb(t, e, n, i, r, o) {
  15940. var a = t.length;
  15941. if (!(a < 2)) {
  15942. t.sort((function (t, n) {
  15943. return t.rect[e] - n.rect[e]
  15944. }));
  15945. for (var s, l = 0, u = !1, h = 0, c = 0; c < a; c++) {
  15946. var p = t[c],
  15947. d = p.rect;
  15948. (s = d[e] - l) < 0 && (d[e] -= s, p.label[e] -= s, u = !0), h += Math.max(-s, 0), l = d[e] + d[n]
  15949. }
  15950. h > 0 && o && _(-h / a, 0, a);
  15951. var f, g, y = t[0],
  15952. v = t[a - 1];
  15953. return m(), f < 0 && b(-f, .8), g < 0 && b(g, .8), m(), x(f, g, 1), x(g, f, -1), m(), f < 0 && w(-f), g < 0 && w(g), u
  15954. }
  15955. function m() {
  15956. f = y.rect[e] - i, g = r - v.rect[e] - v.rect[n]
  15957. }
  15958. function x(t, e, n) {
  15959. if (t < 0) {
  15960. var i = Math.min(e, -t);
  15961. if (i > 0) {
  15962. _(i * n, 0, a);
  15963. var r = i + t;
  15964. r < 0 && b(-r * n, 1)
  15965. } else b(-t * n, 1)
  15966. }
  15967. }
  15968. function _(n, i, r) {
  15969. 0 !== n && (u = !0);
  15970. for (var o = i; o < r; o++) {
  15971. var a = t[o];
  15972. a.rect[e] += n, a.label[e] += n
  15973. }
  15974. }
  15975. function b(i, r) {
  15976. for (var o = [], s = 0, l = 1; l < a; l++) {
  15977. var u = t[l - 1].rect,
  15978. h = Math.max(t[l].rect[e] - u[e] - u[n], 0);
  15979. o.push(h), s += h
  15980. }
  15981. if (s) {
  15982. var c = Math.min(Math.abs(i) / s, r);
  15983. if (i > 0)
  15984. for (l = 0; l < a - 1; l++) {
  15985. _(o[l] * c, 0, l + 1)
  15986. } else
  15987. for (l = a - 1; l > 0; l--) {
  15988. _(-(o[l - 1] * c), l, a)
  15989. }
  15990. }
  15991. }
  15992. function w(t) {
  15993. var e = t < 0 ? -1 : 1;
  15994. t = Math.abs(t);
  15995. for (var n = Math.ceil(t / (a - 1)), i = 0; i < a - 1; i++)
  15996. if (e > 0 ? _(n, 0, i + 1) : _(-n, a - i - 1, a), (t -= n) <= 0) return
  15997. }
  15998. }
  15999. function Ob(t, e, n, i) {
  16000. return Pb(t, "y", "height", e, n, i)
  16001. }
  16002. function Rb(t) {
  16003. var e = [];
  16004. t.sort((function (t, e) {
  16005. return e.priority - t.priority
  16006. }));
  16007. var n = new ze(0, 0, 0, 0);
  16008. function i(t) {
  16009. if (!t.ignore) {
  16010. var e = t.ensureState("emphasis");
  16011. null == e.ignore && (e.ignore = !1)
  16012. }
  16013. t.ignore = !0
  16014. }
  16015. for (var r = 0; r < t.length; r++) {
  16016. var o = t[r],
  16017. a = o.axisAligned,
  16018. s = o.localRect,
  16019. l = o.transform,
  16020. u = o.label,
  16021. h = o.labelLine;
  16022. n.copy(o.rect), n.width -= .1, n.height -= .1, n.x += .05, n.y += .05;
  16023. for (var c = o.obb, p = !1, d = 0; d < e.length; d++) {
  16024. var f = e[d];
  16025. if (n.intersect(f.rect)) {
  16026. if (a && f.axisAligned) {
  16027. p = !0;
  16028. break
  16029. }
  16030. if (f.obb || (f.obb = new ch(f.localRect, f.transform)), c || (c = new ch(s, l)), c.intersect(f.obb)) {
  16031. p = !0;
  16032. break
  16033. }
  16034. }
  16035. }
  16036. p ? (i(u), h && i(h)) : (u.attr("ignore", o.defaultAttr.ignore), h && h.attr("ignore", o.defaultAttr.labelGuideIgnore), e.push(o))
  16037. }
  16038. }
  16039. function Nb(t) {
  16040. if (t) {
  16041. for (var e = [], n = 0; n < t.length; n++) e.push(t[n].slice());
  16042. return e
  16043. }
  16044. }
  16045. function Eb(t, e) {
  16046. var n = t.label,
  16047. i = e && e.getTextGuideLine();
  16048. return {
  16049. dataIndex: t.dataIndex,
  16050. dataType: t.dataType,
  16051. seriesIndex: t.seriesModel.seriesIndex,
  16052. text: t.label.style.text,
  16053. rect: t.hostRect,
  16054. labelRect: t.rect,
  16055. align: n.style.align,
  16056. verticalAlign: n.style.verticalAlign,
  16057. labelLinePoints: Nb(i && i.shape.points)
  16058. }
  16059. }
  16060. var zb = ["align", "verticalAlign", "width", "height", "fontSize"],
  16061. Vb = new vr,
  16062. Bb = Vo(),
  16063. Fb = Vo();
  16064. function Gb(t, e, n) {
  16065. for (var i = 0; i < n.length; i++) {
  16066. var r = n[i];
  16067. null != e[r] && (t[r] = e[r])
  16068. }
  16069. }
  16070. var Wb = ["x", "y", "rotation"],
  16071. Hb = function () {
  16072. function t() {
  16073. this._labelList = [], this._chartViewList = []
  16074. }
  16075. return t.prototype.clearLabels = function () {
  16076. this._labelList = [], this._chartViewList = []
  16077. }, t.prototype._addLabel = function (t, e, n, i, r) {
  16078. var o = i.style,
  16079. a = i.__hostTarget.textConfig || {},
  16080. s = i.getComputedTransform(),
  16081. l = i.getBoundingRect().plain();
  16082. ze.applyTransform(l, l, s), s ? Vb.setLocalTransform(s) : (Vb.x = Vb.y = Vb.rotation = Vb.originX = Vb.originY = 0, Vb.scaleX = Vb.scaleY = 1), Vb.rotation = gs(Vb.rotation);
  16083. var u, h = i.__hostTarget;
  16084. if (h) {
  16085. u = h.getBoundingRect().plain();
  16086. var c = h.getComputedTransform();
  16087. ze.applyTransform(u, u, c)
  16088. }
  16089. var p = u && h.getTextGuideLine();
  16090. this._labelList.push({
  16091. label: i,
  16092. labelLine: p,
  16093. seriesModel: n,
  16094. dataIndex: t,
  16095. dataType: e,
  16096. layoutOption: r,
  16097. computedLayoutOption: null,
  16098. rect: l,
  16099. hostRect: u,
  16100. priority: u ? u.width * u.height : 0,
  16101. defaultAttr: {
  16102. ignore: i.ignore,
  16103. labelGuideIgnore: p && p.ignore,
  16104. x: Vb.x,
  16105. y: Vb.y,
  16106. scaleX: Vb.scaleX,
  16107. scaleY: Vb.scaleY,
  16108. rotation: Vb.rotation,
  16109. style: {
  16110. x: o.x,
  16111. y: o.y,
  16112. align: o.align,
  16113. verticalAlign: o.verticalAlign,
  16114. width: o.width,
  16115. height: o.height,
  16116. fontSize: o.fontSize
  16117. },
  16118. cursor: i.cursor,
  16119. attachedPos: a.position,
  16120. attachedRot: a.rotation
  16121. }
  16122. })
  16123. }, t.prototype.addLabelsOfSeries = function (t) {
  16124. var e = this;
  16125. this._chartViewList.push(t);
  16126. var n = t.__model,
  16127. i = n.get("labelLayout");
  16128. (X(i) || G(i).length) && t.group.traverse((function (t) {
  16129. if (t.ignore) return !0;
  16130. var r = t.getTextContent(),
  16131. o = rl(t);
  16132. r && !r.disableLabelLayout && e._addLabel(o.dataIndex, o.dataType, n, r, i)
  16133. }))
  16134. }, t.prototype.updateLayoutConfig = function (t) {
  16135. var e = t.getWidth(),
  16136. n = t.getHeight();
  16137. function i(t, e) {
  16138. return function () {
  16139. wb(t, e)
  16140. }
  16141. }
  16142. for (var r = 0; r < this._labelList.length; r++) {
  16143. var o = this._labelList[r],
  16144. a = o.label,
  16145. s = a.__hostTarget,
  16146. l = o.defaultAttr,
  16147. u = void 0;
  16148. u = (u = X(o.layoutOption) ? o.layoutOption(Eb(o, s)) : o.layoutOption) || {}, o.computedLayoutOption = u;
  16149. var h = Math.PI / 180;
  16150. s && s.setTextConfig({
  16151. local: !1,
  16152. position: null != u.x || null != u.y ? null : l.attachedPos,
  16153. rotation: null != u.rotate ? u.rotate * h : l.attachedRot,
  16154. offset: [u.dx || 0, u.dy || 0]
  16155. });
  16156. var c = !1;
  16157. if (null != u.x ? (a.x = $r(u.x, e), a.setStyle("x", 0), c = !0) : (a.x = l.x, a.setStyle("x", l.style.x)), null != u.y ? (a.y = $r(u.y, n), a.setStyle("y", 0), c = !0) : (a.y = l.y, a.setStyle("y", l.style.y)), u.labelLinePoints) {
  16158. var p = s.getTextGuideLine();
  16159. p && (p.setShape({
  16160. points: u.labelLinePoints
  16161. }), c = !1)
  16162. }
  16163. Bb(a).needsUpdateLabelLine = c, a.rotation = null != u.rotate ? u.rotate * h : l.rotation, a.scaleX = l.scaleX, a.scaleY = l.scaleY;
  16164. for (var d = 0; d < zb.length; d++) {
  16165. var f = zb[d];
  16166. a.setStyle(f, null != u[f] ? u[f] : l.style[f])
  16167. }
  16168. if (u.draggable) {
  16169. if (a.draggable = !0, a.cursor = "move", s) {
  16170. var g = o.seriesModel;
  16171. if (null != o.dataIndex) g = o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);
  16172. a.on("drag", i(s, g.getModel("labelLine")))
  16173. }
  16174. } else a.off("drag"), a.cursor = l.cursor
  16175. }
  16176. }, t.prototype.layout = function (t) {
  16177. var e, n = t.getWidth(),
  16178. i = t.getHeight(),
  16179. r = Lb(this._labelList),
  16180. o = B(r, (function (t) {
  16181. return "shiftX" === t.layoutOption.moveOverlap
  16182. })),
  16183. a = B(r, (function (t) {
  16184. return "shiftY" === t.layoutOption.moveOverlap
  16185. }));
  16186. Pb(o, "x", "width", 0, n, e), Ob(a, 0, i), Rb(B(r, (function (t) {
  16187. return t.layoutOption.hideOverlap
  16188. })))
  16189. }, t.prototype.processLabelsOverall = function () {
  16190. var t = this;
  16191. E(this._chartViewList, (function (e) {
  16192. var n = e.__model,
  16193. i = e.ignoreLabelLineUpdate,
  16194. r = n.isAnimationEnabled();
  16195. e.group.traverse((function (e) {
  16196. if (e.ignore && !e.forceLabelAnimation) return !0;
  16197. var o = !i,
  16198. a = e.getTextContent();
  16199. !o && a && (o = Bb(a).needsUpdateLabelLine), o && t._updateLabelLine(e, n), r && t._animateLabels(e, n)
  16200. }))
  16201. }))
  16202. }, t.prototype._updateLabelLine = function (t, e) {
  16203. var n = t.getTextContent(),
  16204. i = rl(t),
  16205. r = i.dataIndex;
  16206. if (n && null != r) {
  16207. var o = e.getData(i.dataType),
  16208. a = o.getItemModel(r),
  16209. s = {},
  16210. l = o.getItemVisual(r, "style");
  16211. if (l) {
  16212. var u = o.getVisual("drawType");
  16213. s.stroke = l[u]
  16214. }
  16215. var h = a.getModel("labelLine");
  16216. Ab(t, kb(a), s), wb(t, h)
  16217. }
  16218. }, t.prototype._animateLabels = function (t, e) {
  16219. var n = t.getTextContent(),
  16220. i = t.getTextGuideLine();
  16221. if (n && (t.forceLabelAnimation || !n.ignore && !n.invisible && !t.disableLabelAnimation && !xh(t))) {
  16222. var r = (d = Bb(n)).oldLayout,
  16223. o = rl(t),
  16224. a = o.dataIndex,
  16225. s = {
  16226. x: n.x,
  16227. y: n.y,
  16228. rotation: n.rotation
  16229. },
  16230. l = e.getData(o.dataType);
  16231. if (r) {
  16232. n.attr(r);
  16233. var u = t.prevStates;
  16234. u && (P(u, "select") >= 0 && n.attr(d.oldLayoutSelect), P(u, "emphasis") >= 0 && n.attr(d.oldLayoutEmphasis)), vh(n, s, e, a)
  16235. } else if (n.attr(s), !pc(n).valueAnimation) {
  16236. var h = rt(n.style.opacity, 1);
  16237. n.style.opacity = 0, mh(n, {
  16238. style: {
  16239. opacity: h
  16240. }
  16241. }, e, a)
  16242. }
  16243. if (d.oldLayout = s, n.states.select) {
  16244. var c = d.oldLayoutSelect = {};
  16245. Gb(c, s, Wb), Gb(c, n.states.select, Wb)
  16246. }
  16247. if (n.states.emphasis) {
  16248. var p = d.oldLayoutEmphasis = {};
  16249. Gb(p, s, Wb), Gb(p, n.states.emphasis, Wb)
  16250. }
  16251. fc(n, a, l, e, e)
  16252. }
  16253. if (i && !i.ignore && !i.invisible) {
  16254. r = (d = Fb(i)).oldLayout;
  16255. var d, f = {
  16256. points: i.shape.points
  16257. };
  16258. r ? (i.attr({
  16259. shape: r
  16260. }), vh(i, {
  16261. shape: f
  16262. }, e)) : (i.setShape(f), i.style.strokePercent = 0, mh(i, {
  16263. style: {
  16264. strokePercent: 1
  16265. }
  16266. }, e)), d.oldLayout = f
  16267. }
  16268. }, t
  16269. }(),
  16270. Yb = Vo();
  16271. var Xb = Math.sin,
  16272. Ub = Math.cos,
  16273. Zb = Math.PI,
  16274. jb = 2 * Math.PI,
  16275. qb = 180 / Zb,
  16276. Kb = function () {
  16277. function t() {}
  16278. return t.prototype.reset = function (t) {
  16279. this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, t || 4)
  16280. }, t.prototype.moveTo = function (t, e) {
  16281. this._add("M", t, e)
  16282. }, t.prototype.lineTo = function (t, e) {
  16283. this._add("L", t, e)
  16284. }, t.prototype.bezierCurveTo = function (t, e, n, i, r, o) {
  16285. this._add("C", t, e, n, i, r, o)
  16286. }, t.prototype.quadraticCurveTo = function (t, e, n, i) {
  16287. this._add("Q", t, e, n, i)
  16288. }, t.prototype.arc = function (t, e, n, i, r, o) {
  16289. this.ellipse(t, e, n, n, 0, i, r, o)
  16290. }, t.prototype.ellipse = function (t, e, n, i, r, o, a, s) {
  16291. var l = a - o,
  16292. u = !s,
  16293. h = Math.abs(l),
  16294. c = pi(h - jb) || (u ? l >= jb : -l >= jb),
  16295. p = l > 0 ? l % jb : l % jb + jb,
  16296. d = !1;
  16297. d = !!c || !pi(h) && p >= Zb == !!u;
  16298. var f = t + n * Ub(o),
  16299. g = e + i * Xb(o);
  16300. this._start && this._add("M", f, g);
  16301. var y = Math.round(r * qb);
  16302. if (c) {
  16303. var v = 1 / this._p,
  16304. m = (u ? 1 : -1) * (jb - v);
  16305. this._add("A", n, i, y, 1, +u, t + n * Ub(o + m), e + i * Xb(o + m)), v > .01 && this._add("A", n, i, y, 0, +u, f, g)
  16306. } else {
  16307. var x = t + n * Ub(a),
  16308. _ = e + i * Xb(a);
  16309. this._add("A", n, i, y, +d, +u, x, _)
  16310. }
  16311. }, t.prototype.rect = function (t, e, n, i) {
  16312. this._add("M", t, e), this._add("l", n, 0), this._add("l", 0, i), this._add("l", -n, 0), this._add("Z")
  16313. }, t.prototype.closePath = function () {
  16314. this._d.length > 0 && this._add("Z")
  16315. }, t.prototype._add = function (t, e, n, i, r, o, a, s, l) {
  16316. for (var u = [], h = this._p, c = 1; c < arguments.length; c++) {
  16317. var p = arguments[c];
  16318. if (isNaN(p)) return void(this._invalid = !0);
  16319. u.push(Math.round(p * h) / h)
  16320. }
  16321. this._d.push(t + u.join(" ")), this._start = "Z" === t
  16322. }, t.prototype.generateStr = function () {
  16323. this._str = this._invalid ? "" : this._d.join(""), this._d = []
  16324. }, t.prototype.getStr = function () {
  16325. return this._str
  16326. }, t
  16327. }(),
  16328. $b = "none",
  16329. Jb = Math.round;
  16330. var Qb = ["lineCap", "miterLimit", "lineJoin"],
  16331. tw = z(Qb, (function (t) {
  16332. return "stroke-" + t.toLowerCase()
  16333. }));
  16334. function ew(t, e, n, i) {
  16335. var r = null == e.opacity ? 1 : e.opacity;
  16336. if (n instanceof Ns) t("opacity", r);
  16337. else {
  16338. if (function (t) {
  16339. var e = t.fill;
  16340. return null != e && e !== $b
  16341. }(e)) {
  16342. var o = hi(e.fill);
  16343. t("fill", o.color);
  16344. var a = null != e.fillOpacity ? e.fillOpacity * o.opacity * r : o.opacity * r;
  16345. (i || a < 1) && t("fill-opacity", a)
  16346. } else t("fill", $b);
  16347. if (function (t) {
  16348. var e = t.stroke;
  16349. return null != e && e !== $b
  16350. }(e)) {
  16351. var s = hi(e.stroke);
  16352. t("stroke", s.color);
  16353. var l = e.strokeNoScale ? n.getLineScale() : 1,
  16354. u = l ? (e.lineWidth || 0) / l : 0,
  16355. h = null != e.strokeOpacity ? e.strokeOpacity * s.opacity * r : s.opacity * r,
  16356. c = e.strokeFirst;
  16357. if ((i || 1 !== u) && t("stroke-width", u), (i || c) && t("paint-order", c ? "stroke" : "fill"), (i || h < 1) && t("stroke-opacity", h), e.lineDash) {
  16358. var p = Jy(n),
  16359. d = p[0],
  16360. f = p[1];
  16361. d && (f = Jb(f || 0), t("stroke-dasharray", d.join(",")), (f || i) && t("stroke-dashoffset", f))
  16362. } else i && t("stroke-dasharray", $b);
  16363. for (var g = 0; g < Qb.length; g++) {
  16364. var y = Qb[g];
  16365. if (i || e[y] !== Cs[y]) {
  16366. var v = e[y] || Cs[y];
  16367. v && t(tw[g], v)
  16368. }
  16369. }
  16370. } else i && t("stroke", $b)
  16371. }
  16372. }
  16373. var nw = "http://www.w3.org/2000/svg",
  16374. iw = "http://www.w3.org/1999/xlink",
  16375. rw = "ecmeta_";
  16376. function ow(t) {
  16377. return document.createElementNS(nw, t)
  16378. }
  16379. function aw(t, e, n, i, r) {
  16380. return {
  16381. tag: t,
  16382. attrs: n || {},
  16383. children: i,
  16384. text: r,
  16385. key: e
  16386. }
  16387. }
  16388. function sw(t, e) {
  16389. var n = (e = e || {}).newline ? "\n" : "";
  16390. return function t(e) {
  16391. var i = e.children,
  16392. r = e.tag,
  16393. o = e.attrs,
  16394. a = e.text;
  16395. return function (t, e) {
  16396. var n = [];
  16397. if (e)
  16398. for (var i in e) {
  16399. var r = e[i],
  16400. o = i;
  16401. !1 !== r && (!0 !== r && null != r && (o += '="' + r + '"'), n.push(o))
  16402. }
  16403. return "<" + t + " " + n.join(" ") + ">"
  16404. }(r, o) + ("style" !== r ? re(a) : a || "") + (i ? "" + n + z(i, (function (e) {
  16405. return t(e)
  16406. })).join(n) + n : "") + ("</" + r + ">")
  16407. }(t)
  16408. }
  16409. function lw(t) {
  16410. return {
  16411. zrId: t,
  16412. shadowCache: {},
  16413. patternCache: {},
  16414. gradientCache: {},
  16415. clipPathCache: {},
  16416. defs: {},
  16417. cssNodes: {},
  16418. cssAnims: {},
  16419. cssStyleCache: {},
  16420. cssAnimIdx: 0,
  16421. shadowIdx: 0,
  16422. gradientIdx: 0,
  16423. patternIdx: 0,
  16424. clipPathIdx: 0
  16425. }
  16426. }
  16427. function uw(t, e, n, i) {
  16428. return aw("svg", "root", {
  16429. width: t,
  16430. height: e,
  16431. xmlns: nw,
  16432. "xmlns:xlink": iw,
  16433. version: "1.1",
  16434. baseProfile: "full",
  16435. viewBox: !!i && "0 0 " + t + " " + e
  16436. }, n)
  16437. }
  16438. var hw = 0;
  16439. function cw() {
  16440. return hw++
  16441. }
  16442. var pw = {
  16443. cubicIn: "0.32,0,0.67,0",
  16444. cubicOut: "0.33,1,0.68,1",
  16445. cubicInOut: "0.65,0,0.35,1",
  16446. quadraticIn: "0.11,0,0.5,0",
  16447. quadraticOut: "0.5,1,0.89,1",
  16448. quadraticInOut: "0.45,0,0.55,1",
  16449. quarticIn: "0.5,0,0.75,0",
  16450. quarticOut: "0.25,1,0.5,1",
  16451. quarticInOut: "0.76,0,0.24,1",
  16452. quinticIn: "0.64,0,0.78,0",
  16453. quinticOut: "0.22,1,0.36,1",
  16454. quinticInOut: "0.83,0,0.17,1",
  16455. sinusoidalIn: "0.12,0,0.39,0",
  16456. sinusoidalOut: "0.61,1,0.88,1",
  16457. sinusoidalInOut: "0.37,0,0.63,1",
  16458. exponentialIn: "0.7,0,0.84,0",
  16459. exponentialOut: "0.16,1,0.3,1",
  16460. exponentialInOut: "0.87,0,0.13,1",
  16461. circularIn: "0.55,0,1,0.45",
  16462. circularOut: "0,0.55,0.45,1",
  16463. circularInOut: "0.85,0,0.15,1"
  16464. },
  16465. dw = "transform-origin";
  16466. function fw(t, e, n) {
  16467. var i = A({}, t.shape);
  16468. A(i, e), t.buildPath(n, i);
  16469. var r = new Kb;
  16470. return r.reset(wi(t)), n.rebuildPath(r, 1), r.generateStr(), r.getStr()
  16471. }
  16472. function gw(t, e) {
  16473. var n = e.originX,
  16474. i = e.originY;
  16475. (n || i) && (t[dw] = n + "px " + i + "px")
  16476. }
  16477. var yw = {
  16478. fill: "fill",
  16479. opacity: "opacity",
  16480. lineWidth: "stroke-width",
  16481. lineDashOffset: "stroke-dashoffset"
  16482. };
  16483. function vw(t, e) {
  16484. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  16485. return e.cssAnims[n] = t, n
  16486. }
  16487. function mw(t) {
  16488. return U(t) ? pw[t] ? "cubic-bezier(" + pw[t] + ")" : Pn(t) ? t : "" : ""
  16489. }
  16490. function xw(t, e, n, i) {
  16491. var r = t.animators,
  16492. o = r.length,
  16493. a = [];
  16494. if (t instanceof ih) {
  16495. var s = function (t, e, n) {
  16496. var i, r, o = t.shape.paths,
  16497. a = {};
  16498. if (E(o, (function (t) {
  16499. var e = lw(n.zrId);
  16500. e.animation = !0, xw(t, {}, e, !0);
  16501. var o = e.cssAnims,
  16502. s = e.cssNodes,
  16503. l = G(o),
  16504. u = l.length;
  16505. if (u) {
  16506. var h = o[r = l[u - 1]];
  16507. for (var c in h) {
  16508. var p = h[c];
  16509. a[c] = a[c] || {
  16510. d: ""
  16511. }, a[c].d += p.d || ""
  16512. }
  16513. for (var d in s) {
  16514. var f = s[d].animation;
  16515. f.indexOf(r) >= 0 && (i = f)
  16516. }
  16517. }
  16518. })), i) {
  16519. e.d = !1;
  16520. var s = vw(a, n);
  16521. return i.replace(r, s)
  16522. }
  16523. }(t, e, n);
  16524. if (s) a.push(s);
  16525. else if (!o) return
  16526. } else if (!o) return;
  16527. for (var l = {}, u = 0; u < o; u++) {
  16528. var h = r[u],
  16529. c = [h.getMaxTime() / 1e3 + "s"],
  16530. p = mw(h.getClip().easing),
  16531. d = h.getDelay();
  16532. p ? c.push(p) : c.push("linear"), d && c.push(d / 1e3 + "s"), h.getLoop() && c.push("infinite");
  16533. var f = c.join(" ");
  16534. l[f] = l[f] || [f, []], l[f][1].push(h)
  16535. }
  16536. function g(r) {
  16537. var o, a = r[1],
  16538. s = a.length,
  16539. l = {},
  16540. u = {},
  16541. h = {},
  16542. c = "animation-timing-function";
  16543. function p(t, e, n) {
  16544. for (var i = t.getTracks(), r = t.getMaxTime(), o = 0; o < i.length; o++) {
  16545. var a = i[o];
  16546. if (a.needsAnimate()) {
  16547. var s = a.keyframes,
  16548. l = a.propName;
  16549. if (n && (l = n(l)), l)
  16550. for (var u = 0; u < s.length; u++) {
  16551. var h = s[u],
  16552. p = Math.round(h.time / r * 100) + "%",
  16553. d = mw(h.easing),
  16554. f = h.rawValue;
  16555. (U(f) || j(f)) && (e[p] = e[p] || {}, e[p][l] = h.rawValue, d && (e[p][c] = d))
  16556. }
  16557. }
  16558. }
  16559. }
  16560. for (var d = 0; d < s; d++) {
  16561. (S = (w = a[d]).targetName) ? "shape" === S && p(w, u): !i && p(w, l)
  16562. }
  16563. for (var f in l) {
  16564. var g = {};
  16565. xr(g, t), A(g, l[f]);
  16566. var y = Si(g),
  16567. v = l[f][c];
  16568. h[f] = y ? {
  16569. transform: y
  16570. } : {}, gw(h[f], g), v && (h[f][c] = v)
  16571. }
  16572. var m = !0;
  16573. for (var f in u) {
  16574. h[f] = h[f] || {};
  16575. var x = !o;
  16576. v = u[f][c];
  16577. x && (o = new hs);
  16578. var _ = o.len();
  16579. o.reset(), h[f].d = fw(t, u[f], o);
  16580. var b = o.len();
  16581. if (!x && _ !== b) {
  16582. m = !1;
  16583. break
  16584. }
  16585. v && (h[f][c] = v)
  16586. }
  16587. if (!m)
  16588. for (var f in h) delete h[f].d;
  16589. if (!i)
  16590. for (d = 0; d < s; d++) {
  16591. var w, S;
  16592. "style" === (S = (w = a[d]).targetName) && p(w, h, (function (t) {
  16593. return yw[t]
  16594. }))
  16595. }
  16596. var M, I = G(h),
  16597. T = !0;
  16598. for (d = 1; d < I.length; d++) {
  16599. var C = I[d - 1],
  16600. D = I[d];
  16601. if (h[C][dw] !== h[D][dw]) {
  16602. T = !1;
  16603. break
  16604. }
  16605. M = h[C][dw]
  16606. }
  16607. if (T && M) {
  16608. for (var f in h) h[f][dw] && delete h[f][dw];
  16609. e[dw] = M
  16610. }
  16611. if (B(I, (function (t) {
  16612. return G(h[t]).length > 0
  16613. })).length) return vw(h, n) + " " + r[0] + " both"
  16614. }
  16615. for (var y in l) {
  16616. (s = g(l[y])) && a.push(s)
  16617. }
  16618. if (a.length) {
  16619. var v = n.zrId + "-cls-" + cw();
  16620. n.cssNodes["." + v] = {
  16621. animation: a.join(",")
  16622. }, e.class = v
  16623. }
  16624. }
  16625. function _w(t, e, n, i) {
  16626. var r = JSON.stringify(t),
  16627. o = n.cssStyleCache[r];
  16628. o || (o = n.zrId + "-cls-" + cw(), n.cssStyleCache[r] = o, n.cssNodes["." + o + (i ? ":hover" : "")] = t), e.class = e.class ? e.class + " " + o : o
  16629. }
  16630. var bw = Math.round;
  16631. function ww(t) {
  16632. return t && U(t.src)
  16633. }
  16634. function Sw(t) {
  16635. return t && X(t.toDataURL)
  16636. }
  16637. function Mw(t, e, n, i) {
  16638. ew((function (r, o) {
  16639. var a = "fill" === r || "stroke" === r;
  16640. a && _i(o) ? Nw(e, t, r, i) : a && vi(o) ? Ew(n, t, r, i) : t[r] = a && "none" === o ? "transparent" : o
  16641. }), e, n, !1),
  16642. function (t, e, n) {
  16643. var i = t.style;
  16644. if (function (t) {
  16645. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY)
  16646. }(i)) {
  16647. var r = function (t) {
  16648. var e = t.style,
  16649. n = t.getGlobalScale();
  16650. return [e.shadowColor, (e.shadowBlur || 0).toFixed(2), (e.shadowOffsetX || 0).toFixed(2), (e.shadowOffsetY || 0).toFixed(2), n[0], n[1]].join(",")
  16651. }(t),
  16652. o = n.shadowCache,
  16653. a = o[r];
  16654. if (!a) {
  16655. var s = t.getGlobalScale(),
  16656. l = s[0],
  16657. u = s[1];
  16658. if (!l || !u) return;
  16659. var h = i.shadowOffsetX || 0,
  16660. c = i.shadowOffsetY || 0,
  16661. p = i.shadowBlur,
  16662. d = hi(i.shadowColor),
  16663. f = d.opacity,
  16664. g = d.color,
  16665. y = p / 2 / l + " " + p / 2 / u;
  16666. a = n.zrId + "-s" + n.shadowIdx++, n.defs[a] = aw("filter", a, {
  16667. id: a,
  16668. x: "-100%",
  16669. y: "-100%",
  16670. width: "300%",
  16671. height: "300%"
  16672. }, [aw("feDropShadow", "", {
  16673. dx: h / l,
  16674. dy: c / u,
  16675. stdDeviation: y,
  16676. "flood-color": g,
  16677. "flood-opacity": f
  16678. })]), o[r] = a
  16679. }
  16680. e.filter = bi(a)
  16681. }
  16682. }(n, t, i)
  16683. }
  16684. function Iw(t, e) {
  16685. var n = Ur(e);
  16686. n && (n.each((function (e, n) {
  16687. null != e && (t[(rw + n).toLowerCase()] = e + "")
  16688. })), e.isSilent() && (t[rw + "silent"] = "true"))
  16689. }
  16690. function Tw(t) {
  16691. return pi(t[0] - 1) && pi(t[1]) && pi(t[2]) && pi(t[3] - 1)
  16692. }
  16693. function Cw(t, e, n) {
  16694. if (e && (! function (t) {
  16695. return pi(t[4]) && pi(t[5])
  16696. }(e) || !Tw(e))) {
  16697. var i = n ? 10 : 1e4;
  16698. t.transform = Tw(e) ? "translate(" + bw(e[4] * i) / i + " " + bw(e[5] * i) / i + ")" : function (t) {
  16699. return "matrix(" + di(t[0]) + "," + di(t[1]) + "," + di(t[2]) + "," + di(t[3]) + "," + fi(t[4]) + "," + fi(t[5]) + ")"
  16700. }(e)
  16701. }
  16702. }
  16703. function Dw(t, e, n) {
  16704. for (var i = t.points, r = [], o = 0; o < i.length; o++) r.push(bw(i[o][0] * n) / n), r.push(bw(i[o][1] * n) / n);
  16705. e.points = r.join(" ")
  16706. }
  16707. function Aw(t) {
  16708. return !t.smooth
  16709. }
  16710. var kw, Lw, Pw = {
  16711. circle: [(kw = ["cx", "cy", "r"], Lw = z(kw, (function (t) {
  16712. return "string" == typeof t ? [t, t] : t
  16713. })), function (t, e, n) {
  16714. for (var i = 0; i < Lw.length; i++) {
  16715. var r = Lw[i],
  16716. o = t[r[0]];
  16717. null != o && (e[r[1]] = bw(o * n) / n)
  16718. }
  16719. })],
  16720. polyline: [Dw, Aw],
  16721. polygon: [Dw, Aw]
  16722. };
  16723. function Ow(t, e) {
  16724. var n = t.style,
  16725. i = t.shape,
  16726. r = Pw[t.type],
  16727. o = {},
  16728. a = e.animation,
  16729. s = "path",
  16730. l = t.style.strokePercent,
  16731. u = e.compress && wi(t) || 4;
  16732. if (!r || e.willUpdate || r[1] && !r[1](i) || a && function (t) {
  16733. for (var e = t.animators, n = 0; n < e.length; n++)
  16734. if ("shape" === e[n].targetName) return !0;
  16735. return !1
  16736. }(t) || l < 1) {
  16737. var h = !t.path || t.shapeChanged();
  16738. t.path || t.createPathProxy();
  16739. var c = t.path;
  16740. h && (c.beginPath(), t.buildPath(c, t.shape), t.pathUpdated());
  16741. var p = c.getVersion(),
  16742. d = t,
  16743. f = d.__svgPathBuilder;
  16744. d.__svgPathVersion === p && f && l === d.__svgPathStrokePercent || (f || (f = d.__svgPathBuilder = new Kb), f.reset(u), c.rebuildPath(f, l), f.generateStr(), d.__svgPathVersion = p, d.__svgPathStrokePercent = l), o.d = f.getStr()
  16745. } else {
  16746. s = t.type;
  16747. var g = Math.pow(10, u);
  16748. r[0](i, o, g)
  16749. }
  16750. return Cw(o, t.transform), Mw(o, n, t, e), Iw(o, t), e.animation && xw(t, o, e), e.emphasis && function (t, e, n) {
  16751. if (!t.ignore)
  16752. if (t.isSilent()) _w(u = {
  16753. "pointer-events": "none"
  16754. }, e, n, !0);
  16755. else {
  16756. var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {},
  16757. r = i.fill;
  16758. if (!r) {
  16759. var o = t.style && t.style.fill,
  16760. a = t.states.select && t.states.select.style && t.states.select.style.fill,
  16761. s = t.currentStates.indexOf("select") >= 0 && a || o;
  16762. s && (r = si(s))
  16763. }
  16764. var l = i.lineWidth;
  16765. l && (l /= !i.strokeNoScale && t.transform ? t.transform[0] : 1);
  16766. var u = {
  16767. cursor: "pointer"
  16768. };
  16769. r && (u.fill = r), i.stroke && (u.stroke = i.stroke), l && (u["stroke-width"] = l), _w(u, e, n, !0)
  16770. }
  16771. }(t, o, e), aw(s, t.id + "", o)
  16772. }
  16773. function Rw(t, e) {
  16774. return t instanceof ks ? Ow(t, e) : t instanceof Ns ? function (t, e) {
  16775. var n = t.style,
  16776. i = n.image;
  16777. if (i && !U(i) && (ww(i) ? i = i.src : Sw(i) && (i = i.toDataURL())), i) {
  16778. var r = n.x || 0,
  16779. o = n.y || 0,
  16780. a = {
  16781. href: i,
  16782. width: n.width,
  16783. height: n.height
  16784. };
  16785. return r && (a.x = r), o && (a.y = o), Cw(a, t.transform), Mw(a, n, t, e), Iw(a, t), e.animation && xw(t, a, e), aw("image", t.id + "", a)
  16786. }
  16787. }(t, e) : t instanceof Ps ? function (t, e) {
  16788. var n = t.style,
  16789. i = n.text;
  16790. if (null != i && (i += ""), i && !isNaN(n.x) && !isNaN(n.y)) {
  16791. var r = n.font || a,
  16792. s = n.x || 0,
  16793. l = function (t, e, n) {
  16794. return "top" === n ? t += e / 2 : "bottom" === n && (t -= e / 2), t
  16795. }(n.y || 0, Tr(r), n.textBaseline),
  16796. u = {
  16797. "dominant-baseline": "central",
  16798. "text-anchor": gi[n.textAlign] || n.textAlign
  16799. };
  16800. if ($s(n)) {
  16801. var h = "",
  16802. c = n.fontStyle,
  16803. p = qs(n.fontSize);
  16804. if (!parseFloat(p)) return;
  16805. var d = n.fontFamily || o,
  16806. f = n.fontWeight;
  16807. h += "font-size:" + p + ";font-family:" + d + ";", c && "normal" !== c && (h += "font-style:" + c + ";"), f && "normal" !== f && (h += "font-weight:" + f + ";"), u.style = h
  16808. } else u.style = "font: " + r;
  16809. return i.match(/\s/) && (u["xml:space"] = "preserve"), s && (u.x = s), l && (u.y = l), Cw(u, t.transform), Mw(u, n, t, e), Iw(u, t), e.animation && xw(t, u, e), aw("text", t.id + "", u, void 0, i)
  16810. }
  16811. }(t, e) : void 0
  16812. }
  16813. function Nw(t, e, n, i) {
  16814. var r, o = t[n],
  16815. a = {
  16816. gradientUnits: o.global ? "userSpaceOnUse" : "objectBoundingBox"
  16817. };
  16818. if (mi(o)) r = "linearGradient", a.x1 = o.x, a.y1 = o.y, a.x2 = o.x2, a.y2 = o.y2;
  16819. else {
  16820. if (!xi(o)) return void 0;
  16821. r = "radialGradient", a.cx = rt(o.x, .5), a.cy = rt(o.y, .5), a.r = rt(o.r, .5)
  16822. }
  16823. for (var s = o.colorStops, l = [], u = 0, h = s.length; u < h; ++u) {
  16824. var c = 100 * fi(s[u].offset) + "%",
  16825. p = hi(s[u].color),
  16826. d = p.color,
  16827. f = p.opacity,
  16828. g = {
  16829. offset: c
  16830. };
  16831. g["stop-color"] = d, f < 1 && (g["stop-opacity"] = f), l.push(aw("stop", u + "", g))
  16832. }
  16833. var y = sw(aw(r, "", a, l)),
  16834. v = i.gradientCache,
  16835. m = v[y];
  16836. m || (m = i.zrId + "-g" + i.gradientIdx++, v[y] = m, a.id = m, i.defs[m] = aw(r, m, a, l)), e[n] = bi(m)
  16837. }
  16838. function Ew(t, e, n, i) {
  16839. var r, o = t.style[n],
  16840. a = t.getBoundingRect(),
  16841. s = {},
  16842. l = o.repeat,
  16843. u = "no-repeat" === l,
  16844. h = "repeat-x" === l,
  16845. c = "repeat-y" === l;
  16846. if (yi(o)) {
  16847. var p = o.imageWidth,
  16848. d = o.imageHeight,
  16849. f = void 0,
  16850. g = o.image;
  16851. if (U(g) ? f = g : ww(g) ? f = g.src : Sw(g) && (f = g.toDataURL()), "undefined" == typeof Image) {
  16852. var y = "Image width/height must been given explictly in svg-ssr renderer.";
  16853. lt(p, y), lt(d, y)
  16854. } else if (null == p || null == d) {
  16855. var v = function (t, e) {
  16856. if (t) {
  16857. var n = t.elm,
  16858. i = p || e.width,
  16859. r = d || e.height;
  16860. "pattern" === t.tag && (h ? (r = 1, i /= a.width) : c && (i = 1, r /= a.height)), t.attrs.width = i, t.attrs.height = r, n && (n.setAttribute("width", i), n.setAttribute("height", r))
  16861. }
  16862. },
  16863. m = la(f, null, t, (function (t) {
  16864. u || v(w, t), v(r, t)
  16865. }));
  16866. m && m.width && m.height && (p = p || m.width, d = d || m.height)
  16867. }
  16868. r = aw("image", "img", {
  16869. href: f,
  16870. width: p,
  16871. height: d
  16872. }), s.width = p, s.height = d
  16873. } else o.svgElement && (r = T(o.svgElement), s.width = o.svgWidth, s.height = o.svgHeight);
  16874. if (r) {
  16875. var x, _;
  16876. u ? x = _ = 1 : h ? (_ = 1, x = s.width / a.width) : c ? (x = 1, _ = s.height / a.height) : s.patternUnits = "userSpaceOnUse", null == x || isNaN(x) || (s.width = x), null == _ || isNaN(_) || (s.height = _);
  16877. var b = Si(o);
  16878. b && (s.patternTransform = b);
  16879. var w = aw("pattern", "", s, [r]),
  16880. S = sw(w),
  16881. M = i.patternCache,
  16882. I = M[S];
  16883. I || (I = i.zrId + "-p" + i.patternIdx++, M[S] = I, s.id = I, w = i.defs[I] = aw("pattern", I, s, [r])), e[n] = bi(I)
  16884. }
  16885. }
  16886. function zw(t, e, n) {
  16887. var i = n.clipPathCache,
  16888. r = n.defs,
  16889. o = i[t.id];
  16890. if (!o) {
  16891. var a = {
  16892. id: o = n.zrId + "-c" + n.clipPathIdx++
  16893. };
  16894. i[t.id] = o, r[o] = aw("clipPath", o, a, [Ow(t, n)])
  16895. }
  16896. e["clip-path"] = bi(o)
  16897. }
  16898. function Vw(t) {
  16899. return document.createTextNode(t)
  16900. }
  16901. function Bw(t, e, n) {
  16902. t.insertBefore(e, n)
  16903. }
  16904. function Fw(t, e) {
  16905. t.removeChild(e)
  16906. }
  16907. function Gw(t, e) {
  16908. t.appendChild(e)
  16909. }
  16910. function Ww(t) {
  16911. return t.parentNode
  16912. }
  16913. function Hw(t) {
  16914. return t.nextSibling
  16915. }
  16916. function Yw(t, e) {
  16917. t.textContent = e
  16918. }
  16919. var Xw = aw("", "");
  16920. function Uw(t) {
  16921. return void 0 === t
  16922. }
  16923. function Zw(t) {
  16924. return void 0 !== t
  16925. }
  16926. function jw(t, e, n) {
  16927. for (var i = {}, r = e; r <= n; ++r) {
  16928. var o = t[r].key;
  16929. void 0 !== o && (i[o] = r)
  16930. }
  16931. return i
  16932. }
  16933. function qw(t, e) {
  16934. var n = t.key === e.key;
  16935. return t.tag === e.tag && n
  16936. }
  16937. function Kw(t) {
  16938. var e, n = t.children,
  16939. i = t.tag;
  16940. if (Zw(i)) {
  16941. var r = t.elm = ow(i);
  16942. if (Qw(Xw, t), Y(n))
  16943. for (e = 0; e < n.length; ++e) {
  16944. var o = n[e];
  16945. null != o && Gw(r, Kw(o))
  16946. } else Zw(t.text) && !q(t.text) && Gw(r, Vw(t.text))
  16947. } else t.elm = Vw(t.text);
  16948. return t.elm
  16949. }
  16950. function $w(t, e, n, i, r) {
  16951. for (; i <= r; ++i) {
  16952. var o = n[i];
  16953. null != o && Bw(t, Kw(o), e)
  16954. }
  16955. }
  16956. function Jw(t, e, n, i) {
  16957. for (; n <= i; ++n) {
  16958. var r = e[n];
  16959. if (null != r)
  16960. if (Zw(r.tag)) Fw(Ww(r.elm), r.elm);
  16961. else Fw(t, r.elm)
  16962. }
  16963. }
  16964. function Qw(t, e) {
  16965. var n, i = e.elm,
  16966. r = t && t.attrs || {},
  16967. o = e.attrs || {};
  16968. if (r !== o) {
  16969. for (n in o) {
  16970. var a = o[n];
  16971. r[n] !== a && (!0 === a ? i.setAttribute(n, "") : !1 === a ? i.removeAttribute(n) : "style" === n ? i.style.cssText = a : 120 !== n.charCodeAt(0) ? i.setAttribute(n, a) : "xmlns:xlink" === n || "xmlns" === n ? i.setAttributeNS("http://www.w3.org/2000/xmlns/", n, a) : 58 === n.charCodeAt(3) ? i.setAttributeNS("http://www.w3.org/XML/1998/namespace", n, a) : 58 === n.charCodeAt(5) ? i.setAttributeNS(iw, n, a) : i.setAttribute(n, a))
  16972. }
  16973. for (n in r) n in o || i.removeAttribute(n)
  16974. }
  16975. }
  16976. function tS(t, e) {
  16977. var n = e.elm = t.elm,
  16978. i = t.children,
  16979. r = e.children;
  16980. t !== e && (Qw(t, e), Uw(e.text) ? Zw(i) && Zw(r) ? i !== r && function (t, e, n) {
  16981. for (var i, r, o, a = 0, s = 0, l = e.length - 1, u = e[0], h = e[l], c = n.length - 1, p = n[0], d = n[c]; a <= l && s <= c;) null == u ? u = e[++a] : null == h ? h = e[--l] : null == p ? p = n[++s] : null == d ? d = n[--c] : qw(u, p) ? (tS(u, p), u = e[++a], p = n[++s]) : qw(h, d) ? (tS(h, d), h = e[--l], d = n[--c]) : qw(u, d) ? (tS(u, d), Bw(t, u.elm, Hw(h.elm)), u = e[++a], d = n[--c]) : qw(h, p) ? (tS(h, p), Bw(t, h.elm, u.elm), h = e[--l], p = n[++s]) : (Uw(i) && (i = jw(e, a, l)), Uw(r = i[p.key]) || (o = e[r]).tag !== p.tag ? Bw(t, Kw(p), u.elm) : (tS(o, p), e[r] = void 0, Bw(t, o.elm, u.elm)), p = n[++s]);
  16982. (a <= l || s <= c) && (a > l ? $w(t, null == n[c + 1] ? null : n[c + 1].elm, n, s, c) : Jw(t, e, a, l))
  16983. }(n, i, r) : Zw(r) ? (Zw(t.text) && Yw(n, ""), $w(n, null, r, 0, r.length - 1)) : Zw(i) ? Jw(n, i, 0, i.length - 1) : Zw(t.text) && Yw(n, "") : t.text !== e.text && (Zw(i) && Jw(n, i, 0, i.length - 1), Yw(n, e.text)))
  16984. }
  16985. var eS = 0,
  16986. nS = function () {
  16987. function t(t, e, n) {
  16988. if (this.type = "svg", this.refreshHover = iS("refreshHover"), this.configLayer = iS("configLayer"), this.storage = e, this._opts = n = A({}, n), this.root = t, this._id = "zr" + eS++, this._oldVNode = uw(n.width, n.height), t && !n.ssr) {
  16989. var i = this._viewport = document.createElement("div");
  16990. i.style.cssText = "position:relative;overflow:hidden";
  16991. var r = this._svgDom = this._oldVNode.elm = ow("svg");
  16992. Qw(null, this._oldVNode), i.appendChild(r), t.appendChild(i)
  16993. }
  16994. this.resize(n.width, n.height)
  16995. }
  16996. return t.prototype.getType = function () {
  16997. return this.type
  16998. }, t.prototype.getViewportRoot = function () {
  16999. return this._viewport
  17000. }, t.prototype.getViewportRootOffset = function () {
  17001. var t = this.getViewportRoot();
  17002. if (t) return {
  17003. offsetLeft: t.offsetLeft || 0,
  17004. offsetTop: t.offsetTop || 0
  17005. }
  17006. }, t.prototype.getSvgDom = function () {
  17007. return this._svgDom
  17008. }, t.prototype.refresh = function () {
  17009. if (this.root) {
  17010. var t = this.renderToVNode({
  17011. willUpdate: !0
  17012. });
  17013. t.attrs.style = "position:absolute;left:0;top:0;user-select:none",
  17014. function (t, e) {
  17015. if (qw(t, e)) tS(t, e);
  17016. else {
  17017. var n = t.elm,
  17018. i = Ww(n);
  17019. Kw(e), null !== i && (Bw(i, e.elm, Hw(n)), Jw(i, [t], 0, 0))
  17020. }
  17021. }(this._oldVNode, t), this._oldVNode = t
  17022. }
  17023. }, t.prototype.renderOneToVNode = function (t) {
  17024. return Rw(t, lw(this._id))
  17025. }, t.prototype.renderToVNode = function (t) {
  17026. t = t || {};
  17027. var e = this.storage.getDisplayList(!0),
  17028. n = this._width,
  17029. i = this._height,
  17030. r = lw(this._id);
  17031. r.animation = t.animation, r.willUpdate = t.willUpdate, r.compress = t.compress, r.emphasis = t.emphasis;
  17032. var o = [],
  17033. a = this._bgVNode = function (t, e, n, i) {
  17034. var r;
  17035. if (n && "none" !== n)
  17036. if (r = aw("rect", "bg", {
  17037. width: t,
  17038. height: e,
  17039. x: "0",
  17040. y: "0"
  17041. }), _i(n)) Nw({
  17042. fill: n
  17043. }, r.attrs, "fill", i);
  17044. else if (vi(n)) Ew({
  17045. style: {
  17046. fill: n
  17047. },
  17048. dirty: bt,
  17049. getBoundingRect: function () {
  17050. return {
  17051. width: t,
  17052. height: e
  17053. }
  17054. }
  17055. }, r.attrs, "fill", i);
  17056. else {
  17057. var o = hi(n),
  17058. a = o.color,
  17059. s = o.opacity;
  17060. r.attrs.fill = a, s < 1 && (r.attrs["fill-opacity"] = s)
  17061. }
  17062. return r
  17063. }(n, i, this._backgroundColor, r);
  17064. a && o.push(a);
  17065. var s = t.compress ? null : this._mainVNode = aw("g", "main", {}, []);
  17066. this._paintList(e, r, s ? s.children : o), s && o.push(s);
  17067. var l = z(G(r.defs), (function (t) {
  17068. return r.defs[t]
  17069. }));
  17070. if (l.length && o.push(aw("defs", "defs", {}, l)), t.animation) {
  17071. var u = function (t, e, n) {
  17072. var i = (n = n || {}).newline ? "\n" : "",
  17073. r = " {" + i,
  17074. o = i + "}",
  17075. a = z(G(t), (function (e) {
  17076. return e + r + z(G(t[e]), (function (n) {
  17077. return n + ":" + t[e][n] + ";"
  17078. })).join(i) + o
  17079. })).join(i),
  17080. s = z(G(e), (function (t) {
  17081. return "@keyframes " + t + r + z(G(e[t]), (function (n) {
  17082. return n + r + z(G(e[t][n]), (function (i) {
  17083. var r = e[t][n][i];
  17084. return "d" === i && (r = 'path("' + r + '")'), i + ":" + r + ";"
  17085. })).join(i) + o
  17086. })).join(i) + o
  17087. })).join(i);
  17088. return a || s ? ["<![CDATA[", a, s, "]]>"].join(i) : ""
  17089. }(r.cssNodes, r.cssAnims, {
  17090. newline: !0
  17091. });
  17092. if (u) {
  17093. var h = aw("style", "stl", {}, [], u);
  17094. o.push(h)
  17095. }
  17096. }
  17097. return uw(n, i, o, t.useViewBox)
  17098. }, t.prototype.renderToString = function (t) {
  17099. return t = t || {}, sw(this.renderToVNode({
  17100. animation: rt(t.cssAnimation, !0),
  17101. emphasis: rt(t.cssEmphasis, !0),
  17102. willUpdate: !1,
  17103. compress: !0,
  17104. useViewBox: rt(t.useViewBox, !0)
  17105. }), {
  17106. newline: !0
  17107. })
  17108. }, t.prototype.setBackgroundColor = function (t) {
  17109. this._backgroundColor = t
  17110. }, t.prototype.getSvgRoot = function () {
  17111. return this._mainVNode && this._mainVNode.elm
  17112. }, t.prototype._paintList = function (t, e, n) {
  17113. for (var i, r, o = t.length, a = [], s = 0, l = 0, u = 0; u < o; u++) {
  17114. var h = t[u];
  17115. if (!h.invisible) {
  17116. var c = h.__clipPaths,
  17117. p = c && c.length || 0,
  17118. d = r && r.length || 0,
  17119. f = void 0;
  17120. for (f = Math.max(p - 1, d - 1); f >= 0 && (!c || !r || c[f] !== r[f]); f--);
  17121. for (var g = d - 1; g > f; g--) i = a[--s - 1];
  17122. for (var y = f + 1; y < p; y++) {
  17123. var v = {};
  17124. zw(c[y], v, e);
  17125. var m = aw("g", "clip-g-" + l++, v, []);
  17126. (i ? i.children : n).push(m), a[s++] = m, i = m
  17127. }
  17128. r = c;
  17129. var x = Rw(h, e);
  17130. x && (i ? i.children : n).push(x)
  17131. }
  17132. }
  17133. }, t.prototype.resize = function (t, e) {
  17134. var n = this._opts,
  17135. i = this.root,
  17136. r = this._viewport;
  17137. if (null != t && (n.width = t), null != e && (n.height = e), i && r && (r.style.display = "none", t = $y(i, 0, n), e = $y(i, 1, n), r.style.display = ""), this._width !== t || this._height !== e) {
  17138. if (this._width = t, this._height = e, r) {
  17139. var o = r.style;
  17140. o.width = t + "px", o.height = e + "px"
  17141. }
  17142. if (vi(this._backgroundColor)) this.refresh();
  17143. else {
  17144. var a = this._svgDom;
  17145. a && (a.setAttribute("width", t), a.setAttribute("height", e));
  17146. var s = this._bgVNode && this._bgVNode.elm;
  17147. s && (s.setAttribute("width", t), s.setAttribute("height", e))
  17148. }
  17149. }
  17150. }, t.prototype.getWidth = function () {
  17151. return this._width
  17152. }, t.prototype.getHeight = function () {
  17153. return this._height
  17154. }, t.prototype.dispose = function () {
  17155. this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null
  17156. }, t.prototype.clear = function () {
  17157. this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null
  17158. }, t.prototype.toDataURL = function (t) {
  17159. var e = this.renderToString(),
  17160. n = "data:image/svg+xml;";
  17161. return t ? (e = Mi(e)) && n + "base64," + e : n + "charset=UTF-8," + encodeURIComponent(e)
  17162. }, t
  17163. }();
  17164. function iS(t) {
  17165. return function () {
  17166. 0
  17167. }
  17168. }
  17169. function rS(t, e, n) {
  17170. var i = h.createCanvas(),
  17171. r = e.getWidth(),
  17172. o = e.getHeight(),
  17173. a = i.style;
  17174. return a && (a.position = "absolute", a.left = "0", a.top = "0", a.width = r + "px", a.height = o + "px", i.setAttribute("data-zr-dom-id", t)), i.width = r * n, i.height = o * n, i
  17175. }
  17176. var oS = function (t) {
  17177. function e(e, n, i) {
  17178. var r, o = t.call(this) || this;
  17179. o.motionBlur = !1, o.lastFrameAlpha = .7, o.dpr = 1, o.virtual = !1, o.config = {}, o.incremental = !1, o.zlevel = 0, o.maxRepaintRectCount = 5, o.__dirty = !0, o.__firstTimePaint = !0, o.__used = !1, o.__drawIndex = 0, o.__startIndex = 0, o.__endIndex = 0, o.__prevStartIndex = null, o.__prevEndIndex = null, i = i || sr, "string" == typeof e ? r = rS(e, n, i) : q(e) && (e = (r = e).id), o.id = e, o.dom = r;
  17180. var a = r.style;
  17181. return a && (xt(r), r.onselectstart = function () {
  17182. return !1
  17183. }, a.padding = "0", a.margin = "0", a.borderWidth = "0"), o.painter = n, o.dpr = i, o
  17184. }
  17185. return n(e, t), e.prototype.getElementCount = function () {
  17186. return this.__endIndex - this.__startIndex
  17187. }, e.prototype.afterBrush = function () {
  17188. this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex
  17189. }, e.prototype.initContext = function () {
  17190. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr
  17191. }, e.prototype.setUnpainted = function () {
  17192. this.__firstTimePaint = !0
  17193. }, e.prototype.createBackBuffer = function () {
  17194. var t = this.dpr;
  17195. this.domBack = rS("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 !== t && this.ctxBack.scale(t, t)
  17196. }, e.prototype.createRepaintRects = function (t, e, n, i) {
  17197. if (this.__firstTimePaint) return this.__firstTimePaint = !1, null;
  17198. var r, o = [],
  17199. a = this.maxRepaintRectCount,
  17200. s = !1,
  17201. l = new ze(0, 0, 0, 0);
  17202. function u(t) {
  17203. if (t.isFinite() && !t.isZero())
  17204. if (0 === o.length) {
  17205. (e = new ze(0, 0, 0, 0)).copy(t), o.push(e)
  17206. } else {
  17207. for (var e, n = !1, i = 1 / 0, r = 0, u = 0; u < o.length; ++u) {
  17208. var h = o[u];
  17209. if (h.intersect(t)) {
  17210. var c = new ze(0, 0, 0, 0);
  17211. c.copy(h), c.union(t), o[u] = c, n = !0;
  17212. break
  17213. }
  17214. if (s) {
  17215. l.copy(t), l.union(h);
  17216. var p = t.width * t.height,
  17217. d = h.width * h.height,
  17218. f = l.width * l.height - p - d;
  17219. f < i && (i = f, r = u)
  17220. }
  17221. }
  17222. if (s && (o[r].union(t), n = !0), !n)(e = new ze(0, 0, 0, 0)).copy(t), o.push(e);
  17223. s || (s = o.length >= a)
  17224. }
  17225. }
  17226. for (var h = this.__startIndex; h < this.__endIndex; ++h) {
  17227. if (d = t[h]) {
  17228. var c = d.shouldBePainted(n, i, !0, !0);
  17229. (f = d.__isRendered && (1 & d.__dirty || !c) ? d.getPrevPaintRect() : null) && u(f);
  17230. var p = c && (1 & d.__dirty || !d.__isRendered) ? d.getPaintRect() : null;
  17231. p && u(p)
  17232. }
  17233. }
  17234. for (h = this.__prevStartIndex; h < this.__prevEndIndex; ++h) {
  17235. var d, f;
  17236. c = (d = e[h]) && d.shouldBePainted(n, i, !0, !0);
  17237. if (d && (!c || !d.__zr) && d.__isRendered)(f = d.getPrevPaintRect()) && u(f)
  17238. }
  17239. do {
  17240. r = !1;
  17241. for (h = 0; h < o.length;)
  17242. if (o[h].isZero()) o.splice(h, 1);
  17243. else {
  17244. for (var g = h + 1; g < o.length;) o[h].intersect(o[g]) ? (r = !0, o[h].union(o[g]), o.splice(g, 1)) : g++;
  17245. h++
  17246. }
  17247. } while (r);
  17248. return this._paintRects = o, o
  17249. }, e.prototype.debugGetPaintRects = function () {
  17250. return (this._paintRects || []).slice()
  17251. }, e.prototype.resize = function (t, e) {
  17252. var n = this.dpr,
  17253. i = this.dom,
  17254. r = i.style,
  17255. o = this.domBack;
  17256. r && (r.width = t + "px", r.height = e + "px"), i.width = t * n, i.height = e * n, o && (o.width = t * n, o.height = e * n, 1 !== n && this.ctxBack.scale(n, n))
  17257. }, e.prototype.clear = function (t, e, n) {
  17258. var i = this.dom,
  17259. r = this.ctx,
  17260. o = i.width,
  17261. a = i.height;
  17262. e = e || this.clearColor;
  17263. var s = this.motionBlur && !t,
  17264. l = this.lastFrameAlpha,
  17265. u = this.dpr,
  17266. h = this;
  17267. s && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, o / u, a / u));
  17268. var c = this.domBack;
  17269. function p(t, n, i, o) {
  17270. if (r.clearRect(t, n, i, o), e && "transparent" !== e) {
  17271. var a = void 0;
  17272. if (Q(e)) a = (e.global || e.__width === i && e.__height === o) && e.__canvasGradient || qy(r, e, {
  17273. x: 0,
  17274. y: 0,
  17275. width: i,
  17276. height: o
  17277. }), e.__canvasGradient = a, e.__width = i, e.__height = o;
  17278. else tt(e) && (e.scaleX = e.scaleX || u, e.scaleY = e.scaleY || u, a = ov(r, e, {
  17279. dirty: function () {
  17280. h.setUnpainted(), h.painter.refresh()
  17281. }
  17282. }));
  17283. r.save(), r.fillStyle = a || e, r.fillRect(t, n, i, o), r.restore()
  17284. }
  17285. s && (r.save(), r.globalAlpha = l, r.drawImage(c, t, n, i, o), r.restore())
  17286. }!n || s ? p(0, 0, o, a) : n.length && E(n, (function (t) {
  17287. p(t.x * u, t.y * u, t.width * u, t.height * u)
  17288. }))
  17289. }, e
  17290. }(jt),
  17291. aS = 1e5,
  17292. sS = 314159,
  17293. lS = .01;
  17294. var uS = function () {
  17295. function t(t, e, n, i) {
  17296. this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
  17297. var r = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  17298. this._opts = n = A({}, n || {}), this.dpr = n.devicePixelRatio || sr, this._singleCanvas = r, this.root = t, t.style && (xt(t), t.innerHTML = ""), this.storage = e;
  17299. var o = this._zlevelList;
  17300. this._prevDisplayList = [];
  17301. var a = this._layers;
  17302. if (r) {
  17303. var s = t,
  17304. l = s.width,
  17305. u = s.height;
  17306. null != n.width && (l = n.width), null != n.height && (u = n.height), this.dpr = n.devicePixelRatio || 1, s.width = l * this.dpr, s.height = u * this.dpr, this._width = l, this._height = u;
  17307. var h = new oS(s, this, this.dpr);
  17308. h.__builtin__ = !0, h.initContext(), a[314159] = h, h.zlevel = sS, o.push(sS), this._domRoot = t
  17309. } else {
  17310. this._width = $y(t, 0, n), this._height = $y(t, 1, n);
  17311. var c = this._domRoot = function (t, e) {
  17312. var n = document.createElement("div");
  17313. return n.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", n
  17314. }(this._width, this._height);
  17315. t.appendChild(c)
  17316. }
  17317. }
  17318. return t.prototype.getType = function () {
  17319. return "canvas"
  17320. }, t.prototype.isSingleCanvas = function () {
  17321. return this._singleCanvas
  17322. }, t.prototype.getViewportRoot = function () {
  17323. return this._domRoot
  17324. }, t.prototype.getViewportRootOffset = function () {
  17325. var t = this.getViewportRoot();
  17326. if (t) return {
  17327. offsetLeft: t.offsetLeft || 0,
  17328. offsetTop: t.offsetTop || 0
  17329. }
  17330. }, t.prototype.refresh = function (t) {
  17331. var e = this.storage.getDisplayList(!0),
  17332. n = this._prevDisplayList,
  17333. i = this._zlevelList;
  17334. this._redrawId = Math.random(), this._paintList(e, n, t, this._redrawId);
  17335. for (var r = 0; r < i.length; r++) {
  17336. var o = i[r],
  17337. a = this._layers[o];
  17338. if (!a.__builtin__ && a.refresh) {
  17339. var s = 0 === r ? this._backgroundColor : null;
  17340. a.refresh(s)
  17341. }
  17342. }
  17343. return this._opts.useDirtyRect && (this._prevDisplayList = e.slice()), this
  17344. }, t.prototype.refreshHover = function () {
  17345. this._paintHoverList(this.storage.getDisplayList(!1))
  17346. }, t.prototype._paintHoverList = function (t) {
  17347. var e = t.length,
  17348. n = this._hoverlayer;
  17349. if (n && n.clear(), e) {
  17350. for (var i, r = {
  17351. inHover: !0,
  17352. viewWidth: this._width,
  17353. viewHeight: this._height
  17354. }, o = 0; o < e; o++) {
  17355. var a = t[o];
  17356. a.__inHover && (n || (n = this._hoverlayer = this.getLayer(aS)), i || (i = n.ctx).save(), fv(i, a, r, o === e - 1))
  17357. }
  17358. i && i.restore()
  17359. }
  17360. }, t.prototype.getHoverLayer = function () {
  17361. return this.getLayer(aS)
  17362. }, t.prototype.paintOne = function (t, e) {
  17363. dv(t, e)
  17364. }, t.prototype._paintList = function (t, e, n, i) {
  17365. if (this._redrawId === i) {
  17366. n = n || !1, this._updateLayerStatus(t);
  17367. var r = this._doPaintList(t, e, n),
  17368. o = r.finished,
  17369. a = r.needsRefreshHover;
  17370. if (this._needsManuallyCompositing && this._compositeManually(), a && this._paintHoverList(t), o) this.eachLayer((function (t) {
  17371. t.afterBrush && t.afterBrush()
  17372. }));
  17373. else {
  17374. var s = this;
  17375. on((function () {
  17376. s._paintList(t, e, n, i)
  17377. }))
  17378. }
  17379. }
  17380. }, t.prototype._compositeManually = function () {
  17381. var t = this.getLayer(sS).ctx,
  17382. e = this._domRoot.width,
  17383. n = this._domRoot.height;
  17384. t.clearRect(0, 0, e, n), this.eachBuiltinLayer((function (i) {
  17385. i.virtual && t.drawImage(i.dom, 0, 0, e, n)
  17386. }))
  17387. }, t.prototype._doPaintList = function (t, e, n) {
  17388. for (var i = this, o = [], a = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  17389. var l = this._zlevelList[s],
  17390. u = this._layers[l];
  17391. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || n) && o.push(u)
  17392. }
  17393. for (var h = !0, c = !1, p = function (r) {
  17394. var s, l = o[r],
  17395. u = l.ctx,
  17396. p = a && l.createRepaintRects(t, e, d._width, d._height),
  17397. f = n ? l.__startIndex : l.__drawIndex,
  17398. g = !n && l.incremental && Date.now,
  17399. y = g && Date.now(),
  17400. v = l.zlevel === d._zlevelList[0] ? d._backgroundColor : null;
  17401. if (l.__startIndex === l.__endIndex) l.clear(!1, v, p);
  17402. else if (f === l.__startIndex) {
  17403. var m = t[f];
  17404. m.incremental && m.notClear && !n || l.clear(!1, v, p)
  17405. } - 1 === f && (console.error("For some unknown reason. drawIndex is -1"), f = l.__startIndex);
  17406. var x = function (e) {
  17407. var n = {
  17408. inHover: !1,
  17409. allClipped: !1,
  17410. prevEl: null,
  17411. viewWidth: i._width,
  17412. viewHeight: i._height
  17413. };
  17414. for (s = f; s < l.__endIndex; s++) {
  17415. var r = t[s];
  17416. if (r.__inHover && (c = !0), i._doPaintEl(r, l, a, e, n, s === l.__endIndex - 1), g)
  17417. if (Date.now() - y > 15) break
  17418. }
  17419. n.prevElClipPaths && u.restore()
  17420. };
  17421. if (p)
  17422. if (0 === p.length) s = l.__endIndex;
  17423. else
  17424. for (var _ = d.dpr, b = 0; b < p.length; ++b) {
  17425. var w = p[b];
  17426. u.save(), u.beginPath(), u.rect(w.x * _, w.y * _, w.width * _, w.height * _), u.clip(), x(w), u.restore()
  17427. } else u.save(), x(), u.restore();
  17428. l.__drawIndex = s, l.__drawIndex < l.__endIndex && (h = !1)
  17429. }, d = this, f = 0; f < o.length; f++) p(f);
  17430. return r.wxa && E(this._layers, (function (t) {
  17431. t && t.ctx && t.ctx.draw && t.ctx.draw()
  17432. })), {
  17433. finished: h,
  17434. needsRefreshHover: c
  17435. }
  17436. }, t.prototype._doPaintEl = function (t, e, n, i, r, o) {
  17437. var a = e.ctx;
  17438. if (n) {
  17439. var s = t.getPaintRect();
  17440. (!i || s && s.intersect(i)) && (fv(a, t, r, o), t.setPrevPaintRect(s))
  17441. } else fv(a, t, r, o)
  17442. }, t.prototype.getLayer = function (t, e) {
  17443. this._singleCanvas && !this._needsManuallyCompositing && (t = sS);
  17444. var n = this._layers[t];
  17445. return n || ((n = new oS("zr_" + t, this, this.dpr)).zlevel = t, n.__builtin__ = !0, this._layerConfig[t] ? C(n, this._layerConfig[t], !0) : this._layerConfig[t - lS] && C(n, this._layerConfig[t - lS], !0), e && (n.virtual = e), this.insertLayer(t, n), n.initContext()), n
  17446. }, t.prototype.insertLayer = function (t, e) {
  17447. var n = this._layers,
  17448. i = this._zlevelList,
  17449. r = i.length,
  17450. o = this._domRoot,
  17451. a = null,
  17452. s = -1;
  17453. if (!n[t] && function (t) {
  17454. return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
  17455. }(e)) {
  17456. if (r > 0 && t > i[0]) {
  17457. for (s = 0; s < r - 1 && !(i[s] < t && i[s + 1] > t); s++);
  17458. a = n[i[s]]
  17459. }
  17460. if (i.splice(s + 1, 0, t), n[t] = e, !e.virtual)
  17461. if (a) {
  17462. var l = a.dom;
  17463. l.nextSibling ? o.insertBefore(e.dom, l.nextSibling) : o.appendChild(e.dom)
  17464. } else o.firstChild ? o.insertBefore(e.dom, o.firstChild) : o.appendChild(e.dom);
  17465. e.painter || (e.painter = this)
  17466. }
  17467. }, t.prototype.eachLayer = function (t, e) {
  17468. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17469. var r = n[i];
  17470. t.call(e, this._layers[r], r)
  17471. }
  17472. }, t.prototype.eachBuiltinLayer = function (t, e) {
  17473. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17474. var r = n[i],
  17475. o = this._layers[r];
  17476. o.__builtin__ && t.call(e, o, r)
  17477. }
  17478. }, t.prototype.eachOtherLayer = function (t, e) {
  17479. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  17480. var r = n[i],
  17481. o = this._layers[r];
  17482. o.__builtin__ || t.call(e, o, r)
  17483. }
  17484. }, t.prototype.getLayers = function () {
  17485. return this._layers
  17486. }, t.prototype._updateLayerStatus = function (t) {
  17487. function e(t) {
  17488. o && (o.__endIndex !== t && (o.__dirty = !0), o.__endIndex = t)
  17489. }
  17490. if (this.eachBuiltinLayer((function (t, e) {
  17491. t.__dirty = t.__used = !1
  17492. })), this._singleCanvas)
  17493. for (var n = 1; n < t.length; n++) {
  17494. if ((s = t[n]).zlevel !== t[n - 1].zlevel || s.incremental) {
  17495. this._needsManuallyCompositing = !0;
  17496. break
  17497. }
  17498. }
  17499. var i, r, o = null,
  17500. a = 0;
  17501. for (r = 0; r < t.length; r++) {
  17502. var s, l = (s = t[r]).zlevel,
  17503. u = void 0;
  17504. i !== l && (i = l, a = 0), s.incremental ? ((u = this.getLayer(l + .001, this._needsManuallyCompositing)).incremental = !0, a = 1) : u = this.getLayer(l + (a > 0 ? lS : 0), this._needsManuallyCompositing), u.__builtin__ || I("ZLevel " + l + " has been used by unkown layer " + u.id), u !== o && (u.__used = !0, u.__startIndex !== r && (u.__dirty = !0), u.__startIndex = r, u.incremental ? u.__drawIndex = -1 : u.__drawIndex = r, e(r), o = u), 1 & s.__dirty && !s.__inHover && (u.__dirty = !0, u.incremental && u.__drawIndex < 0 && (u.__drawIndex = r))
  17505. }
  17506. e(r), this.eachBuiltinLayer((function (t, e) {
  17507. !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex)
  17508. }))
  17509. }, t.prototype.clear = function () {
  17510. return this.eachBuiltinLayer(this._clearLayer), this
  17511. }, t.prototype._clearLayer = function (t) {
  17512. t.clear()
  17513. }, t.prototype.setBackgroundColor = function (t) {
  17514. this._backgroundColor = t, E(this._layers, (function (t) {
  17515. t.setUnpainted()
  17516. }))
  17517. }, t.prototype.configLayer = function (t, e) {
  17518. if (e) {
  17519. var n = this._layerConfig;
  17520. n[t] ? C(n[t], e, !0) : n[t] = e;
  17521. for (var i = 0; i < this._zlevelList.length; i++) {
  17522. var r = this._zlevelList[i];
  17523. if (r === t || r === t + lS) C(this._layers[r], n[t], !0)
  17524. }
  17525. }
  17526. }, t.prototype.delLayer = function (t) {
  17527. var e = this._layers,
  17528. n = this._zlevelList,
  17529. i = e[t];
  17530. i && (i.dom.parentNode.removeChild(i.dom), delete e[t], n.splice(P(n, t), 1))
  17531. }, t.prototype.resize = function (t, e) {
  17532. if (this._domRoot.style) {
  17533. var n = this._domRoot;
  17534. n.style.display = "none";
  17535. var i = this._opts,
  17536. r = this.root;
  17537. if (null != t && (i.width = t), null != e && (i.height = e), t = $y(r, 0, i), e = $y(r, 1, i), n.style.display = "", this._width !== t || e !== this._height) {
  17538. for (var o in n.style.width = t + "px", n.style.height = e + "px", this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e);
  17539. this.refresh(!0)
  17540. }
  17541. this._width = t, this._height = e
  17542. } else {
  17543. if (null == t || null == e) return;
  17544. this._width = t, this._height = e, this.getLayer(sS).resize(t, e)
  17545. }
  17546. return this
  17547. }, t.prototype.clearLayer = function (t) {
  17548. var e = this._layers[t];
  17549. e && e.clear()
  17550. }, t.prototype.dispose = function () {
  17551. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null
  17552. }, t.prototype.getRenderedCanvas = function (t) {
  17553. if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[314159].dom;
  17554. var e = new oS("image", this, t.pixelRatio || this.dpr);
  17555. e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor);
  17556. var n = e.ctx;
  17557. if (t.pixelRatio <= this.dpr) {
  17558. this.refresh();
  17559. var i = e.dom.width,
  17560. r = e.dom.height;
  17561. this.eachLayer((function (t) {
  17562. t.__builtin__ ? n.drawImage(t.dom, 0, 0, i, r) : t.renderToCanvas && (n.save(), t.renderToCanvas(n), n.restore())
  17563. }))
  17564. } else
  17565. for (var o = {
  17566. inHover: !1,
  17567. viewWidth: this._width,
  17568. viewHeight: this._height
  17569. }, a = this.storage.getDisplayList(!0), s = 0, l = a.length; s < l; s++) {
  17570. var u = a[s];
  17571. fv(n, u, o, s === l - 1)
  17572. }
  17573. return e.dom
  17574. }, t.prototype.getWidth = function () {
  17575. return this._width
  17576. }, t.prototype.getHeight = function () {
  17577. return this._height
  17578. }, t
  17579. }();
  17580. var hS = function (t) {
  17581. function e() {
  17582. var n = null !== t && t.apply(this, arguments) || this;
  17583. return n.type = e.type, n.hasSymbolVisual = !0, n
  17584. }
  17585. return n(e, t), e.prototype.getInitialData = function (t) {
  17586. return _x(null, this, {
  17587. useEncodeDefaulter: !0
  17588. })
  17589. }, e.prototype.getLegendIcon = function (t) {
  17590. var e = new Br,
  17591. n = Xy("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1);
  17592. e.add(n), n.setStyle(t.lineStyle);
  17593. var i = this.getData().getVisual("symbol"),
  17594. r = this.getData().getVisual("symbolRotate"),
  17595. o = "none" === i ? "circle" : i,
  17596. a = .8 * t.itemHeight,
  17597. s = Xy(o, (t.itemWidth - a) / 2, (t.itemHeight - a) / 2, a, a, t.itemStyle.fill);
  17598. e.add(s), s.setStyle(t.itemStyle);
  17599. var l = "inherit" === t.iconRotate ? r : t.iconRotate || 0;
  17600. return s.rotation = l * Math.PI / 180, s.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), o.indexOf("empty") > -1 && (s.style.stroke = s.style.fill, s.style.fill = "#fff", s.style.lineWidth = 2), e
  17601. }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
  17602. z: 3,
  17603. coordinateSystem: "cartesian2d",
  17604. legendHoverLink: !0,
  17605. clip: !0,
  17606. label: {
  17607. position: "top"
  17608. },
  17609. endLabel: {
  17610. show: !1,
  17611. valueAnimation: !0,
  17612. distance: 8
  17613. },
  17614. lineStyle: {
  17615. width: 2,
  17616. type: "solid"
  17617. },
  17618. emphasis: {
  17619. scale: !0
  17620. },
  17621. step: !1,
  17622. smooth: !1,
  17623. smoothMonotone: null,
  17624. symbol: "emptyCircle",
  17625. symbolSize: 4,
  17626. symbolRotate: null,
  17627. showSymbol: !0,
  17628. showAllSymbol: "auto",
  17629. connectNulls: !1,
  17630. sampling: "none",
  17631. animationEasing: "linear",
  17632. progressive: 0,
  17633. hoverLayerThreshold: 1 / 0,
  17634. universalTransition: {
  17635. divideShape: "clone"
  17636. },
  17637. triggerLineEvent: !1
  17638. }, e
  17639. }(bg);
  17640. function cS(t, e) {
  17641. var n = t.mapDimensionsAll("defaultedLabel"),
  17642. i = n.length;
  17643. if (1 === i) {
  17644. var r = mf(t, e, n[0]);
  17645. return null != r ? r + "" : null
  17646. }
  17647. if (i) {
  17648. for (var o = [], a = 0; a < n.length; a++) o.push(mf(t, e, n[a]));
  17649. return o.join(" ")
  17650. }
  17651. }
  17652. function pS(t, e) {
  17653. var n = t.mapDimensionsAll("defaultedLabel");
  17654. if (!Y(e)) return e + "";
  17655. for (var i = [], r = 0; r < n.length; r++) {
  17656. var o = t.getDimensionIndex(n[r]);
  17657. o >= 0 && i.push(e[o])
  17658. }
  17659. return i.join(" ")
  17660. }
  17661. var dS = function (t) {
  17662. function e(e, n, i, r) {
  17663. var o = t.call(this) || this;
  17664. return o.updateData(e, n, i, r), o
  17665. }
  17666. return n(e, t), e.prototype._createSymbol = function (t, e, n, i, r) {
  17667. this.removeAll();
  17668. var o = Xy(t, -1, -1, 2, 2, null, r);
  17669. o.attr({
  17670. z2: 100,
  17671. culling: !0,
  17672. scaleX: i[0] / 2,
  17673. scaleY: i[1] / 2
  17674. }), o.drift = fS, this._symbolType = t, this.add(o)
  17675. }, e.prototype.stopSymbolAnimation = function (t) {
  17676. this.childAt(0).stopAnimation(null, t)
  17677. }, e.prototype.getSymbolType = function () {
  17678. return this._symbolType
  17679. }, e.prototype.getSymbolPath = function () {
  17680. return this.childAt(0)
  17681. }, e.prototype.highlight = function () {
  17682. Ol(this.childAt(0))
  17683. }, e.prototype.downplay = function () {
  17684. Rl(this.childAt(0))
  17685. }, e.prototype.setZ = function (t, e) {
  17686. var n = this.childAt(0);
  17687. n.zlevel = t, n.z = e
  17688. }, e.prototype.setDraggable = function (t, e) {
  17689. var n = this.childAt(0);
  17690. n.draggable = t, n.cursor = !e && t ? "move" : n.cursor
  17691. }, e.prototype.updateData = function (t, n, i, r) {
  17692. this.silent = !1;
  17693. var o = t.getItemVisual(n, "symbol") || "circle",
  17694. a = t.hostModel,
  17695. s = e.getSymbolSize(t, n),
  17696. l = o !== this._symbolType,
  17697. u = r && r.disableAnimation;
  17698. if (l) {
  17699. var h = t.getItemVisual(n, "symbolKeepAspect");
  17700. this._createSymbol(o, t, n, s, h)
  17701. } else {
  17702. (p = this.childAt(0)).silent = !1;
  17703. var c = {
  17704. scaleX: s[0] / 2,
  17705. scaleY: s[1] / 2
  17706. };
  17707. u ? p.attr(c) : vh(p, c, a, n), Sh(p)
  17708. }
  17709. if (this._updateCommon(t, n, s, i, r), l) {
  17710. var p = this.childAt(0);
  17711. if (!u) {
  17712. c = {
  17713. scaleX: this._sizeX,
  17714. scaleY: this._sizeY,
  17715. style: {
  17716. opacity: p.style.opacity
  17717. }
  17718. };
  17719. p.scaleX = p.scaleY = 0, p.style.opacity = 0, mh(p, c, a, n)
  17720. }
  17721. }
  17722. u && this.childAt(0).stopAnimation("leave")
  17723. }, e.prototype._updateCommon = function (t, e, n, i, r) {
  17724. var o, a, s, l, u, h, c, p, d, f = this.childAt(0),
  17725. g = t.hostModel;
  17726. if (i && (o = i.emphasisItemStyle, a = i.blurItemStyle, s = i.selectItemStyle, l = i.focus, u = i.blurScope, c = i.labelStatesModels, p = i.hoverScale, d = i.cursorStyle, h = i.emphasisDisabled), !i || t.hasItemOption) {
  17727. var y = i && i.itemModel ? i.itemModel : t.getItemModel(e),
  17728. v = y.getModel("emphasis");
  17729. o = v.getModel("itemStyle").getItemStyle(), s = y.getModel(["select", "itemStyle"]).getItemStyle(), a = y.getModel(["blur", "itemStyle"]).getItemStyle(), l = v.get("focus"), u = v.get("blurScope"), h = v.get("disabled"), c = rc(y), p = v.getShallow("scale"), d = y.getShallow("cursor")
  17730. }
  17731. var m = t.getItemVisual(e, "symbolRotate");
  17732. f.attr("rotation", (m || 0) * Math.PI / 180 || 0);
  17733. var x = Zy(t.getItemVisual(e, "symbolOffset"), n);
  17734. x && (f.x = x[0], f.y = x[1]), d && f.attr("cursor", d);
  17735. var _ = t.getItemVisual(e, "style"),
  17736. b = _.fill;
  17737. if (f instanceof Ns) {
  17738. var w = f.style;
  17739. f.useStyle(A({
  17740. image: w.image,
  17741. x: w.x,
  17742. y: w.y,
  17743. width: w.width,
  17744. height: w.height
  17745. }, _))
  17746. } else f.__isEmptyBrush ? f.useStyle(A({}, _)) : f.useStyle(_), f.style.decal = null, f.setColor(b, r && r.symbolInnerColor), f.style.strokeNoScale = !0;
  17747. var S = t.getItemVisual(e, "liftZ"),
  17748. M = this._z2;
  17749. null != S ? null == M && (this._z2 = f.z2, f.z2 += S) : null != M && (f.z2 = M, this._z2 = null);
  17750. var I = r && r.useNameLabel;
  17751. ic(f, c, {
  17752. labelFetcher: g,
  17753. labelDataIndex: e,
  17754. defaultText: function (e) {
  17755. return I ? t.getName(e) : cS(t, e)
  17756. },
  17757. inheritColor: b,
  17758. defaultOpacity: _.opacity
  17759. }), this._sizeX = n[0] / 2, this._sizeY = n[1] / 2;
  17760. var T = f.ensureState("emphasis");
  17761. T.style = o, f.ensureState("select").style = s, f.ensureState("blur").style = a;
  17762. var C = null == p || !0 === p ? Math.max(1.1, 3 / this._sizeY) : isFinite(p) && p > 0 ? +p : 1;
  17763. T.scaleX = this._sizeX * C, T.scaleY = this._sizeY * C, this.setSymbolScale(1), Zl(this, l, u, h)
  17764. }, e.prototype.setSymbolScale = function (t) {
  17765. this.scaleX = this.scaleY = t
  17766. }, e.prototype.fadeOut = function (t, e, n) {
  17767. var i = this.childAt(0),
  17768. r = rl(this).dataIndex,
  17769. o = n && n.animation;
  17770. if (this.silent = i.silent = !0, n && n.fadeLabel) {
  17771. var a = i.getTextContent();
  17772. a && _h(a, {
  17773. style: {
  17774. opacity: 0
  17775. }
  17776. }, e, {
  17777. dataIndex: r,
  17778. removeOpt: o,
  17779. cb: function () {
  17780. i.removeTextContent()
  17781. }
  17782. })
  17783. } else i.removeTextContent();
  17784. _h(i, {
  17785. style: {
  17786. opacity: 0
  17787. },
  17788. scaleX: 0,
  17789. scaleY: 0
  17790. }, e, {
  17791. dataIndex: r,
  17792. cb: t,
  17793. removeOpt: o
  17794. })
  17795. }, e.getSymbolSize = function (t, e) {
  17796. return Uy(t.getItemVisual(e, "symbolSize"))
  17797. }, e
  17798. }(Br);
  17799. function fS(t, e) {
  17800. this.parent.drift(t, e)
  17801. }
  17802. function gS(t, e, n, i) {
  17803. return e && !isNaN(e[0]) && !isNaN(e[1]) && !(i.isIgnore && i.isIgnore(n)) && !(i.clipShape && !i.clipShape.contain(e[0], e[1])) && "none" !== t.getItemVisual(n, "symbol")
  17804. }
  17805. function yS(t) {
  17806. return null == t || q(t) || (t = {
  17807. isIgnore: t
  17808. }), t || {}
  17809. }
  17810. function vS(t) {
  17811. var e = t.hostModel,
  17812. n = e.getModel("emphasis");
  17813. return {
  17814. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  17815. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  17816. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  17817. focus: n.get("focus"),
  17818. blurScope: n.get("blurScope"),
  17819. emphasisDisabled: n.get("disabled"),
  17820. hoverScale: n.get("scale"),
  17821. labelStatesModels: rc(e),
  17822. cursorStyle: e.get("cursor")
  17823. }
  17824. }
  17825. var mS = function () {
  17826. function t(t) {
  17827. this.group = new Br, this._SymbolCtor = t || dS
  17828. }
  17829. return t.prototype.updateData = function (t, e) {
  17830. this._progressiveEls = null, e = yS(e);
  17831. var n = this.group,
  17832. i = t.hostModel,
  17833. r = this._data,
  17834. o = this._SymbolCtor,
  17835. a = e.disableAnimation,
  17836. s = vS(t),
  17837. l = {
  17838. disableAnimation: a
  17839. },
  17840. u = e.getSymbolPoint || function (e) {
  17841. return t.getItemLayout(e)
  17842. };
  17843. r || n.removeAll(), t.diff(r).add((function (i) {
  17844. var r = u(i);
  17845. if (gS(t, r, i, e)) {
  17846. var a = new o(t, i, s, l);
  17847. a.setPosition(r), t.setItemGraphicEl(i, a), n.add(a)
  17848. }
  17849. })).update((function (h, c) {
  17850. var p = r.getItemGraphicEl(c),
  17851. d = u(h);
  17852. if (gS(t, d, h, e)) {
  17853. var f = t.getItemVisual(h, "symbol") || "circle",
  17854. g = p && p.getSymbolType && p.getSymbolType();
  17855. if (!p || g && g !== f) n.remove(p), (p = new o(t, h, s, l)).setPosition(d);
  17856. else {
  17857. p.updateData(t, h, s, l);
  17858. var y = {
  17859. x: d[0],
  17860. y: d[1]
  17861. };
  17862. a ? p.attr(y) : vh(p, y, i)
  17863. }
  17864. n.add(p), t.setItemGraphicEl(h, p)
  17865. } else n.remove(p)
  17866. })).remove((function (t) {
  17867. var e = r.getItemGraphicEl(t);
  17868. e && e.fadeOut((function () {
  17869. n.remove(e)
  17870. }), i)
  17871. })).execute(), this._getSymbolPoint = u, this._data = t
  17872. }, t.prototype.updateLayout = function () {
  17873. var t = this,
  17874. e = this._data;
  17875. e && e.eachItemGraphicEl((function (e, n) {
  17876. var i = t._getSymbolPoint(n);
  17877. e.setPosition(i), e.markRedraw()
  17878. }))
  17879. }, t.prototype.incrementalPrepareUpdate = function (t) {
  17880. this._seriesScope = vS(t), this._data = null, this.group.removeAll()
  17881. }, t.prototype.incrementalUpdate = function (t, e, n) {
  17882. function i(t) {
  17883. t.isGroup || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  17884. }
  17885. this._progressiveEls = [], n = yS(n);
  17886. for (var r = t.start; r < t.end; r++) {
  17887. var o = e.getItemLayout(r);
  17888. if (gS(e, o, r, n)) {
  17889. var a = new this._SymbolCtor(e, r, this._seriesScope);
  17890. a.traverse(i), a.setPosition(o), this.group.add(a), e.setItemGraphicEl(r, a), this._progressiveEls.push(a)
  17891. }
  17892. }
  17893. }, t.prototype.eachRendered = function (t) {
  17894. Jh(this._progressiveEls || this.group, t)
  17895. }, t.prototype.remove = function (t) {
  17896. var e = this.group,
  17897. n = this._data;
  17898. n && t ? n.eachItemGraphicEl((function (t) {
  17899. t.fadeOut((function () {
  17900. e.remove(t)
  17901. }), n.hostModel)
  17902. })) : e.removeAll()
  17903. }, t
  17904. }();
  17905. function xS(t, e, n) {
  17906. var i = t.getBaseAxis(),
  17907. r = t.getOtherAxis(i),
  17908. o = function (t, e) {
  17909. var n = 0,
  17910. i = t.scale.getExtent();
  17911. "start" === e ? n = i[0] : "end" === e ? n = i[1] : j(e) && !isNaN(e) ? n = e : i[0] > 0 ? n = i[0] : i[1] < 0 && (n = i[1]);
  17912. return n
  17913. }(r, n),
  17914. a = i.dim,
  17915. s = r.dim,
  17916. l = e.mapDimension(s),
  17917. u = e.mapDimension(a),
  17918. h = "x" === s || "radius" === s ? 1 : 0,
  17919. c = z(t.dimensions, (function (t) {
  17920. return e.mapDimension(t)
  17921. })),
  17922. p = !1,
  17923. d = e.getCalculationInfo("stackResultDimension");
  17924. return mx(e, c[0]) && (p = !0, c[0] = d), mx(e, c[1]) && (p = !0, c[1] = d), {
  17925. dataDimsForPoint: c,
  17926. valueStart: o,
  17927. valueAxisDim: s,
  17928. baseAxisDim: a,
  17929. stacked: !!p,
  17930. valueDim: l,
  17931. baseDim: u,
  17932. baseDataOffset: h,
  17933. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  17934. }
  17935. }
  17936. function _S(t, e, n, i) {
  17937. var r = NaN;
  17938. t.stacked && (r = n.get(n.getCalculationInfo("stackedOverDimension"), i)), isNaN(r) && (r = t.valueStart);
  17939. var o = t.baseDataOffset,
  17940. a = [];
  17941. return a[o] = n.get(t.baseDim, i), a[1 - o] = r, e.dataToPoint(a)
  17942. }
  17943. var bS = Math.min,
  17944. wS = Math.max;
  17945. function SS(t, e) {
  17946. return isNaN(t) || isNaN(e)
  17947. }
  17948. function MS(t, e, n, i, r, o, a, s, l) {
  17949. for (var u, h, c, p, d, f, g = n, y = 0; y < i; y++) {
  17950. var v = e[2 * g],
  17951. m = e[2 * g + 1];
  17952. if (g >= r || g < 0) break;
  17953. if (SS(v, m)) {
  17954. if (l) {
  17955. g += o;
  17956. continue
  17957. }
  17958. break
  17959. }
  17960. if (g === n) t[o > 0 ? "moveTo" : "lineTo"](v, m), c = v, p = m;
  17961. else {
  17962. var x = v - u,
  17963. _ = m - h;
  17964. if (x * x + _ * _ < .5) {
  17965. g += o;
  17966. continue
  17967. }
  17968. if (a > 0) {
  17969. for (var b = g + o, w = e[2 * b], S = e[2 * b + 1]; w === v && S === m && y < i;) y++, g += o, w = e[2 * (b += o)], S = e[2 * b + 1], x = (v = e[2 * g]) - u, _ = (m = e[2 * g + 1]) - h;
  17970. var M = y + 1;
  17971. if (l)
  17972. for (; SS(w, S) && M < i;) M++, w = e[2 * (b += o)], S = e[2 * b + 1];
  17973. var I = .5,
  17974. T = 0,
  17975. C = 0,
  17976. D = void 0,
  17977. A = void 0;
  17978. if (M >= i || SS(w, S)) d = v, f = m;
  17979. else {
  17980. T = w - u, C = S - h;
  17981. var k = v - u,
  17982. L = w - v,
  17983. P = m - h,
  17984. O = S - m,
  17985. R = void 0,
  17986. N = void 0;
  17987. if ("x" === s) {
  17988. var E = T > 0 ? 1 : -1;
  17989. d = v - E * (R = Math.abs(k)) * a, f = m, D = v + E * (N = Math.abs(L)) * a, A = m
  17990. } else if ("y" === s) {
  17991. var z = C > 0 ? 1 : -1;
  17992. d = v, f = m - z * (R = Math.abs(P)) * a, D = v, A = m + z * (N = Math.abs(O)) * a
  17993. } else R = Math.sqrt(k * k + P * P), d = v - T * a * (1 - (I = (N = Math.sqrt(L * L + O * O)) / (N + R))), f = m - C * a * (1 - I), A = m + C * a * I, D = bS(D = v + T * a * I, wS(w, v)), A = bS(A, wS(S, m)), D = wS(D, bS(w, v)), f = m - (C = (A = wS(A, bS(S, m))) - m) * R / N, d = bS(d = v - (T = D - v) * R / N, wS(u, v)), f = bS(f, wS(h, m)), D = v + (T = v - (d = wS(d, bS(u, v)))) * N / R, A = m + (C = m - (f = wS(f, bS(h, m)))) * N / R
  17994. }
  17995. t.bezierCurveTo(c, p, d, f, v, m), c = D, p = A
  17996. } else t.lineTo(v, m)
  17997. }
  17998. u = v, h = m, g += o
  17999. }
  18000. return y
  18001. }
  18002. var IS = function () {
  18003. this.smooth = 0, this.smoothConstraint = !0
  18004. },
  18005. TS = function (t) {
  18006. function e(e) {
  18007. var n = t.call(this, e) || this;
  18008. return n.type = "ec-polyline", n
  18009. }
  18010. return n(e, t), e.prototype.getDefaultStyle = function () {
  18011. return {
  18012. stroke: "#000",
  18013. fill: null
  18014. }
  18015. }, e.prototype.getDefaultShape = function () {
  18016. return new IS
  18017. }, e.prototype.buildPath = function (t, e) {
  18018. var n = e.points,
  18019. i = 0,
  18020. r = n.length / 2;
  18021. if (e.connectNulls) {
  18022. for (; r > 0 && SS(n[2 * r - 2], n[2 * r - 1]); r--);
  18023. for (; i < r && SS(n[2 * i], n[2 * i + 1]); i++);
  18024. }
  18025. for (; i < r;) i += MS(t, n, i, r, r, 1, e.smooth, e.smoothMonotone, e.connectNulls) + 1
  18026. }, e.prototype.getPointOn = function (t, e) {
  18027. this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
  18028. for (var n, i, r = this.path.data, o = hs.CMD, a = "x" === e, s = [], l = 0; l < r.length;) {
  18029. var u = void 0,
  18030. h = void 0,
  18031. c = void 0,
  18032. p = void 0,
  18033. d = void 0,
  18034. f = void 0,
  18035. g = void 0;
  18036. switch (r[l++]) {
  18037. case o.M:
  18038. n = r[l++], i = r[l++];
  18039. break;
  18040. case o.L:
  18041. if (u = r[l++], h = r[l++], (g = a ? (t - n) / (u - n) : (t - i) / (h - i)) <= 1 && g >= 0) {
  18042. var y = a ? (h - i) * g + i : (u - n) * g + n;
  18043. return a ? [t, y] : [y, t]
  18044. }
  18045. n = u, i = h;
  18046. break;
  18047. case o.C:
  18048. u = r[l++], h = r[l++], c = r[l++], p = r[l++], d = r[l++], f = r[l++];
  18049. var v = a ? _n(n, u, c, d, t, s) : _n(i, h, p, f, t, s);
  18050. if (v > 0)
  18051. for (var m = 0; m < v; m++) {
  18052. var x = s[m];
  18053. if (x <= 1 && x >= 0) {
  18054. y = a ? mn(i, h, p, f, x) : mn(n, u, c, d, x);
  18055. return a ? [t, y] : [y, t]
  18056. }
  18057. }
  18058. n = d, i = f
  18059. }
  18060. }
  18061. }, e
  18062. }(ks),
  18063. CS = function (t) {
  18064. function e() {
  18065. return null !== t && t.apply(this, arguments) || this
  18066. }
  18067. return n(e, t), e
  18068. }(IS),
  18069. DS = function (t) {
  18070. function e(e) {
  18071. var n = t.call(this, e) || this;
  18072. return n.type = "ec-polygon", n
  18073. }
  18074. return n(e, t), e.prototype.getDefaultShape = function () {
  18075. return new CS
  18076. }, e.prototype.buildPath = function (t, e) {
  18077. var n = e.points,
  18078. i = e.stackedOnPoints,
  18079. r = 0,
  18080. o = n.length / 2,
  18081. a = e.smoothMonotone;
  18082. if (e.connectNulls) {
  18083. for (; o > 0 && SS(n[2 * o - 2], n[2 * o - 1]); o--);
  18084. for (; r < o && SS(n[2 * r], n[2 * r + 1]); r++);
  18085. }
  18086. for (; r < o;) {
  18087. var s = MS(t, n, r, o, o, 1, e.smooth, a, e.connectNulls);
  18088. MS(t, i, r + s - 1, s, o, -1, e.stackedOnSmooth, a, e.connectNulls), r += s + 1, t.closePath()
  18089. }
  18090. }, e
  18091. }(ks);
  18092. function AS(t, e, n, i, r) {
  18093. var o = t.getArea(),
  18094. a = o.x,
  18095. s = o.y,
  18096. l = o.width,
  18097. u = o.height,
  18098. h = n.get(["lineStyle", "width"]) || 2;
  18099. a -= h / 2, s -= h / 2, l += h, u += h, l = Math.ceil(l), a !== Math.floor(a) && (a = Math.floor(a), l++);
  18100. var c = new Ws({
  18101. shape: {
  18102. x: a,
  18103. y: s,
  18104. width: l,
  18105. height: u
  18106. }
  18107. });
  18108. if (e) {
  18109. var p = t.getBaseAxis(),
  18110. d = p.isHorizontal(),
  18111. f = p.inverse;
  18112. d ? (f && (c.shape.x += l), c.shape.width = 0) : (f || (c.shape.y += u), c.shape.height = 0);
  18113. var g = X(r) ? function (t) {
  18114. r(t, c)
  18115. } : null;
  18116. mh(c, {
  18117. shape: {
  18118. width: l,
  18119. height: u,
  18120. x: a,
  18121. y: s
  18122. }
  18123. }, n, null, i, g)
  18124. }
  18125. return c
  18126. }
  18127. function kS(t, e, n) {
  18128. var i = t.getArea(),
  18129. r = Jr(i.r0, 1),
  18130. o = Jr(i.r, 1),
  18131. a = new Fu({
  18132. shape: {
  18133. cx: Jr(t.cx, 1),
  18134. cy: Jr(t.cy, 1),
  18135. r0: r,
  18136. r: o,
  18137. startAngle: i.startAngle,
  18138. endAngle: i.endAngle,
  18139. clockwise: i.clockwise
  18140. }
  18141. });
  18142. e && ("angle" === t.getBaseAxis().dim ? a.shape.endAngle = i.startAngle : a.shape.r = r, mh(a, {
  18143. shape: {
  18144. endAngle: i.endAngle,
  18145. r: o
  18146. }
  18147. }, n));
  18148. return a
  18149. }
  18150. function LS(t, e, n, i, r) {
  18151. return t ? "polar" === t.type ? kS(t, e, n) : "cartesian2d" === t.type ? AS(t, e, n, i, r) : null : null
  18152. }
  18153. function PS(t, e) {
  18154. return t.type === e
  18155. }
  18156. function OS(t, e) {
  18157. if (t.length === e.length) {
  18158. for (var n = 0; n < t.length; n++)
  18159. if (t[n] !== e[n]) return;
  18160. return !0
  18161. }
  18162. }
  18163. function RS(t) {
  18164. for (var e = 1 / 0, n = 1 / 0, i = -1 / 0, r = -1 / 0, o = 0; o < t.length;) {
  18165. var a = t[o++],
  18166. s = t[o++];
  18167. isNaN(a) || (e = Math.min(a, e), i = Math.max(a, i)), isNaN(s) || (n = Math.min(s, n), r = Math.max(s, r))
  18168. }
  18169. return [
  18170. [e, n],
  18171. [i, r]
  18172. ]
  18173. }
  18174. function NS(t, e) {
  18175. var n = RS(t),
  18176. i = n[0],
  18177. r = n[1],
  18178. o = RS(e),
  18179. a = o[0],
  18180. s = o[1];
  18181. return Math.max(Math.abs(i[0] - a[0]), Math.abs(i[1] - a[1]), Math.abs(r[0] - s[0]), Math.abs(r[1] - s[1]))
  18182. }
  18183. function ES(t) {
  18184. return j(t) ? t : t ? .5 : 0
  18185. }
  18186. function zS(t, e, n, i) {
  18187. var r = e.getBaseAxis(),
  18188. o = "x" === r.dim || "radius" === r.dim ? 0 : 1,
  18189. a = [],
  18190. s = 0,
  18191. l = [],
  18192. u = [],
  18193. h = [],
  18194. c = [];
  18195. if (i) {
  18196. for (s = 0; s < t.length; s += 2) isNaN(t[s]) || isNaN(t[s + 1]) || c.push(t[s], t[s + 1]);
  18197. t = c
  18198. }
  18199. for (s = 0; s < t.length - 2; s += 2) switch (h[0] = t[s + 2], h[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], a.push(u[0], u[1]), n) {
  18200. case "end":
  18201. l[o] = h[o], l[1 - o] = u[1 - o], a.push(l[0], l[1]);
  18202. break;
  18203. case "middle":
  18204. var p = (u[o] + h[o]) / 2,
  18205. d = [];
  18206. l[o] = d[o] = p, l[1 - o] = u[1 - o], d[1 - o] = h[1 - o], a.push(l[0], l[1]), a.push(d[0], d[1]);
  18207. break;
  18208. default:
  18209. l[o] = u[o], l[1 - o] = h[1 - o], a.push(l[0], l[1])
  18210. }
  18211. return a.push(t[s++], t[s++]), a
  18212. }
  18213. function VS(t, e, n) {
  18214. var i = t.getVisual("visualMeta");
  18215. if (i && i.length && t.count() && "cartesian2d" === e.type) {
  18216. for (var r, o, a = i.length - 1; a >= 0; a--) {
  18217. var s = t.getDimensionInfo(i[a].dimension);
  18218. if ("x" === (r = s && s.coordDim) || "y" === r) {
  18219. o = i[a];
  18220. break
  18221. }
  18222. }
  18223. if (o) {
  18224. var l = e.getAxis(r),
  18225. u = z(o.stops, (function (t) {
  18226. return {
  18227. coord: l.toGlobalCoord(l.dataToCoord(t.value)),
  18228. color: t.color
  18229. }
  18230. })),
  18231. h = u.length,
  18232. c = o.outerColors.slice();
  18233. h && u[0].coord > u[h - 1].coord && (u.reverse(), c.reverse());
  18234. var p = function (t, e) {
  18235. var n, i, r = [],
  18236. o = t.length;
  18237. function a(t, e, n) {
  18238. var i = t.coord;
  18239. return {
  18240. coord: n,
  18241. color: ti((n - i) / (e.coord - i), [t.color, e.color])
  18242. }
  18243. }
  18244. for (var s = 0; s < o; s++) {
  18245. var l = t[s],
  18246. u = l.coord;
  18247. if (u < 0) n = l;
  18248. else {
  18249. if (u > e) {
  18250. i ? r.push(a(i, l, e)) : n && r.push(a(n, l, 0), a(n, l, e));
  18251. break
  18252. }
  18253. n && (r.push(a(n, l, 0)), n = null), r.push(l), i = l
  18254. }
  18255. }
  18256. return r
  18257. }(u, "x" === r ? n.getWidth() : n.getHeight()),
  18258. d = p.length;
  18259. if (!d && h) return u[0].coord < 0 ? c[1] ? c[1] : u[h - 1].color : c[0] ? c[0] : u[0].color;
  18260. var f = p[0].coord - 10,
  18261. g = p[d - 1].coord + 10,
  18262. y = g - f;
  18263. if (y < .001) return "transparent";
  18264. E(p, (function (t) {
  18265. t.offset = (t.coord - f) / y
  18266. })), p.push({
  18267. offset: d ? p[d - 1].offset : .5,
  18268. color: c[1] || "transparent"
  18269. }), p.unshift({
  18270. offset: d ? p[0].offset : .5,
  18271. color: c[0] || "transparent"
  18272. });
  18273. var v = new oh(0, 0, 0, 0, p, !0);
  18274. return v[r] = f, v[r + "2"] = g, v
  18275. }
  18276. }
  18277. }
  18278. function BS(t, e, n) {
  18279. var i = t.get("showAllSymbol"),
  18280. r = "auto" === i;
  18281. if (!i || r) {
  18282. var o = n.getAxesByScale("ordinal")[0];
  18283. if (o && (!r || ! function (t, e) {
  18284. var n = t.getExtent(),
  18285. i = Math.abs(n[1] - n[0]) / t.scale.count();
  18286. isNaN(i) && (i = 0);
  18287. for (var r = e.count(), o = Math.max(1, Math.round(r / 5)), a = 0; a < r; a += o)
  18288. if (1.5 * dS.getSymbolSize(e, a)[t.isHorizontal() ? 1 : 0] > i) return !1;
  18289. return !0
  18290. }(o, e))) {
  18291. var a = e.mapDimension(o.dim),
  18292. s = {};
  18293. return E(o.getViewLabels(), (function (t) {
  18294. var e = o.scale.getRawOrdinalNumber(t.tickValue);
  18295. s[e] = 1
  18296. })),
  18297. function (t) {
  18298. return !s.hasOwnProperty(e.get(a, t))
  18299. }
  18300. }
  18301. }
  18302. }
  18303. function FS(t, e) {
  18304. return [t[2 * e], t[2 * e + 1]]
  18305. }
  18306. function GS(t) {
  18307. if (t.get(["endLabel", "show"])) return !0;
  18308. for (var e = 0; e < hl.length; e++)
  18309. if (t.get([hl[e], "endLabel", "show"])) return !0;
  18310. return !1
  18311. }
  18312. function WS(t, e, n, i) {
  18313. if (PS(e, "cartesian2d")) {
  18314. var r = i.getModel("endLabel"),
  18315. o = r.get("valueAnimation"),
  18316. a = i.getData(),
  18317. s = {
  18318. lastFrameIndex: 0
  18319. },
  18320. l = GS(i) ? function (n, i) {
  18321. t._endLabelOnDuring(n, i, a, s, o, r, e)
  18322. } : null,
  18323. u = e.getBaseAxis().isHorizontal(),
  18324. h = AS(e, n, i, (function () {
  18325. var e = t._endLabel;
  18326. e && n && null != s.originalX && e.attr({
  18327. x: s.originalX,
  18328. y: s.originalY
  18329. })
  18330. }), l);
  18331. if (!i.get("clip", !0)) {
  18332. var c = h.shape,
  18333. p = Math.max(c.width, c.height);
  18334. u ? (c.y -= p, c.height += 2 * p) : (c.x -= p, c.width += 2 * p)
  18335. }
  18336. return l && l(1, h), h
  18337. }
  18338. return kS(e, n, i)
  18339. }
  18340. var HS = function (t) {
  18341. function e() {
  18342. return null !== t && t.apply(this, arguments) || this
  18343. }
  18344. return n(e, t), e.prototype.init = function () {
  18345. var t = new Br,
  18346. e = new mS;
  18347. this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t
  18348. }, e.prototype.render = function (t, e, n) {
  18349. var i = this,
  18350. r = t.coordinateSystem,
  18351. o = this.group,
  18352. a = t.getData(),
  18353. s = t.getModel("lineStyle"),
  18354. l = t.getModel("areaStyle"),
  18355. u = a.getLayout("points") || [],
  18356. h = "polar" === r.type,
  18357. c = this._coordSys,
  18358. p = this._symbolDraw,
  18359. d = this._polyline,
  18360. f = this._polygon,
  18361. g = this._lineGroup,
  18362. y = !e.ssr && t.get("animation"),
  18363. v = !l.isEmpty(),
  18364. m = l.get("origin"),
  18365. x = xS(r, a, m),
  18366. _ = v && function (t, e, n) {
  18367. if (!n.valueDim) return [];
  18368. for (var i = e.count(), r = Bx(2 * i), o = 0; o < i; o++) {
  18369. var a = _S(n, t, e, o);
  18370. r[2 * o] = a[0], r[2 * o + 1] = a[1]
  18371. }
  18372. return r
  18373. }(r, a, x),
  18374. b = t.get("showSymbol"),
  18375. w = t.get("connectNulls"),
  18376. S = b && !h && BS(t, a, r),
  18377. M = this._data;
  18378. M && M.eachItemGraphicEl((function (t, e) {
  18379. t.__temp && (o.remove(t), M.setItemGraphicEl(e, null))
  18380. })), b || p.remove(), o.add(g);
  18381. var I, T = !h && t.get("step");
  18382. r && r.getArea && t.get("clip", !0) && (null != (I = r.getArea()).width ? (I.x -= .1, I.y -= .1, I.width += .2, I.height += .2) : I.r0 && (I.r0 -= .5, I.r += .5)), this._clipShapeForSymbol = I;
  18383. var C = VS(a, r, n) || a.getVisual("style")[a.getVisual("drawType")];
  18384. if (d && c.type === r.type && T === this._step) {
  18385. v && !f ? f = this._newPolygon(u, _) : f && !v && (g.remove(f), f = this._polygon = null), h || this._initOrUpdateEndLabel(t, r, Sp(C));
  18386. var D = g.getClipPath();
  18387. if (D) mh(D, {
  18388. shape: WS(this, r, !1, t).shape
  18389. }, t);
  18390. else g.setClipPath(WS(this, r, !0, t));
  18391. b && p.updateData(a, {
  18392. isIgnore: S,
  18393. clipShape: I,
  18394. disableAnimation: !0,
  18395. getSymbolPoint: function (t) {
  18396. return [u[2 * t], u[2 * t + 1]]
  18397. }
  18398. }), OS(this._stackedOnPoints, _) && OS(this._points, u) || (y ? this._doUpdateAnimation(a, _, r, n, T, m, w) : (T && (u = zS(u, r, T, w), _ && (_ = zS(_, r, T, w))), d.setShape({
  18399. points: u
  18400. }), f && f.setShape({
  18401. points: u,
  18402. stackedOnPoints: _
  18403. })))
  18404. } else b && p.updateData(a, {
  18405. isIgnore: S,
  18406. clipShape: I,
  18407. disableAnimation: !0,
  18408. getSymbolPoint: function (t) {
  18409. return [u[2 * t], u[2 * t + 1]]
  18410. }
  18411. }), y && this._initSymbolLabelAnimation(a, r, I), T && (u = zS(u, r, T, w), _ && (_ = zS(_, r, T, w))), d = this._newPolyline(u), v ? f = this._newPolygon(u, _) : f && (g.remove(f), f = this._polygon = null), h || this._initOrUpdateEndLabel(t, r, Sp(C)), g.setClipPath(WS(this, r, !0, t));
  18412. var A = t.getModel("emphasis"),
  18413. L = A.get("focus"),
  18414. P = A.get("blurScope"),
  18415. O = A.get("disabled");
  18416. (d.useStyle(k(s.getLineStyle(), {
  18417. fill: "none",
  18418. stroke: C,
  18419. lineJoin: "bevel"
  18420. })), $l(d, t, "lineStyle"), d.style.lineWidth > 0 && "bolder" === t.get(["emphasis", "lineStyle", "width"])) && (d.getState("emphasis").style.lineWidth = +d.style.lineWidth + 1);
  18421. rl(d).seriesIndex = t.seriesIndex, Zl(d, L, P, O);
  18422. var R = ES(t.get("smooth")),
  18423. N = t.get("smoothMonotone");
  18424. if (d.setShape({
  18425. smooth: R,
  18426. smoothMonotone: N,
  18427. connectNulls: w
  18428. }), f) {
  18429. var E = a.getCalculationInfo("stackedOnSeries"),
  18430. z = 0;
  18431. f.useStyle(k(l.getAreaStyle(), {
  18432. fill: C,
  18433. opacity: .7,
  18434. lineJoin: "bevel",
  18435. decal: a.getVisual("style").decal
  18436. })), E && (z = ES(E.get("smooth"))), f.setShape({
  18437. smooth: R,
  18438. stackedOnSmooth: z,
  18439. smoothMonotone: N,
  18440. connectNulls: w
  18441. }), $l(f, t, "areaStyle"), rl(f).seriesIndex = t.seriesIndex, Zl(f, L, P, O)
  18442. }
  18443. var V = function (t) {
  18444. i._changePolyState(t)
  18445. };
  18446. a.eachItemGraphicEl((function (t) {
  18447. t && (t.onHoverStateChange = V)
  18448. })), this._polyline.onHoverStateChange = V, this._data = a, this._coordSys = r, this._stackedOnPoints = _, this._points = u, this._step = T, this._valueOrigin = m, t.get("triggerLineEvent") && (this.packEventData(t, d), f && this.packEventData(t, f))
  18449. }, e.prototype.packEventData = function (t, e) {
  18450. rl(e).eventData = {
  18451. componentType: "series",
  18452. componentSubType: "line",
  18453. componentIndex: t.componentIndex,
  18454. seriesIndex: t.seriesIndex,
  18455. seriesName: t.name,
  18456. seriesType: "line"
  18457. }
  18458. }, e.prototype.highlight = function (t, e, n, i) {
  18459. var r = t.getData(),
  18460. o = zo(r, i);
  18461. if (this._changePolyState("emphasis"), !(o instanceof Array) && null != o && o >= 0) {
  18462. var a = r.getLayout("points"),
  18463. s = r.getItemGraphicEl(o);
  18464. if (!s) {
  18465. var l = a[2 * o],
  18466. u = a[2 * o + 1];
  18467. if (isNaN(l) || isNaN(u)) return;
  18468. if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(l, u)) return;
  18469. var h = t.get("zlevel") || 0,
  18470. c = t.get("z") || 0;
  18471. (s = new dS(r, o)).x = l, s.y = u, s.setZ(h, c);
  18472. var p = s.getSymbolPath().getTextContent();
  18473. p && (p.zlevel = h, p.z = c, p.z2 = this._polyline.z2 + 1), s.__temp = !0, r.setItemGraphicEl(o, s), s.stopSymbolAnimation(!0), this.group.add(s)
  18474. }
  18475. s.highlight()
  18476. } else Og.prototype.highlight.call(this, t, e, n, i)
  18477. }, e.prototype.downplay = function (t, e, n, i) {
  18478. var r = t.getData(),
  18479. o = zo(r, i);
  18480. if (this._changePolyState("normal"), null != o && o >= 0) {
  18481. var a = r.getItemGraphicEl(o);
  18482. a && (a.__temp ? (r.setItemGraphicEl(o, null), this.group.remove(a)) : a.downplay())
  18483. } else Og.prototype.downplay.call(this, t, e, n, i)
  18484. }, e.prototype._changePolyState = function (t) {
  18485. var e = this._polygon;
  18486. Dl(this._polyline, t), e && Dl(e, t)
  18487. }, e.prototype._newPolyline = function (t) {
  18488. var e = this._polyline;
  18489. return e && this._lineGroup.remove(e), e = new TS({
  18490. shape: {
  18491. points: t
  18492. },
  18493. segmentIgnoreThreshold: 2,
  18494. z2: 10
  18495. }), this._lineGroup.add(e), this._polyline = e, e
  18496. }, e.prototype._newPolygon = function (t, e) {
  18497. var n = this._polygon;
  18498. return n && this._lineGroup.remove(n), n = new DS({
  18499. shape: {
  18500. points: t,
  18501. stackedOnPoints: e
  18502. },
  18503. segmentIgnoreThreshold: 2
  18504. }), this._lineGroup.add(n), this._polygon = n, n
  18505. }, e.prototype._initSymbolLabelAnimation = function (t, e, n) {
  18506. var i, r, o = e.getBaseAxis(),
  18507. a = o.inverse;
  18508. "cartesian2d" === e.type ? (i = o.isHorizontal(), r = !1) : "polar" === e.type && (i = "angle" === o.dim, r = !0);
  18509. var s = t.hostModel,
  18510. l = s.get("animationDuration");
  18511. X(l) && (l = l(null));
  18512. var u = s.get("animationDelay") || 0,
  18513. h = X(u) ? u(null) : u;
  18514. t.eachItemGraphicEl((function (t, o) {
  18515. var s = t;
  18516. if (s) {
  18517. var c = [t.x, t.y],
  18518. p = void 0,
  18519. d = void 0,
  18520. f = void 0;
  18521. if (n)
  18522. if (r) {
  18523. var g = n,
  18524. y = e.pointToCoord(c);
  18525. i ? (p = g.startAngle, d = g.endAngle, f = -y[1] / 180 * Math.PI) : (p = g.r0, d = g.r, f = y[0])
  18526. } else {
  18527. var v = n;
  18528. i ? (p = v.x, d = v.x + v.width, f = t.x) : (p = v.y + v.height, d = v.y, f = t.y)
  18529. } var m = d === p ? 0 : (f - p) / (d - p);
  18530. a && (m = 1 - m);
  18531. var x = X(u) ? u(o) : l * m + h,
  18532. _ = s.getSymbolPath(),
  18533. b = _.getTextContent();
  18534. s.attr({
  18535. scaleX: 0,
  18536. scaleY: 0
  18537. }), s.animateTo({
  18538. scaleX: 1,
  18539. scaleY: 1
  18540. }, {
  18541. duration: 200,
  18542. setToFinal: !0,
  18543. delay: x
  18544. }), b && b.animateFrom({
  18545. style: {
  18546. opacity: 0
  18547. }
  18548. }, {
  18549. duration: 300,
  18550. delay: x
  18551. }), _.disableLabelAnimation = !0
  18552. }
  18553. }))
  18554. }, e.prototype._initOrUpdateEndLabel = function (t, e, n) {
  18555. var i = t.getModel("endLabel");
  18556. if (GS(t)) {
  18557. var r = t.getData(),
  18558. o = this._polyline,
  18559. a = r.getLayout("points");
  18560. if (!a) return o.removeTextContent(), void(this._endLabel = null);
  18561. var s = this._endLabel;
  18562. s || ((s = this._endLabel = new Xs({
  18563. z2: 200
  18564. })).ignoreClip = !0, o.setTextContent(this._endLabel), o.disableLabelAnimation = !0);
  18565. var l = function (t) {
  18566. for (var e, n, i = t.length / 2; i > 0 && (e = t[2 * i - 2], n = t[2 * i - 1], isNaN(e) || isNaN(n)); i--);
  18567. return i - 1
  18568. }(a);
  18569. l >= 0 && (ic(o, rc(t, "endLabel"), {
  18570. inheritColor: n,
  18571. labelFetcher: t,
  18572. labelDataIndex: l,
  18573. defaultText: function (t, e, n) {
  18574. return null != n ? pS(r, n) : cS(r, t)
  18575. },
  18576. enableTextSetter: !0
  18577. }, function (t, e) {
  18578. var n = e.getBaseAxis(),
  18579. i = n.isHorizontal(),
  18580. r = n.inverse,
  18581. o = i ? r ? "right" : "left" : "center",
  18582. a = i ? "middle" : r ? "top" : "bottom";
  18583. return {
  18584. normal: {
  18585. align: t.get("align") || o,
  18586. verticalAlign: t.get("verticalAlign") || a
  18587. }
  18588. }
  18589. }(i, e)), o.textConfig.position = null)
  18590. } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null)
  18591. }, e.prototype._endLabelOnDuring = function (t, e, n, i, r, o, a) {
  18592. var s = this._endLabel,
  18593. l = this._polyline;
  18594. if (s) {
  18595. t < 1 && null == i.originalX && (i.originalX = s.x, i.originalY = s.y);
  18596. var u = n.getLayout("points"),
  18597. h = n.hostModel,
  18598. c = h.get("connectNulls"),
  18599. p = o.get("precision"),
  18600. d = o.get("distance") || 0,
  18601. f = a.getBaseAxis(),
  18602. g = f.isHorizontal(),
  18603. y = f.inverse,
  18604. v = e.shape,
  18605. m = y ? g ? v.x : v.y + v.height : g ? v.x + v.width : v.y,
  18606. x = (g ? d : 0) * (y ? -1 : 1),
  18607. _ = (g ? 0 : -d) * (y ? -1 : 1),
  18608. b = g ? "x" : "y",
  18609. w = function (t, e, n) {
  18610. for (var i, r, o = t.length / 2, a = "x" === n ? 0 : 1, s = 0, l = -1, u = 0; u < o; u++)
  18611. if (r = t[2 * u + a], !isNaN(r) && !isNaN(t[2 * u + 1 - a]))
  18612. if (0 !== u) {
  18613. if (i <= e && r >= e || i >= e && r <= e) {
  18614. l = u;
  18615. break
  18616. }
  18617. s = u, i = r
  18618. } else i = r;
  18619. return {
  18620. range: [s, l],
  18621. t: (e - i) / (r - i)
  18622. }
  18623. }(u, m, b),
  18624. S = w.range,
  18625. M = S[1] - S[0],
  18626. I = void 0;
  18627. if (M >= 1) {
  18628. if (M > 1 && !c) {
  18629. var T = FS(u, S[0]);
  18630. s.attr({
  18631. x: T[0] + x,
  18632. y: T[1] + _
  18633. }), r && (I = h.getRawValue(S[0]))
  18634. } else {
  18635. (T = l.getPointOn(m, b)) && s.attr({
  18636. x: T[0] + x,
  18637. y: T[1] + _
  18638. });
  18639. var C = h.getRawValue(S[0]),
  18640. D = h.getRawValue(S[1]);
  18641. r && (I = Zo(n, p, C, D, w.t))
  18642. }
  18643. i.lastFrameIndex = S[0]
  18644. } else {
  18645. var A = 1 === t || i.lastFrameIndex > 0 ? S[0] : 0;
  18646. T = FS(u, A);
  18647. r && (I = h.getRawValue(A)), s.attr({
  18648. x: T[0] + x,
  18649. y: T[1] + _
  18650. })
  18651. }
  18652. if (r) {
  18653. var k = pc(s);
  18654. "function" == typeof k.setLabelText && k.setLabelText(I)
  18655. }
  18656. }
  18657. }, e.prototype._doUpdateAnimation = function (t, e, n, i, r, o, a) {
  18658. var s = this._polyline,
  18659. l = this._polygon,
  18660. u = t.hostModel,
  18661. h = function (t, e, n, i, r, o, a, s) {
  18662. for (var l = function (t, e) {
  18663. var n = [];
  18664. return e.diff(t).add((function (t) {
  18665. n.push({
  18666. cmd: "+",
  18667. idx: t
  18668. })
  18669. })).update((function (t, e) {
  18670. n.push({
  18671. cmd: "=",
  18672. idx: e,
  18673. idx1: t
  18674. })
  18675. })).remove((function (t) {
  18676. n.push({
  18677. cmd: "-",
  18678. idx: t
  18679. })
  18680. })).execute(), n
  18681. }(t, e), u = [], h = [], c = [], p = [], d = [], f = [], g = [], y = xS(r, e, a), v = t.getLayout("points") || [], m = e.getLayout("points") || [], x = 0; x < l.length; x++) {
  18682. var _ = l[x],
  18683. b = !0,
  18684. w = void 0,
  18685. S = void 0;
  18686. switch (_.cmd) {
  18687. case "=":
  18688. w = 2 * _.idx, S = 2 * _.idx1;
  18689. var M = v[w],
  18690. I = v[w + 1],
  18691. T = m[S],
  18692. C = m[S + 1];
  18693. (isNaN(M) || isNaN(I)) && (M = T, I = C), u.push(M, I), h.push(T, C), c.push(n[w], n[w + 1]), p.push(i[S], i[S + 1]), g.push(e.getRawIndex(_.idx1));
  18694. break;
  18695. case "+":
  18696. var D = _.idx,
  18697. A = y.dataDimsForPoint,
  18698. k = r.dataToPoint([e.get(A[0], D), e.get(A[1], D)]);
  18699. S = 2 * D, u.push(k[0], k[1]), h.push(m[S], m[S + 1]);
  18700. var L = _S(y, r, e, D);
  18701. c.push(L[0], L[1]), p.push(i[S], i[S + 1]), g.push(e.getRawIndex(D));
  18702. break;
  18703. case "-":
  18704. b = !1
  18705. }
  18706. b && (d.push(_), f.push(f.length))
  18707. }
  18708. f.sort((function (t, e) {
  18709. return g[t] - g[e]
  18710. }));
  18711. var P = u.length,
  18712. O = Bx(P),
  18713. R = Bx(P),
  18714. N = Bx(P),
  18715. E = Bx(P),
  18716. z = [];
  18717. for (x = 0; x < f.length; x++) {
  18718. var V = f[x],
  18719. B = 2 * x,
  18720. F = 2 * V;
  18721. O[B] = u[F], O[B + 1] = u[F + 1], R[B] = h[F], R[B + 1] = h[F + 1], N[B] = c[F], N[B + 1] = c[F + 1], E[B] = p[F], E[B + 1] = p[F + 1], z[x] = d[V]
  18722. }
  18723. return {
  18724. current: O,
  18725. next: R,
  18726. stackedOnCurrent: N,
  18727. stackedOnNext: E,
  18728. status: z
  18729. }
  18730. }(this._data, t, this._stackedOnPoints, e, this._coordSys, 0, this._valueOrigin),
  18731. c = h.current,
  18732. p = h.stackedOnCurrent,
  18733. d = h.next,
  18734. f = h.stackedOnNext;
  18735. if (r && (c = zS(h.current, n, r, a), p = zS(h.stackedOnCurrent, n, r, a), d = zS(h.next, n, r, a), f = zS(h.stackedOnNext, n, r, a)), NS(c, d) > 3e3 || l && NS(p, f) > 3e3) return s.stopAnimation(), s.setShape({
  18736. points: d
  18737. }), void(l && (l.stopAnimation(), l.setShape({
  18738. points: d,
  18739. stackedOnPoints: f
  18740. })));
  18741. s.shape.__points = h.current, s.shape.points = c;
  18742. var g = {
  18743. shape: {
  18744. points: d
  18745. }
  18746. };
  18747. h.current !== c && (g.shape.__points = h.next), s.stopAnimation(), vh(s, g, u), l && (l.setShape({
  18748. points: c,
  18749. stackedOnPoints: p
  18750. }), l.stopAnimation(), vh(l, {
  18751. shape: {
  18752. stackedOnPoints: f
  18753. }
  18754. }, u), s.shape.points !== l.shape.points && (l.shape.points = s.shape.points));
  18755. for (var y = [], v = h.status, m = 0; m < v.length; m++) {
  18756. if ("=" === v[m].cmd) {
  18757. var x = t.getItemGraphicEl(v[m].idx1);
  18758. x && y.push({
  18759. el: x,
  18760. ptIdx: m
  18761. })
  18762. }
  18763. }
  18764. s.animators && s.animators.length && s.animators[0].during((function () {
  18765. l && l.dirtyShape();
  18766. for (var t = s.shape.__points, e = 0; e < y.length; e++) {
  18767. var n = y[e].el,
  18768. i = 2 * y[e].ptIdx;
  18769. n.x = t[i], n.y = t[i + 1], n.markRedraw()
  18770. }
  18771. }))
  18772. }, e.prototype.remove = function (t) {
  18773. var e = this.group,
  18774. n = this._data;
  18775. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), n && n.eachItemGraphicEl((function (t, i) {
  18776. t.__temp && (e.remove(t), n.setItemGraphicEl(i, null))
  18777. })), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null
  18778. }, e.type = "line", e
  18779. }(Og);
  18780. function YS(t, e) {
  18781. return {
  18782. seriesType: t,
  18783. plan: kg(),
  18784. reset: function (t) {
  18785. var n = t.getData(),
  18786. i = t.coordinateSystem,
  18787. r = t.pipelineContext,
  18788. o = e || r.large;
  18789. if (i) {
  18790. var a = z(i.dimensions, (function (t) {
  18791. return n.mapDimension(t)
  18792. })).slice(0, 2),
  18793. s = a.length,
  18794. l = n.getCalculationInfo("stackResultDimension");
  18795. mx(n, a[0]) && (a[0] = l), mx(n, a[1]) && (a[1] = l);
  18796. var u = n.getStore(),
  18797. h = n.getDimensionIndex(a[0]),
  18798. c = n.getDimensionIndex(a[1]);
  18799. return s && {
  18800. progress: function (t, e) {
  18801. for (var n = t.end - t.start, r = o && Bx(n * s), a = [], l = [], p = t.start, d = 0; p < t.end; p++) {
  18802. var f = void 0;
  18803. if (1 === s) {
  18804. var g = u.get(h, p);
  18805. f = i.dataToPoint(g, null, l)
  18806. } else a[0] = u.get(h, p), a[1] = u.get(c, p), f = i.dataToPoint(a, null, l);
  18807. o ? (r[d++] = f[0], r[d++] = f[1]) : e.setItemLayout(p, f.slice())
  18808. }
  18809. o && e.setLayout("points", r)
  18810. }
  18811. }
  18812. }
  18813. }
  18814. }
  18815. }
  18816. var XS = {
  18817. average: function (t) {
  18818. for (var e = 0, n = 0, i = 0; i < t.length; i++) isNaN(t[i]) || (e += t[i], n++);
  18819. return 0 === n ? NaN : e / n
  18820. },
  18821. sum: function (t) {
  18822. for (var e = 0, n = 0; n < t.length; n++) e += t[n] || 0;
  18823. return e
  18824. },
  18825. max: function (t) {
  18826. for (var e = -1 / 0, n = 0; n < t.length; n++) t[n] > e && (e = t[n]);
  18827. return isFinite(e) ? e : NaN
  18828. },
  18829. min: function (t) {
  18830. for (var e = 1 / 0, n = 0; n < t.length; n++) t[n] < e && (e = t[n]);
  18831. return isFinite(e) ? e : NaN
  18832. },
  18833. minmax: function (t) {
  18834. for (var e = -1 / 0, n = -1 / 0, i = 0; i < t.length; i++) {
  18835. var r = t[i],
  18836. o = Math.abs(r);
  18837. o > e && (e = o, n = r)
  18838. }
  18839. return isFinite(n) ? n : NaN
  18840. },
  18841. nearest: function (t) {
  18842. return t[0]
  18843. }
  18844. },
  18845. US = function (t) {
  18846. return Math.round(t.length / 2)
  18847. };
  18848. function ZS(t) {
  18849. return {
  18850. seriesType: t,
  18851. reset: function (t, e, n) {
  18852. var i = t.getData(),
  18853. r = t.get("sampling"),
  18854. o = t.coordinateSystem,
  18855. a = i.count();
  18856. if (a > 10 && "cartesian2d" === o.type && r) {
  18857. var s = o.getBaseAxis(),
  18858. l = o.getOtherAxis(s),
  18859. u = s.getExtent(),
  18860. h = n.getDevicePixelRatio(),
  18861. c = Math.abs(u[1] - u[0]) * (h || 1),
  18862. p = Math.round(a / c);
  18863. if (isFinite(p) && p > 1) {
  18864. "lttb" === r && t.setData(i.lttbDownSample(i.mapDimension(l.dim), 1 / p));
  18865. var d = void 0;
  18866. U(r) ? d = XS[r] : X(r) && (d = r), d && t.setData(i.downSample(i.mapDimension(l.dim), 1 / p, d, US))
  18867. }
  18868. }
  18869. }
  18870. }
  18871. }
  18872. var jS = function (t) {
  18873. function e() {
  18874. var n = null !== t && t.apply(this, arguments) || this;
  18875. return n.type = e.type, n
  18876. }
  18877. return n(e, t), e.prototype.getInitialData = function (t, e) {
  18878. return _x(null, this, {
  18879. useEncodeDefaulter: !0
  18880. })
  18881. }, e.prototype.getMarkerPosition = function (t, e, n) {
  18882. var i = this.coordinateSystem;
  18883. if (i && i.clampData) {
  18884. var r = i.clampData(t),
  18885. o = i.dataToPoint(r);
  18886. if (n) E(i.getAxes(), (function (t, n) {
  18887. if ("category" === t.type && null != e) {
  18888. var i = t.getTicksCoords(),
  18889. a = t.getTickModel().get("alignWithLabel"),
  18890. s = r[n],
  18891. l = "x1" === e[n] || "y1" === e[n];
  18892. if (l && !a && (s += 1), i.length < 2) return;
  18893. if (2 === i.length) return void(o[n] = t.toGlobalCoord(t.getExtent()[l ? 1 : 0]));
  18894. for (var u = void 0, h = void 0, c = 1, p = 0; p < i.length; p++) {
  18895. var d = i[p].coord,
  18896. f = p === i.length - 1 ? i[p - 1].tickValue + c : i[p].tickValue;
  18897. if (f === s) {
  18898. h = d;
  18899. break
  18900. }
  18901. if (f < s) u = d;
  18902. else if (null != u && f > s) {
  18903. h = (d + u) / 2;
  18904. break
  18905. }
  18906. 1 === p && (c = f - i[0].tickValue)
  18907. }
  18908. null == h && (u ? u && (h = i[i.length - 1].coord) : h = i[0].coord), o[n] = t.toGlobalCoord(h)
  18909. }
  18910. }));
  18911. else {
  18912. var a = this.getData(),
  18913. s = a.getLayout("offset"),
  18914. l = a.getLayout("size"),
  18915. u = i.getBaseAxis().isHorizontal() ? 0 : 1;
  18916. o[u] += s + l / 2
  18917. }
  18918. return o
  18919. }
  18920. return [NaN, NaN]
  18921. }, e.type = "series.__base_bar__", e.defaultOption = {
  18922. z: 2,
  18923. coordinateSystem: "cartesian2d",
  18924. legendHoverLink: !0,
  18925. barMinHeight: 0,
  18926. barMinAngle: 0,
  18927. large: !1,
  18928. largeThreshold: 400,
  18929. progressive: 3e3,
  18930. progressiveChunkMode: "mod"
  18931. }, e
  18932. }(bg);
  18933. bg.registerClass(jS);
  18934. var qS = function (t) {
  18935. function e() {
  18936. var n = null !== t && t.apply(this, arguments) || this;
  18937. return n.type = e.type, n
  18938. }
  18939. return n(e, t), e.prototype.getInitialData = function () {
  18940. return _x(null, this, {
  18941. useEncodeDefaulter: !0,
  18942. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  18943. })
  18944. }, e.prototype.getProgressive = function () {
  18945. return !!this.get("large") && this.get("progressive")
  18946. }, e.prototype.getProgressiveThreshold = function () {
  18947. var t = this.get("progressiveThreshold"),
  18948. e = this.get("largeThreshold");
  18949. return e > t && (t = e), t
  18950. }, e.prototype.brushSelector = function (t, e, n) {
  18951. return n.rect(e.getItemLayout(t))
  18952. }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = kc(jS.defaultOption, {
  18953. clip: !0,
  18954. roundCap: !1,
  18955. showBackground: !1,
  18956. backgroundStyle: {
  18957. color: "rgba(180, 180, 180, 0.2)",
  18958. borderColor: null,
  18959. borderWidth: 0,
  18960. borderType: "solid",
  18961. borderRadius: 0,
  18962. shadowBlur: 0,
  18963. shadowColor: null,
  18964. shadowOffsetX: 0,
  18965. shadowOffsetY: 0,
  18966. opacity: 1
  18967. },
  18968. select: {
  18969. itemStyle: {
  18970. borderColor: "#212121"
  18971. }
  18972. },
  18973. realtimeSort: !1
  18974. }), e
  18975. }(jS),
  18976. KS = function () {
  18977. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = 2 * Math.PI, this.clockwise = !0
  18978. },
  18979. $S = function (t) {
  18980. function e(e) {
  18981. var n = t.call(this, e) || this;
  18982. return n.type = "sausage", n
  18983. }
  18984. return n(e, t), e.prototype.getDefaultShape = function () {
  18985. return new KS
  18986. }, e.prototype.buildPath = function (t, e) {
  18987. var n = e.cx,
  18988. i = e.cy,
  18989. r = Math.max(e.r0 || 0, 0),
  18990. o = Math.max(e.r, 0),
  18991. a = .5 * (o - r),
  18992. s = r + a,
  18993. l = e.startAngle,
  18994. u = e.endAngle,
  18995. h = e.clockwise,
  18996. c = 2 * Math.PI,
  18997. p = h ? u - l < c : l - u < c;
  18998. p || (l = u - (h ? c : -c));
  18999. var d = Math.cos(l),
  19000. f = Math.sin(l),
  19001. g = Math.cos(u),
  19002. y = Math.sin(u);
  19003. p ? (t.moveTo(d * r + n, f * r + i), t.arc(d * s + n, f * s + i, a, -Math.PI + l, l, !h)) : t.moveTo(d * o + n, f * o + i), t.arc(n, i, o, l, u, !h), t.arc(g * s + n, y * s + i, a, u - 2 * Math.PI, u - Math.PI, !h), 0 !== r && t.arc(n, i, r, u, l, h)
  19004. }, e
  19005. }(ks);
  19006. function JS(t, e, n) {
  19007. return e * Math.sin(t) * (n ? -1 : 1)
  19008. }
  19009. function QS(t, e, n) {
  19010. return e * Math.cos(t) * (n ? 1 : -1)
  19011. }
  19012. function tM(t, e, n) {
  19013. var i = t.get("borderRadius");
  19014. if (null == i) return n ? {
  19015. cornerRadius: 0
  19016. } : null;
  19017. Y(i) || (i = [i, i, i, i]);
  19018. var r = Math.abs(e.r || 0 - e.r0 || 0);
  19019. return {
  19020. cornerRadius: z(i, (function (t) {
  19021. return Cr(t, r)
  19022. }))
  19023. }
  19024. }
  19025. var eM = Math.max,
  19026. nM = Math.min;
  19027. var iM = function (t) {
  19028. function e() {
  19029. var n = t.call(this) || this;
  19030. return n.type = e.type, n._isFirstFrame = !0, n
  19031. }
  19032. return n(e, t), e.prototype.render = function (t, e, n, i) {
  19033. this._model = t, this._removeOnRenderedListener(n), this._updateDrawMode(t);
  19034. var r = t.get("coordinateSystem");
  19035. ("cartesian2d" === r || "polar" === r) && (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(t, e, n) : this._renderNormal(t, e, n, i))
  19036. }, e.prototype.incrementalPrepareRender = function (t) {
  19037. this._clear(), this._updateDrawMode(t), this._updateLargeClip(t)
  19038. }, e.prototype.incrementalRender = function (t, e) {
  19039. this._progressiveEls = [], this._incrementalRenderLarge(t, e)
  19040. }, e.prototype.eachRendered = function (t) {
  19041. Jh(this._progressiveEls || this.group, t)
  19042. }, e.prototype._updateDrawMode = function (t) {
  19043. var e = t.pipelineContext.large;
  19044. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e, this._clear())
  19045. }, e.prototype._renderNormal = function (t, e, n, i) {
  19046. var r, o = this.group,
  19047. a = t.getData(),
  19048. s = this._data,
  19049. l = t.coordinateSystem,
  19050. u = l.getBaseAxis();
  19051. "cartesian2d" === l.type ? r = u.isHorizontal() : "polar" === l.type && (r = "angle" === u.dim);
  19052. var h = t.isAnimationEnabled() ? t : null,
  19053. c = function (t, e) {
  19054. var n = t.get("realtimeSort", !0),
  19055. i = e.getBaseAxis();
  19056. 0;
  19057. if (n && "category" === i.type && "cartesian2d" === e.type) return {
  19058. baseAxis: i,
  19059. otherAxis: e.getOtherAxis(i)
  19060. }
  19061. }(t, l);
  19062. c && this._enableRealtimeSort(c, a, n);
  19063. var p = t.get("clip", !0) || c,
  19064. d = function (t, e) {
  19065. var n = t.getArea && t.getArea();
  19066. if (PS(t, "cartesian2d")) {
  19067. var i = t.getBaseAxis();
  19068. if ("category" !== i.type || !i.onBand) {
  19069. var r = e.getLayout("bandWidth");
  19070. i.isHorizontal() ? (n.x -= r, n.width += 2 * r) : (n.y -= r, n.height += 2 * r)
  19071. }
  19072. }
  19073. return n
  19074. }(l, a);
  19075. o.removeClipPath();
  19076. var f = t.get("roundCap", !0),
  19077. g = t.get("showBackground", !0),
  19078. y = t.getModel("backgroundStyle"),
  19079. v = y.get("borderRadius") || 0,
  19080. m = [],
  19081. x = this._backgroundEls,
  19082. _ = i && i.isInitSort,
  19083. b = i && "changeAxisOrder" === i.type;
  19084. function w(t) {
  19085. var e = cM[l.type](a, t),
  19086. n = function (t, e, n) {
  19087. var i = "polar" === t.type ? Fu : Ws;
  19088. return new i({
  19089. shape: mM(e, n, t),
  19090. silent: !0,
  19091. z2: 0
  19092. })
  19093. }(l, r, e);
  19094. return n.useStyle(y.getItemStyle()), "cartesian2d" === l.type ? n.setShape("r", v) : n.setShape("cornerRadius", v), m[t] = n, n
  19095. }
  19096. a.diff(s).add((function (e) {
  19097. var n = a.getItemModel(e),
  19098. i = cM[l.type](a, e, n);
  19099. if (g && w(e), a.hasValue(e) && hM[l.type](i)) {
  19100. var s = !1;
  19101. p && (s = rM[l.type](d, i));
  19102. var y = oM[l.type](t, a, e, i, r, h, u.model, !1, f);
  19103. c && (y.forceLabelAnimation = !0), dM(y, a, e, n, i, t, r, "polar" === l.type), _ ? y.attr({
  19104. shape: i
  19105. }) : c ? aM(c, h, y, i, e, r, !1, !1) : mh(y, {
  19106. shape: i
  19107. }, t, e), a.setItemGraphicEl(e, y), o.add(y), y.ignore = s
  19108. }
  19109. })).update((function (e, n) {
  19110. var i = a.getItemModel(e),
  19111. S = cM[l.type](a, e, i);
  19112. if (g) {
  19113. var M = void 0;
  19114. 0 === x.length ? M = w(n) : ((M = x[n]).useStyle(y.getItemStyle()), "cartesian2d" === l.type ? M.setShape("r", v) : M.setShape("cornerRadius", v), m[e] = M);
  19115. var I = cM[l.type](a, e);
  19116. vh(M, {
  19117. shape: mM(r, I, l)
  19118. }, h, e)
  19119. }
  19120. var T = s.getItemGraphicEl(n);
  19121. if (a.hasValue(e) && hM[l.type](S)) {
  19122. var C = !1;
  19123. if (p && (C = rM[l.type](d, S)) && o.remove(T), T ? Sh(T) : T = oM[l.type](t, a, e, S, r, h, u.model, !!T, f), c && (T.forceLabelAnimation = !0), b) {
  19124. var D = T.getTextContent();
  19125. if (D) {
  19126. var A = pc(D);
  19127. null != A.prevValue && (A.prevValue = A.value)
  19128. }
  19129. } else dM(T, a, e, i, S, t, r, "polar" === l.type);
  19130. _ ? T.attr({
  19131. shape: S
  19132. }) : c ? aM(c, h, T, S, e, r, !0, b) : vh(T, {
  19133. shape: S
  19134. }, t, e, null), a.setItemGraphicEl(e, T), T.ignore = C, o.add(T)
  19135. } else o.remove(T)
  19136. })).remove((function (e) {
  19137. var n = s.getItemGraphicEl(e);
  19138. n && wh(n, t, e)
  19139. })).execute();
  19140. var S = this._backgroundGroup || (this._backgroundGroup = new Br);
  19141. S.removeAll();
  19142. for (var M = 0; M < m.length; ++M) S.add(m[M]);
  19143. o.add(S), this._backgroundEls = m, this._data = a
  19144. }, e.prototype._renderLarge = function (t, e, n) {
  19145. this._clear(), yM(t, this.group), this._updateLargeClip(t)
  19146. }, e.prototype._incrementalRenderLarge = function (t, e) {
  19147. this._removeBackground(), yM(e, this.group, this._progressiveEls, !0)
  19148. }, e.prototype._updateLargeClip = function (t) {
  19149. var e = t.get("clip", !0) && LS(t.coordinateSystem, !1, t),
  19150. n = this.group;
  19151. e ? n.setClipPath(e) : n.removeClipPath()
  19152. }, e.prototype._enableRealtimeSort = function (t, e, n) {
  19153. var i = this;
  19154. if (e.count()) {
  19155. var r = t.baseAxis;
  19156. if (this._isFirstFrame) this._dispatchInitSort(e, t, n), this._isFirstFrame = !1;
  19157. else {
  19158. var o = function (t) {
  19159. var n = e.getItemGraphicEl(t),
  19160. i = n && n.shape;
  19161. return i && Math.abs(r.isHorizontal() ? i.height : i.width) || 0
  19162. };
  19163. this._onRendered = function () {
  19164. i._updateSortWithinSameData(e, o, r, n)
  19165. }, n.getZr().on("rendered", this._onRendered)
  19166. }
  19167. }
  19168. }, e.prototype._dataSort = function (t, e, n) {
  19169. var i = [];
  19170. return t.each(t.mapDimension(e.dim), (function (t, e) {
  19171. var r = n(e);
  19172. r = null == r ? NaN : r, i.push({
  19173. dataIndex: e,
  19174. mappedValue: r,
  19175. ordinalNumber: t
  19176. })
  19177. })), i.sort((function (t, e) {
  19178. return e.mappedValue - t.mappedValue
  19179. })), {
  19180. ordinalNumbers: z(i, (function (t) {
  19181. return t.ordinalNumber
  19182. }))
  19183. }
  19184. }, e.prototype._isOrderChangedWithinSameData = function (t, e, n) {
  19185. for (var i = n.scale, r = t.mapDimension(n.dim), o = Number.MAX_VALUE, a = 0, s = i.getOrdinalMeta().categories.length; a < s; ++a) {
  19186. var l = t.rawIndexOf(r, i.getRawOrdinalNumber(a)),
  19187. u = l < 0 ? Number.MIN_VALUE : e(t.indexOfRawIndex(l));
  19188. if (u > o) return !0;
  19189. o = u
  19190. }
  19191. return !1
  19192. }, e.prototype._isOrderDifferentInView = function (t, e) {
  19193. for (var n = e.scale, i = n.getExtent(), r = Math.max(0, i[0]), o = Math.min(i[1], n.getOrdinalMeta().categories.length - 1); r <= o; ++r)
  19194. if (t.ordinalNumbers[r] !== n.getRawOrdinalNumber(r)) return !0
  19195. }, e.prototype._updateSortWithinSameData = function (t, e, n, i) {
  19196. if (this._isOrderChangedWithinSameData(t, e, n)) {
  19197. var r = this._dataSort(t, n, e);
  19198. this._isOrderDifferentInView(r, n) && (this._removeOnRenderedListener(i), i.dispatchAction({
  19199. type: "changeAxisOrder",
  19200. componentType: n.dim + "Axis",
  19201. axisId: n.index,
  19202. sortInfo: r
  19203. }))
  19204. }
  19205. }, e.prototype._dispatchInitSort = function (t, e, n) {
  19206. var i = e.baseAxis,
  19207. r = this._dataSort(t, i, (function (n) {
  19208. return t.get(t.mapDimension(e.otherAxis.dim), n)
  19209. }));
  19210. n.dispatchAction({
  19211. type: "changeAxisOrder",
  19212. componentType: i.dim + "Axis",
  19213. isInitSort: !0,
  19214. axisId: i.index,
  19215. sortInfo: r
  19216. })
  19217. }, e.prototype.remove = function (t, e) {
  19218. this._clear(this._model), this._removeOnRenderedListener(e)
  19219. }, e.prototype.dispose = function (t, e) {
  19220. this._removeOnRenderedListener(e)
  19221. }, e.prototype._removeOnRenderedListener = function (t) {
  19222. this._onRendered && (t.getZr().off("rendered", this._onRendered), this._onRendered = null)
  19223. }, e.prototype._clear = function (t) {
  19224. var e = this.group,
  19225. n = this._data;
  19226. t && t.isAnimationEnabled() && n && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], n.eachItemGraphicEl((function (e) {
  19227. wh(e, t, rl(e).dataIndex)
  19228. }))) : e.removeAll(), this._data = null, this._isFirstFrame = !0
  19229. }, e.prototype._removeBackground = function () {
  19230. this.group.remove(this._backgroundGroup), this._backgroundGroup = null
  19231. }, e.type = "bar", e
  19232. }(Og),
  19233. rM = {
  19234. cartesian2d: function (t, e) {
  19235. var n = e.width < 0 ? -1 : 1,
  19236. i = e.height < 0 ? -1 : 1;
  19237. n < 0 && (e.x += e.width, e.width = -e.width), i < 0 && (e.y += e.height, e.height = -e.height);
  19238. var r = t.x + t.width,
  19239. o = t.y + t.height,
  19240. a = eM(e.x, t.x),
  19241. s = nM(e.x + e.width, r),
  19242. l = eM(e.y, t.y),
  19243. u = nM(e.y + e.height, o),
  19244. h = s < a,
  19245. c = u < l;
  19246. return e.x = h && a > r ? s : a, e.y = c && l > o ? u : l, e.width = h ? 0 : s - a, e.height = c ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), i < 0 && (e.y += e.height, e.height = -e.height), h || c
  19247. },
  19248. polar: function (t, e) {
  19249. var n = e.r0 <= e.r ? 1 : -1;
  19250. if (n < 0) {
  19251. var i = e.r;
  19252. e.r = e.r0, e.r0 = i
  19253. }
  19254. var r = nM(e.r, t.r),
  19255. o = eM(e.r0, t.r0);
  19256. e.r = r, e.r0 = o;
  19257. var a = r - o < 0;
  19258. if (n < 0) {
  19259. i = e.r;
  19260. e.r = e.r0, e.r0 = i
  19261. }
  19262. return a
  19263. }
  19264. },
  19265. oM = {
  19266. cartesian2d: function (t, e, n, i, r, o, a, s, l) {
  19267. var u = new Ws({
  19268. shape: A({}, i),
  19269. z2: 1
  19270. });
  19271. (u.__dataIndex = n, u.name = "item", o) && (u.shape[r ? "height" : "width"] = 0);
  19272. return u
  19273. },
  19274. polar: function (t, e, n, i, r, o, a, s, l) {
  19275. var u = !r && l ? $S : Fu,
  19276. h = new u({
  19277. shape: i,
  19278. z2: 1
  19279. });
  19280. h.name = "item";
  19281. var c, p, d = pM(r);
  19282. if (h.calculateTextPosition = (c = d, p = ({
  19283. isRoundCap: u === $S
  19284. } || {}).isRoundCap, function (t, e, n) {
  19285. var i = e.position;
  19286. if (!i || i instanceof Array) return Dr(t, e, n);
  19287. var r = c(i),
  19288. o = null != e.distance ? e.distance : 5,
  19289. a = this.shape,
  19290. s = a.cx,
  19291. l = a.cy,
  19292. u = a.r,
  19293. h = a.r0,
  19294. d = (u + h) / 2,
  19295. f = a.startAngle,
  19296. g = a.endAngle,
  19297. y = (f + g) / 2,
  19298. v = p ? Math.abs(u - h) / 2 : 0,
  19299. m = Math.cos,
  19300. x = Math.sin,
  19301. _ = s + u * m(f),
  19302. b = l + u * x(f),
  19303. w = "left",
  19304. S = "top";
  19305. switch (r) {
  19306. case "startArc":
  19307. _ = s + (h - o) * m(y), b = l + (h - o) * x(y), w = "center", S = "top";
  19308. break;
  19309. case "insideStartArc":
  19310. _ = s + (h + o) * m(y), b = l + (h + o) * x(y), w = "center", S = "bottom";
  19311. break;
  19312. case "startAngle":
  19313. _ = s + d * m(f) + JS(f, o + v, !1), b = l + d * x(f) + QS(f, o + v, !1), w = "right", S = "middle";
  19314. break;
  19315. case "insideStartAngle":
  19316. _ = s + d * m(f) + JS(f, -o + v, !1), b = l + d * x(f) + QS(f, -o + v, !1), w = "left", S = "middle";
  19317. break;
  19318. case "middle":
  19319. _ = s + d * m(y), b = l + d * x(y), w = "center", S = "middle";
  19320. break;
  19321. case "endArc":
  19322. _ = s + (u + o) * m(y), b = l + (u + o) * x(y), w = "center", S = "bottom";
  19323. break;
  19324. case "insideEndArc":
  19325. _ = s + (u - o) * m(y), b = l + (u - o) * x(y), w = "center", S = "top";
  19326. break;
  19327. case "endAngle":
  19328. _ = s + d * m(g) + JS(g, o + v, !0), b = l + d * x(g) + QS(g, o + v, !0), w = "left", S = "middle";
  19329. break;
  19330. case "insideEndAngle":
  19331. _ = s + d * m(g) + JS(g, -o + v, !0), b = l + d * x(g) + QS(g, -o + v, !0), w = "right", S = "middle";
  19332. break;
  19333. default:
  19334. return Dr(t, e, n)
  19335. }
  19336. return (t = t || {}).x = _, t.y = b, t.align = w, t.verticalAlign = S, t
  19337. }), o) {
  19338. var f = r ? "r" : "endAngle",
  19339. g = {};
  19340. h.shape[f] = r ? i.r0 : i.startAngle, g[f] = i[f], (s ? vh : mh)(h, {
  19341. shape: g
  19342. }, o)
  19343. }
  19344. return h
  19345. }
  19346. };
  19347. function aM(t, e, n, i, r, o, a, s) {
  19348. var l, u;
  19349. o ? (u = {
  19350. x: i.x,
  19351. width: i.width
  19352. }, l = {
  19353. y: i.y,
  19354. height: i.height
  19355. }) : (u = {
  19356. y: i.y,
  19357. height: i.height
  19358. }, l = {
  19359. x: i.x,
  19360. width: i.width
  19361. }), s || (a ? vh : mh)(n, {
  19362. shape: l
  19363. }, e, r, null), (a ? vh : mh)(n, {
  19364. shape: u
  19365. }, e ? t.baseAxis.model : null, r)
  19366. }
  19367. function sM(t, e) {
  19368. for (var n = 0; n < e.length; n++)
  19369. if (!isFinite(t[e[n]])) return !0;
  19370. return !1
  19371. }
  19372. var lM = ["x", "y", "width", "height"],
  19373. uM = ["cx", "cy", "r", "startAngle", "endAngle"],
  19374. hM = {
  19375. cartesian2d: function (t) {
  19376. return !sM(t, lM)
  19377. },
  19378. polar: function (t) {
  19379. return !sM(t, uM)
  19380. }
  19381. },
  19382. cM = {
  19383. cartesian2d: function (t, e, n) {
  19384. var i = t.getItemLayout(e),
  19385. r = n ? function (t, e) {
  19386. var n = t.get(["itemStyle", "borderColor"]);
  19387. if (!n || "none" === n) return 0;
  19388. var i = t.get(["itemStyle", "borderWidth"]) || 0,
  19389. r = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width),
  19390. o = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  19391. return Math.min(i, r, o)
  19392. }(n, i) : 0,
  19393. o = i.width > 0 ? 1 : -1,
  19394. a = i.height > 0 ? 1 : -1;
  19395. return {
  19396. x: i.x + o * r / 2,
  19397. y: i.y + a * r / 2,
  19398. width: i.width - o * r,
  19399. height: i.height - a * r
  19400. }
  19401. },
  19402. polar: function (t, e, n) {
  19403. var i = t.getItemLayout(e);
  19404. return {
  19405. cx: i.cx,
  19406. cy: i.cy,
  19407. r0: i.r0,
  19408. r: i.r,
  19409. startAngle: i.startAngle,
  19410. endAngle: i.endAngle,
  19411. clockwise: i.clockwise
  19412. }
  19413. }
  19414. };
  19415. function pM(t) {
  19416. return function (t) {
  19417. var e = t ? "Arc" : "Angle";
  19418. return function (t) {
  19419. switch (t) {
  19420. case "start":
  19421. case "insideStart":
  19422. case "end":
  19423. case "insideEnd":
  19424. return t + e;
  19425. default:
  19426. return t
  19427. }
  19428. }
  19429. }(t)
  19430. }
  19431. function dM(t, e, n, i, r, o, a, s) {
  19432. var l = e.getItemVisual(n, "style");
  19433. if (s) {
  19434. if (!o.get("roundCap")) {
  19435. var u = t.shape;
  19436. A(u, tM(i.getModel("itemStyle"), u, !0)), t.setShape(u)
  19437. }
  19438. } else {
  19439. var h = i.get(["itemStyle", "borderRadius"]) || 0;
  19440. t.setShape("r", h)
  19441. }
  19442. t.useStyle(l);
  19443. var c = i.getShallow("cursor");
  19444. c && t.attr("cursor", c);
  19445. var p = s ? a ? r.r >= r.r0 ? "endArc" : "startArc" : r.endAngle >= r.startAngle ? "endAngle" : "startAngle" : a ? r.height >= 0 ? "bottom" : "top" : r.width >= 0 ? "right" : "left",
  19446. d = rc(i);
  19447. ic(t, d, {
  19448. labelFetcher: o,
  19449. labelDataIndex: n,
  19450. defaultText: cS(o.getData(), n),
  19451. inheritColor: l.fill,
  19452. defaultOpacity: l.opacity,
  19453. defaultOutsidePosition: p
  19454. });
  19455. var f = t.getTextContent();
  19456. if (s && f) {
  19457. var g = i.get(["label", "position"]);
  19458. t.textConfig.inside = "middle" === g || null,
  19459. function (t, e, n, i) {
  19460. if (j(i)) t.setTextConfig({
  19461. rotation: i
  19462. });
  19463. else if (Y(e)) t.setTextConfig({
  19464. rotation: 0
  19465. });
  19466. else {
  19467. var r, o = t.shape,
  19468. a = o.clockwise ? o.startAngle : o.endAngle,
  19469. s = o.clockwise ? o.endAngle : o.startAngle,
  19470. l = (a + s) / 2,
  19471. u = n(e);
  19472. switch (u) {
  19473. case "startArc":
  19474. case "insideStartArc":
  19475. case "middle":
  19476. case "insideEndArc":
  19477. case "endArc":
  19478. r = l;
  19479. break;
  19480. case "startAngle":
  19481. case "insideStartAngle":
  19482. r = a;
  19483. break;
  19484. case "endAngle":
  19485. case "insideEndAngle":
  19486. r = s;
  19487. break;
  19488. default:
  19489. return void t.setTextConfig({
  19490. rotation: 0
  19491. })
  19492. }
  19493. var h = 1.5 * Math.PI - r;
  19494. "middle" === u && h > Math.PI / 2 && h < 1.5 * Math.PI && (h -= Math.PI), t.setTextConfig({
  19495. rotation: h
  19496. })
  19497. }
  19498. }(t, "outside" === g ? p : g, pM(a), i.get(["label", "rotate"]))
  19499. }
  19500. dc(f, d, o.getRawValue(n), (function (t) {
  19501. return pS(e, t)
  19502. }));
  19503. var y = i.getModel(["emphasis"]);
  19504. Zl(t, y.get("focus"), y.get("blurScope"), y.get("disabled")), $l(t, i),
  19505. function (t) {
  19506. return null != t.startAngle && null != t.endAngle && t.startAngle === t.endAngle
  19507. }(r) && (t.style.fill = "none", t.style.stroke = "none", E(t.states, (function (t) {
  19508. t.style && (t.style.fill = t.style.stroke = "none")
  19509. })))
  19510. }
  19511. var fM = function () {},
  19512. gM = function (t) {
  19513. function e(e) {
  19514. var n = t.call(this, e) || this;
  19515. return n.type = "largeBar", n
  19516. }
  19517. return n(e, t), e.prototype.getDefaultShape = function () {
  19518. return new fM
  19519. }, e.prototype.buildPath = function (t, e) {
  19520. for (var n = e.points, i = this.baseDimIdx, r = 1 - this.baseDimIdx, o = [], a = [], s = this.barWidth, l = 0; l < n.length; l += 3) a[i] = s, a[r] = n[l + 2], o[i] = n[l + i], o[r] = n[l + r], t.rect(o[0], o[1], a[0], a[1])
  19521. }, e
  19522. }(ks);
  19523. function yM(t, e, n, i) {
  19524. var r = t.getData(),
  19525. o = r.getLayout("valueAxisHorizontal") ? 1 : 0,
  19526. a = r.getLayout("largeDataIndices"),
  19527. s = r.getLayout("size"),
  19528. l = t.getModel("backgroundStyle"),
  19529. u = r.getLayout("largeBackgroundPoints");
  19530. if (u) {
  19531. var h = new gM({
  19532. shape: {
  19533. points: u
  19534. },
  19535. incremental: !!i,
  19536. silent: !0,
  19537. z2: 0
  19538. });
  19539. h.baseDimIdx = o, h.largeDataIndices = a, h.barWidth = s, h.useStyle(l.getItemStyle()), e.add(h), n && n.push(h)
  19540. }
  19541. var c = new gM({
  19542. shape: {
  19543. points: r.getLayout("largePoints")
  19544. },
  19545. incremental: !!i,
  19546. ignoreCoarsePointer: !0,
  19547. z2: 1
  19548. });
  19549. c.baseDimIdx = o, c.largeDataIndices = a, c.barWidth = s, e.add(c), c.useStyle(r.getVisual("style")), rl(c).seriesIndex = t.seriesIndex, t.get("silent") || (c.on("mousedown", vM), c.on("mousemove", vM)), n && n.push(c)
  19550. }
  19551. var vM = Wg((function (t) {
  19552. var e = function (t, e, n) {
  19553. for (var i = t.baseDimIdx, r = 1 - i, o = t.shape.points, a = t.largeDataIndices, s = [], l = [], u = t.barWidth, h = 0, c = o.length / 3; h < c; h++) {
  19554. var p = 3 * h;
  19555. if (l[i] = u, l[r] = o[p + 2], s[i] = o[p + i], s[r] = o[p + r], l[r] < 0 && (s[r] += l[r], l[r] = -l[r]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1]) return a[h]
  19556. }
  19557. return -1
  19558. }(this, t.offsetX, t.offsetY);
  19559. rl(this).dataIndex = e >= 0 ? e : null
  19560. }), 30, !1);
  19561. function mM(t, e, n) {
  19562. if (PS(n, "cartesian2d")) {
  19563. var i = e,
  19564. r = n.getArea();
  19565. return {
  19566. x: t ? i.x : r.x,
  19567. y: t ? r.y : i.y,
  19568. width: t ? i.width : r.width,
  19569. height: t ? r.height : i.height
  19570. }
  19571. }
  19572. var o = e;
  19573. return {
  19574. cx: (r = n.getArea()).cx,
  19575. cy: r.cy,
  19576. r0: t ? r.r0 : o.r0,
  19577. r: t ? r.r : o.r,
  19578. startAngle: t ? o.startAngle : 0,
  19579. endAngle: t ? o.endAngle : 2 * Math.PI
  19580. }
  19581. }
  19582. var xM = 2 * Math.PI,
  19583. _M = Math.PI / 180;
  19584. function bM(t, e) {
  19585. return kp(t.getBoxLayoutParams(), {
  19586. width: e.getWidth(),
  19587. height: e.getHeight()
  19588. })
  19589. }
  19590. function wM(t, e) {
  19591. var n = bM(t, e),
  19592. i = t.get("center"),
  19593. r = t.get("radius");
  19594. Y(r) || (r = [0, r]);
  19595. var o, a, s = $r(n.width, e.getWidth()),
  19596. l = $r(n.height, e.getHeight()),
  19597. u = Math.min(s, l),
  19598. h = $r(r[0], u / 2),
  19599. c = $r(r[1], u / 2),
  19600. p = t.coordinateSystem;
  19601. if (p) {
  19602. var d = p.dataToPoint(i);
  19603. o = d[0] || 0, a = d[1] || 0
  19604. } else Y(i) || (i = [i, i]), o = $r(i[0], s) + n.x, a = $r(i[1], l) + n.y;
  19605. return {
  19606. cx: o,
  19607. cy: a,
  19608. r0: h,
  19609. r: c
  19610. }
  19611. }
  19612. function SM(t, e, n) {
  19613. e.eachSeriesByType(t, (function (t) {
  19614. var e = t.getData(),
  19615. i = e.mapDimension("value"),
  19616. r = bM(t, n),
  19617. o = wM(t, n),
  19618. a = o.cx,
  19619. s = o.cy,
  19620. l = o.r,
  19621. u = o.r0,
  19622. h = -t.get("startAngle") * _M,
  19623. c = t.get("endAngle"),
  19624. p = t.get("padAngle") * _M;
  19625. c = "auto" === c ? h - xM : -c * _M;
  19626. var d = t.get("minAngle") * _M + p,
  19627. f = 0;
  19628. e.each(i, (function (t) {
  19629. !isNaN(t) && f++
  19630. }));
  19631. var g = e.getSum(i),
  19632. y = Math.PI / (g || f) * 2,
  19633. v = t.get("clockwise"),
  19634. m = t.get("roseType"),
  19635. x = t.get("stillShowZeroSum"),
  19636. _ = e.getDataExtent(i);
  19637. _[0] = 0;
  19638. var b = v ? 1 : -1,
  19639. w = [h, c],
  19640. S = b * p / 2;
  19641. us(w, !v), h = w[0], c = w[1];
  19642. var M = Math.abs(c - h),
  19643. I = M,
  19644. T = 0,
  19645. C = h;
  19646. if (e.setLayout({
  19647. viewRect: r,
  19648. r: l
  19649. }), e.each(i, (function (t, n) {
  19650. var i;
  19651. if (isNaN(t)) e.setItemLayout(n, {
  19652. angle: NaN,
  19653. startAngle: NaN,
  19654. endAngle: NaN,
  19655. clockwise: v,
  19656. cx: a,
  19657. cy: s,
  19658. r0: u,
  19659. r: m ? NaN : l
  19660. });
  19661. else {
  19662. (i = "area" !== m ? 0 === g && x ? y : t * y : M / f) < d ? (i = d, I -= d) : T += t;
  19663. var r = C + b * i,
  19664. o = 0,
  19665. h = 0;
  19666. p > i ? h = o = C + b * i / 2 : (o = C + S, h = r - S), e.setItemLayout(n, {
  19667. angle: i,
  19668. startAngle: o,
  19669. endAngle: h,
  19670. clockwise: v,
  19671. cx: a,
  19672. cy: s,
  19673. r0: u,
  19674. r: m ? Kr(t, _, [u, l]) : l
  19675. }), C = r
  19676. }
  19677. })), I < xM && f)
  19678. if (I <= .001) {
  19679. var D = M / f;
  19680. e.each(i, (function (t, n) {
  19681. if (!isNaN(t)) {
  19682. var i = e.getItemLayout(n);
  19683. i.angle = D;
  19684. var r = 0,
  19685. o = 0;
  19686. D < p ? o = r = h + b * (n + .5) * D : (r = h + b * n * D + S, o = h + b * (n + 1) * D - S), i.startAngle = r, i.endAngle = o
  19687. }
  19688. }))
  19689. } else y = I / T, C = h, e.each(i, (function (t, n) {
  19690. if (!isNaN(t)) {
  19691. var i = e.getItemLayout(n),
  19692. r = i.angle === d ? d : t * y,
  19693. o = 0,
  19694. a = 0;
  19695. r < p ? a = o = C + b * r / 2 : (o = C + S, a = C + b * r - S), i.startAngle = o, i.endAngle = a, C += b * r
  19696. }
  19697. }))
  19698. }))
  19699. }
  19700. function MM(t) {
  19701. return {
  19702. seriesType: t,
  19703. reset: function (t, e) {
  19704. var n = e.findComponents({
  19705. mainType: "legend"
  19706. });
  19707. if (n && n.length) {
  19708. var i = t.getData();
  19709. i.filterSelf((function (t) {
  19710. for (var e = i.getName(t), r = 0; r < n.length; r++)
  19711. if (!n[r].isSelected(e)) return !1;
  19712. return !0
  19713. }))
  19714. }
  19715. }
  19716. }
  19717. }
  19718. var IM = Math.PI / 180;
  19719. function TM(t, e, n, i, r, o, a, s, l, u) {
  19720. if (!(t.length < 2)) {
  19721. for (var h = t.length, c = 0; c < h; c++)
  19722. if ("outer" === t[c].position && "labelLine" === t[c].labelAlignTo) {
  19723. var p = t[c].label.x - u;
  19724. t[c].linePoints[1][0] += p, t[c].label.x = u
  19725. } Ob(t, l, l + a) && function (t) {
  19726. for (var o = {
  19727. list: [],
  19728. maxY: 0
  19729. }, a = {
  19730. list: [],
  19731. maxY: 0
  19732. }, s = 0; s < t.length; s++)
  19733. if ("none" === t[s].labelAlignTo) {
  19734. var l = t[s],
  19735. u = l.label.y > n ? a : o,
  19736. h = Math.abs(l.label.y - n);
  19737. if (h >= u.maxY) {
  19738. var c = l.label.x - e - l.len2 * r,
  19739. p = i + l.len,
  19740. f = Math.abs(c) < p ? Math.sqrt(h * h / (1 - c * c / p / p)) : p;
  19741. u.rB = f, u.maxY = h
  19742. }
  19743. u.list.push(l)
  19744. } d(o), d(a)
  19745. }(t)
  19746. }
  19747. function d(t) {
  19748. for (var o = t.rB, a = o * o, s = 0; s < t.list.length; s++) {
  19749. var l = t.list[s],
  19750. u = Math.abs(l.label.y - n),
  19751. h = i + l.len,
  19752. c = h * h,
  19753. p = Math.sqrt((1 - Math.abs(u * u / a)) * c),
  19754. d = e + (p + l.len2) * r,
  19755. f = d - l.label.x;
  19756. CM(l, l.targetTextWidth - f * r, !0), l.label.x = d
  19757. }
  19758. }
  19759. }
  19760. function CM(t, e, n) {
  19761. if (void 0 === n && (n = !1), null == t.labelStyleWidth) {
  19762. var i = t.label,
  19763. r = i.style,
  19764. o = t.rect,
  19765. a = r.backgroundColor,
  19766. s = r.padding,
  19767. l = s ? s[1] + s[3] : 0,
  19768. u = r.overflow,
  19769. h = o.width + (a ? 0 : l);
  19770. if (e < h || n) {
  19771. var c = o.height;
  19772. if (u && u.match("break")) {
  19773. i.setStyle("backgroundColor", null), i.setStyle("width", e - l);
  19774. var p = i.getBoundingRect();
  19775. i.setStyle("width", Math.ceil(p.width)), i.setStyle("backgroundColor", a)
  19776. } else {
  19777. var d = e - l,
  19778. f = e < h ? d : n ? d > t.unconstrainedWidth ? null : d : null;
  19779. i.setStyle("width", f)
  19780. }
  19781. var g = i.getBoundingRect();
  19782. o.width = g.width;
  19783. var y = (i.style.margin || 0) + 2.1;
  19784. o.height = g.height + y, o.y -= (o.height - c) / 2
  19785. }
  19786. }
  19787. }
  19788. function DM(t) {
  19789. return "center" === t.position
  19790. }
  19791. function AM(t) {
  19792. var e, n, i = t.getData(),
  19793. r = [],
  19794. o = !1,
  19795. a = (t.get("minShowLabelAngle") || 0) * IM,
  19796. s = i.getLayout("viewRect"),
  19797. l = i.getLayout("r"),
  19798. u = s.width,
  19799. h = s.x,
  19800. c = s.y,
  19801. p = s.height;
  19802. function d(t) {
  19803. t.ignore = !0
  19804. }
  19805. i.each((function (t) {
  19806. var s = i.getItemGraphicEl(t),
  19807. c = s.shape,
  19808. p = s.getTextContent(),
  19809. f = s.getTextGuideLine(),
  19810. g = i.getItemModel(t),
  19811. y = g.getModel("label"),
  19812. v = y.get("position") || g.get(["emphasis", "label", "position"]),
  19813. m = y.get("distanceToLabelLine"),
  19814. x = y.get("alignTo"),
  19815. _ = $r(y.get("edgeDistance"), u),
  19816. b = y.get("bleedMargin"),
  19817. w = g.getModel("labelLine"),
  19818. S = w.get("length");
  19819. S = $r(S, u);
  19820. var M = w.get("length2");
  19821. if (M = $r(M, u), Math.abs(c.endAngle - c.startAngle) < a) return E(p.states, d), p.ignore = !0, void(f && (E(f.states, d), f.ignore = !0));
  19822. if (function (t) {
  19823. if (!t.ignore) return !0;
  19824. for (var e in t.states)
  19825. if (!1 === t.states[e].ignore) return !0;
  19826. return !1
  19827. }(p)) {
  19828. var I, T, C, D, A = (c.startAngle + c.endAngle) / 2,
  19829. k = Math.cos(A),
  19830. L = Math.sin(A);
  19831. e = c.cx, n = c.cy;
  19832. var P = "inside" === v || "inner" === v;
  19833. if ("center" === v) I = c.cx, T = c.cy, D = "center";
  19834. else {
  19835. var O = (P ? (c.r + c.r0) / 2 * k : c.r * k) + e,
  19836. R = (P ? (c.r + c.r0) / 2 * L : c.r * L) + n;
  19837. if (I = O + 3 * k, T = R + 3 * L, !P) {
  19838. var N = O + k * (S + l - c.r),
  19839. z = R + L * (S + l - c.r),
  19840. V = N + (k < 0 ? -1 : 1) * M;
  19841. I = "edge" === x ? k < 0 ? h + _ : h + u - _ : V + (k < 0 ? -m : m), T = z, C = [
  19842. [O, R],
  19843. [N, z],
  19844. [V, z]
  19845. ]
  19846. }
  19847. D = P ? "center" : "edge" === x ? k > 0 ? "right" : "left" : k > 0 ? "left" : "right"
  19848. }
  19849. var B = Math.PI,
  19850. F = 0,
  19851. G = y.get("rotate");
  19852. if (j(G)) F = G * (B / 180);
  19853. else if ("center" === v) F = 0;
  19854. else if ("radial" === G || !0 === G) {
  19855. F = k < 0 ? -A + B : -A
  19856. } else if ("tangential" === G && "outside" !== v && "outer" !== v) {
  19857. var W = Math.atan2(k, L);
  19858. W < 0 && (W = 2 * B + W), L > 0 && (W = B + W), F = W - B
  19859. }
  19860. if (o = !!F, p.x = I, p.y = T, p.rotation = F, p.setStyle({
  19861. verticalAlign: "middle"
  19862. }), P) {
  19863. p.setStyle({
  19864. align: D
  19865. });
  19866. var H = p.states.select;
  19867. H && (H.x += p.x, H.y += p.y)
  19868. } else {
  19869. var Y = p.getBoundingRect().clone();
  19870. Y.applyTransform(p.getComputedTransform());
  19871. var X = (p.style.margin || 0) + 2.1;
  19872. Y.y -= X / 2, Y.height += X, r.push({
  19873. label: p,
  19874. labelLine: f,
  19875. position: v,
  19876. len: S,
  19877. len2: M,
  19878. minTurnAngle: w.get("minTurnAngle"),
  19879. maxSurfaceAngle: w.get("maxSurfaceAngle"),
  19880. surfaceNormal: new De(k, L),
  19881. linePoints: C,
  19882. textAlign: D,
  19883. labelDistance: m,
  19884. labelAlignTo: x,
  19885. edgeDistance: _,
  19886. bleedMargin: b,
  19887. rect: Y,
  19888. unconstrainedWidth: Y.width,
  19889. labelStyleWidth: p.style.width
  19890. })
  19891. }
  19892. s.setTextConfig({
  19893. inside: P
  19894. })
  19895. }
  19896. })), !o && t.get("avoidLabelOverlap") && function (t, e, n, i, r, o, a, s) {
  19897. for (var l = [], u = [], h = Number.MAX_VALUE, c = -Number.MAX_VALUE, p = 0; p < t.length; p++) {
  19898. var d = t[p].label;
  19899. DM(t[p]) || (d.x < e ? (h = Math.min(h, d.x), l.push(t[p])) : (c = Math.max(c, d.x), u.push(t[p])))
  19900. }
  19901. for (p = 0; p < t.length; p++)
  19902. if (!DM(y = t[p]) && y.linePoints) {
  19903. if (null != y.labelStyleWidth) continue;
  19904. d = y.label;
  19905. var f = y.linePoints,
  19906. g = void 0;
  19907. g = "edge" === y.labelAlignTo ? d.x < e ? f[2][0] - y.labelDistance - a - y.edgeDistance : a + r - y.edgeDistance - f[2][0] - y.labelDistance : "labelLine" === y.labelAlignTo ? d.x < e ? h - a - y.bleedMargin : a + r - c - y.bleedMargin : d.x < e ? d.x - a - y.bleedMargin : a + r - d.x - y.bleedMargin, y.targetTextWidth = g, CM(y, g)
  19908. } for (TM(u, e, n, i, 1, 0, o, 0, s, c), TM(l, e, n, i, -1, 0, o, 0, s, h), p = 0; p < t.length; p++) {
  19909. var y;
  19910. if (!DM(y = t[p]) && y.linePoints) {
  19911. d = y.label, f = y.linePoints;
  19912. var v = "edge" === y.labelAlignTo,
  19913. m = d.style.padding,
  19914. x = m ? m[1] + m[3] : 0,
  19915. _ = d.style.backgroundColor ? 0 : x,
  19916. b = y.rect.width + _,
  19917. w = f[1][0] - f[2][0];
  19918. v ? d.x < e ? f[2][0] = a + y.edgeDistance + b + y.labelDistance : f[2][0] = a + r - y.edgeDistance - b - y.labelDistance : (d.x < e ? f[2][0] = d.x + y.labelDistance : f[2][0] = d.x - y.labelDistance, f[1][0] = f[2][0] + w), f[1][1] = f[2][1] = d.y
  19919. }
  19920. }
  19921. }(r, e, n, l, u, p, h, c);
  19922. for (var f = 0; f < r.length; f++) {
  19923. var g = r[f],
  19924. y = g.label,
  19925. v = g.labelLine,
  19926. m = isNaN(y.x) || isNaN(y.y);
  19927. if (y) {
  19928. y.setStyle({
  19929. align: g.textAlign
  19930. }), m && (E(y.states, d), y.ignore = !0);
  19931. var x = y.states.select;
  19932. x && (x.x += y.x, x.y += y.y)
  19933. }
  19934. if (v) {
  19935. var _ = g.linePoints;
  19936. m || !_ ? (E(v.states, d), v.ignore = !0) : (Ib(_, g.minTurnAngle), Tb(_, g.surfaceNormal, g.maxSurfaceAngle), v.setShape({
  19937. points: _
  19938. }), y.__hostTarget.textGuideLineConfig = {
  19939. anchor: new De(_[0][0], _[0][1])
  19940. })
  19941. }
  19942. }
  19943. }
  19944. var kM = function (t) {
  19945. function e(e, n, i) {
  19946. var r = t.call(this) || this;
  19947. r.z2 = 2;
  19948. var o = new Xs;
  19949. return r.setTextContent(o), r.updateData(e, n, i, !0), r
  19950. }
  19951. return n(e, t), e.prototype.updateData = function (t, e, n, i) {
  19952. var r = this,
  19953. o = t.hostModel,
  19954. a = t.getItemModel(e),
  19955. s = a.getModel("emphasis"),
  19956. l = t.getItemLayout(e),
  19957. u = A(tM(a.getModel("itemStyle"), l, !0), l);
  19958. if (isNaN(u.startAngle)) r.setShape(u);
  19959. else {
  19960. if (i) {
  19961. r.setShape(u);
  19962. var h = o.getShallow("animationType");
  19963. o.ecModel.ssr ? (mh(r, {
  19964. scaleX: 0,
  19965. scaleY: 0
  19966. }, o, {
  19967. dataIndex: e,
  19968. isFrom: !0
  19969. }), r.originX = u.cx, r.originY = u.cy) : "scale" === h ? (r.shape.r = l.r0, mh(r, {
  19970. shape: {
  19971. r: l.r
  19972. }
  19973. }, o, e)) : null != n ? (r.setShape({
  19974. startAngle: n,
  19975. endAngle: n
  19976. }), mh(r, {
  19977. shape: {
  19978. startAngle: l.startAngle,
  19979. endAngle: l.endAngle
  19980. }
  19981. }, o, e)) : (r.shape.endAngle = l.startAngle, vh(r, {
  19982. shape: {
  19983. endAngle: l.endAngle
  19984. }
  19985. }, o, e))
  19986. } else Sh(r), vh(r, {
  19987. shape: u
  19988. }, o, e);
  19989. r.useStyle(t.getItemVisual(e, "style")), $l(r, a);
  19990. var c = (l.startAngle + l.endAngle) / 2,
  19991. p = o.get("selectedOffset"),
  19992. d = Math.cos(c) * p,
  19993. f = Math.sin(c) * p,
  19994. g = a.getShallow("cursor");
  19995. g && r.attr("cursor", g), this._updateLabel(o, t, e), r.ensureState("emphasis").shape = A({
  19996. r: l.r + (s.get("scale") && s.get("scaleSize") || 0)
  19997. }, tM(s.getModel("itemStyle"), l)), A(r.ensureState("select"), {
  19998. x: d,
  19999. y: f,
  20000. shape: tM(a.getModel(["select", "itemStyle"]), l)
  20001. }), A(r.ensureState("blur"), {
  20002. shape: tM(a.getModel(["blur", "itemStyle"]), l)
  20003. });
  20004. var y = r.getTextGuideLine(),
  20005. v = r.getTextContent();
  20006. y && A(y.ensureState("select"), {
  20007. x: d,
  20008. y: f
  20009. }), A(v.ensureState("select"), {
  20010. x: d,
  20011. y: f
  20012. }), Zl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  20013. }
  20014. }, e.prototype._updateLabel = function (t, e, n) {
  20015. var i = this,
  20016. r = e.getItemModel(n),
  20017. o = r.getModel("labelLine"),
  20018. a = e.getItemVisual(n, "style"),
  20019. s = a && a.fill,
  20020. l = a && a.opacity;
  20021. ic(i, rc(r), {
  20022. labelFetcher: e.hostModel,
  20023. labelDataIndex: n,
  20024. inheritColor: s,
  20025. defaultOpacity: l,
  20026. defaultText: t.getFormattedLabel(n, "normal") || e.getName(n)
  20027. });
  20028. var u = i.getTextContent();
  20029. i.setTextConfig({
  20030. position: null,
  20031. rotation: null
  20032. }), u.attr({
  20033. z2: 10
  20034. });
  20035. var h = t.get(["label", "position"]);
  20036. if ("outside" !== h && "outer" !== h) i.removeTextGuideLine();
  20037. else {
  20038. var c = this.getTextGuideLine();
  20039. c || (c = new Zu, this.setTextGuideLine(c)), Ab(this, kb(r), {
  20040. stroke: s,
  20041. opacity: ot(o.get(["lineStyle", "opacity"]), l, 1)
  20042. })
  20043. }
  20044. }, e
  20045. }(Fu),
  20046. LM = function (t) {
  20047. function e() {
  20048. var e = null !== t && t.apply(this, arguments) || this;
  20049. return e.ignoreLabelLineUpdate = !0, e
  20050. }
  20051. return n(e, t), e.prototype.render = function (t, e, n, i) {
  20052. var r, o = t.getData(),
  20053. a = this._data,
  20054. s = this.group;
  20055. if (!a && o.count() > 0) {
  20056. for (var l = o.getItemLayout(0), u = 1; isNaN(l && l.startAngle) && u < o.count(); ++u) l = o.getItemLayout(u);
  20057. l && (r = l.startAngle)
  20058. }
  20059. if (this._emptyCircleSector && s.remove(this._emptyCircleSector), 0 === o.count() && t.get("showEmptyCircle")) {
  20060. var h = new Fu({
  20061. shape: wM(t, n)
  20062. });
  20063. h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, s.add(h)
  20064. }
  20065. o.diff(a).add((function (t) {
  20066. var e = new kM(o, t, r);
  20067. o.setItemGraphicEl(t, e), s.add(e)
  20068. })).update((function (t, e) {
  20069. var n = a.getItemGraphicEl(e);
  20070. n.updateData(o, t, r), n.off("click"), s.add(n), o.setItemGraphicEl(t, n)
  20071. })).remove((function (e) {
  20072. wh(a.getItemGraphicEl(e), t, e)
  20073. })).execute(), AM(t), "expansion" !== t.get("animationTypeUpdate") && (this._data = o)
  20074. }, e.prototype.dispose = function () {}, e.prototype.containPoint = function (t, e) {
  20075. var n = e.getData().getItemLayout(0);
  20076. if (n) {
  20077. var i = t[0] - n.cx,
  20078. r = t[1] - n.cy,
  20079. o = Math.sqrt(i * i + r * r);
  20080. return o <= n.r && o >= n.r0
  20081. }
  20082. }, e.type = "pie", e
  20083. }(Og);
  20084. function PM(t, e, n) {
  20085. e = Y(e) && {
  20086. coordDimensions: e
  20087. } || A({
  20088. encodeDefine: t.getEncode()
  20089. }, e);
  20090. var i = t.getSource(),
  20091. r = px(i, e).dimensions,
  20092. o = new cx(r, t);
  20093. return o.initData(i, n), o
  20094. }
  20095. var OM = function () {
  20096. function t(t, e) {
  20097. this._getDataWithEncodedVisual = t, this._getRawData = e
  20098. }
  20099. return t.prototype.getAllNames = function () {
  20100. var t = this._getRawData();
  20101. return t.mapArray(t.getName)
  20102. }, t.prototype.containName = function (t) {
  20103. return this._getRawData().indexOfName(t) >= 0
  20104. }, t.prototype.indexOfName = function (t) {
  20105. return this._getDataWithEncodedVisual().indexOfName(t)
  20106. }, t.prototype.getItemVisual = function (t, e) {
  20107. return this._getDataWithEncodedVisual().getItemVisual(t, e)
  20108. }, t
  20109. }(),
  20110. RM = Vo(),
  20111. NM = function (t) {
  20112. function e() {
  20113. return null !== t && t.apply(this, arguments) || this
  20114. }
  20115. return n(e, t), e.prototype.init = function (e) {
  20116. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new OM(W(this.getData, this), W(this.getRawData, this)), this._defaultLabelLine(e)
  20117. }, e.prototype.mergeOption = function () {
  20118. t.prototype.mergeOption.apply(this, arguments)
  20119. }, e.prototype.getInitialData = function () {
  20120. return PM(this, {
  20121. coordDimensions: ["value"],
  20122. encodeDefaulter: H(ed, this)
  20123. })
  20124. }, e.prototype.getDataParams = function (e) {
  20125. var n = this.getData(),
  20126. i = RM(n),
  20127. r = i.seats;
  20128. if (!r) {
  20129. var o = [];
  20130. n.each(n.mapDimension("value"), (function (t) {
  20131. o.push(t)
  20132. })), r = i.seats = io(o, n.hostModel.get("percentPrecision"))
  20133. }
  20134. var a = t.prototype.getDataParams.call(this, e);
  20135. return a.percent = r[e] || 0, a.$vars.push("percent"), a
  20136. }, e.prototype._defaultLabelLine = function (t) {
  20137. Co(t, "labelLine", ["show"]);
  20138. var e = t.labelLine,
  20139. n = t.emphasis.labelLine;
  20140. e.show = e.show && t.label.show, n.show = n.show && t.emphasis.label.show
  20141. }, e.type = "series.pie", e.defaultOption = {
  20142. z: 2,
  20143. legendHoverLink: !0,
  20144. colorBy: "data",
  20145. center: ["50%", "50%"],
  20146. radius: [0, "75%"],
  20147. clockwise: !0,
  20148. startAngle: 90,
  20149. endAngle: "auto",
  20150. padAngle: 0,
  20151. minAngle: 0,
  20152. minShowLabelAngle: 0,
  20153. selectedOffset: 10,
  20154. percentPrecision: 2,
  20155. stillShowZeroSum: !0,
  20156. left: 0,
  20157. top: 0,
  20158. right: 0,
  20159. bottom: 0,
  20160. width: null,
  20161. height: null,
  20162. label: {
  20163. rotate: 0,
  20164. show: !0,
  20165. overflow: "truncate",
  20166. position: "outer",
  20167. alignTo: "none",
  20168. edgeDistance: "25%",
  20169. bleedMargin: 10,
  20170. distanceToLabelLine: 5
  20171. },
  20172. labelLine: {
  20173. show: !0,
  20174. length: 15,
  20175. length2: 15,
  20176. smooth: !1,
  20177. minTurnAngle: 90,
  20178. maxSurfaceAngle: 90,
  20179. lineStyle: {
  20180. width: 1,
  20181. type: "solid"
  20182. }
  20183. },
  20184. itemStyle: {
  20185. borderWidth: 1,
  20186. borderJoin: "round"
  20187. },
  20188. showEmptyCircle: !0,
  20189. emptyCircleStyle: {
  20190. color: "lightgray",
  20191. opacity: 1
  20192. },
  20193. labelLayout: {
  20194. hideOverlap: !0
  20195. },
  20196. emphasis: {
  20197. scale: !0,
  20198. scaleSize: 5
  20199. },
  20200. avoidLabelOverlap: !0,
  20201. animationType: "expansion",
  20202. animationDuration: 1e3,
  20203. animationTypeUpdate: "transition",
  20204. animationEasingUpdate: "cubicInOut",
  20205. animationDurationUpdate: 500,
  20206. animationEasing: "cubicInOut"
  20207. }, e
  20208. }(bg);
  20209. var EM = function (t) {
  20210. function e() {
  20211. var n = null !== t && t.apply(this, arguments) || this;
  20212. return n.type = e.type, n.hasSymbolVisual = !0, n
  20213. }
  20214. return n(e, t), e.prototype.getInitialData = function (t, e) {
  20215. return _x(null, this, {
  20216. useEncodeDefaulter: !0
  20217. })
  20218. }, e.prototype.getProgressive = function () {
  20219. var t = this.option.progressive;
  20220. return null == t ? this.option.large ? 5e3 : this.get("progressive") : t
  20221. }, e.prototype.getProgressiveThreshold = function () {
  20222. var t = this.option.progressiveThreshold;
  20223. return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t
  20224. }, e.prototype.brushSelector = function (t, e, n) {
  20225. return n.point(e.getItemLayout(t))
  20226. }, e.prototype.getZLevelKey = function () {
  20227. return this.getData().count() > this.getProgressiveThreshold() ? this.id : ""
  20228. }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  20229. coordinateSystem: "cartesian2d",
  20230. z: 2,
  20231. legendHoverLink: !0,
  20232. symbolSize: 10,
  20233. large: !1,
  20234. largeThreshold: 2e3,
  20235. itemStyle: {
  20236. opacity: .8
  20237. },
  20238. emphasis: {
  20239. scale: !0
  20240. },
  20241. clip: !0,
  20242. select: {
  20243. itemStyle: {
  20244. borderColor: "#212121"
  20245. }
  20246. },
  20247. universalTransition: {
  20248. divideShape: "clone"
  20249. }
  20250. }, e
  20251. }(bg),
  20252. zM = function () {},
  20253. VM = function (t) {
  20254. function e(e) {
  20255. var n = t.call(this, e) || this;
  20256. return n._off = 0, n.hoverDataIdx = -1, n
  20257. }
  20258. return n(e, t), e.prototype.getDefaultShape = function () {
  20259. return new zM
  20260. }, e.prototype.reset = function () {
  20261. this.notClear = !1, this._off = 0
  20262. }, e.prototype.buildPath = function (t, e) {
  20263. var n, i = e.points,
  20264. r = e.size,
  20265. o = this.symbolProxy,
  20266. a = o.shape,
  20267. s = t.getContext ? t.getContext() : t,
  20268. l = s && r[0] < 4,
  20269. u = this.softClipShape;
  20270. if (l) this._ctx = s;
  20271. else {
  20272. for (this._ctx = null, n = this._off; n < i.length;) {
  20273. var h = i[n++],
  20274. c = i[n++];
  20275. isNaN(h) || isNaN(c) || (u && !u.contain(h, c) || (a.x = h - r[0] / 2, a.y = c - r[1] / 2, a.width = r[0], a.height = r[1], o.buildPath(t, a, !0)))
  20276. }
  20277. this.incremental && (this._off = n, this.notClear = !0)
  20278. }
  20279. }, e.prototype.afterBrush = function () {
  20280. var t, e = this.shape,
  20281. n = e.points,
  20282. i = e.size,
  20283. r = this._ctx,
  20284. o = this.softClipShape;
  20285. if (r) {
  20286. for (t = this._off; t < n.length;) {
  20287. var a = n[t++],
  20288. s = n[t++];
  20289. isNaN(a) || isNaN(s) || (o && !o.contain(a, s) || r.fillRect(a - i[0] / 2, s - i[1] / 2, i[0], i[1]))
  20290. }
  20291. this.incremental && (this._off = t, this.notClear = !0)
  20292. }
  20293. }, e.prototype.findDataIndex = function (t, e) {
  20294. for (var n = this.shape, i = n.points, r = n.size, o = Math.max(r[0], 4), a = Math.max(r[1], 4), s = i.length / 2 - 1; s >= 0; s--) {
  20295. var l = 2 * s,
  20296. u = i[l] - o / 2,
  20297. h = i[l + 1] - a / 2;
  20298. if (t >= u && e >= h && t <= u + o && e <= h + a) return s
  20299. }
  20300. return -1
  20301. }, e.prototype.contain = function (t, e) {
  20302. var n = this.transformCoordToLocal(t, e),
  20303. i = this.getBoundingRect();
  20304. return t = n[0], e = n[1], i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1, !1)
  20305. }, e.prototype.getBoundingRect = function () {
  20306. var t = this._rect;
  20307. if (!t) {
  20308. for (var e = this.shape, n = e.points, i = e.size, r = i[0], o = i[1], a = 1 / 0, s = 1 / 0, l = -1 / 0, u = -1 / 0, h = 0; h < n.length;) {
  20309. var c = n[h++],
  20310. p = n[h++];
  20311. a = Math.min(c, a), l = Math.max(c, l), s = Math.min(p, s), u = Math.max(p, u)
  20312. }
  20313. t = this._rect = new ze(a - r / 2, s - o / 2, l - a + r, u - s + o)
  20314. }
  20315. return t
  20316. }, e
  20317. }(ks),
  20318. BM = function () {
  20319. function t() {
  20320. this.group = new Br
  20321. }
  20322. return t.prototype.updateData = function (t, e) {
  20323. this._clear();
  20324. var n = this._create();
  20325. n.setShape({
  20326. points: t.getLayout("points")
  20327. }), this._setCommon(n, t, e)
  20328. }, t.prototype.updateLayout = function (t) {
  20329. var e = t.getLayout("points");
  20330. this.group.eachChild((function (t) {
  20331. if (null != t.startIndex) {
  20332. var n = 2 * (t.endIndex - t.startIndex),
  20333. i = 4 * t.startIndex * 2;
  20334. e = new Float32Array(e.buffer, i, n)
  20335. }
  20336. t.setShape("points", e), t.reset()
  20337. }))
  20338. }, t.prototype.incrementalPrepareUpdate = function (t) {
  20339. this._clear()
  20340. }, t.prototype.incrementalUpdate = function (t, e, n) {
  20341. var i = this._newAdded[0],
  20342. r = e.getLayout("points"),
  20343. o = i && i.shape.points;
  20344. if (o && o.length < 2e4) {
  20345. var a = o.length,
  20346. s = new Float32Array(a + r.length);
  20347. s.set(o), s.set(r, a), i.endIndex = t.end, i.setShape({
  20348. points: s
  20349. })
  20350. } else {
  20351. this._newAdded = [];
  20352. var l = this._create();
  20353. l.startIndex = t.start, l.endIndex = t.end, l.incremental = !0, l.setShape({
  20354. points: r
  20355. }), this._setCommon(l, e, n)
  20356. }
  20357. }, t.prototype.eachRendered = function (t) {
  20358. this._newAdded[0] && t(this._newAdded[0])
  20359. }, t.prototype._create = function () {
  20360. var t = new VM({
  20361. cursor: "default"
  20362. });
  20363. return t.ignoreCoarsePointer = !0, this.group.add(t), this._newAdded.push(t), t
  20364. }, t.prototype._setCommon = function (t, e, n) {
  20365. var i = e.hostModel;
  20366. n = n || {};
  20367. var r = e.getVisual("symbolSize");
  20368. t.setShape("size", r instanceof Array ? r : [r, r]), t.softClipShape = n.clipShape || null, t.symbolProxy = Xy(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor = t.symbolProxy.setColor;
  20369. var o = t.shape.size[0] < 4;
  20370. t.useStyle(i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
  20371. var a = e.getVisual("style"),
  20372. s = a && a.fill;
  20373. s && t.setColor(s);
  20374. var l = rl(t);
  20375. l.seriesIndex = i.seriesIndex, t.on("mousemove", (function (e) {
  20376. l.dataIndex = null;
  20377. var n = t.hoverDataIdx;
  20378. n >= 0 && (l.dataIndex = n + (t.startIndex || 0))
  20379. }))
  20380. }, t.prototype.remove = function () {
  20381. this._clear()
  20382. }, t.prototype._clear = function () {
  20383. this._newAdded = [], this.group.removeAll()
  20384. }, t
  20385. }(),
  20386. FM = function (t) {
  20387. function e() {
  20388. var n = null !== t && t.apply(this, arguments) || this;
  20389. return n.type = e.type, n
  20390. }
  20391. return n(e, t), e.prototype.render = function (t, e, n) {
  20392. var i = t.getData();
  20393. this._updateSymbolDraw(i, t).updateData(i, {
  20394. clipShape: this._getClipShape(t)
  20395. }), this._finished = !0
  20396. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  20397. var i = t.getData();
  20398. this._updateSymbolDraw(i, t).incrementalPrepareUpdate(i), this._finished = !1
  20399. }, e.prototype.incrementalRender = function (t, e, n) {
  20400. this._symbolDraw.incrementalUpdate(t, e.getData(), {
  20401. clipShape: this._getClipShape(e)
  20402. }), this._finished = t.end === e.getData().count()
  20403. }, e.prototype.updateTransform = function (t, e, n) {
  20404. var i = t.getData();
  20405. if (this.group.dirty(), !this._finished || i.count() > 1e4) return {
  20406. update: !0
  20407. };
  20408. var r = YS("").reset(t, e, n);
  20409. r.progress && r.progress({
  20410. start: 0,
  20411. end: i.count(),
  20412. count: i.count()
  20413. }, i), this._symbolDraw.updateLayout(i)
  20414. }, e.prototype.eachRendered = function (t) {
  20415. this._symbolDraw && this._symbolDraw.eachRendered(t)
  20416. }, e.prototype._getClipShape = function (t) {
  20417. if (t.get("clip", !0)) {
  20418. var e = t.coordinateSystem;
  20419. return e && e.getArea && e.getArea(.1)
  20420. }
  20421. }, e.prototype._updateSymbolDraw = function (t, e) {
  20422. var n = this._symbolDraw,
  20423. i = e.pipelineContext.large;
  20424. return n && i === this._isLargeDraw || (n && n.remove(), n = this._symbolDraw = i ? new BM : new mS, this._isLargeDraw = i, this.group.removeAll()), this.group.add(n.group), n
  20425. }, e.prototype.remove = function (t, e) {
  20426. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null
  20427. }, e.prototype.dispose = function () {}, e.type = "scatter", e
  20428. }(Og),
  20429. GM = function (t) {
  20430. function e() {
  20431. return null !== t && t.apply(this, arguments) || this
  20432. }
  20433. return n(e, t), e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
  20434. show: !1,
  20435. z: 0,
  20436. left: "10%",
  20437. top: 60,
  20438. right: "10%",
  20439. bottom: 70,
  20440. containLabel: !1,
  20441. backgroundColor: "rgba(0,0,0,0)",
  20442. borderWidth: 1,
  20443. borderColor: "#ccc"
  20444. }, e
  20445. }(zp),
  20446. WM = function (t) {
  20447. function e() {
  20448. return null !== t && t.apply(this, arguments) || this
  20449. }
  20450. return n(e, t), e.prototype.getCoordSysModel = function () {
  20451. return this.getReferringComponents("grid", Wo).models[0]
  20452. }, e.type = "cartesian2dAxis", e
  20453. }(zp);
  20454. R(WM, D_);
  20455. var HM = {
  20456. show: !0,
  20457. z: 0,
  20458. inverse: !1,
  20459. name: "",
  20460. nameLocation: "end",
  20461. nameRotate: null,
  20462. nameTruncate: {
  20463. maxWidth: null,
  20464. ellipsis: "...",
  20465. placeholder: "."
  20466. },
  20467. nameTextStyle: {},
  20468. nameGap: 15,
  20469. silent: !1,
  20470. triggerEvent: !1,
  20471. tooltip: {
  20472. show: !1
  20473. },
  20474. axisPointer: {},
  20475. axisLine: {
  20476. show: !0,
  20477. onZero: !0,
  20478. onZeroAxisIndex: null,
  20479. lineStyle: {
  20480. color: "#6E7079",
  20481. width: 1,
  20482. type: "solid"
  20483. },
  20484. symbol: ["none", "none"],
  20485. symbolSize: [10, 15]
  20486. },
  20487. axisTick: {
  20488. show: !0,
  20489. inside: !1,
  20490. length: 5,
  20491. lineStyle: {
  20492. width: 1
  20493. }
  20494. },
  20495. axisLabel: {
  20496. show: !0,
  20497. inside: !1,
  20498. rotate: 0,
  20499. showMinLabel: null,
  20500. showMaxLabel: null,
  20501. margin: 8,
  20502. fontSize: 12
  20503. },
  20504. splitLine: {
  20505. show: !0,
  20506. lineStyle: {
  20507. color: ["#E0E6F1"],
  20508. width: 1,
  20509. type: "solid"
  20510. }
  20511. },
  20512. splitArea: {
  20513. show: !1,
  20514. areaStyle: {
  20515. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  20516. }
  20517. }
  20518. },
  20519. YM = C({
  20520. boundaryGap: !0,
  20521. deduplication: null,
  20522. splitLine: {
  20523. show: !1
  20524. },
  20525. axisTick: {
  20526. alignWithLabel: !1,
  20527. interval: "auto"
  20528. },
  20529. axisLabel: {
  20530. interval: "auto"
  20531. }
  20532. }, HM),
  20533. XM = C({
  20534. boundaryGap: [0, 0],
  20535. axisLine: {
  20536. show: "auto"
  20537. },
  20538. axisTick: {
  20539. show: "auto"
  20540. },
  20541. splitNumber: 5,
  20542. minorTick: {
  20543. show: !1,
  20544. splitNumber: 5,
  20545. length: 3,
  20546. lineStyle: {}
  20547. },
  20548. minorSplitLine: {
  20549. show: !1,
  20550. lineStyle: {
  20551. color: "#F4F7FD",
  20552. width: 1
  20553. }
  20554. }
  20555. }, HM),
  20556. UM = {
  20557. category: YM,
  20558. value: XM,
  20559. time: C({
  20560. splitNumber: 6,
  20561. axisLabel: {
  20562. showMinLabel: !1,
  20563. showMaxLabel: !1,
  20564. rich: {
  20565. primary: {
  20566. fontWeight: "bold"
  20567. }
  20568. }
  20569. },
  20570. splitLine: {
  20571. show: !1
  20572. }
  20573. }, XM),
  20574. log: k({
  20575. logBase: 10
  20576. }, XM)
  20577. },
  20578. ZM = {
  20579. value: 1,
  20580. category: 1,
  20581. time: 1,
  20582. log: 1
  20583. };
  20584. function jM(t, e, i, r) {
  20585. E(ZM, (function (o, a) {
  20586. var s = C(C({}, UM[a], !0), r, !0),
  20587. l = function (t) {
  20588. function i() {
  20589. var n = null !== t && t.apply(this, arguments) || this;
  20590. return n.type = e + "Axis." + a, n
  20591. }
  20592. return n(i, t), i.prototype.mergeDefaultAndTheme = function (t, e) {
  20593. var n = Pp(this),
  20594. i = n ? Rp(t) : {};
  20595. C(t, e.getTheme().get(a + "Axis")), C(t, this.getDefaultOption()), t.type = qM(t), n && Op(t, i, n)
  20596. }, i.prototype.optionUpdated = function () {
  20597. "category" === this.option.type && (this.__ordinalMeta = Mx.createByAxisModel(this))
  20598. }, i.prototype.getCategories = function (t) {
  20599. var e = this.option;
  20600. if ("category" === e.type) return t ? e.data : this.__ordinalMeta.categories
  20601. }, i.prototype.getOrdinalMeta = function () {
  20602. return this.__ordinalMeta
  20603. }, i.type = e + "Axis." + a, i.defaultOption = s, i
  20604. }(i);
  20605. t.registerComponentModel(l)
  20606. })), t.registerSubTypeDefaulter(e + "Axis", qM)
  20607. }
  20608. function qM(t) {
  20609. return t.type || (t.data ? "category" : "value")
  20610. }
  20611. var KM = function () {
  20612. function t(t) {
  20613. this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = t || ""
  20614. }
  20615. return t.prototype.getAxis = function (t) {
  20616. return this._axes[t]
  20617. }, t.prototype.getAxes = function () {
  20618. return z(this._dimList, (function (t) {
  20619. return this._axes[t]
  20620. }), this)
  20621. }, t.prototype.getAxesByScale = function (t) {
  20622. return t = t.toLowerCase(), B(this.getAxes(), (function (e) {
  20623. return e.scale.type === t
  20624. }))
  20625. }, t.prototype.addAxis = function (t) {
  20626. var e = t.dim;
  20627. this._axes[e] = t, this._dimList.push(e)
  20628. }, t
  20629. }(),
  20630. $M = ["x", "y"];
  20631. function JM(t) {
  20632. return "interval" === t.type || "time" === t.type
  20633. }
  20634. var QM = function (t) {
  20635. function e() {
  20636. var e = null !== t && t.apply(this, arguments) || this;
  20637. return e.type = "cartesian2d", e.dimensions = $M, e
  20638. }
  20639. return n(e, t), e.prototype.calcAffineTransform = function () {
  20640. this._transform = this._invTransform = null;
  20641. var t = this.getAxis("x").scale,
  20642. e = this.getAxis("y").scale;
  20643. if (JM(t) && JM(e)) {
  20644. var n = t.getExtent(),
  20645. i = e.getExtent(),
  20646. r = this.dataToPoint([n[0], i[0]]),
  20647. o = this.dataToPoint([n[1], i[1]]),
  20648. a = n[1] - n[0],
  20649. s = i[1] - i[0];
  20650. if (a && s) {
  20651. var l = (o[0] - r[0]) / a,
  20652. u = (o[1] - r[1]) / s,
  20653. h = r[0] - n[0] * l,
  20654. c = r[1] - i[0] * u,
  20655. p = this._transform = [l, 0, 0, u, h, c];
  20656. this._invTransform = Ie([], p)
  20657. }
  20658. }
  20659. }, e.prototype.getBaseAxis = function () {
  20660. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
  20661. }, e.prototype.containPoint = function (t) {
  20662. var e = this.getAxis("x"),
  20663. n = this.getAxis("y");
  20664. return e.contain(e.toLocalCoord(t[0])) && n.contain(n.toLocalCoord(t[1]))
  20665. }, e.prototype.containData = function (t) {
  20666. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
  20667. }, e.prototype.containZone = function (t, e) {
  20668. var n = this.dataToPoint(t),
  20669. i = this.dataToPoint(e),
  20670. r = this.getArea(),
  20671. o = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]);
  20672. return r.intersect(o)
  20673. }, e.prototype.dataToPoint = function (t, e, n) {
  20674. n = n || [];
  20675. var i = t[0],
  20676. r = t[1];
  20677. if (this._transform && null != i && isFinite(i) && null != r && isFinite(r)) return Wt(n, t, this._transform);
  20678. var o = this.getAxis("x"),
  20679. a = this.getAxis("y");
  20680. return n[0] = o.toGlobalCoord(o.dataToCoord(i, e)), n[1] = a.toGlobalCoord(a.dataToCoord(r, e)), n
  20681. }, e.prototype.clampData = function (t, e) {
  20682. var n = this.getAxis("x").scale,
  20683. i = this.getAxis("y").scale,
  20684. r = n.getExtent(),
  20685. o = i.getExtent(),
  20686. a = n.parse(t[0]),
  20687. s = i.parse(t[1]);
  20688. return (e = e || [])[0] = Math.min(Math.max(Math.min(r[0], r[1]), a), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(o[0], o[1]), s), Math.max(o[0], o[1])), e
  20689. }, e.prototype.pointToData = function (t, e) {
  20690. var n = [];
  20691. if (this._invTransform) return Wt(n, t, this._invTransform);
  20692. var i = this.getAxis("x"),
  20693. r = this.getAxis("y");
  20694. return n[0] = i.coordToData(i.toLocalCoord(t[0]), e), n[1] = r.coordToData(r.toLocalCoord(t[1]), e), n
  20695. }, e.prototype.getOtherAxis = function (t) {
  20696. return this.getAxis("x" === t.dim ? "y" : "x")
  20697. }, e.prototype.getArea = function (t) {
  20698. t = t || 0;
  20699. var e = this.getAxis("x").getGlobalExtent(),
  20700. n = this.getAxis("y").getGlobalExtent(),
  20701. i = Math.min(e[0], e[1]) - t,
  20702. r = Math.min(n[0], n[1]) - t,
  20703. o = Math.max(e[0], e[1]) - i + t,
  20704. a = Math.max(n[0], n[1]) - r + t;
  20705. return new ze(i, r, o, a)
  20706. }, e
  20707. }(KM),
  20708. tI = function (t) {
  20709. function e(e, n, i, r, o) {
  20710. var a = t.call(this, e, n, i) || this;
  20711. return a.index = 0, a.type = r || "value", a.position = o || "bottom", a
  20712. }
  20713. return n(e, t), e.prototype.isHorizontal = function () {
  20714. var t = this.position;
  20715. return "top" === t || "bottom" === t
  20716. }, e.prototype.getGlobalExtent = function (t) {
  20717. var e = this.getExtent();
  20718. return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e
  20719. }, e.prototype.pointToData = function (t, e) {
  20720. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
  20721. }, e.prototype.setCategorySortInfo = function (t) {
  20722. if ("category" !== this.type) return !1;
  20723. this.model.option.categorySortInfo = t, this.scale.setSortInfo(t)
  20724. }, e
  20725. }(ob);
  20726. function eI(t, e, n) {
  20727. n = n || {};
  20728. var i = t.coordinateSystem,
  20729. r = e.axis,
  20730. o = {},
  20731. a = r.getAxesOnZeroOf()[0],
  20732. s = r.position,
  20733. l = a ? "onZero" : s,
  20734. u = r.dim,
  20735. h = i.getRect(),
  20736. c = [h.x, h.x + h.width, h.y, h.y + h.height],
  20737. p = {
  20738. left: 0,
  20739. right: 1,
  20740. top: 0,
  20741. bottom: 1,
  20742. onZero: 2
  20743. },
  20744. d = e.get("offset") || 0,
  20745. f = "x" === u ? [c[2] - d, c[3] + d] : [c[0] - d, c[1] + d];
  20746. if (a) {
  20747. var g = a.toGlobalCoord(a.dataToCoord(0));
  20748. f[p.onZero] = Math.max(Math.min(g, f[1]), f[0])
  20749. }
  20750. o.position = ["y" === u ? f[p[l]] : c[0], "x" === u ? f[p[l]] : c[3]], o.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
  20751. o.labelDirection = o.tickDirection = o.nameDirection = {
  20752. top: -1,
  20753. bottom: 1,
  20754. left: -1,
  20755. right: 1
  20756. } [s], o.labelOffset = a ? f[p[s]] - f[p.onZero] : 0, e.get(["axisTick", "inside"]) && (o.tickDirection = -o.tickDirection), it(n.labelInside, e.get(["axisLabel", "inside"])) && (o.labelDirection = -o.labelDirection);
  20757. var y = e.get(["axisLabel", "rotate"]);
  20758. return o.labelRotate = "top" === l ? -y : y, o.z2 = 1, o
  20759. }
  20760. function nI(t) {
  20761. return "cartesian2d" === t.get("coordinateSystem")
  20762. }
  20763. function iI(t) {
  20764. var e = {
  20765. xAxisModel: null,
  20766. yAxisModel: null
  20767. };
  20768. return E(e, (function (n, i) {
  20769. var r = i.replace(/Model$/, ""),
  20770. o = t.getReferringComponents(r, Wo).models[0];
  20771. e[i] = o
  20772. })), e
  20773. }
  20774. var rI = Math.log;
  20775. function oI(t, e, n) {
  20776. var i = Ex.prototype,
  20777. r = i.getTicks.call(n),
  20778. o = i.getTicks.call(n, !0),
  20779. a = r.length - 1,
  20780. s = i.getInterval.call(n),
  20781. l = x_(t, e),
  20782. u = l.extent,
  20783. h = l.fixMin,
  20784. c = l.fixMax;
  20785. if ("log" === t.type) {
  20786. var p = rI(t.base);
  20787. u = [rI(u[0]) / p, rI(u[1]) / p]
  20788. }
  20789. t.setExtent(u[0], u[1]), t.calcNiceExtent({
  20790. splitNumber: a,
  20791. fixMin: h,
  20792. fixMax: c
  20793. });
  20794. var d = i.getExtent.call(t);
  20795. h && (u[0] = d[0]), c && (u[1] = d[1]);
  20796. var f = i.getInterval.call(t),
  20797. g = u[0],
  20798. y = u[1];
  20799. if (h && c) f = (y - g) / a;
  20800. else if (h)
  20801. for (y = u[0] + f * a; y < u[1] && isFinite(y) && isFinite(u[1]);) f = Dx(f), y = u[0] + f * a;
  20802. else if (c)
  20803. for (g = u[1] - f * a; g > u[0] && isFinite(g) && isFinite(u[0]);) f = Dx(f), g = u[1] - f * a;
  20804. else {
  20805. t.getTicks().length - 1 > a && (f = Dx(f));
  20806. var v = f * a;
  20807. (g = Jr((y = Math.ceil(u[1] / f) * f) - v)) < 0 && u[0] >= 0 ? (g = 0, y = Jr(v)) : y > 0 && u[1] <= 0 && (y = 0, g = -Jr(v))
  20808. }
  20809. var m = (r[0].value - o[0].value) / s,
  20810. x = (r[a].value - o[a].value) / s;
  20811. i.setExtent.call(t, g + f * m, y + f * x), i.setInterval.call(t, f), (m || x) && i.setNiceExtent.call(t, g + f, y - f)
  20812. }
  20813. var aI = function () {
  20814. function t(t, e, n) {
  20815. this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = $M, this._initCartesian(t, e, n), this.model = t
  20816. }
  20817. return t.prototype.getRect = function () {
  20818. return this._rect
  20819. }, t.prototype.update = function (t, e) {
  20820. var n = this._axesMap;
  20821. function i(t) {
  20822. var e, n = G(t),
  20823. i = n.length;
  20824. if (i) {
  20825. for (var r = [], o = i - 1; o >= 0; o--) {
  20826. var a = t[+n[o]],
  20827. s = a.model,
  20828. l = a.scale;
  20829. Tx(l) && s.get("alignTicks") && null == s.get("interval") ? r.push(a) : (__(l, s), Tx(l) && (e = a))
  20830. }
  20831. r.length && (e || __((e = r.pop()).scale, e.model), E(r, (function (t) {
  20832. oI(t.scale, t.model, e.scale)
  20833. })))
  20834. }
  20835. }
  20836. this._updateScale(t, this.model), i(n.x), i(n.y);
  20837. var r = {};
  20838. E(n.x, (function (t) {
  20839. lI(n, "y", t, r)
  20840. })), E(n.y, (function (t) {
  20841. lI(n, "x", t, r)
  20842. })), this.resize(this.model, e)
  20843. }, t.prototype.resize = function (t, e, n) {
  20844. var i = t.getBoxLayoutParams(),
  20845. r = !n && t.get("containLabel"),
  20846. o = kp(i, {
  20847. width: e.getWidth(),
  20848. height: e.getHeight()
  20849. });
  20850. this._rect = o;
  20851. var a = this._axesList;
  20852. function s() {
  20853. E(a, (function (t) {
  20854. var e = t.isHorizontal(),
  20855. n = e ? [0, o.width] : [0, o.height],
  20856. i = t.inverse ? 1 : 0;
  20857. t.setExtent(n[i], n[1 - i]),
  20858. function (t, e) {
  20859. var n = t.getExtent(),
  20860. i = n[0] + n[1];
  20861. t.toGlobalCoord = "x" === t.dim ? function (t) {
  20862. return t + e
  20863. } : function (t) {
  20864. return i - t + e
  20865. }, t.toLocalCoord = "x" === t.dim ? function (t) {
  20866. return t - e
  20867. } : function (t) {
  20868. return i - t + e
  20869. }
  20870. }(t, e ? o.x : o.y)
  20871. }))
  20872. }
  20873. s(), r && (E(a, (function (t) {
  20874. if (!t.model.get(["axisLabel", "inside"])) {
  20875. var e = function (t) {
  20876. var e = t.model,
  20877. n = t.scale;
  20878. if (e.get(["axisLabel", "show"]) && !n.isBlank()) {
  20879. var i, r, o = n.getExtent();
  20880. r = n instanceof Rx ? n.count() : (i = n.getTicks()).length;
  20881. var a, s = t.getLabelModel(),
  20882. l = w_(t),
  20883. u = 1;
  20884. r > 40 && (u = Math.ceil(r / 40));
  20885. for (var h = 0; h < r; h += u) {
  20886. var c = l(i ? i[h] : {
  20887. value: o[0] + h
  20888. }, h),
  20889. p = M_(s.getTextRect(c), s.get("rotate") || 0);
  20890. a ? a.union(p) : a = p
  20891. }
  20892. return a
  20893. }
  20894. }(t);
  20895. if (e) {
  20896. var n = t.isHorizontal() ? "height" : "width",
  20897. i = t.model.get(["axisLabel", "margin"]);
  20898. o[n] -= e[n] + i, "top" === t.position ? o.y += e.height + i : "left" === t.position && (o.x += e.width + i)
  20899. }
  20900. }
  20901. })), s()), E(this._coordsList, (function (t) {
  20902. t.calcAffineTransform()
  20903. }))
  20904. }, t.prototype.getAxis = function (t, e) {
  20905. var n = this._axesMap[t];
  20906. if (null != n) return n[e || 0]
  20907. }, t.prototype.getAxes = function () {
  20908. return this._axesList.slice()
  20909. }, t.prototype.getCartesian = function (t, e) {
  20910. if (null != t && null != e) {
  20911. var n = "x" + t + "y" + e;
  20912. return this._coordsMap[n]
  20913. }
  20914. q(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
  20915. for (var i = 0, r = this._coordsList; i < r.length; i++)
  20916. if (r[i].getAxis("x").index === t || r[i].getAxis("y").index === e) return r[i]
  20917. }, t.prototype.getCartesians = function () {
  20918. return this._coordsList.slice()
  20919. }, t.prototype.convertToPixel = function (t, e, n) {
  20920. var i = this._findConvertTarget(e);
  20921. return i.cartesian ? i.cartesian.dataToPoint(n) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(n)) : null
  20922. }, t.prototype.convertFromPixel = function (t, e, n) {
  20923. var i = this._findConvertTarget(e);
  20924. return i.cartesian ? i.cartesian.pointToData(n) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(n)) : null
  20925. }, t.prototype._findConvertTarget = function (t) {
  20926. var e, n, i = t.seriesModel,
  20927. r = t.xAxisModel || i && i.getReferringComponents("xAxis", Wo).models[0],
  20928. o = t.yAxisModel || i && i.getReferringComponents("yAxis", Wo).models[0],
  20929. a = t.gridModel,
  20930. s = this._coordsList;
  20931. if (i) P(s, e = i.coordinateSystem) < 0 && (e = null);
  20932. else if (r && o) e = this.getCartesian(r.componentIndex, o.componentIndex);
  20933. else if (r) n = this.getAxis("x", r.componentIndex);
  20934. else if (o) n = this.getAxis("y", o.componentIndex);
  20935. else if (a) {
  20936. a.coordinateSystem === this && (e = this._coordsList[0])
  20937. }
  20938. return {
  20939. cartesian: e,
  20940. axis: n
  20941. }
  20942. }, t.prototype.containPoint = function (t) {
  20943. var e = this._coordsList[0];
  20944. if (e) return e.containPoint(t)
  20945. }, t.prototype._initCartesian = function (t, e, n) {
  20946. var i = this,
  20947. r = this,
  20948. o = {
  20949. left: !1,
  20950. right: !1,
  20951. top: !1,
  20952. bottom: !1
  20953. },
  20954. a = {
  20955. x: {},
  20956. y: {}
  20957. },
  20958. s = {
  20959. x: 0,
  20960. y: 0
  20961. };
  20962. if (e.eachComponent("xAxis", l("x"), this), e.eachComponent("yAxis", l("y"), this), !s.x || !s.y) return this._axesMap = {}, void(this._axesList = []);
  20963. function l(e) {
  20964. return function (n, i) {
  20965. if (sI(n, t)) {
  20966. var l = n.get("position");
  20967. "x" === e ? "top" !== l && "bottom" !== l && (l = o.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = o.left ? "right" : "left"), o[l] = !0;
  20968. var u = new tI(e, b_(n), [0, 0], n.get("type"), l),
  20969. h = "category" === u.type;
  20970. u.onBand = h && n.get("boundaryGap"), u.inverse = n.get("inverse"), n.axis = u, u.model = n, u.grid = r, u.index = i, r._axesList.push(u), a[e][i] = u, s[e]++
  20971. }
  20972. }
  20973. }
  20974. this._axesMap = a, E(a.x, (function (e, n) {
  20975. E(a.y, (function (r, o) {
  20976. var a = "x" + n + "y" + o,
  20977. s = new QM(a);
  20978. s.master = i, s.model = t, i._coordsMap[a] = s, i._coordsList.push(s), s.addAxis(e), s.addAxis(r)
  20979. }))
  20980. }))
  20981. }, t.prototype._updateScale = function (t, e) {
  20982. function n(t, e) {
  20983. E(C_(t, e.dim), (function (n) {
  20984. e.scale.unionExtentFromData(t, n)
  20985. }))
  20986. }
  20987. E(this._axesList, (function (t) {
  20988. if (t.scale.setExtent(1 / 0, -1 / 0), "category" === t.type) {
  20989. var e = t.model.get("categorySortInfo");
  20990. t.scale.setSortInfo(e)
  20991. }
  20992. })), t.eachSeries((function (t) {
  20993. if (nI(t)) {
  20994. var i = iI(t),
  20995. r = i.xAxisModel,
  20996. o = i.yAxisModel;
  20997. if (!sI(r, e) || !sI(o, e)) return;
  20998. var a = this.getCartesian(r.componentIndex, o.componentIndex),
  20999. s = t.getData(),
  21000. l = a.getAxis("x"),
  21001. u = a.getAxis("y");
  21002. n(s, l), n(s, u)
  21003. }
  21004. }), this)
  21005. }, t.prototype.getTooltipAxes = function (t) {
  21006. var e = [],
  21007. n = [];
  21008. return E(this.getCartesians(), (function (i) {
  21009. var r = null != t && "auto" !== t ? i.getAxis(t) : i.getBaseAxis(),
  21010. o = i.getOtherAxis(r);
  21011. P(e, r) < 0 && e.push(r), P(n, o) < 0 && n.push(o)
  21012. })), {
  21013. baseAxes: e,
  21014. otherAxes: n
  21015. }
  21016. }, t.create = function (e, n) {
  21017. var i = [];
  21018. return e.eachComponent("grid", (function (r, o) {
  21019. var a = new t(r, e, n);
  21020. a.name = "grid_" + o, a.resize(r, n, !0), r.coordinateSystem = a, i.push(a)
  21021. })), e.eachSeries((function (t) {
  21022. if (nI(t)) {
  21023. var e = iI(t),
  21024. n = e.xAxisModel,
  21025. i = e.yAxisModel,
  21026. r = n.getCoordSysModel();
  21027. 0;
  21028. var o = r.coordinateSystem;
  21029. t.coordinateSystem = o.getCartesian(n.componentIndex, i.componentIndex)
  21030. }
  21031. })), i
  21032. }, t.dimensions = $M, t
  21033. }();
  21034. function sI(t, e) {
  21035. return t.getCoordSysModel() === e
  21036. }
  21037. function lI(t, e, n, i) {
  21038. n.getAxesOnZeroOf = function () {
  21039. return r ? [r] : []
  21040. };
  21041. var r, o = t[e],
  21042. a = n.model,
  21043. s = a.get(["axisLine", "onZero"]),
  21044. l = a.get(["axisLine", "onZeroAxisIndex"]);
  21045. if (s) {
  21046. if (null != l) uI(o[l]) && (r = o[l]);
  21047. else
  21048. for (var u in o)
  21049. if (o.hasOwnProperty(u) && uI(o[u]) && !i[h(o[u])]) {
  21050. r = o[u];
  21051. break
  21052. } r && (i[h(r)] = !0)
  21053. }
  21054. function h(t) {
  21055. return t.dim + "_" + t.index
  21056. }
  21057. }
  21058. function uI(t) {
  21059. return t && "category" !== t.type && "time" !== t.type && function (t) {
  21060. var e = t.scale.getExtent(),
  21061. n = e[0],
  21062. i = e[1];
  21063. return !(n > 0 && i > 0 || n < 0 && i < 0)
  21064. }(t)
  21065. }
  21066. var hI = Math.PI,
  21067. cI = function () {
  21068. function t(t, e) {
  21069. this.group = new Br, this.opt = e, this.axisModel = t, k(e, {
  21070. labelOffset: 0,
  21071. nameDirection: 1,
  21072. tickDirection: 1,
  21073. labelDirection: 1,
  21074. silent: !0,
  21075. handleAutoShown: function () {
  21076. return !0
  21077. }
  21078. });
  21079. var n = new Br({
  21080. x: e.position[0],
  21081. y: e.position[1],
  21082. rotation: e.rotation
  21083. });
  21084. n.updateTransform(), this._transformGroup = n
  21085. }
  21086. return t.prototype.hasBuilder = function (t) {
  21087. return !!pI[t]
  21088. }, t.prototype.add = function (t) {
  21089. pI[t](this.opt, this.axisModel, this.group, this._transformGroup)
  21090. }, t.prototype.getGroup = function () {
  21091. return this.group
  21092. }, t.innerTextLayout = function (t, e, n) {
  21093. var i, r, o = ao(e - t);
  21094. return so(o) ? (r = n > 0 ? "top" : "bottom", i = "center") : so(o - hI) ? (r = n > 0 ? "bottom" : "top", i = "center") : (r = "middle", i = o > 0 && o < hI ? n > 0 ? "right" : "left" : n > 0 ? "left" : "right"), {
  21095. rotation: o,
  21096. textAlign: i,
  21097. textVerticalAlign: r
  21098. }
  21099. }, t.makeAxisEventDataBase = function (t) {
  21100. var e = {
  21101. componentType: t.mainType,
  21102. componentIndex: t.componentIndex
  21103. };
  21104. return e[t.mainType + "Index"] = t.componentIndex, e
  21105. }, t.isLabelSilent = function (t) {
  21106. var e = t.get("tooltip");
  21107. return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
  21108. }, t
  21109. }(),
  21110. pI = {
  21111. axisLine: function (t, e, n, i) {
  21112. var r = e.get(["axisLine", "show"]);
  21113. if ("auto" === r && t.handleAutoShown && (r = t.handleAutoShown("axisLine")), r) {
  21114. var o = e.axis.getExtent(),
  21115. a = i.transform,
  21116. s = [o[0], 0],
  21117. l = [o[1], 0],
  21118. u = s[0] > l[0];
  21119. a && (Wt(s, s, a), Wt(l, l, a));
  21120. var h = A({
  21121. lineCap: "round"
  21122. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()),
  21123. c = new Ku({
  21124. shape: {
  21125. x1: s[0],
  21126. y1: s[1],
  21127. x2: l[0],
  21128. y2: l[1]
  21129. },
  21130. style: h,
  21131. strokeContainThreshold: t.strokeContainThreshold || 5,
  21132. silent: !0,
  21133. z2: 1
  21134. });
  21135. zh(c.shape, c.style.lineWidth), c.anid = "line", n.add(c);
  21136. var p = e.get(["axisLine", "symbol"]);
  21137. if (null != p) {
  21138. var d = e.get(["axisLine", "symbolSize"]);
  21139. U(p) && (p = [p, p]), (U(d) || j(d)) && (d = [d, d]);
  21140. var f = Zy(e.get(["axisLine", "symbolOffset"]) || 0, d),
  21141. g = d[0],
  21142. y = d[1];
  21143. E([{
  21144. rotate: t.rotation + Math.PI / 2,
  21145. offset: f[0],
  21146. r: 0
  21147. }, {
  21148. rotate: t.rotation - Math.PI / 2,
  21149. offset: f[1],
  21150. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  21151. }], (function (e, i) {
  21152. if ("none" !== p[i] && null != p[i]) {
  21153. var r = Xy(p[i], -g / 2, -y / 2, g, y, h.stroke, !0),
  21154. o = e.r + e.offset,
  21155. a = u ? l : s;
  21156. r.attr({
  21157. rotation: e.rotate,
  21158. x: a[0] + o * Math.cos(t.rotation),
  21159. y: a[1] - o * Math.sin(t.rotation),
  21160. silent: !0,
  21161. z2: 11
  21162. }), n.add(r)
  21163. }
  21164. }))
  21165. }
  21166. }
  21167. },
  21168. axisTickLabel: function (t, e, n, i) {
  21169. var r = function (t, e, n, i) {
  21170. var r = n.axis,
  21171. o = n.getModel("axisTick"),
  21172. a = o.get("show");
  21173. "auto" === a && i.handleAutoShown && (a = i.handleAutoShown("axisTick"));
  21174. if (!a || r.scale.isBlank()) return;
  21175. for (var s = o.getModel("lineStyle"), l = i.tickDirection * o.get("length"), u = yI(r.getTicksCoords(), e.transform, l, k(s.getLineStyle(), {
  21176. stroke: n.get(["axisLine", "lineStyle", "color"])
  21177. }), "ticks"), h = 0; h < u.length; h++) t.add(u[h]);
  21178. return u
  21179. }(n, i, e, t),
  21180. o = function (t, e, n, i) {
  21181. var r = n.axis,
  21182. o = it(i.axisLabelShow, n.get(["axisLabel", "show"]));
  21183. if (!o || r.scale.isBlank()) return;
  21184. var a = n.getModel("axisLabel"),
  21185. s = a.get("margin"),
  21186. l = r.getViewLabels(),
  21187. u = (it(i.labelRotate, a.get("rotate")) || 0) * hI / 180,
  21188. h = cI.innerTextLayout(i.rotation, u, i.labelDirection),
  21189. c = n.getCategories && n.getCategories(!0),
  21190. p = [],
  21191. d = cI.isLabelSilent(n),
  21192. f = n.get("triggerEvent");
  21193. return E(l, (function (o, u) {
  21194. var g = "ordinal" === r.scale.type ? r.scale.getRawOrdinalNumber(o.tickValue) : o.tickValue,
  21195. y = o.formattedLabel,
  21196. v = o.rawLabel,
  21197. m = a;
  21198. if (c && c[g]) {
  21199. var x = c[g];
  21200. q(x) && x.textStyle && (m = new Cc(x.textStyle, a, n.ecModel))
  21201. }
  21202. var _ = m.getTextColor() || n.get(["axisLine", "lineStyle", "color"]),
  21203. b = r.dataToCoord(g),
  21204. w = m.getShallow("align", !0) || h.textAlign,
  21205. S = rt(m.getShallow("alignMinLabel", !0), w),
  21206. M = rt(m.getShallow("alignMaxLabel", !0), w),
  21207. I = m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || h.textVerticalAlign,
  21208. T = rt(m.getShallow("verticalAlignMinLabel", !0), I),
  21209. C = rt(m.getShallow("verticalAlignMaxLabel", !0), I),
  21210. D = new Xs({
  21211. x: b,
  21212. y: i.labelOffset + i.labelDirection * s,
  21213. rotation: h.rotation,
  21214. silent: d,
  21215. z2: 10 + (o.level || 0),
  21216. style: oc(m, {
  21217. text: y,
  21218. align: 0 === u ? S : u === l.length - 1 ? M : w,
  21219. verticalAlign: 0 === u ? T : u === l.length - 1 ? C : I,
  21220. fill: X(_) ? _("category" === r.type ? v : "value" === r.type ? g + "" : g, u) : _
  21221. })
  21222. });
  21223. if (D.anid = "label_" + g, f) {
  21224. var A = cI.makeAxisEventDataBase(n);
  21225. A.targetType = "axisLabel", A.value = v, A.tickIndex = u, "category" === r.type && (A.dataIndex = g), rl(D).eventData = A
  21226. }
  21227. e.add(D), D.updateTransform(), p.push(D), t.add(D), D.decomposeTransform()
  21228. })), p
  21229. }(n, i, e, t);
  21230. (function (t, e, n) {
  21231. if (T_(t.axis)) return;
  21232. var i = t.get(["axisLabel", "showMinLabel"]),
  21233. r = t.get(["axisLabel", "showMaxLabel"]);
  21234. e = e || [], n = n || [];
  21235. var o = e[0],
  21236. a = e[1],
  21237. s = e[e.length - 1],
  21238. l = e[e.length - 2],
  21239. u = n[0],
  21240. h = n[1],
  21241. c = n[n.length - 1],
  21242. p = n[n.length - 2];
  21243. !1 === i ? (dI(o), dI(u)) : fI(o, a) && (i ? (dI(a), dI(h)) : (dI(o), dI(u)));
  21244. !1 === r ? (dI(s), dI(c)) : fI(l, s) && (r ? (dI(l), dI(p)) : (dI(s), dI(c)))
  21245. }(e, o, r), function (t, e, n, i) {
  21246. var r = n.axis,
  21247. o = n.getModel("minorTick");
  21248. if (!o.get("show") || r.scale.isBlank()) return;
  21249. var a = r.getMinorTicksCoords();
  21250. if (!a.length) return;
  21251. for (var s = o.getModel("lineStyle"), l = i * o.get("length"), u = k(s.getLineStyle(), k(n.getModel("axisTick").getLineStyle(), {
  21252. stroke: n.get(["axisLine", "lineStyle", "color"])
  21253. })), h = 0; h < a.length; h++)
  21254. for (var c = yI(a[h], e.transform, l, u, "minorticks_" + h), p = 0; p < c.length; p++) t.add(c[p])
  21255. }(n, i, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) && Rb(Lb(z(o, (function (t) {
  21256. return {
  21257. label: t,
  21258. priority: t.z2,
  21259. defaultAttr: {
  21260. ignore: t.ignore
  21261. }
  21262. }
  21263. }))))
  21264. },
  21265. axisName: function (t, e, n, i) {
  21266. var r = it(t.axisName, e.get("name"));
  21267. if (r) {
  21268. var o, a, s = e.get("nameLocation"),
  21269. l = t.nameDirection,
  21270. u = e.getModel("nameTextStyle"),
  21271. h = e.get("nameGap") || 0,
  21272. c = e.axis.getExtent(),
  21273. p = c[0] > c[1] ? -1 : 1,
  21274. d = ["start" === s ? c[0] - p * h : "end" === s ? c[1] + p * h : (c[0] + c[1]) / 2, gI(s) ? t.labelOffset + l * h : 0],
  21275. f = e.get("nameRotate");
  21276. null != f && (f = f * hI / 180), gI(s) ? o = cI.innerTextLayout(t.rotation, null != f ? f : t.rotation, l) : (o = function (t, e, n, i) {
  21277. var r, o, a = ao(n - t),
  21278. s = i[0] > i[1],
  21279. l = "start" === e && !s || "start" !== e && s;
  21280. so(a - hI / 2) ? (o = l ? "bottom" : "top", r = "center") : so(a - 1.5 * hI) ? (o = l ? "top" : "bottom", r = "center") : (o = "middle", r = a < 1.5 * hI && a > hI / 2 ? l ? "left" : "right" : l ? "right" : "left");
  21281. return {
  21282. rotation: a,
  21283. textAlign: r,
  21284. textVerticalAlign: o
  21285. }
  21286. }(t.rotation, s, f || 0, c), null != (a = t.axisNameAvailableWidth) && (a = Math.abs(a / Math.sin(o.rotation)), !isFinite(a) && (a = null)));
  21287. var g = u.getFont(),
  21288. y = e.get("nameTruncate", !0) || {},
  21289. v = y.ellipsis,
  21290. m = it(t.nameTruncateMaxWidth, y.maxWidth, a),
  21291. x = new Xs({
  21292. x: d[0],
  21293. y: d[1],
  21294. rotation: o.rotation,
  21295. silent: cI.isLabelSilent(e),
  21296. style: oc(u, {
  21297. text: r,
  21298. font: g,
  21299. overflow: "truncate",
  21300. width: m,
  21301. ellipsis: v,
  21302. fill: u.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  21303. align: u.get("align") || o.textAlign,
  21304. verticalAlign: u.get("verticalAlign") || o.textVerticalAlign
  21305. }),
  21306. z2: 1
  21307. });
  21308. if (Kh({
  21309. el: x,
  21310. componentModel: e,
  21311. itemName: r
  21312. }), x.__fullText = r, x.anid = "name", e.get("triggerEvent")) {
  21313. var _ = cI.makeAxisEventDataBase(e);
  21314. _.targetType = "axisName", _.name = r, rl(x).eventData = _
  21315. }
  21316. i.add(x), x.updateTransform(), n.add(x), x.decomposeTransform()
  21317. }
  21318. }
  21319. };
  21320. function dI(t) {
  21321. t && (t.ignore = !0)
  21322. }
  21323. function fI(t, e) {
  21324. var n = t && t.getBoundingRect().clone(),
  21325. i = e && e.getBoundingRect().clone();
  21326. if (n && i) {
  21327. var r = xe([]);
  21328. return Se(r, r, -t.rotation), n.applyTransform(be([], r, t.getLocalTransform())), i.applyTransform(be([], r, e.getLocalTransform())), n.intersect(i)
  21329. }
  21330. }
  21331. function gI(t) {
  21332. return "middle" === t || "center" === t
  21333. }
  21334. function yI(t, e, n, i, r) {
  21335. for (var o = [], a = [], s = [], l = 0; l < t.length; l++) {
  21336. var u = t[l].coord;
  21337. a[0] = u, a[1] = 0, s[0] = u, s[1] = n, e && (Wt(a, a, e), Wt(s, s, e));
  21338. var h = new Ku({
  21339. shape: {
  21340. x1: a[0],
  21341. y1: a[1],
  21342. x2: s[0],
  21343. y2: s[1]
  21344. },
  21345. style: i,
  21346. z2: 2,
  21347. autoBatch: !0,
  21348. silent: !0
  21349. });
  21350. zh(h.shape, h.style.lineWidth), h.anid = r + "_" + t[l].tickValue, o.push(h)
  21351. }
  21352. return o
  21353. }
  21354. function vI(t, e) {
  21355. var n = {
  21356. axesInfo: {},
  21357. seriesInvolved: !1,
  21358. coordSysAxesInfo: {},
  21359. coordSysMap: {}
  21360. };
  21361. return function (t, e, n) {
  21362. var i = e.getComponent("tooltip"),
  21363. r = e.getComponent("axisPointer"),
  21364. o = r.get("link", !0) || [],
  21365. a = [];
  21366. E(n.getCoordinateSystems(), (function (n) {
  21367. if (n.axisPointerEnabled) {
  21368. var s = wI(n.model),
  21369. l = t.coordSysAxesInfo[s] = {};
  21370. t.coordSysMap[s] = n;
  21371. var u = n.model.getModel("tooltip", i);
  21372. if (E(n.getAxes(), H(d, !1, null)), n.getTooltipAxes && i && u.get("show")) {
  21373. var h = "axis" === u.get("trigger"),
  21374. c = "cross" === u.get(["axisPointer", "type"]),
  21375. p = n.getTooltipAxes(u.get(["axisPointer", "axis"]));
  21376. (h || c) && E(p.baseAxes, H(d, !c || "cross", h)), c && E(p.otherAxes, H(d, "cross", !1))
  21377. }
  21378. }
  21379. function d(i, s, h) {
  21380. var c = h.model.getModel("axisPointer", r),
  21381. p = c.get("show");
  21382. if (p && ("auto" !== p || i || bI(c))) {
  21383. null == s && (s = c.get("triggerTooltip")), c = i ? function (t, e, n, i, r, o) {
  21384. var a = e.getModel("axisPointer"),
  21385. s = {};
  21386. E(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], (function (t) {
  21387. s[t] = T(a.get(t))
  21388. })), s.snap = "category" !== t.type && !!o, "cross" === a.get("type") && (s.type = "line");
  21389. var l = s.label || (s.label = {});
  21390. if (null == l.show && (l.show = !1), "cross" === r) {
  21391. var u = a.get(["label", "show"]);
  21392. if (l.show = null == u || u, !o) {
  21393. var h = s.lineStyle = a.get("crossStyle");
  21394. h && k(l, h.textStyle)
  21395. }
  21396. }
  21397. return t.model.getModel("axisPointer", new Cc(s, n, i))
  21398. }(h, u, r, e, i, s) : c;
  21399. var d = c.get("snap"),
  21400. f = c.get("triggerEmphasis"),
  21401. g = wI(h.model),
  21402. y = s || d || "category" === h.type,
  21403. v = t.axesInfo[g] = {
  21404. key: g,
  21405. axis: h,
  21406. coordSys: n,
  21407. axisPointerModel: c,
  21408. triggerTooltip: s,
  21409. triggerEmphasis: f,
  21410. involveSeries: y,
  21411. snap: d,
  21412. useHandle: bI(c),
  21413. seriesModels: [],
  21414. linkGroup: null
  21415. };
  21416. l[g] = v, t.seriesInvolved = t.seriesInvolved || y;
  21417. var m = function (t, e) {
  21418. for (var n = e.model, i = e.dim, r = 0; r < t.length; r++) {
  21419. var o = t[r] || {};
  21420. if (mI(o[i + "AxisId"], n.id) || mI(o[i + "AxisIndex"], n.componentIndex) || mI(o[i + "AxisName"], n.name)) return r
  21421. }
  21422. }(o, h);
  21423. if (null != m) {
  21424. var x = a[m] || (a[m] = {
  21425. axesInfo: {}
  21426. });
  21427. x.axesInfo[g] = v, x.mapper = o[m].mapper, v.linkGroup = x
  21428. }
  21429. }
  21430. }
  21431. }))
  21432. }(n, t, e), n.seriesInvolved && function (t, e) {
  21433. e.eachSeries((function (e) {
  21434. var n = e.coordinateSystem,
  21435. i = e.get(["tooltip", "trigger"], !0),
  21436. r = e.get(["tooltip", "show"], !0);
  21437. n && "none" !== i && !1 !== i && "item" !== i && !1 !== r && !1 !== e.get(["axisPointer", "show"], !0) && E(t.coordSysAxesInfo[wI(n.model)], (function (t) {
  21438. var i = t.axis;
  21439. n.getAxis(i.dim) === i && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count())
  21440. }))
  21441. }))
  21442. }(n, t), n
  21443. }
  21444. function mI(t, e) {
  21445. return "all" === t || Y(t) && P(t, e) >= 0 || t === e
  21446. }
  21447. function xI(t) {
  21448. var e = _I(t);
  21449. if (e) {
  21450. var n = e.axisPointerModel,
  21451. i = e.axis.scale,
  21452. r = n.option,
  21453. o = n.get("status"),
  21454. a = n.get("value");
  21455. null != a && (a = i.parse(a));
  21456. var s = bI(n);
  21457. null == o && (r.status = s ? "show" : "hide");
  21458. var l = i.getExtent().slice();
  21459. l[0] > l[1] && l.reverse(), (null == a || a > l[1]) && (a = l[1]), a < l[0] && (a = l[0]), r.value = a, s && (r.status = e.axis.scale.isBlank() ? "hide" : "show")
  21460. }
  21461. }
  21462. function _I(t) {
  21463. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  21464. return e && e.axesInfo[wI(t)]
  21465. }
  21466. function bI(t) {
  21467. return !!t.get(["handle", "show"])
  21468. }
  21469. function wI(t) {
  21470. return t.type + "||" + t.id
  21471. }
  21472. var SI = {},
  21473. MI = function (t) {
  21474. function e() {
  21475. var n = null !== t && t.apply(this, arguments) || this;
  21476. return n.type = e.type, n
  21477. }
  21478. return n(e, t), e.prototype.render = function (e, n, i, r) {
  21479. this.axisPointerClass && xI(e), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(e, i, !0)
  21480. }, e.prototype.updateAxisPointer = function (t, e, n, i) {
  21481. this._doUpdateAxisPointerClass(t, n, !1)
  21482. }, e.prototype.remove = function (t, e) {
  21483. var n = this._axisPointer;
  21484. n && n.remove(e)
  21485. }, e.prototype.dispose = function (e, n) {
  21486. this._disposeAxisPointer(n), t.prototype.dispose.apply(this, arguments)
  21487. }, e.prototype._doUpdateAxisPointerClass = function (t, n, i) {
  21488. var r = e.getAxisPointerClass(this.axisPointerClass);
  21489. if (r) {
  21490. var o = function (t) {
  21491. var e = _I(t);
  21492. return e && e.axisPointerModel
  21493. }(t);
  21494. o ? (this._axisPointer || (this._axisPointer = new r)).render(t, o, n, i) : this._disposeAxisPointer(n)
  21495. }
  21496. }, e.prototype._disposeAxisPointer = function (t) {
  21497. this._axisPointer && this._axisPointer.dispose(t), this._axisPointer = null
  21498. }, e.registerAxisPointerClass = function (t, e) {
  21499. SI[t] = e
  21500. }, e.getAxisPointerClass = function (t) {
  21501. return t && SI[t]
  21502. }, e.type = "axis", e
  21503. }(Ag),
  21504. II = Vo();
  21505. function TI(t, e, n, i) {
  21506. var r = n.axis;
  21507. if (!r.scale.isBlank()) {
  21508. var o = n.getModel("splitArea"),
  21509. a = o.getModel("areaStyle"),
  21510. s = a.get("color"),
  21511. l = i.coordinateSystem.getRect(),
  21512. u = r.getTicksCoords({
  21513. tickModel: o,
  21514. clamp: !0
  21515. });
  21516. if (u.length) {
  21517. var h = s.length,
  21518. c = II(t).splitAreaColors,
  21519. p = yt(),
  21520. d = 0;
  21521. if (c)
  21522. for (var f = 0; f < u.length; f++) {
  21523. var g = c.get(u[f].tickValue);
  21524. if (null != g) {
  21525. d = (g + (h - 1) * f) % h;
  21526. break
  21527. }
  21528. }
  21529. var y = r.toGlobalCoord(u[0].coord),
  21530. v = a.getAreaStyle();
  21531. s = Y(s) ? s : [s];
  21532. for (f = 1; f < u.length; f++) {
  21533. var m = r.toGlobalCoord(u[f].coord),
  21534. x = void 0,
  21535. _ = void 0,
  21536. b = void 0,
  21537. w = void 0;
  21538. r.isHorizontal() ? (x = y, _ = l.y, b = m - x, w = l.height, y = x + b) : (x = l.x, _ = y, b = l.width, y = _ + (w = m - _));
  21539. var S = u[f - 1].tickValue;
  21540. null != S && p.set(S, d), e.add(new Ws({
  21541. anid: null != S ? "area_" + S : null,
  21542. shape: {
  21543. x: x,
  21544. y: _,
  21545. width: b,
  21546. height: w
  21547. },
  21548. style: k({
  21549. fill: s[d]
  21550. }, v),
  21551. autoBatch: !0,
  21552. silent: !0
  21553. })), d = (d + 1) % h
  21554. }
  21555. II(t).splitAreaColors = p
  21556. }
  21557. }
  21558. }
  21559. function CI(t) {
  21560. II(t).splitAreaColors = null
  21561. }
  21562. var DI = ["axisLine", "axisTickLabel", "axisName"],
  21563. AI = ["splitArea", "splitLine", "minorSplitLine"],
  21564. kI = function (t) {
  21565. function e() {
  21566. var n = null !== t && t.apply(this, arguments) || this;
  21567. return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n
  21568. }
  21569. return n(e, t), e.prototype.render = function (e, n, i, r) {
  21570. this.group.removeAll();
  21571. var o = this._axisGroup;
  21572. if (this._axisGroup = new Br, this.group.add(this._axisGroup), e.get("show")) {
  21573. var a = e.getCoordSysModel(),
  21574. s = eI(a, e),
  21575. l = new cI(e, A({
  21576. handleAutoShown: function (t) {
  21577. for (var n = a.coordinateSystem.getCartesians(), i = 0; i < n.length; i++)
  21578. if (Tx(n[i].getOtherAxis(e.axis).scale)) return !0;
  21579. return !1
  21580. }
  21581. }, s));
  21582. E(DI, l.add, l), this._axisGroup.add(l.getGroup()), E(AI, (function (t) {
  21583. e.get([t, "show"]) && LI[t](this, this._axisGroup, e, a)
  21584. }), this), r && "changeAxisOrder" === r.type && r.isInitSort || Hh(o, this._axisGroup, e), t.prototype.render.call(this, e, n, i, r)
  21585. }
  21586. }, e.prototype.remove = function () {
  21587. CI(this)
  21588. }, e.type = "cartesianAxis", e
  21589. }(MI),
  21590. LI = {
  21591. splitLine: function (t, e, n, i) {
  21592. var r = n.axis;
  21593. if (!r.scale.isBlank()) {
  21594. var o = n.getModel("splitLine"),
  21595. a = o.getModel("lineStyle"),
  21596. s = a.get("color");
  21597. s = Y(s) ? s : [s];
  21598. for (var l = i.coordinateSystem.getRect(), u = r.isHorizontal(), h = 0, c = r.getTicksCoords({
  21599. tickModel: o
  21600. }), p = [], d = [], f = a.getLineStyle(), g = 0; g < c.length; g++) {
  21601. var y = r.toGlobalCoord(c[g].coord);
  21602. u ? (p[0] = y, p[1] = l.y, d[0] = y, d[1] = l.y + l.height) : (p[0] = l.x, p[1] = y, d[0] = l.x + l.width, d[1] = y);
  21603. var v = h++ % s.length,
  21604. m = c[g].tickValue,
  21605. x = new Ku({
  21606. anid: null != m ? "line_" + c[g].tickValue : null,
  21607. autoBatch: !0,
  21608. shape: {
  21609. x1: p[0],
  21610. y1: p[1],
  21611. x2: d[0],
  21612. y2: d[1]
  21613. },
  21614. style: k({
  21615. stroke: s[v]
  21616. }, f),
  21617. silent: !0
  21618. });
  21619. zh(x.shape, f.lineWidth), e.add(x)
  21620. }
  21621. }
  21622. },
  21623. minorSplitLine: function (t, e, n, i) {
  21624. var r = n.axis,
  21625. o = n.getModel("minorSplitLine").getModel("lineStyle"),
  21626. a = i.coordinateSystem.getRect(),
  21627. s = r.isHorizontal(),
  21628. l = r.getMinorTicksCoords();
  21629. if (l.length)
  21630. for (var u = [], h = [], c = o.getLineStyle(), p = 0; p < l.length; p++)
  21631. for (var d = 0; d < l[p].length; d++) {
  21632. var f = r.toGlobalCoord(l[p][d].coord);
  21633. s ? (u[0] = f, u[1] = a.y, h[0] = f, h[1] = a.y + a.height) : (u[0] = a.x, u[1] = f, h[0] = a.x + a.width, h[1] = f);
  21634. var g = new Ku({
  21635. anid: "minor_line_" + l[p][d].tickValue,
  21636. autoBatch: !0,
  21637. shape: {
  21638. x1: u[0],
  21639. y1: u[1],
  21640. x2: h[0],
  21641. y2: h[1]
  21642. },
  21643. style: c,
  21644. silent: !0
  21645. });
  21646. zh(g.shape, c.lineWidth), e.add(g)
  21647. }
  21648. },
  21649. splitArea: function (t, e, n, i) {
  21650. TI(t, e, n, i)
  21651. }
  21652. },
  21653. PI = function (t) {
  21654. function e() {
  21655. var n = null !== t && t.apply(this, arguments) || this;
  21656. return n.type = e.type, n
  21657. }
  21658. return n(e, t), e.type = "xAxis", e
  21659. }(kI),
  21660. OI = function (t) {
  21661. function e() {
  21662. var e = null !== t && t.apply(this, arguments) || this;
  21663. return e.type = PI.type, e
  21664. }
  21665. return n(e, t), e.type = "yAxis", e
  21666. }(kI),
  21667. RI = function (t) {
  21668. function e() {
  21669. var e = null !== t && t.apply(this, arguments) || this;
  21670. return e.type = "grid", e
  21671. }
  21672. return n(e, t), e.prototype.render = function (t, e) {
  21673. this.group.removeAll(), t.get("show") && this.group.add(new Ws({
  21674. shape: t.coordinateSystem.getRect(),
  21675. style: k({
  21676. fill: t.get("backgroundColor")
  21677. }, t.getItemStyle()),
  21678. silent: !0,
  21679. z2: -1
  21680. }))
  21681. }, e.type = "grid", e
  21682. }(Ag),
  21683. NI = {
  21684. offset: 0
  21685. };
  21686. function EI(t) {
  21687. t.registerComponentView(RI), t.registerComponentModel(GM), t.registerCoordinateSystem("cartesian2d", aI), jM(t, "x", WM, NI), jM(t, "y", WM, NI), t.registerComponentView(PI), t.registerComponentView(OI), t.registerPreprocessor((function (t) {
  21688. t.xAxis && t.yAxis && !t.grid && (t.grid = {})
  21689. }))
  21690. }
  21691. function zI(t) {
  21692. t.eachSeriesByType("radar", (function (t) {
  21693. var e = t.getData(),
  21694. n = [],
  21695. i = t.coordinateSystem;
  21696. if (i) {
  21697. var r = i.getIndicatorAxes();
  21698. E(r, (function (t, o) {
  21699. e.each(e.mapDimension(r[o].dim), (function (t, e) {
  21700. n[e] = n[e] || [];
  21701. var r = i.dataToPoint(t, o);
  21702. n[e][o] = VI(r) ? r : BI(i)
  21703. }))
  21704. })), e.each((function (t) {
  21705. var r = F(n[t], (function (t) {
  21706. return VI(t)
  21707. })) || BI(i);
  21708. n[t].push(r.slice()), e.setItemLayout(t, n[t])
  21709. }))
  21710. }
  21711. }))
  21712. }
  21713. function VI(t) {
  21714. return !isNaN(t[0]) && !isNaN(t[1])
  21715. }
  21716. function BI(t) {
  21717. return [t.cx, t.cy]
  21718. }
  21719. function FI(t) {
  21720. var e = t.polar;
  21721. if (e) {
  21722. Y(e) || (e = [e]);
  21723. var n = [];
  21724. E(e, (function (e, i) {
  21725. e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], Y(t.radar) || (t.radar = [t.radar]), t.radar.push(e)) : n.push(e)
  21726. })), t.polar = n
  21727. }
  21728. E(t.series, (function (t) {
  21729. t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex)
  21730. }))
  21731. }
  21732. var GI = function (t) {
  21733. function e() {
  21734. var n = null !== t && t.apply(this, arguments) || this;
  21735. return n.type = e.type, n
  21736. }
  21737. return n(e, t), e.prototype.render = function (t, e, n) {
  21738. var i = t.coordinateSystem,
  21739. r = this.group,
  21740. o = t.getData(),
  21741. a = this._data;
  21742. function s(t, e) {
  21743. var n = t.getItemVisual(e, "symbol") || "circle";
  21744. if ("none" !== n) {
  21745. var i = Uy(t.getItemVisual(e, "symbolSize")),
  21746. r = Xy(n, -1, -1, 2, 2),
  21747. o = t.getItemVisual(e, "symbolRotate") || 0;
  21748. return r.attr({
  21749. style: {
  21750. strokeNoScale: !0
  21751. },
  21752. z2: 100,
  21753. scaleX: i[0] / 2,
  21754. scaleY: i[1] / 2,
  21755. rotation: o * Math.PI / 180 || 0
  21756. }), r
  21757. }
  21758. }
  21759. function l(e, n, i, r, o, a) {
  21760. i.removeAll();
  21761. for (var l = 0; l < n.length - 1; l++) {
  21762. var u = s(r, o);
  21763. u && (u.__dimIdx = l, e[l] ? (u.setPosition(e[l]), Qh[a ? "initProps" : "updateProps"](u, {
  21764. x: n[l][0],
  21765. y: n[l][1]
  21766. }, t, o)) : u.setPosition(n[l]), i.add(u))
  21767. }
  21768. }
  21769. function u(t) {
  21770. return z(t, (function (t) {
  21771. return [i.cx, i.cy]
  21772. }))
  21773. }
  21774. o.diff(a).add((function (e) {
  21775. var n = o.getItemLayout(e);
  21776. if (n) {
  21777. var i = new Xu,
  21778. r = new Zu,
  21779. a = {
  21780. shape: {
  21781. points: n
  21782. }
  21783. };
  21784. i.shape.points = u(n), r.shape.points = u(n), mh(i, a, t, e), mh(r, a, t, e);
  21785. var s = new Br,
  21786. h = new Br;
  21787. s.add(r), s.add(i), s.add(h), l(r.shape.points, n, h, o, e, !0), o.setItemGraphicEl(e, s)
  21788. }
  21789. })).update((function (e, n) {
  21790. var i = a.getItemGraphicEl(n),
  21791. r = i.childAt(0),
  21792. s = i.childAt(1),
  21793. u = i.childAt(2),
  21794. h = {
  21795. shape: {
  21796. points: o.getItemLayout(e)
  21797. }
  21798. };
  21799. h.shape.points && (l(r.shape.points, h.shape.points, u, o, e, !1), Sh(s), Sh(r), vh(r, h, t), vh(s, h, t), o.setItemGraphicEl(e, i))
  21800. })).remove((function (t) {
  21801. r.remove(a.getItemGraphicEl(t))
  21802. })).execute(), o.eachItemGraphicEl((function (t, e) {
  21803. var n = o.getItemModel(e),
  21804. i = t.childAt(0),
  21805. a = t.childAt(1),
  21806. s = t.childAt(2),
  21807. l = o.getItemVisual(e, "style"),
  21808. u = l.fill;
  21809. r.add(t), i.useStyle(k(n.getModel("lineStyle").getLineStyle(), {
  21810. fill: "none",
  21811. stroke: u
  21812. })), $l(i, n, "lineStyle"), $l(a, n, "areaStyle");
  21813. var h = n.getModel("areaStyle"),
  21814. c = h.isEmpty() && h.parentModel.isEmpty();
  21815. a.ignore = c, E(["emphasis", "select", "blur"], (function (t) {
  21816. var e = n.getModel([t, "areaStyle"]),
  21817. i = e.isEmpty() && e.parentModel.isEmpty();
  21818. a.ensureState(t).ignore = i && c
  21819. })), a.useStyle(k(h.getAreaStyle(), {
  21820. fill: u,
  21821. opacity: .7,
  21822. decal: l.decal
  21823. }));
  21824. var p = n.getModel("emphasis"),
  21825. d = p.getModel("itemStyle").getItemStyle();
  21826. s.eachChild((function (t) {
  21827. if (t instanceof Ns) {
  21828. var i = t.style;
  21829. t.useStyle(A({
  21830. image: i.image,
  21831. x: i.x,
  21832. y: i.y,
  21833. width: i.width,
  21834. height: i.height
  21835. }, l))
  21836. } else t.useStyle(l), t.setColor(u), t.style.strokeNoScale = !0;
  21837. t.ensureState("emphasis").style = T(d);
  21838. var r = o.getStore().get(o.getDimensionIndex(t.__dimIdx), e);
  21839. (null == r || isNaN(r)) && (r = ""), ic(t, rc(n), {
  21840. labelFetcher: o.hostModel,
  21841. labelDataIndex: e,
  21842. labelDimIndex: t.__dimIdx,
  21843. defaultText: r,
  21844. inheritColor: u,
  21845. defaultOpacity: l.opacity
  21846. })
  21847. })), Zl(t, p.get("focus"), p.get("blurScope"), p.get("disabled"))
  21848. })), this._data = o
  21849. }, e.prototype.remove = function () {
  21850. this.group.removeAll(), this._data = null
  21851. }, e.type = "radar", e
  21852. }(Og),
  21853. WI = function (t) {
  21854. function e() {
  21855. var n = null !== t && t.apply(this, arguments) || this;
  21856. return n.type = e.type, n.hasSymbolVisual = !0, n
  21857. }
  21858. return n(e, t), e.prototype.init = function (e) {
  21859. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new OM(W(this.getData, this), W(this.getRawData, this))
  21860. }, e.prototype.getInitialData = function (t, e) {
  21861. return PM(this, {
  21862. generateCoord: "indicator_",
  21863. generateCoordCount: 1 / 0
  21864. })
  21865. }, e.prototype.formatTooltip = function (t, e, n) {
  21866. var i = this.getData(),
  21867. r = this.coordinateSystem.getIndicatorAxes(),
  21868. o = this.getData().getName(t),
  21869. a = "" === o ? this.name : o,
  21870. s = fg(this, t);
  21871. return og("section", {
  21872. header: a,
  21873. sortBlocks: !0,
  21874. blocks: z(r, (function (e) {
  21875. var n = i.get(i.mapDimension(e.dim), t);
  21876. return og("nameValue", {
  21877. markerType: "subItem",
  21878. markerColor: s,
  21879. name: e.name,
  21880. value: n,
  21881. sortParam: n
  21882. })
  21883. }))
  21884. })
  21885. }, e.prototype.getTooltipPosition = function (t) {
  21886. if (null != t)
  21887. for (var e = this.getData(), n = this.coordinateSystem, i = e.getValues(z(n.dimensions, (function (t) {
  21888. return e.mapDimension(t)
  21889. })), t), r = 0, o = i.length; r < o; r++)
  21890. if (!isNaN(i[r])) {
  21891. var a = n.getIndicatorAxes();
  21892. return n.coordToPoint(a[r].dataToCoord(i[r]), r)
  21893. }
  21894. }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
  21895. z: 2,
  21896. colorBy: "data",
  21897. coordinateSystem: "radar",
  21898. legendHoverLink: !0,
  21899. radarIndex: 0,
  21900. lineStyle: {
  21901. width: 2,
  21902. type: "solid",
  21903. join: "round"
  21904. },
  21905. label: {
  21906. position: "top"
  21907. },
  21908. symbolSize: 8
  21909. }, e
  21910. }(bg),
  21911. HI = UM.value;
  21912. function YI(t, e) {
  21913. return k({
  21914. show: e
  21915. }, t)
  21916. }
  21917. var XI = function (t) {
  21918. function e() {
  21919. var n = null !== t && t.apply(this, arguments) || this;
  21920. return n.type = e.type, n
  21921. }
  21922. return n(e, t), e.prototype.optionUpdated = function () {
  21923. var t = this.get("boundaryGap"),
  21924. e = this.get("splitNumber"),
  21925. n = this.get("scale"),
  21926. i = this.get("axisLine"),
  21927. r = this.get("axisTick"),
  21928. o = this.get("axisLabel"),
  21929. a = this.get("axisName"),
  21930. s = this.get(["axisName", "show"]),
  21931. l = this.get(["axisName", "formatter"]),
  21932. u = this.get("axisNameGap"),
  21933. h = this.get("triggerEvent"),
  21934. c = z(this.get("indicator") || [], (function (c) {
  21935. null != c.max && c.max > 0 && !c.min ? c.min = 0 : null != c.min && c.min < 0 && !c.max && (c.max = 0);
  21936. var p = a;
  21937. null != c.color && (p = k({
  21938. color: c.color
  21939. }, a));
  21940. var d = C(T(c), {
  21941. boundaryGap: t,
  21942. splitNumber: e,
  21943. scale: n,
  21944. axisLine: i,
  21945. axisTick: r,
  21946. axisLabel: o,
  21947. name: c.text,
  21948. showName: s,
  21949. nameLocation: "end",
  21950. nameGap: u,
  21951. nameTextStyle: p,
  21952. triggerEvent: h
  21953. }, !1);
  21954. if (U(l)) {
  21955. var f = d.name;
  21956. d.name = l.replace("{value}", null != f ? f : "")
  21957. } else X(l) && (d.name = l(d.name, d));
  21958. var g = new Cc(d, null, this.ecModel);
  21959. return R(g, D_.prototype), g.mainType = "radar", g.componentIndex = this.componentIndex, g
  21960. }), this);
  21961. this._indicatorModels = c
  21962. }, e.prototype.getIndicatorModels = function () {
  21963. return this._indicatorModels
  21964. }, e.type = "radar", e.defaultOption = {
  21965. z: 0,
  21966. center: ["50%", "50%"],
  21967. radius: "75%",
  21968. startAngle: 90,
  21969. axisName: {
  21970. show: !0
  21971. },
  21972. boundaryGap: [0, 0],
  21973. splitNumber: 5,
  21974. axisNameGap: 15,
  21975. scale: !1,
  21976. shape: "polygon",
  21977. axisLine: C({
  21978. lineStyle: {
  21979. color: "#bbb"
  21980. }
  21981. }, HI.axisLine),
  21982. axisLabel: YI(HI.axisLabel, !1),
  21983. axisTick: YI(HI.axisTick, !1),
  21984. splitLine: YI(HI.splitLine, !0),
  21985. splitArea: YI(HI.splitArea, !0),
  21986. indicator: []
  21987. }, e
  21988. }(zp),
  21989. UI = ["axisLine", "axisTickLabel", "axisName"],
  21990. ZI = function (t) {
  21991. function e() {
  21992. var n = null !== t && t.apply(this, arguments) || this;
  21993. return n.type = e.type, n
  21994. }
  21995. return n(e, t), e.prototype.render = function (t, e, n) {
  21996. this.group.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t)
  21997. }, e.prototype._buildAxes = function (t) {
  21998. var e = t.coordinateSystem;
  21999. E(z(e.getIndicatorAxes(), (function (t) {
  22000. var n = t.model.get("showName") ? t.name : "";
  22001. return new cI(t.model, {
  22002. axisName: n,
  22003. position: [e.cx, e.cy],
  22004. rotation: t.angle,
  22005. labelDirection: -1,
  22006. tickDirection: -1,
  22007. nameDirection: 1
  22008. })
  22009. })), (function (t) {
  22010. E(UI, t.add, t), this.group.add(t.getGroup())
  22011. }), this)
  22012. }, e.prototype._buildSplitLineAndArea = function (t) {
  22013. var e = t.coordinateSystem,
  22014. n = e.getIndicatorAxes();
  22015. if (n.length) {
  22016. var i = t.get("shape"),
  22017. r = t.getModel("splitLine"),
  22018. o = t.getModel("splitArea"),
  22019. a = r.getModel("lineStyle"),
  22020. s = o.getModel("areaStyle"),
  22021. l = r.get("show"),
  22022. u = o.get("show"),
  22023. h = a.get("color"),
  22024. c = s.get("color"),
  22025. p = Y(h) ? h : [h],
  22026. d = Y(c) ? c : [c],
  22027. f = [],
  22028. g = [];
  22029. if ("circle" === i)
  22030. for (var y = n[0].getTicksCoords(), v = e.cx, m = e.cy, x = 0; x < y.length; x++) {
  22031. if (l) f[C(f, p, x)].push(new Su({
  22032. shape: {
  22033. cx: v,
  22034. cy: m,
  22035. r: y[x].coord
  22036. }
  22037. }));
  22038. if (u && x < y.length - 1) g[C(g, d, x)].push(new Wu({
  22039. shape: {
  22040. cx: v,
  22041. cy: m,
  22042. r0: y[x].coord,
  22043. r: y[x + 1].coord
  22044. }
  22045. }))
  22046. } else {
  22047. var _, b = z(n, (function (t, n) {
  22048. var i = t.getTicksCoords();
  22049. return _ = null == _ ? i.length - 1 : Math.min(i.length - 1, _), z(i, (function (t) {
  22050. return e.coordToPoint(t.coord, n)
  22051. }))
  22052. })),
  22053. w = [];
  22054. for (x = 0; x <= _; x++) {
  22055. for (var S = [], M = 0; M < n.length; M++) S.push(b[M][x]);
  22056. if (S[0] && S.push(S[0].slice()), l) f[C(f, p, x)].push(new Zu({
  22057. shape: {
  22058. points: S
  22059. }
  22060. }));
  22061. if (u && w) g[C(g, d, x - 1)].push(new Xu({
  22062. shape: {
  22063. points: S.concat(w)
  22064. }
  22065. }));
  22066. w = S.slice().reverse()
  22067. }
  22068. }
  22069. var I = a.getLineStyle(),
  22070. T = s.getAreaStyle();
  22071. E(g, (function (t, e) {
  22072. this.group.add(Nh(t, {
  22073. style: k({
  22074. stroke: "none",
  22075. fill: d[e % d.length]
  22076. }, T),
  22077. silent: !0
  22078. }))
  22079. }), this), E(f, (function (t, e) {
  22080. this.group.add(Nh(t, {
  22081. style: k({
  22082. fill: "none",
  22083. stroke: p[e % p.length]
  22084. }, I),
  22085. silent: !0
  22086. }))
  22087. }), this)
  22088. }
  22089. function C(t, e, n) {
  22090. var i = n % e.length;
  22091. return t[i] = t[i] || [], i
  22092. }
  22093. }, e.type = "radar", e
  22094. }(Ag),
  22095. jI = function (t) {
  22096. function e(e, n, i) {
  22097. var r = t.call(this, e, n, i) || this;
  22098. return r.type = "value", r.angle = 0, r.name = "", r
  22099. }
  22100. return n(e, t), e
  22101. }(ob),
  22102. qI = function () {
  22103. function t(t, e, n) {
  22104. this.dimensions = [], this._model = t, this._indicatorAxes = z(t.getIndicatorModels(), (function (t, e) {
  22105. var n = "indicator_" + e,
  22106. i = new jI(n, new Ex);
  22107. return i.name = t.get("name"), i.model = t, t.axis = i, this.dimensions.push(n), i
  22108. }), this), this.resize(t, n)
  22109. }
  22110. return t.prototype.getIndicatorAxes = function () {
  22111. return this._indicatorAxes
  22112. }, t.prototype.dataToPoint = function (t, e) {
  22113. var n = this._indicatorAxes[e];
  22114. return this.coordToPoint(n.dataToCoord(t), e)
  22115. }, t.prototype.coordToPoint = function (t, e) {
  22116. var n = this._indicatorAxes[e].angle;
  22117. return [this.cx + t * Math.cos(n), this.cy - t * Math.sin(n)]
  22118. }, t.prototype.pointToData = function (t) {
  22119. var e = t[0] - this.cx,
  22120. n = t[1] - this.cy,
  22121. i = Math.sqrt(e * e + n * n);
  22122. e /= i, n /= i;
  22123. for (var r, o = Math.atan2(-n, e), a = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
  22124. var u = this._indicatorAxes[l],
  22125. h = Math.abs(o - u.angle);
  22126. h < a && (r = u, s = l, a = h)
  22127. }
  22128. return [s, +(r && r.coordToData(i))]
  22129. }, t.prototype.resize = function (t, e) {
  22130. var n = t.get("center"),
  22131. i = e.getWidth(),
  22132. r = e.getHeight(),
  22133. o = Math.min(i, r) / 2;
  22134. this.cx = $r(n[0], i), this.cy = $r(n[1], r), this.startAngle = t.get("startAngle") * Math.PI / 180;
  22135. var a = t.get("radius");
  22136. (U(a) || j(a)) && (a = [0, a]), this.r0 = $r(a[0], o), this.r = $r(a[1], o), E(this._indicatorAxes, (function (t, e) {
  22137. t.setExtent(this.r0, this.r);
  22138. var n = this.startAngle + e * Math.PI * 2 / this._indicatorAxes.length;
  22139. n = Math.atan2(Math.sin(n), Math.cos(n)), t.angle = n
  22140. }), this)
  22141. }, t.prototype.update = function (t, e) {
  22142. var n = this._indicatorAxes,
  22143. i = this._model;
  22144. E(n, (function (t) {
  22145. t.scale.setExtent(1 / 0, -1 / 0)
  22146. })), t.eachSeriesByType("radar", (function (e, r) {
  22147. if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === i) {
  22148. var o = e.getData();
  22149. E(n, (function (t) {
  22150. t.scale.unionExtentFromData(o, o.mapDimension(t.dim))
  22151. }))
  22152. }
  22153. }), this);
  22154. var r = i.get("splitNumber"),
  22155. o = new Ex;
  22156. o.setExtent(0, r), o.setInterval(1), E(n, (function (t, e) {
  22157. oI(t.scale, t.model, o)
  22158. }))
  22159. }, t.prototype.convertToPixel = function (t, e, n) {
  22160. return console.warn("Not implemented."), null
  22161. }, t.prototype.convertFromPixel = function (t, e, n) {
  22162. return console.warn("Not implemented."), null
  22163. }, t.prototype.containPoint = function (t) {
  22164. return console.warn("Not implemented."), !1
  22165. }, t.create = function (e, n) {
  22166. var i = [];
  22167. return e.eachComponent("radar", (function (r) {
  22168. var o = new t(r, e, n);
  22169. i.push(o), r.coordinateSystem = o
  22170. })), e.eachSeriesByType("radar", (function (t) {
  22171. "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0])
  22172. })), i
  22173. }, t.dimensions = [], t
  22174. }();
  22175. function KI(t) {
  22176. t.registerCoordinateSystem("radar", qI), t.registerComponentModel(XI), t.registerComponentView(ZI), t.registerVisual({
  22177. seriesType: "radar",
  22178. reset: function (t) {
  22179. var e = t.getData();
  22180. e.each((function (t) {
  22181. e.setItemVisual(t, "legendIcon", "roundRect")
  22182. })), e.setVisual("legendIcon", "roundRect")
  22183. }
  22184. })
  22185. }
  22186. var $I = "\0_ec_interaction_mutex";
  22187. function JI(t, e) {
  22188. return !!QI(t)[e]
  22189. }
  22190. function QI(t) {
  22191. return t[$I] || (t[$I] = {})
  22192. }
  22193. Cm({
  22194. type: "takeGlobalCursor",
  22195. event: "globalCursorTaken",
  22196. update: "update"
  22197. }, bt);
  22198. var tT = function (t) {
  22199. function e(e) {
  22200. var n = t.call(this) || this;
  22201. n._zr = e;
  22202. var i = W(n._mousedownHandler, n),
  22203. r = W(n._mousemoveHandler, n),
  22204. o = W(n._mouseupHandler, n),
  22205. a = W(n._mousewheelHandler, n),
  22206. s = W(n._pinchHandler, n);
  22207. return n.enable = function (t, n) {
  22208. this.disable(), this._opt = k(T(n) || {}, {
  22209. zoomOnMouseWheel: !0,
  22210. moveOnMouseMove: !0,
  22211. moveOnMouseWheel: !1,
  22212. preventDefaultMouseMove: !0
  22213. }), null == t && (t = !0), !0 !== t && "move" !== t && "pan" !== t || (e.on("mousedown", i), e.on("mousemove", r), e.on("mouseup", o)), !0 !== t && "scale" !== t && "zoom" !== t || (e.on("mousewheel", a), e.on("pinch", s))
  22214. }, n.disable = function () {
  22215. e.off("mousedown", i), e.off("mousemove", r), e.off("mouseup", o), e.off("mousewheel", a), e.off("pinch", s)
  22216. }, n
  22217. }
  22218. return n(e, t), e.prototype.isDragging = function () {
  22219. return this._dragging
  22220. }, e.prototype.isPinching = function () {
  22221. return this._pinching
  22222. }, e.prototype.setPointerChecker = function (t) {
  22223. this.pointerChecker = t
  22224. }, e.prototype.dispose = function () {
  22225. this.disable()
  22226. }, e.prototype._mousedownHandler = function (t) {
  22227. if (!fe(t)) {
  22228. for (var e = t.target; e;) {
  22229. if (e.draggable) return;
  22230. e = e.__hostTarget || e.parent
  22231. }
  22232. var n = t.offsetX,
  22233. i = t.offsetY;
  22234. this.pointerChecker && this.pointerChecker(t, n, i) && (this._x = n, this._y = i, this._dragging = !0)
  22235. }
  22236. }, e.prototype._mousemoveHandler = function (t) {
  22237. if (this._dragging && iT("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !JI(this._zr, "globalPan")) {
  22238. var e = t.offsetX,
  22239. n = t.offsetY,
  22240. i = this._x,
  22241. r = this._y,
  22242. o = e - i,
  22243. a = n - r;
  22244. this._x = e, this._y = n, this._opt.preventDefaultMouseMove && de(t.event), nT(this, "pan", "moveOnMouseMove", t, {
  22245. dx: o,
  22246. dy: a,
  22247. oldX: i,
  22248. oldY: r,
  22249. newX: e,
  22250. newY: n,
  22251. isAvailableBehavior: null
  22252. })
  22253. }
  22254. }, e.prototype._mouseupHandler = function (t) {
  22255. fe(t) || (this._dragging = !1)
  22256. }, e.prototype._mousewheelHandler = function (t) {
  22257. var e = iT("zoomOnMouseWheel", t, this._opt),
  22258. n = iT("moveOnMouseWheel", t, this._opt),
  22259. i = t.wheelDelta,
  22260. r = Math.abs(i),
  22261. o = t.offsetX,
  22262. a = t.offsetY;
  22263. if (0 !== i && (e || n)) {
  22264. if (e) {
  22265. var s = r > 3 ? 1.4 : r > 1 ? 1.2 : 1.1;
  22266. eT(this, "zoom", "zoomOnMouseWheel", t, {
  22267. scale: i > 0 ? s : 1 / s,
  22268. originX: o,
  22269. originY: a,
  22270. isAvailableBehavior: null
  22271. })
  22272. }
  22273. if (n) {
  22274. var l = Math.abs(i);
  22275. eT(this, "scrollMove", "moveOnMouseWheel", t, {
  22276. scrollDelta: (i > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05),
  22277. originX: o,
  22278. originY: a,
  22279. isAvailableBehavior: null
  22280. })
  22281. }
  22282. }
  22283. }, e.prototype._pinchHandler = function (t) {
  22284. JI(this._zr, "globalPan") || eT(this, "zoom", null, t, {
  22285. scale: t.pinchScale > 1 ? 1.1 : 1 / 1.1,
  22286. originX: t.pinchX,
  22287. originY: t.pinchY,
  22288. isAvailableBehavior: null
  22289. })
  22290. }, e
  22291. }(jt);
  22292. function eT(t, e, n, i, r) {
  22293. t.pointerChecker && t.pointerChecker(i, r.originX, r.originY) && (de(i.event), nT(t, e, n, i, r))
  22294. }
  22295. function nT(t, e, n, i, r) {
  22296. r.isAvailableBehavior = W(iT, null, n, i), t.trigger(e, r)
  22297. }
  22298. function iT(t, e, n) {
  22299. var i = n[t];
  22300. return !t || i && (!U(i) || e.event[i + "Key"])
  22301. }
  22302. function rT(t, e, n) {
  22303. var i = t.target;
  22304. i.x += e, i.y += n, i.dirty()
  22305. }
  22306. function oT(t, e, n, i) {
  22307. var r = t.target,
  22308. o = t.zoomLimit,
  22309. a = t.zoom = t.zoom || 1;
  22310. if (a *= e, o) {
  22311. var s = o.min || 0,
  22312. l = o.max || 1 / 0;
  22313. a = Math.max(Math.min(l, a), s)
  22314. }
  22315. var u = a / t.zoom;
  22316. t.zoom = a, r.x -= (n - r.x) * (u - 1), r.y -= (i - r.y) * (u - 1), r.scaleX *= u, r.scaleY *= u, r.dirty()
  22317. }
  22318. var aT, sT = {
  22319. axisPointer: 1,
  22320. tooltip: 1,
  22321. brush: 1
  22322. };
  22323. function lT(t, e, n) {
  22324. var i = e.getComponentByElement(t.topTarget),
  22325. r = i && i.coordinateSystem;
  22326. return i && i !== n && !sT.hasOwnProperty(i.mainType) && r && r.model !== n
  22327. }
  22328. function uT(t) {
  22329. U(t) && (t = (new DOMParser).parseFromString(t, "text/xml"));
  22330. var e = t;
  22331. for (9 === e.nodeType && (e = e.firstChild);
  22332. "svg" !== e.nodeName.toLowerCase() || 1 !== e.nodeType;) e = e.nextSibling;
  22333. return e
  22334. }
  22335. var hT = {
  22336. fill: "fill",
  22337. stroke: "stroke",
  22338. "stroke-width": "lineWidth",
  22339. opacity: "opacity",
  22340. "fill-opacity": "fillOpacity",
  22341. "stroke-opacity": "strokeOpacity",
  22342. "stroke-dasharray": "lineDash",
  22343. "stroke-dashoffset": "lineDashOffset",
  22344. "stroke-linecap": "lineCap",
  22345. "stroke-linejoin": "lineJoin",
  22346. "stroke-miterlimit": "miterLimit",
  22347. "font-family": "fontFamily",
  22348. "font-size": "fontSize",
  22349. "font-style": "fontStyle",
  22350. "font-weight": "fontWeight",
  22351. "text-anchor": "textAlign",
  22352. visibility: "visibility",
  22353. display: "display"
  22354. },
  22355. cT = G(hT),
  22356. pT = {
  22357. "alignment-baseline": "textBaseline",
  22358. "stop-color": "stopColor"
  22359. },
  22360. dT = G(pT),
  22361. fT = function () {
  22362. function t() {
  22363. this._defs = {}, this._root = null
  22364. }
  22365. return t.prototype.parse = function (t, e) {
  22366. e = e || {};
  22367. var n = uT(t);
  22368. this._defsUsePending = [];
  22369. var i = new Br;
  22370. this._root = i;
  22371. var r = [],
  22372. o = n.getAttribute("viewBox") || "",
  22373. a = parseFloat(n.getAttribute("width") || e.width),
  22374. s = parseFloat(n.getAttribute("height") || e.height);
  22375. isNaN(a) && (a = null), isNaN(s) && (s = null), _T(n, i, null, !0, !1);
  22376. for (var l, u, h = n.firstChild; h;) this._parseNode(h, i, r, null, !1, !1), h = h.nextSibling;
  22377. if (function (t, e) {
  22378. for (var n = 0; n < e.length; n++) {
  22379. var i = e[n];
  22380. i[0].style[i[1]] = t[i[2]]
  22381. }
  22382. }(this._defs, this._defsUsePending), this._defsUsePending = [], o) {
  22383. var c = MT(o);
  22384. c.length >= 4 && (l = {
  22385. x: parseFloat(c[0] || 0),
  22386. y: parseFloat(c[1] || 0),
  22387. width: parseFloat(c[2]),
  22388. height: parseFloat(c[3])
  22389. })
  22390. }
  22391. if (l && null != a && null != s && (u = AT(l, {
  22392. x: 0,
  22393. y: 0,
  22394. width: a,
  22395. height: s
  22396. }), !e.ignoreViewBox)) {
  22397. var p = i;
  22398. (i = new Br).add(p), p.scaleX = p.scaleY = u.scale, p.x = u.x, p.y = u.y
  22399. }
  22400. return e.ignoreRootClip || null == a || null == s || i.setClipPath(new Ws({
  22401. shape: {
  22402. x: 0,
  22403. y: 0,
  22404. width: a,
  22405. height: s
  22406. }
  22407. })), {
  22408. root: i,
  22409. width: a,
  22410. height: s,
  22411. viewBoxRect: l,
  22412. viewBoxTransform: u,
  22413. named: r
  22414. }
  22415. }, t.prototype._parseNode = function (t, e, n, i, r, o) {
  22416. var a, s = t.nodeName.toLowerCase(),
  22417. l = i;
  22418. if ("defs" === s && (r = !0), "text" === s && (o = !0), "defs" === s || "switch" === s) a = e;
  22419. else {
  22420. if (!r) {
  22421. var u = aT[s];
  22422. if (u && _t(aT, s)) {
  22423. a = u.call(this, t, e);
  22424. var h = t.getAttribute("name");
  22425. if (h) {
  22426. var c = {
  22427. name: h,
  22428. namedFrom: null,
  22429. svgNodeTagLower: s,
  22430. el: a
  22431. };
  22432. n.push(c), "g" === s && (l = c)
  22433. } else i && n.push({
  22434. name: i.name,
  22435. namedFrom: i,
  22436. svgNodeTagLower: s,
  22437. el: a
  22438. });
  22439. e.add(a)
  22440. }
  22441. }
  22442. var p = gT[s];
  22443. if (p && _t(gT, s)) {
  22444. var d = p.call(this, t),
  22445. f = t.getAttribute("id");
  22446. f && (this._defs[f] = d)
  22447. }
  22448. }
  22449. if (a && a.isGroup)
  22450. for (var g = t.firstChild; g;) 1 === g.nodeType ? this._parseNode(g, a, n, l, r, o) : 3 === g.nodeType && o && this._parseText(g, a), g = g.nextSibling
  22451. }, t.prototype._parseText = function (t, e) {
  22452. var n = new Ps({
  22453. style: {
  22454. text: t.textContent
  22455. },
  22456. silent: !0,
  22457. x: this._textX || 0,
  22458. y: this._textY || 0
  22459. });
  22460. mT(e, n), _T(t, n, this._defsUsePending, !1, !1),
  22461. function (t, e) {
  22462. var n = e.__selfStyle;
  22463. if (n) {
  22464. var i = n.textBaseline,
  22465. r = i;
  22466. i && "auto" !== i ? "baseline" === i ? r = "alphabetic" : "before-edge" === i || "text-before-edge" === i ? r = "top" : "after-edge" === i || "text-after-edge" === i ? r = "bottom" : "central" !== i && "mathematical" !== i || (r = "middle") : r = "alphabetic", t.style.textBaseline = r
  22467. }
  22468. var o = e.__inheritedStyle;
  22469. if (o) {
  22470. var a = o.textAlign,
  22471. s = a;
  22472. a && ("middle" === a && (s = "center"), t.style.textAlign = s)
  22473. }
  22474. }(n, e);
  22475. var i = n.style,
  22476. r = i.fontSize;
  22477. r && r < 9 && (i.fontSize = 9, n.scaleX *= r / 9, n.scaleY *= r / 9);
  22478. var o = (i.fontSize || i.fontFamily) && [i.fontStyle, i.fontWeight, (i.fontSize || 12) + "px", i.fontFamily || "sans-serif"].join(" ");
  22479. i.font = o;
  22480. var a = n.getBoundingRect();
  22481. return this._textX += a.width, e.add(n), n
  22482. }, t.internalField = void(aT = {
  22483. g: function (t, e) {
  22484. var n = new Br;
  22485. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n
  22486. },
  22487. rect: function (t, e) {
  22488. var n = new Ws;
  22489. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.setShape({
  22490. x: parseFloat(t.getAttribute("x") || "0"),
  22491. y: parseFloat(t.getAttribute("y") || "0"),
  22492. width: parseFloat(t.getAttribute("width") || "0"),
  22493. height: parseFloat(t.getAttribute("height") || "0")
  22494. }), n.silent = !0, n
  22495. },
  22496. circle: function (t, e) {
  22497. var n = new Su;
  22498. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.setShape({
  22499. cx: parseFloat(t.getAttribute("cx") || "0"),
  22500. cy: parseFloat(t.getAttribute("cy") || "0"),
  22501. r: parseFloat(t.getAttribute("r") || "0")
  22502. }), n.silent = !0, n
  22503. },
  22504. line: function (t, e) {
  22505. var n = new Ku;
  22506. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.setShape({
  22507. x1: parseFloat(t.getAttribute("x1") || "0"),
  22508. y1: parseFloat(t.getAttribute("y1") || "0"),
  22509. x2: parseFloat(t.getAttribute("x2") || "0"),
  22510. y2: parseFloat(t.getAttribute("y2") || "0")
  22511. }), n.silent = !0, n
  22512. },
  22513. ellipse: function (t, e) {
  22514. var n = new Iu;
  22515. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.setShape({
  22516. cx: parseFloat(t.getAttribute("cx") || "0"),
  22517. cy: parseFloat(t.getAttribute("cy") || "0"),
  22518. rx: parseFloat(t.getAttribute("rx") || "0"),
  22519. ry: parseFloat(t.getAttribute("ry") || "0")
  22520. }), n.silent = !0, n
  22521. },
  22522. polygon: function (t, e) {
  22523. var n, i = t.getAttribute("points");
  22524. i && (n = xT(i));
  22525. var r = new Xu({
  22526. shape: {
  22527. points: n || []
  22528. },
  22529. silent: !0
  22530. });
  22531. return mT(e, r), _T(t, r, this._defsUsePending, !1, !1), r
  22532. },
  22533. polyline: function (t, e) {
  22534. var n, i = t.getAttribute("points");
  22535. i && (n = xT(i));
  22536. var r = new Zu({
  22537. shape: {
  22538. points: n || []
  22539. },
  22540. silent: !0
  22541. });
  22542. return mT(e, r), _T(t, r, this._defsUsePending, !1, !1), r
  22543. },
  22544. image: function (t, e) {
  22545. var n = new Ns;
  22546. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.setStyle({
  22547. image: t.getAttribute("xlink:href") || t.getAttribute("href"),
  22548. x: +t.getAttribute("x"),
  22549. y: +t.getAttribute("y"),
  22550. width: +t.getAttribute("width"),
  22551. height: +t.getAttribute("height")
  22552. }), n.silent = !0, n
  22553. },
  22554. text: function (t, e) {
  22555. var n = t.getAttribute("x") || "0",
  22556. i = t.getAttribute("y") || "0",
  22557. r = t.getAttribute("dx") || "0",
  22558. o = t.getAttribute("dy") || "0";
  22559. this._textX = parseFloat(n) + parseFloat(r), this._textY = parseFloat(i) + parseFloat(o);
  22560. var a = new Br;
  22561. return mT(e, a), _T(t, a, this._defsUsePending, !1, !0), a
  22562. },
  22563. tspan: function (t, e) {
  22564. var n = t.getAttribute("x"),
  22565. i = t.getAttribute("y");
  22566. null != n && (this._textX = parseFloat(n)), null != i && (this._textY = parseFloat(i));
  22567. var r = t.getAttribute("dx") || "0",
  22568. o = t.getAttribute("dy") || "0",
  22569. a = new Br;
  22570. return mT(e, a), _T(t, a, this._defsUsePending, !1, !0), this._textX += parseFloat(r), this._textY += parseFloat(o), a
  22571. },
  22572. path: function (t, e) {
  22573. var n = _u(t.getAttribute("d") || "");
  22574. return mT(e, n), _T(t, n, this._defsUsePending, !1, !1), n.silent = !0, n
  22575. }
  22576. }), t
  22577. }(),
  22578. gT = {
  22579. lineargradient: function (t) {
  22580. var e = parseInt(t.getAttribute("x1") || "0", 10),
  22581. n = parseInt(t.getAttribute("y1") || "0", 10),
  22582. i = parseInt(t.getAttribute("x2") || "10", 10),
  22583. r = parseInt(t.getAttribute("y2") || "0", 10),
  22584. o = new oh(e, n, i, r);
  22585. return yT(t, o), vT(t, o), o
  22586. },
  22587. radialgradient: function (t) {
  22588. var e = parseInt(t.getAttribute("cx") || "0", 10),
  22589. n = parseInt(t.getAttribute("cy") || "0", 10),
  22590. i = parseInt(t.getAttribute("r") || "0", 10),
  22591. r = new ah(e, n, i);
  22592. return yT(t, r), vT(t, r), r
  22593. }
  22594. };
  22595. function yT(t, e) {
  22596. "userSpaceOnUse" === t.getAttribute("gradientUnits") && (e.global = !0)
  22597. }
  22598. function vT(t, e) {
  22599. for (var n = t.firstChild; n;) {
  22600. if (1 === n.nodeType && "stop" === n.nodeName.toLocaleLowerCase()) {
  22601. var i = n.getAttribute("offset"),
  22602. r = void 0;
  22603. r = i && i.indexOf("%") > 0 ? parseInt(i, 10) / 100 : i ? parseFloat(i) : 0;
  22604. var o = {};
  22605. DT(n, o, o);
  22606. var a = o.stopColor || n.getAttribute("stop-color") || "#000000";
  22607. e.colorStops.push({
  22608. offset: r,
  22609. color: a
  22610. })
  22611. }
  22612. n = n.nextSibling
  22613. }
  22614. }
  22615. function mT(t, e) {
  22616. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), k(e.__inheritedStyle, t.__inheritedStyle))
  22617. }
  22618. function xT(t) {
  22619. for (var e = MT(t), n = [], i = 0; i < e.length; i += 2) {
  22620. var r = parseFloat(e[i]),
  22621. o = parseFloat(e[i + 1]);
  22622. n.push([r, o])
  22623. }
  22624. return n
  22625. }
  22626. function _T(t, e, n, i, r) {
  22627. var o = e,
  22628. a = o.__inheritedStyle = o.__inheritedStyle || {},
  22629. s = {};
  22630. 1 === t.nodeType && (function (t, e) {
  22631. var n = t.getAttribute("transform");
  22632. if (n) {
  22633. n = n.replace(/,/g, " ");
  22634. var i = [],
  22635. r = null;
  22636. n.replace(IT, (function (t, e, n) {
  22637. return i.push(e, n), ""
  22638. }));
  22639. for (var o = i.length - 1; o > 0; o -= 2) {
  22640. var a = i[o],
  22641. s = i[o - 1],
  22642. l = MT(a);
  22643. switch (r = r || [1, 0, 0, 1, 0, 0], s) {
  22644. case "translate":
  22645. we(r, r, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  22646. break;
  22647. case "scale":
  22648. Me(r, r, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  22649. break;
  22650. case "rotate":
  22651. Se(r, r, -parseFloat(l[0]) * TT, [parseFloat(l[1] || "0"), parseFloat(l[2] || "0")]);
  22652. break;
  22653. case "skewX":
  22654. be(r, [1, 0, Math.tan(parseFloat(l[0]) * TT), 1, 0, 0], r);
  22655. break;
  22656. case "skewY":
  22657. be(r, [1, Math.tan(parseFloat(l[0]) * TT), 0, 1, 0, 0], r);
  22658. break;
  22659. case "matrix":
  22660. r[0] = parseFloat(l[0]), r[1] = parseFloat(l[1]), r[2] = parseFloat(l[2]), r[3] = parseFloat(l[3]), r[4] = parseFloat(l[4]), r[5] = parseFloat(l[5])
  22661. }
  22662. }
  22663. e.setLocalTransform(r)
  22664. }
  22665. }(t, e), DT(t, a, s), i || function (t, e, n) {
  22666. for (var i = 0; i < cT.length; i++) {
  22667. var r = cT[i];
  22668. null != (o = t.getAttribute(r)) && (e[hT[r]] = o)
  22669. }
  22670. for (i = 0; i < dT.length; i++) {
  22671. var o;
  22672. r = dT[i];
  22673. null != (o = t.getAttribute(r)) && (n[pT[r]] = o)
  22674. }
  22675. }(t, a, s)), o.style = o.style || {}, null != a.fill && (o.style.fill = wT(o, "fill", a.fill, n)), null != a.stroke && (o.style.stroke = wT(o, "stroke", a.stroke, n)), E(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], (function (t) {
  22676. null != a[t] && (o.style[t] = parseFloat(a[t]))
  22677. })), E(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign"], (function (t) {
  22678. null != a[t] && (o.style[t] = a[t])
  22679. })), r && (o.__selfStyle = s), a.lineDash && (o.style.lineDash = z(MT(a.lineDash), (function (t) {
  22680. return parseFloat(t)
  22681. }))), "hidden" !== a.visibility && "collapse" !== a.visibility || (o.invisible = !0), "none" === a.display && (o.ignore = !0)
  22682. }
  22683. var bT = /^url\(\s*#(.*?)\)/;
  22684. function wT(t, e, n, i) {
  22685. var r = n && n.match(bT);
  22686. if (!r) return "none" === n && (n = null), n;
  22687. var o = ut(r[1]);
  22688. i.push([t, e, o])
  22689. }
  22690. var ST = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  22691. function MT(t) {
  22692. return t.match(ST) || []
  22693. }
  22694. var IT = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,
  22695. TT = Math.PI / 180;
  22696. var CT = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  22697. function DT(t, e, n) {
  22698. var i, r = t.getAttribute("style");
  22699. if (r)
  22700. for (CT.lastIndex = 0; null != (i = CT.exec(r));) {
  22701. var o = i[1],
  22702. a = _t(hT, o) ? hT[o] : null;
  22703. a && (e[a] = i[2]);
  22704. var s = _t(pT, o) ? pT[o] : null;
  22705. s && (n[s] = i[2])
  22706. }
  22707. }
  22708. function AT(t, e) {
  22709. var n = e.width / t.width,
  22710. i = e.height / t.height,
  22711. r = Math.min(n, i);
  22712. return {
  22713. scale: r,
  22714. x: -(t.x + t.width / 2) * r + (e.x + e.width / 2),
  22715. y: -(t.y + t.height / 2) * r + (e.y + e.height / 2)
  22716. }
  22717. }
  22718. var kT = yt(["rect", "circle", "line", "ellipse", "polygon", "polyline", "path", "text", "tspan", "g"]),
  22719. LT = function () {
  22720. function t(t, e) {
  22721. this.type = "geoSVG", this._usedGraphicMap = yt(), this._freedGraphics = [], this._mapName = t, this._parsedXML = uT(e)
  22722. }
  22723. return t.prototype.load = function () {
  22724. var t = this._firstGraphic;
  22725. if (!t) {
  22726. t = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(t), this._boundingRect = this._firstGraphic.boundingRect.clone();
  22727. var e = function (t) {
  22728. var e = [],
  22729. n = yt();
  22730. return E(t, (function (t) {
  22731. if (null == t.namedFrom) {
  22732. var i = new F_(t.name, t.el);
  22733. e.push(i), n.set(t.name, i)
  22734. }
  22735. })), {
  22736. regions: e,
  22737. regionsMap: n
  22738. }
  22739. }(t.named),
  22740. n = e.regions,
  22741. i = e.regionsMap;
  22742. this._regions = n, this._regionsMap = i
  22743. }
  22744. return {
  22745. boundingRect: this._boundingRect,
  22746. regions: this._regions,
  22747. regionsMap: this._regionsMap
  22748. }
  22749. }, t.prototype._buildGraphic = function (t) {
  22750. var e, n, i, r;
  22751. try {
  22752. lt(null != (n = (e = t && (i = t, r = {
  22753. ignoreViewBox: !0,
  22754. ignoreRootClip: !0
  22755. }, (new fT).parse(i, r)) || {}).root))
  22756. } catch (t) {
  22757. throw new Error("Invalid svg format\n" + t.message)
  22758. }
  22759. var o = new Br;
  22760. o.add(n), o.isGeoSVGGraphicRoot = !0;
  22761. var a = e.width,
  22762. s = e.height,
  22763. l = e.viewBoxRect,
  22764. u = this._boundingRect;
  22765. if (!u) {
  22766. var h = void 0,
  22767. c = void 0,
  22768. p = void 0,
  22769. d = void 0;
  22770. if (null != a ? (h = 0, p = a) : l && (h = l.x, p = l.width), null != s ? (c = 0, d = s) : l && (c = l.y, d = l.height), null == h || null == c) {
  22771. var f = n.getBoundingRect();
  22772. null == h && (h = f.x, p = f.width), null == c && (c = f.y, d = f.height)
  22773. }
  22774. u = this._boundingRect = new ze(h, c, p, d)
  22775. }
  22776. if (l) {
  22777. var g = AT(l, u);
  22778. n.scaleX = n.scaleY = g.scale, n.x = g.x, n.y = g.y
  22779. }
  22780. o.setClipPath(new Ws({
  22781. shape: u.plain()
  22782. }));
  22783. var y = [];
  22784. return E(e.named, (function (t) {
  22785. var e;
  22786. null != kT.get(t.svgNodeTagLower) && (y.push(t), (e = t.el).silent = !1, e.isGroup && e.traverse((function (t) {
  22787. t.silent = !1
  22788. })))
  22789. })), {
  22790. root: o,
  22791. boundingRect: u,
  22792. named: y
  22793. }
  22794. }, t.prototype.useGraphic = function (t) {
  22795. var e = this._usedGraphicMap,
  22796. n = e.get(t);
  22797. return n || (n = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), e.set(t, n), n)
  22798. }, t.prototype.freeGraphic = function (t) {
  22799. var e = this._usedGraphicMap,
  22800. n = e.get(t);
  22801. n && (e.removeKey(t), this._freedGraphics.push(n))
  22802. }, t
  22803. }();
  22804. for (var PT = [126, 25], OT = "南海诸岛", RT = [
  22805. [
  22806. [0, 3.5],
  22807. [7, 11.2],
  22808. [15, 11.9],
  22809. [30, 7],
  22810. [42, .7],
  22811. [52, .7],
  22812. [56, 7.7],
  22813. [59, .7],
  22814. [64, .7],
  22815. [64, 0],
  22816. [5, 0],
  22817. [0, 3.5]
  22818. ],
  22819. [
  22820. [13, 16.1],
  22821. [19, 14.7],
  22822. [16, 21.7],
  22823. [11, 23.1],
  22824. [13, 16.1]
  22825. ],
  22826. [
  22827. [12, 32.2],
  22828. [14, 38.5],
  22829. [15, 38.5],
  22830. [13, 32.2],
  22831. [12, 32.2]
  22832. ],
  22833. [
  22834. [16, 47.6],
  22835. [12, 53.2],
  22836. [13, 53.2],
  22837. [18, 47.6],
  22838. [16, 47.6]
  22839. ],
  22840. [
  22841. [6, 64.4],
  22842. [8, 70],
  22843. [9, 70],
  22844. [8, 64.4],
  22845. [6, 64.4]
  22846. ],
  22847. [
  22848. [23, 82.6],
  22849. [29, 79.8],
  22850. [30, 79.8],
  22851. [25, 82.6],
  22852. [23, 82.6]
  22853. ],
  22854. [
  22855. [37, 70.7],
  22856. [43, 62.3],
  22857. [44, 62.3],
  22858. [39, 70.7],
  22859. [37, 70.7]
  22860. ],
  22861. [
  22862. [48, 51.1],
  22863. [51, 45.5],
  22864. [53, 45.5],
  22865. [50, 51.1],
  22866. [48, 51.1]
  22867. ],
  22868. [
  22869. [51, 35],
  22870. [51, 28.7],
  22871. [53, 28.7],
  22872. [53, 35],
  22873. [51, 35]
  22874. ],
  22875. [
  22876. [52, 22.4],
  22877. [55, 17.5],
  22878. [56, 17.5],
  22879. [53, 22.4],
  22880. [52, 22.4]
  22881. ],
  22882. [
  22883. [58, 12.6],
  22884. [62, 7],
  22885. [63, 7],
  22886. [60, 12.6],
  22887. [58, 12.6]
  22888. ],
  22889. [
  22890. [0, 3.5],
  22891. [0, 93.1],
  22892. [64, 93.1],
  22893. [64, 0],
  22894. [63, 0],
  22895. [63, 92.4],
  22896. [1, 92.4],
  22897. [1, 3.5],
  22898. [0, 3.5]
  22899. ]
  22900. ], NT = 0; NT < RT.length; NT++)
  22901. for (var ET = 0; ET < RT[NT].length; ET++) RT[NT][ET][0] /= 10.5, RT[NT][ET][1] /= -14, RT[NT][ET][0] += PT[0], RT[NT][ET][1] += PT[1];
  22902. var zT = {
  22903. "南海诸岛": [32, 80],
  22904. "广东": [0, -10],
  22905. "香港": [10, 5],
  22906. "澳门": [-10, 10],
  22907. "天津": [5, 5]
  22908. };
  22909. var VT = [
  22910. [
  22911. [123.45165252685547, 25.73527164402261],
  22912. [123.49731445312499, 25.73527164402261],
  22913. [123.49731445312499, 25.750734064600884],
  22914. [123.45165252685547, 25.750734064600884],
  22915. [123.45165252685547, 25.73527164402261]
  22916. ]
  22917. ];
  22918. var BT = function () {
  22919. function t(t, e, n) {
  22920. var i;
  22921. this.type = "geoJSON", this._parsedMap = yt(), this._mapName = t, this._specialAreas = n, this._geoJSON = U(i = e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(i) : new Function("return (" + i + ");")() : i
  22922. }
  22923. return t.prototype.load = function (t, e) {
  22924. e = e || "name";
  22925. var n = this._parsedMap.get(e);
  22926. if (!n) {
  22927. var i = this._parseToRegions(e);
  22928. n = this._parsedMap.set(e, {
  22929. regions: i,
  22930. boundingRect: FT(i)
  22931. })
  22932. }
  22933. var r = yt(),
  22934. o = [];
  22935. return E(n.regions, (function (e) {
  22936. var n = e.name;
  22937. t && _t(t, n) && (e = e.cloneShallow(n = t[n])), o.push(e), r.set(n, e)
  22938. })), {
  22939. regions: o,
  22940. boundingRect: n.boundingRect || new ze(0, 0, 0, 0),
  22941. regionsMap: r
  22942. }
  22943. }, t.prototype._parseToRegions = function (t) {
  22944. var e, n = this._mapName,
  22945. i = this._geoJSON;
  22946. try {
  22947. e = i ? H_(i, t) : []
  22948. } catch (t) {
  22949. throw new Error("Invalid geoJson format\n" + t.message)
  22950. }
  22951. return function (t, e) {
  22952. if ("china" === t) {
  22953. for (var n = 0; n < e.length; n++)
  22954. if (e[n].name === OT) return;
  22955. e.push(new B_(OT, z(RT, (function (t) {
  22956. return {
  22957. type: "polygon",
  22958. exterior: t
  22959. }
  22960. })), PT))
  22961. }
  22962. }(n, e), E(e, (function (t) {
  22963. var e = t.name;
  22964. ! function (t, e) {
  22965. if ("china" === t) {
  22966. var n = zT[e.name];
  22967. if (n) {
  22968. var i = e.getCenter();
  22969. i[0] += n[0] / 10.5, i[1] += -n[1] / 14, e.setCenter(i)
  22970. }
  22971. }
  22972. }(n, t),
  22973. function (t, e) {
  22974. "china" === t && "台湾" === e.name && e.geometries.push({
  22975. type: "polygon",
  22976. exterior: VT[0]
  22977. })
  22978. }(n, t);
  22979. var i = this._specialAreas && this._specialAreas[e];
  22980. i && t.transformTo(i.left, i.top, i.width, i.height)
  22981. }), this), e
  22982. }, t.prototype.getMapForUser = function () {
  22983. return {
  22984. geoJson: this._geoJSON,
  22985. geoJSON: this._geoJSON,
  22986. specialAreas: this._specialAreas
  22987. }
  22988. }, t
  22989. }();
  22990. function FT(t) {
  22991. for (var e, n = 0; n < t.length; n++) {
  22992. var i = t[n].getBoundingRect();
  22993. (e = e || i.clone()).union(i)
  22994. }
  22995. return e
  22996. }
  22997. var GT = yt(),
  22998. WT = function (t, e, n) {
  22999. if (e.svg) {
  23000. var i = new LT(t, e.svg);
  23001. GT.set(t, i)
  23002. } else {
  23003. var r = e.geoJson || e.geoJSON;
  23004. r && !e.features ? n = e.specialAreas : r = e;
  23005. i = new BT(t, r, n);
  23006. GT.set(t, i)
  23007. }
  23008. },
  23009. HT = function (t) {
  23010. return GT.get(t)
  23011. },
  23012. YT = function (t) {
  23013. var e = GT.get(t);
  23014. return e && "geoJSON" === e.type && e.getMapForUser()
  23015. },
  23016. XT = function (t, e, n) {
  23017. var i = GT.get(t);
  23018. if (i) return i.load(e, n)
  23019. },
  23020. UT = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"],
  23021. ZT = yt(UT),
  23022. jT = yt(UT.concat(["g"])),
  23023. qT = yt(UT.concat(["g"])),
  23024. KT = Vo();
  23025. function $T(t) {
  23026. var e = t.getItemStyle(),
  23027. n = t.get("areaColor");
  23028. return null != n && (e.fill = n), e
  23029. }
  23030. function JT(t) {
  23031. var e = t.style;
  23032. e && (e.stroke = e.stroke || e.fill, e.fill = null)
  23033. }
  23034. var QT = function () {
  23035. function t(t) {
  23036. var e = new Br;
  23037. this.uid = Ac("ec_map_draw"), this._controller = new tT(t.getZr()), this._controllerHost = {
  23038. target: e
  23039. }, this.group = e, e.add(this._regionsGroup = new Br), e.add(this._svgGroup = new Br)
  23040. }
  23041. return t.prototype.draw = function (t, e, n, i, r) {
  23042. var o = "geo" === t.mainType,
  23043. a = t.getData && t.getData();
  23044. o && e.eachComponent({
  23045. mainType: "series",
  23046. subType: "map"
  23047. }, (function (e) {
  23048. a || e.getHostGeoModel() !== t || (a = e.getData())
  23049. }));
  23050. var s = t.coordinateSystem,
  23051. l = this._regionsGroup,
  23052. u = this.group,
  23053. h = s.getTransformInfo(),
  23054. c = h.raw,
  23055. p = h.roam;
  23056. !l.childAt(0) || r ? (u.x = p.x, u.y = p.y, u.scaleX = p.scaleX, u.scaleY = p.scaleY, u.dirty()) : vh(u, p, t);
  23057. var d = a && a.getVisual("visualMeta") && a.getVisual("visualMeta").length > 0,
  23058. f = {
  23059. api: n,
  23060. geo: s,
  23061. mapOrGeoModel: t,
  23062. data: a,
  23063. isVisualEncodedByVisualMap: d,
  23064. isGeo: o,
  23065. transformInfoRaw: c
  23066. };
  23067. "geoJSON" === s.resourceType ? this._buildGeoJSON(f) : "geoSVG" === s.resourceType && this._buildSVG(f), this._updateController(t, e, n), this._updateMapSelectHandler(t, l, n, i)
  23068. }, t.prototype._buildGeoJSON = function (t) {
  23069. var e = this._regionsGroupByName = yt(),
  23070. n = yt(),
  23071. i = this._regionsGroup,
  23072. r = t.transformInfoRaw,
  23073. o = t.mapOrGeoModel,
  23074. a = t.data,
  23075. s = t.geo.projection,
  23076. l = s && s.stream;
  23077. function u(t, e) {
  23078. return e && (t = e(t)), t && [t[0] * r.scaleX + r.x, t[1] * r.scaleY + r.y]
  23079. }
  23080. function h(t) {
  23081. for (var e = [], n = !l && s && s.project, i = 0; i < t.length; ++i) {
  23082. var r = u(t[i], n);
  23083. r && e.push(r)
  23084. }
  23085. return e
  23086. }
  23087. function c(t) {
  23088. return {
  23089. shape: {
  23090. points: h(t)
  23091. }
  23092. }
  23093. }
  23094. i.removeAll(), E(t.geo.regions, (function (r) {
  23095. var h = r.name,
  23096. p = e.get(h),
  23097. d = n.get(h) || {},
  23098. f = d.dataIdx,
  23099. g = d.regionModel;
  23100. p || (p = e.set(h, new Br), i.add(p), f = a ? a.indexOfName(h) : null, g = t.isGeo ? o.getRegionModel(h) : a ? a.getItemModel(f) : null, n.set(h, {
  23101. dataIdx: f,
  23102. regionModel: g
  23103. }));
  23104. var y = [],
  23105. v = [];
  23106. E(r.geometries, (function (t) {
  23107. if ("polygon" === t.type) {
  23108. var e = [t.exterior].concat(t.interiors || []);
  23109. l && (e = oC(e, l)), E(e, (function (t) {
  23110. y.push(new Xu(c(t)))
  23111. }))
  23112. } else {
  23113. var n = t.points;
  23114. l && (n = oC(n, l, !0)), E(n, (function (t) {
  23115. v.push(new Zu(c(t)))
  23116. }))
  23117. }
  23118. }));
  23119. var m = u(r.getCenter(), s && s.project);
  23120. function x(e, n) {
  23121. if (e.length) {
  23122. var i = new ih({
  23123. culling: !0,
  23124. segmentIgnoreThreshold: 1,
  23125. shape: {
  23126. paths: e
  23127. }
  23128. });
  23129. p.add(i), tC(t, i, f, g), eC(t, i, h, g, o, f, m), n && (JT(i), E(i.states, JT))
  23130. }
  23131. }
  23132. x(y), x(v, !0)
  23133. })), e.each((function (e, i) {
  23134. var r = n.get(i),
  23135. a = r.dataIdx,
  23136. s = r.regionModel;
  23137. nC(t, e, i, s, o, a), iC(t, e, i, s, o), rC(t, e, i, s, o)
  23138. }), this)
  23139. }, t.prototype._buildSVG = function (t) {
  23140. var e = t.geo.map,
  23141. n = t.transformInfoRaw;
  23142. this._svgGroup.x = n.x, this._svgGroup.y = n.y, this._svgGroup.scaleX = n.scaleX, this._svgGroup.scaleY = n.scaleY, this._svgResourceChanged(e) && (this._freeSVG(), this._useSVG(e));
  23143. var i = this._svgDispatcherMap = yt(),
  23144. r = !1;
  23145. E(this._svgGraphicRecord.named, (function (e) {
  23146. var n = e.name,
  23147. o = t.mapOrGeoModel,
  23148. a = t.data,
  23149. s = e.svgNodeTagLower,
  23150. l = e.el,
  23151. u = a ? a.indexOfName(n) : null,
  23152. h = o.getRegionModel(n);
  23153. (null != ZT.get(s) && l instanceof Da && tC(t, l, u, h), l instanceof Da && (l.culling = !0), l.z2EmphasisLift = 0, e.namedFrom) || (null != qT.get(s) && eC(t, l, n, h, o, u, null), nC(t, l, n, h, o, u), iC(t, l, n, h, o), null != jT.get(s) && ("self" === rC(t, l, n, h, o) && (r = !0), (i.get(n) || i.set(n, [])).push(l)))
  23154. }), this), this._enableBlurEntireSVG(r, t)
  23155. }, t.prototype._enableBlurEntireSVG = function (t, e) {
  23156. if (t && e.isGeo) {
  23157. var n = e.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle().opacity;
  23158. this._svgGraphicRecord.root.traverse((function (t) {
  23159. if (!t.isGroup) {
  23160. kl(t);
  23161. var e = t.ensureState("blur").style || {};
  23162. null == e.opacity && null != n && (e.opacity = n), t.ensureState("emphasis")
  23163. }
  23164. }))
  23165. }
  23166. }, t.prototype.remove = function () {
  23167. this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null
  23168. }, t.prototype.findHighDownDispatchers = function (t, e) {
  23169. if (null == t) return [];
  23170. var n = e.coordinateSystem;
  23171. if ("geoJSON" === n.resourceType) {
  23172. var i = this._regionsGroupByName;
  23173. if (i) {
  23174. var r = i.get(t);
  23175. return r ? [r] : []
  23176. }
  23177. } else if ("geoSVG" === n.resourceType) return this._svgDispatcherMap && this._svgDispatcherMap.get(t) || []
  23178. }, t.prototype._svgResourceChanged = function (t) {
  23179. return this._svgMapName !== t
  23180. }, t.prototype._useSVG = function (t) {
  23181. var e = HT(t);
  23182. if (e && "geoSVG" === e.type) {
  23183. var n = e.useGraphic(this.uid);
  23184. this._svgGroup.add(n.root), this._svgGraphicRecord = n, this._svgMapName = t
  23185. }
  23186. }, t.prototype._freeSVG = function () {
  23187. var t = this._svgMapName;
  23188. if (null != t) {
  23189. var e = HT(t);
  23190. e && "geoSVG" === e.type && e.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null
  23191. }
  23192. }, t.prototype._updateController = function (t, e, n) {
  23193. var i = t.coordinateSystem,
  23194. r = this._controller,
  23195. o = this._controllerHost;
  23196. o.zoomLimit = t.get("scaleLimit"), o.zoom = i.getZoom(), r.enable(t.get("roam") || !1);
  23197. var a = t.mainType;
  23198. function s() {
  23199. var e = {
  23200. type: "geoRoam",
  23201. componentType: a
  23202. };
  23203. return e[a + "Id"] = t.id, e
  23204. }
  23205. r.off("pan").on("pan", (function (t) {
  23206. this._mouseDownFlag = !1, rT(o, t.dx, t.dy), n.dispatchAction(A(s(), {
  23207. dx: t.dx,
  23208. dy: t.dy,
  23209. animation: {
  23210. duration: 0
  23211. }
  23212. }))
  23213. }), this), r.off("zoom").on("zoom", (function (t) {
  23214. this._mouseDownFlag = !1, oT(o, t.scale, t.originX, t.originY), n.dispatchAction(A(s(), {
  23215. zoom: t.scale,
  23216. originX: t.originX,
  23217. originY: t.originY,
  23218. animation: {
  23219. duration: 0
  23220. }
  23221. }))
  23222. }), this), r.setPointerChecker((function (e, r, o) {
  23223. return i.containPoint([r, o]) && !lT(e, n, t)
  23224. }))
  23225. }, t.prototype.resetForLabelLayout = function () {
  23226. this.group.traverse((function (t) {
  23227. var e = t.getTextContent();
  23228. e && (e.ignore = KT(e).ignore)
  23229. }))
  23230. }, t.prototype._updateMapSelectHandler = function (t, e, n, i) {
  23231. var r = this;
  23232. e.off("mousedown"), e.off("click"), t.get("selectedMode") && (e.on("mousedown", (function () {
  23233. r._mouseDownFlag = !0
  23234. })), e.on("click", (function (t) {
  23235. r._mouseDownFlag && (r._mouseDownFlag = !1)
  23236. })))
  23237. }, t
  23238. }();
  23239. function tC(t, e, n, i) {
  23240. var r = i.getModel("itemStyle"),
  23241. o = i.getModel(["emphasis", "itemStyle"]),
  23242. a = i.getModel(["blur", "itemStyle"]),
  23243. s = i.getModel(["select", "itemStyle"]),
  23244. l = $T(r),
  23245. u = $T(o),
  23246. h = $T(s),
  23247. c = $T(a),
  23248. p = t.data;
  23249. if (p) {
  23250. var d = p.getItemVisual(n, "style"),
  23251. f = p.getItemVisual(n, "decal");
  23252. t.isVisualEncodedByVisualMap && d.fill && (l.fill = d.fill), f && (l.decal = mv(f, t.api))
  23253. }
  23254. e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = h, e.ensureState("blur").style = c, kl(e)
  23255. }
  23256. function eC(t, e, n, i, r, o, a) {
  23257. var s = t.data,
  23258. l = t.isGeo,
  23259. u = s && isNaN(s.get(s.mapDimension("value"), o)),
  23260. h = s && s.getItemLayout(o);
  23261. if (l || u || h && h.showLabel) {
  23262. var c = l ? n : o,
  23263. p = void 0;
  23264. (!s || o >= 0) && (p = r);
  23265. var d = a ? {
  23266. normal: {
  23267. align: "center",
  23268. verticalAlign: "middle"
  23269. }
  23270. } : null;
  23271. ic(e, rc(i), {
  23272. labelFetcher: p,
  23273. labelDataIndex: c,
  23274. defaultText: n
  23275. }, d);
  23276. var f = e.getTextContent();
  23277. if (f && (KT(f).ignore = f.ignore, e.textConfig && a)) {
  23278. var g = e.getBoundingRect().clone();
  23279. e.textConfig.layoutRect = g, e.textConfig.position = [(a[0] - g.x) / g.width * 100 + "%", (a[1] - g.y) / g.height * 100 + "%"]
  23280. }
  23281. e.disableLabelAnimation = !0
  23282. } else e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null
  23283. }
  23284. function nC(t, e, n, i, r, o) {
  23285. t.data ? t.data.setItemGraphicEl(o, e) : rl(e).eventData = {
  23286. componentType: "geo",
  23287. componentIndex: r.componentIndex,
  23288. geoIndex: r.componentIndex,
  23289. name: n,
  23290. region: i && i.option || {}
  23291. }
  23292. }
  23293. function iC(t, e, n, i, r) {
  23294. t.data || Kh({
  23295. el: e,
  23296. componentModel: r,
  23297. itemName: n,
  23298. itemTooltipOption: i.get("tooltip")
  23299. })
  23300. }
  23301. function rC(t, e, n, i, r) {
  23302. e.highDownSilentOnTouch = !!r.get("selectedMode");
  23303. var o = i.getModel("emphasis"),
  23304. a = o.get("focus");
  23305. return Zl(e, a, o.get("blurScope"), o.get("disabled")), t.isGeo && function (t, e, n) {
  23306. var i = rl(t);
  23307. i.componentMainType = e.mainType, i.componentIndex = e.componentIndex, i.componentHighDownName = n
  23308. }(e, r, n), a
  23309. }
  23310. function oC(t, e, n) {
  23311. var i, r = [];
  23312. function o() {
  23313. i = []
  23314. }
  23315. function a() {
  23316. i.length && (r.push(i), i = [])
  23317. }
  23318. var s = e({
  23319. polygonStart: o,
  23320. polygonEnd: a,
  23321. lineStart: o,
  23322. lineEnd: a,
  23323. point: function (t, e) {
  23324. isFinite(t) && isFinite(e) && i.push([t, e])
  23325. },
  23326. sphere: function () {}
  23327. });
  23328. return !n && s.polygonStart(), E(t, (function (t) {
  23329. s.lineStart();
  23330. for (var e = 0; e < t.length; e++) s.point(t[e][0], t[e][1]);
  23331. s.lineEnd()
  23332. })), !n && s.polygonEnd(), r
  23333. }
  23334. var aC = function (t) {
  23335. function e() {
  23336. var n = null !== t && t.apply(this, arguments) || this;
  23337. return n.type = e.type, n
  23338. }
  23339. return n(e, t), e.prototype.render = function (t, e, n, i) {
  23340. if (!i || "mapToggleSelect" !== i.type || i.from !== this.uid) {
  23341. var r = this.group;
  23342. if (r.removeAll(), !t.getHostGeoModel()) {
  23343. if (this._mapDraw && i && "geoRoam" === i.type && this._mapDraw.resetForLabelLayout(), i && "geoRoam" === i.type && "series" === i.componentType && i.seriesId === t.id)(o = this._mapDraw) && r.add(o.group);
  23344. else if (t.needsDrawMap) {
  23345. var o = this._mapDraw || new QT(n);
  23346. r.add(o.group), o.draw(t, e, n, this, i), this._mapDraw = o
  23347. } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  23348. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, n)
  23349. }
  23350. }
  23351. }, e.prototype.remove = function () {
  23352. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll()
  23353. }, e.prototype.dispose = function () {
  23354. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null
  23355. }, e.prototype._renderSymbols = function (t, e, n) {
  23356. var i = t.originalData,
  23357. r = this.group;
  23358. i.each(i.mapDimension("value"), (function (e, n) {
  23359. if (!isNaN(e)) {
  23360. var o = i.getItemLayout(n);
  23361. if (o && o.point) {
  23362. var a = o.point,
  23363. s = o.offset,
  23364. l = new Su({
  23365. style: {
  23366. fill: t.getData().getVisual("style").fill
  23367. },
  23368. shape: {
  23369. cx: a[0] + 9 * s,
  23370. cy: a[1],
  23371. r: 3
  23372. },
  23373. silent: !0,
  23374. z2: 8 + (s ? 0 : 11)
  23375. });
  23376. if (!s) {
  23377. var u = t.mainSeries.getData(),
  23378. h = i.getName(n),
  23379. c = u.indexOfName(h),
  23380. p = i.getItemModel(n),
  23381. d = p.getModel("label"),
  23382. f = u.getItemGraphicEl(c);
  23383. ic(l, rc(p), {
  23384. labelFetcher: {
  23385. getFormattedLabel: function (e, n) {
  23386. return t.getFormattedLabel(c, n)
  23387. }
  23388. },
  23389. defaultText: h
  23390. }), l.disableLabelAnimation = !0, d.get("position") || l.setTextConfig({
  23391. position: "bottom"
  23392. }), f.onHoverStateChange = function (t) {
  23393. Dl(l, t)
  23394. }
  23395. }
  23396. r.add(l)
  23397. }
  23398. }
  23399. }))
  23400. }, e.type = "map", e
  23401. }(Og),
  23402. sC = function (t) {
  23403. function e() {
  23404. var n = null !== t && t.apply(this, arguments) || this;
  23405. return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function (t) {
  23406. if (null != t) {
  23407. var e = this.getData().getName(t),
  23408. n = this.coordinateSystem,
  23409. i = n.getRegion(e);
  23410. return i && n.dataToPoint(i.getCenter())
  23411. }
  23412. }, n
  23413. }
  23414. return n(e, t), e.prototype.getInitialData = function (t) {
  23415. for (var e = PM(this, {
  23416. coordDimensions: ["value"],
  23417. encodeDefaulter: H(ed, this)
  23418. }), n = yt(), i = [], r = 0, o = e.count(); r < o; r++) {
  23419. var a = e.getName(r);
  23420. n.set(a, !0)
  23421. }
  23422. return E(XT(this.getMapType(), this.option.nameMap, this.option.nameProperty).regions, (function (t) {
  23423. var e = t.name;
  23424. n.get(e) || i.push(e)
  23425. })), e.appendValues([], i), e
  23426. }, e.prototype.getHostGeoModel = function () {
  23427. var t = this.option.geoIndex;
  23428. return null != t ? this.ecModel.getComponent("geo", t) : null
  23429. }, e.prototype.getMapType = function () {
  23430. return (this.getHostGeoModel() || this).option.map
  23431. }, e.prototype.getRawValue = function (t) {
  23432. var e = this.getData();
  23433. return e.get(e.mapDimension("value"), t)
  23434. }, e.prototype.getRegionModel = function (t) {
  23435. var e = this.getData();
  23436. return e.getItemModel(e.indexOfName(t))
  23437. }, e.prototype.formatTooltip = function (t, e, n) {
  23438. for (var i = this.getData(), r = this.getRawValue(t), o = i.getName(t), a = this.seriesGroup, s = [], l = 0; l < a.length; l++) {
  23439. var u = a[l].originalData.indexOfName(o),
  23440. h = i.mapDimension("value");
  23441. isNaN(a[l].originalData.get(h, u)) || s.push(a[l].name)
  23442. }
  23443. return og("section", {
  23444. header: s.join(", "),
  23445. noHeader: !s.length,
  23446. blocks: [og("nameValue", {
  23447. name: o,
  23448. value: r
  23449. })]
  23450. })
  23451. }, e.prototype.setZoom = function (t) {
  23452. this.option.zoom = t
  23453. }, e.prototype.setCenter = function (t) {
  23454. this.option.center = t
  23455. }, e.prototype.getLegendIcon = function (t) {
  23456. var e = t.icon || "roundRect",
  23457. n = Xy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill);
  23458. return n.setStyle(t.itemStyle), n.style.stroke = "none", e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n
  23459. }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
  23460. z: 2,
  23461. coordinateSystem: "geo",
  23462. map: "",
  23463. left: "center",
  23464. top: "center",
  23465. aspectScale: null,
  23466. showLegendSymbol: !0,
  23467. boundingCoords: null,
  23468. center: null,
  23469. zoom: 1,
  23470. scaleLimit: null,
  23471. selectedMode: !0,
  23472. label: {
  23473. show: !1,
  23474. color: "#000"
  23475. },
  23476. itemStyle: {
  23477. borderWidth: .5,
  23478. borderColor: "#444",
  23479. areaColor: "#eee"
  23480. },
  23481. emphasis: {
  23482. label: {
  23483. show: !0,
  23484. color: "rgb(100,0,0)"
  23485. },
  23486. itemStyle: {
  23487. areaColor: "rgba(255,215,0,0.8)"
  23488. }
  23489. },
  23490. select: {
  23491. label: {
  23492. show: !0,
  23493. color: "rgb(100,0,0)"
  23494. },
  23495. itemStyle: {
  23496. color: "rgba(255,215,0,0.8)"
  23497. }
  23498. },
  23499. nameProperty: "name"
  23500. }, e
  23501. }(bg);
  23502. function lC(t) {
  23503. var e = {};
  23504. t.eachSeriesByType("map", (function (t) {
  23505. var n = t.getHostGeoModel(),
  23506. i = n ? "o" + n.id : "i" + t.getMapType();
  23507. (e[i] = e[i] || []).push(t)
  23508. })), E(e, (function (t, e) {
  23509. for (var n, i, r, o = (n = z(t, (function (t) {
  23510. return t.getData()
  23511. })), i = t[0].get("mapValueCalculation"), r = {}, E(n, (function (t) {
  23512. t.each(t.mapDimension("value"), (function (e, n) {
  23513. var i = "ec-" + t.getName(n);
  23514. r[i] = r[i] || [], isNaN(e) || r[i].push(e)
  23515. }))
  23516. })), n[0].map(n[0].mapDimension("value"), (function (t, e) {
  23517. for (var o = "ec-" + n[0].getName(e), a = 0, s = 1 / 0, l = -1 / 0, u = r[o].length, h = 0; h < u; h++) s = Math.min(s, r[o][h]), l = Math.max(l, r[o][h]), a += r[o][h];
  23518. return 0 === u ? NaN : "min" === i ? s : "max" === i ? l : "average" === i ? a / u : a
  23519. }))), a = 0; a < t.length; a++) t[a].originalData = t[a].getData();
  23520. for (a = 0; a < t.length; a++) t[a].seriesGroup = t, t[a].needsDrawMap = 0 === a && !t[a].getHostGeoModel(), t[a].setData(o.cloneShallow()), t[a].mainSeries = t[0]
  23521. }))
  23522. }
  23523. function uC(t) {
  23524. var e = {};
  23525. t.eachSeriesByType("map", (function (n) {
  23526. var i = n.getMapType();
  23527. if (!n.getHostGeoModel() && !e[i]) {
  23528. var r = {};
  23529. E(n.seriesGroup, (function (e) {
  23530. var n = e.coordinateSystem,
  23531. i = e.originalData;
  23532. e.get("showLegendSymbol") && t.getComponent("legend") && i.each(i.mapDimension("value"), (function (t, e) {
  23533. var o = i.getName(e),
  23534. a = n.getRegion(o);
  23535. if (a && !isNaN(t)) {
  23536. var s = r[o] || 0,
  23537. l = n.dataToPoint(a.getCenter());
  23538. r[o] = s + 1, i.setItemLayout(e, {
  23539. point: l,
  23540. offset: s
  23541. })
  23542. }
  23543. }))
  23544. }));
  23545. var o = n.getData();
  23546. o.each((function (t) {
  23547. var e = o.getName(t),
  23548. n = o.getItemLayout(t) || {};
  23549. n.showLabel = !r[e], o.setItemLayout(t, n)
  23550. })), e[i] = !0
  23551. }
  23552. }))
  23553. }
  23554. var hC = Wt,
  23555. cC = function (t) {
  23556. function e(e) {
  23557. var n = t.call(this) || this;
  23558. return n.type = "view", n.dimensions = ["x", "y"], n._roamTransformable = new vr, n._rawTransformable = new vr, n.name = e, n
  23559. }
  23560. return n(e, t), e.prototype.setBoundingRect = function (t, e, n, i) {
  23561. return this._rect = new ze(t, e, n, i), this._rect
  23562. }, e.prototype.getBoundingRect = function () {
  23563. return this._rect
  23564. }, e.prototype.setViewRect = function (t, e, n, i) {
  23565. this._transformTo(t, e, n, i), this._viewRect = new ze(t, e, n, i)
  23566. }, e.prototype._transformTo = function (t, e, n, i) {
  23567. var r = this.getBoundingRect(),
  23568. o = this._rawTransformable;
  23569. o.transform = r.calculateTransform(new ze(t, e, n, i));
  23570. var a = o.parent;
  23571. o.parent = null, o.decomposeTransform(), o.parent = a, this._updateTransform()
  23572. }, e.prototype.setCenter = function (t, e) {
  23573. t && (this._center = [$r(t[0], e.getWidth()), $r(t[1], e.getHeight())], this._updateCenterAndZoom())
  23574. }, e.prototype.setZoom = function (t) {
  23575. t = t || 1;
  23576. var e = this.zoomLimit;
  23577. e && (null != e.max && (t = Math.min(e.max, t)), null != e.min && (t = Math.max(e.min, t))), this._zoom = t, this._updateCenterAndZoom()
  23578. }, e.prototype.getDefaultCenter = function () {
  23579. var t = this.getBoundingRect();
  23580. return [t.x + t.width / 2, t.y + t.height / 2]
  23581. }, e.prototype.getCenter = function () {
  23582. return this._center || this.getDefaultCenter()
  23583. }, e.prototype.getZoom = function () {
  23584. return this._zoom || 1
  23585. }, e.prototype.getRoamTransform = function () {
  23586. return this._roamTransformable.getLocalTransform()
  23587. }, e.prototype._updateCenterAndZoom = function () {
  23588. var t = this._rawTransformable.getLocalTransform(),
  23589. e = this._roamTransformable,
  23590. n = this.getDefaultCenter(),
  23591. i = this.getCenter(),
  23592. r = this.getZoom();
  23593. i = Wt([], i, t), n = Wt([], n, t), e.originX = i[0], e.originY = i[1], e.x = n[0] - i[0], e.y = n[1] - i[1], e.scaleX = e.scaleY = r, this._updateTransform()
  23594. }, e.prototype._updateTransform = function () {
  23595. var t = this._roamTransformable,
  23596. e = this._rawTransformable;
  23597. e.parent = t, t.updateTransform(), e.updateTransform(), _e(this.transform || (this.transform = []), e.transform || [1, 0, 0, 1, 0, 0]), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], Ie(this.invTransform, this.transform), this.decomposeTransform()
  23598. }, e.prototype.getTransformInfo = function () {
  23599. var t = this._rawTransformable,
  23600. e = this._roamTransformable,
  23601. n = new vr;
  23602. return n.transform = e.transform, n.decomposeTransform(), {
  23603. roam: {
  23604. x: n.x,
  23605. y: n.y,
  23606. scaleX: n.scaleX,
  23607. scaleY: n.scaleY
  23608. },
  23609. raw: {
  23610. x: t.x,
  23611. y: t.y,
  23612. scaleX: t.scaleX,
  23613. scaleY: t.scaleY
  23614. }
  23615. }
  23616. }, e.prototype.getViewRect = function () {
  23617. return this._viewRect
  23618. }, e.prototype.getViewRectAfterRoam = function () {
  23619. var t = this.getBoundingRect().clone();
  23620. return t.applyTransform(this.transform), t
  23621. }, e.prototype.dataToPoint = function (t, e, n) {
  23622. var i = e ? this._rawTransform : this.transform;
  23623. return n = n || [], i ? hC(n, t, i) : It(n, t)
  23624. }, e.prototype.pointToData = function (t) {
  23625. var e = this.invTransform;
  23626. return e ? hC([], t, e) : [t[0], t[1]]
  23627. }, e.prototype.convertToPixel = function (t, e, n) {
  23628. var i = pC(e);
  23629. return i === this ? i.dataToPoint(n) : null
  23630. }, e.prototype.convertFromPixel = function (t, e, n) {
  23631. var i = pC(e);
  23632. return i === this ? i.pointToData(n) : null
  23633. }, e.prototype.containPoint = function (t) {
  23634. return this.getViewRectAfterRoam().contain(t[0], t[1])
  23635. }, e.dimensions = ["x", "y"], e
  23636. }(vr);
  23637. function pC(t) {
  23638. var e = t.seriesModel;
  23639. return e ? e.coordinateSystem : null
  23640. }
  23641. var dC = {
  23642. geoJSON: {
  23643. aspectScale: .75,
  23644. invertLongitute: !0
  23645. },
  23646. geoSVG: {
  23647. aspectScale: 1,
  23648. invertLongitute: !1
  23649. }
  23650. },
  23651. fC = ["lng", "lat"],
  23652. gC = function (t) {
  23653. function e(e, n, i) {
  23654. var r = t.call(this, e) || this;
  23655. r.dimensions = fC, r.type = "geo", r._nameCoordMap = yt(), r.map = n;
  23656. var o, a = i.projection,
  23657. s = XT(n, i.nameMap, i.nameProperty),
  23658. l = HT(n),
  23659. u = (r.resourceType = l ? l.type : null, r.regions = s.regions),
  23660. h = dC[l.type];
  23661. if (r._regionsMap = s.regionsMap, r.regions = s.regions, r.projection = a, a)
  23662. for (var c = 0; c < u.length; c++) {
  23663. var p = u[c].getBoundingRect(a);
  23664. (o = o || p.clone()).union(p)
  23665. } else o = s.boundingRect;
  23666. return r.setBoundingRect(o.x, o.y, o.width, o.height), r.aspectScale = a ? 1 : rt(i.aspectScale, h.aspectScale), r._invertLongitute = !a && h.invertLongitute, r
  23667. }
  23668. return n(e, t), e.prototype._transformTo = function (t, e, n, i) {
  23669. var r = this.getBoundingRect(),
  23670. o = this._invertLongitute;
  23671. r = r.clone(), o && (r.y = -r.y - r.height);
  23672. var a = this._rawTransformable;
  23673. a.transform = r.calculateTransform(new ze(t, e, n, i));
  23674. var s = a.parent;
  23675. a.parent = null, a.decomposeTransform(), a.parent = s, o && (a.scaleY = -a.scaleY), this._updateTransform()
  23676. }, e.prototype.getRegion = function (t) {
  23677. return this._regionsMap.get(t)
  23678. }, e.prototype.getRegionByCoord = function (t) {
  23679. for (var e = this.regions, n = 0; n < e.length; n++) {
  23680. var i = e[n];
  23681. if ("geoJSON" === i.type && i.contain(t)) return e[n]
  23682. }
  23683. }, e.prototype.addGeoCoord = function (t, e) {
  23684. this._nameCoordMap.set(t, e)
  23685. }, e.prototype.getGeoCoord = function (t) {
  23686. var e = this._regionsMap.get(t);
  23687. return this._nameCoordMap.get(t) || e && e.getCenter()
  23688. }, e.prototype.dataToPoint = function (t, e, n) {
  23689. if (U(t) && (t = this.getGeoCoord(t)), t) {
  23690. var i = this.projection;
  23691. return i && (t = i.project(t)), t && this.projectedToPoint(t, e, n)
  23692. }
  23693. }, e.prototype.pointToData = function (t) {
  23694. var e = this.projection;
  23695. return e && (t = e.unproject(t)), t && this.pointToProjected(t)
  23696. }, e.prototype.pointToProjected = function (e) {
  23697. return t.prototype.pointToData.call(this, e)
  23698. }, e.prototype.projectedToPoint = function (e, n, i) {
  23699. return t.prototype.dataToPoint.call(this, e, n, i)
  23700. }, e.prototype.convertToPixel = function (t, e, n) {
  23701. var i = yC(e);
  23702. return i === this ? i.dataToPoint(n) : null
  23703. }, e.prototype.convertFromPixel = function (t, e, n) {
  23704. var i = yC(e);
  23705. return i === this ? i.pointToData(n) : null
  23706. }, e
  23707. }(cC);
  23708. function yC(t) {
  23709. var e = t.geoModel,
  23710. n = t.seriesModel;
  23711. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Wo).models[0] || {}).coordinateSystem : null
  23712. }
  23713. function vC(t, e) {
  23714. var n = t.get("boundingCoords");
  23715. if (null != n) {
  23716. var i = n[0],
  23717. r = n[1];
  23718. if (isFinite(i[0]) && isFinite(i[1]) && isFinite(r[0]) && isFinite(r[1])) {
  23719. var o = this.projection;
  23720. if (o) {
  23721. var a = i[0],
  23722. s = i[1],
  23723. l = r[0],
  23724. u = r[1];
  23725. i = [1 / 0, 1 / 0], r = [-1 / 0, -1 / 0];
  23726. var h = function (t, e, n, a) {
  23727. for (var s = n - t, l = a - e, u = 0; u <= 100; u++) {
  23728. var h = u / 100,
  23729. c = o.project([t + s * h, e + l * h]);
  23730. Ht(i, i, c), Yt(r, r, c)
  23731. }
  23732. };
  23733. h(a, s, l, s), h(l, s, l, u), h(l, u, a, u), h(a, u, l, s)
  23734. }
  23735. this.setBoundingRect(i[0], i[1], r[0] - i[0], r[1] - i[1])
  23736. } else 0
  23737. }
  23738. var c, p, d, f = this.getBoundingRect(),
  23739. g = t.get("layoutCenter"),
  23740. y = t.get("layoutSize"),
  23741. v = e.getWidth(),
  23742. m = e.getHeight(),
  23743. x = f.width / f.height * this.aspectScale,
  23744. _ = !1;
  23745. if (g && y && (c = [$r(g[0], v), $r(g[1], m)], p = $r(y, Math.min(v, m)), isNaN(c[0]) || isNaN(c[1]) || isNaN(p) || (_ = !0)), _) d = {}, x > 1 ? (d.width = p, d.height = p / x) : (d.height = p, d.width = p * x), d.y = c[1] - d.height / 2, d.x = c[0] - d.width / 2;
  23746. else {
  23747. var b = t.getBoxLayoutParams();
  23748. b.aspect = x, d = kp(b, {
  23749. width: v,
  23750. height: m
  23751. })
  23752. }
  23753. this.setViewRect(d.x, d.y, d.width, d.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"))
  23754. }
  23755. R(gC, cC);
  23756. var mC = function () {
  23757. function t() {
  23758. this.dimensions = fC
  23759. }
  23760. return t.prototype.create = function (t, e) {
  23761. var n = [];
  23762. function i(t) {
  23763. return {
  23764. nameProperty: t.get("nameProperty"),
  23765. aspectScale: t.get("aspectScale"),
  23766. projection: t.get("projection")
  23767. }
  23768. }
  23769. t.eachComponent("geo", (function (t, r) {
  23770. var o = t.get("map"),
  23771. a = new gC(o + r, o, A({
  23772. nameMap: t.get("nameMap")
  23773. }, i(t)));
  23774. a.zoomLimit = t.get("scaleLimit"), n.push(a), t.coordinateSystem = a, a.model = t, a.resize = vC, a.resize(t, e)
  23775. })), t.eachSeries((function (t) {
  23776. if ("geo" === t.get("coordinateSystem")) {
  23777. var e = t.get("geoIndex") || 0;
  23778. t.coordinateSystem = n[e]
  23779. }
  23780. }));
  23781. var r = {};
  23782. return t.eachSeriesByType("map", (function (t) {
  23783. if (!t.getHostGeoModel()) {
  23784. var e = t.getMapType();
  23785. r[e] = r[e] || [], r[e].push(t)
  23786. }
  23787. })), E(r, (function (t, r) {
  23788. var o = z(t, (function (t) {
  23789. return t.get("nameMap")
  23790. })),
  23791. a = new gC(r, r, A({
  23792. nameMap: D(o)
  23793. }, i(t[0])));
  23794. a.zoomLimit = it.apply(null, z(t, (function (t) {
  23795. return t.get("scaleLimit")
  23796. }))), n.push(a), a.resize = vC, a.resize(t[0], e), E(t, (function (t) {
  23797. t.coordinateSystem = a,
  23798. function (t, e) {
  23799. E(e.get("geoCoord"), (function (e, n) {
  23800. t.addGeoCoord(n, e)
  23801. }))
  23802. }(a, t)
  23803. }))
  23804. })), n
  23805. }, t.prototype.getFilledRegions = function (t, e, n, i) {
  23806. for (var r = (t || []).slice(), o = yt(), a = 0; a < r.length; a++) o.set(r[a].name, r[a]);
  23807. return E(XT(e, n, i).regions, (function (t) {
  23808. var e = t.name;
  23809. !o.get(e) && r.push({
  23810. name: e
  23811. })
  23812. })), r
  23813. }, t
  23814. }(),
  23815. xC = new mC,
  23816. _C = function (t) {
  23817. function e() {
  23818. var n = null !== t && t.apply(this, arguments) || this;
  23819. return n.type = e.type, n
  23820. }
  23821. return n(e, t), e.prototype.init = function (t, e, n) {
  23822. var i = HT(t.map);
  23823. if (i && "geoJSON" === i.type) {
  23824. var r = t.itemStyle = t.itemStyle || {};
  23825. "color" in r || (r.color = "#eee")
  23826. }
  23827. this.mergeDefaultAndTheme(t, n), Co(t, "label", ["show"])
  23828. }, e.prototype.optionUpdated = function () {
  23829. var t = this,
  23830. e = this.option;
  23831. e.regions = xC.getFilledRegions(e.regions, e.map, e.nameMap, e.nameProperty);
  23832. var n = {};
  23833. this._optionModelMap = V(e.regions || [], (function (e, i) {
  23834. var r = i.name;
  23835. return r && (e.set(r, new Cc(i, t, t.ecModel)), i.selected && (n[r] = !0)), e
  23836. }), yt()), e.selectedMap || (e.selectedMap = n)
  23837. }, e.prototype.getRegionModel = function (t) {
  23838. return this._optionModelMap.get(t) || new Cc(null, this, this.ecModel)
  23839. }, e.prototype.getFormattedLabel = function (t, e) {
  23840. var n = this.getRegionModel(t),
  23841. i = "normal" === e ? n.get(["label", "formatter"]) : n.get(["emphasis", "label", "formatter"]),
  23842. r = {
  23843. name: t
  23844. };
  23845. return X(i) ? (r.status = e, i(r)) : U(i) ? i.replace("{a}", null != t ? t : "") : void 0
  23846. }, e.prototype.setZoom = function (t) {
  23847. this.option.zoom = t
  23848. }, e.prototype.setCenter = function (t) {
  23849. this.option.center = t
  23850. }, e.prototype.select = function (t) {
  23851. var e = this.option,
  23852. n = e.selectedMode;
  23853. n && ("multiple" !== n && (e.selectedMap = null), (e.selectedMap || (e.selectedMap = {}))[t] = !0)
  23854. }, e.prototype.unSelect = function (t) {
  23855. var e = this.option.selectedMap;
  23856. e && (e[t] = !1)
  23857. }, e.prototype.toggleSelected = function (t) {
  23858. this[this.isSelected(t) ? "unSelect" : "select"](t)
  23859. }, e.prototype.isSelected = function (t) {
  23860. var e = this.option.selectedMap;
  23861. return !(!e || !e[t])
  23862. }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
  23863. z: 0,
  23864. show: !0,
  23865. left: "center",
  23866. top: "center",
  23867. aspectScale: null,
  23868. silent: !1,
  23869. map: "",
  23870. boundingCoords: null,
  23871. center: null,
  23872. zoom: 1,
  23873. scaleLimit: null,
  23874. label: {
  23875. show: !1,
  23876. color: "#000"
  23877. },
  23878. itemStyle: {
  23879. borderWidth: .5,
  23880. borderColor: "#444"
  23881. },
  23882. emphasis: {
  23883. label: {
  23884. show: !0,
  23885. color: "rgb(100,0,0)"
  23886. },
  23887. itemStyle: {
  23888. color: "rgba(255,215,0,0.8)"
  23889. }
  23890. },
  23891. select: {
  23892. label: {
  23893. show: !0,
  23894. color: "rgb(100,0,0)"
  23895. },
  23896. itemStyle: {
  23897. color: "rgba(255,215,0,0.8)"
  23898. }
  23899. },
  23900. regions: []
  23901. }, e
  23902. }(zp);
  23903. function bC(t, e) {
  23904. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e)
  23905. }
  23906. function wC(t, e, n, i) {
  23907. var r = t.getZoom(),
  23908. o = t.getCenter(),
  23909. a = e.zoom,
  23910. s = t.projectedToPoint ? t.projectedToPoint(o) : t.dataToPoint(o);
  23911. if (null != e.dx && null != e.dy && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(bC(t, s), i)), null != a) {
  23912. if (n) {
  23913. var l = n.min || 0,
  23914. u = n.max || 1 / 0;
  23915. a = Math.max(Math.min(r * a, u), l) / r
  23916. }
  23917. t.scaleX *= a, t.scaleY *= a;
  23918. var h = (e.originX - t.x) * (a - 1),
  23919. c = (e.originY - t.y) * (a - 1);
  23920. t.x -= h, t.y -= c, t.updateTransform(), t.setCenter(bC(t, s), i), t.setZoom(a * r)
  23921. }
  23922. return {
  23923. center: t.getCenter(),
  23924. zoom: t.getZoom()
  23925. }
  23926. }
  23927. var SC = function (t) {
  23928. function e() {
  23929. var n = null !== t && t.apply(this, arguments) || this;
  23930. return n.type = e.type, n.focusBlurEnabled = !0, n
  23931. }
  23932. return n(e, t), e.prototype.init = function (t, e) {
  23933. this._api = e
  23934. }, e.prototype.render = function (t, e, n, i) {
  23935. if (this._model = t, !t.get("show")) return this._mapDraw && this._mapDraw.remove(), void(this._mapDraw = null);
  23936. this._mapDraw || (this._mapDraw = new QT(n));
  23937. var r = this._mapDraw;
  23938. r.draw(t, e, n, this, i), r.group.on("click", this._handleRegionClick, this), r.group.silent = t.get("silent"), this.group.add(r.group), this.updateSelectStatus(t, e, n)
  23939. }, e.prototype._handleRegionClick = function (t) {
  23940. var e;
  23941. Oy(t.target, (function (t) {
  23942. return null != (e = rl(t).eventData)
  23943. }), !0), e && this._api.dispatchAction({
  23944. type: "geoToggleSelect",
  23945. geoId: this._model.id,
  23946. name: e.name
  23947. })
  23948. }, e.prototype.updateSelectStatus = function (t, e, n) {
  23949. var i = this;
  23950. this._mapDraw.group.traverse((function (t) {
  23951. var e = rl(t).eventData;
  23952. if (e) return i._model.isSelected(e.name) ? n.enterSelect(t) : n.leaveSelect(t), !0
  23953. }))
  23954. }, e.prototype.findHighDownDispatchers = function (t) {
  23955. return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model)
  23956. }, e.prototype.dispose = function () {
  23957. this._mapDraw && this._mapDraw.remove()
  23958. }, e.type = "geo", e
  23959. }(Ag);
  23960. function MC(t, e, n) {
  23961. WT(t, e, n)
  23962. }
  23963. function IC(t) {
  23964. function e(e, n) {
  23965. n.update = "geo:updateSelectStatus", t.registerAction(n, (function (t, n) {
  23966. var i = {},
  23967. r = [];
  23968. return n.eachComponent({
  23969. mainType: "geo",
  23970. query: t
  23971. }, (function (n) {
  23972. n[e](t.name), E(n.coordinateSystem.regions, (function (t) {
  23973. i[t.name] = n.isSelected(t.name) || !1
  23974. }));
  23975. var o = [];
  23976. E(i, (function (t, e) {
  23977. i[e] && o.push(e)
  23978. })), r.push({
  23979. geoIndex: n.componentIndex,
  23980. name: o
  23981. })
  23982. })), {
  23983. selected: i,
  23984. allSelected: r,
  23985. name: t.name
  23986. }
  23987. }))
  23988. }
  23989. t.registerCoordinateSystem("geo", xC), t.registerComponentModel(_C), t.registerComponentView(SC), t.registerImpl("registerMap", MC), t.registerImpl("getMap", (function (t) {
  23990. return YT(t)
  23991. })), e("toggleSelected", {
  23992. type: "geoToggleSelect",
  23993. event: "geoselectchanged"
  23994. }), e("select", {
  23995. type: "geoSelect",
  23996. event: "geoselected"
  23997. }), e("unSelect", {
  23998. type: "geoUnSelect",
  23999. event: "geounselected"
  24000. }), t.registerAction({
  24001. type: "geoRoam",
  24002. event: "geoRoam",
  24003. update: "updateTransform"
  24004. }, (function (t, e, n) {
  24005. var i = t.componentType || "series";
  24006. e.eachComponent({
  24007. mainType: i,
  24008. query: t
  24009. }, (function (e) {
  24010. var r = e.coordinateSystem;
  24011. if ("geo" === r.type) {
  24012. var o = wC(r, t, e.get("scaleLimit"), n);
  24013. e.setCenter && e.setCenter(o.center), e.setZoom && e.setZoom(o.zoom), "series" === i && E(e.seriesGroup, (function (t) {
  24014. t.setCenter(o.center), t.setZoom(o.zoom)
  24015. }))
  24016. }
  24017. }))
  24018. }))
  24019. }
  24020. function TC(t, e) {
  24021. var n = t.isExpand ? t.children : [],
  24022. i = t.parentNode.children,
  24023. r = t.hierNode.i ? i[t.hierNode.i - 1] : null;
  24024. if (n.length) {
  24025. ! function (t) {
  24026. var e = t.children,
  24027. n = e.length,
  24028. i = 0,
  24029. r = 0;
  24030. for (; --n >= 0;) {
  24031. var o = e[n];
  24032. o.hierNode.prelim += i, o.hierNode.modifier += i, r += o.hierNode.change, i += o.hierNode.shift + r
  24033. }
  24034. }(t);
  24035. var o = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  24036. r ? (t.hierNode.prelim = r.hierNode.prelim + e(t, r), t.hierNode.modifier = t.hierNode.prelim - o) : t.hierNode.prelim = o
  24037. } else r && (t.hierNode.prelim = r.hierNode.prelim + e(t, r));
  24038. t.parentNode.hierNode.defaultAncestor = function (t, e, n, i) {
  24039. if (e) {
  24040. for (var r = t, o = t, a = o.parentNode.children[0], s = e, l = r.hierNode.modifier, u = o.hierNode.modifier, h = a.hierNode.modifier, c = s.hierNode.modifier; s = kC(s), o = LC(o), s && o;) {
  24041. r = kC(r), a = LC(a), r.hierNode.ancestor = t;
  24042. var p = s.hierNode.prelim + c - o.hierNode.prelim - u + i(s, o);
  24043. p > 0 && (OC(PC(s, t, n), t, p), u += p, l += p), c += s.hierNode.modifier, u += o.hierNode.modifier, l += r.hierNode.modifier, h += a.hierNode.modifier
  24044. }
  24045. s && !kC(r) && (r.hierNode.thread = s, r.hierNode.modifier += c - l), o && !LC(a) && (a.hierNode.thread = o, a.hierNode.modifier += u - h, n = t)
  24046. }
  24047. return n
  24048. }(t, r, t.parentNode.hierNode.defaultAncestor || i[0], e)
  24049. }
  24050. function CC(t) {
  24051. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  24052. t.setLayout({
  24053. x: e
  24054. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier
  24055. }
  24056. function DC(t) {
  24057. return arguments.length ? t : RC
  24058. }
  24059. function AC(t, e) {
  24060. return t -= Math.PI / 2, {
  24061. x: e * Math.cos(t),
  24062. y: e * Math.sin(t)
  24063. }
  24064. }
  24065. function kC(t) {
  24066. var e = t.children;
  24067. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread
  24068. }
  24069. function LC(t) {
  24070. var e = t.children;
  24071. return e.length && t.isExpand ? e[0] : t.hierNode.thread
  24072. }
  24073. function PC(t, e, n) {
  24074. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n
  24075. }
  24076. function OC(t, e, n) {
  24077. var i = n / (e.hierNode.i - t.hierNode.i);
  24078. e.hierNode.change -= i, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += i
  24079. }
  24080. function RC(t, e) {
  24081. return t.parentNode === e.parentNode ? 1 : 2
  24082. }
  24083. var NC = function () {
  24084. this.parentPoint = [], this.childPoints = []
  24085. },
  24086. EC = function (t) {
  24087. function e(e) {
  24088. return t.call(this, e) || this
  24089. }
  24090. return n(e, t), e.prototype.getDefaultStyle = function () {
  24091. return {
  24092. stroke: "#000",
  24093. fill: null
  24094. }
  24095. }, e.prototype.getDefaultShape = function () {
  24096. return new NC
  24097. }, e.prototype.buildPath = function (t, e) {
  24098. var n = e.childPoints,
  24099. i = n.length,
  24100. r = e.parentPoint,
  24101. o = n[0],
  24102. a = n[i - 1];
  24103. if (1 === i) return t.moveTo(r[0], r[1]), void t.lineTo(o[0], o[1]);
  24104. var s = e.orient,
  24105. l = "TB" === s || "BT" === s ? 0 : 1,
  24106. u = 1 - l,
  24107. h = $r(e.forkPosition, 1),
  24108. c = [];
  24109. c[l] = r[l], c[u] = r[u] + (a[u] - r[u]) * h, t.moveTo(r[0], r[1]), t.lineTo(c[0], c[1]), t.moveTo(o[0], o[1]), c[l] = o[l], t.lineTo(c[0], c[1]), c[l] = a[l], t.lineTo(c[0], c[1]), t.lineTo(a[0], a[1]);
  24110. for (var p = 1; p < i - 1; p++) {
  24111. var d = n[p];
  24112. t.moveTo(d[0], d[1]), c[l] = d[l], t.lineTo(c[0], c[1])
  24113. }
  24114. }, e
  24115. }(ks),
  24116. zC = function (t) {
  24117. function e() {
  24118. var n = null !== t && t.apply(this, arguments) || this;
  24119. return n.type = e.type, n._mainGroup = new Br, n
  24120. }
  24121. return n(e, t), e.prototype.init = function (t, e) {
  24122. this._controller = new tT(e.getZr()), this._controllerHost = {
  24123. target: this.group
  24124. }, this.group.add(this._mainGroup)
  24125. }, e.prototype.render = function (t, e, n) {
  24126. var i = t.getData(),
  24127. r = t.layoutInfo,
  24128. o = this._mainGroup;
  24129. "radial" === t.get("layout") ? (o.x = r.x + r.width / 2, o.y = r.y + r.height / 2) : (o.x = r.x, o.y = r.y), this._updateViewCoordSys(t, n), this._updateController(t, e, n);
  24130. var a = this._data;
  24131. i.diff(a).add((function (e) {
  24132. VC(i, e) && BC(i, e, null, o, t)
  24133. })).update((function (e, n) {
  24134. var r = a.getItemGraphicEl(n);
  24135. VC(i, e) ? BC(i, e, r, o, t) : r && WC(a, n, r, o, t)
  24136. })).remove((function (e) {
  24137. var n = a.getItemGraphicEl(e);
  24138. n && WC(a, e, n, o, t)
  24139. })).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), !0 === t.get("expandAndCollapse") && i.eachItemGraphicEl((function (e, i) {
  24140. e.off("click").on("click", (function () {
  24141. n.dispatchAction({
  24142. type: "treeExpandAndCollapse",
  24143. seriesId: t.id,
  24144. dataIndex: i
  24145. })
  24146. }))
  24147. })), this._data = i
  24148. }, e.prototype._updateViewCoordSys = function (t, e) {
  24149. var n = t.getData(),
  24150. i = [];
  24151. n.each((function (t) {
  24152. var e = n.getItemLayout(t);
  24153. !e || isNaN(e.x) || isNaN(e.y) || i.push([+e.x, +e.y])
  24154. }));
  24155. var r = [],
  24156. o = [];
  24157. Ba(i, r, o);
  24158. var a = this._min,
  24159. s = this._max;
  24160. o[0] - r[0] == 0 && (r[0] = a ? a[0] : r[0] - 1, o[0] = s ? s[0] : o[0] + 1), o[1] - r[1] == 0 && (r[1] = a ? a[1] : r[1] - 1, o[1] = s ? s[1] : o[1] + 1);
  24161. var l = t.coordinateSystem = new cC;
  24162. l.zoomLimit = t.get("scaleLimit"), l.setBoundingRect(r[0], r[1], o[0] - r[0], o[1] - r[1]), l.setCenter(t.get("center"), e), l.setZoom(t.get("zoom")), this.group.attr({
  24163. x: l.x,
  24164. y: l.y,
  24165. scaleX: l.scaleX,
  24166. scaleY: l.scaleY
  24167. }), this._min = r, this._max = o
  24168. }, e.prototype._updateController = function (t, e, n) {
  24169. var i = this,
  24170. r = this._controller,
  24171. o = this._controllerHost,
  24172. a = this.group;
  24173. r.setPointerChecker((function (e, i, r) {
  24174. var o = a.getBoundingRect();
  24175. return o.applyTransform(a.transform), o.contain(i, r) && !lT(e, n, t)
  24176. })), r.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), r.off("pan").off("zoom").on("pan", (function (e) {
  24177. rT(o, e.dx, e.dy), n.dispatchAction({
  24178. seriesId: t.id,
  24179. type: "treeRoam",
  24180. dx: e.dx,
  24181. dy: e.dy
  24182. })
  24183. })).on("zoom", (function (e) {
  24184. oT(o, e.scale, e.originX, e.originY), n.dispatchAction({
  24185. seriesId: t.id,
  24186. type: "treeRoam",
  24187. zoom: e.scale,
  24188. originX: e.originX,
  24189. originY: e.originY
  24190. }), i._updateNodeAndLinkScale(t), n.updateLabelLayout()
  24191. }))
  24192. }, e.prototype._updateNodeAndLinkScale = function (t) {
  24193. var e = t.getData(),
  24194. n = this._getNodeGlobalScale(t);
  24195. e.eachItemGraphicEl((function (t, e) {
  24196. t.setSymbolScale(n)
  24197. }))
  24198. }, e.prototype._getNodeGlobalScale = function (t) {
  24199. var e = t.coordinateSystem;
  24200. if ("view" !== e.type) return 1;
  24201. var n = this._nodeScaleRatio,
  24202. i = e.scaleX || 1;
  24203. return ((e.getZoom() - 1) * n + 1) / i
  24204. }, e.prototype.dispose = function () {
  24205. this._controller && this._controller.dispose(), this._controllerHost = null
  24206. }, e.prototype.remove = function () {
  24207. this._mainGroup.removeAll(), this._data = null
  24208. }, e.type = "tree", e
  24209. }(Og);
  24210. function VC(t, e) {
  24211. var n = t.getItemLayout(e);
  24212. return n && !isNaN(n.x) && !isNaN(n.y)
  24213. }
  24214. function BC(t, e, n, i, r) {
  24215. var o = !n,
  24216. a = t.tree.getNodeByDataIndex(e),
  24217. s = a.getModel(),
  24218. l = a.getVisual("style").fill,
  24219. u = !1 === a.isExpand && 0 !== a.children.length ? l : "#fff",
  24220. h = t.tree.root,
  24221. c = a.parentNode === h ? a : a.parentNode || a,
  24222. p = t.getItemGraphicEl(c.dataIndex),
  24223. d = c.getLayout(),
  24224. f = p ? {
  24225. x: p.__oldX,
  24226. y: p.__oldY,
  24227. rawX: p.__radialOldRawX,
  24228. rawY: p.__radialOldRawY
  24229. } : d,
  24230. g = a.getLayout();
  24231. o ? ((n = new dS(t, e, null, {
  24232. symbolInnerColor: u,
  24233. useNameLabel: !0
  24234. })).x = f.x, n.y = f.y) : n.updateData(t, e, null, {
  24235. symbolInnerColor: u,
  24236. useNameLabel: !0
  24237. }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = g.rawX, n.__radialRawY = g.rawY, i.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, vh(n, {
  24238. x: g.x,
  24239. y: g.y
  24240. }, r);
  24241. var y = n.getSymbolPath();
  24242. if ("radial" === r.get("layout")) {
  24243. var v = h.children[0],
  24244. m = v.getLayout(),
  24245. x = v.children.length,
  24246. _ = void 0,
  24247. b = void 0;
  24248. if (g.x === m.x && !0 === a.isExpand && v.children.length) {
  24249. var w = {
  24250. x: (v.children[0].getLayout().x + v.children[x - 1].getLayout().x) / 2,
  24251. y: (v.children[0].getLayout().y + v.children[x - 1].getLayout().y) / 2
  24252. };
  24253. (_ = Math.atan2(w.y - m.y, w.x - m.x)) < 0 && (_ = 2 * Math.PI + _), (b = w.x < m.x) && (_ -= Math.PI)
  24254. } else(_ = Math.atan2(g.y - m.y, g.x - m.x)) < 0 && (_ = 2 * Math.PI + _), 0 === a.children.length || 0 !== a.children.length && !1 === a.isExpand ? (b = g.x < m.x) && (_ -= Math.PI) : (b = g.x > m.x) || (_ -= Math.PI);
  24255. var S = b ? "left" : "right",
  24256. M = s.getModel("label"),
  24257. I = M.get("rotate"),
  24258. T = I * (Math.PI / 180),
  24259. C = y.getTextContent();
  24260. C && (y.setTextConfig({
  24261. position: M.get("position") || S,
  24262. rotation: null == I ? -_ : T,
  24263. origin: "center"
  24264. }), C.setStyle("verticalAlign", "middle"))
  24265. }
  24266. var D = s.get(["emphasis", "focus"]),
  24267. A = "relative" === D ? vt(a.getAncestorsIndices(), a.getDescendantIndices()) : "ancestor" === D ? a.getAncestorsIndices() : "descendant" === D ? a.getDescendantIndices() : null;
  24268. A && (rl(n).focus = A),
  24269. function (t, e, n, i, r, o, a, s) {
  24270. var l = e.getModel(),
  24271. u = t.get("edgeShape"),
  24272. h = t.get("layout"),
  24273. c = t.getOrient(),
  24274. p = t.get(["lineStyle", "curveness"]),
  24275. d = t.get("edgeForkPosition"),
  24276. f = l.getModel("lineStyle").getLineStyle(),
  24277. g = i.__edge;
  24278. if ("curve" === u) e.parentNode && e.parentNode !== n && (g || (g = i.__edge = new th({
  24279. shape: HC(h, c, p, r, r)
  24280. })), vh(g, {
  24281. shape: HC(h, c, p, o, a)
  24282. }, t));
  24283. else if ("polyline" === u)
  24284. if ("orthogonal" === h) {
  24285. if (e !== n && e.children && 0 !== e.children.length && !0 === e.isExpand) {
  24286. for (var y = e.children, v = [], m = 0; m < y.length; m++) {
  24287. var x = y[m].getLayout();
  24288. v.push([x.x, x.y])
  24289. }
  24290. g || (g = i.__edge = new EC({
  24291. shape: {
  24292. parentPoint: [a.x, a.y],
  24293. childPoints: [
  24294. [a.x, a.y]
  24295. ],
  24296. orient: c,
  24297. forkPosition: d
  24298. }
  24299. })), vh(g, {
  24300. shape: {
  24301. parentPoint: [a.x, a.y],
  24302. childPoints: v
  24303. }
  24304. }, t)
  24305. }
  24306. } else 0;
  24307. g && ("polyline" !== u || e.isExpand) && (g.useStyle(k({
  24308. strokeNoScale: !0,
  24309. fill: null
  24310. }, f)), $l(g, l, "lineStyle"), kl(g), s.add(g))
  24311. }(r, a, h, n, f, d, g, i), n.__edge && (n.onHoverStateChange = function (e) {
  24312. if ("blur" !== e) {
  24313. var i = a.parentNode && t.getItemGraphicEl(a.parentNode.dataIndex);
  24314. i && 1 === i.hoverState || Dl(n.__edge, e)
  24315. }
  24316. })
  24317. }
  24318. function FC(t, e, n, i, r) {
  24319. var o = GC(e.tree.root, t),
  24320. a = o.source,
  24321. s = o.sourceLayout,
  24322. l = e.getItemGraphicEl(t.dataIndex);
  24323. if (l) {
  24324. var u = e.getItemGraphicEl(a.dataIndex).__edge,
  24325. h = l.__edge || (!1 === a.isExpand || 1 === a.children.length ? u : void 0),
  24326. c = i.get("edgeShape"),
  24327. p = i.get("layout"),
  24328. d = i.get("orient"),
  24329. f = i.get(["lineStyle", "curveness"]);
  24330. h && ("curve" === c ? _h(h, {
  24331. shape: HC(p, d, f, s, s),
  24332. style: {
  24333. opacity: 0
  24334. }
  24335. }, i, {
  24336. cb: function () {
  24337. n.remove(h)
  24338. },
  24339. removeOpt: r
  24340. }) : "polyline" === c && "orthogonal" === i.get("layout") && _h(h, {
  24341. shape: {
  24342. parentPoint: [s.x, s.y],
  24343. childPoints: [
  24344. [s.x, s.y]
  24345. ]
  24346. },
  24347. style: {
  24348. opacity: 0
  24349. }
  24350. }, i, {
  24351. cb: function () {
  24352. n.remove(h)
  24353. },
  24354. removeOpt: r
  24355. }))
  24356. }
  24357. }
  24358. function GC(t, e) {
  24359. for (var n, i = e.parentNode === t ? e : e.parentNode || e; null == (n = i.getLayout());) i = i.parentNode === t ? i : i.parentNode || i;
  24360. return {
  24361. source: i,
  24362. sourceLayout: n
  24363. }
  24364. }
  24365. function WC(t, e, n, i, r) {
  24366. var o = t.tree.getNodeByDataIndex(e),
  24367. a = GC(t.tree.root, o).sourceLayout,
  24368. s = {
  24369. duration: r.get("animationDurationUpdate"),
  24370. easing: r.get("animationEasingUpdate")
  24371. };
  24372. _h(n, {
  24373. x: a.x + 1,
  24374. y: a.y + 1
  24375. }, r, {
  24376. cb: function () {
  24377. i.remove(n), t.setItemGraphicEl(e, null)
  24378. },
  24379. removeOpt: s
  24380. }), n.fadeOut(null, t.hostModel, {
  24381. fadeLabel: !0,
  24382. animation: s
  24383. }), o.children.forEach((function (e) {
  24384. FC(e, t, i, r, s)
  24385. })), FC(o, t, i, r, s)
  24386. }
  24387. function HC(t, e, n, i, r) {
  24388. var o, a, s, l, u, h, c, p;
  24389. if ("radial" === t) {
  24390. u = i.rawX, c = i.rawY, h = r.rawX, p = r.rawY;
  24391. var d = AC(u, c),
  24392. f = AC(u, c + (p - c) * n),
  24393. g = AC(h, p + (c - p) * n),
  24394. y = AC(h, p);
  24395. return {
  24396. x1: d.x || 0,
  24397. y1: d.y || 0,
  24398. x2: y.x || 0,
  24399. y2: y.y || 0,
  24400. cpx1: f.x || 0,
  24401. cpy1: f.y || 0,
  24402. cpx2: g.x || 0,
  24403. cpy2: g.y || 0
  24404. }
  24405. }
  24406. return u = i.x, c = i.y, h = r.x, p = r.y, "LR" !== e && "RL" !== e || (o = u + (h - u) * n, a = c, s = h + (u - h) * n, l = p), "TB" !== e && "BT" !== e || (o = u, a = c + (p - c) * n, s = h, l = p + (c - p) * n), {
  24407. x1: u,
  24408. y1: c,
  24409. x2: h,
  24410. y2: p,
  24411. cpx1: o,
  24412. cpy1: a,
  24413. cpx2: s,
  24414. cpy2: l
  24415. }
  24416. }
  24417. var YC = Vo();
  24418. function XC(t) {
  24419. var e = t.mainData,
  24420. n = t.datas;
  24421. n || (n = {
  24422. main: e
  24423. }, t.datasAttr = {
  24424. main: "data"
  24425. }), t.datas = t.mainData = null, $C(e, n, t), E(n, (function (n) {
  24426. E(e.TRANSFERABLE_METHODS, (function (e) {
  24427. n.wrapMethod(e, H(UC, t))
  24428. }))
  24429. })), e.wrapMethod("cloneShallow", H(jC, t)), E(e.CHANGABLE_METHODS, (function (n) {
  24430. e.wrapMethod(n, H(ZC, t))
  24431. })), lt(n[e.dataType] === e)
  24432. }
  24433. function UC(t, e) {
  24434. if (YC(i = this).mainData === i) {
  24435. var n = A({}, YC(this).datas);
  24436. n[this.dataType] = e, $C(e, n, t)
  24437. } else JC(e, this.dataType, YC(this).mainData, t);
  24438. var i;
  24439. return e
  24440. }
  24441. function ZC(t, e) {
  24442. return t.struct && t.struct.update(), e
  24443. }
  24444. function jC(t, e) {
  24445. return E(YC(e).datas, (function (n, i) {
  24446. n !== e && JC(n.cloneShallow(), i, e, t)
  24447. })), e
  24448. }
  24449. function qC(t) {
  24450. var e = YC(this).mainData;
  24451. return null == t || null == e ? e : YC(e).datas[t]
  24452. }
  24453. function KC() {
  24454. var t = YC(this).mainData;
  24455. return null == t ? [{
  24456. data: t
  24457. }] : z(G(YC(t).datas), (function (e) {
  24458. return {
  24459. type: e,
  24460. data: YC(t).datas[e]
  24461. }
  24462. }))
  24463. }
  24464. function $C(t, e, n) {
  24465. YC(t).datas = {}, E(e, (function (e, i) {
  24466. JC(e, i, t, n)
  24467. }))
  24468. }
  24469. function JC(t, e, n, i) {
  24470. YC(n).datas[e] = t, YC(t).mainData = n, t.dataType = e, i.struct && (t[i.structAttr] = i.struct, i.struct[i.datasAttr[e]] = t), t.getLinkedData = qC, t.getLinkedDataAll = KC
  24471. }
  24472. var QC = function () {
  24473. function t(t, e) {
  24474. this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = t || "", this.hostTree = e
  24475. }
  24476. return t.prototype.isRemoved = function () {
  24477. return this.dataIndex < 0
  24478. }, t.prototype.eachNode = function (t, e, n) {
  24479. X(t) && (n = e, e = t, t = null), U(t = t || {}) && (t = {
  24480. order: t
  24481. });
  24482. var i, r = t.order || "preorder",
  24483. o = this[t.attr || "children"];
  24484. "preorder" === r && (i = e.call(n, this));
  24485. for (var a = 0; !i && a < o.length; a++) o[a].eachNode(t, e, n);
  24486. "postorder" === r && e.call(n, this)
  24487. }, t.prototype.updateDepthAndHeight = function (t) {
  24488. var e = 0;
  24489. this.depth = t;
  24490. for (var n = 0; n < this.children.length; n++) {
  24491. var i = this.children[n];
  24492. i.updateDepthAndHeight(t + 1), i.height > e && (e = i.height)
  24493. }
  24494. this.height = e + 1
  24495. }, t.prototype.getNodeById = function (t) {
  24496. if (this.getId() === t) return this;
  24497. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  24498. var r = n[e].getNodeById(t);
  24499. if (r) return r
  24500. }
  24501. }, t.prototype.contains = function (t) {
  24502. if (t === this) return !0;
  24503. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  24504. var r = n[e].contains(t);
  24505. if (r) return r
  24506. }
  24507. }, t.prototype.getAncestors = function (t) {
  24508. for (var e = [], n = t ? this : this.parentNode; n;) e.push(n), n = n.parentNode;
  24509. return e.reverse(), e
  24510. }, t.prototype.getAncestorsIndices = function () {
  24511. for (var t = [], e = this; e;) t.push(e.dataIndex), e = e.parentNode;
  24512. return t.reverse(), t
  24513. }, t.prototype.getDescendantIndices = function () {
  24514. var t = [];
  24515. return this.eachNode((function (e) {
  24516. t.push(e.dataIndex)
  24517. })), t
  24518. }, t.prototype.getValue = function (t) {
  24519. var e = this.hostTree.data;
  24520. return e.getStore().get(e.getDimensionIndex(t || "value"), this.dataIndex)
  24521. }, t.prototype.setLayout = function (t, e) {
  24522. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, t, e)
  24523. }, t.prototype.getLayout = function () {
  24524. return this.hostTree.data.getItemLayout(this.dataIndex)
  24525. }, t.prototype.getModel = function (t) {
  24526. if (!(this.dataIndex < 0)) return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)
  24527. }, t.prototype.getLevelModel = function () {
  24528. return (this.hostTree.levelModels || [])[this.depth]
  24529. }, t.prototype.setVisual = function (t, e) {
  24530. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, t, e)
  24531. }, t.prototype.getVisual = function (t) {
  24532. return this.hostTree.data.getItemVisual(this.dataIndex, t)
  24533. }, t.prototype.getRawIndex = function () {
  24534. return this.hostTree.data.getRawIndex(this.dataIndex)
  24535. }, t.prototype.getId = function () {
  24536. return this.hostTree.data.getId(this.dataIndex)
  24537. }, t.prototype.getChildIndex = function () {
  24538. if (this.parentNode) {
  24539. for (var t = this.parentNode.children, e = 0; e < t.length; ++e)
  24540. if (t[e] === this) return e;
  24541. return -1
  24542. }
  24543. return -1
  24544. }, t.prototype.isAncestorOf = function (t) {
  24545. for (var e = t.parentNode; e;) {
  24546. if (e === this) return !0;
  24547. e = e.parentNode
  24548. }
  24549. return !1
  24550. }, t.prototype.isDescendantOf = function (t) {
  24551. return t !== this && t.isAncestorOf(this)
  24552. }, t
  24553. }(),
  24554. tD = function () {
  24555. function t(t) {
  24556. this.type = "tree", this._nodes = [], this.hostModel = t
  24557. }
  24558. return t.prototype.eachNode = function (t, e, n) {
  24559. this.root.eachNode(t, e, n)
  24560. }, t.prototype.getNodeByDataIndex = function (t) {
  24561. var e = this.data.getRawIndex(t);
  24562. return this._nodes[e]
  24563. }, t.prototype.getNodeById = function (t) {
  24564. return this.root.getNodeById(t)
  24565. }, t.prototype.update = function () {
  24566. for (var t = this.data, e = this._nodes, n = 0, i = e.length; n < i; n++) e[n].dataIndex = -1;
  24567. for (n = 0, i = t.count(); n < i; n++) e[t.getRawIndex(n)].dataIndex = n
  24568. }, t.prototype.clearLayouts = function () {
  24569. this.data.clearItemLayouts()
  24570. }, t.createTree = function (e, n, i) {
  24571. var r = new t(n),
  24572. o = [],
  24573. a = 1;
  24574. ! function t(e, n) {
  24575. var i = e.value;
  24576. a = Math.max(a, Y(i) ? i.length : 1), o.push(e);
  24577. var s = new QC(Ro(e.name, ""), r);
  24578. n ? function (t, e) {
  24579. var n = e.children;
  24580. if (t.parentNode === e) return;
  24581. n.push(t), t.parentNode = e
  24582. }(s, n) : r.root = s, r._nodes.push(s);
  24583. var l = e.children;
  24584. if (l)
  24585. for (var u = 0; u < l.length; u++) t(l[u], s)
  24586. }(e), r.root.updateDepthAndHeight(0);
  24587. var s = px(o, {
  24588. coordDimensions: ["value"],
  24589. dimensionsCount: a
  24590. }).dimensions,
  24591. l = new cx(s, n);
  24592. return l.initData(o), i && i(l), XC({
  24593. mainData: l,
  24594. struct: r,
  24595. structAttr: "tree"
  24596. }), r.update(), r
  24597. }, t
  24598. }();
  24599. function eD(t, e, n) {
  24600. if (t && P(e, t.type) >= 0) {
  24601. var i = n.getData().tree.root,
  24602. r = t.targetNode;
  24603. if (U(r) && (r = i.getNodeById(r)), r && i.contains(r)) return {
  24604. node: r
  24605. };
  24606. var o = t.targetNodeId;
  24607. if (null != o && (r = i.getNodeById(o))) return {
  24608. node: r
  24609. }
  24610. }
  24611. }
  24612. function nD(t) {
  24613. for (var e = []; t;)(t = t.parentNode) && e.push(t);
  24614. return e.reverse()
  24615. }
  24616. function iD(t, e) {
  24617. return P(nD(t), e) >= 0
  24618. }
  24619. function rD(t, e) {
  24620. for (var n = []; t;) {
  24621. var i = t.dataIndex;
  24622. n.push({
  24623. name: t.name,
  24624. dataIndex: i,
  24625. value: e.getRawValue(i)
  24626. }), t = t.parentNode
  24627. }
  24628. return n.reverse(), n
  24629. }
  24630. var oD = function (t) {
  24631. function e() {
  24632. var e = null !== t && t.apply(this, arguments) || this;
  24633. return e.hasSymbolVisual = !0, e.ignoreStyleOnData = !0, e
  24634. }
  24635. return n(e, t), e.prototype.getInitialData = function (t) {
  24636. var e = {
  24637. name: t.name,
  24638. children: t.data
  24639. },
  24640. n = t.leaves || {},
  24641. i = new Cc(n, this, this.ecModel),
  24642. r = tD.createTree(e, this, (function (t) {
  24643. t.wrapMethod("getItemModel", (function (t, e) {
  24644. var n = r.getNodeByDataIndex(e);
  24645. return n && n.children.length && n.isExpand || (t.parentModel = i), t
  24646. }))
  24647. }));
  24648. var o = 0;
  24649. r.eachNode("preorder", (function (t) {
  24650. t.depth > o && (o = t.depth)
  24651. }));
  24652. var a = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : o;
  24653. return r.root.eachNode("preorder", (function (t) {
  24654. var e = t.hostTree.data.getRawDataItem(t.dataIndex);
  24655. t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= a
  24656. })), r.data
  24657. }, e.prototype.getOrient = function () {
  24658. var t = this.get("orient");
  24659. return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"), t
  24660. }, e.prototype.setZoom = function (t) {
  24661. this.option.zoom = t
  24662. }, e.prototype.setCenter = function (t) {
  24663. this.option.center = t
  24664. }, e.prototype.formatTooltip = function (t, e, n) {
  24665. for (var i = this.getData().tree, r = i.root.children[0], o = i.getNodeByDataIndex(t), a = o.getValue(), s = o.name; o && o !== r;) s = o.parentNode.name + "." + s, o = o.parentNode;
  24666. return og("nameValue", {
  24667. name: s,
  24668. value: a,
  24669. noValue: isNaN(a) || null == a
  24670. })
  24671. }, e.prototype.getDataParams = function (e) {
  24672. var n = t.prototype.getDataParams.apply(this, arguments),
  24673. i = this.getData().tree.getNodeByDataIndex(e);
  24674. return n.treeAncestors = rD(i, this), n.collapsed = !i.isExpand, n
  24675. }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
  24676. z: 2,
  24677. coordinateSystem: "view",
  24678. left: "12%",
  24679. top: "12%",
  24680. right: "12%",
  24681. bottom: "12%",
  24682. layout: "orthogonal",
  24683. edgeShape: "curve",
  24684. edgeForkPosition: "50%",
  24685. roam: !1,
  24686. nodeScaleRatio: .4,
  24687. center: null,
  24688. zoom: 1,
  24689. orient: "LR",
  24690. symbol: "emptyCircle",
  24691. symbolSize: 7,
  24692. expandAndCollapse: !0,
  24693. initialTreeDepth: 2,
  24694. lineStyle: {
  24695. color: "#ccc",
  24696. width: 1.5,
  24697. curveness: .5
  24698. },
  24699. itemStyle: {
  24700. color: "lightsteelblue",
  24701. borderWidth: 1.5
  24702. },
  24703. label: {
  24704. show: !0
  24705. },
  24706. animationEasing: "linear",
  24707. animationDuration: 700,
  24708. animationDurationUpdate: 500
  24709. }, e
  24710. }(bg);
  24711. function aD(t, e) {
  24712. for (var n, i = [t]; n = i.pop();)
  24713. if (e(n), n.isExpand) {
  24714. var r = n.children;
  24715. if (r.length)
  24716. for (var o = r.length - 1; o >= 0; o--) i.push(r[o])
  24717. }
  24718. }
  24719. function sD(t, e) {
  24720. t.eachSeriesByType("tree", (function (t) {
  24721. ! function (t, e) {
  24722. var n = function (t, e) {
  24723. return kp(t.getBoxLayoutParams(), {
  24724. width: e.getWidth(),
  24725. height: e.getHeight()
  24726. })
  24727. }(t, e);
  24728. t.layoutInfo = n;
  24729. var i = t.get("layout"),
  24730. r = 0,
  24731. o = 0,
  24732. a = null;
  24733. "radial" === i ? (r = 2 * Math.PI, o = Math.min(n.height, n.width) / 2, a = DC((function (t, e) {
  24734. return (t.parentNode === e.parentNode ? 1 : 2) / t.depth
  24735. }))) : (r = n.width, o = n.height, a = DC());
  24736. var s = t.getData().tree.root,
  24737. l = s.children[0];
  24738. if (l) {
  24739. ! function (t) {
  24740. var e = t;
  24741. e.hierNode = {
  24742. defaultAncestor: null,
  24743. ancestor: e,
  24744. prelim: 0,
  24745. modifier: 0,
  24746. change: 0,
  24747. shift: 0,
  24748. i: 0,
  24749. thread: null
  24750. };
  24751. for (var n, i, r = [e]; n = r.pop();)
  24752. if (i = n.children, n.isExpand && i.length)
  24753. for (var o = i.length - 1; o >= 0; o--) {
  24754. var a = i[o];
  24755. a.hierNode = {
  24756. defaultAncestor: null,
  24757. ancestor: a,
  24758. prelim: 0,
  24759. modifier: 0,
  24760. change: 0,
  24761. shift: 0,
  24762. i: o,
  24763. thread: null
  24764. }, r.push(a)
  24765. }
  24766. }(s),
  24767. function (t, e, n) {
  24768. for (var i, r = [t], o = []; i = r.pop();)
  24769. if (o.push(i), i.isExpand) {
  24770. var a = i.children;
  24771. if (a.length)
  24772. for (var s = 0; s < a.length; s++) r.push(a[s])
  24773. } for (; i = o.pop();) e(i, n)
  24774. }(l, TC, a), s.hierNode.modifier = -l.hierNode.prelim, aD(l, CC);
  24775. var u = l,
  24776. h = l,
  24777. c = l;
  24778. aD(l, (function (t) {
  24779. var e = t.getLayout().x;
  24780. e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t)
  24781. }));
  24782. var p = u === h ? 1 : a(u, h) / 2,
  24783. d = p - u.getLayout().x,
  24784. f = 0,
  24785. g = 0,
  24786. y = 0,
  24787. v = 0;
  24788. if ("radial" === i) f = r / (h.getLayout().x + p + d), g = o / (c.depth - 1 || 1), aD(l, (function (t) {
  24789. y = (t.getLayout().x + d) * f, v = (t.depth - 1) * g;
  24790. var e = AC(y, v);
  24791. t.setLayout({
  24792. x: e.x,
  24793. y: e.y,
  24794. rawX: y,
  24795. rawY: v
  24796. }, !0)
  24797. }));
  24798. else {
  24799. var m = t.getOrient();
  24800. "RL" === m || "LR" === m ? (g = o / (h.getLayout().x + p + d), f = r / (c.depth - 1 || 1), aD(l, (function (t) {
  24801. v = (t.getLayout().x + d) * g, y = "LR" === m ? (t.depth - 1) * f : r - (t.depth - 1) * f, t.setLayout({
  24802. x: y,
  24803. y: v
  24804. }, !0)
  24805. }))) : "TB" !== m && "BT" !== m || (f = r / (h.getLayout().x + p + d), g = o / (c.depth - 1 || 1), aD(l, (function (t) {
  24806. y = (t.getLayout().x + d) * f, v = "TB" === m ? (t.depth - 1) * g : o - (t.depth - 1) * g, t.setLayout({
  24807. x: y,
  24808. y: v
  24809. }, !0)
  24810. })))
  24811. }
  24812. }
  24813. }(t, e)
  24814. }))
  24815. }
  24816. function lD(t) {
  24817. t.eachSeriesByType("tree", (function (t) {
  24818. var e = t.getData();
  24819. e.tree.eachNode((function (t) {
  24820. var n = t.getModel().getModel("itemStyle").getItemStyle();
  24821. A(e.ensureUniqueItemVisual(t.dataIndex, "style"), n)
  24822. }))
  24823. }))
  24824. }
  24825. var uD = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  24826. function hD(t) {
  24827. var e = t.getData().tree,
  24828. n = {};
  24829. e.eachNode((function (e) {
  24830. for (var i = e; i && i.depth > 1;) i = i.parentNode;
  24831. var r = pd(t.ecModel, i.name || i.dataIndex + "", n);
  24832. e.setVisual("decal", r)
  24833. }))
  24834. }
  24835. var cD = function (t) {
  24836. function e() {
  24837. var n = null !== t && t.apply(this, arguments) || this;
  24838. return n.type = e.type, n.preventUsingHoverLayer = !0, n
  24839. }
  24840. return n(e, t), e.prototype.getInitialData = function (t, e) {
  24841. var n = {
  24842. name: t.name,
  24843. children: t.data
  24844. };
  24845. pD(n);
  24846. var i = t.levels || [],
  24847. r = this.designatedVisualItemStyle = {},
  24848. o = new Cc({
  24849. itemStyle: r
  24850. }, this, e);
  24851. i = t.levels = function (t, e) {
  24852. var n, i, r = To(e.get("color")),
  24853. o = To(e.get(["aria", "decal", "decals"]));
  24854. if (!r) return;
  24855. t = t || [], E(t, (function (t) {
  24856. var e = new Cc(t),
  24857. r = e.get("color"),
  24858. o = e.get("decal");
  24859. (e.get(["itemStyle", "color"]) || r && "none" !== r) && (n = !0), (e.get(["itemStyle", "decal"]) || o && "none" !== o) && (i = !0)
  24860. }));
  24861. var a = t[0] || (t[0] = {});
  24862. n || (a.color = r.slice());
  24863. !i && o && (a.decal = o.slice());
  24864. return t
  24865. }(i, e);
  24866. var a = z(i || [], (function (t) {
  24867. return new Cc(t, o, e)
  24868. }), this),
  24869. s = tD.createTree(n, this, (function (t) {
  24870. t.wrapMethod("getItemModel", (function (t, e) {
  24871. var n = s.getNodeByDataIndex(e),
  24872. i = n ? a[n.depth] : null;
  24873. return t.parentModel = i || o, t
  24874. }))
  24875. }));
  24876. return s.data
  24877. }, e.prototype.optionUpdated = function () {
  24878. this.resetViewRoot()
  24879. }, e.prototype.formatTooltip = function (t, e, n) {
  24880. var i = this.getData(),
  24881. r = this.getRawValue(t);
  24882. return og("nameValue", {
  24883. name: i.getName(t),
  24884. value: r
  24885. })
  24886. }, e.prototype.getDataParams = function (e) {
  24887. var n = t.prototype.getDataParams.apply(this, arguments),
  24888. i = this.getData().tree.getNodeByDataIndex(e);
  24889. return n.treeAncestors = rD(i, this), n.treePathInfo = n.treeAncestors, n
  24890. }, e.prototype.setLayoutInfo = function (t) {
  24891. this.layoutInfo = this.layoutInfo || {}, A(this.layoutInfo, t)
  24892. }, e.prototype.mapIdToIndex = function (t) {
  24893. var e = this._idIndexMap;
  24894. e || (e = this._idIndexMap = yt(), this._idIndexMapCount = 0);
  24895. var n = e.get(t);
  24896. return null == n && e.set(t, n = this._idIndexMapCount++), n
  24897. }, e.prototype.getViewRoot = function () {
  24898. return this._viewRoot
  24899. }, e.prototype.resetViewRoot = function (t) {
  24900. t ? this._viewRoot = t : t = this._viewRoot;
  24901. var e = this.getRawData().tree.root;
  24902. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  24903. }, e.prototype.enableAriaDecal = function () {
  24904. hD(this)
  24905. }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
  24906. progressive: 0,
  24907. left: "center",
  24908. top: "middle",
  24909. width: "80%",
  24910. height: "80%",
  24911. sort: !0,
  24912. clipWindow: "origin",
  24913. squareRatio: .5 * (1 + Math.sqrt(5)),
  24914. leafDepth: null,
  24915. drillDownIcon: "▶",
  24916. zoomToNodeRatio: .1024,
  24917. roam: !0,
  24918. nodeClick: "zoomToNode",
  24919. animation: !0,
  24920. animationDurationUpdate: 900,
  24921. animationEasing: "quinticInOut",
  24922. breadcrumb: {
  24923. show: !0,
  24924. height: 22,
  24925. left: "center",
  24926. top: "bottom",
  24927. emptyItemWidth: 25,
  24928. itemStyle: {
  24929. color: "rgba(0,0,0,0.7)",
  24930. textStyle: {
  24931. color: "#fff"
  24932. }
  24933. },
  24934. emphasis: {
  24935. itemStyle: {
  24936. color: "rgba(0,0,0,0.9)"
  24937. }
  24938. }
  24939. },
  24940. label: {
  24941. show: !0,
  24942. distance: 0,
  24943. padding: 5,
  24944. position: "inside",
  24945. color: "#fff",
  24946. overflow: "truncate"
  24947. },
  24948. upperLabel: {
  24949. show: !1,
  24950. position: [0, "50%"],
  24951. height: 20,
  24952. overflow: "truncate",
  24953. verticalAlign: "middle"
  24954. },
  24955. itemStyle: {
  24956. color: null,
  24957. colorAlpha: null,
  24958. colorSaturation: null,
  24959. borderWidth: 0,
  24960. gapWidth: 0,
  24961. borderColor: "#fff",
  24962. borderColorSaturation: null
  24963. },
  24964. emphasis: {
  24965. upperLabel: {
  24966. show: !0,
  24967. position: [0, "50%"],
  24968. overflow: "truncate",
  24969. verticalAlign: "middle"
  24970. }
  24971. },
  24972. visualDimension: 0,
  24973. visualMin: null,
  24974. visualMax: null,
  24975. color: [],
  24976. colorAlpha: null,
  24977. colorSaturation: null,
  24978. colorMappingBy: "index",
  24979. visibleMin: 10,
  24980. childrenVisibleMin: null,
  24981. levels: []
  24982. }, e
  24983. }(bg);
  24984. function pD(t) {
  24985. var e = 0;
  24986. E(t.children, (function (t) {
  24987. pD(t);
  24988. var n = t.value;
  24989. Y(n) && (n = n[0]), e += n
  24990. }));
  24991. var n = t.value;
  24992. Y(n) && (n = n[0]), (null == n || isNaN(n)) && (n = e), n < 0 && (n = 0), Y(t.value) ? t.value[0] = n : t.value = n
  24993. }
  24994. var dD = function () {
  24995. function t(t) {
  24996. this.group = new Br, t.add(this.group)
  24997. }
  24998. return t.prototype.render = function (t, e, n, i) {
  24999. var r = t.getModel("breadcrumb"),
  25000. o = this.group;
  25001. if (o.removeAll(), r.get("show") && n) {
  25002. var a = r.getModel("itemStyle"),
  25003. s = r.getModel("emphasis"),
  25004. l = a.getModel("textStyle"),
  25005. u = s.getModel(["itemStyle", "textStyle"]),
  25006. h = {
  25007. pos: {
  25008. left: r.get("left"),
  25009. right: r.get("right"),
  25010. top: r.get("top"),
  25011. bottom: r.get("bottom")
  25012. },
  25013. box: {
  25014. width: e.getWidth(),
  25015. height: e.getHeight()
  25016. },
  25017. emptyItemWidth: r.get("emptyItemWidth"),
  25018. totalWidth: 0,
  25019. renderList: []
  25020. };
  25021. this._prepare(n, h, l), this._renderContent(t, h, a, s, l, u, i), Lp(o, h.pos, h.box)
  25022. }
  25023. }, t.prototype._prepare = function (t, e, n) {
  25024. for (var i = t; i; i = i.parentNode) {
  25025. var r = Ro(i.getModel().get("name"), ""),
  25026. o = n.getTextRect(r),
  25027. a = Math.max(o.width + 16, e.emptyItemWidth);
  25028. e.totalWidth += a + 8, e.renderList.push({
  25029. node: i,
  25030. text: r,
  25031. width: a
  25032. })
  25033. }
  25034. }, t.prototype._renderContent = function (t, e, n, i, r, o, a) {
  25035. for (var s, l, u, h, c, p, d, f, g, y = 0, v = e.emptyItemWidth, m = t.get(["breadcrumb", "height"]), x = (s = e.pos, l = e.box, h = l.width, c = l.height, p = $r(s.left, h), d = $r(s.top, c), f = $r(s.right, h), g = $r(s.bottom, c), (isNaN(p) || isNaN(parseFloat(s.left))) && (p = 0), (isNaN(f) || isNaN(parseFloat(s.right))) && (f = h), (isNaN(d) || isNaN(parseFloat(s.top))) && (d = 0), (isNaN(g) || isNaN(parseFloat(s.bottom))) && (g = c), u = vp(u || 0), {
  25036. width: Math.max(f - p - u[1] - u[3], 0),
  25037. height: Math.max(g - d - u[0] - u[2], 0)
  25038. }), _ = e.totalWidth, b = e.renderList, w = i.getModel("itemStyle").getItemStyle(), S = b.length - 1; S >= 0; S--) {
  25039. var M = b[S],
  25040. I = M.node,
  25041. T = M.width,
  25042. C = M.text;
  25043. _ > x.width && (_ -= T - v, T = v, C = null);
  25044. var D = new Xu({
  25045. shape: {
  25046. points: fD(y, 0, T, m, S === b.length - 1, 0 === S)
  25047. },
  25048. style: k(n.getItemStyle(), {
  25049. lineJoin: "bevel"
  25050. }),
  25051. textContent: new Xs({
  25052. style: oc(r, {
  25053. text: C
  25054. })
  25055. }),
  25056. textConfig: {
  25057. position: "inside"
  25058. },
  25059. z2: 1e5,
  25060. onclick: H(a, I)
  25061. });
  25062. D.disableLabelAnimation = !0, D.getTextContent().ensureState("emphasis").style = oc(o, {
  25063. text: C
  25064. }), D.ensureState("emphasis").style = w, Zl(D, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(D), gD(D, t, I), y += T + 8
  25065. }
  25066. }, t.prototype.remove = function () {
  25067. this.group.removeAll()
  25068. }, t
  25069. }();
  25070. function fD(t, e, n, i, r, o) {
  25071. var a = [
  25072. [r ? t : t - 5, e],
  25073. [t + n, e],
  25074. [t + n, e + i],
  25075. [r ? t : t - 5, e + i]
  25076. ];
  25077. return !o && a.splice(2, 0, [t + n + 5, e + i / 2]), !r && a.push([t, e + i / 2]), a
  25078. }
  25079. function gD(t, e, n) {
  25080. rl(t).eventData = {
  25081. componentType: "series",
  25082. componentSubType: "treemap",
  25083. componentIndex: e.componentIndex,
  25084. seriesIndex: e.seriesIndex,
  25085. seriesName: e.name,
  25086. seriesType: "treemap",
  25087. selfType: "breadcrumb",
  25088. nodeData: {
  25089. dataIndex: n && n.dataIndex,
  25090. name: n && n.name
  25091. },
  25092. treePathInfo: n && rD(n, e)
  25093. }
  25094. }
  25095. var yD = function () {
  25096. function t() {
  25097. this._storage = [], this._elExistsMap = {}
  25098. }
  25099. return t.prototype.add = function (t, e, n, i, r) {
  25100. return !this._elExistsMap[t.id] && (this._elExistsMap[t.id] = !0, this._storage.push({
  25101. el: t,
  25102. target: e,
  25103. duration: n,
  25104. delay: i,
  25105. easing: r
  25106. }), !0)
  25107. }, t.prototype.finished = function (t) {
  25108. return this._finishedCallback = t, this
  25109. }, t.prototype.start = function () {
  25110. for (var t = this, e = this._storage.length, n = function () {
  25111. --e <= 0 && (t._storage.length = 0, t._elExistsMap = {}, t._finishedCallback && t._finishedCallback())
  25112. }, i = 0, r = this._storage.length; i < r; i++) {
  25113. var o = this._storage[i];
  25114. o.el.animateTo(o.target, {
  25115. duration: o.duration,
  25116. delay: o.delay,
  25117. easing: o.easing,
  25118. setToFinal: !0,
  25119. done: n,
  25120. aborted: n
  25121. })
  25122. }
  25123. return this
  25124. }, t
  25125. }();
  25126. var vD = Br,
  25127. mD = Ws,
  25128. xD = "label",
  25129. _D = "upperLabel",
  25130. bD = ia([
  25131. ["fill", "color"],
  25132. ["stroke", "strokeColor"],
  25133. ["lineWidth", "strokeWidth"],
  25134. ["shadowBlur"],
  25135. ["shadowOffsetX"],
  25136. ["shadowOffsetY"],
  25137. ["shadowColor"]
  25138. ]),
  25139. wD = function (t) {
  25140. var e = bD(t);
  25141. return e.stroke = e.fill = e.lineWidth = null, e
  25142. },
  25143. SD = Vo(),
  25144. MD = function (t) {
  25145. function e() {
  25146. var n = null !== t && t.apply(this, arguments) || this;
  25147. return n.type = e.type, n._state = "ready", n._storage = {
  25148. nodeGroup: [],
  25149. background: [],
  25150. content: []
  25151. }, n
  25152. }
  25153. return n(e, t), e.prototype.render = function (t, e, n, i) {
  25154. if (!(P(e.findComponents({
  25155. mainType: "series",
  25156. subType: "treemap",
  25157. query: i
  25158. }), t) < 0)) {
  25159. this.seriesModel = t, this.api = n, this.ecModel = e;
  25160. var r = eD(i, ["treemapZoomToNode", "treemapRootToNode"], t),
  25161. o = i && i.type,
  25162. a = t.layoutInfo,
  25163. s = !this._oldTree,
  25164. l = this._storage,
  25165. u = "treemapRootToNode" === o && r && l ? {
  25166. rootNodeGroup: l.nodeGroup[r.node.getRawIndex()],
  25167. direction: i.direction
  25168. } : null,
  25169. h = this._giveContainerGroup(a),
  25170. c = t.get("animation"),
  25171. p = this._doRender(h, t, u);
  25172. !c || s || o && "treemapZoomToNode" !== o && "treemapRootToNode" !== o ? p.renderFinally() : this._doAnimation(h, p, t, u), this._resetController(n), this._renderBreadcrumb(t, n, r)
  25173. }
  25174. }, e.prototype._giveContainerGroup = function (t) {
  25175. var e = this._containerGroup;
  25176. return e || (e = this._containerGroup = new vD, this._initEvents(e), this.group.add(e)), e.x = t.x, e.y = t.y, e
  25177. }, e.prototype._doRender = function (t, e, n) {
  25178. var i = e.getData().tree,
  25179. r = this._oldTree,
  25180. o = {
  25181. nodeGroup: [],
  25182. background: [],
  25183. content: []
  25184. },
  25185. a = {
  25186. nodeGroup: [],
  25187. background: [],
  25188. content: []
  25189. },
  25190. s = this._storage,
  25191. l = [];
  25192. function u(t, i, r, u) {
  25193. return function (t, e, n, i, r, o, a, s, l, u) {
  25194. if (!a) return;
  25195. var h = a.getLayout(),
  25196. c = t.getData(),
  25197. p = a.getModel();
  25198. if (c.setItemGraphicEl(a.dataIndex, null), !h || !h.isInView) return;
  25199. var d = h.width,
  25200. f = h.height,
  25201. g = h.borderWidth,
  25202. y = h.invisible,
  25203. v = a.getRawIndex(),
  25204. m = s && s.getRawIndex(),
  25205. x = a.viewChildren,
  25206. _ = h.upperHeight,
  25207. b = x && x.length,
  25208. w = p.getModel("itemStyle"),
  25209. S = p.getModel(["emphasis", "itemStyle"]),
  25210. M = p.getModel(["blur", "itemStyle"]),
  25211. I = p.getModel(["select", "itemStyle"]),
  25212. T = w.get("borderRadius") || 0,
  25213. C = G("nodeGroup", vD);
  25214. if (!C) return;
  25215. if (l.add(C), C.x = h.x || 0, C.y = h.y || 0, C.markRedraw(), SD(C).nodeWidth = d, SD(C).nodeHeight = f, h.isAboveViewRoot) return C;
  25216. var D = G("background", mD, u, 20);
  25217. D && E(C, D, b && h.upperLabelHeight);
  25218. var k = p.getModel("emphasis"),
  25219. L = k.get("focus"),
  25220. P = k.get("blurScope"),
  25221. O = k.get("disabled"),
  25222. R = "ancestor" === L ? a.getAncestorsIndices() : "descendant" === L ? a.getDescendantIndices() : L;
  25223. if (b) Ql(C) && Jl(C, !1), D && (Jl(D, !O), c.setItemGraphicEl(a.dataIndex, D), jl(D, R, P));
  25224. else {
  25225. var N = G("content", mD, u, 30);
  25226. N && z(C, N), D.disableMorphing = !0, D && Ql(D) && Jl(D, !1), Jl(C, !O), c.setItemGraphicEl(a.dataIndex, C), jl(C, R, P)
  25227. }
  25228. return C;
  25229. function E(e, n, i) {
  25230. var r = rl(n);
  25231. if (r.dataIndex = a.dataIndex, r.seriesIndex = t.seriesIndex, n.setShape({
  25232. x: 0,
  25233. y: 0,
  25234. width: d,
  25235. height: f,
  25236. r: T
  25237. }), y) V(n);
  25238. else {
  25239. n.invisible = !1;
  25240. var o = a.getVisual("style"),
  25241. s = o.stroke,
  25242. l = wD(w);
  25243. l.fill = s;
  25244. var u = bD(S);
  25245. u.fill = S.get("borderColor");
  25246. var h = bD(M);
  25247. h.fill = M.get("borderColor");
  25248. var c = bD(I);
  25249. if (c.fill = I.get("borderColor"), i) {
  25250. var p = d - 2 * g;
  25251. B(n, s, o.opacity, {
  25252. x: g,
  25253. y: 0,
  25254. width: p,
  25255. height: _
  25256. })
  25257. } else n.removeTextContent();
  25258. n.setStyle(l), n.ensureState("emphasis").style = u, n.ensureState("blur").style = h, n.ensureState("select").style = c, kl(n)
  25259. }
  25260. e.add(n)
  25261. }
  25262. function z(e, n) {
  25263. var i = rl(n);
  25264. i.dataIndex = a.dataIndex, i.seriesIndex = t.seriesIndex;
  25265. var r = Math.max(d - 2 * g, 0),
  25266. o = Math.max(f - 2 * g, 0);
  25267. if (n.culling = !0, n.setShape({
  25268. x: g,
  25269. y: g,
  25270. width: r,
  25271. height: o,
  25272. r: T
  25273. }), y) V(n);
  25274. else {
  25275. n.invisible = !1;
  25276. var s = a.getVisual("style"),
  25277. l = s.fill,
  25278. u = wD(w);
  25279. u.fill = l, u.decal = s.decal;
  25280. var h = bD(S),
  25281. c = bD(M),
  25282. p = bD(I);
  25283. B(n, l, s.opacity, null), n.setStyle(u), n.ensureState("emphasis").style = h, n.ensureState("blur").style = c, n.ensureState("select").style = p, kl(n)
  25284. }
  25285. e.add(n)
  25286. }
  25287. function V(t) {
  25288. !t.invisible && o.push(t)
  25289. }
  25290. function B(e, n, i, r) {
  25291. var o = p.getModel(r ? _D : xD),
  25292. s = Ro(p.get("name"), null),
  25293. l = o.getShallow("show");
  25294. ic(e, rc(p, r ? _D : xD), {
  25295. defaultText: l ? s : null,
  25296. inheritColor: n,
  25297. defaultOpacity: i,
  25298. labelFetcher: t,
  25299. labelDataIndex: a.dataIndex
  25300. });
  25301. var u = e.getTextContent();
  25302. if (u) {
  25303. var c = u.style,
  25304. d = st(c.padding || 0);
  25305. r && (e.setTextConfig({
  25306. layoutRect: r
  25307. }), u.disableLabelLayout = !0), u.beforeUpdate = function () {
  25308. var t = Math.max((r ? r.width : e.shape.width) - d[1] - d[3], 0),
  25309. n = Math.max((r ? r.height : e.shape.height) - d[0] - d[2], 0);
  25310. c.width === t && c.height === n || u.setStyle({
  25311. width: t,
  25312. height: n
  25313. })
  25314. }, c.truncateMinChar = 2, c.lineOverflow = "truncate", F(c, r, h);
  25315. var f = u.getState("emphasis");
  25316. F(f ? f.style : null, r, h)
  25317. }
  25318. }
  25319. function F(e, n, i) {
  25320. var r = e ? e.text : null;
  25321. if (!n && i.isLeafRoot && null != r) {
  25322. var o = t.get("drillDownIcon", !0);
  25323. e.text = o ? o + " " + r : r
  25324. }
  25325. }
  25326. function G(t, i, o, a) {
  25327. var s = null != m && n[t][m],
  25328. l = r[t];
  25329. return s ? (n[t][m] = null, W(l, s)) : y || ((s = new i) instanceof Da && (s.z2 = function (t, e) {
  25330. return 100 * t + e
  25331. }(o, a)), H(l, s)), e[t][v] = s
  25332. }
  25333. function W(t, e) {
  25334. var n = t[v] = {};
  25335. e instanceof vD ? (n.oldX = e.x, n.oldY = e.y) : n.oldShape = A({}, e.shape)
  25336. }
  25337. function H(t, e) {
  25338. var n = t[v] = {},
  25339. o = a.parentNode,
  25340. s = e instanceof Br;
  25341. if (o && (!i || "drillDown" === i.direction)) {
  25342. var l = 0,
  25343. u = 0,
  25344. h = r.background[o.getRawIndex()];
  25345. !i && h && h.oldShape && (l = h.oldShape.width, u = h.oldShape.height), s ? (n.oldX = 0, n.oldY = u) : n.oldShape = {
  25346. x: l,
  25347. y: u,
  25348. width: 0,
  25349. height: 0
  25350. }
  25351. }
  25352. n.fadein = !s
  25353. }
  25354. }(e, a, s, n, o, l, t, i, r, u)
  25355. }! function t(e, n, i, r, o) {
  25356. r ? (n = e, E(e, (function (t, e) {
  25357. !t.isRemoved() && s(e, e)
  25358. }))) : new Gm(n, e, a, a).add(s).update(s).remove(H(s, null)).execute();
  25359. function a(t) {
  25360. return t.getId()
  25361. }
  25362. function s(a, s) {
  25363. var l = null != a ? e[a] : null,
  25364. h = null != s ? n[s] : null,
  25365. c = u(l, h, i, o);
  25366. c && t(l && l.viewChildren || [], h && h.viewChildren || [], c, r, o + 1)
  25367. }
  25368. }(i.root ? [i.root] : [], r && r.root ? [r.root] : [], t, i === r || !r, 0);
  25369. var h = function (t) {
  25370. var e = {
  25371. nodeGroup: [],
  25372. background: [],
  25373. content: []
  25374. };
  25375. return t && E(t, (function (t, n) {
  25376. var i = e[n];
  25377. E(t, (function (t) {
  25378. t && (i.push(t), SD(t).willDelete = !0)
  25379. }))
  25380. })), e
  25381. }(s);
  25382. return this._oldTree = i, this._storage = a, {
  25383. lastsForAnimation: o,
  25384. willDeleteEls: h,
  25385. renderFinally: function () {
  25386. E(h, (function (t) {
  25387. E(t, (function (t) {
  25388. t.parent && t.parent.remove(t)
  25389. }))
  25390. })), E(l, (function (t) {
  25391. t.invisible = !0, t.dirty()
  25392. }))
  25393. }
  25394. }
  25395. }, e.prototype._doAnimation = function (t, e, n, i) {
  25396. var r = n.get("animationDurationUpdate"),
  25397. o = n.get("animationEasing"),
  25398. a = (X(r) ? 0 : r) || 0,
  25399. s = (X(o) ? null : o) || "cubicOut",
  25400. l = new yD;
  25401. E(e.willDeleteEls, (function (t, e) {
  25402. E(t, (function (t, n) {
  25403. if (!t.invisible) {
  25404. var r, o = t.parent,
  25405. u = SD(o);
  25406. if (i && "drillDown" === i.direction) r = o === i.rootNodeGroup ? {
  25407. shape: {
  25408. x: 0,
  25409. y: 0,
  25410. width: u.nodeWidth,
  25411. height: u.nodeHeight
  25412. },
  25413. style: {
  25414. opacity: 0
  25415. }
  25416. } : {
  25417. style: {
  25418. opacity: 0
  25419. }
  25420. };
  25421. else {
  25422. var h = 0,
  25423. c = 0;
  25424. u.willDelete || (h = u.nodeWidth / 2, c = u.nodeHeight / 2), r = "nodeGroup" === e ? {
  25425. x: h,
  25426. y: c,
  25427. style: {
  25428. opacity: 0
  25429. }
  25430. } : {
  25431. shape: {
  25432. x: h,
  25433. y: c,
  25434. width: 0,
  25435. height: 0
  25436. },
  25437. style: {
  25438. opacity: 0
  25439. }
  25440. }
  25441. }
  25442. r && l.add(t, r, a, 0, s)
  25443. }
  25444. }))
  25445. })), E(this._storage, (function (t, n) {
  25446. E(t, (function (t, i) {
  25447. var r = e.lastsForAnimation[n][i],
  25448. o = {};
  25449. r && (t instanceof Br ? null != r.oldX && (o.x = t.x, o.y = t.y, t.x = r.oldX, t.y = r.oldY) : (r.oldShape && (o.shape = A({}, t.shape), t.setShape(r.oldShape)), r.fadein ? (t.setStyle("opacity", 0), o.style = {
  25450. opacity: 1
  25451. }) : 1 !== t.style.opacity && (o.style = {
  25452. opacity: 1
  25453. })), l.add(t, o, a, 0, s))
  25454. }))
  25455. }), this), this._state = "animating", l.finished(W((function () {
  25456. this._state = "ready", e.renderFinally()
  25457. }), this)).start()
  25458. }, e.prototype._resetController = function (t) {
  25459. var e = this._controller;
  25460. e || ((e = this._controller = new tT(t.getZr())).enable(this.seriesModel.get("roam")), e.on("pan", W(this._onPan, this)), e.on("zoom", W(this._onZoom, this)));
  25461. var n = new ze(0, 0, t.getWidth(), t.getHeight());
  25462. e.setPointerChecker((function (t, e, i) {
  25463. return n.contain(e, i)
  25464. }))
  25465. }, e.prototype._clearController = function () {
  25466. var t = this._controller;
  25467. t && (t.dispose(), t = null)
  25468. }, e.prototype._onPan = function (t) {
  25469. if ("animating" !== this._state && (Math.abs(t.dx) > 3 || Math.abs(t.dy) > 3)) {
  25470. var e = this.seriesModel.getData().tree.root;
  25471. if (!e) return;
  25472. var n = e.getLayout();
  25473. if (!n) return;
  25474. this.api.dispatchAction({
  25475. type: "treemapMove",
  25476. from: this.uid,
  25477. seriesId: this.seriesModel.id,
  25478. rootRect: {
  25479. x: n.x + t.dx,
  25480. y: n.y + t.dy,
  25481. width: n.width,
  25482. height: n.height
  25483. }
  25484. })
  25485. }
  25486. }, e.prototype._onZoom = function (t) {
  25487. var e = t.originX,
  25488. n = t.originY;
  25489. if ("animating" !== this._state) {
  25490. var i = this.seriesModel.getData().tree.root;
  25491. if (!i) return;
  25492. var r = i.getLayout();
  25493. if (!r) return;
  25494. var o = new ze(r.x, r.y, r.width, r.height),
  25495. a = this.seriesModel.layoutInfo,
  25496. s = [1, 0, 0, 1, 0, 0];
  25497. we(s, s, [-(e -= a.x), -(n -= a.y)]), Me(s, s, [t.scale, t.scale]), we(s, s, [e, n]), o.applyTransform(s), this.api.dispatchAction({
  25498. type: "treemapRender",
  25499. from: this.uid,
  25500. seriesId: this.seriesModel.id,
  25501. rootRect: {
  25502. x: o.x,
  25503. y: o.y,
  25504. width: o.width,
  25505. height: o.height
  25506. }
  25507. })
  25508. }
  25509. }, e.prototype._initEvents = function (t) {
  25510. var e = this;
  25511. t.on("click", (function (t) {
  25512. if ("ready" === e._state) {
  25513. var n = e.seriesModel.get("nodeClick", !0);
  25514. if (n) {
  25515. var i = e.findTarget(t.offsetX, t.offsetY);
  25516. if (i) {
  25517. var r = i.node;
  25518. if (r.getLayout().isLeafRoot) e._rootToNode(i);
  25519. else if ("zoomToNode" === n) e._zoomToNode(i);
  25520. else if ("link" === n) {
  25521. var o = r.hostTree.data.getItemModel(r.dataIndex),
  25522. a = o.get("link", !0),
  25523. s = o.get("target", !0) || "blank";
  25524. a && Mp(a, s)
  25525. }
  25526. }
  25527. }
  25528. }
  25529. }), this)
  25530. }, e.prototype._renderBreadcrumb = function (t, e, n) {
  25531. var i = this;
  25532. n || (n = null != t.get("leafDepth", !0) ? {
  25533. node: t.getViewRoot()
  25534. } : this.findTarget(e.getWidth() / 2, e.getHeight() / 2)) || (n = {
  25535. node: t.getData().tree.root
  25536. }), (this._breadcrumb || (this._breadcrumb = new dD(this.group))).render(t, e, n.node, (function (e) {
  25537. "animating" !== i._state && (iD(t.getViewRoot(), e) ? i._rootToNode({
  25538. node: e
  25539. }) : i._zoomToNode({
  25540. node: e
  25541. }))
  25542. }))
  25543. }, e.prototype.remove = function () {
  25544. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = {
  25545. nodeGroup: [],
  25546. background: [],
  25547. content: []
  25548. }, this._state = "ready", this._breadcrumb && this._breadcrumb.remove()
  25549. }, e.prototype.dispose = function () {
  25550. this._clearController()
  25551. }, e.prototype._zoomToNode = function (t) {
  25552. this.api.dispatchAction({
  25553. type: "treemapZoomToNode",
  25554. from: this.uid,
  25555. seriesId: this.seriesModel.id,
  25556. targetNode: t.node
  25557. })
  25558. }, e.prototype._rootToNode = function (t) {
  25559. this.api.dispatchAction({
  25560. type: "treemapRootToNode",
  25561. from: this.uid,
  25562. seriesId: this.seriesModel.id,
  25563. targetNode: t.node
  25564. })
  25565. }, e.prototype.findTarget = function (t, e) {
  25566. var n;
  25567. return this.seriesModel.getViewRoot().eachNode({
  25568. attr: "viewChildren",
  25569. order: "preorder"
  25570. }, (function (i) {
  25571. var r = this._storage.background[i.getRawIndex()];
  25572. if (r) {
  25573. var o = r.transformCoordToLocal(t, e),
  25574. a = r.shape;
  25575. if (!(a.x <= o[0] && o[0] <= a.x + a.width && a.y <= o[1] && o[1] <= a.y + a.height)) return !1;
  25576. n = {
  25577. node: i,
  25578. offsetX: o[0],
  25579. offsetY: o[1]
  25580. }
  25581. }
  25582. }), this), n
  25583. }, e.type = "treemap", e
  25584. }(Og);
  25585. var ID = E,
  25586. TD = q,
  25587. CD = -1,
  25588. DD = function () {
  25589. function t(e) {
  25590. var n = e.mappingMethod,
  25591. i = e.type,
  25592. r = this.option = T(e);
  25593. this.type = i, this.mappingMethod = n, this._normalizeData = VD[n];
  25594. var o = t.visualHandlers[i];
  25595. this.applyVisual = o.applyVisual, this.getColorMapper = o.getColorMapper, this._normalizedToVisual = o._normalizedToVisual[n], "piecewise" === n ? (AD(r), function (t) {
  25596. var e = t.pieceList;
  25597. t.hasSpecialVisual = !1, E(e, (function (e, n) {
  25598. e.originIndex = n, null != e.visual && (t.hasSpecialVisual = !0)
  25599. }))
  25600. }(r)) : "category" === n ? r.categories ? function (t) {
  25601. var e = t.categories,
  25602. n = t.categoryMap = {},
  25603. i = t.visual;
  25604. if (ID(e, (function (t, e) {
  25605. n[t] = e
  25606. })), !Y(i)) {
  25607. var r = [];
  25608. q(i) ? ID(i, (function (t, e) {
  25609. var i = n[e];
  25610. r[null != i ? i : CD] = t
  25611. })) : r[-1] = i, i = zD(t, r)
  25612. }
  25613. for (var o = e.length - 1; o >= 0; o--) null == i[o] && (delete n[e[o]], e.pop())
  25614. }(r) : AD(r, !0) : (lt("linear" !== n || r.dataExtent), AD(r))
  25615. }
  25616. return t.prototype.mapValueToVisual = function (t) {
  25617. var e = this._normalizeData(t);
  25618. return this._normalizedToVisual(e, t)
  25619. }, t.prototype.getNormalizer = function () {
  25620. return W(this._normalizeData, this)
  25621. }, t.listVisualTypes = function () {
  25622. return G(t.visualHandlers)
  25623. }, t.isValidType = function (e) {
  25624. return t.visualHandlers.hasOwnProperty(e)
  25625. }, t.eachVisual = function (t, e, n) {
  25626. q(t) ? E(t, e, n) : e.call(n, t)
  25627. }, t.mapVisual = function (e, n, i) {
  25628. var r, o = Y(e) ? [] : q(e) ? {} : (r = !0, null);
  25629. return t.eachVisual(e, (function (t, e) {
  25630. var a = n.call(i, t, e);
  25631. r ? o = a : o[e] = a
  25632. })), o
  25633. }, t.retrieveVisuals = function (e) {
  25634. var n, i = {};
  25635. return e && ID(t.visualHandlers, (function (t, r) {
  25636. e.hasOwnProperty(r) && (i[r] = e[r], n = !0)
  25637. })), n ? i : null
  25638. }, t.prepareVisualTypes = function (t) {
  25639. if (Y(t)) t = t.slice();
  25640. else {
  25641. if (!TD(t)) return [];
  25642. var e = [];
  25643. ID(t, (function (t, n) {
  25644. e.push(n)
  25645. })), t = e
  25646. }
  25647. return t.sort((function (t, e) {
  25648. return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1
  25649. })), t
  25650. }, t.dependsOn = function (t, e) {
  25651. return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e
  25652. }, t.findPieceIndex = function (t, e, n) {
  25653. for (var i, r = 1 / 0, o = 0, a = e.length; o < a; o++) {
  25654. var s = e[o].value;
  25655. if (null != s) {
  25656. if (s === t || U(s) && s === t + "") return o;
  25657. n && c(s, o)
  25658. }
  25659. }
  25660. for (o = 0, a = e.length; o < a; o++) {
  25661. var l = e[o],
  25662. u = l.interval,
  25663. h = l.close;
  25664. if (u) {
  25665. if (u[0] === -1 / 0) {
  25666. if (BD(h[1], t, u[1])) return o
  25667. } else if (u[1] === 1 / 0) {
  25668. if (BD(h[0], u[0], t)) return o
  25669. } else if (BD(h[0], u[0], t) && BD(h[1], t, u[1])) return o;
  25670. n && c(u[0], o), n && c(u[1], o)
  25671. }
  25672. }
  25673. if (n) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : i;
  25674. function c(e, n) {
  25675. var o = Math.abs(e - t);
  25676. o < r && (r = o, i = n)
  25677. }
  25678. }, t.visualHandlers = {
  25679. color: {
  25680. applyVisual: PD("color"),
  25681. getColorMapper: function () {
  25682. var t = this.option;
  25683. return W("category" === t.mappingMethod ? function (t, e) {
  25684. return !e && (t = this._normalizeData(t)), OD.call(this, t)
  25685. } : function (e, n, i) {
  25686. var r = !!i;
  25687. return !n && (e = this._normalizeData(e)), i = Jn(e, t.parsedVisual, i), r ? i : ri(i, "rgba")
  25688. }, this)
  25689. },
  25690. _normalizedToVisual: {
  25691. linear: function (t) {
  25692. return ri(Jn(t, this.option.parsedVisual), "rgba")
  25693. },
  25694. category: OD,
  25695. piecewise: function (t, e) {
  25696. var n = ED.call(this, e);
  25697. return null == n && (n = ri(Jn(t, this.option.parsedVisual), "rgba")), n
  25698. },
  25699. fixed: RD
  25700. }
  25701. },
  25702. colorHue: kD((function (t, e) {
  25703. return ni(t, e)
  25704. })),
  25705. colorSaturation: kD((function (t, e) {
  25706. return ni(t, null, e)
  25707. })),
  25708. colorLightness: kD((function (t, e) {
  25709. return ni(t, null, null, e)
  25710. })),
  25711. colorAlpha: kD((function (t, e) {
  25712. return ii(t, e)
  25713. })),
  25714. decal: {
  25715. applyVisual: PD("decal"),
  25716. _normalizedToVisual: {
  25717. linear: null,
  25718. category: OD,
  25719. piecewise: null,
  25720. fixed: null
  25721. }
  25722. },
  25723. opacity: {
  25724. applyVisual: PD("opacity"),
  25725. _normalizedToVisual: ND([0, 1])
  25726. },
  25727. liftZ: {
  25728. applyVisual: PD("liftZ"),
  25729. _normalizedToVisual: {
  25730. linear: RD,
  25731. category: RD,
  25732. piecewise: RD,
  25733. fixed: RD
  25734. }
  25735. },
  25736. symbol: {
  25737. applyVisual: function (t, e, n) {
  25738. n("symbol", this.mapValueToVisual(t))
  25739. },
  25740. _normalizedToVisual: {
  25741. linear: LD,
  25742. category: OD,
  25743. piecewise: function (t, e) {
  25744. var n = ED.call(this, e);
  25745. return null == n && (n = LD.call(this, t)), n
  25746. },
  25747. fixed: RD
  25748. }
  25749. },
  25750. symbolSize: {
  25751. applyVisual: PD("symbolSize"),
  25752. _normalizedToVisual: ND([0, 1])
  25753. }
  25754. }, t
  25755. }();
  25756. function AD(t, e) {
  25757. var n = t.visual,
  25758. i = [];
  25759. q(n) ? ID(n, (function (t) {
  25760. i.push(t)
  25761. })) : null != n && i.push(n);
  25762. e || 1 !== i.length || {
  25763. color: 1,
  25764. symbol: 1
  25765. }.hasOwnProperty(t.type) || (i[1] = i[0]), zD(t, i)
  25766. }
  25767. function kD(t) {
  25768. return {
  25769. applyVisual: function (e, n, i) {
  25770. var r = this.mapValueToVisual(e);
  25771. i("color", t(n("color"), r))
  25772. },
  25773. _normalizedToVisual: ND([0, 1])
  25774. }
  25775. }
  25776. function LD(t) {
  25777. var e = this.option.visual;
  25778. return e[Math.round(Kr(t, [0, 1], [0, e.length - 1], !0))] || {}
  25779. }
  25780. function PD(t) {
  25781. return function (e, n, i) {
  25782. i(t, this.mapValueToVisual(e))
  25783. }
  25784. }
  25785. function OD(t) {
  25786. var e = this.option.visual;
  25787. return e[this.option.loop && t !== CD ? t % e.length : t]
  25788. }
  25789. function RD() {
  25790. return this.option.visual[0]
  25791. }
  25792. function ND(t) {
  25793. return {
  25794. linear: function (e) {
  25795. return Kr(e, t, this.option.visual, !0)
  25796. },
  25797. category: OD,
  25798. piecewise: function (e, n) {
  25799. var i = ED.call(this, n);
  25800. return null == i && (i = Kr(e, t, this.option.visual, !0)), i
  25801. },
  25802. fixed: RD
  25803. }
  25804. }
  25805. function ED(t) {
  25806. var e = this.option,
  25807. n = e.pieceList;
  25808. if (e.hasSpecialVisual) {
  25809. var i = n[DD.findPieceIndex(t, n)];
  25810. if (i && i.visual) return i.visual[this.type]
  25811. }
  25812. }
  25813. function zD(t, e) {
  25814. return t.visual = e, "color" === t.type && (t.parsedVisual = z(e, (function (t) {
  25815. var e = qn(t);
  25816. return e || [0, 0, 0, 1]
  25817. }))), e
  25818. }
  25819. var VD = {
  25820. linear: function (t) {
  25821. return Kr(t, this.option.dataExtent, [0, 1], !0)
  25822. },
  25823. piecewise: function (t) {
  25824. var e = this.option.pieceList,
  25825. n = DD.findPieceIndex(t, e, !0);
  25826. if (null != n) return Kr(n, [0, e.length - 1], [0, 1], !0)
  25827. },
  25828. category: function (t) {
  25829. var e = this.option.categories ? this.option.categoryMap[t] : t;
  25830. return null == e ? CD : e
  25831. },
  25832. fixed: bt
  25833. };
  25834. function BD(t, e, n) {
  25835. return t ? e <= n : e < n
  25836. }
  25837. var FD = Vo(),
  25838. GD = {
  25839. seriesType: "treemap",
  25840. reset: function (t) {
  25841. var e = t.getData().tree.root;
  25842. e.isRemoved() || WD(e, {}, t.getViewRoot().getAncestors(), t)
  25843. }
  25844. };
  25845. function WD(t, e, n, i) {
  25846. var r = t.getModel(),
  25847. o = t.getLayout(),
  25848. a = t.hostTree.data;
  25849. if (o && !o.invisible && o.isInView) {
  25850. var s, l = r.getModel("itemStyle"),
  25851. u = function (t, e, n) {
  25852. var i = A({}, e),
  25853. r = n.designatedVisualItemStyle;
  25854. return E(["color", "colorAlpha", "colorSaturation"], (function (n) {
  25855. r[n] = e[n];
  25856. var o = t.get(n);
  25857. r[n] = null, null != o && (i[n] = o)
  25858. })), i
  25859. }(l, e, i),
  25860. h = a.ensureUniqueItemVisual(t.dataIndex, "style"),
  25861. c = l.get("borderColor"),
  25862. p = l.get("borderColorSaturation");
  25863. null != p && (c = function (t, e) {
  25864. return null != e ? ni(e, null, null, t) : null
  25865. }(p, s = HD(u))), h.stroke = c;
  25866. var d = t.viewChildren;
  25867. if (d && d.length) {
  25868. var f = function (t, e, n, i, r, o) {
  25869. if (!o || !o.length) return;
  25870. var a = XD(e, "color") || null != r.color && "none" !== r.color && (XD(e, "colorAlpha") || XD(e, "colorSaturation"));
  25871. if (!a) return;
  25872. var s = e.get("visualMin"),
  25873. l = e.get("visualMax"),
  25874. u = n.dataExtent.slice();
  25875. null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l);
  25876. var h = e.get("colorMappingBy"),
  25877. c = {
  25878. type: a.name,
  25879. dataExtent: u,
  25880. visual: a.range
  25881. };
  25882. "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0);
  25883. var p = new DD(c);
  25884. return FD(p).drColorMappingBy = h, p
  25885. }(0, r, o, 0, u, d);
  25886. E(d, (function (t, e) {
  25887. if (t.depth >= n.length || t === n[t.depth]) {
  25888. var o = function (t, e, n, i, r, o) {
  25889. var a = A({}, e);
  25890. if (r) {
  25891. var s = r.type,
  25892. l = "color" === s && FD(r).drColorMappingBy,
  25893. u = "index" === l ? i : "id" === l ? o.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  25894. a[s] = r.mapValueToVisual(u)
  25895. }
  25896. return a
  25897. }(r, u, t, e, f, i);
  25898. WD(t, o, n, i)
  25899. }
  25900. }))
  25901. } else s = HD(u), h.fill = s
  25902. }
  25903. }
  25904. function HD(t) {
  25905. var e = YD(t, "color");
  25906. if (e) {
  25907. var n = YD(t, "colorAlpha"),
  25908. i = YD(t, "colorSaturation");
  25909. return i && (e = ni(e, null, null, i)), n && (e = ii(e, n)), e
  25910. }
  25911. }
  25912. function YD(t, e) {
  25913. var n = t[e];
  25914. if (null != n && "none" !== n) return n
  25915. }
  25916. function XD(t, e) {
  25917. var n = t.get(e);
  25918. return Y(n) && n.length ? {
  25919. name: e,
  25920. range: n
  25921. } : null
  25922. }
  25923. var UD = Math.max,
  25924. ZD = Math.min,
  25925. jD = it,
  25926. qD = E,
  25927. KD = ["itemStyle", "borderWidth"],
  25928. $D = ["itemStyle", "gapWidth"],
  25929. JD = ["upperLabel", "show"],
  25930. QD = ["upperLabel", "height"],
  25931. tA = {
  25932. seriesType: "treemap",
  25933. reset: function (t, e, n, i) {
  25934. var r = n.getWidth(),
  25935. o = n.getHeight(),
  25936. a = t.option,
  25937. s = kp(t.getBoxLayoutParams(), {
  25938. width: n.getWidth(),
  25939. height: n.getHeight()
  25940. }),
  25941. l = a.size || [],
  25942. u = $r(jD(s.width, l[0]), r),
  25943. h = $r(jD(s.height, l[1]), o),
  25944. c = i && i.type,
  25945. p = eD(i, ["treemapZoomToNode", "treemapRootToNode"], t),
  25946. d = "treemapRender" === c || "treemapMove" === c ? i.rootRect : null,
  25947. f = t.getViewRoot(),
  25948. g = nD(f);
  25949. if ("treemapMove" !== c) {
  25950. var y = "treemapZoomToNode" === c ? function (t, e, n, i, r) {
  25951. var o, a = (e || {}).node,
  25952. s = [i, r];
  25953. if (!a || a === n) return s;
  25954. var l = i * r,
  25955. u = l * t.option.zoomToNodeRatio;
  25956. for (; o = a.parentNode;) {
  25957. for (var h = 0, c = o.children, p = 0, d = c.length; p < d; p++) h += c[p].getValue();
  25958. var f = a.getValue();
  25959. if (0 === f) return s;
  25960. u *= h / f;
  25961. var g = o.getModel(),
  25962. y = g.get(KD);
  25963. (u += 4 * y * y + (3 * y + Math.max(y, oA(g))) * Math.pow(u, .5)) > oo && (u = oo), a = o
  25964. }
  25965. u < l && (u = l);
  25966. var v = Math.pow(u / l, .5);
  25967. return [i * v, r * v]
  25968. }(t, p, f, u, h) : d ? [d.width, d.height] : [u, h],
  25969. v = a.sort;
  25970. v && "asc" !== v && "desc" !== v && (v = "desc");
  25971. var m = {
  25972. squareRatio: a.squareRatio,
  25973. sort: v,
  25974. leafDepth: a.leafDepth
  25975. };
  25976. f.hostTree.clearLayouts();
  25977. var x = {
  25978. x: 0,
  25979. y: 0,
  25980. width: y[0],
  25981. height: y[1],
  25982. area: y[0] * y[1]
  25983. };
  25984. f.setLayout(x), eA(f, m, !1, 0), x = f.getLayout(), qD(g, (function (t, e) {
  25985. var n = (g[e + 1] || f).getValue();
  25986. t.setLayout(A({
  25987. dataExtent: [n, n],
  25988. borderWidth: 0,
  25989. upperHeight: 0
  25990. }, x))
  25991. }))
  25992. }
  25993. var _ = t.getData().tree.root;
  25994. _.setLayout(function (t, e, n) {
  25995. if (e) return {
  25996. x: e.x,
  25997. y: e.y
  25998. };
  25999. var i = {
  26000. x: 0,
  26001. y: 0
  26002. };
  26003. if (!n) return i;
  26004. var r = n.node,
  26005. o = r.getLayout();
  26006. if (!o) return i;
  26007. var a = [o.width / 2, o.height / 2],
  26008. s = r;
  26009. for (; s;) {
  26010. var l = s.getLayout();
  26011. a[0] += l.x, a[1] += l.y, s = s.parentNode
  26012. }
  26013. return {
  26014. x: t.width / 2 - a[0],
  26015. y: t.height / 2 - a[1]
  26016. }
  26017. }(s, d, p), !0), t.setLayoutInfo(s), rA(_, new ze(-s.x, -s.y, r, o), g, f, 0)
  26018. }
  26019. };
  26020. function eA(t, e, n, i) {
  26021. var r, o;
  26022. if (!t.isRemoved()) {
  26023. var a = t.getLayout();
  26024. r = a.width, o = a.height;
  26025. var s = t.getModel(),
  26026. l = s.get(KD),
  26027. u = s.get($D) / 2,
  26028. h = oA(s),
  26029. c = Math.max(l, h),
  26030. p = l - u,
  26031. d = c - u;
  26032. t.setLayout({
  26033. borderWidth: l,
  26034. upperHeight: c,
  26035. upperLabelHeight: h
  26036. }, !0);
  26037. var f = (r = UD(r - 2 * p, 0)) * (o = UD(o - p - d, 0)),
  26038. g = function (t, e, n, i, r, o) {
  26039. var a = t.children || [],
  26040. s = i.sort;
  26041. "asc" !== s && "desc" !== s && (s = null);
  26042. var l = null != i.leafDepth && i.leafDepth <= o;
  26043. if (r && !l) return t.viewChildren = [];
  26044. a = B(a, (function (t) {
  26045. return !t.isRemoved()
  26046. })),
  26047. function (t, e) {
  26048. e && t.sort((function (t, n) {
  26049. var i = "asc" === e ? t.getValue() - n.getValue() : n.getValue() - t.getValue();
  26050. return 0 === i ? "asc" === e ? t.dataIndex - n.dataIndex : n.dataIndex - t.dataIndex : i
  26051. }))
  26052. }(a, s);
  26053. var u = function (t, e, n) {
  26054. for (var i = 0, r = 0, o = e.length; r < o; r++) i += e[r].getValue();
  26055. var a, s = t.get("visualDimension");
  26056. e && e.length ? "value" === s && n ? (a = [e[e.length - 1].getValue(), e[0].getValue()], "asc" === n && a.reverse()) : (a = [1 / 0, -1 / 0], qD(e, (function (t) {
  26057. var e = t.getValue(s);
  26058. e < a[0] && (a[0] = e), e > a[1] && (a[1] = e)
  26059. }))) : a = [NaN, NaN];
  26060. return {
  26061. sum: i,
  26062. dataExtent: a
  26063. }
  26064. }(e, a, s);
  26065. if (0 === u.sum) return t.viewChildren = [];
  26066. if (u.sum = function (t, e, n, i, r) {
  26067. if (!i) return n;
  26068. for (var o = t.get("visibleMin"), a = r.length, s = a, l = a - 1; l >= 0; l--) {
  26069. var u = r["asc" === i ? a - l - 1 : l].getValue();
  26070. u / n * e < o && (s = l, n -= u)
  26071. }
  26072. return "asc" === i ? r.splice(0, a - s) : r.splice(s, a - s), n
  26073. }(e, n, u.sum, s, a), 0 === u.sum) return t.viewChildren = [];
  26074. for (var h = 0, c = a.length; h < c; h++) {
  26075. var p = a[h].getValue() / u.sum * n;
  26076. a[h].setLayout({
  26077. area: p
  26078. })
  26079. }
  26080. l && (a.length && t.setLayout({
  26081. isLeafRoot: !0
  26082. }, !0), a.length = 0);
  26083. return t.viewChildren = a, t.setLayout({
  26084. dataExtent: u.dataExtent
  26085. }, !0), a
  26086. }(t, s, f, e, n, i);
  26087. if (g.length) {
  26088. var y = {
  26089. x: p,
  26090. y: d,
  26091. width: r,
  26092. height: o
  26093. },
  26094. v = ZD(r, o),
  26095. m = 1 / 0,
  26096. x = [];
  26097. x.area = 0;
  26098. for (var _ = 0, b = g.length; _ < b;) {
  26099. var w = g[_];
  26100. x.push(w), x.area += w.getLayout().area;
  26101. var S = nA(x, v, e.squareRatio);
  26102. S <= m ? (_++, m = S) : (x.area -= x.pop().getLayout().area, iA(x, v, y, u, !1), v = ZD(y.width, y.height), x.length = x.area = 0, m = 1 / 0)
  26103. }
  26104. if (x.length && iA(x, v, y, u, !0), !n) {
  26105. var M = s.get("childrenVisibleMin");
  26106. null != M && f < M && (n = !0)
  26107. }
  26108. for (_ = 0, b = g.length; _ < b; _++) eA(g[_], e, n, i + 1)
  26109. }
  26110. }
  26111. }
  26112. function nA(t, e, n) {
  26113. for (var i = 0, r = 1 / 0, o = 0, a = void 0, s = t.length; o < s; o++)(a = t[o].getLayout().area) && (a < r && (r = a), a > i && (i = a));
  26114. var l = t.area * t.area,
  26115. u = e * e * n;
  26116. return l ? UD(u * i / l, l / (u * r)) : 1 / 0
  26117. }
  26118. function iA(t, e, n, i, r) {
  26119. var o = e === n.width ? 0 : 1,
  26120. a = 1 - o,
  26121. s = ["x", "y"],
  26122. l = ["width", "height"],
  26123. u = n[s[o]],
  26124. h = e ? t.area / e : 0;
  26125. (r || h > n[l[a]]) && (h = n[l[a]]);
  26126. for (var c = 0, p = t.length; c < p; c++) {
  26127. var d = t[c],
  26128. f = {},
  26129. g = h ? d.getLayout().area / h : 0,
  26130. y = f[l[a]] = UD(h - 2 * i, 0),
  26131. v = n[s[o]] + n[l[o]] - u,
  26132. m = c === p - 1 || v < g ? v : g,
  26133. x = f[l[o]] = UD(m - 2 * i, 0);
  26134. f[s[a]] = n[s[a]] + ZD(i, y / 2), f[s[o]] = u + ZD(i, x / 2), u += m, d.setLayout(f, !0)
  26135. }
  26136. n[s[a]] += h, n[l[a]] -= h
  26137. }
  26138. function rA(t, e, n, i, r) {
  26139. var o = t.getLayout(),
  26140. a = n[r],
  26141. s = a && a === t;
  26142. if (!(a && !s || r === n.length && t !== i)) {
  26143. t.setLayout({
  26144. isInView: !0,
  26145. invisible: !s && !e.intersect(o),
  26146. isAboveViewRoot: s
  26147. }, !0);
  26148. var l = new ze(e.x - o.x, e.y - o.y, e.width, e.height);
  26149. qD(t.viewChildren || [], (function (t) {
  26150. rA(t, l, n, i, r + 1)
  26151. }))
  26152. }
  26153. }
  26154. function oA(t) {
  26155. return t.get(JD) ? t.get(QD) : 0
  26156. }
  26157. function aA(t) {
  26158. var e = t.findComponents({
  26159. mainType: "legend"
  26160. });
  26161. e && e.length && t.eachSeriesByType("graph", (function (t) {
  26162. var n = t.getCategoriesData(),
  26163. i = t.getGraph().data,
  26164. r = n.mapArray(n.getName);
  26165. i.filterSelf((function (t) {
  26166. var n = i.getItemModel(t).getShallow("category");
  26167. if (null != n) {
  26168. j(n) && (n = r[n]);
  26169. for (var o = 0; o < e.length; o++)
  26170. if (!e[o].isSelected(n)) return !1
  26171. }
  26172. return !0
  26173. }))
  26174. }))
  26175. }
  26176. function sA(t) {
  26177. var e = {};
  26178. t.eachSeriesByType("graph", (function (t) {
  26179. var n = t.getCategoriesData(),
  26180. i = t.getData(),
  26181. r = {};
  26182. n.each((function (i) {
  26183. var o = n.getName(i);
  26184. r["ec-" + o] = i;
  26185. var a = n.getItemModel(i),
  26186. s = a.getModel("itemStyle").getItemStyle();
  26187. s.fill || (s.fill = t.getColorFromPalette(o, e)), n.setItemVisual(i, "style", s);
  26188. for (var l = ["symbol", "symbolSize", "symbolKeepAspect"], u = 0; u < l.length; u++) {
  26189. var h = a.getShallow(l[u], !0);
  26190. null != h && n.setItemVisual(i, l[u], h)
  26191. }
  26192. })), n.count() && i.each((function (t) {
  26193. var e = i.getItemModel(t).getShallow("category");
  26194. if (null != e) {
  26195. U(e) && (e = r["ec-" + e]);
  26196. var o = n.getItemVisual(e, "style");
  26197. A(i.ensureUniqueItemVisual(t, "style"), o);
  26198. for (var a = ["symbol", "symbolSize", "symbolKeepAspect"], s = 0; s < a.length; s++) i.setItemVisual(t, a[s], n.getItemVisual(e, a[s]))
  26199. }
  26200. }))
  26201. }))
  26202. }
  26203. function lA(t) {
  26204. return t instanceof Array || (t = [t, t]), t
  26205. }
  26206. function uA(t) {
  26207. t.eachSeriesByType("graph", (function (t) {
  26208. var e = t.getGraph(),
  26209. n = t.getEdgeData(),
  26210. i = lA(t.get("edgeSymbol")),
  26211. r = lA(t.get("edgeSymbolSize"));
  26212. n.setVisual("fromSymbol", i && i[0]), n.setVisual("toSymbol", i && i[1]), n.setVisual("fromSymbolSize", r && r[0]), n.setVisual("toSymbolSize", r && r[1]), n.setVisual("style", t.getModel("lineStyle").getLineStyle()), n.each((function (t) {
  26213. var i = n.getItemModel(t),
  26214. r = e.getEdgeByIndex(t),
  26215. o = lA(i.getShallow("symbol", !0)),
  26216. a = lA(i.getShallow("symbolSize", !0)),
  26217. s = i.getModel("lineStyle").getLineStyle(),
  26218. l = n.ensureUniqueItemVisual(t, "style");
  26219. switch (A(l, s), l.stroke) {
  26220. case "source":
  26221. var u = r.node1.getVisual("style");
  26222. l.stroke = u && u.fill;
  26223. break;
  26224. case "target":
  26225. u = r.node2.getVisual("style");
  26226. l.stroke = u && u.fill
  26227. }
  26228. o[0] && r.setVisual("fromSymbol", o[0]), o[1] && r.setVisual("toSymbol", o[1]), a[0] && r.setVisual("fromSymbolSize", a[0]), a[1] && r.setVisual("toSymbolSize", a[1])
  26229. }))
  26230. }))
  26231. }
  26232. var hA = "--\x3e",
  26233. cA = function (t) {
  26234. return t.get("autoCurveness") || null
  26235. },
  26236. pA = function (t, e) {
  26237. var n = cA(t),
  26238. i = 20,
  26239. r = [];
  26240. if (j(n)) i = n;
  26241. else if (Y(n)) return void(t.__curvenessList = n);
  26242. e > i && (i = e);
  26243. var o = i % 2 ? i + 2 : i + 3;
  26244. r = [];
  26245. for (var a = 0; a < o; a++) r.push((a % 2 ? a + 1 : a) / 10 * (a % 2 ? -1 : 1));
  26246. t.__curvenessList = r
  26247. },
  26248. dA = function (t, e, n) {
  26249. var i = [t.id, t.dataIndex].join("."),
  26250. r = [e.id, e.dataIndex].join(".");
  26251. return [n.uid, i, r].join(hA)
  26252. },
  26253. fA = function (t) {
  26254. var e = t.split(hA);
  26255. return [e[0], e[2], e[1]].join(hA)
  26256. },
  26257. gA = function (t, e) {
  26258. var n = e.__edgeMap;
  26259. return n[t] ? n[t].length : 0
  26260. };
  26261. function yA(t, e, n, i) {
  26262. var r = cA(e),
  26263. o = Y(r);
  26264. if (!r) return null;
  26265. var a = function (t, e) {
  26266. var n = dA(t.node1, t.node2, e);
  26267. return e.__edgeMap[n]
  26268. }(t, e);
  26269. if (!a) return null;
  26270. for (var s = -1, l = 0; l < a.length; l++)
  26271. if (a[l] === n) {
  26272. s = l;
  26273. break
  26274. } var u = function (t, e) {
  26275. return gA(dA(t.node1, t.node2, e), e) + gA(dA(t.node2, t.node1, e), e)
  26276. }(t, e);
  26277. pA(e, u), t.lineStyle = t.lineStyle || {};
  26278. var h = dA(t.node1, t.node2, e),
  26279. c = e.__curvenessList,
  26280. p = o || u % 2 ? 0 : 1;
  26281. if (a.isForward) return c[p + s];
  26282. var d = fA(h),
  26283. f = gA(d, e),
  26284. g = c[s + f + p];
  26285. return i ? o ? r && 0 === r[0] ? (f + p) % 2 ? g : -g : ((f % 2 ? 0 : 1) + p) % 2 ? g : -g : (f + p) % 2 ? g : -g : c[s + f + p]
  26286. }
  26287. function vA(t) {
  26288. var e = t.coordinateSystem;
  26289. if (!e || "view" === e.type) {
  26290. var n = t.getGraph();
  26291. n.eachNode((function (t) {
  26292. var e = t.getModel();
  26293. t.setLayout([+e.get("x"), +e.get("y")])
  26294. })), mA(n, t)
  26295. }
  26296. }
  26297. function mA(t, e) {
  26298. t.eachEdge((function (t, n) {
  26299. var i = ot(t.getModel().get(["lineStyle", "curveness"]), -yA(t, e, n, !0), 0),
  26300. r = Tt(t.node1.getLayout()),
  26301. o = Tt(t.node2.getLayout()),
  26302. a = [r, o]; + i && a.push([(r[0] + o[0]) / 2 - (r[1] - o[1]) * i, (r[1] + o[1]) / 2 - (o[0] - r[0]) * i]), t.setLayout(a)
  26303. }))
  26304. }
  26305. function xA(t, e) {
  26306. t.eachSeriesByType("graph", (function (t) {
  26307. var e = t.get("layout"),
  26308. n = t.coordinateSystem;
  26309. if (n && "view" !== n.type) {
  26310. var i = t.getData(),
  26311. r = [];
  26312. E(n.dimensions, (function (t) {
  26313. r = r.concat(i.mapDimensionsAll(t))
  26314. }));
  26315. for (var o = 0; o < i.count(); o++) {
  26316. for (var a = [], s = !1, l = 0; l < r.length; l++) {
  26317. var u = i.get(r[l], o);
  26318. isNaN(u) || (s = !0), a.push(u)
  26319. }
  26320. s ? i.setItemLayout(o, n.dataToPoint(a)) : i.setItemLayout(o, [NaN, NaN])
  26321. }
  26322. mA(i.graph, t)
  26323. } else e && "none" !== e || vA(t)
  26324. }))
  26325. }
  26326. function _A(t) {
  26327. var e = t.coordinateSystem;
  26328. if ("view" !== e.type) return 1;
  26329. var n = t.option.nodeScaleRatio,
  26330. i = e.scaleX;
  26331. return ((e.getZoom() - 1) * n + 1) / i
  26332. }
  26333. function bA(t) {
  26334. var e = t.getVisual("symbolSize");
  26335. return e instanceof Array && (e = (e[0] + e[1]) / 2), +e
  26336. }
  26337. var wA = Math.PI,
  26338. SA = [];
  26339. function MA(t, e, n, i) {
  26340. var r = t.coordinateSystem;
  26341. if (!r || "view" === r.type) {
  26342. var o = r.getBoundingRect(),
  26343. a = t.getData(),
  26344. s = a.graph,
  26345. l = o.width / 2 + o.x,
  26346. u = o.height / 2 + o.y,
  26347. h = Math.min(o.width, o.height) / 2,
  26348. c = a.count();
  26349. if (a.setLayout({
  26350. cx: l,
  26351. cy: u
  26352. }), c) {
  26353. if (n) {
  26354. var p = r.pointToData(i),
  26355. d = p[0],
  26356. f = p[1],
  26357. g = [d - l, f - u];
  26358. Et(g, g), Nt(g, g, h), n.setLayout([l + g[0], u + g[1]], !0), TA(n, t.get(["circular", "rotateLabel"]), l, u)
  26359. }
  26360. IA[e](t, s, a, h, l, u, c), s.eachEdge((function (e, n) {
  26361. var i, r = ot(e.getModel().get(["lineStyle", "curveness"]), yA(e, t, n), 0),
  26362. o = Tt(e.node1.getLayout()),
  26363. a = Tt(e.node2.getLayout()),
  26364. s = (o[0] + a[0]) / 2,
  26365. h = (o[1] + a[1]) / 2; + r && (i = [l * (r *= 3) + s * (1 - r), u * r + h * (1 - r)]), e.setLayout([o, a, i])
  26366. }))
  26367. }
  26368. }
  26369. }
  26370. var IA = {
  26371. value: function (t, e, n, i, r, o, a) {
  26372. var s = 0,
  26373. l = n.getSum("value"),
  26374. u = 2 * Math.PI / (l || a);
  26375. e.eachNode((function (t) {
  26376. var e = t.getValue("value"),
  26377. n = u * (l ? e : 1) / 2;
  26378. s += n, t.setLayout([i * Math.cos(s) + r, i * Math.sin(s) + o]), s += n
  26379. }))
  26380. },
  26381. symbolSize: function (t, e, n, i, r, o, a) {
  26382. var s = 0;
  26383. SA.length = a;
  26384. var l = _A(t);
  26385. e.eachNode((function (t) {
  26386. var e = bA(t);
  26387. isNaN(e) && (e = 2), e < 0 && (e = 0), e *= l;
  26388. var n = Math.asin(e / 2 / i);
  26389. isNaN(n) && (n = wA / 2), SA[t.dataIndex] = n, s += 2 * n
  26390. }));
  26391. var u = (2 * wA - s) / a / 2,
  26392. h = 0;
  26393. e.eachNode((function (t) {
  26394. var e = u + SA[t.dataIndex];
  26395. h += e, (!t.getLayout() || !t.getLayout().fixed) && t.setLayout([i * Math.cos(h) + r, i * Math.sin(h) + o]), h += e
  26396. }))
  26397. }
  26398. };
  26399. function TA(t, e, n, i) {
  26400. var r = t.getGraphicEl();
  26401. if (r) {
  26402. var o = t.getModel().get(["label", "rotate"]) || 0,
  26403. a = r.getSymbolPath();
  26404. if (e) {
  26405. var s = t.getLayout(),
  26406. l = Math.atan2(s[1] - i, s[0] - n);
  26407. l < 0 && (l = 2 * Math.PI + l);
  26408. var u = s[0] < n;
  26409. u && (l -= Math.PI);
  26410. var h = u ? "left" : "right";
  26411. a.setTextConfig({
  26412. rotation: -l,
  26413. position: h,
  26414. origin: "center"
  26415. });
  26416. var c = a.ensureState("emphasis");
  26417. A(c.textConfig || (c.textConfig = {}), {
  26418. position: h
  26419. })
  26420. } else a.setTextConfig({
  26421. rotation: o *= Math.PI / 180
  26422. })
  26423. }
  26424. }
  26425. function CA(t) {
  26426. t.eachSeriesByType("graph", (function (t) {
  26427. "circular" === t.get("layout") && MA(t, "symbolSize")
  26428. }))
  26429. }
  26430. var DA = At;
  26431. function AA(t) {
  26432. t.eachSeriesByType("graph", (function (t) {
  26433. var e = t.coordinateSystem;
  26434. if (!e || "view" === e.type)
  26435. if ("force" === t.get("layout")) {
  26436. var n = t.preservedPoints || {},
  26437. i = t.getGraph(),
  26438. r = i.data,
  26439. o = i.edgeData,
  26440. a = t.getModel("force"),
  26441. s = a.get("initLayout");
  26442. t.preservedPoints ? r.each((function (t) {
  26443. var e = r.getId(t);
  26444. r.setItemLayout(t, n[e] || [NaN, NaN])
  26445. })) : s && "none" !== s ? "circular" === s && MA(t, "value") : vA(t);
  26446. var l = r.getDataExtent("value"),
  26447. u = o.getDataExtent("value"),
  26448. h = a.get("repulsion"),
  26449. c = a.get("edgeLength"),
  26450. p = Y(h) ? h : [h, h],
  26451. d = Y(c) ? c : [c, c];
  26452. d = [d[1], d[0]];
  26453. var f = r.mapArray("value", (function (t, e) {
  26454. var n = r.getItemLayout(e),
  26455. i = Kr(t, l, p);
  26456. return isNaN(i) && (i = (p[0] + p[1]) / 2), {
  26457. w: i,
  26458. rep: i,
  26459. fixed: r.getItemModel(e).get("fixed"),
  26460. p: !n || isNaN(n[0]) || isNaN(n[1]) ? null : n
  26461. }
  26462. })),
  26463. g = o.mapArray("value", (function (e, n) {
  26464. var r = i.getEdgeByIndex(n),
  26465. o = Kr(e, u, d);
  26466. isNaN(o) && (o = (d[0] + d[1]) / 2);
  26467. var a = r.getModel(),
  26468. s = ot(r.getModel().get(["lineStyle", "curveness"]), -yA(r, t, n, !0), 0);
  26469. return {
  26470. n1: f[r.node1.dataIndex],
  26471. n2: f[r.node2.dataIndex],
  26472. d: o,
  26473. curveness: s,
  26474. ignoreForceLayout: a.get("ignoreForceLayout")
  26475. }
  26476. })),
  26477. y = e.getBoundingRect(),
  26478. v = function (t, e, n) {
  26479. for (var i = t, r = e, o = n.rect, a = o.width, s = o.height, l = [o.x + a / 2, o.y + s / 2], u = null == n.gravity ? .1 : n.gravity, h = 0; h < i.length; h++) {
  26480. var c = i[h];
  26481. c.p || (c.p = Mt(a * (Math.random() - .5) + l[0], s * (Math.random() - .5) + l[1])), c.pp = Tt(c.p), c.edges = null
  26482. }
  26483. var p, d, f = null == n.friction ? .6 : n.friction,
  26484. g = f;
  26485. return {
  26486. warmUp: function () {
  26487. g = .8 * f
  26488. },
  26489. setFixed: function (t) {
  26490. i[t].fixed = !0
  26491. },
  26492. setUnfixed: function (t) {
  26493. i[t].fixed = !1
  26494. },
  26495. beforeStep: function (t) {
  26496. p = t
  26497. },
  26498. afterStep: function (t) {
  26499. d = t
  26500. },
  26501. step: function (t) {
  26502. p && p(i, r);
  26503. for (var e = [], n = i.length, o = 0; o < r.length; o++) {
  26504. var a = r[o];
  26505. if (!a.ignoreForceLayout) {
  26506. var s = a.n1;
  26507. kt(e, (y = a.n2).p, s.p);
  26508. var h = Lt(e) - a.d,
  26509. c = y.w / (s.w + y.w);
  26510. isNaN(c) && (c = 0), Et(e, e), !s.fixed && DA(s.p, s.p, e, c * h * g), !y.fixed && DA(y.p, y.p, e, -(1 - c) * h * g)
  26511. }
  26512. }
  26513. for (o = 0; o < n; o++)(x = i[o]).fixed || (kt(e, l, x.p), DA(x.p, x.p, e, u * g));
  26514. for (o = 0; o < n; o++) {
  26515. s = i[o];
  26516. for (var f = o + 1; f < n; f++) {
  26517. var y;
  26518. kt(e, (y = i[f]).p, s.p), 0 === (h = Lt(e)) && (Ct(e, Math.random() - .5, Math.random() - .5), h = 1);
  26519. var v = (s.rep + y.rep) / h / h;
  26520. !s.fixed && DA(s.pp, s.pp, e, v), !y.fixed && DA(y.pp, y.pp, e, -v)
  26521. }
  26522. }
  26523. var m = [];
  26524. for (o = 0; o < n; o++) {
  26525. var x;
  26526. (x = i[o]).fixed || (kt(m, x.p, x.pp), DA(x.p, x.p, m, g), It(x.pp, x.p))
  26527. }
  26528. var _ = (g *= .992) < .01;
  26529. d && d(i, r, _), t && t(_)
  26530. }
  26531. }
  26532. }(f, g, {
  26533. rect: y,
  26534. gravity: a.get("gravity"),
  26535. friction: a.get("friction")
  26536. });
  26537. v.beforeStep((function (t, e) {
  26538. for (var n = 0, r = t.length; n < r; n++) t[n].fixed && It(t[n].p, i.getNodeByIndex(n).getLayout())
  26539. })), v.afterStep((function (t, e, o) {
  26540. for (var a = 0, s = t.length; a < s; a++) t[a].fixed || i.getNodeByIndex(a).setLayout(t[a].p), n[r.getId(a)] = t[a].p;
  26541. for (a = 0, s = e.length; a < s; a++) {
  26542. var l = e[a],
  26543. u = i.getEdgeByIndex(a),
  26544. h = l.n1.p,
  26545. c = l.n2.p,
  26546. p = u.getLayout();
  26547. (p = p ? p.slice() : [])[0] = p[0] || [], p[1] = p[1] || [], It(p[0], h), It(p[1], c), +l.curveness && (p[2] = [(h[0] + c[0]) / 2 - (h[1] - c[1]) * l.curveness, (h[1] + c[1]) / 2 - (c[0] - h[0]) * l.curveness]), u.setLayout(p)
  26548. }
  26549. })), t.forceLayout = v, t.preservedPoints = n, v.step()
  26550. } else t.forceLayout = null
  26551. }))
  26552. }
  26553. function kA(t, e) {
  26554. var n = [];
  26555. return t.eachSeriesByType("graph", (function (t) {
  26556. var i = t.get("coordinateSystem");
  26557. if (!i || "view" === i) {
  26558. var r = t.getData(),
  26559. o = [],
  26560. a = [];
  26561. Ba(r.mapArray((function (t) {
  26562. var e = r.getItemModel(t);
  26563. return [+e.get("x"), +e.get("y")]
  26564. })), o, a), a[0] - o[0] == 0 && (a[0] += 1, o[0] -= 1), a[1] - o[1] == 0 && (a[1] += 1, o[1] -= 1);
  26565. var s = (a[0] - o[0]) / (a[1] - o[1]),
  26566. l = function (t, e, n) {
  26567. return kp(A(t.getBoxLayoutParams(), {
  26568. aspect: n
  26569. }), {
  26570. width: e.getWidth(),
  26571. height: e.getHeight()
  26572. })
  26573. }(t, e, s);
  26574. isNaN(s) && (o = [l.x, l.y], a = [l.x + l.width, l.y + l.height]);
  26575. var u = a[0] - o[0],
  26576. h = a[1] - o[1],
  26577. c = l.width,
  26578. p = l.height,
  26579. d = t.coordinateSystem = new cC;
  26580. d.zoomLimit = t.get("scaleLimit"), d.setBoundingRect(o[0], o[1], u, h), d.setViewRect(l.x, l.y, c, p), d.setCenter(t.get("center"), e), d.setZoom(t.get("zoom")), n.push(d)
  26581. }
  26582. })), n
  26583. }
  26584. var LA = Ku.prototype,
  26585. PA = th.prototype,
  26586. OA = function () {
  26587. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1
  26588. };
  26589. ! function (t) {
  26590. function e() {
  26591. return null !== t && t.apply(this, arguments) || this
  26592. }
  26593. n(e, t)
  26594. }(OA);
  26595. function RA(t) {
  26596. return isNaN(+t.cpx1) || isNaN(+t.cpy1)
  26597. }
  26598. var NA = function (t) {
  26599. function e(e) {
  26600. var n = t.call(this, e) || this;
  26601. return n.type = "ec-line", n
  26602. }
  26603. return n(e, t), e.prototype.getDefaultStyle = function () {
  26604. return {
  26605. stroke: "#000",
  26606. fill: null
  26607. }
  26608. }, e.prototype.getDefaultShape = function () {
  26609. return new OA
  26610. }, e.prototype.buildPath = function (t, e) {
  26611. RA(e) ? LA.buildPath.call(this, t, e) : PA.buildPath.call(this, t, e)
  26612. }, e.prototype.pointAt = function (t) {
  26613. return RA(this.shape) ? LA.pointAt.call(this, t) : PA.pointAt.call(this, t)
  26614. }, e.prototype.tangentAt = function (t) {
  26615. var e = this.shape,
  26616. n = RA(e) ? [e.x2 - e.x1, e.y2 - e.y1] : PA.tangentAt.call(this, t);
  26617. return Et(n, n)
  26618. }, e
  26619. }(ks),
  26620. EA = ["fromSymbol", "toSymbol"];
  26621. function zA(t) {
  26622. return "_" + t + "Type"
  26623. }
  26624. function VA(t, e, n) {
  26625. var i = e.getItemVisual(n, t);
  26626. if (!i || "none" === i) return i;
  26627. var r = e.getItemVisual(n, t + "Size"),
  26628. o = e.getItemVisual(n, t + "Rotate"),
  26629. a = e.getItemVisual(n, t + "Offset"),
  26630. s = e.getItemVisual(n, t + "KeepAspect"),
  26631. l = Uy(r);
  26632. return i + l + Zy(a || 0, l) + (o || "") + (s || "")
  26633. }
  26634. function BA(t, e, n) {
  26635. var i = e.getItemVisual(n, t);
  26636. if (i && "none" !== i) {
  26637. var r = e.getItemVisual(n, t + "Size"),
  26638. o = e.getItemVisual(n, t + "Rotate"),
  26639. a = e.getItemVisual(n, t + "Offset"),
  26640. s = e.getItemVisual(n, t + "KeepAspect"),
  26641. l = Uy(r),
  26642. u = Zy(a || 0, l),
  26643. h = Xy(i, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  26644. return h.__specifiedRotation = null == o || isNaN(o) ? void 0 : +o * Math.PI / 180 || 0, h.name = t, h
  26645. }
  26646. }
  26647. function FA(t, e) {
  26648. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  26649. var n = e[2];
  26650. n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN)
  26651. }
  26652. var GA = function (t) {
  26653. function e(e, n, i) {
  26654. var r = t.call(this) || this;
  26655. return r._createLine(e, n, i), r
  26656. }
  26657. return n(e, t), e.prototype._createLine = function (t, e, n) {
  26658. var i = t.hostModel,
  26659. r = function (t) {
  26660. var e = new NA({
  26661. name: "line",
  26662. subPixelOptimize: !0
  26663. });
  26664. return FA(e.shape, t), e
  26665. }(t.getItemLayout(e));
  26666. r.shape.percent = 0, mh(r, {
  26667. shape: {
  26668. percent: 1
  26669. }
  26670. }, i, e), this.add(r), E(EA, (function (n) {
  26671. var i = BA(n, t, e);
  26672. this.add(i), this[zA(n)] = VA(n, t, e)
  26673. }), this), this._updateCommonStl(t, e, n)
  26674. }, e.prototype.updateData = function (t, e, n) {
  26675. var i = t.hostModel,
  26676. r = this.childOfName("line"),
  26677. o = t.getItemLayout(e),
  26678. a = {
  26679. shape: {}
  26680. };
  26681. FA(a.shape, o), vh(r, a, i, e), E(EA, (function (n) {
  26682. var i = VA(n, t, e),
  26683. r = zA(n);
  26684. if (this[r] !== i) {
  26685. this.remove(this.childOfName(n));
  26686. var o = BA(n, t, e);
  26687. this.add(o)
  26688. }
  26689. this[r] = i
  26690. }), this), this._updateCommonStl(t, e, n)
  26691. }, e.prototype.getLinePath = function () {
  26692. return this.childAt(0)
  26693. }, e.prototype._updateCommonStl = function (t, e, n) {
  26694. var i = t.hostModel,
  26695. r = this.childOfName("line"),
  26696. o = n && n.emphasisLineStyle,
  26697. a = n && n.blurLineStyle,
  26698. s = n && n.selectLineStyle,
  26699. l = n && n.labelStatesModels,
  26700. u = n && n.emphasisDisabled,
  26701. h = n && n.focus,
  26702. c = n && n.blurScope;
  26703. if (!n || t.hasItemOption) {
  26704. var p = t.getItemModel(e),
  26705. d = p.getModel("emphasis");
  26706. o = d.getModel("lineStyle").getLineStyle(), a = p.getModel(["blur", "lineStyle"]).getLineStyle(), s = p.getModel(["select", "lineStyle"]).getLineStyle(), u = d.get("disabled"), h = d.get("focus"), c = d.get("blurScope"), l = rc(p)
  26707. }
  26708. var f = t.getItemVisual(e, "style"),
  26709. g = f.stroke;
  26710. r.useStyle(f), r.style.fill = null, r.style.strokeNoScale = !0, r.ensureState("emphasis").style = o, r.ensureState("blur").style = a, r.ensureState("select").style = s, E(EA, (function (t) {
  26711. var e = this.childOfName(t);
  26712. if (e) {
  26713. e.setColor(g), e.style.opacity = f.opacity;
  26714. for (var n = 0; n < hl.length; n++) {
  26715. var i = hl[n],
  26716. o = r.getState(i);
  26717. if (o) {
  26718. var a = o.style || {},
  26719. s = e.ensureState(i),
  26720. l = s.style || (s.style = {});
  26721. null != a.stroke && (l[e.__isEmptyBrush ? "stroke" : "fill"] = a.stroke), null != a.opacity && (l.opacity = a.opacity)
  26722. }
  26723. }
  26724. e.markRedraw()
  26725. }
  26726. }), this);
  26727. var y = i.getRawValue(e);
  26728. ic(this, l, {
  26729. labelDataIndex: e,
  26730. labelFetcher: {
  26731. getFormattedLabel: function (e, n) {
  26732. return i.getFormattedLabel(e, n, t.dataType)
  26733. }
  26734. },
  26735. inheritColor: g || "#000",
  26736. defaultOpacity: f.opacity,
  26737. defaultText: (null == y ? t.getName(e) : isFinite(y) ? Jr(y) : y) + ""
  26738. });
  26739. var v = this.getTextContent();
  26740. if (v) {
  26741. var m = l.normal;
  26742. v.__align = v.style.align, v.__verticalAlign = v.style.verticalAlign, v.__position = m.get("position") || "middle";
  26743. var x = m.get("distance");
  26744. Y(x) || (x = [x, x]), v.__labelDistance = x
  26745. }
  26746. this.setTextConfig({
  26747. position: null,
  26748. local: !0,
  26749. inside: !1
  26750. }), Zl(this, h, c, u)
  26751. }, e.prototype.highlight = function () {
  26752. Ol(this)
  26753. }, e.prototype.downplay = function () {
  26754. Rl(this)
  26755. }, e.prototype.updateLayout = function (t, e) {
  26756. this.setLinePoints(t.getItemLayout(e))
  26757. }, e.prototype.setLinePoints = function (t) {
  26758. var e = this.childOfName("line");
  26759. FA(e.shape, t), e.dirty()
  26760. }, e.prototype.beforeUpdate = function () {
  26761. var t = this,
  26762. e = t.childOfName("fromSymbol"),
  26763. n = t.childOfName("toSymbol"),
  26764. i = t.getTextContent();
  26765. if (e || n || i && !i.ignore) {
  26766. for (var r = 1, o = this.parent; o;) o.scaleX && (r /= o.scaleX), o = o.parent;
  26767. var a = t.childOfName("line");
  26768. if (this.__dirty || a.__dirty) {
  26769. var s = a.shape.percent,
  26770. l = a.pointAt(0),
  26771. u = a.pointAt(s),
  26772. h = kt([], u, l);
  26773. if (Et(h, h), e && (e.setPosition(l), S(e, 0), e.scaleX = e.scaleY = r * s, e.markRedraw()), n && (n.setPosition(u), S(n, 1), n.scaleX = n.scaleY = r * s, n.markRedraw()), i && !i.ignore) {
  26774. i.x = i.y = 0, i.originX = i.originY = 0;
  26775. var c = void 0,
  26776. p = void 0,
  26777. d = i.__labelDistance,
  26778. f = d[0] * r,
  26779. g = d[1] * r,
  26780. y = s / 2,
  26781. v = a.tangentAt(y),
  26782. m = [v[1], -v[0]],
  26783. x = a.pointAt(y);
  26784. m[1] > 0 && (m[0] = -m[0], m[1] = -m[1]);
  26785. var _ = v[0] < 0 ? -1 : 1;
  26786. if ("start" !== i.__position && "end" !== i.__position) {
  26787. var b = -Math.atan2(v[1], v[0]);
  26788. u[0] < l[0] && (b = Math.PI + b), i.rotation = b
  26789. }
  26790. var w = void 0;
  26791. switch (i.__position) {
  26792. case "insideStartTop":
  26793. case "insideMiddleTop":
  26794. case "insideEndTop":
  26795. case "middle":
  26796. w = -g, p = "bottom";
  26797. break;
  26798. case "insideStartBottom":
  26799. case "insideMiddleBottom":
  26800. case "insideEndBottom":
  26801. w = g, p = "top";
  26802. break;
  26803. default:
  26804. w = 0, p = "middle"
  26805. }
  26806. switch (i.__position) {
  26807. case "end":
  26808. i.x = h[0] * f + u[0], i.y = h[1] * g + u[1], c = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";
  26809. break;
  26810. case "start":
  26811. i.x = -h[0] * f + l[0], i.y = -h[1] * g + l[1], c = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
  26812. break;
  26813. case "insideStartTop":
  26814. case "insideStart":
  26815. case "insideStartBottom":
  26816. i.x = f * _ + l[0], i.y = l[1] + w, c = v[0] < 0 ? "right" : "left", i.originX = -f * _, i.originY = -w;
  26817. break;
  26818. case "insideMiddleTop":
  26819. case "insideMiddle":
  26820. case "insideMiddleBottom":
  26821. case "middle":
  26822. i.x = x[0], i.y = x[1] + w, c = "center", i.originY = -w;
  26823. break;
  26824. case "insideEndTop":
  26825. case "insideEnd":
  26826. case "insideEndBottom":
  26827. i.x = -f * _ + u[0], i.y = u[1] + w, c = v[0] >= 0 ? "right" : "left", i.originX = f * _, i.originY = -w
  26828. }
  26829. i.scaleX = i.scaleY = r, i.setStyle({
  26830. verticalAlign: i.__verticalAlign || p,
  26831. align: i.__align || c
  26832. })
  26833. }
  26834. }
  26835. }
  26836. function S(t, e) {
  26837. var n = t.__specifiedRotation;
  26838. if (null == n) {
  26839. var i = a.tangentAt(e);
  26840. t.attr("rotation", (1 === e ? -1 : 1) * Math.PI / 2 - Math.atan2(i[1], i[0]))
  26841. } else t.attr("rotation", n)
  26842. }
  26843. }, e
  26844. }(Br),
  26845. WA = function () {
  26846. function t(t) {
  26847. this.group = new Br, this._LineCtor = t || GA
  26848. }
  26849. return t.prototype.updateData = function (t) {
  26850. var e = this;
  26851. this._progressiveEls = null;
  26852. var n = this,
  26853. i = n.group,
  26854. r = n._lineData;
  26855. n._lineData = t, r || i.removeAll();
  26856. var o = HA(t);
  26857. t.diff(r).add((function (n) {
  26858. e._doAdd(t, n, o)
  26859. })).update((function (n, i) {
  26860. e._doUpdate(r, t, i, n, o)
  26861. })).remove((function (t) {
  26862. i.remove(r.getItemGraphicEl(t))
  26863. })).execute()
  26864. }, t.prototype.updateLayout = function () {
  26865. var t = this._lineData;
  26866. t && t.eachItemGraphicEl((function (e, n) {
  26867. e.updateLayout(t, n)
  26868. }), this)
  26869. }, t.prototype.incrementalPrepareUpdate = function (t) {
  26870. this._seriesScope = HA(t), this._lineData = null, this.group.removeAll()
  26871. }, t.prototype.incrementalUpdate = function (t, e) {
  26872. function n(t) {
  26873. t.isGroup || function (t) {
  26874. return t.animators && t.animators.length > 0
  26875. }(t) || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  26876. }
  26877. this._progressiveEls = [];
  26878. for (var i = t.start; i < t.end; i++) {
  26879. if (XA(e.getItemLayout(i))) {
  26880. var r = new this._LineCtor(e, i, this._seriesScope);
  26881. r.traverse(n), this.group.add(r), e.setItemGraphicEl(i, r), this._progressiveEls.push(r)
  26882. }
  26883. }
  26884. }, t.prototype.remove = function () {
  26885. this.group.removeAll()
  26886. }, t.prototype.eachRendered = function (t) {
  26887. Jh(this._progressiveEls || this.group, t)
  26888. }, t.prototype._doAdd = function (t, e, n) {
  26889. if (XA(t.getItemLayout(e))) {
  26890. var i = new this._LineCtor(t, e, n);
  26891. t.setItemGraphicEl(e, i), this.group.add(i)
  26892. }
  26893. }, t.prototype._doUpdate = function (t, e, n, i, r) {
  26894. var o = t.getItemGraphicEl(n);
  26895. XA(e.getItemLayout(i)) ? (o ? o.updateData(e, i, r) : o = new this._LineCtor(e, i, r), e.setItemGraphicEl(i, o), this.group.add(o)) : this.group.remove(o)
  26896. }, t
  26897. }();
  26898. function HA(t) {
  26899. var e = t.hostModel,
  26900. n = e.getModel("emphasis");
  26901. return {
  26902. lineStyle: e.getModel("lineStyle").getLineStyle(),
  26903. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  26904. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  26905. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  26906. emphasisDisabled: n.get("disabled"),
  26907. blurScope: n.get("blurScope"),
  26908. focus: n.get("focus"),
  26909. labelStatesModels: rc(e)
  26910. }
  26911. }
  26912. function YA(t) {
  26913. return isNaN(t[0]) || isNaN(t[1])
  26914. }
  26915. function XA(t) {
  26916. return t && !YA(t[0]) && !YA(t[1])
  26917. }
  26918. var UA = [],
  26919. ZA = [],
  26920. jA = [],
  26921. qA = In,
  26922. KA = Ft,
  26923. $A = Math.abs;
  26924. function JA(t, e, n) {
  26925. for (var i, r = t[0], o = t[1], a = t[2], s = 1 / 0, l = n * n, u = .1, h = .1; h <= .9; h += .1) {
  26926. UA[0] = qA(r[0], o[0], a[0], h), UA[1] = qA(r[1], o[1], a[1], h), (d = $A(KA(UA, e) - l)) < s && (s = d, i = h)
  26927. }
  26928. for (var c = 0; c < 32; c++) {
  26929. var p = i + u;
  26930. ZA[0] = qA(r[0], o[0], a[0], i), ZA[1] = qA(r[1], o[1], a[1], i), jA[0] = qA(r[0], o[0], a[0], p), jA[1] = qA(r[1], o[1], a[1], p);
  26931. var d = KA(ZA, e) - l;
  26932. if ($A(d) < .01) break;
  26933. var f = KA(jA, e) - l;
  26934. u /= 2, d < 0 ? f >= 0 ? i += u : i -= u : f >= 0 ? i -= u : i += u
  26935. }
  26936. return i
  26937. }
  26938. function QA(t, e) {
  26939. var n = [],
  26940. i = Dn,
  26941. r = [
  26942. [],
  26943. [],
  26944. []
  26945. ],
  26946. o = [
  26947. [],
  26948. []
  26949. ],
  26950. a = [];
  26951. e /= 2, t.eachEdge((function (t, s) {
  26952. var l = t.getLayout(),
  26953. u = t.getVisual("fromSymbol"),
  26954. h = t.getVisual("toSymbol");
  26955. l.__original || (l.__original = [Tt(l[0]), Tt(l[1])], l[2] && l.__original.push(Tt(l[2])));
  26956. var c = l.__original;
  26957. if (null != l[2]) {
  26958. if (It(r[0], c[0]), It(r[1], c[2]), It(r[2], c[1]), u && "none" !== u) {
  26959. var p = bA(t.node1),
  26960. d = JA(r, c[0], p * e);
  26961. i(r[0][0], r[1][0], r[2][0], d, n), r[0][0] = n[3], r[1][0] = n[4], i(r[0][1], r[1][1], r[2][1], d, n), r[0][1] = n[3], r[1][1] = n[4]
  26962. }
  26963. if (h && "none" !== h) {
  26964. p = bA(t.node2), d = JA(r, c[1], p * e);
  26965. i(r[0][0], r[1][0], r[2][0], d, n), r[1][0] = n[1], r[2][0] = n[2], i(r[0][1], r[1][1], r[2][1], d, n), r[1][1] = n[1], r[2][1] = n[2]
  26966. }
  26967. It(l[0], r[0]), It(l[1], r[2]), It(l[2], r[1])
  26968. } else {
  26969. if (It(o[0], c[0]), It(o[1], c[1]), kt(a, o[1], o[0]), Et(a, a), u && "none" !== u) {
  26970. p = bA(t.node1);
  26971. At(o[0], o[0], a, p * e)
  26972. }
  26973. if (h && "none" !== h) {
  26974. p = bA(t.node2);
  26975. At(o[1], o[1], a, -p * e)
  26976. }
  26977. It(l[0], o[0]), It(l[1], o[1])
  26978. }
  26979. }))
  26980. }
  26981. function tk(t) {
  26982. return "view" === t.type
  26983. }
  26984. var ek = function (t) {
  26985. function e() {
  26986. var n = null !== t && t.apply(this, arguments) || this;
  26987. return n.type = e.type, n
  26988. }
  26989. return n(e, t), e.prototype.init = function (t, e) {
  26990. var n = new mS,
  26991. i = new WA,
  26992. r = this.group;
  26993. this._controller = new tT(e.getZr()), this._controllerHost = {
  26994. target: r
  26995. }, r.add(n.group), r.add(i.group), this._symbolDraw = n, this._lineDraw = i, this._firstRender = !0
  26996. }, e.prototype.render = function (t, e, n) {
  26997. var i = this,
  26998. r = t.coordinateSystem;
  26999. this._model = t;
  27000. var o = this._symbolDraw,
  27001. a = this._lineDraw,
  27002. s = this.group;
  27003. if (tk(r)) {
  27004. var l = {
  27005. x: r.x,
  27006. y: r.y,
  27007. scaleX: r.scaleX,
  27008. scaleY: r.scaleY
  27009. };
  27010. this._firstRender ? s.attr(l) : vh(s, l, t)
  27011. }
  27012. QA(t.getGraph(), _A(t));
  27013. var u = t.getData();
  27014. o.updateData(u);
  27015. var h = t.getEdgeData();
  27016. a.updateData(h), this._updateNodeAndLinkScale(), this._updateController(t, e, n), clearTimeout(this._layoutTimeout);
  27017. var c = t.forceLayout,
  27018. p = t.get(["force", "layoutAnimation"]);
  27019. c && this._startForceLayoutIteration(c, p);
  27020. var d = t.get("layout");
  27021. u.graph.eachNode((function (e) {
  27022. var n = e.dataIndex,
  27023. r = e.getGraphicEl(),
  27024. o = e.getModel();
  27025. if (r) {
  27026. r.off("drag").off("dragend");
  27027. var a = o.get("draggable");
  27028. a && r.on("drag", (function (o) {
  27029. switch (d) {
  27030. case "force":
  27031. c.warmUp(), !i._layouting && i._startForceLayoutIteration(c, p), c.setFixed(n), u.setItemLayout(n, [r.x, r.y]);
  27032. break;
  27033. case "circular":
  27034. u.setItemLayout(n, [r.x, r.y]), e.setLayout({
  27035. fixed: !0
  27036. }, !0), MA(t, "symbolSize", e, [o.offsetX, o.offsetY]), i.updateLayout(t);
  27037. break;
  27038. default:
  27039. u.setItemLayout(n, [r.x, r.y]), mA(t.getGraph(), t), i.updateLayout(t)
  27040. }
  27041. })).on("dragend", (function () {
  27042. c && c.setUnfixed(n)
  27043. })), r.setDraggable(a, !!o.get("cursor")), "adjacency" === o.get(["emphasis", "focus"]) && (rl(r).focus = e.getAdjacentDataIndices())
  27044. }
  27045. })), u.graph.eachEdge((function (t) {
  27046. var e = t.getGraphicEl(),
  27047. n = t.getModel().get(["emphasis", "focus"]);
  27048. e && "adjacency" === n && (rl(e).focus = {
  27049. edge: [t.dataIndex],
  27050. node: [t.node1.dataIndex, t.node2.dataIndex]
  27051. })
  27052. }));
  27053. var f = "circular" === t.get("layout") && t.get(["circular", "rotateLabel"]),
  27054. g = u.getLayout("cx"),
  27055. y = u.getLayout("cy");
  27056. u.graph.eachNode((function (t) {
  27057. TA(t, f, g, y)
  27058. })), this._firstRender = !1
  27059. }, e.prototype.dispose = function () {
  27060. this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null
  27061. }, e.prototype._startForceLayoutIteration = function (t, e) {
  27062. var n = this;
  27063. ! function i() {
  27064. t.step((function (t) {
  27065. n.updateLayout(n._model), (n._layouting = !t) && (e ? n._layoutTimeout = setTimeout(i, 16) : i())
  27066. }))
  27067. }()
  27068. }, e.prototype._updateController = function (t, e, n) {
  27069. var i = this,
  27070. r = this._controller,
  27071. o = this._controllerHost,
  27072. a = this.group;
  27073. r.setPointerChecker((function (e, i, r) {
  27074. var o = a.getBoundingRect();
  27075. return o.applyTransform(a.transform), o.contain(i, r) && !lT(e, n, t)
  27076. })), tk(t.coordinateSystem) ? (r.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), r.off("pan").off("zoom").on("pan", (function (e) {
  27077. rT(o, e.dx, e.dy), n.dispatchAction({
  27078. seriesId: t.id,
  27079. type: "graphRoam",
  27080. dx: e.dx,
  27081. dy: e.dy
  27082. })
  27083. })).on("zoom", (function (e) {
  27084. oT(o, e.scale, e.originX, e.originY), n.dispatchAction({
  27085. seriesId: t.id,
  27086. type: "graphRoam",
  27087. zoom: e.scale,
  27088. originX: e.originX,
  27089. originY: e.originY
  27090. }), i._updateNodeAndLinkScale(), QA(t.getGraph(), _A(t)), i._lineDraw.updateLayout(), n.updateLabelLayout()
  27091. }))) : r.disable()
  27092. }, e.prototype._updateNodeAndLinkScale = function () {
  27093. var t = this._model,
  27094. e = t.getData(),
  27095. n = _A(t);
  27096. e.eachItemGraphicEl((function (t, e) {
  27097. t && t.setSymbolScale(n)
  27098. }))
  27099. }, e.prototype.updateLayout = function (t) {
  27100. QA(t.getGraph(), _A(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout()
  27101. }, e.prototype.remove = function () {
  27102. clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove()
  27103. }, e.type = "graph", e
  27104. }(Og);
  27105. function nk(t) {
  27106. return "_EC_" + t
  27107. }
  27108. var ik = function () {
  27109. function t(t) {
  27110. this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = t || !1
  27111. }
  27112. return t.prototype.isDirected = function () {
  27113. return this._directed
  27114. }, t.prototype.addNode = function (t, e) {
  27115. t = null == t ? "" + e : "" + t;
  27116. var n = this._nodesMap;
  27117. if (!n[nk(t)]) {
  27118. var i = new rk(t, e);
  27119. return i.hostGraph = this, this.nodes.push(i), n[nk(t)] = i, i
  27120. }
  27121. }, t.prototype.getNodeByIndex = function (t) {
  27122. var e = this.data.getRawIndex(t);
  27123. return this.nodes[e]
  27124. }, t.prototype.getNodeById = function (t) {
  27125. return this._nodesMap[nk(t)]
  27126. }, t.prototype.addEdge = function (t, e, n) {
  27127. var i = this._nodesMap,
  27128. r = this._edgesMap;
  27129. if (j(t) && (t = this.nodes[t]), j(e) && (e = this.nodes[e]), t instanceof rk || (t = i[nk(t)]), e instanceof rk || (e = i[nk(e)]), t && e) {
  27130. var o = t.id + "-" + e.id,
  27131. a = new ok(t, e, n);
  27132. return a.hostGraph = this, this._directed && (t.outEdges.push(a), e.inEdges.push(a)), t.edges.push(a), t !== e && e.edges.push(a), this.edges.push(a), r[o] = a, a
  27133. }
  27134. }, t.prototype.getEdgeByIndex = function (t) {
  27135. var e = this.edgeData.getRawIndex(t);
  27136. return this.edges[e]
  27137. }, t.prototype.getEdge = function (t, e) {
  27138. t instanceof rk && (t = t.id), e instanceof rk && (e = e.id);
  27139. var n = this._edgesMap;
  27140. return this._directed ? n[t + "-" + e] : n[t + "-" + e] || n[e + "-" + t]
  27141. }, t.prototype.eachNode = function (t, e) {
  27142. for (var n = this.nodes, i = n.length, r = 0; r < i; r++) n[r].dataIndex >= 0 && t.call(e, n[r], r)
  27143. }, t.prototype.eachEdge = function (t, e) {
  27144. for (var n = this.edges, i = n.length, r = 0; r < i; r++) n[r].dataIndex >= 0 && n[r].node1.dataIndex >= 0 && n[r].node2.dataIndex >= 0 && t.call(e, n[r], r)
  27145. }, t.prototype.breadthFirstTraverse = function (t, e, n, i) {
  27146. if (e instanceof rk || (e = this._nodesMap[nk(e)]), e) {
  27147. for (var r = "out" === n ? "outEdges" : "in" === n ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++) this.nodes[o].__visited = !1;
  27148. if (!t.call(i, e, null))
  27149. for (var a = [e]; a.length;) {
  27150. var s = a.shift(),
  27151. l = s[r];
  27152. for (o = 0; o < l.length; o++) {
  27153. var u = l[o],
  27154. h = u.node1 === s ? u.node2 : u.node1;
  27155. if (!h.__visited) {
  27156. if (t.call(i, h, s)) return;
  27157. a.push(h), h.__visited = !0
  27158. }
  27159. }
  27160. }
  27161. }
  27162. }, t.prototype.update = function () {
  27163. for (var t = this.data, e = this.edgeData, n = this.nodes, i = this.edges, r = 0, o = n.length; r < o; r++) n[r].dataIndex = -1;
  27164. for (r = 0, o = t.count(); r < o; r++) n[t.getRawIndex(r)].dataIndex = r;
  27165. e.filterSelf((function (t) {
  27166. var n = i[e.getRawIndex(t)];
  27167. return n.node1.dataIndex >= 0 && n.node2.dataIndex >= 0
  27168. }));
  27169. for (r = 0, o = i.length; r < o; r++) i[r].dataIndex = -1;
  27170. for (r = 0, o = e.count(); r < o; r++) i[e.getRawIndex(r)].dataIndex = r
  27171. }, t.prototype.clone = function () {
  27172. for (var e = new t(this._directed), n = this.nodes, i = this.edges, r = 0; r < n.length; r++) e.addNode(n[r].id, n[r].dataIndex);
  27173. for (r = 0; r < i.length; r++) {
  27174. var o = i[r];
  27175. e.addEdge(o.node1.id, o.node2.id, o.dataIndex)
  27176. }
  27177. return e
  27178. }, t
  27179. }(),
  27180. rk = function () {
  27181. function t(t, e) {
  27182. this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = null == t ? "" : t, this.dataIndex = null == e ? -1 : e
  27183. }
  27184. return t.prototype.degree = function () {
  27185. return this.edges.length
  27186. }, t.prototype.inDegree = function () {
  27187. return this.inEdges.length
  27188. }, t.prototype.outDegree = function () {
  27189. return this.outEdges.length
  27190. }, t.prototype.getModel = function (t) {
  27191. if (!(this.dataIndex < 0)) return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)
  27192. }, t.prototype.getAdjacentDataIndices = function () {
  27193. for (var t = {
  27194. edge: [],
  27195. node: []
  27196. }, e = 0; e < this.edges.length; e++) {
  27197. var n = this.edges[e];
  27198. n.dataIndex < 0 || (t.edge.push(n.dataIndex), t.node.push(n.node1.dataIndex, n.node2.dataIndex))
  27199. }
  27200. return t
  27201. }, t.prototype.getTrajectoryDataIndices = function () {
  27202. for (var t = yt(), e = yt(), n = 0; n < this.edges.length; n++) {
  27203. var i = this.edges[n];
  27204. if (!(i.dataIndex < 0)) {
  27205. t.set(i.dataIndex, !0);
  27206. for (var r = [i.node1], o = [i.node2], a = 0; a < r.length;) {
  27207. var s = r[a];
  27208. a++, e.set(s.dataIndex, !0);
  27209. for (var l = 0; l < s.inEdges.length; l++) t.set(s.inEdges[l].dataIndex, !0), r.push(s.inEdges[l].node1)
  27210. }
  27211. for (a = 0; a < o.length;) {
  27212. var u = o[a];
  27213. a++, e.set(u.dataIndex, !0);
  27214. for (l = 0; l < u.outEdges.length; l++) t.set(u.outEdges[l].dataIndex, !0), o.push(u.outEdges[l].node2)
  27215. }
  27216. }
  27217. }
  27218. return {
  27219. edge: t.keys(),
  27220. node: e.keys()
  27221. }
  27222. }, t
  27223. }(),
  27224. ok = function () {
  27225. function t(t, e, n) {
  27226. this.dataIndex = -1, this.node1 = t, this.node2 = e, this.dataIndex = null == n ? -1 : n
  27227. }
  27228. return t.prototype.getModel = function (t) {
  27229. if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)
  27230. }, t.prototype.getAdjacentDataIndices = function () {
  27231. return {
  27232. edge: [this.dataIndex],
  27233. node: [this.node1.dataIndex, this.node2.dataIndex]
  27234. }
  27235. }, t.prototype.getTrajectoryDataIndices = function () {
  27236. var t = yt(),
  27237. e = yt();
  27238. t.set(this.dataIndex, !0);
  27239. for (var n = [this.node1], i = [this.node2], r = 0; r < n.length;) {
  27240. var o = n[r];
  27241. r++, e.set(o.dataIndex, !0);
  27242. for (var a = 0; a < o.inEdges.length; a++) t.set(o.inEdges[a].dataIndex, !0), n.push(o.inEdges[a].node1)
  27243. }
  27244. for (r = 0; r < i.length;) {
  27245. var s = i[r];
  27246. r++, e.set(s.dataIndex, !0);
  27247. for (a = 0; a < s.outEdges.length; a++) t.set(s.outEdges[a].dataIndex, !0), i.push(s.outEdges[a].node2)
  27248. }
  27249. return {
  27250. edge: t.keys(),
  27251. node: e.keys()
  27252. }
  27253. }, t
  27254. }();
  27255. function ak(t, e) {
  27256. return {
  27257. getValue: function (n) {
  27258. var i = this[t][e];
  27259. return i.getStore().get(i.getDimensionIndex(n || "value"), this.dataIndex)
  27260. },
  27261. setVisual: function (n, i) {
  27262. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, i)
  27263. },
  27264. getVisual: function (n) {
  27265. return this[t][e].getItemVisual(this.dataIndex, n)
  27266. },
  27267. setLayout: function (n, i) {
  27268. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, i)
  27269. },
  27270. getLayout: function () {
  27271. return this[t][e].getItemLayout(this.dataIndex)
  27272. },
  27273. getGraphicEl: function () {
  27274. return this[t][e].getItemGraphicEl(this.dataIndex)
  27275. },
  27276. getRawIndex: function () {
  27277. return this[t][e].getRawIndex(this.dataIndex)
  27278. }
  27279. }
  27280. }
  27281. function sk(t, e, n, i, r) {
  27282. for (var o = new ik(i), a = 0; a < t.length; a++) o.addNode(it(t[a].id, t[a].name, a), a);
  27283. var s = [],
  27284. l = [],
  27285. u = 0;
  27286. for (a = 0; a < e.length; a++) {
  27287. var h = e[a],
  27288. c = h.source,
  27289. p = h.target;
  27290. o.addEdge(c, p, u) && (l.push(h), s.push(it(Ro(h.id, null), c + " > " + p)), u++)
  27291. }
  27292. var d, f = n.get("coordinateSystem");
  27293. if ("cartesian2d" === f || "polar" === f) d = _x(t, n);
  27294. else {
  27295. var g = wd.get(f),
  27296. y = g && g.dimensions || [];
  27297. P(y, "value") < 0 && y.concat(["value"]);
  27298. var v = px(t, {
  27299. coordDimensions: y,
  27300. encodeDefine: n.getEncode()
  27301. }).dimensions;
  27302. (d = new cx(v, n)).initData(t)
  27303. }
  27304. var m = new cx(["value"], n);
  27305. return m.initData(l, s), r && r(d, m), XC({
  27306. mainData: d,
  27307. struct: o,
  27308. structAttr: "graph",
  27309. datas: {
  27310. node: d,
  27311. edge: m
  27312. },
  27313. datasAttr: {
  27314. node: "data",
  27315. edge: "edgeData"
  27316. }
  27317. }), o.update(), o
  27318. }
  27319. R(rk, ak("hostGraph", "data")), R(ok, ak("hostGraph", "edgeData"));
  27320. var lk = function (t) {
  27321. function e() {
  27322. var n = null !== t && t.apply(this, arguments) || this;
  27323. return n.type = e.type, n.hasSymbolVisual = !0, n
  27324. }
  27325. return n(e, t), e.prototype.init = function (e) {
  27326. t.prototype.init.apply(this, arguments);
  27327. var n = this;
  27328. function i() {
  27329. return n._categoriesData
  27330. }
  27331. this.legendVisualProvider = new OM(i, i), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
  27332. }, e.prototype.mergeOption = function (e) {
  27333. t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(e.edges || e.links), this._updateCategoriesData()
  27334. }, e.prototype.mergeDefaultAndTheme = function (e) {
  27335. t.prototype.mergeDefaultAndTheme.apply(this, arguments), Co(e, "edgeLabel", ["show"])
  27336. }, e.prototype.getInitialData = function (t, e) {
  27337. var n, i = t.edges || t.links || [],
  27338. r = t.data || t.nodes || [],
  27339. o = this;
  27340. if (r && i) {
  27341. cA(n = this) && (n.__curvenessList = [], n.__edgeMap = {}, pA(n));
  27342. var a = sk(r, i, this, !0, (function (t, e) {
  27343. t.wrapMethod("getItemModel", (function (t) {
  27344. var e = o._categoriesModels[t.getShallow("category")];
  27345. return e && (e.parentModel = t.parentModel, t.parentModel = e), t
  27346. }));
  27347. var n = Cc.prototype.getModel;
  27348. function i(t, e) {
  27349. var i = n.call(this, t, e);
  27350. return i.resolveParentPath = r, i
  27351. }
  27352. function r(t) {
  27353. if (t && ("label" === t[0] || "label" === t[1])) {
  27354. var e = t.slice();
  27355. return "label" === t[0] ? e[0] = "edgeLabel" : "label" === t[1] && (e[1] = "edgeLabel"), e
  27356. }
  27357. return t
  27358. }
  27359. e.wrapMethod("getItemModel", (function (t) {
  27360. return t.resolveParentPath = r, t.getModel = i, t
  27361. }))
  27362. }));
  27363. return E(a.edges, (function (t) {
  27364. ! function (t, e, n, i) {
  27365. if (cA(n)) {
  27366. var r = dA(t, e, n),
  27367. o = n.__edgeMap,
  27368. a = o[fA(r)];
  27369. o[r] && !a ? o[r].isForward = !0 : a && o[r] && (a.isForward = !0, o[r].isForward = !1), o[r] = o[r] || [], o[r].push(i)
  27370. }
  27371. }(t.node1, t.node2, this, t.dataIndex)
  27372. }), this), a.data
  27373. }
  27374. }, e.prototype.getGraph = function () {
  27375. return this.getData().graph
  27376. }, e.prototype.getEdgeData = function () {
  27377. return this.getGraph().edgeData
  27378. }, e.prototype.getCategoriesData = function () {
  27379. return this._categoriesData
  27380. }, e.prototype.formatTooltip = function (t, e, n) {
  27381. if ("edge" === n) {
  27382. var i = this.getData(),
  27383. r = this.getDataParams(t, n),
  27384. o = i.graph.getEdgeByIndex(t),
  27385. a = i.getName(o.node1.dataIndex),
  27386. s = i.getName(o.node2.dataIndex),
  27387. l = [];
  27388. return null != a && l.push(a), null != s && l.push(s), og("nameValue", {
  27389. name: l.join(" > "),
  27390. value: r.value,
  27391. noValue: null == r.value
  27392. })
  27393. }
  27394. return vg({
  27395. series: this,
  27396. dataIndex: t,
  27397. multipleSeries: e
  27398. })
  27399. }, e.prototype._updateCategoriesData = function () {
  27400. var t = z(this.option.categories || [], (function (t) {
  27401. return null != t.value ? t : A({
  27402. value: 0
  27403. }, t)
  27404. })),
  27405. e = new cx(["value"], this);
  27406. e.initData(t), this._categoriesData = e, this._categoriesModels = e.mapArray((function (t) {
  27407. return e.getItemModel(t)
  27408. }))
  27409. }, e.prototype.setZoom = function (t) {
  27410. this.option.zoom = t
  27411. }, e.prototype.setCenter = function (t) {
  27412. this.option.center = t
  27413. }, e.prototype.isAnimationEnabled = function () {
  27414. return t.prototype.isAnimationEnabled.call(this) && !("force" === this.get("layout") && this.get(["force", "layoutAnimation"]))
  27415. }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  27416. z: 2,
  27417. coordinateSystem: "view",
  27418. legendHoverLink: !0,
  27419. layout: null,
  27420. circular: {
  27421. rotateLabel: !1
  27422. },
  27423. force: {
  27424. initLayout: null,
  27425. repulsion: [0, 50],
  27426. gravity: .1,
  27427. friction: .6,
  27428. edgeLength: 30,
  27429. layoutAnimation: !0
  27430. },
  27431. left: "center",
  27432. top: "center",
  27433. symbol: "circle",
  27434. symbolSize: 10,
  27435. edgeSymbol: ["none", "none"],
  27436. edgeSymbolSize: 10,
  27437. edgeLabel: {
  27438. position: "middle",
  27439. distance: 5
  27440. },
  27441. draggable: !1,
  27442. roam: !1,
  27443. center: null,
  27444. zoom: 1,
  27445. nodeScaleRatio: .6,
  27446. label: {
  27447. show: !1,
  27448. formatter: "{b}"
  27449. },
  27450. itemStyle: {},
  27451. lineStyle: {
  27452. color: "#aaa",
  27453. width: 1,
  27454. opacity: .5
  27455. },
  27456. emphasis: {
  27457. scale: !0,
  27458. label: {
  27459. show: !0
  27460. }
  27461. },
  27462. select: {
  27463. itemStyle: {
  27464. borderColor: "#212121"
  27465. }
  27466. }
  27467. }, e
  27468. }(bg),
  27469. uk = {
  27470. type: "graphRoam",
  27471. event: "graphRoam",
  27472. update: "none"
  27473. };
  27474. var hk = function () {
  27475. this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0
  27476. },
  27477. ck = function (t) {
  27478. function e(e) {
  27479. var n = t.call(this, e) || this;
  27480. return n.type = "pointer", n
  27481. }
  27482. return n(e, t), e.prototype.getDefaultShape = function () {
  27483. return new hk
  27484. }, e.prototype.buildPath = function (t, e) {
  27485. var n = Math.cos,
  27486. i = Math.sin,
  27487. r = e.r,
  27488. o = e.width,
  27489. a = e.angle,
  27490. s = e.x - n(a) * o * (o >= r / 3 ? 1 : 2),
  27491. l = e.y - i(a) * o * (o >= r / 3 ? 1 : 2);
  27492. a = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + n(a) * o, e.y + i(a) * o), t.lineTo(e.x + n(e.angle) * r, e.y + i(e.angle) * r), t.lineTo(e.x - n(a) * o, e.y - i(a) * o), t.lineTo(s, l)
  27493. }, e
  27494. }(ks);
  27495. function pk(t, e) {
  27496. var n = null == t ? "" : t + "";
  27497. return e && (U(e) ? n = e.replace("{value}", n) : X(e) && (n = e(t))), n
  27498. }
  27499. var dk = function (t) {
  27500. function e() {
  27501. var n = null !== t && t.apply(this, arguments) || this;
  27502. return n.type = e.type, n
  27503. }
  27504. return n(e, t), e.prototype.render = function (t, e, n) {
  27505. this.group.removeAll();
  27506. var i = t.get(["axisLine", "lineStyle", "color"]),
  27507. r = function (t, e) {
  27508. var n = t.get("center"),
  27509. i = e.getWidth(),
  27510. r = e.getHeight(),
  27511. o = Math.min(i, r);
  27512. return {
  27513. cx: $r(n[0], e.getWidth()),
  27514. cy: $r(n[1], e.getHeight()),
  27515. r: $r(t.get("radius"), o / 2)
  27516. }
  27517. }(t, n);
  27518. this._renderMain(t, e, n, i, r), this._data = t.getData()
  27519. }, e.prototype.dispose = function () {}, e.prototype._renderMain = function (t, e, n, i, r) {
  27520. var o = this.group,
  27521. a = t.get("clockwise"),
  27522. s = -t.get("startAngle") / 180 * Math.PI,
  27523. l = -t.get("endAngle") / 180 * Math.PI,
  27524. u = t.getModel("axisLine"),
  27525. h = u.get("roundCap") ? $S : Fu,
  27526. c = u.get("show"),
  27527. p = u.getModel("lineStyle"),
  27528. d = p.get("width"),
  27529. f = [s, l];
  27530. us(f, !a);
  27531. for (var g = (l = f[1]) - (s = f[0]), y = s, v = [], m = 0; c && m < i.length; m++) {
  27532. var x = new h({
  27533. shape: {
  27534. startAngle: y,
  27535. endAngle: l = s + g * Math.min(Math.max(i[m][0], 0), 1),
  27536. cx: r.cx,
  27537. cy: r.cy,
  27538. clockwise: a,
  27539. r0: r.r - d,
  27540. r: r.r
  27541. },
  27542. silent: !0
  27543. });
  27544. x.setStyle({
  27545. fill: i[m][1]
  27546. }), x.setStyle(p.getLineStyle(["color", "width"])), v.push(x), y = l
  27547. }
  27548. v.reverse(), E(v, (function (t) {
  27549. return o.add(t)
  27550. }));
  27551. var _ = function (t) {
  27552. if (t <= 0) return i[0][1];
  27553. var e;
  27554. for (e = 0; e < i.length; e++)
  27555. if (i[e][0] >= t && (0 === e ? 0 : i[e - 1][0]) < t) return i[e][1];
  27556. return i[e - 1][1]
  27557. };
  27558. this._renderTicks(t, e, n, _, r, s, l, a, d), this._renderTitleAndDetail(t, e, n, _, r), this._renderAnchor(t, r), this._renderPointer(t, e, n, _, r, s, l, a, d)
  27559. }, e.prototype._renderTicks = function (t, e, n, i, r, o, a, s, l) {
  27560. for (var u, h, c = this.group, p = r.cx, d = r.cy, f = r.r, g = +t.get("min"), y = +t.get("max"), v = t.getModel("splitLine"), m = t.getModel("axisTick"), x = t.getModel("axisLabel"), _ = t.get("splitNumber"), b = m.get("splitNumber"), w = $r(v.get("length"), f), S = $r(m.get("length"), f), M = o, I = (a - o) / _, T = I / b, C = v.getModel("lineStyle").getLineStyle(), D = m.getModel("lineStyle").getLineStyle(), A = v.get("distance"), k = 0; k <= _; k++) {
  27561. if (u = Math.cos(M), h = Math.sin(M), v.get("show")) {
  27562. var L = new Ku({
  27563. shape: {
  27564. x1: u * (f - (P = A ? A + l : l)) + p,
  27565. y1: h * (f - P) + d,
  27566. x2: u * (f - w - P) + p,
  27567. y2: h * (f - w - P) + d
  27568. },
  27569. style: C,
  27570. silent: !0
  27571. });
  27572. "auto" === C.stroke && L.setStyle({
  27573. stroke: i(k / _)
  27574. }), c.add(L)
  27575. }
  27576. if (x.get("show")) {
  27577. var P = x.get("distance") + A,
  27578. O = pk(Jr(k / _ * (y - g) + g), x.get("formatter")),
  27579. R = i(k / _),
  27580. N = u * (f - w - P) + p,
  27581. E = h * (f - w - P) + d,
  27582. z = x.get("rotate"),
  27583. V = 0;
  27584. "radial" === z ? (V = -M + 2 * Math.PI) > Math.PI / 2 && (V += Math.PI) : "tangential" === z ? V = -M - Math.PI / 2 : j(z) && (V = z * Math.PI / 180), 0 === V ? c.add(new Xs({
  27585. style: oc(x, {
  27586. text: O,
  27587. x: N,
  27588. y: E,
  27589. verticalAlign: h < -.8 ? "top" : h > .8 ? "bottom" : "middle",
  27590. align: u < -.4 ? "left" : u > .4 ? "right" : "center"
  27591. }, {
  27592. inheritColor: R
  27593. }),
  27594. silent: !0
  27595. })) : c.add(new Xs({
  27596. style: oc(x, {
  27597. text: O,
  27598. x: N,
  27599. y: E,
  27600. verticalAlign: "middle",
  27601. align: "center"
  27602. }, {
  27603. inheritColor: R
  27604. }),
  27605. silent: !0,
  27606. originX: N,
  27607. originY: E,
  27608. rotation: V
  27609. }))
  27610. }
  27611. if (m.get("show") && k !== _) {
  27612. P = (P = m.get("distance")) ? P + l : l;
  27613. for (var B = 0; B <= b; B++) {
  27614. u = Math.cos(M), h = Math.sin(M);
  27615. var F = new Ku({
  27616. shape: {
  27617. x1: u * (f - P) + p,
  27618. y1: h * (f - P) + d,
  27619. x2: u * (f - S - P) + p,
  27620. y2: h * (f - S - P) + d
  27621. },
  27622. silent: !0,
  27623. style: D
  27624. });
  27625. "auto" === D.stroke && F.setStyle({
  27626. stroke: i((k + B / b) / _)
  27627. }), c.add(F), M += T
  27628. }
  27629. M -= T
  27630. } else M += I
  27631. }
  27632. }, e.prototype._renderPointer = function (t, e, n, i, r, o, a, s, l) {
  27633. var u = this.group,
  27634. h = this._data,
  27635. c = this._progressEls,
  27636. p = [],
  27637. d = t.get(["pointer", "show"]),
  27638. f = t.getModel("progress"),
  27639. g = f.get("show"),
  27640. y = t.getData(),
  27641. v = y.mapDimension("value"),
  27642. m = +t.get("min"),
  27643. x = +t.get("max"),
  27644. _ = [m, x],
  27645. b = [o, a];
  27646. function w(e, n) {
  27647. var i, o = y.getItemModel(e).getModel("pointer"),
  27648. a = $r(o.get("width"), r.r),
  27649. s = $r(o.get("length"), r.r),
  27650. l = t.get(["pointer", "icon"]),
  27651. u = o.get("offsetCenter"),
  27652. h = $r(u[0], r.r),
  27653. c = $r(u[1], r.r),
  27654. p = o.get("keepAspect");
  27655. return (i = l ? Xy(l, h - a / 2, c - s, a, s, null, p) : new ck({
  27656. shape: {
  27657. angle: -Math.PI / 2,
  27658. width: a,
  27659. r: s,
  27660. x: h,
  27661. y: c
  27662. }
  27663. })).rotation = -(n + Math.PI / 2), i.x = r.cx, i.y = r.cy, i
  27664. }
  27665. function S(t, e) {
  27666. var n = f.get("roundCap") ? $S : Fu,
  27667. i = f.get("overlap"),
  27668. a = i ? f.get("width") : l / y.count(),
  27669. u = i ? r.r - a : r.r - (t + 1) * a,
  27670. h = i ? r.r : r.r - t * a,
  27671. c = new n({
  27672. shape: {
  27673. startAngle: o,
  27674. endAngle: e,
  27675. cx: r.cx,
  27676. cy: r.cy,
  27677. clockwise: s,
  27678. r0: u,
  27679. r: h
  27680. }
  27681. });
  27682. return i && (c.z2 = x - y.get(v, t) % x), c
  27683. }(g || d) && (y.diff(h).add((function (e) {
  27684. var n = y.get(v, e);
  27685. if (d) {
  27686. var i = w(e, o);
  27687. mh(i, {
  27688. rotation: -((isNaN(+n) ? b[0] : Kr(n, _, b, !0)) + Math.PI / 2)
  27689. }, t), u.add(i), y.setItemGraphicEl(e, i)
  27690. }
  27691. if (g) {
  27692. var r = S(e, o),
  27693. a = f.get("clip");
  27694. mh(r, {
  27695. shape: {
  27696. endAngle: Kr(n, _, b, a)
  27697. }
  27698. }, t), u.add(r), ol(t.seriesIndex, y.dataType, e, r), p[e] = r
  27699. }
  27700. })).update((function (e, n) {
  27701. var i = y.get(v, e);
  27702. if (d) {
  27703. var r = h.getItemGraphicEl(n),
  27704. a = r ? r.rotation : o,
  27705. s = w(e, a);
  27706. s.rotation = a, vh(s, {
  27707. rotation: -((isNaN(+i) ? b[0] : Kr(i, _, b, !0)) + Math.PI / 2)
  27708. }, t), u.add(s), y.setItemGraphicEl(e, s)
  27709. }
  27710. if (g) {
  27711. var l = c[n],
  27712. m = S(e, l ? l.shape.endAngle : o),
  27713. x = f.get("clip");
  27714. vh(m, {
  27715. shape: {
  27716. endAngle: Kr(i, _, b, x)
  27717. }
  27718. }, t), u.add(m), ol(t.seriesIndex, y.dataType, e, m), p[e] = m
  27719. }
  27720. })).execute(), y.each((function (t) {
  27721. var e = y.getItemModel(t),
  27722. n = e.getModel("emphasis"),
  27723. r = n.get("focus"),
  27724. o = n.get("blurScope"),
  27725. a = n.get("disabled");
  27726. if (d) {
  27727. var s = y.getItemGraphicEl(t),
  27728. l = y.getItemVisual(t, "style"),
  27729. u = l.fill;
  27730. if (s instanceof Ns) {
  27731. var h = s.style;
  27732. s.useStyle(A({
  27733. image: h.image,
  27734. x: h.x,
  27735. y: h.y,
  27736. width: h.width,
  27737. height: h.height
  27738. }, l))
  27739. } else s.useStyle(l), "pointer" !== s.type && s.setColor(u);
  27740. s.setStyle(e.getModel(["pointer", "itemStyle"]).getItemStyle()), "auto" === s.style.fill && s.setStyle("fill", i(Kr(y.get(v, t), _, [0, 1], !0))), s.z2EmphasisLift = 0, $l(s, e), Zl(s, r, o, a)
  27741. }
  27742. if (g) {
  27743. var c = p[t];
  27744. c.useStyle(y.getItemVisual(t, "style")), c.setStyle(e.getModel(["progress", "itemStyle"]).getItemStyle()), c.z2EmphasisLift = 0, $l(c, e), Zl(c, r, o, a)
  27745. }
  27746. })), this._progressEls = p)
  27747. }, e.prototype._renderAnchor = function (t, e) {
  27748. var n = t.getModel("anchor");
  27749. if (n.get("show")) {
  27750. var i = n.get("size"),
  27751. r = n.get("icon"),
  27752. o = n.get("offsetCenter"),
  27753. a = n.get("keepAspect"),
  27754. s = Xy(r, e.cx - i / 2 + $r(o[0], e.r), e.cy - i / 2 + $r(o[1], e.r), i, i, null, a);
  27755. s.z2 = n.get("showAbove") ? 1 : 0, s.setStyle(n.getModel("itemStyle").getItemStyle()), this.group.add(s)
  27756. }
  27757. }, e.prototype._renderTitleAndDetail = function (t, e, n, i, r) {
  27758. var o = this,
  27759. a = t.getData(),
  27760. s = a.mapDimension("value"),
  27761. l = +t.get("min"),
  27762. u = +t.get("max"),
  27763. h = new Br,
  27764. c = [],
  27765. p = [],
  27766. d = t.isAnimationEnabled(),
  27767. f = t.get(["pointer", "showAbove"]);
  27768. a.diff(this._data).add((function (t) {
  27769. c[t] = new Xs({
  27770. silent: !0
  27771. }), p[t] = new Xs({
  27772. silent: !0
  27773. })
  27774. })).update((function (t, e) {
  27775. c[t] = o._titleEls[e], p[t] = o._detailEls[e]
  27776. })).execute(), a.each((function (e) {
  27777. var n = a.getItemModel(e),
  27778. o = a.get(s, e),
  27779. g = new Br,
  27780. y = i(Kr(o, [l, u], [0, 1], !0)),
  27781. v = n.getModel("title");
  27782. if (v.get("show")) {
  27783. var m = v.get("offsetCenter"),
  27784. x = r.cx + $r(m[0], r.r),
  27785. _ = r.cy + $r(m[1], r.r);
  27786. (D = c[e]).attr({
  27787. z2: f ? 0 : 2,
  27788. style: oc(v, {
  27789. x: x,
  27790. y: _,
  27791. text: a.getName(e),
  27792. align: "center",
  27793. verticalAlign: "middle"
  27794. }, {
  27795. inheritColor: y
  27796. })
  27797. }), g.add(D)
  27798. }
  27799. var b = n.getModel("detail");
  27800. if (b.get("show")) {
  27801. var w = b.get("offsetCenter"),
  27802. S = r.cx + $r(w[0], r.r),
  27803. M = r.cy + $r(w[1], r.r),
  27804. I = $r(b.get("width"), r.r),
  27805. T = $r(b.get("height"), r.r),
  27806. C = t.get(["progress", "show"]) ? a.getItemVisual(e, "style").fill : y,
  27807. D = p[e],
  27808. A = b.get("formatter");
  27809. D.attr({
  27810. z2: f ? 0 : 2,
  27811. style: oc(b, {
  27812. x: S,
  27813. y: M,
  27814. text: pk(o, A),
  27815. width: isNaN(I) ? null : I,
  27816. height: isNaN(T) ? null : T,
  27817. align: "center",
  27818. verticalAlign: "middle"
  27819. }, {
  27820. inheritColor: C
  27821. })
  27822. }), dc(D, {
  27823. normal: b
  27824. }, o, (function (t) {
  27825. return pk(t, A)
  27826. })), d && fc(D, e, a, t, {
  27827. getFormattedLabel: function (t, e, n, i, r, a) {
  27828. return pk(a ? a.interpolatedValue : o, A)
  27829. }
  27830. }), g.add(D)
  27831. }
  27832. h.add(g)
  27833. })), this.group.add(h), this._titleEls = c, this._detailEls = p
  27834. }, e.type = "gauge", e
  27835. }(Og),
  27836. fk = function (t) {
  27837. function e() {
  27838. var n = null !== t && t.apply(this, arguments) || this;
  27839. return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n
  27840. }
  27841. return n(e, t), e.prototype.getInitialData = function (t, e) {
  27842. return PM(this, ["value"])
  27843. }, e.type = "series.gauge", e.defaultOption = {
  27844. z: 2,
  27845. colorBy: "data",
  27846. center: ["50%", "50%"],
  27847. legendHoverLink: !0,
  27848. radius: "75%",
  27849. startAngle: 225,
  27850. endAngle: -45,
  27851. clockwise: !0,
  27852. min: 0,
  27853. max: 100,
  27854. splitNumber: 10,
  27855. axisLine: {
  27856. show: !0,
  27857. roundCap: !1,
  27858. lineStyle: {
  27859. color: [
  27860. [1, "#E6EBF8"]
  27861. ],
  27862. width: 10
  27863. }
  27864. },
  27865. progress: {
  27866. show: !1,
  27867. overlap: !0,
  27868. width: 10,
  27869. roundCap: !1,
  27870. clip: !0
  27871. },
  27872. splitLine: {
  27873. show: !0,
  27874. length: 10,
  27875. distance: 10,
  27876. lineStyle: {
  27877. color: "#63677A",
  27878. width: 3,
  27879. type: "solid"
  27880. }
  27881. },
  27882. axisTick: {
  27883. show: !0,
  27884. splitNumber: 5,
  27885. length: 6,
  27886. distance: 10,
  27887. lineStyle: {
  27888. color: "#63677A",
  27889. width: 1,
  27890. type: "solid"
  27891. }
  27892. },
  27893. axisLabel: {
  27894. show: !0,
  27895. distance: 15,
  27896. color: "#464646",
  27897. fontSize: 12,
  27898. rotate: 0
  27899. },
  27900. pointer: {
  27901. icon: null,
  27902. offsetCenter: [0, 0],
  27903. show: !0,
  27904. showAbove: !0,
  27905. length: "60%",
  27906. width: 6,
  27907. keepAspect: !1
  27908. },
  27909. anchor: {
  27910. show: !1,
  27911. showAbove: !1,
  27912. size: 6,
  27913. icon: "circle",
  27914. offsetCenter: [0, 0],
  27915. keepAspect: !1,
  27916. itemStyle: {
  27917. color: "#fff",
  27918. borderWidth: 0,
  27919. borderColor: "#5470c6"
  27920. }
  27921. },
  27922. title: {
  27923. show: !0,
  27924. offsetCenter: [0, "20%"],
  27925. color: "#464646",
  27926. fontSize: 16,
  27927. valueAnimation: !1
  27928. },
  27929. detail: {
  27930. show: !0,
  27931. backgroundColor: "rgba(0,0,0,0)",
  27932. borderWidth: 0,
  27933. borderColor: "#ccc",
  27934. width: 100,
  27935. height: null,
  27936. padding: [5, 10],
  27937. offsetCenter: [0, "40%"],
  27938. color: "#464646",
  27939. fontSize: 30,
  27940. fontWeight: "bold",
  27941. lineHeight: 30,
  27942. valueAnimation: !1
  27943. }
  27944. }, e
  27945. }(bg);
  27946. var gk = ["itemStyle", "opacity"],
  27947. yk = function (t) {
  27948. function e(e, n) {
  27949. var i = t.call(this) || this,
  27950. r = i,
  27951. o = new Zu,
  27952. a = new Xs;
  27953. return r.setTextContent(a), i.setTextGuideLine(o), i.updateData(e, n, !0), i
  27954. }
  27955. return n(e, t), e.prototype.updateData = function (t, e, n) {
  27956. var i = this,
  27957. r = t.hostModel,
  27958. o = t.getItemModel(e),
  27959. a = t.getItemLayout(e),
  27960. s = o.getModel("emphasis"),
  27961. l = o.get(gk);
  27962. l = null == l ? 1 : l, n || Sh(i), i.useStyle(t.getItemVisual(e, "style")), i.style.lineJoin = "round", n ? (i.setShape({
  27963. points: a.points
  27964. }), i.style.opacity = 0, mh(i, {
  27965. style: {
  27966. opacity: l
  27967. }
  27968. }, r, e)) : vh(i, {
  27969. style: {
  27970. opacity: l
  27971. },
  27972. shape: {
  27973. points: a.points
  27974. }
  27975. }, r, e), $l(i, o), this._updateLabel(t, e), Zl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  27976. }, e.prototype._updateLabel = function (t, e) {
  27977. var n = this,
  27978. i = this.getTextGuideLine(),
  27979. r = n.getTextContent(),
  27980. o = t.hostModel,
  27981. a = t.getItemModel(e),
  27982. s = t.getItemLayout(e).label,
  27983. l = t.getItemVisual(e, "style"),
  27984. u = l.fill;
  27985. ic(r, rc(a), {
  27986. labelFetcher: t.hostModel,
  27987. labelDataIndex: e,
  27988. defaultOpacity: l.opacity,
  27989. defaultText: t.getName(e)
  27990. }, {
  27991. normal: {
  27992. align: s.textAlign,
  27993. verticalAlign: s.verticalAlign
  27994. }
  27995. }), n.setTextConfig({
  27996. local: !0,
  27997. inside: !!s.inside,
  27998. insideStroke: u,
  27999. outsideFill: u
  28000. });
  28001. var h = s.linePoints;
  28002. i.setShape({
  28003. points: h
  28004. }), n.textGuideLineConfig = {
  28005. anchor: h ? new De(h[0][0], h[0][1]) : null
  28006. }, vh(r, {
  28007. style: {
  28008. x: s.x,
  28009. y: s.y
  28010. }
  28011. }, o, e), r.attr({
  28012. rotation: s.rotation,
  28013. originX: s.x,
  28014. originY: s.y,
  28015. z2: 10
  28016. }), Ab(n, kb(a), {
  28017. stroke: u
  28018. })
  28019. }, e
  28020. }(Xu),
  28021. vk = function (t) {
  28022. function e() {
  28023. var n = null !== t && t.apply(this, arguments) || this;
  28024. return n.type = e.type, n.ignoreLabelLineUpdate = !0, n
  28025. }
  28026. return n(e, t), e.prototype.render = function (t, e, n) {
  28027. var i = t.getData(),
  28028. r = this._data,
  28029. o = this.group;
  28030. i.diff(r).add((function (t) {
  28031. var e = new yk(i, t);
  28032. i.setItemGraphicEl(t, e), o.add(e)
  28033. })).update((function (t, e) {
  28034. var n = r.getItemGraphicEl(e);
  28035. n.updateData(i, t), o.add(n), i.setItemGraphicEl(t, n)
  28036. })).remove((function (e) {
  28037. wh(r.getItemGraphicEl(e), t, e)
  28038. })).execute(), this._data = i
  28039. }, e.prototype.remove = function () {
  28040. this.group.removeAll(), this._data = null
  28041. }, e.prototype.dispose = function () {}, e.type = "funnel", e
  28042. }(Og),
  28043. mk = function (t) {
  28044. function e() {
  28045. var n = null !== t && t.apply(this, arguments) || this;
  28046. return n.type = e.type, n
  28047. }
  28048. return n(e, t), e.prototype.init = function (e) {
  28049. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new OM(W(this.getData, this), W(this.getRawData, this)), this._defaultLabelLine(e)
  28050. }, e.prototype.getInitialData = function (t, e) {
  28051. return PM(this, {
  28052. coordDimensions: ["value"],
  28053. encodeDefaulter: H(ed, this)
  28054. })
  28055. }, e.prototype._defaultLabelLine = function (t) {
  28056. Co(t, "labelLine", ["show"]);
  28057. var e = t.labelLine,
  28058. n = t.emphasis.labelLine;
  28059. e.show = e.show && t.label.show, n.show = n.show && t.emphasis.label.show
  28060. }, e.prototype.getDataParams = function (e) {
  28061. var n = this.getData(),
  28062. i = t.prototype.getDataParams.call(this, e),
  28063. r = n.mapDimension("value"),
  28064. o = n.getSum(r);
  28065. return i.percent = o ? +(n.get(r, e) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i
  28066. }, e.type = "series.funnel", e.defaultOption = {
  28067. z: 2,
  28068. legendHoverLink: !0,
  28069. colorBy: "data",
  28070. left: 80,
  28071. top: 60,
  28072. right: 80,
  28073. bottom: 60,
  28074. minSize: "0%",
  28075. maxSize: "100%",
  28076. sort: "descending",
  28077. orient: "vertical",
  28078. gap: 0,
  28079. funnelAlign: "center",
  28080. label: {
  28081. show: !0,
  28082. position: "outer"
  28083. },
  28084. labelLine: {
  28085. show: !0,
  28086. length: 20,
  28087. lineStyle: {
  28088. width: 1
  28089. }
  28090. },
  28091. itemStyle: {
  28092. borderColor: "#fff",
  28093. borderWidth: 1
  28094. },
  28095. emphasis: {
  28096. label: {
  28097. show: !0
  28098. }
  28099. },
  28100. select: {
  28101. itemStyle: {
  28102. borderColor: "#212121"
  28103. }
  28104. }
  28105. }, e
  28106. }(bg);
  28107. function xk(t, e) {
  28108. t.eachSeriesByType("funnel", (function (t) {
  28109. var n = t.getData(),
  28110. i = n.mapDimension("value"),
  28111. r = t.get("sort"),
  28112. o = function (t, e) {
  28113. return kp(t.getBoxLayoutParams(), {
  28114. width: e.getWidth(),
  28115. height: e.getHeight()
  28116. })
  28117. }(t, e),
  28118. a = t.get("orient"),
  28119. s = o.width,
  28120. l = o.height,
  28121. u = function (t, e) {
  28122. for (var n = t.mapDimension("value"), i = t.mapArray(n, (function (t) {
  28123. return t
  28124. })), r = [], o = "ascending" === e, a = 0, s = t.count(); a < s; a++) r[a] = a;
  28125. return X(e) ? r.sort(e) : "none" !== e && r.sort((function (t, e) {
  28126. return o ? i[t] - i[e] : i[e] - i[t]
  28127. })), r
  28128. }(n, r),
  28129. h = o.x,
  28130. c = o.y,
  28131. p = "horizontal" === a ? [$r(t.get("minSize"), l), $r(t.get("maxSize"), l)] : [$r(t.get("minSize"), s), $r(t.get("maxSize"), s)],
  28132. d = n.getDataExtent(i),
  28133. f = t.get("min"),
  28134. g = t.get("max");
  28135. null == f && (f = Math.min(d[0], 0)), null == g && (g = d[1]);
  28136. var y = t.get("funnelAlign"),
  28137. v = t.get("gap"),
  28138. m = (("horizontal" === a ? s : l) - v * (n.count() - 1)) / n.count(),
  28139. x = function (t, e) {
  28140. if ("horizontal" === a) {
  28141. var r = Kr(n.get(i, t) || 0, [f, g], p, !0),
  28142. o = void 0;
  28143. switch (y) {
  28144. case "top":
  28145. o = c;
  28146. break;
  28147. case "center":
  28148. o = c + (l - r) / 2;
  28149. break;
  28150. case "bottom":
  28151. o = c + (l - r)
  28152. }
  28153. return [
  28154. [e, o],
  28155. [e, o + r]
  28156. ]
  28157. }
  28158. var u, d = Kr(n.get(i, t) || 0, [f, g], p, !0);
  28159. switch (y) {
  28160. case "left":
  28161. u = h;
  28162. break;
  28163. case "center":
  28164. u = h + (s - d) / 2;
  28165. break;
  28166. case "right":
  28167. u = h + s - d
  28168. }
  28169. return [
  28170. [u, e],
  28171. [u + d, e]
  28172. ]
  28173. };
  28174. "ascending" === r && (m = -m, v = -v, "horizontal" === a ? h += s : c += l, u = u.reverse());
  28175. for (var _ = 0; _ < u.length; _++) {
  28176. var b = u[_],
  28177. w = u[_ + 1],
  28178. S = n.getItemModel(b);
  28179. if ("horizontal" === a) {
  28180. var M = S.get(["itemStyle", "width"]);
  28181. null == M ? M = m : (M = $r(M, s), "ascending" === r && (M = -M));
  28182. var I = x(b, h),
  28183. T = x(w, h + M);
  28184. h += M + v, n.setItemLayout(b, {
  28185. points: I.concat(T.slice().reverse())
  28186. })
  28187. } else {
  28188. var C = S.get(["itemStyle", "height"]);
  28189. null == C ? C = m : (C = $r(C, l), "ascending" === r && (C = -C));
  28190. I = x(b, c), T = x(w, c + C);
  28191. c += C + v, n.setItemLayout(b, {
  28192. points: I.concat(T.slice().reverse())
  28193. })
  28194. }
  28195. }! function (t) {
  28196. var e = t.hostModel.get("orient");
  28197. t.each((function (n) {
  28198. var i, r, o, a, s = t.getItemModel(n),
  28199. l = s.getModel("label").get("position"),
  28200. u = s.getModel("labelLine"),
  28201. h = t.getItemLayout(n),
  28202. c = h.points,
  28203. p = "inner" === l || "inside" === l || "center" === l || "insideLeft" === l || "insideRight" === l;
  28204. if (p) "insideLeft" === l ? (r = (c[0][0] + c[3][0]) / 2 + 5, o = (c[0][1] + c[3][1]) / 2, i = "left") : "insideRight" === l ? (r = (c[1][0] + c[2][0]) / 2 - 5, o = (c[1][1] + c[2][1]) / 2, i = "right") : (r = (c[0][0] + c[1][0] + c[2][0] + c[3][0]) / 4, o = (c[0][1] + c[1][1] + c[2][1] + c[3][1]) / 4, i = "center"), a = [
  28205. [r, o],
  28206. [r, o]
  28207. ];
  28208. else {
  28209. var d = void 0,
  28210. f = void 0,
  28211. g = void 0,
  28212. y = void 0,
  28213. v = u.get("length");
  28214. "left" === l ? (d = (c[3][0] + c[0][0]) / 2, f = (c[3][1] + c[0][1]) / 2, r = (g = d - v) - 5, i = "right") : "right" === l ? (d = (c[1][0] + c[2][0]) / 2, f = (c[1][1] + c[2][1]) / 2, r = (g = d + v) + 5, i = "left") : "top" === l ? (d = (c[3][0] + c[0][0]) / 2, o = (y = (f = (c[3][1] + c[0][1]) / 2) - v) - 5, i = "center") : "bottom" === l ? (d = (c[1][0] + c[2][0]) / 2, o = (y = (f = (c[1][1] + c[2][1]) / 2) + v) + 5, i = "center") : "rightTop" === l ? (d = "horizontal" === e ? c[3][0] : c[1][0], f = "horizontal" === e ? c[3][1] : c[1][1], "horizontal" === e ? (o = (y = f - v) - 5, i = "center") : (r = (g = d + v) + 5, i = "top")) : "rightBottom" === l ? (d = c[2][0], f = c[2][1], "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d + v) + 5, i = "bottom")) : "leftTop" === l ? (d = c[0][0], f = "horizontal" === e ? c[0][1] : c[1][1], "horizontal" === e ? (o = (y = f - v) - 5, i = "center") : (r = (g = d - v) - 5, i = "right")) : "leftBottom" === l ? (d = "horizontal" === e ? c[1][0] : c[3][0], f = "horizontal" === e ? c[1][1] : c[2][1], "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d - v) - 5, i = "right")) : (d = (c[1][0] + c[2][0]) / 2, f = (c[1][1] + c[2][1]) / 2, "horizontal" === e ? (o = (y = f + v) + 5, i = "center") : (r = (g = d + v) + 5, i = "left")), "horizontal" === e ? r = g = d : o = y = f, a = [
  28215. [d, f],
  28216. [g, y]
  28217. ]
  28218. }
  28219. h.label = {
  28220. linePoints: a,
  28221. x: r,
  28222. y: o,
  28223. verticalAlign: "middle",
  28224. textAlign: i,
  28225. inside: p
  28226. }
  28227. }))
  28228. }(n)
  28229. }))
  28230. }
  28231. var _k = function (t) {
  28232. function e() {
  28233. var n = null !== t && t.apply(this, arguments) || this;
  28234. return n.type = e.type, n._dataGroup = new Br, n._initialized = !1, n
  28235. }
  28236. return n(e, t), e.prototype.init = function () {
  28237. this.group.add(this._dataGroup)
  28238. }, e.prototype.render = function (t, e, n, i) {
  28239. this._progressiveEls = null;
  28240. var r = this._dataGroup,
  28241. o = t.getData(),
  28242. a = this._data,
  28243. s = t.coordinateSystem,
  28244. l = s.dimensions,
  28245. u = Sk(t);
  28246. if (o.diff(a).add((function (t) {
  28247. Mk(wk(o, r, t, l, s), o, t, u)
  28248. })).update((function (e, n) {
  28249. var i = a.getItemGraphicEl(n),
  28250. r = bk(o, e, l, s);
  28251. o.setItemGraphicEl(e, i), vh(i, {
  28252. shape: {
  28253. points: r
  28254. }
  28255. }, t, e), Sh(i), Mk(i, o, e, u)
  28256. })).remove((function (t) {
  28257. var e = a.getItemGraphicEl(t);
  28258. r.remove(e)
  28259. })).execute(), !this._initialized) {
  28260. this._initialized = !0;
  28261. var h = function (t, e, n) {
  28262. var i = t.model,
  28263. r = t.getRect(),
  28264. o = new Ws({
  28265. shape: {
  28266. x: r.x,
  28267. y: r.y,
  28268. width: r.width,
  28269. height: r.height
  28270. }
  28271. }),
  28272. a = "horizontal" === i.get("layout") ? "width" : "height";
  28273. return o.setShape(a, 0), mh(o, {
  28274. shape: {
  28275. width: r.width,
  28276. height: r.height
  28277. }
  28278. }, e, n), o
  28279. }(s, t, (function () {
  28280. setTimeout((function () {
  28281. r.removeClipPath()
  28282. }))
  28283. }));
  28284. r.setClipPath(h)
  28285. }
  28286. this._data = o
  28287. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  28288. this._initialized = !0, this._data = null, this._dataGroup.removeAll()
  28289. }, e.prototype.incrementalRender = function (t, e, n) {
  28290. for (var i = e.getData(), r = e.coordinateSystem, o = r.dimensions, a = Sk(e), s = this._progressiveEls = [], l = t.start; l < t.end; l++) {
  28291. var u = wk(i, this._dataGroup, l, o, r);
  28292. u.incremental = !0, Mk(u, i, l, a), s.push(u)
  28293. }
  28294. }, e.prototype.remove = function () {
  28295. this._dataGroup && this._dataGroup.removeAll(), this._data = null
  28296. }, e.type = "parallel", e
  28297. }(Og);
  28298. function bk(t, e, n, i) {
  28299. for (var r, o = [], a = 0; a < n.length; a++) {
  28300. var s = n[a],
  28301. l = t.get(t.mapDimension(s), e);
  28302. r = l, ("category" === i.getAxis(s).type ? null == r : null == r || isNaN(r)) || o.push(i.dataToPoint(l, s))
  28303. }
  28304. return o
  28305. }
  28306. function wk(t, e, n, i, r) {
  28307. var o = bk(t, n, i, r),
  28308. a = new Zu({
  28309. shape: {
  28310. points: o
  28311. },
  28312. z2: 10
  28313. });
  28314. return e.add(a), t.setItemGraphicEl(n, a), a
  28315. }
  28316. function Sk(t) {
  28317. var e = t.get("smooth", !0);
  28318. return !0 === e && (e = .3), nt(e = yo(e)) && (e = 0), {
  28319. smooth: e
  28320. }
  28321. }
  28322. function Mk(t, e, n, i) {
  28323. t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", i.smooth);
  28324. var r = e.getItemModel(n),
  28325. o = r.getModel("emphasis");
  28326. $l(t, r, "lineStyle"), Zl(t, o.get("focus"), o.get("blurScope"), o.get("disabled"))
  28327. }
  28328. var Ik = function (t) {
  28329. function e() {
  28330. var n = null !== t && t.apply(this, arguments) || this;
  28331. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n
  28332. }
  28333. return n(e, t), e.prototype.getInitialData = function (t, e) {
  28334. return _x(null, this, {
  28335. useEncodeDefaulter: W(Tk, null, this)
  28336. })
  28337. }, e.prototype.getRawIndicesByActiveState = function (t) {
  28338. var e = this.coordinateSystem,
  28339. n = this.getData(),
  28340. i = [];
  28341. return e.eachActiveState(n, (function (e, r) {
  28342. t === e && i.push(n.getRawIndex(r))
  28343. })), i
  28344. }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
  28345. z: 2,
  28346. coordinateSystem: "parallel",
  28347. parallelIndex: 0,
  28348. label: {
  28349. show: !1
  28350. },
  28351. inactiveOpacity: .05,
  28352. activeOpacity: 1,
  28353. lineStyle: {
  28354. width: 1,
  28355. opacity: .45,
  28356. type: "solid"
  28357. },
  28358. emphasis: {
  28359. label: {
  28360. show: !1
  28361. }
  28362. },
  28363. progressive: 500,
  28364. smooth: !1,
  28365. animationEasing: "linear"
  28366. }, e
  28367. }(bg);
  28368. function Tk(t) {
  28369. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  28370. if (e) {
  28371. var n = {};
  28372. return E(e.dimensions, (function (t) {
  28373. var e = +t.replace("dim", "");
  28374. n[t] = e
  28375. })), n
  28376. }
  28377. }
  28378. var Ck = ["lineStyle", "opacity"],
  28379. Dk = {
  28380. seriesType: "parallel",
  28381. reset: function (t, e) {
  28382. var n = t.coordinateSystem,
  28383. i = {
  28384. normal: t.get(["lineStyle", "opacity"]),
  28385. active: t.get("activeOpacity"),
  28386. inactive: t.get("inactiveOpacity")
  28387. };
  28388. return {
  28389. progress: function (t, e) {
  28390. n.eachActiveState(e, (function (t, n) {
  28391. var r = i[t];
  28392. if ("normal" === t && e.hasItemOption) {
  28393. var o = e.getItemModel(n).get(Ck, !0);
  28394. null != o && (r = o)
  28395. }
  28396. e.ensureUniqueItemVisual(n, "style").opacity = r
  28397. }), t.start, t.end)
  28398. }
  28399. }
  28400. }
  28401. };
  28402. function Ak(t) {
  28403. ! function (t) {
  28404. if (t.parallel) return;
  28405. var e = !1;
  28406. E(t.series, (function (t) {
  28407. t && "parallel" === t.type && (e = !0)
  28408. })), e && (t.parallel = [{}])
  28409. }(t),
  28410. function (t) {
  28411. var e = To(t.parallelAxis);
  28412. E(e, (function (e) {
  28413. if (q(e)) {
  28414. var n = e.parallelIndex || 0,
  28415. i = To(t.parallel)[n];
  28416. i && i.parallelAxisDefault && C(e, i.parallelAxisDefault, !1)
  28417. }
  28418. }))
  28419. }(t)
  28420. }
  28421. var kk = function (t) {
  28422. function e() {
  28423. var n = null !== t && t.apply(this, arguments) || this;
  28424. return n.type = e.type, n
  28425. }
  28426. return n(e, t), e.prototype.render = function (t, e, n) {
  28427. this._model = t, this._api = n, this._handlers || (this._handlers = {}, E(Lk, (function (t, e) {
  28428. n.getZr().on(e, this._handlers[e] = W(t, this))
  28429. }), this)), Hg(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate")
  28430. }, e.prototype.dispose = function (t, e) {
  28431. Yg(this, "_throttledDispatchExpand"), E(this._handlers, (function (t, n) {
  28432. e.getZr().off(n, t)
  28433. })), this._handlers = null
  28434. }, e.prototype._throttledDispatchExpand = function (t) {
  28435. this._dispatchExpand(t)
  28436. }, e.prototype._dispatchExpand = function (t) {
  28437. t && this._api.dispatchAction(A({
  28438. type: "parallelAxisExpand"
  28439. }, t))
  28440. }, e.type = "parallel", e
  28441. }(Ag),
  28442. Lk = {
  28443. mousedown: function (t) {
  28444. Pk(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY])
  28445. },
  28446. mouseup: function (t) {
  28447. var e = this._mouseDownPoint;
  28448. if (Pk(this, "click") && e) {
  28449. var n = [t.offsetX, t.offsetY];
  28450. if (Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2) > 5) return;
  28451. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  28452. "none" !== i.behavior && this._dispatchExpand({
  28453. axisExpandWindow: i.axisExpandWindow
  28454. })
  28455. }
  28456. this._mouseDownPoint = null
  28457. },
  28458. mousemove: function (t) {
  28459. if (!this._mouseDownPoint && Pk(this, "mousemove")) {
  28460. var e = this._model,
  28461. n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]),
  28462. i = n.behavior;
  28463. "jump" === i && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand("none" === i ? null : {
  28464. axisExpandWindow: n.axisExpandWindow,
  28465. animation: "jump" === i ? null : {
  28466. duration: 0
  28467. }
  28468. })
  28469. }
  28470. }
  28471. };
  28472. function Pk(t, e) {
  28473. var n = t._model;
  28474. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e
  28475. }
  28476. var Ok = function (t) {
  28477. function e() {
  28478. var n = null !== t && t.apply(this, arguments) || this;
  28479. return n.type = e.type, n
  28480. }
  28481. return n(e, t), e.prototype.init = function () {
  28482. t.prototype.init.apply(this, arguments), this.mergeOption({})
  28483. }, e.prototype.mergeOption = function (t) {
  28484. var e = this.option;
  28485. t && C(e, t, !0), this._initDimensions()
  28486. }, e.prototype.contains = function (t, e) {
  28487. var n = t.get("parallelIndex");
  28488. return null != n && e.getComponent("parallel", n) === this
  28489. }, e.prototype.setAxisExpand = function (t) {
  28490. E(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], (function (e) {
  28491. t.hasOwnProperty(e) && (this.option[e] = t[e])
  28492. }), this)
  28493. }, e.prototype._initDimensions = function () {
  28494. var t = this.dimensions = [],
  28495. e = this.parallelAxisIndex = [];
  28496. E(B(this.ecModel.queryComponents({
  28497. mainType: "parallelAxis"
  28498. }), (function (t) {
  28499. return (t.get("parallelIndex") || 0) === this.componentIndex
  28500. }), this), (function (n) {
  28501. t.push("dim" + n.get("dim")), e.push(n.componentIndex)
  28502. }))
  28503. }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
  28504. z: 0,
  28505. left: 80,
  28506. top: 60,
  28507. right: 80,
  28508. bottom: 60,
  28509. layout: "horizontal",
  28510. axisExpandable: !1,
  28511. axisExpandCenter: null,
  28512. axisExpandCount: 0,
  28513. axisExpandWidth: 50,
  28514. axisExpandRate: 17,
  28515. axisExpandDebounce: 50,
  28516. axisExpandSlideTriggerArea: [-.15, .05, .4],
  28517. axisExpandTriggerOn: "click",
  28518. parallelAxisDefault: null
  28519. }, e
  28520. }(zp),
  28521. Rk = function (t) {
  28522. function e(e, n, i, r, o) {
  28523. var a = t.call(this, e, n, i) || this;
  28524. return a.type = r || "value", a.axisIndex = o, a
  28525. }
  28526. return n(e, t), e.prototype.isHorizontal = function () {
  28527. return "horizontal" !== this.coordinateSystem.getModel().get("layout")
  28528. }, e
  28529. }(ob);
  28530. function Nk(t, e, n, i, r, o) {
  28531. t = t || 0;
  28532. var a = n[1] - n[0];
  28533. if (null != r && (r = zk(r, [0, a])), null != o && (o = Math.max(o, null != r ? r : 0)), "all" === i) {
  28534. var s = Math.abs(e[1] - e[0]);
  28535. s = zk(s, [0, a]), r = o = zk(s, [r, o]), i = 0
  28536. }
  28537. e[0] = zk(e[0], n), e[1] = zk(e[1], n);
  28538. var l = Ek(e, i);
  28539. e[i] += t;
  28540. var u, h = r || 0,
  28541. c = n.slice();
  28542. return l.sign < 0 ? c[0] += h : c[1] -= h, e[i] = zk(e[i], c), u = Ek(e, i), null != r && (u.sign !== l.sign || u.span < r) && (e[1 - i] = e[i] + l.sign * r), u = Ek(e, i), null != o && u.span > o && (e[1 - i] = e[i] + u.sign * o), e
  28543. }
  28544. function Ek(t, e) {
  28545. var n = t[e] - t[1 - e];
  28546. return {
  28547. span: Math.abs(n),
  28548. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  28549. }
  28550. }
  28551. function zk(t, e) {
  28552. return Math.min(null != e[1] ? e[1] : 1 / 0, Math.max(null != e[0] ? e[0] : -1 / 0, t))
  28553. }
  28554. var Vk = E,
  28555. Bk = Math.min,
  28556. Fk = Math.max,
  28557. Gk = Math.floor,
  28558. Wk = Math.ceil,
  28559. Hk = Jr,
  28560. Yk = Math.PI,
  28561. Xk = function () {
  28562. function t(t, e, n) {
  28563. this.type = "parallel", this._axesMap = yt(), this._axesLayout = {}, this.dimensions = t.dimensions, this._model = t, this._init(t, e, n)
  28564. }
  28565. return t.prototype._init = function (t, e, n) {
  28566. var i = t.dimensions,
  28567. r = t.parallelAxisIndex;
  28568. Vk(i, (function (t, n) {
  28569. var i = r[n],
  28570. o = e.getComponent("parallelAxis", i),
  28571. a = this._axesMap.set(t, new Rk(t, b_(o), [0, 0], o.get("type"), i)),
  28572. s = "category" === a.type;
  28573. a.onBand = s && o.get("boundaryGap"), a.inverse = o.get("inverse"), o.axis = a, a.model = o, a.coordinateSystem = o.coordinateSystem = this
  28574. }), this)
  28575. }, t.prototype.update = function (t, e) {
  28576. this._updateAxesFromSeries(this._model, t)
  28577. }, t.prototype.containPoint = function (t) {
  28578. var e = this._makeLayoutInfo(),
  28579. n = e.axisBase,
  28580. i = e.layoutBase,
  28581. r = e.pixelDimIndex,
  28582. o = t[1 - r],
  28583. a = t[r];
  28584. return o >= n && o <= n + e.axisLength && a >= i && a <= i + e.layoutLength
  28585. }, t.prototype.getModel = function () {
  28586. return this._model
  28587. }, t.prototype._updateAxesFromSeries = function (t, e) {
  28588. e.eachSeries((function (n) {
  28589. if (t.contains(n, e)) {
  28590. var i = n.getData();
  28591. Vk(this.dimensions, (function (t) {
  28592. var e = this._axesMap.get(t);
  28593. e.scale.unionExtentFromData(i, i.mapDimension(t)), __(e.scale, e.model)
  28594. }), this)
  28595. }
  28596. }), this)
  28597. }, t.prototype.resize = function (t, e) {
  28598. this._rect = kp(t.getBoxLayoutParams(), {
  28599. width: e.getWidth(),
  28600. height: e.getHeight()
  28601. }), this._layoutAxes()
  28602. }, t.prototype.getRect = function () {
  28603. return this._rect
  28604. }, t.prototype._makeLayoutInfo = function () {
  28605. var t, e = this._model,
  28606. n = this._rect,
  28607. i = ["x", "y"],
  28608. r = ["width", "height"],
  28609. o = e.get("layout"),
  28610. a = "horizontal" === o ? 0 : 1,
  28611. s = n[r[a]],
  28612. l = [0, s],
  28613. u = this.dimensions.length,
  28614. h = Uk(e.get("axisExpandWidth"), l),
  28615. c = Uk(e.get("axisExpandCount") || 0, [0, u]),
  28616. p = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0,
  28617. d = e.get("axisExpandWindow");
  28618. d ? (t = Uk(d[1] - d[0], l), d[1] = d[0] + t) : (t = Uk(h * (c - 1), l), (d = [h * (e.get("axisExpandCenter") || Gk(u / 2)) - t / 2])[1] = d[0] + t);
  28619. var f = (s - t) / (u - c);
  28620. f < 3 && (f = 0);
  28621. var g = [Gk(Hk(d[0] / h, 1)) + 1, Wk(Hk(d[1] / h, 1)) - 1],
  28622. y = f / h * d[0];
  28623. return {
  28624. layout: o,
  28625. pixelDimIndex: a,
  28626. layoutBase: n[i[a]],
  28627. layoutLength: s,
  28628. axisBase: n[i[1 - a]],
  28629. axisLength: n[r[1 - a]],
  28630. axisExpandable: p,
  28631. axisExpandWidth: h,
  28632. axisCollapseWidth: f,
  28633. axisExpandWindow: d,
  28634. axisCount: u,
  28635. winInnerIndices: g,
  28636. axisExpandWindow0Pos: y
  28637. }
  28638. }, t.prototype._layoutAxes = function () {
  28639. var t = this._rect,
  28640. e = this._axesMap,
  28641. n = this.dimensions,
  28642. i = this._makeLayoutInfo(),
  28643. r = i.layout;
  28644. e.each((function (t) {
  28645. var e = [0, i.axisLength],
  28646. n = t.inverse ? 1 : 0;
  28647. t.setExtent(e[n], e[1 - n])
  28648. })), Vk(n, (function (e, n) {
  28649. var o = (i.axisExpandable ? jk : Zk)(n, i),
  28650. a = {
  28651. horizontal: {
  28652. x: o.position,
  28653. y: i.axisLength
  28654. },
  28655. vertical: {
  28656. x: 0,
  28657. y: o.position
  28658. }
  28659. },
  28660. s = {
  28661. horizontal: Yk / 2,
  28662. vertical: 0
  28663. },
  28664. l = [a[r].x + t.x, a[r].y + t.y],
  28665. u = s[r],
  28666. h = [1, 0, 0, 1, 0, 0];
  28667. Se(h, h, u), we(h, h, l), this._axesLayout[e] = {
  28668. position: l,
  28669. rotation: u,
  28670. transform: h,
  28671. axisNameAvailableWidth: o.axisNameAvailableWidth,
  28672. axisLabelShow: o.axisLabelShow,
  28673. nameTruncateMaxWidth: o.nameTruncateMaxWidth,
  28674. tickDirection: 1,
  28675. labelDirection: 1
  28676. }
  28677. }), this)
  28678. }, t.prototype.getAxis = function (t) {
  28679. return this._axesMap.get(t)
  28680. }, t.prototype.dataToPoint = function (t, e) {
  28681. return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t), e)
  28682. }, t.prototype.eachActiveState = function (t, e, n, i) {
  28683. null == n && (n = 0), null == i && (i = t.count());
  28684. var r = this._axesMap,
  28685. o = this.dimensions,
  28686. a = [],
  28687. s = [];
  28688. E(o, (function (e) {
  28689. a.push(t.mapDimension(e)), s.push(r.get(e).model)
  28690. }));
  28691. for (var l = this.hasAxisBrushed(), u = n; u < i; u++) {
  28692. var h = void 0;
  28693. if (l) {
  28694. h = "active";
  28695. for (var c = t.getValues(a, u), p = 0, d = o.length; p < d; p++) {
  28696. if ("inactive" === s[p].getActiveState(c[p])) {
  28697. h = "inactive";
  28698. break
  28699. }
  28700. }
  28701. } else h = "normal";
  28702. e(h, u)
  28703. }
  28704. }, t.prototype.hasAxisBrushed = function () {
  28705. for (var t = this.dimensions, e = this._axesMap, n = !1, i = 0, r = t.length; i < r; i++) "normal" !== e.get(t[i]).model.getActiveState() && (n = !0);
  28706. return n
  28707. }, t.prototype.axisCoordToPoint = function (t, e) {
  28708. return Fh([t, 0], this._axesLayout[e].transform)
  28709. }, t.prototype.getAxisLayout = function (t) {
  28710. return T(this._axesLayout[t])
  28711. }, t.prototype.getSlidedAxisExpandWindow = function (t) {
  28712. var e = this._makeLayoutInfo(),
  28713. n = e.pixelDimIndex,
  28714. i = e.axisExpandWindow.slice(),
  28715. r = i[1] - i[0],
  28716. o = [0, e.axisExpandWidth * (e.axisCount - 1)];
  28717. if (!this.containPoint(t)) return {
  28718. behavior: "none",
  28719. axisExpandWindow: i
  28720. };
  28721. var a, s = t[n] - e.layoutBase - e.axisExpandWindow0Pos,
  28722. l = "slide",
  28723. u = e.axisCollapseWidth,
  28724. h = this._model.get("axisExpandSlideTriggerArea"),
  28725. c = null != h[0];
  28726. if (u) c && u && s < r * h[0] ? (l = "jump", a = s - r * h[2]) : c && u && s > r * (1 - h[0]) ? (l = "jump", a = s - r * (1 - h[2])) : (a = s - r * h[1]) >= 0 && (a = s - r * (1 - h[1])) <= 0 && (a = 0), (a *= e.axisExpandWidth / u) ? Nk(a, i, o, "all") : l = "none";
  28727. else {
  28728. var p = i[1] - i[0];
  28729. (i = [Fk(0, o[1] * s / p - p / 2)])[1] = Bk(o[1], i[0] + p), i[0] = i[1] - p
  28730. }
  28731. return {
  28732. axisExpandWindow: i,
  28733. behavior: l
  28734. }
  28735. }, t
  28736. }();
  28737. function Uk(t, e) {
  28738. return Bk(Fk(t, e[0]), e[1])
  28739. }
  28740. function Zk(t, e) {
  28741. var n = e.layoutLength / (e.axisCount - 1);
  28742. return {
  28743. position: n * t,
  28744. axisNameAvailableWidth: n,
  28745. axisLabelShow: !0
  28746. }
  28747. }
  28748. function jk(t, e) {
  28749. var n, i, r = e.layoutLength,
  28750. o = e.axisExpandWidth,
  28751. a = e.axisCount,
  28752. s = e.axisCollapseWidth,
  28753. l = e.winInnerIndices,
  28754. u = s,
  28755. h = !1;
  28756. return t < l[0] ? (n = t * s, i = s) : t <= l[1] ? (n = e.axisExpandWindow0Pos + t * o - e.axisExpandWindow[0], u = o, h = !0) : (n = r - (a - 1 - t) * s, i = s), {
  28757. position: n,
  28758. axisNameAvailableWidth: u,
  28759. axisLabelShow: h,
  28760. nameTruncateMaxWidth: i
  28761. }
  28762. }
  28763. var qk = {
  28764. create: function (t, e) {
  28765. var n = [];
  28766. return t.eachComponent("parallel", (function (i, r) {
  28767. var o = new Xk(i, t, e);
  28768. o.name = "parallel_" + r, o.resize(i, e), i.coordinateSystem = o, o.model = i, n.push(o)
  28769. })), t.eachSeries((function (t) {
  28770. if ("parallel" === t.get("coordinateSystem")) {
  28771. var e = t.getReferringComponents("parallel", Wo).models[0];
  28772. t.coordinateSystem = e.coordinateSystem
  28773. }
  28774. })), n
  28775. }
  28776. },
  28777. Kk = function (t) {
  28778. function e() {
  28779. var n = null !== t && t.apply(this, arguments) || this;
  28780. return n.type = e.type, n.activeIntervals = [], n
  28781. }
  28782. return n(e, t), e.prototype.getAreaSelectStyle = function () {
  28783. return ia([
  28784. ["fill", "color"],
  28785. ["lineWidth", "borderWidth"],
  28786. ["stroke", "borderColor"],
  28787. ["width", "width"],
  28788. ["opacity", "opacity"]
  28789. ])(this.getModel("areaSelectStyle"))
  28790. }, e.prototype.setActiveIntervals = function (t) {
  28791. var e = this.activeIntervals = T(t);
  28792. if (e)
  28793. for (var n = e.length - 1; n >= 0; n--) Qr(e[n])
  28794. }, e.prototype.getActiveState = function (t) {
  28795. var e = this.activeIntervals;
  28796. if (!e.length) return "normal";
  28797. if (null == t || isNaN(+t)) return "inactive";
  28798. if (1 === e.length) {
  28799. var n = e[0];
  28800. if (n[0] <= t && t <= n[1]) return "active"
  28801. } else
  28802. for (var i = 0, r = e.length; i < r; i++)
  28803. if (e[i][0] <= t && t <= e[i][1]) return "active";
  28804. return "inactive"
  28805. }, e
  28806. }(zp);
  28807. R(Kk, D_);
  28808. var $k = !0,
  28809. Jk = Math.min,
  28810. Qk = Math.max,
  28811. tL = Math.pow,
  28812. eL = "globalPan",
  28813. nL = {
  28814. w: [0, 0],
  28815. e: [0, 1],
  28816. n: [1, 0],
  28817. s: [1, 1]
  28818. },
  28819. iL = {
  28820. w: "ew",
  28821. e: "ew",
  28822. n: "ns",
  28823. s: "ns",
  28824. ne: "nesw",
  28825. sw: "nesw",
  28826. nw: "nwse",
  28827. se: "nwse"
  28828. },
  28829. rL = {
  28830. brushStyle: {
  28831. lineWidth: 2,
  28832. stroke: "rgba(210,219,238,0.3)",
  28833. fill: "#D2DBEE"
  28834. },
  28835. transformable: !0,
  28836. brushMode: "single",
  28837. removeOnClick: !1
  28838. },
  28839. oL = 0,
  28840. aL = function (t) {
  28841. function e(e) {
  28842. var n = t.call(this) || this;
  28843. return n._track = [], n._covers = [], n._handlers = {}, n._zr = e, n.group = new Br, n._uid = "brushController_" + oL++, E(OL, (function (t, e) {
  28844. this._handlers[e] = W(t, this)
  28845. }), n), n
  28846. }
  28847. return n(e, t), e.prototype.enableBrush = function (t) {
  28848. return this._brushType && this._doDisableBrush(), t.brushType && this._doEnableBrush(t), this
  28849. }, e.prototype._doEnableBrush = function (t) {
  28850. var e = this._zr;
  28851. this._enableGlobalPan || function (t, e, n) {
  28852. QI(t)[e] = n
  28853. }(e, eL, this._uid), E(this._handlers, (function (t, n) {
  28854. e.on(n, t)
  28855. })), this._brushType = t.brushType, this._brushOption = C(T(rL), t, !0)
  28856. }, e.prototype._doDisableBrush = function () {
  28857. var t = this._zr;
  28858. ! function (t, e, n) {
  28859. var i = QI(t);
  28860. i[e] === n && (i[e] = null)
  28861. }(t, eL, this._uid), E(this._handlers, (function (e, n) {
  28862. t.off(n, e)
  28863. })), this._brushType = this._brushOption = null
  28864. }, e.prototype.setPanels = function (t) {
  28865. if (t && t.length) {
  28866. var e = this._panels = {};
  28867. E(t, (function (t) {
  28868. e[t.panelId] = T(t)
  28869. }))
  28870. } else this._panels = null;
  28871. return this
  28872. }, e.prototype.mount = function (t) {
  28873. t = t || {}, this._enableGlobalPan = t.enableGlobalPan;
  28874. var e = this.group;
  28875. return this._zr.add(e), e.attr({
  28876. x: t.x || 0,
  28877. y: t.y || 0,
  28878. rotation: t.rotation || 0,
  28879. scaleX: t.scaleX || 1,
  28880. scaleY: t.scaleY || 1
  28881. }), this._transform = e.getLocalTransform(), this
  28882. }, e.prototype.updateCovers = function (t) {
  28883. t = z(t, (function (t) {
  28884. return C(T(rL), t, !0)
  28885. }));
  28886. var e = this._covers,
  28887. n = this._covers = [],
  28888. i = this,
  28889. r = this._creatingCover;
  28890. return new Gm(e, t, (function (t, e) {
  28891. return o(t.__brushOption, e)
  28892. }), o).add(a).update(a).remove((function (t) {
  28893. e[t] !== r && i.group.remove(e[t])
  28894. })).execute(), this;
  28895. function o(t, e) {
  28896. return (null != t.id ? t.id : "\0-brush-index-" + e) + "-" + t.brushType
  28897. }
  28898. function a(o, a) {
  28899. var s = t[o];
  28900. if (null != a && e[a] === r) n[o] = e[a];
  28901. else {
  28902. var l = n[o] = null != a ? (e[a].__brushOption = s, e[a]) : lL(i, sL(i, s));
  28903. cL(i, l)
  28904. }
  28905. }
  28906. }, e.prototype.unmount = function () {
  28907. return this.enableBrush(!1), gL(this), this._zr.remove(this.group), this
  28908. }, e.prototype.dispose = function () {
  28909. this.unmount(), this.off()
  28910. }, e
  28911. }(jt);
  28912. function sL(t, e) {
  28913. var n = NL[e.brushType].createCover(t, e);
  28914. return n.__brushOption = e, hL(n, e), t.group.add(n), n
  28915. }
  28916. function lL(t, e) {
  28917. var n = pL(e);
  28918. return n.endCreating && (n.endCreating(t, e), hL(e, e.__brushOption)), e
  28919. }
  28920. function uL(t, e) {
  28921. var n = e.__brushOption;
  28922. pL(e).updateCoverShape(t, e, n.range, n)
  28923. }
  28924. function hL(t, e) {
  28925. var n = e.z;
  28926. null == n && (n = 1e4), t.traverse((function (t) {
  28927. t.z = n, t.z2 = n
  28928. }))
  28929. }
  28930. function cL(t, e) {
  28931. pL(e).updateCommon(t, e), uL(t, e)
  28932. }
  28933. function pL(t) {
  28934. return NL[t.__brushOption.brushType]
  28935. }
  28936. function dL(t, e, n) {
  28937. var i, r = t._panels;
  28938. if (!r) return $k;
  28939. var o = t._transform;
  28940. return E(r, (function (t) {
  28941. t.isTargetByCursor(e, n, o) && (i = t)
  28942. })), i
  28943. }
  28944. function fL(t, e) {
  28945. var n = t._panels;
  28946. if (!n) return $k;
  28947. var i = e.__brushOption.panelId;
  28948. return null != i ? n[i] : $k
  28949. }
  28950. function gL(t) {
  28951. var e = t._covers,
  28952. n = e.length;
  28953. return E(e, (function (e) {
  28954. t.group.remove(e)
  28955. }), t), e.length = 0, !!n
  28956. }
  28957. function yL(t, e) {
  28958. var n = z(t._covers, (function (t) {
  28959. var e = t.__brushOption,
  28960. n = T(e.range);
  28961. return {
  28962. brushType: e.brushType,
  28963. panelId: e.panelId,
  28964. range: n
  28965. }
  28966. }));
  28967. t.trigger("brush", {
  28968. areas: n,
  28969. isEnd: !!e.isEnd,
  28970. removeOnClick: !!e.removeOnClick
  28971. })
  28972. }
  28973. function vL(t) {
  28974. var e = t.length - 1;
  28975. return e < 0 && (e = 0), [t[0], t[e]]
  28976. }
  28977. function mL(t, e, n, i) {
  28978. var r = new Br;
  28979. return r.add(new Ws({
  28980. name: "main",
  28981. style: wL(n),
  28982. silent: !0,
  28983. draggable: !0,
  28984. cursor: "move",
  28985. drift: H(IL, t, e, r, ["n", "s", "w", "e"]),
  28986. ondragend: H(yL, e, {
  28987. isEnd: !0
  28988. })
  28989. })), E(i, (function (n) {
  28990. r.add(new Ws({
  28991. name: n.join(""),
  28992. style: {
  28993. opacity: 0
  28994. },
  28995. draggable: !0,
  28996. silent: !0,
  28997. invisible: !0,
  28998. drift: H(IL, t, e, r, n),
  28999. ondragend: H(yL, e, {
  29000. isEnd: !0
  29001. })
  29002. }))
  29003. })), r
  29004. }
  29005. function xL(t, e, n, i) {
  29006. var r = i.brushStyle.lineWidth || 0,
  29007. o = Qk(r, 6),
  29008. a = n[0][0],
  29009. s = n[1][0],
  29010. l = a - r / 2,
  29011. u = s - r / 2,
  29012. h = n[0][1],
  29013. c = n[1][1],
  29014. p = h - o + r / 2,
  29015. d = c - o + r / 2,
  29016. f = h - a,
  29017. g = c - s,
  29018. y = f + r,
  29019. v = g + r;
  29020. bL(t, e, "main", a, s, f, g), i.transformable && (bL(t, e, "w", l, u, o, v), bL(t, e, "e", p, u, o, v), bL(t, e, "n", l, u, y, o), bL(t, e, "s", l, d, y, o), bL(t, e, "nw", l, u, o, o), bL(t, e, "ne", p, u, o, o), bL(t, e, "sw", l, d, o, o), bL(t, e, "se", p, d, o, o))
  29021. }
  29022. function _L(t, e) {
  29023. var n = e.__brushOption,
  29024. i = n.transformable,
  29025. r = e.childAt(0);
  29026. r.useStyle(wL(n)), r.attr({
  29027. silent: !i,
  29028. cursor: i ? "move" : "default"
  29029. }), E([
  29030. ["w"],
  29031. ["e"],
  29032. ["n"],
  29033. ["s"],
  29034. ["s", "e"],
  29035. ["s", "w"],
  29036. ["n", "e"],
  29037. ["n", "w"]
  29038. ], (function (n) {
  29039. var r = e.childOfName(n.join("")),
  29040. o = 1 === n.length ? ML(t, n[0]) : function (t, e) {
  29041. var n = [ML(t, e[0]), ML(t, e[1])];
  29042. return ("e" === n[0] || "w" === n[0]) && n.reverse(), n.join("")
  29043. }(t, n);
  29044. r && r.attr({
  29045. silent: !i,
  29046. invisible: !i,
  29047. cursor: i ? iL[o] + "-resize" : null
  29048. })
  29049. }))
  29050. }
  29051. function bL(t, e, n, i, r, o, a) {
  29052. var s = e.childOfName(n);
  29053. s && s.setShape(function (t) {
  29054. var e = Jk(t[0][0], t[1][0]),
  29055. n = Jk(t[0][1], t[1][1]),
  29056. i = Qk(t[0][0], t[1][0]),
  29057. r = Qk(t[0][1], t[1][1]);
  29058. return {
  29059. x: e,
  29060. y: n,
  29061. width: i - e,
  29062. height: r - n
  29063. }
  29064. }(DL(t, e, [
  29065. [i, r],
  29066. [i + o, r + a]
  29067. ])))
  29068. }
  29069. function wL(t) {
  29070. return k({
  29071. strokeNoScale: !0
  29072. }, t.brushStyle)
  29073. }
  29074. function SL(t, e, n, i) {
  29075. var r = [Jk(t, n), Jk(e, i)],
  29076. o = [Qk(t, n), Qk(e, i)];
  29077. return [
  29078. [r[0], o[0]],
  29079. [r[1], o[1]]
  29080. ]
  29081. }
  29082. function ML(t, e) {
  29083. var n = Gh({
  29084. w: "left",
  29085. e: "right",
  29086. n: "top",
  29087. s: "bottom"
  29088. } [e], function (t) {
  29089. return Bh(t.group)
  29090. }(t));
  29091. return {
  29092. left: "w",
  29093. right: "e",
  29094. top: "n",
  29095. bottom: "s"
  29096. } [n]
  29097. }
  29098. function IL(t, e, n, i, r, o) {
  29099. var a = n.__brushOption,
  29100. s = t.toRectRange(a.range),
  29101. l = CL(e, r, o);
  29102. E(i, (function (t) {
  29103. var e = nL[t];
  29104. s[e[0]][e[1]] += l[e[0]]
  29105. })), a.range = t.fromRectRange(SL(s[0][0], s[1][0], s[0][1], s[1][1])), cL(e, n), yL(e, {
  29106. isEnd: !1
  29107. })
  29108. }
  29109. function TL(t, e, n, i) {
  29110. var r = e.__brushOption.range,
  29111. o = CL(t, n, i);
  29112. E(r, (function (t) {
  29113. t[0] += o[0], t[1] += o[1]
  29114. })), cL(t, e), yL(t, {
  29115. isEnd: !1
  29116. })
  29117. }
  29118. function CL(t, e, n) {
  29119. var i = t.group,
  29120. r = i.transformCoordToLocal(e, n),
  29121. o = i.transformCoordToLocal(0, 0);
  29122. return [r[0] - o[0], r[1] - o[1]]
  29123. }
  29124. function DL(t, e, n) {
  29125. var i = fL(t, e);
  29126. return i && i !== $k ? i.clipPath(n, t._transform) : T(n)
  29127. }
  29128. function AL(t) {
  29129. var e = t.event;
  29130. e.preventDefault && e.preventDefault()
  29131. }
  29132. function kL(t, e, n) {
  29133. return t.childOfName("main").contain(e, n)
  29134. }
  29135. function LL(t, e, n, i) {
  29136. var r, o = t._creatingCover,
  29137. a = t._creatingPanel,
  29138. s = t._brushOption;
  29139. if (t._track.push(n.slice()), function (t) {
  29140. var e = t._track;
  29141. if (!e.length) return !1;
  29142. var n = e[e.length - 1],
  29143. i = e[0],
  29144. r = n[0] - i[0],
  29145. o = n[1] - i[1];
  29146. return tL(r * r + o * o, .5) > 6
  29147. }(t) || o) {
  29148. if (a && !o) {
  29149. "single" === s.brushMode && gL(t);
  29150. var l = T(s);
  29151. l.brushType = PL(l.brushType, a), l.panelId = a === $k ? null : a.panelId, o = t._creatingCover = sL(t, l), t._covers.push(o)
  29152. }
  29153. if (o) {
  29154. var u = NL[PL(t._brushType, a)];
  29155. o.__brushOption.range = u.getCreatingRange(DL(t, o, t._track)), i && (lL(t, o), u.updateCommon(t, o)), uL(t, o), r = {
  29156. isEnd: i
  29157. }
  29158. }
  29159. } else i && "single" === s.brushMode && s.removeOnClick && dL(t, e, n) && gL(t) && (r = {
  29160. isEnd: i,
  29161. removeOnClick: !0
  29162. });
  29163. return r
  29164. }
  29165. function PL(t, e) {
  29166. return "auto" === t ? e.defaultBrushType : t
  29167. }
  29168. var OL = {
  29169. mousedown: function (t) {
  29170. if (this._dragging) RL(this, t);
  29171. else if (!t.target || !t.target.draggable) {
  29172. AL(t);
  29173. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  29174. this._creatingCover = null, (this._creatingPanel = dL(this, t, e)) && (this._dragging = !0, this._track = [e.slice()])
  29175. }
  29176. },
  29177. mousemove: function (t) {
  29178. var e = t.offsetX,
  29179. n = t.offsetY,
  29180. i = this.group.transformCoordToLocal(e, n);
  29181. if (function (t, e, n) {
  29182. if (t._brushType && ! function (t, e, n) {
  29183. var i = t._zr;
  29184. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  29185. }(t, e.offsetX, e.offsetY)) {
  29186. var i = t._zr,
  29187. r = t._covers,
  29188. o = dL(t, e, n);
  29189. if (!t._dragging)
  29190. for (var a = 0; a < r.length; a++) {
  29191. var s = r[a].__brushOption;
  29192. if (o && (o === $k || s.panelId === o.panelId) && NL[s.brushType].contain(r[a], n[0], n[1])) return
  29193. }
  29194. o && i.setCursorStyle("crosshair")
  29195. }
  29196. }(this, t, i), this._dragging) {
  29197. AL(t);
  29198. var r = LL(this, t, i, !1);
  29199. r && yL(this, r)
  29200. }
  29201. },
  29202. mouseup: function (t) {
  29203. RL(this, t)
  29204. }
  29205. };
  29206. function RL(t, e) {
  29207. if (t._dragging) {
  29208. AL(e);
  29209. var n = e.offsetX,
  29210. i = e.offsetY,
  29211. r = t.group.transformCoordToLocal(n, i),
  29212. o = LL(t, e, r, !0);
  29213. t._dragging = !1, t._track = [], t._creatingCover = null, o && yL(t, o)
  29214. }
  29215. }
  29216. var NL = {
  29217. lineX: EL(0),
  29218. lineY: EL(1),
  29219. rect: {
  29220. createCover: function (t, e) {
  29221. function n(t) {
  29222. return t
  29223. }
  29224. return mL({
  29225. toRectRange: n,
  29226. fromRectRange: n
  29227. }, t, e, [
  29228. ["w"],
  29229. ["e"],
  29230. ["n"],
  29231. ["s"],
  29232. ["s", "e"],
  29233. ["s", "w"],
  29234. ["n", "e"],
  29235. ["n", "w"]
  29236. ])
  29237. },
  29238. getCreatingRange: function (t) {
  29239. var e = vL(t);
  29240. return SL(e[1][0], e[1][1], e[0][0], e[0][1])
  29241. },
  29242. updateCoverShape: function (t, e, n, i) {
  29243. xL(t, e, n, i)
  29244. },
  29245. updateCommon: _L,
  29246. contain: kL
  29247. },
  29248. polygon: {
  29249. createCover: function (t, e) {
  29250. var n = new Br;
  29251. return n.add(new Zu({
  29252. name: "main",
  29253. style: wL(e),
  29254. silent: !0
  29255. })), n
  29256. },
  29257. getCreatingRange: function (t) {
  29258. return t
  29259. },
  29260. endCreating: function (t, e) {
  29261. e.remove(e.childAt(0)), e.add(new Xu({
  29262. name: "main",
  29263. draggable: !0,
  29264. drift: H(TL, t, e),
  29265. ondragend: H(yL, t, {
  29266. isEnd: !0
  29267. })
  29268. }))
  29269. },
  29270. updateCoverShape: function (t, e, n, i) {
  29271. e.childAt(0).setShape({
  29272. points: DL(t, e, n)
  29273. })
  29274. },
  29275. updateCommon: _L,
  29276. contain: kL
  29277. }
  29278. };
  29279. function EL(t) {
  29280. return {
  29281. createCover: function (e, n) {
  29282. return mL({
  29283. toRectRange: function (e) {
  29284. var n = [e, [0, 100]];
  29285. return t && n.reverse(), n
  29286. },
  29287. fromRectRange: function (e) {
  29288. return e[t]
  29289. }
  29290. }, e, n, [
  29291. [
  29292. ["w"],
  29293. ["e"]
  29294. ],
  29295. [
  29296. ["n"],
  29297. ["s"]
  29298. ]
  29299. ][t])
  29300. },
  29301. getCreatingRange: function (e) {
  29302. var n = vL(e);
  29303. return [Jk(n[0][t], n[1][t]), Qk(n[0][t], n[1][t])]
  29304. },
  29305. updateCoverShape: function (e, n, i, r) {
  29306. var o, a = fL(e, n);
  29307. if (a !== $k && a.getLinearBrushOtherExtent) o = a.getLinearBrushOtherExtent(t);
  29308. else {
  29309. var s = e._zr;
  29310. o = [0, [s.getWidth(), s.getHeight()][1 - t]]
  29311. }
  29312. var l = [i, o];
  29313. t && l.reverse(), xL(e, n, l, r)
  29314. },
  29315. updateCommon: _L,
  29316. contain: kL
  29317. }
  29318. }
  29319. function zL(t) {
  29320. return t = FL(t),
  29321. function (e) {
  29322. return Yh(e, t)
  29323. }
  29324. }
  29325. function VL(t, e) {
  29326. return t = FL(t),
  29327. function (n) {
  29328. var i = null != e ? e : n,
  29329. r = i ? t.width : t.height,
  29330. o = i ? t.x : t.y;
  29331. return [o, o + (r || 0)]
  29332. }
  29333. }
  29334. function BL(t, e, n) {
  29335. var i = FL(t);
  29336. return function (t, r) {
  29337. return i.contain(r[0], r[1]) && !lT(t, e, n)
  29338. }
  29339. }
  29340. function FL(t) {
  29341. return ze.create(t)
  29342. }
  29343. var GL = ["axisLine", "axisTickLabel", "axisName"],
  29344. WL = function (t) {
  29345. function e() {
  29346. var n = null !== t && t.apply(this, arguments) || this;
  29347. return n.type = e.type, n
  29348. }
  29349. return n(e, t), e.prototype.init = function (e, n) {
  29350. t.prototype.init.apply(this, arguments), (this._brushController = new aL(n.getZr())).on("brush", W(this._onBrush, this))
  29351. }, e.prototype.render = function (t, e, n, i) {
  29352. if (! function (t, e, n) {
  29353. return n && "axisAreaSelect" === n.type && e.findComponents({
  29354. mainType: "parallelAxis",
  29355. query: n
  29356. })[0] === t
  29357. }(t, e, i)) {
  29358. this.axisModel = t, this.api = n, this.group.removeAll();
  29359. var r = this._axisGroup;
  29360. if (this._axisGroup = new Br, this.group.add(this._axisGroup), t.get("show")) {
  29361. var o = function (t, e) {
  29362. return e.getComponent("parallel", t.get("parallelIndex"))
  29363. }(t, e),
  29364. a = o.coordinateSystem,
  29365. s = t.getAreaSelectStyle(),
  29366. l = s.width,
  29367. u = t.axis.dim,
  29368. h = A({
  29369. strokeContainThreshold: l
  29370. }, a.getAxisLayout(u)),
  29371. c = new cI(t, h);
  29372. E(GL, c.add, c), this._axisGroup.add(c.getGroup()), this._refreshBrushController(h, s, t, o, l, n), Hh(r, this._axisGroup, t)
  29373. }
  29374. }
  29375. }, e.prototype._refreshBrushController = function (t, e, n, i, r, o) {
  29376. var a = n.axis.getExtent(),
  29377. s = a[1] - a[0],
  29378. l = Math.min(30, .1 * Math.abs(s)),
  29379. u = ze.create({
  29380. x: a[0],
  29381. y: -r / 2,
  29382. width: s,
  29383. height: r
  29384. });
  29385. u.x -= l, u.width += 2 * l, this._brushController.mount({
  29386. enableGlobalPan: !0,
  29387. rotation: t.rotation,
  29388. x: t.position[0],
  29389. y: t.position[1]
  29390. }).setPanels([{
  29391. panelId: "pl",
  29392. clipPath: zL(u),
  29393. isTargetByCursor: BL(u, o, i),
  29394. getLinearBrushOtherExtent: VL(u, 0)
  29395. }]).enableBrush({
  29396. brushType: "lineX",
  29397. brushStyle: e,
  29398. removeOnClick: !0
  29399. }).updateCovers(function (t) {
  29400. var e = t.axis;
  29401. return z(t.activeIntervals, (function (t) {
  29402. return {
  29403. brushType: "lineX",
  29404. panelId: "pl",
  29405. range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
  29406. }
  29407. }))
  29408. }(n))
  29409. }, e.prototype._onBrush = function (t) {
  29410. var e = t.areas,
  29411. n = this.axisModel,
  29412. i = n.axis,
  29413. r = z(e, (function (t) {
  29414. return [i.coordToData(t.range[0], !0), i.coordToData(t.range[1], !0)]
  29415. }));
  29416. (!n.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  29417. type: "axisAreaSelect",
  29418. parallelAxisId: n.id,
  29419. intervals: r
  29420. })
  29421. }, e.prototype.dispose = function () {
  29422. this._brushController.dispose()
  29423. }, e.type = "parallelAxis", e
  29424. }(Ag);
  29425. var HL = {
  29426. type: "axisAreaSelect",
  29427. event: "axisAreaSelected"
  29428. };
  29429. var YL = {
  29430. type: "value",
  29431. areaSelectStyle: {
  29432. width: 20,
  29433. borderWidth: 1,
  29434. borderColor: "rgba(160,197,232)",
  29435. color: "rgba(160,197,232)",
  29436. opacity: .3
  29437. },
  29438. realtime: !0,
  29439. z: 10
  29440. };
  29441. function XL(t) {
  29442. t.registerComponentView(kk), t.registerComponentModel(Ok), t.registerCoordinateSystem("parallel", qk), t.registerPreprocessor(Ak), t.registerComponentModel(Kk), t.registerComponentView(WL), jM(t, "parallel", Kk, YL),
  29443. function (t) {
  29444. t.registerAction(HL, (function (t, e) {
  29445. e.eachComponent({
  29446. mainType: "parallelAxis",
  29447. query: t
  29448. }, (function (e) {
  29449. e.axis.model.setActiveIntervals(t.intervals)
  29450. }))
  29451. })), t.registerAction("parallelAxisExpand", (function (t, e) {
  29452. e.eachComponent({
  29453. mainType: "parallel",
  29454. query: t
  29455. }, (function (e) {
  29456. e.setAxisExpand(t)
  29457. }))
  29458. }))
  29459. }(t)
  29460. }
  29461. var UL = function () {
  29462. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0
  29463. },
  29464. ZL = function (t) {
  29465. function e(e) {
  29466. return t.call(this, e) || this
  29467. }
  29468. return n(e, t), e.prototype.getDefaultShape = function () {
  29469. return new UL
  29470. }, e.prototype.buildPath = function (t, e) {
  29471. var n = e.extent;
  29472. t.moveTo(e.x1, e.y1), t.bezierCurveTo(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), "vertical" === e.orient ? (t.lineTo(e.x2 + n, e.y2), t.bezierCurveTo(e.cpx2 + n, e.cpy2, e.cpx1 + n, e.cpy1, e.x1 + n, e.y1)) : (t.lineTo(e.x2, e.y2 + n), t.bezierCurveTo(e.cpx2, e.cpy2 + n, e.cpx1, e.cpy1 + n, e.x1, e.y1 + n)), t.closePath()
  29473. }, e.prototype.highlight = function () {
  29474. Ol(this)
  29475. }, e.prototype.downplay = function () {
  29476. Rl(this)
  29477. }, e
  29478. }(ks),
  29479. jL = function (t) {
  29480. function e() {
  29481. var n = null !== t && t.apply(this, arguments) || this;
  29482. return n.type = e.type, n._focusAdjacencyDisabled = !1, n
  29483. }
  29484. return n(e, t), e.prototype.render = function (t, e, n) {
  29485. var i = this,
  29486. r = t.getGraph(),
  29487. o = this.group,
  29488. a = t.layoutInfo,
  29489. s = a.width,
  29490. l = a.height,
  29491. u = t.getData(),
  29492. h = t.getData("edge"),
  29493. c = t.get("orient");
  29494. this._model = t, o.removeAll(), o.x = a.x, o.y = a.y, r.eachEdge((function (e) {
  29495. var n = new ZL,
  29496. i = rl(n);
  29497. i.dataIndex = e.dataIndex, i.seriesIndex = t.seriesIndex, i.dataType = "edge";
  29498. var r, a, u, p, d, f, g, y, v = e.getModel(),
  29499. m = v.getModel("lineStyle"),
  29500. x = m.get("curveness"),
  29501. _ = e.node1.getLayout(),
  29502. b = e.node1.getModel(),
  29503. w = b.get("localX"),
  29504. S = b.get("localY"),
  29505. M = e.node2.getLayout(),
  29506. I = e.node2.getModel(),
  29507. T = I.get("localX"),
  29508. C = I.get("localY"),
  29509. D = e.getLayout();
  29510. n.shape.extent = Math.max(1, D.dy), n.shape.orient = c, "vertical" === c ? (r = (null != w ? w * s : _.x) + D.sy, a = (null != S ? S * l : _.y) + _.dy, u = (null != T ? T * s : M.x) + D.ty, d = r, f = a * (1 - x) + (p = null != C ? C * l : M.y) * x, g = u, y = a * x + p * (1 - x)) : (r = (null != w ? w * s : _.x) + _.dx, a = (null != S ? S * l : _.y) + D.sy, d = r * (1 - x) + (u = null != T ? T * s : M.x) * x, f = a, g = r * x + u * (1 - x), y = p = (null != C ? C * l : M.y) + D.ty), n.setShape({
  29511. x1: r,
  29512. y1: a,
  29513. x2: u,
  29514. y2: p,
  29515. cpx1: d,
  29516. cpy1: f,
  29517. cpx2: g,
  29518. cpy2: y
  29519. }), n.useStyle(m.getItemStyle()), qL(n.style, c, e);
  29520. var A = "" + v.get("value"),
  29521. k = rc(v, "edgeLabel");
  29522. ic(n, k, {
  29523. labelFetcher: {
  29524. getFormattedLabel: function (e, n, i, r, o, a) {
  29525. return t.getFormattedLabel(e, n, "edge", r, ot(o, k.normal && k.normal.get("formatter"), A), a)
  29526. }
  29527. },
  29528. labelDataIndex: e.dataIndex,
  29529. defaultText: A
  29530. }), n.setTextConfig({
  29531. position: "inside"
  29532. });
  29533. var L = v.getModel("emphasis");
  29534. $l(n, v, "lineStyle", (function (t) {
  29535. var n = t.getItemStyle();
  29536. return qL(n, c, e), n
  29537. })), o.add(n), h.setItemGraphicEl(e.dataIndex, n);
  29538. var P = L.get("focus");
  29539. Zl(n, "adjacency" === P ? e.getAdjacentDataIndices() : "trajectory" === P ? e.getTrajectoryDataIndices() : P, L.get("blurScope"), L.get("disabled"))
  29540. })), r.eachNode((function (e) {
  29541. var n = e.getLayout(),
  29542. i = e.getModel(),
  29543. r = i.get("localX"),
  29544. a = i.get("localY"),
  29545. h = i.getModel("emphasis"),
  29546. c = new Ws({
  29547. shape: {
  29548. x: null != r ? r * s : n.x,
  29549. y: null != a ? a * l : n.y,
  29550. width: n.dx,
  29551. height: n.dy
  29552. },
  29553. style: i.getModel("itemStyle").getItemStyle(),
  29554. z2: 10
  29555. });
  29556. ic(c, rc(i), {
  29557. labelFetcher: {
  29558. getFormattedLabel: function (e, n) {
  29559. return t.getFormattedLabel(e, n, "node")
  29560. }
  29561. },
  29562. labelDataIndex: e.dataIndex,
  29563. defaultText: e.id
  29564. }), c.disableLabelAnimation = !0, c.setStyle("fill", e.getVisual("color")), c.setStyle("decal", e.getVisual("style").decal), $l(c, i), o.add(c), u.setItemGraphicEl(e.dataIndex, c), rl(c).dataType = "node";
  29565. var p = h.get("focus");
  29566. Zl(c, "adjacency" === p ? e.getAdjacentDataIndices() : "trajectory" === p ? e.getTrajectoryDataIndices() : p, h.get("blurScope"), h.get("disabled"))
  29567. })), u.eachItemGraphicEl((function (e, r) {
  29568. u.getItemModel(r).get("draggable") && (e.drift = function (e, o) {
  29569. i._focusAdjacencyDisabled = !0, this.shape.x += e, this.shape.y += o, this.dirty(), n.dispatchAction({
  29570. type: "dragNode",
  29571. seriesId: t.id,
  29572. dataIndex: u.getRawIndex(r),
  29573. localX: this.shape.x / s,
  29574. localY: this.shape.y / l
  29575. })
  29576. }, e.ondragend = function () {
  29577. i._focusAdjacencyDisabled = !1
  29578. }, e.draggable = !0, e.cursor = "move")
  29579. })), !this._data && t.isAnimationEnabled() && o.setClipPath(function (t, e, n) {
  29580. var i = new Ws({
  29581. shape: {
  29582. x: t.x - 10,
  29583. y: t.y - 10,
  29584. width: 0,
  29585. height: t.height + 20
  29586. }
  29587. });
  29588. return mh(i, {
  29589. shape: {
  29590. width: t.width + 20
  29591. }
  29592. }, e, n), i
  29593. }(o.getBoundingRect(), t, (function () {
  29594. o.removeClipPath()
  29595. }))), this._data = t.getData()
  29596. }, e.prototype.dispose = function () {}, e.type = "sankey", e
  29597. }(Og);
  29598. function qL(t, e, n) {
  29599. switch (t.fill) {
  29600. case "source":
  29601. t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
  29602. break;
  29603. case "target":
  29604. t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
  29605. break;
  29606. case "gradient":
  29607. var i = n.node1.getVisual("color"),
  29608. r = n.node2.getVisual("color");
  29609. U(i) && U(r) && (t.fill = new oh(0, 0, +("horizontal" === e), +("vertical" === e), [{
  29610. color: i,
  29611. offset: 0
  29612. }, {
  29613. color: r,
  29614. offset: 1
  29615. }]))
  29616. }
  29617. }
  29618. var KL = function (t) {
  29619. function e() {
  29620. var n = null !== t && t.apply(this, arguments) || this;
  29621. return n.type = e.type, n
  29622. }
  29623. return n(e, t), e.prototype.getInitialData = function (t, e) {
  29624. var n = t.edges || t.links,
  29625. i = t.data || t.nodes,
  29626. r = t.levels;
  29627. this.levelModels = [];
  29628. for (var o = this.levelModels, a = 0; a < r.length; a++) null != r[a].depth && r[a].depth >= 0 && (o[r[a].depth] = new Cc(r[a], this, e));
  29629. if (i && n) {
  29630. var s = sk(i, n, this, !0, (function (t, e) {
  29631. t.wrapMethod("getItemModel", (function (t, e) {
  29632. var n = t.parentModel,
  29633. i = n.getData().getItemLayout(e);
  29634. if (i) {
  29635. var r = i.depth,
  29636. o = n.levelModels[r];
  29637. o && (t.parentModel = o)
  29638. }
  29639. return t
  29640. })), e.wrapMethod("getItemModel", (function (t, e) {
  29641. var n = t.parentModel,
  29642. i = n.getGraph().getEdgeByIndex(e).node1.getLayout();
  29643. if (i) {
  29644. var r = i.depth,
  29645. o = n.levelModels[r];
  29646. o && (t.parentModel = o)
  29647. }
  29648. return t
  29649. }))
  29650. }));
  29651. return s.data
  29652. }
  29653. }, e.prototype.setNodePosition = function (t, e) {
  29654. var n = (this.option.data || this.option.nodes)[t];
  29655. n.localX = e[0], n.localY = e[1]
  29656. }, e.prototype.getGraph = function () {
  29657. return this.getData().graph
  29658. }, e.prototype.getEdgeData = function () {
  29659. return this.getGraph().edgeData
  29660. }, e.prototype.formatTooltip = function (t, e, n) {
  29661. function i(t) {
  29662. return isNaN(t) || null == t
  29663. }
  29664. if ("edge" === n) {
  29665. var r = this.getDataParams(t, n),
  29666. o = r.data,
  29667. a = r.value;
  29668. return og("nameValue", {
  29669. name: o.source + " -- " + o.target,
  29670. value: a,
  29671. noValue: i(a)
  29672. })
  29673. }
  29674. var s = this.getGraph().getNodeByIndex(t).getLayout().value,
  29675. l = this.getDataParams(t, n).data.name;
  29676. return og("nameValue", {
  29677. name: null != l ? l + "" : null,
  29678. value: s,
  29679. noValue: i(s)
  29680. })
  29681. }, e.prototype.optionUpdated = function () {}, e.prototype.getDataParams = function (e, n) {
  29682. var i = t.prototype.getDataParams.call(this, e, n);
  29683. if (null == i.value && "node" === n) {
  29684. var r = this.getGraph().getNodeByIndex(e).getLayout().value;
  29685. i.value = r
  29686. }
  29687. return i
  29688. }, e.type = "series.sankey", e.defaultOption = {
  29689. z: 2,
  29690. coordinateSystem: "view",
  29691. left: "5%",
  29692. top: "5%",
  29693. right: "20%",
  29694. bottom: "5%",
  29695. orient: "horizontal",
  29696. nodeWidth: 20,
  29697. nodeGap: 8,
  29698. draggable: !0,
  29699. layoutIterations: 32,
  29700. label: {
  29701. show: !0,
  29702. position: "right",
  29703. fontSize: 12
  29704. },
  29705. edgeLabel: {
  29706. show: !1,
  29707. fontSize: 12
  29708. },
  29709. levels: [],
  29710. nodeAlign: "justify",
  29711. lineStyle: {
  29712. color: "#314656",
  29713. opacity: .2,
  29714. curveness: .5
  29715. },
  29716. emphasis: {
  29717. label: {
  29718. show: !0
  29719. },
  29720. lineStyle: {
  29721. opacity: .5
  29722. }
  29723. },
  29724. select: {
  29725. itemStyle: {
  29726. borderColor: "#212121"
  29727. }
  29728. },
  29729. animationEasing: "linear",
  29730. animationDuration: 1e3
  29731. }, e
  29732. }(bg);
  29733. function $L(t, e) {
  29734. t.eachSeriesByType("sankey", (function (t) {
  29735. var n = t.get("nodeWidth"),
  29736. i = t.get("nodeGap"),
  29737. r = function (t, e) {
  29738. return kp(t.getBoxLayoutParams(), {
  29739. width: e.getWidth(),
  29740. height: e.getHeight()
  29741. })
  29742. }(t, e);
  29743. t.layoutInfo = r;
  29744. var o = r.width,
  29745. a = r.height,
  29746. s = t.getGraph(),
  29747. l = s.nodes,
  29748. u = s.edges;
  29749. ! function (t) {
  29750. E(t, (function (t) {
  29751. var e = sP(t.outEdges, aP),
  29752. n = sP(t.inEdges, aP),
  29753. i = t.getValue() || 0,
  29754. r = Math.max(e, n, i);
  29755. t.setLayout({
  29756. value: r
  29757. }, !0)
  29758. }))
  29759. }(l),
  29760. function (t, e, n, i, r, o, a, s, l) {
  29761. (function (t, e, n, i, r, o, a) {
  29762. for (var s = [], l = [], u = [], h = [], c = 0, p = 0; p < e.length; p++) s[p] = 1;
  29763. for (p = 0; p < t.length; p++) l[p] = t[p].inEdges.length, 0 === l[p] && u.push(t[p]);
  29764. var d = -1;
  29765. for (; u.length;) {
  29766. for (var f = 0; f < u.length; f++) {
  29767. var g = u[f],
  29768. y = g.hostGraph.data.getRawDataItem(g.dataIndex),
  29769. v = null != y.depth && y.depth >= 0;
  29770. v && y.depth > d && (d = y.depth), g.setLayout({
  29771. depth: v ? y.depth : c
  29772. }, !0), "vertical" === o ? g.setLayout({
  29773. dy: n
  29774. }, !0) : g.setLayout({
  29775. dx: n
  29776. }, !0);
  29777. for (var m = 0; m < g.outEdges.length; m++) {
  29778. var x = g.outEdges[m];
  29779. s[e.indexOf(x)] = 0;
  29780. var _ = x.node2;
  29781. 0 == --l[t.indexOf(_)] && h.indexOf(_) < 0 && h.push(_)
  29782. }
  29783. }++c, u = h, h = []
  29784. }
  29785. for (p = 0; p < s.length; p++)
  29786. if (1 === s[p]) throw new Error("Sankey is a DAG, the original data has cycle!");
  29787. var b = d > c - 1 ? d : c - 1;
  29788. a && "left" !== a && function (t, e, n, i) {
  29789. if ("right" === e) {
  29790. for (var r = [], o = t, a = 0; o.length;) {
  29791. for (var s = 0; s < o.length; s++) {
  29792. var l = o[s];
  29793. l.setLayout({
  29794. skNodeHeight: a
  29795. }, !0);
  29796. for (var u = 0; u < l.inEdges.length; u++) {
  29797. var h = l.inEdges[u];
  29798. r.indexOf(h.node1) < 0 && r.push(h.node1)
  29799. }
  29800. }
  29801. o = r, r = [], ++a
  29802. }
  29803. E(t, (function (t) {
  29804. JL(t) || t.setLayout({
  29805. depth: Math.max(0, i - t.getLayout().skNodeHeight)
  29806. }, !0)
  29807. }))
  29808. } else "justify" === e && function (t, e) {
  29809. E(t, (function (t) {
  29810. JL(t) || t.outEdges.length || t.setLayout({
  29811. depth: e
  29812. }, !0)
  29813. }))
  29814. }(t, i)
  29815. }(t, a, 0, b);
  29816. var w = "vertical" === o ? (r - n) / b : (i - n) / b;
  29817. ! function (t, e, n) {
  29818. E(t, (function (t) {
  29819. var i = t.getLayout().depth * e;
  29820. "vertical" === n ? t.setLayout({
  29821. y: i
  29822. }, !0) : t.setLayout({
  29823. x: i
  29824. }, !0)
  29825. }))
  29826. }(t, w, o)
  29827. })(t, e, n, r, o, s, l),
  29828. function (t, e, n, i, r, o, a) {
  29829. var s = function (t, e) {
  29830. var n = [],
  29831. i = "vertical" === e ? "y" : "x",
  29832. r = Uo(t, (function (t) {
  29833. return t.getLayout()[i]
  29834. }));
  29835. return r.keys.sort((function (t, e) {
  29836. return t - e
  29837. })), E(r.keys, (function (t) {
  29838. n.push(r.buckets.get(t))
  29839. })), n
  29840. }(t, a);
  29841. (function (t, e, n, i, r, o) {
  29842. var a = 1 / 0;
  29843. E(t, (function (t) {
  29844. var e = t.length,
  29845. s = 0;
  29846. E(t, (function (t) {
  29847. s += t.getLayout().value
  29848. }));
  29849. var l = "vertical" === o ? (i - (e - 1) * r) / s : (n - (e - 1) * r) / s;
  29850. l < a && (a = l)
  29851. })), E(t, (function (t) {
  29852. E(t, (function (t, e) {
  29853. var n = t.getLayout().value * a;
  29854. "vertical" === o ? (t.setLayout({
  29855. x: e
  29856. }, !0), t.setLayout({
  29857. dx: n
  29858. }, !0)) : (t.setLayout({
  29859. y: e
  29860. }, !0), t.setLayout({
  29861. dy: n
  29862. }, !0))
  29863. }))
  29864. })), E(e, (function (t) {
  29865. var e = +t.getValue() * a;
  29866. t.setLayout({
  29867. dy: e
  29868. }, !0)
  29869. }))
  29870. })(s, e, n, i, r, a), QL(s, r, n, i, a);
  29871. for (var l = 1; o > 0; o--) tP(s, l *= .99, a), QL(s, r, n, i, a), lP(s, l, a), QL(s, r, n, i, a)
  29872. }(t, e, o, r, i, a, s),
  29873. function (t, e) {
  29874. var n = "vertical" === e ? "x" : "y";
  29875. E(t, (function (t) {
  29876. t.outEdges.sort((function (t, e) {
  29877. return t.node2.getLayout()[n] - e.node2.getLayout()[n]
  29878. })), t.inEdges.sort((function (t, e) {
  29879. return t.node1.getLayout()[n] - e.node1.getLayout()[n]
  29880. }))
  29881. })), E(t, (function (t) {
  29882. var e = 0,
  29883. n = 0;
  29884. E(t.outEdges, (function (t) {
  29885. t.setLayout({
  29886. sy: e
  29887. }, !0), e += t.getLayout().dy
  29888. })), E(t.inEdges, (function (t) {
  29889. t.setLayout({
  29890. ty: n
  29891. }, !0), n += t.getLayout().dy
  29892. }))
  29893. }))
  29894. }(t, s)
  29895. }(l, u, n, i, o, a, 0 !== B(l, (function (t) {
  29896. return 0 === t.getLayout().value
  29897. })).length ? 0 : t.get("layoutIterations"), t.get("orient"), t.get("nodeAlign"))
  29898. }))
  29899. }
  29900. function JL(t) {
  29901. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  29902. return null != e.depth && e.depth >= 0
  29903. }
  29904. function QL(t, e, n, i, r) {
  29905. var o = "vertical" === r ? "x" : "y";
  29906. E(t, (function (t) {
  29907. var a, s, l;
  29908. t.sort((function (t, e) {
  29909. return t.getLayout()[o] - e.getLayout()[o]
  29910. }));
  29911. for (var u = 0, h = t.length, c = "vertical" === r ? "dx" : "dy", p = 0; p < h; p++)(l = u - (s = t[p]).getLayout()[o]) > 0 && (a = s.getLayout()[o] + l, "vertical" === r ? s.setLayout({
  29912. x: a
  29913. }, !0) : s.setLayout({
  29914. y: a
  29915. }, !0)), u = s.getLayout()[o] + s.getLayout()[c] + e;
  29916. if ((l = u - e - ("vertical" === r ? i : n)) > 0) {
  29917. a = s.getLayout()[o] - l, "vertical" === r ? s.setLayout({
  29918. x: a
  29919. }, !0) : s.setLayout({
  29920. y: a
  29921. }, !0), u = a;
  29922. for (p = h - 2; p >= 0; --p)(l = (s = t[p]).getLayout()[o] + s.getLayout()[c] + e - u) > 0 && (a = s.getLayout()[o] - l, "vertical" === r ? s.setLayout({
  29923. x: a
  29924. }, !0) : s.setLayout({
  29925. y: a
  29926. }, !0)), u = s.getLayout()[o]
  29927. }
  29928. }))
  29929. }
  29930. function tP(t, e, n) {
  29931. E(t.slice().reverse(), (function (t) {
  29932. E(t, (function (t) {
  29933. if (t.outEdges.length) {
  29934. var i = sP(t.outEdges, eP, n) / sP(t.outEdges, aP);
  29935. if (isNaN(i)) {
  29936. var r = t.outEdges.length;
  29937. i = r ? sP(t.outEdges, nP, n) / r : 0
  29938. }
  29939. if ("vertical" === n) {
  29940. var o = t.getLayout().x + (i - oP(t, n)) * e;
  29941. t.setLayout({
  29942. x: o
  29943. }, !0)
  29944. } else {
  29945. var a = t.getLayout().y + (i - oP(t, n)) * e;
  29946. t.setLayout({
  29947. y: a
  29948. }, !0)
  29949. }
  29950. }
  29951. }))
  29952. }))
  29953. }
  29954. function eP(t, e) {
  29955. return oP(t.node2, e) * t.getValue()
  29956. }
  29957. function nP(t, e) {
  29958. return oP(t.node2, e)
  29959. }
  29960. function iP(t, e) {
  29961. return oP(t.node1, e) * t.getValue()
  29962. }
  29963. function rP(t, e) {
  29964. return oP(t.node1, e)
  29965. }
  29966. function oP(t, e) {
  29967. return "vertical" === e ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2
  29968. }
  29969. function aP(t) {
  29970. return t.getValue()
  29971. }
  29972. function sP(t, e, n) {
  29973. for (var i = 0, r = t.length, o = -1; ++o < r;) {
  29974. var a = +e(t[o], n);
  29975. isNaN(a) || (i += a)
  29976. }
  29977. return i
  29978. }
  29979. function lP(t, e, n) {
  29980. E(t, (function (t) {
  29981. E(t, (function (t) {
  29982. if (t.inEdges.length) {
  29983. var i = sP(t.inEdges, iP, n) / sP(t.inEdges, aP);
  29984. if (isNaN(i)) {
  29985. var r = t.inEdges.length;
  29986. i = r ? sP(t.inEdges, rP, n) / r : 0
  29987. }
  29988. if ("vertical" === n) {
  29989. var o = t.getLayout().x + (i - oP(t, n)) * e;
  29990. t.setLayout({
  29991. x: o
  29992. }, !0)
  29993. } else {
  29994. var a = t.getLayout().y + (i - oP(t, n)) * e;
  29995. t.setLayout({
  29996. y: a
  29997. }, !0)
  29998. }
  29999. }
  30000. }))
  30001. }))
  30002. }
  30003. function uP(t) {
  30004. t.eachSeriesByType("sankey", (function (t) {
  30005. var e = t.getGraph(),
  30006. n = e.nodes,
  30007. i = e.edges;
  30008. if (n.length) {
  30009. var r = 1 / 0,
  30010. o = -1 / 0;
  30011. E(n, (function (t) {
  30012. var e = t.getLayout().value;
  30013. e < r && (r = e), e > o && (o = e)
  30014. })), E(n, (function (e) {
  30015. var n = new DD({
  30016. type: "color",
  30017. mappingMethod: "linear",
  30018. dataExtent: [r, o],
  30019. visual: t.get("color")
  30020. }).mapValueToVisual(e.getLayout().value),
  30021. i = e.getModel().get(["itemStyle", "color"]);
  30022. null != i ? (e.setVisual("color", i), e.setVisual("style", {
  30023. fill: i
  30024. })) : (e.setVisual("color", n), e.setVisual("style", {
  30025. fill: n
  30026. }))
  30027. }))
  30028. }
  30029. i.length && E(i, (function (t) {
  30030. var e = t.getModel().get("lineStyle");
  30031. t.setVisual("style", e)
  30032. }))
  30033. }))
  30034. }
  30035. var hP = function () {
  30036. function t() {}
  30037. return t.prototype.getInitialData = function (t, e) {
  30038. var n, i, r = e.getComponent("xAxis", this.get("xAxisIndex")),
  30039. o = e.getComponent("yAxis", this.get("yAxisIndex")),
  30040. a = r.get("type"),
  30041. s = o.get("type");
  30042. "category" === a ? (t.layout = "horizontal", n = r.getOrdinalMeta(), i = !0) : "category" === s ? (t.layout = "vertical", n = o.getOrdinalMeta(), i = !0) : t.layout = t.layout || "horizontal";
  30043. var l = ["x", "y"],
  30044. u = "horizontal" === t.layout ? 0 : 1,
  30045. h = this._baseAxisDim = l[u],
  30046. c = l[1 - u],
  30047. p = [r, o],
  30048. d = p[u].get("type"),
  30049. f = p[1 - u].get("type"),
  30050. g = t.data;
  30051. if (g && i) {
  30052. var y = [];
  30053. E(g, (function (t, e) {
  30054. var n;
  30055. Y(t) ? (n = t.slice(), t.unshift(e)) : Y(t.value) ? ((n = A({}, t)).value = n.value.slice(), t.value.unshift(e)) : n = t, y.push(n)
  30056. })), t.data = y
  30057. }
  30058. var v = this.defaultValueDimensions,
  30059. m = [{
  30060. name: h,
  30061. type: Ym(d),
  30062. ordinalMeta: n,
  30063. otherDims: {
  30064. tooltip: !1,
  30065. itemName: 0
  30066. },
  30067. dimsDef: ["base"]
  30068. }, {
  30069. name: c,
  30070. type: Ym(f),
  30071. dimsDef: v.slice()
  30072. }];
  30073. return PM(this, {
  30074. coordDimensions: m,
  30075. dimensionsCount: v.length + 1,
  30076. encodeDefaulter: H(td, m, this)
  30077. })
  30078. }, t.prototype.getBaseAxis = function () {
  30079. var t = this._baseAxisDim;
  30080. return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis
  30081. }, t
  30082. }(),
  30083. cP = function (t) {
  30084. function e() {
  30085. var n = null !== t && t.apply(this, arguments) || this;
  30086. return n.type = e.type, n.defaultValueDimensions = [{
  30087. name: "min",
  30088. defaultTooltip: !0
  30089. }, {
  30090. name: "Q1",
  30091. defaultTooltip: !0
  30092. }, {
  30093. name: "median",
  30094. defaultTooltip: !0
  30095. }, {
  30096. name: "Q3",
  30097. defaultTooltip: !0
  30098. }, {
  30099. name: "max",
  30100. defaultTooltip: !0
  30101. }], n.visualDrawType = "stroke", n
  30102. }
  30103. return n(e, t), e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  30104. z: 2,
  30105. coordinateSystem: "cartesian2d",
  30106. legendHoverLink: !0,
  30107. layout: null,
  30108. boxWidth: [7, 50],
  30109. itemStyle: {
  30110. color: "#fff",
  30111. borderWidth: 1
  30112. },
  30113. emphasis: {
  30114. scale: !0,
  30115. itemStyle: {
  30116. borderWidth: 2,
  30117. shadowBlur: 5,
  30118. shadowOffsetX: 1,
  30119. shadowOffsetY: 1,
  30120. shadowColor: "rgba(0,0,0,0.2)"
  30121. }
  30122. },
  30123. animationDuration: 800
  30124. }, e
  30125. }(bg);
  30126. R(cP, hP, !0);
  30127. var pP = function (t) {
  30128. function e() {
  30129. var n = null !== t && t.apply(this, arguments) || this;
  30130. return n.type = e.type, n
  30131. }
  30132. return n(e, t), e.prototype.render = function (t, e, n) {
  30133. var i = t.getData(),
  30134. r = this.group,
  30135. o = this._data;
  30136. this._data || r.removeAll();
  30137. var a = "horizontal" === t.get("layout") ? 1 : 0;
  30138. i.diff(o).add((function (t) {
  30139. if (i.hasValue(t)) {
  30140. var e = gP(i.getItemLayout(t), i, t, a, !0);
  30141. i.setItemGraphicEl(t, e), r.add(e)
  30142. }
  30143. })).update((function (t, e) {
  30144. var n = o.getItemGraphicEl(e);
  30145. if (i.hasValue(t)) {
  30146. var s = i.getItemLayout(t);
  30147. n ? (Sh(n), yP(s, n, i, t)) : n = gP(s, i, t, a), r.add(n), i.setItemGraphicEl(t, n)
  30148. } else r.remove(n)
  30149. })).remove((function (t) {
  30150. var e = o.getItemGraphicEl(t);
  30151. e && r.remove(e)
  30152. })).execute(), this._data = i
  30153. }, e.prototype.remove = function (t) {
  30154. var e = this.group,
  30155. n = this._data;
  30156. this._data = null, n && n.eachItemGraphicEl((function (t) {
  30157. t && e.remove(t)
  30158. }))
  30159. }, e.type = "boxplot", e
  30160. }(Og),
  30161. dP = function () {},
  30162. fP = function (t) {
  30163. function e(e) {
  30164. var n = t.call(this, e) || this;
  30165. return n.type = "boxplotBoxPath", n
  30166. }
  30167. return n(e, t), e.prototype.getDefaultShape = function () {
  30168. return new dP
  30169. }, e.prototype.buildPath = function (t, e) {
  30170. var n = e.points,
  30171. i = 0;
  30172. for (t.moveTo(n[i][0], n[i][1]), i++; i < 4; i++) t.lineTo(n[i][0], n[i][1]);
  30173. for (t.closePath(); i < n.length; i++) t.moveTo(n[i][0], n[i][1]), i++, t.lineTo(n[i][0], n[i][1])
  30174. }, e
  30175. }(ks);
  30176. function gP(t, e, n, i, r) {
  30177. var o = t.ends,
  30178. a = new fP({
  30179. shape: {
  30180. points: r ? vP(o, i, t) : o
  30181. }
  30182. });
  30183. return yP(t, a, e, n, r), a
  30184. }
  30185. function yP(t, e, n, i, r) {
  30186. var o = n.hostModel;
  30187. (0, Qh[r ? "initProps" : "updateProps"])(e, {
  30188. shape: {
  30189. points: t.ends
  30190. }
  30191. }, o, i), e.useStyle(n.getItemVisual(i, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  30192. var a = n.getItemModel(i),
  30193. s = a.getModel("emphasis");
  30194. $l(e, a), Zl(e, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  30195. }
  30196. function vP(t, e, n) {
  30197. return z(t, (function (t) {
  30198. return (t = t.slice())[e] = n.initBaseline, t
  30199. }))
  30200. }
  30201. var mP = E;
  30202. function xP(t) {
  30203. var e = function (t) {
  30204. var e = [],
  30205. n = [];
  30206. return t.eachSeriesByType("boxplot", (function (t) {
  30207. var i = t.getBaseAxis(),
  30208. r = P(n, i);
  30209. r < 0 && (r = n.length, n[r] = i, e[r] = {
  30210. axis: i,
  30211. seriesModels: []
  30212. }), e[r].seriesModels.push(t)
  30213. })), e
  30214. }(t);
  30215. mP(e, (function (t) {
  30216. var e = t.seriesModels;
  30217. e.length && (! function (t) {
  30218. var e, n = t.axis,
  30219. i = t.seriesModels,
  30220. r = i.length,
  30221. o = t.boxWidthList = [],
  30222. a = t.boxOffsetList = [],
  30223. s = [];
  30224. if ("category" === n.type) e = n.getBandWidth();
  30225. else {
  30226. var l = 0;
  30227. mP(i, (function (t) {
  30228. l = Math.max(l, t.getData().count())
  30229. }));
  30230. var u = n.getExtent();
  30231. e = Math.abs(u[1] - u[0]) / l
  30232. }
  30233. mP(i, (function (t) {
  30234. var n = t.get("boxWidth");
  30235. Y(n) || (n = [n, n]), s.push([$r(n[0], e) || 0, $r(n[1], e) || 0])
  30236. }));
  30237. var h = .8 * e - 2,
  30238. c = h / r * .3,
  30239. p = (h - c * (r - 1)) / r,
  30240. d = p / 2 - h / 2;
  30241. mP(i, (function (t, e) {
  30242. a.push(d), d += c + p, o.push(Math.min(Math.max(p, s[e][0]), s[e][1]))
  30243. }))
  30244. }(t), mP(e, (function (e, n) {
  30245. ! function (t, e, n) {
  30246. var i = t.coordinateSystem,
  30247. r = t.getData(),
  30248. o = n / 2,
  30249. a = "horizontal" === t.get("layout") ? 0 : 1,
  30250. s = 1 - a,
  30251. l = ["x", "y"],
  30252. u = r.mapDimension(l[a]),
  30253. h = r.mapDimensionsAll(l[s]);
  30254. if (null == u || h.length < 5) return;
  30255. for (var c = 0; c < r.count(); c++) {
  30256. var p = r.get(u, c),
  30257. d = x(p, h[2], c),
  30258. f = x(p, h[0], c),
  30259. g = x(p, h[1], c),
  30260. y = x(p, h[3], c),
  30261. v = x(p, h[4], c),
  30262. m = [];
  30263. _(m, g, !1), _(m, y, !0), m.push(f, g, v, y), b(m, f), b(m, v), b(m, d), r.setItemLayout(c, {
  30264. initBaseline: d[s],
  30265. ends: m
  30266. })
  30267. }
  30268. function x(t, n, o) {
  30269. var l, u = r.get(n, o),
  30270. h = [];
  30271. return h[a] = t, h[s] = u, isNaN(t) || isNaN(u) ? l = [NaN, NaN] : (l = i.dataToPoint(h))[a] += e, l
  30272. }
  30273. function _(t, e, n) {
  30274. var i = e.slice(),
  30275. r = e.slice();
  30276. i[a] += o, r[a] -= o, n ? t.push(i, r) : t.push(r, i)
  30277. }
  30278. function b(t, e) {
  30279. var n = e.slice(),
  30280. i = e.slice();
  30281. n[a] -= o, i[a] += o, t.push(n, i)
  30282. }
  30283. }(e, t.boxOffsetList[n], t.boxWidthList[n])
  30284. })))
  30285. }))
  30286. }
  30287. var _P = {
  30288. type: "echarts:boxplot",
  30289. transform: function (t) {
  30290. var e = t.upstream;
  30291. if (e.sourceFormat !== Hp) {
  30292. var n = "";
  30293. 0, wo(n)
  30294. }
  30295. var i = function (t, e) {
  30296. for (var n = [], i = [], r = (e = e || {}).boundIQR, o = "none" === r || 0 === r, a = 0; a < t.length; a++) {
  30297. var s = Qr(t[a].slice()),
  30298. l = fo(s, .25),
  30299. u = fo(s, .5),
  30300. h = fo(s, .75),
  30301. c = s[0],
  30302. p = s[s.length - 1],
  30303. d = (null == r ? 1.5 : r) * (h - l),
  30304. f = o ? c : Math.max(c, l - d),
  30305. g = o ? p : Math.min(p, h + d),
  30306. y = e.itemNameFormatter,
  30307. v = X(y) ? y({
  30308. value: a
  30309. }) : U(y) ? y.replace("{value}", a + "") : a + "";
  30310. n.push([v, f, l, u, h, g]);
  30311. for (var m = 0; m < s.length; m++) {
  30312. var x = s[m];
  30313. if (x < f || x > g) {
  30314. var _ = [v, x];
  30315. i.push(_)
  30316. }
  30317. }
  30318. }
  30319. return {
  30320. boxData: n,
  30321. outliers: i
  30322. }
  30323. }(e.getRawData(), t.config);
  30324. return [{
  30325. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  30326. data: i.boxData
  30327. }, {
  30328. data: i.outliers
  30329. }]
  30330. }
  30331. };
  30332. var bP = ["color", "borderColor"],
  30333. wP = function (t) {
  30334. function e() {
  30335. var n = null !== t && t.apply(this, arguments) || this;
  30336. return n.type = e.type, n
  30337. }
  30338. return n(e, t), e.prototype.render = function (t, e, n) {
  30339. this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t)
  30340. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  30341. this._clear(), this._updateDrawMode(t)
  30342. }, e.prototype.incrementalRender = function (t, e, n, i) {
  30343. this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e)
  30344. }, e.prototype.eachRendered = function (t) {
  30345. Jh(this._progressiveEls || this.group, t)
  30346. }, e.prototype._updateDrawMode = function (t) {
  30347. var e = t.pipelineContext.large;
  30348. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e, this._clear())
  30349. }, e.prototype._renderNormal = function (t) {
  30350. var e = t.getData(),
  30351. n = this._data,
  30352. i = this.group,
  30353. r = e.getLayout("isSimpleBox"),
  30354. o = t.get("clip", !0),
  30355. a = t.coordinateSystem,
  30356. s = a.getArea && a.getArea();
  30357. this._data || i.removeAll(), e.diff(n).add((function (n) {
  30358. if (e.hasValue(n)) {
  30359. var a = e.getItemLayout(n);
  30360. if (o && TP(s, a)) return;
  30361. var l = IP(a, n, !0);
  30362. mh(l, {
  30363. shape: {
  30364. points: a.ends
  30365. }
  30366. }, t, n), CP(l, e, n, r), i.add(l), e.setItemGraphicEl(n, l)
  30367. }
  30368. })).update((function (a, l) {
  30369. var u = n.getItemGraphicEl(l);
  30370. if (e.hasValue(a)) {
  30371. var h = e.getItemLayout(a);
  30372. o && TP(s, h) ? i.remove(u) : (u ? (vh(u, {
  30373. shape: {
  30374. points: h.ends
  30375. }
  30376. }, t, a), Sh(u)) : u = IP(h), CP(u, e, a, r), i.add(u), e.setItemGraphicEl(a, u))
  30377. } else i.remove(u)
  30378. })).remove((function (t) {
  30379. var e = n.getItemGraphicEl(t);
  30380. e && i.remove(e)
  30381. })).execute(), this._data = e
  30382. }, e.prototype._renderLarge = function (t) {
  30383. this._clear(), LP(t, this.group);
  30384. var e = t.get("clip", !0) ? LS(t.coordinateSystem, !1, t) : null;
  30385. e ? this.group.setClipPath(e) : this.group.removeClipPath()
  30386. }, e.prototype._incrementalRenderNormal = function (t, e) {
  30387. for (var n, i = e.getData(), r = i.getLayout("isSimpleBox"); null != (n = t.next());) {
  30388. var o = IP(i.getItemLayout(n));
  30389. CP(o, i, n, r), o.incremental = !0, this.group.add(o), this._progressiveEls.push(o)
  30390. }
  30391. }, e.prototype._incrementalRenderLarge = function (t, e) {
  30392. LP(e, this.group, this._progressiveEls, !0)
  30393. }, e.prototype.remove = function (t) {
  30394. this._clear()
  30395. }, e.prototype._clear = function () {
  30396. this.group.removeAll(), this._data = null
  30397. }, e.type = "candlestick", e
  30398. }(Og),
  30399. SP = function () {},
  30400. MP = function (t) {
  30401. function e(e) {
  30402. var n = t.call(this, e) || this;
  30403. return n.type = "normalCandlestickBox", n
  30404. }
  30405. return n(e, t), e.prototype.getDefaultShape = function () {
  30406. return new SP
  30407. }, e.prototype.buildPath = function (t, e) {
  30408. var n = e.points;
  30409. this.__simpleBox ? (t.moveTo(n[4][0], n[4][1]), t.lineTo(n[6][0], n[6][1])) : (t.moveTo(n[0][0], n[0][1]), t.lineTo(n[1][0], n[1][1]), t.lineTo(n[2][0], n[2][1]), t.lineTo(n[3][0], n[3][1]), t.closePath(), t.moveTo(n[4][0], n[4][1]), t.lineTo(n[5][0], n[5][1]), t.moveTo(n[6][0], n[6][1]), t.lineTo(n[7][0], n[7][1]))
  30410. }, e
  30411. }(ks);
  30412. function IP(t, e, n) {
  30413. var i = t.ends;
  30414. return new MP({
  30415. shape: {
  30416. points: n ? DP(i, t) : i
  30417. },
  30418. z2: 100
  30419. })
  30420. }
  30421. function TP(t, e) {
  30422. for (var n = !0, i = 0; i < e.ends.length; i++)
  30423. if (t.contain(e.ends[i][0], e.ends[i][1])) {
  30424. n = !1;
  30425. break
  30426. } return n
  30427. }
  30428. function CP(t, e, n, i) {
  30429. var r = e.getItemModel(n);
  30430. t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = i, $l(t, r)
  30431. }
  30432. function DP(t, e) {
  30433. return z(t, (function (t) {
  30434. return (t = t.slice())[1] = e.initBaseline, t
  30435. }))
  30436. }
  30437. var AP = function () {},
  30438. kP = function (t) {
  30439. function e(e) {
  30440. var n = t.call(this, e) || this;
  30441. return n.type = "largeCandlestickBox", n
  30442. }
  30443. return n(e, t), e.prototype.getDefaultShape = function () {
  30444. return new AP
  30445. }, e.prototype.buildPath = function (t, e) {
  30446. for (var n = e.points, i = 0; i < n.length;)
  30447. if (this.__sign === n[i++]) {
  30448. var r = n[i++];
  30449. t.moveTo(r, n[i++]), t.lineTo(r, n[i++])
  30450. } else i += 3
  30451. }, e
  30452. }(ks);
  30453. function LP(t, e, n, i) {
  30454. var r = t.getData().getLayout("largePoints"),
  30455. o = new kP({
  30456. shape: {
  30457. points: r
  30458. },
  30459. __sign: 1,
  30460. ignoreCoarsePointer: !0
  30461. });
  30462. e.add(o);
  30463. var a = new kP({
  30464. shape: {
  30465. points: r
  30466. },
  30467. __sign: -1,
  30468. ignoreCoarsePointer: !0
  30469. });
  30470. e.add(a);
  30471. var s = new kP({
  30472. shape: {
  30473. points: r
  30474. },
  30475. __sign: 0,
  30476. ignoreCoarsePointer: !0
  30477. });
  30478. e.add(s), PP(1, o, t), PP(-1, a, t), PP(0, s, t), i && (o.incremental = !0, a.incremental = !0), n && n.push(o, a)
  30479. }
  30480. function PP(t, e, n, i) {
  30481. var r = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  30482. 0 === t && (r = n.get(["itemStyle", "borderColorDoji"]));
  30483. var o = n.getModel("itemStyle").getItemStyle(bP);
  30484. e.useStyle(o), e.style.fill = null, e.style.stroke = r
  30485. }
  30486. var OP = function (t) {
  30487. function e() {
  30488. var n = null !== t && t.apply(this, arguments) || this;
  30489. return n.type = e.type, n.defaultValueDimensions = [{
  30490. name: "open",
  30491. defaultTooltip: !0
  30492. }, {
  30493. name: "close",
  30494. defaultTooltip: !0
  30495. }, {
  30496. name: "lowest",
  30497. defaultTooltip: !0
  30498. }, {
  30499. name: "highest",
  30500. defaultTooltip: !0
  30501. }], n
  30502. }
  30503. return n(e, t), e.prototype.getShadowDim = function () {
  30504. return "open"
  30505. }, e.prototype.brushSelector = function (t, e, n) {
  30506. var i = e.getItemLayout(t);
  30507. return i && n.rect(i.brushRect)
  30508. }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  30509. z: 2,
  30510. coordinateSystem: "cartesian2d",
  30511. legendHoverLink: !0,
  30512. layout: null,
  30513. clip: !0,
  30514. itemStyle: {
  30515. color: "#eb5454",
  30516. color0: "#47b262",
  30517. borderColor: "#eb5454",
  30518. borderColor0: "#47b262",
  30519. borderColorDoji: null,
  30520. borderWidth: 1
  30521. },
  30522. emphasis: {
  30523. scale: !0,
  30524. itemStyle: {
  30525. borderWidth: 2
  30526. }
  30527. },
  30528. barMaxWidth: null,
  30529. barMinWidth: null,
  30530. barWidth: null,
  30531. large: !0,
  30532. largeThreshold: 600,
  30533. progressive: 3e3,
  30534. progressiveThreshold: 1e4,
  30535. progressiveChunkMode: "mod",
  30536. animationEasing: "linear",
  30537. animationDuration: 300
  30538. }, e
  30539. }(bg);
  30540. function RP(t) {
  30541. t && Y(t.series) && E(t.series, (function (t) {
  30542. q(t) && "k" === t.type && (t.type = "candlestick")
  30543. }))
  30544. }
  30545. R(OP, hP, !0);
  30546. var NP = ["itemStyle", "borderColor"],
  30547. EP = ["itemStyle", "borderColor0"],
  30548. zP = ["itemStyle", "borderColorDoji"],
  30549. VP = ["itemStyle", "color"],
  30550. BP = ["itemStyle", "color0"],
  30551. FP = {
  30552. seriesType: "candlestick",
  30553. plan: kg(),
  30554. performRawSeries: !0,
  30555. reset: function (t, e) {
  30556. function n(t, e) {
  30557. return e.get(t > 0 ? VP : BP)
  30558. }
  30559. function i(t, e) {
  30560. return e.get(0 === t ? zP : t > 0 ? NP : EP)
  30561. }
  30562. if (!e.isSeriesFiltered(t)) return !t.pipelineContext.large && {
  30563. progress: function (t, e) {
  30564. for (var r; null != (r = t.next());) {
  30565. var o = e.getItemModel(r),
  30566. a = e.getItemLayout(r).sign,
  30567. s = o.getItemStyle();
  30568. s.fill = n(a, o), s.stroke = i(a, o) || s.fill, A(e.ensureUniqueItemVisual(r, "style"), s)
  30569. }
  30570. }
  30571. }
  30572. }
  30573. },
  30574. GP = {
  30575. seriesType: "candlestick",
  30576. plan: kg(),
  30577. reset: function (t) {
  30578. var e = t.coordinateSystem,
  30579. n = t.getData(),
  30580. i = function (t, e) {
  30581. var n, i = t.getBaseAxis(),
  30582. r = "category" === i.type ? i.getBandWidth() : (n = i.getExtent(), Math.abs(n[1] - n[0]) / e.count()),
  30583. o = $r(rt(t.get("barMaxWidth"), r), r),
  30584. a = $r(rt(t.get("barMinWidth"), 1), r),
  30585. s = t.get("barWidth");
  30586. return null != s ? $r(s, r) : Math.max(Math.min(r / 2, o), a)
  30587. }(t, n),
  30588. r = ["x", "y"],
  30589. o = n.getDimensionIndex(n.mapDimension(r[0])),
  30590. a = z(n.mapDimensionsAll(r[1]), n.getDimensionIndex, n),
  30591. s = a[0],
  30592. l = a[1],
  30593. u = a[2],
  30594. h = a[3];
  30595. if (n.setLayout({
  30596. candleWidth: i,
  30597. isSimpleBox: i <= 1.3
  30598. }), !(o < 0 || a.length < 4)) return {
  30599. progress: t.pipelineContext.large ? function (n, i) {
  30600. var r, a, c = Bx(4 * n.count),
  30601. p = 0,
  30602. d = [],
  30603. f = [],
  30604. g = i.getStore(),
  30605. y = !!t.get(["itemStyle", "borderColorDoji"]);
  30606. for (; null != (a = n.next());) {
  30607. var v = g.get(o, a),
  30608. m = g.get(s, a),
  30609. x = g.get(l, a),
  30610. _ = g.get(u, a),
  30611. b = g.get(h, a);
  30612. isNaN(v) || isNaN(_) || isNaN(b) ? (c[p++] = NaN, p += 3) : (c[p++] = WP(g, a, m, x, l, y), d[0] = v, d[1] = _, r = e.dataToPoint(d, null, f), c[p++] = r ? r[0] : NaN, c[p++] = r ? r[1] : NaN, d[1] = b, r = e.dataToPoint(d, null, f), c[p++] = r ? r[1] : NaN)
  30613. }
  30614. i.setLayout("largePoints", c)
  30615. } : function (t, n) {
  30616. var r, a = n.getStore();
  30617. for (; null != (r = t.next());) {
  30618. var c = a.get(o, r),
  30619. p = a.get(s, r),
  30620. d = a.get(l, r),
  30621. f = a.get(u, r),
  30622. g = a.get(h, r),
  30623. y = Math.min(p, d),
  30624. v = Math.max(p, d),
  30625. m = M(y, c),
  30626. x = M(v, c),
  30627. _ = M(f, c),
  30628. b = M(g, c),
  30629. w = [];
  30630. I(w, x, 0), I(w, m, 1), w.push(C(b), C(x), C(_), C(m));
  30631. var S = !!n.getItemModel(r).get(["itemStyle", "borderColorDoji"]);
  30632. n.setItemLayout(r, {
  30633. sign: WP(a, r, p, d, l, S),
  30634. initBaseline: p > d ? x[1] : m[1],
  30635. ends: w,
  30636. brushRect: T(f, g, c)
  30637. })
  30638. }
  30639. function M(t, n) {
  30640. var i = [];
  30641. return i[0] = n, i[1] = t, isNaN(n) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(i)
  30642. }
  30643. function I(t, e, n) {
  30644. var r = e.slice(),
  30645. o = e.slice();
  30646. r[0] = Vh(r[0] + i / 2, 1, !1), o[0] = Vh(o[0] - i / 2, 1, !0), n ? t.push(r, o) : t.push(o, r)
  30647. }
  30648. function T(t, e, n) {
  30649. var r = M(t, n),
  30650. o = M(e, n);
  30651. return r[0] -= i / 2, o[0] -= i / 2, {
  30652. x: r[0],
  30653. y: r[1],
  30654. width: i,
  30655. height: o[1] - r[1]
  30656. }
  30657. }
  30658. function C(t) {
  30659. return t[0] = Vh(t[0], 1), t
  30660. }
  30661. }
  30662. }
  30663. }
  30664. };
  30665. function WP(t, e, n, i, r, o) {
  30666. return n > i ? -1 : n < i ? 1 : o ? 0 : e > 0 ? t.get(r, e - 1) <= i ? 1 : -1 : 1
  30667. }
  30668. function HP(t, e) {
  30669. var n = e.rippleEffectColor || e.color;
  30670. t.eachChild((function (t) {
  30671. t.attr({
  30672. z: e.z,
  30673. zlevel: e.zlevel,
  30674. style: {
  30675. stroke: "stroke" === e.brushType ? n : null,
  30676. fill: "fill" === e.brushType ? n : null
  30677. }
  30678. })
  30679. }))
  30680. }
  30681. var YP = function (t) {
  30682. function e(e, n) {
  30683. var i = t.call(this) || this,
  30684. r = new dS(e, n),
  30685. o = new Br;
  30686. return i.add(r), i.add(o), i.updateData(e, n), i
  30687. }
  30688. return n(e, t), e.prototype.stopEffectAnimation = function () {
  30689. this.childAt(1).removeAll()
  30690. }, e.prototype.startEffectAnimation = function (t) {
  30691. for (var e = t.symbolType, n = t.color, i = t.rippleNumber, r = this.childAt(1), o = 0; o < i; o++) {
  30692. var a = Xy(e, -1, -1, 2, 2, n);
  30693. a.attr({
  30694. style: {
  30695. strokeNoScale: !0
  30696. },
  30697. z2: 99,
  30698. silent: !0,
  30699. scaleX: .5,
  30700. scaleY: .5
  30701. });
  30702. var s = -o / i * t.period + t.effectOffset;
  30703. a.animate("", !0).when(t.period, {
  30704. scaleX: t.rippleScale / 2,
  30705. scaleY: t.rippleScale / 2
  30706. }).delay(s).start(), a.animateStyle(!0).when(t.period, {
  30707. opacity: 0
  30708. }).delay(s).start(), r.add(a)
  30709. }
  30710. HP(r, t)
  30711. }, e.prototype.updateEffectAnimation = function (t) {
  30712. for (var e = this._effectCfg, n = this.childAt(1), i = ["symbolType", "period", "rippleScale", "rippleNumber"], r = 0; r < i.length; r++) {
  30713. var o = i[r];
  30714. if (e[o] !== t[o]) return this.stopEffectAnimation(), void this.startEffectAnimation(t)
  30715. }
  30716. HP(n, t)
  30717. }, e.prototype.highlight = function () {
  30718. Ol(this)
  30719. }, e.prototype.downplay = function () {
  30720. Rl(this)
  30721. }, e.prototype.getSymbolType = function () {
  30722. var t = this.childAt(0);
  30723. return t && t.getSymbolType()
  30724. }, e.prototype.updateData = function (t, e) {
  30725. var n = this,
  30726. i = t.hostModel;
  30727. this.childAt(0).updateData(t, e);
  30728. var r = this.childAt(1),
  30729. o = t.getItemModel(e),
  30730. a = t.getItemVisual(e, "symbol"),
  30731. s = Uy(t.getItemVisual(e, "symbolSize")),
  30732. l = t.getItemVisual(e, "style"),
  30733. u = l && l.fill,
  30734. h = o.getModel("emphasis");
  30735. r.setScale(s), r.traverse((function (t) {
  30736. t.setStyle("fill", u)
  30737. }));
  30738. var c = Zy(t.getItemVisual(e, "symbolOffset"), s);
  30739. c && (r.x = c[0], r.y = c[1]);
  30740. var p = t.getItemVisual(e, "symbolRotate");
  30741. r.rotation = (p || 0) * Math.PI / 180 || 0;
  30742. var d = {};
  30743. d.showEffectOn = i.get("showEffectOn"), d.rippleScale = o.get(["rippleEffect", "scale"]), d.brushType = o.get(["rippleEffect", "brushType"]), d.period = 1e3 * o.get(["rippleEffect", "period"]), d.effectOffset = e / t.count(), d.z = i.getShallow("z") || 0, d.zlevel = i.getShallow("zlevel") || 0, d.symbolType = a, d.color = u, d.rippleEffectColor = o.get(["rippleEffect", "color"]), d.rippleNumber = o.get(["rippleEffect", "number"]), "render" === d.showEffectOn ? (this._effectCfg ? this.updateEffectAnimation(d) : this.startEffectAnimation(d), this._effectCfg = d) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function (t) {
  30744. "emphasis" === t ? "render" !== d.showEffectOn && n.startEffectAnimation(d) : "normal" === t && "render" !== d.showEffectOn && n.stopEffectAnimation()
  30745. }), this._effectCfg = d, Zl(this, h.get("focus"), h.get("blurScope"), h.get("disabled"))
  30746. }, e.prototype.fadeOut = function (t) {
  30747. t && t()
  30748. }, e
  30749. }(Br),
  30750. XP = function (t) {
  30751. function e() {
  30752. var n = null !== t && t.apply(this, arguments) || this;
  30753. return n.type = e.type, n
  30754. }
  30755. return n(e, t), e.prototype.init = function () {
  30756. this._symbolDraw = new mS(YP)
  30757. }, e.prototype.render = function (t, e, n) {
  30758. var i = t.getData(),
  30759. r = this._symbolDraw;
  30760. r.updateData(i, {
  30761. clipShape: this._getClipShape(t)
  30762. }), this.group.add(r.group)
  30763. }, e.prototype._getClipShape = function (t) {
  30764. var e = t.coordinateSystem,
  30765. n = e && e.getArea && e.getArea();
  30766. return t.get("clip", !0) ? n : null
  30767. }, e.prototype.updateTransform = function (t, e, n) {
  30768. var i = t.getData();
  30769. this.group.dirty();
  30770. var r = YS("").reset(t, e, n);
  30771. r.progress && r.progress({
  30772. start: 0,
  30773. end: i.count(),
  30774. count: i.count()
  30775. }, i), this._symbolDraw.updateLayout()
  30776. }, e.prototype._updateGroupTransform = function (t) {
  30777. var e = t.coordinateSystem;
  30778. e && e.getRoamTransform && (this.group.transform = Te(e.getRoamTransform()), this.group.decomposeTransform())
  30779. }, e.prototype.remove = function (t, e) {
  30780. this._symbolDraw && this._symbolDraw.remove(!0)
  30781. }, e.type = "effectScatter", e
  30782. }(Og),
  30783. UP = function (t) {
  30784. function e() {
  30785. var n = null !== t && t.apply(this, arguments) || this;
  30786. return n.type = e.type, n.hasSymbolVisual = !0, n
  30787. }
  30788. return n(e, t), e.prototype.getInitialData = function (t, e) {
  30789. return _x(null, this, {
  30790. useEncodeDefaulter: !0
  30791. })
  30792. }, e.prototype.brushSelector = function (t, e, n) {
  30793. return n.point(e.getItemLayout(t))
  30794. }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
  30795. coordinateSystem: "cartesian2d",
  30796. z: 2,
  30797. legendHoverLink: !0,
  30798. effectType: "ripple",
  30799. progressive: 0,
  30800. showEffectOn: "render",
  30801. clip: !0,
  30802. rippleEffect: {
  30803. period: 4,
  30804. scale: 2.5,
  30805. brushType: "fill",
  30806. number: 3
  30807. },
  30808. universalTransition: {
  30809. divideShape: "clone"
  30810. },
  30811. symbolSize: 10
  30812. }, e
  30813. }(bg);
  30814. var ZP = function (t) {
  30815. function e(e, n, i) {
  30816. var r = t.call(this) || this;
  30817. return r.add(r.createLine(e, n, i)), r._updateEffectSymbol(e, n), r
  30818. }
  30819. return n(e, t), e.prototype.createLine = function (t, e, n) {
  30820. return new GA(t, e, n)
  30821. }, e.prototype._updateEffectSymbol = function (t, e) {
  30822. var n = t.getItemModel(e).getModel("effect"),
  30823. i = n.get("symbolSize"),
  30824. r = n.get("symbol");
  30825. Y(i) || (i = [i, i]);
  30826. var o = t.getItemVisual(e, "style"),
  30827. a = n.get("color") || o && o.stroke,
  30828. s = this.childAt(1);
  30829. this._symbolType !== r && (this.remove(s), (s = Xy(r, -.5, -.5, 1, 1, a)).z2 = 100, s.culling = !0, this.add(s)), s && (s.setStyle("shadowColor", a), s.setStyle(n.getItemStyle(["color"])), s.scaleX = i[0], s.scaleY = i[1], s.setColor(a), this._symbolType = r, this._symbolScale = i, this._updateEffectAnimation(t, n, e))
  30830. }, e.prototype._updateEffectAnimation = function (t, e, n) {
  30831. var i = this.childAt(1);
  30832. if (i) {
  30833. var r = t.getItemLayout(n),
  30834. o = 1e3 * e.get("period"),
  30835. a = e.get("loop"),
  30836. s = e.get("roundTrip"),
  30837. l = e.get("constantSpeed"),
  30838. u = it(e.get("delay"), (function (e) {
  30839. return e / t.count() * o / 3
  30840. }));
  30841. if (i.ignore = !0, this._updateAnimationPoints(i, r), l > 0 && (o = this._getLineLength(i) / l * 1e3), o !== this._period || a !== this._loop || s !== this._roundTrip) {
  30842. i.stopAnimation();
  30843. var h = void 0;
  30844. h = X(u) ? u(n) : u, i.__t > 0 && (h = -o * i.__t), this._animateSymbol(i, o, h, a, s)
  30845. }
  30846. this._period = o, this._loop = a, this._roundTrip = s
  30847. }
  30848. }, e.prototype._animateSymbol = function (t, e, n, i, r) {
  30849. if (e > 0) {
  30850. t.__t = 0;
  30851. var o = this,
  30852. a = t.animate("", i).when(r ? 2 * e : e, {
  30853. __t: r ? 2 : 1
  30854. }).delay(n).during((function () {
  30855. o._updateSymbolPosition(t)
  30856. }));
  30857. i || a.done((function () {
  30858. o.remove(t)
  30859. })), a.start()
  30860. }
  30861. }, e.prototype._getLineLength = function (t) {
  30862. return Vt(t.__p1, t.__cp1) + Vt(t.__cp1, t.__p2)
  30863. }, e.prototype._updateAnimationPoints = function (t, e) {
  30864. t.__p1 = e[0], t.__p2 = e[1], t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
  30865. }, e.prototype.updateData = function (t, e, n) {
  30866. this.childAt(0).updateData(t, e, n), this._updateEffectSymbol(t, e)
  30867. }, e.prototype._updateSymbolPosition = function (t) {
  30868. var e = t.__p1,
  30869. n = t.__p2,
  30870. i = t.__cp1,
  30871. r = t.__t < 1 ? t.__t : 2 - t.__t,
  30872. o = [t.x, t.y],
  30873. a = o.slice(),
  30874. s = In,
  30875. l = Tn;
  30876. o[0] = s(e[0], i[0], n[0], r), o[1] = s(e[1], i[1], n[1], r);
  30877. var u = t.__t < 1 ? l(e[0], i[0], n[0], r) : l(n[0], i[0], e[0], 1 - r),
  30878. h = t.__t < 1 ? l(e[1], i[1], n[1], r) : l(n[1], i[1], e[1], 1 - r);
  30879. t.rotation = -Math.atan2(h, u) - Math.PI / 2, "line" !== this._symbolType && "rect" !== this._symbolType && "roundRect" !== this._symbolType || (void 0 !== t.__lastT && t.__lastT < t.__t ? (t.scaleY = 1.05 * Vt(a, o), 1 === r && (o[0] = a[0] + (o[0] - a[0]) / 2, o[1] = a[1] + (o[1] - a[1]) / 2)) : 1 === t.__lastT ? t.scaleY = 2 * Vt(e, o) : t.scaleY = this._symbolScale[1]), t.__lastT = t.__t, t.ignore = !1, t.x = o[0], t.y = o[1]
  30880. }, e.prototype.updateLayout = function (t, e) {
  30881. this.childAt(0).updateLayout(t, e);
  30882. var n = t.getItemModel(e).getModel("effect");
  30883. this._updateEffectAnimation(t, n, e)
  30884. }, e
  30885. }(Br),
  30886. jP = function (t) {
  30887. function e(e, n, i) {
  30888. var r = t.call(this) || this;
  30889. return r._createPolyline(e, n, i), r
  30890. }
  30891. return n(e, t), e.prototype._createPolyline = function (t, e, n) {
  30892. var i = t.getItemLayout(e),
  30893. r = new Zu({
  30894. shape: {
  30895. points: i
  30896. }
  30897. });
  30898. this.add(r), this._updateCommonStl(t, e, n)
  30899. }, e.prototype.updateData = function (t, e, n) {
  30900. var i = t.hostModel;
  30901. vh(this.childAt(0), {
  30902. shape: {
  30903. points: t.getItemLayout(e)
  30904. }
  30905. }, i, e), this._updateCommonStl(t, e, n)
  30906. }, e.prototype._updateCommonStl = function (t, e, n) {
  30907. var i = this.childAt(0),
  30908. r = t.getItemModel(e),
  30909. o = n && n.emphasisLineStyle,
  30910. a = n && n.focus,
  30911. s = n && n.blurScope,
  30912. l = n && n.emphasisDisabled;
  30913. if (!n || t.hasItemOption) {
  30914. var u = r.getModel("emphasis");
  30915. o = u.getModel("lineStyle").getLineStyle(), l = u.get("disabled"), a = u.get("focus"), s = u.get("blurScope")
  30916. }
  30917. i.useStyle(t.getItemVisual(e, "style")), i.style.fill = null, i.style.strokeNoScale = !0, i.ensureState("emphasis").style = o, Zl(this, a, s, l)
  30918. }, e.prototype.updateLayout = function (t, e) {
  30919. this.childAt(0).setShape("points", t.getItemLayout(e))
  30920. }, e
  30921. }(Br),
  30922. qP = function (t) {
  30923. function e() {
  30924. var e = null !== t && t.apply(this, arguments) || this;
  30925. return e._lastFrame = 0, e._lastFramePercent = 0, e
  30926. }
  30927. return n(e, t), e.prototype.createLine = function (t, e, n) {
  30928. return new jP(t, e, n)
  30929. }, e.prototype._updateAnimationPoints = function (t, e) {
  30930. this._points = e;
  30931. for (var n = [0], i = 0, r = 1; r < e.length; r++) {
  30932. var o = e[r - 1],
  30933. a = e[r];
  30934. i += Vt(o, a), n.push(i)
  30935. }
  30936. if (0 !== i) {
  30937. for (r = 0; r < n.length; r++) n[r] /= i;
  30938. this._offsets = n, this._length = i
  30939. } else this._length = 0
  30940. }, e.prototype._getLineLength = function () {
  30941. return this._length
  30942. }, e.prototype._updateSymbolPosition = function (t) {
  30943. var e = t.__t < 1 ? t.__t : 2 - t.__t,
  30944. n = this._points,
  30945. i = this._offsets,
  30946. r = n.length;
  30947. if (i) {
  30948. var o, a = this._lastFrame;
  30949. if (e < this._lastFramePercent) {
  30950. for (o = Math.min(a + 1, r - 1); o >= 0 && !(i[o] <= e); o--);
  30951. o = Math.min(o, r - 2)
  30952. } else {
  30953. for (o = a; o < r && !(i[o] > e); o++);
  30954. o = Math.min(o - 1, r - 2)
  30955. }
  30956. var s = (e - i[o]) / (i[o + 1] - i[o]),
  30957. l = n[o],
  30958. u = n[o + 1];
  30959. t.x = l[0] * (1 - s) + s * u[0], t.y = l[1] * (1 - s) + s * u[1];
  30960. var h = t.__t < 1 ? u[0] - l[0] : l[0] - u[0],
  30961. c = t.__t < 1 ? u[1] - l[1] : l[1] - u[1];
  30962. t.rotation = -Math.atan2(c, h) - Math.PI / 2, this._lastFrame = o, this._lastFramePercent = e, t.ignore = !1
  30963. }
  30964. }, e
  30965. }(ZP),
  30966. KP = function () {
  30967. this.polyline = !1, this.curveness = 0, this.segs = []
  30968. },
  30969. $P = function (t) {
  30970. function e(e) {
  30971. var n = t.call(this, e) || this;
  30972. return n._off = 0, n.hoverDataIdx = -1, n
  30973. }
  30974. return n(e, t), e.prototype.reset = function () {
  30975. this.notClear = !1, this._off = 0
  30976. }, e.prototype.getDefaultStyle = function () {
  30977. return {
  30978. stroke: "#000",
  30979. fill: null
  30980. }
  30981. }, e.prototype.getDefaultShape = function () {
  30982. return new KP
  30983. }, e.prototype.buildPath = function (t, e) {
  30984. var n, i = e.segs,
  30985. r = e.curveness;
  30986. if (e.polyline)
  30987. for (n = this._off; n < i.length;) {
  30988. var o = i[n++];
  30989. if (o > 0) {
  30990. t.moveTo(i[n++], i[n++]);
  30991. for (var a = 1; a < o; a++) t.lineTo(i[n++], i[n++])
  30992. }
  30993. } else
  30994. for (n = this._off; n < i.length;) {
  30995. var s = i[n++],
  30996. l = i[n++],
  30997. u = i[n++],
  30998. h = i[n++];
  30999. if (t.moveTo(s, l), r > 0) {
  31000. var c = (s + u) / 2 - (l - h) * r,
  31001. p = (l + h) / 2 - (u - s) * r;
  31002. t.quadraticCurveTo(c, p, u, h)
  31003. } else t.lineTo(u, h)
  31004. }
  31005. this.incremental && (this._off = n, this.notClear = !0)
  31006. }, e.prototype.findDataIndex = function (t, e) {
  31007. var n = this.shape,
  31008. i = n.segs,
  31009. r = n.curveness,
  31010. o = this.style.lineWidth;
  31011. if (n.polyline)
  31012. for (var a = 0, s = 0; s < i.length;) {
  31013. var l = i[s++];
  31014. if (l > 0)
  31015. for (var u = i[s++], h = i[s++], c = 1; c < l; c++) {
  31016. if (cs(u, h, p = i[s++], d = i[s++], o, t, e)) return a
  31017. }
  31018. a++
  31019. } else
  31020. for (a = 0, s = 0; s < i.length;) {
  31021. u = i[s++], h = i[s++];
  31022. var p = i[s++],
  31023. d = i[s++];
  31024. if (r > 0) {
  31025. if (ds(u, h, (u + p) / 2 - (h - d) * r, (h + d) / 2 - (p - u) * r, p, d, o, t, e)) return a
  31026. } else if (cs(u, h, p, d, o, t, e)) return a;
  31027. a++
  31028. }
  31029. return -1
  31030. }, e.prototype.contain = function (t, e) {
  31031. var n = this.transformCoordToLocal(t, e),
  31032. i = this.getBoundingRect();
  31033. return t = n[0], e = n[1], i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1, !1)
  31034. }, e.prototype.getBoundingRect = function () {
  31035. var t = this._rect;
  31036. if (!t) {
  31037. for (var e = this.shape.segs, n = 1 / 0, i = 1 / 0, r = -1 / 0, o = -1 / 0, a = 0; a < e.length;) {
  31038. var s = e[a++],
  31039. l = e[a++];
  31040. n = Math.min(s, n), r = Math.max(s, r), i = Math.min(l, i), o = Math.max(l, o)
  31041. }
  31042. t = this._rect = new ze(n, i, r, o)
  31043. }
  31044. return t
  31045. }, e
  31046. }(ks),
  31047. JP = function () {
  31048. function t() {
  31049. this.group = new Br
  31050. }
  31051. return t.prototype.updateData = function (t) {
  31052. this._clear();
  31053. var e = this._create();
  31054. e.setShape({
  31055. segs: t.getLayout("linesPoints")
  31056. }), this._setCommon(e, t)
  31057. }, t.prototype.incrementalPrepareUpdate = function (t) {
  31058. this.group.removeAll(), this._clear()
  31059. }, t.prototype.incrementalUpdate = function (t, e) {
  31060. var n = this._newAdded[0],
  31061. i = e.getLayout("linesPoints"),
  31062. r = n && n.shape.segs;
  31063. if (r && r.length < 2e4) {
  31064. var o = r.length,
  31065. a = new Float32Array(o + i.length);
  31066. a.set(r), a.set(i, o), n.setShape({
  31067. segs: a
  31068. })
  31069. } else {
  31070. this._newAdded = [];
  31071. var s = this._create();
  31072. s.incremental = !0, s.setShape({
  31073. segs: i
  31074. }), this._setCommon(s, e), s.__startIndex = t.start
  31075. }
  31076. }, t.prototype.remove = function () {
  31077. this._clear()
  31078. }, t.prototype.eachRendered = function (t) {
  31079. this._newAdded[0] && t(this._newAdded[0])
  31080. }, t.prototype._create = function () {
  31081. var t = new $P({
  31082. cursor: "default",
  31083. ignoreCoarsePointer: !0
  31084. });
  31085. return this._newAdded.push(t), this.group.add(t), t
  31086. }, t.prototype._setCommon = function (t, e, n) {
  31087. var i = e.hostModel;
  31088. t.setShape({
  31089. polyline: i.get("polyline"),
  31090. curveness: i.get(["lineStyle", "curveness"])
  31091. }), t.useStyle(i.getModel("lineStyle").getLineStyle()), t.style.strokeNoScale = !0;
  31092. var r = e.getVisual("style");
  31093. r && r.stroke && t.setStyle("stroke", r.stroke), t.setStyle("fill", null);
  31094. var o = rl(t);
  31095. o.seriesIndex = i.seriesIndex, t.on("mousemove", (function (e) {
  31096. o.dataIndex = null;
  31097. var n = t.hoverDataIdx;
  31098. n > 0 && (o.dataIndex = n + t.__startIndex)
  31099. }))
  31100. }, t.prototype._clear = function () {
  31101. this._newAdded = [], this.group.removeAll()
  31102. }, t
  31103. }(),
  31104. QP = {
  31105. seriesType: "lines",
  31106. plan: kg(),
  31107. reset: function (t) {
  31108. var e = t.coordinateSystem;
  31109. if (e) {
  31110. var n = t.get("polyline"),
  31111. i = t.pipelineContext.large;
  31112. return {
  31113. progress: function (r, o) {
  31114. var a = [];
  31115. if (i) {
  31116. var s = void 0,
  31117. l = r.end - r.start;
  31118. if (n) {
  31119. for (var u = 0, h = r.start; h < r.end; h++) u += t.getLineCoordsCount(h);
  31120. s = new Float32Array(l + 2 * u)
  31121. } else s = new Float32Array(4 * l);
  31122. var c = 0,
  31123. p = [];
  31124. for (h = r.start; h < r.end; h++) {
  31125. var d = t.getLineCoords(h, a);
  31126. n && (s[c++] = d);
  31127. for (var f = 0; f < d; f++) p = e.dataToPoint(a[f], !1, p), s[c++] = p[0], s[c++] = p[1]
  31128. }
  31129. o.setLayout("linesPoints", s)
  31130. } else
  31131. for (h = r.start; h < r.end; h++) {
  31132. var g = o.getItemModel(h),
  31133. y = (d = t.getLineCoords(h, a), []);
  31134. if (n)
  31135. for (var v = 0; v < d; v++) y.push(e.dataToPoint(a[v]));
  31136. else {
  31137. y[0] = e.dataToPoint(a[0]), y[1] = e.dataToPoint(a[1]);
  31138. var m = g.get(["lineStyle", "curveness"]); + m && (y[2] = [(y[0][0] + y[1][0]) / 2 - (y[0][1] - y[1][1]) * m, (y[0][1] + y[1][1]) / 2 - (y[1][0] - y[0][0]) * m])
  31139. }
  31140. o.setItemLayout(h, y)
  31141. }
  31142. }
  31143. }
  31144. }
  31145. }
  31146. },
  31147. tO = function (t) {
  31148. function e() {
  31149. var n = null !== t && t.apply(this, arguments) || this;
  31150. return n.type = e.type, n
  31151. }
  31152. return n(e, t), e.prototype.render = function (t, e, n) {
  31153. var i = t.getData(),
  31154. r = this._updateLineDraw(i, t),
  31155. o = t.get("zlevel"),
  31156. a = t.get(["effect", "trailLength"]),
  31157. s = n.getZr(),
  31158. l = "svg" === s.painter.getType();
  31159. l || s.painter.getLayer(o).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {
  31160. motionBlur: !1
  31161. }), this._showEffect(t) && a > 0 && (l || s.configLayer(o, {
  31162. motionBlur: !0,
  31163. lastFrameAlpha: Math.max(Math.min(a / 10 + .9, 1), 0)
  31164. })), r.updateData(i);
  31165. var u = t.get("clip", !0) && LS(t.coordinateSystem, !1, t);
  31166. u ? this.group.setClipPath(u) : this.group.removeClipPath(), this._lastZlevel = o, this._finished = !0
  31167. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  31168. var i = t.getData();
  31169. this._updateLineDraw(i, t).incrementalPrepareUpdate(i), this._clearLayer(n), this._finished = !1
  31170. }, e.prototype.incrementalRender = function (t, e, n) {
  31171. this._lineDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count()
  31172. }, e.prototype.eachRendered = function (t) {
  31173. this._lineDraw && this._lineDraw.eachRendered(t)
  31174. }, e.prototype.updateTransform = function (t, e, n) {
  31175. var i = t.getData(),
  31176. r = t.pipelineContext;
  31177. if (!this._finished || r.large || r.progressiveRender) return {
  31178. update: !0
  31179. };
  31180. var o = QP.reset(t, e, n);
  31181. o.progress && o.progress({
  31182. start: 0,
  31183. end: i.count(),
  31184. count: i.count()
  31185. }, i), this._lineDraw.updateLayout(), this._clearLayer(n)
  31186. }, e.prototype._updateLineDraw = function (t, e) {
  31187. var n = this._lineDraw,
  31188. i = this._showEffect(e),
  31189. r = !!e.get("polyline"),
  31190. o = e.pipelineContext.large;
  31191. return n && i === this._hasEffet && r === this._isPolyline && o === this._isLargeDraw || (n && n.remove(), n = this._lineDraw = o ? new JP : new WA(r ? i ? qP : jP : i ? ZP : GA), this._hasEffet = i, this._isPolyline = r, this._isLargeDraw = o), this.group.add(n.group), n
  31192. }, e.prototype._showEffect = function (t) {
  31193. return !!t.get(["effect", "show"])
  31194. }, e.prototype._clearLayer = function (t) {
  31195. var e = t.getZr();
  31196. "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0)
  31197. }, e.prototype.remove = function (t, e) {
  31198. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(e)
  31199. }, e.prototype.dispose = function (t, e) {
  31200. this.remove(t, e)
  31201. }, e.type = "lines", e
  31202. }(Og),
  31203. eO = "undefined" == typeof Uint32Array ? Array : Uint32Array,
  31204. nO = "undefined" == typeof Float64Array ? Array : Float64Array;
  31205. function iO(t) {
  31206. var e = t.data;
  31207. e && e[0] && e[0][0] && e[0][0].coord && (t.data = z(e, (function (t) {
  31208. var e = {
  31209. coords: [t[0].coord, t[1].coord]
  31210. };
  31211. return t[0].name && (e.fromName = t[0].name), t[1].name && (e.toName = t[1].name), D([e, t[0], t[1]])
  31212. })))
  31213. }
  31214. var rO = function (t) {
  31215. function e() {
  31216. var n = null !== t && t.apply(this, arguments) || this;
  31217. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n
  31218. }
  31219. return n(e, t), e.prototype.init = function (e) {
  31220. e.data = e.data || [], iO(e);
  31221. var n = this._processFlatCoordsArray(e.data);
  31222. this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (e.data = new Float32Array(n.count)), t.prototype.init.apply(this, arguments)
  31223. }, e.prototype.mergeOption = function (e) {
  31224. if (iO(e), e.data) {
  31225. var n = this._processFlatCoordsArray(e.data);
  31226. this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (e.data = new Float32Array(n.count))
  31227. }
  31228. t.prototype.mergeOption.apply(this, arguments)
  31229. }, e.prototype.appendData = function (t) {
  31230. var e = this._processFlatCoordsArray(t.data);
  31231. e.flatCoords && (this._flatCoords ? (this._flatCoords = vt(this._flatCoords, e.flatCoords), this._flatCoordsOffset = vt(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset), t.data = new Float32Array(e.count)), this.getRawData().appendData(t.data)
  31232. }, e.prototype._getCoordsFromItemModel = function (t) {
  31233. var e = this.getData().getItemModel(t),
  31234. n = e.option instanceof Array ? e.option : e.getShallow("coords");
  31235. return n
  31236. }, e.prototype.getLineCoordsCount = function (t) {
  31237. return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length
  31238. }, e.prototype.getLineCoords = function (t, e) {
  31239. if (this._flatCoordsOffset) {
  31240. for (var n = this._flatCoordsOffset[2 * t], i = this._flatCoordsOffset[2 * t + 1], r = 0; r < i; r++) e[r] = e[r] || [], e[r][0] = this._flatCoords[n + 2 * r], e[r][1] = this._flatCoords[n + 2 * r + 1];
  31241. return i
  31242. }
  31243. var o = this._getCoordsFromItemModel(t);
  31244. for (r = 0; r < o.length; r++) e[r] = e[r] || [], e[r][0] = o[r][0], e[r][1] = o[r][1];
  31245. return o.length
  31246. }, e.prototype._processFlatCoordsArray = function (t) {
  31247. var e = 0;
  31248. if (this._flatCoords && (e = this._flatCoords.length), j(t[0])) {
  31249. for (var n = t.length, i = new eO(n), r = new nO(n), o = 0, a = 0, s = 0, l = 0; l < n;) {
  31250. s++;
  31251. var u = t[l++];
  31252. i[a++] = o + e, i[a++] = u;
  31253. for (var h = 0; h < u; h++) {
  31254. var c = t[l++],
  31255. p = t[l++];
  31256. r[o++] = c, r[o++] = p
  31257. }
  31258. }
  31259. return {
  31260. flatCoordsOffset: new Uint32Array(i.buffer, 0, a),
  31261. flatCoords: r,
  31262. count: s
  31263. }
  31264. }
  31265. return {
  31266. flatCoordsOffset: null,
  31267. flatCoords: null,
  31268. count: t.length
  31269. }
  31270. }, e.prototype.getInitialData = function (t, e) {
  31271. var n = new cx(["value"], this);
  31272. return n.hasItemOption = !1, n.initData(t.data, [], (function (t, e, i, r) {
  31273. if (t instanceof Array) return NaN;
  31274. n.hasItemOption = !0;
  31275. var o = t.value;
  31276. return null != o ? o instanceof Array ? o[r] : o : void 0
  31277. })), n
  31278. }, e.prototype.formatTooltip = function (t, e, n) {
  31279. var i = this.getData().getItemModel(t),
  31280. r = i.get("name");
  31281. if (r) return r;
  31282. var o = i.get("fromName"),
  31283. a = i.get("toName"),
  31284. s = [];
  31285. return null != o && s.push(o), null != a && s.push(a), og("nameValue", {
  31286. name: s.join(" > ")
  31287. })
  31288. }, e.prototype.preventIncremental = function () {
  31289. return !!this.get(["effect", "show"])
  31290. }, e.prototype.getProgressive = function () {
  31291. var t = this.option.progressive;
  31292. return null == t ? this.option.large ? 1e4 : this.get("progressive") : t
  31293. }, e.prototype.getProgressiveThreshold = function () {
  31294. var t = this.option.progressiveThreshold;
  31295. return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t
  31296. }, e.prototype.getZLevelKey = function () {
  31297. var t = this.getModel("effect"),
  31298. e = t.get("trailLength");
  31299. return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && e > 0 ? e + "" : ""
  31300. }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
  31301. coordinateSystem: "geo",
  31302. z: 2,
  31303. legendHoverLink: !0,
  31304. xAxisIndex: 0,
  31305. yAxisIndex: 0,
  31306. symbol: ["none", "none"],
  31307. symbolSize: [10, 10],
  31308. geoIndex: 0,
  31309. effect: {
  31310. show: !1,
  31311. period: 4,
  31312. constantSpeed: 0,
  31313. symbol: "circle",
  31314. symbolSize: 3,
  31315. loop: !0,
  31316. trailLength: .2
  31317. },
  31318. large: !1,
  31319. largeThreshold: 2e3,
  31320. polyline: !1,
  31321. clip: !0,
  31322. label: {
  31323. show: !1,
  31324. position: "end"
  31325. },
  31326. lineStyle: {
  31327. opacity: .5
  31328. }
  31329. }, e
  31330. }(bg);
  31331. function oO(t) {
  31332. return t instanceof Array || (t = [t, t]), t
  31333. }
  31334. var aO = {
  31335. seriesType: "lines",
  31336. reset: function (t) {
  31337. var e = oO(t.get("symbol")),
  31338. n = oO(t.get("symbolSize")),
  31339. i = t.getData();
  31340. return i.setVisual("fromSymbol", e && e[0]), i.setVisual("toSymbol", e && e[1]), i.setVisual("fromSymbolSize", n && n[0]), i.setVisual("toSymbolSize", n && n[1]), {
  31341. dataEach: i.hasItemOption ? function (t, e) {
  31342. var n = t.getItemModel(e),
  31343. i = oO(n.getShallow("symbol", !0)),
  31344. r = oO(n.getShallow("symbolSize", !0));
  31345. i[0] && t.setItemVisual(e, "fromSymbol", i[0]), i[1] && t.setItemVisual(e, "toSymbol", i[1]), r[0] && t.setItemVisual(e, "fromSymbolSize", r[0]), r[1] && t.setItemVisual(e, "toSymbolSize", r[1])
  31346. } : null
  31347. }
  31348. }
  31349. };
  31350. var sO = function () {
  31351. function t() {
  31352. this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
  31353. inRange: null,
  31354. outOfRange: null
  31355. };
  31356. var t = h.createCanvas();
  31357. this.canvas = t
  31358. }
  31359. return t.prototype.update = function (t, e, n, i, r, o) {
  31360. var a = this._getBrush(),
  31361. s = this._getGradient(r, "inRange"),
  31362. l = this._getGradient(r, "outOfRange"),
  31363. u = this.pointSize + this.blurSize,
  31364. h = this.canvas,
  31365. c = h.getContext("2d"),
  31366. p = t.length;
  31367. h.width = e, h.height = n;
  31368. for (var d = 0; d < p; ++d) {
  31369. var f = t[d],
  31370. g = f[0],
  31371. y = f[1],
  31372. v = i(f[2]);
  31373. c.globalAlpha = v, c.drawImage(a, g - u, y - u)
  31374. }
  31375. if (!h.width || !h.height) return h;
  31376. for (var m = c.getImageData(0, 0, h.width, h.height), x = m.data, _ = 0, b = x.length, w = this.minOpacity, S = this.maxOpacity - w; _ < b;) {
  31377. v = x[_ + 3] / 256;
  31378. var M = 4 * Math.floor(255 * v);
  31379. if (v > 0) {
  31380. var I = o(v) ? s : l;
  31381. v > 0 && (v = v * S + w), x[_++] = I[M], x[_++] = I[M + 1], x[_++] = I[M + 2], x[_++] = I[M + 3] * v * 256
  31382. } else _ += 4
  31383. }
  31384. return c.putImageData(m, 0, 0), h
  31385. }, t.prototype._getBrush = function () {
  31386. var t = this._brushCanvas || (this._brushCanvas = h.createCanvas()),
  31387. e = this.pointSize + this.blurSize,
  31388. n = 2 * e;
  31389. t.width = n, t.height = n;
  31390. var i = t.getContext("2d");
  31391. return i.clearRect(0, 0, n, n), i.shadowOffsetX = n, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-e, e, this.pointSize, 0, 2 * Math.PI, !0), i.closePath(), i.fill(), t
  31392. }, t.prototype._getGradient = function (t, e) {
  31393. for (var n = this._gradientPixels, i = n[e] || (n[e] = new Uint8ClampedArray(1024)), r = [0, 0, 0, 0], o = 0, a = 0; a < 256; a++) t[e](a / 255, !0, r), i[o++] = r[0], i[o++] = r[1], i[o++] = r[2], i[o++] = r[3];
  31394. return i
  31395. }, t
  31396. }();
  31397. function lO(t) {
  31398. var e = t.dimensions;
  31399. return "lng" === e[0] && "lat" === e[1]
  31400. }
  31401. var uO = function (t) {
  31402. function e() {
  31403. var n = null !== t && t.apply(this, arguments) || this;
  31404. return n.type = e.type, n
  31405. }
  31406. return n(e, t), e.prototype.render = function (t, e, n) {
  31407. var i;
  31408. e.eachComponent("visualMap", (function (e) {
  31409. e.eachTargetSeries((function (n) {
  31410. n === t && (i = e)
  31411. }))
  31412. })), this._progressiveEls = null, this.group.removeAll();
  31413. var r = t.coordinateSystem;
  31414. "cartesian2d" === r.type || "calendar" === r.type ? this._renderOnCartesianAndCalendar(t, n, 0, t.getData().count()) : lO(r) && this._renderOnGeo(r, t, i, n)
  31415. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  31416. this.group.removeAll()
  31417. }, e.prototype.incrementalRender = function (t, e, n, i) {
  31418. var r = e.coordinateSystem;
  31419. r && (lO(r) ? this.render(e, n, i) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(e, i, t.start, t.end, !0)))
  31420. }, e.prototype.eachRendered = function (t) {
  31421. Jh(this._progressiveEls || this.group, t)
  31422. }, e.prototype._renderOnCartesianAndCalendar = function (t, e, n, i, r) {
  31423. var o, a, s, l, u = t.coordinateSystem,
  31424. h = PS(u, "cartesian2d");
  31425. if (h) {
  31426. var c = u.getAxis("x"),
  31427. p = u.getAxis("y");
  31428. 0, o = c.getBandWidth() + .5, a = p.getBandWidth() + .5, s = c.scale.getExtent(), l = p.scale.getExtent()
  31429. }
  31430. for (var d = this.group, f = t.getData(), g = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = t.getModel(["blur", "itemStyle"]).getItemStyle(), v = t.getModel(["select", "itemStyle"]).getItemStyle(), m = t.get(["itemStyle", "borderRadius"]), x = rc(t), _ = t.getModel("emphasis"), b = _.get("focus"), w = _.get("blurScope"), S = _.get("disabled"), M = h ? [f.mapDimension("x"), f.mapDimension("y"), f.mapDimension("value")] : [f.mapDimension("time"), f.mapDimension("value")], I = n; I < i; I++) {
  31431. var T = void 0,
  31432. C = f.getItemVisual(I, "style");
  31433. if (h) {
  31434. var D = f.get(M[0], I),
  31435. A = f.get(M[1], I);
  31436. if (isNaN(f.get(M[2], I)) || isNaN(D) || isNaN(A) || D < s[0] || D > s[1] || A < l[0] || A > l[1]) continue;
  31437. var k = u.dataToPoint([D, A]);
  31438. T = new Ws({
  31439. shape: {
  31440. x: k[0] - o / 2,
  31441. y: k[1] - a / 2,
  31442. width: o,
  31443. height: a
  31444. },
  31445. style: C
  31446. })
  31447. } else {
  31448. if (isNaN(f.get(M[1], I))) continue;
  31449. T = new Ws({
  31450. z2: 1,
  31451. shape: u.dataToRect([f.get(M[0], I)]).contentShape,
  31452. style: C
  31453. })
  31454. }
  31455. if (f.hasItemOption) {
  31456. var L = f.getItemModel(I),
  31457. P = L.getModel("emphasis");
  31458. g = P.getModel("itemStyle").getItemStyle(), y = L.getModel(["blur", "itemStyle"]).getItemStyle(), v = L.getModel(["select", "itemStyle"]).getItemStyle(), m = L.get(["itemStyle", "borderRadius"]), b = P.get("focus"), w = P.get("blurScope"), S = P.get("disabled"), x = rc(L)
  31459. }
  31460. T.shape.r = m;
  31461. var O = t.getRawValue(I),
  31462. R = "-";
  31463. O && null != O[2] && (R = O[2] + ""), ic(T, x, {
  31464. labelFetcher: t,
  31465. labelDataIndex: I,
  31466. defaultOpacity: C.opacity,
  31467. defaultText: R
  31468. }), T.ensureState("emphasis").style = g, T.ensureState("blur").style = y, T.ensureState("select").style = v, Zl(T, b, w, S), T.incremental = r, r && (T.states.emphasis.hoverLayer = !0), d.add(T), f.setItemGraphicEl(I, T), this._progressiveEls && this._progressiveEls.push(T)
  31469. }
  31470. }, e.prototype._renderOnGeo = function (t, e, n, i) {
  31471. var r = n.targetVisuals.inRange,
  31472. o = n.targetVisuals.outOfRange,
  31473. a = e.getData(),
  31474. s = this._hmLayer || this._hmLayer || new sO;
  31475. s.blurSize = e.get("blurSize"), s.pointSize = e.get("pointSize"), s.minOpacity = e.get("minOpacity"), s.maxOpacity = e.get("maxOpacity");
  31476. var l = t.getViewRect().clone(),
  31477. u = t.getRoamTransform();
  31478. l.applyTransform(u);
  31479. var h = Math.max(l.x, 0),
  31480. c = Math.max(l.y, 0),
  31481. p = Math.min(l.width + l.x, i.getWidth()),
  31482. d = Math.min(l.height + l.y, i.getHeight()),
  31483. f = p - h,
  31484. g = d - c,
  31485. y = [a.mapDimension("lng"), a.mapDimension("lat"), a.mapDimension("value")],
  31486. v = a.mapArray(y, (function (e, n, i) {
  31487. var r = t.dataToPoint([e, n]);
  31488. return r[0] -= h, r[1] -= c, r.push(i), r
  31489. })),
  31490. m = n.getExtent(),
  31491. x = "visualMap.continuous" === n.type ? function (t, e) {
  31492. var n = t[1] - t[0];
  31493. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n],
  31494. function (t) {
  31495. return t >= e[0] && t <= e[1]
  31496. }
  31497. }(m, n.option.range) : function (t, e, n) {
  31498. var i = t[1] - t[0],
  31499. r = (e = z(e, (function (e) {
  31500. return {
  31501. interval: [(e.interval[0] - t[0]) / i, (e.interval[1] - t[0]) / i]
  31502. }
  31503. }))).length,
  31504. o = 0;
  31505. return function (t) {
  31506. var i;
  31507. for (i = o; i < r; i++)
  31508. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  31509. o = i;
  31510. break
  31511. } if (i === r)
  31512. for (i = o - 1; i >= 0; i--) {
  31513. var a;
  31514. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  31515. o = i;
  31516. break
  31517. }
  31518. }
  31519. return i >= 0 && i < r && n[i]
  31520. }
  31521. }(m, n.getPieceList(), n.option.selected);
  31522. s.update(v, f, g, r.color.getNormalizer(), {
  31523. inRange: r.color.getColorMapper(),
  31524. outOfRange: o.color.getColorMapper()
  31525. }, x);
  31526. var _ = new Ns({
  31527. style: {
  31528. width: f,
  31529. height: g,
  31530. x: h,
  31531. y: c,
  31532. image: s.canvas
  31533. },
  31534. silent: !0
  31535. });
  31536. this.group.add(_)
  31537. }, e.type = "heatmap", e
  31538. }(Og),
  31539. hO = function (t) {
  31540. function e() {
  31541. var n = null !== t && t.apply(this, arguments) || this;
  31542. return n.type = e.type, n
  31543. }
  31544. return n(e, t), e.prototype.getInitialData = function (t, e) {
  31545. return _x(null, this, {
  31546. generateCoord: "value"
  31547. })
  31548. }, e.prototype.preventIncremental = function () {
  31549. var t = wd.get(this.get("coordinateSystem"));
  31550. if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1]
  31551. }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
  31552. coordinateSystem: "cartesian2d",
  31553. z: 2,
  31554. geoIndex: 0,
  31555. blurSize: 30,
  31556. pointSize: 20,
  31557. maxOpacity: 1,
  31558. minOpacity: 0,
  31559. select: {
  31560. itemStyle: {
  31561. borderColor: "#212121"
  31562. }
  31563. }
  31564. }, e
  31565. }(bg);
  31566. var cO = ["itemStyle", "borderWidth"],
  31567. pO = [{
  31568. xy: "x",
  31569. wh: "width",
  31570. index: 0,
  31571. posDesc: ["left", "right"]
  31572. }, {
  31573. xy: "y",
  31574. wh: "height",
  31575. index: 1,
  31576. posDesc: ["top", "bottom"]
  31577. }],
  31578. dO = new Su,
  31579. fO = function (t) {
  31580. function e() {
  31581. var n = null !== t && t.apply(this, arguments) || this;
  31582. return n.type = e.type, n
  31583. }
  31584. return n(e, t), e.prototype.render = function (t, e, n) {
  31585. var i = this.group,
  31586. r = t.getData(),
  31587. o = this._data,
  31588. a = t.coordinateSystem,
  31589. s = a.getBaseAxis().isHorizontal(),
  31590. l = a.master.getRect(),
  31591. u = {
  31592. ecSize: {
  31593. width: n.getWidth(),
  31594. height: n.getHeight()
  31595. },
  31596. seriesModel: t,
  31597. coordSys: a,
  31598. coordSysExtent: [
  31599. [l.x, l.x + l.width],
  31600. [l.y, l.y + l.height]
  31601. ],
  31602. isHorizontal: s,
  31603. valueDim: pO[+s],
  31604. categoryDim: pO[1 - +s]
  31605. };
  31606. r.diff(o).add((function (t) {
  31607. if (r.hasValue(t)) {
  31608. var e = wO(r, t),
  31609. n = gO(r, t, e, u),
  31610. o = IO(r, u, n);
  31611. r.setItemGraphicEl(t, o), i.add(o), kO(o, u, n)
  31612. }
  31613. })).update((function (t, e) {
  31614. var n = o.getItemGraphicEl(e);
  31615. if (r.hasValue(t)) {
  31616. var a = wO(r, t),
  31617. s = gO(r, t, a, u),
  31618. l = CO(r, s);
  31619. n && l !== n.__pictorialShapeStr && (i.remove(n), r.setItemGraphicEl(t, null), n = null), n ? function (t, e, n) {
  31620. var i = n.animationModel,
  31621. r = n.dataIndex,
  31622. o = t.__pictorialBundle;
  31623. vh(o, {
  31624. x: n.bundlePosition[0],
  31625. y: n.bundlePosition[1]
  31626. }, i, r), n.symbolRepeat ? mO(t, e, n, !0) : xO(t, e, n, !0);
  31627. _O(t, n, !0), bO(t, e, n, !0)
  31628. }(n, u, s) : n = IO(r, u, s, !0), r.setItemGraphicEl(t, n), n.__pictorialSymbolMeta = s, i.add(n), kO(n, u, s)
  31629. } else i.remove(n)
  31630. })).remove((function (t) {
  31631. var e = o.getItemGraphicEl(t);
  31632. e && TO(o, t, e.__pictorialSymbolMeta.animationModel, e)
  31633. })).execute();
  31634. var h = t.get("clip", !0) ? LS(t.coordinateSystem, !1, t) : null;
  31635. return h ? i.setClipPath(h) : i.removeClipPath(), this._data = r, this.group
  31636. }, e.prototype.remove = function (t, e) {
  31637. var n = this.group,
  31638. i = this._data;
  31639. t.get("animation") ? i && i.eachItemGraphicEl((function (e) {
  31640. TO(i, rl(e).dataIndex, t, e)
  31641. })) : n.removeAll()
  31642. }, e.type = "pictorialBar", e
  31643. }(Og);
  31644. function gO(t, e, n, i) {
  31645. var r = t.getItemLayout(e),
  31646. o = n.get("symbolRepeat"),
  31647. a = n.get("symbolClip"),
  31648. s = n.get("symbolPosition") || "start",
  31649. l = (n.get("symbolRotate") || 0) * Math.PI / 180 || 0,
  31650. u = n.get("symbolPatternSize") || 2,
  31651. h = n.isAnimationEnabled(),
  31652. c = {
  31653. dataIndex: e,
  31654. layout: r,
  31655. itemModel: n,
  31656. symbolType: t.getItemVisual(e, "symbol") || "circle",
  31657. style: t.getItemVisual(e, "style"),
  31658. symbolClip: a,
  31659. symbolRepeat: o,
  31660. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  31661. symbolPatternSize: u,
  31662. rotation: l,
  31663. animationModel: h ? n : null,
  31664. hoverScale: h && n.get(["emphasis", "scale"]),
  31665. z2: n.getShallow("z", !0) || 0
  31666. };
  31667. ! function (t, e, n, i, r) {
  31668. var o, a = i.valueDim,
  31669. s = t.get("symbolBoundingData"),
  31670. l = i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),
  31671. u = l.toGlobalCoord(l.dataToCoord(0)),
  31672. h = 1 - +(n[a.wh] <= 0);
  31673. if (Y(s)) {
  31674. var c = [yO(l, s[0]) - u, yO(l, s[1]) - u];
  31675. c[1] < c[0] && c.reverse(), o = c[h]
  31676. } else o = null != s ? yO(l, s) - u : e ? i.coordSysExtent[a.index][h] - u : n[a.wh];
  31677. r.boundingLength = o, e && (r.repeatCutLength = n[a.wh]);
  31678. r.pxSign = o > 0 ? 1 : -1
  31679. }(n, o, r, i, c),
  31680. function (t, e, n, i, r, o, a, s, l, u) {
  31681. var h, c = l.valueDim,
  31682. p = l.categoryDim,
  31683. d = Math.abs(n[p.wh]),
  31684. f = t.getItemVisual(e, "symbolSize");
  31685. h = Y(f) ? f.slice() : null == f ? ["100%", "100%"] : [f, f];
  31686. h[p.index] = $r(h[p.index], d), h[c.index] = $r(h[c.index], i ? d : Math.abs(o)), u.symbolSize = h;
  31687. var g = u.symbolScale = [h[0] / s, h[1] / s];
  31688. g[c.index] *= (l.isHorizontal ? -1 : 1) * a
  31689. }(t, e, r, o, 0, c.boundingLength, c.pxSign, u, i, c),
  31690. function (t, e, n, i, r) {
  31691. var o = t.get(cO) || 0;
  31692. o && (dO.attr({
  31693. scaleX: e[0],
  31694. scaleY: e[1],
  31695. rotation: n
  31696. }), dO.updateTransform(), o /= dO.getLineScale(), o *= e[i.valueDim.index]);
  31697. r.valueLineWidth = o || 0
  31698. }(n, c.symbolScale, l, i, c);
  31699. var p = c.symbolSize,
  31700. d = Zy(n.get("symbolOffset"), p);
  31701. return function (t, e, n, i, r, o, a, s, l, u, h, c) {
  31702. var p = h.categoryDim,
  31703. d = h.valueDim,
  31704. f = c.pxSign,
  31705. g = Math.max(e[d.index] + s, 0),
  31706. y = g;
  31707. if (i) {
  31708. var v = Math.abs(l),
  31709. m = it(t.get("symbolMargin"), "15%") + "",
  31710. x = !1;
  31711. m.lastIndexOf("!") === m.length - 1 && (x = !0, m = m.slice(0, m.length - 1));
  31712. var _ = $r(m, e[d.index]),
  31713. b = Math.max(g + 2 * _, 0),
  31714. w = x ? 0 : 2 * _,
  31715. S = vo(i),
  31716. M = S ? i : LO((v + w) / b);
  31717. b = g + 2 * (_ = (v - M * g) / 2 / (x ? M : Math.max(M - 1, 1))), w = x ? 0 : 2 * _, S || "fixed" === i || (M = u ? LO((Math.abs(u) + w) / b) : 0), y = M * b - w, c.repeatTimes = M, c.symbolMargin = _
  31718. }
  31719. var I = f * (y / 2),
  31720. T = c.pathPosition = [];
  31721. T[p.index] = n[p.wh] / 2, T[d.index] = "start" === a ? I : "end" === a ? l - I : l / 2, o && (T[0] += o[0], T[1] += o[1]);
  31722. var C = c.bundlePosition = [];
  31723. C[p.index] = n[p.xy], C[d.index] = n[d.xy];
  31724. var D = c.barRectShape = A({}, n);
  31725. D[d.wh] = f * Math.max(Math.abs(n[d.wh]), Math.abs(T[d.index] + I)), D[p.wh] = n[p.wh];
  31726. var k = c.clipShape = {};
  31727. k[p.xy] = -n[p.xy], k[p.wh] = h.ecSize[p.wh], k[d.xy] = 0, k[d.wh] = n[d.wh]
  31728. }(n, p, r, o, 0, d, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, i, c), c
  31729. }
  31730. function yO(t, e) {
  31731. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))
  31732. }
  31733. function vO(t) {
  31734. var e = t.symbolPatternSize,
  31735. n = Xy(t.symbolType, -e / 2, -e / 2, e, e);
  31736. return n.attr({
  31737. culling: !0
  31738. }), "image" !== n.type && n.setStyle({
  31739. strokeNoScale: !0
  31740. }), n
  31741. }
  31742. function mO(t, e, n, i) {
  31743. var r = t.__pictorialBundle,
  31744. o = n.symbolSize,
  31745. a = n.valueLineWidth,
  31746. s = n.pathPosition,
  31747. l = e.valueDim,
  31748. u = n.repeatTimes || 0,
  31749. h = 0,
  31750. c = o[e.valueDim.index] + a + 2 * n.symbolMargin;
  31751. for (DO(t, (function (t) {
  31752. t.__pictorialAnimationIndex = h, t.__pictorialRepeatTimes = u, h < u ? AO(t, null, f(h), n, i) : AO(t, null, {
  31753. scaleX: 0,
  31754. scaleY: 0
  31755. }, n, i, (function () {
  31756. r.remove(t)
  31757. })), h++
  31758. })); h < u; h++) {
  31759. var p = vO(n);
  31760. p.__pictorialAnimationIndex = h, p.__pictorialRepeatTimes = u, r.add(p);
  31761. var d = f(h);
  31762. AO(p, {
  31763. x: d.x,
  31764. y: d.y,
  31765. scaleX: 0,
  31766. scaleY: 0
  31767. }, {
  31768. scaleX: d.scaleX,
  31769. scaleY: d.scaleY,
  31770. rotation: d.rotation
  31771. }, n, i)
  31772. }
  31773. function f(t) {
  31774. var e = s.slice(),
  31775. i = n.pxSign,
  31776. r = t;
  31777. return ("start" === n.symbolRepeatDirection ? i > 0 : i < 0) && (r = u - 1 - t), e[l.index] = c * (r - u / 2 + .5) + s[l.index], {
  31778. x: e[0],
  31779. y: e[1],
  31780. scaleX: n.symbolScale[0],
  31781. scaleY: n.symbolScale[1],
  31782. rotation: n.rotation
  31783. }
  31784. }
  31785. }
  31786. function xO(t, e, n, i) {
  31787. var r = t.__pictorialBundle,
  31788. o = t.__pictorialMainPath;
  31789. o ? AO(o, null, {
  31790. x: n.pathPosition[0],
  31791. y: n.pathPosition[1],
  31792. scaleX: n.symbolScale[0],
  31793. scaleY: n.symbolScale[1],
  31794. rotation: n.rotation
  31795. }, n, i) : (o = t.__pictorialMainPath = vO(n), r.add(o), AO(o, {
  31796. x: n.pathPosition[0],
  31797. y: n.pathPosition[1],
  31798. scaleX: 0,
  31799. scaleY: 0,
  31800. rotation: n.rotation
  31801. }, {
  31802. scaleX: n.symbolScale[0],
  31803. scaleY: n.symbolScale[1]
  31804. }, n, i))
  31805. }
  31806. function _O(t, e, n) {
  31807. var i = A({}, e.barRectShape),
  31808. r = t.__pictorialBarRect;
  31809. r ? AO(r, null, {
  31810. shape: i
  31811. }, e, n) : ((r = t.__pictorialBarRect = new Ws({
  31812. z2: 2,
  31813. shape: i,
  31814. silent: !0,
  31815. style: {
  31816. stroke: "transparent",
  31817. fill: "transparent",
  31818. lineWidth: 0
  31819. }
  31820. })).disableMorphing = !0, t.add(r))
  31821. }
  31822. function bO(t, e, n, i) {
  31823. if (n.symbolClip) {
  31824. var r = t.__pictorialClipPath,
  31825. o = A({}, n.clipShape),
  31826. a = e.valueDim,
  31827. s = n.animationModel,
  31828. l = n.dataIndex;
  31829. if (r) vh(r, {
  31830. shape: o
  31831. }, s, l);
  31832. else {
  31833. o[a.wh] = 0, r = new Ws({
  31834. shape: o
  31835. }), t.__pictorialBundle.setClipPath(r), t.__pictorialClipPath = r;
  31836. var u = {};
  31837. u[a.wh] = n.clipShape[a.wh], Qh[i ? "updateProps" : "initProps"](r, {
  31838. shape: u
  31839. }, s, l)
  31840. }
  31841. }
  31842. }
  31843. function wO(t, e) {
  31844. var n = t.getItemModel(e);
  31845. return n.getAnimationDelayParams = SO, n.isAnimationEnabled = MO, n
  31846. }
  31847. function SO(t) {
  31848. return {
  31849. index: t.__pictorialAnimationIndex,
  31850. count: t.__pictorialRepeatTimes
  31851. }
  31852. }
  31853. function MO() {
  31854. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
  31855. }
  31856. function IO(t, e, n, i) {
  31857. var r = new Br,
  31858. o = new Br;
  31859. return r.add(o), r.__pictorialBundle = o, o.x = n.bundlePosition[0], o.y = n.bundlePosition[1], n.symbolRepeat ? mO(r, e, n) : xO(r, 0, n), _O(r, n, i), bO(r, e, n, i), r.__pictorialShapeStr = CO(t, n), r.__pictorialSymbolMeta = n, r
  31860. }
  31861. function TO(t, e, n, i) {
  31862. var r = i.__pictorialBarRect;
  31863. r && r.removeTextContent();
  31864. var o = [];
  31865. DO(i, (function (t) {
  31866. o.push(t)
  31867. })), i.__pictorialMainPath && o.push(i.__pictorialMainPath), i.__pictorialClipPath && (n = null), E(o, (function (t) {
  31868. _h(t, {
  31869. scaleX: 0,
  31870. scaleY: 0
  31871. }, n, e, (function () {
  31872. i.parent && i.parent.remove(i)
  31873. }))
  31874. })), t.setItemGraphicEl(e, null)
  31875. }
  31876. function CO(t, e) {
  31877. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":")
  31878. }
  31879. function DO(t, e, n) {
  31880. E(t.__pictorialBundle.children(), (function (i) {
  31881. i !== t.__pictorialBarRect && e.call(n, i)
  31882. }))
  31883. }
  31884. function AO(t, e, n, i, r, o) {
  31885. e && t.attr(e), i.symbolClip && !r ? n && t.attr(n) : n && Qh[r ? "updateProps" : "initProps"](t, n, i.animationModel, i.dataIndex, o)
  31886. }
  31887. function kO(t, e, n) {
  31888. var i = n.dataIndex,
  31889. r = n.itemModel,
  31890. o = r.getModel("emphasis"),
  31891. a = o.getModel("itemStyle").getItemStyle(),
  31892. s = r.getModel(["blur", "itemStyle"]).getItemStyle(),
  31893. l = r.getModel(["select", "itemStyle"]).getItemStyle(),
  31894. u = r.getShallow("cursor"),
  31895. h = o.get("focus"),
  31896. c = o.get("blurScope"),
  31897. p = o.get("scale");
  31898. DO(t, (function (t) {
  31899. if (t instanceof Ns) {
  31900. var e = t.style;
  31901. t.useStyle(A({
  31902. image: e.image,
  31903. x: e.x,
  31904. y: e.y,
  31905. width: e.width,
  31906. height: e.height
  31907. }, n.style))
  31908. } else t.useStyle(n.style);
  31909. var i = t.ensureState("emphasis");
  31910. i.style = a, p && (i.scaleX = 1.1 * t.scaleX, i.scaleY = 1.1 * t.scaleY), t.ensureState("blur").style = s, t.ensureState("select").style = l, u && (t.cursor = u), t.z2 = n.z2
  31911. }));
  31912. var d = e.valueDim.posDesc[+(n.boundingLength > 0)],
  31913. f = t.__pictorialBarRect;
  31914. f.ignoreClip = !0, ic(f, rc(r), {
  31915. labelFetcher: e.seriesModel,
  31916. labelDataIndex: i,
  31917. defaultText: cS(e.seriesModel.getData(), i),
  31918. inheritColor: n.style.fill,
  31919. defaultOpacity: n.style.opacity,
  31920. defaultOutsidePosition: d
  31921. }), Zl(t, h, c, o.get("disabled"))
  31922. }
  31923. function LO(t) {
  31924. var e = Math.round(t);
  31925. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t)
  31926. }
  31927. var PO = function (t) {
  31928. function e() {
  31929. var n = null !== t && t.apply(this, arguments) || this;
  31930. return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n
  31931. }
  31932. return n(e, t), e.prototype.getInitialData = function (e) {
  31933. return e.stack = null, t.prototype.getInitialData.apply(this, arguments)
  31934. }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = kc(jS.defaultOption, {
  31935. symbol: "circle",
  31936. symbolSize: null,
  31937. symbolRotate: null,
  31938. symbolPosition: null,
  31939. symbolOffset: null,
  31940. symbolMargin: null,
  31941. symbolRepeat: !1,
  31942. symbolRepeatDirection: "end",
  31943. symbolClip: !1,
  31944. symbolBoundingData: null,
  31945. symbolPatternSize: 400,
  31946. barGap: "-100%",
  31947. clip: !1,
  31948. progressive: 0,
  31949. emphasis: {
  31950. scale: !1
  31951. },
  31952. select: {
  31953. itemStyle: {
  31954. borderColor: "#212121"
  31955. }
  31956. }
  31957. }), e
  31958. }(jS);
  31959. var OO = function (t) {
  31960. function e() {
  31961. var n = null !== t && t.apply(this, arguments) || this;
  31962. return n.type = e.type, n._layers = [], n
  31963. }
  31964. return n(e, t), e.prototype.render = function (t, e, n) {
  31965. var i = t.getData(),
  31966. r = this,
  31967. o = this.group,
  31968. a = t.getLayerSeries(),
  31969. s = i.getLayout("layoutInfo"),
  31970. l = s.rect,
  31971. u = s.boundaryGap;
  31972. function h(t) {
  31973. return t.name
  31974. }
  31975. o.x = 0, o.y = l.y + u[0];
  31976. var c = new Gm(this._layersSeries || [], a, h, h),
  31977. p = [];
  31978. function d(e, n, s) {
  31979. var l = r._layers;
  31980. if ("remove" !== e) {
  31981. for (var u, h, c = [], d = [], f = a[n].indices, g = 0; g < f.length; g++) {
  31982. var y = i.getItemLayout(f[g]),
  31983. v = y.x,
  31984. m = y.y0,
  31985. x = y.y;
  31986. c.push(v, m), d.push(v, m + x), u = i.getItemVisual(f[g], "style")
  31987. }
  31988. var _ = i.getItemLayout(f[0]),
  31989. b = t.getModel("label").get("margin"),
  31990. w = t.getModel("emphasis");
  31991. if ("add" === e) {
  31992. var S = p[n] = new Br;
  31993. h = new DS({
  31994. shape: {
  31995. points: c,
  31996. stackedOnPoints: d,
  31997. smooth: .4,
  31998. stackedOnSmooth: .4,
  31999. smoothConstraint: !1
  32000. },
  32001. z2: 0
  32002. }), S.add(h), o.add(S), t.isAnimationEnabled() && h.setClipPath(function (t, e, n) {
  32003. var i = new Ws({
  32004. shape: {
  32005. x: t.x - 10,
  32006. y: t.y - 10,
  32007. width: 0,
  32008. height: t.height + 20
  32009. }
  32010. });
  32011. return mh(i, {
  32012. shape: {
  32013. x: t.x - 50,
  32014. width: t.width + 100,
  32015. height: t.height + 20
  32016. }
  32017. }, e, n), i
  32018. }(h.getBoundingRect(), t, (function () {
  32019. h.removeClipPath()
  32020. })))
  32021. } else {
  32022. S = l[s];
  32023. h = S.childAt(0), o.add(S), p[n] = S, vh(h, {
  32024. shape: {
  32025. points: c,
  32026. stackedOnPoints: d
  32027. }
  32028. }, t), Sh(h)
  32029. }
  32030. ic(h, rc(t), {
  32031. labelDataIndex: f[g - 1],
  32032. defaultText: i.getName(f[g - 1]),
  32033. inheritColor: u.fill
  32034. }, {
  32035. normal: {
  32036. verticalAlign: "middle"
  32037. }
  32038. }), h.setTextConfig({
  32039. position: null,
  32040. local: !0
  32041. });
  32042. var M = h.getTextContent();
  32043. M && (M.x = _.x - b, M.y = _.y0 + _.y / 2), h.useStyle(u), i.setItemGraphicEl(n, h), $l(h, t), Zl(h, w.get("focus"), w.get("blurScope"), w.get("disabled"))
  32044. } else o.remove(l[n])
  32045. }
  32046. c.add(W(d, this, "add")).update(W(d, this, "update")).remove(W(d, this, "remove")).execute(), this._layersSeries = a, this._layers = p
  32047. }, e.type = "themeRiver", e
  32048. }(Og);
  32049. var RO = function (t) {
  32050. function e() {
  32051. var n = null !== t && t.apply(this, arguments) || this;
  32052. return n.type = e.type, n
  32053. }
  32054. return n(e, t), e.prototype.init = function (e) {
  32055. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new OM(W(this.getData, this), W(this.getRawData, this))
  32056. }, e.prototype.fixData = function (t) {
  32057. var e = t.length,
  32058. n = {},
  32059. i = Uo(t, (function (t) {
  32060. return n.hasOwnProperty(t[0] + "") || (n[t[0] + ""] = -1), t[2]
  32061. })),
  32062. r = [];
  32063. i.buckets.each((function (t, e) {
  32064. r.push({
  32065. name: e,
  32066. dataList: t
  32067. })
  32068. }));
  32069. for (var o = r.length, a = 0; a < o; ++a) {
  32070. for (var s = r[a].name, l = 0; l < r[a].dataList.length; ++l) {
  32071. var u = r[a].dataList[l][0] + "";
  32072. n[u] = a
  32073. }
  32074. for (var u in n) n.hasOwnProperty(u) && n[u] !== a && (n[u] = a, t[e] = [u, 0, s], e++)
  32075. }
  32076. return t
  32077. }, e.prototype.getInitialData = function (t, e) {
  32078. for (var n = this.getReferringComponents("singleAxis", Wo).models[0].get("type"), i = B(t.data, (function (t) {
  32079. return void 0 !== t[2]
  32080. })), r = this.fixData(i || []), o = [], a = this.nameMap = yt(), s = 0, l = 0; l < r.length; ++l) o.push(r[l][2]), a.get(r[l][2]) || (a.set(r[l][2], s), s++);
  32081. var u = px(r, {
  32082. coordDimensions: ["single"],
  32083. dimensionsDefine: [{
  32084. name: "time",
  32085. type: Ym(n)
  32086. }, {
  32087. name: "value",
  32088. type: "float"
  32089. }, {
  32090. name: "name",
  32091. type: "ordinal"
  32092. }],
  32093. encodeDefine: {
  32094. single: 0,
  32095. value: 1,
  32096. itemName: 2
  32097. }
  32098. }).dimensions,
  32099. h = new cx(u, this);
  32100. return h.initData(r), h
  32101. }, e.prototype.getLayerSeries = function () {
  32102. for (var t = this.getData(), e = t.count(), n = [], i = 0; i < e; ++i) n[i] = i;
  32103. var r = t.mapDimension("single"),
  32104. o = Uo(n, (function (e) {
  32105. return t.get("name", e)
  32106. })),
  32107. a = [];
  32108. return o.buckets.each((function (e, n) {
  32109. e.sort((function (e, n) {
  32110. return t.get(r, e) - t.get(r, n)
  32111. })), a.push({
  32112. name: n,
  32113. indices: e
  32114. })
  32115. })), a
  32116. }, e.prototype.getAxisTooltipData = function (t, e, n) {
  32117. Y(t) || (t = t ? [t] : []);
  32118. for (var i, r = this.getData(), o = this.getLayerSeries(), a = [], s = o.length, l = 0; l < s; ++l) {
  32119. for (var u = Number.MAX_VALUE, h = -1, c = o[l].indices.length, p = 0; p < c; ++p) {
  32120. var d = r.get(t[0], o[l].indices[p]),
  32121. f = Math.abs(d - e);
  32122. f <= u && (i = d, u = f, h = o[l].indices[p])
  32123. }
  32124. a.push(h)
  32125. }
  32126. return {
  32127. dataIndices: a,
  32128. nestestValue: i
  32129. }
  32130. }, e.prototype.formatTooltip = function (t, e, n) {
  32131. var i = this.getData();
  32132. return og("nameValue", {
  32133. name: i.getName(t),
  32134. value: i.get(i.mapDimension("value"), t)
  32135. })
  32136. }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
  32137. z: 2,
  32138. colorBy: "data",
  32139. coordinateSystem: "singleAxis",
  32140. boundaryGap: ["10%", "10%"],
  32141. singleAxisIndex: 0,
  32142. animationEasing: "linear",
  32143. label: {
  32144. margin: 4,
  32145. show: !0,
  32146. position: "left",
  32147. fontSize: 11
  32148. },
  32149. emphasis: {
  32150. label: {
  32151. show: !0
  32152. }
  32153. }
  32154. }, e
  32155. }(bg);
  32156. function NO(t, e) {
  32157. t.eachSeriesByType("themeRiver", (function (t) {
  32158. var e = t.getData(),
  32159. n = t.coordinateSystem,
  32160. i = {},
  32161. r = n.getRect();
  32162. i.rect = r;
  32163. var o = t.get("boundaryGap"),
  32164. a = n.getAxis();
  32165. (i.boundaryGap = o, "horizontal" === a.orient) ? (o[0] = $r(o[0], r.height), o[1] = $r(o[1], r.height), EO(e, t, r.height - o[0] - o[1])) : (o[0] = $r(o[0], r.width), o[1] = $r(o[1], r.width), EO(e, t, r.width - o[0] - o[1]));
  32166. e.setLayout("layoutInfo", i)
  32167. }))
  32168. }
  32169. function EO(t, e, n) {
  32170. if (t.count())
  32171. for (var i, r = e.coordinateSystem, o = e.getLayerSeries(), a = t.mapDimension("single"), s = t.mapDimension("value"), l = z(o, (function (e) {
  32172. return z(e.indices, (function (e) {
  32173. var n = r.dataToPoint(t.get(a, e));
  32174. return n[1] = t.get(s, e), n
  32175. }))
  32176. })), u = function (t) {
  32177. for (var e = t.length, n = t[0].length, i = [], r = [], o = 0, a = 0; a < n; ++a) {
  32178. for (var s = 0, l = 0; l < e; ++l) s += t[l][a][1];
  32179. s > o && (o = s), i.push(s)
  32180. }
  32181. for (var u = 0; u < n; ++u) r[u] = (o - i[u]) / 2;
  32182. o = 0;
  32183. for (var h = 0; h < n; ++h) {
  32184. var c = i[h] + r[h];
  32185. c > o && (o = c)
  32186. }
  32187. return {
  32188. y0: r,
  32189. max: o
  32190. }
  32191. }(l), h = u.y0, c = n / u.max, p = o.length, d = o[0].indices.length, f = 0; f < d; ++f) {
  32192. i = h[f] * c, t.setItemLayout(o[0].indices[f], {
  32193. layerIndex: 0,
  32194. x: l[0][f][0],
  32195. y0: i,
  32196. y: l[0][f][1] * c
  32197. });
  32198. for (var g = 1; g < p; ++g) i += l[g - 1][f][1] * c, t.setItemLayout(o[g].indices[f], {
  32199. layerIndex: g,
  32200. x: l[g][f][0],
  32201. y0: i,
  32202. y: l[g][f][1] * c
  32203. })
  32204. }
  32205. }
  32206. var zO = function (t) {
  32207. function e(e, n, i, r) {
  32208. var o = t.call(this) || this;
  32209. o.z2 = 2, o.textConfig = {
  32210. inside: !0
  32211. }, rl(o).seriesIndex = n.seriesIndex;
  32212. var a = new Xs({
  32213. z2: 4,
  32214. silent: e.getModel().get(["label", "silent"])
  32215. });
  32216. return o.setTextContent(a), o.updateData(!0, e, n, i, r), o
  32217. }
  32218. return n(e, t), e.prototype.updateData = function (t, e, n, i, r) {
  32219. this.node = e, e.piece = this, n = n || this._seriesModel, i = i || this._ecModel;
  32220. var o = this;
  32221. rl(o).dataIndex = e.dataIndex;
  32222. var a = e.getModel(),
  32223. s = a.getModel("emphasis"),
  32224. l = e.getLayout(),
  32225. u = A({}, l);
  32226. u.label = null;
  32227. var h = e.getVisual("style");
  32228. h.lineJoin = "bevel";
  32229. var c = e.getVisual("decal");
  32230. c && (h.decal = mv(c, r));
  32231. var p = tM(a.getModel("itemStyle"), u, !0);
  32232. A(u, p), E(hl, (function (t) {
  32233. var e = o.ensureState(t),
  32234. n = a.getModel([t, "itemStyle"]);
  32235. e.style = n.getItemStyle();
  32236. var i = tM(n, u);
  32237. i && (e.shape = i)
  32238. })), t ? (o.setShape(u), o.shape.r = l.r0, mh(o, {
  32239. shape: {
  32240. r: l.r
  32241. }
  32242. }, n, e.dataIndex)) : (vh(o, {
  32243. shape: u
  32244. }, n), Sh(o)), o.useStyle(h), this._updateLabel(n);
  32245. var d = a.getShallow("cursor");
  32246. d && o.attr("cursor", d), this._seriesModel = n || this._seriesModel, this._ecModel = i || this._ecModel;
  32247. var f = s.get("focus");
  32248. Zl(this, "ancestor" === f ? e.getAncestorsIndices() : "descendant" === f ? e.getDescendantIndices() : f, s.get("blurScope"), s.get("disabled"))
  32249. }, e.prototype._updateLabel = function (t) {
  32250. var e = this,
  32251. n = this.node.getModel(),
  32252. i = n.getModel("label"),
  32253. r = this.node.getLayout(),
  32254. o = r.endAngle - r.startAngle,
  32255. a = (r.startAngle + r.endAngle) / 2,
  32256. s = Math.cos(a),
  32257. l = Math.sin(a),
  32258. u = this,
  32259. h = u.getTextContent(),
  32260. c = this.node.dataIndex,
  32261. p = i.get("minAngle") / 180 * Math.PI,
  32262. d = i.get("show") && !(null != p && Math.abs(o) < p);
  32263. function f(t, e) {
  32264. var n = t.get(e);
  32265. return null == n ? i.get(e) : n
  32266. }
  32267. h.ignore = !d, E(cl, (function (i) {
  32268. var p = "normal" === i ? n.getModel("label") : n.getModel([i, "label"]),
  32269. d = "normal" === i,
  32270. g = d ? h : h.ensureState(i),
  32271. y = t.getFormattedLabel(c, i);
  32272. d && (y = y || e.node.name), g.style = oc(p, {}, null, "normal" !== i, !0), y && (g.style.text = y);
  32273. var v = p.get("show");
  32274. null == v || d || (g.ignore = !v);
  32275. var m, x = f(p, "position"),
  32276. _ = d ? u : u.states[i],
  32277. b = _.style.fill;
  32278. _.textConfig = {
  32279. outsideFill: "inherit" === p.get("color") ? b : null,
  32280. inside: "outside" !== x
  32281. };
  32282. var w = f(p, "distance") || 0,
  32283. S = f(p, "align"),
  32284. M = f(p, "rotate"),
  32285. I = .5 * Math.PI,
  32286. T = 1.5 * Math.PI,
  32287. C = gs("tangential" === M ? Math.PI / 2 - a : a),
  32288. D = C > I && !so(C - I) && C < T;
  32289. "outside" === x ? (m = r.r + w, S = D ? "right" : "left") : S && "center" !== S ? "left" === S ? (m = r.r0 + w, S = D ? "right" : "left") : "right" === S && (m = r.r - w, S = D ? "left" : "right") : (m = o === 2 * Math.PI && 0 === r.r0 ? 0 : (r.r + r.r0) / 2, S = "center"), g.style.align = S, g.style.verticalAlign = f(p, "verticalAlign") || "middle", g.x = m * s + r.cx, g.y = m * l + r.cy;
  32290. var A = 0;
  32291. "radial" === M ? A = gs(-a) + (D ? Math.PI : 0) : "tangential" === M ? A = gs(Math.PI / 2 - a) + (D ? Math.PI : 0) : j(M) && (A = M * Math.PI / 180), g.rotation = gs(A)
  32292. })), h.dirtyStyle()
  32293. }, e
  32294. }(Fu),
  32295. VO = "sunburstRootToNode",
  32296. BO = "sunburstHighlight";
  32297. var FO = function (t) {
  32298. function e() {
  32299. var n = null !== t && t.apply(this, arguments) || this;
  32300. return n.type = e.type, n
  32301. }
  32302. return n(e, t), e.prototype.render = function (t, e, n, i) {
  32303. var r = this;
  32304. this.seriesModel = t, this.api = n, this.ecModel = e;
  32305. var o = t.getData(),
  32306. a = o.tree.root,
  32307. s = t.getViewRoot(),
  32308. l = this.group,
  32309. u = t.get("renderLabelForZeroData"),
  32310. h = [];
  32311. s.eachNode((function (t) {
  32312. h.push(t)
  32313. }));
  32314. var c = this._oldChildren || [];
  32315. ! function (i, r) {
  32316. if (0 === i.length && 0 === r.length) return;
  32317. function s(t) {
  32318. return t.getId()
  32319. }
  32320. function h(s, h) {
  32321. ! function (i, r) {
  32322. u || !i || i.getValue() || (i = null);
  32323. if (i !== a && r !== a)
  32324. if (r && r.piece) i ? (r.piece.updateData(!1, i, t, e, n), o.setItemGraphicEl(i.dataIndex, r.piece)) : function (t) {
  32325. if (!t) return;
  32326. t.piece && (l.remove(t.piece), t.piece = null)
  32327. }(r);
  32328. else if (i) {
  32329. var s = new zO(i, t, e, n);
  32330. l.add(s), o.setItemGraphicEl(i.dataIndex, s)
  32331. }
  32332. }(null == s ? null : i[s], null == h ? null : r[h])
  32333. }
  32334. new Gm(r, i, s, s).add(h).update(h).remove(H(h, null)).execute()
  32335. }(h, c),
  32336. function (i, o) {
  32337. o.depth > 0 ? (r.virtualPiece ? r.virtualPiece.updateData(!1, i, t, e, n) : (r.virtualPiece = new zO(i, t, e, n), l.add(r.virtualPiece)), o.piece.off("click"), r.virtualPiece.on("click", (function (t) {
  32338. r._rootToNode(o.parentNode)
  32339. }))) : r.virtualPiece && (l.remove(r.virtualPiece), r.virtualPiece = null)
  32340. }(a, s), this._initEvents(), this._oldChildren = h
  32341. }, e.prototype._initEvents = function () {
  32342. var t = this;
  32343. this.group.off("click"), this.group.on("click", (function (e) {
  32344. var n = !1;
  32345. t.seriesModel.getViewRoot().eachNode((function (i) {
  32346. if (!n && i.piece && i.piece === e.target) {
  32347. var r = i.getModel().get("nodeClick");
  32348. if ("rootToNode" === r) t._rootToNode(i);
  32349. else if ("link" === r) {
  32350. var o = i.getModel(),
  32351. a = o.get("link");
  32352. if (a) Mp(a, o.get("target", !0) || "_blank")
  32353. }
  32354. n = !0
  32355. }
  32356. }))
  32357. }))
  32358. }, e.prototype._rootToNode = function (t) {
  32359. t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  32360. type: VO,
  32361. from: this.uid,
  32362. seriesId: this.seriesModel.id,
  32363. targetNode: t
  32364. })
  32365. }, e.prototype.containPoint = function (t, e) {
  32366. var n = e.getData().getItemLayout(0);
  32367. if (n) {
  32368. var i = t[0] - n.cx,
  32369. r = t[1] - n.cy,
  32370. o = Math.sqrt(i * i + r * r);
  32371. return o <= n.r && o >= n.r0
  32372. }
  32373. }, e.type = "sunburst", e
  32374. }(Og),
  32375. GO = function (t) {
  32376. function e() {
  32377. var n = null !== t && t.apply(this, arguments) || this;
  32378. return n.type = e.type, n.ignoreStyleOnData = !0, n
  32379. }
  32380. return n(e, t), e.prototype.getInitialData = function (t, e) {
  32381. var n = {
  32382. name: t.name,
  32383. children: t.data
  32384. };
  32385. WO(n);
  32386. var i = this._levelModels = z(t.levels || [], (function (t) {
  32387. return new Cc(t, this, e)
  32388. }), this),
  32389. r = tD.createTree(n, this, (function (t) {
  32390. t.wrapMethod("getItemModel", (function (t, e) {
  32391. var n = r.getNodeByDataIndex(e),
  32392. o = i[n.depth];
  32393. return o && (t.parentModel = o), t
  32394. }))
  32395. }));
  32396. return r.data
  32397. }, e.prototype.optionUpdated = function () {
  32398. this.resetViewRoot()
  32399. }, e.prototype.getDataParams = function (e) {
  32400. var n = t.prototype.getDataParams.apply(this, arguments),
  32401. i = this.getData().tree.getNodeByDataIndex(e);
  32402. return n.treePathInfo = rD(i, this), n
  32403. }, e.prototype.getLevelModel = function (t) {
  32404. return this._levelModels && this._levelModels[t.depth]
  32405. }, e.prototype.getViewRoot = function () {
  32406. return this._viewRoot
  32407. }, e.prototype.resetViewRoot = function (t) {
  32408. t ? this._viewRoot = t : t = this._viewRoot;
  32409. var e = this.getRawData().tree.root;
  32410. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  32411. }, e.prototype.enableAriaDecal = function () {
  32412. hD(this)
  32413. }, e.type = "series.sunburst", e.defaultOption = {
  32414. z: 2,
  32415. center: ["50%", "50%"],
  32416. radius: [0, "75%"],
  32417. clockwise: !0,
  32418. startAngle: 90,
  32419. minAngle: 0,
  32420. stillShowZeroSum: !0,
  32421. nodeClick: "rootToNode",
  32422. renderLabelForZeroData: !1,
  32423. label: {
  32424. rotate: "radial",
  32425. show: !0,
  32426. opacity: 1,
  32427. align: "center",
  32428. position: "inside",
  32429. distance: 5,
  32430. silent: !0
  32431. },
  32432. itemStyle: {
  32433. borderWidth: 1,
  32434. borderColor: "white",
  32435. borderType: "solid",
  32436. shadowBlur: 0,
  32437. shadowColor: "rgba(0, 0, 0, 0.2)",
  32438. shadowOffsetX: 0,
  32439. shadowOffsetY: 0,
  32440. opacity: 1
  32441. },
  32442. emphasis: {
  32443. focus: "descendant"
  32444. },
  32445. blur: {
  32446. itemStyle: {
  32447. opacity: .2
  32448. },
  32449. label: {
  32450. opacity: .1
  32451. }
  32452. },
  32453. animationType: "expansion",
  32454. animationDuration: 1e3,
  32455. animationDurationUpdate: 500,
  32456. data: [],
  32457. sort: "desc"
  32458. }, e
  32459. }(bg);
  32460. function WO(t) {
  32461. var e = 0;
  32462. E(t.children, (function (t) {
  32463. WO(t);
  32464. var n = t.value;
  32465. Y(n) && (n = n[0]), e += n
  32466. }));
  32467. var n = t.value;
  32468. Y(n) && (n = n[0]), (null == n || isNaN(n)) && (n = e), n < 0 && (n = 0), Y(t.value) ? t.value[0] = n : t.value = n
  32469. }
  32470. var HO = Math.PI / 180;
  32471. function YO(t, e, n) {
  32472. e.eachSeriesByType(t, (function (t) {
  32473. var e = t.get("center"),
  32474. i = t.get("radius");
  32475. Y(i) || (i = [0, i]), Y(e) || (e = [e, e]);
  32476. var r = n.getWidth(),
  32477. o = n.getHeight(),
  32478. a = Math.min(r, o),
  32479. s = $r(e[0], r),
  32480. l = $r(e[1], o),
  32481. u = $r(i[0], a / 2),
  32482. h = $r(i[1], a / 2),
  32483. c = -t.get("startAngle") * HO,
  32484. p = t.get("minAngle") * HO,
  32485. d = t.getData().tree.root,
  32486. f = t.getViewRoot(),
  32487. g = f.depth,
  32488. y = t.get("sort");
  32489. null != y && XO(f, y);
  32490. var v = 0;
  32491. E(f.children, (function (t) {
  32492. !isNaN(t.getValue()) && v++
  32493. }));
  32494. var m = f.getValue(),
  32495. x = Math.PI / (m || v) * 2,
  32496. _ = f.depth > 0,
  32497. b = f.height - (_ ? -1 : 1),
  32498. w = (h - u) / (b || 1),
  32499. S = t.get("clockwise"),
  32500. M = t.get("stillShowZeroSum"),
  32501. I = S ? 1 : -1,
  32502. T = function (e, n) {
  32503. if (e) {
  32504. var i = n;
  32505. if (e !== d) {
  32506. var r = e.getValue(),
  32507. o = 0 === m && M ? x : r * x;
  32508. o < p && (o = p), i = n + I * o;
  32509. var h = e.depth - g - (_ ? -1 : 1),
  32510. c = u + w * h,
  32511. f = u + w * (h + 1),
  32512. y = t.getLevelModel(e);
  32513. if (y) {
  32514. var v = y.get("r0", !0),
  32515. b = y.get("r", !0),
  32516. C = y.get("radius", !0);
  32517. null != C && (v = C[0], b = C[1]), null != v && (c = $r(v, a / 2)), null != b && (f = $r(b, a / 2))
  32518. }
  32519. e.setLayout({
  32520. angle: o,
  32521. startAngle: n,
  32522. endAngle: i,
  32523. clockwise: S,
  32524. cx: s,
  32525. cy: l,
  32526. r0: c,
  32527. r: f
  32528. })
  32529. }
  32530. if (e.children && e.children.length) {
  32531. var D = 0;
  32532. E(e.children, (function (t) {
  32533. D += T(t, n + D)
  32534. }))
  32535. }
  32536. return i - n
  32537. }
  32538. };
  32539. if (_) {
  32540. var C = u,
  32541. D = u + w,
  32542. A = 2 * Math.PI;
  32543. d.setLayout({
  32544. angle: A,
  32545. startAngle: c,
  32546. endAngle: c + A,
  32547. clockwise: S,
  32548. cx: s,
  32549. cy: l,
  32550. r0: C,
  32551. r: D
  32552. })
  32553. }
  32554. T(f, c)
  32555. }))
  32556. }
  32557. function XO(t, e) {
  32558. var n = t.children || [];
  32559. t.children = function (t, e) {
  32560. if (X(e)) {
  32561. var n = z(t, (function (t, e) {
  32562. var n = t.getValue();
  32563. return {
  32564. params: {
  32565. depth: t.depth,
  32566. height: t.height,
  32567. dataIndex: t.dataIndex,
  32568. getValue: function () {
  32569. return n
  32570. }
  32571. },
  32572. index: e
  32573. }
  32574. }));
  32575. return n.sort((function (t, n) {
  32576. return e(t.params, n.params)
  32577. })), z(n, (function (e) {
  32578. return t[e.index]
  32579. }))
  32580. }
  32581. var i = "asc" === e;
  32582. return t.sort((function (t, e) {
  32583. var n = (t.getValue() - e.getValue()) * (i ? 1 : -1);
  32584. return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n
  32585. }))
  32586. }(n, e), n.length && E(t.children, (function (t) {
  32587. XO(t, e)
  32588. }))
  32589. }
  32590. function UO(t) {
  32591. var e = {};
  32592. t.eachSeriesByType("sunburst", (function (t) {
  32593. var n = t.getData(),
  32594. i = n.tree;
  32595. i.eachNode((function (r) {
  32596. var o = r.getModel().getModel("itemStyle").getItemStyle();
  32597. o.fill || (o.fill = function (t, n, i) {
  32598. for (var r = t; r && r.depth > 1;) r = r.parentNode;
  32599. var o = n.getColorFromPalette(r.name || r.dataIndex + "", e);
  32600. return t.depth > 1 && U(o) && (o = $n(o, (t.depth - 1) / (i - 1) * .5)), o
  32601. }(r, t, i.root.height)), A(n.ensureUniqueItemVisual(r.dataIndex, "style"), o)
  32602. }))
  32603. }))
  32604. }
  32605. var ZO = {
  32606. color: "fill",
  32607. borderColor: "stroke"
  32608. },
  32609. jO = {
  32610. symbol: 1,
  32611. symbolSize: 1,
  32612. symbolKeepAspect: 1,
  32613. legendIcon: 1,
  32614. visualMeta: 1,
  32615. liftZ: 1,
  32616. decal: 1
  32617. },
  32618. qO = Vo(),
  32619. KO = function (t) {
  32620. function e() {
  32621. var n = null !== t && t.apply(this, arguments) || this;
  32622. return n.type = e.type, n
  32623. }
  32624. return n(e, t), e.prototype.optionUpdated = function () {
  32625. this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0)
  32626. }, e.prototype.getInitialData = function (t, e) {
  32627. return _x(null, this)
  32628. }, e.prototype.getDataParams = function (e, n, i) {
  32629. var r = t.prototype.getDataParams.call(this, e, n);
  32630. return i && (r.info = qO(i).info), r
  32631. }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  32632. coordinateSystem: "cartesian2d",
  32633. z: 2,
  32634. legendHoverLink: !0,
  32635. clip: !1
  32636. }, e
  32637. }(bg);
  32638. function $O(t, e) {
  32639. return e = e || [0, 0], z(["x", "y"], (function (n, i) {
  32640. var r = this.getAxis(n),
  32641. o = e[i],
  32642. a = t[i] / 2;
  32643. return "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a))
  32644. }), this)
  32645. }
  32646. function JO(t, e) {
  32647. return e = e || [0, 0], z([0, 1], (function (n) {
  32648. var i = e[n],
  32649. r = t[n] / 2,
  32650. o = [],
  32651. a = [];
  32652. return o[n] = i - r, a[n] = i + r, o[1 - n] = a[1 - n] = e[1 - n], Math.abs(this.dataToPoint(o)[n] - this.dataToPoint(a)[n])
  32653. }), this)
  32654. }
  32655. function QO(t, e) {
  32656. var n = this.getAxis(),
  32657. i = e instanceof Array ? e[0] : e,
  32658. r = (t instanceof Array ? t[0] : t) / 2;
  32659. return "category" === n.type ? n.getBandWidth() : Math.abs(n.dataToCoord(i - r) - n.dataToCoord(i + r))
  32660. }
  32661. function tR(t, e) {
  32662. return e = e || [0, 0], z(["Radius", "Angle"], (function (n, i) {
  32663. var r = this["get" + n + "Axis"](),
  32664. o = e[i],
  32665. a = t[i] / 2,
  32666. s = "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a));
  32667. return "Angle" === n && (s = s * Math.PI / 180), s
  32668. }), this)
  32669. }
  32670. function eR(t, e, n, i) {
  32671. return t && (t.legacy || !1 !== t.legacy && !n && !i && "tspan" !== e && ("text" === e || _t(t, "text")))
  32672. }
  32673. function nR(t, e, n) {
  32674. var i, r, o, a = t;
  32675. if ("text" === e) o = a;
  32676. else {
  32677. o = {}, _t(a, "text") && (o.text = a.text), _t(a, "rich") && (o.rich = a.rich), _t(a, "textFill") && (o.fill = a.textFill), _t(a, "textStroke") && (o.stroke = a.textStroke), _t(a, "fontFamily") && (o.fontFamily = a.fontFamily), _t(a, "fontSize") && (o.fontSize = a.fontSize), _t(a, "fontStyle") && (o.fontStyle = a.fontStyle), _t(a, "fontWeight") && (o.fontWeight = a.fontWeight), r = {
  32678. type: "text",
  32679. style: o,
  32680. silent: !0
  32681. }, i = {};
  32682. var s = _t(a, "textPosition");
  32683. n ? i.position = s ? a.textPosition : "inside" : s && (i.position = a.textPosition), _t(a, "textPosition") && (i.position = a.textPosition), _t(a, "textOffset") && (i.offset = a.textOffset), _t(a, "textRotation") && (i.rotation = a.textRotation), _t(a, "textDistance") && (i.distance = a.textDistance)
  32684. }
  32685. return iR(o, t), E(o.rich, (function (t) {
  32686. iR(t, t)
  32687. })), {
  32688. textConfig: i,
  32689. textContent: r
  32690. }
  32691. }
  32692. function iR(t, e) {
  32693. e && (e.font = e.textFont || e.font, _t(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), _t(e, "textAlign") && (t.align = e.textAlign), _t(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), _t(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), _t(e, "textWidth") && (t.width = e.textWidth), _t(e, "textHeight") && (t.height = e.textHeight), _t(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), _t(e, "textPadding") && (t.padding = e.textPadding), _t(e, "textBorderColor") && (t.borderColor = e.textBorderColor), _t(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), _t(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), _t(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), _t(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), _t(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), _t(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY))
  32694. }
  32695. function rR(t, e, n) {
  32696. var i = t;
  32697. i.textPosition = i.textPosition || n.position || "inside", null != n.offset && (i.textOffset = n.offset), null != n.rotation && (i.textRotation = n.rotation), null != n.distance && (i.textDistance = n.distance);
  32698. var r = i.textPosition.indexOf("inside") >= 0,
  32699. o = t.fill || "#000";
  32700. oR(i, e);
  32701. var a = null == i.textFill;
  32702. return r ? a && (i.textFill = n.insideFill || "#fff", !i.textStroke && n.insideStroke && (i.textStroke = n.insideStroke), !i.textStroke && (i.textStroke = o), null == i.textStrokeWidth && (i.textStrokeWidth = 2)) : (a && (i.textFill = t.fill || n.outsideFill || "#000"), !i.textStroke && n.outsideStroke && (i.textStroke = n.outsideStroke)), i.text = e.text, i.rich = e.rich, E(e.rich, (function (t) {
  32703. oR(t, t)
  32704. })), i
  32705. }
  32706. function oR(t, e) {
  32707. e && (_t(e, "fill") && (t.textFill = e.fill), _t(e, "stroke") && (t.textStroke = e.fill), _t(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), _t(e, "font") && (t.font = e.font), _t(e, "fontStyle") && (t.fontStyle = e.fontStyle), _t(e, "fontWeight") && (t.fontWeight = e.fontWeight), _t(e, "fontSize") && (t.fontSize = e.fontSize), _t(e, "fontFamily") && (t.fontFamily = e.fontFamily), _t(e, "align") && (t.textAlign = e.align), _t(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), _t(e, "lineHeight") && (t.textLineHeight = e.lineHeight), _t(e, "width") && (t.textWidth = e.width), _t(e, "height") && (t.textHeight = e.height), _t(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), _t(e, "padding") && (t.textPadding = e.padding), _t(e, "borderColor") && (t.textBorderColor = e.borderColor), _t(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), _t(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), _t(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), _t(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), _t(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), _t(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), _t(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), _t(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), _t(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), _t(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY))
  32708. }
  32709. var aR = {
  32710. position: ["x", "y"],
  32711. scale: ["scaleX", "scaleY"],
  32712. origin: ["originX", "originY"]
  32713. },
  32714. sR = G(aR),
  32715. lR = (V(mr, (function (t, e) {
  32716. return t[e] = 1, t
  32717. }), {}), mr.join(", "), ["", "style", "shape", "extra"]),
  32718. uR = Vo();
  32719. function hR(t, e, n, i, r) {
  32720. var o = t + "Animation",
  32721. a = gh(t, i, r) || {},
  32722. s = uR(e).userDuring;
  32723. return a.duration > 0 && (a.during = s ? W(vR, {
  32724. el: e,
  32725. userDuring: s
  32726. }) : null, a.setToFinal = !0, a.scope = t), A(a, n[o]), a
  32727. }
  32728. function cR(t, e, n, i) {
  32729. var r = (i = i || {}).dataIndex,
  32730. o = i.isInit,
  32731. a = i.clearStyle,
  32732. s = n.isAnimationEnabled(),
  32733. l = uR(t),
  32734. u = e.style;
  32735. l.userDuring = e.during;
  32736. var h = {},
  32737. c = {};
  32738. if (function (t, e, n) {
  32739. for (var i = 0; i < sR.length; i++) {
  32740. var r = sR[i],
  32741. o = aR[r],
  32742. a = e[r];
  32743. a && (n[o[0]] = a[0], n[o[1]] = a[1])
  32744. }
  32745. for (i = 0; i < mr.length; i++) {
  32746. var s = mr[i];
  32747. null != e[s] && (n[s] = e[s])
  32748. }
  32749. }(0, e, c), xR("shape", e, c), xR("extra", e, c), !o && s && (function (t, e, n) {
  32750. for (var i = e.transition, r = fR(i) ? mr : To(i || []), o = 0; o < r.length; o++) {
  32751. var a = r[o];
  32752. if ("style" !== a && "shape" !== a && "extra" !== a) {
  32753. var s = t[a];
  32754. 0, n[a] = s
  32755. }
  32756. }
  32757. }(t, e, h), mR("shape", t, e, h), mR("extra", t, e, h), function (t, e, n, i) {
  32758. if (!n) return;
  32759. var r, o = t.style;
  32760. if (o) {
  32761. var a = n.transition,
  32762. s = e.transition;
  32763. if (a && !fR(a)) {
  32764. var l = To(a);
  32765. !r && (r = i.style = {});
  32766. for (var u = 0; u < l.length; u++) {
  32767. var h = o[f = l[u]];
  32768. r[f] = h
  32769. }
  32770. } else if (t.getAnimationStyleProps && (fR(s) || fR(a) || P(s, "style") >= 0)) {
  32771. var c = t.getAnimationStyleProps(),
  32772. p = c ? c.style : null;
  32773. if (p) {
  32774. !r && (r = i.style = {});
  32775. var d = G(n);
  32776. for (u = 0; u < d.length; u++) {
  32777. var f;
  32778. if (p[f = d[u]]) {
  32779. h = o[f];
  32780. r[f] = h
  32781. }
  32782. }
  32783. }
  32784. }
  32785. }
  32786. }(t, e, u, h)), c.style = u, function (t, e, n) {
  32787. var i = e.style;
  32788. if (!t.isGroup && i) {
  32789. if (n) {
  32790. t.useStyle({});
  32791. for (var r = t.animators, o = 0; o < r.length; o++) {
  32792. var a = r[o];
  32793. "style" === a.targetName && a.changeTarget(t.style)
  32794. }
  32795. }
  32796. t.setStyle(i)
  32797. }
  32798. e && (e.style = null, e && t.attr(e), e.style = i)
  32799. }(t, c, a), function (t, e) {
  32800. _t(e, "silent") && (t.silent = e.silent), _t(e, "ignore") && (t.ignore = e.ignore), t instanceof Da && _t(e, "invisible") && (t.invisible = e.invisible);
  32801. t instanceof ks && _t(e, "autoBatch") && (t.autoBatch = e.autoBatch)
  32802. }(t, e), s)
  32803. if (o) {
  32804. var p = {};
  32805. E(lR, (function (t) {
  32806. var n = t ? e[t] : e;
  32807. n && n.enterFrom && (t && (p[t] = p[t] || {}), A(t ? p[t] : p, n.enterFrom))
  32808. }));
  32809. var d = hR("enter", t, e, n, r);
  32810. d.duration > 0 && t.animateFrom(p, d)
  32811. } else ! function (t, e, n, i, r) {
  32812. if (r) {
  32813. var o = hR("update", t, e, i, n);
  32814. o.duration > 0 && t.animateFrom(r, o)
  32815. }
  32816. }(t, e, r || 0, n, h);
  32817. pR(t, e), u ? t.dirty() : t.markRedraw()
  32818. }
  32819. function pR(t, e) {
  32820. for (var n = uR(t).leaveToProps, i = 0; i < lR.length; i++) {
  32821. var r = lR[i],
  32822. o = r ? e[r] : e;
  32823. o && o.leaveTo && (n || (n = uR(t).leaveToProps = {}), r && (n[r] = n[r] || {}), A(r ? n[r] : n, o.leaveTo))
  32824. }
  32825. }
  32826. function dR(t, e, n, i) {
  32827. if (t) {
  32828. var r = t.parent,
  32829. o = uR(t).leaveToProps;
  32830. if (o) {
  32831. var a = hR("update", t, e, n, 0);
  32832. a.done = function () {
  32833. r.remove(t), i && i()
  32834. }, t.animateTo(o, a)
  32835. } else r.remove(t), i && i()
  32836. }
  32837. }
  32838. function fR(t) {
  32839. return "all" === t
  32840. }
  32841. var gR = {},
  32842. yR = {
  32843. setTransform: function (t, e) {
  32844. return gR.el[t] = e, this
  32845. },
  32846. getTransform: function (t) {
  32847. return gR.el[t]
  32848. },
  32849. setShape: function (t, e) {
  32850. var n = gR.el;
  32851. return (n.shape || (n.shape = {}))[t] = e, n.dirtyShape && n.dirtyShape(), this
  32852. },
  32853. getShape: function (t) {
  32854. var e = gR.el.shape;
  32855. if (e) return e[t]
  32856. },
  32857. setStyle: function (t, e) {
  32858. var n = gR.el,
  32859. i = n.style;
  32860. return i && (i[t] = e, n.dirtyStyle && n.dirtyStyle()), this
  32861. },
  32862. getStyle: function (t) {
  32863. var e = gR.el.style;
  32864. if (e) return e[t]
  32865. },
  32866. setExtra: function (t, e) {
  32867. return (gR.el.extra || (gR.el.extra = {}))[t] = e, this
  32868. },
  32869. getExtra: function (t) {
  32870. var e = gR.el.extra;
  32871. if (e) return e[t]
  32872. }
  32873. };
  32874. function vR() {
  32875. var t = this,
  32876. e = t.el;
  32877. if (e) {
  32878. var n = uR(e).userDuring,
  32879. i = t.userDuring;
  32880. n === i ? (gR.el = e, i(yR)) : t.el = t.userDuring = null
  32881. }
  32882. }
  32883. function mR(t, e, n, i) {
  32884. var r = n[t];
  32885. if (r) {
  32886. var o, a = e[t];
  32887. if (a) {
  32888. var s = n.transition,
  32889. l = r.transition;
  32890. if (l)
  32891. if (!o && (o = i[t] = {}), fR(l)) A(o, a);
  32892. else
  32893. for (var u = To(l), h = 0; h < u.length; h++) {
  32894. var c = a[d = u[h]];
  32895. o[d] = c
  32896. } else if (fR(s) || P(s, t) >= 0) {
  32897. !o && (o = i[t] = {});
  32898. var p = G(a);
  32899. for (h = 0; h < p.length; h++) {
  32900. var d;
  32901. c = a[d = p[h]];
  32902. _R(r[d], c) && (o[d] = c)
  32903. }
  32904. }
  32905. }
  32906. }
  32907. }
  32908. function xR(t, e, n) {
  32909. var i = e[t];
  32910. if (i)
  32911. for (var r = n[t] = {}, o = G(i), a = 0; a < o.length; a++) {
  32912. var s = o[a];
  32913. r[s] = Pi(i[s])
  32914. }
  32915. }
  32916. function _R(t, e) {
  32917. return N(t) ? t !== e : null != t && isFinite(t)
  32918. }
  32919. var bR = Vo(),
  32920. wR = ["percent", "easing", "shape", "style", "extra"];
  32921. function SR(t) {
  32922. t.stopAnimation("keyframe"), t.attr(bR(t))
  32923. }
  32924. function MR(t, e, n) {
  32925. if (n.isAnimationEnabled() && e)
  32926. if (Y(e)) E(e, (function (e) {
  32927. MR(t, e, n)
  32928. }));
  32929. else {
  32930. var i = e.keyframes,
  32931. r = e.duration;
  32932. if (n && null == r) {
  32933. var o = gh("enter", n, 0);
  32934. r = o && o.duration
  32935. }
  32936. if (i && r) {
  32937. var a = bR(t);
  32938. E(lR, (function (n) {
  32939. if (!n || t[n]) {
  32940. var o;
  32941. i.sort((function (t, e) {
  32942. return t.percent - e.percent
  32943. })), E(i, (function (i) {
  32944. var s = t.animators,
  32945. l = n ? i[n] : i;
  32946. if (l) {
  32947. var u = G(l);
  32948. if (n || (u = B(u, (function (t) {
  32949. return P(wR, t) < 0
  32950. }))), u.length) {
  32951. o || ((o = t.animate(n, e.loop, !0)).scope = "keyframe");
  32952. for (var h = 0; h < s.length; h++) s[h] !== o && s[h].targetName === o.targetName && s[h].stopTracks(u);
  32953. n && (a[n] = a[n] || {});
  32954. var c = n ? a[n] : a;
  32955. E(u, (function (e) {
  32956. c[e] = ((n ? t[n] : t) || {})[e]
  32957. })), o.whenWithKeys(r * i.percent, l, u, i.easing)
  32958. }
  32959. }
  32960. })), o && o.delay(e.delay || 0).duration(r).start(e.easing)
  32961. }
  32962. }))
  32963. }
  32964. }
  32965. }
  32966. var IR = "emphasis",
  32967. TR = "normal",
  32968. CR = "blur",
  32969. DR = "select",
  32970. AR = [TR, IR, CR, DR],
  32971. kR = {
  32972. normal: ["itemStyle"],
  32973. emphasis: [IR, "itemStyle"],
  32974. blur: [CR, "itemStyle"],
  32975. select: [DR, "itemStyle"]
  32976. },
  32977. LR = {
  32978. normal: ["label"],
  32979. emphasis: [IR, "label"],
  32980. blur: [CR, "label"],
  32981. select: [DR, "label"]
  32982. },
  32983. PR = ["x", "y"],
  32984. OR = {
  32985. normal: {},
  32986. emphasis: {},
  32987. blur: {},
  32988. select: {}
  32989. },
  32990. RR = {
  32991. cartesian2d: function (t) {
  32992. var e = t.master.getRect();
  32993. return {
  32994. coordSys: {
  32995. type: "cartesian2d",
  32996. x: e.x,
  32997. y: e.y,
  32998. width: e.width,
  32999. height: e.height
  33000. },
  33001. api: {
  33002. coord: function (e) {
  33003. return t.dataToPoint(e)
  33004. },
  33005. size: W($O, t)
  33006. }
  33007. }
  33008. },
  33009. geo: function (t) {
  33010. var e = t.getBoundingRect();
  33011. return {
  33012. coordSys: {
  33013. type: "geo",
  33014. x: e.x,
  33015. y: e.y,
  33016. width: e.width,
  33017. height: e.height,
  33018. zoom: t.getZoom()
  33019. },
  33020. api: {
  33021. coord: function (e) {
  33022. return t.dataToPoint(e)
  33023. },
  33024. size: W(JO, t)
  33025. }
  33026. }
  33027. },
  33028. single: function (t) {
  33029. var e = t.getRect();
  33030. return {
  33031. coordSys: {
  33032. type: "singleAxis",
  33033. x: e.x,
  33034. y: e.y,
  33035. width: e.width,
  33036. height: e.height
  33037. },
  33038. api: {
  33039. coord: function (e) {
  33040. return t.dataToPoint(e)
  33041. },
  33042. size: W(QO, t)
  33043. }
  33044. }
  33045. },
  33046. polar: function (t) {
  33047. var e = t.getRadiusAxis(),
  33048. n = t.getAngleAxis(),
  33049. i = e.getExtent();
  33050. return i[0] > i[1] && i.reverse(), {
  33051. coordSys: {
  33052. type: "polar",
  33053. cx: t.cx,
  33054. cy: t.cy,
  33055. r: i[1],
  33056. r0: i[0]
  33057. },
  33058. api: {
  33059. coord: function (i) {
  33060. var r = e.dataToRadius(i[0]),
  33061. o = n.dataToAngle(i[1]),
  33062. a = t.coordToPoint([r, o]);
  33063. return a.push(r, o * Math.PI / 180), a
  33064. },
  33065. size: W(tR, t)
  33066. }
  33067. }
  33068. },
  33069. calendar: function (t) {
  33070. var e = t.getRect(),
  33071. n = t.getRangeInfo();
  33072. return {
  33073. coordSys: {
  33074. type: "calendar",
  33075. x: e.x,
  33076. y: e.y,
  33077. width: e.width,
  33078. height: e.height,
  33079. cellWidth: t.getCellWidth(),
  33080. cellHeight: t.getCellHeight(),
  33081. rangeInfo: {
  33082. start: n.start,
  33083. end: n.end,
  33084. weeks: n.weeks,
  33085. dayCount: n.allDay
  33086. }
  33087. },
  33088. api: {
  33089. coord: function (e, n) {
  33090. return t.dataToPoint(e, n)
  33091. }
  33092. }
  33093. }
  33094. }
  33095. };
  33096. function NR(t) {
  33097. return t instanceof ks
  33098. }
  33099. function ER(t) {
  33100. return t instanceof Da
  33101. }
  33102. var zR = function (t) {
  33103. function e() {
  33104. var n = null !== t && t.apply(this, arguments) || this;
  33105. return n.type = e.type, n
  33106. }
  33107. return n(e, t), e.prototype.render = function (t, e, n, i) {
  33108. this._progressiveEls = null;
  33109. var r = this._data,
  33110. o = t.getData(),
  33111. a = this.group,
  33112. s = WR(t, o, e, n);
  33113. r || a.removeAll(), o.diff(r).add((function (e) {
  33114. YR(n, null, e, s(e, i), t, a, o)
  33115. })).remove((function (e) {
  33116. var n = r.getItemGraphicEl(e);
  33117. n && dR(n, qO(n).option, t)
  33118. })).update((function (e, l) {
  33119. var u = r.getItemGraphicEl(l);
  33120. YR(n, u, e, s(e, i), t, a, o)
  33121. })).execute();
  33122. var l = t.get("clip", !0) ? LS(t.coordinateSystem, !1, t) : null;
  33123. l ? a.setClipPath(l) : a.removeClipPath(), this._data = o
  33124. }, e.prototype.incrementalPrepareRender = function (t, e, n) {
  33125. this.group.removeAll(), this._data = null
  33126. }, e.prototype.incrementalRender = function (t, e, n, i, r) {
  33127. var o = e.getData(),
  33128. a = WR(e, o, n, i),
  33129. s = this._progressiveEls = [];
  33130. function l(t) {
  33131. t.isGroup || (t.incremental = !0, t.ensureState("emphasis").hoverLayer = !0)
  33132. }
  33133. for (var u = t.start; u < t.end; u++) {
  33134. var h = YR(null, null, u, a(u, r), e, this.group, o);
  33135. h && (h.traverse(l), s.push(h))
  33136. }
  33137. }, e.prototype.eachRendered = function (t) {
  33138. Jh(this._progressiveEls || this.group, t)
  33139. }, e.prototype.filterForExposedEvent = function (t, e, n, i) {
  33140. var r = e.element;
  33141. if (null == r || n.name === r) return !0;
  33142. for (;
  33143. (n = n.__hostTarget || n.parent) && n !== this.group;)
  33144. if (n.name === r) return !0;
  33145. return !1
  33146. }, e.type = "custom", e
  33147. }(Og);
  33148. function VR(t) {
  33149. var e, n = t.type;
  33150. if ("path" === n) {
  33151. var i = t.shape,
  33152. r = null != i.width && null != i.height ? {
  33153. x: i.x || 0,
  33154. y: i.y || 0,
  33155. width: i.width,
  33156. height: i.height
  33157. } : null,
  33158. o = tN(i);
  33159. e = Ph(o, null, r, i.layout || "center"), qO(e).customPathData = o
  33160. } else if ("image" === n) e = new Ns({}), qO(e).customImagePath = t.style.image;
  33161. else if ("text" === n) e = new Xs({});
  33162. else if ("group" === n) e = new Br;
  33163. else {
  33164. if ("compoundPath" === n) throw new Error('"compoundPath" is not supported yet.');
  33165. var a = Lh(n);
  33166. if (!a) {
  33167. var s = "";
  33168. 0, wo(s)
  33169. }
  33170. e = new a
  33171. }
  33172. return qO(e).customGraphicType = n, e.name = t.name, e.z2EmphasisLift = 1, e.z2SelectLift = 1, e
  33173. }
  33174. function BR(t, e, n, i, r, o, a) {
  33175. SR(e);
  33176. var s = r && r.normal.cfg;
  33177. s && e.setTextConfig(s), i && null == i.transition && (i.transition = PR);
  33178. var l = i && i.style;
  33179. if (l) {
  33180. if ("text" === e.type) {
  33181. var u = l;
  33182. _t(u, "textFill") && (u.fill = u.textFill), _t(u, "textStroke") && (u.stroke = u.textStroke)
  33183. }
  33184. var h = void 0,
  33185. c = NR(e) ? l.decal : null;
  33186. t && c && (c.dirty = !0, h = mv(c, t)), l.__decalPattern = h
  33187. }
  33188. ER(e) && (l && (h = l.__decalPattern) && (l.decal = h));
  33189. cR(e, i, o, {
  33190. dataIndex: n,
  33191. isInit: a,
  33192. clearStyle: !0
  33193. }), MR(e, i.keyframeAnimation, o)
  33194. }
  33195. function FR(t, e, n, i, r) {
  33196. var o = e.isGroup ? null : e,
  33197. a = r && r[t].cfg;
  33198. if (o) {
  33199. var s = o.ensureState(t);
  33200. if (!1 === i) {
  33201. var l = o.getState(t);
  33202. l && (l.style = null)
  33203. } else s.style = i || null;
  33204. a && (s.textConfig = a), kl(o)
  33205. }
  33206. }
  33207. function GR(t, e, n) {
  33208. var i = n === TR,
  33209. r = i ? e : jR(e, n),
  33210. o = r ? r.z2 : null;
  33211. null != o && ((i ? t : t.ensureState(n)).z2 = o || 0)
  33212. }
  33213. function WR(t, e, n, i) {
  33214. var r = t.get("renderItem"),
  33215. o = t.coordinateSystem,
  33216. a = {};
  33217. o && (a = o.prepareCustoms ? o.prepareCustoms(o) : RR[o.type](o));
  33218. for (var s, l, u = k({
  33219. getWidth: i.getWidth,
  33220. getHeight: i.getHeight,
  33221. getZr: i.getZr,
  33222. getDevicePixelRatio: i.getDevicePixelRatio,
  33223. value: function (t, n) {
  33224. return null == n && (n = s), e.getStore().get(e.getDimensionIndex(t || 0), n)
  33225. },
  33226. style: function (n, i) {
  33227. 0;
  33228. null == i && (i = s);
  33229. var r = e.getItemVisual(i, "style"),
  33230. o = r && r.fill,
  33231. a = r && r.opacity,
  33232. l = m(i, TR).getItemStyle();
  33233. null != o && (l.fill = o), null != a && (l.opacity = a);
  33234. var u = {
  33235. inheritColor: U(o) ? o : "#000"
  33236. },
  33237. h = x(i, TR),
  33238. c = oc(h, null, u, !1, !0);
  33239. c.text = h.getShallow("show") ? rt(t.getFormattedLabel(i, TR), cS(e, i)) : null;
  33240. var p = ac(h, u, !1);
  33241. return b(n, l), l = rR(l, c, p), n && _(l, n), l.legacy = !0, l
  33242. },
  33243. ordinalRawValue: function (t, n) {
  33244. null == n && (n = s), t = t || 0;
  33245. var i = e.getDimensionInfo(t);
  33246. if (!i) {
  33247. var r = e.getDimensionIndex(t);
  33248. return r >= 0 ? e.getStore().get(r, n) : void 0
  33249. }
  33250. var o = e.get(i.name, n),
  33251. a = i && i.ordinalMeta;
  33252. return a ? a.categories[o] : o
  33253. },
  33254. styleEmphasis: function (n, i) {
  33255. 0;
  33256. null == i && (i = s);
  33257. var r = m(i, IR).getItemStyle(),
  33258. o = x(i, IR),
  33259. a = oc(o, null, null, !0, !0);
  33260. a.text = o.getShallow("show") ? ot(t.getFormattedLabel(i, IR), t.getFormattedLabel(i, TR), cS(e, i)) : null;
  33261. var l = ac(o, null, !0);
  33262. return b(n, r), r = rR(r, a, l), n && _(r, n), r.legacy = !0, r
  33263. },
  33264. visual: function (t, n) {
  33265. if (null == n && (n = s), _t(ZO, t)) {
  33266. var i = e.getItemVisual(n, "style");
  33267. return i ? i[ZO[t]] : null
  33268. }
  33269. if (_t(jO, t)) return e.getItemVisual(n, t)
  33270. },
  33271. barLayout: function (t) {
  33272. if ("cartesian2d" === o.type) {
  33273. return function (t) {
  33274. var e = [],
  33275. n = t.axis,
  33276. i = "axis0";
  33277. if ("category" === n.type) {
  33278. for (var r = n.getBandWidth(), o = 0; o < t.count; o++) e.push(k({
  33279. bandWidth: r,
  33280. axisKey: i,
  33281. stackId: Fx + o
  33282. }, t));
  33283. var a = Xx(e),
  33284. s = [];
  33285. for (o = 0; o < t.count; o++) {
  33286. var l = a[i][Fx + o];
  33287. l.offsetCenter = l.offset + l.width / 2, s.push(l)
  33288. }
  33289. return s
  33290. }
  33291. }(k({
  33292. axis: o.getBaseAxis()
  33293. }, t))
  33294. }
  33295. },
  33296. currentSeriesIndices: function () {
  33297. return n.getCurrentSeriesIndices()
  33298. },
  33299. font: function (t) {
  33300. return cc(t, n)
  33301. }
  33302. }, a.api || {}), h = {
  33303. context: {},
  33304. seriesId: t.id,
  33305. seriesName: t.name,
  33306. seriesIndex: t.seriesIndex,
  33307. coordSys: a.coordSys,
  33308. dataInsideLength: e.count(),
  33309. encode: HR(t.getData())
  33310. }, c = {}, p = {}, d = {}, f = {}, g = 0; g < AR.length; g++) {
  33311. var y = AR[g];
  33312. d[y] = t.getModel(kR[y]), f[y] = t.getModel(LR[y])
  33313. }
  33314. function v(t) {
  33315. return t === s ? l || (l = e.getItemModel(t)) : e.getItemModel(t)
  33316. }
  33317. function m(t, n) {
  33318. return e.hasItemOption ? t === s ? c[n] || (c[n] = v(t).getModel(kR[n])) : v(t).getModel(kR[n]) : d[n]
  33319. }
  33320. function x(t, n) {
  33321. return e.hasItemOption ? t === s ? p[n] || (p[n] = v(t).getModel(LR[n])) : v(t).getModel(LR[n]) : f[n]
  33322. }
  33323. return function (t, n) {
  33324. return s = t, l = null, c = {}, p = {}, r && r(k({
  33325. dataIndexInside: t,
  33326. dataIndex: e.getRawIndex(t),
  33327. actionType: n ? n.type : null
  33328. }, h), u)
  33329. };
  33330. function _(t, e) {
  33331. for (var n in e) _t(e, n) && (t[n] = e[n])
  33332. }
  33333. function b(t, e) {
  33334. t && (t.textFill && (e.textFill = t.textFill), t.textPosition && (e.textPosition = t.textPosition))
  33335. }
  33336. }
  33337. function HR(t) {
  33338. var e = {};
  33339. return E(t.dimensions, (function (n) {
  33340. var i = t.getDimensionInfo(n);
  33341. if (!i.isExtraCoord) {
  33342. var r = i.coordDim;
  33343. (e[r] = e[r] || [])[i.coordDimIndex] = t.getDimensionIndex(n)
  33344. }
  33345. })), e
  33346. }
  33347. function YR(t, e, n, i, r, o, a) {
  33348. if (i) {
  33349. var s = XR(t, e, n, i, r, o);
  33350. return s && a.setItemGraphicEl(n, s), s && Zl(s, i.focus, i.blurScope, i.emphasisDisabled), s
  33351. }
  33352. o.remove(e)
  33353. }
  33354. function XR(t, e, n, i, r, o) {
  33355. var a = -1,
  33356. s = e;
  33357. e && UR(e, i, r) && (a = P(o.childrenRef(), e), e = null);
  33358. var l, u, h = !e,
  33359. c = e;
  33360. c ? c.clearStates() : (c = VR(i), s && (l = s, (u = c).copyTransform(l), ER(u) && ER(l) && (u.setStyle(l.style), u.z = l.z, u.z2 = l.z2, u.zlevel = l.zlevel, u.invisible = l.invisible, u.ignore = l.ignore, NR(u) && NR(l) && u.setShape(l.shape)))), !1 === i.morph ? c.disableMorphing = !0 : c.disableMorphing && (c.disableMorphing = !1), OR.normal.cfg = OR.normal.conOpt = OR.emphasis.cfg = OR.emphasis.conOpt = OR.blur.cfg = OR.blur.conOpt = OR.select.cfg = OR.select.conOpt = null, OR.isLegacy = !1,
  33361. function (t, e, n, i, r, o) {
  33362. if (t.isGroup) return;
  33363. ZR(n, null, o), ZR(n, IR, o);
  33364. var a = o.normal.conOpt,
  33365. s = o.emphasis.conOpt,
  33366. l = o.blur.conOpt,
  33367. u = o.select.conOpt;
  33368. if (null != a || null != s || null != u || null != l) {
  33369. var h = t.getTextContent();
  33370. if (!1 === a) h && t.removeTextContent();
  33371. else {
  33372. a = o.normal.conOpt = a || {
  33373. type: "text"
  33374. }, h ? h.clearStates() : (h = VR(a), t.setTextContent(h)), BR(null, h, e, a, null, i, r);
  33375. for (var c = a && a.style, p = 0; p < AR.length; p++) {
  33376. var d = AR[p];
  33377. if (d !== TR) {
  33378. var f = o[d].conOpt;
  33379. FR(d, h, 0, qR(a, f, d), null)
  33380. }
  33381. }
  33382. c ? h.dirty() : h.markRedraw()
  33383. }
  33384. }
  33385. }(c, n, i, r, h, OR),
  33386. function (t, e, n, i, r) {
  33387. var o = n.clipPath;
  33388. if (!1 === o) t && t.getClipPath() && t.removeClipPath();
  33389. else if (o) {
  33390. var a = t.getClipPath();
  33391. a && UR(a, o, i) && (a = null), a || (a = VR(o), t.setClipPath(a)), BR(null, a, e, o, null, i, r)
  33392. }
  33393. }(c, n, i, r, h), BR(t, c, n, i, OR, r, h), _t(i, "info") && (qO(c).info = i.info);
  33394. for (var p = 0; p < AR.length; p++) {
  33395. var d = AR[p];
  33396. if (d !== TR) {
  33397. var f = jR(i, d);
  33398. FR(d, c, 0, qR(i, f, d), OR)
  33399. }
  33400. }
  33401. return function (t, e, n) {
  33402. if (!t.isGroup) {
  33403. var i = t,
  33404. r = n.currentZ,
  33405. o = n.currentZLevel;
  33406. i.z = r, i.zlevel = o;
  33407. var a = e.z2;
  33408. null != a && (i.z2 = a || 0);
  33409. for (var s = 0; s < AR.length; s++) GR(i, e, AR[s])
  33410. }
  33411. }(c, i, r), "group" === i.type && function (t, e, n, i, r) {
  33412. var o = i.children,
  33413. a = o ? o.length : 0,
  33414. s = i.$mergeChildren,
  33415. l = "byName" === s || i.diffChildrenByName,
  33416. u = !1 === s;
  33417. if (!a && !l && !u) return;
  33418. if (l) return h = {
  33419. api: t,
  33420. oldChildren: e.children() || [],
  33421. newChildren: o || [],
  33422. dataIndex: n,
  33423. seriesModel: r,
  33424. group: e
  33425. }, void new Gm(h.oldChildren, h.newChildren, $R, $R, h).add(JR).update(JR).remove(QR).execute();
  33426. var h;
  33427. u && e.removeAll();
  33428. for (var c = 0; c < a; c++) {
  33429. var p = o[c],
  33430. d = e.childAt(c);
  33431. p ? (null == p.ignore && (p.ignore = !1), XR(t, d, n, p, r, e)) : d.ignore = !0
  33432. }
  33433. for (var f = e.childCount() - 1; f >= c; f--) {
  33434. var g = e.childAt(f);
  33435. KR(e, g, r)
  33436. }
  33437. }(t, c, n, i, r), a >= 0 ? o.replaceAt(c, a) : o.add(c), c
  33438. }
  33439. function UR(t, e, n) {
  33440. var i, r = qO(t),
  33441. o = e.type,
  33442. a = e.shape,
  33443. s = e.style;
  33444. return n.isUniversalTransitionEnabled() || null != o && o !== r.customGraphicType || "path" === o && ((i = a) && (_t(i, "pathData") || _t(i, "d"))) && tN(a) !== r.customPathData || "image" === o && _t(s, "image") && s.image !== r.customImagePath
  33445. }
  33446. function ZR(t, e, n) {
  33447. var i = e ? jR(t, e) : t,
  33448. r = e ? qR(t, i, IR) : t.style,
  33449. o = t.type,
  33450. a = i ? i.textConfig : null,
  33451. s = t.textContent,
  33452. l = s ? e ? jR(s, e) : s : null;
  33453. if (r && (n.isLegacy || eR(r, o, !!a, !!l))) {
  33454. n.isLegacy = !0;
  33455. var u = nR(r, o, !e);
  33456. !a && u.textConfig && (a = u.textConfig), !l && u.textContent && (l = u.textContent)
  33457. }
  33458. if (!e && l) {
  33459. var h = l;
  33460. !h.type && (h.type = "text")
  33461. }
  33462. var c = e ? n[e] : n.normal;
  33463. c.cfg = a, c.conOpt = l
  33464. }
  33465. function jR(t, e) {
  33466. return e ? t ? t[e] : null : t
  33467. }
  33468. function qR(t, e, n) {
  33469. var i = e && e.style;
  33470. return null == i && n === IR && t && (i = t.styleEmphasis), i
  33471. }
  33472. function KR(t, e, n) {
  33473. e && dR(e, qO(t).option, n)
  33474. }
  33475. function $R(t, e) {
  33476. var n = t && t.name;
  33477. return null != n ? n : "e\0\0" + e
  33478. }
  33479. function JR(t, e) {
  33480. var n = this.context,
  33481. i = null != t ? n.newChildren[t] : null,
  33482. r = null != e ? n.oldChildren[e] : null;
  33483. XR(n.api, r, n.dataIndex, i, n.seriesModel, n.group)
  33484. }
  33485. function QR(t) {
  33486. var e = this.context,
  33487. n = e.oldChildren[t];
  33488. n && dR(n, qO(n).option, e.seriesModel)
  33489. }
  33490. function tN(t) {
  33491. return t && (t.pathData || t.d)
  33492. }
  33493. var eN = Vo(),
  33494. nN = T,
  33495. iN = W,
  33496. rN = function () {
  33497. function t() {
  33498. this._dragging = !1, this.animationThreshold = 15
  33499. }
  33500. return t.prototype.render = function (t, e, n, i) {
  33501. var r = e.get("value"),
  33502. o = e.get("status");
  33503. if (this._axisModel = t, this._axisPointerModel = e, this._api = n, i || this._lastValue !== r || this._lastStatus !== o) {
  33504. this._lastValue = r, this._lastStatus = o;
  33505. var a = this._group,
  33506. s = this._handle;
  33507. if (!o || "hide" === o) return a && a.hide(), void(s && s.hide());
  33508. a && a.show(), s && s.show();
  33509. var l = {};
  33510. this.makeElOption(l, r, t, e, n);
  33511. var u = l.graphicKey;
  33512. u !== this._lastGraphicKey && this.clear(n), this._lastGraphicKey = u;
  33513. var h = this._moveAnimation = this.determineAnimation(t, e);
  33514. if (a) {
  33515. var c = H(oN, e, h);
  33516. this.updatePointerEl(a, l, c), this.updateLabelEl(a, l, c, e)
  33517. } else a = this._group = new Br, this.createPointerEl(a, l, t, e), this.createLabelEl(a, l, t, e), n.getZr().add(a);
  33518. uN(a, e, !0), this._renderHandle(r)
  33519. }
  33520. }, t.prototype.remove = function (t) {
  33521. this.clear(t)
  33522. }, t.prototype.dispose = function (t) {
  33523. this.clear(t)
  33524. }, t.prototype.determineAnimation = function (t, e) {
  33525. var n = e.get("animation"),
  33526. i = t.axis,
  33527. r = "category" === i.type,
  33528. o = e.get("snap");
  33529. if (!o && !r) return !1;
  33530. if ("auto" === n || null == n) {
  33531. var a = this.animationThreshold;
  33532. if (r && i.getBandWidth() > a) return !0;
  33533. if (o) {
  33534. var s = _I(t).seriesDataCount,
  33535. l = i.getExtent();
  33536. return Math.abs(l[0] - l[1]) / s > a
  33537. }
  33538. return !1
  33539. }
  33540. return !0 === n
  33541. }, t.prototype.makeElOption = function (t, e, n, i, r) {}, t.prototype.createPointerEl = function (t, e, n, i) {
  33542. var r = e.pointer;
  33543. if (r) {
  33544. var o = eN(t).pointerEl = new Qh[r.type](nN(e.pointer));
  33545. t.add(o)
  33546. }
  33547. }, t.prototype.createLabelEl = function (t, e, n, i) {
  33548. if (e.label) {
  33549. var r = eN(t).labelEl = new Xs(nN(e.label));
  33550. t.add(r), sN(r, i)
  33551. }
  33552. }, t.prototype.updatePointerEl = function (t, e, n) {
  33553. var i = eN(t).pointerEl;
  33554. i && e.pointer && (i.setStyle(e.pointer.style), n(i, {
  33555. shape: e.pointer.shape
  33556. }))
  33557. }, t.prototype.updateLabelEl = function (t, e, n, i) {
  33558. var r = eN(t).labelEl;
  33559. r && (r.setStyle(e.label.style), n(r, {
  33560. x: e.label.x,
  33561. y: e.label.y
  33562. }), sN(r, i))
  33563. }, t.prototype._renderHandle = function (t) {
  33564. if (!this._dragging && this.updateHandleTransform) {
  33565. var e, n = this._axisPointerModel,
  33566. i = this._api.getZr(),
  33567. r = this._handle,
  33568. o = n.getModel("handle"),
  33569. a = n.get("status");
  33570. if (!o.get("show") || !a || "hide" === a) return r && i.remove(r), void(this._handle = null);
  33571. this._handle || (e = !0, r = this._handle = Uh(o.get("icon"), {
  33572. cursor: "move",
  33573. draggable: !0,
  33574. onmousemove: function (t) {
  33575. de(t.event)
  33576. },
  33577. onmousedown: iN(this._onHandleDragMove, this, 0, 0),
  33578. drift: iN(this._onHandleDragMove, this),
  33579. ondragend: iN(this._onHandleDragEnd, this)
  33580. }), i.add(r)), uN(r, n, !1), r.setStyle(o.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  33581. var s = o.get("size");
  33582. Y(s) || (s = [s, s]), r.scaleX = s[0] / 2, r.scaleY = s[1] / 2, Hg(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, e)
  33583. }
  33584. }, t.prototype._moveHandleToValue = function (t, e) {
  33585. oN(this._axisPointerModel, !e && this._moveAnimation, this._handle, lN(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)))
  33586. }, t.prototype._onHandleDragMove = function (t, e) {
  33587. var n = this._handle;
  33588. if (n) {
  33589. this._dragging = !0;
  33590. var i = this.updateHandleTransform(lN(n), [t, e], this._axisModel, this._axisPointerModel);
  33591. this._payloadInfo = i, n.stopAnimation(), n.attr(lN(i)), eN(n).lastProp = null, this._doDispatchAxisPointer()
  33592. }
  33593. }, t.prototype._doDispatchAxisPointer = function () {
  33594. if (this._handle) {
  33595. var t = this._payloadInfo,
  33596. e = this._axisModel;
  33597. this._api.dispatchAction({
  33598. type: "updateAxisPointer",
  33599. x: t.cursorPoint[0],
  33600. y: t.cursorPoint[1],
  33601. tooltipOption: t.tooltipOption,
  33602. axesInfo: [{
  33603. axisDim: e.axis.dim,
  33604. axisIndex: e.componentIndex
  33605. }]
  33606. })
  33607. }
  33608. }, t.prototype._onHandleDragEnd = function () {
  33609. if (this._dragging = !1, this._handle) {
  33610. var t = this._axisPointerModel.get("value");
  33611. this._moveHandleToValue(t), this._api.dispatchAction({
  33612. type: "hideTip"
  33613. })
  33614. }
  33615. }, t.prototype.clear = function (t) {
  33616. this._lastValue = null, this._lastStatus = null;
  33617. var e = t.getZr(),
  33618. n = this._group,
  33619. i = this._handle;
  33620. e && n && (this._lastGraphicKey = null, n && e.remove(n), i && e.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), Yg(this, "_doDispatchAxisPointer")
  33621. }, t.prototype.doClear = function () {}, t.prototype.buildLabel = function (t, e, n) {
  33622. return {
  33623. x: t[n = n || 0],
  33624. y: t[1 - n],
  33625. width: e[n],
  33626. height: e[1 - n]
  33627. }
  33628. }, t
  33629. }();
  33630. function oN(t, e, n, i) {
  33631. aN(eN(n).lastProp, i) || (eN(n).lastProp = i, e ? vh(n, i, t) : (n.stopAnimation(), n.attr(i)))
  33632. }
  33633. function aN(t, e) {
  33634. if (q(t) && q(e)) {
  33635. var n = !0;
  33636. return E(e, (function (e, i) {
  33637. n = n && aN(t[i], e)
  33638. })), !!n
  33639. }
  33640. return t === e
  33641. }
  33642. function sN(t, e) {
  33643. t[e.get(["label", "show"]) ? "show" : "hide"]()
  33644. }
  33645. function lN(t) {
  33646. return {
  33647. x: t.x || 0,
  33648. y: t.y || 0,
  33649. rotation: t.rotation || 0
  33650. }
  33651. }
  33652. function uN(t, e, n) {
  33653. var i = e.get("z"),
  33654. r = e.get("zlevel");
  33655. t && t.traverse((function (t) {
  33656. "group" !== t.type && (null != i && (t.z = i), null != r && (t.zlevel = r), t.silent = n)
  33657. }))
  33658. }
  33659. function hN(t) {
  33660. var e, n = t.get("type"),
  33661. i = t.getModel(n + "Style");
  33662. return "line" === n ? (e = i.getLineStyle()).fill = null : "shadow" === n && ((e = i.getAreaStyle()).stroke = null), e
  33663. }
  33664. function cN(t, e, n, i, r) {
  33665. var o = pN(n.get("value"), e.axis, e.ecModel, n.get("seriesDataIndices"), {
  33666. precision: n.get(["label", "precision"]),
  33667. formatter: n.get(["label", "formatter"])
  33668. }),
  33669. a = n.getModel("label"),
  33670. s = vp(a.get("padding") || 0),
  33671. l = a.getFont(),
  33672. u = Sr(o, l),
  33673. h = r.position,
  33674. c = u.width + s[1] + s[3],
  33675. p = u.height + s[0] + s[2],
  33676. d = r.align;
  33677. "right" === d && (h[0] -= c), "center" === d && (h[0] -= c / 2);
  33678. var f = r.verticalAlign;
  33679. "bottom" === f && (h[1] -= p), "middle" === f && (h[1] -= p / 2),
  33680. function (t, e, n, i) {
  33681. var r = i.getWidth(),
  33682. o = i.getHeight();
  33683. t[0] = Math.min(t[0] + e, r) - e, t[1] = Math.min(t[1] + n, o) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0)
  33684. }(h, c, p, i);
  33685. var g = a.get("backgroundColor");
  33686. g && "auto" !== g || (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
  33687. x: h[0],
  33688. y: h[1],
  33689. style: oc(a, {
  33690. text: o,
  33691. font: l,
  33692. fill: a.getTextColor(),
  33693. padding: s,
  33694. backgroundColor: g
  33695. }),
  33696. z2: 10
  33697. }
  33698. }
  33699. function pN(t, e, n, i, r) {
  33700. t = e.scale.parse(t);
  33701. var o = e.scale.getLabel({
  33702. value: t
  33703. }, {
  33704. precision: r.precision
  33705. }),
  33706. a = r.formatter;
  33707. if (a) {
  33708. var s = {
  33709. value: S_(e, {
  33710. value: t
  33711. }),
  33712. axisDimension: e.dim,
  33713. axisIndex: e.index,
  33714. seriesData: []
  33715. };
  33716. E(i, (function (t) {
  33717. var e = n.getSeriesByIndex(t.seriesIndex),
  33718. i = t.dataIndexInside,
  33719. r = e && e.getDataParams(i);
  33720. r && s.seriesData.push(r)
  33721. })), U(a) ? o = a.replace("{value}", o) : X(a) && (o = a(s))
  33722. }
  33723. return o
  33724. }
  33725. function dN(t, e, n) {
  33726. var i = [1, 0, 0, 1, 0, 0];
  33727. return Se(i, i, n.rotation), we(i, i, n.position), Fh([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], i)
  33728. }
  33729. function fN(t, e, n, i, r, o) {
  33730. var a = cI.innerTextLayout(n.rotation, 0, n.labelDirection);
  33731. n.labelMargin = r.get(["label", "margin"]), cN(e, i, r, o, {
  33732. position: dN(i.axis, t, n),
  33733. align: a.textAlign,
  33734. verticalAlign: a.textVerticalAlign
  33735. })
  33736. }
  33737. function gN(t, e, n) {
  33738. return {
  33739. x1: t[n = n || 0],
  33740. y1: t[1 - n],
  33741. x2: e[n],
  33742. y2: e[1 - n]
  33743. }
  33744. }
  33745. function yN(t, e, n) {
  33746. return {
  33747. x: t[n = n || 0],
  33748. y: t[1 - n],
  33749. width: e[n],
  33750. height: e[1 - n]
  33751. }
  33752. }
  33753. function vN(t, e, n, i, r, o) {
  33754. return {
  33755. cx: t,
  33756. cy: e,
  33757. r0: n,
  33758. r: i,
  33759. startAngle: r,
  33760. endAngle: o,
  33761. clockwise: !0
  33762. }
  33763. }
  33764. var mN = function (t) {
  33765. function e() {
  33766. return null !== t && t.apply(this, arguments) || this
  33767. }
  33768. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  33769. var o = n.axis,
  33770. a = o.grid,
  33771. s = i.get("type"),
  33772. l = xN(a, o).getOtherAxis(o).getGlobalExtent(),
  33773. u = o.toGlobalCoord(o.dataToCoord(e, !0));
  33774. if (s && "none" !== s) {
  33775. var h = hN(i),
  33776. c = _N[s](o, u, l);
  33777. c.style = h, t.graphicKey = c.type, t.pointer = c
  33778. }
  33779. fN(e, t, eI(a.model, n), n, i, r)
  33780. }, e.prototype.getHandleTransform = function (t, e, n) {
  33781. var i = eI(e.axis.grid.model, e, {
  33782. labelInside: !1
  33783. });
  33784. i.labelMargin = n.get(["handle", "margin"]);
  33785. var r = dN(e.axis, t, i);
  33786. return {
  33787. x: r[0],
  33788. y: r[1],
  33789. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  33790. }
  33791. }, e.prototype.updateHandleTransform = function (t, e, n, i) {
  33792. var r = n.axis,
  33793. o = r.grid,
  33794. a = r.getGlobalExtent(!0),
  33795. s = xN(o, r).getOtherAxis(r).getGlobalExtent(),
  33796. l = "x" === r.dim ? 0 : 1,
  33797. u = [t.x, t.y];
  33798. u[l] += e[l], u[l] = Math.min(a[1], u[l]), u[l] = Math.max(a[0], u[l]);
  33799. var h = (s[1] + s[0]) / 2,
  33800. c = [h, h];
  33801. c[l] = u[l];
  33802. return {
  33803. x: u[0],
  33804. y: u[1],
  33805. rotation: t.rotation,
  33806. cursorPoint: c,
  33807. tooltipOption: [{
  33808. verticalAlign: "middle"
  33809. }, {
  33810. align: "center"
  33811. }][l]
  33812. }
  33813. }, e
  33814. }(rN);
  33815. function xN(t, e) {
  33816. var n = {};
  33817. return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n)
  33818. }
  33819. var _N = {
  33820. line: function (t, e, n) {
  33821. return {
  33822. type: "Line",
  33823. subPixelOptimize: !0,
  33824. shape: gN([e, n[0]], [e, n[1]], bN(t))
  33825. }
  33826. },
  33827. shadow: function (t, e, n) {
  33828. var i = Math.max(1, t.getBandWidth()),
  33829. r = n[1] - n[0];
  33830. return {
  33831. type: "Rect",
  33832. shape: yN([e - i / 2, n[0]], [i, r], bN(t))
  33833. }
  33834. }
  33835. };
  33836. function bN(t) {
  33837. return "x" === t.dim ? 0 : 1
  33838. }
  33839. var wN = function (t) {
  33840. function e() {
  33841. var n = null !== t && t.apply(this, arguments) || this;
  33842. return n.type = e.type, n
  33843. }
  33844. return n(e, t), e.type = "axisPointer", e.defaultOption = {
  33845. show: "auto",
  33846. z: 50,
  33847. type: "line",
  33848. snap: !1,
  33849. triggerTooltip: !0,
  33850. triggerEmphasis: !0,
  33851. value: null,
  33852. status: null,
  33853. link: [],
  33854. animation: null,
  33855. animationDurationUpdate: 200,
  33856. lineStyle: {
  33857. color: "#B9BEC9",
  33858. width: 1,
  33859. type: "dashed"
  33860. },
  33861. shadowStyle: {
  33862. color: "rgba(210,219,238,0.2)"
  33863. },
  33864. label: {
  33865. show: !0,
  33866. formatter: null,
  33867. precision: "auto",
  33868. margin: 3,
  33869. color: "#fff",
  33870. padding: [5, 7, 5, 7],
  33871. backgroundColor: "auto",
  33872. borderColor: null,
  33873. borderWidth: 0,
  33874. borderRadius: 3
  33875. },
  33876. handle: {
  33877. show: !1,
  33878. icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
  33879. size: 45,
  33880. margin: 50,
  33881. color: "#333",
  33882. shadowBlur: 3,
  33883. shadowColor: "#aaa",
  33884. shadowOffsetX: 0,
  33885. shadowOffsetY: 2,
  33886. throttle: 40
  33887. }
  33888. }, e
  33889. }(zp),
  33890. SN = Vo(),
  33891. MN = E;
  33892. function IN(t, e, n) {
  33893. if (!r.node) {
  33894. var i = e.getZr();
  33895. SN(i).records || (SN(i).records = {}),
  33896. function (t, e) {
  33897. if (SN(t).initialized) return;
  33898. function n(n, i) {
  33899. t.on(n, (function (n) {
  33900. var r = function (t) {
  33901. var e = {
  33902. showTip: [],
  33903. hideTip: []
  33904. },
  33905. n = function (i) {
  33906. var r = e[i.type];
  33907. r ? r.push(i) : (i.dispatchAction = n, t.dispatchAction(i))
  33908. };
  33909. return {
  33910. dispatchAction: n,
  33911. pendings: e
  33912. }
  33913. }(e);
  33914. MN(SN(t).records, (function (t) {
  33915. t && i(t, n, r.dispatchAction)
  33916. })),
  33917. function (t, e) {
  33918. var n, i = t.showTip.length,
  33919. r = t.hideTip.length;
  33920. i ? n = t.showTip[i - 1] : r && (n = t.hideTip[r - 1]);
  33921. n && (n.dispatchAction = null, e.dispatchAction(n))
  33922. }(r.pendings, e)
  33923. }))
  33924. }
  33925. SN(t).initialized = !0, n("click", H(CN, "click")), n("mousemove", H(CN, "mousemove")), n("globalout", TN)
  33926. }(i, e), (SN(i).records[t] || (SN(i).records[t] = {})).handler = n
  33927. }
  33928. }
  33929. function TN(t, e, n) {
  33930. t.handler("leave", null, n)
  33931. }
  33932. function CN(t, e, n, i) {
  33933. e.handler(t, n, i)
  33934. }
  33935. function DN(t, e) {
  33936. if (!r.node) {
  33937. var n = e.getZr();
  33938. (SN(n).records || {})[t] && (SN(n).records[t] = null)
  33939. }
  33940. }
  33941. var AN = function (t) {
  33942. function e() {
  33943. var n = null !== t && t.apply(this, arguments) || this;
  33944. return n.type = e.type, n
  33945. }
  33946. return n(e, t), e.prototype.render = function (t, e, n) {
  33947. var i = e.getComponent("tooltip"),
  33948. r = t.get("triggerOn") || i && i.get("triggerOn") || "mousemove|click";
  33949. IN("axisPointer", n, (function (t, e, n) {
  33950. "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && n({
  33951. type: "updateAxisPointer",
  33952. currTrigger: t,
  33953. x: e && e.offsetX,
  33954. y: e && e.offsetY
  33955. })
  33956. }))
  33957. }, e.prototype.remove = function (t, e) {
  33958. DN("axisPointer", e)
  33959. }, e.prototype.dispose = function (t, e) {
  33960. DN("axisPointer", e)
  33961. }, e.type = "axisPointer", e
  33962. }(Ag);
  33963. function kN(t, e) {
  33964. var n, i = [],
  33965. r = t.seriesIndex;
  33966. if (null == r || !(n = e.getSeriesByIndex(r))) return {
  33967. point: []
  33968. };
  33969. var o = n.getData(),
  33970. a = zo(o, t);
  33971. if (null == a || a < 0 || Y(a)) return {
  33972. point: []
  33973. };
  33974. var s = o.getItemGraphicEl(a),
  33975. l = n.coordinateSystem;
  33976. if (n.getTooltipPosition) i = n.getTooltipPosition(a) || [];
  33977. else if (l && l.dataToPoint)
  33978. if (t.isStacked) {
  33979. var u = l.getBaseAxis(),
  33980. h = l.getOtherAxis(u).dim,
  33981. c = u.dim,
  33982. p = "x" === h || "radius" === h ? 1 : 0,
  33983. d = o.mapDimension(c),
  33984. f = [];
  33985. f[p] = o.get(d, a), f[1 - p] = o.get(o.getCalculationInfo("stackResultDimension"), a), i = l.dataToPoint(f) || []
  33986. } else i = l.dataToPoint(o.getValues(z(l.dimensions, (function (t) {
  33987. return o.mapDimension(t)
  33988. })), a)) || [];
  33989. else if (s) {
  33990. var g = s.getBoundingRect().clone();
  33991. g.applyTransform(s.transform), i = [g.x + g.width / 2, g.y + g.height / 2]
  33992. }
  33993. return {
  33994. point: i,
  33995. el: s
  33996. }
  33997. }
  33998. var LN = Vo();
  33999. function PN(t, e, n) {
  34000. var i = t.currTrigger,
  34001. r = [t.x, t.y],
  34002. o = t,
  34003. a = t.dispatchAction || W(n.dispatchAction, n),
  34004. s = e.getComponent("axisPointer").coordSysAxesInfo;
  34005. if (s) {
  34006. zN(r) && (r = kN({
  34007. seriesIndex: o.seriesIndex,
  34008. dataIndex: o.dataIndex
  34009. }, e).point);
  34010. var l = zN(r),
  34011. u = o.axesInfo,
  34012. h = s.axesInfo,
  34013. c = "leave" === i || zN(r),
  34014. p = {},
  34015. d = {},
  34016. f = {
  34017. list: [],
  34018. map: {}
  34019. },
  34020. g = {
  34021. showPointer: H(RN, d),
  34022. showTooltip: H(NN, f)
  34023. };
  34024. E(s.coordSysMap, (function (t, e) {
  34025. var n = l || t.containPoint(r);
  34026. E(s.coordSysAxesInfo[e], (function (t, e) {
  34027. var i = t.axis,
  34028. o = function (t, e) {
  34029. for (var n = 0; n < (t || []).length; n++) {
  34030. var i = t[n];
  34031. if (e.axis.dim === i.axisDim && e.axis.model.componentIndex === i.axisIndex) return i
  34032. }
  34033. }(u, t);
  34034. if (!c && n && (!u || o)) {
  34035. var a = o && o.value;
  34036. null != a || l || (a = i.pointToData(r)), null != a && ON(t, a, g, !1, p)
  34037. }
  34038. }))
  34039. }));
  34040. var y = {};
  34041. return E(h, (function (t, e) {
  34042. var n = t.linkGroup;
  34043. n && !d[e] && E(n.axesInfo, (function (e, i) {
  34044. var r = d[i];
  34045. if (e !== t && r) {
  34046. var o = r.value;
  34047. n.mapper && (o = t.axis.scale.parse(n.mapper(o, EN(e), EN(t)))), y[t.key] = o
  34048. }
  34049. }))
  34050. })), E(y, (function (t, e) {
  34051. ON(h[e], t, g, !0, p)
  34052. })),
  34053. function (t, e, n) {
  34054. var i = n.axesInfo = [];
  34055. E(e, (function (e, n) {
  34056. var r = e.axisPointerModel.option,
  34057. o = t[n];
  34058. o ? (!e.useHandle && (r.status = "show"), r.value = o.value, r.seriesDataIndices = (o.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && i.push({
  34059. axisDim: e.axis.dim,
  34060. axisIndex: e.axis.model.componentIndex,
  34061. value: r.value
  34062. })
  34063. }))
  34064. }(d, h, p),
  34065. function (t, e, n, i) {
  34066. if (zN(e) || !t.list.length) return void i({
  34067. type: "hideTip"
  34068. });
  34069. var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  34070. i({
  34071. type: "showTip",
  34072. escapeConnect: !0,
  34073. x: e[0],
  34074. y: e[1],
  34075. tooltipOption: n.tooltipOption,
  34076. position: n.position,
  34077. dataIndexInside: r.dataIndexInside,
  34078. dataIndex: r.dataIndex,
  34079. seriesIndex: r.seriesIndex,
  34080. dataByCoordSys: t.list
  34081. })
  34082. }(f, r, t, a),
  34083. function (t, e, n) {
  34084. var i = n.getZr(),
  34085. r = "axisPointerLastHighlights",
  34086. o = LN(i)[r] || {},
  34087. a = LN(i)[r] = {};
  34088. E(t, (function (t, e) {
  34089. var n = t.axisPointerModel.option;
  34090. "show" === n.status && t.triggerEmphasis && E(n.seriesDataIndices, (function (t) {
  34091. var e = t.seriesIndex + " | " + t.dataIndex;
  34092. a[e] = t
  34093. }))
  34094. }));
  34095. var s = [],
  34096. l = [];
  34097. E(o, (function (t, e) {
  34098. !a[e] && l.push(t)
  34099. })), E(a, (function (t, e) {
  34100. !o[e] && s.push(t)
  34101. })), l.length && n.dispatchAction({
  34102. type: "downplay",
  34103. escapeConnect: !0,
  34104. notBlur: !0,
  34105. batch: l
  34106. }), s.length && n.dispatchAction({
  34107. type: "highlight",
  34108. escapeConnect: !0,
  34109. notBlur: !0,
  34110. batch: s
  34111. })
  34112. }(h, 0, n), p
  34113. }
  34114. }
  34115. function ON(t, e, n, i, r) {
  34116. var o = t.axis;
  34117. if (!o.scale.isBlank() && o.containData(e))
  34118. if (t.involveSeries) {
  34119. var a = function (t, e) {
  34120. var n = e.axis,
  34121. i = n.dim,
  34122. r = t,
  34123. o = [],
  34124. a = Number.MAX_VALUE,
  34125. s = -1;
  34126. return E(e.seriesModels, (function (e, l) {
  34127. var u, h, c = e.getData().mapDimensionsAll(i);
  34128. if (e.getAxisTooltipData) {
  34129. var p = e.getAxisTooltipData(c, t, n);
  34130. h = p.dataIndices, u = p.nestestValue
  34131. } else {
  34132. if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === n.type ? .5 : null)).length) return;
  34133. u = e.getData().get(c[0], h[0])
  34134. }
  34135. if (null != u && isFinite(u)) {
  34136. var d = t - u,
  34137. f = Math.abs(d);
  34138. f <= a && ((f < a || d >= 0 && s < 0) && (a = f, s = d, r = u, o.length = 0), E(h, (function (t) {
  34139. o.push({
  34140. seriesIndex: e.seriesIndex,
  34141. dataIndexInside: t,
  34142. dataIndex: e.getData().getRawIndex(t)
  34143. })
  34144. })))
  34145. }
  34146. })), {
  34147. payloadBatch: o,
  34148. snapToValue: r
  34149. }
  34150. }(e, t),
  34151. s = a.payloadBatch,
  34152. l = a.snapToValue;
  34153. s[0] && null == r.seriesIndex && A(r, s[0]), !i && t.snap && o.containData(l) && null != l && (e = l), n.showPointer(t, e, s), n.showTooltip(t, a, l)
  34154. } else n.showPointer(t, e)
  34155. }
  34156. function RN(t, e, n, i) {
  34157. t[e.key] = {
  34158. value: n,
  34159. payloadBatch: i
  34160. }
  34161. }
  34162. function NN(t, e, n, i) {
  34163. var r = n.payloadBatch,
  34164. o = e.axis,
  34165. a = o.model,
  34166. s = e.axisPointerModel;
  34167. if (e.triggerTooltip && r.length) {
  34168. var l = e.coordSys.model,
  34169. u = wI(l),
  34170. h = t.map[u];
  34171. h || (h = t.map[u] = {
  34172. coordSysId: l.id,
  34173. coordSysIndex: l.componentIndex,
  34174. coordSysType: l.type,
  34175. coordSysMainType: l.mainType,
  34176. dataByAxis: []
  34177. }, t.list.push(h)), h.dataByAxis.push({
  34178. axisDim: o.dim,
  34179. axisIndex: a.componentIndex,
  34180. axisType: a.type,
  34181. axisId: a.id,
  34182. value: i,
  34183. valueLabelOpt: {
  34184. precision: s.get(["label", "precision"]),
  34185. formatter: s.get(["label", "formatter"])
  34186. },
  34187. seriesDataIndices: r.slice()
  34188. })
  34189. }
  34190. }
  34191. function EN(t) {
  34192. var e = t.axis.model,
  34193. n = {},
  34194. i = n.axisDim = t.axis.dim;
  34195. return n.axisIndex = n[i + "AxisIndex"] = e.componentIndex, n.axisName = n[i + "AxisName"] = e.name, n.axisId = n[i + "AxisId"] = e.id, n
  34196. }
  34197. function zN(t) {
  34198. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
  34199. }
  34200. function VN(t) {
  34201. MI.registerAxisPointerClass("CartesianAxisPointer", mN), t.registerComponentModel(wN), t.registerComponentView(AN), t.registerPreprocessor((function (t) {
  34202. if (t) {
  34203. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  34204. var e = t.axisPointer.link;
  34205. e && !Y(e) && (t.axisPointer.link = [e])
  34206. }
  34207. })), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, (function (t, e) {
  34208. t.getComponent("axisPointer").coordSysAxesInfo = vI(t, e)
  34209. })), t.registerAction({
  34210. type: "updateAxisPointer",
  34211. event: "updateAxisPointer",
  34212. update: ":updateAxisPointer"
  34213. }, PN)
  34214. }
  34215. var BN = function (t) {
  34216. function e() {
  34217. return null !== t && t.apply(this, arguments) || this
  34218. }
  34219. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  34220. var o = n.axis;
  34221. "angle" === o.dim && (this.animationThreshold = Math.PI / 18);
  34222. var a = o.polar,
  34223. s = a.getOtherAxis(o).getExtent(),
  34224. l = o.dataToCoord(e),
  34225. u = i.get("type");
  34226. if (u && "none" !== u) {
  34227. var h = hN(i),
  34228. c = FN[u](o, a, l, s);
  34229. c.style = h, t.graphicKey = c.type, t.pointer = c
  34230. }
  34231. var p = function (t, e, n, i, r) {
  34232. var o = e.axis,
  34233. a = o.dataToCoord(t),
  34234. s = i.getAngleAxis().getExtent()[0];
  34235. s = s / 180 * Math.PI;
  34236. var l, u, h, c = i.getRadiusAxis().getExtent();
  34237. if ("radius" === o.dim) {
  34238. var p = [1, 0, 0, 1, 0, 0];
  34239. Se(p, p, s), we(p, p, [i.cx, i.cy]), l = Fh([a, -r], p);
  34240. var d = e.getModel("axisLabel").get("rotate") || 0,
  34241. f = cI.innerTextLayout(s, d * Math.PI / 180, -1);
  34242. u = f.textAlign, h = f.textVerticalAlign
  34243. } else {
  34244. var g = c[1];
  34245. l = i.coordToPoint([g + r, a]);
  34246. var y = i.cx,
  34247. v = i.cy;
  34248. u = Math.abs(l[0] - y) / g < .3 ? "center" : l[0] > y ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom"
  34249. }
  34250. return {
  34251. position: l,
  34252. align: u,
  34253. verticalAlign: h
  34254. }
  34255. }(e, n, 0, a, i.get(["label", "margin"]));
  34256. cN(t, n, i, r, p)
  34257. }, e
  34258. }(rN);
  34259. var FN = {
  34260. line: function (t, e, n, i) {
  34261. return "angle" === t.dim ? {
  34262. type: "Line",
  34263. shape: gN(e.coordToPoint([i[0], n]), e.coordToPoint([i[1], n]))
  34264. } : {
  34265. type: "Circle",
  34266. shape: {
  34267. cx: e.cx,
  34268. cy: e.cy,
  34269. r: n
  34270. }
  34271. }
  34272. },
  34273. shadow: function (t, e, n, i) {
  34274. var r = Math.max(1, t.getBandWidth()),
  34275. o = Math.PI / 180;
  34276. return "angle" === t.dim ? {
  34277. type: "Sector",
  34278. shape: vN(e.cx, e.cy, i[0], i[1], (-n - r / 2) * o, (r / 2 - n) * o)
  34279. } : {
  34280. type: "Sector",
  34281. shape: vN(e.cx, e.cy, n - r / 2, n + r / 2, 0, 2 * Math.PI)
  34282. }
  34283. }
  34284. },
  34285. GN = function (t) {
  34286. function e() {
  34287. var n = null !== t && t.apply(this, arguments) || this;
  34288. return n.type = e.type, n
  34289. }
  34290. return n(e, t), e.prototype.findAxisModel = function (t) {
  34291. var e;
  34292. return this.ecModel.eachComponent(t, (function (t) {
  34293. t.getCoordSysModel() === this && (e = t)
  34294. }), this), e
  34295. }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
  34296. z: 0,
  34297. center: ["50%", "50%"],
  34298. radius: "80%"
  34299. }, e
  34300. }(zp),
  34301. WN = function (t) {
  34302. function e() {
  34303. return null !== t && t.apply(this, arguments) || this
  34304. }
  34305. return n(e, t), e.prototype.getCoordSysModel = function () {
  34306. return this.getReferringComponents("polar", Wo).models[0]
  34307. }, e.type = "polarAxis", e
  34308. }(zp);
  34309. R(WN, D_);
  34310. var HN = function (t) {
  34311. function e() {
  34312. var n = null !== t && t.apply(this, arguments) || this;
  34313. return n.type = e.type, n
  34314. }
  34315. return n(e, t), e.type = "angleAxis", e
  34316. }(WN),
  34317. YN = function (t) {
  34318. function e() {
  34319. var n = null !== t && t.apply(this, arguments) || this;
  34320. return n.type = e.type, n
  34321. }
  34322. return n(e, t), e.type = "radiusAxis", e
  34323. }(WN),
  34324. XN = function (t) {
  34325. function e(e, n) {
  34326. return t.call(this, "radius", e, n) || this
  34327. }
  34328. return n(e, t), e.prototype.pointToData = function (t, e) {
  34329. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  34330. }, e
  34331. }(ob);
  34332. XN.prototype.dataToRadius = ob.prototype.dataToCoord, XN.prototype.radiusToData = ob.prototype.coordToData;
  34333. var UN = Vo(),
  34334. ZN = function (t) {
  34335. function e(e, n) {
  34336. return t.call(this, "angle", e, n || [0, 360]) || this
  34337. }
  34338. return n(e, t), e.prototype.pointToData = function (t, e) {
  34339. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  34340. }, e.prototype.calculateCategoryInterval = function () {
  34341. var t = this,
  34342. e = t.getLabelModel(),
  34343. n = t.scale,
  34344. i = n.getExtent(),
  34345. r = n.count();
  34346. if (i[1] - i[0] < 1) return 0;
  34347. var o = i[0],
  34348. a = t.dataToCoord(o + 1) - t.dataToCoord(o),
  34349. s = Math.abs(a),
  34350. l = Sr(null == o ? "" : o + "", e.getFont(), "center", "top"),
  34351. u = Math.max(l.height, 7) / s;
  34352. isNaN(u) && (u = 1 / 0);
  34353. var h = Math.max(0, Math.floor(u)),
  34354. c = UN(t.model),
  34355. p = c.lastAutoInterval,
  34356. d = c.lastTickCount;
  34357. return null != p && null != d && Math.abs(p - h) <= 1 && Math.abs(d - r) <= 1 && p > h ? h = p : (c.lastTickCount = r, c.lastAutoInterval = h), h
  34358. }, e
  34359. }(ob);
  34360. ZN.prototype.dataToAngle = ob.prototype.dataToCoord, ZN.prototype.angleToData = ob.prototype.coordToData;
  34361. var jN = ["radius", "angle"],
  34362. qN = function () {
  34363. function t(t) {
  34364. this.dimensions = jN, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new XN, this._angleAxis = new ZN, this.axisPointerEnabled = !0, this.name = t || "", this._radiusAxis.polar = this._angleAxis.polar = this
  34365. }
  34366. return t.prototype.containPoint = function (t) {
  34367. var e = this.pointToCoord(t);
  34368. return this._radiusAxis.contain(e[0]) && this._angleAxis.contain(e[1])
  34369. }, t.prototype.containData = function (t) {
  34370. return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1])
  34371. }, t.prototype.getAxis = function (t) {
  34372. return this["_" + t + "Axis"]
  34373. }, t.prototype.getAxes = function () {
  34374. return [this._radiusAxis, this._angleAxis]
  34375. }, t.prototype.getAxesByScale = function (t) {
  34376. var e = [],
  34377. n = this._angleAxis,
  34378. i = this._radiusAxis;
  34379. return n.scale.type === t && e.push(n), i.scale.type === t && e.push(i), e
  34380. }, t.prototype.getAngleAxis = function () {
  34381. return this._angleAxis
  34382. }, t.prototype.getRadiusAxis = function () {
  34383. return this._radiusAxis
  34384. }, t.prototype.getOtherAxis = function (t) {
  34385. var e = this._angleAxis;
  34386. return t === e ? this._radiusAxis : e
  34387. }, t.prototype.getBaseAxis = function () {
  34388. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
  34389. }, t.prototype.getTooltipAxes = function (t) {
  34390. var e = null != t && "auto" !== t ? this.getAxis(t) : this.getBaseAxis();
  34391. return {
  34392. baseAxes: [e],
  34393. otherAxes: [this.getOtherAxis(e)]
  34394. }
  34395. }, t.prototype.dataToPoint = function (t, e) {
  34396. return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], e), this._angleAxis.dataToAngle(t[1], e)])
  34397. }, t.prototype.pointToData = function (t, e) {
  34398. var n = this.pointToCoord(t);
  34399. return [this._radiusAxis.radiusToData(n[0], e), this._angleAxis.angleToData(n[1], e)]
  34400. }, t.prototype.pointToCoord = function (t) {
  34401. var e = t[0] - this.cx,
  34402. n = t[1] - this.cy,
  34403. i = this.getAngleAxis(),
  34404. r = i.getExtent(),
  34405. o = Math.min(r[0], r[1]),
  34406. a = Math.max(r[0], r[1]);
  34407. i.inverse ? o = a - 360 : a = o + 360;
  34408. var s = Math.sqrt(e * e + n * n);
  34409. e /= s, n /= s;
  34410. for (var l = Math.atan2(-n, e) / Math.PI * 180, u = l < o ? 1 : -1; l < o || l > a;) l += 360 * u;
  34411. return [s, l]
  34412. }, t.prototype.coordToPoint = function (t) {
  34413. var e = t[0],
  34414. n = t[1] / 180 * Math.PI;
  34415. return [Math.cos(n) * e + this.cx, -Math.sin(n) * e + this.cy]
  34416. }, t.prototype.getArea = function () {
  34417. var t = this.getAngleAxis(),
  34418. e = this.getRadiusAxis().getExtent().slice();
  34419. e[0] > e[1] && e.reverse();
  34420. var n = t.getExtent(),
  34421. i = Math.PI / 180;
  34422. return {
  34423. cx: this.cx,
  34424. cy: this.cy,
  34425. r0: e[0],
  34426. r: e[1],
  34427. startAngle: -n[0] * i,
  34428. endAngle: -n[1] * i,
  34429. clockwise: t.inverse,
  34430. contain: function (t, e) {
  34431. var n = t - this.cx,
  34432. i = e - this.cy,
  34433. r = n * n + i * i - 1e-4,
  34434. o = this.r,
  34435. a = this.r0;
  34436. return r <= o * o && r >= a * a
  34437. }
  34438. }
  34439. }, t.prototype.convertToPixel = function (t, e, n) {
  34440. return KN(e) === this ? this.dataToPoint(n) : null
  34441. }, t.prototype.convertFromPixel = function (t, e, n) {
  34442. return KN(e) === this ? this.pointToData(n) : null
  34443. }, t
  34444. }();
  34445. function KN(t) {
  34446. var e = t.seriesModel,
  34447. n = t.polarModel;
  34448. return n && n.coordinateSystem || e && e.coordinateSystem
  34449. }
  34450. function $N(t, e) {
  34451. var n = this,
  34452. i = n.getAngleAxis(),
  34453. r = n.getRadiusAxis();
  34454. if (i.scale.setExtent(1 / 0, -1 / 0), r.scale.setExtent(1 / 0, -1 / 0), t.eachSeries((function (t) {
  34455. if (t.coordinateSystem === n) {
  34456. var e = t.getData();
  34457. E(C_(e, "radius"), (function (t) {
  34458. r.scale.unionExtentFromData(e, t)
  34459. })), E(C_(e, "angle"), (function (t) {
  34460. i.scale.unionExtentFromData(e, t)
  34461. }))
  34462. }
  34463. })), __(i.scale, i.model), __(r.scale, r.model), "category" === i.type && !i.onBand) {
  34464. var o = i.getExtent(),
  34465. a = 360 / i.scale.count();
  34466. i.inverse ? o[1] += a : o[1] -= a, i.setExtent(o[0], o[1])
  34467. }
  34468. }
  34469. function JN(t, e) {
  34470. var n;
  34471. if (t.type = e.get("type"), t.scale = b_(e), t.onBand = e.get("boundaryGap") && "category" === t.type, t.inverse = e.get("inverse"), function (t) {
  34472. return "angleAxis" === t.mainType
  34473. }(e)) {
  34474. t.inverse = t.inverse !== e.get("clockwise");
  34475. var i = e.get("startAngle"),
  34476. r = null !== (n = e.get("endAngle")) && void 0 !== n ? n : i + (t.inverse ? -360 : 360);
  34477. t.setExtent(i, r)
  34478. }
  34479. e.axis = t, t.model = e
  34480. }
  34481. var QN = {
  34482. dimensions: jN,
  34483. create: function (t, e) {
  34484. var n = [];
  34485. return t.eachComponent("polar", (function (t, i) {
  34486. var r = new qN(i + "");
  34487. r.update = $N;
  34488. var o = r.getRadiusAxis(),
  34489. a = r.getAngleAxis(),
  34490. s = t.findAxisModel("radiusAxis"),
  34491. l = t.findAxisModel("angleAxis");
  34492. JN(o, s), JN(a, l),
  34493. function (t, e, n) {
  34494. var i = e.get("center"),
  34495. r = n.getWidth(),
  34496. o = n.getHeight();
  34497. t.cx = $r(i[0], r), t.cy = $r(i[1], o);
  34498. var a = t.getRadiusAxis(),
  34499. s = Math.min(r, o) / 2,
  34500. l = e.get("radius");
  34501. null == l ? l = [0, "100%"] : Y(l) || (l = [0, l]);
  34502. var u = [$r(l[0], s), $r(l[1], s)];
  34503. a.inverse ? a.setExtent(u[1], u[0]) : a.setExtent(u[0], u[1])
  34504. }(r, t, e), n.push(r), t.coordinateSystem = r, r.model = t
  34505. })), t.eachSeries((function (t) {
  34506. if ("polar" === t.get("coordinateSystem")) {
  34507. var e = t.getReferringComponents("polar", Wo).models[0];
  34508. 0, t.coordinateSystem = e.coordinateSystem
  34509. }
  34510. })), n
  34511. }
  34512. },
  34513. tE = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  34514. function eE(t, e, n) {
  34515. e[1] > e[0] && (e = e.slice().reverse());
  34516. var i = t.coordToPoint([e[0], n]),
  34517. r = t.coordToPoint([e[1], n]);
  34518. return {
  34519. x1: i[0],
  34520. y1: i[1],
  34521. x2: r[0],
  34522. y2: r[1]
  34523. }
  34524. }
  34525. function nE(t) {
  34526. return t.getRadiusAxis().inverse ? 0 : 1
  34527. }
  34528. function iE(t) {
  34529. var e = t[0],
  34530. n = t[t.length - 1];
  34531. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop()
  34532. }
  34533. var rE = function (t) {
  34534. function e() {
  34535. var n = null !== t && t.apply(this, arguments) || this;
  34536. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n
  34537. }
  34538. return n(e, t), e.prototype.render = function (t, e) {
  34539. if (this.group.removeAll(), t.get("show")) {
  34540. var n = t.axis,
  34541. i = n.polar,
  34542. r = i.getRadiusAxis().getExtent(),
  34543. o = n.getTicksCoords(),
  34544. a = n.getMinorTicksCoords(),
  34545. s = z(n.getViewLabels(), (function (t) {
  34546. t = T(t);
  34547. var e = n.scale,
  34548. i = "ordinal" === e.type ? e.getRawOrdinalNumber(t.tickValue) : t.tickValue;
  34549. return t.coord = n.dataToCoord(i), t
  34550. }));
  34551. iE(s), iE(o), E(tE, (function (e) {
  34552. !t.get([e, "show"]) || n.scale.isBlank() && "axisLine" !== e || oE[e](this.group, t, i, o, a, r, s)
  34553. }), this)
  34554. }
  34555. }, e.type = "angleAxis", e
  34556. }(MI),
  34557. oE = {
  34558. axisLine: function (t, e, n, i, r, o) {
  34559. var a, s = e.getModel(["axisLine", "lineStyle"]),
  34560. l = n.getAngleAxis(),
  34561. u = Math.PI / 180,
  34562. h = l.getExtent(),
  34563. c = nE(n),
  34564. p = c ? 0 : 1,
  34565. d = 360 === Math.abs(h[1] - h[0]) ? "Circle" : "Arc";
  34566. (a = 0 === o[p] ? new Qh[d]({
  34567. shape: {
  34568. cx: n.cx,
  34569. cy: n.cy,
  34570. r: o[c],
  34571. startAngle: -h[0] * u,
  34572. endAngle: -h[1] * u,
  34573. clockwise: l.inverse
  34574. },
  34575. style: s.getLineStyle(),
  34576. z2: 1,
  34577. silent: !0
  34578. }) : new Wu({
  34579. shape: {
  34580. cx: n.cx,
  34581. cy: n.cy,
  34582. r: o[c],
  34583. r0: o[p]
  34584. },
  34585. style: s.getLineStyle(),
  34586. z2: 1,
  34587. silent: !0
  34588. })).style.fill = null, t.add(a)
  34589. },
  34590. axisTick: function (t, e, n, i, r, o) {
  34591. var a = e.getModel("axisTick"),
  34592. s = (a.get("inside") ? -1 : 1) * a.get("length"),
  34593. l = o[nE(n)],
  34594. u = z(i, (function (t) {
  34595. return new Ku({
  34596. shape: eE(n, [l, l + s], t.coord)
  34597. })
  34598. }));
  34599. t.add(Nh(u, {
  34600. style: k(a.getModel("lineStyle").getLineStyle(), {
  34601. stroke: e.get(["axisLine", "lineStyle", "color"])
  34602. })
  34603. }))
  34604. },
  34605. minorTick: function (t, e, n, i, r, o) {
  34606. if (r.length) {
  34607. for (var a = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (a.get("inside") ? -1 : 1) * s.get("length"), u = o[nE(n)], h = [], c = 0; c < r.length; c++)
  34608. for (var p = 0; p < r[c].length; p++) h.push(new Ku({
  34609. shape: eE(n, [u, u + l], r[c][p].coord)
  34610. }));
  34611. t.add(Nh(h, {
  34612. style: k(s.getModel("lineStyle").getLineStyle(), k(a.getLineStyle(), {
  34613. stroke: e.get(["axisLine", "lineStyle", "color"])
  34614. }))
  34615. }))
  34616. }
  34617. },
  34618. axisLabel: function (t, e, n, i, r, o, a) {
  34619. var s = e.getCategories(!0),
  34620. l = e.getModel("axisLabel"),
  34621. u = l.get("margin"),
  34622. h = e.get("triggerEvent");
  34623. E(a, (function (i, r) {
  34624. var a = l,
  34625. c = i.tickValue,
  34626. p = o[nE(n)],
  34627. d = n.coordToPoint([p + u, i.coord]),
  34628. f = n.cx,
  34629. g = n.cy,
  34630. y = Math.abs(d[0] - f) / p < .3 ? "center" : d[0] > f ? "left" : "right",
  34631. v = Math.abs(d[1] - g) / p < .3 ? "middle" : d[1] > g ? "top" : "bottom";
  34632. if (s && s[c]) {
  34633. var m = s[c];
  34634. q(m) && m.textStyle && (a = new Cc(m.textStyle, l, l.ecModel))
  34635. }
  34636. var x = new Xs({
  34637. silent: cI.isLabelSilent(e),
  34638. style: oc(a, {
  34639. x: d[0],
  34640. y: d[1],
  34641. fill: a.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  34642. text: i.formattedLabel,
  34643. align: y,
  34644. verticalAlign: v
  34645. })
  34646. });
  34647. if (t.add(x), h) {
  34648. var _ = cI.makeAxisEventDataBase(e);
  34649. _.targetType = "axisLabel", _.value = i.rawLabel, rl(x).eventData = _
  34650. }
  34651. }), this)
  34652. },
  34653. splitLine: function (t, e, n, i, r, o) {
  34654. var a = e.getModel("splitLine").getModel("lineStyle"),
  34655. s = a.get("color"),
  34656. l = 0;
  34657. s = s instanceof Array ? s : [s];
  34658. for (var u = [], h = 0; h < i.length; h++) {
  34659. var c = l++ % s.length;
  34660. u[c] = u[c] || [], u[c].push(new Ku({
  34661. shape: eE(n, o, i[h].coord)
  34662. }))
  34663. }
  34664. for (h = 0; h < u.length; h++) t.add(Nh(u[h], {
  34665. style: k({
  34666. stroke: s[h % s.length]
  34667. }, a.getLineStyle()),
  34668. silent: !0,
  34669. z: e.get("z")
  34670. }))
  34671. },
  34672. minorSplitLine: function (t, e, n, i, r, o) {
  34673. if (r.length) {
  34674. for (var a = e.getModel("minorSplitLine").getModel("lineStyle"), s = [], l = 0; l < r.length; l++)
  34675. for (var u = 0; u < r[l].length; u++) s.push(new Ku({
  34676. shape: eE(n, o, r[l][u].coord)
  34677. }));
  34678. t.add(Nh(s, {
  34679. style: a.getLineStyle(),
  34680. silent: !0,
  34681. z: e.get("z")
  34682. }))
  34683. }
  34684. },
  34685. splitArea: function (t, e, n, i, r, o) {
  34686. if (i.length) {
  34687. var a = e.getModel("splitArea").getModel("areaStyle"),
  34688. s = a.get("color"),
  34689. l = 0;
  34690. s = s instanceof Array ? s : [s];
  34691. for (var u = [], h = Math.PI / 180, c = -i[0].coord * h, p = Math.min(o[0], o[1]), d = Math.max(o[0], o[1]), f = e.get("clockwise"), g = 1, y = i.length; g <= y; g++) {
  34692. var v = g === y ? i[0].coord : i[g].coord,
  34693. m = l++ % s.length;
  34694. u[m] = u[m] || [], u[m].push(new Fu({
  34695. shape: {
  34696. cx: n.cx,
  34697. cy: n.cy,
  34698. r0: p,
  34699. r: d,
  34700. startAngle: c,
  34701. endAngle: -v * h,
  34702. clockwise: f
  34703. },
  34704. silent: !0
  34705. })), c = -v * h
  34706. }
  34707. for (g = 0; g < u.length; g++) t.add(Nh(u[g], {
  34708. style: k({
  34709. fill: s[g % s.length]
  34710. }, a.getAreaStyle()),
  34711. silent: !0
  34712. }))
  34713. }
  34714. }
  34715. },
  34716. aE = ["axisLine", "axisTickLabel", "axisName"],
  34717. sE = ["splitLine", "splitArea", "minorSplitLine"],
  34718. lE = function (t) {
  34719. function e() {
  34720. var n = null !== t && t.apply(this, arguments) || this;
  34721. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n
  34722. }
  34723. return n(e, t), e.prototype.render = function (t, e) {
  34724. if (this.group.removeAll(), t.get("show")) {
  34725. var n = this._axisGroup,
  34726. i = this._axisGroup = new Br;
  34727. this.group.add(i);
  34728. var r = t.axis,
  34729. o = r.polar,
  34730. a = o.getAngleAxis(),
  34731. s = r.getTicksCoords(),
  34732. l = r.getMinorTicksCoords(),
  34733. u = a.getExtent()[0],
  34734. h = r.getExtent(),
  34735. c = function (t, e, n) {
  34736. return {
  34737. position: [t.cx, t.cy],
  34738. rotation: n / 180 * Math.PI,
  34739. labelDirection: -1,
  34740. tickDirection: -1,
  34741. nameDirection: 1,
  34742. labelRotate: e.getModel("axisLabel").get("rotate"),
  34743. z2: 1
  34744. }
  34745. }(o, t, u),
  34746. p = new cI(t, c);
  34747. E(aE, p.add, p), i.add(p.getGroup()), Hh(n, i, t), E(sE, (function (e) {
  34748. t.get([e, "show"]) && !r.scale.isBlank() && uE[e](this.group, t, o, u, h, s, l)
  34749. }), this)
  34750. }
  34751. }, e.type = "radiusAxis", e
  34752. }(MI),
  34753. uE = {
  34754. splitLine: function (t, e, n, i, r, o) {
  34755. var a = e.getModel("splitLine").getModel("lineStyle"),
  34756. s = a.get("color"),
  34757. l = 0,
  34758. u = n.getAngleAxis(),
  34759. h = Math.PI / 180,
  34760. c = u.getExtent(),
  34761. p = 360 === Math.abs(c[1] - c[0]) ? "Circle" : "Arc";
  34762. s = s instanceof Array ? s : [s];
  34763. for (var d = [], f = 0; f < o.length; f++) {
  34764. var g = l++ % s.length;
  34765. d[g] = d[g] || [], d[g].push(new Qh[p]({
  34766. shape: {
  34767. cx: n.cx,
  34768. cy: n.cy,
  34769. r: Math.max(o[f].coord, 0),
  34770. startAngle: -c[0] * h,
  34771. endAngle: -c[1] * h,
  34772. clockwise: u.inverse
  34773. }
  34774. }))
  34775. }
  34776. for (f = 0; f < d.length; f++) t.add(Nh(d[f], {
  34777. style: k({
  34778. stroke: s[f % s.length],
  34779. fill: null
  34780. }, a.getLineStyle()),
  34781. silent: !0
  34782. }))
  34783. },
  34784. minorSplitLine: function (t, e, n, i, r, o, a) {
  34785. if (a.length) {
  34786. for (var s = e.getModel("minorSplitLine").getModel("lineStyle"), l = [], u = 0; u < a.length; u++)
  34787. for (var h = 0; h < a[u].length; h++) l.push(new Su({
  34788. shape: {
  34789. cx: n.cx,
  34790. cy: n.cy,
  34791. r: a[u][h].coord
  34792. }
  34793. }));
  34794. t.add(Nh(l, {
  34795. style: k({
  34796. fill: null
  34797. }, s.getLineStyle()),
  34798. silent: !0
  34799. }))
  34800. }
  34801. },
  34802. splitArea: function (t, e, n, i, r, o) {
  34803. if (o.length) {
  34804. var a = e.getModel("splitArea").getModel("areaStyle"),
  34805. s = a.get("color"),
  34806. l = 0;
  34807. s = s instanceof Array ? s : [s];
  34808. for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) {
  34809. var p = l++ % s.length;
  34810. u[p] = u[p] || [], u[p].push(new Fu({
  34811. shape: {
  34812. cx: n.cx,
  34813. cy: n.cy,
  34814. r0: h,
  34815. r: o[c].coord,
  34816. startAngle: 0,
  34817. endAngle: 2 * Math.PI
  34818. },
  34819. silent: !0
  34820. })), h = o[c].coord
  34821. }
  34822. for (c = 0; c < u.length; c++) t.add(Nh(u[c], {
  34823. style: k({
  34824. fill: s[c % s.length]
  34825. }, a.getAreaStyle()),
  34826. silent: !0
  34827. }))
  34828. }
  34829. }
  34830. };
  34831. function hE(t) {
  34832. return t.get("stack") || "__ec_stack_" + t.seriesIndex
  34833. }
  34834. function cE(t, e) {
  34835. return e.dim + t.model.componentIndex
  34836. }
  34837. function pE(t, e, n) {
  34838. var i = {},
  34839. r = function (t) {
  34840. var e = {};
  34841. E(t, (function (t, n) {
  34842. var i = t.getData(),
  34843. r = t.coordinateSystem,
  34844. o = r.getBaseAxis(),
  34845. a = cE(r, o),
  34846. s = o.getExtent(),
  34847. l = "category" === o.type ? o.getBandWidth() : Math.abs(s[1] - s[0]) / i.count(),
  34848. u = e[a] || {
  34849. bandWidth: l,
  34850. remainedWidth: l,
  34851. autoWidthCount: 0,
  34852. categoryGap: "20%",
  34853. gap: "30%",
  34854. stacks: {}
  34855. },
  34856. h = u.stacks;
  34857. e[a] = u;
  34858. var c = hE(t);
  34859. h[c] || u.autoWidthCount++, h[c] = h[c] || {
  34860. width: 0,
  34861. maxWidth: 0
  34862. };
  34863. var p = $r(t.get("barWidth"), l),
  34864. d = $r(t.get("barMaxWidth"), l),
  34865. f = t.get("barGap"),
  34866. g = t.get("barCategoryGap");
  34867. p && !h[c].width && (p = Math.min(u.remainedWidth, p), h[c].width = p, u.remainedWidth -= p), d && (h[c].maxWidth = d), null != f && (u.gap = f), null != g && (u.categoryGap = g)
  34868. }));
  34869. var n = {};
  34870. return E(e, (function (t, e) {
  34871. n[e] = {};
  34872. var i = t.stacks,
  34873. r = t.bandWidth,
  34874. o = $r(t.categoryGap, r),
  34875. a = $r(t.gap, 1),
  34876. s = t.remainedWidth,
  34877. l = t.autoWidthCount,
  34878. u = (s - o) / (l + (l - 1) * a);
  34879. u = Math.max(u, 0), E(i, (function (t, e) {
  34880. var n = t.maxWidth;
  34881. n && n < u && (n = Math.min(n, s), t.width && (n = Math.min(n, t.width)), s -= n, t.width = n, l--)
  34882. })), u = (s - o) / (l + (l - 1) * a), u = Math.max(u, 0);
  34883. var h, c = 0;
  34884. E(i, (function (t, e) {
  34885. t.width || (t.width = u), h = t, c += t.width * (1 + a)
  34886. })), h && (c -= h.width * a);
  34887. var p = -c / 2;
  34888. E(i, (function (t, i) {
  34889. n[e][i] = n[e][i] || {
  34890. offset: p,
  34891. width: t.width
  34892. }, p += t.width * (1 + a)
  34893. }))
  34894. })), n
  34895. }(B(e.getSeriesByType(t), (function (t) {
  34896. return !e.isSeriesFiltered(t) && t.coordinateSystem && "polar" === t.coordinateSystem.type
  34897. })));
  34898. e.eachSeriesByType(t, (function (t) {
  34899. if ("polar" === t.coordinateSystem.type) {
  34900. var e = t.getData(),
  34901. n = t.coordinateSystem,
  34902. o = n.getBaseAxis(),
  34903. a = cE(n, o),
  34904. s = hE(t),
  34905. l = r[a][s],
  34906. u = l.offset,
  34907. h = l.width,
  34908. c = n.getOtherAxis(o),
  34909. p = t.coordinateSystem.cx,
  34910. d = t.coordinateSystem.cy,
  34911. f = t.get("barMinHeight") || 0,
  34912. g = t.get("barMinAngle") || 0;
  34913. i[s] = i[s] || [];
  34914. for (var y = e.mapDimension(c.dim), v = e.mapDimension(o.dim), m = mx(e, y), x = "radius" !== o.dim || !t.get("roundCap", !0), _ = c.dataToCoord(0), b = 0, w = e.count(); b < w; b++) {
  34915. var S = e.get(y, b),
  34916. M = e.get(v, b),
  34917. I = S >= 0 ? "p" : "n",
  34918. T = _;
  34919. m && (i[s][M] || (i[s][M] = {
  34920. p: _,
  34921. n: _
  34922. }), T = i[s][M][I]);
  34923. var C = void 0,
  34924. D = void 0,
  34925. A = void 0,
  34926. k = void 0;
  34927. if ("radius" === c.dim) {
  34928. var L = c.dataToCoord(S) - _,
  34929. P = o.dataToCoord(M);
  34930. Math.abs(L) < f && (L = (L < 0 ? -1 : 1) * f), C = T, D = T + L, k = (A = P - u) - h, m && (i[s][M][I] = D)
  34931. } else {
  34932. var O = c.dataToCoord(S, x) - _,
  34933. R = o.dataToCoord(M);
  34934. Math.abs(O) < g && (O = (O < 0 ? -1 : 1) * g), D = (C = R + u) + h, A = T, k = T + O, m && (i[s][M][I] = k)
  34935. }
  34936. e.setItemLayout(b, {
  34937. cx: p,
  34938. cy: d,
  34939. r0: C,
  34940. r: D,
  34941. startAngle: -A * Math.PI / 180,
  34942. endAngle: -k * Math.PI / 180,
  34943. clockwise: A >= k
  34944. })
  34945. }
  34946. }
  34947. }))
  34948. }
  34949. var dE = {
  34950. startAngle: 90,
  34951. clockwise: !0,
  34952. splitNumber: 12,
  34953. axisLabel: {
  34954. rotate: 0
  34955. }
  34956. },
  34957. fE = {
  34958. splitNumber: 5
  34959. },
  34960. gE = function (t) {
  34961. function e() {
  34962. var n = null !== t && t.apply(this, arguments) || this;
  34963. return n.type = e.type, n
  34964. }
  34965. return n(e, t), e.type = "polar", e
  34966. }(Ag);
  34967. function yE(t, e) {
  34968. e = e || {};
  34969. var n = t.coordinateSystem,
  34970. i = t.axis,
  34971. r = {},
  34972. o = i.position,
  34973. a = i.orient,
  34974. s = n.getRect(),
  34975. l = [s.x, s.x + s.width, s.y, s.y + s.height],
  34976. u = {
  34977. horizontal: {
  34978. top: l[2],
  34979. bottom: l[3]
  34980. },
  34981. vertical: {
  34982. left: l[0],
  34983. right: l[1]
  34984. }
  34985. };
  34986. r.position = ["vertical" === a ? u.vertical[o] : l[0], "horizontal" === a ? u.horizontal[o] : l[3]];
  34987. r.rotation = Math.PI / 2 * {
  34988. horizontal: 0,
  34989. vertical: 1
  34990. } [a];
  34991. r.labelDirection = r.tickDirection = r.nameDirection = {
  34992. top: -1,
  34993. bottom: 1,
  34994. right: 1,
  34995. left: -1
  34996. } [o], t.get(["axisTick", "inside"]) && (r.tickDirection = -r.tickDirection), it(e.labelInside, t.get(["axisLabel", "inside"])) && (r.labelDirection = -r.labelDirection);
  34997. var h = e.rotate;
  34998. return null == h && (h = t.get(["axisLabel", "rotate"])), r.labelRotation = "top" === o ? -h : h, r.z2 = 1, r
  34999. }
  35000. var vE = ["axisLine", "axisTickLabel", "axisName"],
  35001. mE = ["splitArea", "splitLine"],
  35002. xE = function (t) {
  35003. function e() {
  35004. var n = null !== t && t.apply(this, arguments) || this;
  35005. return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n
  35006. }
  35007. return n(e, t), e.prototype.render = function (e, n, i, r) {
  35008. var o = this.group;
  35009. o.removeAll();
  35010. var a = this._axisGroup;
  35011. this._axisGroup = new Br;
  35012. var s = yE(e),
  35013. l = new cI(e, s);
  35014. E(vE, l.add, l), o.add(this._axisGroup), o.add(l.getGroup()), E(mE, (function (t) {
  35015. e.get([t, "show"]) && _E[t](this, this.group, this._axisGroup, e)
  35016. }), this), Hh(a, this._axisGroup, e), t.prototype.render.call(this, e, n, i, r)
  35017. }, e.prototype.remove = function () {
  35018. CI(this)
  35019. }, e.type = "singleAxis", e
  35020. }(MI),
  35021. _E = {
  35022. splitLine: function (t, e, n, i) {
  35023. var r = i.axis;
  35024. if (!r.scale.isBlank()) {
  35025. var o = i.getModel("splitLine"),
  35026. a = o.getModel("lineStyle"),
  35027. s = a.get("color");
  35028. s = s instanceof Array ? s : [s];
  35029. for (var l = a.get("width"), u = i.coordinateSystem.getRect(), h = r.isHorizontal(), c = [], p = 0, d = r.getTicksCoords({
  35030. tickModel: o
  35031. }), f = [], g = [], y = 0; y < d.length; ++y) {
  35032. var v = r.toGlobalCoord(d[y].coord);
  35033. h ? (f[0] = v, f[1] = u.y, g[0] = v, g[1] = u.y + u.height) : (f[0] = u.x, f[1] = v, g[0] = u.x + u.width, g[1] = v);
  35034. var m = new Ku({
  35035. shape: {
  35036. x1: f[0],
  35037. y1: f[1],
  35038. x2: g[0],
  35039. y2: g[1]
  35040. },
  35041. silent: !0
  35042. });
  35043. zh(m.shape, l);
  35044. var x = p++ % s.length;
  35045. c[x] = c[x] || [], c[x].push(m)
  35046. }
  35047. var _ = a.getLineStyle(["color"]);
  35048. for (y = 0; y < c.length; ++y) e.add(Nh(c[y], {
  35049. style: k({
  35050. stroke: s[y % s.length]
  35051. }, _),
  35052. silent: !0
  35053. }))
  35054. }
  35055. },
  35056. splitArea: function (t, e, n, i) {
  35057. TI(t, n, i, i)
  35058. }
  35059. },
  35060. bE = function (t) {
  35061. function e() {
  35062. var n = null !== t && t.apply(this, arguments) || this;
  35063. return n.type = e.type, n
  35064. }
  35065. return n(e, t), e.prototype.getCoordSysModel = function () {
  35066. return this
  35067. }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
  35068. left: "5%",
  35069. top: "5%",
  35070. right: "5%",
  35071. bottom: "5%",
  35072. type: "value",
  35073. position: "bottom",
  35074. orient: "horizontal",
  35075. axisLine: {
  35076. show: !0,
  35077. lineStyle: {
  35078. width: 1,
  35079. type: "solid"
  35080. }
  35081. },
  35082. tooltip: {
  35083. show: !0
  35084. },
  35085. axisTick: {
  35086. show: !0,
  35087. length: 6,
  35088. lineStyle: {
  35089. width: 1
  35090. }
  35091. },
  35092. axisLabel: {
  35093. show: !0,
  35094. interval: "auto"
  35095. },
  35096. splitLine: {
  35097. show: !0,
  35098. lineStyle: {
  35099. type: "dashed",
  35100. opacity: .2
  35101. }
  35102. }
  35103. }, e
  35104. }(zp);
  35105. R(bE, D_.prototype);
  35106. var wE = function (t) {
  35107. function e(e, n, i, r, o) {
  35108. var a = t.call(this, e, n, i) || this;
  35109. return a.type = r || "value", a.position = o || "bottom", a
  35110. }
  35111. return n(e, t), e.prototype.isHorizontal = function () {
  35112. var t = this.position;
  35113. return "top" === t || "bottom" === t
  35114. }, e.prototype.pointToData = function (t, e) {
  35115. return this.coordinateSystem.pointToData(t)[0]
  35116. }, e
  35117. }(ob),
  35118. SE = ["single"],
  35119. ME = function () {
  35120. function t(t, e, n) {
  35121. this.type = "single", this.dimension = "single", this.dimensions = SE, this.axisPointerEnabled = !0, this.model = t, this._init(t, e, n)
  35122. }
  35123. return t.prototype._init = function (t, e, n) {
  35124. var i = this.dimension,
  35125. r = new wE(i, b_(t), [0, 0], t.get("type"), t.get("position")),
  35126. o = "category" === r.type;
  35127. r.onBand = o && t.get("boundaryGap"), r.inverse = t.get("inverse"), r.orient = t.get("orient"), t.axis = r, r.model = t, r.coordinateSystem = this, this._axis = r
  35128. }, t.prototype.update = function (t, e) {
  35129. t.eachSeries((function (t) {
  35130. if (t.coordinateSystem === this) {
  35131. var e = t.getData();
  35132. E(e.mapDimensionsAll(this.dimension), (function (t) {
  35133. this._axis.scale.unionExtentFromData(e, t)
  35134. }), this), __(this._axis.scale, this._axis.model)
  35135. }
  35136. }), this)
  35137. }, t.prototype.resize = function (t, e) {
  35138. this._rect = kp({
  35139. left: t.get("left"),
  35140. top: t.get("top"),
  35141. right: t.get("right"),
  35142. bottom: t.get("bottom"),
  35143. width: t.get("width"),
  35144. height: t.get("height")
  35145. }, {
  35146. width: e.getWidth(),
  35147. height: e.getHeight()
  35148. }), this._adjustAxis()
  35149. }, t.prototype.getRect = function () {
  35150. return this._rect
  35151. }, t.prototype._adjustAxis = function () {
  35152. var t = this._rect,
  35153. e = this._axis,
  35154. n = e.isHorizontal(),
  35155. i = n ? [0, t.width] : [0, t.height],
  35156. r = e.inverse ? 1 : 0;
  35157. e.setExtent(i[r], i[1 - r]), this._updateAxisTransform(e, n ? t.x : t.y)
  35158. }, t.prototype._updateAxisTransform = function (t, e) {
  35159. var n = t.getExtent(),
  35160. i = n[0] + n[1],
  35161. r = t.isHorizontal();
  35162. t.toGlobalCoord = r ? function (t) {
  35163. return t + e
  35164. } : function (t) {
  35165. return i - t + e
  35166. }, t.toLocalCoord = r ? function (t) {
  35167. return t - e
  35168. } : function (t) {
  35169. return i - t + e
  35170. }
  35171. }, t.prototype.getAxis = function () {
  35172. return this._axis
  35173. }, t.prototype.getBaseAxis = function () {
  35174. return this._axis
  35175. }, t.prototype.getAxes = function () {
  35176. return [this._axis]
  35177. }, t.prototype.getTooltipAxes = function () {
  35178. return {
  35179. baseAxes: [this.getAxis()],
  35180. otherAxes: []
  35181. }
  35182. }, t.prototype.containPoint = function (t) {
  35183. var e = this.getRect(),
  35184. n = this.getAxis();
  35185. return "horizontal" === n.orient ? n.contain(n.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : n.contain(n.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height
  35186. }, t.prototype.pointToData = function (t) {
  35187. var e = this.getAxis();
  35188. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))]
  35189. }, t.prototype.dataToPoint = function (t) {
  35190. var e = this.getAxis(),
  35191. n = this.getRect(),
  35192. i = [],
  35193. r = "horizontal" === e.orient ? 0 : 1;
  35194. return t instanceof Array && (t = t[0]), i[r] = e.toGlobalCoord(e.dataToCoord(+t)), i[1 - r] = 0 === r ? n.y + n.height / 2 : n.x + n.width / 2, i
  35195. }, t.prototype.convertToPixel = function (t, e, n) {
  35196. return IE(e) === this ? this.dataToPoint(n) : null
  35197. }, t.prototype.convertFromPixel = function (t, e, n) {
  35198. return IE(e) === this ? this.pointToData(n) : null
  35199. }, t
  35200. }();
  35201. function IE(t) {
  35202. var e = t.seriesModel,
  35203. n = t.singleAxisModel;
  35204. return n && n.coordinateSystem || e && e.coordinateSystem
  35205. }
  35206. var TE = {
  35207. create: function (t, e) {
  35208. var n = [];
  35209. return t.eachComponent("singleAxis", (function (i, r) {
  35210. var o = new ME(i, t, e);
  35211. o.name = "single_" + r, o.resize(i, e), i.coordinateSystem = o, n.push(o)
  35212. })), t.eachSeries((function (t) {
  35213. if ("singleAxis" === t.get("coordinateSystem")) {
  35214. var e = t.getReferringComponents("singleAxis", Wo).models[0];
  35215. t.coordinateSystem = e && e.coordinateSystem
  35216. }
  35217. })), n
  35218. },
  35219. dimensions: SE
  35220. },
  35221. CE = ["x", "y"],
  35222. DE = ["width", "height"],
  35223. AE = function (t) {
  35224. function e() {
  35225. return null !== t && t.apply(this, arguments) || this
  35226. }
  35227. return n(e, t), e.prototype.makeElOption = function (t, e, n, i, r) {
  35228. var o = n.axis,
  35229. a = o.coordinateSystem,
  35230. s = PE(a, 1 - LE(o)),
  35231. l = a.dataToPoint(e)[0],
  35232. u = i.get("type");
  35233. if (u && "none" !== u) {
  35234. var h = hN(i),
  35235. c = kE[u](o, l, s);
  35236. c.style = h, t.graphicKey = c.type, t.pointer = c
  35237. }
  35238. fN(e, t, yE(n), n, i, r)
  35239. }, e.prototype.getHandleTransform = function (t, e, n) {
  35240. var i = yE(e, {
  35241. labelInside: !1
  35242. });
  35243. i.labelMargin = n.get(["handle", "margin"]);
  35244. var r = dN(e.axis, t, i);
  35245. return {
  35246. x: r[0],
  35247. y: r[1],
  35248. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  35249. }
  35250. }, e.prototype.updateHandleTransform = function (t, e, n, i) {
  35251. var r = n.axis,
  35252. o = r.coordinateSystem,
  35253. a = LE(r),
  35254. s = PE(o, a),
  35255. l = [t.x, t.y];
  35256. l[a] += e[a], l[a] = Math.min(s[1], l[a]), l[a] = Math.max(s[0], l[a]);
  35257. var u = PE(o, 1 - a),
  35258. h = (u[1] + u[0]) / 2,
  35259. c = [h, h];
  35260. return c[a] = l[a], {
  35261. x: l[0],
  35262. y: l[1],
  35263. rotation: t.rotation,
  35264. cursorPoint: c,
  35265. tooltipOption: {
  35266. verticalAlign: "middle"
  35267. }
  35268. }
  35269. }, e
  35270. }(rN),
  35271. kE = {
  35272. line: function (t, e, n) {
  35273. return {
  35274. type: "Line",
  35275. subPixelOptimize: !0,
  35276. shape: gN([e, n[0]], [e, n[1]], LE(t))
  35277. }
  35278. },
  35279. shadow: function (t, e, n) {
  35280. var i = t.getBandWidth(),
  35281. r = n[1] - n[0];
  35282. return {
  35283. type: "Rect",
  35284. shape: yN([e - i / 2, n[0]], [i, r], LE(t))
  35285. }
  35286. }
  35287. };
  35288. function LE(t) {
  35289. return t.isHorizontal() ? 0 : 1
  35290. }
  35291. function PE(t, e) {
  35292. var n = t.getRect();
  35293. return [n[CE[e]], n[CE[e]] + n[DE[e]]]
  35294. }
  35295. var OE = function (t) {
  35296. function e() {
  35297. var n = null !== t && t.apply(this, arguments) || this;
  35298. return n.type = e.type, n
  35299. }
  35300. return n(e, t), e.type = "single", e
  35301. }(Ag);
  35302. var RE = function (t) {
  35303. function e() {
  35304. var n = null !== t && t.apply(this, arguments) || this;
  35305. return n.type = e.type, n
  35306. }
  35307. return n(e, t), e.prototype.init = function (e, n, i) {
  35308. var r = Rp(e);
  35309. t.prototype.init.apply(this, arguments), NE(e, r)
  35310. }, e.prototype.mergeOption = function (e) {
  35311. t.prototype.mergeOption.apply(this, arguments), NE(this.option, e)
  35312. }, e.prototype.getCellSize = function () {
  35313. return this.option.cellSize
  35314. }, e.type = "calendar", e.defaultOption = {
  35315. z: 2,
  35316. left: 80,
  35317. top: 60,
  35318. cellSize: 20,
  35319. orient: "horizontal",
  35320. splitLine: {
  35321. show: !0,
  35322. lineStyle: {
  35323. color: "#000",
  35324. width: 1,
  35325. type: "solid"
  35326. }
  35327. },
  35328. itemStyle: {
  35329. color: "#fff",
  35330. borderWidth: 1,
  35331. borderColor: "#ccc"
  35332. },
  35333. dayLabel: {
  35334. show: !0,
  35335. firstDay: 0,
  35336. position: "start",
  35337. margin: "50%",
  35338. color: "#000"
  35339. },
  35340. monthLabel: {
  35341. show: !0,
  35342. position: "start",
  35343. margin: 5,
  35344. align: "center",
  35345. formatter: null,
  35346. color: "#000"
  35347. },
  35348. yearLabel: {
  35349. show: !0,
  35350. position: null,
  35351. margin: 30,
  35352. formatter: null,
  35353. color: "#ccc",
  35354. fontFamily: "sans-serif",
  35355. fontWeight: "bolder",
  35356. fontSize: 20
  35357. }
  35358. }, e
  35359. }(zp);
  35360. function NE(t, e) {
  35361. var n, i = t.cellSize;
  35362. 1 === (n = Y(i) ? i : t.cellSize = [i, i]).length && (n[1] = n[0]);
  35363. var r = z([0, 1], (function (t) {
  35364. return function (t, e) {
  35365. return null != t[Cp[e][0]] || null != t[Cp[e][1]] && null != t[Cp[e][2]]
  35366. }(e, t) && (n[t] = "auto"), null != n[t] && "auto" !== n[t]
  35367. }));
  35368. Op(t, e, {
  35369. type: "box",
  35370. ignoreSize: r
  35371. })
  35372. }
  35373. var EE = function (t) {
  35374. function e() {
  35375. var n = null !== t && t.apply(this, arguments) || this;
  35376. return n.type = e.type, n
  35377. }
  35378. return n(e, t), e.prototype.render = function (t, e, n) {
  35379. var i = this.group;
  35380. i.removeAll();
  35381. var r = t.coordinateSystem,
  35382. o = r.getRangeInfo(),
  35383. a = r.getOrient(),
  35384. s = e.getLocaleModel();
  35385. this._renderDayRect(t, o, i), this._renderLines(t, o, a, i), this._renderYearText(t, o, a, i), this._renderMonthText(t, s, a, i), this._renderWeekText(t, s, o, a, i)
  35386. }, e.prototype._renderDayRect = function (t, e, n) {
  35387. for (var i = t.coordinateSystem, r = t.getModel("itemStyle").getItemStyle(), o = i.getCellWidth(), a = i.getCellHeight(), s = e.start.time; s <= e.end.time; s = i.getNextNDay(s, 1).time) {
  35388. var l = i.dataToRect([s], !1).tl,
  35389. u = new Ws({
  35390. shape: {
  35391. x: l[0],
  35392. y: l[1],
  35393. width: o,
  35394. height: a
  35395. },
  35396. cursor: "default",
  35397. style: r
  35398. });
  35399. n.add(u)
  35400. }
  35401. }, e.prototype._renderLines = function (t, e, n, i) {
  35402. var r = this,
  35403. o = t.coordinateSystem,
  35404. a = t.getModel(["splitLine", "lineStyle"]).getLineStyle(),
  35405. s = t.get(["splitLine", "show"]),
  35406. l = a.lineWidth;
  35407. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  35408. for (var u = e.start, h = 0; u.time <= e.end.time; h++) {
  35409. p(u.formatedDate), 0 === h && (u = o.getDateInfo(e.start.y + "-" + e.start.m));
  35410. var c = u.date;
  35411. c.setMonth(c.getMonth() + 1), u = o.getDateInfo(c)
  35412. }
  35413. function p(e) {
  35414. r._firstDayOfMonth.push(o.getDateInfo(e)), r._firstDayPoints.push(o.dataToRect([e], !1).tl);
  35415. var l = r._getLinePointsOfOneWeek(t, e, n);
  35416. r._tlpoints.push(l[0]), r._blpoints.push(l[l.length - 1]), s && r._drawSplitline(l, a, i)
  35417. }
  35418. p(o.getNextNDay(e.end.time, 1).formatedDate), s && this._drawSplitline(r._getEdgesPoints(r._tlpoints, l, n), a, i), s && this._drawSplitline(r._getEdgesPoints(r._blpoints, l, n), a, i)
  35419. }, e.prototype._getEdgesPoints = function (t, e, n) {
  35420. var i = [t[0].slice(), t[t.length - 1].slice()],
  35421. r = "horizontal" === n ? 0 : 1;
  35422. return i[0][r] = i[0][r] - e / 2, i[1][r] = i[1][r] + e / 2, i
  35423. }, e.prototype._drawSplitline = function (t, e, n) {
  35424. var i = new Zu({
  35425. z2: 20,
  35426. shape: {
  35427. points: t
  35428. },
  35429. style: e
  35430. });
  35431. n.add(i)
  35432. }, e.prototype._getLinePointsOfOneWeek = function (t, e, n) {
  35433. for (var i = t.coordinateSystem, r = i.getDateInfo(e), o = [], a = 0; a < 7; a++) {
  35434. var s = i.getNextNDay(r.time, a),
  35435. l = i.dataToRect([s.time], !1);
  35436. o[2 * s.day] = l.tl, o[2 * s.day + 1] = l["horizontal" === n ? "bl" : "tr"]
  35437. }
  35438. return o
  35439. }, e.prototype._formatterLabel = function (t, e) {
  35440. return U(t) && t ? (n = t, E(e, (function (t, e) {
  35441. n = n.replace("{" + e + "}", i ? re(t) : t)
  35442. })), n) : X(t) ? t(e) : e.nameMap;
  35443. var n, i
  35444. }, e.prototype._yearTextPositionControl = function (t, e, n, i, r) {
  35445. var o = e[0],
  35446. a = e[1],
  35447. s = ["center", "bottom"];
  35448. "bottom" === i ? (a += r, s = ["center", "top"]) : "left" === i ? o -= r : "right" === i ? (o += r, s = ["center", "top"]) : a -= r;
  35449. var l = 0;
  35450. return "left" !== i && "right" !== i || (l = Math.PI / 2), {
  35451. rotation: l,
  35452. x: o,
  35453. y: a,
  35454. style: {
  35455. align: s[0],
  35456. verticalAlign: s[1]
  35457. }
  35458. }
  35459. }, e.prototype._renderYearText = function (t, e, n, i) {
  35460. var r = t.getModel("yearLabel");
  35461. if (r.get("show")) {
  35462. var o = r.get("margin"),
  35463. a = r.get("position");
  35464. a || (a = "horizontal" !== n ? "top" : "left");
  35465. var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]],
  35466. l = (s[0][0] + s[1][0]) / 2,
  35467. u = (s[0][1] + s[1][1]) / 2,
  35468. h = "horizontal" === n ? 0 : 1,
  35469. c = {
  35470. top: [l, s[h][1]],
  35471. bottom: [l, s[1 - h][1]],
  35472. left: [s[1 - h][0], u],
  35473. right: [s[h][0], u]
  35474. },
  35475. p = e.start.y; + e.end.y > +e.start.y && (p = p + "-" + e.end.y);
  35476. var d = r.get("formatter"),
  35477. f = {
  35478. start: e.start.y,
  35479. end: e.end.y,
  35480. nameMap: p
  35481. },
  35482. g = this._formatterLabel(d, f),
  35483. y = new Xs({
  35484. z2: 30,
  35485. style: oc(r, {
  35486. text: g
  35487. })
  35488. });
  35489. y.attr(this._yearTextPositionControl(y, c[a], n, a, o)), i.add(y)
  35490. }
  35491. }, e.prototype._monthTextPositionControl = function (t, e, n, i, r) {
  35492. var o = "left",
  35493. a = "top",
  35494. s = t[0],
  35495. l = t[1];
  35496. return "horizontal" === n ? (l += r, e && (o = "center"), "start" === i && (a = "bottom")) : (s += r, e && (a = "middle"), "start" === i && (o = "right")), {
  35497. x: s,
  35498. y: l,
  35499. align: o,
  35500. verticalAlign: a
  35501. }
  35502. }, e.prototype._renderMonthText = function (t, e, n, i) {
  35503. var r = t.getModel("monthLabel");
  35504. if (r.get("show")) {
  35505. var o = r.get("nameMap"),
  35506. a = r.get("margin"),
  35507. s = r.get("position"),
  35508. l = r.get("align"),
  35509. u = [this._tlpoints, this._blpoints];
  35510. o && !U(o) || (o && (e = Vc(o) || e), o = e.get(["time", "monthAbbr"]) || []);
  35511. var h = "start" === s ? 0 : 1,
  35512. c = "horizontal" === n ? 0 : 1;
  35513. a = "start" === s ? -a : a;
  35514. for (var p = "center" === l, d = 0; d < u[h].length - 1; d++) {
  35515. var f = u[h][d].slice(),
  35516. g = this._firstDayOfMonth[d];
  35517. if (p) {
  35518. var y = this._firstDayPoints[d];
  35519. f[c] = (y[c] + u[0][d + 1][c]) / 2
  35520. }
  35521. var v = r.get("formatter"),
  35522. m = o[+g.m - 1],
  35523. x = {
  35524. yyyy: g.y,
  35525. yy: (g.y + "").slice(2),
  35526. MM: g.m,
  35527. M: +g.m,
  35528. nameMap: m
  35529. },
  35530. _ = this._formatterLabel(v, x),
  35531. b = new Xs({
  35532. z2: 30,
  35533. style: A(oc(r, {
  35534. text: _
  35535. }), this._monthTextPositionControl(f, p, n, s, a))
  35536. });
  35537. i.add(b)
  35538. }
  35539. }
  35540. }, e.prototype._weekTextPositionControl = function (t, e, n, i, r) {
  35541. var o = "center",
  35542. a = "middle",
  35543. s = t[0],
  35544. l = t[1],
  35545. u = "start" === n;
  35546. return "horizontal" === e ? (s = s + i + (u ? 1 : -1) * r[0] / 2, o = u ? "right" : "left") : (l = l + i + (u ? 1 : -1) * r[1] / 2, a = u ? "bottom" : "top"), {
  35547. x: s,
  35548. y: l,
  35549. align: o,
  35550. verticalAlign: a
  35551. }
  35552. }, e.prototype._renderWeekText = function (t, e, n, i, r) {
  35553. var o = t.getModel("dayLabel");
  35554. if (o.get("show")) {
  35555. var a = t.coordinateSystem,
  35556. s = o.get("position"),
  35557. l = o.get("nameMap"),
  35558. u = o.get("margin"),
  35559. h = a.getFirstDayOfWeek();
  35560. if (!l || U(l)) l && (e = Vc(l) || e), l = e.get(["time", "dayOfWeekShort"]) || z(e.get(["time", "dayOfWeekAbbr"]), (function (t) {
  35561. return t[0]
  35562. }));
  35563. var c = a.getNextNDay(n.end.time, 7 - n.lweek).time,
  35564. p = [a.getCellWidth(), a.getCellHeight()];
  35565. u = $r(u, Math.min(p[1], p[0])), "start" === s && (c = a.getNextNDay(n.start.time, -(7 + n.fweek)).time, u = -u);
  35566. for (var d = 0; d < 7; d++) {
  35567. var f, g = a.getNextNDay(c, d),
  35568. y = a.dataToRect([g.time], !1).center;
  35569. f = Math.abs((d + h) % 7);
  35570. var v = new Xs({
  35571. z2: 30,
  35572. style: A(oc(o, {
  35573. text: l[f]
  35574. }), this._weekTextPositionControl(y, i, s, u, p))
  35575. });
  35576. r.add(v)
  35577. }
  35578. }
  35579. }, e.type = "calendar", e
  35580. }(Ag),
  35581. zE = 864e5,
  35582. VE = function () {
  35583. function t(e, n, i) {
  35584. this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e
  35585. }
  35586. return t.getDimensionsInfo = function () {
  35587. return [{
  35588. name: "time",
  35589. type: "time"
  35590. }, "value"]
  35591. }, t.prototype.getRangeInfo = function () {
  35592. return this._rangeInfo
  35593. }, t.prototype.getModel = function () {
  35594. return this._model
  35595. }, t.prototype.getRect = function () {
  35596. return this._rect
  35597. }, t.prototype.getCellWidth = function () {
  35598. return this._sw
  35599. }, t.prototype.getCellHeight = function () {
  35600. return this._sh
  35601. }, t.prototype.getOrient = function () {
  35602. return this._orient
  35603. }, t.prototype.getFirstDayOfWeek = function () {
  35604. return this._firstDayOfWeek
  35605. }, t.prototype.getDateInfo = function (t) {
  35606. var e = (t = uo(t)).getFullYear(),
  35607. n = t.getMonth() + 1,
  35608. i = n < 10 ? "0" + n : "" + n,
  35609. r = t.getDate(),
  35610. o = r < 10 ? "0" + r : "" + r,
  35611. a = t.getDay();
  35612. return {
  35613. y: e + "",
  35614. m: i,
  35615. d: o,
  35616. day: a = Math.abs((a + 7 - this.getFirstDayOfWeek()) % 7),
  35617. time: t.getTime(),
  35618. formatedDate: e + "-" + i + "-" + o,
  35619. date: t
  35620. }
  35621. }, t.prototype.getNextNDay = function (t, e) {
  35622. return 0 === (e = e || 0) || (t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e), this.getDateInfo(t)
  35623. }, t.prototype.update = function (t, e) {
  35624. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
  35625. var n = this._rangeInfo.weeks || 1,
  35626. i = ["width", "height"],
  35627. r = this._model.getCellSize().slice(),
  35628. o = this._model.getBoxLayoutParams(),
  35629. a = "horizontal" === this._orient ? [n, 7] : [7, n];
  35630. E([0, 1], (function (t) {
  35631. u(r, t) && (o[i[t]] = r[t] * a[t])
  35632. }));
  35633. var s = {
  35634. width: e.getWidth(),
  35635. height: e.getHeight()
  35636. },
  35637. l = this._rect = kp(o, s);
  35638. function u(t, e) {
  35639. return null != t[e] && "auto" !== t[e]
  35640. }
  35641. E([0, 1], (function (t) {
  35642. u(r, t) || (r[t] = l[i[t]] / a[t])
  35643. })), this._sw = r[0], this._sh = r[1]
  35644. }, t.prototype.dataToPoint = function (t, e) {
  35645. Y(t) && (t = t[0]), null == e && (e = !0);
  35646. var n = this.getDateInfo(t),
  35647. i = this._rangeInfo,
  35648. r = n.formatedDate;
  35649. if (e && !(n.time >= i.start.time && n.time < i.end.time + zE)) return [NaN, NaN];
  35650. var o = n.day,
  35651. a = this._getRangeInfo([i.start.time, r]).nthWeek;
  35652. return "vertical" === this._orient ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2] : [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2]
  35653. }, t.prototype.pointToData = function (t) {
  35654. var e = this.pointToDate(t);
  35655. return e && e.time
  35656. }, t.prototype.dataToRect = function (t, e) {
  35657. var n = this.dataToPoint(t, e);
  35658. return {
  35659. contentShape: {
  35660. x: n[0] - (this._sw - this._lineWidth) / 2,
  35661. y: n[1] - (this._sh - this._lineWidth) / 2,
  35662. width: this._sw - this._lineWidth,
  35663. height: this._sh - this._lineWidth
  35664. },
  35665. center: n,
  35666. tl: [n[0] - this._sw / 2, n[1] - this._sh / 2],
  35667. tr: [n[0] + this._sw / 2, n[1] - this._sh / 2],
  35668. br: [n[0] + this._sw / 2, n[1] + this._sh / 2],
  35669. bl: [n[0] - this._sw / 2, n[1] + this._sh / 2]
  35670. }
  35671. }, t.prototype.pointToDate = function (t) {
  35672. var e = Math.floor((t[0] - this._rect.x) / this._sw) + 1,
  35673. n = Math.floor((t[1] - this._rect.y) / this._sh) + 1,
  35674. i = this._rangeInfo.range;
  35675. return "vertical" === this._orient ? this._getDateByWeeksAndDay(n, e - 1, i) : this._getDateByWeeksAndDay(e, n - 1, i)
  35676. }, t.prototype.convertToPixel = function (t, e, n) {
  35677. var i = BE(e);
  35678. return i === this ? i.dataToPoint(n) : null
  35679. }, t.prototype.convertFromPixel = function (t, e, n) {
  35680. var i = BE(e);
  35681. return i === this ? i.pointToData(n) : null
  35682. }, t.prototype.containPoint = function (t) {
  35683. return console.warn("Not implemented."), !1
  35684. }, t.prototype._initRangeOption = function () {
  35685. var t, e = this._model.get("range");
  35686. if (Y(e) && 1 === e.length && (e = e[0]), Y(e)) t = e;
  35687. else {
  35688. var n = e.toString();
  35689. if (/^\d{4}$/.test(n) && (t = [n + "-01-01", n + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(n)) {
  35690. var i = this.getDateInfo(n),
  35691. r = i.date;
  35692. r.setMonth(r.getMonth() + 1);
  35693. var o = this.getNextNDay(r, -1);
  35694. t = [i.formatedDate, o.formatedDate]
  35695. }
  35696. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n) && (t = [n, n])
  35697. }
  35698. if (!t) return e;
  35699. var a = this._getRangeInfo(t);
  35700. return a.start.time > a.end.time && t.reverse(), t
  35701. }, t.prototype._getRangeInfo = function (t) {
  35702. var e, n = [this.getDateInfo(t[0]), this.getDateInfo(t[1])];
  35703. n[0].time > n[1].time && (e = !0, n.reverse());
  35704. var i = Math.floor(n[1].time / zE) - Math.floor(n[0].time / zE) + 1,
  35705. r = new Date(n[0].time),
  35706. o = r.getDate(),
  35707. a = n[1].date.getDate();
  35708. r.setDate(o + i - 1);
  35709. var s = r.getDate();
  35710. if (s !== a)
  35711. for (var l = r.getTime() - n[1].time > 0 ? 1 : -1;
  35712. (s = r.getDate()) !== a && (r.getTime() - n[1].time) * l > 0;) i -= l, r.setDate(s - l);
  35713. var u = Math.floor((i + n[0].day + 6) / 7),
  35714. h = e ? 1 - u : u - 1;
  35715. return e && n.reverse(), {
  35716. range: [n[0].formatedDate, n[1].formatedDate],
  35717. start: n[0],
  35718. end: n[1],
  35719. allDay: i,
  35720. weeks: u,
  35721. nthWeek: h,
  35722. fweek: n[0].day,
  35723. lweek: n[1].day
  35724. }
  35725. }, t.prototype._getDateByWeeksAndDay = function (t, e, n) {
  35726. var i = this._getRangeInfo(n);
  35727. if (t > i.weeks || 0 === t && e < i.fweek || t === i.weeks && e > i.lweek) return null;
  35728. var r = 7 * (t - 1) - i.fweek + e,
  35729. o = new Date(i.start.time);
  35730. return o.setDate(+i.start.d + r), this.getDateInfo(o)
  35731. }, t.create = function (e, n) {
  35732. var i = [];
  35733. return e.eachComponent("calendar", (function (r) {
  35734. var o = new t(r, e, n);
  35735. i.push(o), r.coordinateSystem = o
  35736. })), e.eachSeries((function (t) {
  35737. "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0])
  35738. })), i
  35739. }, t.dimensions = ["time", "value"], t
  35740. }();
  35741. function BE(t) {
  35742. var e = t.calendarModel,
  35743. n = t.seriesModel;
  35744. return e ? e.coordinateSystem : n ? n.coordinateSystem : null
  35745. }
  35746. function FE(t, e) {
  35747. var n;
  35748. return E(e, (function (e) {
  35749. null != t[e] && "auto" !== t[e] && (n = !0)
  35750. })), n
  35751. }
  35752. var GE = ["transition", "enterFrom", "leaveTo"],
  35753. WE = GE.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  35754. function HE(t, e, n) {
  35755. if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), t && e)
  35756. for (var i = n ? GE : WE, r = 0; r < i.length; r++) {
  35757. var o = i[r];
  35758. null == t[o] && null != e[o] && (t[o] = e[o])
  35759. }
  35760. }
  35761. var YE = function (t) {
  35762. function e() {
  35763. var n = null !== t && t.apply(this, arguments) || this;
  35764. return n.type = e.type, n.preventAutoZ = !0, n
  35765. }
  35766. return n(e, t), e.prototype.mergeOption = function (e, n) {
  35767. var i = this.option.elements;
  35768. this.option.elements = null, t.prototype.mergeOption.call(this, e, n), this.option.elements = i
  35769. }, e.prototype.optionUpdated = function (t, e) {
  35770. var n = this.option,
  35771. i = (e ? n : t).elements,
  35772. r = n.elements = e ? [] : n.elements,
  35773. o = [];
  35774. this._flatten(i, o, null);
  35775. var a = Lo(r, o, "normalMerge"),
  35776. s = this._elOptionsToUpdate = [];
  35777. E(a, (function (t, e) {
  35778. var n = t.newOption;
  35779. n && (s.push(n), function (t, e) {
  35780. var n = t.existing;
  35781. if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), null == e.parentId) {
  35782. var i = e.parentOption;
  35783. i ? e.parentId = i.id : n && (e.parentId = n.parentId)
  35784. }
  35785. e.parentOption = null
  35786. }(t, n), function (t, e, n) {
  35787. var i = A({}, n),
  35788. r = t[e],
  35789. o = n.$action || "merge";
  35790. "merge" === o ? r ? (C(r, i, !0), Op(r, i, {
  35791. ignoreSize: !0
  35792. }), Np(n, r), HE(n, r), HE(n, r, "shape"), HE(n, r, "style"), HE(n, r, "extra"), n.clipPath = r.clipPath) : t[e] = i : "replace" === o ? t[e] = i : "remove" === o && r && (t[e] = null)
  35793. }(r, e, n), function (t, e) {
  35794. if (t && (t.hv = e.hv = [FE(e, ["left", "right"]), FE(e, ["top", "bottom"])], "group" === t.type)) {
  35795. var n = t,
  35796. i = e;
  35797. null == n.width && (n.width = i.width = 0), null == n.height && (n.height = i.height = 0)
  35798. }
  35799. }(r[e], n))
  35800. }), this), n.elements = B(r, (function (t) {
  35801. return t && delete t.$action, null != t
  35802. }))
  35803. }, e.prototype._flatten = function (t, e, n) {
  35804. E(t, (function (t) {
  35805. if (t) {
  35806. n && (t.parentOption = n), e.push(t);
  35807. var i = t.children;
  35808. i && i.length && this._flatten(i, e, t), delete t.children
  35809. }
  35810. }), this)
  35811. }, e.prototype.useElOptionsToUpdate = function () {
  35812. var t = this._elOptionsToUpdate;
  35813. return this._elOptionsToUpdate = null, t
  35814. }, e.type = "graphic", e.defaultOption = {
  35815. elements: []
  35816. }, e
  35817. }(zp),
  35818. XE = {
  35819. path: null,
  35820. compoundPath: null,
  35821. group: Br,
  35822. image: Ns,
  35823. text: Xs
  35824. },
  35825. UE = Vo(),
  35826. ZE = function (t) {
  35827. function e() {
  35828. var n = null !== t && t.apply(this, arguments) || this;
  35829. return n.type = e.type, n
  35830. }
  35831. return n(e, t), e.prototype.init = function () {
  35832. this._elMap = yt()
  35833. }, e.prototype.render = function (t, e, n) {
  35834. t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(t, n)
  35835. }, e.prototype._updateElements = function (t) {
  35836. var e = t.useElOptionsToUpdate();
  35837. if (e) {
  35838. var n = this._elMap,
  35839. i = this.group,
  35840. r = t.get("z"),
  35841. o = t.get("zlevel");
  35842. E(e, (function (e) {
  35843. var a = Ro(e.id, null),
  35844. s = null != a ? n.get(a) : null,
  35845. l = Ro(e.parentId, null),
  35846. u = null != l ? n.get(l) : i,
  35847. h = e.type,
  35848. c = e.style;
  35849. "text" === h && c && e.hv && e.hv[1] && (c.textVerticalAlign = c.textBaseline = c.verticalAlign = c.align = null);
  35850. var p = e.textContent,
  35851. d = e.textConfig;
  35852. if (c && eR(c, h, !!d, !!p)) {
  35853. var f = nR(c, h, !0);
  35854. !d && f.textConfig && (d = e.textConfig = f.textConfig), !p && f.textContent && (p = f.textContent)
  35855. }
  35856. var g = function (t) {
  35857. return t = A({}, t), E(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(Tp), (function (e) {
  35858. delete t[e]
  35859. })), t
  35860. }(e);
  35861. var y = e.$action || "merge",
  35862. v = "merge" === y,
  35863. m = "replace" === y;
  35864. if (v) {
  35865. var x = s;
  35866. (T = !s) ? x = qE(a, u, e.type, n): (x && (UE(x).isNew = !1), SR(x)), x && (cR(x, g, t, {
  35867. isInit: T
  35868. }), $E(x, e, r, o))
  35869. } else if (m) {
  35870. KE(s, e, n, t);
  35871. var _ = qE(a, u, e.type, n);
  35872. _ && (cR(_, g, t, {
  35873. isInit: !0
  35874. }), $E(_, e, r, o))
  35875. } else "remove" === y && (pR(s, e), KE(s, e, n, t));
  35876. var b = n.get(a);
  35877. if (b && p)
  35878. if (v) {
  35879. var w = b.getTextContent();
  35880. w ? w.attr(p) : b.setTextContent(new Xs(p))
  35881. } else m && b.setTextContent(new Xs(p));
  35882. if (b) {
  35883. var S = e.clipPath;
  35884. if (S) {
  35885. var M = S.type,
  35886. I = void 0,
  35887. T = !1;
  35888. if (v) {
  35889. var C = b.getClipPath();
  35890. I = (T = !C || UE(C).type !== M) ? jE(M) : C
  35891. } else m && (T = !0, I = jE(M));
  35892. b.setClipPath(I), cR(I, S, t, {
  35893. isInit: T
  35894. }), MR(I, S.keyframeAnimation, t)
  35895. }
  35896. var D = UE(b);
  35897. b.setTextConfig(d), D.option = e,
  35898. function (t, e, n) {
  35899. var i = rl(t).eventData;
  35900. t.silent || t.ignore || i || (i = rl(t).eventData = {
  35901. componentType: "graphic",
  35902. componentIndex: e.componentIndex,
  35903. name: t.name
  35904. });
  35905. i && (i.info = n.info)
  35906. }(b, t, e), Kh({
  35907. el: b,
  35908. componentModel: t,
  35909. itemName: b.name,
  35910. itemTooltipOption: e.tooltip
  35911. }), MR(b, e.keyframeAnimation, t)
  35912. }
  35913. }))
  35914. }
  35915. }, e.prototype._relocate = function (t, e) {
  35916. for (var n = t.option.elements, i = this.group, r = this._elMap, o = e.getWidth(), a = e.getHeight(), s = ["x", "y"], l = 0; l < n.length; l++) {
  35917. if ((f = null != (d = Ro((p = n[l]).id, null)) ? r.get(d) : null) && f.isGroup) {
  35918. var u = (g = f.parent) === i,
  35919. h = UE(f),
  35920. c = UE(g);
  35921. h.width = $r(h.option.width, u ? o : c.width) || 0, h.height = $r(h.option.height, u ? a : c.height) || 0
  35922. }
  35923. }
  35924. for (l = n.length - 1; l >= 0; l--) {
  35925. var p, d, f;
  35926. if (f = null != (d = Ro((p = n[l]).id, null)) ? r.get(d) : null) {
  35927. var g = f.parent,
  35928. y = (c = UE(g), {}),
  35929. v = Lp(f, p, g === i ? {
  35930. width: o,
  35931. height: a
  35932. } : {
  35933. width: c.width,
  35934. height: c.height
  35935. }, null, {
  35936. hv: p.hv,
  35937. boundingMode: p.bounding
  35938. }, y);
  35939. if (!UE(f).isNew && v) {
  35940. for (var m = p.transition, x = {}, _ = 0; _ < s.length; _++) {
  35941. var b = s[_],
  35942. w = y[b];
  35943. m && (fR(m) || P(m, b) >= 0) ? x[b] = w : f[b] = w
  35944. }
  35945. vh(f, x, t, 0)
  35946. } else f.attr(y)
  35947. }
  35948. }
  35949. }, e.prototype._clear = function () {
  35950. var t = this,
  35951. e = this._elMap;
  35952. e.each((function (n) {
  35953. KE(n, UE(n).option, e, t._lastGraphicModel)
  35954. })), this._elMap = yt()
  35955. }, e.prototype.dispose = function () {
  35956. this._clear()
  35957. }, e.type = "graphic", e
  35958. }(Ag);
  35959. function jE(t) {
  35960. var e = _t(XE, t) ? XE[t] : Lh(t);
  35961. var n = new e({});
  35962. return UE(n).type = t, n
  35963. }
  35964. function qE(t, e, n, i) {
  35965. var r = jE(n);
  35966. return e.add(r), i.set(t, r), UE(r).id = t, UE(r).isNew = !0, r
  35967. }
  35968. function KE(t, e, n, i) {
  35969. t && t.parent && ("group" === t.type && t.traverse((function (t) {
  35970. KE(t, e, n, i)
  35971. })), dR(t, e, i), n.removeKey(UE(t).id))
  35972. }
  35973. function $E(t, e, n, i) {
  35974. t.isGroup || E([
  35975. ["cursor", Da.prototype.cursor],
  35976. ["zlevel", i || 0],
  35977. ["z", n || 0],
  35978. ["z2", 0]
  35979. ], (function (n) {
  35980. var i = n[0];
  35981. _t(e, i) ? t[i] = rt(e[i], n[1]) : null == t[i] && (t[i] = n[1])
  35982. })), E(G(e), (function (n) {
  35983. if (0 === n.indexOf("on")) {
  35984. var i = e[n];
  35985. t[n] = X(i) ? i : null
  35986. }
  35987. })), _t(e, "draggable") && (t.draggable = e.draggable), null != e.name && (t.name = e.name), null != e.id && (t.id = e.id)
  35988. }
  35989. var JE = ["x", "y", "radius", "angle", "single"],
  35990. QE = ["cartesian2d", "polar", "singleAxis"];
  35991. function tz(t) {
  35992. return t + "Axis"
  35993. }
  35994. function ez(t, e) {
  35995. var n, i = yt(),
  35996. r = [],
  35997. o = yt();
  35998. t.eachComponent({
  35999. mainType: "dataZoom",
  36000. query: e
  36001. }, (function (t) {
  36002. o.get(t.uid) || s(t)
  36003. }));
  36004. do {
  36005. n = !1, t.eachComponent("dataZoom", a)
  36006. } while (n);
  36007. function a(t) {
  36008. !o.get(t.uid) && function (t) {
  36009. var e = !1;
  36010. return t.eachTargetAxis((function (t, n) {
  36011. var r = i.get(t);
  36012. r && r[n] && (e = !0)
  36013. })), e
  36014. }(t) && (s(t), n = !0)
  36015. }
  36016. function s(t) {
  36017. o.set(t.uid, !0), r.push(t), t.eachTargetAxis((function (t, e) {
  36018. (i.get(t) || i.set(t, []))[e] = !0
  36019. }))
  36020. }
  36021. return r
  36022. }
  36023. function nz(t) {
  36024. var e = t.ecModel,
  36025. n = {
  36026. infoList: [],
  36027. infoMap: yt()
  36028. };
  36029. return t.eachTargetAxis((function (t, i) {
  36030. var r = e.getComponent(tz(t), i);
  36031. if (r) {
  36032. var o = r.getCoordSysModel();
  36033. if (o) {
  36034. var a = o.uid,
  36035. s = n.infoMap.get(a);
  36036. s || (s = {
  36037. model: o,
  36038. axisModels: []
  36039. }, n.infoList.push(s), n.infoMap.set(a, s)), s.axisModels.push(r)
  36040. }
  36041. }
  36042. })), n
  36043. }
  36044. var iz = function () {
  36045. function t() {
  36046. this.indexList = [], this.indexMap = []
  36047. }
  36048. return t.prototype.add = function (t) {
  36049. this.indexMap[t] || (this.indexList.push(t), this.indexMap[t] = !0)
  36050. }, t
  36051. }(),
  36052. rz = function (t) {
  36053. function e() {
  36054. var n = null !== t && t.apply(this, arguments) || this;
  36055. return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n
  36056. }
  36057. return n(e, t), e.prototype.init = function (t, e, n) {
  36058. var i = oz(t);
  36059. this.settledOption = i, this.mergeDefaultAndTheme(t, n), this._doInit(i)
  36060. }, e.prototype.mergeOption = function (t) {
  36061. var e = oz(t);
  36062. C(this.option, t, !0), C(this.settledOption, e, !0), this._doInit(e)
  36063. }, e.prototype._doInit = function (t) {
  36064. var e = this.option;
  36065. this._setDefaultThrottle(t), this._updateRangeUse(t);
  36066. var n = this.settledOption;
  36067. E([
  36068. ["start", "startValue"],
  36069. ["end", "endValue"]
  36070. ], (function (t, i) {
  36071. "value" === this._rangePropMode[i] && (e[t[0]] = n[t[0]] = null)
  36072. }), this), this._resetTarget()
  36073. }, e.prototype._resetTarget = function () {
  36074. var t = this.get("orient", !0),
  36075. e = this._targetAxisInfoMap = yt();
  36076. this._fillSpecifiedTargetAxis(e) ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal", this._fillAutoTargetAxisByOrient(e, this._orient)), this._noTarget = !0, e.each((function (t) {
  36077. t.indexList.length && (this._noTarget = !1)
  36078. }), this)
  36079. }, e.prototype._fillSpecifiedTargetAxis = function (t) {
  36080. var e = !1;
  36081. return E(JE, (function (n) {
  36082. var i = this.getReferringComponents(tz(n), Ho);
  36083. if (i.specified) {
  36084. e = !0;
  36085. var r = new iz;
  36086. E(i.models, (function (t) {
  36087. r.add(t.componentIndex)
  36088. })), t.set(n, r)
  36089. }
  36090. }), this), e
  36091. }, e.prototype._fillAutoTargetAxisByOrient = function (t, e) {
  36092. var n = this.ecModel,
  36093. i = !0;
  36094. if (i) {
  36095. var r = "vertical" === e ? "y" : "x";
  36096. o(n.findComponents({
  36097. mainType: r + "Axis"
  36098. }), r)
  36099. }
  36100. i && o(n.findComponents({
  36101. mainType: "singleAxis",
  36102. filter: function (t) {
  36103. return t.get("orient", !0) === e
  36104. }
  36105. }), "single");
  36106. function o(e, n) {
  36107. var r = e[0];
  36108. if (r) {
  36109. var o = new iz;
  36110. if (o.add(r.componentIndex), t.set(n, o), i = !1, "x" === n || "y" === n) {
  36111. var a = r.getReferringComponents("grid", Wo).models[0];
  36112. a && E(e, (function (t) {
  36113. r.componentIndex !== t.componentIndex && a === t.getReferringComponents("grid", Wo).models[0] && o.add(t.componentIndex)
  36114. }))
  36115. }
  36116. }
  36117. }
  36118. i && E(JE, (function (e) {
  36119. if (i) {
  36120. var r = n.findComponents({
  36121. mainType: tz(e),
  36122. filter: function (t) {
  36123. return "category" === t.get("type", !0)
  36124. }
  36125. });
  36126. if (r[0]) {
  36127. var o = new iz;
  36128. o.add(r[0].componentIndex), t.set(e, o), i = !1
  36129. }
  36130. }
  36131. }), this)
  36132. }, e.prototype._makeAutoOrientByTargetAxis = function () {
  36133. var t;
  36134. return this.eachTargetAxis((function (e) {
  36135. !t && (t = e)
  36136. }), this), "y" === t ? "vertical" : "horizontal"
  36137. }, e.prototype._setDefaultThrottle = function (t) {
  36138. if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  36139. var e = this.ecModel.option;
  36140. this.option.throttle = e.animation && e.animationDurationUpdate > 0 ? 100 : 20
  36141. }
  36142. }, e.prototype._updateRangeUse = function (t) {
  36143. var e = this._rangePropMode,
  36144. n = this.get("rangeMode");
  36145. E([
  36146. ["start", "startValue"],
  36147. ["end", "endValue"]
  36148. ], (function (i, r) {
  36149. var o = null != t[i[0]],
  36150. a = null != t[i[1]];
  36151. o && !a ? e[r] = "percent" : !o && a ? e[r] = "value" : n ? e[r] = n[r] : o && (e[r] = "percent")
  36152. }))
  36153. }, e.prototype.noTarget = function () {
  36154. return this._noTarget
  36155. }, e.prototype.getFirstTargetAxisModel = function () {
  36156. var t;
  36157. return this.eachTargetAxis((function (e, n) {
  36158. null == t && (t = this.ecModel.getComponent(tz(e), n))
  36159. }), this), t
  36160. }, e.prototype.eachTargetAxis = function (t, e) {
  36161. this._targetAxisInfoMap.each((function (n, i) {
  36162. E(n.indexList, (function (n) {
  36163. t.call(e, i, n)
  36164. }))
  36165. }))
  36166. }, e.prototype.getAxisProxy = function (t, e) {
  36167. var n = this.getAxisModel(t, e);
  36168. if (n) return n.__dzAxisProxy
  36169. }, e.prototype.getAxisModel = function (t, e) {
  36170. var n = this._targetAxisInfoMap.get(t);
  36171. if (n && n.indexMap[e]) return this.ecModel.getComponent(tz(t), e)
  36172. }, e.prototype.setRawRange = function (t) {
  36173. var e = this.option,
  36174. n = this.settledOption;
  36175. E([
  36176. ["start", "startValue"],
  36177. ["end", "endValue"]
  36178. ], (function (i) {
  36179. null == t[i[0]] && null == t[i[1]] || (e[i[0]] = n[i[0]] = t[i[0]], e[i[1]] = n[i[1]] = t[i[1]])
  36180. }), this), this._updateRangeUse(t)
  36181. }, e.prototype.setCalculatedRange = function (t) {
  36182. var e = this.option;
  36183. E(["start", "startValue", "end", "endValue"], (function (n) {
  36184. e[n] = t[n]
  36185. }))
  36186. }, e.prototype.getPercentRange = function () {
  36187. var t = this.findRepresentativeAxisProxy();
  36188. if (t) return t.getDataPercentWindow()
  36189. }, e.prototype.getValueRange = function (t, e) {
  36190. if (null != t || null != e) return this.getAxisProxy(t, e).getDataValueWindow();
  36191. var n = this.findRepresentativeAxisProxy();
  36192. return n ? n.getDataValueWindow() : void 0
  36193. }, e.prototype.findRepresentativeAxisProxy = function (t) {
  36194. if (t) return t.__dzAxisProxy;
  36195. for (var e, n = this._targetAxisInfoMap.keys(), i = 0; i < n.length; i++)
  36196. for (var r = n[i], o = this._targetAxisInfoMap.get(r), a = 0; a < o.indexList.length; a++) {
  36197. var s = this.getAxisProxy(r, o.indexList[a]);
  36198. if (s.hostedBy(this)) return s;
  36199. e || (e = s)
  36200. }
  36201. return e
  36202. }, e.prototype.getRangePropMode = function () {
  36203. return this._rangePropMode.slice()
  36204. }, e.prototype.getOrient = function () {
  36205. return this._orient
  36206. }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
  36207. z: 4,
  36208. filterMode: "filter",
  36209. start: 0,
  36210. end: 100
  36211. }, e
  36212. }(zp);
  36213. function oz(t) {
  36214. var e = {};
  36215. return E(["start", "end", "startValue", "endValue", "throttle"], (function (n) {
  36216. t.hasOwnProperty(n) && (e[n] = t[n])
  36217. })), e
  36218. }
  36219. var az = function (t) {
  36220. function e() {
  36221. var n = null !== t && t.apply(this, arguments) || this;
  36222. return n.type = e.type, n
  36223. }
  36224. return n(e, t), e.type = "dataZoom.select", e
  36225. }(rz),
  36226. sz = function (t) {
  36227. function e() {
  36228. var n = null !== t && t.apply(this, arguments) || this;
  36229. return n.type = e.type, n
  36230. }
  36231. return n(e, t), e.prototype.render = function (t, e, n, i) {
  36232. this.dataZoomModel = t, this.ecModel = e, this.api = n
  36233. }, e.type = "dataZoom", e
  36234. }(Ag),
  36235. lz = function (t) {
  36236. function e() {
  36237. var n = null !== t && t.apply(this, arguments) || this;
  36238. return n.type = e.type, n
  36239. }
  36240. return n(e, t), e.type = "dataZoom.select", e
  36241. }(sz),
  36242. uz = E,
  36243. hz = Qr,
  36244. cz = function () {
  36245. function t(t, e, n, i) {
  36246. this._dimName = t, this._axisIndex = e, this.ecModel = i, this._dataZoomModel = n
  36247. }
  36248. return t.prototype.hostedBy = function (t) {
  36249. return this._dataZoomModel === t
  36250. }, t.prototype.getDataValueWindow = function () {
  36251. return this._valueWindow.slice()
  36252. }, t.prototype.getDataPercentWindow = function () {
  36253. return this._percentWindow.slice()
  36254. }, t.prototype.getTargetSeriesModels = function () {
  36255. var t = [];
  36256. return this.ecModel.eachSeries((function (e) {
  36257. if (function (t) {
  36258. var e = t.get("coordinateSystem");
  36259. return P(QE, e) >= 0
  36260. }(e)) {
  36261. var n = tz(this._dimName),
  36262. i = e.getReferringComponents(n, Wo).models[0];
  36263. i && this._axisIndex === i.componentIndex && t.push(e)
  36264. }
  36265. }), this), t
  36266. }, t.prototype.getAxisModel = function () {
  36267. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
  36268. }, t.prototype.getMinMaxSpan = function () {
  36269. return T(this._minMaxSpan)
  36270. }, t.prototype.calculateDataWindow = function (t) {
  36271. var e, n = this._dataExtent,
  36272. i = this.getAxisModel().axis.scale,
  36273. r = this._dataZoomModel.getRangePropMode(),
  36274. o = [0, 100],
  36275. a = [],
  36276. s = [];
  36277. uz(["start", "end"], (function (l, u) {
  36278. var h = t[l],
  36279. c = t[l + "Value"];
  36280. "percent" === r[u] ? (null == h && (h = o[u]), c = i.parse(Kr(h, o, n))) : (e = !0, h = Kr(c = null == c ? n[u] : i.parse(c), n, o)), s[u] = null == c || isNaN(c) ? n[u] : c, a[u] = null == h || isNaN(h) ? o[u] : h
  36281. })), hz(s), hz(a);
  36282. var l = this._minMaxSpan;
  36283. function u(t, e, n, r, o) {
  36284. var a = o ? "Span" : "ValueSpan";
  36285. Nk(0, t, n, "all", l["min" + a], l["max" + a]);
  36286. for (var s = 0; s < 2; s++) e[s] = Kr(t[s], n, r, !0), o && (e[s] = i.parse(e[s]))
  36287. }
  36288. return e ? u(s, a, n, o, !1) : u(a, s, o, n, !0), {
  36289. valueWindow: s,
  36290. percentWindow: a
  36291. }
  36292. }, t.prototype.reset = function (t) {
  36293. if (t === this._dataZoomModel) {
  36294. var e = this.getTargetSeriesModels();
  36295. this._dataExtent = function (t, e, n) {
  36296. var i = [1 / 0, -1 / 0];
  36297. uz(n, (function (t) {
  36298. ! function (t, e, n) {
  36299. e && E(C_(e, n), (function (n) {
  36300. var i = e.getApproximateExtent(n);
  36301. i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1])
  36302. }))
  36303. }(i, t.getData(), e)
  36304. }));
  36305. var r = t.getAxisModel(),
  36306. o = v_(r.axis.scale, r, i).calculate();
  36307. return [o.min, o.max]
  36308. }(this, this._dimName, e), this._updateMinMaxSpan();
  36309. var n = this.calculateDataWindow(t.settledOption);
  36310. this._valueWindow = n.valueWindow, this._percentWindow = n.percentWindow, this._setAxisModel()
  36311. }
  36312. }, t.prototype.filterData = function (t, e) {
  36313. if (t === this._dataZoomModel) {
  36314. var n = this._dimName,
  36315. i = this.getTargetSeriesModels(),
  36316. r = t.get("filterMode"),
  36317. o = this._valueWindow;
  36318. "none" !== r && uz(i, (function (t) {
  36319. var e = t.getData(),
  36320. i = e.mapDimensionsAll(n);
  36321. if (i.length) {
  36322. if ("weakFilter" === r) {
  36323. var a = e.getStore(),
  36324. s = z(i, (function (t) {
  36325. return e.getDimensionIndex(t)
  36326. }), e);
  36327. e.filterSelf((function (t) {
  36328. for (var e, n, r, l = 0; l < i.length; l++) {
  36329. var u = a.get(s[l], t),
  36330. h = !isNaN(u),
  36331. c = u < o[0],
  36332. p = u > o[1];
  36333. if (h && !c && !p) return !0;
  36334. h && (r = !0), c && (e = !0), p && (n = !0)
  36335. }
  36336. return r && e && n
  36337. }))
  36338. } else uz(i, (function (n) {
  36339. if ("empty" === r) t.setData(e = e.map(n, (function (t) {
  36340. return function (t) {
  36341. return t >= o[0] && t <= o[1]
  36342. }(t) ? t : NaN
  36343. })));
  36344. else {
  36345. var i = {};
  36346. i[n] = o, e.selectRange(i)
  36347. }
  36348. }));
  36349. uz(i, (function (t) {
  36350. e.setApproximateExtent(o, t)
  36351. }))
  36352. }
  36353. }))
  36354. }
  36355. }, t.prototype._updateMinMaxSpan = function () {
  36356. var t = this._minMaxSpan = {},
  36357. e = this._dataZoomModel,
  36358. n = this._dataExtent;
  36359. uz(["min", "max"], (function (i) {
  36360. var r = e.get(i + "Span"),
  36361. o = e.get(i + "ValueSpan");
  36362. null != o && (o = this.getAxisModel().axis.scale.parse(o)), null != o ? r = Kr(n[0] + o, n, [0, 100], !0) : null != r && (o = Kr(r, [0, 100], n, !0) - n[0]), t[i + "Span"] = r, t[i + "ValueSpan"] = o
  36363. }), this)
  36364. }, t.prototype._setAxisModel = function () {
  36365. var t = this.getAxisModel(),
  36366. e = this._percentWindow,
  36367. n = this._valueWindow;
  36368. if (e) {
  36369. var i = no(n, [0, 500]);
  36370. i = Math.min(i, 20);
  36371. var r = t.axis.scale.rawExtentInfo;
  36372. 0 !== e[0] && r.setDeterminedMinMax("min", +n[0].toFixed(i)), 100 !== e[1] && r.setDeterminedMinMax("max", +n[1].toFixed(i)), r.freeze()
  36373. }
  36374. }, t
  36375. }();
  36376. var pz = {
  36377. getTargetSeries: function (t) {
  36378. function e(e) {
  36379. t.eachComponent("dataZoom", (function (n) {
  36380. n.eachTargetAxis((function (i, r) {
  36381. var o = t.getComponent(tz(i), r);
  36382. e(i, r, o, n)
  36383. }))
  36384. }))
  36385. }
  36386. e((function (t, e, n, i) {
  36387. n.__dzAxisProxy = null
  36388. }));
  36389. var n = [];
  36390. e((function (e, i, r, o) {
  36391. r.__dzAxisProxy || (r.__dzAxisProxy = new cz(e, i, o, t), n.push(r.__dzAxisProxy))
  36392. }));
  36393. var i = yt();
  36394. return E(n, (function (t) {
  36395. E(t.getTargetSeriesModels(), (function (t) {
  36396. i.set(t.uid, t)
  36397. }))
  36398. })), i
  36399. },
  36400. overallReset: function (t, e) {
  36401. t.eachComponent("dataZoom", (function (t) {
  36402. t.eachTargetAxis((function (e, n) {
  36403. t.getAxisProxy(e, n).reset(t)
  36404. })), t.eachTargetAxis((function (n, i) {
  36405. t.getAxisProxy(n, i).filterData(t, e)
  36406. }))
  36407. })), t.eachComponent("dataZoom", (function (t) {
  36408. var e = t.findRepresentativeAxisProxy();
  36409. if (e) {
  36410. var n = e.getDataPercentWindow(),
  36411. i = e.getDataValueWindow();
  36412. t.setCalculatedRange({
  36413. start: n[0],
  36414. end: n[1],
  36415. startValue: i[0],
  36416. endValue: i[1]
  36417. })
  36418. }
  36419. }))
  36420. }
  36421. };
  36422. var dz = !1;
  36423. function fz(t) {
  36424. dz || (dz = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, pz), function (t) {
  36425. t.registerAction("dataZoom", (function (t, e) {
  36426. E(ez(e, t), (function (e) {
  36427. e.setRawRange({
  36428. start: t.start,
  36429. end: t.end,
  36430. startValue: t.startValue,
  36431. endValue: t.endValue
  36432. })
  36433. }))
  36434. }))
  36435. }(t), t.registerSubTypeDefaulter("dataZoom", (function () {
  36436. return "slider"
  36437. })))
  36438. }
  36439. function gz(t) {
  36440. t.registerComponentModel(az), t.registerComponentView(lz), fz(t)
  36441. }
  36442. var yz = function () {},
  36443. vz = {};
  36444. function mz(t, e) {
  36445. vz[t] = e
  36446. }
  36447. function xz(t) {
  36448. return vz[t]
  36449. }
  36450. var _z = function (t) {
  36451. function e() {
  36452. var n = null !== t && t.apply(this, arguments) || this;
  36453. return n.type = e.type, n
  36454. }
  36455. return n(e, t), e.prototype.optionUpdated = function () {
  36456. t.prototype.optionUpdated.apply(this, arguments);
  36457. var e = this.ecModel;
  36458. E(this.option.feature, (function (t, n) {
  36459. var i = xz(n);
  36460. i && (i.getDefaultOption && (i.defaultOption = i.getDefaultOption(e)), C(t, i.defaultOption))
  36461. }))
  36462. }, e.type = "toolbox", e.layoutMode = {
  36463. type: "box",
  36464. ignoreSize: !0
  36465. }, e.defaultOption = {
  36466. show: !0,
  36467. z: 6,
  36468. orient: "horizontal",
  36469. left: "right",
  36470. top: "top",
  36471. backgroundColor: "transparent",
  36472. borderColor: "#ccc",
  36473. borderRadius: 0,
  36474. borderWidth: 0,
  36475. padding: 5,
  36476. itemSize: 15,
  36477. itemGap: 8,
  36478. showTitle: !0,
  36479. iconStyle: {
  36480. borderColor: "#666",
  36481. color: "none"
  36482. },
  36483. emphasis: {
  36484. iconStyle: {
  36485. borderColor: "#3E98C5"
  36486. }
  36487. },
  36488. tooltip: {
  36489. show: !1,
  36490. position: "bottom"
  36491. }
  36492. }, e
  36493. }(zp);
  36494. function bz(t, e) {
  36495. var n = vp(e.get("padding")),
  36496. i = e.getItemStyle(["color", "opacity"]);
  36497. return i.fill = e.get("backgroundColor"), t = new Ws({
  36498. shape: {
  36499. x: t.x - n[3],
  36500. y: t.y - n[0],
  36501. width: t.width + n[1] + n[3],
  36502. height: t.height + n[0] + n[2],
  36503. r: e.get("borderRadius")
  36504. },
  36505. style: i,
  36506. silent: !0,
  36507. z2: -1
  36508. })
  36509. }
  36510. var wz = function (t) {
  36511. function e() {
  36512. return null !== t && t.apply(this, arguments) || this
  36513. }
  36514. return n(e, t), e.prototype.render = function (t, e, n, i) {
  36515. var r = this.group;
  36516. if (r.removeAll(), t.get("show")) {
  36517. var o = +t.get("itemSize"),
  36518. a = "vertical" === t.get("orient"),
  36519. s = t.get("feature") || {},
  36520. l = this._features || (this._features = {}),
  36521. u = [];
  36522. E(s, (function (t, e) {
  36523. u.push(e)
  36524. })), new Gm(this._featureNames || [], u).add(h).update(h).remove(H(h, null)).execute(), this._featureNames = u,
  36525. function (t, e, n) {
  36526. var i = e.getBoxLayoutParams(),
  36527. r = e.get("padding"),
  36528. o = {
  36529. width: n.getWidth(),
  36530. height: n.getHeight()
  36531. },
  36532. a = kp(i, o, r);
  36533. Ap(e.get("orient"), t, e.get("itemGap"), a.width, a.height), Lp(t, i, o, r)
  36534. }(r, t, n), r.add(bz(r.getBoundingRect(), t)), a || r.eachChild((function (t) {
  36535. var e = t.__title,
  36536. i = t.ensureState("emphasis"),
  36537. a = i.textConfig || (i.textConfig = {}),
  36538. s = t.getTextContent(),
  36539. l = s && s.ensureState("emphasis");
  36540. if (l && !X(l) && e) {
  36541. var u = l.style || (l.style = {}),
  36542. h = Sr(e, Xs.makeFont(u)),
  36543. c = t.x + r.x,
  36544. p = !1;
  36545. t.y + r.y + o + h.height > n.getHeight() && (a.position = "top", p = !0);
  36546. var d = p ? -5 - h.height : o + 10;
  36547. c + h.width / 2 > n.getWidth() ? (a.position = ["100%", d], u.align = "right") : c - h.width / 2 < 0 && (a.position = [0, d], u.align = "left")
  36548. }
  36549. }))
  36550. }
  36551. function h(h, c) {
  36552. var p, d = u[h],
  36553. f = u[c],
  36554. g = s[d],
  36555. y = new Cc(g, t, t.ecModel);
  36556. if (i && null != i.newTitle && i.featureName === d && (g.title = i.newTitle), d && !f) {
  36557. if (function (t) {
  36558. return 0 === t.indexOf("my")
  36559. }(d)) p = {
  36560. onclick: y.option.onclick,
  36561. featureName: d
  36562. };
  36563. else {
  36564. var v = xz(d);
  36565. if (!v) return;
  36566. p = new v
  36567. }
  36568. l[d] = p
  36569. } else if (!(p = l[f])) return;
  36570. p.uid = Ac("toolbox-feature"), p.model = y, p.ecModel = e, p.api = n;
  36571. var m = p instanceof yz;
  36572. d || !f ? !y.get("show") || m && p.unusable ? m && p.remove && p.remove(e, n) : (! function (i, s, l) {
  36573. var u, h, c = i.getModel("iconStyle"),
  36574. p = i.getModel(["emphasis", "iconStyle"]),
  36575. d = s instanceof yz && s.getIcons ? s.getIcons() : i.get("icon"),
  36576. f = i.get("title") || {};
  36577. U(d) ? (u = {})[l] = d : u = d;
  36578. U(f) ? (h = {})[l] = f : h = f;
  36579. var g = i.iconPaths = {};
  36580. E(u, (function (l, u) {
  36581. var d = Uh(l, {}, {
  36582. x: -o / 2,
  36583. y: -o / 2,
  36584. width: o,
  36585. height: o
  36586. });
  36587. d.setStyle(c.getItemStyle()), d.ensureState("emphasis").style = p.getItemStyle();
  36588. var f = new Xs({
  36589. style: {
  36590. text: h[u],
  36591. align: p.get("textAlign"),
  36592. borderRadius: p.get("textBorderRadius"),
  36593. padding: p.get("textPadding"),
  36594. fill: null,
  36595. font: cc({
  36596. fontStyle: p.get("textFontStyle"),
  36597. fontFamily: p.get("textFontFamily"),
  36598. fontSize: p.get("textFontSize"),
  36599. fontWeight: p.get("textFontWeight")
  36600. }, e)
  36601. },
  36602. ignore: !0
  36603. });
  36604. d.setTextContent(f), Kh({
  36605. el: d,
  36606. componentModel: t,
  36607. itemName: u,
  36608. formatterParamsExtra: {
  36609. title: h[u]
  36610. }
  36611. }), d.__title = h[u], d.on("mouseover", (function () {
  36612. var e = p.getItemStyle(),
  36613. i = a ? null == t.get("right") && "right" !== t.get("left") ? "right" : "left" : null == t.get("bottom") && "bottom" !== t.get("top") ? "bottom" : "top";
  36614. f.setStyle({
  36615. fill: p.get("textFill") || e.fill || e.stroke || "#000",
  36616. backgroundColor: p.get("textBackgroundColor")
  36617. }), d.setTextConfig({
  36618. position: p.get("textPosition") || i
  36619. }), f.ignore = !t.get("showTitle"), n.enterEmphasis(this)
  36620. })).on("mouseout", (function () {
  36621. "emphasis" !== i.get(["iconStatus", u]) && n.leaveEmphasis(this), f.hide()
  36622. })), ("emphasis" === i.get(["iconStatus", u]) ? Ol : Rl)(d), r.add(d), d.on("click", W(s.onclick, s, e, n, u)), g[u] = d
  36623. }))
  36624. }(y, p, d), y.setIconStatus = function (t, e) {
  36625. var n = this.option,
  36626. i = this.iconPaths;
  36627. n.iconStatus = n.iconStatus || {}, n.iconStatus[t] = e, i[t] && ("emphasis" === e ? Ol : Rl)(i[t])
  36628. }, p instanceof yz && p.render && p.render(y, e, n, i)) : m && p.dispose && p.dispose(e, n)
  36629. }
  36630. }, e.prototype.updateView = function (t, e, n, i) {
  36631. E(this._features, (function (t) {
  36632. t instanceof yz && t.updateView && t.updateView(t.model, e, n, i)
  36633. }))
  36634. }, e.prototype.remove = function (t, e) {
  36635. E(this._features, (function (n) {
  36636. n instanceof yz && n.remove && n.remove(t, e)
  36637. })), this.group.removeAll()
  36638. }, e.prototype.dispose = function (t, e) {
  36639. E(this._features, (function (n) {
  36640. n instanceof yz && n.dispose && n.dispose(t, e)
  36641. }))
  36642. }, e.type = "toolbox", e
  36643. }(Ag);
  36644. var Sz = function (t) {
  36645. function e() {
  36646. return null !== t && t.apply(this, arguments) || this
  36647. }
  36648. return n(e, t), e.prototype.onclick = function (t, e) {
  36649. var n = this.model,
  36650. i = n.get("name") || t.get("title.0.text") || "echarts",
  36651. o = "svg" === e.getZr().painter.getType(),
  36652. a = o ? "svg" : n.get("type", !0) || "png",
  36653. s = e.getConnectedDataURL({
  36654. type: a,
  36655. backgroundColor: n.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
  36656. connectedBackgroundColor: n.get("connectedBackgroundColor"),
  36657. excludeComponents: n.get("excludeComponents"),
  36658. pixelRatio: n.get("pixelRatio")
  36659. }),
  36660. l = r.browser;
  36661. if (X(MouseEvent) && (l.newEdge || !l.ie && !l.edge)) {
  36662. var u = document.createElement("a");
  36663. u.download = i + "." + a, u.target = "_blank", u.href = s;
  36664. var h = new MouseEvent("click", {
  36665. view: document.defaultView,
  36666. bubbles: !0,
  36667. cancelable: !1
  36668. });
  36669. u.dispatchEvent(h)
  36670. } else if (window.navigator.msSaveOrOpenBlob || o) {
  36671. var c = s.split(","),
  36672. p = c[0].indexOf("base64") > -1,
  36673. d = o ? decodeURIComponent(c[1]) : c[1];
  36674. p && (d = window.atob(d));
  36675. var f = i + "." + a;
  36676. if (window.navigator.msSaveOrOpenBlob) {
  36677. for (var g = d.length, y = new Uint8Array(g); g--;) y[g] = d.charCodeAt(g);
  36678. var v = new Blob([y]);
  36679. window.navigator.msSaveOrOpenBlob(v, f)
  36680. } else {
  36681. var m = document.createElement("iframe");
  36682. document.body.appendChild(m);
  36683. var x = m.contentWindow,
  36684. _ = x.document;
  36685. _.open("image/svg+xml", "replace"), _.write(d), _.close(), x.focus(), _.execCommand("SaveAs", !0, f), document.body.removeChild(m)
  36686. }
  36687. } else {
  36688. var b = n.get("lang"),
  36689. w = '<body style="margin:0;"><img src="' + s + '" style="max-width:100%;" title="' + (b && b[0] || "") + '" /></body>',
  36690. S = window.open();
  36691. S.document.write(w), S.document.title = i
  36692. }
  36693. }, e.getDefaultOption = function (t) {
  36694. return {
  36695. show: !0,
  36696. icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
  36697. title: t.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  36698. type: "png",
  36699. connectedBackgroundColor: "#fff",
  36700. name: "",
  36701. excludeComponents: ["toolbox"],
  36702. lang: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  36703. }
  36704. }, e
  36705. }(yz),
  36706. Mz = "__ec_magicType_stack__",
  36707. Iz = [
  36708. ["line", "bar"],
  36709. ["stack"]
  36710. ],
  36711. Tz = function (t) {
  36712. function e() {
  36713. return null !== t && t.apply(this, arguments) || this
  36714. }
  36715. return n(e, t), e.prototype.getIcons = function () {
  36716. var t = this.model,
  36717. e = t.get("icon"),
  36718. n = {};
  36719. return E(t.get("type"), (function (t) {
  36720. e[t] && (n[t] = e[t])
  36721. })), n
  36722. }, e.getDefaultOption = function (t) {
  36723. return {
  36724. show: !0,
  36725. type: [],
  36726. icon: {
  36727. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  36728. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  36729. stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
  36730. },
  36731. title: t.getLocaleModel().get(["toolbox", "magicType", "title"]),
  36732. option: {},
  36733. seriesIndex: {}
  36734. }
  36735. }, e.prototype.onclick = function (t, e, n) {
  36736. var i = this.model,
  36737. r = i.get(["seriesIndex", n]);
  36738. if (Cz[n]) {
  36739. var o, a = {
  36740. series: []
  36741. };
  36742. E(Iz, (function (t) {
  36743. P(t, n) >= 0 && E(t, (function (t) {
  36744. i.setIconStatus(t, "normal")
  36745. }))
  36746. })), i.setIconStatus(n, "emphasis"), t.eachComponent({
  36747. mainType: "series",
  36748. query: null == r ? null : {
  36749. seriesIndex: r
  36750. }
  36751. }, (function (t) {
  36752. var e = t.subType,
  36753. r = t.id,
  36754. o = Cz[n](e, r, t, i);
  36755. o && (k(o, t.option), a.series.push(o));
  36756. var s = t.coordinateSystem;
  36757. if (s && "cartesian2d" === s.type && ("line" === n || "bar" === n)) {
  36758. var l = s.getAxesByScale("ordinal")[0];
  36759. if (l) {
  36760. var u = l.dim + "Axis",
  36761. h = t.getReferringComponents(u, Wo).models[0].componentIndex;
  36762. a[u] = a[u] || [];
  36763. for (var c = 0; c <= h; c++) a[u][h] = a[u][h] || {};
  36764. a[u][h].boundaryGap = "bar" === n
  36765. }
  36766. }
  36767. }));
  36768. var s = n;
  36769. "stack" === n && (o = C({
  36770. stack: i.option.title.tiled,
  36771. tiled: i.option.title.stack
  36772. }, i.option.title), "emphasis" !== i.get(["iconStatus", n]) && (s = "tiled")), e.dispatchAction({
  36773. type: "changeMagicType",
  36774. currentType: s,
  36775. newOption: a,
  36776. newTitle: o,
  36777. featureName: "magicType"
  36778. })
  36779. }
  36780. }, e
  36781. }(yz),
  36782. Cz = {
  36783. line: function (t, e, n, i) {
  36784. if ("bar" === t) return C({
  36785. id: e,
  36786. type: "line",
  36787. data: n.get("data"),
  36788. stack: n.get("stack"),
  36789. markPoint: n.get("markPoint"),
  36790. markLine: n.get("markLine")
  36791. }, i.get(["option", "line"]) || {}, !0)
  36792. },
  36793. bar: function (t, e, n, i) {
  36794. if ("line" === t) return C({
  36795. id: e,
  36796. type: "bar",
  36797. data: n.get("data"),
  36798. stack: n.get("stack"),
  36799. markPoint: n.get("markPoint"),
  36800. markLine: n.get("markLine")
  36801. }, i.get(["option", "bar"]) || {}, !0)
  36802. },
  36803. stack: function (t, e, n, i) {
  36804. var r = n.get("stack") === Mz;
  36805. if ("line" === t || "bar" === t) return i.setIconStatus("stack", r ? "normal" : "emphasis"), C({
  36806. id: e,
  36807. stack: r ? "" : Mz
  36808. }, i.get(["option", "stack"]) || {}, !0)
  36809. }
  36810. };
  36811. Cm({
  36812. type: "changeMagicType",
  36813. event: "magicTypeChanged",
  36814. update: "prepareAndUpdate"
  36815. }, (function (t, e) {
  36816. e.mergeOption(t.newOption)
  36817. }));
  36818. var Dz = new Array(60).join("-"),
  36819. Az = "\t";
  36820. function kz(t) {
  36821. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
  36822. }
  36823. var Lz = new RegExp("[\t]+", "g");
  36824. function Pz(t, e) {
  36825. var n = t.split(new RegExp("\n*" + Dz + "\n*", "g")),
  36826. i = {
  36827. series: []
  36828. };
  36829. return E(n, (function (t, n) {
  36830. if (function (t) {
  36831. if (t.slice(0, t.indexOf("\n")).indexOf(Az) >= 0) return !0
  36832. }(t)) {
  36833. var r = function (t) {
  36834. for (var e = t.split(/\n+/g), n = [], i = z(kz(e.shift()).split(Lz), (function (t) {
  36835. return {
  36836. name: t,
  36837. data: []
  36838. }
  36839. })), r = 0; r < e.length; r++) {
  36840. var o = kz(e[r]).split(Lz);
  36841. n.push(o.shift());
  36842. for (var a = 0; a < o.length; a++) i[a] && (i[a].data[r] = o[a])
  36843. }
  36844. return {
  36845. series: i,
  36846. categories: n
  36847. }
  36848. }(t),
  36849. o = e[n],
  36850. a = o.axisDim + "Axis";
  36851. o && (i[a] = i[a] || [], i[a][o.axisIndex] = {
  36852. data: r.categories
  36853. }, i.series = i.series.concat(r.series))
  36854. } else {
  36855. r = function (t) {
  36856. for (var e = t.split(/\n+/g), n = kz(e.shift()), i = [], r = 0; r < e.length; r++) {
  36857. var o = kz(e[r]);
  36858. if (o) {
  36859. var a = o.split(Lz),
  36860. s = "",
  36861. l = void 0,
  36862. u = !1;
  36863. isNaN(a[0]) ? (u = !0, s = a[0], a = a.slice(1), i[r] = {
  36864. name: s,
  36865. value: []
  36866. }, l = i[r].value) : l = i[r] = [];
  36867. for (var h = 0; h < a.length; h++) l.push(+a[h]);
  36868. 1 === l.length && (u ? i[r].value = l[0] : i[r] = l[0])
  36869. }
  36870. }
  36871. return {
  36872. name: n,
  36873. data: i
  36874. }
  36875. }(t);
  36876. i.series.push(r)
  36877. }
  36878. })), i
  36879. }
  36880. var Oz = function (t) {
  36881. function e() {
  36882. return null !== t && t.apply(this, arguments) || this
  36883. }
  36884. return n(e, t), e.prototype.onclick = function (t, e) {
  36885. setTimeout((function () {
  36886. e.dispatchAction({
  36887. type: "hideTip"
  36888. })
  36889. }));
  36890. var n = e.getDom(),
  36891. i = this.model;
  36892. this._dom && n.removeChild(this._dom);
  36893. var r = document.createElement("div");
  36894. r.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", r.style.backgroundColor = i.get("backgroundColor") || "#fff";
  36895. var o = document.createElement("h4"),
  36896. a = i.get("lang") || [];
  36897. o.innerHTML = a[0] || i.get("title"), o.style.cssText = "margin:10px 20px", o.style.color = i.get("textColor");
  36898. var s = document.createElement("div"),
  36899. l = document.createElement("textarea");
  36900. s.style.cssText = "overflow:auto";
  36901. var u = i.get("optionToContent"),
  36902. h = i.get("contentToOption"),
  36903. c = function (t) {
  36904. var e, n, i, r = function (t) {
  36905. var e = {},
  36906. n = [],
  36907. i = [];
  36908. return t.eachRawSeries((function (t) {
  36909. var r = t.coordinateSystem;
  36910. if (!r || "cartesian2d" !== r.type && "polar" !== r.type) n.push(t);
  36911. else {
  36912. var o = r.getBaseAxis();
  36913. if ("category" === o.type) {
  36914. var a = o.dim + "_" + o.index;
  36915. e[a] || (e[a] = {
  36916. categoryAxis: o,
  36917. valueAxis: r.getOtherAxis(o),
  36918. series: []
  36919. }, i.push({
  36920. axisDim: o.dim,
  36921. axisIndex: o.index
  36922. })), e[a].series.push(t)
  36923. } else n.push(t)
  36924. }
  36925. })), {
  36926. seriesGroupByCategoryAxis: e,
  36927. other: n,
  36928. meta: i
  36929. }
  36930. }(t);
  36931. return {
  36932. value: B([(n = r.seriesGroupByCategoryAxis, i = [], E(n, (function (t, e) {
  36933. var n = t.categoryAxis,
  36934. r = t.valueAxis.dim,
  36935. o = [" "].concat(z(t.series, (function (t) {
  36936. return t.name
  36937. }))),
  36938. a = [n.model.getCategories()];
  36939. E(t.series, (function (t) {
  36940. var e = t.getRawData();
  36941. a.push(t.getRawData().mapArray(e.mapDimension(r), (function (t) {
  36942. return t
  36943. })))
  36944. }));
  36945. for (var s = [o.join(Az)], l = 0; l < a[0].length; l++) {
  36946. for (var u = [], h = 0; h < a.length; h++) u.push(a[h][l]);
  36947. s.push(u.join(Az))
  36948. }
  36949. i.push(s.join("\n"))
  36950. })), i.join("\n\n" + Dz + "\n\n")), (e = r.other, z(e, (function (t) {
  36951. var e = t.getRawData(),
  36952. n = [t.name],
  36953. i = [];
  36954. return e.each(e.dimensions, (function () {
  36955. for (var t = arguments.length, r = arguments[t - 1], o = e.getName(r), a = 0; a < t - 1; a++) i[a] = arguments[a];
  36956. n.push((o ? o + Az : "") + i.join(Az))
  36957. })), n.join("\n")
  36958. })).join("\n\n" + Dz + "\n\n"))], (function (t) {
  36959. return !!t.replace(/[\n\t\s]/g, "")
  36960. })).join("\n\n" + Dz + "\n\n"),
  36961. meta: r.meta
  36962. }
  36963. }(t);
  36964. if (X(u)) {
  36965. var p = u(e.getOption());
  36966. U(p) ? s.innerHTML = p : J(p) && s.appendChild(p)
  36967. } else {
  36968. l.readOnly = i.get("readOnly");
  36969. var d = l.style;
  36970. d.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", d.color = i.get("textColor"), d.borderColor = i.get("textareaBorderColor"), d.backgroundColor = i.get("textareaColor"), l.value = c.value, s.appendChild(l)
  36971. }
  36972. var f = c.meta,
  36973. g = document.createElement("div");
  36974. g.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  36975. var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",
  36976. v = document.createElement("div"),
  36977. m = document.createElement("div");
  36978. y += ";background-color:" + i.get("buttonColor"), y += ";color:" + i.get("buttonTextColor");
  36979. var x = this;
  36980. function _() {
  36981. n.removeChild(r), x._dom = null
  36982. }
  36983. pe(v, "click", _), pe(m, "click", (function () {
  36984. if (null == h && null != u || null != h && null == u) _();
  36985. else {
  36986. var t;
  36987. try {
  36988. t = X(h) ? h(s, e.getOption()) : Pz(l.value, f)
  36989. } catch (t) {
  36990. throw _(), new Error("Data view format error " + t)
  36991. }
  36992. t && e.dispatchAction({
  36993. type: "changeDataView",
  36994. newOption: t
  36995. }), _()
  36996. }
  36997. })), v.innerHTML = a[1], m.innerHTML = a[2], m.style.cssText = v.style.cssText = y, !i.get("readOnly") && g.appendChild(m), g.appendChild(v), r.appendChild(o), r.appendChild(s), r.appendChild(g), s.style.height = n.clientHeight - 80 + "px", n.appendChild(r), this._dom = r
  36998. }, e.prototype.remove = function (t, e) {
  36999. this._dom && e.getDom().removeChild(this._dom)
  37000. }, e.prototype.dispose = function (t, e) {
  37001. this.remove(t, e)
  37002. }, e.getDefaultOption = function (t) {
  37003. return {
  37004. show: !0,
  37005. readOnly: !1,
  37006. optionToContent: null,
  37007. contentToOption: null,
  37008. icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
  37009. title: t.getLocaleModel().get(["toolbox", "dataView", "title"]),
  37010. lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  37011. backgroundColor: "#fff",
  37012. textColor: "#000",
  37013. textareaColor: "#fff",
  37014. textareaBorderColor: "#333",
  37015. buttonColor: "#c23531",
  37016. buttonTextColor: "#fff"
  37017. }
  37018. }, e
  37019. }(yz);
  37020. function Rz(t, e) {
  37021. return z(t, (function (t, n) {
  37022. var i = e && e[n];
  37023. if (q(i) && !Y(i)) {
  37024. q(t) && !Y(t) || (t = {
  37025. value: t
  37026. });
  37027. var r = null != i.name && null == t.name;
  37028. return t = k(t, i), r && delete t.name, t
  37029. }
  37030. return t
  37031. }))
  37032. }
  37033. Cm({
  37034. type: "changeDataView",
  37035. event: "dataViewChanged",
  37036. update: "prepareAndUpdate"
  37037. }, (function (t, e) {
  37038. var n = [];
  37039. E(t.newOption.series, (function (t) {
  37040. var i = e.getSeriesByName(t.name)[0];
  37041. if (i) {
  37042. var r = i.get("data");
  37043. n.push({
  37044. name: t.name,
  37045. data: Rz(t.data, r)
  37046. })
  37047. } else n.push(A({
  37048. type: "scatter"
  37049. }, t))
  37050. })), e.mergeOption(k({
  37051. series: n
  37052. }, t.newOption))
  37053. }));
  37054. var Nz = E,
  37055. Ez = Vo();
  37056. function zz(t) {
  37057. var e = Ez(t);
  37058. return e.snapshots || (e.snapshots = [{}]), e.snapshots
  37059. }
  37060. var Vz = function (t) {
  37061. function e() {
  37062. return null !== t && t.apply(this, arguments) || this
  37063. }
  37064. return n(e, t), e.prototype.onclick = function (t, e) {
  37065. ! function (t) {
  37066. Ez(t).snapshots = null
  37067. }(t), e.dispatchAction({
  37068. type: "restore",
  37069. from: this.uid
  37070. })
  37071. }, e.getDefaultOption = function (t) {
  37072. return {
  37073. show: !0,
  37074. icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
  37075. title: t.getLocaleModel().get(["toolbox", "restore", "title"])
  37076. }
  37077. }, e
  37078. }(yz);
  37079. Cm({
  37080. type: "restore",
  37081. event: "restore",
  37082. update: "prepareAndUpdate"
  37083. }, (function (t, e) {
  37084. e.resetOption("recreate")
  37085. }));
  37086. var Bz = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"],
  37087. Fz = function () {
  37088. function t(t, e, n) {
  37089. var i = this;
  37090. this._targetInfoList = [];
  37091. var r = Wz(e, t);
  37092. E(Hz, (function (t, e) {
  37093. (!n || !n.include || P(n.include, e) >= 0) && t(r, i._targetInfoList)
  37094. }))
  37095. }
  37096. return t.prototype.setOutputRanges = function (t, e) {
  37097. return this.matchOutputRanges(t, e, (function (t, e, n) {
  37098. if ((t.coordRanges || (t.coordRanges = [])).push(e), !t.coordRange) {
  37099. t.coordRange = e;
  37100. var i = Uz[t.brushType](0, n, e);
  37101. t.__rangeOffset = {
  37102. offset: jz[t.brushType](i.values, t.range, [1, 1]),
  37103. xyMinMax: i.xyMinMax
  37104. }
  37105. }
  37106. })), t
  37107. }, t.prototype.matchOutputRanges = function (t, e, n) {
  37108. E(t, (function (t) {
  37109. var i = this.findTargetInfo(t, e);
  37110. i && !0 !== i && E(i.coordSyses, (function (i) {
  37111. var r = Uz[t.brushType](1, i, t.range, !0);
  37112. n(t, r.values, i, e)
  37113. }))
  37114. }), this)
  37115. }, t.prototype.setInputRanges = function (t, e) {
  37116. E(t, (function (t) {
  37117. var n, i, r, o, a, s = this.findTargetInfo(t, e);
  37118. if (t.range = t.range || [], s && !0 !== s) {
  37119. t.panelId = s.panelId;
  37120. var l = Uz[t.brushType](0, s.coordSys, t.coordRange),
  37121. u = t.__rangeOffset;
  37122. t.range = u ? jz[t.brushType](l.values, u.offset, (n = l.xyMinMax, i = u.xyMinMax, r = Kz(n), o = Kz(i), a = [r[0] / o[0], r[1] / o[1]], isNaN(a[0]) && (a[0] = 1), isNaN(a[1]) && (a[1] = 1), a)) : l.values
  37123. }
  37124. }), this)
  37125. }, t.prototype.makePanelOpts = function (t, e) {
  37126. return z(this._targetInfoList, (function (n) {
  37127. var i = n.getPanelRect();
  37128. return {
  37129. panelId: n.panelId,
  37130. defaultBrushType: e ? e(n) : null,
  37131. clipPath: zL(i),
  37132. isTargetByCursor: BL(i, t, n.coordSysModel),
  37133. getLinearBrushOtherExtent: VL(i)
  37134. }
  37135. }))
  37136. }, t.prototype.controlSeries = function (t, e, n) {
  37137. var i = this.findTargetInfo(t, n);
  37138. return !0 === i || i && P(i.coordSyses, e.coordinateSystem) >= 0
  37139. }, t.prototype.findTargetInfo = function (t, e) {
  37140. for (var n = this._targetInfoList, i = Wz(e, t), r = 0; r < n.length; r++) {
  37141. var o = n[r],
  37142. a = t.panelId;
  37143. if (a) {
  37144. if (o.panelId === a) return o
  37145. } else
  37146. for (var s = 0; s < Yz.length; s++)
  37147. if (Yz[s](i, o)) return o
  37148. }
  37149. return !0
  37150. }, t
  37151. }();
  37152. function Gz(t) {
  37153. return t[0] > t[1] && t.reverse(), t
  37154. }
  37155. function Wz(t, e) {
  37156. return Fo(t, e, {
  37157. includeMainTypes: Bz
  37158. })
  37159. }
  37160. var Hz = {
  37161. grid: function (t, e) {
  37162. var n = t.xAxisModels,
  37163. i = t.yAxisModels,
  37164. r = t.gridModels,
  37165. o = yt(),
  37166. a = {},
  37167. s = {};
  37168. (n || i || r) && (E(n, (function (t) {
  37169. var e = t.axis.grid.model;
  37170. o.set(e.id, e), a[e.id] = !0
  37171. })), E(i, (function (t) {
  37172. var e = t.axis.grid.model;
  37173. o.set(e.id, e), s[e.id] = !0
  37174. })), E(r, (function (t) {
  37175. o.set(t.id, t), a[t.id] = !0, s[t.id] = !0
  37176. })), o.each((function (t) {
  37177. var r = t.coordinateSystem,
  37178. o = [];
  37179. E(r.getCartesians(), (function (t, e) {
  37180. (P(n, t.getAxis("x").model) >= 0 || P(i, t.getAxis("y").model) >= 0) && o.push(t)
  37181. })), e.push({
  37182. panelId: "grid--" + t.id,
  37183. gridModel: t,
  37184. coordSysModel: t,
  37185. coordSys: o[0],
  37186. coordSyses: o,
  37187. getPanelRect: Xz.grid,
  37188. xAxisDeclared: a[t.id],
  37189. yAxisDeclared: s[t.id]
  37190. })
  37191. })))
  37192. },
  37193. geo: function (t, e) {
  37194. E(t.geoModels, (function (t) {
  37195. var n = t.coordinateSystem;
  37196. e.push({
  37197. panelId: "geo--" + t.id,
  37198. geoModel: t,
  37199. coordSysModel: t,
  37200. coordSys: n,
  37201. coordSyses: [n],
  37202. getPanelRect: Xz.geo
  37203. })
  37204. }))
  37205. }
  37206. },
  37207. Yz = [function (t, e) {
  37208. var n = t.xAxisModel,
  37209. i = t.yAxisModel,
  37210. r = t.gridModel;
  37211. return !r && n && (r = n.axis.grid.model), !r && i && (r = i.axis.grid.model), r && r === e.gridModel
  37212. }, function (t, e) {
  37213. var n = t.geoModel;
  37214. return n && n === e.geoModel
  37215. }],
  37216. Xz = {
  37217. grid: function () {
  37218. return this.coordSys.master.getRect().clone()
  37219. },
  37220. geo: function () {
  37221. var t = this.coordSys,
  37222. e = t.getBoundingRect().clone();
  37223. return e.applyTransform(Bh(t)), e
  37224. }
  37225. },
  37226. Uz = {
  37227. lineX: H(Zz, 0),
  37228. lineY: H(Zz, 1),
  37229. rect: function (t, e, n, i) {
  37230. var r = t ? e.pointToData([n[0][0], n[1][0]], i) : e.dataToPoint([n[0][0], n[1][0]], i),
  37231. o = t ? e.pointToData([n[0][1], n[1][1]], i) : e.dataToPoint([n[0][1], n[1][1]], i),
  37232. a = [Gz([r[0], o[0]]), Gz([r[1], o[1]])];
  37233. return {
  37234. values: a,
  37235. xyMinMax: a
  37236. }
  37237. },
  37238. polygon: function (t, e, n, i) {
  37239. var r = [
  37240. [1 / 0, -1 / 0],
  37241. [1 / 0, -1 / 0]
  37242. ];
  37243. return {
  37244. values: z(n, (function (n) {
  37245. var o = t ? e.pointToData(n, i) : e.dataToPoint(n, i);
  37246. return r[0][0] = Math.min(r[0][0], o[0]), r[1][0] = Math.min(r[1][0], o[1]), r[0][1] = Math.max(r[0][1], o[0]), r[1][1] = Math.max(r[1][1], o[1]), o
  37247. })),
  37248. xyMinMax: r
  37249. }
  37250. }
  37251. };
  37252. function Zz(t, e, n, i) {
  37253. var r = n.getAxis(["x", "y"][t]),
  37254. o = Gz(z([0, 1], (function (t) {
  37255. return e ? r.coordToData(r.toLocalCoord(i[t]), !0) : r.toGlobalCoord(r.dataToCoord(i[t]))
  37256. }))),
  37257. a = [];
  37258. return a[t] = o, a[1 - t] = [NaN, NaN], {
  37259. values: o,
  37260. xyMinMax: a
  37261. }
  37262. }
  37263. var jz = {
  37264. lineX: H(qz, 0),
  37265. lineY: H(qz, 1),
  37266. rect: function (t, e, n) {
  37267. return [
  37268. [t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]],
  37269. [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]
  37270. ]
  37271. },
  37272. polygon: function (t, e, n) {
  37273. return z(t, (function (t, i) {
  37274. return [t[0] - n[0] * e[i][0], t[1] - n[1] * e[i][1]]
  37275. }))
  37276. }
  37277. };
  37278. function qz(t, e, n, i) {
  37279. return [e[0] - i[t] * n[0], e[1] - i[t] * n[1]]
  37280. }
  37281. function Kz(t) {
  37282. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN]
  37283. }
  37284. var $z, Jz, Qz = E,
  37285. tV = Io + "toolbox-dataZoom_",
  37286. eV = function (t) {
  37287. function e() {
  37288. return null !== t && t.apply(this, arguments) || this
  37289. }
  37290. return n(e, t), e.prototype.render = function (t, e, n, i) {
  37291. this._brushController || (this._brushController = new aL(n.getZr()), this._brushController.on("brush", W(this._onBrush, this)).mount()),
  37292. function (t, e, n, i, r) {
  37293. var o = n._isZoomActive;
  37294. i && "takeGlobalCursor" === i.type && (o = "dataZoomSelect" === i.key && i.dataZoomSelectActive);
  37295. n._isZoomActive = o, t.setIconStatus("zoom", o ? "emphasis" : "normal");
  37296. var a = new Fz(iV(t), e, {
  37297. include: ["grid"]
  37298. }),
  37299. s = a.makePanelOpts(r, (function (t) {
  37300. return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect"
  37301. }));
  37302. n._brushController.setPanels(s).enableBrush(!(!o || !s.length) && {
  37303. brushType: "auto",
  37304. brushStyle: t.getModel("brushStyle").getItemStyle()
  37305. })
  37306. }(t, e, this, i, n),
  37307. function (t, e) {
  37308. t.setIconStatus("back", function (t) {
  37309. return zz(t).length
  37310. }(e) > 1 ? "emphasis" : "normal")
  37311. }(t, e)
  37312. }, e.prototype.onclick = function (t, e, n) {
  37313. nV[n].call(this)
  37314. }, e.prototype.remove = function (t, e) {
  37315. this._brushController && this._brushController.unmount()
  37316. }, e.prototype.dispose = function (t, e) {
  37317. this._brushController && this._brushController.dispose()
  37318. }, e.prototype._onBrush = function (t) {
  37319. var e = t.areas;
  37320. if (t.isEnd && e.length) {
  37321. var n = {},
  37322. i = this.ecModel;
  37323. this._brushController.updateCovers([]), new Fz(iV(this.model), i, {
  37324. include: ["grid"]
  37325. }).matchOutputRanges(e, i, (function (t, e, n) {
  37326. if ("cartesian2d" === n.type) {
  37327. var i = t.brushType;
  37328. "rect" === i ? (r("x", n, e[0]), r("y", n, e[1])) : r({
  37329. lineX: "x",
  37330. lineY: "y"
  37331. } [i], n, e)
  37332. }
  37333. })),
  37334. function (t, e) {
  37335. var n = zz(t);
  37336. Nz(e, (function (e, i) {
  37337. for (var r = n.length - 1; r >= 0 && !n[r][i]; r--);
  37338. if (r < 0) {
  37339. var o = t.queryComponents({
  37340. mainType: "dataZoom",
  37341. subType: "select",
  37342. id: i
  37343. })[0];
  37344. if (o) {
  37345. var a = o.getPercentRange();
  37346. n[0][i] = {
  37347. dataZoomId: i,
  37348. start: a[0],
  37349. end: a[1]
  37350. }
  37351. }
  37352. }
  37353. })), n.push(e)
  37354. }(i, n), this._dispatchZoomAction(n)
  37355. }
  37356. function r(t, e, r) {
  37357. var o = e.getAxis(t),
  37358. a = o.model,
  37359. s = function (t, e, n) {
  37360. var i;
  37361. return n.eachComponent({
  37362. mainType: "dataZoom",
  37363. subType: "select"
  37364. }, (function (n) {
  37365. n.getAxisModel(t, e.componentIndex) && (i = n)
  37366. })), i
  37367. }(t, a, i),
  37368. l = s.findRepresentativeAxisProxy(a).getMinMaxSpan();
  37369. null == l.minValueSpan && null == l.maxValueSpan || (r = Nk(0, r.slice(), o.scale.getExtent(), 0, l.minValueSpan, l.maxValueSpan)), s && (n[s.id] = {
  37370. dataZoomId: s.id,
  37371. startValue: r[0],
  37372. endValue: r[1]
  37373. })
  37374. }
  37375. }, e.prototype._dispatchZoomAction = function (t) {
  37376. var e = [];
  37377. Qz(t, (function (t, n) {
  37378. e.push(T(t))
  37379. })), e.length && this.api.dispatchAction({
  37380. type: "dataZoom",
  37381. from: this.uid,
  37382. batch: e
  37383. })
  37384. }, e.getDefaultOption = function (t) {
  37385. return {
  37386. show: !0,
  37387. filterMode: "filter",
  37388. icon: {
  37389. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  37390. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  37391. },
  37392. title: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  37393. brushStyle: {
  37394. borderWidth: 0,
  37395. color: "rgba(210,219,238,0.2)"
  37396. }
  37397. }
  37398. }, e
  37399. }(yz),
  37400. nV = {
  37401. zoom: function () {
  37402. var t = !this._isZoomActive;
  37403. this.api.dispatchAction({
  37404. type: "takeGlobalCursor",
  37405. key: "dataZoomSelect",
  37406. dataZoomSelectActive: t
  37407. })
  37408. },
  37409. back: function () {
  37410. this._dispatchZoomAction(function (t) {
  37411. var e = zz(t),
  37412. n = e[e.length - 1];
  37413. e.length > 1 && e.pop();
  37414. var i = {};
  37415. return Nz(n, (function (t, n) {
  37416. for (var r = e.length - 1; r >= 0; r--)
  37417. if (t = e[r][n]) {
  37418. i[n] = t;
  37419. break
  37420. }
  37421. })), i
  37422. }(this.ecModel))
  37423. }
  37424. };
  37425. function iV(t) {
  37426. var e = {
  37427. xAxisIndex: t.get("xAxisIndex", !0),
  37428. yAxisIndex: t.get("yAxisIndex", !0),
  37429. xAxisId: t.get("xAxisId", !0),
  37430. yAxisId: t.get("yAxisId", !0)
  37431. };
  37432. return null == e.xAxisIndex && null == e.xAxisId && (e.xAxisIndex = "all"), null == e.yAxisIndex && null == e.yAxisId && (e.yAxisIndex = "all"), e
  37433. }
  37434. $z = "dataZoom", Jz = function (t) {
  37435. var e = t.getComponent("toolbox", 0),
  37436. n = ["feature", "dataZoom"];
  37437. if (e && null != e.get(n)) {
  37438. var i = e.getModel(n),
  37439. r = [],
  37440. o = Fo(t, iV(i));
  37441. return Qz(o.xAxisModels, (function (t) {
  37442. return a(t, "xAxis", "xAxisIndex")
  37443. })), Qz(o.yAxisModels, (function (t) {
  37444. return a(t, "yAxis", "yAxisIndex")
  37445. })), r
  37446. }
  37447. function a(t, e, n) {
  37448. var o = t.componentIndex,
  37449. a = {
  37450. type: "select",
  37451. $fromToolbox: !0,
  37452. filterMode: i.get("filterMode", !0) || "filter",
  37453. id: tV + e + o
  37454. };
  37455. a[n] = o, r.push(a)
  37456. }
  37457. }, lt(null == od.get($z) && Jz), od.set($z, Jz);
  37458. var rV = function (t) {
  37459. function e() {
  37460. var n = null !== t && t.apply(this, arguments) || this;
  37461. return n.type = e.type, n
  37462. }
  37463. return n(e, t), e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
  37464. z: 60,
  37465. show: !0,
  37466. showContent: !0,
  37467. trigger: "item",
  37468. triggerOn: "mousemove|click",
  37469. alwaysShowContent: !1,
  37470. displayMode: "single",
  37471. renderMode: "auto",
  37472. confine: null,
  37473. showDelay: 0,
  37474. hideDelay: 100,
  37475. transitionDuration: .4,
  37476. enterable: !1,
  37477. backgroundColor: "#fff",
  37478. shadowBlur: 10,
  37479. shadowColor: "rgba(0, 0, 0, .2)",
  37480. shadowOffsetX: 1,
  37481. shadowOffsetY: 2,
  37482. borderRadius: 4,
  37483. borderWidth: 1,
  37484. padding: null,
  37485. extraCssText: "",
  37486. axisPointer: {
  37487. type: "line",
  37488. axis: "auto",
  37489. animation: "auto",
  37490. animationDurationUpdate: 200,
  37491. animationEasingUpdate: "exponentialOut",
  37492. crossStyle: {
  37493. color: "#999",
  37494. width: 1,
  37495. type: "dashed",
  37496. textStyle: {}
  37497. }
  37498. },
  37499. textStyle: {
  37500. color: "#666",
  37501. fontSize: 14
  37502. }
  37503. }, e
  37504. }(zp);
  37505. function oV(t) {
  37506. var e = t.get("confine");
  37507. return null != e ? !!e : "richText" === t.get("renderMode")
  37508. }
  37509. function aV(t) {
  37510. if (r.domSupported)
  37511. for (var e = document.documentElement.style, n = 0, i = t.length; n < i; n++)
  37512. if (t[n] in e) return t[n]
  37513. }
  37514. var sV = aV(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]);
  37515. function lV(t, e) {
  37516. if (!t) return e;
  37517. e = yp(e, !0);
  37518. var n = t.indexOf(e);
  37519. return (t = -1 === n ? e : "-" + t.slice(0, n) + "-" + e).toLowerCase()
  37520. }
  37521. var uV = lV(aV(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), "transition"),
  37522. hV = lV(sV, "transform"),
  37523. cV = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (r.transform3dSupported ? "will-change:transform;" : "");
  37524. function pV(t, e, n) {
  37525. var i = t.toFixed(0) + "px",
  37526. o = e.toFixed(0) + "px";
  37527. if (!r.transformSupported) return n ? "top:" + o + ";left:" + i + ";" : [
  37528. ["top", o],
  37529. ["left", i]
  37530. ];
  37531. var a = r.transform3dSupported,
  37532. s = "translate" + (a ? "3d" : "") + "(" + i + "," + o + (a ? ",0" : "") + ")";
  37533. return n ? "top:0;left:0;" + hV + ":" + s + ";" : [
  37534. ["top", 0],
  37535. ["left", 0],
  37536. [sV, s]
  37537. ]
  37538. }
  37539. function dV(t, e, n) {
  37540. var i = [],
  37541. o = t.get("transitionDuration"),
  37542. a = t.get("backgroundColor"),
  37543. s = t.get("shadowBlur"),
  37544. l = t.get("shadowColor"),
  37545. u = t.get("shadowOffsetX"),
  37546. h = t.get("shadowOffsetY"),
  37547. c = t.getModel("textStyle"),
  37548. p = gg(t, "html"),
  37549. d = u + "px " + h + "px " + s + "px " + l;
  37550. return i.push("box-shadow:" + d), e && o && i.push(function (t, e) {
  37551. var n = "cubic-bezier(0.23,1,0.32,1)",
  37552. i = " " + t / 2 + "s " + n,
  37553. o = "opacity" + i + ",visibility" + i;
  37554. return e || (i = " " + t + "s " + n, o += r.transformSupported ? "," + hV + i : ",left" + i + ",top" + i), uV + ":" + o
  37555. }(o, n)), a && i.push("background-color:" + a), E(["width", "color", "radius"], (function (e) {
  37556. var n = "border-" + e,
  37557. r = yp(n),
  37558. o = t.get(r);
  37559. null != o && i.push(n + ":" + o + ("color" === e ? "" : "px"))
  37560. })), i.push(function (t) {
  37561. var e = [],
  37562. n = t.get("fontSize"),
  37563. i = t.getTextColor();
  37564. i && e.push("color:" + i), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(3 * n / 2) + "px");
  37565. var r = t.get("textShadowColor"),
  37566. o = t.get("textShadowBlur") || 0,
  37567. a = t.get("textShadowOffsetX") || 0,
  37568. s = t.get("textShadowOffsetY") || 0;
  37569. return r && o && e.push("text-shadow:" + a + "px " + s + "px " + o + "px " + r), E(["decoration", "align"], (function (n) {
  37570. var i = t.get(n);
  37571. i && e.push("text-" + n + ":" + i)
  37572. })), e.join(";")
  37573. }(c)), null != p && i.push("padding:" + vp(p).join("px ") + "px"), i.join(";") + ";"
  37574. }
  37575. function fV(t, e, n, i, r) {
  37576. var o = e && e.painter;
  37577. if (n) {
  37578. var a = o && o.getViewportRoot();
  37579. a && function (t, e, n, i, r) {
  37580. te(Qt, e, i, r, !0) && te(t, n, Qt[0], Qt[1])
  37581. }(t, a, n, i, r)
  37582. } else {
  37583. t[0] = i, t[1] = r;
  37584. var s = o && o.getViewportRootOffset();
  37585. s && (t[0] += s.offsetLeft, t[1] += s.offsetTop)
  37586. }
  37587. t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
  37588. }
  37589. var gV = function () {
  37590. function t(t, e) {
  37591. if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, r.wxa) return null;
  37592. var n = document.createElement("div");
  37593. n.domBelongToZr = !0, this.el = n;
  37594. var i = this._zr = t.getZr(),
  37595. o = e.appendTo,
  37596. a = o && (U(o) ? document.querySelector(o) : J(o) ? o : X(o) && o(t.getDom()));
  37597. fV(this._styleCoord, i, a, t.getWidth() / 2, t.getHeight() / 2), (a || t.getDom()).appendChild(n), this._api = t, this._container = a;
  37598. var s = this;
  37599. n.onmouseenter = function () {
  37600. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0
  37601. }, n.onmousemove = function (t) {
  37602. if (t = t || window.event, !s._enterable) {
  37603. var e = i.handler;
  37604. ce(i.painter.getViewportRoot(), t, !0), e.dispatch("mousemove", t)
  37605. }
  37606. }, n.onmouseleave = function () {
  37607. s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay)
  37608. }
  37609. }
  37610. return t.prototype.update = function (t) {
  37611. if (!this._container) {
  37612. var e = this._api.getDom(),
  37613. n = (o = "position", (a = (r = e).currentStyle || document.defaultView && document.defaultView.getComputedStyle(r)) ? o ? a[o] : a : null),
  37614. i = e.style;
  37615. "absolute" !== i.position && "absolute" !== n && (i.position = "relative")
  37616. }
  37617. var r, o, a, s = t.get("alwaysShowContent");
  37618. s && this._moveIfResized(), this._alwaysShowContent = s, this.el.className = t.get("className") || ""
  37619. }, t.prototype.show = function (t, e) {
  37620. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  37621. var n = this.el,
  37622. i = n.style,
  37623. r = this._styleCoord;
  37624. n.innerHTML ? i.cssText = cV + dV(t, !this._firstShow, this._longHide) + pV(r[0], r[1], !0) + "border-color:" + Sp(e) + ";" + (t.get("extraCssText") || "") + ";pointer-events:" + (this._enterable ? "auto" : "none") : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1
  37625. }, t.prototype.setContent = function (t, e, n, i, r) {
  37626. var o = this.el;
  37627. if (null != t) {
  37628. var a = "";
  37629. if (U(r) && "item" === n.get("trigger") && !oV(n) && (a = function (t, e, n) {
  37630. if (!U(n) || "inside" === n) return "";
  37631. var i = t.get("backgroundColor"),
  37632. r = t.get("borderWidth");
  37633. e = Sp(e);
  37634. var o, a, s = "left" === (o = n) ? "right" : "right" === o ? "left" : "top" === o ? "bottom" : "top",
  37635. l = Math.max(1.5 * Math.round(r), 6),
  37636. u = "",
  37637. h = hV + ":";
  37638. P(["left", "right"], s) > -1 ? (u += "top:50%", h += "translateY(-50%) rotate(" + (a = "left" === s ? -225 : -45) + "deg)") : (u += "left:50%", h += "translateX(-50%) rotate(" + (a = "top" === s ? 225 : 45) + "deg)");
  37639. var c = a * Math.PI / 180,
  37640. p = l + r,
  37641. d = p * Math.abs(Math.cos(c)) + p * Math.abs(Math.sin(c)),
  37642. f = e + " solid " + r + "px;";
  37643. return '<div style="' + ["position:absolute;width:" + l + "px;height:" + l + "px;z-index:-1;", (u += ";" + s + ":-" + Math.round(100 * ((d - Math.SQRT2 * r) / 2 + Math.SQRT2 * r - (d - p) / 2)) / 100 + "px") + ";" + h + ";", "border-bottom:" + f, "border-right:" + f, "background-color:" + i + ";"].join("") + '"></div>'
  37644. }(n, i, r)), U(t)) o.innerHTML = t + a;
  37645. else if (t) {
  37646. o.innerHTML = "", Y(t) || (t = [t]);
  37647. for (var s = 0; s < t.length; s++) J(t[s]) && t[s].parentNode !== o && o.appendChild(t[s]);
  37648. if (a && o.childNodes.length) {
  37649. var l = document.createElement("div");
  37650. l.innerHTML = a, o.appendChild(l)
  37651. }
  37652. }
  37653. } else o.innerHTML = ""
  37654. }, t.prototype.setEnterable = function (t) {
  37655. this._enterable = t
  37656. }, t.prototype.getSize = function () {
  37657. var t = this.el;
  37658. return [t.offsetWidth, t.offsetHeight]
  37659. }, t.prototype.moveTo = function (t, e) {
  37660. var n = this._styleCoord;
  37661. if (fV(n, this._zr, this._container, t, e), null != n[0] && null != n[1]) {
  37662. var i = this.el.style;
  37663. E(pV(n[0], n[1]), (function (t) {
  37664. i[t[0]] = t[1]
  37665. }))
  37666. }
  37667. }, t.prototype._moveIfResized = function () {
  37668. var t = this._styleCoord[2],
  37669. e = this._styleCoord[3];
  37670. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  37671. }, t.prototype.hide = function () {
  37672. var t = this,
  37673. e = this.el.style;
  37674. e.visibility = "hidden", e.opacity = "0", r.transform3dSupported && (e.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout((function () {
  37675. return t._longHide = !0
  37676. }), 500)
  37677. }, t.prototype.hideLater = function (t) {
  37678. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  37679. }, t.prototype.isShow = function () {
  37680. return this._show
  37681. }, t.prototype.dispose = function () {
  37682. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  37683. var t = this.el.parentNode;
  37684. t && t.removeChild(this.el), this.el = this._container = null
  37685. }, t
  37686. }(),
  37687. yV = function () {
  37688. function t(t) {
  37689. this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = t.getZr(), xV(this._styleCoord, this._zr, t.getWidth() / 2, t.getHeight() / 2)
  37690. }
  37691. return t.prototype.update = function (t) {
  37692. var e = t.get("alwaysShowContent");
  37693. e && this._moveIfResized(), this._alwaysShowContent = e
  37694. }, t.prototype.show = function () {
  37695. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0
  37696. }, t.prototype.setContent = function (t, e, n, i, r) {
  37697. var o = this;
  37698. q(t) && wo(""), this.el && this._zr.remove(this.el);
  37699. var a = n.getModel("textStyle");
  37700. this.el = new Xs({
  37701. style: {
  37702. rich: e.richTextStyles,
  37703. text: t,
  37704. lineHeight: 22,
  37705. borderWidth: 1,
  37706. borderColor: i,
  37707. textShadowColor: a.get("textShadowColor"),
  37708. fill: n.get(["textStyle", "color"]),
  37709. padding: gg(n, "richText"),
  37710. verticalAlign: "top",
  37711. align: "left"
  37712. },
  37713. z: n.get("z")
  37714. }), E(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], (function (t) {
  37715. o.el.style[t] = n.get(t)
  37716. })), E(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], (function (t) {
  37717. o.el.style[t] = a.get(t) || 0
  37718. })), this._zr.add(this.el);
  37719. var s = this;
  37720. this.el.on("mouseover", (function () {
  37721. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0
  37722. })), this.el.on("mouseout", (function () {
  37723. s._enterable && s._show && s.hideLater(s._hideDelay), s._inContent = !1
  37724. }))
  37725. }, t.prototype.setEnterable = function (t) {
  37726. this._enterable = t
  37727. }, t.prototype.getSize = function () {
  37728. var t = this.el,
  37729. e = this.el.getBoundingRect(),
  37730. n = mV(t.style);
  37731. return [e.width + n.left + n.right, e.height + n.top + n.bottom]
  37732. }, t.prototype.moveTo = function (t, e) {
  37733. var n = this.el;
  37734. if (n) {
  37735. var i = this._styleCoord;
  37736. xV(i, this._zr, t, e), t = i[0], e = i[1];
  37737. var r = n.style,
  37738. o = vV(r.borderWidth || 0),
  37739. a = mV(r);
  37740. n.x = t + o + a.left, n.y = e + o + a.top, n.markRedraw()
  37741. }
  37742. }, t.prototype._moveIfResized = function () {
  37743. var t = this._styleCoord[2],
  37744. e = this._styleCoord[3];
  37745. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  37746. }, t.prototype.hide = function () {
  37747. this.el && this.el.hide(), this._show = !1
  37748. }, t.prototype.hideLater = function (t) {
  37749. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  37750. }, t.prototype.isShow = function () {
  37751. return this._show
  37752. }, t.prototype.dispose = function () {
  37753. this._zr.remove(this.el)
  37754. }, t
  37755. }();
  37756. function vV(t) {
  37757. return Math.max(0, t)
  37758. }
  37759. function mV(t) {
  37760. var e = vV(t.shadowBlur || 0),
  37761. n = vV(t.shadowOffsetX || 0),
  37762. i = vV(t.shadowOffsetY || 0);
  37763. return {
  37764. left: vV(e - n),
  37765. right: vV(e + n),
  37766. top: vV(e - i),
  37767. bottom: vV(e + i)
  37768. }
  37769. }
  37770. function xV(t, e, n, i) {
  37771. t[0] = n, t[1] = i, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
  37772. }
  37773. var _V = new Ws({
  37774. shape: {
  37775. x: -1,
  37776. y: -1,
  37777. width: 2,
  37778. height: 2
  37779. }
  37780. }),
  37781. bV = function (t) {
  37782. function e() {
  37783. var n = null !== t && t.apply(this, arguments) || this;
  37784. return n.type = e.type, n
  37785. }
  37786. return n(e, t), e.prototype.init = function (t, e) {
  37787. if (!r.node && e.getDom()) {
  37788. var n, i = t.getComponent("tooltip"),
  37789. o = this._renderMode = "auto" === (n = i.get("renderMode")) ? r.domSupported ? "html" : "richText" : n || "html";
  37790. this._tooltipContent = "richText" === o ? new yV(e) : new gV(e, {
  37791. appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
  37792. })
  37793. }
  37794. }, e.prototype.render = function (t, e, n) {
  37795. if (!r.node && n.getDom()) {
  37796. this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = n;
  37797. var i = this._tooltipContent;
  37798. i.update(t), i.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow(), "richText" !== this._renderMode && t.get("transitionDuration") ? Hg(this, "_updatePosition", 50, "fixRate") : Yg(this, "_updatePosition")
  37799. }
  37800. }, e.prototype._initGlobalListener = function () {
  37801. var t = this._tooltipModel.get("triggerOn");
  37802. IN("itemTooltip", this._api, W((function (e, n, i) {
  37803. "none" !== t && (t.indexOf(e) >= 0 ? this._tryShow(n, i) : "leave" === e && this._hide(i))
  37804. }), this))
  37805. }, e.prototype._keepShow = function () {
  37806. var t = this._tooltipModel,
  37807. e = this._ecModel,
  37808. n = this._api,
  37809. i = t.get("triggerOn");
  37810. if (null != this._lastX && null != this._lastY && "none" !== i && "click" !== i) {
  37811. var r = this;
  37812. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout((function () {
  37813. !n.isDisposed() && r.manuallyShowTip(t, e, n, {
  37814. x: r._lastX,
  37815. y: r._lastY,
  37816. dataByCoordSys: r._lastDataByCoordSys
  37817. })
  37818. }))
  37819. }
  37820. }, e.prototype.manuallyShowTip = function (t, e, n, i) {
  37821. if (i.from !== this.uid && !r.node && n.getDom()) {
  37822. var o = SV(i, n);
  37823. this._ticket = "";
  37824. var a = i.dataByCoordSys,
  37825. s = function (t, e, n) {
  37826. var i = Go(t).queryOptionMap,
  37827. r = i.keys()[0];
  37828. if (!r || "series" === r) return;
  37829. var o = Yo(e, r, i.get(r), {
  37830. useDefault: !1,
  37831. enableAll: !1,
  37832. enableNone: !1
  37833. }),
  37834. a = o.models[0];
  37835. if (!a) return;
  37836. var s, l = n.getViewOfComponentModel(a);
  37837. if (l.group.traverse((function (e) {
  37838. var n = rl(e).tooltipConfig;
  37839. if (n && n.name === t.name) return s = e, !0
  37840. })), s) return {
  37841. componentMainType: r,
  37842. componentIndex: a.componentIndex,
  37843. el: s
  37844. }
  37845. }(i, e, n);
  37846. if (s) {
  37847. var l = s.el.getBoundingRect().clone();
  37848. l.applyTransform(s.el.transform), this._tryShow({
  37849. offsetX: l.x + l.width / 2,
  37850. offsetY: l.y + l.height / 2,
  37851. target: s.el,
  37852. position: i.position,
  37853. positionDefault: "bottom"
  37854. }, o)
  37855. } else if (i.tooltip && null != i.x && null != i.y) {
  37856. var u = _V;
  37857. u.x = i.x, u.y = i.y, u.update(), rl(u).tooltipConfig = {
  37858. name: null,
  37859. option: i.tooltip
  37860. }, this._tryShow({
  37861. offsetX: i.x,
  37862. offsetY: i.y,
  37863. target: u
  37864. }, o)
  37865. } else if (a) this._tryShow({
  37866. offsetX: i.x,
  37867. offsetY: i.y,
  37868. position: i.position,
  37869. dataByCoordSys: a,
  37870. tooltipOption: i.tooltipOption
  37871. }, o);
  37872. else if (null != i.seriesIndex) {
  37873. if (this._manuallyAxisShowTip(t, e, n, i)) return;
  37874. var h = kN(i, e),
  37875. c = h.point[0],
  37876. p = h.point[1];
  37877. null != c && null != p && this._tryShow({
  37878. offsetX: c,
  37879. offsetY: p,
  37880. target: h.el,
  37881. position: i.position,
  37882. positionDefault: "bottom"
  37883. }, o)
  37884. } else null != i.x && null != i.y && (n.dispatchAction({
  37885. type: "updateAxisPointer",
  37886. x: i.x,
  37887. y: i.y
  37888. }), this._tryShow({
  37889. offsetX: i.x,
  37890. offsetY: i.y,
  37891. position: i.position,
  37892. target: n.getZr().findHover(i.x, i.y).target
  37893. }, o))
  37894. }
  37895. }, e.prototype.manuallyHideTip = function (t, e, n, i) {
  37896. var r = this._tooltipContent;
  37897. this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, i.from !== this.uid && this._hide(SV(i, n))
  37898. }, e.prototype._manuallyAxisShowTip = function (t, e, n, i) {
  37899. var r = i.seriesIndex,
  37900. o = i.dataIndex,
  37901. a = e.getComponent("axisPointer").coordSysAxesInfo;
  37902. if (null != r && null != o && null != a) {
  37903. var s = e.getSeriesByIndex(r);
  37904. if (s)
  37905. if ("axis" === wV([s.getData().getItemModel(o), s, (s.coordinateSystem || {}).model], this._tooltipModel).get("trigger")) return n.dispatchAction({
  37906. type: "updateAxisPointer",
  37907. seriesIndex: r,
  37908. dataIndex: o,
  37909. position: i.position
  37910. }), !0
  37911. }
  37912. }, e.prototype._tryShow = function (t, e) {
  37913. var n = t.target;
  37914. if (this._tooltipModel) {
  37915. this._lastX = t.offsetX, this._lastY = t.offsetY;
  37916. var i = t.dataByCoordSys;
  37917. if (i && i.length) this._showAxisTooltip(i, t);
  37918. else if (n) {
  37919. var r, o;
  37920. if ("legend" === rl(n).ssrType) return;
  37921. this._lastDataByCoordSys = null, Oy(n, (function (t) {
  37922. return null != rl(t).dataIndex ? (r = t, !0) : null != rl(t).tooltipConfig ? (o = t, !0) : void 0
  37923. }), !0), r ? this._showSeriesItemTooltip(t, r, e) : o ? this._showComponentItemTooltip(t, o, e) : this._hide(e)
  37924. } else this._lastDataByCoordSys = null, this._hide(e)
  37925. }
  37926. }, e.prototype._showOrMove = function (t, e) {
  37927. var n = t.get("showDelay");
  37928. e = W(e, this), clearTimeout(this._showTimout), n > 0 ? this._showTimout = setTimeout(e, n) : e()
  37929. }, e.prototype._showAxisTooltip = function (t, e) {
  37930. var n = this._ecModel,
  37931. i = this._tooltipModel,
  37932. r = [e.offsetX, e.offsetY],
  37933. o = wV([e.tooltipOption], i),
  37934. a = this._renderMode,
  37935. s = [],
  37936. l = og("section", {
  37937. blocks: [],
  37938. noHeader: !0
  37939. }),
  37940. u = [],
  37941. h = new yg;
  37942. E(t, (function (t) {
  37943. E(t.dataByAxis, (function (t) {
  37944. var e = n.getComponent(t.axisDim + "Axis", t.axisIndex),
  37945. r = t.value;
  37946. if (e && null != r) {
  37947. var o = pN(r, e.axis, n, t.seriesDataIndices, t.valueLabelOpt),
  37948. c = og("section", {
  37949. header: o,
  37950. noHeader: !ut(o),
  37951. sortBlocks: !0,
  37952. blocks: []
  37953. });
  37954. l.blocks.push(c), E(t.seriesDataIndices, (function (l) {
  37955. var p = n.getSeriesByIndex(l.seriesIndex),
  37956. d = l.dataIndexInside,
  37957. f = p.getDataParams(d);
  37958. if (!(f.dataIndex < 0)) {
  37959. f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue = S_(e.axis, {
  37960. value: r
  37961. }), f.axisValueLabel = o, f.marker = h.makeTooltipMarker("item", Sp(f.color), a);
  37962. var g = bf(p.formatTooltip(d, !0, null)),
  37963. y = g.frag;
  37964. if (y) {
  37965. var v = wV([p], i).get("valueFormatter");
  37966. c.blocks.push(v ? A({
  37967. valueFormatter: v
  37968. }, y) : y)
  37969. }
  37970. g.text && u.push(g.text), s.push(f)
  37971. }
  37972. }))
  37973. }
  37974. }))
  37975. })), l.blocks.reverse(), u.reverse();
  37976. var c = e.position,
  37977. p = o.get("order"),
  37978. d = cg(l, h, a, p, n.get("useUTC"), o.get("textStyle"));
  37979. d && u.unshift(d);
  37980. var f = "richText" === a ? "\n\n" : "<br/>",
  37981. g = u.join(f);
  37982. this._showOrMove(o, (function () {
  37983. this._updateContentNotChangedOnAxis(t, s) ? this._updatePosition(o, c, r[0], r[1], this._tooltipContent, s) : this._showTooltipContent(o, g, s, Math.random() + "", r[0], r[1], c, null, h)
  37984. }))
  37985. }, e.prototype._showSeriesItemTooltip = function (t, e, n) {
  37986. var i = this._ecModel,
  37987. r = rl(e),
  37988. o = r.seriesIndex,
  37989. a = i.getSeriesByIndex(o),
  37990. s = r.dataModel || a,
  37991. l = r.dataIndex,
  37992. u = r.dataType,
  37993. h = s.getData(u),
  37994. c = this._renderMode,
  37995. p = t.positionDefault,
  37996. d = wV([h.getItemModel(l), s, a && (a.coordinateSystem || {}).model], this._tooltipModel, p ? {
  37997. position: p
  37998. } : null),
  37999. f = d.get("trigger");
  38000. if (null == f || "item" === f) {
  38001. var g = s.getDataParams(l, u),
  38002. y = new yg;
  38003. g.marker = y.makeTooltipMarker("item", Sp(g.color), c);
  38004. var v = bf(s.formatTooltip(l, !1, u)),
  38005. m = d.get("order"),
  38006. x = d.get("valueFormatter"),
  38007. _ = v.frag,
  38008. b = _ ? cg(x ? A({
  38009. valueFormatter: x
  38010. }, _) : _, y, c, m, i.get("useUTC"), d.get("textStyle")) : v.text,
  38011. w = "item_" + s.name + "_" + l;
  38012. this._showOrMove(d, (function () {
  38013. this._showTooltipContent(d, b, g, w, t.offsetX, t.offsetY, t.position, t.target, y)
  38014. })), n({
  38015. type: "showTip",
  38016. dataIndexInside: l,
  38017. dataIndex: h.getRawIndex(l),
  38018. seriesIndex: o,
  38019. from: this.uid
  38020. })
  38021. }
  38022. }, e.prototype._showComponentItemTooltip = function (t, e, n) {
  38023. var i = rl(e),
  38024. r = i.tooltipConfig.option || {};
  38025. if (U(r)) {
  38026. r = {
  38027. content: r,
  38028. formatter: r
  38029. }
  38030. }
  38031. var o = [r],
  38032. a = this._ecModel.getComponent(i.componentMainType, i.componentIndex);
  38033. a && o.push(a), o.push({
  38034. formatter: r.content
  38035. });
  38036. var s = t.positionDefault,
  38037. l = wV(o, this._tooltipModel, s ? {
  38038. position: s
  38039. } : null),
  38040. u = l.get("content"),
  38041. h = Math.random() + "",
  38042. c = new yg;
  38043. this._showOrMove(l, (function () {
  38044. var n = T(l.get("formatterParams") || {});
  38045. this._showTooltipContent(l, u, n, h, t.offsetX, t.offsetY, t.position, e, c)
  38046. })), n({
  38047. type: "showTip",
  38048. from: this.uid
  38049. })
  38050. }, e.prototype._showTooltipContent = function (t, e, n, i, r, o, a, s, l) {
  38051. if (this._ticket = "", t.get("showContent") && t.get("show")) {
  38052. var u = this._tooltipContent;
  38053. u.setEnterable(t.get("enterable"));
  38054. var h = t.get("formatter");
  38055. a = a || t.get("position");
  38056. var c = e,
  38057. p = this._getNearestPoint([r, o], n, t.get("trigger"), t.get("borderColor")).color;
  38058. if (h)
  38059. if (U(h)) {
  38060. var d = t.ecModel.get("useUTC"),
  38061. f = Y(n) ? n[0] : n;
  38062. c = h, f && f.axisType && f.axisType.indexOf("time") >= 0 && (c = Jc(f.axisValue, c, d)), c = bp(c, n, !0)
  38063. } else if (X(h)) {
  38064. var g = W((function (e, i) {
  38065. e === this._ticket && (u.setContent(i, l, t, p, a), this._updatePosition(t, a, r, o, u, n, s))
  38066. }), this);
  38067. this._ticket = i, c = h(n, i, g)
  38068. } else c = h;
  38069. u.setContent(c, l, t, p, a), u.show(t, p), this._updatePosition(t, a, r, o, u, n, s)
  38070. }
  38071. }, e.prototype._getNearestPoint = function (t, e, n, i) {
  38072. return "axis" === n || Y(e) ? {
  38073. color: i || ("html" === this._renderMode ? "#fff" : "none")
  38074. } : Y(e) ? void 0 : {
  38075. color: i || e.color || e.borderColor
  38076. }
  38077. }, e.prototype._updatePosition = function (t, e, n, i, r, o, a) {
  38078. var s = this._api.getWidth(),
  38079. l = this._api.getHeight();
  38080. e = e || t.get("position");
  38081. var u = r.getSize(),
  38082. h = t.get("align"),
  38083. c = t.get("verticalAlign"),
  38084. p = a && a.getBoundingRect().clone();
  38085. if (a && p.applyTransform(a.transform), X(e) && (e = e([n, i], o, r.el, p, {
  38086. viewSize: [s, l],
  38087. contentSize: u.slice()
  38088. })), Y(e)) n = $r(e[0], s), i = $r(e[1], l);
  38089. else if (q(e)) {
  38090. var d = e;
  38091. d.width = u[0], d.height = u[1];
  38092. var f = kp(d, {
  38093. width: s,
  38094. height: l
  38095. });
  38096. n = f.x, i = f.y, h = null, c = null
  38097. } else if (U(e) && a) {
  38098. var g = function (t, e, n, i) {
  38099. var r = n[0],
  38100. o = n[1],
  38101. a = Math.ceil(Math.SQRT2 * i) + 8,
  38102. s = 0,
  38103. l = 0,
  38104. u = e.width,
  38105. h = e.height;
  38106. switch (t) {
  38107. case "inside":
  38108. s = e.x + u / 2 - r / 2, l = e.y + h / 2 - o / 2;
  38109. break;
  38110. case "top":
  38111. s = e.x + u / 2 - r / 2, l = e.y - o - a;
  38112. break;
  38113. case "bottom":
  38114. s = e.x + u / 2 - r / 2, l = e.y + h + a;
  38115. break;
  38116. case "left":
  38117. s = e.x - r - a, l = e.y + h / 2 - o / 2;
  38118. break;
  38119. case "right":
  38120. s = e.x + u + a, l = e.y + h / 2 - o / 2
  38121. }
  38122. return [s, l]
  38123. }(e, p, u, t.get("borderWidth"));
  38124. n = g[0], i = g[1]
  38125. } else {
  38126. g = function (t, e, n, i, r, o, a) {
  38127. var s = n.getSize(),
  38128. l = s[0],
  38129. u = s[1];
  38130. null != o && (t + l + o + 2 > i ? t -= l + o : t += o);
  38131. null != a && (e + u + a > r ? e -= u + a : e += a);
  38132. return [t, e]
  38133. }(n, i, r, s, l, h ? null : 20, c ? null : 20);
  38134. n = g[0], i = g[1]
  38135. }
  38136. if (h && (n -= MV(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (i -= MV(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), oV(t)) {
  38137. g = function (t, e, n, i, r) {
  38138. var o = n.getSize(),
  38139. a = o[0],
  38140. s = o[1];
  38141. return t = Math.min(t + a, i) - a, e = Math.min(e + s, r) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e]
  38142. }(n, i, r, s, l);
  38143. n = g[0], i = g[1]
  38144. }
  38145. r.moveTo(n, i)
  38146. }, e.prototype._updateContentNotChangedOnAxis = function (t, e) {
  38147. var n = this._lastDataByCoordSys,
  38148. i = this._cbParamsList,
  38149. r = !!n && n.length === t.length;
  38150. return r && E(n, (function (n, o) {
  38151. var a = n.dataByAxis || [],
  38152. s = (t[o] || {}).dataByAxis || [];
  38153. (r = r && a.length === s.length) && E(a, (function (t, n) {
  38154. var o = s[n] || {},
  38155. a = t.seriesDataIndices || [],
  38156. l = o.seriesDataIndices || [];
  38157. (r = r && t.value === o.value && t.axisType === o.axisType && t.axisId === o.axisId && a.length === l.length) && E(a, (function (t, e) {
  38158. var n = l[e];
  38159. r = r && t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
  38160. })), i && E(t.seriesDataIndices, (function (t) {
  38161. var n = t.seriesIndex,
  38162. o = e[n],
  38163. a = i[n];
  38164. o && a && a.data !== o.data && (r = !1)
  38165. }))
  38166. }))
  38167. })), this._lastDataByCoordSys = t, this._cbParamsList = e, !!r
  38168. }, e.prototype._hide = function (t) {
  38169. this._lastDataByCoordSys = null, t({
  38170. type: "hideTip",
  38171. from: this.uid
  38172. })
  38173. }, e.prototype.dispose = function (t, e) {
  38174. !r.node && e.getDom() && (Yg(this, "_updatePosition"), this._tooltipContent.dispose(), DN("itemTooltip", e))
  38175. }, e.type = "tooltip", e
  38176. }(Ag);
  38177. function wV(t, e, n) {
  38178. var i, r = e.ecModel;
  38179. n ? (i = new Cc(n, r, r), i = new Cc(e.option, i, r)) : i = e;
  38180. for (var o = t.length - 1; o >= 0; o--) {
  38181. var a = t[o];
  38182. a && (a instanceof Cc && (a = a.get("tooltip", !0)), U(a) && (a = {
  38183. formatter: a
  38184. }), a && (i = new Cc(a, i, r)))
  38185. }
  38186. return i
  38187. }
  38188. function SV(t, e) {
  38189. return t.dispatchAction || W(e.dispatchAction, e)
  38190. }
  38191. function MV(t) {
  38192. return "center" === t || "middle" === t
  38193. }
  38194. var IV = ["rect", "polygon", "keep", "clear"];
  38195. function TV(t, e) {
  38196. var n = To(t ? t.brush : []);
  38197. if (n.length) {
  38198. var i = [];
  38199. E(n, (function (t) {
  38200. var e = t.hasOwnProperty("toolbox") ? t.toolbox : [];
  38201. e instanceof Array && (i = i.concat(e))
  38202. }));
  38203. var r = t && t.toolbox;
  38204. Y(r) && (r = r[0]), r || (r = {
  38205. feature: {}
  38206. }, t.toolbox = [r]);
  38207. var o = r.feature || (r.feature = {}),
  38208. a = o.brush || (o.brush = {}),
  38209. s = a.type || (a.type = []);
  38210. s.push.apply(s, i),
  38211. function (t) {
  38212. var e = {};
  38213. E(t, (function (t) {
  38214. e[t] = 1
  38215. })), t.length = 0, E(e, (function (e, n) {
  38216. t.push(n)
  38217. }))
  38218. }(s), e && !s.length && s.push.apply(s, IV)
  38219. }
  38220. }
  38221. var CV = E;
  38222. function DV(t) {
  38223. if (t)
  38224. for (var e in t)
  38225. if (t.hasOwnProperty(e)) return !0
  38226. }
  38227. function AV(t, e, n) {
  38228. var i = {};
  38229. return CV(e, (function (e) {
  38230. var r, o = i[e] = ((r = function () {}).prototype.__hidden = r.prototype, new r);
  38231. CV(t[e], (function (t, i) {
  38232. if (DD.isValidType(i)) {
  38233. var r = {
  38234. type: i,
  38235. visual: t
  38236. };
  38237. n && n(r, e), o[i] = new DD(r), "opacity" === i && ((r = T(r)).type = "colorAlpha", o.__hidden.__alphaForOpacity = new DD(r))
  38238. }
  38239. }))
  38240. })), i
  38241. }
  38242. function kV(t, e, n) {
  38243. var i;
  38244. E(n, (function (t) {
  38245. e.hasOwnProperty(t) && DV(e[t]) && (i = !0)
  38246. })), i && E(n, (function (n) {
  38247. e.hasOwnProperty(n) && DV(e[n]) ? t[n] = T(e[n]) : delete t[n]
  38248. }))
  38249. }
  38250. var LV = {
  38251. lineX: PV(0),
  38252. lineY: PV(1),
  38253. rect: {
  38254. point: function (t, e, n) {
  38255. return t && n.boundingRect.contain(t[0], t[1])
  38256. },
  38257. rect: function (t, e, n) {
  38258. return t && n.boundingRect.intersect(t)
  38259. }
  38260. },
  38261. polygon: {
  38262. point: function (t, e, n) {
  38263. return t && n.boundingRect.contain(t[0], t[1]) && P_(n.range, t[0], t[1])
  38264. },
  38265. rect: function (t, e, n) {
  38266. var i = n.range;
  38267. if (!t || i.length <= 1) return !1;
  38268. var r = t.x,
  38269. o = t.y,
  38270. a = t.width,
  38271. s = t.height,
  38272. l = i[0];
  38273. return !!(P_(i, r, o) || P_(i, r + a, o) || P_(i, r, o + s) || P_(i, r + a, o + s) || ze.create(t).contain(l[0], l[1]) || Zh(r, o, r + a, o, i) || Zh(r, o, r, o + s, i) || Zh(r + a, o, r + a, o + s, i) || Zh(r, o + s, r + a, o + s, i)) || void 0
  38274. }
  38275. }
  38276. };
  38277. function PV(t) {
  38278. var e = ["x", "y"],
  38279. n = ["width", "height"];
  38280. return {
  38281. point: function (e, n, i) {
  38282. if (e) {
  38283. var r = i.range;
  38284. return OV(e[t], r)
  38285. }
  38286. },
  38287. rect: function (i, r, o) {
  38288. if (i) {
  38289. var a = o.range,
  38290. s = [i[e[t]], i[e[t]] + i[n[t]]];
  38291. return s[1] < s[0] && s.reverse(), OV(s[0], a) || OV(s[1], a) || OV(a[0], s) || OV(a[1], s)
  38292. }
  38293. }
  38294. }
  38295. }
  38296. function OV(t, e) {
  38297. return e[0] <= t && t <= e[1]
  38298. }
  38299. var RV = ["inBrush", "outOfBrush"],
  38300. NV = "__ecBrushSelect",
  38301. EV = "__ecInBrushSelectEvent";
  38302. function zV(t) {
  38303. t.eachComponent({
  38304. mainType: "brush"
  38305. }, (function (e) {
  38306. (e.brushTargetManager = new Fz(e.option, t)).setInputRanges(e.areas, t)
  38307. }))
  38308. }
  38309. function VV(t, e, n) {
  38310. var i, r, o = [];
  38311. t.eachComponent({
  38312. mainType: "brush"
  38313. }, (function (t) {
  38314. n && "takeGlobalCursor" === n.type && t.setBrushOption("brush" === n.key ? n.brushOption : {
  38315. brushType: !1
  38316. })
  38317. })), zV(t), t.eachComponent({
  38318. mainType: "brush"
  38319. }, (function (e, n) {
  38320. var a = {
  38321. brushId: e.id,
  38322. brushIndex: n,
  38323. brushName: e.name,
  38324. areas: T(e.areas),
  38325. selected: []
  38326. };
  38327. o.push(a);
  38328. var s = e.option,
  38329. l = s.brushLink,
  38330. u = [],
  38331. h = [],
  38332. c = [],
  38333. p = !1;
  38334. n || (i = s.throttleType, r = s.throttleDelay);
  38335. var d = z(e.areas, (function (t) {
  38336. var e = GV[t.brushType],
  38337. n = k({
  38338. boundingRect: e ? e(t) : void 0
  38339. }, t);
  38340. return n.selectors = function (t) {
  38341. var e = t.brushType,
  38342. n = {
  38343. point: function (i) {
  38344. return LV[e].point(i, n, t)
  38345. },
  38346. rect: function (i) {
  38347. return LV[e].rect(i, n, t)
  38348. }
  38349. };
  38350. return n
  38351. }(n), n
  38352. })),
  38353. f = AV(e.option, RV, (function (t) {
  38354. t.mappingMethod = "fixed"
  38355. }));
  38356. function g(t) {
  38357. return "all" === l || !!u[t]
  38358. }
  38359. function y(t) {
  38360. return !!t.length
  38361. }
  38362. Y(l) && E(l, (function (t) {
  38363. u[t] = 1
  38364. })), t.eachSeries((function (n, i) {
  38365. var r = c[i] = [];
  38366. "parallel" === n.subType ? function (t, e) {
  38367. var n = t.coordinateSystem;
  38368. p = p || n.hasAxisBrushed(), g(e) && n.eachActiveState(t.getData(), (function (t, e) {
  38369. "active" === t && (h[e] = 1)
  38370. }))
  38371. }(n, i) : function (n, i, r) {
  38372. if (!n.brushSelector || function (t, e) {
  38373. var n = t.option.seriesIndex;
  38374. return null != n && "all" !== n && (Y(n) ? P(n, e) < 0 : e !== n)
  38375. }(e, i)) return;
  38376. if (E(d, (function (i) {
  38377. e.brushTargetManager.controlSeries(i, n, t) && r.push(i), p = p || y(r)
  38378. })), g(i) && y(r)) {
  38379. var o = n.getData();
  38380. o.each((function (t) {
  38381. FV(n, r, o, t) && (h[t] = 1)
  38382. }))
  38383. }
  38384. }(n, i, r)
  38385. })), t.eachSeries((function (t, e) {
  38386. var n = {
  38387. seriesId: t.id,
  38388. seriesIndex: e,
  38389. seriesName: t.name,
  38390. dataIndex: []
  38391. };
  38392. a.selected.push(n);
  38393. var i = c[e],
  38394. r = t.getData(),
  38395. o = g(e) ? function (t) {
  38396. return h[t] ? (n.dataIndex.push(r.getRawIndex(t)), "inBrush") : "outOfBrush"
  38397. } : function (e) {
  38398. return FV(t, i, r, e) ? (n.dataIndex.push(r.getRawIndex(e)), "inBrush") : "outOfBrush"
  38399. };
  38400. (g(e) ? p : y(i)) && function (t, e, n, i, r, o) {
  38401. var a, s = {};
  38402. function l(t) {
  38403. return Dy(n, a, t)
  38404. }
  38405. function u(t, e) {
  38406. ky(n, a, t, e)
  38407. }
  38408. function h(t, h) {
  38409. a = null == o ? t : h;
  38410. var c = n.getRawDataItem(a);
  38411. if (!c || !1 !== c.visualMap)
  38412. for (var p = i.call(r, t), d = e[p], f = s[p], g = 0, y = f.length; g < y; g++) {
  38413. var v = f[g];
  38414. d[v] && d[v].applyVisual(t, l, u)
  38415. }
  38416. }
  38417. E(t, (function (t) {
  38418. var n = DD.prepareVisualTypes(e[t]);
  38419. s[t] = n
  38420. })), null == o ? n.each(h) : n.each([o], h)
  38421. }(RV, f, r, o)
  38422. }))
  38423. })),
  38424. function (t, e, n, i, r) {
  38425. if (!r) return;
  38426. var o = t.getZr();
  38427. if (o[EV]) return;
  38428. o[NV] || (o[NV] = BV);
  38429. var a = Hg(o, NV, n, e);
  38430. a(t, i)
  38431. }(e, i, r, o, n)
  38432. }
  38433. function BV(t, e) {
  38434. if (!t.isDisposed()) {
  38435. var n = t.getZr();
  38436. n[EV] = !0, t.dispatchAction({
  38437. type: "brushSelect",
  38438. batch: e
  38439. }), n[EV] = !1
  38440. }
  38441. }
  38442. function FV(t, e, n, i) {
  38443. for (var r = 0, o = e.length; r < o; r++) {
  38444. var a = e[r];
  38445. if (t.brushSelector(i, n, a.selectors, a)) return !0
  38446. }
  38447. }
  38448. var GV = {
  38449. rect: function (t) {
  38450. return WV(t.range)
  38451. },
  38452. polygon: function (t) {
  38453. for (var e, n = t.range, i = 0, r = n.length; i < r; i++) {
  38454. e = e || [
  38455. [1 / 0, -1 / 0],
  38456. [1 / 0, -1 / 0]
  38457. ];
  38458. var o = n[i];
  38459. o[0] < e[0][0] && (e[0][0] = o[0]), o[0] > e[0][1] && (e[0][1] = o[0]), o[1] < e[1][0] && (e[1][0] = o[1]), o[1] > e[1][1] && (e[1][1] = o[1])
  38460. }
  38461. return e && WV(e)
  38462. }
  38463. };
  38464. function WV(t) {
  38465. return new ze(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0])
  38466. }
  38467. var HV = function (t) {
  38468. function e() {
  38469. var n = null !== t && t.apply(this, arguments) || this;
  38470. return n.type = e.type, n
  38471. }
  38472. return n(e, t), e.prototype.init = function (t, e) {
  38473. this.ecModel = t, this.api = e, this.model, (this._brushController = new aL(e.getZr())).on("brush", W(this._onBrush, this)).mount()
  38474. }, e.prototype.render = function (t, e, n, i) {
  38475. this.model = t, this._updateController(t, e, n, i)
  38476. }, e.prototype.updateTransform = function (t, e, n, i) {
  38477. zV(e), this._updateController(t, e, n, i)
  38478. }, e.prototype.updateVisual = function (t, e, n, i) {
  38479. this.updateTransform(t, e, n, i)
  38480. }, e.prototype.updateView = function (t, e, n, i) {
  38481. this._updateController(t, e, n, i)
  38482. }, e.prototype._updateController = function (t, e, n, i) {
  38483. (!i || i.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())
  38484. }, e.prototype.dispose = function () {
  38485. this._brushController.dispose()
  38486. }, e.prototype._onBrush = function (t) {
  38487. var e = this.model.id,
  38488. n = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel);
  38489. (!t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  38490. type: "brush",
  38491. brushId: e,
  38492. areas: T(n),
  38493. $from: e
  38494. }), t.isEnd && this.api.dispatchAction({
  38495. type: "brushEnd",
  38496. brushId: e,
  38497. areas: T(n),
  38498. $from: e
  38499. })
  38500. }, e.type = "brush", e
  38501. }(Ag),
  38502. YV = function (t) {
  38503. function e() {
  38504. var n = null !== t && t.apply(this, arguments) || this;
  38505. return n.type = e.type, n.areas = [], n.brushOption = {}, n
  38506. }
  38507. return n(e, t), e.prototype.optionUpdated = function (t, e) {
  38508. var n = this.option;
  38509. !e && kV(n, t, ["inBrush", "outOfBrush"]);
  38510. var i = n.inBrush = n.inBrush || {};
  38511. n.outOfBrush = n.outOfBrush || {
  38512. color: "#ddd"
  38513. }, i.hasOwnProperty("liftZ") || (i.liftZ = 5)
  38514. }, e.prototype.setAreas = function (t) {
  38515. t && (this.areas = z(t, (function (t) {
  38516. return XV(this.option, t)
  38517. }), this))
  38518. }, e.prototype.setBrushOption = function (t) {
  38519. this.brushOption = XV(this.option, t), this.brushType = this.brushOption.brushType
  38520. }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
  38521. seriesIndex: "all",
  38522. brushType: "rect",
  38523. brushMode: "single",
  38524. transformable: !0,
  38525. brushStyle: {
  38526. borderWidth: 1,
  38527. color: "rgba(210,219,238,0.3)",
  38528. borderColor: "#D2DBEE"
  38529. },
  38530. throttleType: "fixRate",
  38531. throttleDelay: 0,
  38532. removeOnClick: !0,
  38533. z: 1e4
  38534. }, e
  38535. }(zp);
  38536. function XV(t, e) {
  38537. return C({
  38538. brushType: t.brushType,
  38539. brushMode: t.brushMode,
  38540. transformable: t.transformable,
  38541. brushStyle: new Cc(t.brushStyle).getItemStyle(),
  38542. removeOnClick: t.removeOnClick,
  38543. z: t.z
  38544. }, e, !0)
  38545. }
  38546. var UV = ["rect", "polygon", "lineX", "lineY", "keep", "clear"],
  38547. ZV = function (t) {
  38548. function e() {
  38549. return null !== t && t.apply(this, arguments) || this
  38550. }
  38551. return n(e, t), e.prototype.render = function (t, e, n) {
  38552. var i, r, o;
  38553. e.eachComponent({
  38554. mainType: "brush"
  38555. }, (function (t) {
  38556. i = t.brushType, r = t.brushOption.brushMode || "single", o = o || !!t.areas.length
  38557. })), this._brushType = i, this._brushMode = r, E(t.get("type", !0), (function (e) {
  38558. t.setIconStatus(e, ("keep" === e ? "multiple" === r : "clear" === e ? o : e === i) ? "emphasis" : "normal")
  38559. }))
  38560. }, e.prototype.updateView = function (t, e, n) {
  38561. this.render(t, e, n)
  38562. }, e.prototype.getIcons = function () {
  38563. var t = this.model,
  38564. e = t.get("icon", !0),
  38565. n = {};
  38566. return E(t.get("type", !0), (function (t) {
  38567. e[t] && (n[t] = e[t])
  38568. })), n
  38569. }, e.prototype.onclick = function (t, e, n) {
  38570. var i = this._brushType,
  38571. r = this._brushMode;
  38572. "clear" === n ? (e.dispatchAction({
  38573. type: "axisAreaSelect",
  38574. intervals: []
  38575. }), e.dispatchAction({
  38576. type: "brush",
  38577. command: "clear",
  38578. areas: []
  38579. })) : e.dispatchAction({
  38580. type: "takeGlobalCursor",
  38581. key: "brush",
  38582. brushOption: {
  38583. brushType: "keep" === n ? i : i !== n && n,
  38584. brushMode: "keep" === n ? "multiple" === r ? "single" : "multiple" : r
  38585. }
  38586. })
  38587. }, e.getDefaultOption = function (t) {
  38588. return {
  38589. show: !0,
  38590. type: UV.slice(),
  38591. icon: {
  38592. rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
  38593. polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
  38594. lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
  38595. lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
  38596. keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
  38597. clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
  38598. },
  38599. title: t.getLocaleModel().get(["toolbox", "brush", "title"])
  38600. }
  38601. }, e
  38602. }(yz);
  38603. var jV = function (t) {
  38604. function e() {
  38605. var n = null !== t && t.apply(this, arguments) || this;
  38606. return n.type = e.type, n.layoutMode = {
  38607. type: "box",
  38608. ignoreSize: !0
  38609. }, n
  38610. }
  38611. return n(e, t), e.type = "title", e.defaultOption = {
  38612. z: 6,
  38613. show: !0,
  38614. text: "",
  38615. target: "blank",
  38616. subtext: "",
  38617. subtarget: "blank",
  38618. left: 0,
  38619. top: 0,
  38620. backgroundColor: "rgba(0,0,0,0)",
  38621. borderColor: "#ccc",
  38622. borderWidth: 0,
  38623. padding: 5,
  38624. itemGap: 10,
  38625. textStyle: {
  38626. fontSize: 18,
  38627. fontWeight: "bold",
  38628. color: "#464646"
  38629. },
  38630. subtextStyle: {
  38631. fontSize: 12,
  38632. color: "#6E7079"
  38633. }
  38634. }, e
  38635. }(zp),
  38636. qV = function (t) {
  38637. function e() {
  38638. var n = null !== t && t.apply(this, arguments) || this;
  38639. return n.type = e.type, n
  38640. }
  38641. return n(e, t), e.prototype.render = function (t, e, n) {
  38642. if (this.group.removeAll(), t.get("show")) {
  38643. var i = this.group,
  38644. r = t.getModel("textStyle"),
  38645. o = t.getModel("subtextStyle"),
  38646. a = t.get("textAlign"),
  38647. s = rt(t.get("textBaseline"), t.get("textVerticalAlign")),
  38648. l = new Xs({
  38649. style: oc(r, {
  38650. text: t.get("text"),
  38651. fill: r.getTextColor()
  38652. }, {
  38653. disableBox: !0
  38654. }),
  38655. z2: 10
  38656. }),
  38657. u = l.getBoundingRect(),
  38658. h = t.get("subtext"),
  38659. c = new Xs({
  38660. style: oc(o, {
  38661. text: h,
  38662. fill: o.getTextColor(),
  38663. y: u.height + t.get("itemGap"),
  38664. verticalAlign: "top"
  38665. }, {
  38666. disableBox: !0
  38667. }),
  38668. z2: 10
  38669. }),
  38670. p = t.get("link"),
  38671. d = t.get("sublink"),
  38672. f = t.get("triggerEvent", !0);
  38673. l.silent = !p && !f, c.silent = !d && !f, p && l.on("click", (function () {
  38674. Mp(p, "_" + t.get("target"))
  38675. })), d && c.on("click", (function () {
  38676. Mp(d, "_" + t.get("subtarget"))
  38677. })), rl(l).eventData = rl(c).eventData = f ? {
  38678. componentType: "title",
  38679. componentIndex: t.componentIndex
  38680. } : null, i.add(l), h && i.add(c);
  38681. var g = i.getBoundingRect(),
  38682. y = t.getBoxLayoutParams();
  38683. y.width = g.width, y.height = g.height;
  38684. var v = kp(y, {
  38685. width: n.getWidth(),
  38686. height: n.getHeight()
  38687. }, t.get("padding"));
  38688. a || ("middle" === (a = t.get("left") || t.get("right")) && (a = "center"), "right" === a ? v.x += v.width : "center" === a && (v.x += v.width / 2)), s || ("center" === (s = t.get("top") || t.get("bottom")) && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), i.x = v.x, i.y = v.y, i.markRedraw();
  38689. var m = {
  38690. align: a,
  38691. verticalAlign: s
  38692. };
  38693. l.setStyle(m), c.setStyle(m), g = i.getBoundingRect();
  38694. var x = v.margin,
  38695. _ = t.getItemStyle(["color", "opacity"]);
  38696. _.fill = t.get("backgroundColor");
  38697. var b = new Ws({
  38698. shape: {
  38699. x: g.x - x[3],
  38700. y: g.y - x[0],
  38701. width: g.width + x[1] + x[3],
  38702. height: g.height + x[0] + x[2],
  38703. r: t.get("borderRadius")
  38704. },
  38705. style: _,
  38706. subPixelOptimize: !0,
  38707. silent: !0
  38708. });
  38709. i.add(b)
  38710. }
  38711. }, e.type = "title", e
  38712. }(Ag);
  38713. var KV = function (t) {
  38714. function e() {
  38715. var n = null !== t && t.apply(this, arguments) || this;
  38716. return n.type = e.type, n.layoutMode = "box", n
  38717. }
  38718. return n(e, t), e.prototype.init = function (t, e, n) {
  38719. this.mergeDefaultAndTheme(t, n), this._initData()
  38720. }, e.prototype.mergeOption = function (e) {
  38721. t.prototype.mergeOption.apply(this, arguments), this._initData()
  38722. }, e.prototype.setCurrentIndex = function (t) {
  38723. null == t && (t = this.option.currentIndex);
  38724. var e = this._data.count();
  38725. this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1), t < 0 && (t = 0)), this.option.currentIndex = t
  38726. }, e.prototype.getCurrentIndex = function () {
  38727. return this.option.currentIndex
  38728. }, e.prototype.isIndexMax = function () {
  38729. return this.getCurrentIndex() >= this._data.count() - 1
  38730. }, e.prototype.setPlayState = function (t) {
  38731. this.option.autoPlay = !!t
  38732. }, e.prototype.getPlayState = function () {
  38733. return !!this.option.autoPlay
  38734. }, e.prototype._initData = function () {
  38735. var t, e = this.option,
  38736. n = e.data || [],
  38737. i = e.axisType,
  38738. r = this._names = [];
  38739. "category" === i ? (t = [], E(n, (function (e, n) {
  38740. var i, o = Ro(Ao(e), "");
  38741. q(e) ? (i = T(e)).value = n : i = n, t.push(i), r.push(o)
  38742. }))) : t = n;
  38743. var o = {
  38744. category: "ordinal",
  38745. time: "time",
  38746. value: "number"
  38747. } [i] || "number";
  38748. (this._data = new cx([{
  38749. name: "value",
  38750. type: o
  38751. }], this)).initData(t, r)
  38752. }, e.prototype.getData = function () {
  38753. return this._data
  38754. }, e.prototype.getCategories = function () {
  38755. if ("category" === this.get("axisType")) return this._names.slice()
  38756. }, e.type = "timeline", e.defaultOption = {
  38757. z: 4,
  38758. show: !0,
  38759. axisType: "time",
  38760. realtime: !0,
  38761. left: "20%",
  38762. top: null,
  38763. right: "20%",
  38764. bottom: 0,
  38765. width: null,
  38766. height: 40,
  38767. padding: 5,
  38768. controlPosition: "left",
  38769. autoPlay: !1,
  38770. rewind: !1,
  38771. loop: !0,
  38772. playInterval: 2e3,
  38773. currentIndex: 0,
  38774. itemStyle: {},
  38775. label: {
  38776. color: "#000"
  38777. },
  38778. data: []
  38779. }, e
  38780. }(zp),
  38781. $V = function (t) {
  38782. function e() {
  38783. var n = null !== t && t.apply(this, arguments) || this;
  38784. return n.type = e.type, n
  38785. }
  38786. return n(e, t), e.type = "timeline.slider", e.defaultOption = kc(KV.defaultOption, {
  38787. backgroundColor: "rgba(0,0,0,0)",
  38788. borderColor: "#ccc",
  38789. borderWidth: 0,
  38790. orient: "horizontal",
  38791. inverse: !1,
  38792. tooltip: {
  38793. trigger: "item"
  38794. },
  38795. symbol: "circle",
  38796. symbolSize: 12,
  38797. lineStyle: {
  38798. show: !0,
  38799. width: 2,
  38800. color: "#DAE1F5"
  38801. },
  38802. label: {
  38803. position: "auto",
  38804. show: !0,
  38805. interval: "auto",
  38806. rotate: 0,
  38807. color: "#A4B1D7"
  38808. },
  38809. itemStyle: {
  38810. color: "#A4B1D7",
  38811. borderWidth: 1
  38812. },
  38813. checkpointStyle: {
  38814. symbol: "circle",
  38815. symbolSize: 15,
  38816. color: "#316bf3",
  38817. borderColor: "#fff",
  38818. borderWidth: 2,
  38819. shadowBlur: 2,
  38820. shadowOffsetX: 1,
  38821. shadowOffsetY: 1,
  38822. shadowColor: "rgba(0, 0, 0, 0.3)",
  38823. animation: !0,
  38824. animationDuration: 300,
  38825. animationEasing: "quinticInOut"
  38826. },
  38827. controlStyle: {
  38828. show: !0,
  38829. showPlayBtn: !0,
  38830. showPrevBtn: !0,
  38831. showNextBtn: !0,
  38832. itemSize: 24,
  38833. itemGap: 12,
  38834. position: "left",
  38835. playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
  38836. stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
  38837. nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",
  38838. prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",
  38839. prevBtnSize: 18,
  38840. nextBtnSize: 18,
  38841. color: "#A4B1D7",
  38842. borderColor: "#A4B1D7",
  38843. borderWidth: 1
  38844. },
  38845. emphasis: {
  38846. label: {
  38847. show: !0,
  38848. color: "#6f778d"
  38849. },
  38850. itemStyle: {
  38851. color: "#316BF3"
  38852. },
  38853. controlStyle: {
  38854. color: "#316BF3",
  38855. borderColor: "#316BF3",
  38856. borderWidth: 2
  38857. }
  38858. },
  38859. progress: {
  38860. lineStyle: {
  38861. color: "#316BF3"
  38862. },
  38863. itemStyle: {
  38864. color: "#316BF3"
  38865. },
  38866. label: {
  38867. color: "#6f778d"
  38868. }
  38869. },
  38870. data: []
  38871. }), e
  38872. }(KV);
  38873. R($V, _f.prototype);
  38874. var JV = function (t) {
  38875. function e() {
  38876. var n = null !== t && t.apply(this, arguments) || this;
  38877. return n.type = e.type, n
  38878. }
  38879. return n(e, t), e.type = "timeline", e
  38880. }(Ag),
  38881. QV = function (t) {
  38882. function e(e, n, i, r) {
  38883. var o = t.call(this, e, n, i) || this;
  38884. return o.type = r || "value", o
  38885. }
  38886. return n(e, t), e.prototype.getLabelModel = function () {
  38887. return this.model.getModel("label")
  38888. }, e.prototype.isHorizontal = function () {
  38889. return "horizontal" === this.model.get("orient")
  38890. }, e
  38891. }(ob),
  38892. tB = Math.PI,
  38893. eB = Vo(),
  38894. nB = function (t) {
  38895. function e() {
  38896. var n = null !== t && t.apply(this, arguments) || this;
  38897. return n.type = e.type, n
  38898. }
  38899. return n(e, t), e.prototype.init = function (t, e) {
  38900. this.api = e
  38901. }, e.prototype.render = function (t, e, n) {
  38902. if (this.model = t, this.api = n, this.ecModel = e, this.group.removeAll(), t.get("show", !0)) {
  38903. var i = this._layout(t, n),
  38904. r = this._createGroup("_mainGroup"),
  38905. o = this._createGroup("_labelGroup"),
  38906. a = this._axis = this._createAxis(i, t);
  38907. t.formatTooltip = function (t) {
  38908. return og("nameValue", {
  38909. noName: !0,
  38910. value: a.scale.getLabel({
  38911. value: t
  38912. })
  38913. })
  38914. }, E(["AxisLine", "AxisTick", "Control", "CurrentPointer"], (function (e) {
  38915. this["_render" + e](i, r, a, t)
  38916. }), this), this._renderAxisLabel(i, o, a, t), this._position(i, t)
  38917. }
  38918. this._doPlayStop(), this._updateTicksStatus()
  38919. }, e.prototype.remove = function () {
  38920. this._clearTimer(), this.group.removeAll()
  38921. }, e.prototype.dispose = function () {
  38922. this._clearTimer()
  38923. }, e.prototype._layout = function (t, e) {
  38924. var n, i, r, o, a = t.get(["label", "position"]),
  38925. s = t.get("orient"),
  38926. l = function (t, e) {
  38927. return kp(t.getBoxLayoutParams(), {
  38928. width: e.getWidth(),
  38929. height: e.getHeight()
  38930. }, t.get("padding"))
  38931. }(t, e),
  38932. u = {
  38933. horizontal: "center",
  38934. vertical: (n = null == a || "auto" === a ? "horizontal" === s ? l.y + l.height / 2 < e.getHeight() / 2 ? "-" : "+" : l.x + l.width / 2 < e.getWidth() / 2 ? "+" : "-" : U(a) ? {
  38935. horizontal: {
  38936. top: "-",
  38937. bottom: "+"
  38938. },
  38939. vertical: {
  38940. left: "-",
  38941. right: "+"
  38942. }
  38943. } [s][a] : a) >= 0 || "+" === n ? "left" : "right"
  38944. },
  38945. h = {
  38946. horizontal: n >= 0 || "+" === n ? "top" : "bottom",
  38947. vertical: "middle"
  38948. },
  38949. c = {
  38950. horizontal: 0,
  38951. vertical: tB / 2
  38952. },
  38953. p = "vertical" === s ? l.height : l.width,
  38954. d = t.getModel("controlStyle"),
  38955. f = d.get("show", !0),
  38956. g = f ? d.get("itemSize") : 0,
  38957. y = f ? d.get("itemGap") : 0,
  38958. v = g + y,
  38959. m = t.get(["label", "rotate"]) || 0;
  38960. m = m * tB / 180;
  38961. var x = d.get("position", !0),
  38962. _ = f && d.get("showPlayBtn", !0),
  38963. b = f && d.get("showPrevBtn", !0),
  38964. w = f && d.get("showNextBtn", !0),
  38965. S = 0,
  38966. M = p;
  38967. "left" === x || "bottom" === x ? (_ && (i = [0, 0], S += v), b && (r = [S, 0], S += v), w && (o = [M - g, 0], M -= v)) : (_ && (i = [M - g, 0], M -= v), b && (r = [0, 0], S += v), w && (o = [M - g, 0], M -= v));
  38968. var I = [S, M];
  38969. return t.get("inverse") && I.reverse(), {
  38970. viewRect: l,
  38971. mainLength: p,
  38972. orient: s,
  38973. rotation: c[s],
  38974. labelRotation: m,
  38975. labelPosOpt: n,
  38976. labelAlign: t.get(["label", "align"]) || u[s],
  38977. labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || h[s],
  38978. playPosition: i,
  38979. prevBtnPosition: r,
  38980. nextBtnPosition: o,
  38981. axisExtent: I,
  38982. controlSize: g,
  38983. controlGap: y
  38984. }
  38985. }, e.prototype._position = function (t, e) {
  38986. var n = this._mainGroup,
  38987. i = this._labelGroup,
  38988. r = t.viewRect;
  38989. if ("vertical" === t.orient) {
  38990. var o = [1, 0, 0, 1, 0, 0],
  38991. a = r.x,
  38992. s = r.y + r.height;
  38993. we(o, o, [-a, -s]), Se(o, o, -tB / 2), we(o, o, [a, s]), (r = r.clone()).applyTransform(o)
  38994. }
  38995. var l = y(r),
  38996. u = y(n.getBoundingRect()),
  38997. h = y(i.getBoundingRect()),
  38998. c = [n.x, n.y],
  38999. p = [i.x, i.y];
  39000. p[0] = c[0] = l[0][0];
  39001. var d, f = t.labelPosOpt;
  39002. null == f || U(f) ? (v(c, u, l, 1, d = "+" === f ? 0 : 1), v(p, h, l, 1, 1 - d)) : (v(c, u, l, 1, d = f >= 0 ? 0 : 1), p[1] = c[1] + f);
  39003. function g(t) {
  39004. t.originX = l[0][0] - t.x, t.originY = l[1][0] - t.y
  39005. }
  39006. function y(t) {
  39007. return [
  39008. [t.x, t.x + t.width],
  39009. [t.y, t.y + t.height]
  39010. ]
  39011. }
  39012. function v(t, e, n, i, r) {
  39013. t[i] += n[i][r] - e[i][r]
  39014. }
  39015. n.setPosition(c), i.setPosition(p), n.rotation = i.rotation = t.rotation, g(n), g(i)
  39016. }, e.prototype._createAxis = function (t, e) {
  39017. var n = e.getData(),
  39018. i = e.get("axisType"),
  39019. r = function (t, e) {
  39020. if (e = e || t.get("type"), e) switch (e) {
  39021. case "category":
  39022. return new Rx({
  39023. ordinalMeta: t.getCategories(),
  39024. extent: [1 / 0, -1 / 0]
  39025. });
  39026. case "time":
  39027. return new Kx({
  39028. locale: t.ecModel.getLocaleModel(),
  39029. useUTC: t.ecModel.get("useUTC")
  39030. });
  39031. default:
  39032. return new Ex
  39033. }
  39034. }(e, i);
  39035. r.getTicks = function () {
  39036. return n.mapArray(["value"], (function (t) {
  39037. return {
  39038. value: t
  39039. }
  39040. }))
  39041. };
  39042. var o = n.getDataExtent("value");
  39043. r.setExtent(o[0], o[1]), r.calcNiceTicks();
  39044. var a = new QV("value", r, t.axisExtent, i);
  39045. return a.model = e, a
  39046. }, e.prototype._createGroup = function (t) {
  39047. var e = this[t] = new Br;
  39048. return this.group.add(e), e
  39049. }, e.prototype._renderAxisLine = function (t, e, n, i) {
  39050. var r = n.getExtent();
  39051. if (i.get(["lineStyle", "show"])) {
  39052. var o = new Ku({
  39053. shape: {
  39054. x1: r[0],
  39055. y1: 0,
  39056. x2: r[1],
  39057. y2: 0
  39058. },
  39059. style: A({
  39060. lineCap: "round"
  39061. }, i.getModel("lineStyle").getLineStyle()),
  39062. silent: !0,
  39063. z2: 1
  39064. });
  39065. e.add(o);
  39066. var a = this._progressLine = new Ku({
  39067. shape: {
  39068. x1: r[0],
  39069. x2: this._currentPointer ? this._currentPointer.x : r[0],
  39070. y1: 0,
  39071. y2: 0
  39072. },
  39073. style: k({
  39074. lineCap: "round",
  39075. lineWidth: o.style.lineWidth
  39076. }, i.getModel(["progress", "lineStyle"]).getLineStyle()),
  39077. silent: !0,
  39078. z2: 1
  39079. });
  39080. e.add(a)
  39081. }
  39082. }, e.prototype._renderAxisTick = function (t, e, n, i) {
  39083. var r = this,
  39084. o = i.getData(),
  39085. a = n.scale.getTicks();
  39086. this._tickSymbols = [], E(a, (function (t) {
  39087. var a = n.dataToCoord(t.value),
  39088. s = o.getItemModel(t.value),
  39089. l = s.getModel("itemStyle"),
  39090. u = s.getModel(["emphasis", "itemStyle"]),
  39091. h = s.getModel(["progress", "itemStyle"]),
  39092. c = {
  39093. x: a,
  39094. y: 0,
  39095. onclick: W(r._changeTimeline, r, t.value)
  39096. },
  39097. p = iB(s, l, e, c);
  39098. p.ensureState("emphasis").style = u.getItemStyle(), p.ensureState("progress").style = h.getItemStyle(), Ul(p);
  39099. var d = rl(p);
  39100. s.get("tooltip") ? (d.dataIndex = t.value, d.dataModel = i) : d.dataIndex = d.dataModel = null, r._tickSymbols.push(p)
  39101. }))
  39102. }, e.prototype._renderAxisLabel = function (t, e, n, i) {
  39103. var r = this;
  39104. if (n.getLabelModel().get("show")) {
  39105. var o = i.getData(),
  39106. a = n.getViewLabels();
  39107. this._tickLabels = [], E(a, (function (i) {
  39108. var a = i.tickValue,
  39109. s = o.getItemModel(a),
  39110. l = s.getModel("label"),
  39111. u = s.getModel(["emphasis", "label"]),
  39112. h = s.getModel(["progress", "label"]),
  39113. c = n.dataToCoord(i.tickValue),
  39114. p = new Xs({
  39115. x: c,
  39116. y: 0,
  39117. rotation: t.labelRotation - t.rotation,
  39118. onclick: W(r._changeTimeline, r, a),
  39119. silent: !1,
  39120. style: oc(l, {
  39121. text: i.formattedLabel,
  39122. align: t.labelAlign,
  39123. verticalAlign: t.labelBaseline
  39124. })
  39125. });
  39126. p.ensureState("emphasis").style = oc(u), p.ensureState("progress").style = oc(h), e.add(p), Ul(p), eB(p).dataIndex = a, r._tickLabels.push(p)
  39127. }))
  39128. }
  39129. }, e.prototype._renderControl = function (t, e, n, i) {
  39130. var r = t.controlSize,
  39131. o = t.rotation,
  39132. a = i.getModel("controlStyle").getItemStyle(),
  39133. s = i.getModel(["emphasis", "controlStyle"]).getItemStyle(),
  39134. l = i.getPlayState(),
  39135. u = i.get("inverse", !0);
  39136. function h(t, n, l, u) {
  39137. if (t) {
  39138. var h = Cr(rt(i.get(["controlStyle", n + "BtnSize"]), r), r),
  39139. c = function (t, e, n, i) {
  39140. var r = i.style,
  39141. o = Uh(t.get(["controlStyle", e]), i || {}, new ze(n[0], n[1], n[2], n[3]));
  39142. r && o.setStyle(r);
  39143. return o
  39144. }(i, n + "Icon", [0, -h / 2, h, h], {
  39145. x: t[0],
  39146. y: t[1],
  39147. originX: r / 2,
  39148. originY: 0,
  39149. rotation: u ? -o : 0,
  39150. rectHover: !0,
  39151. style: a,
  39152. onclick: l
  39153. });
  39154. c.ensureState("emphasis").style = s, e.add(c), Ul(c)
  39155. }
  39156. }
  39157. h(t.nextBtnPosition, "next", W(this._changeTimeline, this, u ? "-" : "+")), h(t.prevBtnPosition, "prev", W(this._changeTimeline, this, u ? "+" : "-")), h(t.playPosition, l ? "stop" : "play", W(this._handlePlayClick, this, !l), !0)
  39158. }, e.prototype._renderCurrentPointer = function (t, e, n, i) {
  39159. var r = i.getData(),
  39160. o = i.getCurrentIndex(),
  39161. a = r.getItemModel(o).getModel("checkpointStyle"),
  39162. s = this,
  39163. l = {
  39164. onCreate: function (t) {
  39165. t.draggable = !0, t.drift = W(s._handlePointerDrag, s), t.ondragend = W(s._handlePointerDragend, s), rB(t, s._progressLine, o, n, i, !0)
  39166. },
  39167. onUpdate: function (t) {
  39168. rB(t, s._progressLine, o, n, i)
  39169. }
  39170. };
  39171. this._currentPointer = iB(a, a, this._mainGroup, {}, this._currentPointer, l)
  39172. }, e.prototype._handlePlayClick = function (t) {
  39173. this._clearTimer(), this.api.dispatchAction({
  39174. type: "timelinePlayChange",
  39175. playState: t,
  39176. from: this.uid
  39177. })
  39178. }, e.prototype._handlePointerDrag = function (t, e, n) {
  39179. this._clearTimer(), this._pointerChangeTimeline([n.offsetX, n.offsetY])
  39180. }, e.prototype._handlePointerDragend = function (t) {
  39181. this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
  39182. }, e.prototype._pointerChangeTimeline = function (t, e) {
  39183. var n = this._toAxisCoord(t)[0],
  39184. i = Qr(this._axis.getExtent().slice());
  39185. n > i[1] && (n = i[1]), n < i[0] && (n = i[0]), this._currentPointer.x = n, this._currentPointer.markRedraw();
  39186. var r = this._progressLine;
  39187. r && (r.shape.x2 = n, r.dirty());
  39188. var o = this._findNearestTick(n),
  39189. a = this.model;
  39190. (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
  39191. }, e.prototype._doPlayStop = function () {
  39192. var t = this;
  39193. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout((function () {
  39194. var e = t.model;
  39195. t._changeTimeline(e.getCurrentIndex() + (e.get("rewind", !0) ? -1 : 1))
  39196. }), this.model.get("playInterval")))
  39197. }, e.prototype._toAxisCoord = function (t) {
  39198. return Fh(t, this._mainGroup.getLocalTransform(), !0)
  39199. }, e.prototype._findNearestTick = function (t) {
  39200. var e, n = this.model.getData(),
  39201. i = 1 / 0,
  39202. r = this._axis;
  39203. return n.each(["value"], (function (n, o) {
  39204. var a = r.dataToCoord(n),
  39205. s = Math.abs(a - t);
  39206. s < i && (i = s, e = o)
  39207. })), e
  39208. }, e.prototype._clearTimer = function () {
  39209. this._timer && (clearTimeout(this._timer), this._timer = null)
  39210. }, e.prototype._changeTimeline = function (t) {
  39211. var e = this.model.getCurrentIndex();
  39212. "+" === t ? t = e + 1 : "-" === t && (t = e - 1), this.api.dispatchAction({
  39213. type: "timelineChange",
  39214. currentIndex: t,
  39215. from: this.uid
  39216. })
  39217. }, e.prototype._updateTicksStatus = function () {
  39218. var t = this.model.getCurrentIndex(),
  39219. e = this._tickSymbols,
  39220. n = this._tickLabels;
  39221. if (e)
  39222. for (var i = 0; i < e.length; i++) e && e[i] && e[i].toggleState("progress", i < t);
  39223. if (n)
  39224. for (i = 0; i < n.length; i++) n && n[i] && n[i].toggleState("progress", eB(n[i]).dataIndex <= t)
  39225. }, e.type = "timeline.slider", e
  39226. }(JV);
  39227. function iB(t, e, n, i, r, o) {
  39228. var a = e.get("color");
  39229. r ? (r.setColor(a), n.add(r), o && o.onUpdate(r)) : ((r = Xy(t.get("symbol"), -1, -1, 2, 2, a)).setStyle("strokeNoScale", !0), n.add(r), o && o.onCreate(r));
  39230. var s = e.getItemStyle(["color"]);
  39231. r.setStyle(s), i = C({
  39232. rectHover: !0,
  39233. z2: 100
  39234. }, i, !0);
  39235. var l = Uy(t.get("symbolSize"));
  39236. i.scaleX = l[0] / 2, i.scaleY = l[1] / 2;
  39237. var u = Zy(t.get("symbolOffset"), l);
  39238. u && (i.x = (i.x || 0) + u[0], i.y = (i.y || 0) + u[1]);
  39239. var h = t.get("symbolRotate");
  39240. return i.rotation = (h || 0) * Math.PI / 180 || 0, r.attr(i), r.updateTransform(), r
  39241. }
  39242. function rB(t, e, n, i, r, o) {
  39243. if (!t.dragging) {
  39244. var a = r.getModel("checkpointStyle"),
  39245. s = i.dataToCoord(r.getData().get("value", n));
  39246. if (o || !a.get("animation", !0)) t.attr({
  39247. x: s,
  39248. y: 0
  39249. }), e && e.attr({
  39250. shape: {
  39251. x2: s
  39252. }
  39253. });
  39254. else {
  39255. var l = {
  39256. duration: a.get("animationDuration", !0),
  39257. easing: a.get("animationEasing", !0)
  39258. };
  39259. t.stopAnimation(null, !0), t.animateTo({
  39260. x: s,
  39261. y: 0
  39262. }, l), e && e.animateTo({
  39263. shape: {
  39264. x2: s
  39265. }
  39266. }, l)
  39267. }
  39268. }
  39269. }
  39270. function oB(t) {
  39271. var e = t && t.timeline;
  39272. Y(e) || (e = e ? [e] : []), E(e, (function (t) {
  39273. t && function (t) {
  39274. var e = t.type,
  39275. n = {
  39276. number: "value",
  39277. time: "time"
  39278. };
  39279. n[e] && (t.axisType = n[e], delete t.type);
  39280. if (aB(t), sB(t, "controlPosition")) {
  39281. var i = t.controlStyle || (t.controlStyle = {});
  39282. sB(i, "position") || (i.position = t.controlPosition), "none" !== i.position || sB(i, "show") || (i.show = !1, delete i.position), delete t.controlPosition
  39283. }
  39284. E(t.data || [], (function (t) {
  39285. q(t) && !Y(t) && (!sB(t, "value") && sB(t, "name") && (t.value = t.name), aB(t))
  39286. }))
  39287. }(t)
  39288. }))
  39289. }
  39290. function aB(t) {
  39291. var e = t.itemStyle || (t.itemStyle = {}),
  39292. n = e.emphasis || (e.emphasis = {}),
  39293. i = t.label || t.label || {},
  39294. r = i.normal || (i.normal = {}),
  39295. o = {
  39296. normal: 1,
  39297. emphasis: 1
  39298. };
  39299. E(i, (function (t, e) {
  39300. o[e] || sB(r, e) || (r[e] = t)
  39301. })), n.label && !sB(i, "emphasis") && (i.emphasis = n.label, delete n.label)
  39302. }
  39303. function sB(t, e) {
  39304. return t.hasOwnProperty(e)
  39305. }
  39306. function lB(t, e) {
  39307. if (!t) return !1;
  39308. for (var n = Y(t) ? t : [t], i = 0; i < n.length; i++)
  39309. if (n[i] && n[i][e]) return !0;
  39310. return !1
  39311. }
  39312. function uB(t) {
  39313. Co(t, "label", ["show"])
  39314. }
  39315. var hB = Vo(),
  39316. cB = function (t) {
  39317. function e() {
  39318. var n = null !== t && t.apply(this, arguments) || this;
  39319. return n.type = e.type, n.createdBySelf = !1, n
  39320. }
  39321. return n(e, t), e.prototype.init = function (t, e, n) {
  39322. this.mergeDefaultAndTheme(t, n), this._mergeOption(t, n, !1, !0)
  39323. }, e.prototype.isAnimationEnabled = function () {
  39324. if (r.node) return !1;
  39325. var t = this.__hostSeries;
  39326. return this.getShallow("animation") && t && t.isAnimationEnabled()
  39327. }, e.prototype.mergeOption = function (t, e) {
  39328. this._mergeOption(t, e, !1, !1)
  39329. }, e.prototype._mergeOption = function (t, e, n, i) {
  39330. var r = this.mainType;
  39331. n || e.eachSeries((function (t) {
  39332. var n = t.get(this.mainType, !0),
  39333. o = hB(t)[r];
  39334. n && n.data ? (o ? o._mergeOption(n, e, !0) : (i && uB(n), E(n.data, (function (t) {
  39335. t instanceof Array ? (uB(t[0]), uB(t[1])) : uB(t)
  39336. })), A(o = this.createMarkerModelFromSeries(n, this, e), {
  39337. mainType: this.mainType,
  39338. seriesIndex: t.seriesIndex,
  39339. name: t.name,
  39340. createdBySelf: !0
  39341. }), o.__hostSeries = t), hB(t)[r] = o) : hB(t)[r] = null
  39342. }), this)
  39343. }, e.prototype.formatTooltip = function (t, e, n) {
  39344. var i = this.getData(),
  39345. r = this.getRawValue(t),
  39346. o = i.getName(t);
  39347. return og("section", {
  39348. header: this.name,
  39349. blocks: [og("nameValue", {
  39350. name: o,
  39351. value: r,
  39352. noName: !o,
  39353. noValue: null == r
  39354. })]
  39355. })
  39356. }, e.prototype.getData = function () {
  39357. return this._data
  39358. }, e.prototype.setData = function (t) {
  39359. this._data = t
  39360. }, e.getMarkerModelFromSeries = function (t, e) {
  39361. return hB(t)[e]
  39362. }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e
  39363. }(zp);
  39364. R(cB, _f.prototype);
  39365. var pB = function (t) {
  39366. function e() {
  39367. var n = null !== t && t.apply(this, arguments) || this;
  39368. return n.type = e.type, n
  39369. }
  39370. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39371. return new e(t, n, i)
  39372. }, e.type = "markPoint", e.defaultOption = {
  39373. z: 5,
  39374. symbol: "pin",
  39375. symbolSize: 50,
  39376. tooltip: {
  39377. trigger: "item"
  39378. },
  39379. label: {
  39380. show: !0,
  39381. position: "inside"
  39382. },
  39383. itemStyle: {
  39384. borderWidth: 2
  39385. },
  39386. emphasis: {
  39387. label: {
  39388. show: !0
  39389. }
  39390. }
  39391. }, e
  39392. }(cB);
  39393. function dB(t) {
  39394. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
  39395. }
  39396. function fB(t, e, n, i, r, o) {
  39397. var a = [],
  39398. s = mx(e, i) ? e.getCalculationInfo("stackResultDimension") : i,
  39399. l = _B(e, s, t),
  39400. u = e.indicesOfNearest(s, l)[0];
  39401. a[r] = e.get(n, u), a[o] = e.get(s, u);
  39402. var h = e.get(i, u),
  39403. c = to(e.get(i, u));
  39404. return (c = Math.min(c, 20)) >= 0 && (a[o] = +a[o].toFixed(c)), [a, h]
  39405. }
  39406. var gB = {
  39407. min: H(fB, "min"),
  39408. max: H(fB, "max"),
  39409. average: H(fB, "average"),
  39410. median: H(fB, "median")
  39411. };
  39412. function yB(t, e) {
  39413. if (e) {
  39414. var n = t.getData(),
  39415. i = t.coordinateSystem,
  39416. r = i && i.dimensions;
  39417. if (! function (t) {
  39418. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
  39419. }(e) && !Y(e.coord) && Y(r)) {
  39420. var o = vB(e, n, i, t);
  39421. if ((e = T(e)).type && gB[e.type] && o.baseAxis && o.valueAxis) {
  39422. var a = P(r, o.baseAxis.dim),
  39423. s = P(r, o.valueAxis.dim),
  39424. l = gB[e.type](n, o.baseDataDim, o.valueDataDim, a, s);
  39425. e.coord = l[0], e.value = l[1]
  39426. } else e.coord = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis]
  39427. }
  39428. if (null != e.coord && Y(r))
  39429. for (var u = e.coord, h = 0; h < 2; h++) gB[u[h]] && (u[h] = _B(n, n.mapDimension(r[h]), u[h]));
  39430. else e.coord = [];
  39431. return e
  39432. }
  39433. }
  39434. function vB(t, e, n, i) {
  39435. var r = {};
  39436. return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, r.valueAxis = n.getAxis(function (t, e) {
  39437. var n = t.getData().getDimensionInfo(e);
  39438. return n && n.coordDim
  39439. }(i, r.valueDataDim)), r.baseAxis = n.getOtherAxis(r.valueAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = i.getBaseAxis(), r.valueAxis = n.getOtherAxis(r.baseAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim), r.valueDataDim = e.mapDimension(r.valueAxis.dim)), r
  39440. }
  39441. function mB(t, e) {
  39442. return !(t && t.containData && e.coord && !dB(e)) || t.containData(e.coord)
  39443. }
  39444. function xB(t, e) {
  39445. return t ? function (t, n, i, r) {
  39446. return If(r < 2 ? t.coord && t.coord[r] : t.value, e[r])
  39447. } : function (t, n, i, r) {
  39448. return If(t.value, e[r])
  39449. }
  39450. }
  39451. function _B(t, e, n) {
  39452. if ("average" === n) {
  39453. var i = 0,
  39454. r = 0;
  39455. return t.each(e, (function (t, e) {
  39456. isNaN(t) || (i += t, r++)
  39457. })), i / r
  39458. }
  39459. return "median" === n ? t.getMedian(e) : t.getDataExtent(e)["max" === n ? 1 : 0]
  39460. }
  39461. var bB = Vo(),
  39462. wB = function (t) {
  39463. function e() {
  39464. var n = null !== t && t.apply(this, arguments) || this;
  39465. return n.type = e.type, n
  39466. }
  39467. return n(e, t), e.prototype.init = function () {
  39468. this.markerGroupMap = yt()
  39469. }, e.prototype.render = function (t, e, n) {
  39470. var i = this,
  39471. r = this.markerGroupMap;
  39472. r.each((function (t) {
  39473. bB(t).keep = !1
  39474. })), e.eachSeries((function (t) {
  39475. var r = cB.getMarkerModelFromSeries(t, i.type);
  39476. r && i.renderSeries(t, r, e, n)
  39477. })), r.each((function (t) {
  39478. !bB(t).keep && i.group.remove(t.group)
  39479. }))
  39480. }, e.prototype.markKeep = function (t) {
  39481. bB(t).keep = !0
  39482. }, e.prototype.toggleBlurSeries = function (t, e) {
  39483. var n = this;
  39484. E(t, (function (t) {
  39485. var i = cB.getMarkerModelFromSeries(t, n.type);
  39486. i && i.getData().eachItemGraphicEl((function (t) {
  39487. t && (e ? Nl(t) : El(t))
  39488. }))
  39489. }))
  39490. }, e.type = "marker", e
  39491. }(Ag);
  39492. function SB(t, e, n) {
  39493. var i = e.coordinateSystem;
  39494. t.each((function (r) {
  39495. var o, a = t.getItemModel(r),
  39496. s = $r(a.get("x"), n.getWidth()),
  39497. l = $r(a.get("y"), n.getHeight());
  39498. if (isNaN(s) || isNaN(l)) {
  39499. if (e.getMarkerPosition) o = e.getMarkerPosition(t.getValues(t.dimensions, r));
  39500. else if (i) {
  39501. var u = t.get(i.dimensions[0], r),
  39502. h = t.get(i.dimensions[1], r);
  39503. o = i.dataToPoint([u, h])
  39504. }
  39505. } else o = [s, l];
  39506. isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(r, o)
  39507. }))
  39508. }
  39509. var MB = function (t) {
  39510. function e() {
  39511. var n = null !== t && t.apply(this, arguments) || this;
  39512. return n.type = e.type, n
  39513. }
  39514. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39515. e.eachSeries((function (t) {
  39516. var e = cB.getMarkerModelFromSeries(t, "markPoint");
  39517. e && (SB(e.getData(), t, n), this.markerGroupMap.get(t.id).updateLayout())
  39518. }), this)
  39519. }, e.prototype.renderSeries = function (t, e, n, i) {
  39520. var r = t.coordinateSystem,
  39521. o = t.id,
  39522. a = t.getData(),
  39523. s = this.markerGroupMap,
  39524. l = s.get(o) || s.set(o, new mS),
  39525. u = function (t, e, n) {
  39526. var i;
  39527. i = t ? z(t && t.dimensions, (function (t) {
  39528. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  39529. name: t,
  39530. ordinalMeta: null
  39531. })
  39532. })) : [{
  39533. name: "value",
  39534. type: "float"
  39535. }];
  39536. var r = new cx(i, n),
  39537. o = z(n.get("data"), H(yB, e));
  39538. t && (o = B(o, H(mB, t)));
  39539. var a = xB(!!t, i);
  39540. return r.initData(o, null, a), r
  39541. }(r, t, e);
  39542. e.setData(u), SB(e.getData(), t, i), u.each((function (t) {
  39543. var n = u.getItemModel(t),
  39544. i = n.getShallow("symbol"),
  39545. r = n.getShallow("symbolSize"),
  39546. o = n.getShallow("symbolRotate"),
  39547. s = n.getShallow("symbolOffset"),
  39548. l = n.getShallow("symbolKeepAspect");
  39549. if (X(i) || X(r) || X(o) || X(s)) {
  39550. var h = e.getRawValue(t),
  39551. c = e.getDataParams(t);
  39552. X(i) && (i = i(h, c)), X(r) && (r = r(h, c)), X(o) && (o = o(h, c)), X(s) && (s = s(h, c))
  39553. }
  39554. var p = n.getModel("itemStyle").getItemStyle(),
  39555. d = Ay(a, "color");
  39556. p.fill || (p.fill = d), u.setItemVisual(t, {
  39557. symbol: i,
  39558. symbolSize: r,
  39559. symbolRotate: o,
  39560. symbolOffset: s,
  39561. symbolKeepAspect: l,
  39562. style: p
  39563. })
  39564. })), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl((function (t) {
  39565. t.traverse((function (t) {
  39566. rl(t).dataModel = e
  39567. }))
  39568. })), this.markKeep(l), l.group.silent = e.get("silent") || t.get("silent")
  39569. }, e.type = "markPoint", e
  39570. }(wB);
  39571. var IB = function (t) {
  39572. function e() {
  39573. var n = null !== t && t.apply(this, arguments) || this;
  39574. return n.type = e.type, n
  39575. }
  39576. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39577. return new e(t, n, i)
  39578. }, e.type = "markLine", e.defaultOption = {
  39579. z: 5,
  39580. symbol: ["circle", "arrow"],
  39581. symbolSize: [8, 16],
  39582. symbolOffset: 0,
  39583. precision: 2,
  39584. tooltip: {
  39585. trigger: "item"
  39586. },
  39587. label: {
  39588. show: !0,
  39589. position: "end",
  39590. distance: 5
  39591. },
  39592. lineStyle: {
  39593. type: "dashed"
  39594. },
  39595. emphasis: {
  39596. label: {
  39597. show: !0
  39598. },
  39599. lineStyle: {
  39600. width: 3
  39601. }
  39602. },
  39603. animationEasing: "linear"
  39604. }, e
  39605. }(cB),
  39606. TB = Vo(),
  39607. CB = function (t, e, n, i) {
  39608. var r, o = t.getData();
  39609. if (Y(i)) r = i;
  39610. else {
  39611. var a = i.type;
  39612. if ("min" === a || "max" === a || "average" === a || "median" === a || null != i.xAxis || null != i.yAxis) {
  39613. var s = void 0,
  39614. l = void 0;
  39615. if (null != i.yAxis || null != i.xAxis) s = e.getAxis(null != i.yAxis ? "y" : "x"), l = it(i.yAxis, i.xAxis);
  39616. else {
  39617. var u = vB(i, o, e, t);
  39618. s = u.valueAxis, l = _B(o, xx(o, u.valueDataDim), a)
  39619. }
  39620. var h = "x" === s.dim ? 0 : 1,
  39621. c = 1 - h,
  39622. p = T(i),
  39623. d = {
  39624. coord: []
  39625. };
  39626. p.type = null, p.coord = [], p.coord[c] = -1 / 0, d.coord[c] = 1 / 0;
  39627. var f = n.get("precision");
  39628. f >= 0 && j(l) && (l = +l.toFixed(Math.min(f, 20))), p.coord[h] = d.coord[h] = l, r = [p, d, {
  39629. type: a,
  39630. valueIndex: i.valueIndex,
  39631. value: l
  39632. }]
  39633. } else r = []
  39634. }
  39635. var g = [yB(t, r[0]), yB(t, r[1]), A({}, r[2])];
  39636. return g[2].type = g[2].type || null, C(g[2], g[0]), C(g[2], g[1]), g
  39637. };
  39638. function DB(t) {
  39639. return !isNaN(t) && !isFinite(t)
  39640. }
  39641. function AB(t, e, n, i) {
  39642. var r = 1 - t,
  39643. o = i.dimensions[t];
  39644. return DB(e[r]) && DB(n[r]) && e[t] === n[t] && i.getAxis(o).containData(e[t])
  39645. }
  39646. function kB(t, e) {
  39647. if ("cartesian2d" === t.type) {
  39648. var n = e[0].coord,
  39649. i = e[1].coord;
  39650. if (n && i && (AB(1, n, i, t) || AB(0, n, i, t))) return !0
  39651. }
  39652. return mB(t, e[0]) && mB(t, e[1])
  39653. }
  39654. function LB(t, e, n, i, r) {
  39655. var o, a = i.coordinateSystem,
  39656. s = t.getItemModel(e),
  39657. l = $r(s.get("x"), r.getWidth()),
  39658. u = $r(s.get("y"), r.getHeight());
  39659. if (isNaN(l) || isNaN(u)) {
  39660. if (i.getMarkerPosition) o = i.getMarkerPosition(t.getValues(t.dimensions, e));
  39661. else {
  39662. var h = a.dimensions,
  39663. c = t.get(h[0], e),
  39664. p = t.get(h[1], e);
  39665. o = a.dataToPoint([c, p])
  39666. }
  39667. if (PS(a, "cartesian2d")) {
  39668. var d = a.getAxis("x"),
  39669. f = a.getAxis("y");
  39670. h = a.dimensions;
  39671. DB(t.get(h[0], e)) ? o[0] = d.toGlobalCoord(d.getExtent()[n ? 0 : 1]) : DB(t.get(h[1], e)) && (o[1] = f.toGlobalCoord(f.getExtent()[n ? 0 : 1]))
  39672. }
  39673. isNaN(l) || (o[0] = l), isNaN(u) || (o[1] = u)
  39674. } else o = [l, u];
  39675. t.setItemLayout(e, o)
  39676. }
  39677. var PB = function (t) {
  39678. function e() {
  39679. var n = null !== t && t.apply(this, arguments) || this;
  39680. return n.type = e.type, n
  39681. }
  39682. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39683. e.eachSeries((function (t) {
  39684. var e = cB.getMarkerModelFromSeries(t, "markLine");
  39685. if (e) {
  39686. var i = e.getData(),
  39687. r = TB(e).from,
  39688. o = TB(e).to;
  39689. r.each((function (e) {
  39690. LB(r, e, !0, t, n), LB(o, e, !1, t, n)
  39691. })), i.each((function (t) {
  39692. i.setItemLayout(t, [r.getItemLayout(t), o.getItemLayout(t)])
  39693. })), this.markerGroupMap.get(t.id).updateLayout()
  39694. }
  39695. }), this)
  39696. }, e.prototype.renderSeries = function (t, e, n, i) {
  39697. var r = t.coordinateSystem,
  39698. o = t.id,
  39699. a = t.getData(),
  39700. s = this.markerGroupMap,
  39701. l = s.get(o) || s.set(o, new WA);
  39702. this.group.add(l.group);
  39703. var u = function (t, e, n) {
  39704. var i;
  39705. i = t ? z(t && t.dimensions, (function (t) {
  39706. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  39707. name: t,
  39708. ordinalMeta: null
  39709. })
  39710. })) : [{
  39711. name: "value",
  39712. type: "float"
  39713. }];
  39714. var r = new cx(i, n),
  39715. o = new cx(i, n),
  39716. a = new cx([], n),
  39717. s = z(n.get("data"), H(CB, e, t, n));
  39718. t && (s = B(s, H(kB, t)));
  39719. var l = xB(!!t, i);
  39720. return r.initData(z(s, (function (t) {
  39721. return t[0]
  39722. })), null, l), o.initData(z(s, (function (t) {
  39723. return t[1]
  39724. })), null, l), a.initData(z(s, (function (t) {
  39725. return t[2]
  39726. }))), a.hasItemOption = !0, {
  39727. from: r,
  39728. to: o,
  39729. line: a
  39730. }
  39731. }(r, t, e),
  39732. h = u.from,
  39733. c = u.to,
  39734. p = u.line;
  39735. TB(e).from = h, TB(e).to = c, e.setData(p);
  39736. var d = e.get("symbol"),
  39737. f = e.get("symbolSize"),
  39738. g = e.get("symbolRotate"),
  39739. y = e.get("symbolOffset");
  39740. function v(e, n, r) {
  39741. var o = e.getItemModel(n);
  39742. LB(e, n, r, t, i);
  39743. var s = o.getModel("itemStyle").getItemStyle();
  39744. null == s.fill && (s.fill = Ay(a, "color")), e.setItemVisual(n, {
  39745. symbolKeepAspect: o.get("symbolKeepAspect"),
  39746. symbolOffset: rt(o.get("symbolOffset", !0), y[r ? 0 : 1]),
  39747. symbolRotate: rt(o.get("symbolRotate", !0), g[r ? 0 : 1]),
  39748. symbolSize: rt(o.get("symbolSize"), f[r ? 0 : 1]),
  39749. symbol: rt(o.get("symbol", !0), d[r ? 0 : 1]),
  39750. style: s
  39751. })
  39752. }
  39753. Y(d) || (d = [d, d]), Y(f) || (f = [f, f]), Y(g) || (g = [g, g]), Y(y) || (y = [y, y]), u.from.each((function (t) {
  39754. v(h, t, !0), v(c, t, !1)
  39755. })), p.each((function (t) {
  39756. var e = p.getItemModel(t).getModel("lineStyle").getLineStyle();
  39757. p.setItemLayout(t, [h.getItemLayout(t), c.getItemLayout(t)]), null == e.stroke && (e.stroke = h.getItemVisual(t, "style").fill), p.setItemVisual(t, {
  39758. fromSymbolKeepAspect: h.getItemVisual(t, "symbolKeepAspect"),
  39759. fromSymbolOffset: h.getItemVisual(t, "symbolOffset"),
  39760. fromSymbolRotate: h.getItemVisual(t, "symbolRotate"),
  39761. fromSymbolSize: h.getItemVisual(t, "symbolSize"),
  39762. fromSymbol: h.getItemVisual(t, "symbol"),
  39763. toSymbolKeepAspect: c.getItemVisual(t, "symbolKeepAspect"),
  39764. toSymbolOffset: c.getItemVisual(t, "symbolOffset"),
  39765. toSymbolRotate: c.getItemVisual(t, "symbolRotate"),
  39766. toSymbolSize: c.getItemVisual(t, "symbolSize"),
  39767. toSymbol: c.getItemVisual(t, "symbol"),
  39768. style: e
  39769. })
  39770. })), l.updateData(p), u.line.eachItemGraphicEl((function (t) {
  39771. rl(t).dataModel = e, t.traverse((function (t) {
  39772. rl(t).dataModel = e
  39773. }))
  39774. })), this.markKeep(l), l.group.silent = e.get("silent") || t.get("silent")
  39775. }, e.type = "markLine", e
  39776. }(wB);
  39777. var OB = function (t) {
  39778. function e() {
  39779. var n = null !== t && t.apply(this, arguments) || this;
  39780. return n.type = e.type, n
  39781. }
  39782. return n(e, t), e.prototype.createMarkerModelFromSeries = function (t, n, i) {
  39783. return new e(t, n, i)
  39784. }, e.type = "markArea", e.defaultOption = {
  39785. z: 1,
  39786. tooltip: {
  39787. trigger: "item"
  39788. },
  39789. animation: !1,
  39790. label: {
  39791. show: !0,
  39792. position: "top"
  39793. },
  39794. itemStyle: {
  39795. borderWidth: 0
  39796. },
  39797. emphasis: {
  39798. label: {
  39799. show: !0,
  39800. position: "top"
  39801. }
  39802. }
  39803. }, e
  39804. }(cB),
  39805. RB = Vo(),
  39806. NB = function (t, e, n, i) {
  39807. var r = i[0],
  39808. o = i[1];
  39809. if (r && o) {
  39810. var a = yB(t, r),
  39811. s = yB(t, o),
  39812. l = a.coord,
  39813. u = s.coord;
  39814. l[0] = it(l[0], -1 / 0), l[1] = it(l[1], -1 / 0), u[0] = it(u[0], 1 / 0), u[1] = it(u[1], 1 / 0);
  39815. var h = D([{}, a, s]);
  39816. return h.coord = [a.coord, s.coord], h.x0 = a.x, h.y0 = a.y, h.x1 = s.x, h.y1 = s.y, h
  39817. }
  39818. };
  39819. function EB(t) {
  39820. return !isNaN(t) && !isFinite(t)
  39821. }
  39822. function zB(t, e, n, i) {
  39823. var r = 1 - t;
  39824. return EB(e[r]) && EB(n[r])
  39825. }
  39826. function VB(t, e) {
  39827. var n = e.coord[0],
  39828. i = e.coord[1],
  39829. r = {
  39830. coord: n,
  39831. x: e.x0,
  39832. y: e.y0
  39833. },
  39834. o = {
  39835. coord: i,
  39836. x: e.x1,
  39837. y: e.y1
  39838. };
  39839. return PS(t, "cartesian2d") ? !(!n || !i || !zB(1, n, i) && !zB(0, n, i)) || function (t, e, n) {
  39840. return !(t && t.containZone && e.coord && n.coord && !dB(e) && !dB(n)) || t.containZone(e.coord, n.coord)
  39841. }(t, r, o) : mB(t, r) || mB(t, o)
  39842. }
  39843. function BB(t, e, n, i, r) {
  39844. var o, a = i.coordinateSystem,
  39845. s = t.getItemModel(e),
  39846. l = $r(s.get(n[0]), r.getWidth()),
  39847. u = $r(s.get(n[1]), r.getHeight());
  39848. if (isNaN(l) || isNaN(u)) {
  39849. if (i.getMarkerPosition) {
  39850. var h = t.getValues(["x0", "y0"], e),
  39851. c = t.getValues(["x1", "y1"], e),
  39852. p = a.clampData(h),
  39853. d = a.clampData(c),
  39854. f = [];
  39855. "x0" === n[0] ? f[0] = p[0] > d[0] ? c[0] : h[0] : f[0] = p[0] > d[0] ? h[0] : c[0], "y0" === n[1] ? f[1] = p[1] > d[1] ? c[1] : h[1] : f[1] = p[1] > d[1] ? h[1] : c[1], o = i.getMarkerPosition(f, n, !0)
  39856. } else {
  39857. var g = [m = t.get(n[0], e), x = t.get(n[1], e)];
  39858. a.clampData && a.clampData(g, g), o = a.dataToPoint(g, !0)
  39859. }
  39860. if (PS(a, "cartesian2d")) {
  39861. var y = a.getAxis("x"),
  39862. v = a.getAxis("y"),
  39863. m = t.get(n[0], e),
  39864. x = t.get(n[1], e);
  39865. EB(m) ? o[0] = y.toGlobalCoord(y.getExtent()["x0" === n[0] ? 0 : 1]) : EB(x) && (o[1] = v.toGlobalCoord(v.getExtent()["y0" === n[1] ? 0 : 1]))
  39866. }
  39867. isNaN(l) || (o[0] = l), isNaN(u) || (o[1] = u)
  39868. } else o = [l, u];
  39869. return o
  39870. }
  39871. var FB = [
  39872. ["x0", "y0"],
  39873. ["x1", "y0"],
  39874. ["x1", "y1"],
  39875. ["x0", "y1"]
  39876. ],
  39877. GB = function (t) {
  39878. function e() {
  39879. var n = null !== t && t.apply(this, arguments) || this;
  39880. return n.type = e.type, n
  39881. }
  39882. return n(e, t), e.prototype.updateTransform = function (t, e, n) {
  39883. e.eachSeries((function (t) {
  39884. var e = cB.getMarkerModelFromSeries(t, "markArea");
  39885. if (e) {
  39886. var i = e.getData();
  39887. i.each((function (e) {
  39888. var r = z(FB, (function (r) {
  39889. return BB(i, e, r, t, n)
  39890. }));
  39891. i.setItemLayout(e, r), i.getItemGraphicEl(e).setShape("points", r)
  39892. }))
  39893. }
  39894. }), this)
  39895. }, e.prototype.renderSeries = function (t, e, n, i) {
  39896. var r = t.coordinateSystem,
  39897. o = t.id,
  39898. a = t.getData(),
  39899. s = this.markerGroupMap,
  39900. l = s.get(o) || s.set(o, {
  39901. group: new Br
  39902. });
  39903. this.group.add(l.group), this.markKeep(l);
  39904. var u = function (t, e, n) {
  39905. var i, r, o = ["x0", "y0", "x1", "y1"];
  39906. if (t) {
  39907. var a = z(t && t.dimensions, (function (t) {
  39908. var n = e.getData();
  39909. return A(A({}, n.getDimensionInfo(n.mapDimension(t)) || {}), {
  39910. name: t,
  39911. ordinalMeta: null
  39912. })
  39913. }));
  39914. r = z(o, (function (t, e) {
  39915. return {
  39916. name: t,
  39917. type: a[e % 2].type
  39918. }
  39919. })), i = new cx(r, n)
  39920. } else i = new cx(r = [{
  39921. name: "value",
  39922. type: "float"
  39923. }], n);
  39924. var s = z(n.get("data"), H(NB, e, t, n));
  39925. t && (s = B(s, H(VB, t)));
  39926. var l = t ? function (t, e, n, i) {
  39927. return If(t.coord[Math.floor(i / 2)][i % 2], r[i])
  39928. } : function (t, e, n, i) {
  39929. return If(t.value, r[i])
  39930. };
  39931. return i.initData(s, null, l), i.hasItemOption = !0, i
  39932. }(r, t, e);
  39933. e.setData(u), u.each((function (e) {
  39934. var n = z(FB, (function (n) {
  39935. return BB(u, e, n, t, i)
  39936. })),
  39937. o = r.getAxis("x").scale,
  39938. s = r.getAxis("y").scale,
  39939. l = o.getExtent(),
  39940. h = s.getExtent(),
  39941. c = [o.parse(u.get("x0", e)), o.parse(u.get("x1", e))],
  39942. p = [s.parse(u.get("y0", e)), s.parse(u.get("y1", e))];
  39943. Qr(c), Qr(p);
  39944. var d = !!(l[0] > c[1] || l[1] < c[0] || h[0] > p[1] || h[1] < p[0]);
  39945. u.setItemLayout(e, {
  39946. points: n,
  39947. allClipped: d
  39948. });
  39949. var f = u.getItemModel(e).getModel("itemStyle").getItemStyle(),
  39950. g = Ay(a, "color");
  39951. f.fill || (f.fill = g, U(f.fill) && (f.fill = ii(f.fill, .4))), f.stroke || (f.stroke = g), u.setItemVisual(e, "style", f)
  39952. })), u.diff(RB(l).data).add((function (t) {
  39953. var e = u.getItemLayout(t);
  39954. if (!e.allClipped) {
  39955. var n = new Xu({
  39956. shape: {
  39957. points: e.points
  39958. }
  39959. });
  39960. u.setItemGraphicEl(t, n), l.group.add(n)
  39961. }
  39962. })).update((function (t, n) {
  39963. var i = RB(l).data.getItemGraphicEl(n),
  39964. r = u.getItemLayout(t);
  39965. r.allClipped ? i && l.group.remove(i) : (i ? vh(i, {
  39966. shape: {
  39967. points: r.points
  39968. }
  39969. }, e, t) : i = new Xu({
  39970. shape: {
  39971. points: r.points
  39972. }
  39973. }), u.setItemGraphicEl(t, i), l.group.add(i))
  39974. })).remove((function (t) {
  39975. var e = RB(l).data.getItemGraphicEl(t);
  39976. l.group.remove(e)
  39977. })).execute(), u.eachItemGraphicEl((function (t, n) {
  39978. var i = u.getItemModel(n),
  39979. r = u.getItemVisual(n, "style");
  39980. t.useStyle(u.getItemVisual(n, "style")), ic(t, rc(i), {
  39981. labelFetcher: e,
  39982. labelDataIndex: n,
  39983. defaultText: u.getName(n) || "",
  39984. inheritColor: U(r.fill) ? ii(r.fill, 1) : "#000"
  39985. }), $l(t, i), Zl(t, null, null, i.get(["emphasis", "disabled"])), rl(t).dataModel = e
  39986. })), RB(l).data = u, l.group.silent = e.get("silent") || t.get("silent")
  39987. }, e.type = "markArea", e
  39988. }(wB);
  39989. var WB = function (t) {
  39990. function e() {
  39991. var n = null !== t && t.apply(this, arguments) || this;
  39992. return n.type = e.type, n.layoutMode = {
  39993. type: "box",
  39994. ignoreSize: !0
  39995. }, n
  39996. }
  39997. return n(e, t), e.prototype.init = function (t, e, n) {
  39998. this.mergeDefaultAndTheme(t, n), t.selected = t.selected || {}, this._updateSelector(t)
  39999. }, e.prototype.mergeOption = function (e, n) {
  40000. t.prototype.mergeOption.call(this, e, n), this._updateSelector(e)
  40001. }, e.prototype._updateSelector = function (t) {
  40002. var e = t.selector,
  40003. n = this.ecModel;
  40004. !0 === e && (e = t.selector = ["all", "inverse"]), Y(e) && E(e, (function (t, i) {
  40005. U(t) && (t = {
  40006. type: t
  40007. }), e[i] = C(t, function (t, e) {
  40008. return "all" === e ? {
  40009. type: "all",
  40010. title: t.getLocaleModel().get(["legend", "selector", "all"])
  40011. } : "inverse" === e ? {
  40012. type: "inverse",
  40013. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  40014. } : void 0
  40015. }(n, t.type))
  40016. }))
  40017. }, e.prototype.optionUpdated = function () {
  40018. this._updateData(this.ecModel);
  40019. var t = this._data;
  40020. if (t[0] && "single" === this.get("selectedMode")) {
  40021. for (var e = !1, n = 0; n < t.length; n++) {
  40022. var i = t[n].get("name");
  40023. if (this.isSelected(i)) {
  40024. this.select(i), e = !0;
  40025. break
  40026. }
  40027. }!e && this.select(t[0].get("name"))
  40028. }
  40029. }, e.prototype._updateData = function (t) {
  40030. var e = [],
  40031. n = [];
  40032. t.eachRawSeries((function (i) {
  40033. var r, o = i.name;
  40034. if (n.push(o), i.legendVisualProvider) {
  40035. var a = i.legendVisualProvider.getAllNames();
  40036. t.isSeriesFiltered(i) || (n = n.concat(a)), a.length ? e = e.concat(a) : r = !0
  40037. } else r = !0;
  40038. r && No(i) && e.push(i.name)
  40039. })), this._availableNames = n;
  40040. var i = this.get("data") || e,
  40041. r = yt(),
  40042. o = z(i, (function (t) {
  40043. return (U(t) || j(t)) && (t = {
  40044. name: t
  40045. }), r.get(t.name) ? null : (r.set(t.name, !0), new Cc(t, this, this.ecModel))
  40046. }), this);
  40047. this._data = B(o, (function (t) {
  40048. return !!t
  40049. }))
  40050. }, e.prototype.getData = function () {
  40051. return this._data
  40052. }, e.prototype.select = function (t) {
  40053. var e = this.option.selected;
  40054. "single" === this.get("selectedMode") && E(this._data, (function (t) {
  40055. e[t.get("name")] = !1
  40056. }));
  40057. e[t] = !0
  40058. }, e.prototype.unSelect = function (t) {
  40059. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
  40060. }, e.prototype.toggleSelected = function (t) {
  40061. var e = this.option.selected;
  40062. e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t)
  40063. }, e.prototype.allSelect = function () {
  40064. var t = this._data,
  40065. e = this.option.selected;
  40066. E(t, (function (t) {
  40067. e[t.get("name", !0)] = !0
  40068. }))
  40069. }, e.prototype.inverseSelect = function () {
  40070. var t = this._data,
  40071. e = this.option.selected;
  40072. E(t, (function (t) {
  40073. var n = t.get("name", !0);
  40074. e.hasOwnProperty(n) || (e[n] = !0), e[n] = !e[n]
  40075. }))
  40076. }, e.prototype.isSelected = function (t) {
  40077. var e = this.option.selected;
  40078. return !(e.hasOwnProperty(t) && !e[t]) && P(this._availableNames, t) >= 0
  40079. }, e.prototype.getOrient = function () {
  40080. return "vertical" === this.get("orient") ? {
  40081. index: 1,
  40082. name: "vertical"
  40083. } : {
  40084. index: 0,
  40085. name: "horizontal"
  40086. }
  40087. }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
  40088. z: 4,
  40089. show: !0,
  40090. orient: "horizontal",
  40091. left: "center",
  40092. top: 0,
  40093. align: "auto",
  40094. backgroundColor: "rgba(0,0,0,0)",
  40095. borderColor: "#ccc",
  40096. borderRadius: 0,
  40097. borderWidth: 0,
  40098. padding: 5,
  40099. itemGap: 10,
  40100. itemWidth: 25,
  40101. itemHeight: 14,
  40102. symbolRotate: "inherit",
  40103. symbolKeepAspect: !0,
  40104. inactiveColor: "#ccc",
  40105. inactiveBorderColor: "#ccc",
  40106. inactiveBorderWidth: "auto",
  40107. itemStyle: {
  40108. color: "inherit",
  40109. opacity: "inherit",
  40110. borderColor: "inherit",
  40111. borderWidth: "auto",
  40112. borderCap: "inherit",
  40113. borderJoin: "inherit",
  40114. borderDashOffset: "inherit",
  40115. borderMiterLimit: "inherit"
  40116. },
  40117. lineStyle: {
  40118. width: "auto",
  40119. color: "inherit",
  40120. inactiveColor: "#ccc",
  40121. inactiveWidth: 2,
  40122. opacity: "inherit",
  40123. type: "inherit",
  40124. cap: "inherit",
  40125. join: "inherit",
  40126. dashOffset: "inherit",
  40127. miterLimit: "inherit"
  40128. },
  40129. textStyle: {
  40130. color: "#333"
  40131. },
  40132. selectedMode: !0,
  40133. selector: !1,
  40134. selectorLabel: {
  40135. show: !0,
  40136. borderRadius: 10,
  40137. padding: [3, 5, 3, 5],
  40138. fontSize: 12,
  40139. fontFamily: "sans-serif",
  40140. color: "#666",
  40141. borderWidth: 1,
  40142. borderColor: "#666"
  40143. },
  40144. emphasis: {
  40145. selectorLabel: {
  40146. show: !0,
  40147. color: "#eee",
  40148. backgroundColor: "#666"
  40149. }
  40150. },
  40151. selectorPosition: "auto",
  40152. selectorItemGap: 7,
  40153. selectorButtonGap: 10,
  40154. tooltip: {
  40155. show: !1
  40156. }
  40157. }, e
  40158. }(zp),
  40159. HB = H,
  40160. YB = E,
  40161. XB = Br,
  40162. UB = function (t) {
  40163. function e() {
  40164. var n = null !== t && t.apply(this, arguments) || this;
  40165. return n.type = e.type, n.newlineDisabled = !1, n
  40166. }
  40167. return n(e, t), e.prototype.init = function () {
  40168. this.group.add(this._contentGroup = new XB), this.group.add(this._selectorGroup = new XB), this._isFirstRender = !0
  40169. }, e.prototype.getContentGroup = function () {
  40170. return this._contentGroup
  40171. }, e.prototype.getSelectorGroup = function () {
  40172. return this._selectorGroup
  40173. }, e.prototype.render = function (t, e, n) {
  40174. var i = this._isFirstRender;
  40175. if (this._isFirstRender = !1, this.resetInner(), t.get("show", !0)) {
  40176. var r = t.get("align"),
  40177. o = t.get("orient");
  40178. r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === o ? "right" : "left");
  40179. var a = t.get("selector", !0),
  40180. s = t.get("selectorPosition", !0);
  40181. !a || s && "auto" !== s || (s = "horizontal" === o ? "end" : "start"), this.renderInner(r, t, e, n, a, o, s);
  40182. var l = t.getBoxLayoutParams(),
  40183. u = {
  40184. width: n.getWidth(),
  40185. height: n.getHeight()
  40186. },
  40187. h = t.get("padding"),
  40188. c = kp(l, u, h),
  40189. p = this.layoutInner(t, r, c, i, a, s),
  40190. d = kp(k({
  40191. width: p.width,
  40192. height: p.height
  40193. }, l), u, h);
  40194. this.group.x = d.x - p.x, this.group.y = d.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = bz(p, t))
  40195. }
  40196. }, e.prototype.resetInner = function () {
  40197. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll()
  40198. }, e.prototype.renderInner = function (t, e, n, i, r, o, a) {
  40199. var s = this.getContentGroup(),
  40200. l = yt(),
  40201. u = e.get("selectedMode"),
  40202. h = [];
  40203. n.eachRawSeries((function (t) {
  40204. !t.get("legendHoverLink") && h.push(t.id)
  40205. })), YB(e.getData(), (function (r, o) {
  40206. var a = r.get("name");
  40207. if (!this.newlineDisabled && ("" === a || "\n" === a)) {
  40208. var c = new XB;
  40209. return c.newline = !0, void s.add(c)
  40210. }
  40211. var p = n.getSeriesByName(a)[0];
  40212. if (!l.get(a)) {
  40213. if (p) {
  40214. var d = p.getData(),
  40215. f = d.getVisual("legendLineStyle") || {},
  40216. g = d.getVisual("legendIcon"),
  40217. y = d.getVisual("style"),
  40218. v = this._createItem(p, a, o, r, e, t, f, y, g, u, i);
  40219. v.on("click", HB(ZB, a, null, i, h)).on("mouseover", HB(qB, p.name, null, i, h)).on("mouseout", HB(KB, p.name, null, i, h)), n.ssr && v.eachChild((function (t) {
  40220. var e = rl(t);
  40221. e.seriesIndex = p.seriesIndex, e.dataIndex = o, e.ssrType = "legend"
  40222. })), l.set(a, !0)
  40223. } else n.eachRawSeries((function (s) {
  40224. if (!l.get(a) && s.legendVisualProvider) {
  40225. var c = s.legendVisualProvider;
  40226. if (!c.containName(a)) return;
  40227. var p = c.indexOfName(a),
  40228. d = c.getItemVisual(p, "style"),
  40229. f = c.getItemVisual(p, "legendIcon"),
  40230. g = qn(d.fill);
  40231. g && 0 === g[3] && (g[3] = .2, d = A(A({}, d), {
  40232. fill: ri(g, "rgba")
  40233. }));
  40234. var y = this._createItem(s, a, o, r, e, t, {}, d, f, u, i);
  40235. y.on("click", HB(ZB, null, a, i, h)).on("mouseover", HB(qB, null, a, i, h)).on("mouseout", HB(KB, null, a, i, h)), n.ssr && y.eachChild((function (t) {
  40236. var e = rl(t);
  40237. e.seriesIndex = s.seriesIndex, e.dataIndex = o, e.ssrType = "legend"
  40238. })), l.set(a, !0)
  40239. }
  40240. }), this);
  40241. 0
  40242. }
  40243. }), this), r && this._createSelector(r, e, i, o, a)
  40244. }, e.prototype._createSelector = function (t, e, n, i, r) {
  40245. var o = this.getSelectorGroup();
  40246. YB(t, (function (t) {
  40247. var i = t.type,
  40248. r = new Xs({
  40249. style: {
  40250. x: 0,
  40251. y: 0,
  40252. align: "center",
  40253. verticalAlign: "middle"
  40254. },
  40255. onclick: function () {
  40256. n.dispatchAction({
  40257. type: "all" === i ? "legendAllSelect" : "legendInverseSelect"
  40258. })
  40259. }
  40260. });
  40261. o.add(r), ic(r, {
  40262. normal: e.getModel("selectorLabel"),
  40263. emphasis: e.getModel(["emphasis", "selectorLabel"])
  40264. }, {
  40265. defaultText: t.title
  40266. }), Ul(r)
  40267. }))
  40268. }, e.prototype._createItem = function (t, e, n, i, r, o, a, s, l, u, h) {
  40269. var c = t.visualDrawType,
  40270. p = r.get("itemWidth"),
  40271. d = r.get("itemHeight"),
  40272. f = r.isSelected(e),
  40273. g = i.get("symbolRotate"),
  40274. y = i.get("symbolKeepAspect"),
  40275. v = i.get("icon"),
  40276. m = function (t, e, n, i, r, o, a) {
  40277. function s(t, e) {
  40278. "auto" === t.lineWidth && (t.lineWidth = e.lineWidth > 0 ? 2 : 0), YB(t, (function (n, i) {
  40279. "inherit" === t[i] && (t[i] = e[i])
  40280. }))
  40281. }
  40282. var l = e.getModel("itemStyle"),
  40283. u = l.getItemStyle(),
  40284. h = 0 === t.lastIndexOf("empty", 0) ? "fill" : "stroke",
  40285. c = l.getShallow("decal");
  40286. u.decal = c && "inherit" !== c ? mv(c, a) : i.decal, "inherit" === u.fill && (u.fill = i[r]);
  40287. "inherit" === u.stroke && (u.stroke = i[h]);
  40288. "inherit" === u.opacity && (u.opacity = ("fill" === r ? i : n).opacity);
  40289. s(u, i);
  40290. var p = e.getModel("lineStyle"),
  40291. d = p.getLineStyle();
  40292. if (s(d, n), "auto" === u.fill && (u.fill = i.fill), "auto" === u.stroke && (u.stroke = i.fill), "auto" === d.stroke && (d.stroke = i.fill), !o) {
  40293. var f = e.get("inactiveBorderWidth"),
  40294. g = u[h];
  40295. u.lineWidth = "auto" === f ? i.lineWidth > 0 && g ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), d.stroke = p.get("inactiveColor"), d.lineWidth = p.get("inactiveWidth")
  40296. }
  40297. return {
  40298. itemStyle: u,
  40299. lineStyle: d
  40300. }
  40301. }(l = v || l || "roundRect", i, a, s, c, f, h),
  40302. x = new XB,
  40303. _ = i.getModel("textStyle");
  40304. if (!X(t.getLegendIcon) || v && "inherit" !== v) {
  40305. var b = "inherit" === v && t.getData().getVisual("symbol") ? "inherit" === g ? t.getData().getVisual("symbolRotate") : g : 0;
  40306. x.add(function (t) {
  40307. var e = t.icon || "roundRect",
  40308. n = Xy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  40309. n.setStyle(t.itemStyle), n.rotation = (t.iconRotate || 0) * Math.PI / 180, n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2);
  40310. return n
  40311. }({
  40312. itemWidth: p,
  40313. itemHeight: d,
  40314. icon: l,
  40315. iconRotate: b,
  40316. itemStyle: m.itemStyle,
  40317. lineStyle: m.lineStyle,
  40318. symbolKeepAspect: y
  40319. }))
  40320. } else x.add(t.getLegendIcon({
  40321. itemWidth: p,
  40322. itemHeight: d,
  40323. icon: l,
  40324. iconRotate: g,
  40325. itemStyle: m.itemStyle,
  40326. lineStyle: m.lineStyle,
  40327. symbolKeepAspect: y
  40328. }));
  40329. var w = "left" === o ? p + 5 : -5,
  40330. S = o,
  40331. M = r.get("formatter"),
  40332. I = e;
  40333. U(M) && M ? I = M.replace("{name}", null != e ? e : "") : X(M) && (I = M(e));
  40334. var T = f ? _.getTextColor() : i.get("inactiveColor");
  40335. x.add(new Xs({
  40336. style: oc(_, {
  40337. text: I,
  40338. x: w,
  40339. y: d / 2,
  40340. fill: T,
  40341. align: S,
  40342. verticalAlign: "middle"
  40343. }, {
  40344. inheritColor: T
  40345. })
  40346. }));
  40347. var C = new Ws({
  40348. shape: x.getBoundingRect(),
  40349. style: {
  40350. fill: "transparent"
  40351. }
  40352. }),
  40353. D = i.getModel("tooltip");
  40354. return D.get("show") && Kh({
  40355. el: C,
  40356. componentModel: r,
  40357. itemName: e,
  40358. itemTooltipOption: D.option
  40359. }), x.add(C), x.eachChild((function (t) {
  40360. t.silent = !0
  40361. })), C.silent = !u, this.getContentGroup().add(x), Ul(x), x.__legendDataIndex = n, x
  40362. }, e.prototype.layoutInner = function (t, e, n, i, r, o) {
  40363. var a = this.getContentGroup(),
  40364. s = this.getSelectorGroup();
  40365. Ap(t.get("orient"), a, t.get("itemGap"), n.width, n.height);
  40366. var l = a.getBoundingRect(),
  40367. u = [-l.x, -l.y];
  40368. if (s.markRedraw(), a.markRedraw(), r) {
  40369. Ap("horizontal", s, t.get("selectorItemGap", !0));
  40370. var h = s.getBoundingRect(),
  40371. c = [-h.x, -h.y],
  40372. p = t.get("selectorButtonGap", !0),
  40373. d = t.getOrient().index,
  40374. f = 0 === d ? "width" : "height",
  40375. g = 0 === d ? "height" : "width",
  40376. y = 0 === d ? "y" : "x";
  40377. "end" === o ? c[d] += l[f] + p : u[d] += h[f] + p, c[1 - d] += l[g] / 2 - h[g] / 2, s.x = c[0], s.y = c[1], a.x = u[0], a.y = u[1];
  40378. var v = {
  40379. x: 0,
  40380. y: 0
  40381. };
  40382. return v[f] = l[f] + p + h[f], v[g] = Math.max(l[g], h[g]), v[y] = Math.min(0, h[y] + c[1 - d]), v
  40383. }
  40384. return a.x = u[0], a.y = u[1], this.group.getBoundingRect()
  40385. }, e.prototype.remove = function () {
  40386. this.getContentGroup().removeAll(), this._isFirstRender = !0
  40387. }, e.type = "legend.plain", e
  40388. }(Ag);
  40389. function ZB(t, e, n, i) {
  40390. KB(t, e, n, i), n.dispatchAction({
  40391. type: "legendToggleSelect",
  40392. name: null != t ? t : e
  40393. }), qB(t, e, n, i)
  40394. }
  40395. function jB(t) {
  40396. for (var e, n = t.getZr().storage.getDisplayList(), i = 0, r = n.length; i < r && !(e = n[i].states.emphasis);) i++;
  40397. return e && e.hoverLayer
  40398. }
  40399. function qB(t, e, n, i) {
  40400. jB(n) || n.dispatchAction({
  40401. type: "highlight",
  40402. seriesName: t,
  40403. name: e,
  40404. excludeSeriesId: i
  40405. })
  40406. }
  40407. function KB(t, e, n, i) {
  40408. jB(n) || n.dispatchAction({
  40409. type: "downplay",
  40410. seriesName: t,
  40411. name: e,
  40412. excludeSeriesId: i
  40413. })
  40414. }
  40415. function $B(t) {
  40416. var e = t.findComponents({
  40417. mainType: "legend"
  40418. });
  40419. e && e.length && t.filterSeries((function (t) {
  40420. for (var n = 0; n < e.length; n++)
  40421. if (!e[n].isSelected(t.name)) return !1;
  40422. return !0
  40423. }))
  40424. }
  40425. function JB(t, e, n) {
  40426. var i, r = {},
  40427. o = "toggleSelected" === t;
  40428. return n.eachComponent("legend", (function (n) {
  40429. o && null != i ? n[i ? "select" : "unSelect"](e.name) : "allSelect" === t || "inverseSelect" === t ? n[t]() : (n[t](e.name), i = n.isSelected(e.name)), E(n.getData(), (function (t) {
  40430. var e = t.get("name");
  40431. if ("\n" !== e && "" !== e) {
  40432. var i = n.isSelected(e);
  40433. r.hasOwnProperty(e) ? r[e] = r[e] && i : r[e] = i
  40434. }
  40435. }))
  40436. })), "allSelect" === t || "inverseSelect" === t ? {
  40437. selected: r
  40438. } : {
  40439. name: e.name,
  40440. selected: r
  40441. }
  40442. }
  40443. function QB(t) {
  40444. t.registerComponentModel(WB), t.registerComponentView(UB), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, $B), t.registerSubTypeDefaulter("legend", (function () {
  40445. return "plain"
  40446. })),
  40447. function (t) {
  40448. t.registerAction("legendToggleSelect", "legendselectchanged", H(JB, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", H(JB, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", H(JB, "inverseSelect")), t.registerAction("legendSelect", "legendselected", H(JB, "select")), t.registerAction("legendUnSelect", "legendunselected", H(JB, "unSelect"))
  40449. }(t)
  40450. }
  40451. var tF = function (t) {
  40452. function e() {
  40453. var n = null !== t && t.apply(this, arguments) || this;
  40454. return n.type = e.type, n
  40455. }
  40456. return n(e, t), e.prototype.setScrollDataIndex = function (t) {
  40457. this.option.scrollDataIndex = t
  40458. }, e.prototype.init = function (e, n, i) {
  40459. var r = Rp(e);
  40460. t.prototype.init.call(this, e, n, i), eF(this, e, r)
  40461. }, e.prototype.mergeOption = function (e, n) {
  40462. t.prototype.mergeOption.call(this, e, n), eF(this, this.option, e)
  40463. }, e.type = "legend.scroll", e.defaultOption = kc(WB.defaultOption, {
  40464. scrollDataIndex: 0,
  40465. pageButtonItemGap: 5,
  40466. pageButtonGap: null,
  40467. pageButtonPosition: "end",
  40468. pageFormatter: "{current}/{total}",
  40469. pageIcons: {
  40470. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  40471. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  40472. },
  40473. pageIconColor: "#2f4554",
  40474. pageIconInactiveColor: "#aaa",
  40475. pageIconSize: 15,
  40476. pageTextStyle: {
  40477. color: "#333"
  40478. },
  40479. animationDurationUpdate: 800
  40480. }), e
  40481. }(WB);
  40482. function eF(t, e, n) {
  40483. var i = [1, 1];
  40484. i[t.getOrient().index] = 0, Op(e, n, {
  40485. type: "box",
  40486. ignoreSize: !!i
  40487. })
  40488. }
  40489. var nF = Br,
  40490. iF = ["width", "height"],
  40491. rF = ["x", "y"],
  40492. oF = function (t) {
  40493. function e() {
  40494. var n = null !== t && t.apply(this, arguments) || this;
  40495. return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n
  40496. }
  40497. return n(e, t), e.prototype.init = function () {
  40498. t.prototype.init.call(this), this.group.add(this._containerGroup = new nF), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new nF)
  40499. }, e.prototype.resetInner = function () {
  40500. t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null
  40501. }, e.prototype.renderInner = function (e, n, i, r, o, a, s) {
  40502. var l = this;
  40503. t.prototype.renderInner.call(this, e, n, i, r, o, a, s);
  40504. var u = this._controllerGroup,
  40505. h = n.get("pageIconSize", !0),
  40506. c = Y(h) ? h : [h, h];
  40507. d("pagePrev", 0);
  40508. var p = n.getModel("pageTextStyle");
  40509. function d(t, e) {
  40510. var i = t + "DataIndex",
  40511. o = Uh(n.get("pageIcons", !0)[n.getOrient().name][e], {
  40512. onclick: W(l._pageGo, l, i, n, r)
  40513. }, {
  40514. x: -c[0] / 2,
  40515. y: -c[1] / 2,
  40516. width: c[0],
  40517. height: c[1]
  40518. });
  40519. o.name = t, u.add(o)
  40520. }
  40521. u.add(new Xs({
  40522. name: "pageText",
  40523. style: {
  40524. text: "xx/xx",
  40525. fill: p.getTextColor(),
  40526. font: p.getFont(),
  40527. verticalAlign: "middle",
  40528. align: "center"
  40529. },
  40530. silent: !0
  40531. })), d("pageNext", 1)
  40532. }, e.prototype.layoutInner = function (t, e, n, i, r, o) {
  40533. var a = this.getSelectorGroup(),
  40534. s = t.getOrient().index,
  40535. l = iF[s],
  40536. u = rF[s],
  40537. h = iF[1 - s],
  40538. c = rF[1 - s];
  40539. r && Ap("horizontal", a, t.get("selectorItemGap", !0));
  40540. var p = t.get("selectorButtonGap", !0),
  40541. d = a.getBoundingRect(),
  40542. f = [-d.x, -d.y],
  40543. g = T(n);
  40544. r && (g[l] = n[l] - d[l] - p);
  40545. var y = this._layoutContentAndController(t, i, g, s, l, h, c, u);
  40546. if (r) {
  40547. if ("end" === o) f[s] += y[l] + p;
  40548. else {
  40549. var v = d[l] + p;
  40550. f[s] -= v, y[u] -= v
  40551. }
  40552. y[l] += d[l] + p, f[1 - s] += y[c] + y[h] / 2 - d[h] / 2, y[h] = Math.max(y[h], d[h]), y[c] = Math.min(y[c], d[c] + f[1 - s]), a.x = f[0], a.y = f[1], a.markRedraw()
  40553. }
  40554. return y
  40555. }, e.prototype._layoutContentAndController = function (t, e, n, i, r, o, a, s) {
  40556. var l = this.getContentGroup(),
  40557. u = this._containerGroup,
  40558. h = this._controllerGroup;
  40559. Ap(t.get("orient"), l, t.get("itemGap"), i ? n.width : null, i ? null : n.height), Ap("horizontal", h, t.get("pageButtonItemGap", !0));
  40560. var c = l.getBoundingRect(),
  40561. p = h.getBoundingRect(),
  40562. d = this._showController = c[r] > n[r],
  40563. f = [-c.x, -c.y];
  40564. e || (f[i] = l[s]);
  40565. var g = [0, 0],
  40566. y = [-p.x, -p.y],
  40567. v = rt(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  40568. d && ("end" === t.get("pageButtonPosition", !0) ? y[i] += n[r] - p[r] : g[i] += p[r] + v);
  40569. y[1 - i] += c[o] / 2 - p[o] / 2, l.setPosition(f), u.setPosition(g), h.setPosition(y);
  40570. var m = {
  40571. x: 0,
  40572. y: 0
  40573. };
  40574. if (m[r] = d ? n[r] : c[r], m[o] = Math.max(c[o], p[o]), m[a] = Math.min(0, p[a] + y[1 - i]), u.__rectSize = n[r], d) {
  40575. var x = {
  40576. x: 0,
  40577. y: 0
  40578. };
  40579. x[r] = Math.max(n[r] - p[r] - v, 0), x[o] = m[o], u.setClipPath(new Ws({
  40580. shape: x
  40581. })), u.__rectSize = x[r]
  40582. } else h.eachChild((function (t) {
  40583. t.attr({
  40584. invisible: !0,
  40585. silent: !0
  40586. })
  40587. }));
  40588. var _ = this._getPageInfo(t);
  40589. return null != _.pageIndex && vh(l, {
  40590. x: _.contentPosition[0],
  40591. y: _.contentPosition[1]
  40592. }, d ? t : null), this._updatePageInfoView(t, _), m
  40593. }, e.prototype._pageGo = function (t, e, n) {
  40594. var i = this._getPageInfo(e)[t];
  40595. null != i && n.dispatchAction({
  40596. type: "legendScroll",
  40597. scrollDataIndex: i,
  40598. legendId: e.id
  40599. })
  40600. }, e.prototype._updatePageInfoView = function (t, e) {
  40601. var n = this._controllerGroup;
  40602. E(["pagePrev", "pageNext"], (function (i) {
  40603. var r = null != e[i + "DataIndex"],
  40604. o = n.childOfName(i);
  40605. o && (o.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), o.cursor = r ? "pointer" : "default")
  40606. }));
  40607. var i = n.childOfName("pageText"),
  40608. r = t.get("pageFormatter"),
  40609. o = e.pageIndex,
  40610. a = null != o ? o + 1 : 0,
  40611. s = e.pageCount;
  40612. i && r && i.setStyle("text", U(r) ? r.replace("{current}", null == a ? "" : a + "").replace("{total}", null == s ? "" : s + "") : r({
  40613. current: a,
  40614. total: s
  40615. }))
  40616. }, e.prototype._getPageInfo = function (t) {
  40617. var e = t.get("scrollDataIndex", !0),
  40618. n = this.getContentGroup(),
  40619. i = this._containerGroup.__rectSize,
  40620. r = t.getOrient().index,
  40621. o = iF[r],
  40622. a = rF[r],
  40623. s = this._findTargetItemIndex(e),
  40624. l = n.children(),
  40625. u = l[s],
  40626. h = l.length,
  40627. c = h ? 1 : 0,
  40628. p = {
  40629. contentPosition: [n.x, n.y],
  40630. pageCount: c,
  40631. pageIndex: c - 1,
  40632. pagePrevDataIndex: null,
  40633. pageNextDataIndex: null
  40634. };
  40635. if (!u) return p;
  40636. var d = m(u);
  40637. p.contentPosition[r] = -d.s;
  40638. for (var f = s + 1, g = d, y = d, v = null; f <= h; ++f)(!(v = m(l[f])) && y.e > g.s + i || v && !x(v, g.s)) && (g = y.i > g.i ? y : v) && (null == p.pageNextDataIndex && (p.pageNextDataIndex = g.i), ++p.pageCount), y = v;
  40639. for (f = s - 1, g = d, y = d, v = null; f >= -1; --f)(v = m(l[f])) && x(y, v.s) || !(g.i < y.i) || (y = g, null == p.pagePrevDataIndex && (p.pagePrevDataIndex = g.i), ++p.pageCount, ++p.pageIndex), g = v;
  40640. return p;
  40641. function m(t) {
  40642. if (t) {
  40643. var e = t.getBoundingRect(),
  40644. n = e[a] + t[a];
  40645. return {
  40646. s: n,
  40647. e: n + e[o],
  40648. i: t.__legendDataIndex
  40649. }
  40650. }
  40651. }
  40652. function x(t, e) {
  40653. return t.e >= e && t.s <= e + i
  40654. }
  40655. }, e.prototype._findTargetItemIndex = function (t) {
  40656. return this._showController ? (this.getContentGroup().eachChild((function (i, r) {
  40657. var o = i.__legendDataIndex;
  40658. null == n && null != o && (n = r), o === t && (e = r)
  40659. })), null != e ? e : n) : 0;
  40660. var e, n
  40661. }, e.type = "legend.scroll", e
  40662. }(UB);
  40663. function aF(t) {
  40664. Vm(QB), t.registerComponentModel(tF), t.registerComponentView(oF),
  40665. function (t) {
  40666. t.registerAction("legendScroll", "legendscroll", (function (t, e) {
  40667. var n = t.scrollDataIndex;
  40668. null != n && e.eachComponent({
  40669. mainType: "legend",
  40670. subType: "scroll",
  40671. query: t
  40672. }, (function (t) {
  40673. t.setScrollDataIndex(n)
  40674. }))
  40675. }))
  40676. }(t)
  40677. }
  40678. var sF = function (t) {
  40679. function e() {
  40680. var n = null !== t && t.apply(this, arguments) || this;
  40681. return n.type = e.type, n
  40682. }
  40683. return n(e, t), e.type = "dataZoom.inside", e.defaultOption = kc(rz.defaultOption, {
  40684. disabled: !1,
  40685. zoomLock: !1,
  40686. zoomOnMouseWheel: !0,
  40687. moveOnMouseMove: !0,
  40688. moveOnMouseWheel: !1,
  40689. preventDefaultMouseMove: !0
  40690. }), e
  40691. }(rz),
  40692. lF = Vo();
  40693. function uF(t, e, n) {
  40694. lF(t).coordSysRecordMap.each((function (t) {
  40695. var i = t.dataZoomInfoMap.get(e.uid);
  40696. i && (i.getRange = n)
  40697. }))
  40698. }
  40699. function hF(t, e) {
  40700. if (e) {
  40701. t.removeKey(e.model.uid);
  40702. var n = e.controller;
  40703. n && n.dispose()
  40704. }
  40705. }
  40706. function cF(t, e) {
  40707. t.isDisposed() || t.dispatchAction({
  40708. type: "dataZoom",
  40709. animation: {
  40710. easing: "cubicOut",
  40711. duration: 100
  40712. },
  40713. batch: e
  40714. })
  40715. }
  40716. function pF(t, e, n, i) {
  40717. return t.coordinateSystem.containPoint([n, i])
  40718. }
  40719. function dF(t) {
  40720. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, (function (t, e) {
  40721. var n = lF(e),
  40722. i = n.coordSysRecordMap || (n.coordSysRecordMap = yt());
  40723. i.each((function (t) {
  40724. t.dataZoomInfoMap = null
  40725. })), t.eachComponent({
  40726. mainType: "dataZoom",
  40727. subType: "inside"
  40728. }, (function (t) {
  40729. E(nz(t).infoList, (function (n) {
  40730. var r = n.model.uid,
  40731. o = i.get(r) || i.set(r, function (t, e) {
  40732. var n = {
  40733. model: e,
  40734. containsPoint: H(pF, e),
  40735. dispatchAction: H(cF, t),
  40736. dataZoomInfoMap: null,
  40737. controller: null
  40738. },
  40739. i = n.controller = new tT(t.getZr());
  40740. return E(["pan", "zoom", "scrollMove"], (function (t) {
  40741. i.on(t, (function (e) {
  40742. var i = [];
  40743. n.dataZoomInfoMap.each((function (r) {
  40744. if (e.isAvailableBehavior(r.model.option)) {
  40745. var o = (r.getRange || {})[t],
  40746. a = o && o(r.dzReferCoordSysInfo, n.model.mainType, n.controller, e);
  40747. !r.model.get("disabled", !0) && a && i.push({
  40748. dataZoomId: r.model.id,
  40749. start: a[0],
  40750. end: a[1]
  40751. })
  40752. }
  40753. })), i.length && n.dispatchAction(i)
  40754. }))
  40755. })), n
  40756. }(e, n.model));
  40757. (o.dataZoomInfoMap || (o.dataZoomInfoMap = yt())).set(t.uid, {
  40758. dzReferCoordSysInfo: n,
  40759. model: t,
  40760. getRange: null
  40761. })
  40762. }))
  40763. })), i.each((function (t) {
  40764. var e, n = t.controller,
  40765. r = t.dataZoomInfoMap;
  40766. if (r) {
  40767. var o = r.keys()[0];
  40768. null != o && (e = r.get(o))
  40769. }
  40770. if (e) {
  40771. var a = function (t) {
  40772. var e, n = "type_",
  40773. i = {
  40774. type_true: 2,
  40775. type_move: 1,
  40776. type_false: 0,
  40777. type_undefined: -1
  40778. },
  40779. r = !0;
  40780. return t.each((function (t) {
  40781. var o = t.model,
  40782. a = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
  40783. i[n + a] > i[n + e] && (e = a), r = r && o.get("preventDefaultMouseMove", !0)
  40784. })), {
  40785. controlType: e,
  40786. opt: {
  40787. zoomOnMouseWheel: !0,
  40788. moveOnMouseMove: !0,
  40789. moveOnMouseWheel: !0,
  40790. preventDefaultMouseMove: !!r
  40791. }
  40792. }
  40793. }(r);
  40794. n.enable(a.controlType, a.opt), n.setPointerChecker(t.containsPoint), Hg(t, "dispatchAction", e.model.get("throttle", !0), "fixRate")
  40795. } else hF(i, t)
  40796. }))
  40797. }))
  40798. }
  40799. var fF = function (t) {
  40800. function e() {
  40801. var e = null !== t && t.apply(this, arguments) || this;
  40802. return e.type = "dataZoom.inside", e
  40803. }
  40804. return n(e, t), e.prototype.render = function (e, n, i) {
  40805. t.prototype.render.apply(this, arguments), e.noTarget() ? this._clear() : (this.range = e.getPercentRange(), uF(i, e, {
  40806. pan: W(gF.pan, this),
  40807. zoom: W(gF.zoom, this),
  40808. scrollMove: W(gF.scrollMove, this)
  40809. }))
  40810. }, e.prototype.dispose = function () {
  40811. this._clear(), t.prototype.dispose.apply(this, arguments)
  40812. }, e.prototype._clear = function () {
  40813. ! function (t, e) {
  40814. for (var n = lF(t).coordSysRecordMap, i = n.keys(), r = 0; r < i.length; r++) {
  40815. var o = i[r],
  40816. a = n.get(o),
  40817. s = a.dataZoomInfoMap;
  40818. if (s) {
  40819. var l = e.uid;
  40820. s.get(l) && (s.removeKey(l), s.keys().length || hF(n, a))
  40821. }
  40822. }
  40823. }(this.api, this.dataZoomModel), this.range = null
  40824. }, e.type = "dataZoom.inside", e
  40825. }(sz),
  40826. gF = {
  40827. zoom: function (t, e, n, i) {
  40828. var r = this.range,
  40829. o = r.slice(),
  40830. a = t.axisModels[0];
  40831. if (a) {
  40832. var s = vF[e](null, [i.originX, i.originY], a, n, t),
  40833. l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (o[1] - o[0]) + o[0],
  40834. u = Math.max(1 / i.scale, 0);
  40835. o[0] = (o[0] - l) * u + l, o[1] = (o[1] - l) * u + l;
  40836. var h = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  40837. return Nk(0, o, [0, 100], 0, h.minSpan, h.maxSpan), this.range = o, r[0] !== o[0] || r[1] !== o[1] ? o : void 0
  40838. }
  40839. },
  40840. pan: yF((function (t, e, n, i, r, o) {
  40841. var a = vF[i]([o.oldX, o.oldY], [o.newX, o.newY], e, r, n);
  40842. return a.signal * (t[1] - t[0]) * a.pixel / a.pixelLength
  40843. })),
  40844. scrollMove: yF((function (t, e, n, i, r, o) {
  40845. return vF[i]([0, 0], [o.scrollDelta, o.scrollDelta], e, r, n).signal * (t[1] - t[0]) * o.scrollDelta
  40846. }))
  40847. };
  40848. function yF(t) {
  40849. return function (e, n, i, r) {
  40850. var o = this.range,
  40851. a = o.slice(),
  40852. s = e.axisModels[0];
  40853. if (s) return Nk(t(a, s, e, n, i, r), a, [0, 100], "all"), this.range = a, o[0] !== a[0] || o[1] !== a[1] ? a : void 0
  40854. }
  40855. }
  40856. var vF = {
  40857. grid: function (t, e, n, i, r) {
  40858. var o = n.axis,
  40859. a = {},
  40860. s = r.model.coordinateSystem.getRect();
  40861. return t = t || [0, 0], "x" === o.dim ? (a.pixel = e[0] - t[0], a.pixelLength = s.width, a.pixelStart = s.x, a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1], a.pixelLength = s.height, a.pixelStart = s.y, a.signal = o.inverse ? -1 : 1), a
  40862. },
  40863. polar: function (t, e, n, i, r) {
  40864. var o = n.axis,
  40865. a = {},
  40866. s = r.model.coordinateSystem,
  40867. l = s.getRadiusAxis().getExtent(),
  40868. u = s.getAngleAxis().getExtent();
  40869. return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), "radiusAxis" === n.mainType ? (a.pixel = e[0] - t[0], a.pixelLength = l[1] - l[0], a.pixelStart = l[0], a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1], a.pixelLength = u[1] - u[0], a.pixelStart = u[0], a.signal = o.inverse ? -1 : 1), a
  40870. },
  40871. singleAxis: function (t, e, n, i, r) {
  40872. var o = n.axis,
  40873. a = r.model.coordinateSystem.getRect(),
  40874. s = {};
  40875. return t = t || [0, 0], "horizontal" === o.orient ? (s.pixel = e[0] - t[0], s.pixelLength = a.width, s.pixelStart = a.x, s.signal = o.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = a.height, s.pixelStart = a.y, s.signal = o.inverse ? -1 : 1), s
  40876. }
  40877. };
  40878. function mF(t) {
  40879. fz(t), t.registerComponentModel(sF), t.registerComponentView(fF), dF(t)
  40880. }
  40881. var xF = function (t) {
  40882. function e() {
  40883. var n = null !== t && t.apply(this, arguments) || this;
  40884. return n.type = e.type, n
  40885. }
  40886. return n(e, t), e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = kc(rz.defaultOption, {
  40887. show: !0,
  40888. right: "ph",
  40889. top: "ph",
  40890. width: "ph",
  40891. height: "ph",
  40892. left: null,
  40893. bottom: null,
  40894. borderColor: "#d2dbee",
  40895. borderRadius: 3,
  40896. backgroundColor: "rgba(47,69,84,0)",
  40897. dataBackground: {
  40898. lineStyle: {
  40899. color: "#d2dbee",
  40900. width: .5
  40901. },
  40902. areaStyle: {
  40903. color: "#d2dbee",
  40904. opacity: .2
  40905. }
  40906. },
  40907. selectedDataBackground: {
  40908. lineStyle: {
  40909. color: "#8fb0f7",
  40910. width: .5
  40911. },
  40912. areaStyle: {
  40913. color: "#8fb0f7",
  40914. opacity: .2
  40915. }
  40916. },
  40917. fillerColor: "rgba(135,175,274,0.2)",
  40918. handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
  40919. handleSize: "100%",
  40920. handleStyle: {
  40921. color: "#fff",
  40922. borderColor: "#ACB8D1"
  40923. },
  40924. moveHandleSize: 7,
  40925. moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",
  40926. moveHandleStyle: {
  40927. color: "#D2DBEE",
  40928. opacity: .7
  40929. },
  40930. showDetail: !0,
  40931. showDataShadow: "auto",
  40932. realtime: !0,
  40933. zoomLock: !1,
  40934. textStyle: {
  40935. color: "#6E7079"
  40936. },
  40937. brushSelect: !0,
  40938. brushStyle: {
  40939. color: "rgba(135,175,274,0.15)"
  40940. },
  40941. emphasis: {
  40942. handleStyle: {
  40943. borderColor: "#8FB0F7"
  40944. },
  40945. moveHandleStyle: {
  40946. color: "#8FB0F7"
  40947. }
  40948. }
  40949. }), e
  40950. }(rz),
  40951. _F = Ws,
  40952. bF = "horizontal",
  40953. wF = "vertical",
  40954. SF = ["line", "bar", "candlestick", "scatter"],
  40955. MF = {
  40956. easing: "cubicOut",
  40957. duration: 100,
  40958. delay: 0
  40959. },
  40960. IF = function (t) {
  40961. function e() {
  40962. var n = null !== t && t.apply(this, arguments) || this;
  40963. return n.type = e.type, n._displayables = {}, n
  40964. }
  40965. return n(e, t), e.prototype.init = function (t, e) {
  40966. this.api = e, this._onBrush = W(this._onBrush, this), this._onBrushEnd = W(this._onBrushEnd, this)
  40967. }, e.prototype.render = function (e, n, i, r) {
  40968. if (t.prototype.render.apply(this, arguments), Hg(this, "_dispatchZoomAction", e.get("throttle"), "fixRate"), this._orient = e.getOrient(), !1 !== e.get("show")) {
  40969. if (e.noTarget()) return this._clear(), void this.group.removeAll();
  40970. r && "dataZoom" === r.type && r.from === this.uid || this._buildView(), this._updateView()
  40971. } else this.group.removeAll()
  40972. }, e.prototype.dispose = function () {
  40973. this._clear(), t.prototype.dispose.apply(this, arguments)
  40974. }, e.prototype._clear = function () {
  40975. Yg(this, "_dispatchZoomAction");
  40976. var t = this.api.getZr();
  40977. t.off("mousemove", this._onBrush), t.off("mouseup", this._onBrushEnd)
  40978. }, e.prototype._buildView = function () {
  40979. var t = this.group;
  40980. t.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
  40981. var e = this._displayables.sliderGroup = new Br;
  40982. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(e), this._positionGroup()
  40983. }, e.prototype._resetLocation = function () {
  40984. var t = this.dataZoomModel,
  40985. e = this.api,
  40986. n = t.get("brushSelect") ? 7 : 0,
  40987. i = this._findCoordRect(),
  40988. r = {
  40989. width: e.getWidth(),
  40990. height: e.getHeight()
  40991. },
  40992. o = this._orient === bF ? {
  40993. right: r.width - i.x - i.width,
  40994. top: r.height - 30 - 7 - n,
  40995. width: i.width,
  40996. height: 30
  40997. } : {
  40998. right: 7,
  40999. top: i.y,
  41000. width: 30,
  41001. height: i.height
  41002. },
  41003. a = Rp(t.option);
  41004. E(["right", "top", "width", "height"], (function (t) {
  41005. "ph" === a[t] && (a[t] = o[t])
  41006. }));
  41007. var s = kp(a, r);
  41008. this._location = {
  41009. x: s.x,
  41010. y: s.y
  41011. }, this._size = [s.width, s.height], this._orient === wF && this._size.reverse()
  41012. }, e.prototype._positionGroup = function () {
  41013. var t = this.group,
  41014. e = this._location,
  41015. n = this._orient,
  41016. i = this.dataZoomModel.getFirstTargetAxisModel(),
  41017. r = i && i.get("inverse"),
  41018. o = this._displayables.sliderGroup,
  41019. a = (this._dataShadowInfo || {}).otherAxisInverse;
  41020. o.attr(n !== bF || r ? n === bF && r ? {
  41021. scaleY: a ? 1 : -1,
  41022. scaleX: -1
  41023. } : n !== wF || r ? {
  41024. scaleY: a ? -1 : 1,
  41025. scaleX: -1,
  41026. rotation: Math.PI / 2
  41027. } : {
  41028. scaleY: a ? -1 : 1,
  41029. scaleX: 1,
  41030. rotation: Math.PI / 2
  41031. } : {
  41032. scaleY: a ? 1 : -1,
  41033. scaleX: 1
  41034. });
  41035. var s = t.getBoundingRect([o]);
  41036. t.x = e.x - s.x, t.y = e.y - s.y, t.markRedraw()
  41037. }, e.prototype._getViewExtent = function () {
  41038. return [0, this._size[0]]
  41039. }, e.prototype._renderBackground = function () {
  41040. var t = this.dataZoomModel,
  41041. e = this._size,
  41042. n = this._displayables.sliderGroup,
  41043. i = t.get("brushSelect");
  41044. n.add(new _F({
  41045. silent: !0,
  41046. shape: {
  41047. x: 0,
  41048. y: 0,
  41049. width: e[0],
  41050. height: e[1]
  41051. },
  41052. style: {
  41053. fill: t.get("backgroundColor")
  41054. },
  41055. z2: -40
  41056. }));
  41057. var r = new _F({
  41058. shape: {
  41059. x: 0,
  41060. y: 0,
  41061. width: e[0],
  41062. height: e[1]
  41063. },
  41064. style: {
  41065. fill: "transparent"
  41066. },
  41067. z2: 0,
  41068. onclick: W(this._onClickPanel, this)
  41069. }),
  41070. o = this.api.getZr();
  41071. i ? (r.on("mousedown", this._onBrushStart, this), r.cursor = "crosshair", o.on("mousemove", this._onBrush), o.on("mouseup", this._onBrushEnd)) : (o.off("mousemove", this._onBrush), o.off("mouseup", this._onBrushEnd)), n.add(r)
  41072. }, e.prototype._renderDataShadow = function () {
  41073. var t = this._dataShadowInfo = this._prepareDataShadowInfo();
  41074. if (this._displayables.dataShadowSegs = [], t) {
  41075. var e = this._size,
  41076. n = this._shadowSize || [],
  41077. i = t.series,
  41078. r = i.getRawData(),
  41079. o = i.getShadowDim && i.getShadowDim(),
  41080. a = o && r.getDimensionInfo(o) ? i.getShadowDim() : t.otherDim;
  41081. if (null != a) {
  41082. var s = this._shadowPolygonPts,
  41083. l = this._shadowPolylinePts;
  41084. if (r !== this._shadowData || a !== this._shadowDim || e[0] !== n[0] || e[1] !== n[1]) {
  41085. var u = r.getDataExtent(a),
  41086. h = .3 * (u[1] - u[0]);
  41087. u = [u[0] - h, u[1] + h];
  41088. var c, p = [0, e[1]],
  41089. d = [0, e[0]],
  41090. f = [
  41091. [e[0], 0],
  41092. [0, 0]
  41093. ],
  41094. g = [],
  41095. y = d[1] / (r.count() - 1),
  41096. v = 0,
  41097. m = Math.round(r.count() / e[0]);
  41098. r.each([a], (function (t, e) {
  41099. if (m > 0 && e % m) v += y;
  41100. else {
  41101. var n = null == t || isNaN(t) || "" === t,
  41102. i = n ? 0 : Kr(t, u, p, !0);
  41103. n && !c && e ? (f.push([f[f.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !n && c && (f.push([v, 0]), g.push([v, 0])), f.push([v, i]), g.push([v, i]), v += y, c = n
  41104. }
  41105. })), s = this._shadowPolygonPts = f, l = this._shadowPolylinePts = g
  41106. }
  41107. this._shadowData = r, this._shadowDim = a, this._shadowSize = [e[0], e[1]];
  41108. for (var x = this.dataZoomModel, _ = 0; _ < 3; _++) {
  41109. var b = w(1 === _);
  41110. this._displayables.sliderGroup.add(b), this._displayables.dataShadowSegs.push(b)
  41111. }
  41112. }
  41113. }
  41114. function w(t) {
  41115. var e = x.getModel(t ? "selectedDataBackground" : "dataBackground"),
  41116. n = new Br,
  41117. i = new Xu({
  41118. shape: {
  41119. points: s
  41120. },
  41121. segmentIgnoreThreshold: 1,
  41122. style: e.getModel("areaStyle").getAreaStyle(),
  41123. silent: !0,
  41124. z2: -20
  41125. }),
  41126. r = new Zu({
  41127. shape: {
  41128. points: l
  41129. },
  41130. segmentIgnoreThreshold: 1,
  41131. style: e.getModel("lineStyle").getLineStyle(),
  41132. silent: !0,
  41133. z2: -19
  41134. });
  41135. return n.add(i), n.add(r), n
  41136. }
  41137. }, e.prototype._prepareDataShadowInfo = function () {
  41138. var t = this.dataZoomModel,
  41139. e = t.get("showDataShadow");
  41140. if (!1 !== e) {
  41141. var n, i = this.ecModel;
  41142. return t.eachTargetAxis((function (r, o) {
  41143. E(t.getAxisProxy(r, o).getTargetSeriesModels(), (function (t) {
  41144. if (!(n || !0 !== e && P(SF, t.get("type")) < 0)) {
  41145. var a, s = i.getComponent(tz(r), o).axis,
  41146. l = function (t) {
  41147. var e = {
  41148. x: "y",
  41149. y: "x",
  41150. radius: "angle",
  41151. angle: "radius"
  41152. };
  41153. return e[t]
  41154. }(r),
  41155. u = t.coordinateSystem;
  41156. null != l && u.getOtherAxis && (a = u.getOtherAxis(s).inverse), l = t.getData().mapDimension(l), n = {
  41157. thisAxis: s,
  41158. series: t,
  41159. thisDim: r,
  41160. otherDim: l,
  41161. otherAxisInverse: a
  41162. }
  41163. }
  41164. }), this)
  41165. }), this), n
  41166. }
  41167. }, e.prototype._renderHandle = function () {
  41168. var t = this.group,
  41169. e = this._displayables,
  41170. n = e.handles = [null, null],
  41171. i = e.handleLabels = [null, null],
  41172. r = this._displayables.sliderGroup,
  41173. o = this._size,
  41174. a = this.dataZoomModel,
  41175. s = this.api,
  41176. l = a.get("borderRadius") || 0,
  41177. u = a.get("brushSelect"),
  41178. h = e.filler = new _F({
  41179. silent: u,
  41180. style: {
  41181. fill: a.get("fillerColor")
  41182. },
  41183. textConfig: {
  41184. position: "inside"
  41185. }
  41186. });
  41187. r.add(h), r.add(new _F({
  41188. silent: !0,
  41189. subPixelOptimize: !0,
  41190. shape: {
  41191. x: 0,
  41192. y: 0,
  41193. width: o[0],
  41194. height: o[1],
  41195. r: l
  41196. },
  41197. style: {
  41198. stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
  41199. lineWidth: 1,
  41200. fill: "rgba(0,0,0,0)"
  41201. }
  41202. })), E([0, 1], (function (e) {
  41203. var o = a.get("handleIcon");
  41204. !Wy[o] && o.indexOf("path://") < 0 && o.indexOf("image://") < 0 && (o = "path://" + o);
  41205. var s = Xy(o, -1, 0, 2, 2, null, !0);
  41206. s.attr({
  41207. cursor: TF(this._orient),
  41208. draggable: !0,
  41209. drift: W(this._onDragMove, this, e),
  41210. ondragend: W(this._onDragEnd, this),
  41211. onmouseover: W(this._showDataInfo, this, !0),
  41212. onmouseout: W(this._showDataInfo, this, !1),
  41213. z2: 5
  41214. });
  41215. var l = s.getBoundingRect(),
  41216. u = a.get("handleSize");
  41217. this._handleHeight = $r(u, this._size[1]), this._handleWidth = l.width / l.height * this._handleHeight, s.setStyle(a.getModel("handleStyle").getItemStyle()), s.style.strokeNoScale = !0, s.rectHover = !0, s.ensureState("emphasis").style = a.getModel(["emphasis", "handleStyle"]).getItemStyle(), Ul(s);
  41218. var h = a.get("handleColor");
  41219. null != h && (s.style.fill = h), r.add(n[e] = s);
  41220. var c = a.getModel("textStyle");
  41221. t.add(i[e] = new Xs({
  41222. silent: !0,
  41223. invisible: !0,
  41224. style: oc(c, {
  41225. x: 0,
  41226. y: 0,
  41227. text: "",
  41228. verticalAlign: "middle",
  41229. align: "center",
  41230. fill: c.getTextColor(),
  41231. font: c.getFont()
  41232. }),
  41233. z2: 10
  41234. }))
  41235. }), this);
  41236. var c = h;
  41237. if (u) {
  41238. var p = $r(a.get("moveHandleSize"), o[1]),
  41239. d = e.moveHandle = new Ws({
  41240. style: a.getModel("moveHandleStyle").getItemStyle(),
  41241. silent: !0,
  41242. shape: {
  41243. r: [0, 0, 2, 2],
  41244. y: o[1] - .5,
  41245. height: p
  41246. }
  41247. }),
  41248. f = .8 * p,
  41249. g = e.moveHandleIcon = Xy(a.get("moveHandleIcon"), -f / 2, -f / 2, f, f, "#fff", !0);
  41250. g.silent = !0, g.y = o[1] + p / 2 - .5, d.ensureState("emphasis").style = a.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  41251. var y = Math.min(o[1] / 2, Math.max(p, 10));
  41252. (c = e.moveZone = new Ws({
  41253. invisible: !0,
  41254. shape: {
  41255. y: o[1] - y,
  41256. height: p + y
  41257. }
  41258. })).on("mouseover", (function () {
  41259. s.enterEmphasis(d)
  41260. })).on("mouseout", (function () {
  41261. s.leaveEmphasis(d)
  41262. })), r.add(d), r.add(g), r.add(c)
  41263. }
  41264. c.attr({
  41265. draggable: !0,
  41266. cursor: TF(this._orient),
  41267. drift: W(this._onDragMove, this, "all"),
  41268. ondragstart: W(this._showDataInfo, this, !0),
  41269. ondragend: W(this._onDragEnd, this),
  41270. onmouseover: W(this._showDataInfo, this, !0),
  41271. onmouseout: W(this._showDataInfo, this, !1)
  41272. })
  41273. }, e.prototype._resetInterval = function () {
  41274. var t = this._range = this.dataZoomModel.getPercentRange(),
  41275. e = this._getViewExtent();
  41276. this._handleEnds = [Kr(t[0], [0, 100], e, !0), Kr(t[1], [0, 100], e, !0)]
  41277. }, e.prototype._updateInterval = function (t, e) {
  41278. var n = this.dataZoomModel,
  41279. i = this._handleEnds,
  41280. r = this._getViewExtent(),
  41281. o = n.findRepresentativeAxisProxy().getMinMaxSpan(),
  41282. a = [0, 100];
  41283. Nk(e, i, r, n.get("zoomLock") ? "all" : t, null != o.minSpan ? Kr(o.minSpan, a, r, !0) : null, null != o.maxSpan ? Kr(o.maxSpan, a, r, !0) : null);
  41284. var s = this._range,
  41285. l = this._range = Qr([Kr(i[0], r, a, !0), Kr(i[1], r, a, !0)]);
  41286. return !s || s[0] !== l[0] || s[1] !== l[1]
  41287. }, e.prototype._updateView = function (t) {
  41288. var e = this._displayables,
  41289. n = this._handleEnds,
  41290. i = Qr(n.slice()),
  41291. r = this._size;
  41292. E([0, 1], (function (t) {
  41293. var i = e.handles[t],
  41294. o = this._handleHeight;
  41295. i.attr({
  41296. scaleX: o / 2,
  41297. scaleY: o / 2,
  41298. x: n[t] + (t ? -1 : 1),
  41299. y: r[1] / 2 - o / 2
  41300. })
  41301. }), this), e.filler.setShape({
  41302. x: i[0],
  41303. y: 0,
  41304. width: i[1] - i[0],
  41305. height: r[1]
  41306. });
  41307. var o = {
  41308. x: i[0],
  41309. width: i[1] - i[0]
  41310. };
  41311. e.moveHandle && (e.moveHandle.setShape(o), e.moveZone.setShape(o), e.moveZone.getBoundingRect(), e.moveHandleIcon && e.moveHandleIcon.attr("x", o.x + o.width / 2));
  41312. for (var a = e.dataShadowSegs, s = [0, i[0], i[1], r[0]], l = 0; l < a.length; l++) {
  41313. var u = a[l],
  41314. h = u.getClipPath();
  41315. h || (h = new Ws, u.setClipPath(h)), h.setShape({
  41316. x: s[l],
  41317. y: 0,
  41318. width: s[l + 1] - s[l],
  41319. height: r[1]
  41320. })
  41321. }
  41322. this._updateDataInfo(t)
  41323. }, e.prototype._updateDataInfo = function (t) {
  41324. var e = this.dataZoomModel,
  41325. n = this._displayables,
  41326. i = n.handleLabels,
  41327. r = this._orient,
  41328. o = ["", ""];
  41329. if (e.get("showDetail")) {
  41330. var a = e.findRepresentativeAxisProxy();
  41331. if (a) {
  41332. var s = a.getAxisModel().axis,
  41333. l = this._range,
  41334. u = t ? a.calculateDataWindow({
  41335. start: l[0],
  41336. end: l[1]
  41337. }).valueWindow : a.getDataValueWindow();
  41338. o = [this._formatLabel(u[0], s), this._formatLabel(u[1], s)]
  41339. }
  41340. }
  41341. var h = Qr(this._handleEnds.slice());
  41342. function c(t) {
  41343. var e = Bh(n.handles[t].parent, this.group),
  41344. a = Gh(0 === t ? "right" : "left", e),
  41345. s = this._handleWidth / 2 + 5,
  41346. l = Fh([h[t] + (0 === t ? -s : s), this._size[1] / 2], e);
  41347. i[t].setStyle({
  41348. x: l[0],
  41349. y: l[1],
  41350. verticalAlign: r === bF ? "middle" : a,
  41351. align: r === bF ? a : "center",
  41352. text: o[t]
  41353. })
  41354. }
  41355. c.call(this, 0), c.call(this, 1)
  41356. }, e.prototype._formatLabel = function (t, e) {
  41357. var n = this.dataZoomModel,
  41358. i = n.get("labelFormatter"),
  41359. r = n.get("labelPrecision");
  41360. null != r && "auto" !== r || (r = e.getPixelPrecision());
  41361. var o = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel({
  41362. value: Math.round(t)
  41363. }) : t.toFixed(Math.min(r, 20));
  41364. return X(i) ? i(t, o) : U(i) ? i.replace("{value}", o) : o
  41365. }, e.prototype._showDataInfo = function (t) {
  41366. t = this._dragging || t;
  41367. var e = this._displayables,
  41368. n = e.handleLabels;
  41369. n[0].attr("invisible", !t), n[1].attr("invisible", !t), e.moveHandle && this.api[t ? "enterEmphasis" : "leaveEmphasis"](e.moveHandle, 1)
  41370. }, e.prototype._onDragMove = function (t, e, n, i) {
  41371. this._dragging = !0, de(i.event);
  41372. var r = Fh([e, n], this._displayables.sliderGroup.getLocalTransform(), !0),
  41373. o = this._updateInterval(t, r[0]),
  41374. a = this.dataZoomModel.get("realtime");
  41375. this._updateView(!a), o && a && this._dispatchZoomAction(!0)
  41376. }, e.prototype._onDragEnd = function () {
  41377. this._dragging = !1, this._showDataInfo(!1), !this.dataZoomModel.get("realtime") && this._dispatchZoomAction(!1)
  41378. }, e.prototype._onClickPanel = function (t) {
  41379. var e = this._size,
  41380. n = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY);
  41381. if (!(n[0] < 0 || n[0] > e[0] || n[1] < 0 || n[1] > e[1])) {
  41382. var i = this._handleEnds,
  41383. r = (i[0] + i[1]) / 2,
  41384. o = this._updateInterval("all", n[0] - r);
  41385. this._updateView(), o && this._dispatchZoomAction(!1)
  41386. }
  41387. }, e.prototype._onBrushStart = function (t) {
  41388. var e = t.offsetX,
  41389. n = t.offsetY;
  41390. this._brushStart = new De(e, n), this._brushing = !0, this._brushStartTime = +new Date
  41391. }, e.prototype._onBrushEnd = function (t) {
  41392. if (this._brushing) {
  41393. var e = this._displayables.brushRect;
  41394. if (this._brushing = !1, e) {
  41395. e.attr("ignore", !0);
  41396. var n = e.shape;
  41397. if (!(+new Date - this._brushStartTime < 200 && Math.abs(n.width) < 5)) {
  41398. var i = this._getViewExtent(),
  41399. r = [0, 100];
  41400. this._range = Qr([Kr(n.x, i, r, !0), Kr(n.x + n.width, i, r, !0)]), this._handleEnds = [n.x, n.x + n.width], this._updateView(), this._dispatchZoomAction(!1)
  41401. }
  41402. }
  41403. }
  41404. }, e.prototype._onBrush = function (t) {
  41405. this._brushing && (de(t.event), this._updateBrushRect(t.offsetX, t.offsetY))
  41406. }, e.prototype._updateBrushRect = function (t, e) {
  41407. var n = this._displayables,
  41408. i = this.dataZoomModel,
  41409. r = n.brushRect;
  41410. r || (r = n.brushRect = new _F({
  41411. silent: !0,
  41412. style: i.getModel("brushStyle").getItemStyle()
  41413. }), n.sliderGroup.add(r)), r.attr("ignore", !1);
  41414. var o = this._brushStart,
  41415. a = this._displayables.sliderGroup,
  41416. s = a.transformCoordToLocal(t, e),
  41417. l = a.transformCoordToLocal(o.x, o.y),
  41418. u = this._size;
  41419. s[0] = Math.max(Math.min(u[0], s[0]), 0), r.setShape({
  41420. x: l[0],
  41421. y: 0,
  41422. width: s[0] - l[0],
  41423. height: u[1]
  41424. })
  41425. }, e.prototype._dispatchZoomAction = function (t) {
  41426. var e = this._range;
  41427. this.api.dispatchAction({
  41428. type: "dataZoom",
  41429. from: this.uid,
  41430. dataZoomId: this.dataZoomModel.id,
  41431. animation: t ? MF : null,
  41432. start: e[0],
  41433. end: e[1]
  41434. })
  41435. }, e.prototype._findCoordRect = function () {
  41436. var t, e = nz(this.dataZoomModel).infoList;
  41437. if (!t && e.length) {
  41438. var n = e[0].model.coordinateSystem;
  41439. t = n.getRect && n.getRect()
  41440. }
  41441. if (!t) {
  41442. var i = this.api.getWidth(),
  41443. r = this.api.getHeight();
  41444. t = {
  41445. x: .2 * i,
  41446. y: .2 * r,
  41447. width: .6 * i,
  41448. height: .6 * r
  41449. }
  41450. }
  41451. return t
  41452. }, e.type = "dataZoom.slider", e
  41453. }(sz);
  41454. function TF(t) {
  41455. return "vertical" === t ? "ns-resize" : "ew-resize"
  41456. }
  41457. function CF(t) {
  41458. t.registerComponentModel(xF), t.registerComponentView(IF), fz(t)
  41459. }
  41460. var DF = function (t, e, n) {
  41461. var i = T((AF[t] || {})[e]);
  41462. return n && Y(i) ? i[i.length - 1] : i
  41463. },
  41464. AF = {
  41465. color: {
  41466. active: ["#006edd", "#e0ffff"],
  41467. inactive: ["rgba(0,0,0,0)"]
  41468. },
  41469. colorHue: {
  41470. active: [0, 360],
  41471. inactive: [0, 0]
  41472. },
  41473. colorSaturation: {
  41474. active: [.3, 1],
  41475. inactive: [0, 0]
  41476. },
  41477. colorLightness: {
  41478. active: [.9, .5],
  41479. inactive: [0, 0]
  41480. },
  41481. colorAlpha: {
  41482. active: [.3, 1],
  41483. inactive: [0, 0]
  41484. },
  41485. opacity: {
  41486. active: [.3, 1],
  41487. inactive: [0, 0]
  41488. },
  41489. symbol: {
  41490. active: ["circle", "roundRect", "diamond"],
  41491. inactive: ["none"]
  41492. },
  41493. symbolSize: {
  41494. active: [10, 50],
  41495. inactive: [0, 0]
  41496. }
  41497. },
  41498. kF = DD.mapVisual,
  41499. LF = DD.eachVisual,
  41500. PF = Y,
  41501. OF = E,
  41502. RF = Qr,
  41503. NF = Kr,
  41504. EF = function (t) {
  41505. function e() {
  41506. var n = null !== t && t.apply(this, arguments) || this;
  41507. return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
  41508. type: "box",
  41509. ignoreSize: !0
  41510. }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n
  41511. }
  41512. return n(e, t), e.prototype.init = function (t, e, n) {
  41513. this.mergeDefaultAndTheme(t, n)
  41514. }, e.prototype.optionUpdated = function (t, e) {
  41515. var n = this.option;
  41516. !e && kV(n, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption()
  41517. }, e.prototype.resetVisual = function (t) {
  41518. var e = this.stateList;
  41519. t = W(t, this), this.controllerVisuals = AV(this.option.controller, e, t), this.targetVisuals = AV(this.option.target, e, t)
  41520. }, e.prototype.getItemSymbol = function () {
  41521. return null
  41522. }, e.prototype.getTargetSeriesIndices = function () {
  41523. var t = this.option.seriesIndex,
  41524. e = [];
  41525. return null == t || "all" === t ? this.ecModel.eachSeries((function (t, n) {
  41526. e.push(n)
  41527. })) : e = To(t), e
  41528. }, e.prototype.eachTargetSeries = function (t, e) {
  41529. E(this.getTargetSeriesIndices(), (function (n) {
  41530. var i = this.ecModel.getSeriesByIndex(n);
  41531. i && t.call(e, i)
  41532. }), this)
  41533. }, e.prototype.isTargetSeries = function (t) {
  41534. var e = !1;
  41535. return this.eachTargetSeries((function (n) {
  41536. n === t && (e = !0)
  41537. })), e
  41538. }, e.prototype.formatValueText = function (t, e, n) {
  41539. var i, r = this.option,
  41540. o = r.precision,
  41541. a = this.dataBound,
  41542. s = r.formatter;
  41543. n = n || ["<", ">"], Y(t) && (t = t.slice(), i = !0);
  41544. var l = e ? t : i ? [u(t[0]), u(t[1])] : u(t);
  41545. return U(s) ? s.replace("{value}", i ? l[0] : l).replace("{value2}", i ? l[1] : l) : X(s) ? i ? s(t[0], t[1]) : s(t) : i ? t[0] === a[0] ? n[0] + " " + l[1] : t[1] === a[1] ? n[1] + " " + l[0] : l[0] + " - " + l[1] : l;
  41546. function u(t) {
  41547. return t === a[0] ? "min" : t === a[1] ? "max" : (+t).toFixed(Math.min(o, 20))
  41548. }
  41549. }, e.prototype.resetExtent = function () {
  41550. var t = this.option,
  41551. e = RF([t.min, t.max]);
  41552. this._dataExtent = e
  41553. }, e.prototype.getDataDimensionIndex = function (t) {
  41554. var e = this.option.dimension;
  41555. if (null != e) return t.getDimensionIndex(e);
  41556. for (var n = t.dimensions, i = n.length - 1; i >= 0; i--) {
  41557. var r = n[i],
  41558. o = t.getDimensionInfo(r);
  41559. if (!o.isCalculationCoord) return o.storeDimIndex
  41560. }
  41561. }, e.prototype.getExtent = function () {
  41562. return this._dataExtent.slice()
  41563. }, e.prototype.completeVisualOption = function () {
  41564. var t = this.ecModel,
  41565. e = this.option,
  41566. n = {
  41567. inRange: e.inRange,
  41568. outOfRange: e.outOfRange
  41569. },
  41570. i = e.target || (e.target = {}),
  41571. r = e.controller || (e.controller = {});
  41572. C(i, n), C(r, n);
  41573. var o = this.isCategory();
  41574. function a(n) {
  41575. PF(e.color) && !n.inRange && (n.inRange = {
  41576. color: e.color.slice().reverse()
  41577. }), n.inRange = n.inRange || {
  41578. color: t.get("gradientColor")
  41579. }
  41580. }
  41581. a.call(this, i), a.call(this, r),
  41582. function (t, e, n) {
  41583. var i = t[e],
  41584. r = t[n];
  41585. i && !r && (r = t[n] = {}, OF(i, (function (t, e) {
  41586. if (DD.isValidType(e)) {
  41587. var n = DF(e, "inactive", o);
  41588. null != n && (r[e] = n, "color" !== e || r.hasOwnProperty("opacity") || r.hasOwnProperty("colorAlpha") || (r.opacity = [0, 0]))
  41589. }
  41590. })))
  41591. }.call(this, i, "inRange", "outOfRange"),
  41592. function (t) {
  41593. var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol,
  41594. n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize,
  41595. i = this.get("inactiveColor"),
  41596. r = this.getItemSymbol() || "roundRect";
  41597. OF(this.stateList, (function (a) {
  41598. var s = this.itemSize,
  41599. l = t[a];
  41600. l || (l = t[a] = {
  41601. color: o ? i : [i]
  41602. }), null == l.symbol && (l.symbol = e && T(e) || (o ? r : [r])), null == l.symbolSize && (l.symbolSize = n && T(n) || (o ? s[0] : [s[0], s[0]])), l.symbol = kF(l.symbol, (function (t) {
  41603. return "none" === t ? r : t
  41604. }));
  41605. var u = l.symbolSize;
  41606. if (null != u) {
  41607. var h = -1 / 0;
  41608. LF(u, (function (t) {
  41609. t > h && (h = t)
  41610. })), l.symbolSize = kF(u, (function (t) {
  41611. return NF(t, [0, h], [0, s[0]], !0)
  41612. }))
  41613. }
  41614. }), this)
  41615. }.call(this, r)
  41616. }, e.prototype.resetItemSize = function () {
  41617. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
  41618. }, e.prototype.isCategory = function () {
  41619. return !!this.option.categories
  41620. }, e.prototype.setSelected = function (t) {}, e.prototype.getSelected = function () {
  41621. return null
  41622. }, e.prototype.getValueState = function (t) {
  41623. return null
  41624. }, e.prototype.getVisualMeta = function (t) {
  41625. return null
  41626. }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
  41627. show: !0,
  41628. z: 4,
  41629. seriesIndex: "all",
  41630. min: 0,
  41631. max: 200,
  41632. left: 0,
  41633. right: null,
  41634. top: null,
  41635. bottom: 0,
  41636. itemWidth: null,
  41637. itemHeight: null,
  41638. inverse: !1,
  41639. orient: "vertical",
  41640. backgroundColor: "rgba(0,0,0,0)",
  41641. borderColor: "#ccc",
  41642. contentColor: "#5793f3",
  41643. inactiveColor: "#aaa",
  41644. borderWidth: 0,
  41645. padding: 5,
  41646. textGap: 10,
  41647. precision: 0,
  41648. textStyle: {
  41649. color: "#333"
  41650. }
  41651. }, e
  41652. }(zp),
  41653. zF = [20, 140],
  41654. VF = function (t) {
  41655. function e() {
  41656. var n = null !== t && t.apply(this, arguments) || this;
  41657. return n.type = e.type, n
  41658. }
  41659. return n(e, t), e.prototype.optionUpdated = function (e, n) {
  41660. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual((function (t) {
  41661. t.mappingMethod = "linear", t.dataExtent = this.getExtent()
  41662. })), this._resetRange()
  41663. }, e.prototype.resetItemSize = function () {
  41664. t.prototype.resetItemSize.apply(this, arguments);
  41665. var e = this.itemSize;
  41666. (null == e[0] || isNaN(e[0])) && (e[0] = zF[0]), (null == e[1] || isNaN(e[1])) && (e[1] = zF[1])
  41667. }, e.prototype._resetRange = function () {
  41668. var t = this.getExtent(),
  41669. e = this.option.range;
  41670. !e || e.auto ? (t.auto = 1, this.option.range = t) : Y(e) && (e[0] > e[1] && e.reverse(), e[0] = Math.max(e[0], t[0]), e[1] = Math.min(e[1], t[1]))
  41671. }, e.prototype.completeVisualOption = function () {
  41672. t.prototype.completeVisualOption.apply(this, arguments), E(this.stateList, (function (t) {
  41673. var e = this.option.controller[t].symbolSize;
  41674. e && e[0] !== e[1] && (e[0] = e[1] / 3)
  41675. }), this)
  41676. }, e.prototype.setSelected = function (t) {
  41677. this.option.range = t.slice(), this._resetRange()
  41678. }, e.prototype.getSelected = function () {
  41679. var t = this.getExtent(),
  41680. e = Qr((this.get("range") || []).slice());
  41681. return e[0] > t[1] && (e[0] = t[1]), e[1] > t[1] && (e[1] = t[1]), e[0] < t[0] && (e[0] = t[0]), e[1] < t[0] && (e[1] = t[0]), e
  41682. }, e.prototype.getValueState = function (t) {
  41683. var e = this.option.range,
  41684. n = this.getExtent();
  41685. return (e[0] <= n[0] || e[0] <= t) && (e[1] >= n[1] || t <= e[1]) ? "inRange" : "outOfRange"
  41686. }, e.prototype.findTargetDataIndices = function (t) {
  41687. var e = [];
  41688. return this.eachTargetSeries((function (n) {
  41689. var i = [],
  41690. r = n.getData();
  41691. r.each(this.getDataDimensionIndex(r), (function (e, n) {
  41692. t[0] <= e && e <= t[1] && i.push(n)
  41693. }), this), e.push({
  41694. seriesId: n.id,
  41695. dataIndex: i
  41696. })
  41697. }), this), e
  41698. }, e.prototype.getVisualMeta = function (t) {
  41699. var e = BF(this, "outOfRange", this.getExtent()),
  41700. n = BF(this, "inRange", this.option.range.slice()),
  41701. i = [];
  41702. function r(e, n) {
  41703. i.push({
  41704. value: e,
  41705. color: t(e, n)
  41706. })
  41707. }
  41708. for (var o = 0, a = 0, s = n.length, l = e.length; a < l && (!n.length || e[a] <= n[0]); a++) e[a] < n[o] && r(e[a], "outOfRange");
  41709. for (var u = 1; o < s; o++, u = 0) u && i.length && r(n[o], "outOfRange"), r(n[o], "inRange");
  41710. for (u = 1; a < l; a++)(!n.length || n[n.length - 1] < e[a]) && (u && (i.length && r(i[i.length - 1].value, "outOfRange"), u = 0), r(e[a], "outOfRange"));
  41711. var h = i.length;
  41712. return {
  41713. stops: i,
  41714. outerColors: [h ? i[0].color : "transparent", h ? i[h - 1].color : "transparent"]
  41715. }
  41716. }, e.type = "visualMap.continuous", e.defaultOption = kc(EF.defaultOption, {
  41717. align: "auto",
  41718. calculable: !1,
  41719. hoverLink: !0,
  41720. realtime: !0,
  41721. handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
  41722. handleSize: "120%",
  41723. handleStyle: {
  41724. borderColor: "#fff",
  41725. borderWidth: 1
  41726. },
  41727. indicatorIcon: "circle",
  41728. indicatorSize: "50%",
  41729. indicatorStyle: {
  41730. borderColor: "#fff",
  41731. borderWidth: 2,
  41732. shadowBlur: 2,
  41733. shadowOffsetX: 1,
  41734. shadowOffsetY: 1,
  41735. shadowColor: "rgba(0,0,0,0.2)"
  41736. }
  41737. }), e
  41738. }(EF);
  41739. function BF(t, e, n) {
  41740. if (n[0] === n[1]) return n.slice();
  41741. for (var i = (n[1] - n[0]) / 200, r = n[0], o = [], a = 0; a <= 200 && r < n[1]; a++) o.push(r), r += i;
  41742. return o.push(n[1]), o
  41743. }
  41744. var FF = function (t) {
  41745. function e() {
  41746. var n = null !== t && t.apply(this, arguments) || this;
  41747. return n.type = e.type, n.autoPositionValues = {
  41748. left: 1,
  41749. right: 1,
  41750. top: 1,
  41751. bottom: 1
  41752. }, n
  41753. }
  41754. return n(e, t), e.prototype.init = function (t, e) {
  41755. this.ecModel = t, this.api = e
  41756. }, e.prototype.render = function (t, e, n, i) {
  41757. this.visualMapModel = t, !1 !== t.get("show") ? this.doRender(t, e, n, i) : this.group.removeAll()
  41758. }, e.prototype.renderBackground = function (t) {
  41759. var e = this.visualMapModel,
  41760. n = vp(e.get("padding") || 0),
  41761. i = t.getBoundingRect();
  41762. t.add(new Ws({
  41763. z2: -1,
  41764. silent: !0,
  41765. shape: {
  41766. x: i.x - n[3],
  41767. y: i.y - n[0],
  41768. width: i.width + n[3] + n[1],
  41769. height: i.height + n[0] + n[2]
  41770. },
  41771. style: {
  41772. fill: e.get("backgroundColor"),
  41773. stroke: e.get("borderColor"),
  41774. lineWidth: e.get("borderWidth")
  41775. }
  41776. }))
  41777. }, e.prototype.getControllerVisual = function (t, e, n) {
  41778. var i = (n = n || {}).forceState,
  41779. r = this.visualMapModel,
  41780. o = {};
  41781. if ("color" === e) {
  41782. var a = r.get("contentColor");
  41783. o.color = a
  41784. }
  41785. function s(t) {
  41786. return o[t]
  41787. }
  41788. function l(t, e) {
  41789. o[t] = e
  41790. }
  41791. var u = r.controllerVisuals[i || r.getValueState(t)];
  41792. return E(DD.prepareVisualTypes(u), (function (i) {
  41793. var r = u[i];
  41794. n.convertOpacityToAlpha && "opacity" === i && (i = "colorAlpha", r = u.__alphaForOpacity), DD.dependsOn(i, e) && r && r.applyVisual(t, s, l)
  41795. })), o[e]
  41796. }, e.prototype.positionGroup = function (t) {
  41797. var e = this.visualMapModel,
  41798. n = this.api;
  41799. Lp(t, e.getBoxLayoutParams(), {
  41800. width: n.getWidth(),
  41801. height: n.getHeight()
  41802. })
  41803. }, e.prototype.doRender = function (t, e, n, i) {}, e.type = "visualMap", e
  41804. }(Ag),
  41805. GF = [
  41806. ["left", "right", "width"],
  41807. ["top", "bottom", "height"]
  41808. ];
  41809. function WF(t, e, n) {
  41810. var i = t.option,
  41811. r = i.align;
  41812. if (null != r && "auto" !== r) return r;
  41813. for (var o = {
  41814. width: e.getWidth(),
  41815. height: e.getHeight()
  41816. }, a = "horizontal" === i.orient ? 1 : 0, s = GF[a], l = [0, null, 10], u = {}, h = 0; h < 3; h++) u[GF[1 - a][h]] = l[h], u[s[h]] = 2 === h ? n[0] : i[s[h]];
  41817. var c = [
  41818. ["x", "width", 3],
  41819. ["y", "height", 0]
  41820. ][a],
  41821. p = kp(u, o, i.padding);
  41822. return s[(p.margin[c[2]] || 0) + p[c[0]] + .5 * p[c[1]] < .5 * o[c[1]] ? 0 : 1]
  41823. }
  41824. function HF(t, e) {
  41825. return E(t || [], (function (t) {
  41826. null != t.dataIndex && (t.dataIndexInside = t.dataIndex, t.dataIndex = null), t.highlightKey = "visualMap" + (e ? e.componentIndex : "")
  41827. })), t
  41828. }
  41829. var YF = Kr,
  41830. XF = E,
  41831. UF = Math.min,
  41832. ZF = Math.max,
  41833. jF = function (t) {
  41834. function e() {
  41835. var n = null !== t && t.apply(this, arguments) || this;
  41836. return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n
  41837. }
  41838. return n(e, t), e.prototype.init = function (e, n) {
  41839. t.prototype.init.call(this, e, n), this._hoverLinkFromSeriesMouseOver = W(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = W(this._hideIndicator, this)
  41840. }, e.prototype.doRender = function (t, e, n, i) {
  41841. i && "selectDataRange" === i.type && i.from === this.uid || this._buildView()
  41842. }, e.prototype._buildView = function () {
  41843. this.group.removeAll();
  41844. var t = this.visualMapModel,
  41845. e = this.group;
  41846. this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(e);
  41847. var n = t.get("text");
  41848. this._renderEndsText(e, n, 0), this._renderEndsText(e, n, 1), this._updateView(!0), this.renderBackground(e), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(e)
  41849. }, e.prototype._renderEndsText = function (t, e, n) {
  41850. if (e) {
  41851. var i = e[1 - n];
  41852. i = null != i ? i + "" : "";
  41853. var r = this.visualMapModel,
  41854. o = r.get("textGap"),
  41855. a = r.itemSize,
  41856. s = this._shapes.mainGroup,
  41857. l = this._applyTransform([a[0] / 2, 0 === n ? -o : a[1] + o], s),
  41858. u = this._applyTransform(0 === n ? "bottom" : "top", s),
  41859. h = this._orient,
  41860. c = this.visualMapModel.textStyleModel;
  41861. this.group.add(new Xs({
  41862. style: oc(c, {
  41863. x: l[0],
  41864. y: l[1],
  41865. verticalAlign: "horizontal" === h ? "middle" : u,
  41866. align: "horizontal" === h ? u : "center",
  41867. text: i
  41868. })
  41869. }))
  41870. }
  41871. }, e.prototype._renderBar = function (t) {
  41872. var e = this.visualMapModel,
  41873. n = this._shapes,
  41874. i = e.itemSize,
  41875. r = this._orient,
  41876. o = this._useHandle,
  41877. a = WF(e, this.api, i),
  41878. s = n.mainGroup = this._createBarGroup(a),
  41879. l = new Br;
  41880. s.add(l), l.add(n.outOfRange = qF()), l.add(n.inRange = qF(null, o ? $F(this._orient) : null, W(this._dragHandle, this, "all", !1), W(this._dragHandle, this, "all", !0))), l.setClipPath(new Ws({
  41881. shape: {
  41882. x: 0,
  41883. y: 0,
  41884. width: i[0],
  41885. height: i[1],
  41886. r: 3
  41887. }
  41888. }));
  41889. var u = e.textStyleModel.getTextRect("国"),
  41890. h = ZF(u.width, u.height);
  41891. o && (n.handleThumbs = [], n.handleLabels = [], n.handleLabelPoints = [], this._createHandle(e, s, 0, i, h, r), this._createHandle(e, s, 1, i, h, r)), this._createIndicator(e, s, i, h, r), t.add(s)
  41892. }, e.prototype._createHandle = function (t, e, n, i, r, o) {
  41893. var a = W(this._dragHandle, this, n, !1),
  41894. s = W(this._dragHandle, this, n, !0),
  41895. l = Cr(t.get("handleSize"), i[0]),
  41896. u = Xy(t.get("handleIcon"), -l / 2, -l / 2, l, l, null, !0),
  41897. h = $F(this._orient);
  41898. u.attr({
  41899. cursor: h,
  41900. draggable: !0,
  41901. drift: a,
  41902. ondragend: s,
  41903. onmousemove: function (t) {
  41904. de(t.event)
  41905. }
  41906. }), u.x = i[0] / 2, u.useStyle(t.getModel("handleStyle").getItemStyle()), u.setStyle({
  41907. strokeNoScale: !0,
  41908. strokeFirst: !0
  41909. }), u.style.lineWidth *= 2, u.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), Jl(u, !0), e.add(u);
  41910. var c = this.visualMapModel.textStyleModel,
  41911. p = new Xs({
  41912. cursor: h,
  41913. draggable: !0,
  41914. drift: a,
  41915. onmousemove: function (t) {
  41916. de(t.event)
  41917. },
  41918. ondragend: s,
  41919. style: oc(c, {
  41920. x: 0,
  41921. y: 0,
  41922. text: ""
  41923. })
  41924. });
  41925. p.ensureState("blur").style = {
  41926. opacity: .1
  41927. }, p.stateTransition = {
  41928. duration: 200
  41929. }, this.group.add(p);
  41930. var d = [l, 0],
  41931. f = this._shapes;
  41932. f.handleThumbs[n] = u, f.handleLabelPoints[n] = d, f.handleLabels[n] = p
  41933. }, e.prototype._createIndicator = function (t, e, n, i, r) {
  41934. var o = Cr(t.get("indicatorSize"), n[0]),
  41935. a = Xy(t.get("indicatorIcon"), -o / 2, -o / 2, o, o, null, !0);
  41936. a.attr({
  41937. cursor: "move",
  41938. invisible: !0,
  41939. silent: !0,
  41940. x: n[0] / 2
  41941. });
  41942. var s = t.getModel("indicatorStyle").getItemStyle();
  41943. if (a instanceof Ns) {
  41944. var l = a.style;
  41945. a.useStyle(A({
  41946. image: l.image,
  41947. x: l.x,
  41948. y: l.y,
  41949. width: l.width,
  41950. height: l.height
  41951. }, s))
  41952. } else a.useStyle(s);
  41953. e.add(a);
  41954. var u = this.visualMapModel.textStyleModel,
  41955. h = new Xs({
  41956. silent: !0,
  41957. invisible: !0,
  41958. style: oc(u, {
  41959. x: 0,
  41960. y: 0,
  41961. text: ""
  41962. })
  41963. });
  41964. this.group.add(h);
  41965. var c = [("horizontal" === r ? i / 2 : 6) + n[0] / 2, 0],
  41966. p = this._shapes;
  41967. p.indicator = a, p.indicatorLabel = h, p.indicatorLabelPoint = c, this._firstShowIndicator = !0
  41968. }, e.prototype._dragHandle = function (t, e, n, i) {
  41969. if (this._useHandle) {
  41970. if (this._dragging = !e, !e) {
  41971. var r = this._applyTransform([n, i], this._shapes.mainGroup, !0);
  41972. this._updateInterval(t, r[1]), this._hideIndicator(), this._updateView()
  41973. }
  41974. e === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  41975. type: "selectDataRange",
  41976. from: this.uid,
  41977. visualMapId: this.visualMapModel.id,
  41978. selected: this._dataInterval.slice()
  41979. }), e ? !this._hovering && this._clearHoverLinkToSeries() : KF(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1)
  41980. }
  41981. }, e.prototype._resetInterval = function () {
  41982. var t = this.visualMapModel,
  41983. e = this._dataInterval = t.getSelected(),
  41984. n = t.getExtent(),
  41985. i = [0, t.itemSize[1]];
  41986. this._handleEnds = [YF(e[0], n, i, !0), YF(e[1], n, i, !0)]
  41987. }, e.prototype._updateInterval = function (t, e) {
  41988. e = e || 0;
  41989. var n = this.visualMapModel,
  41990. i = this._handleEnds,
  41991. r = [0, n.itemSize[1]];
  41992. Nk(e, i, r, t, 0);
  41993. var o = n.getExtent();
  41994. this._dataInterval = [YF(i[0], r, o, !0), YF(i[1], r, o, !0)]
  41995. }, e.prototype._updateView = function (t) {
  41996. var e = this.visualMapModel,
  41997. n = e.getExtent(),
  41998. i = this._shapes,
  41999. r = [0, e.itemSize[1]],
  42000. o = t ? r : this._handleEnds,
  42001. a = this._createBarVisual(this._dataInterval, n, o, "inRange"),
  42002. s = this._createBarVisual(n, n, r, "outOfRange");
  42003. i.inRange.setStyle({
  42004. fill: a.barColor
  42005. }).setShape("points", a.barPoints), i.outOfRange.setStyle({
  42006. fill: s.barColor
  42007. }).setShape("points", s.barPoints), this._updateHandle(o, a)
  42008. }, e.prototype._createBarVisual = function (t, e, n, i) {
  42009. var r = {
  42010. forceState: i,
  42011. convertOpacityToAlpha: !0
  42012. },
  42013. o = this._makeColorGradient(t, r),
  42014. a = [this.getControllerVisual(t[0], "symbolSize", r), this.getControllerVisual(t[1], "symbolSize", r)],
  42015. s = this._createBarPoints(n, a);
  42016. return {
  42017. barColor: new oh(0, 0, 0, 1, o),
  42018. barPoints: s,
  42019. handlesColor: [o[0].color, o[o.length - 1].color]
  42020. }
  42021. }, e.prototype._makeColorGradient = function (t, e) {
  42022. var n = [],
  42023. i = (t[1] - t[0]) / 100;
  42024. n.push({
  42025. color: this.getControllerVisual(t[0], "color", e),
  42026. offset: 0
  42027. });
  42028. for (var r = 1; r < 100; r++) {
  42029. var o = t[0] + i * r;
  42030. if (o > t[1]) break;
  42031. n.push({
  42032. color: this.getControllerVisual(o, "color", e),
  42033. offset: r / 100
  42034. })
  42035. }
  42036. return n.push({
  42037. color: this.getControllerVisual(t[1], "color", e),
  42038. offset: 1
  42039. }), n
  42040. }, e.prototype._createBarPoints = function (t, e) {
  42041. var n = this.visualMapModel.itemSize;
  42042. return [
  42043. [n[0] - e[0], t[0]],
  42044. [n[0], t[0]],
  42045. [n[0], t[1]],
  42046. [n[0] - e[1], t[1]]
  42047. ]
  42048. }, e.prototype._createBarGroup = function (t) {
  42049. var e = this._orient,
  42050. n = this.visualMapModel.get("inverse");
  42051. return new Br("horizontal" !== e || n ? "horizontal" === e && n ? {
  42052. scaleX: "bottom" === t ? -1 : 1,
  42053. rotation: -Math.PI / 2
  42054. } : "vertical" !== e || n ? {
  42055. scaleX: "left" === t ? 1 : -1
  42056. } : {
  42057. scaleX: "left" === t ? 1 : -1,
  42058. scaleY: -1
  42059. } : {
  42060. scaleX: "bottom" === t ? 1 : -1,
  42061. rotation: Math.PI / 2
  42062. })
  42063. }, e.prototype._updateHandle = function (t, e) {
  42064. if (this._useHandle) {
  42065. var n = this._shapes,
  42066. i = this.visualMapModel,
  42067. r = n.handleThumbs,
  42068. o = n.handleLabels,
  42069. a = i.itemSize,
  42070. s = i.getExtent();
  42071. XF([0, 1], (function (l) {
  42072. var u = r[l];
  42073. u.setStyle("fill", e.handlesColor[l]), u.y = t[l];
  42074. var h = YF(t[l], [0, a[1]], s, !0),
  42075. c = this.getControllerVisual(h, "symbolSize");
  42076. u.scaleX = u.scaleY = c / a[0], u.x = a[0] - c / 2;
  42077. var p = Fh(n.handleLabelPoints[l], Bh(u, this.group));
  42078. o[l].setStyle({
  42079. x: p[0],
  42080. y: p[1],
  42081. text: i.formatValueText(this._dataInterval[l]),
  42082. verticalAlign: "middle",
  42083. align: "vertical" === this._orient ? this._applyTransform("left", n.mainGroup) : "center"
  42084. })
  42085. }), this)
  42086. }
  42087. }, e.prototype._showIndicator = function (t, e, n, i) {
  42088. var r = this.visualMapModel,
  42089. o = r.getExtent(),
  42090. a = r.itemSize,
  42091. s = [0, a[1]],
  42092. l = this._shapes,
  42093. u = l.indicator;
  42094. if (u) {
  42095. u.attr("invisible", !1);
  42096. var h = this.getControllerVisual(t, "color", {
  42097. convertOpacityToAlpha: !0
  42098. }),
  42099. c = this.getControllerVisual(t, "symbolSize"),
  42100. p = YF(t, o, s, !0),
  42101. d = a[0] - c / 2,
  42102. f = {
  42103. x: u.x,
  42104. y: u.y
  42105. };
  42106. u.y = p, u.x = d;
  42107. var g = Fh(l.indicatorLabelPoint, Bh(u, this.group)),
  42108. y = l.indicatorLabel;
  42109. y.attr("invisible", !1);
  42110. var v = this._applyTransform("left", l.mainGroup),
  42111. m = "horizontal" === this._orient;
  42112. y.setStyle({
  42113. text: (n || "") + r.formatValueText(e),
  42114. verticalAlign: m ? v : "middle",
  42115. align: m ? "center" : v
  42116. });
  42117. var x = {
  42118. x: d,
  42119. y: p,
  42120. style: {
  42121. fill: h
  42122. }
  42123. },
  42124. _ = {
  42125. style: {
  42126. x: g[0],
  42127. y: g[1]
  42128. }
  42129. };
  42130. if (r.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  42131. var b = {
  42132. duration: 100,
  42133. easing: "cubicInOut",
  42134. additive: !0
  42135. };
  42136. u.x = f.x, u.y = f.y, u.animateTo(x, b), y.animateTo(_, b)
  42137. } else u.attr(x), y.attr(_);
  42138. this._firstShowIndicator = !1;
  42139. var w = this._shapes.handleLabels;
  42140. if (w)
  42141. for (var S = 0; S < w.length; S++) this.api.enterBlur(w[S])
  42142. }
  42143. }, e.prototype._enableHoverLinkToSeries = function () {
  42144. var t = this;
  42145. this._shapes.mainGroup.on("mousemove", (function (e) {
  42146. if (t._hovering = !0, !t._dragging) {
  42147. var n = t.visualMapModel.itemSize,
  42148. i = t._applyTransform([e.offsetX, e.offsetY], t._shapes.mainGroup, !0, !0);
  42149. i[1] = UF(ZF(0, i[1]), n[1]), t._doHoverLinkToSeries(i[1], 0 <= i[0] && i[0] <= n[0])
  42150. }
  42151. })).on("mouseout", (function () {
  42152. t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries()
  42153. }))
  42154. }, e.prototype._enableHoverLinkFromSeries = function () {
  42155. var t = this.api.getZr();
  42156. this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
  42157. }, e.prototype._doHoverLinkToSeries = function (t, e) {
  42158. var n = this.visualMapModel,
  42159. i = n.itemSize;
  42160. if (n.option.hoverLink) {
  42161. var r = [0, i[1]],
  42162. o = n.getExtent();
  42163. t = UF(ZF(r[0], t), r[1]);
  42164. var a = function (t, e, n) {
  42165. var i = 6,
  42166. r = t.get("hoverLinkDataSize");
  42167. r && (i = YF(r, e, n, !0) / 2);
  42168. return i
  42169. }(n, o, r),
  42170. s = [t - a, t + a],
  42171. l = YF(t, r, o, !0),
  42172. u = [YF(s[0], r, o, !0), YF(s[1], r, o, !0)];
  42173. s[0] < r[0] && (u[0] = -1 / 0), s[1] > r[1] && (u[1] = 1 / 0), e && (u[0] === -1 / 0 ? this._showIndicator(l, u[1], "< ", a) : u[1] === 1 / 0 ? this._showIndicator(l, u[0], "> ", a) : this._showIndicator(l, l, "≈ ", a));
  42174. var h = this._hoverLinkDataIndices,
  42175. c = [];
  42176. (e || KF(n)) && (c = this._hoverLinkDataIndices = n.findTargetDataIndices(u));
  42177. var p = function (t, e) {
  42178. var n = {},
  42179. i = {};
  42180. return r(t || [], n), r(e || [], i, n), [o(n), o(i)];
  42181. function r(t, e, n) {
  42182. for (var i = 0, r = t.length; i < r; i++) {
  42183. var o = Ro(t[i].seriesId, null);
  42184. if (null == o) return;
  42185. for (var a = To(t[i].dataIndex), s = n && n[o], l = 0, u = a.length; l < u; l++) {
  42186. var h = a[l];
  42187. s && s[h] ? s[h] = null : (e[o] || (e[o] = {}))[h] = 1
  42188. }
  42189. }
  42190. }
  42191. function o(t, e) {
  42192. var n = [];
  42193. for (var i in t)
  42194. if (t.hasOwnProperty(i) && null != t[i])
  42195. if (e) n.push(+i);
  42196. else {
  42197. var r = o(t[i], !0);
  42198. r.length && n.push({
  42199. seriesId: i,
  42200. dataIndex: r
  42201. })
  42202. } return n
  42203. }
  42204. }(h, c);
  42205. this._dispatchHighDown("downplay", HF(p[0], n)), this._dispatchHighDown("highlight", HF(p[1], n))
  42206. }
  42207. }, e.prototype._hoverLinkFromSeriesMouseOver = function (t) {
  42208. var e;
  42209. if (Oy(t.target, (function (t) {
  42210. var n = rl(t);
  42211. if (null != n.dataIndex) return e = n, !0
  42212. }), !0), e) {
  42213. var n = this.ecModel.getSeriesByIndex(e.seriesIndex),
  42214. i = this.visualMapModel;
  42215. if (i.isTargetSeries(n)) {
  42216. var r = n.getData(e.dataType),
  42217. o = r.getStore().get(i.getDataDimensionIndex(r), e.dataIndex);
  42218. isNaN(o) || this._showIndicator(o, o)
  42219. }
  42220. }
  42221. }, e.prototype._hideIndicator = function () {
  42222. var t = this._shapes;
  42223. t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
  42224. var e = this._shapes.handleLabels;
  42225. if (e)
  42226. for (var n = 0; n < e.length; n++) this.api.leaveBlur(e[n])
  42227. }, e.prototype._clearHoverLinkToSeries = function () {
  42228. this._hideIndicator();
  42229. var t = this._hoverLinkDataIndices;
  42230. this._dispatchHighDown("downplay", HF(t, this.visualMapModel)), t.length = 0
  42231. }, e.prototype._clearHoverLinkFromSeries = function () {
  42232. this._hideIndicator();
  42233. var t = this.api.getZr();
  42234. t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator)
  42235. }, e.prototype._applyTransform = function (t, e, n, i) {
  42236. var r = Bh(e, i ? null : this.group);
  42237. return Y(t) ? Fh(t, r, n) : Gh(t, r, n)
  42238. }, e.prototype._dispatchHighDown = function (t, e) {
  42239. e && e.length && this.api.dispatchAction({
  42240. type: t,
  42241. batch: e
  42242. })
  42243. }, e.prototype.dispose = function () {
  42244. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
  42245. }, e.type = "visualMap.continuous", e
  42246. }(FF);
  42247. function qF(t, e, n, i) {
  42248. return new Xu({
  42249. shape: {
  42250. points: t
  42251. },
  42252. draggable: !!n,
  42253. cursor: e,
  42254. drift: n,
  42255. onmousemove: function (t) {
  42256. de(t.event)
  42257. },
  42258. ondragend: i
  42259. })
  42260. }
  42261. function KF(t) {
  42262. var e = t.get("hoverLinkOnHandle");
  42263. return !!(null == e ? t.get("realtime") : e)
  42264. }
  42265. function $F(t) {
  42266. return "vertical" === t ? "ns-resize" : "ew-resize"
  42267. }
  42268. var JF = {
  42269. type: "selectDataRange",
  42270. event: "dataRangeSelected",
  42271. update: "update"
  42272. },
  42273. QF = function (t, e) {
  42274. e.eachComponent({
  42275. mainType: "visualMap",
  42276. query: t
  42277. }, (function (e) {
  42278. e.setSelected(t.selected)
  42279. }))
  42280. },
  42281. tG = [{
  42282. createOnAllSeries: !0,
  42283. reset: function (t, e) {
  42284. var n = [];
  42285. return e.eachComponent("visualMap", (function (e) {
  42286. var i, r, o, a, s, l = t.pipelineContext;
  42287. !e.isTargetSeries(t) || l && l.large || n.push((i = e.stateList, r = e.targetVisuals, o = W(e.getValueState, e), a = e.getDataDimensionIndex(t.getData()), s = {}, E(i, (function (t) {
  42288. var e = DD.prepareVisualTypes(r[t]);
  42289. s[t] = e
  42290. })), {
  42291. progress: function (t, e) {
  42292. var n, i;
  42293. function l(t) {
  42294. return Dy(e, i, t)
  42295. }
  42296. function u(t, n) {
  42297. ky(e, i, t, n)
  42298. }
  42299. null != a && (n = e.getDimensionIndex(a));
  42300. for (var h = e.getStore(); null != (i = t.next());) {
  42301. var c = e.getRawDataItem(i);
  42302. if (!c || !1 !== c.visualMap)
  42303. for (var p = null != a ? h.get(n, i) : i, d = o(p), f = r[d], g = s[d], y = 0, v = g.length; y < v; y++) {
  42304. var m = g[y];
  42305. f[m] && f[m].applyVisual(p, l, u)
  42306. }
  42307. }
  42308. }
  42309. }))
  42310. })), n
  42311. }
  42312. }, {
  42313. createOnAllSeries: !0,
  42314. reset: function (t, e) {
  42315. var n = t.getData(),
  42316. i = [];
  42317. e.eachComponent("visualMap", (function (e) {
  42318. if (e.isTargetSeries(t)) {
  42319. var r = e.getVisualMeta(W(eG, null, t, e)) || {
  42320. stops: [],
  42321. outerColors: []
  42322. },
  42323. o = e.getDataDimensionIndex(n);
  42324. o >= 0 && (r.dimension = o, i.push(r))
  42325. }
  42326. })), t.getData().setVisual("visualMeta", i)
  42327. }
  42328. }];
  42329. function eG(t, e, n, i) {
  42330. for (var r = e.targetVisuals[i], o = DD.prepareVisualTypes(r), a = {
  42331. color: Ay(t.getData(), "color")
  42332. }, s = 0, l = o.length; s < l; s++) {
  42333. var u = o[s],
  42334. h = r["opacity" === u ? "__alphaForOpacity" : u];
  42335. h && h.applyVisual(n, c, p)
  42336. }
  42337. return a.color;
  42338. function c(t) {
  42339. return a[t]
  42340. }
  42341. function p(t, e) {
  42342. a[t] = e
  42343. }
  42344. }
  42345. var nG = E;
  42346. function iG(t) {
  42347. var e = t && t.visualMap;
  42348. Y(e) || (e = e ? [e] : []), nG(e, (function (t) {
  42349. if (t) {
  42350. rG(t, "splitList") && !rG(t, "pieces") && (t.pieces = t.splitList, delete t.splitList);
  42351. var e = t.pieces;
  42352. e && Y(e) && nG(e, (function (t) {
  42353. q(t) && (rG(t, "start") && !rG(t, "min") && (t.min = t.start), rG(t, "end") && !rG(t, "max") && (t.max = t.end))
  42354. }))
  42355. }
  42356. }))
  42357. }
  42358. function rG(t, e) {
  42359. return t && t.hasOwnProperty && t.hasOwnProperty(e)
  42360. }
  42361. var oG = !1;
  42362. function aG(t) {
  42363. oG || (oG = !0, t.registerSubTypeDefaulter("visualMap", (function (t) {
  42364. return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous"
  42365. })), t.registerAction(JF, QF), E(tG, (function (e) {
  42366. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e)
  42367. })), t.registerPreprocessor(iG))
  42368. }
  42369. function sG(t) {
  42370. t.registerComponentModel(VF), t.registerComponentView(jF), aG(t)
  42371. }
  42372. var lG = function (t) {
  42373. function e() {
  42374. var n = null !== t && t.apply(this, arguments) || this;
  42375. return n.type = e.type, n._pieceList = [], n
  42376. }
  42377. return n(e, t), e.prototype.optionUpdated = function (e, n) {
  42378. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
  42379. var i = this._mode = this._determineMode();
  42380. this._pieceList = [], uG[this._mode].call(this, this._pieceList), this._resetSelected(e, n);
  42381. var r = this.option.categories;
  42382. this.resetVisual((function (t, e) {
  42383. "categories" === i ? (t.mappingMethod = "category", t.categories = T(r)) : (t.dataExtent = this.getExtent(), t.mappingMethod = "piecewise", t.pieceList = z(this._pieceList, (function (t) {
  42384. return t = T(t), "inRange" !== e && (t.visual = null), t
  42385. })))
  42386. }))
  42387. }, e.prototype.completeVisualOption = function () {
  42388. var e = this.option,
  42389. n = {},
  42390. i = DD.listVisualTypes(),
  42391. r = this.isCategory();
  42392. function o(t, e, n) {
  42393. return t && t[e] && t[e].hasOwnProperty(n)
  42394. }
  42395. E(e.pieces, (function (t) {
  42396. E(i, (function (e) {
  42397. t.hasOwnProperty(e) && (n[e] = 1)
  42398. }))
  42399. })), E(n, (function (t, n) {
  42400. var i = !1;
  42401. E(this.stateList, (function (t) {
  42402. i = i || o(e, t, n) || o(e.target, t, n)
  42403. }), this), !i && E(this.stateList, (function (t) {
  42404. (e[t] || (e[t] = {}))[n] = DF(n, "inRange" === t ? "active" : "inactive", r)
  42405. }))
  42406. }), this), t.prototype.completeVisualOption.apply(this, arguments)
  42407. }, e.prototype._resetSelected = function (t, e) {
  42408. var n = this.option,
  42409. i = this._pieceList,
  42410. r = (e ? n : t).selected || {};
  42411. if (n.selected = r, E(i, (function (t, e) {
  42412. var n = this.getSelectedMapKey(t);
  42413. r.hasOwnProperty(n) || (r[n] = !0)
  42414. }), this), "single" === n.selectedMode) {
  42415. var o = !1;
  42416. E(i, (function (t, e) {
  42417. var n = this.getSelectedMapKey(t);
  42418. r[n] && (o ? r[n] = !1 : o = !0)
  42419. }), this)
  42420. }
  42421. }, e.prototype.getItemSymbol = function () {
  42422. return this.get("itemSymbol")
  42423. }, e.prototype.getSelectedMapKey = function (t) {
  42424. return "categories" === this._mode ? t.value + "" : t.index + ""
  42425. }, e.prototype.getPieceList = function () {
  42426. return this._pieceList
  42427. }, e.prototype._determineMode = function () {
  42428. var t = this.option;
  42429. return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"
  42430. }, e.prototype.setSelected = function (t) {
  42431. this.option.selected = T(t)
  42432. }, e.prototype.getValueState = function (t) {
  42433. var e = DD.findPieceIndex(t, this._pieceList);
  42434. return null != e && this.option.selected[this.getSelectedMapKey(this._pieceList[e])] ? "inRange" : "outOfRange"
  42435. }, e.prototype.findTargetDataIndices = function (t) {
  42436. var e = [],
  42437. n = this._pieceList;
  42438. return this.eachTargetSeries((function (i) {
  42439. var r = [],
  42440. o = i.getData();
  42441. o.each(this.getDataDimensionIndex(o), (function (e, i) {
  42442. DD.findPieceIndex(e, n) === t && r.push(i)
  42443. }), this), e.push({
  42444. seriesId: i.id,
  42445. dataIndex: r
  42446. })
  42447. }), this), e
  42448. }, e.prototype.getRepresentValue = function (t) {
  42449. var e;
  42450. if (this.isCategory()) e = t.value;
  42451. else if (null != t.value) e = t.value;
  42452. else {
  42453. var n = t.interval || [];
  42454. e = n[0] === -1 / 0 && n[1] === 1 / 0 ? 0 : (n[0] + n[1]) / 2
  42455. }
  42456. return e
  42457. }, e.prototype.getVisualMeta = function (t) {
  42458. if (!this.isCategory()) {
  42459. var e = [],
  42460. n = ["", ""],
  42461. i = this,
  42462. r = this._pieceList.slice();
  42463. if (r.length) {
  42464. var o = r[0].interval[0];
  42465. o !== -1 / 0 && r.unshift({
  42466. interval: [-1 / 0, o]
  42467. }), (o = r[r.length - 1].interval[1]) !== 1 / 0 && r.push({
  42468. interval: [o, 1 / 0]
  42469. })
  42470. } else r.push({
  42471. interval: [-1 / 0, 1 / 0]
  42472. });
  42473. var a = -1 / 0;
  42474. return E(r, (function (t) {
  42475. var e = t.interval;
  42476. e && (e[0] > a && s([a, e[0]], "outOfRange"), s(e.slice()), a = e[1])
  42477. }), this), {
  42478. stops: e,
  42479. outerColors: n
  42480. }
  42481. }
  42482. function s(r, o) {
  42483. var a = i.getRepresentValue({
  42484. interval: r
  42485. });
  42486. o || (o = i.getValueState(a));
  42487. var s = t(a, o);
  42488. r[0] === -1 / 0 ? n[0] = s : r[1] === 1 / 0 ? n[1] = s : e.push({
  42489. value: r[0],
  42490. color: s
  42491. }, {
  42492. value: r[1],
  42493. color: s
  42494. })
  42495. }
  42496. }, e.type = "visualMap.piecewise", e.defaultOption = kc(EF.defaultOption, {
  42497. selected: null,
  42498. minOpen: !1,
  42499. maxOpen: !1,
  42500. align: "auto",
  42501. itemWidth: 20,
  42502. itemHeight: 14,
  42503. itemSymbol: "roundRect",
  42504. pieces: null,
  42505. categories: null,
  42506. splitNumber: 5,
  42507. selectedMode: "multiple",
  42508. itemGap: 10,
  42509. hoverLink: !0
  42510. }), e
  42511. }(EF),
  42512. uG = {
  42513. splitNumber: function (t) {
  42514. var e = this.option,
  42515. n = Math.min(e.precision, 20),
  42516. i = this.getExtent(),
  42517. r = e.splitNumber;
  42518. r = Math.max(parseInt(r, 10), 1), e.splitNumber = r;
  42519. for (var o = (i[1] - i[0]) / r; + o.toFixed(n) !== o && n < 5;) n++;
  42520. e.precision = n, o = +o.toFixed(n), e.minOpen && t.push({
  42521. interval: [-1 / 0, i[0]],
  42522. close: [0, 0]
  42523. });
  42524. for (var a = 0, s = i[0]; a < r; s += o, a++) {
  42525. var l = a === r - 1 ? i[1] : s + o;
  42526. t.push({
  42527. interval: [s, l],
  42528. close: [1, 1]
  42529. })
  42530. }
  42531. e.maxOpen && t.push({
  42532. interval: [i[1], 1 / 0],
  42533. close: [0, 0]
  42534. }), go(t), E(t, (function (t, e) {
  42535. t.index = e, t.text = this.formatValueText(t.interval)
  42536. }), this)
  42537. },
  42538. categories: function (t) {
  42539. var e = this.option;
  42540. E(e.categories, (function (e) {
  42541. t.push({
  42542. text: this.formatValueText(e, !0),
  42543. value: e
  42544. })
  42545. }), this), hG(e, t)
  42546. },
  42547. pieces: function (t) {
  42548. var e = this.option;
  42549. E(e.pieces, (function (e, n) {
  42550. q(e) || (e = {
  42551. value: e
  42552. });
  42553. var i = {
  42554. text: "",
  42555. index: n
  42556. };
  42557. if (null != e.label && (i.text = e.label), e.hasOwnProperty("value")) {
  42558. var r = i.value = e.value;
  42559. i.interval = [r, r], i.close = [1, 1]
  42560. } else {
  42561. for (var o = i.interval = [], a = i.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) {
  42562. for (var c = [
  42563. ["gte", "gt", "min"],
  42564. ["lte", "lt", "max"]
  42565. ][h], p = 0; p < 3 && null == o[h]; p++) o[h] = e[c[p]], a[h] = s[p], u[h] = 2 === p;
  42566. null == o[h] && (o[h] = l[h])
  42567. }
  42568. u[0] && o[1] === 1 / 0 && (a[0] = 0), u[1] && o[0] === -1 / 0 && (a[1] = 0), o[0] === o[1] && a[0] && a[1] && (i.value = o[0])
  42569. }
  42570. i.visual = DD.retrieveVisuals(e), t.push(i)
  42571. }), this), hG(e, t), go(t), E(t, (function (t) {
  42572. var e = t.close,
  42573. n = [
  42574. ["<", "≤"][e[1]],
  42575. [">", "≥"][e[0]]
  42576. ];
  42577. t.text = t.text || this.formatValueText(null != t.value ? t.value : t.interval, !1, n)
  42578. }), this)
  42579. }
  42580. };
  42581. function hG(t, e) {
  42582. var n = t.inverse;
  42583. ("vertical" === t.orient ? !n : n) && e.reverse()
  42584. }
  42585. var cG = function (t) {
  42586. function e() {
  42587. var n = null !== t && t.apply(this, arguments) || this;
  42588. return n.type = e.type, n
  42589. }
  42590. return n(e, t), e.prototype.doRender = function () {
  42591. var t = this.group;
  42592. t.removeAll();
  42593. var e = this.visualMapModel,
  42594. n = e.get("textGap"),
  42595. i = e.textStyleModel,
  42596. r = i.getFont(),
  42597. o = i.getTextColor(),
  42598. a = this._getItemAlign(),
  42599. s = e.itemSize,
  42600. l = this._getViewData(),
  42601. u = l.endsText,
  42602. h = it(e.get("showLabel", !0), !u);
  42603. u && this._renderEndsText(t, u[0], s, h, a), E(l.viewPieceList, (function (i) {
  42604. var l = i.piece,
  42605. u = new Br;
  42606. u.onclick = W(this._onItemClick, this, l), this._enableHoverLink(u, i.indexInModelPieceList);
  42607. var c = e.getRepresentValue(l);
  42608. if (this._createItemSymbol(u, c, [0, 0, s[0], s[1]]), h) {
  42609. var p = this.visualMapModel.getValueState(c);
  42610. u.add(new Xs({
  42611. style: {
  42612. x: "right" === a ? -n : s[0] + n,
  42613. y: s[1] / 2,
  42614. text: l.text,
  42615. verticalAlign: "middle",
  42616. align: a,
  42617. font: r,
  42618. fill: o,
  42619. opacity: "outOfRange" === p ? .5 : 1
  42620. }
  42621. }))
  42622. }
  42623. t.add(u)
  42624. }), this), u && this._renderEndsText(t, u[1], s, h, a), Ap(e.get("orient"), t, e.get("itemGap")), this.renderBackground(t), this.positionGroup(t)
  42625. }, e.prototype._enableHoverLink = function (t, e) {
  42626. var n = this;
  42627. t.on("mouseover", (function () {
  42628. return i("highlight")
  42629. })).on("mouseout", (function () {
  42630. return i("downplay")
  42631. }));
  42632. var i = function (t) {
  42633. var i = n.visualMapModel;
  42634. i.option.hoverLink && n.api.dispatchAction({
  42635. type: t,
  42636. batch: HF(i.findTargetDataIndices(e), i)
  42637. })
  42638. }
  42639. }, e.prototype._getItemAlign = function () {
  42640. var t = this.visualMapModel,
  42641. e = t.option;
  42642. if ("vertical" === e.orient) return WF(t, this.api, t.itemSize);
  42643. var n = e.align;
  42644. return n && "auto" !== n || (n = "left"), n
  42645. }, e.prototype._renderEndsText = function (t, e, n, i, r) {
  42646. if (e) {
  42647. var o = new Br,
  42648. a = this.visualMapModel.textStyleModel;
  42649. o.add(new Xs({
  42650. style: oc(a, {
  42651. x: i ? "right" === r ? n[0] : 0 : n[0] / 2,
  42652. y: n[1] / 2,
  42653. verticalAlign: "middle",
  42654. align: i ? r : "center",
  42655. text: e
  42656. })
  42657. })), t.add(o)
  42658. }
  42659. }, e.prototype._getViewData = function () {
  42660. var t = this.visualMapModel,
  42661. e = z(t.getPieceList(), (function (t, e) {
  42662. return {
  42663. piece: t,
  42664. indexInModelPieceList: e
  42665. }
  42666. })),
  42667. n = t.get("text"),
  42668. i = t.get("orient"),
  42669. r = t.get("inverse");
  42670. return ("horizontal" === i ? r : !r) ? e.reverse() : n && (n = n.slice().reverse()), {
  42671. viewPieceList: e,
  42672. endsText: n
  42673. }
  42674. }, e.prototype._createItemSymbol = function (t, e, n) {
  42675. t.add(Xy(this.getControllerVisual(e, "symbol"), n[0], n[1], n[2], n[3], this.getControllerVisual(e, "color")))
  42676. }, e.prototype._onItemClick = function (t) {
  42677. var e = this.visualMapModel,
  42678. n = e.option,
  42679. i = n.selectedMode;
  42680. if (i) {
  42681. var r = T(n.selected),
  42682. o = e.getSelectedMapKey(t);
  42683. "single" === i || !0 === i ? (r[o] = !0, E(r, (function (t, e) {
  42684. r[e] = e === o
  42685. }))) : r[o] = !r[o], this.api.dispatchAction({
  42686. type: "selectDataRange",
  42687. from: this.uid,
  42688. visualMapId: this.visualMapModel.id,
  42689. selected: r
  42690. })
  42691. }
  42692. }, e.type = "visualMap.piecewise", e
  42693. }(FF);
  42694. function pG(t) {
  42695. t.registerComponentModel(lG), t.registerComponentView(cG), aG(t)
  42696. }
  42697. var dG = {
  42698. label: {
  42699. enabled: !0
  42700. },
  42701. decal: {
  42702. show: !1
  42703. }
  42704. },
  42705. fG = Vo(),
  42706. gG = {};
  42707. function yG(t, e) {
  42708. var n = t.getModel("aria");
  42709. if (n.get("enabled")) {
  42710. var i = T(dG);
  42711. C(i.label, t.getLocaleModel().get("aria"), !1), C(n.option, i, !1),
  42712. function () {
  42713. if (n.getModel("decal").get("show")) {
  42714. var e = yt();
  42715. t.eachSeries((function (t) {
  42716. if (!t.isColorBySeries()) {
  42717. var n = e.get(t.type);
  42718. n || (n = {}, e.set(t.type, n)), fG(t).scope = n
  42719. }
  42720. })), t.eachRawSeries((function (e) {
  42721. if (!t.isSeriesFiltered(e))
  42722. if (X(e.enableAriaDecal)) e.enableAriaDecal();
  42723. else {
  42724. var n = e.getData();
  42725. if (e.isColorBySeries()) {
  42726. var i = pd(e.ecModel, e.name, gG, t.getSeriesCount()),
  42727. r = n.getVisual("decal");
  42728. n.setVisual("decal", u(r, i))
  42729. } else {
  42730. var o = e.getRawData(),
  42731. a = {},
  42732. s = fG(e).scope;
  42733. n.each((function (t) {
  42734. var e = n.getRawIndex(t);
  42735. a[e] = t
  42736. }));
  42737. var l = o.count();
  42738. o.each((function (t) {
  42739. var i = a[t],
  42740. r = o.getName(t) || t + "",
  42741. h = pd(e.ecModel, r, s, l),
  42742. c = n.getItemVisual(i, "decal");
  42743. n.setItemVisual(i, "decal", u(c, h))
  42744. }))
  42745. }
  42746. }
  42747. function u(t, e) {
  42748. var n = t ? A(A({}, e), t) : e;
  42749. return n.dirty = !0, n
  42750. }
  42751. }))
  42752. }
  42753. }(),
  42754. function () {
  42755. var i = t.getLocaleModel().get("aria"),
  42756. o = n.getModel("label");
  42757. if (o.option = k(o.option, i), !o.get("enabled")) return;
  42758. var a = e.getZr().dom;
  42759. if (o.get("description")) return void a.setAttribute("aria-label", o.get("description"));
  42760. var s, l = t.getSeriesCount(),
  42761. u = o.get(["data", "maxCount"]) || 10,
  42762. h = o.get(["series", "maxCount"]) || 10,
  42763. c = Math.min(l, h);
  42764. if (l < 1) return;
  42765. var p = function () {
  42766. var e = t.get("title");
  42767. e && e.length && (e = e[0]);
  42768. return e && e.text
  42769. }();
  42770. s = p ? r(o.get(["general", "withTitle"]), {
  42771. title: p
  42772. }) : o.get(["general", "withoutTitle"]);
  42773. var d = [];
  42774. s += r(l > 1 ? o.get(["series", "multiple", "prefix"]) : o.get(["series", "single", "prefix"]), {
  42775. seriesCount: l
  42776. }), t.eachSeries((function (e, n) {
  42777. if (n < c) {
  42778. var i = void 0,
  42779. a = e.get("name") ? "withName" : "withoutName";
  42780. i = r(i = l > 1 ? o.get(["series", "multiple", a]) : o.get(["series", "single", a]), {
  42781. seriesId: e.seriesIndex,
  42782. seriesName: e.get("name"),
  42783. seriesType: (x = e.subType, _ = t.getLocaleModel().get(["series", "typeNames"]), _[x] || _.chart)
  42784. });
  42785. var s = e.getData();
  42786. if (s.count() > u) i += r(o.get(["data", "partialData"]), {
  42787. displayCnt: u
  42788. });
  42789. else i += o.get(["data", "allData"]);
  42790. for (var h = o.get(["data", "separator", "middle"]), p = o.get(["data", "separator", "end"]), f = [], g = 0; g < s.count(); g++)
  42791. if (g < u) {
  42792. var y = s.getName(g),
  42793. v = s.getValues(g),
  42794. m = o.get(["data", y ? "withName" : "withoutName"]);
  42795. f.push(r(m, {
  42796. name: y,
  42797. value: v.join(h)
  42798. }))
  42799. } i += f.join(h) + p, d.push(i)
  42800. }
  42801. var x, _
  42802. }));
  42803. var f = o.getModel(["series", "multiple", "separator"]),
  42804. g = f.get("middle"),
  42805. y = f.get("end");
  42806. s += d.join(g) + y, a.setAttribute("aria-label", s)
  42807. }()
  42808. }
  42809. function r(t, e) {
  42810. if (!U(t)) return t;
  42811. var n = t;
  42812. return E(e, (function (t, e) {
  42813. n = n.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t)
  42814. })), n
  42815. }
  42816. }
  42817. function vG(t) {
  42818. if (t && t.aria) {
  42819. var e = t.aria;
  42820. null != e.show && (e.enabled = e.show), e.label = e.label || {}, E(["description", "general", "series", "data"], (function (t) {
  42821. null != e[t] && (e.label[t] = e[t])
  42822. }))
  42823. }
  42824. }
  42825. var mG = {
  42826. value: "eq",
  42827. "<": "lt",
  42828. "<=": "lte",
  42829. ">": "gt",
  42830. ">=": "gte",
  42831. "=": "eq",
  42832. "!=": "ne",
  42833. "<>": "ne"
  42834. },
  42835. xG = function () {
  42836. function t(t) {
  42837. if (null == (this._condVal = U(t) ? new RegExp(t) : et(t) ? t : null)) {
  42838. var e = "";
  42839. 0, wo(e)
  42840. }
  42841. }
  42842. return t.prototype.evaluate = function (t) {
  42843. var e = typeof t;
  42844. return U(e) ? this._condVal.test(t) : !!j(e) && this._condVal.test(t + "")
  42845. }, t
  42846. }(),
  42847. _G = function () {
  42848. function t() {}
  42849. return t.prototype.evaluate = function () {
  42850. return this.value
  42851. }, t
  42852. }(),
  42853. bG = function () {
  42854. function t() {}
  42855. return t.prototype.evaluate = function () {
  42856. for (var t = this.children, e = 0; e < t.length; e++)
  42857. if (!t[e].evaluate()) return !1;
  42858. return !0
  42859. }, t
  42860. }(),
  42861. wG = function () {
  42862. function t() {}
  42863. return t.prototype.evaluate = function () {
  42864. for (var t = this.children, e = 0; e < t.length; e++)
  42865. if (t[e].evaluate()) return !0;
  42866. return !1
  42867. }, t
  42868. }(),
  42869. SG = function () {
  42870. function t() {}
  42871. return t.prototype.evaluate = function () {
  42872. return !this.child.evaluate()
  42873. }, t
  42874. }(),
  42875. MG = function () {
  42876. function t() {}
  42877. return t.prototype.evaluate = function () {
  42878. for (var t = !!this.valueParser, e = (0, this.getValue)(this.valueGetterParam), n = t ? this.valueParser(e) : null, i = 0; i < this.subCondList.length; i++)
  42879. if (!this.subCondList[i].evaluate(t ? n : e)) return !1;
  42880. return !0
  42881. }, t
  42882. }();
  42883. function IG(t, e) {
  42884. if (!0 === t || !1 === t) {
  42885. var n = new _G;
  42886. return n.value = t, n
  42887. }
  42888. var i = "";
  42889. return CG(t) || wo(i), t.and ? TG("and", t, e) : t.or ? TG("or", t, e) : t.not ? function (t, e) {
  42890. var n = t.not,
  42891. i = "";
  42892. 0;
  42893. CG(n) || wo(i);
  42894. var r = new SG;
  42895. r.child = IG(n, e), r.child || wo(i);
  42896. return r
  42897. }(t, e) : function (t, e) {
  42898. for (var n = "", i = e.prepareGetValue(t), r = [], o = G(t), a = t.parser, s = a ? Cf(a) : null, l = 0; l < o.length; l++) {
  42899. var u = o[l];
  42900. if ("parser" !== u && !e.valueGetterAttrMap.get(u)) {
  42901. var h = _t(mG, u) ? mG[u] : u,
  42902. c = t[u],
  42903. p = s ? s(c) : c,
  42904. d = Pf(h, p) || "reg" === h && new xG(p);
  42905. d || wo(n), r.push(d)
  42906. }
  42907. }
  42908. r.length || wo(n);
  42909. var f = new MG;
  42910. return f.valueGetterParam = i, f.valueParser = s, f.getValue = e.getValue, f.subCondList = r, f
  42911. }(t, e)
  42912. }
  42913. function TG(t, e, n) {
  42914. var i = e[t],
  42915. r = "";
  42916. Y(i) || wo(r), i.length || wo(r);
  42917. var o = "and" === t ? new bG : new wG;
  42918. return o.children = z(i, (function (t) {
  42919. return IG(t, n)
  42920. })), o.children.length || wo(r), o
  42921. }
  42922. function CG(t) {
  42923. return q(t) && !N(t)
  42924. }
  42925. var DG = function () {
  42926. function t(t, e) {
  42927. this._cond = IG(t, e)
  42928. }
  42929. return t.prototype.evaluate = function () {
  42930. return this._cond.evaluate()
  42931. }, t
  42932. }();
  42933. var AG = {
  42934. type: "echarts:filter",
  42935. transform: function (t) {
  42936. for (var e, n, i, r = t.upstream, o = (n = t.config, i = {
  42937. valueGetterAttrMap: yt({
  42938. dimension: !0
  42939. }),
  42940. prepareGetValue: function (t) {
  42941. var e = "",
  42942. n = t.dimension;
  42943. _t(t, "dimension") || wo(e);
  42944. var i = r.getDimensionInfo(n);
  42945. return i || wo(e), {
  42946. dimIdx: i.index
  42947. }
  42948. },
  42949. getValue: function (t) {
  42950. return r.retrieveValueFromItem(e, t.dimIdx)
  42951. }
  42952. }, new DG(n, i)), a = [], s = 0, l = r.count(); s < l; s++) e = r.getRawDataItem(s), o.evaluate() && a.push(e);
  42953. return {
  42954. data: a
  42955. }
  42956. }
  42957. };
  42958. var kG = {
  42959. type: "echarts:sort",
  42960. transform: function (t) {
  42961. var e = t.upstream,
  42962. n = t.config,
  42963. i = "",
  42964. r = To(n);
  42965. r.length || wo(i);
  42966. var o = [];
  42967. E(r, (function (t) {
  42968. var n = t.dimension,
  42969. r = t.order,
  42970. a = t.parser,
  42971. s = t.incomparable;
  42972. if (null == n && wo(i), "asc" !== r && "desc" !== r && wo(i), s && "min" !== s && "max" !== s) {
  42973. var l = "";
  42974. 0, wo(l)
  42975. }
  42976. if ("asc" !== r && "desc" !== r) {
  42977. var u = "";
  42978. 0, wo(u)
  42979. }
  42980. var h = e.getDimensionInfo(n);
  42981. h || wo(i);
  42982. var c = a ? Cf(a) : null;
  42983. a && !c && wo(i), o.push({
  42984. dimIdx: h.index,
  42985. parser: c,
  42986. comparator: new kf(r, s)
  42987. })
  42988. }));
  42989. var a = e.sourceFormat;
  42990. a !== Hp && a !== Yp && wo(i);
  42991. for (var s = [], l = 0, u = e.count(); l < u; l++) s.push(e.getRawDataItem(l));
  42992. return s.sort((function (t, n) {
  42993. for (var i = 0; i < o.length; i++) {
  42994. var r = o[i],
  42995. a = e.retrieveValueFromItem(t, r.dimIdx),
  42996. s = e.retrieveValueFromItem(n, r.dimIdx);
  42997. r.parser && (a = r.parser(a), s = r.parser(s));
  42998. var l = r.comparator.evaluate(a, s);
  42999. if (0 !== l) return l
  43000. }
  43001. return 0
  43002. })), {
  43003. data: s
  43004. }
  43005. }
  43006. };
  43007. var LG = function (t) {
  43008. function e() {
  43009. var e = null !== t && t.apply(this, arguments) || this;
  43010. return e.type = "dataset", e
  43011. }
  43012. return n(e, t), e.prototype.init = function (e, n, i) {
  43013. t.prototype.init.call(this, e, n, i), this._sourceManager = new $f(this), Jf(this)
  43014. }, e.prototype.mergeOption = function (e, n) {
  43015. t.prototype.mergeOption.call(this, e, n), Jf(this)
  43016. }, e.prototype.optionUpdated = function () {
  43017. this._sourceManager.dirty()
  43018. }, e.prototype.getSourceManager = function () {
  43019. return this._sourceManager
  43020. }, e.type = "dataset", e.defaultOption = {
  43021. seriesLayoutBy: jp
  43022. }, e
  43023. }(zp),
  43024. PG = function (t) {
  43025. function e() {
  43026. var e = null !== t && t.apply(this, arguments) || this;
  43027. return e.type = "dataset", e
  43028. }
  43029. return n(e, t), e.type = "dataset", e
  43030. }(Ag);
  43031. var OG = hs.CMD;
  43032. function RG(t, e) {
  43033. return Math.abs(t - e) < 1e-5
  43034. }
  43035. function NG(t) {
  43036. var e, n, i, r, o, a = t.data,
  43037. s = t.len(),
  43038. l = [],
  43039. u = 0,
  43040. h = 0,
  43041. c = 0,
  43042. p = 0;
  43043. function d(t, n) {
  43044. e && e.length > 2 && l.push(e), e = [t, n]
  43045. }
  43046. function f(t, n, i, r) {
  43047. RG(t, i) && RG(n, r) || e.push(t, n, i, r, i, r)
  43048. }
  43049. function g(t, n, i, r, o, a) {
  43050. var s = Math.abs(n - t),
  43051. l = 4 * Math.tan(s / 4) / 3,
  43052. u = n < t ? -1 : 1,
  43053. h = Math.cos(t),
  43054. c = Math.sin(t),
  43055. p = Math.cos(n),
  43056. d = Math.sin(n),
  43057. f = h * o + i,
  43058. g = c * a + r,
  43059. y = p * o + i,
  43060. v = d * a + r,
  43061. m = o * l * u,
  43062. x = a * l * u;
  43063. e.push(f - m * c, g + x * h, y + m * d, v - x * p, y, v)
  43064. }
  43065. for (var y = 0; y < s;) {
  43066. var v = a[y++],
  43067. m = 1 === y;
  43068. switch (m && (c = u = a[y], p = h = a[y + 1], v !== OG.L && v !== OG.C && v !== OG.Q || (e = [c, p])), v) {
  43069. case OG.M:
  43070. u = c = a[y++], h = p = a[y++], d(c, p);
  43071. break;
  43072. case OG.L:
  43073. f(u, h, n = a[y++], i = a[y++]), u = n, h = i;
  43074. break;
  43075. case OG.C:
  43076. e.push(a[y++], a[y++], a[y++], a[y++], u = a[y++], h = a[y++]);
  43077. break;
  43078. case OG.Q:
  43079. n = a[y++], i = a[y++], r = a[y++], o = a[y++], e.push(u + 2 / 3 * (n - u), h + 2 / 3 * (i - h), r + 2 / 3 * (n - r), o + 2 / 3 * (i - o), r, o), u = r, h = o;
  43080. break;
  43081. case OG.A:
  43082. var x = a[y++],
  43083. _ = a[y++],
  43084. b = a[y++],
  43085. w = a[y++],
  43086. S = a[y++],
  43087. M = a[y++] + S;
  43088. y += 1;
  43089. var I = !a[y++];
  43090. n = Math.cos(S) * b + x, i = Math.sin(S) * w + _, m ? d(c = n, p = i) : f(u, h, n, i), u = Math.cos(M) * b + x, h = Math.sin(M) * w + _;
  43091. for (var T = (I ? -1 : 1) * Math.PI / 2, C = S; I ? C > M : C < M; C += T) {
  43092. g(C, I ? Math.max(C + T, M) : Math.min(C + T, M), x, _, b, w)
  43093. }
  43094. break;
  43095. case OG.R:
  43096. c = u = a[y++], p = h = a[y++], n = c + a[y++], i = p + a[y++], d(n, p), f(n, p, n, i), f(n, i, c, i), f(c, i, c, p), f(c, p, n, p);
  43097. break;
  43098. case OG.Z:
  43099. e && f(u, h, c, p), u = c, h = p
  43100. }
  43101. }
  43102. return e && e.length > 2 && l.push(e), l
  43103. }
  43104. function EG(t, e, n, i, r, o, a, s, l, u) {
  43105. if (RG(t, n) && RG(e, i) && RG(r, a) && RG(o, s)) l.push(a, s);
  43106. else {
  43107. var h = 2 / u,
  43108. c = h * h,
  43109. p = a - t,
  43110. d = s - e,
  43111. f = Math.sqrt(p * p + d * d);
  43112. p /= f, d /= f;
  43113. var g = n - t,
  43114. y = i - e,
  43115. v = r - a,
  43116. m = o - s,
  43117. x = g * g + y * y,
  43118. _ = v * v + m * m;
  43119. if (x < c && _ < c) l.push(a, s);
  43120. else {
  43121. var b = p * g + d * y,
  43122. w = -p * v - d * m;
  43123. if (x - b * b < c && b >= 0 && _ - w * w < c && w >= 0) l.push(a, s);
  43124. else {
  43125. var S = [],
  43126. M = [];
  43127. wn(t, n, r, a, .5, S), wn(e, i, o, s, .5, M), EG(S[0], M[0], S[1], M[1], S[2], M[2], S[3], M[3], l, u), EG(S[4], M[4], S[5], M[5], S[6], M[6], S[7], M[7], l, u)
  43128. }
  43129. }
  43130. }
  43131. }
  43132. function zG(t, e, n) {
  43133. var i = t[e],
  43134. r = t[1 - e],
  43135. o = Math.abs(i / r),
  43136. a = Math.ceil(Math.sqrt(o * n)),
  43137. s = Math.floor(n / a);
  43138. 0 === s && (s = 1, a = n);
  43139. for (var l = [], u = 0; u < a; u++) l.push(s);
  43140. var h = n - a * s;
  43141. if (h > 0)
  43142. for (u = 0; u < h; u++) l[u % a] += 1;
  43143. return l
  43144. }
  43145. function VG(t, e, n) {
  43146. for (var i = t.r0, r = t.r, o = t.startAngle, a = t.endAngle, s = Math.abs(a - o), l = s * r, u = r - i, h = l > Math.abs(u), c = zG([l, u], h ? 0 : 1, e), p = (h ? s : u) / c.length, d = 0; d < c.length; d++)
  43147. for (var f = (h ? u : s) / c[d], g = 0; g < c[d]; g++) {
  43148. var y = {};
  43149. h ? (y.startAngle = o + p * d, y.endAngle = o + p * (d + 1), y.r0 = i + f * g, y.r = i + f * (g + 1)) : (y.startAngle = o + f * g, y.endAngle = o + f * (g + 1), y.r0 = i + p * d, y.r = i + p * (d + 1)), y.clockwise = t.clockwise, y.cx = t.cx, y.cy = t.cy, n.push(y)
  43150. }
  43151. }
  43152. function BG(t, e, n, i) {
  43153. return t * i - n * e
  43154. }
  43155. function FG(t, e, n, i, r, o, a, s) {
  43156. var l = n - t,
  43157. u = i - e,
  43158. h = a - r,
  43159. c = s - o,
  43160. p = BG(h, c, l, u);
  43161. if (Math.abs(p) < 1e-6) return null;
  43162. var d = BG(t - r, e - o, h, c) / p;
  43163. return d < 0 || d > 1 ? null : new De(d * l + t, d * u + e)
  43164. }
  43165. function GG(t, e, n) {
  43166. var i = new De;
  43167. De.sub(i, n, e), i.normalize();
  43168. var r = new De;
  43169. return De.sub(r, t, e), r.dot(i)
  43170. }
  43171. function WG(t, e) {
  43172. var n = t[t.length - 1];
  43173. n && n[0] === e[0] && n[1] === e[1] || t.push(e)
  43174. }
  43175. function HG(t) {
  43176. var e = t.points,
  43177. n = [],
  43178. i = [];
  43179. Ba(e, n, i);
  43180. var r = new ze(n[0], n[1], i[0] - n[0], i[1] - n[1]),
  43181. o = r.width,
  43182. a = r.height,
  43183. s = r.x,
  43184. l = r.y,
  43185. u = new De,
  43186. h = new De;
  43187. return o > a ? (u.x = h.x = s + o / 2, u.y = l, h.y = l + a) : (u.y = h.y = l + a / 2, u.x = s, h.x = s + o),
  43188. function (t, e, n) {
  43189. for (var i = t.length, r = [], o = 0; o < i; o++) {
  43190. var a = t[o],
  43191. s = t[(o + 1) % i],
  43192. l = FG(a[0], a[1], s[0], s[1], e.x, e.y, n.x, n.y);
  43193. l && r.push({
  43194. projPt: GG(l, e, n),
  43195. pt: l,
  43196. idx: o
  43197. })
  43198. }
  43199. if (r.length < 2) return [{
  43200. points: t
  43201. }, {
  43202. points: t
  43203. }];
  43204. r.sort((function (t, e) {
  43205. return t.projPt - e.projPt
  43206. }));
  43207. var u = r[0],
  43208. h = r[r.length - 1];
  43209. if (h.idx < u.idx) {
  43210. var c = u;
  43211. u = h, h = c
  43212. }
  43213. var p = [u.pt.x, u.pt.y],
  43214. d = [h.pt.x, h.pt.y],
  43215. f = [p],
  43216. g = [d];
  43217. for (o = u.idx + 1; o <= h.idx; o++) WG(f, t[o].slice());
  43218. for (WG(f, d), WG(f, p), o = h.idx + 1; o <= u.idx + i; o++) WG(g, t[o % i].slice());
  43219. return WG(g, p), WG(g, d), [{
  43220. points: f
  43221. }, {
  43222. points: g
  43223. }]
  43224. }(e, u, h)
  43225. }
  43226. function YG(t, e, n, i) {
  43227. if (1 === n) i.push(e);
  43228. else {
  43229. var r = Math.floor(n / 2),
  43230. o = t(e);
  43231. YG(t, o[0], r, i), YG(t, o[1], n - r, i)
  43232. }
  43233. return i
  43234. }
  43235. function XG(t, e) {
  43236. e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel
  43237. }
  43238. function UG(t, e) {
  43239. var n, i = [],
  43240. r = t.shape;
  43241. switch (t.type) {
  43242. case "rect":
  43243. ! function (t, e, n) {
  43244. for (var i = t.width, r = t.height, o = i > r, a = zG([i, r], o ? 0 : 1, e), s = o ? "width" : "height", l = o ? "height" : "width", u = o ? "x" : "y", h = o ? "y" : "x", c = t[s] / a.length, p = 0; p < a.length; p++)
  43245. for (var d = t[l] / a[p], f = 0; f < a[p]; f++) {
  43246. var g = {};
  43247. g[u] = p * c, g[h] = f * d, g[s] = c, g[l] = d, g.x += t.x, g.y += t.y, n.push(g)
  43248. }
  43249. }(r, e, i), n = Ws;
  43250. break;
  43251. case "sector":
  43252. VG(r, e, i), n = Fu;
  43253. break;
  43254. case "circle":
  43255. VG({
  43256. r0: 0,
  43257. r: r.r,
  43258. startAngle: 0,
  43259. endAngle: 2 * Math.PI,
  43260. cx: r.cx,
  43261. cy: r.cy
  43262. }, e, i), n = Fu;
  43263. break;
  43264. default:
  43265. var o = t.getComputedTransform(),
  43266. a = o ? Math.sqrt(Math.max(o[0] * o[0] + o[1] * o[1], o[2] * o[2] + o[3] * o[3])) : 1,
  43267. s = z(function (t, e) {
  43268. var n = NG(t),
  43269. i = [];
  43270. e = e || 1;
  43271. for (var r = 0; r < n.length; r++) {
  43272. var o = n[r],
  43273. a = [],
  43274. s = o[0],
  43275. l = o[1];
  43276. a.push(s, l);
  43277. for (var u = 2; u < o.length;) {
  43278. var h = o[u++],
  43279. c = o[u++],
  43280. p = o[u++],
  43281. d = o[u++],
  43282. f = o[u++],
  43283. g = o[u++];
  43284. EG(s, l, h, c, p, d, f, g, a, e), s = f, l = g
  43285. }
  43286. i.push(a)
  43287. }
  43288. return i
  43289. }(t.getUpdatedPathProxy(), a), (function (t) {
  43290. return function (t) {
  43291. for (var e = [], n = 0; n < t.length;) e.push([t[n++], t[n++]]);
  43292. return e
  43293. }(t)
  43294. })),
  43295. l = s.length;
  43296. if (0 === l) YG(HG, {
  43297. points: s[0]
  43298. }, e, i);
  43299. else if (l === e)
  43300. for (var u = 0; u < l; u++) i.push({
  43301. points: s[u]
  43302. });
  43303. else {
  43304. var h = 0,
  43305. c = z(s, (function (t) {
  43306. var e = [],
  43307. n = [];
  43308. Ba(t, e, n);
  43309. var i = (n[1] - e[1]) * (n[0] - e[0]);
  43310. return h += i, {
  43311. poly: t,
  43312. area: i
  43313. }
  43314. }));
  43315. c.sort((function (t, e) {
  43316. return e.area - t.area
  43317. }));
  43318. var p = e;
  43319. for (u = 0; u < l; u++) {
  43320. var d = c[u];
  43321. if (p <= 0) break;
  43322. var f = u === l - 1 ? p : Math.ceil(d.area / h * e);
  43323. f < 0 || (YG(HG, {
  43324. points: d.poly
  43325. }, f, i), p -= f)
  43326. }
  43327. }
  43328. n = Xu
  43329. }
  43330. if (!n) return function (t, e) {
  43331. for (var n = [], i = 0; i < e; i++) n.push(bu(t));
  43332. return n
  43333. }(t, e);
  43334. var g = [];
  43335. for (u = 0; u < i.length; u++) {
  43336. var y = new n;
  43337. y.setShape(i[u]), XG(t, y), g.push(y)
  43338. }
  43339. return g
  43340. }
  43341. function ZG(t, e) {
  43342. var n = t.length,
  43343. i = e.length;
  43344. if (n === i) return [t, e];
  43345. for (var r = [], o = [], a = n < i ? t : e, s = Math.min(n, i), l = Math.abs(i - n) / 6, u = (s - 2) / 6, h = Math.ceil(l / u) + 1, c = [a[0], a[1]], p = l, d = 2; d < s;) {
  43346. var f = a[d - 2],
  43347. g = a[d - 1],
  43348. y = a[d++],
  43349. v = a[d++],
  43350. m = a[d++],
  43351. x = a[d++],
  43352. _ = a[d++],
  43353. b = a[d++];
  43354. if (p <= 0) c.push(y, v, m, x, _, b);
  43355. else {
  43356. for (var w = Math.min(p, h - 1) + 1, S = 1; S <= w; S++) {
  43357. var M = S / w;
  43358. wn(f, y, m, _, M, r), wn(g, v, x, b, M, o), f = r[3], g = o[3], c.push(r[1], o[1], r[2], o[2], f, g), y = r[5], v = o[5], m = r[6], x = o[6]
  43359. }
  43360. p -= w - 1
  43361. }
  43362. }
  43363. return a === t ? [c, e] : [t, c]
  43364. }
  43365. function jG(t, e) {
  43366. for (var n = t.length, i = t[n - 2], r = t[n - 1], o = [], a = 0; a < e.length;) o[a++] = i, o[a++] = r;
  43367. return o
  43368. }
  43369. function qG(t) {
  43370. for (var e = 0, n = 0, i = 0, r = t.length, o = 0, a = r - 2; o < r; a = o, o += 2) {
  43371. var s = t[a],
  43372. l = t[a + 1],
  43373. u = t[o],
  43374. h = t[o + 1],
  43375. c = s * h - u * l;
  43376. e += c, n += (s + u) * c, i += (l + h) * c
  43377. }
  43378. return 0 === e ? [t[0] || 0, t[1] || 0] : [n / e / 3, i / e / 3, e]
  43379. }
  43380. function KG(t, e, n, i) {
  43381. for (var r = (t.length - 2) / 6, o = 1 / 0, a = 0, s = t.length, l = s - 2, u = 0; u < r; u++) {
  43382. for (var h = 6 * u, c = 0, p = 0; p < s; p += 2) {
  43383. var d = 0 === p ? h : (h + p - 2) % l + 2,
  43384. f = t[d] - n[0],
  43385. g = t[d + 1] - n[1],
  43386. y = e[p] - i[0] - f,
  43387. v = e[p + 1] - i[1] - g;
  43388. c += y * y + v * v
  43389. }
  43390. c < o && (o = c, a = u)
  43391. }
  43392. return a
  43393. }
  43394. function $G(t) {
  43395. for (var e = [], n = t.length, i = 0; i < n; i += 2) e[i] = t[n - i - 2], e[i + 1] = t[n - i - 1];
  43396. return e
  43397. }
  43398. function JG(t) {
  43399. return t.__isCombineMorphing
  43400. }
  43401. var QG = "__mOriginal_";
  43402. function tW(t, e, n) {
  43403. var i = QG + e,
  43404. r = t[i] || t[e];
  43405. t[i] || (t[i] = t[e]);
  43406. var o = n.replace,
  43407. a = n.after,
  43408. s = n.before;
  43409. t[e] = function () {
  43410. var t, e = arguments;
  43411. return s && s.apply(this, e), t = o ? o.apply(this, e) : r.apply(this, e), a && a.apply(this, e), t
  43412. }
  43413. }
  43414. function eW(t, e) {
  43415. var n = QG + e;
  43416. t[n] && (t[e] = t[n], t[n] = null)
  43417. }
  43418. function nW(t, e) {
  43419. for (var n = 0; n < t.length; n++)
  43420. for (var i = t[n], r = 0; r < i.length;) {
  43421. var o = i[r],
  43422. a = i[r + 1];
  43423. i[r++] = e[0] * o + e[2] * a + e[4], i[r++] = e[1] * o + e[3] * a + e[5]
  43424. }
  43425. }
  43426. function iW(t, e) {
  43427. var n = t.getUpdatedPathProxy(),
  43428. i = e.getUpdatedPathProxy(),
  43429. r = function (t, e) {
  43430. for (var n, i, r, o = [], a = [], s = 0; s < Math.max(t.length, e.length); s++) {
  43431. var l = t[s],
  43432. u = e[s],
  43433. h = void 0,
  43434. c = void 0;
  43435. l ? u ? (i = h = (n = ZG(l, u))[0], r = c = n[1]) : (c = jG(r || l, l), h = l) : (h = jG(i || u, u), c = u), o.push(h), a.push(c)
  43436. }
  43437. return [o, a]
  43438. }(NG(n), NG(i)),
  43439. o = r[0],
  43440. a = r[1],
  43441. s = t.getComputedTransform(),
  43442. l = e.getComputedTransform();
  43443. s && nW(o, s), l && nW(a, l), tW(e, "updateTransform", {
  43444. replace: function () {
  43445. this.transform = null
  43446. }
  43447. }), e.transform = null;
  43448. var u = function (t, e, n, i) {
  43449. for (var r, o = [], a = 0; a < t.length; a++) {
  43450. var s = t[a],
  43451. l = e[a],
  43452. u = qG(s),
  43453. h = qG(l);
  43454. null == r && (r = u[2] < 0 != h[2] < 0);
  43455. var c = [],
  43456. p = [],
  43457. d = 0,
  43458. f = 1 / 0,
  43459. g = [],
  43460. y = s.length;
  43461. r && (s = $G(s));
  43462. for (var v = 6 * KG(s, l, u, h), m = y - 2, x = 0; x < m; x += 2) {
  43463. var _ = (v + x) % m + 2;
  43464. c[x + 2] = s[_] - u[0], c[x + 3] = s[_ + 1] - u[1]
  43465. }
  43466. if (c[0] = s[v] - u[0], c[1] = s[v + 1] - u[1], n > 0)
  43467. for (var b = i / n, w = -i / 2; w <= i / 2; w += b) {
  43468. var S = Math.sin(w),
  43469. M = Math.cos(w),
  43470. I = 0;
  43471. for (x = 0; x < s.length; x += 2) {
  43472. var T = c[x],
  43473. C = c[x + 1],
  43474. D = l[x] - h[0],
  43475. A = l[x + 1] - h[1],
  43476. k = D * M - A * S,
  43477. L = D * S + A * M;
  43478. g[x] = k, g[x + 1] = L;
  43479. var P = k - T,
  43480. O = L - C;
  43481. I += P * P + O * O
  43482. }
  43483. if (I < f) {
  43484. f = I, d = w;
  43485. for (var R = 0; R < g.length; R++) p[R] = g[R]
  43486. }
  43487. } else
  43488. for (var N = 0; N < y; N += 2) p[N] = l[N] - h[0], p[N + 1] = l[N + 1] - h[1];
  43489. o.push({
  43490. from: c,
  43491. to: p,
  43492. fromCp: u,
  43493. toCp: h,
  43494. rotation: -d
  43495. })
  43496. }
  43497. return o
  43498. }(o, a, 10, Math.PI),
  43499. h = [];
  43500. tW(e, "buildPath", {
  43501. replace: function (t) {
  43502. for (var n = e.__morphT, i = 1 - n, r = [], o = 0; o < u.length; o++) {
  43503. var a = u[o],
  43504. s = a.from,
  43505. l = a.to,
  43506. c = a.rotation * n,
  43507. p = a.fromCp,
  43508. d = a.toCp,
  43509. f = Math.sin(c),
  43510. g = Math.cos(c);
  43511. Gt(r, p, d, n);
  43512. for (var y = 0; y < s.length; y += 2) {
  43513. var v = s[y],
  43514. m = s[y + 1],
  43515. x = v * i + (S = l[y]) * n,
  43516. _ = m * i + (M = l[y + 1]) * n;
  43517. h[y] = x * g - _ * f + r[0], h[y + 1] = x * f + _ * g + r[1]
  43518. }
  43519. var b = h[0],
  43520. w = h[1];
  43521. t.moveTo(b, w);
  43522. for (y = 2; y < s.length;) {
  43523. var S = h[y++],
  43524. M = h[y++],
  43525. I = h[y++],
  43526. T = h[y++],
  43527. C = h[y++],
  43528. D = h[y++];
  43529. b === S && w === M && I === C && T === D ? t.lineTo(C, D) : t.bezierCurveTo(S, M, I, T, C, D), b = C, w = D
  43530. }
  43531. }
  43532. }
  43533. })
  43534. }
  43535. function rW(t, e, n) {
  43536. if (!t || !e) return e;
  43537. var i = n.done,
  43538. r = n.during;
  43539. return iW(t, e), e.__morphT = 0, e.animateTo({
  43540. __morphT: 1
  43541. }, k({
  43542. during: function (t) {
  43543. e.dirtyShape(), r && r(t)
  43544. },
  43545. done: function () {
  43546. eW(e, "buildPath"), eW(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape(), i && i()
  43547. }
  43548. }, n)), e
  43549. }
  43550. function oW(t, e, n, i, r, o) {
  43551. t = r === n ? 0 : Math.round(32767 * (t - n) / (r - n)), e = o === i ? 0 : Math.round(32767 * (e - i) / (o - i));
  43552. for (var a, s = 0, l = 32768; l > 0; l /= 2) {
  43553. var u = 0,
  43554. h = 0;
  43555. (t & l) > 0 && (u = 1), (e & l) > 0 && (h = 1), s += l * l * (3 * u ^ h), 0 === h && (1 === u && (t = l - 1 - t, e = l - 1 - e), a = t, t = e, e = a)
  43556. }
  43557. return s
  43558. }
  43559. function aW(t) {
  43560. var e = 1 / 0,
  43561. n = 1 / 0,
  43562. i = -1 / 0,
  43563. r = -1 / 0,
  43564. o = z(t, (function (t) {
  43565. var o = t.getBoundingRect(),
  43566. a = t.getComputedTransform(),
  43567. s = o.x + o.width / 2 + (a ? a[4] : 0),
  43568. l = o.y + o.height / 2 + (a ? a[5] : 0);
  43569. return e = Math.min(s, e), n = Math.min(l, n), i = Math.max(s, i), r = Math.max(l, r), [s, l]
  43570. }));
  43571. return z(o, (function (o, a) {
  43572. return {
  43573. cp: o,
  43574. z: oW(o[0], o[1], e, n, i, r),
  43575. path: t[a]
  43576. }
  43577. })).sort((function (t, e) {
  43578. return t.z - e.z
  43579. })).map((function (t) {
  43580. return t.path
  43581. }))
  43582. }
  43583. function sW(t) {
  43584. return UG(t.path, t.count)
  43585. }
  43586. function lW(t) {
  43587. return Y(t[0])
  43588. }
  43589. function uW(t, e) {
  43590. for (var n = [], i = t.length, r = 0; r < i; r++) n.push({
  43591. one: t[r],
  43592. many: []
  43593. });
  43594. for (r = 0; r < e.length; r++) {
  43595. var o = e[r].length,
  43596. a = void 0;
  43597. for (a = 0; a < o; a++) n[a % i].many.push(e[r][a])
  43598. }
  43599. var s = 0;
  43600. for (r = i - 1; r >= 0; r--)
  43601. if (!n[r].many.length) {
  43602. var l = n[s].many;
  43603. if (l.length <= 1) {
  43604. if (!s) return n;
  43605. s = 0
  43606. }
  43607. o = l.length;
  43608. var u = Math.ceil(o / 2);
  43609. n[r].many = l.slice(u, o), n[s].many = l.slice(0, u), s++
  43610. } return n
  43611. }
  43612. var hW = {
  43613. clone: function (t) {
  43614. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), i = 0; i < t.count; i++) {
  43615. var r = bu(t.path);
  43616. r.setStyle("opacity", n), e.push(r)
  43617. }
  43618. return e
  43619. },
  43620. split: null
  43621. };
  43622. function cW(t, e, n, i, r, o) {
  43623. if (t.length && e.length) {
  43624. var a = gh("update", i, r);
  43625. if (a && a.duration > 0) {
  43626. var s, l, u = i.getModel("universalTransition").get("delay"),
  43627. h = Object.assign({
  43628. setToFinal: !0
  43629. }, a);
  43630. lW(t) && (s = t, l = e), lW(e) && (s = e, l = t);
  43631. for (var c = s ? s === t : t.length > e.length, p = s ? uW(l, s) : uW(c ? e : t, [c ? t : e]), d = 0, f = 0; f < p.length; f++) d += p[f].many.length;
  43632. var g = 0;
  43633. for (f = 0; f < p.length; f++) y(p[f], c, g, d), g += p[f].many.length
  43634. }
  43635. }
  43636. function y(t, e, i, r, a) {
  43637. var s = t.many,
  43638. l = t.one;
  43639. if (1 !== s.length || a)
  43640. for (var c = k({
  43641. dividePath: hW[n],
  43642. individualDelay: u && function (t, e, n, o) {
  43643. return u(t + i, r)
  43644. }
  43645. }, h), p = e ? function (t, e, n) {
  43646. var i = [];
  43647. ! function t(e) {
  43648. for (var n = 0; n < e.length; n++) {
  43649. var r = e[n];
  43650. JG(r) ? t(r.childrenRef()) : r instanceof ks && i.push(r)
  43651. }
  43652. }(t);
  43653. var r = i.length;
  43654. if (!r) return {
  43655. fromIndividuals: [],
  43656. toIndividuals: [],
  43657. count: 0
  43658. };
  43659. var o = (n.dividePath || sW)({
  43660. path: e,
  43661. count: r
  43662. });
  43663. if (o.length !== r) return console.error("Invalid morphing: unmatched splitted path"), {
  43664. fromIndividuals: [],
  43665. toIndividuals: [],
  43666. count: 0
  43667. };
  43668. i = aW(i), o = aW(o);
  43669. for (var a = n.done, s = n.during, l = n.individualDelay, u = new vr, h = 0; h < r; h++) {
  43670. var c = i[h],
  43671. p = o[h];
  43672. p.parent = e, p.copyTransform(u), l || iW(c, p)
  43673. }
  43674. function d(t) {
  43675. for (var e = 0; e < o.length; e++) o[e].addSelfToZr(t)
  43676. }
  43677. function f() {
  43678. e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, eW(e, "addSelfToZr"), eW(e, "removeSelfFromZr")
  43679. }
  43680. e.__isCombineMorphing = !0, e.childrenRef = function () {
  43681. return o
  43682. }, tW(e, "addSelfToZr", {
  43683. after: function (t) {
  43684. d(t)
  43685. }
  43686. }), tW(e, "removeSelfFromZr", {
  43687. after: function (t) {
  43688. for (var e = 0; e < o.length; e++) o[e].removeSelfFromZr(t)
  43689. }
  43690. });
  43691. var g = o.length;
  43692. if (l) {
  43693. var y = g,
  43694. v = function () {
  43695. 0 == --y && (f(), a && a())
  43696. };
  43697. for (h = 0; h < g; h++) {
  43698. var m = l ? k({
  43699. delay: (n.delay || 0) + l(h, g, i[h], o[h]),
  43700. done: v
  43701. }, n) : n;
  43702. rW(i[h], o[h], m)
  43703. }
  43704. } else e.__morphT = 0, e.animateTo({
  43705. __morphT: 1
  43706. }, k({
  43707. during: function (t) {
  43708. for (var n = 0; n < g; n++) {
  43709. var i = o[n];
  43710. i.__morphT = e.__morphT, i.dirtyShape()
  43711. }
  43712. s && s(t)
  43713. },
  43714. done: function () {
  43715. f();
  43716. for (var e = 0; e < t.length; e++) eW(t[e], "updateTransform");
  43717. a && a()
  43718. }
  43719. }, n));
  43720. return e.__zr && d(e.__zr), {
  43721. fromIndividuals: i,
  43722. toIndividuals: o,
  43723. count: g
  43724. }
  43725. }(s, l, c) : function (t, e, n) {
  43726. var i = e.length,
  43727. r = [],
  43728. o = n.dividePath || sW;
  43729. if (JG(t)) {
  43730. ! function t(e) {
  43731. for (var n = 0; n < e.length; n++) {
  43732. var i = e[n];
  43733. JG(i) ? t(i.childrenRef()) : i instanceof ks && r.push(i)
  43734. }
  43735. }(t.childrenRef());
  43736. var a = r.length;
  43737. if (a < i)
  43738. for (var s = 0, l = a; l < i; l++) r.push(bu(r[s++ % a]));
  43739. r.length = i
  43740. } else {
  43741. r = o({
  43742. path: t,
  43743. count: i
  43744. });
  43745. var u = t.getComputedTransform();
  43746. for (l = 0; l < r.length; l++) r[l].setLocalTransform(u);
  43747. if (r.length !== i) return console.error("Invalid morphing: unmatched splitted path"), {
  43748. fromIndividuals: [],
  43749. toIndividuals: [],
  43750. count: 0
  43751. }
  43752. }
  43753. r = aW(r), e = aW(e);
  43754. var h = n.individualDelay;
  43755. for (l = 0; l < i; l++) {
  43756. var c = h ? k({
  43757. delay: (n.delay || 0) + h(l, i, r[l], e[l])
  43758. }, n) : n;
  43759. rW(r[l], e[l], c)
  43760. }
  43761. return {
  43762. fromIndividuals: r,
  43763. toIndividuals: e,
  43764. count: e.length
  43765. }
  43766. }(l, s, c), d = p.fromIndividuals, f = p.toIndividuals, g = d.length, v = 0; v < g; v++) {
  43767. m = u ? k({
  43768. delay: u(v, g)
  43769. }, h) : h;
  43770. o(d[v], f[v], e ? s[v] : t.one, e ? t.one : s[v], m)
  43771. } else {
  43772. var m, x = e ? s[0] : l,
  43773. _ = e ? l : s[0];
  43774. if (JG(x)) y({
  43775. many: [x],
  43776. one: _
  43777. }, !0, i, r, !0);
  43778. else rW(x, _, m = u ? k({
  43779. delay: u(i, r)
  43780. }, h) : h), o(x, _, x, _, m)
  43781. }
  43782. }
  43783. }
  43784. function pW(t) {
  43785. if (!t) return [];
  43786. if (Y(t)) {
  43787. for (var e = [], n = 0; n < t.length; n++) e.push(pW(t[n]));
  43788. return e
  43789. }
  43790. var i = [];
  43791. return t.traverse((function (t) {
  43792. t instanceof ks && !t.disableMorphing && !t.invisible && !t.ignore && i.push(t)
  43793. })), i
  43794. }
  43795. var dW = Vo();
  43796. function fW(t, e, n, i) {
  43797. var r = function (t, e) {
  43798. for (var n = t.dimensions, i = 0; i < n.length; i++) {
  43799. var r = t.getDimensionInfo(n[i]);
  43800. if (r && 0 === r.otherDims[e]) return n[i]
  43801. }
  43802. }(t, i ? "itemChildGroupId" : "itemGroupId");
  43803. if (r) {
  43804. var o = function (t, e, n) {
  43805. var i = t.getDimensionInfo(n),
  43806. r = i && i.ordinalMeta;
  43807. if (i) {
  43808. var o = t.get(i.name, e);
  43809. return r && r.categories[o] || o + ""
  43810. }
  43811. }(t, e, r);
  43812. return o
  43813. }
  43814. var a = t.getRawDataItem(e),
  43815. s = i ? "childGroupId" : "groupId";
  43816. return a && a[s] ? a[s] + "" : i ? void 0 : n || t.getId(e)
  43817. }
  43818. function gW(t) {
  43819. var e = [];
  43820. return E(t, (function (t) {
  43821. var n = t.data,
  43822. i = t.dataGroupId;
  43823. if (!(n.count() > 1e4))
  43824. for (var r = n.getIndices(), o = 0; o < r.length; o++) e.push({
  43825. data: n,
  43826. groupId: fW(n, o, i, !1),
  43827. childGroupId: fW(n, o, i, !0),
  43828. divide: t.divide,
  43829. dataIndex: o
  43830. })
  43831. })), e
  43832. }
  43833. function yW(t, e, n) {
  43834. t.traverse((function (t) {
  43835. t instanceof ks && mh(t, {
  43836. style: {
  43837. opacity: 0
  43838. }
  43839. }, e, {
  43840. dataIndex: n,
  43841. isFrom: !0
  43842. })
  43843. }))
  43844. }
  43845. function vW(t) {
  43846. if (t.parent) {
  43847. var e = t.getComputedTransform();
  43848. t.setLocalTransform(e), t.parent.remove(t)
  43849. }
  43850. }
  43851. function mW(t) {
  43852. t.stopAnimation(), t.isGroup && t.traverse((function (t) {
  43853. t.stopAnimation()
  43854. }))
  43855. }
  43856. function xW(t, e, n) {
  43857. var i = gh("update", n, e);
  43858. i && t.traverse((function (t) {
  43859. if (t instanceof Da) {
  43860. var e = function (t) {
  43861. return fh(t).oldStyle
  43862. }(t);
  43863. e && t.animateFrom({
  43864. style: e
  43865. }, i)
  43866. }
  43867. }))
  43868. }
  43869. function _W(t, e, n) {
  43870. var i = gW(t),
  43871. r = gW(e);
  43872. function o(t, e, n, i, r) {
  43873. (n || t) && e.animateFrom({
  43874. style: n && n !== t ? A(A({}, n.style), t.style) : t.style
  43875. }, r)
  43876. }
  43877. var a = !1,
  43878. s = 0,
  43879. l = yt(),
  43880. u = yt();
  43881. i.forEach((function (t) {
  43882. t.groupId && l.set(t.groupId, !0), t.childGroupId && u.set(t.childGroupId, !0)
  43883. }));
  43884. for (var h = 0; h < r.length; h++) {
  43885. var c = r[h].groupId;
  43886. if (u.get(c)) {
  43887. s = 1;
  43888. break
  43889. }
  43890. var p = r[h].childGroupId;
  43891. if (p && l.get(p)) {
  43892. s = 2;
  43893. break
  43894. }
  43895. }
  43896. function d(t, e) {
  43897. return function (n) {
  43898. var i = n.data,
  43899. r = n.dataIndex;
  43900. return e ? i.getId(r) : t ? 1 === s ? n.childGroupId : n.groupId : 2 === s ? n.childGroupId : n.groupId
  43901. }
  43902. }
  43903. var f = function (t, e) {
  43904. var n = t.length;
  43905. if (n !== e.length) return !1;
  43906. for (var i = 0; i < n; i++) {
  43907. var r = t[i],
  43908. o = e[i];
  43909. if (r.data.getId(r.dataIndex) !== o.data.getId(o.dataIndex)) return !1
  43910. }
  43911. return !0
  43912. }(i, r),
  43913. g = {};
  43914. if (!f)
  43915. for (h = 0; h < r.length; h++) {
  43916. var y = r[h],
  43917. v = y.data.getItemGraphicEl(y.dataIndex);
  43918. v && (g[v.id] = !0)
  43919. }
  43920. function m(t, e) {
  43921. var n = i[e],
  43922. s = r[t],
  43923. l = s.data.hostModel,
  43924. u = n.data.getItemGraphicEl(n.dataIndex),
  43925. h = s.data.getItemGraphicEl(s.dataIndex);
  43926. u !== h ? u && g[u.id] || h && (mW(h), u ? (mW(u), vW(u), a = !0, cW(pW(u), pW(h), s.divide, l, t, o)) : yW(h, l, t)) : h && xW(h, s.dataIndex, l)
  43927. }
  43928. new Gm(i, r, d(!0, f), d(!1, f), null, "multiple").update(m).updateManyToOne((function (t, e) {
  43929. var n = r[t],
  43930. s = n.data,
  43931. l = s.hostModel,
  43932. u = s.getItemGraphicEl(n.dataIndex),
  43933. h = B(z(e, (function (t) {
  43934. return i[t].data.getItemGraphicEl(i[t].dataIndex)
  43935. })), (function (t) {
  43936. return t && t !== u && !g[t.id]
  43937. }));
  43938. u && (mW(u), h.length ? (E(h, (function (t) {
  43939. mW(t), vW(t)
  43940. })), a = !0, cW(pW(h), pW(u), n.divide, l, t, o)) : yW(u, l, n.dataIndex))
  43941. })).updateOneToMany((function (t, e) {
  43942. var n = i[e],
  43943. s = n.data.getItemGraphicEl(n.dataIndex);
  43944. if (!s || !g[s.id]) {
  43945. var l = B(z(t, (function (t) {
  43946. return r[t].data.getItemGraphicEl(r[t].dataIndex)
  43947. })), (function (t) {
  43948. return t && t !== s
  43949. })),
  43950. u = r[t[0]].data.hostModel;
  43951. l.length && (E(l, (function (t) {
  43952. return mW(t)
  43953. })), s ? (mW(s), vW(s), a = !0, cW(pW(s), pW(l), n.divide, u, t[0], o)) : E(l, (function (e) {
  43954. return yW(e, u, t[0])
  43955. })))
  43956. }
  43957. })).updateManyToMany((function (t, e) {
  43958. new Gm(e, t, (function (t) {
  43959. return i[t].data.getId(i[t].dataIndex)
  43960. }), (function (t) {
  43961. return r[t].data.getId(r[t].dataIndex)
  43962. })).update((function (n, i) {
  43963. m(t[n], e[i])
  43964. })).execute()
  43965. })).execute(), a && E(e, (function (t) {
  43966. var e = t.data.hostModel,
  43967. i = e && n.getViewOfSeriesModel(e),
  43968. r = gh("update", e, 0);
  43969. i && e.isAnimationEnabled() && r && r.duration > 0 && i.group.traverse((function (t) {
  43970. t instanceof ks && !t.animators.length && t.animateFrom({
  43971. style: {
  43972. opacity: 0
  43973. }
  43974. }, r)
  43975. }))
  43976. }))
  43977. }
  43978. function bW(t) {
  43979. var e = t.getModel("universalTransition").get("seriesKey");
  43980. return e || t.id
  43981. }
  43982. function wW(t) {
  43983. return Y(t) ? t.sort().join(",") : t
  43984. }
  43985. function SW(t) {
  43986. if (t.hostModel) return t.hostModel.getModel("universalTransition").get("divideShape")
  43987. }
  43988. function MW(t, e) {
  43989. for (var n = 0; n < t.length; n++) {
  43990. if (null != e.seriesIndex && e.seriesIndex === t[n].seriesIndex || null != e.seriesId && e.seriesId === t[n].id) return n
  43991. }
  43992. }
  43993. Vm([function (t) {
  43994. t.registerPainter("canvas", uS)
  43995. }]), Vm([function (t) {
  43996. t.registerPainter("svg", nS)
  43997. }]), Vm([function (t) {
  43998. t.registerChartView(HS), t.registerSeriesModel(hS), t.registerLayout(YS("line", !0)), t.registerVisual({
  43999. seriesType: "line",
  44000. reset: function (t) {
  44001. var e = t.getData(),
  44002. n = t.getModel("lineStyle").getLineStyle();
  44003. n && !n.stroke && (n.stroke = e.getVisual("style").fill), e.setVisual("legendLineStyle", n)
  44004. }
  44005. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, ZS("line"))
  44006. }, function (t) {
  44007. t.registerChartView(iM), t.registerSeriesModel(qS), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Ux, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Zx("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, ZS("bar")), t.registerAction({
  44008. type: "changeAxisOrder",
  44009. event: "changeAxisOrder",
  44010. update: "update"
  44011. }, (function (t, e) {
  44012. var n = t.componentType || "series";
  44013. e.eachComponent({
  44014. mainType: n,
  44015. query: t
  44016. }, (function (e) {
  44017. t.sortInfo && e.axis.setCategorySortInfo(t.sortInfo)
  44018. }))
  44019. }))
  44020. }, function (t) {
  44021. t.registerChartView(LM), t.registerSeriesModel(NM), Ly("pie", t.registerAction), t.registerLayout(H(SM, "pie")), t.registerProcessor(MM("pie")), t.registerProcessor(function (t) {
  44022. return {
  44023. seriesType: t,
  44024. reset: function (t, e) {
  44025. var n = t.getData();
  44026. n.filterSelf((function (t) {
  44027. var e = n.mapDimension("value"),
  44028. i = n.get(e, t);
  44029. return !(j(i) && !isNaN(i) && i < 0)
  44030. }))
  44031. }
  44032. }
  44033. }("pie"))
  44034. }, function (t) {
  44035. Vm(EI), t.registerSeriesModel(EM), t.registerChartView(FM), t.registerLayout(YS("scatter"))
  44036. }, function (t) {
  44037. Vm(KI), t.registerChartView(GI), t.registerSeriesModel(WI), t.registerLayout(zI), t.registerProcessor(MM("radar")), t.registerPreprocessor(FI)
  44038. }, function (t) {
  44039. Vm(IC), t.registerChartView(aC), t.registerSeriesModel(sC), t.registerLayout(uC), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, lC), Ly("map", t.registerAction)
  44040. }, function (t) {
  44041. t.registerChartView(zC), t.registerSeriesModel(oD), t.registerLayout(sD), t.registerVisual(lD),
  44042. function (t) {
  44043. t.registerAction({
  44044. type: "treeExpandAndCollapse",
  44045. event: "treeExpandAndCollapse",
  44046. update: "update"
  44047. }, (function (t, e) {
  44048. e.eachComponent({
  44049. mainType: "series",
  44050. subType: "tree",
  44051. query: t
  44052. }, (function (e) {
  44053. var n = t.dataIndex,
  44054. i = e.getData().tree.getNodeByDataIndex(n);
  44055. i.isExpand = !i.isExpand
  44056. }))
  44057. })), t.registerAction({
  44058. type: "treeRoam",
  44059. event: "treeRoam",
  44060. update: "none"
  44061. }, (function (t, e, n) {
  44062. e.eachComponent({
  44063. mainType: "series",
  44064. subType: "tree",
  44065. query: t
  44066. }, (function (e) {
  44067. var i = wC(e.coordinateSystem, t, void 0, n);
  44068. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  44069. }))
  44070. }))
  44071. }(t)
  44072. }, function (t) {
  44073. t.registerSeriesModel(cD), t.registerChartView(MD), t.registerVisual(GD), t.registerLayout(tA),
  44074. function (t) {
  44075. for (var e = 0; e < uD.length; e++) t.registerAction({
  44076. type: uD[e],
  44077. update: "updateView"
  44078. }, bt);
  44079. t.registerAction({
  44080. type: "treemapRootToNode",
  44081. update: "updateView"
  44082. }, (function (t, e) {
  44083. e.eachComponent({
  44084. mainType: "series",
  44085. subType: "treemap",
  44086. query: t
  44087. }, (function (e, n) {
  44088. var i = eD(t, ["treemapZoomToNode", "treemapRootToNode"], e);
  44089. if (i) {
  44090. var r = e.getViewRoot();
  44091. r && (t.direction = iD(r, i.node) ? "rollUp" : "drillDown"), e.resetViewRoot(i.node)
  44092. }
  44093. }))
  44094. }))
  44095. }(t)
  44096. }, function (t) {
  44097. t.registerChartView(ek), t.registerSeriesModel(lk), t.registerProcessor(aA), t.registerVisual(sA), t.registerVisual(uA), t.registerLayout(xA), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, CA), t.registerLayout(AA), t.registerCoordinateSystem("graphView", {
  44098. dimensions: cC.dimensions,
  44099. create: kA
  44100. }), t.registerAction({
  44101. type: "focusNodeAdjacency",
  44102. event: "focusNodeAdjacency",
  44103. update: "series:focusNodeAdjacency"
  44104. }, bt), t.registerAction({
  44105. type: "unfocusNodeAdjacency",
  44106. event: "unfocusNodeAdjacency",
  44107. update: "series:unfocusNodeAdjacency"
  44108. }, bt), t.registerAction(uk, (function (t, e, n) {
  44109. e.eachComponent({
  44110. mainType: "series",
  44111. query: t
  44112. }, (function (e) {
  44113. var i = wC(e.coordinateSystem, t, void 0, n);
  44114. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  44115. }))
  44116. }))
  44117. }, function (t) {
  44118. t.registerChartView(dk), t.registerSeriesModel(fk)
  44119. }, function (t) {
  44120. t.registerChartView(vk), t.registerSeriesModel(mk), t.registerLayout(xk), t.registerProcessor(MM("funnel"))
  44121. }, function (t) {
  44122. Vm(XL), t.registerChartView(_k), t.registerSeriesModel(Ik), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, Dk)
  44123. }, function (t) {
  44124. t.registerChartView(jL), t.registerSeriesModel(KL), t.registerLayout($L), t.registerVisual(uP), t.registerAction({
  44125. type: "dragNode",
  44126. event: "dragnode",
  44127. update: "update"
  44128. }, (function (t, e) {
  44129. e.eachComponent({
  44130. mainType: "series",
  44131. subType: "sankey",
  44132. query: t
  44133. }, (function (e) {
  44134. e.setNodePosition(t.dataIndex, [t.localX, t.localY])
  44135. }))
  44136. }))
  44137. }, function (t) {
  44138. t.registerSeriesModel(cP), t.registerChartView(pP), t.registerLayout(xP), t.registerTransform(_P)
  44139. }, function (t) {
  44140. t.registerChartView(wP), t.registerSeriesModel(OP), t.registerPreprocessor(RP), t.registerVisual(FP), t.registerLayout(GP)
  44141. }, function (t) {
  44142. t.registerChartView(XP), t.registerSeriesModel(UP), t.registerLayout(YS("effectScatter"))
  44143. }, function (t) {
  44144. t.registerChartView(tO), t.registerSeriesModel(rO), t.registerLayout(QP), t.registerVisual(aO)
  44145. }, function (t) {
  44146. t.registerChartView(uO), t.registerSeriesModel(hO)
  44147. }, function (t) {
  44148. t.registerChartView(fO), t.registerSeriesModel(PO), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Ux, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Zx("pictorialBar"))
  44149. }, function (t) {
  44150. t.registerChartView(OO), t.registerSeriesModel(RO), t.registerLayout(NO), t.registerProcessor(MM("themeRiver"))
  44151. }, function (t) {
  44152. t.registerChartView(FO), t.registerSeriesModel(GO), t.registerLayout(H(YO, "sunburst")), t.registerProcessor(H(MM, "sunburst")), t.registerVisual(UO),
  44153. function (t) {
  44154. t.registerAction({
  44155. type: VO,
  44156. update: "updateView"
  44157. }, (function (t, e) {
  44158. e.eachComponent({
  44159. mainType: "series",
  44160. subType: "sunburst",
  44161. query: t
  44162. }, (function (e, n) {
  44163. var i = eD(t, [VO], e);
  44164. if (i) {
  44165. var r = e.getViewRoot();
  44166. r && (t.direction = iD(r, i.node) ? "rollUp" : "drillDown"), e.resetViewRoot(i.node)
  44167. }
  44168. }))
  44169. })), t.registerAction({
  44170. type: BO,
  44171. update: "none"
  44172. }, (function (t, e, n) {
  44173. t = A({}, t), e.eachComponent({
  44174. mainType: "series",
  44175. subType: "sunburst",
  44176. query: t
  44177. }, (function (e) {
  44178. var n = eD(t, [BO], e);
  44179. n && (t.dataIndex = n.node.dataIndex)
  44180. })), n.dispatchAction(A(t, {
  44181. type: "highlight"
  44182. }))
  44183. })), t.registerAction({
  44184. type: "sunburstUnhighlight",
  44185. update: "updateView"
  44186. }, (function (t, e, n) {
  44187. t = A({}, t), n.dispatchAction(A(t, {
  44188. type: "downplay"
  44189. }))
  44190. }))
  44191. }(t)
  44192. }, function (t) {
  44193. t.registerChartView(zR), t.registerSeriesModel(KO)
  44194. }]), Vm((function (t) {
  44195. Vm(EI), Vm(VN)
  44196. })), Vm((function (t) {
  44197. Vm(VN), MI.registerAxisPointerClass("PolarAxisPointer", BN), t.registerCoordinateSystem("polar", QN), t.registerComponentModel(GN), t.registerComponentView(gE), jM(t, "angle", HN, dE), jM(t, "radius", YN, fE), t.registerComponentView(rE), t.registerComponentView(lE), t.registerLayout(H(pE, "bar"))
  44198. })), Vm(IC), Vm((function (t) {
  44199. Vm(VN), MI.registerAxisPointerClass("SingleAxisPointer", AE), t.registerComponentView(OE), t.registerComponentView(xE), t.registerComponentModel(bE), jM(t, "single", bE, bE.defaultOption), t.registerCoordinateSystem("single", TE)
  44200. })), Vm(XL), Vm((function (t) {
  44201. t.registerComponentModel(RE), t.registerComponentView(EE), t.registerCoordinateSystem("calendar", VE)
  44202. })), Vm((function (t) {
  44203. t.registerComponentModel(YE), t.registerComponentView(ZE), t.registerPreprocessor((function (t) {
  44204. var e = t.graphic;
  44205. Y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
  44206. elements: e
  44207. }] : e && !e.elements && (t.graphic = [{
  44208. elements: [e]
  44209. }])
  44210. }))
  44211. })), Vm((function (t) {
  44212. t.registerComponentModel(_z), t.registerComponentView(wz), mz("saveAsImage", Sz), mz("magicType", Tz), mz("dataView", Oz), mz("dataZoom", eV), mz("restore", Vz), Vm(gz)
  44213. })), Vm((function (t) {
  44214. Vm(VN), t.registerComponentModel(rV), t.registerComponentView(bV), t.registerAction({
  44215. type: "showTip",
  44216. event: "showTip",
  44217. update: "tooltip:manuallyShowTip"
  44218. }, bt), t.registerAction({
  44219. type: "hideTip",
  44220. event: "hideTip",
  44221. update: "tooltip:manuallyHideTip"
  44222. }, bt)
  44223. })), Vm(VN), Vm((function (t) {
  44224. t.registerComponentView(HV), t.registerComponentModel(YV), t.registerPreprocessor(TV), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, VV), t.registerAction({
  44225. type: "brush",
  44226. event: "brush",
  44227. update: "updateVisual"
  44228. }, (function (t, e) {
  44229. e.eachComponent({
  44230. mainType: "brush",
  44231. query: t
  44232. }, (function (e) {
  44233. e.setAreas(t.areas)
  44234. }))
  44235. })), t.registerAction({
  44236. type: "brushSelect",
  44237. event: "brushSelected",
  44238. update: "none"
  44239. }, bt), t.registerAction({
  44240. type: "brushEnd",
  44241. event: "brushEnd",
  44242. update: "none"
  44243. }, bt), mz("brush", ZV)
  44244. })), Vm((function (t) {
  44245. t.registerComponentModel(jV), t.registerComponentView(qV)
  44246. })), Vm((function (t) {
  44247. t.registerComponentModel($V), t.registerComponentView(nB), t.registerSubTypeDefaulter("timeline", (function () {
  44248. return "slider"
  44249. })),
  44250. function (t) {
  44251. t.registerAction({
  44252. type: "timelineChange",
  44253. event: "timelineChanged",
  44254. update: "prepareAndUpdate"
  44255. }, (function (t, e, n) {
  44256. var i = e.getComponent("timeline");
  44257. return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), n.dispatchAction({
  44258. type: "timelinePlayChange",
  44259. playState: !1,
  44260. from: t.from
  44261. }))), e.resetOption("timeline", {
  44262. replaceMerge: i.get("replaceMerge", !0)
  44263. }), k({
  44264. currentIndex: i.option.currentIndex
  44265. }, t)
  44266. })), t.registerAction({
  44267. type: "timelinePlayChange",
  44268. event: "timelinePlayChanged",
  44269. update: "update"
  44270. }, (function (t, e) {
  44271. var n = e.getComponent("timeline");
  44272. n && null != t.playState && n.setPlayState(t.playState)
  44273. }))
  44274. }(t), t.registerPreprocessor(oB)
  44275. })), Vm((function (t) {
  44276. t.registerComponentModel(pB), t.registerComponentView(MB), t.registerPreprocessor((function (t) {
  44277. lB(t.series, "markPoint") && (t.markPoint = t.markPoint || {})
  44278. }))
  44279. })), Vm((function (t) {
  44280. t.registerComponentModel(IB), t.registerComponentView(PB), t.registerPreprocessor((function (t) {
  44281. lB(t.series, "markLine") && (t.markLine = t.markLine || {})
  44282. }))
  44283. })), Vm((function (t) {
  44284. t.registerComponentModel(OB), t.registerComponentView(GB), t.registerPreprocessor((function (t) {
  44285. lB(t.series, "markArea") && (t.markArea = t.markArea || {})
  44286. }))
  44287. })), Vm((function (t) {
  44288. Vm(QB), Vm(aF)
  44289. })), Vm((function (t) {
  44290. Vm(mF), Vm(CF)
  44291. })), Vm(mF), Vm(CF), Vm((function (t) {
  44292. Vm(sG), Vm(pG)
  44293. })), Vm(sG), Vm(pG), Vm((function (t) {
  44294. t.registerPreprocessor(vG), t.registerVisual(t.PRIORITY.VISUAL.ARIA, yG)
  44295. })), Vm((function (t) {
  44296. t.registerTransform(AG), t.registerTransform(kG)
  44297. })), Vm((function (t) {
  44298. t.registerComponentModel(LG), t.registerComponentView(PG)
  44299. })), Vm((function (t) {
  44300. t.registerUpdateLifecycle("series:beforeupdate", (function (t, e, n) {
  44301. E(To(n.seriesTransition), (function (t) {
  44302. E(To(t.to), (function (t) {
  44303. for (var e = n.updatedSeries, i = 0; i < e.length; i++)(null != t.seriesIndex && t.seriesIndex === e[i].seriesIndex || null != t.seriesId && t.seriesId === e[i].id) && (e[i][_g] = !0)
  44304. }))
  44305. }))
  44306. })), t.registerUpdateLifecycle("series:transition", (function (t, e, n) {
  44307. var i = dW(e);
  44308. if (i.oldSeries && n.updatedSeries && n.optionChanged) {
  44309. var r = n.seriesTransition;
  44310. if (r) E(To(r), (function (t) {
  44311. ! function (t, e, n, i) {
  44312. var r = [],
  44313. o = [];
  44314. E(To(t.from), (function (t) {
  44315. var n = MW(e.oldSeries, t);
  44316. n >= 0 && r.push({
  44317. dataGroupId: e.oldDataGroupIds[n],
  44318. data: e.oldData[n],
  44319. divide: SW(e.oldData[n]),
  44320. groupIdDim: t.dimension
  44321. })
  44322. })), E(To(t.to), (function (t) {
  44323. var i = MW(n.updatedSeries, t);
  44324. if (i >= 0) {
  44325. var r = n.updatedSeries[i].getData();
  44326. o.push({
  44327. dataGroupId: e.oldDataGroupIds[i],
  44328. data: r,
  44329. divide: SW(r),
  44330. groupIdDim: t.dimension
  44331. })
  44332. }
  44333. })), r.length > 0 && o.length > 0 && _W(r, o, i)
  44334. }(t, i, n, e)
  44335. }));
  44336. else {
  44337. var o = function (t, e) {
  44338. var n = yt(),
  44339. i = yt(),
  44340. r = yt();
  44341. return E(t.oldSeries, (function (e, n) {
  44342. var o = t.oldDataGroupIds[n],
  44343. a = t.oldData[n],
  44344. s = bW(e),
  44345. l = wW(s);
  44346. i.set(l, {
  44347. dataGroupId: o,
  44348. data: a
  44349. }), Y(s) && E(s, (function (t) {
  44350. r.set(t, {
  44351. key: l,
  44352. dataGroupId: o,
  44353. data: a
  44354. })
  44355. }))
  44356. })), E(e.updatedSeries, (function (t) {
  44357. if (t.isUniversalTransitionEnabled() && t.isAnimationEnabled()) {
  44358. var e = t.get("dataGroupId"),
  44359. o = t.getData(),
  44360. a = bW(t),
  44361. s = wW(a),
  44362. l = i.get(s);
  44363. if (l) n.set(s, {
  44364. oldSeries: [{
  44365. dataGroupId: l.dataGroupId,
  44366. divide: SW(l.data),
  44367. data: l.data
  44368. }],
  44369. newSeries: [{
  44370. dataGroupId: e,
  44371. divide: SW(o),
  44372. data: o
  44373. }]
  44374. });
  44375. else if (Y(a)) {
  44376. var u = [];
  44377. E(a, (function (t) {
  44378. var e = i.get(t);
  44379. e.data && u.push({
  44380. dataGroupId: e.dataGroupId,
  44381. divide: SW(e.data),
  44382. data: e.data
  44383. })
  44384. })), u.length && n.set(s, {
  44385. oldSeries: u,
  44386. newSeries: [{
  44387. dataGroupId: e,
  44388. data: o,
  44389. divide: SW(o)
  44390. }]
  44391. })
  44392. } else {
  44393. var h = r.get(a);
  44394. if (h) {
  44395. var c = n.get(h.key);
  44396. c || (c = {
  44397. oldSeries: [{
  44398. dataGroupId: h.dataGroupId,
  44399. data: h.data,
  44400. divide: SW(h.data)
  44401. }],
  44402. newSeries: []
  44403. }, n.set(h.key, c)), c.newSeries.push({
  44404. dataGroupId: e,
  44405. data: o,
  44406. divide: SW(o)
  44407. })
  44408. }
  44409. }
  44410. }
  44411. })), n
  44412. }(i, n);
  44413. E(o.keys(), (function (t) {
  44414. var n = o.get(t);
  44415. _W(n.oldSeries, n.newSeries, e)
  44416. }))
  44417. }
  44418. E(n.updatedSeries, (function (t) {
  44419. t[_g] && (t[_g] = !1)
  44420. }))
  44421. }
  44422. for (var a = t.getSeries(), s = i.oldSeries = [], l = i.oldDataGroupIds = [], u = i.oldData = [], h = 0; h < a.length; h++) {
  44423. var c = a[h].getData();
  44424. c.count() < 1e4 && (s.push(a[h]), l.push(a[h].get("dataGroupId")), u.push(c))
  44425. }
  44426. }))
  44427. })), Vm((function (t) {
  44428. t.registerUpdateLifecycle("series:beforeupdate", (function (t, e, n) {
  44429. var i = Yb(e).labelManager;
  44430. i || (i = Yb(e).labelManager = new Hb), i.clearLabels()
  44431. })), t.registerUpdateLifecycle("series:layoutlabels", (function (t, e, n) {
  44432. var i = Yb(e).labelManager;
  44433. n.updatedSeries.forEach((function (t) {
  44434. i.addLabelsOfSeries(e.getViewOfSeriesModel(t))
  44435. })), i.updateLayoutConfig(e), i.layout(e), i.processLabelsOverall()
  44436. }))
  44437. })), t.Axis = ob, t.ChartView = Og, t.ComponentModel = zp, t.ComponentView = Ag, t.List = cx, t.Model = Cc, t.PRIORITY = Cv, t.SeriesModel = bg, t.color = li, t.connect = function (t) {
  44438. if (Y(t)) {
  44439. var e = t;
  44440. t = null, E(e, (function (e) {
  44441. null != e.group && (t = e.group)
  44442. })), t = t || "g_" + ym++, E(e, (function (e) {
  44443. e.group = t
  44444. }))
  44445. }
  44446. return fm[t] = !0, t
  44447. }, t.dataTool = {}, t.dependencies = {
  44448. zrender: "5.5.0"
  44449. }, t.disConnect = xm, t.disconnect = mm, t.dispose = function (t) {
  44450. U(t) ? t = dm[t] : t instanceof nm || (t = _m(t)), t instanceof nm && !t.isDisposed() && t.dispose()
  44451. }, t.env = r, t.extendChartView = function (t) {
  44452. var e = Og.extend(t);
  44453. return Og.registerClass(e), e
  44454. }, t.extendComponentModel = function (t) {
  44455. var e = zp.extend(t);
  44456. return zp.registerClass(e), e
  44457. }, t.extendComponentView = function (t) {
  44458. var e = Ag.extend(t);
  44459. return Ag.registerClass(e), e
  44460. }, t.extendSeriesModel = function (t) {
  44461. var e = bg.extend(t);
  44462. return bg.registerClass(e), e
  44463. }, t.format = Z_, t.getCoordinateSystemDimensions = function (t) {
  44464. var e = wd.get(t);
  44465. if (e) return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()
  44466. }, t.getInstanceByDom = _m, t.getInstanceById = function (t) {
  44467. return dm[t]
  44468. }, t.getMap = function (t) {
  44469. var e = Mv("getMap");
  44470. return e && e(t)
  44471. }, t.graphic = U_, t.helper = k_, t.init = function (t, e, n) {
  44472. var i = !(n && n.ssr);
  44473. if (i) {
  44474. 0;
  44475. var r = _m(t);
  44476. if (r) return r;
  44477. 0
  44478. }
  44479. var o = new nm(t, e, n);
  44480. return o.id = "ec_" + gm++, dm[o.id] = o, i && Xo(t, vm, o.id), $v(o), wv.trigger("afterinit", o), o
  44481. }, t.innerDrawElementOnCanvas = dv, t.matrix = Ce, t.number = Y_, t.parseGeoJSON = H_, t.parseGeoJson = H_, t.registerAction = Cm, t.registerCoordinateSystem = Dm, t.registerLayout = Am, t.registerLoading = Om, t.registerLocale = zc, t.registerMap = Rm, t.registerPostInit = Mm, t.registerPostUpdate = Im, t.registerPreprocessor = wm, t.registerProcessor = Sm, t.registerTheme = bm, t.registerTransform = Nm, t.registerUpdateLifecycle = Tm, t.registerVisual = km, t.setCanvasCreator = function (t) {
  44482. c({
  44483. createCanvas: t
  44484. })
  44485. }, t.setPlatformAPI = c, t.throttle = Wg, t.time = X_, t.use = Vm, t.util = j_, t.vector = Xt, t.version = "5.5.0", t.zrUtil = St, t.zrender = jr, Object.defineProperty(t, "__esModule", {
  44486. value: !0
  44487. })
  44488. }));