echarts.min.js 2.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402
  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. }instanceof Array && function(t, e) {
  39. t.__proto__ = e
  40. }
  41. || function(t, e) {
  42. for (var n in e)
  43. Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
  44. }
  45. ,
  46. e(t, n)
  47. };
  48. function n(t, n) {
  49. if ("function" != typeof n && null !== n)
  50. throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
  51. function i() {
  52. this.constructor = t
  53. }
  54. e(t, n),
  55. t.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  56. new i)
  57. }
  58. var i = function() {
  59. this.firefox = !1,
  60. this.ie = !1,
  61. this.edge = !1,
  62. this.newEdge = !1,
  63. this.weChat = !1
  64. }
  65. , r = new function() {
  66. this.browser = new i,
  67. this.node = !1,
  68. this.wxa = !1,
  69. this.worker = !1,
  70. this.svgSupported = !1,
  71. this.touchEventsSupported = !1,
  72. this.pointerEventsSupported = !1,
  73. this.domSupported = !1,
  74. this.transformSupported = !1,
  75. this.transform3dSupported = !1,
  76. this.hasGlobalWindow = "undefined" != typeof window
  77. }
  78. ;
  79. "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? (r.wxa = !0,
  80. r.touchEventsSupported = !0) : "undefined" == typeof document && "undefined" != typeof self ? r.worker = !0 : !r.hasGlobalWindow || "Deno"in window ? (r.node = !0,
  81. r.svgSupported = !0) : function(t, e) {
  82. var n = e.browser
  83. , i = t.match(/Firefox\/([\d.]+)/)
  84. , r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/)
  85. , o = t.match(/Edge?\/([\d.]+)/)
  86. , a = /micromessenger/i.test(t);
  87. i && (n.firefox = !0,
  88. n.version = i[1]);
  89. r && (n.ie = !0,
  90. n.version = r[1]);
  91. o && (n.edge = !0,
  92. n.version = o[1],
  93. n.newEdge = +o[1].split(".")[0] > 18);
  94. a && (n.weChat = !0);
  95. e.svgSupported = "undefined" != typeof SVGRect,
  96. e.touchEventsSupported = "ontouchstart"in window && !n.ie && !n.edge,
  97. e.pointerEventsSupported = "onpointerdown"in window && (n.edge || n.ie && +n.version >= 11),
  98. e.domSupported = "undefined" != typeof document;
  99. var s = document.documentElement.style;
  100. e.transform3dSupported = (n.ie && "transition"in s || n.edge || "WebKitCSSMatrix"in window && "m11"in new WebKitCSSMatrix || "MozPerspective"in s) && !("OTransition"in s),
  101. e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9
  102. }(navigator.userAgent, r);
  103. var o = "sans-serif"
  104. , a = "12px " + o;
  105. var s, l, u = function(t) {
  106. var e = {};
  107. if ("undefined" == typeof JSON)
  108. return e;
  109. for (var n = 0; n < t.length; n++) {
  110. var i = String.fromCharCode(n + 32)
  111. , r = (t.charCodeAt(n) - 20) / 100;
  112. e[i] = r
  113. }
  114. return e
  115. }("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"), h = {
  116. createCanvas: function() {
  117. return "undefined" != typeof document && document.createElement("canvas")
  118. },
  119. measureText: function(t, e) {
  120. if (!s) {
  121. var n = h.createCanvas();
  122. s = n && n.getContext("2d")
  123. }
  124. if (s)
  125. return l !== e && (l = s.font = e || a),
  126. s.measureText(t);
  127. t = t || "";
  128. var i = /((?:\d+)?\.?\d*)px/.exec(e = e || a)
  129. , r = i && +i[1] || 12
  130. , o = 0;
  131. if (e.indexOf("mono") >= 0)
  132. o = r * t.length;
  133. else
  134. for (var c = 0; c < t.length; c++) {
  135. var p = u[t[c]];
  136. o += null == p ? r : p * r
  137. }
  138. return {
  139. width: o
  140. }
  141. },
  142. loadImage: function(t, e, n) {
  143. var i = new Image;
  144. return i.onload = e,
  145. i.onerror = n,
  146. i.src = t,
  147. i
  148. }
  149. };
  150. function c(t) {
  151. for (var e in h)
  152. t[e] && (h[e] = t[e])
  153. }
  154. var p = V(["Function", "RegExp", "Date", "Error", "CanvasGradient", "CanvasPattern", "Image", "Canvas"], (function(t, e) {
  155. return t["[object " + e + "]"] = !0,
  156. t
  157. }
  158. ), {})
  159. , d = V(["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64"], (function(t, e) {
  160. return t["[object " + e + "Array]"] = !0,
  161. t
  162. }
  163. ), {})
  164. , f = Object.prototype.toString
  165. , g = Array.prototype
  166. , y = g.forEach
  167. , v = g.filter
  168. , m = g.slice
  169. , x = g.map
  170. , _ = function() {}
  171. .constructor
  172. , b = _ ? _.prototype : null
  173. , w = "__proto__"
  174. , S = 2311;
  175. function M() {
  176. return S++
  177. }
  178. function I() {
  179. for (var t = [], e = 0; e < arguments.length; e++)
  180. t[e] = arguments[e];
  181. "undefined" != typeof console && console.error.apply(console, t)
  182. }
  183. function T(t) {
  184. if (null == t || "object" != typeof t)
  185. return t;
  186. var e = t
  187. , n = f.call(t);
  188. if ("[object Array]" === n) {
  189. if (!pt(t)) {
  190. e = [];
  191. for (var i = 0, r = t.length; i < r; i++)
  192. e[i] = T(t[i])
  193. }
  194. } else if (d[n]) {
  195. if (!pt(t)) {
  196. var o = t.constructor;
  197. if (o.from)
  198. e = o.from(t);
  199. else {
  200. e = new o(t.length);
  201. for (i = 0,
  202. r = t.length; i < r; i++)
  203. e[i] = t[i]
  204. }
  205. }
  206. } else if (!p[n] && !pt(t) && !J(t))
  207. for (var a in e = {},
  208. t)
  209. t.hasOwnProperty(a) && a !== w && (e[a] = T(t[a]));
  210. return e
  211. }
  212. function C(t, e, n) {
  213. if (!q(e) || !q(t))
  214. return n ? T(e) : t;
  215. for (var i in e)
  216. if (e.hasOwnProperty(i) && i !== w) {
  217. var r = t[i]
  218. , o = e[i];
  219. !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)
  220. }
  221. return t
  222. }
  223. function D(t, e) {
  224. for (var n = t[0], i = 1, r = t.length; i < r; i++)
  225. n = C(n, t[i], e);
  226. return n
  227. }
  228. function A(t, e) {
  229. if (Object.assign)
  230. Object.assign(t, e);
  231. else
  232. for (var n in e)
  233. e.hasOwnProperty(n) && n !== w && (t[n] = e[n]);
  234. return t
  235. }
  236. function k(t, e, n) {
  237. for (var i = G(e), r = 0, o = i.length; r < o; r++) {
  238. var a = i[r];
  239. (n ? null != e[a] : null == t[a]) && (t[a] = e[a])
  240. }
  241. return t
  242. }
  243. var L = h.createCanvas;
  244. function P(t, e) {
  245. if (t) {
  246. if (t.indexOf)
  247. return t.indexOf(e);
  248. for (var n = 0, i = t.length; n < i; n++)
  249. if (t[n] === e)
  250. return n
  251. }
  252. return -1
  253. }
  254. function O(t, e) {
  255. var n = t.prototype;
  256. function i() {}
  257. for (var r in i.prototype = e.prototype,
  258. t.prototype = new i,
  259. n)
  260. n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
  261. t.prototype.constructor = t,
  262. t.superClass = e
  263. }
  264. function R(t, e, n) {
  265. if (t = "prototype"in t ? t.prototype : t,
  266. e = "prototype"in e ? e.prototype : e,
  267. Object.getOwnPropertyNames)
  268. for (var i = Object.getOwnPropertyNames(e), r = 0; r < i.length; r++) {
  269. var o = i[r];
  270. "constructor" !== o && (n ? null != e[o] : null == t[o]) && (t[o] = e[o])
  271. }
  272. else
  273. k(t, e, n)
  274. }
  275. function N(t) {
  276. return !!t && ("string" != typeof t && "number" == typeof t.length)
  277. }
  278. function E(t, e, n) {
  279. if (t && e)
  280. if (t.forEach && t.forEach === y)
  281. t.forEach(e, n);
  282. else if (t.length === +t.length)
  283. for (var i = 0, r = t.length; i < r; i++)
  284. e.call(n, t[i], i, t);
  285. else
  286. for (var o in t)
  287. t.hasOwnProperty(o) && e.call(n, t[o], o, t)
  288. }
  289. function z(t, e, n) {
  290. if (!t)
  291. return [];
  292. if (!e)
  293. return at(t);
  294. if (t.map && t.map === x)
  295. return t.map(e, n);
  296. for (var i = [], r = 0, o = t.length; r < o; r++)
  297. i.push(e.call(n, t[r], r, t));
  298. return i
  299. }
  300. function V(t, e, n, i) {
  301. if (t && e) {
  302. for (var r = 0, o = t.length; r < o; r++)
  303. n = e.call(i, n, t[r], r, t);
  304. return n
  305. }
  306. }
  307. function B(t, e, n) {
  308. if (!t)
  309. return [];
  310. if (!e)
  311. return at(t);
  312. if (t.filter && t.filter === v)
  313. return t.filter(e, n);
  314. for (var i = [], r = 0, o = t.length; r < o; r++)
  315. e.call(n, t[r], r, t) && i.push(t[r]);
  316. return i
  317. }
  318. function F(t, e, n) {
  319. if (t && e)
  320. for (var i = 0, r = t.length; i < r; i++)
  321. if (e.call(n, t[i], i, t))
  322. return t[i]
  323. }
  324. function G(t) {
  325. if (!t)
  326. return [];
  327. if (Object.keys)
  328. return Object.keys(t);
  329. var e = [];
  330. for (var n in t)
  331. t.hasOwnProperty(n) && e.push(n);
  332. return e
  333. }
  334. var W = b && X(b.bind) ? b.call.bind(b.bind) : function(t, e) {
  335. for (var n = [], i = 2; i < arguments.length; i++)
  336. n[i - 2] = arguments[i];
  337. return function() {
  338. return t.apply(e, n.concat(m.call(arguments)))
  339. }
  340. }
  341. ;
  342. function H(t) {
  343. for (var e = [], n = 1; n < arguments.length; n++)
  344. e[n - 1] = arguments[n];
  345. return function() {
  346. return t.apply(this, e.concat(m.call(arguments)))
  347. }
  348. }
  349. function Y(t) {
  350. return Array.isArray ? Array.isArray(t) : "[object Array]" === f.call(t)
  351. }
  352. function X(t) {
  353. return "function" == typeof t
  354. }
  355. function U(t) {
  356. return "string" == typeof t
  357. }
  358. function Z(t) {
  359. return "[object String]" === f.call(t)
  360. }
  361. function j(t) {
  362. return "number" == typeof t
  363. }
  364. function q(t) {
  365. var e = typeof t;
  366. return "function" === e || !!t && "object" === e
  367. }
  368. function K(t) {
  369. return !!p[f.call(t)]
  370. }
  371. function $(t) {
  372. return !!d[f.call(t)]
  373. }
  374. function J(t) {
  375. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
  376. }
  377. function Q(t) {
  378. return null != t.colorStops
  379. }
  380. function tt(t) {
  381. return null != t.image
  382. }
  383. function et(t) {
  384. return "[object RegExp]" === f.call(t)
  385. }
  386. function nt(t) {
  387. return t != t
  388. }
  389. function it() {
  390. for (var t = [], e = 0; e < arguments.length; e++)
  391. t[e] = arguments[e];
  392. for (var n = 0, i = t.length; n < i; n++)
  393. if (null != t[n])
  394. return t[n]
  395. }
  396. function rt(t, e) {
  397. return null != t ? t : e
  398. }
  399. function ot(t, e, n) {
  400. return null != t ? t : null != e ? e : n
  401. }
  402. function at(t) {
  403. for (var e = [], n = 1; n < arguments.length; n++)
  404. e[n - 1] = arguments[n];
  405. return m.apply(t, e)
  406. }
  407. function st(t) {
  408. if ("number" == typeof t)
  409. return [t, t, t, t];
  410. var e = t.length;
  411. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
  412. }
  413. function lt(t, e) {
  414. if (!t)
  415. throw new Error(e)
  416. }
  417. function ut(t) {
  418. return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
  419. }
  420. var ht = "__ec_primitive__";
  421. function ct(t) {
  422. t[ht] = !0
  423. }
  424. function pt(t) {
  425. return t[ht]
  426. }
  427. var dt = function() {
  428. function t() {
  429. this.data = {}
  430. }
  431. return t.prototype.delete = function(t) {
  432. var e = this.has(t);
  433. return e && delete this.data[t],
  434. e
  435. }
  436. ,
  437. t.prototype.has = function(t) {
  438. return this.data.hasOwnProperty(t)
  439. }
  440. ,
  441. t.prototype.get = function(t) {
  442. return this.data[t]
  443. }
  444. ,
  445. t.prototype.set = function(t, e) {
  446. return this.data[t] = e,
  447. this
  448. }
  449. ,
  450. t.prototype.keys = function() {
  451. return G(this.data)
  452. }
  453. ,
  454. t.prototype.forEach = function(t) {
  455. var e = this.data;
  456. for (var n in e)
  457. e.hasOwnProperty(n) && t(e[n], n)
  458. }
  459. ,
  460. t
  461. }()
  462. , ft = "function" == typeof Map;
  463. var gt = function() {
  464. function t(e) {
  465. var n = Y(e);
  466. this.data = ft ? new Map : new dt;
  467. var i = this;
  468. function r(t, e) {
  469. n ? i.set(t, e) : i.set(e, t)
  470. }
  471. e instanceof t ? e.each(r) : e && E(e, r)
  472. }
  473. return t.prototype.hasKey = function(t) {
  474. return this.data.has(t)
  475. }
  476. ,
  477. t.prototype.get = function(t) {
  478. return this.data.get(t)
  479. }
  480. ,
  481. t.prototype.set = function(t, e) {
  482. return this.data.set(t, e),
  483. e
  484. }
  485. ,
  486. t.prototype.each = function(t, e) {
  487. this.data.forEach((function(n, i) {
  488. t.call(e, n, i)
  489. }
  490. ))
  491. }
  492. ,
  493. t.prototype.keys = function() {
  494. var t = this.data.keys();
  495. return ft ? Array.from(t) : t
  496. }
  497. ,
  498. t.prototype.removeKey = function(t) {
  499. this.data.delete(t)
  500. }
  501. ,
  502. t
  503. }();
  504. function yt(t) {
  505. return new gt(t)
  506. }
  507. function vt(t, e) {
  508. for (var n = new t.constructor(t.length + e.length), i = 0; i < t.length; i++)
  509. n[i] = t[i];
  510. var r = t.length;
  511. for (i = 0; i < e.length; i++)
  512. n[i + r] = e[i];
  513. return n
  514. }
  515. function mt(t, e) {
  516. var n;
  517. if (Object.create)
  518. n = Object.create(t);
  519. else {
  520. var i = function() {};
  521. i.prototype = t,
  522. n = new i
  523. }
  524. return e && A(n, e),
  525. n
  526. }
  527. function xt(t) {
  528. var e = t.style;
  529. e.webkitUserSelect = "none",
  530. e.userSelect = "none",
  531. e.webkitTapHighlightColor = "rgba(0,0,0,0)",
  532. e["-webkit-touch-callout"] = "none"
  533. }
  534. function _t(t, e) {
  535. return t.hasOwnProperty(e)
  536. }
  537. function bt() {}
  538. var wt = 180 / Math.PI
  539. , St = Object.freeze({
  540. __proto__: null,
  541. guid: M,
  542. logError: I,
  543. clone: T,
  544. merge: C,
  545. mergeAll: D,
  546. extend: A,
  547. defaults: k,
  548. createCanvas: L,
  549. indexOf: P,
  550. inherits: O,
  551. mixin: R,
  552. isArrayLike: N,
  553. each: E,
  554. map: z,
  555. reduce: V,
  556. filter: B,
  557. find: F,
  558. keys: G,
  559. bind: W,
  560. curry: H,
  561. isArray: Y,
  562. isFunction: X,
  563. isString: U,
  564. isStringSafe: Z,
  565. isNumber: j,
  566. isObject: q,
  567. isBuiltInObject: K,
  568. isTypedArray: $,
  569. isDom: J,
  570. isGradientObject: Q,
  571. isImagePatternObject: tt,
  572. isRegExp: et,
  573. eqNaN: nt,
  574. retrieve: it,
  575. retrieve2: rt,
  576. retrieve3: ot,
  577. slice: at,
  578. normalizeCssArray: st,
  579. assert: lt,
  580. trim: ut,
  581. setAsPrimitive: ct,
  582. isPrimitive: pt,
  583. HashMap: gt,
  584. createHashMap: yt,
  585. concatArray: vt,
  586. createObject: mt,
  587. disableUserSelect: xt,
  588. hasOwn: _t,
  589. noop: bt,
  590. RADIAN_TO_DEGREE: wt
  591. });
  592. function Mt(t, e) {
  593. return null == t && (t = 0),
  594. null == e && (e = 0),
  595. [t, e]
  596. }
  597. function It(t, e) {
  598. return t[0] = e[0],
  599. t[1] = e[1],
  600. t
  601. }
  602. function Tt(t) {
  603. return [t[0], t[1]]
  604. }
  605. function Ct(t, e, n) {
  606. return t[0] = e,
  607. t[1] = n,
  608. t
  609. }
  610. function Dt(t, e, n) {
  611. return t[0] = e[0] + n[0],
  612. t[1] = e[1] + n[1],
  613. t
  614. }
  615. function At(t, e, n, i) {
  616. return t[0] = e[0] + n[0] * i,
  617. t[1] = e[1] + n[1] * i,
  618. t
  619. }
  620. function kt(t, e, n) {
  621. return t[0] = e[0] - n[0],
  622. t[1] = e[1] - n[1],
  623. t
  624. }
  625. function Lt(t) {
  626. return Math.sqrt(Ot(t))
  627. }
  628. var Pt = Lt;
  629. function Ot(t) {
  630. return t[0] * t[0] + t[1] * t[1]
  631. }
  632. var Rt = Ot;
  633. function Nt(t, e, n) {
  634. return t[0] = e[0] * n,
  635. t[1] = e[1] * n,
  636. t
  637. }
  638. function Et(t, e) {
  639. var n = Lt(e);
  640. return 0 === n ? (t[0] = 0,
  641. t[1] = 0) : (t[0] = e[0] / n,
  642. t[1] = e[1] / n),
  643. t
  644. }
  645. function zt(t, e) {
  646. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
  647. }
  648. var Vt = zt;
  649. function Bt(t, e) {
  650. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
  651. }
  652. var Ft = Bt;
  653. function Gt(t, e, n, i) {
  654. return t[0] = e[0] + i * (n[0] - e[0]),
  655. t[1] = e[1] + i * (n[1] - e[1]),
  656. t
  657. }
  658. function Wt(t, e, n) {
  659. var i = e[0]
  660. , r = e[1];
  661. return t[0] = n[0] * i + n[2] * r + n[4],
  662. t[1] = n[1] * i + n[3] * r + n[5],
  663. t
  664. }
  665. function Ht(t, e, n) {
  666. return t[0] = Math.min(e[0], n[0]),
  667. t[1] = Math.min(e[1], n[1]),
  668. t
  669. }
  670. function Yt(t, e, n) {
  671. return t[0] = Math.max(e[0], n[0]),
  672. t[1] = Math.max(e[1], n[1]),
  673. t
  674. }
  675. var Xt = Object.freeze({
  676. __proto__: null,
  677. create: Mt,
  678. copy: It,
  679. clone: Tt,
  680. set: Ct,
  681. add: Dt,
  682. scaleAndAdd: At,
  683. sub: kt,
  684. len: Lt,
  685. length: Pt,
  686. lenSquare: Ot,
  687. lengthSquare: Rt,
  688. mul: function(t, e, n) {
  689. return t[0] = e[0] * n[0],
  690. t[1] = e[1] * n[1],
  691. t
  692. },
  693. div: function(t, e, n) {
  694. return t[0] = e[0] / n[0],
  695. t[1] = e[1] / n[1],
  696. t
  697. },
  698. dot: function(t, e) {
  699. return t[0] * e[0] + t[1] * e[1]
  700. },
  701. scale: Nt,
  702. normalize: Et,
  703. distance: zt,
  704. dist: Vt,
  705. distanceSquare: Bt,
  706. distSquare: Ft,
  707. negate: function(t, e) {
  708. return t[0] = -e[0],
  709. t[1] = -e[1],
  710. t
  711. },
  712. lerp: Gt,
  713. applyTransform: Wt,
  714. min: Ht,
  715. max: Yt
  716. })
  717. , Ut = function(t, e) {
  718. this.target = t,
  719. this.topTarget = e && e.topTarget
  720. }
  721. , Zt = function() {
  722. function t(t) {
  723. this.handler = t,
  724. t.on("mousedown", this._dragStart, this),
  725. t.on("mousemove", this._drag, this),
  726. t.on("mouseup", this._dragEnd, this)
  727. }
  728. return t.prototype._dragStart = function(t) {
  729. for (var e = t.target; e && !e.draggable; )
  730. e = e.parent || e.__hostTarget;
  731. e && (this._draggingTarget = e,
  732. e.dragging = !0,
  733. this._x = t.offsetX,
  734. this._y = t.offsetY,
  735. this.handler.dispatchToElement(new Ut(e,t), "dragstart", t.event))
  736. }
  737. ,
  738. t.prototype._drag = function(t) {
  739. var e = this._draggingTarget;
  740. if (e) {
  741. var n = t.offsetX
  742. , i = t.offsetY
  743. , r = n - this._x
  744. , o = i - this._y;
  745. this._x = n,
  746. this._y = i,
  747. e.drift(r, o, t),
  748. this.handler.dispatchToElement(new Ut(e,t), "drag", t.event);
  749. var a = this.handler.findHover(n, i, e).target
  750. , s = this._dropTarget;
  751. this._dropTarget = a,
  752. e !== a && (s && a !== s && this.handler.dispatchToElement(new Ut(s,t), "dragleave", t.event),
  753. a && a !== s && this.handler.dispatchToElement(new Ut(a,t), "dragenter", t.event))
  754. }
  755. }
  756. ,
  757. t.prototype._dragEnd = function(t) {
  758. var e = this._draggingTarget;
  759. e && (e.dragging = !1),
  760. this.handler.dispatchToElement(new Ut(e,t), "dragend", t.event),
  761. this._dropTarget && this.handler.dispatchToElement(new Ut(this._dropTarget,t), "drop", t.event),
  762. this._draggingTarget = null,
  763. this._dropTarget = null
  764. }
  765. ,
  766. t
  767. }()
  768. , jt = function() {
  769. function t(t) {
  770. t && (this._$eventProcessor = t)
  771. }
  772. return t.prototype.on = function(t, e, n, i) {
  773. this._$handlers || (this._$handlers = {});
  774. var r = this._$handlers;
  775. if ("function" == typeof e && (i = n,
  776. n = e,
  777. e = null),
  778. !n || !t)
  779. return this;
  780. var o = this._$eventProcessor;
  781. null != e && o && o.normalizeQuery && (e = o.normalizeQuery(e)),
  782. r[t] || (r[t] = []);
  783. for (var a = 0; a < r[t].length; a++)
  784. if (r[t][a].h === n)
  785. return this;
  786. var s = {
  787. h: n,
  788. query: e,
  789. ctx: i || this,
  790. callAtLast: n.zrEventfulCallAtLast
  791. }
  792. , l = r[t].length - 1
  793. , u = r[t][l];
  794. return u && u.callAtLast ? r[t].splice(l, 0, s) : r[t].push(s),
  795. this
  796. }
  797. ,
  798. t.prototype.isSilent = function(t) {
  799. var e = this._$handlers;
  800. return !e || !e[t] || !e[t].length
  801. }
  802. ,
  803. t.prototype.off = function(t, e) {
  804. var n = this._$handlers;
  805. if (!n)
  806. return this;
  807. if (!t)
  808. return this._$handlers = {},
  809. this;
  810. if (e) {
  811. if (n[t]) {
  812. for (var i = [], r = 0, o = n[t].length; r < o; r++)
  813. n[t][r].h !== e && i.push(n[t][r]);
  814. n[t] = i
  815. }
  816. n[t] && 0 === n[t].length && delete n[t]
  817. } else
  818. delete n[t];
  819. return this
  820. }
  821. ,
  822. t.prototype.trigger = function(t) {
  823. for (var e = [], n = 1; n < arguments.length; n++)
  824. e[n - 1] = arguments[n];
  825. if (!this._$handlers)
  826. return this;
  827. var i = this._$handlers[t]
  828. , r = this._$eventProcessor;
  829. if (i)
  830. for (var o = e.length, a = i.length, s = 0; s < a; s++) {
  831. var l = i[s];
  832. if (!r || !r.filter || null == l.query || r.filter(t, l.query))
  833. switch (o) {
  834. case 0:
  835. l.h.call(l.ctx);
  836. break;
  837. case 1:
  838. l.h.call(l.ctx, e[0]);
  839. break;
  840. case 2:
  841. l.h.call(l.ctx, e[0], e[1]);
  842. break;
  843. default:
  844. l.h.apply(l.ctx, e)
  845. }
  846. }
  847. return r && r.afterTrigger && r.afterTrigger(t),
  848. this
  849. }
  850. ,
  851. t.prototype.triggerWithContext = function(t) {
  852. for (var e = [], n = 1; n < arguments.length; n++)
  853. e[n - 1] = arguments[n];
  854. if (!this._$handlers)
  855. return this;
  856. var i = this._$handlers[t]
  857. , r = this._$eventProcessor;
  858. if (i)
  859. for (var o = e.length, a = e[o - 1], s = i.length, l = 0; l < s; l++) {
  860. var u = i[l];
  861. if (!r || !r.filter || null == u.query || r.filter(t, u.query))
  862. switch (o) {
  863. case 0:
  864. u.h.call(a);
  865. break;
  866. case 1:
  867. u.h.call(a, e[0]);
  868. break;
  869. case 2:
  870. u.h.call(a, e[0], e[1]);
  871. break;
  872. default:
  873. u.h.apply(a, e.slice(1, o - 1))
  874. }
  875. }
  876. return r && r.afterTrigger && r.afterTrigger(t),
  877. this
  878. }
  879. ,
  880. t
  881. }()
  882. , qt = Math.log(2);
  883. function Kt(t, e, n, i, r, o) {
  884. var a = i + "-" + r
  885. , s = t.length;
  886. if (o.hasOwnProperty(a))
  887. return o[a];
  888. if (1 === e) {
  889. var l = Math.round(Math.log((1 << s) - 1 & ~r) / qt);
  890. return t[n][l]
  891. }
  892. for (var u = i | 1 << n, h = n + 1; i & 1 << h; )
  893. h++;
  894. for (var c = 0, p = 0, d = 0; p < s; p++) {
  895. var f = 1 << p;
  896. f & r || (c += (d % 2 ? -1 : 1) * t[n][p] * Kt(t, e - 1, h, u, r | f, o),
  897. d++)
  898. }
  899. return o[a] = c,
  900. c
  901. }
  902. function $t(t, e) {
  903. var n = [[t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]], [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]], [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]], [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]], [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]], [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]], [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]], [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]]
  904. , i = {}
  905. , r = Kt(n, 8, 0, 0, 0, i);
  906. if (0 !== r) {
  907. for (var o = [], a = 0; a < 8; a++)
  908. for (var s = 0; s < 8; s++)
  909. null == o[s] && (o[s] = 0),
  910. o[s] += ((a + s) % 2 ? -1 : 1) * Kt(n, 7, 0 === a ? 1 : 0, 1 << a, 1 << s, i) / r * e[a];
  911. return function(t, e, n) {
  912. var i = e * o[6] + n * o[7] + 1;
  913. t[0] = (e * o[0] + n * o[1] + o[2]) / i,
  914. t[1] = (e * o[3] + n * o[4] + o[5]) / i
  915. }
  916. }
  917. }
  918. var Jt = "___zrEVENTSAVED"
  919. , Qt = [];
  920. function te(t, e, n, i, o) {
  921. if (e.getBoundingClientRect && r.domSupported && !ee(e)) {
  922. var a = e[Jt] || (e[Jt] = {})
  923. , s = function(t, e) {
  924. var n = e.markers;
  925. if (n)
  926. return n;
  927. n = e.markers = [];
  928. for (var i = ["left", "right"], r = ["top", "bottom"], o = 0; o < 4; o++) {
  929. var a = document.createElement("div")
  930. , s = o % 2
  931. , l = (o >> 1) % 2;
  932. 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;"),
  933. t.appendChild(a),
  934. n.push(a)
  935. }
  936. return n
  937. }(e, a)
  938. , l = function(t, e, n) {
  939. for (var i = n ? "invTrans" : "trans", r = e[i], o = e.srcCoords, a = [], s = [], l = !0, u = 0; u < 4; u++) {
  940. var h = t[u].getBoundingClientRect()
  941. , c = 2 * u
  942. , p = h.left
  943. , d = h.top;
  944. a.push(p, d),
  945. l = l && o && p === o[c] && d === o[c + 1],
  946. s.push(t[u].offsetLeft, t[u].offsetTop)
  947. }
  948. return l && r ? r : (e.srcCoords = a,
  949. e[i] = n ? $t(s, a) : $t(a, s))
  950. }(s, a, o);
  951. if (l)
  952. return l(t, n, i),
  953. !0
  954. }
  955. return !1
  956. }
  957. function ee(t) {
  958. return "CANVAS" === t.nodeName.toUpperCase()
  959. }
  960. var ne = /([&<>"'])/g
  961. , ie = {
  962. "&": "&amp;",
  963. "<": "&lt;",
  964. ">": "&gt;",
  965. '"': "&quot;",
  966. "'": "&#39;"
  967. };
  968. function re(t) {
  969. return null == t ? "" : (t + "").replace(ne, (function(t, e) {
  970. return ie[e]
  971. }
  972. ))
  973. }
  974. var oe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/
  975. , ae = []
  976. , se = r.browser.firefox && +r.browser.version.split(".")[0] < 39;
  977. function le(t, e, n, i) {
  978. return n = n || {},
  979. i ? ue(t, e, n) : se && null != e.layerX && e.layerX !== e.offsetX ? (n.zrX = e.layerX,
  980. n.zrY = e.layerY) : null != e.offsetX ? (n.zrX = e.offsetX,
  981. n.zrY = e.offsetY) : ue(t, e, n),
  982. n
  983. }
  984. function ue(t, e, n) {
  985. if (r.domSupported && t.getBoundingClientRect) {
  986. var i = e.clientX
  987. , o = e.clientY;
  988. if (ee(t)) {
  989. var a = t.getBoundingClientRect();
  990. return n.zrX = i - a.left,
  991. void (n.zrY = o - a.top)
  992. }
  993. if (te(ae, t, i, o))
  994. return n.zrX = ae[0],
  995. void (n.zrY = ae[1])
  996. }
  997. n.zrX = n.zrY = 0
  998. }
  999. function he(t) {
  1000. return t || window.event
  1001. }
  1002. function ce(t, e, n) {
  1003. if (null != (e = he(e)).zrX)
  1004. return e;
  1005. var i = e.type;
  1006. if (i && i.indexOf("touch") >= 0) {
  1007. var r = "touchend" !== i ? e.targetTouches[0] : e.changedTouches[0];
  1008. r && le(t, r, e, n)
  1009. } else {
  1010. le(t, e, e, n);
  1011. var o = function(t) {
  1012. var e = t.wheelDelta;
  1013. if (e)
  1014. return e;
  1015. var n = t.deltaX
  1016. , i = t.deltaY;
  1017. if (null == n || null == i)
  1018. return e;
  1019. return 3 * (0 !== i ? Math.abs(i) : Math.abs(n)) * (i > 0 ? -1 : i < 0 ? 1 : n > 0 ? -1 : 1)
  1020. }(e);
  1021. e.zrDelta = o ? o / 120 : -(e.detail || 0) / 3
  1022. }
  1023. var a = e.button;
  1024. return null == e.which && void 0 !== a && oe.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0),
  1025. e
  1026. }
  1027. function pe(t, e, n, i) {
  1028. t.addEventListener(e, n, i)
  1029. }
  1030. var de = function(t) {
  1031. t.preventDefault(),
  1032. t.stopPropagation(),
  1033. t.cancelBubble = !0
  1034. };
  1035. function fe(t) {
  1036. return 2 === t.which || 3 === t.which
  1037. }
  1038. var ge = function() {
  1039. function t() {
  1040. this._track = []
  1041. }
  1042. return t.prototype.recognize = function(t, e, n) {
  1043. return this._doTrack(t, e, n),
  1044. this._recognize(t)
  1045. }
  1046. ,
  1047. t.prototype.clear = function() {
  1048. return this._track.length = 0,
  1049. this
  1050. }
  1051. ,
  1052. t.prototype._doTrack = function(t, e, n) {
  1053. var i = t.touches;
  1054. if (i) {
  1055. for (var r = {
  1056. points: [],
  1057. touches: [],
  1058. target: e,
  1059. event: t
  1060. }, o = 0, a = i.length; o < a; o++) {
  1061. var s = i[o]
  1062. , l = le(n, s, {});
  1063. r.points.push([l.zrX, l.zrY]),
  1064. r.touches.push(s)
  1065. }
  1066. this._track.push(r)
  1067. }
  1068. }
  1069. ,
  1070. t.prototype._recognize = function(t) {
  1071. for (var e in ve)
  1072. if (ve.hasOwnProperty(e)) {
  1073. var n = ve[e](this._track, t);
  1074. if (n)
  1075. return n
  1076. }
  1077. }
  1078. ,
  1079. t
  1080. }();
  1081. function ye(t) {
  1082. var e = t[1][0] - t[0][0]
  1083. , n = t[1][1] - t[0][1];
  1084. return Math.sqrt(e * e + n * n)
  1085. }
  1086. var ve = {
  1087. pinch: function(t, e) {
  1088. var n = t.length;
  1089. if (n) {
  1090. var i, r = (t[n - 1] || {}).points, o = (t[n - 2] || {}).points || r;
  1091. if (o && o.length > 1 && r && r.length > 1) {
  1092. var a = ye(r) / ye(o);
  1093. !isFinite(a) && (a = 1),
  1094. e.pinchScale = a;
  1095. var s = [((i = r)[0][0] + i[1][0]) / 2, (i[0][1] + i[1][1]) / 2];
  1096. return e.pinchX = s[0],
  1097. e.pinchY = s[1],
  1098. {
  1099. type: "pinch",
  1100. target: t[0].target,
  1101. event: e
  1102. }
  1103. }
  1104. }
  1105. }
  1106. };
  1107. function me() {
  1108. return [1, 0, 0, 1, 0, 0]
  1109. }
  1110. function xe(t) {
  1111. return t[0] = 1,
  1112. t[1] = 0,
  1113. t[2] = 0,
  1114. t[3] = 1,
  1115. t[4] = 0,
  1116. t[5] = 0,
  1117. t
  1118. }
  1119. function _e(t, e) {
  1120. return t[0] = e[0],
  1121. t[1] = e[1],
  1122. t[2] = e[2],
  1123. t[3] = e[3],
  1124. t[4] = e[4],
  1125. t[5] = e[5],
  1126. t
  1127. }
  1128. function be(t, e, n) {
  1129. var i = e[0] * n[0] + e[2] * n[1]
  1130. , r = e[1] * n[0] + e[3] * n[1]
  1131. , o = e[0] * n[2] + e[2] * n[3]
  1132. , a = e[1] * n[2] + e[3] * n[3]
  1133. , s = e[0] * n[4] + e[2] * n[5] + e[4]
  1134. , l = e[1] * n[4] + e[3] * n[5] + e[5];
  1135. return t[0] = i,
  1136. t[1] = r,
  1137. t[2] = o,
  1138. t[3] = a,
  1139. t[4] = s,
  1140. t[5] = l,
  1141. t
  1142. }
  1143. function we(t, e, n) {
  1144. return t[0] = e[0],
  1145. t[1] = e[1],
  1146. t[2] = e[2],
  1147. t[3] = e[3],
  1148. t[4] = e[4] + n[0],
  1149. t[5] = e[5] + n[1],
  1150. t
  1151. }
  1152. function Se(t, e, n, i) {
  1153. void 0 === i && (i = [0, 0]);
  1154. var r = e[0]
  1155. , o = e[2]
  1156. , a = e[4]
  1157. , s = e[1]
  1158. , l = e[3]
  1159. , u = e[5]
  1160. , h = Math.sin(n)
  1161. , c = Math.cos(n);
  1162. return t[0] = r * c + s * h,
  1163. t[1] = -r * h + s * c,
  1164. t[2] = o * c + l * h,
  1165. t[3] = -o * h + c * l,
  1166. t[4] = c * (a - i[0]) + h * (u - i[1]) + i[0],
  1167. t[5] = c * (u - i[1]) - h * (a - i[0]) + i[1],
  1168. t
  1169. }
  1170. function Me(t, e, n) {
  1171. var i = n[0]
  1172. , r = n[1];
  1173. return t[0] = e[0] * i,
  1174. t[1] = e[1] * r,
  1175. t[2] = e[2] * i,
  1176. t[3] = e[3] * r,
  1177. t[4] = e[4] * i,
  1178. t[5] = e[5] * r,
  1179. t
  1180. }
  1181. function Ie(t, e) {
  1182. var n = e[0]
  1183. , i = e[2]
  1184. , r = e[4]
  1185. , o = e[1]
  1186. , a = e[3]
  1187. , s = e[5]
  1188. , l = n * a - o * i;
  1189. return l ? (l = 1 / l,
  1190. t[0] = a * l,
  1191. t[1] = -o * l,
  1192. t[2] = -i * l,
  1193. t[3] = n * l,
  1194. t[4] = (i * s - a * r) * l,
  1195. t[5] = (o * r - n * s) * l,
  1196. t) : null
  1197. }
  1198. function Te(t) {
  1199. var e = [1, 0, 0, 1, 0, 0];
  1200. return _e(e, t),
  1201. e
  1202. }
  1203. var Ce = Object.freeze({
  1204. __proto__: null,
  1205. create: me,
  1206. identity: xe,
  1207. copy: _e,
  1208. mul: be,
  1209. translate: we,
  1210. rotate: Se,
  1211. scale: Me,
  1212. invert: Ie,
  1213. clone: Te
  1214. })
  1215. , De = function() {
  1216. function t(t, e) {
  1217. this.x = t || 0,
  1218. this.y = e || 0
  1219. }
  1220. return t.prototype.copy = function(t) {
  1221. return this.x = t.x,
  1222. this.y = t.y,
  1223. this
  1224. }
  1225. ,
  1226. t.prototype.clone = function() {
  1227. return new t(this.x,this.y)
  1228. }
  1229. ,
  1230. t.prototype.set = function(t, e) {
  1231. return this.x = t,
  1232. this.y = e,
  1233. this
  1234. }
  1235. ,
  1236. t.prototype.equal = function(t) {
  1237. return t.x === this.x && t.y === this.y
  1238. }
  1239. ,
  1240. t.prototype.add = function(t) {
  1241. return this.x += t.x,
  1242. this.y += t.y,
  1243. this
  1244. }
  1245. ,
  1246. t.prototype.scale = function(t) {
  1247. this.x *= t,
  1248. this.y *= t
  1249. }
  1250. ,
  1251. t.prototype.scaleAndAdd = function(t, e) {
  1252. this.x += t.x * e,
  1253. this.y += t.y * e
  1254. }
  1255. ,
  1256. t.prototype.sub = function(t) {
  1257. return this.x -= t.x,
  1258. this.y -= t.y,
  1259. this
  1260. }
  1261. ,
  1262. t.prototype.dot = function(t) {
  1263. return this.x * t.x + this.y * t.y
  1264. }
  1265. ,
  1266. t.prototype.len = function() {
  1267. return Math.sqrt(this.x * this.x + this.y * this.y)
  1268. }
  1269. ,
  1270. t.prototype.lenSquare = function() {
  1271. return this.x * this.x + this.y * this.y
  1272. }
  1273. ,
  1274. t.prototype.normalize = function() {
  1275. var t = this.len();
  1276. return this.x /= t,
  1277. this.y /= t,
  1278. this
  1279. }
  1280. ,
  1281. t.prototype.distance = function(t) {
  1282. var e = this.x - t.x
  1283. , n = this.y - t.y;
  1284. return Math.sqrt(e * e + n * n)
  1285. }
  1286. ,
  1287. t.prototype.distanceSquare = function(t) {
  1288. var e = this.x - t.x
  1289. , n = this.y - t.y;
  1290. return e * e + n * n
  1291. }
  1292. ,
  1293. t.prototype.negate = function() {
  1294. return this.x = -this.x,
  1295. this.y = -this.y,
  1296. this
  1297. }
  1298. ,
  1299. t.prototype.transform = function(t) {
  1300. if (t) {
  1301. var e = this.x
  1302. , n = this.y;
  1303. return this.x = t[0] * e + t[2] * n + t[4],
  1304. this.y = t[1] * e + t[3] * n + t[5],
  1305. this
  1306. }
  1307. }
  1308. ,
  1309. t.prototype.toArray = function(t) {
  1310. return t[0] = this.x,
  1311. t[1] = this.y,
  1312. t
  1313. }
  1314. ,
  1315. t.prototype.fromArray = function(t) {
  1316. this.x = t[0],
  1317. this.y = t[1]
  1318. }
  1319. ,
  1320. t.set = function(t, e, n) {
  1321. t.x = e,
  1322. t.y = n
  1323. }
  1324. ,
  1325. t.copy = function(t, e) {
  1326. t.x = e.x,
  1327. t.y = e.y
  1328. }
  1329. ,
  1330. t.len = function(t) {
  1331. return Math.sqrt(t.x * t.x + t.y * t.y)
  1332. }
  1333. ,
  1334. t.lenSquare = function(t) {
  1335. return t.x * t.x + t.y * t.y
  1336. }
  1337. ,
  1338. t.dot = function(t, e) {
  1339. return t.x * e.x + t.y * e.y
  1340. }
  1341. ,
  1342. t.add = function(t, e, n) {
  1343. t.x = e.x + n.x,
  1344. t.y = e.y + n.y
  1345. }
  1346. ,
  1347. t.sub = function(t, e, n) {
  1348. t.x = e.x - n.x,
  1349. t.y = e.y - n.y
  1350. }
  1351. ,
  1352. t.scale = function(t, e, n) {
  1353. t.x = e.x * n,
  1354. t.y = e.y * n
  1355. }
  1356. ,
  1357. t.scaleAndAdd = function(t, e, n, i) {
  1358. t.x = e.x + n.x * i,
  1359. t.y = e.y + n.y * i
  1360. }
  1361. ,
  1362. t.lerp = function(t, e, n, i) {
  1363. var r = 1 - i;
  1364. t.x = r * e.x + i * n.x,
  1365. t.y = r * e.y + i * n.y
  1366. }
  1367. ,
  1368. t
  1369. }()
  1370. , Ae = Math.min
  1371. , ke = Math.max
  1372. , Le = new De
  1373. , Pe = new De
  1374. , Oe = new De
  1375. , Re = new De
  1376. , Ne = new De
  1377. , Ee = new De
  1378. , ze = function() {
  1379. function t(t, e, n, i) {
  1380. n < 0 && (t += n,
  1381. n = -n),
  1382. i < 0 && (e += i,
  1383. i = -i),
  1384. this.x = t,
  1385. this.y = e,
  1386. this.width = n,
  1387. this.height = i
  1388. }
  1389. return t.prototype.union = function(t) {
  1390. var e = Ae(t.x, this.x)
  1391. , n = Ae(t.y, this.y);
  1392. isFinite(this.x) && isFinite(this.width) ? this.width = ke(t.x + t.width, this.x + this.width) - e : this.width = t.width,
  1393. isFinite(this.y) && isFinite(this.height) ? this.height = ke(t.y + t.height, this.y + this.height) - n : this.height = t.height,
  1394. this.x = e,
  1395. this.y = n
  1396. }
  1397. ,
  1398. t.prototype.applyTransform = function(e) {
  1399. t.applyTransform(this, this, e)
  1400. }
  1401. ,
  1402. t.prototype.calculateTransform = function(t) {
  1403. var e = this
  1404. , n = t.width / e.width
  1405. , i = t.height / e.height
  1406. , r = [1, 0, 0, 1, 0, 0];
  1407. return we(r, r, [-e.x, -e.y]),
  1408. Me(r, r, [n, i]),
  1409. we(r, r, [t.x, t.y]),
  1410. r
  1411. }
  1412. ,
  1413. t.prototype.intersect = function(e, n) {
  1414. if (!e)
  1415. return !1;
  1416. e instanceof t || (e = t.create(e));
  1417. var i = this
  1418. , r = i.x
  1419. , o = i.x + i.width
  1420. , a = i.y
  1421. , s = i.y + i.height
  1422. , l = e.x
  1423. , u = e.x + e.width
  1424. , h = e.y
  1425. , c = e.y + e.height
  1426. , p = !(o < l || u < r || s < h || c < a);
  1427. if (n) {
  1428. var d = 1 / 0
  1429. , f = 0
  1430. , g = Math.abs(o - l)
  1431. , y = Math.abs(u - r)
  1432. , v = Math.abs(s - h)
  1433. , m = Math.abs(c - a)
  1434. , x = Math.min(g, y)
  1435. , _ = Math.min(v, m);
  1436. o < l || u < r ? x > f && (f = x,
  1437. g < y ? De.set(Ee, -g, 0) : De.set(Ee, y, 0)) : x < d && (d = x,
  1438. g < y ? De.set(Ne, g, 0) : De.set(Ne, -y, 0)),
  1439. s < h || c < a ? _ > f && (f = _,
  1440. v < m ? De.set(Ee, 0, -v) : De.set(Ee, 0, m)) : x < d && (d = x,
  1441. v < m ? De.set(Ne, 0, v) : De.set(Ne, 0, -m))
  1442. }
  1443. return n && De.copy(n, p ? Ne : Ee),
  1444. p
  1445. }
  1446. ,
  1447. t.prototype.contain = function(t, e) {
  1448. var n = this;
  1449. return t >= n.x && t <= n.x + n.width && e >= n.y && e <= n.y + n.height
  1450. }
  1451. ,
  1452. t.prototype.clone = function() {
  1453. return new t(this.x,this.y,this.width,this.height)
  1454. }
  1455. ,
  1456. t.prototype.copy = function(e) {
  1457. t.copy(this, e)
  1458. }
  1459. ,
  1460. t.prototype.plain = function() {
  1461. return {
  1462. x: this.x,
  1463. y: this.y,
  1464. width: this.width,
  1465. height: this.height
  1466. }
  1467. }
  1468. ,
  1469. t.prototype.isFinite = function() {
  1470. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height)
  1471. }
  1472. ,
  1473. t.prototype.isZero = function() {
  1474. return 0 === this.width || 0 === this.height
  1475. }
  1476. ,
  1477. t.create = function(e) {
  1478. return new t(e.x,e.y,e.width,e.height)
  1479. }
  1480. ,
  1481. t.copy = function(t, e) {
  1482. t.x = e.x,
  1483. t.y = e.y,
  1484. t.width = e.width,
  1485. t.height = e.height
  1486. }
  1487. ,
  1488. t.applyTransform = function(e, n, i) {
  1489. if (i) {
  1490. if (i[1] < 1e-5 && i[1] > -1e-5 && i[2] < 1e-5 && i[2] > -1e-5) {
  1491. var r = i[0]
  1492. , o = i[3]
  1493. , a = i[4]
  1494. , s = i[5];
  1495. return e.x = n.x * r + a,
  1496. e.y = n.y * o + s,
  1497. e.width = n.width * r,
  1498. e.height = n.height * o,
  1499. e.width < 0 && (e.x += e.width,
  1500. e.width = -e.width),
  1501. void (e.height < 0 && (e.y += e.height,
  1502. e.height = -e.height))
  1503. }
  1504. Le.x = Oe.x = n.x,
  1505. Le.y = Re.y = n.y,
  1506. Pe.x = Re.x = n.x + n.width,
  1507. Pe.y = Oe.y = n.y + n.height,
  1508. Le.transform(i),
  1509. Re.transform(i),
  1510. Pe.transform(i),
  1511. Oe.transform(i),
  1512. e.x = Ae(Le.x, Pe.x, Oe.x, Re.x),
  1513. e.y = Ae(Le.y, Pe.y, Oe.y, Re.y);
  1514. var l = ke(Le.x, Pe.x, Oe.x, Re.x)
  1515. , u = ke(Le.y, Pe.y, Oe.y, Re.y);
  1516. e.width = l - e.x,
  1517. e.height = u - e.y
  1518. } else
  1519. e !== n && t.copy(e, n)
  1520. }
  1521. ,
  1522. t
  1523. }()
  1524. , Ve = "silent";
  1525. function Be() {
  1526. de(this.event)
  1527. }
  1528. var Fe = function(t) {
  1529. function e() {
  1530. var e = null !== t && t.apply(this, arguments) || this;
  1531. return e.handler = null,
  1532. e
  1533. }
  1534. return n(e, t),
  1535. e.prototype.dispose = function() {}
  1536. ,
  1537. e.prototype.setCursor = function() {}
  1538. ,
  1539. e
  1540. }(jt)
  1541. , Ge = function(t, e) {
  1542. this.x = t,
  1543. this.y = e
  1544. }
  1545. , We = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"]
  1546. , He = new ze(0,0,0,0)
  1547. , Ye = function(t) {
  1548. function e(e, n, i, r, o) {
  1549. var a = t.call(this) || this;
  1550. return a._hovered = new Ge(0,0),
  1551. a.storage = e,
  1552. a.painter = n,
  1553. a.painterRoot = r,
  1554. a._pointerSize = o,
  1555. i = i || new Fe,
  1556. a.proxy = null,
  1557. a.setHandlerProxy(i),
  1558. a._draggingMgr = new Zt(a),
  1559. a
  1560. }
  1561. return n(e, t),
  1562. e.prototype.setHandlerProxy = function(t) {
  1563. this.proxy && this.proxy.dispose(),
  1564. t && (E(We, (function(e) {
  1565. t.on && t.on(e, this[e], this)
  1566. }
  1567. ), this),
  1568. t.handler = this),
  1569. this.proxy = t
  1570. }
  1571. ,
  1572. e.prototype.mousemove = function(t) {
  1573. var e = t.zrX
  1574. , n = t.zrY
  1575. , i = Ze(this, e, n)
  1576. , r = this._hovered
  1577. , o = r.target;
  1578. o && !o.__zr && (o = (r = this.findHover(r.x, r.y)).target);
  1579. var a = this._hovered = i ? new Ge(e,n) : this.findHover(e, n)
  1580. , s = a.target
  1581. , l = this.proxy;
  1582. l.setCursor && l.setCursor(s ? s.cursor : "default"),
  1583. o && s !== o && this.dispatchToElement(r, "mouseout", t),
  1584. this.dispatchToElement(a, "mousemove", t),
  1585. s && s !== o && this.dispatchToElement(a, "mouseover", t)
  1586. }
  1587. ,
  1588. e.prototype.mouseout = function(t) {
  1589. var e = t.zrEventControl;
  1590. "only_globalout" !== e && this.dispatchToElement(this._hovered, "mouseout", t),
  1591. "no_globalout" !== e && this.trigger("globalout", {
  1592. type: "globalout",
  1593. event: t
  1594. })
  1595. }
  1596. ,
  1597. e.prototype.resize = function() {
  1598. this._hovered = new Ge(0,0)
  1599. }
  1600. ,
  1601. e.prototype.dispatch = function(t, e) {
  1602. var n = this[t];
  1603. n && n.call(this, e)
  1604. }
  1605. ,
  1606. e.prototype.dispose = function() {
  1607. this.proxy.dispose(),
  1608. this.storage = null,
  1609. this.proxy = null,
  1610. this.painter = null
  1611. }
  1612. ,
  1613. e.prototype.setCursorStyle = function(t) {
  1614. var e = this.proxy;
  1615. e.setCursor && e.setCursor(t)
  1616. }
  1617. ,
  1618. e.prototype.dispatchToElement = function(t, e, n) {
  1619. var i = (t = t || {}).target;
  1620. if (!i || !i.silent) {
  1621. for (var r = "on" + e, o = function(t, e, n) {
  1622. return {
  1623. type: t,
  1624. event: n,
  1625. target: e.target,
  1626. topTarget: e.topTarget,
  1627. cancelBubble: !1,
  1628. offsetX: n.zrX,
  1629. offsetY: n.zrY,
  1630. gestureEvent: n.gestureEvent,
  1631. pinchX: n.pinchX,
  1632. pinchY: n.pinchY,
  1633. pinchScale: n.pinchScale,
  1634. wheelDelta: n.zrDelta,
  1635. zrByTouch: n.zrByTouch,
  1636. which: n.which,
  1637. stop: Be
  1638. }
  1639. }(e, t, n); i && (i[r] && (o.cancelBubble = !!i[r].call(i, o)),
  1640. i.trigger(e, o),
  1641. i = i.__hostTarget ? i.__hostTarget : i.parent,
  1642. !o.cancelBubble); )
  1643. ;
  1644. o.cancelBubble || (this.trigger(e, o),
  1645. this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer((function(t) {
  1646. "function" == typeof t[r] && t[r].call(t, o),
  1647. t.trigger && t.trigger(e, o)
  1648. }
  1649. )))
  1650. }
  1651. }
  1652. ,
  1653. e.prototype.findHover = function(t, e, n) {
  1654. var i = this.storage.getDisplayList()
  1655. , r = new Ge(t,e);
  1656. if (Ue(i, r, t, e, n),
  1657. this._pointerSize && !r.target) {
  1658. 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--) {
  1659. var h = i[u];
  1660. h === n || h.ignore || h.ignoreCoarsePointer || h.parent && h.parent.ignoreCoarsePointer || (He.copy(h.getBoundingRect()),
  1661. h.transform && He.applyTransform(h.transform),
  1662. He.intersect(l) && o.push(h))
  1663. }
  1664. if (o.length)
  1665. for (var c = Math.PI / 12, p = 2 * Math.PI, d = 0; d < s; d += 4)
  1666. for (var f = 0; f < p; f += c) {
  1667. if (Ue(o, r, t + d * Math.cos(f), e + d * Math.sin(f), n),
  1668. r.target)
  1669. return r
  1670. }
  1671. }
  1672. return r
  1673. }
  1674. ,
  1675. e.prototype.processGesture = function(t, e) {
  1676. this._gestureMgr || (this._gestureMgr = new ge);
  1677. var n = this._gestureMgr;
  1678. "start" === e && n.clear();
  1679. var i = n.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
  1680. if ("end" === e && n.clear(),
  1681. i) {
  1682. var r = i.type;
  1683. t.gestureEvent = r;
  1684. var o = new Ge;
  1685. o.target = i.target,
  1686. this.dispatchToElement(o, r, i.event)
  1687. }
  1688. }
  1689. ,
  1690. e
  1691. }(jt);
  1692. function Xe(t, e, n) {
  1693. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  1694. for (var i = t, r = void 0, o = !1; i; ) {
  1695. if (i.ignoreClip && (o = !0),
  1696. !o) {
  1697. var a = i.getClipPath();
  1698. if (a && !a.contain(e, n))
  1699. return !1
  1700. }
  1701. i.silent && (r = !0);
  1702. var s = i.__hostTarget;
  1703. i = s || i.parent
  1704. }
  1705. return !r || Ve
  1706. }
  1707. return !1
  1708. }
  1709. function Ue(t, e, n, i, r) {
  1710. for (var o = t.length - 1; o >= 0; o--) {
  1711. var a = t[o]
  1712. , s = void 0;
  1713. if (a !== r && !a.ignore && (s = Xe(a, n, i)) && (!e.topTarget && (e.topTarget = a),
  1714. s !== Ve)) {
  1715. e.target = a;
  1716. break
  1717. }
  1718. }
  1719. }
  1720. function Ze(t, e, n) {
  1721. var i = t.painter;
  1722. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  1723. }
  1724. E(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], (function(t) {
  1725. Ye.prototype[t] = function(e) {
  1726. var n, i, r = e.zrX, o = e.zrY, a = Ze(this, r, o);
  1727. if ("mouseup" === t && a || (i = (n = this.findHover(r, o)).target),
  1728. "mousedown" === t)
  1729. this._downEl = i,
  1730. this._downPoint = [e.zrX, e.zrY],
  1731. this._upEl = i;
  1732. else if ("mouseup" === t)
  1733. this._upEl = i;
  1734. else if ("click" === t) {
  1735. if (this._downEl !== this._upEl || !this._downPoint || Vt(this._downPoint, [e.zrX, e.zrY]) > 4)
  1736. return;
  1737. this._downPoint = null
  1738. }
  1739. this.dispatchToElement(n, t, e)
  1740. }
  1741. }
  1742. ));
  1743. function je(t, e, n, i) {
  1744. var r = e + 1;
  1745. if (r === n)
  1746. return 1;
  1747. if (i(t[r++], t[e]) < 0) {
  1748. for (; r < n && i(t[r], t[r - 1]) < 0; )
  1749. r++;
  1750. !function(t, e, n) {
  1751. n--;
  1752. for (; e < n; ) {
  1753. var i = t[e];
  1754. t[e++] = t[n],
  1755. t[n--] = i
  1756. }
  1757. }(t, e, r)
  1758. } else
  1759. for (; r < n && i(t[r], t[r - 1]) >= 0; )
  1760. r++;
  1761. return r - e
  1762. }
  1763. function qe(t, e, n, i, r) {
  1764. for (i === e && i++; i < n; i++) {
  1765. for (var o, a = t[i], s = e, l = i; s < l; )
  1766. r(a, t[o = s + l >>> 1]) < 0 ? l = o : s = o + 1;
  1767. var u = i - s;
  1768. switch (u) {
  1769. case 3:
  1770. t[s + 3] = t[s + 2];
  1771. case 2:
  1772. t[s + 2] = t[s + 1];
  1773. case 1:
  1774. t[s + 1] = t[s];
  1775. break;
  1776. default:
  1777. for (; u > 0; )
  1778. t[s + u] = t[s + u - 1],
  1779. u--
  1780. }
  1781. t[s] = a
  1782. }
  1783. }
  1784. function Ke(t, e, n, i, r, o) {
  1785. var a = 0
  1786. , s = 0
  1787. , l = 1;
  1788. if (o(t, e[n + r]) > 0) {
  1789. for (s = i - r; l < s && o(t, e[n + r + l]) > 0; )
  1790. a = l,
  1791. (l = 1 + (l << 1)) <= 0 && (l = s);
  1792. l > s && (l = s),
  1793. a += r,
  1794. l += r
  1795. } else {
  1796. for (s = r + 1; l < s && o(t, e[n + r - l]) <= 0; )
  1797. a = l,
  1798. (l = 1 + (l << 1)) <= 0 && (l = s);
  1799. l > s && (l = s);
  1800. var u = a;
  1801. a = r - l,
  1802. l = r - u
  1803. }
  1804. for (a++; a < l; ) {
  1805. var h = a + (l - a >>> 1);
  1806. o(t, e[n + h]) > 0 ? a = h + 1 : l = h
  1807. }
  1808. return l
  1809. }
  1810. function $e(t, e, n, i, r, o) {
  1811. var a = 0
  1812. , s = 0
  1813. , l = 1;
  1814. if (o(t, e[n + r]) < 0) {
  1815. for (s = r + 1; l < s && o(t, e[n + r - l]) < 0; )
  1816. a = l,
  1817. (l = 1 + (l << 1)) <= 0 && (l = s);
  1818. l > s && (l = s);
  1819. var u = a;
  1820. a = r - l,
  1821. l = r - u
  1822. } else {
  1823. for (s = i - r; l < s && o(t, e[n + r + l]) >= 0; )
  1824. a = l,
  1825. (l = 1 + (l << 1)) <= 0 && (l = s);
  1826. l > s && (l = s),
  1827. a += r,
  1828. l += r
  1829. }
  1830. for (a++; a < l; ) {
  1831. var h = a + (l - a >>> 1);
  1832. o(t, e[n + h]) < 0 ? l = h : a = h + 1
  1833. }
  1834. return l
  1835. }
  1836. function Je(t, e) {
  1837. var n, i, r = 7, o = 0, a = [];
  1838. function s(s) {
  1839. var l = n[s]
  1840. , u = i[s]
  1841. , h = n[s + 1]
  1842. , c = i[s + 1];
  1843. i[s] = u + c,
  1844. s === o - 3 && (n[s + 1] = n[s + 2],
  1845. i[s + 1] = i[s + 2]),
  1846. o--;
  1847. var p = $e(t[h], t, l, u, 0, e);
  1848. l += p,
  1849. 0 !== (u -= p) && 0 !== (c = Ke(t[l + u - 1], t, h, c, c - 1, e)) && (u <= c ? function(n, i, o, s) {
  1850. var l = 0;
  1851. for (l = 0; l < i; l++)
  1852. a[l] = t[n + l];
  1853. var u = 0
  1854. , h = o
  1855. , c = n;
  1856. if (t[c++] = t[h++],
  1857. 0 == --s) {
  1858. for (l = 0; l < i; l++)
  1859. t[c + l] = a[u + l];
  1860. return
  1861. }
  1862. if (1 === i) {
  1863. for (l = 0; l < s; l++)
  1864. t[c + l] = t[h + l];
  1865. return void (t[c + s] = a[u])
  1866. }
  1867. var p, d, f, g = r;
  1868. for (; ; ) {
  1869. p = 0,
  1870. d = 0,
  1871. f = !1;
  1872. do {
  1873. if (e(t[h], a[u]) < 0) {
  1874. if (t[c++] = t[h++],
  1875. d++,
  1876. p = 0,
  1877. 0 == --s) {
  1878. f = !0;
  1879. break
  1880. }
  1881. } else if (t[c++] = a[u++],
  1882. p++,
  1883. d = 0,
  1884. 1 == --i) {
  1885. f = !0;
  1886. break
  1887. }
  1888. } while ((p | d) < g);
  1889. if (f)
  1890. break;
  1891. do {
  1892. if (0 !== (p = $e(t[h], a, u, i, 0, e))) {
  1893. for (l = 0; l < p; l++)
  1894. t[c + l] = a[u + l];
  1895. if (c += p,
  1896. u += p,
  1897. (i -= p) <= 1) {
  1898. f = !0;
  1899. break
  1900. }
  1901. }
  1902. if (t[c++] = t[h++],
  1903. 0 == --s) {
  1904. f = !0;
  1905. break
  1906. }
  1907. if (0 !== (d = Ke(a[u], t, h, s, 0, e))) {
  1908. for (l = 0; l < d; l++)
  1909. t[c + l] = t[h + l];
  1910. if (c += d,
  1911. h += d,
  1912. 0 === (s -= d)) {
  1913. f = !0;
  1914. break
  1915. }
  1916. }
  1917. if (t[c++] = a[u++],
  1918. 1 == --i) {
  1919. f = !0;
  1920. break
  1921. }
  1922. g--
  1923. } while (p >= 7 || d >= 7);
  1924. if (f)
  1925. break;
  1926. g < 0 && (g = 0),
  1927. g += 2
  1928. }
  1929. if ((r = g) < 1 && (r = 1),
  1930. 1 === i) {
  1931. for (l = 0; l < s; l++)
  1932. t[c + l] = t[h + l];
  1933. t[c + s] = a[u]
  1934. } else {
  1935. if (0 === i)
  1936. throw new Error;
  1937. for (l = 0; l < i; l++)
  1938. t[c + l] = a[u + l]
  1939. }
  1940. }(l, u, h, c) : function(n, i, o, s) {
  1941. var l = 0;
  1942. for (l = 0; l < s; l++)
  1943. a[l] = t[o + l];
  1944. var u = n + i - 1
  1945. , h = s - 1
  1946. , c = o + s - 1
  1947. , p = 0
  1948. , d = 0;
  1949. if (t[c--] = t[u--],
  1950. 0 == --i) {
  1951. for (p = c - (s - 1),
  1952. l = 0; l < s; l++)
  1953. t[p + l] = a[l];
  1954. return
  1955. }
  1956. if (1 === s) {
  1957. for (d = (c -= i) + 1,
  1958. p = (u -= i) + 1,
  1959. l = i - 1; l >= 0; l--)
  1960. t[d + l] = t[p + l];
  1961. return void (t[c] = a[h])
  1962. }
  1963. var f = r;
  1964. for (; ; ) {
  1965. var g = 0
  1966. , y = 0
  1967. , v = !1;
  1968. do {
  1969. if (e(a[h], t[u]) < 0) {
  1970. if (t[c--] = t[u--],
  1971. g++,
  1972. y = 0,
  1973. 0 == --i) {
  1974. v = !0;
  1975. break
  1976. }
  1977. } else if (t[c--] = a[h--],
  1978. y++,
  1979. g = 0,
  1980. 1 == --s) {
  1981. v = !0;
  1982. break
  1983. }
  1984. } while ((g | y) < f);
  1985. if (v)
  1986. break;
  1987. do {
  1988. if (0 !== (g = i - $e(a[h], t, n, i, i - 1, e))) {
  1989. for (i -= g,
  1990. d = (c -= g) + 1,
  1991. p = (u -= g) + 1,
  1992. l = g - 1; l >= 0; l--)
  1993. t[d + l] = t[p + l];
  1994. if (0 === i) {
  1995. v = !0;
  1996. break
  1997. }
  1998. }
  1999. if (t[c--] = a[h--],
  2000. 1 == --s) {
  2001. v = !0;
  2002. break
  2003. }
  2004. if (0 !== (y = s - Ke(t[u], a, 0, s, s - 1, e))) {
  2005. for (s -= y,
  2006. d = (c -= y) + 1,
  2007. p = (h -= y) + 1,
  2008. l = 0; l < y; l++)
  2009. t[d + l] = a[p + l];
  2010. if (s <= 1) {
  2011. v = !0;
  2012. break
  2013. }
  2014. }
  2015. if (t[c--] = t[u--],
  2016. 0 == --i) {
  2017. v = !0;
  2018. break
  2019. }
  2020. f--
  2021. } while (g >= 7 || y >= 7);
  2022. if (v)
  2023. break;
  2024. f < 0 && (f = 0),
  2025. f += 2
  2026. }
  2027. (r = f) < 1 && (r = 1);
  2028. if (1 === s) {
  2029. for (d = (c -= i) + 1,
  2030. p = (u -= i) + 1,
  2031. l = i - 1; l >= 0; l--)
  2032. t[d + l] = t[p + l];
  2033. t[c] = a[h]
  2034. } else {
  2035. if (0 === s)
  2036. throw new Error;
  2037. for (p = c - (s - 1),
  2038. l = 0; l < s; l++)
  2039. t[p + l] = a[l]
  2040. }
  2041. }(l, u, h, c))
  2042. }
  2043. return n = [],
  2044. i = [],
  2045. {
  2046. mergeRuns: function() {
  2047. for (; o > 1; ) {
  2048. var t = o - 2;
  2049. if (t >= 1 && i[t - 1] <= i[t] + i[t + 1] || t >= 2 && i[t - 2] <= i[t] + i[t - 1])
  2050. i[t - 1] < i[t + 1] && t--;
  2051. else if (i[t] > i[t + 1])
  2052. break;
  2053. s(t)
  2054. }
  2055. },
  2056. forceMergeRuns: function() {
  2057. for (; o > 1; ) {
  2058. var t = o - 2;
  2059. t > 0 && i[t - 1] < i[t + 1] && t--,
  2060. s(t)
  2061. }
  2062. },
  2063. pushRun: function(t, e) {
  2064. n[o] = t,
  2065. i[o] = e,
  2066. o += 1
  2067. }
  2068. }
  2069. }
  2070. function Qe(t, e, n, i) {
  2071. n || (n = 0),
  2072. i || (i = t.length);
  2073. var r = i - n;
  2074. if (!(r < 2)) {
  2075. var o = 0;
  2076. if (r < 32)
  2077. qe(t, n, i, n + (o = je(t, n, i, e)), e);
  2078. else {
  2079. var a = Je(t, e)
  2080. , s = function(t) {
  2081. for (var e = 0; t >= 32; )
  2082. e |= 1 & t,
  2083. t >>= 1;
  2084. return t + e
  2085. }(r);
  2086. do {
  2087. if ((o = je(t, n, i, e)) < s) {
  2088. var l = r;
  2089. l > s && (l = s),
  2090. qe(t, n, n + l, n + o, e),
  2091. o = l
  2092. }
  2093. a.pushRun(n, o),
  2094. a.mergeRuns(),
  2095. r -= o,
  2096. n += o
  2097. } while (0 !== r);
  2098. a.forceMergeRuns()
  2099. }
  2100. }
  2101. }
  2102. var tn = !1;
  2103. function en() {
  2104. tn || (tn = !0,
  2105. console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))
  2106. }
  2107. function nn(t, e) {
  2108. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
  2109. }
  2110. var rn = function() {
  2111. function t() {
  2112. this._roots = [],
  2113. this._displayList = [],
  2114. this._displayListLen = 0,
  2115. this.displayableSortFunc = nn
  2116. }
  2117. return t.prototype.traverse = function(t, e) {
  2118. for (var n = 0; n < this._roots.length; n++)
  2119. this._roots[n].traverse(t, e)
  2120. }
  2121. ,
  2122. t.prototype.getDisplayList = function(t, e) {
  2123. e = e || !1;
  2124. var n = this._displayList;
  2125. return !t && n.length || this.updateDisplayList(e),
  2126. n
  2127. }
  2128. ,
  2129. t.prototype.updateDisplayList = function(t) {
  2130. this._displayListLen = 0;
  2131. for (var e = this._roots, n = this._displayList, i = 0, r = e.length; i < r; i++)
  2132. this._updateAndAddDisplayable(e[i], null, t);
  2133. n.length = this._displayListLen,
  2134. Qe(n, nn)
  2135. }
  2136. ,
  2137. t.prototype._updateAndAddDisplayable = function(t, e, n) {
  2138. if (!t.ignore || n) {
  2139. t.beforeUpdate(),
  2140. t.update(),
  2141. t.afterUpdate();
  2142. var i = t.getClipPath();
  2143. if (t.ignoreClip)
  2144. e = null;
  2145. else if (i) {
  2146. e = e ? e.slice() : [];
  2147. for (var r = i, o = t; r; )
  2148. r.parent = o,
  2149. r.updateTransform(),
  2150. e.push(r),
  2151. o = r,
  2152. r = r.getClipPath()
  2153. }
  2154. if (t.childrenRef) {
  2155. for (var a = t.childrenRef(), s = 0; s < a.length; s++) {
  2156. var l = a[s];
  2157. t.__dirty && (l.__dirty |= 1),
  2158. this._updateAndAddDisplayable(l, e, n)
  2159. }
  2160. t.__dirty = 0
  2161. } else {
  2162. var u = t;
  2163. e && e.length ? u.__clipPaths = e : u.__clipPaths && u.__clipPaths.length > 0 && (u.__clipPaths = []),
  2164. isNaN(u.z) && (en(),
  2165. u.z = 0),
  2166. isNaN(u.z2) && (en(),
  2167. u.z2 = 0),
  2168. isNaN(u.zlevel) && (en(),
  2169. u.zlevel = 0),
  2170. this._displayList[this._displayListLen++] = u
  2171. }
  2172. var h = t.getDecalElement && t.getDecalElement();
  2173. h && this._updateAndAddDisplayable(h, e, n);
  2174. var c = t.getTextGuideLine();
  2175. c && this._updateAndAddDisplayable(c, e, n);
  2176. var p = t.getTextContent();
  2177. p && this._updateAndAddDisplayable(p, e, n)
  2178. }
  2179. }
  2180. ,
  2181. t.prototype.addRoot = function(t) {
  2182. t.__zr && t.__zr.storage === this || this._roots.push(t)
  2183. }
  2184. ,
  2185. t.prototype.delRoot = function(t) {
  2186. if (t instanceof Array)
  2187. for (var e = 0, n = t.length; e < n; e++)
  2188. this.delRoot(t[e]);
  2189. else {
  2190. var i = P(this._roots, t);
  2191. i >= 0 && this._roots.splice(i, 1)
  2192. }
  2193. }
  2194. ,
  2195. t.prototype.delAllRoots = function() {
  2196. this._roots = [],
  2197. this._displayList = [],
  2198. this._displayListLen = 0
  2199. }
  2200. ,
  2201. t.prototype.getRoots = function() {
  2202. return this._roots
  2203. }
  2204. ,
  2205. t.prototype.dispose = function() {
  2206. this._displayList = null,
  2207. this._roots = null
  2208. }
  2209. ,
  2210. t
  2211. }()
  2212. , on = r.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  2213. return setTimeout(t, 16)
  2214. }
  2215. , an = {
  2216. linear: function(t) {
  2217. return t
  2218. },
  2219. quadraticIn: function(t) {
  2220. return t * t
  2221. },
  2222. quadraticOut: function(t) {
  2223. return t * (2 - t)
  2224. },
  2225. quadraticInOut: function(t) {
  2226. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
  2227. },
  2228. cubicIn: function(t) {
  2229. return t * t * t
  2230. },
  2231. cubicOut: function(t) {
  2232. return --t * t * t + 1
  2233. },
  2234. cubicInOut: function(t) {
  2235. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
  2236. },
  2237. quarticIn: function(t) {
  2238. return t * t * t * t
  2239. },
  2240. quarticOut: function(t) {
  2241. return 1 - --t * t * t * t
  2242. },
  2243. quarticInOut: function(t) {
  2244. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
  2245. },
  2246. quinticIn: function(t) {
  2247. return t * t * t * t * t
  2248. },
  2249. quinticOut: function(t) {
  2250. return --t * t * t * t * t + 1
  2251. },
  2252. quinticInOut: function(t) {
  2253. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
  2254. },
  2255. sinusoidalIn: function(t) {
  2256. return 1 - Math.cos(t * Math.PI / 2)
  2257. },
  2258. sinusoidalOut: function(t) {
  2259. return Math.sin(t * Math.PI / 2)
  2260. },
  2261. sinusoidalInOut: function(t) {
  2262. return .5 * (1 - Math.cos(Math.PI * t))
  2263. },
  2264. exponentialIn: function(t) {
  2265. return 0 === t ? 0 : Math.pow(1024, t - 1)
  2266. },
  2267. exponentialOut: function(t) {
  2268. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
  2269. },
  2270. exponentialInOut: function(t) {
  2271. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1)))
  2272. },
  2273. circularIn: function(t) {
  2274. return 1 - Math.sqrt(1 - t * t)
  2275. },
  2276. circularOut: function(t) {
  2277. return Math.sqrt(1 - --t * t)
  2278. },
  2279. circularInOut: function(t) {
  2280. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  2281. },
  2282. elasticIn: function(t) {
  2283. var e, n = .1;
  2284. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1,
  2285. e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI),
  2286. -n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4))
  2287. },
  2288. elasticOut: function(t) {
  2289. var e, n = .1;
  2290. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1,
  2291. e = .1) : e = .4 * Math.asin(1 / n) / (2 * Math.PI),
  2292. n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / .4) + 1)
  2293. },
  2294. elasticInOut: function(t) {
  2295. var e, n = .1, i = .4;
  2296. return 0 === t ? 0 : 1 === t ? 1 : (!n || n < 1 ? (n = 1,
  2297. e = .1) : e = i * Math.asin(1 / n) / (2 * Math.PI),
  2298. (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)
  2299. },
  2300. backIn: function(t) {
  2301. var e = 1.70158;
  2302. return t * t * ((e + 1) * t - e)
  2303. },
  2304. backOut: function(t) {
  2305. var e = 1.70158;
  2306. return --t * t * ((e + 1) * t + e) + 1
  2307. },
  2308. backInOut: function(t) {
  2309. var e = 2.5949095;
  2310. return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  2311. },
  2312. bounceIn: function(t) {
  2313. return 1 - an.bounceOut(1 - t)
  2314. },
  2315. bounceOut: function(t) {
  2316. 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
  2317. },
  2318. bounceInOut: function(t) {
  2319. return t < .5 ? .5 * an.bounceIn(2 * t) : .5 * an.bounceOut(2 * t - 1) + .5
  2320. }
  2321. }
  2322. , sn = Math.pow
  2323. , ln = Math.sqrt
  2324. , un = 1e-8
  2325. , hn = 1e-4
  2326. , cn = ln(3)
  2327. , pn = 1 / 3
  2328. , dn = Mt()
  2329. , fn = Mt()
  2330. , gn = Mt();
  2331. function yn(t) {
  2332. return t > -1e-8 && t < un
  2333. }
  2334. function vn(t) {
  2335. return t > un || t < -1e-8
  2336. }
  2337. function mn(t, e, n, i, r) {
  2338. var o = 1 - r;
  2339. return o * o * (o * t + 3 * r * e) + r * r * (r * i + 3 * o * n)
  2340. }
  2341. function xn(t, e, n, i, r) {
  2342. var o = 1 - r;
  2343. return 3 * (((e - t) * o + 2 * (n - e) * r) * o + (i - n) * r * r)
  2344. }
  2345. function _n(t, e, n, i, r, o) {
  2346. var a = i + 3 * (e - n) - t
  2347. , s = 3 * (n - 2 * e + t)
  2348. , l = 3 * (e - t)
  2349. , u = t - r
  2350. , h = s * s - 3 * a * l
  2351. , c = s * l - 9 * a * u
  2352. , p = l * l - 3 * s * u
  2353. , d = 0;
  2354. if (yn(h) && yn(c)) {
  2355. if (yn(s))
  2356. o[0] = 0;
  2357. else
  2358. (M = -l / s) >= 0 && M <= 1 && (o[d++] = M)
  2359. } else {
  2360. var f = c * c - 4 * h * p;
  2361. if (yn(f)) {
  2362. var g = c / h
  2363. , y = -g / 2;
  2364. (M = -s / a + g) >= 0 && M <= 1 && (o[d++] = M),
  2365. y >= 0 && y <= 1 && (o[d++] = y)
  2366. } else if (f > 0) {
  2367. var v = ln(f)
  2368. , m = h * s + 1.5 * a * (-c + v)
  2369. , x = h * s + 1.5 * a * (-c - v);
  2370. (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)
  2371. } else {
  2372. var _ = (2 * h * s - 3 * a * c) / (2 * ln(h * h * h))
  2373. , b = Math.acos(_) / 3
  2374. , w = ln(h)
  2375. , S = Math.cos(b)
  2376. , M = (-s - 2 * w * S) / (3 * a)
  2377. , I = (y = (-s + w * (S + cn * Math.sin(b))) / (3 * a),
  2378. (-s + w * (S - cn * Math.sin(b))) / (3 * a));
  2379. M >= 0 && M <= 1 && (o[d++] = M),
  2380. y >= 0 && y <= 1 && (o[d++] = y),
  2381. I >= 0 && I <= 1 && (o[d++] = I)
  2382. }
  2383. }
  2384. return d
  2385. }
  2386. function bn(t, e, n, i, r) {
  2387. var o = 6 * n - 12 * e + 6 * t
  2388. , a = 9 * e + 3 * i - 3 * t - 9 * n
  2389. , s = 3 * e - 3 * t
  2390. , l = 0;
  2391. if (yn(a)) {
  2392. if (vn(o))
  2393. (h = -s / o) >= 0 && h <= 1 && (r[l++] = h)
  2394. } else {
  2395. var u = o * o - 4 * a * s;
  2396. if (yn(u))
  2397. r[0] = -o / (2 * a);
  2398. else if (u > 0) {
  2399. var h, c = ln(u), p = (-o - c) / (2 * a);
  2400. (h = (-o + c) / (2 * a)) >= 0 && h <= 1 && (r[l++] = h),
  2401. p >= 0 && p <= 1 && (r[l++] = p)
  2402. }
  2403. }
  2404. return l
  2405. }
  2406. function wn(t, e, n, i, r, o) {
  2407. var a = (e - t) * r + t
  2408. , s = (n - e) * r + e
  2409. , l = (i - n) * r + n
  2410. , u = (s - a) * r + a
  2411. , h = (l - s) * r + s
  2412. , c = (h - u) * r + u;
  2413. o[0] = t,
  2414. o[1] = a,
  2415. o[2] = u,
  2416. o[3] = c,
  2417. o[4] = c,
  2418. o[5] = h,
  2419. o[6] = l,
  2420. o[7] = i
  2421. }
  2422. function Sn(t, e, n, i, r, o, a, s, l, u, h) {
  2423. var c, p, d, f, g, y = .005, v = 1 / 0;
  2424. dn[0] = l,
  2425. dn[1] = u;
  2426. for (var m = 0; m < 1; m += .05)
  2427. fn[0] = mn(t, n, r, a, m),
  2428. fn[1] = mn(e, i, o, s, m),
  2429. (f = Ft(dn, fn)) < v && (c = m,
  2430. v = f);
  2431. v = 1 / 0;
  2432. for (var x = 0; x < 32 && !(y < hn); x++)
  2433. p = c - y,
  2434. d = c + y,
  2435. fn[0] = mn(t, n, r, a, p),
  2436. fn[1] = mn(e, i, o, s, p),
  2437. f = Ft(fn, dn),
  2438. p >= 0 && f < v ? (c = p,
  2439. v = f) : (gn[0] = mn(t, n, r, a, d),
  2440. gn[1] = mn(e, i, o, s, d),
  2441. g = Ft(gn, dn),
  2442. d <= 1 && g < v ? (c = d,
  2443. v = g) : y *= .5);
  2444. return h && (h[0] = mn(t, n, r, a, c),
  2445. h[1] = mn(e, i, o, s, c)),
  2446. ln(v)
  2447. }
  2448. function Mn(t, e, n, i, r, o, a, s, l) {
  2449. for (var u = t, h = e, c = 0, p = 1 / l, d = 1; d <= l; d++) {
  2450. var f = d * p
  2451. , g = mn(t, n, r, a, f)
  2452. , y = mn(e, i, o, s, f)
  2453. , v = g - u
  2454. , m = y - h;
  2455. c += Math.sqrt(v * v + m * m),
  2456. u = g,
  2457. h = y
  2458. }
  2459. return c
  2460. }
  2461. function In(t, e, n, i) {
  2462. var r = 1 - i;
  2463. return r * (r * t + 2 * i * e) + i * i * n
  2464. }
  2465. function Tn(t, e, n, i) {
  2466. return 2 * ((1 - i) * (e - t) + i * (n - e))
  2467. }
  2468. function Cn(t, e, n) {
  2469. var i = t + n - 2 * e;
  2470. return 0 === i ? .5 : (t - e) / i
  2471. }
  2472. function Dn(t, e, n, i, r) {
  2473. var o = (e - t) * i + t
  2474. , a = (n - e) * i + e
  2475. , s = (a - o) * i + o;
  2476. r[0] = t,
  2477. r[1] = o,
  2478. r[2] = s,
  2479. r[3] = s,
  2480. r[4] = a,
  2481. r[5] = n
  2482. }
  2483. function An(t, e, n, i, r, o, a, s, l) {
  2484. var u, h = .005, c = 1 / 0;
  2485. dn[0] = a,
  2486. dn[1] = s;
  2487. for (var p = 0; p < 1; p += .05) {
  2488. fn[0] = In(t, n, r, p),
  2489. fn[1] = In(e, i, o, p),
  2490. (y = Ft(dn, fn)) < c && (u = p,
  2491. c = y)
  2492. }
  2493. c = 1 / 0;
  2494. for (var d = 0; d < 32 && !(h < hn); d++) {
  2495. var f = u - h
  2496. , g = u + h;
  2497. fn[0] = In(t, n, r, f),
  2498. fn[1] = In(e, i, o, f);
  2499. var y = Ft(fn, dn);
  2500. if (f >= 0 && y < c)
  2501. u = f,
  2502. c = y;
  2503. else {
  2504. gn[0] = In(t, n, r, g),
  2505. gn[1] = In(e, i, o, g);
  2506. var v = Ft(gn, dn);
  2507. g <= 1 && v < c ? (u = g,
  2508. c = v) : h *= .5
  2509. }
  2510. }
  2511. return l && (l[0] = In(t, n, r, u),
  2512. l[1] = In(e, i, o, u)),
  2513. ln(c)
  2514. }
  2515. function kn(t, e, n, i, r, o, a) {
  2516. for (var s = t, l = e, u = 0, h = 1 / a, c = 1; c <= a; c++) {
  2517. var p = c * h
  2518. , d = In(t, n, r, p)
  2519. , f = In(e, i, o, p)
  2520. , g = d - s
  2521. , y = f - l;
  2522. u += Math.sqrt(g * g + y * y),
  2523. s = d,
  2524. l = f
  2525. }
  2526. return u
  2527. }
  2528. var Ln = /cubic-bezier\(([0-9,\.e ]+)\)/;
  2529. function Pn(t) {
  2530. var e = t && Ln.exec(t);
  2531. if (e) {
  2532. var n = e[1].split(",")
  2533. , i = +ut(n[0])
  2534. , r = +ut(n[1])
  2535. , o = +ut(n[2])
  2536. , a = +ut(n[3]);
  2537. if (isNaN(i + r + o + a))
  2538. return;
  2539. var s = [];
  2540. return function(t) {
  2541. return t <= 0 ? 0 : t >= 1 ? 1 : _n(0, i, o, 1, t, s) && mn(0, r, a, 1, s[0])
  2542. }
  2543. }
  2544. }
  2545. var On = function() {
  2546. function t(t) {
  2547. this._inited = !1,
  2548. this._startTime = 0,
  2549. this._pausedTime = 0,
  2550. this._paused = !1,
  2551. this._life = t.life || 1e3,
  2552. this._delay = t.delay || 0,
  2553. this.loop = t.loop || !1,
  2554. this.onframe = t.onframe || bt,
  2555. this.ondestroy = t.ondestroy || bt,
  2556. this.onrestart = t.onrestart || bt,
  2557. t.easing && this.setEasing(t.easing)
  2558. }
  2559. return t.prototype.step = function(t, e) {
  2560. if (this._inited || (this._startTime = t + this._delay,
  2561. this._inited = !0),
  2562. !this._paused) {
  2563. var n = this._life
  2564. , i = t - this._startTime - this._pausedTime
  2565. , r = i / n;
  2566. r < 0 && (r = 0),
  2567. r = Math.min(r, 1);
  2568. var o = this.easingFunc
  2569. , a = o ? o(r) : r;
  2570. if (this.onframe(a),
  2571. 1 === r) {
  2572. if (!this.loop)
  2573. return !0;
  2574. var s = i % n;
  2575. this._startTime = t - s,
  2576. this._pausedTime = 0,
  2577. this.onrestart()
  2578. }
  2579. return !1
  2580. }
  2581. this._pausedTime += e
  2582. }
  2583. ,
  2584. t.prototype.pause = function() {
  2585. this._paused = !0
  2586. }
  2587. ,
  2588. t.prototype.resume = function() {
  2589. this._paused = !1
  2590. }
  2591. ,
  2592. t.prototype.setEasing = function(t) {
  2593. this.easing = t,
  2594. this.easingFunc = X(t) ? t : an[t] || Pn(t)
  2595. }
  2596. ,
  2597. t
  2598. }()
  2599. , Rn = function(t) {
  2600. this.value = t
  2601. }
  2602. , Nn = function() {
  2603. function t() {
  2604. this._len = 0
  2605. }
  2606. return t.prototype.insert = function(t) {
  2607. var e = new Rn(t);
  2608. return this.insertEntry(e),
  2609. e
  2610. }
  2611. ,
  2612. t.prototype.insertEntry = function(t) {
  2613. this.head ? (this.tail.next = t,
  2614. t.prev = this.tail,
  2615. t.next = null,
  2616. this.tail = t) : this.head = this.tail = t,
  2617. this._len++
  2618. }
  2619. ,
  2620. t.prototype.remove = function(t) {
  2621. var e = t.prev
  2622. , n = t.next;
  2623. e ? e.next = n : this.head = n,
  2624. n ? n.prev = e : this.tail = e,
  2625. t.next = t.prev = null,
  2626. this._len--
  2627. }
  2628. ,
  2629. t.prototype.len = function() {
  2630. return this._len
  2631. }
  2632. ,
  2633. t.prototype.clear = function() {
  2634. this.head = this.tail = null,
  2635. this._len = 0
  2636. }
  2637. ,
  2638. t
  2639. }()
  2640. , En = function() {
  2641. function t(t) {
  2642. this._list = new Nn,
  2643. this._maxSize = 10,
  2644. this._map = {},
  2645. this._maxSize = t
  2646. }
  2647. return t.prototype.put = function(t, e) {
  2648. var n = this._list
  2649. , i = this._map
  2650. , r = null;
  2651. if (null == i[t]) {
  2652. var o = n.len()
  2653. , a = this._lastRemovedEntry;
  2654. if (o >= this._maxSize && o > 0) {
  2655. var s = n.head;
  2656. n.remove(s),
  2657. delete i[s.key],
  2658. r = s.value,
  2659. this._lastRemovedEntry = s
  2660. }
  2661. a ? a.value = e : a = new Rn(e),
  2662. a.key = t,
  2663. n.insertEntry(a),
  2664. i[t] = a
  2665. }
  2666. return r
  2667. }
  2668. ,
  2669. t.prototype.get = function(t) {
  2670. var e = this._map[t]
  2671. , n = this._list;
  2672. if (null != e)
  2673. return e !== n.tail && (n.remove(e),
  2674. n.insertEntry(e)),
  2675. e.value
  2676. }
  2677. ,
  2678. t.prototype.clear = function() {
  2679. this._list.clear(),
  2680. this._map = {}
  2681. }
  2682. ,
  2683. t.prototype.len = function() {
  2684. return this._list.len()
  2685. }
  2686. ,
  2687. t
  2688. }()
  2689. , zn = {
  2690. transparent: [0, 0, 0, 0],
  2691. aliceblue: [240, 248, 255, 1],
  2692. antiquewhite: [250, 235, 215, 1],
  2693. aqua: [0, 255, 255, 1],
  2694. aquamarine: [127, 255, 212, 1],
  2695. azure: [240, 255, 255, 1],
  2696. beige: [245, 245, 220, 1],
  2697. bisque: [255, 228, 196, 1],
  2698. black: [0, 0, 0, 1],
  2699. blanchedalmond: [255, 235, 205, 1],
  2700. blue: [0, 0, 255, 1],
  2701. blueviolet: [138, 43, 226, 1],
  2702. brown: [165, 42, 42, 1],
  2703. burlywood: [222, 184, 135, 1],
  2704. cadetblue: [95, 158, 160, 1],
  2705. chartreuse: [127, 255, 0, 1],
  2706. chocolate: [210, 105, 30, 1],
  2707. coral: [255, 127, 80, 1],
  2708. cornflowerblue: [100, 149, 237, 1],
  2709. cornsilk: [255, 248, 220, 1],
  2710. crimson: [220, 20, 60, 1],
  2711. cyan: [0, 255, 255, 1],
  2712. darkblue: [0, 0, 139, 1],
  2713. darkcyan: [0, 139, 139, 1],
  2714. darkgoldenrod: [184, 134, 11, 1],
  2715. darkgray: [169, 169, 169, 1],
  2716. darkgreen: [0, 100, 0, 1],
  2717. darkgrey: [169, 169, 169, 1],
  2718. darkkhaki: [189, 183, 107, 1],
  2719. darkmagenta: [139, 0, 139, 1],
  2720. darkolivegreen: [85, 107, 47, 1],
  2721. darkorange: [255, 140, 0, 1],
  2722. darkorchid: [153, 50, 204, 1],
  2723. darkred: [139, 0, 0, 1],
  2724. darksalmon: [233, 150, 122, 1],
  2725. darkseagreen: [143, 188, 143, 1],
  2726. darkslateblue: [72, 61, 139, 1],
  2727. darkslategray: [47, 79, 79, 1],
  2728. darkslategrey: [47, 79, 79, 1],
  2729. darkturquoise: [0, 206, 209, 1],
  2730. darkviolet: [148, 0, 211, 1],
  2731. deeppink: [255, 20, 147, 1],
  2732. deepskyblue: [0, 191, 255, 1],
  2733. dimgray: [105, 105, 105, 1],
  2734. dimgrey: [105, 105, 105, 1],
  2735. dodgerblue: [30, 144, 255, 1],
  2736. firebrick: [178, 34, 34, 1],
  2737. floralwhite: [255, 250, 240, 1],
  2738. forestgreen: [34, 139, 34, 1],
  2739. fuchsia: [255, 0, 255, 1],
  2740. gainsboro: [220, 220, 220, 1],
  2741. ghostwhite: [248, 248, 255, 1],
  2742. gold: [255, 215, 0, 1],
  2743. goldenrod: [218, 165, 32, 1],
  2744. gray: [128, 128, 128, 1],
  2745. green: [0, 128, 0, 1],
  2746. greenyellow: [173, 255, 47, 1],
  2747. grey: [128, 128, 128, 1],
  2748. honeydew: [240, 255, 240, 1],
  2749. hotpink: [255, 105, 180, 1],
  2750. indianred: [205, 92, 92, 1],
  2751. indigo: [75, 0, 130, 1],
  2752. ivory: [255, 255, 240, 1],
  2753. khaki: [240, 230, 140, 1],
  2754. lavender: [230, 230, 250, 1],
  2755. lavenderblush: [255, 240, 245, 1],
  2756. lawngreen: [124, 252, 0, 1],
  2757. lemonchiffon: [255, 250, 205, 1],
  2758. lightblue: [173, 216, 230, 1],
  2759. lightcoral: [240, 128, 128, 1],
  2760. lightcyan: [224, 255, 255, 1],
  2761. lightgoldenrodyellow: [250, 250, 210, 1],
  2762. lightgray: [211, 211, 211, 1],
  2763. lightgreen: [144, 238, 144, 1],
  2764. lightgrey: [211, 211, 211, 1],
  2765. lightpink: [255, 182, 193, 1],
  2766. lightsalmon: [255, 160, 122, 1],
  2767. lightseagreen: [32, 178, 170, 1],
  2768. lightskyblue: [135, 206, 250, 1],
  2769. lightslategray: [119, 136, 153, 1],
  2770. lightslategrey: [119, 136, 153, 1],
  2771. lightsteelblue: [176, 196, 222, 1],
  2772. lightyellow: [255, 255, 224, 1],
  2773. lime: [0, 255, 0, 1],
  2774. limegreen: [50, 205, 50, 1],
  2775. linen: [250, 240, 230, 1],
  2776. magenta: [255, 0, 255, 1],
  2777. maroon: [128, 0, 0, 1],
  2778. mediumaquamarine: [102, 205, 170, 1],
  2779. mediumblue: [0, 0, 205, 1],
  2780. mediumorchid: [186, 85, 211, 1],
  2781. mediumpurple: [147, 112, 219, 1],
  2782. mediumseagreen: [60, 179, 113, 1],
  2783. mediumslateblue: [123, 104, 238, 1],
  2784. mediumspringgreen: [0, 250, 154, 1],
  2785. mediumturquoise: [72, 209, 204, 1],
  2786. mediumvioletred: [199, 21, 133, 1],
  2787. midnightblue: [25, 25, 112, 1],
  2788. mintcream: [245, 255, 250, 1],
  2789. mistyrose: [255, 228, 225, 1],
  2790. moccasin: [255, 228, 181, 1],
  2791. navajowhite: [255, 222, 173, 1],
  2792. navy: [0, 0, 128, 1],
  2793. oldlace: [253, 245, 230, 1],
  2794. olive: [128, 128, 0, 1],
  2795. olivedrab: [107, 142, 35, 1],
  2796. orange: [255, 165, 0, 1],
  2797. orangered: [255, 69, 0, 1],
  2798. orchid: [218, 112, 214, 1],
  2799. palegoldenrod: [238, 232, 170, 1],
  2800. palegreen: [152, 251, 152, 1],
  2801. paleturquoise: [175, 238, 238, 1],
  2802. palevioletred: [219, 112, 147, 1],
  2803. papayawhip: [255, 239, 213, 1],
  2804. peachpuff: [255, 218, 185, 1],
  2805. peru: [205, 133, 63, 1],
  2806. pink: [255, 192, 203, 1],
  2807. plum: [221, 160, 221, 1],
  2808. powderblue: [176, 224, 230, 1],
  2809. purple: [128, 0, 128, 1],
  2810. red: [255, 0, 0, 1],
  2811. rosybrown: [188, 143, 143, 1],
  2812. royalblue: [65, 105, 225, 1],
  2813. saddlebrown: [139, 69, 19, 1],
  2814. salmon: [250, 128, 114, 1],
  2815. sandybrown: [244, 164, 96, 1],
  2816. seagreen: [46, 139, 87, 1],
  2817. seashell: [255, 245, 238, 1],
  2818. sienna: [160, 82, 45, 1],
  2819. silver: [192, 192, 192, 1],
  2820. skyblue: [135, 206, 235, 1],
  2821. slateblue: [106, 90, 205, 1],
  2822. slategray: [112, 128, 144, 1],
  2823. slategrey: [112, 128, 144, 1],
  2824. snow: [255, 250, 250, 1],
  2825. springgreen: [0, 255, 127, 1],
  2826. steelblue: [70, 130, 180, 1],
  2827. tan: [210, 180, 140, 1],
  2828. teal: [0, 128, 128, 1],
  2829. thistle: [216, 191, 216, 1],
  2830. tomato: [255, 99, 71, 1],
  2831. turquoise: [64, 224, 208, 1],
  2832. violet: [238, 130, 238, 1],
  2833. wheat: [245, 222, 179, 1],
  2834. white: [255, 255, 255, 1],
  2835. whitesmoke: [245, 245, 245, 1],
  2836. yellow: [255, 255, 0, 1],
  2837. yellowgreen: [154, 205, 50, 1]
  2838. };
  2839. function Vn(t) {
  2840. return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
  2841. }
  2842. function Bn(t) {
  2843. return t < 0 ? 0 : t > 1 ? 1 : t
  2844. }
  2845. function Fn(t) {
  2846. var e = t;
  2847. return e.length && "%" === e.charAt(e.length - 1) ? Vn(parseFloat(e) / 100 * 255) : Vn(parseInt(e, 10))
  2848. }
  2849. function Gn(t) {
  2850. var e = t;
  2851. return e.length && "%" === e.charAt(e.length - 1) ? Bn(parseFloat(e) / 100) : Bn(parseFloat(e))
  2852. }
  2853. function Wn(t, e, n) {
  2854. return n < 0 ? n += 1 : n > 1 && (n -= 1),
  2855. 6 * n < 1 ? t + (e - t) * n * 6 : 2 * n < 1 ? e : 3 * n < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t
  2856. }
  2857. function Hn(t, e, n) {
  2858. return t + (e - t) * n
  2859. }
  2860. function Yn(t, e, n, i, r) {
  2861. return t[0] = e,
  2862. t[1] = n,
  2863. t[2] = i,
  2864. t[3] = r,
  2865. t
  2866. }
  2867. function Xn(t, e) {
  2868. return t[0] = e[0],
  2869. t[1] = e[1],
  2870. t[2] = e[2],
  2871. t[3] = e[3],
  2872. t
  2873. }
  2874. var Un = new En(20)
  2875. , Zn = null;
  2876. function jn(t, e) {
  2877. Zn && Xn(Zn, e),
  2878. Zn = Un.put(t, Zn || e.slice())
  2879. }
  2880. function qn(t, e) {
  2881. if (t) {
  2882. e = e || [];
  2883. var n = Un.get(t);
  2884. if (n)
  2885. return Xn(e, n);
  2886. var i = (t += "").replace(/ /g, "").toLowerCase();
  2887. if (i in zn)
  2888. return Xn(e, zn[i]),
  2889. jn(t, e),
  2890. e;
  2891. var r, o = i.length;
  2892. if ("#" === i.charAt(0))
  2893. 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),
  2894. jn(t, e),
  2895. 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),
  2896. jn(t, e),
  2897. e) : void Yn(e, 0, 0, 0, 1) : void 0;
  2898. var a = i.indexOf("(")
  2899. , s = i.indexOf(")");
  2900. if (-1 !== a && s + 1 === o) {
  2901. var l = i.substr(0, a)
  2902. , u = i.substr(a + 1, s - (a + 1)).split(",")
  2903. , h = 1;
  2904. switch (l) {
  2905. case "rgba":
  2906. if (4 !== u.length)
  2907. return 3 === u.length ? Yn(e, +u[0], +u[1], +u[2], 1) : Yn(e, 0, 0, 0, 1);
  2908. h = Gn(u.pop());
  2909. case "rgb":
  2910. return u.length >= 3 ? (Yn(e, Fn(u[0]), Fn(u[1]), Fn(u[2]), 3 === u.length ? h : Gn(u[3])),
  2911. jn(t, e),
  2912. e) : void Yn(e, 0, 0, 0, 1);
  2913. case "hsla":
  2914. return 4 !== u.length ? void Yn(e, 0, 0, 0, 1) : (u[3] = Gn(u[3]),
  2915. Kn(u, e),
  2916. jn(t, e),
  2917. e);
  2918. case "hsl":
  2919. return 3 !== u.length ? void Yn(e, 0, 0, 0, 1) : (Kn(u, e),
  2920. jn(t, e),
  2921. e);
  2922. default:
  2923. return
  2924. }
  2925. }
  2926. Yn(e, 0, 0, 0, 1)
  2927. }
  2928. }
  2929. function Kn(t, e) {
  2930. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360
  2931. , i = Gn(t[1])
  2932. , r = Gn(t[2])
  2933. , o = r <= .5 ? r * (i + 1) : r + i - r * i
  2934. , a = 2 * r - o;
  2935. 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),
  2936. 4 === t.length && (e[3] = t[3]),
  2937. e
  2938. }
  2939. function $n(t, e) {
  2940. var n = qn(t);
  2941. if (n) {
  2942. for (var i = 0; i < 3; i++)
  2943. n[i] = e < 0 ? n[i] * (1 - e) | 0 : (255 - n[i]) * e + n[i] | 0,
  2944. n[i] > 255 ? n[i] = 255 : n[i] < 0 && (n[i] = 0);
  2945. return ri(n, 4 === n.length ? "rgba" : "rgb")
  2946. }
  2947. }
  2948. function Jn(t, e, n) {
  2949. if (e && e.length && t >= 0 && t <= 1) {
  2950. n = n || [];
  2951. var i = t * (e.length - 1)
  2952. , r = Math.floor(i)
  2953. , o = Math.ceil(i)
  2954. , a = e[r]
  2955. , s = e[o]
  2956. , l = i - r;
  2957. return n[0] = Vn(Hn(a[0], s[0], l)),
  2958. n[1] = Vn(Hn(a[1], s[1], l)),
  2959. n[2] = Vn(Hn(a[2], s[2], l)),
  2960. n[3] = Bn(Hn(a[3], s[3], l)),
  2961. n
  2962. }
  2963. }
  2964. var Qn = Jn;
  2965. function ti(t, e, n) {
  2966. if (e && e.length && t >= 0 && t <= 1) {
  2967. var i = t * (e.length - 1)
  2968. , r = Math.floor(i)
  2969. , o = Math.ceil(i)
  2970. , a = qn(e[r])
  2971. , s = qn(e[o])
  2972. , l = i - r
  2973. , 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");
  2974. return n ? {
  2975. color: u,
  2976. leftIndex: r,
  2977. rightIndex: o,
  2978. value: i
  2979. } : u
  2980. }
  2981. }
  2982. var ei = ti;
  2983. function ni(t, e, n, i) {
  2984. var r = qn(t);
  2985. if (t)
  2986. return r = function(t) {
  2987. if (t) {
  2988. var e, n, i = t[0] / 255, r = t[1] / 255, o = t[2] / 255, a = Math.min(i, r, o), s = Math.max(i, r, o), l = s - a, u = (s + a) / 2;
  2989. if (0 === l)
  2990. e = 0,
  2991. n = 0;
  2992. else {
  2993. n = u < .5 ? l / (s + a) : l / (2 - s - a);
  2994. var h = ((s - i) / 6 + l / 2) / l
  2995. , c = ((s - r) / 6 + l / 2) / l
  2996. , p = ((s - o) / 6 + l / 2) / l;
  2997. i === s ? e = p - c : r === s ? e = 1 / 3 + h - p : o === s && (e = 2 / 3 + c - h),
  2998. e < 0 && (e += 1),
  2999. e > 1 && (e -= 1)
  3000. }
  3001. var d = [360 * e, n, u];
  3002. return null != t[3] && d.push(t[3]),
  3003. d
  3004. }
  3005. }(r),
  3006. null != e && (r[0] = function(t) {
  3007. return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
  3008. }(e)),
  3009. null != n && (r[1] = Gn(n)),
  3010. null != i && (r[2] = Gn(i)),
  3011. ri(Kn(r), "rgba")
  3012. }
  3013. function ii(t, e) {
  3014. var n = qn(t);
  3015. if (n && null != e)
  3016. return n[3] = Bn(e),
  3017. ri(n, "rgba")
  3018. }
  3019. function ri(t, e) {
  3020. if (t && t.length) {
  3021. var n = t[0] + "," + t[1] + "," + t[2];
  3022. return "rgba" !== e && "hsva" !== e && "hsla" !== e || (n += "," + t[3]),
  3023. e + "(" + n + ")"
  3024. }
  3025. }
  3026. function oi(t, e) {
  3027. var n = qn(t);
  3028. return n ? (.299 * n[0] + .587 * n[1] + .114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0
  3029. }
  3030. var ai = new En(100);
  3031. function si(t) {
  3032. if (U(t)) {
  3033. var e = ai.get(t);
  3034. return e || (e = $n(t, -.1),
  3035. ai.put(t, e)),
  3036. e
  3037. }
  3038. if (Q(t)) {
  3039. var n = A({}, t);
  3040. return n.colorStops = z(t.colorStops, (function(t) {
  3041. return {
  3042. offset: t.offset,
  3043. color: $n(t.color, -.1)
  3044. }
  3045. }
  3046. )),
  3047. n
  3048. }
  3049. return t
  3050. }
  3051. var li = Object.freeze({
  3052. __proto__: null,
  3053. parse: qn,
  3054. lift: $n,
  3055. toHex: function(t) {
  3056. var e = qn(t);
  3057. if (e)
  3058. return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1)
  3059. },
  3060. fastLerp: Jn,
  3061. fastMapToColor: Qn,
  3062. lerp: ti,
  3063. mapToColor: ei,
  3064. modifyHSL: ni,
  3065. modifyAlpha: ii,
  3066. stringify: ri,
  3067. lum: oi,
  3068. random: function() {
  3069. return ri([Math.round(255 * Math.random()), Math.round(255 * Math.random()), Math.round(255 * Math.random())], "rgb")
  3070. },
  3071. liftColor: si
  3072. })
  3073. , ui = Math.round;
  3074. function hi(t) {
  3075. var e;
  3076. if (t && "transparent" !== t) {
  3077. if ("string" == typeof t && t.indexOf("rgba") > -1) {
  3078. var n = qn(t);
  3079. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")",
  3080. e = n[3])
  3081. }
  3082. } else
  3083. t = "none";
  3084. return {
  3085. color: t,
  3086. opacity: null == e ? 1 : e
  3087. }
  3088. }
  3089. var ci = 1e-4;
  3090. function pi(t) {
  3091. return t < ci && t > -1e-4
  3092. }
  3093. function di(t) {
  3094. return ui(1e3 * t) / 1e3
  3095. }
  3096. function fi(t) {
  3097. return ui(1e4 * t) / 1e4
  3098. }
  3099. var gi = {
  3100. left: "start",
  3101. right: "end",
  3102. center: "middle",
  3103. middle: "middle"
  3104. };
  3105. function yi(t) {
  3106. return t && !!t.image
  3107. }
  3108. function vi(t) {
  3109. return yi(t) || function(t) {
  3110. return t && !!t.svgElement
  3111. }(t)
  3112. }
  3113. function mi(t) {
  3114. return "linear" === t.type
  3115. }
  3116. function xi(t) {
  3117. return "radial" === t.type
  3118. }
  3119. function _i(t) {
  3120. return t && ("linear" === t.type || "radial" === t.type)
  3121. }
  3122. function bi(t) {
  3123. return "url(#" + t + ")"
  3124. }
  3125. function wi(t) {
  3126. var e = t.getGlobalScale()
  3127. , n = Math.max(e[0], e[1]);
  3128. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1)
  3129. }
  3130. function Si(t) {
  3131. var e = t.x || 0
  3132. , n = t.y || 0
  3133. , i = (t.rotation || 0) * wt
  3134. , r = rt(t.scaleX, 1)
  3135. , o = rt(t.scaleY, 1)
  3136. , a = t.skewX || 0
  3137. , s = t.skewY || 0
  3138. , l = [];
  3139. return (e || n) && l.push("translate(" + e + "px," + n + "px)"),
  3140. i && l.push("rotate(" + i + ")"),
  3141. 1 === r && 1 === o || l.push("scale(" + r + "," + o + ")"),
  3142. (a || s) && l.push("skew(" + ui(a * wt) + "deg, " + ui(s * wt) + "deg)"),
  3143. l.join(" ")
  3144. }
  3145. var Mi = r.hasGlobalWindow && X(window.btoa) ? function(t) {
  3146. return window.btoa(unescape(encodeURIComponent(t)))
  3147. }
  3148. : "undefined" != typeof Buffer ? function(t) {
  3149. return Buffer.from(t).toString("base64")
  3150. }
  3151. : function(t) {
  3152. return null
  3153. }
  3154. , Ii = Array.prototype.slice;
  3155. function Ti(t, e, n) {
  3156. return (e - t) * n + t
  3157. }
  3158. function Ci(t, e, n, i) {
  3159. for (var r = e.length, o = 0; o < r; o++)
  3160. t[o] = Ti(e[o], n[o], i);
  3161. return t
  3162. }
  3163. function Di(t, e, n, i) {
  3164. for (var r = e.length, o = 0; o < r; o++)
  3165. t[o] = e[o] + n[o] * i;
  3166. return t
  3167. }
  3168. function Ai(t, e, n, i) {
  3169. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  3170. t[a] || (t[a] = []);
  3171. for (var s = 0; s < o; s++)
  3172. t[a][s] = e[a][s] + n[a][s] * i
  3173. }
  3174. return t
  3175. }
  3176. function ki(t, e) {
  3177. for (var n = t.length, i = e.length, r = n > i ? e : t, o = Math.min(n, i), a = r[o - 1] || {
  3178. color: [0, 0, 0, 0],
  3179. offset: 0
  3180. }, s = o; s < Math.max(n, i); s++)
  3181. r.push({
  3182. offset: a.offset,
  3183. color: a.color.slice()
  3184. })
  3185. }
  3186. function Li(t, e, n) {
  3187. var i = t
  3188. , r = e;
  3189. if (i.push && r.push) {
  3190. var o = i.length
  3191. , a = r.length;
  3192. if (o !== a)
  3193. if (o > a)
  3194. i.length = a;
  3195. else
  3196. for (var s = o; s < a; s++)
  3197. i.push(1 === n ? r[s] : Ii.call(r[s]));
  3198. var l = i[0] && i[0].length;
  3199. for (s = 0; s < i.length; s++)
  3200. if (1 === n)
  3201. isNaN(i[s]) && (i[s] = r[s]);
  3202. else
  3203. for (var u = 0; u < l; u++)
  3204. isNaN(i[s][u]) && (i[s][u] = r[s][u])
  3205. }
  3206. }
  3207. function Pi(t) {
  3208. if (N(t)) {
  3209. var e = t.length;
  3210. if (N(t[0])) {
  3211. for (var n = [], i = 0; i < e; i++)
  3212. n.push(Ii.call(t[i]));
  3213. return n
  3214. }
  3215. return Ii.call(t)
  3216. }
  3217. return t
  3218. }
  3219. function Oi(t) {
  3220. return t[0] = Math.floor(t[0]) || 0,
  3221. t[1] = Math.floor(t[1]) || 0,
  3222. t[2] = Math.floor(t[2]) || 0,
  3223. t[3] = null == t[3] ? 1 : t[3],
  3224. "rgba(" + t.join(",") + ")"
  3225. }
  3226. function Ri(t) {
  3227. return 4 === t || 5 === t
  3228. }
  3229. function Ni(t) {
  3230. return 1 === t || 2 === t
  3231. }
  3232. var Ei = [0, 0, 0, 0]
  3233. , zi = function() {
  3234. function t(t) {
  3235. this.keyframes = [],
  3236. this.discrete = !1,
  3237. this._invalid = !1,
  3238. this._needsSort = !1,
  3239. this._lastFr = 0,
  3240. this._lastFrP = 0,
  3241. this.propName = t
  3242. }
  3243. return t.prototype.isFinished = function() {
  3244. return this._finished
  3245. }
  3246. ,
  3247. t.prototype.setFinished = function() {
  3248. this._finished = !0,
  3249. this._additiveTrack && this._additiveTrack.setFinished()
  3250. }
  3251. ,
  3252. t.prototype.needsAnimate = function() {
  3253. return this.keyframes.length >= 1
  3254. }
  3255. ,
  3256. t.prototype.getAdditiveTrack = function() {
  3257. return this._additiveTrack
  3258. }
  3259. ,
  3260. t.prototype.addKeyframe = function(t, e, n) {
  3261. this._needsSort = !0;
  3262. var i = this.keyframes
  3263. , r = i.length
  3264. , o = !1
  3265. , a = 6
  3266. , s = e;
  3267. if (N(e)) {
  3268. var l = function(t) {
  3269. return N(t && t[0]) ? 2 : 1
  3270. }(e);
  3271. a = l,
  3272. (1 === l && !j(e[0]) || 2 === l && !j(e[0][0])) && (o = !0)
  3273. } else if (j(e) && !nt(e))
  3274. a = 0;
  3275. else if (U(e))
  3276. if (isNaN(+e)) {
  3277. var u = qn(e);
  3278. u && (s = u,
  3279. a = 3)
  3280. } else
  3281. a = 0;
  3282. else if (Q(e)) {
  3283. var h = A({}, s);
  3284. h.colorStops = z(e.colorStops, (function(t) {
  3285. return {
  3286. offset: t.offset,
  3287. color: qn(t.color)
  3288. }
  3289. }
  3290. )),
  3291. mi(e) ? a = 4 : xi(e) && (a = 5),
  3292. s = h
  3293. }
  3294. 0 === r ? this.valType = a : a === this.valType && 6 !== a || (o = !0),
  3295. this.discrete = this.discrete || o;
  3296. var c = {
  3297. time: t,
  3298. value: s,
  3299. rawValue: e,
  3300. percent: 0
  3301. };
  3302. return n && (c.easing = n,
  3303. c.easingFunc = X(n) ? n : an[n] || Pn(n)),
  3304. i.push(c),
  3305. c
  3306. }
  3307. ,
  3308. t.prototype.prepare = function(t, e) {
  3309. var n = this.keyframes;
  3310. this._needsSort && n.sort((function(t, e) {
  3311. return t.time - e.time
  3312. }
  3313. ));
  3314. 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++) {
  3315. var h = n[u]
  3316. , c = h.value
  3317. , p = o.value;
  3318. h.percent = h.time / t,
  3319. a || (s && u !== r - 1 ? Li(c, p, i) : l && ki(c.colorStops, p.colorStops))
  3320. }
  3321. if (!a && 5 !== i && e && this.needsAnimate() && e.needsAnimate() && i === e.valType && !e._finished) {
  3322. this._additiveTrack = e;
  3323. var d = n[0].value;
  3324. for (u = 0; u < r; u++)
  3325. 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))
  3326. }
  3327. }
  3328. ,
  3329. t.prototype.step = function(t, e) {
  3330. if (!this._finished) {
  3331. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  3332. var n, i, r, o = null != this._additiveTrack, a = o ? "additiveValue" : "value", s = this.valType, l = this.keyframes, u = l.length, h = this.propName, c = 3 === s, p = this._lastFr, d = Math.min;
  3333. if (1 === u)
  3334. i = r = l[0];
  3335. else {
  3336. if (e < 0)
  3337. n = 0;
  3338. else if (e < this._lastFrP) {
  3339. for (n = d(p + 1, u - 1); n >= 0 && !(l[n].percent <= e); n--)
  3340. ;
  3341. n = d(n, u - 2)
  3342. } else {
  3343. for (n = p; n < u && !(l[n].percent > e); n++)
  3344. ;
  3345. n = d(n - 1, u - 2)
  3346. }
  3347. r = l[n + 1],
  3348. i = l[n]
  3349. }
  3350. if (i && r) {
  3351. this._lastFr = n,
  3352. this._lastFrP = e;
  3353. var f = r.percent - i.percent
  3354. , g = 0 === f ? 1 : d((e - i.percent) / f, 1);
  3355. r.easingFunc && (g = r.easingFunc(g));
  3356. var y = o ? this._additiveValue : c ? Ei : t[h];
  3357. if (!Ni(s) && !c || y || (y = this._additiveValue = []),
  3358. this.discrete)
  3359. t[h] = g < 1 ? i.rawValue : r.rawValue;
  3360. else if (Ni(s))
  3361. 1 === s ? Ci(y, i[a], r[a], g) : function(t, e, n, i) {
  3362. for (var r = e.length, o = r && e[0].length, a = 0; a < r; a++) {
  3363. t[a] || (t[a] = []);
  3364. for (var s = 0; s < o; s++)
  3365. t[a][s] = Ti(e[a][s], n[a][s], i)
  3366. }
  3367. }(y, i[a], r[a], g);
  3368. else if (Ri(s)) {
  3369. var v = i[a]
  3370. , m = r[a]
  3371. , x = 4 === s;
  3372. t[h] = {
  3373. type: x ? "linear" : "radial",
  3374. x: Ti(v.x, m.x, g),
  3375. y: Ti(v.y, m.y, g),
  3376. colorStops: z(v.colorStops, (function(t, e) {
  3377. var n = m.colorStops[e];
  3378. return {
  3379. offset: Ti(t.offset, n.offset, g),
  3380. color: Oi(Ci([], t.color, n.color, g))
  3381. }
  3382. }
  3383. )),
  3384. global: m.global
  3385. },
  3386. x ? (t[h].x2 = Ti(v.x2, m.x2, g),
  3387. t[h].y2 = Ti(v.y2, m.y2, g)) : t[h].r = Ti(v.r, m.r, g)
  3388. } else if (c)
  3389. Ci(y, i[a], r[a], g),
  3390. o || (t[h] = Oi(y));
  3391. else {
  3392. var _ = Ti(i[a], r[a], g);
  3393. o ? this._additiveValue = _ : t[h] = _
  3394. }
  3395. o && this._addToTarget(t)
  3396. }
  3397. }
  3398. }
  3399. ,
  3400. t.prototype._addToTarget = function(t) {
  3401. var e = this.valType
  3402. , n = this.propName
  3403. , i = this._additiveValue;
  3404. 0 === e ? t[n] = t[n] + i : 3 === e ? (qn(t[n], Ei),
  3405. Di(Ei, Ei, i, 1),
  3406. t[n] = Oi(Ei)) : 1 === e ? Di(t[n], t[n], i, 1) : 2 === e && Ai(t[n], t[n], i, 1)
  3407. }
  3408. ,
  3409. t
  3410. }()
  3411. , Vi = function() {
  3412. function t(t, e, n, i) {
  3413. this._tracks = {},
  3414. this._trackKeys = [],
  3415. this._maxTime = 0,
  3416. this._started = 0,
  3417. this._clip = null,
  3418. this._target = t,
  3419. this._loop = e,
  3420. e && i ? I("Can' use additive animation on looped animation.") : (this._additiveAnimators = i,
  3421. this._allowDiscrete = n)
  3422. }
  3423. return t.prototype.getMaxTime = function() {
  3424. return this._maxTime
  3425. }
  3426. ,
  3427. t.prototype.getDelay = function() {
  3428. return this._delay
  3429. }
  3430. ,
  3431. t.prototype.getLoop = function() {
  3432. return this._loop
  3433. }
  3434. ,
  3435. t.prototype.getTarget = function() {
  3436. return this._target
  3437. }
  3438. ,
  3439. t.prototype.changeTarget = function(t) {
  3440. this._target = t
  3441. }
  3442. ,
  3443. t.prototype.when = function(t, e, n) {
  3444. return this.whenWithKeys(t, e, G(e), n)
  3445. }
  3446. ,
  3447. t.prototype.whenWithKeys = function(t, e, n, i) {
  3448. for (var r = this._tracks, o = 0; o < n.length; o++) {
  3449. var a = n[o]
  3450. , s = r[a];
  3451. if (!s) {
  3452. s = r[a] = new zi(a);
  3453. var l = void 0
  3454. , u = this._getAdditiveTrack(a);
  3455. if (u) {
  3456. var h = u.keyframes
  3457. , c = h[h.length - 1];
  3458. l = c && c.value,
  3459. 3 === u.valType && l && (l = Oi(l))
  3460. } else
  3461. l = this._target[a];
  3462. if (null == l)
  3463. continue;
  3464. t > 0 && s.addKeyframe(0, Pi(l), i),
  3465. this._trackKeys.push(a)
  3466. }
  3467. s.addKeyframe(t, Pi(e[a]), i)
  3468. }
  3469. return this._maxTime = Math.max(this._maxTime, t),
  3470. this
  3471. }
  3472. ,
  3473. t.prototype.pause = function() {
  3474. this._clip.pause(),
  3475. this._paused = !0
  3476. }
  3477. ,
  3478. t.prototype.resume = function() {
  3479. this._clip.resume(),
  3480. this._paused = !1
  3481. }
  3482. ,
  3483. t.prototype.isPaused = function() {
  3484. return !!this._paused
  3485. }
  3486. ,
  3487. t.prototype.duration = function(t) {
  3488. return this._maxTime = t,
  3489. this._force = !0,
  3490. this
  3491. }
  3492. ,
  3493. t.prototype._doneCallback = function() {
  3494. this._setTracksFinished(),
  3495. this._clip = null;
  3496. var t = this._doneCbs;
  3497. if (t)
  3498. for (var e = t.length, n = 0; n < e; n++)
  3499. t[n].call(this)
  3500. }
  3501. ,
  3502. t.prototype._abortedCallback = function() {
  3503. this._setTracksFinished();
  3504. var t = this.animation
  3505. , e = this._abortedCbs;
  3506. if (t && t.removeClip(this._clip),
  3507. this._clip = null,
  3508. e)
  3509. for (var n = 0; n < e.length; n++)
  3510. e[n].call(this)
  3511. }
  3512. ,
  3513. t.prototype._setTracksFinished = function() {
  3514. for (var t = this._tracks, e = this._trackKeys, n = 0; n < e.length; n++)
  3515. t[e[n]].setFinished()
  3516. }
  3517. ,
  3518. t.prototype._getAdditiveTrack = function(t) {
  3519. var e, n = this._additiveAnimators;
  3520. if (n)
  3521. for (var i = 0; i < n.length; i++) {
  3522. var r = n[i].getTrack(t);
  3523. r && (e = r)
  3524. }
  3525. return e
  3526. }
  3527. ,
  3528. t.prototype.start = function(t) {
  3529. if (!(this._started > 0)) {
  3530. this._started = 1;
  3531. for (var e = this, n = [], i = this._maxTime || 0, r = 0; r < this._trackKeys.length; r++) {
  3532. var o = this._trackKeys[r]
  3533. , a = this._tracks[o]
  3534. , s = this._getAdditiveTrack(o)
  3535. , l = a.keyframes
  3536. , u = l.length;
  3537. if (a.prepare(i, s),
  3538. a.needsAnimate())
  3539. if (!this._allowDiscrete && a.discrete) {
  3540. var h = l[u - 1];
  3541. h && (e._target[a.propName] = h.rawValue),
  3542. a.setFinished()
  3543. } else
  3544. n.push(a)
  3545. }
  3546. if (n.length || this._force) {
  3547. var c = new On({
  3548. life: i,
  3549. loop: this._loop,
  3550. delay: this._delay || 0,
  3551. onframe: function(t) {
  3552. e._started = 2;
  3553. var i = e._additiveAnimators;
  3554. if (i) {
  3555. for (var r = !1, o = 0; o < i.length; o++)
  3556. if (i[o]._clip) {
  3557. r = !0;
  3558. break
  3559. }
  3560. r || (e._additiveAnimators = null)
  3561. }
  3562. for (o = 0; o < n.length; o++)
  3563. n[o].step(e._target, t);
  3564. var a = e._onframeCbs;
  3565. if (a)
  3566. for (o = 0; o < a.length; o++)
  3567. a[o](e._target, t)
  3568. },
  3569. ondestroy: function() {
  3570. e._doneCallback()
  3571. }
  3572. });
  3573. this._clip = c,
  3574. this.animation && this.animation.addClip(c),
  3575. t && c.setEasing(t)
  3576. } else
  3577. this._doneCallback();
  3578. return this
  3579. }
  3580. }
  3581. ,
  3582. t.prototype.stop = function(t) {
  3583. if (this._clip) {
  3584. var e = this._clip;
  3585. t && e.onframe(1),
  3586. this._abortedCallback()
  3587. }
  3588. }
  3589. ,
  3590. t.prototype.delay = function(t) {
  3591. return this._delay = t,
  3592. this
  3593. }
  3594. ,
  3595. t.prototype.during = function(t) {
  3596. return t && (this._onframeCbs || (this._onframeCbs = []),
  3597. this._onframeCbs.push(t)),
  3598. this
  3599. }
  3600. ,
  3601. t.prototype.done = function(t) {
  3602. return t && (this._doneCbs || (this._doneCbs = []),
  3603. this._doneCbs.push(t)),
  3604. this
  3605. }
  3606. ,
  3607. t.prototype.aborted = function(t) {
  3608. return t && (this._abortedCbs || (this._abortedCbs = []),
  3609. this._abortedCbs.push(t)),
  3610. this
  3611. }
  3612. ,
  3613. t.prototype.getClip = function() {
  3614. return this._clip
  3615. }
  3616. ,
  3617. t.prototype.getTrack = function(t) {
  3618. return this._tracks[t]
  3619. }
  3620. ,
  3621. t.prototype.getTracks = function() {
  3622. var t = this;
  3623. return z(this._trackKeys, (function(e) {
  3624. return t._tracks[e]
  3625. }
  3626. ))
  3627. }
  3628. ,
  3629. t.prototype.stopTracks = function(t, e) {
  3630. if (!t.length || !this._clip)
  3631. return !0;
  3632. for (var n = this._tracks, i = this._trackKeys, r = 0; r < t.length; r++) {
  3633. var o = n[t[r]];
  3634. o && !o.isFinished() && (e ? o.step(this._target, 1) : 1 === this._started && o.step(this._target, 0),
  3635. o.setFinished())
  3636. }
  3637. var a = !0;
  3638. for (r = 0; r < i.length; r++)
  3639. if (!n[i[r]].isFinished()) {
  3640. a = !1;
  3641. break
  3642. }
  3643. return a && this._abortedCallback(),
  3644. a
  3645. }
  3646. ,
  3647. t.prototype.saveTo = function(t, e, n) {
  3648. if (t) {
  3649. e = e || this._trackKeys;
  3650. for (var i = 0; i < e.length; i++) {
  3651. var r = e[i]
  3652. , o = this._tracks[r];
  3653. if (o && !o.isFinished()) {
  3654. var a = o.keyframes
  3655. , s = a[n ? 0 : a.length - 1];
  3656. s && (t[r] = Pi(s.rawValue))
  3657. }
  3658. }
  3659. }
  3660. }
  3661. ,
  3662. t.prototype.__changeFinalValue = function(t, e) {
  3663. e = e || G(t);
  3664. for (var n = 0; n < e.length; n++) {
  3665. var i = e[n]
  3666. , r = this._tracks[i];
  3667. if (r) {
  3668. var o = r.keyframes;
  3669. if (o.length > 1) {
  3670. var a = o.pop();
  3671. r.addKeyframe(a.time, t[i]),
  3672. r.prepare(this._maxTime, r.getAdditiveTrack())
  3673. }
  3674. }
  3675. }
  3676. }
  3677. ,
  3678. t
  3679. }();
  3680. function Bi() {
  3681. return (new Date).getTime()
  3682. }
  3683. var Fi, Gi, Wi = function(t) {
  3684. function e(e) {
  3685. var n = t.call(this) || this;
  3686. return n._running = !1,
  3687. n._time = 0,
  3688. n._pausedTime = 0,
  3689. n._pauseStart = 0,
  3690. n._paused = !1,
  3691. e = e || {},
  3692. n.stage = e.stage || {},
  3693. n
  3694. }
  3695. return n(e, t),
  3696. e.prototype.addClip = function(t) {
  3697. t.animation && this.removeClip(t),
  3698. this._head ? (this._tail.next = t,
  3699. t.prev = this._tail,
  3700. t.next = null,
  3701. this._tail = t) : this._head = this._tail = t,
  3702. t.animation = this
  3703. }
  3704. ,
  3705. e.prototype.addAnimator = function(t) {
  3706. t.animation = this;
  3707. var e = t.getClip();
  3708. e && this.addClip(e)
  3709. }
  3710. ,
  3711. e.prototype.removeClip = function(t) {
  3712. if (t.animation) {
  3713. var e = t.prev
  3714. , n = t.next;
  3715. e ? e.next = n : this._head = n,
  3716. n ? n.prev = e : this._tail = e,
  3717. t.next = t.prev = t.animation = null
  3718. }
  3719. }
  3720. ,
  3721. e.prototype.removeAnimator = function(t) {
  3722. var e = t.getClip();
  3723. e && this.removeClip(e),
  3724. t.animation = null
  3725. }
  3726. ,
  3727. e.prototype.update = function(t) {
  3728. for (var e = Bi() - this._pausedTime, n = e - this._time, i = this._head; i; ) {
  3729. var r = i.next;
  3730. i.step(e, n) ? (i.ondestroy(),
  3731. this.removeClip(i),
  3732. i = r) : i = r
  3733. }
  3734. this._time = e,
  3735. t || (this.trigger("frame", n),
  3736. this.stage.update && this.stage.update())
  3737. }
  3738. ,
  3739. e.prototype._startLoop = function() {
  3740. var t = this;
  3741. this._running = !0,
  3742. on((function e() {
  3743. t._running && (on(e),
  3744. !t._paused && t.update())
  3745. }
  3746. ))
  3747. }
  3748. ,
  3749. e.prototype.start = function() {
  3750. this._running || (this._time = Bi(),
  3751. this._pausedTime = 0,
  3752. this._startLoop())
  3753. }
  3754. ,
  3755. e.prototype.stop = function() {
  3756. this._running = !1
  3757. }
  3758. ,
  3759. e.prototype.pause = function() {
  3760. this._paused || (this._pauseStart = Bi(),
  3761. this._paused = !0)
  3762. }
  3763. ,
  3764. e.prototype.resume = function() {
  3765. this._paused && (this._pausedTime += Bi() - this._pauseStart,
  3766. this._paused = !1)
  3767. }
  3768. ,
  3769. e.prototype.clear = function() {
  3770. for (var t = this._head; t; ) {
  3771. var e = t.next;
  3772. t.prev = t.next = t.animation = null,
  3773. t = e
  3774. }
  3775. this._head = this._tail = null
  3776. }
  3777. ,
  3778. e.prototype.isFinished = function() {
  3779. return null == this._head
  3780. }
  3781. ,
  3782. e.prototype.animate = function(t, e) {
  3783. e = e || {},
  3784. this.start();
  3785. var n = new Vi(t,e.loop);
  3786. return this.addAnimator(n),
  3787. n
  3788. }
  3789. ,
  3790. e
  3791. }(jt), Hi = r.domSupported, Yi = (Gi = {
  3792. pointerdown: 1,
  3793. pointerup: 1,
  3794. pointermove: 1,
  3795. pointerout: 1
  3796. },
  3797. {
  3798. mouse: Fi = ["click", "dblclick", "mousewheel", "wheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  3799. touch: ["touchstart", "touchend", "touchmove"],
  3800. pointer: z(Fi, (function(t) {
  3801. var e = t.replace("mouse", "pointer");
  3802. return Gi.hasOwnProperty(e) ? e : t
  3803. }
  3804. ))
  3805. }), Xi = ["mousemove", "mouseup"], Ui = ["pointermove", "pointerup"], Zi = !1;
  3806. function ji(t) {
  3807. var e = t.pointerType;
  3808. return "pen" === e || "touch" === e
  3809. }
  3810. function qi(t) {
  3811. t && (t.zrByTouch = !0)
  3812. }
  3813. function Ki(t, e) {
  3814. for (var n = e, i = !1; n && 9 !== n.nodeType && !(i = n.domBelongToZr || n !== e && n === t.painterRoot); )
  3815. n = n.parentNode;
  3816. return i
  3817. }
  3818. var $i = function(t, e) {
  3819. this.stopPropagation = bt,
  3820. this.stopImmediatePropagation = bt,
  3821. this.preventDefault = bt,
  3822. this.type = e.type,
  3823. this.target = this.currentTarget = t.dom,
  3824. this.pointerType = e.pointerType,
  3825. this.clientX = e.clientX,
  3826. this.clientY = e.clientY
  3827. }
  3828. , Ji = {
  3829. mousedown: function(t) {
  3830. t = ce(this.dom, t),
  3831. this.__mayPointerCapture = [t.zrX, t.zrY],
  3832. this.trigger("mousedown", t)
  3833. },
  3834. mousemove: function(t) {
  3835. t = ce(this.dom, t);
  3836. var e = this.__mayPointerCapture;
  3837. !e || t.zrX === e[0] && t.zrY === e[1] || this.__togglePointerCapture(!0),
  3838. this.trigger("mousemove", t)
  3839. },
  3840. mouseup: function(t) {
  3841. t = ce(this.dom, t),
  3842. this.__togglePointerCapture(!1),
  3843. this.trigger("mouseup", t)
  3844. },
  3845. mouseout: function(t) {
  3846. Ki(this, (t = ce(this.dom, t)).toElement || t.relatedTarget) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"),
  3847. this.trigger("mouseout", t))
  3848. },
  3849. wheel: function(t) {
  3850. Zi = !0,
  3851. t = ce(this.dom, t),
  3852. this.trigger("mousewheel", t)
  3853. },
  3854. mousewheel: function(t) {
  3855. Zi || (t = ce(this.dom, t),
  3856. this.trigger("mousewheel", t))
  3857. },
  3858. touchstart: function(t) {
  3859. qi(t = ce(this.dom, t)),
  3860. this.__lastTouchMoment = new Date,
  3861. this.handler.processGesture(t, "start"),
  3862. Ji.mousemove.call(this, t),
  3863. Ji.mousedown.call(this, t)
  3864. },
  3865. touchmove: function(t) {
  3866. qi(t = ce(this.dom, t)),
  3867. this.handler.processGesture(t, "change"),
  3868. Ji.mousemove.call(this, t)
  3869. },
  3870. touchend: function(t) {
  3871. qi(t = ce(this.dom, t)),
  3872. this.handler.processGesture(t, "end"),
  3873. Ji.mouseup.call(this, t),
  3874. +new Date - +this.__lastTouchMoment < 300 && Ji.click.call(this, t)
  3875. },
  3876. pointerdown: function(t) {
  3877. Ji.mousedown.call(this, t)
  3878. },
  3879. pointermove: function(t) {
  3880. ji(t) || Ji.mousemove.call(this, t)
  3881. },
  3882. pointerup: function(t) {
  3883. Ji.mouseup.call(this, t)
  3884. },
  3885. pointerout: function(t) {
  3886. ji(t) || Ji.mouseout.call(this, t)
  3887. }
  3888. };
  3889. E(["click", "dblclick", "contextmenu"], (function(t) {
  3890. Ji[t] = function(e) {
  3891. e = ce(this.dom, e),
  3892. this.trigger(t, e)
  3893. }
  3894. }
  3895. ));
  3896. var Qi = {
  3897. pointermove: function(t) {
  3898. ji(t) || Qi.mousemove.call(this, t)
  3899. },
  3900. pointerup: function(t) {
  3901. Qi.mouseup.call(this, t)
  3902. },
  3903. mousemove: function(t) {
  3904. this.trigger("mousemove", t)
  3905. },
  3906. mouseup: function(t) {
  3907. var e = this.__pointerCapturing;
  3908. this.__togglePointerCapture(!1),
  3909. this.trigger("mouseup", t),
  3910. e && (t.zrEventControl = "only_globalout",
  3911. this.trigger("mouseout", t))
  3912. }
  3913. };
  3914. function tr(t, e) {
  3915. var n = e.domHandlers;
  3916. r.pointerEventsSupported ? E(Yi.pointer, (function(i) {
  3917. nr(e, i, (function(e) {
  3918. n[i].call(t, e)
  3919. }
  3920. ))
  3921. }
  3922. )) : (r.touchEventsSupported && E(Yi.touch, (function(i) {
  3923. nr(e, i, (function(r) {
  3924. n[i].call(t, r),
  3925. function(t) {
  3926. t.touching = !0,
  3927. null != t.touchTimer && (clearTimeout(t.touchTimer),
  3928. t.touchTimer = null),
  3929. t.touchTimer = setTimeout((function() {
  3930. t.touching = !1,
  3931. t.touchTimer = null
  3932. }
  3933. ), 700)
  3934. }(e)
  3935. }
  3936. ))
  3937. }
  3938. )),
  3939. E(Yi.mouse, (function(i) {
  3940. nr(e, i, (function(r) {
  3941. r = he(r),
  3942. e.touching || n[i].call(t, r)
  3943. }
  3944. ))
  3945. }
  3946. )))
  3947. }
  3948. function er(t, e) {
  3949. function n(n) {
  3950. nr(e, n, (function(i) {
  3951. i = he(i),
  3952. Ki(t, i.target) || (i = function(t, e) {
  3953. return ce(t.dom, new $i(t,e), !0)
  3954. }(t, i),
  3955. e.domHandlers[n].call(t, i))
  3956. }
  3957. ), {
  3958. capture: !0
  3959. })
  3960. }
  3961. r.pointerEventsSupported ? E(Ui, n) : r.touchEventsSupported || E(Xi, n)
  3962. }
  3963. function nr(t, e, n, i) {
  3964. t.mounted[e] = n,
  3965. t.listenerOpts[e] = i,
  3966. pe(t.domTarget, e, n, i)
  3967. }
  3968. function ir(t) {
  3969. var e, n, i, r, o = t.mounted;
  3970. for (var a in o)
  3971. o.hasOwnProperty(a) && (e = t.domTarget,
  3972. n = a,
  3973. i = o[a],
  3974. r = t.listenerOpts[a],
  3975. e.removeEventListener(n, i, r));
  3976. t.mounted = {}
  3977. }
  3978. var rr = function(t, e) {
  3979. this.mounted = {},
  3980. this.listenerOpts = {},
  3981. this.touching = !1,
  3982. this.domTarget = t,
  3983. this.domHandlers = e
  3984. }
  3985. , or = function(t) {
  3986. function e(e, n) {
  3987. var i = t.call(this) || this;
  3988. return i.__pointerCapturing = !1,
  3989. i.dom = e,
  3990. i.painterRoot = n,
  3991. i._localHandlerScope = new rr(e,Ji),
  3992. Hi && (i._globalHandlerScope = new rr(document,Qi)),
  3993. tr(i, i._localHandlerScope),
  3994. i
  3995. }
  3996. return n(e, t),
  3997. e.prototype.dispose = function() {
  3998. ir(this._localHandlerScope),
  3999. Hi && ir(this._globalHandlerScope)
  4000. }
  4001. ,
  4002. e.prototype.setCursor = function(t) {
  4003. this.dom.style && (this.dom.style.cursor = t || "default")
  4004. }
  4005. ,
  4006. e.prototype.__togglePointerCapture = function(t) {
  4007. if (this.__mayPointerCapture = null,
  4008. Hi && +this.__pointerCapturing ^ +t) {
  4009. this.__pointerCapturing = t;
  4010. var e = this._globalHandlerScope;
  4011. t ? er(this, e) : ir(e)
  4012. }
  4013. }
  4014. ,
  4015. e
  4016. }(jt)
  4017. , ar = 1;
  4018. r.hasGlobalWindow && (ar = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  4019. var sr = ar
  4020. , lr = "#333"
  4021. , ur = "#ccc"
  4022. , hr = xe
  4023. , cr = 5e-5;
  4024. function pr(t) {
  4025. return t > cr || t < -5e-5
  4026. }
  4027. var dr = []
  4028. , fr = []
  4029. , gr = [1, 0, 0, 1, 0, 0]
  4030. , yr = Math.abs
  4031. , vr = function() {
  4032. function t() {}
  4033. return t.prototype.getLocalTransform = function(e) {
  4034. return t.getLocalTransform(this, e)
  4035. }
  4036. ,
  4037. t.prototype.setPosition = function(t) {
  4038. this.x = t[0],
  4039. this.y = t[1]
  4040. }
  4041. ,
  4042. t.prototype.setScale = function(t) {
  4043. this.scaleX = t[0],
  4044. this.scaleY = t[1]
  4045. }
  4046. ,
  4047. t.prototype.setSkew = function(t) {
  4048. this.skewX = t[0],
  4049. this.skewY = t[1]
  4050. }
  4051. ,
  4052. t.prototype.setOrigin = function(t) {
  4053. this.originX = t[0],
  4054. this.originY = t[1]
  4055. }
  4056. ,
  4057. t.prototype.needLocalTransform = function() {
  4058. return pr(this.rotation) || pr(this.x) || pr(this.y) || pr(this.scaleX - 1) || pr(this.scaleY - 1) || pr(this.skewX) || pr(this.skewY)
  4059. }
  4060. ,
  4061. t.prototype.updateTransform = function() {
  4062. var t = this.parent && this.parent.transform
  4063. , e = this.needLocalTransform()
  4064. , n = this.transform;
  4065. e || t ? (n = n || [1, 0, 0, 1, 0, 0],
  4066. e ? this.getLocalTransform(n) : hr(n),
  4067. t && (e ? be(n, t, n) : _e(n, t)),
  4068. this.transform = n,
  4069. this._resolveGlobalScaleRatio(n)) : n && (hr(n),
  4070. this.invTransform = null)
  4071. }
  4072. ,
  4073. t.prototype._resolveGlobalScaleRatio = function(t) {
  4074. var e = this.globalScaleRatio;
  4075. if (null != e && 1 !== e) {
  4076. this.getGlobalScale(dr);
  4077. var n = dr[0] < 0 ? -1 : 1
  4078. , i = dr[1] < 0 ? -1 : 1
  4079. , r = ((dr[0] - n) * e + n) / dr[0] || 0
  4080. , o = ((dr[1] - i) * e + i) / dr[1] || 0;
  4081. t[0] *= r,
  4082. t[1] *= r,
  4083. t[2] *= o,
  4084. t[3] *= o
  4085. }
  4086. this.invTransform = this.invTransform || [1, 0, 0, 1, 0, 0],
  4087. Ie(this.invTransform, t)
  4088. }
  4089. ,
  4090. t.prototype.getComputedTransform = function() {
  4091. for (var t = this, e = []; t; )
  4092. e.push(t),
  4093. t = t.parent;
  4094. for (; t = e.pop(); )
  4095. t.updateTransform();
  4096. return this.transform
  4097. }
  4098. ,
  4099. t.prototype.setLocalTransform = function(t) {
  4100. if (t) {
  4101. var e = t[0] * t[0] + t[1] * t[1]
  4102. , n = t[2] * t[2] + t[3] * t[3]
  4103. , i = Math.atan2(t[1], t[0])
  4104. , r = Math.PI / 2 + i - Math.atan2(t[3], t[2]);
  4105. n = Math.sqrt(n) * Math.cos(r),
  4106. e = Math.sqrt(e),
  4107. this.skewX = r,
  4108. this.skewY = 0,
  4109. this.rotation = -i,
  4110. this.x = +t[4],
  4111. this.y = +t[5],
  4112. this.scaleX = e,
  4113. this.scaleY = n,
  4114. this.originX = 0,
  4115. this.originY = 0
  4116. }
  4117. }
  4118. ,
  4119. t.prototype.decomposeTransform = function() {
  4120. if (this.transform) {
  4121. var t = this.parent
  4122. , e = this.transform;
  4123. t && t.transform && (t.invTransform = t.invTransform || [1, 0, 0, 1, 0, 0],
  4124. be(fr, t.invTransform, e),
  4125. e = fr);
  4126. var n = this.originX
  4127. , i = this.originY;
  4128. (n || i) && (gr[4] = n,
  4129. gr[5] = i,
  4130. be(fr, e, gr),
  4131. fr[4] -= n,
  4132. fr[5] -= i,
  4133. e = fr),
  4134. this.setLocalTransform(e)
  4135. }
  4136. }
  4137. ,
  4138. t.prototype.getGlobalScale = function(t) {
  4139. var e = this.transform;
  4140. return t = t || [],
  4141. e ? (t[0] = Math.sqrt(e[0] * e[0] + e[1] * e[1]),
  4142. t[1] = Math.sqrt(e[2] * e[2] + e[3] * e[3]),
  4143. e[0] < 0 && (t[0] = -t[0]),
  4144. e[3] < 0 && (t[1] = -t[1]),
  4145. t) : (t[0] = 1,
  4146. t[1] = 1,
  4147. t)
  4148. }
  4149. ,
  4150. t.prototype.transformCoordToLocal = function(t, e) {
  4151. var n = [t, e]
  4152. , i = this.invTransform;
  4153. return i && Wt(n, n, i),
  4154. n
  4155. }
  4156. ,
  4157. t.prototype.transformCoordToGlobal = function(t, e) {
  4158. var n = [t, e]
  4159. , i = this.transform;
  4160. return i && Wt(n, n, i),
  4161. n
  4162. }
  4163. ,
  4164. t.prototype.getLineScale = function() {
  4165. var t = this.transform;
  4166. 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
  4167. }
  4168. ,
  4169. t.prototype.copyTransform = function(t) {
  4170. xr(this, t)
  4171. }
  4172. ,
  4173. t.getLocalTransform = function(t, e) {
  4174. e = e || [];
  4175. var n = t.originX || 0
  4176. , i = t.originY || 0
  4177. , r = t.scaleX
  4178. , o = t.scaleY
  4179. , a = t.anchorX
  4180. , s = t.anchorY
  4181. , l = t.rotation || 0
  4182. , u = t.x
  4183. , h = t.y
  4184. , c = t.skewX ? Math.tan(t.skewX) : 0
  4185. , p = t.skewY ? Math.tan(-t.skewY) : 0;
  4186. if (n || i || a || s) {
  4187. var d = n + a
  4188. , f = i + s;
  4189. e[4] = -d * r - c * f * o,
  4190. e[5] = -f * o - p * d * r
  4191. } else
  4192. e[4] = e[5] = 0;
  4193. return e[0] = r,
  4194. e[3] = o,
  4195. e[1] = p * r,
  4196. e[2] = c * o,
  4197. l && Se(e, e, l),
  4198. e[4] += n + u,
  4199. e[5] += i + h,
  4200. e
  4201. }
  4202. ,
  4203. t.initDefaultProps = function() {
  4204. var e = t.prototype;
  4205. e.scaleX = e.scaleY = e.globalScaleRatio = 1,
  4206. e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0
  4207. }(),
  4208. t
  4209. }()
  4210. , mr = ["x", "y", "originX", "originY", "anchorX", "anchorY", "rotation", "scaleX", "scaleY", "skewX", "skewY"];
  4211. function xr(t, e) {
  4212. for (var n = 0; n < mr.length; n++) {
  4213. var i = mr[n];
  4214. t[i] = e[i]
  4215. }
  4216. }
  4217. var _r = {};
  4218. function br(t, e) {
  4219. var n = _r[e = e || a];
  4220. n || (n = _r[e] = new En(500));
  4221. var i = n.get(t);
  4222. return null == i && (i = h.measureText(t, e).width,
  4223. n.put(t, i)),
  4224. i
  4225. }
  4226. function wr(t, e, n, i) {
  4227. var r = br(t, e)
  4228. , o = Tr(e)
  4229. , a = Mr(0, r, n)
  4230. , s = Ir(0, o, i);
  4231. return new ze(a,s,r,o)
  4232. }
  4233. function Sr(t, e, n, i) {
  4234. var r = ((t || "") + "").split("\n");
  4235. if (1 === r.length)
  4236. return wr(r[0], e, n, i);
  4237. for (var o = new ze(0,0,0,0), a = 0; a < r.length; a++) {
  4238. var s = wr(r[a], e, n, i);
  4239. 0 === a ? o.copy(s) : o.union(s)
  4240. }
  4241. return o
  4242. }
  4243. function Mr(t, e, n) {
  4244. return "right" === n ? t -= e : "center" === n && (t -= e / 2),
  4245. t
  4246. }
  4247. function Ir(t, e, n) {
  4248. return "middle" === n ? t -= e / 2 : "bottom" === n && (t -= e),
  4249. t
  4250. }
  4251. function Tr(t) {
  4252. return br("国", t)
  4253. }
  4254. function Cr(t, e) {
  4255. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  4256. }
  4257. function Dr(t, e, n) {
  4258. var i = e.position || "inside"
  4259. , r = null != e.distance ? e.distance : 5
  4260. , o = n.height
  4261. , a = n.width
  4262. , s = o / 2
  4263. , l = n.x
  4264. , u = n.y
  4265. , h = "left"
  4266. , c = "top";
  4267. if (i instanceof Array)
  4268. l += Cr(i[0], n.width),
  4269. u += Cr(i[1], n.height),
  4270. h = null,
  4271. c = null;
  4272. else
  4273. switch (i) {
  4274. case "left":
  4275. l -= r,
  4276. u += s,
  4277. h = "right",
  4278. c = "middle";
  4279. break;
  4280. case "right":
  4281. l += r + a,
  4282. u += s,
  4283. c = "middle";
  4284. break;
  4285. case "top":
  4286. l += a / 2,
  4287. u -= r,
  4288. h = "center",
  4289. c = "bottom";
  4290. break;
  4291. case "bottom":
  4292. l += a / 2,
  4293. u += o + r,
  4294. h = "center";
  4295. break;
  4296. case "inside":
  4297. l += a / 2,
  4298. u += s,
  4299. h = "center",
  4300. c = "middle";
  4301. break;
  4302. case "insideLeft":
  4303. l += r,
  4304. u += s,
  4305. c = "middle";
  4306. break;
  4307. case "insideRight":
  4308. l += a - r,
  4309. u += s,
  4310. h = "right",
  4311. c = "middle";
  4312. break;
  4313. case "insideTop":
  4314. l += a / 2,
  4315. u += r,
  4316. h = "center";
  4317. break;
  4318. case "insideBottom":
  4319. l += a / 2,
  4320. u += o - r,
  4321. h = "center",
  4322. c = "bottom";
  4323. break;
  4324. case "insideTopLeft":
  4325. l += r,
  4326. u += r;
  4327. break;
  4328. case "insideTopRight":
  4329. l += a - r,
  4330. u += r,
  4331. h = "right";
  4332. break;
  4333. case "insideBottomLeft":
  4334. l += r,
  4335. u += o - r,
  4336. c = "bottom";
  4337. break;
  4338. case "insideBottomRight":
  4339. l += a - r,
  4340. u += o - r,
  4341. h = "right",
  4342. c = "bottom"
  4343. }
  4344. return (t = t || {}).x = l,
  4345. t.y = u,
  4346. t.align = h,
  4347. t.verticalAlign = c,
  4348. t
  4349. }
  4350. var Ar = "__zr_normal__"
  4351. , kr = mr.concat(["ignore"])
  4352. , Lr = V(mr, (function(t, e) {
  4353. return t[e] = !0,
  4354. t
  4355. }
  4356. ), {
  4357. ignore: !1
  4358. })
  4359. , Pr = {}
  4360. , Or = new ze(0,0,0,0)
  4361. , Rr = function() {
  4362. function t(t) {
  4363. this.id = M(),
  4364. this.animators = [],
  4365. this.currentStates = [],
  4366. this.states = {},
  4367. this._init(t)
  4368. }
  4369. return t.prototype._init = function(t) {
  4370. this.attr(t)
  4371. }
  4372. ,
  4373. t.prototype.drift = function(t, e, n) {
  4374. switch (this.draggable) {
  4375. case "horizontal":
  4376. e = 0;
  4377. break;
  4378. case "vertical":
  4379. t = 0
  4380. }
  4381. var i = this.transform;
  4382. i || (i = this.transform = [1, 0, 0, 1, 0, 0]),
  4383. i[4] += t,
  4384. i[5] += e,
  4385. this.decomposeTransform(),
  4386. this.markRedraw()
  4387. }
  4388. ,
  4389. t.prototype.beforeUpdate = function() {}
  4390. ,
  4391. t.prototype.afterUpdate = function() {}
  4392. ,
  4393. t.prototype.update = function() {
  4394. this.updateTransform(),
  4395. this.__dirty && this.updateInnerText()
  4396. }
  4397. ,
  4398. t.prototype.updateInnerText = function(t) {
  4399. var e = this._textContent;
  4400. if (e && (!e.ignore || t)) {
  4401. this.textConfig || (this.textConfig = {});
  4402. var n = this.textConfig
  4403. , i = n.local
  4404. , r = e.innerTransformable
  4405. , o = void 0
  4406. , a = void 0
  4407. , s = !1;
  4408. r.parent = i ? this : null;
  4409. var l = !1;
  4410. if (r.copyTransform(e),
  4411. null != n.position) {
  4412. var u = Or;
  4413. n.layoutRect ? u.copy(n.layoutRect) : u.copy(this.getBoundingRect()),
  4414. i || u.applyTransform(this.transform),
  4415. this.calculateTextPosition ? this.calculateTextPosition(Pr, n, u) : Dr(Pr, n, u),
  4416. r.x = Pr.x,
  4417. r.y = Pr.y,
  4418. o = Pr.align,
  4419. a = Pr.verticalAlign;
  4420. var h = n.origin;
  4421. if (h && null != n.rotation) {
  4422. var c = void 0
  4423. , p = void 0;
  4424. "center" === h ? (c = .5 * u.width,
  4425. p = .5 * u.height) : (c = Cr(h[0], u.width),
  4426. p = Cr(h[1], u.height)),
  4427. l = !0,
  4428. r.originX = -r.x + c + (i ? 0 : u.x),
  4429. r.originY = -r.y + p + (i ? 0 : u.y)
  4430. }
  4431. }
  4432. null != n.rotation && (r.rotation = n.rotation);
  4433. var d = n.offset;
  4434. d && (r.x += d[0],
  4435. r.y += d[1],
  4436. l || (r.originX = -d[0],
  4437. r.originY = -d[1]));
  4438. var f = null == n.inside ? "string" == typeof n.position && n.position.indexOf("inside") >= 0 : n.inside
  4439. , g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {})
  4440. , y = void 0
  4441. , v = void 0
  4442. , m = void 0;
  4443. f && this.canBeInsideText() ? (y = n.insideFill,
  4444. v = n.insideStroke,
  4445. null != y && "auto" !== y || (y = this.getInsideTextFill()),
  4446. null != v && "auto" !== v || (v = this.getInsideTextStroke(y),
  4447. m = !0)) : (y = n.outsideFill,
  4448. v = n.outsideStroke,
  4449. null != y && "auto" !== y || (y = this.getOutsideFill()),
  4450. null != v && "auto" !== v || (v = this.getOutsideStroke(y),
  4451. m = !0)),
  4452. (y = y || "#000") === g.fill && v === g.stroke && m === g.autoStroke && o === g.align && a === g.verticalAlign || (s = !0,
  4453. g.fill = y,
  4454. g.stroke = v,
  4455. g.autoStroke = m,
  4456. g.align = o,
  4457. g.verticalAlign = a,
  4458. e.setDefaultTextStyle(g)),
  4459. e.__dirty |= 1,
  4460. s && e.dirtyStyle(!0)
  4461. }
  4462. }
  4463. ,
  4464. t.prototype.canBeInsideText = function() {
  4465. return !0
  4466. }
  4467. ,
  4468. t.prototype.getInsideTextFill = function() {
  4469. return "#fff"
  4470. }
  4471. ,
  4472. t.prototype.getInsideTextStroke = function(t) {
  4473. return "#000"
  4474. }
  4475. ,
  4476. t.prototype.getOutsideFill = function() {
  4477. return this.__zr && this.__zr.isDarkMode() ? ur : lr
  4478. }
  4479. ,
  4480. t.prototype.getOutsideStroke = function(t) {
  4481. var e = this.__zr && this.__zr.getBackgroundColor()
  4482. , n = "string" == typeof e && qn(e);
  4483. n || (n = [255, 255, 255, 1]);
  4484. for (var i = n[3], r = this.__zr.isDarkMode(), o = 0; o < 3; o++)
  4485. n[o] = n[o] * i + (r ? 0 : 255) * (1 - i);
  4486. return n[3] = 1,
  4487. ri(n, "rgba")
  4488. }
  4489. ,
  4490. t.prototype.traverse = function(t, e) {}
  4491. ,
  4492. t.prototype.attrKV = function(t, e) {
  4493. "textConfig" === t ? this.setTextConfig(e) : "textContent" === t ? this.setTextContent(e) : "clipPath" === t ? this.setClipPath(e) : "extra" === t ? (this.extra = this.extra || {},
  4494. A(this.extra, e)) : this[t] = e
  4495. }
  4496. ,
  4497. t.prototype.hide = function() {
  4498. this.ignore = !0,
  4499. this.markRedraw()
  4500. }
  4501. ,
  4502. t.prototype.show = function() {
  4503. this.ignore = !1,
  4504. this.markRedraw()
  4505. }
  4506. ,
  4507. t.prototype.attr = function(t, e) {
  4508. if ("string" == typeof t)
  4509. this.attrKV(t, e);
  4510. else if (q(t))
  4511. for (var n = G(t), i = 0; i < n.length; i++) {
  4512. var r = n[i];
  4513. this.attrKV(r, t[r])
  4514. }
  4515. return this.markRedraw(),
  4516. this
  4517. }
  4518. ,
  4519. t.prototype.saveCurrentToNormalState = function(t) {
  4520. this._innerSaveToNormal(t);
  4521. for (var e = this._normalState, n = 0; n < this.animators.length; n++) {
  4522. var i = this.animators[n]
  4523. , r = i.__fromStateTransition;
  4524. if (!(i.getLoop() || r && r !== Ar)) {
  4525. var o = i.targetName
  4526. , a = o ? e[o] : e;
  4527. i.saveTo(a)
  4528. }
  4529. }
  4530. }
  4531. ,
  4532. t.prototype._innerSaveToNormal = function(t) {
  4533. var e = this._normalState;
  4534. e || (e = this._normalState = {}),
  4535. t.textConfig && !e.textConfig && (e.textConfig = this.textConfig),
  4536. this._savePrimaryToNormal(t, e, kr)
  4537. }
  4538. ,
  4539. t.prototype._savePrimaryToNormal = function(t, e, n) {
  4540. for (var i = 0; i < n.length; i++) {
  4541. var r = n[i];
  4542. null == t[r] || r in e || (e[r] = this[r])
  4543. }
  4544. }
  4545. ,
  4546. t.prototype.hasState = function() {
  4547. return this.currentStates.length > 0
  4548. }
  4549. ,
  4550. t.prototype.getState = function(t) {
  4551. return this.states[t]
  4552. }
  4553. ,
  4554. t.prototype.ensureState = function(t) {
  4555. var e = this.states;
  4556. return e[t] || (e[t] = {}),
  4557. e[t]
  4558. }
  4559. ,
  4560. t.prototype.clearStates = function(t) {
  4561. this.useState(Ar, !1, t)
  4562. }
  4563. ,
  4564. t.prototype.useState = function(t, e, n, i) {
  4565. var r = t === Ar;
  4566. if (this.hasState() || !r) {
  4567. var o = this.currentStates
  4568. , a = this.stateTransition;
  4569. if (!(P(o, t) >= 0) || !e && 1 !== o.length) {
  4570. var s;
  4571. if (this.stateProxy && !r && (s = this.stateProxy(t)),
  4572. s || (s = this.states && this.states[t]),
  4573. s || r) {
  4574. r || this.saveCurrentToNormalState(s);
  4575. var l = !!(s && s.hoverLayer || i);
  4576. l && this._toggleHoverLayerFlag(!0),
  4577. this._applyStateObj(t, s, this._normalState, e, !n && !this.__inHover && a && a.duration > 0, a);
  4578. var u = this._textContent
  4579. , h = this._textGuide;
  4580. return u && u.useState(t, e, n, l),
  4581. h && h.useState(t, e, n, l),
  4582. r ? (this.currentStates = [],
  4583. this._normalState = {}) : e ? this.currentStates.push(t) : this.currentStates = [t],
  4584. this._updateAnimationTargets(),
  4585. this.markRedraw(),
  4586. !l && this.__inHover && (this._toggleHoverLayerFlag(!1),
  4587. this.__dirty &= -2),
  4588. s
  4589. }
  4590. I("State " + t + " not exists.")
  4591. }
  4592. }
  4593. }
  4594. ,
  4595. t.prototype.useStates = function(t, e, n) {
  4596. if (t.length) {
  4597. var i = []
  4598. , r = this.currentStates
  4599. , o = t.length
  4600. , a = o === r.length;
  4601. if (a)
  4602. for (var s = 0; s < o; s++)
  4603. if (t[s] !== r[s]) {
  4604. a = !1;
  4605. break
  4606. }
  4607. if (a)
  4608. return;
  4609. for (s = 0; s < o; s++) {
  4610. var l = t[s]
  4611. , u = void 0;
  4612. this.stateProxy && (u = this.stateProxy(l, t)),
  4613. u || (u = this.states[l]),
  4614. u && i.push(u)
  4615. }
  4616. var h = i[o - 1]
  4617. , c = !!(h && h.hoverLayer || n);
  4618. c && this._toggleHoverLayerFlag(!0);
  4619. var p = this._mergeStates(i)
  4620. , d = this.stateTransition;
  4621. this.saveCurrentToNormalState(p),
  4622. this._applyStateObj(t.join(","), p, this._normalState, !1, !e && !this.__inHover && d && d.duration > 0, d);
  4623. var f = this._textContent
  4624. , g = this._textGuide;
  4625. f && f.useStates(t, e, c),
  4626. g && g.useStates(t, e, c),
  4627. this._updateAnimationTargets(),
  4628. this.currentStates = t.slice(),
  4629. this.markRedraw(),
  4630. !c && this.__inHover && (this._toggleHoverLayerFlag(!1),
  4631. this.__dirty &= -2)
  4632. } else
  4633. this.clearStates()
  4634. }
  4635. ,
  4636. t.prototype.isSilent = function() {
  4637. for (var t = this.silent, e = this.parent; !t && e; ) {
  4638. if (e.silent) {
  4639. t = !0;
  4640. break
  4641. }
  4642. e = e.parent
  4643. }
  4644. return t
  4645. }
  4646. ,
  4647. t.prototype._updateAnimationTargets = function() {
  4648. for (var t = 0; t < this.animators.length; t++) {
  4649. var e = this.animators[t];
  4650. e.targetName && e.changeTarget(this[e.targetName])
  4651. }
  4652. }
  4653. ,
  4654. t.prototype.removeState = function(t) {
  4655. var e = P(this.currentStates, t);
  4656. if (e >= 0) {
  4657. var n = this.currentStates.slice();
  4658. n.splice(e, 1),
  4659. this.useStates(n)
  4660. }
  4661. }
  4662. ,
  4663. t.prototype.replaceState = function(t, e, n) {
  4664. var i = this.currentStates.slice()
  4665. , r = P(i, t)
  4666. , o = P(i, e) >= 0;
  4667. r >= 0 ? o ? i.splice(r, 1) : i[r] = e : n && !o && i.push(e),
  4668. this.useStates(i)
  4669. }
  4670. ,
  4671. t.prototype.toggleState = function(t, e) {
  4672. e ? this.useState(t, !0) : this.removeState(t)
  4673. }
  4674. ,
  4675. t.prototype._mergeStates = function(t) {
  4676. for (var e, n = {}, i = 0; i < t.length; i++) {
  4677. var r = t[i];
  4678. A(n, r),
  4679. r.textConfig && A(e = e || {}, r.textConfig)
  4680. }
  4681. return e && (n.textConfig = e),
  4682. n
  4683. }
  4684. ,
  4685. t.prototype._applyStateObj = function(t, e, n, i, r, o) {
  4686. var a = !(e && i);
  4687. e && e.textConfig ? (this.textConfig = A({}, i ? this.textConfig : n.textConfig),
  4688. A(this.textConfig, e.textConfig)) : a && n.textConfig && (this.textConfig = n.textConfig);
  4689. for (var s = {}, l = !1, u = 0; u < kr.length; u++) {
  4690. var h = kr[u]
  4691. , c = r && Lr[h];
  4692. e && null != e[h] ? c ? (l = !0,
  4693. s[h] = e[h]) : this[h] = e[h] : a && null != n[h] && (c ? (l = !0,
  4694. s[h] = n[h]) : this[h] = n[h])
  4695. }
  4696. if (!r)
  4697. for (u = 0; u < this.animators.length; u++) {
  4698. var p = this.animators[u]
  4699. , d = p.targetName;
  4700. p.getLoop() || p.__changeFinalValue(d ? (e || n)[d] : e || n)
  4701. }
  4702. l && this._transitionState(t, s, o)
  4703. }
  4704. ,
  4705. t.prototype._attachComponent = function(t) {
  4706. if ((!t.__zr || t.__hostTarget) && t !== this) {
  4707. var e = this.__zr;
  4708. e && t.addSelfToZr(e),
  4709. t.__zr = e,
  4710. t.__hostTarget = this
  4711. }
  4712. }
  4713. ,
  4714. t.prototype._detachComponent = function(t) {
  4715. t.__zr && t.removeSelfFromZr(t.__zr),
  4716. t.__zr = null,
  4717. t.__hostTarget = null
  4718. }
  4719. ,
  4720. t.prototype.getClipPath = function() {
  4721. return this._clipPath
  4722. }
  4723. ,
  4724. t.prototype.setClipPath = function(t) {
  4725. this._clipPath && this._clipPath !== t && this.removeClipPath(),
  4726. this._attachComponent(t),
  4727. this._clipPath = t,
  4728. this.markRedraw()
  4729. }
  4730. ,
  4731. t.prototype.removeClipPath = function() {
  4732. var t = this._clipPath;
  4733. t && (this._detachComponent(t),
  4734. this._clipPath = null,
  4735. this.markRedraw())
  4736. }
  4737. ,
  4738. t.prototype.getTextContent = function() {
  4739. return this._textContent
  4740. }
  4741. ,
  4742. t.prototype.setTextContent = function(t) {
  4743. var e = this._textContent;
  4744. e !== t && (e && e !== t && this.removeTextContent(),
  4745. t.innerTransformable = new vr,
  4746. this._attachComponent(t),
  4747. this._textContent = t,
  4748. this.markRedraw())
  4749. }
  4750. ,
  4751. t.prototype.setTextConfig = function(t) {
  4752. this.textConfig || (this.textConfig = {}),
  4753. A(this.textConfig, t),
  4754. this.markRedraw()
  4755. }
  4756. ,
  4757. t.prototype.removeTextConfig = function() {
  4758. this.textConfig = null,
  4759. this.markRedraw()
  4760. }
  4761. ,
  4762. t.prototype.removeTextContent = function() {
  4763. var t = this._textContent;
  4764. t && (t.innerTransformable = null,
  4765. this._detachComponent(t),
  4766. this._textContent = null,
  4767. this._innerTextDefaultStyle = null,
  4768. this.markRedraw())
  4769. }
  4770. ,
  4771. t.prototype.getTextGuideLine = function() {
  4772. return this._textGuide
  4773. }
  4774. ,
  4775. t.prototype.setTextGuideLine = function(t) {
  4776. this._textGuide && this._textGuide !== t && this.removeTextGuideLine(),
  4777. this._attachComponent(t),
  4778. this._textGuide = t,
  4779. this.markRedraw()
  4780. }
  4781. ,
  4782. t.prototype.removeTextGuideLine = function() {
  4783. var t = this._textGuide;
  4784. t && (this._detachComponent(t),
  4785. this._textGuide = null,
  4786. this.markRedraw())
  4787. }
  4788. ,
  4789. t.prototype.markRedraw = function() {
  4790. this.__dirty |= 1;
  4791. var t = this.__zr;
  4792. t && (this.__inHover ? t.refreshHover() : t.refresh()),
  4793. this.__hostTarget && this.__hostTarget.markRedraw()
  4794. }
  4795. ,
  4796. t.prototype.dirty = function() {
  4797. this.markRedraw()
  4798. }
  4799. ,
  4800. t.prototype._toggleHoverLayerFlag = function(t) {
  4801. this.__inHover = t;
  4802. var e = this._textContent
  4803. , n = this._textGuide;
  4804. e && (e.__inHover = t),
  4805. n && (n.__inHover = t)
  4806. }
  4807. ,
  4808. t.prototype.addSelfToZr = function(t) {
  4809. if (this.__zr !== t) {
  4810. this.__zr = t;
  4811. var e = this.animators;
  4812. if (e)
  4813. for (var n = 0; n < e.length; n++)
  4814. t.animation.addAnimator(e[n]);
  4815. this._clipPath && this._clipPath.addSelfToZr(t),
  4816. this._textContent && this._textContent.addSelfToZr(t),
  4817. this._textGuide && this._textGuide.addSelfToZr(t)
  4818. }
  4819. }
  4820. ,
  4821. t.prototype.removeSelfFromZr = function(t) {
  4822. if (this.__zr) {
  4823. this.__zr = null;
  4824. var e = this.animators;
  4825. if (e)
  4826. for (var n = 0; n < e.length; n++)
  4827. t.animation.removeAnimator(e[n]);
  4828. this._clipPath && this._clipPath.removeSelfFromZr(t),
  4829. this._textContent && this._textContent.removeSelfFromZr(t),
  4830. this._textGuide && this._textGuide.removeSelfFromZr(t)
  4831. }
  4832. }
  4833. ,
  4834. t.prototype.animate = function(t, e, n) {
  4835. var i = t ? this[t] : this;
  4836. var r = new Vi(i,e,n);
  4837. return t && (r.targetName = t),
  4838. this.addAnimator(r, t),
  4839. r
  4840. }
  4841. ,
  4842. t.prototype.addAnimator = function(t, e) {
  4843. var n = this.__zr
  4844. , i = this;
  4845. t.during((function() {
  4846. i.updateDuringAnimation(e)
  4847. }
  4848. )).done((function() {
  4849. var e = i.animators
  4850. , n = P(e, t);
  4851. n >= 0 && e.splice(n, 1)
  4852. }
  4853. )),
  4854. this.animators.push(t),
  4855. n && n.animation.addAnimator(t),
  4856. n && n.wakeUp()
  4857. }
  4858. ,
  4859. t.prototype.updateDuringAnimation = function(t) {
  4860. this.markRedraw()
  4861. }
  4862. ,
  4863. t.prototype.stopAnimation = function(t, e) {
  4864. for (var n = this.animators, i = n.length, r = [], o = 0; o < i; o++) {
  4865. var a = n[o];
  4866. t && t !== a.scope ? r.push(a) : a.stop(e)
  4867. }
  4868. return this.animators = r,
  4869. this
  4870. }
  4871. ,
  4872. t.prototype.animateTo = function(t, e, n) {
  4873. Nr(this, t, e, n)
  4874. }
  4875. ,
  4876. t.prototype.animateFrom = function(t, e, n) {
  4877. Nr(this, t, e, n, !0)
  4878. }
  4879. ,
  4880. t.prototype._transitionState = function(t, e, n, i) {
  4881. for (var r = Nr(this, e, n, i), o = 0; o < r.length; o++)
  4882. r[o].__fromStateTransition = t
  4883. }
  4884. ,
  4885. t.prototype.getBoundingRect = function() {
  4886. return null
  4887. }
  4888. ,
  4889. t.prototype.getPaintRect = function() {
  4890. return null
  4891. }
  4892. ,
  4893. t.initDefaultProps = function() {
  4894. var e = t.prototype;
  4895. e.type = "element",
  4896. e.name = "",
  4897. e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1,
  4898. e.__dirty = 1;
  4899. function n(t, n, i, r) {
  4900. function o(t, e) {
  4901. Object.defineProperty(e, 0, {
  4902. get: function() {
  4903. return t[i]
  4904. },
  4905. set: function(e) {
  4906. t[i] = e
  4907. }
  4908. }),
  4909. Object.defineProperty(e, 1, {
  4910. get: function() {
  4911. return t[r]
  4912. },
  4913. set: function(e) {
  4914. t[r] = e
  4915. }
  4916. })
  4917. }
  4918. Object.defineProperty(e, t, {
  4919. get: function() {
  4920. this[n] || o(this, this[n] = []);
  4921. return this[n]
  4922. },
  4923. set: function(t) {
  4924. this[i] = t[0],
  4925. this[r] = t[1],
  4926. this[n] = t,
  4927. o(this, t)
  4928. }
  4929. })
  4930. }
  4931. Object.defineProperty && (n("position", "_legacyPos", "x", "y"),
  4932. n("scale", "_legacyScale", "scaleX", "scaleY"),
  4933. n("origin", "_legacyOrigin", "originX", "originY"))
  4934. }(),
  4935. t
  4936. }();
  4937. function Nr(t, e, n, i, r) {
  4938. var o = [];
  4939. Vr(t, "", t, e, n = n || {}, i, o, r);
  4940. var a = o.length
  4941. , s = !1
  4942. , l = n.done
  4943. , u = n.aborted
  4944. , h = function() {
  4945. s = !0,
  4946. --a <= 0 && (s ? l && l() : u && u())
  4947. }
  4948. , c = function() {
  4949. --a <= 0 && (s ? l && l() : u && u())
  4950. };
  4951. a || l && l(),
  4952. o.length > 0 && n.during && o[0].during((function(t, e) {
  4953. n.during(e)
  4954. }
  4955. ));
  4956. for (var p = 0; p < o.length; p++) {
  4957. var d = o[p];
  4958. h && d.done(h),
  4959. c && d.aborted(c),
  4960. n.force && d.duration(n.duration),
  4961. d.start(n.easing)
  4962. }
  4963. return o
  4964. }
  4965. function Er(t, e, n) {
  4966. for (var i = 0; i < n; i++)
  4967. t[i] = e[i]
  4968. }
  4969. function zr(t, e, n) {
  4970. if (N(e[n]))
  4971. if (N(t[n]) || (t[n] = []),
  4972. $(e[n])) {
  4973. var i = e[n].length;
  4974. t[n].length !== i && (t[n] = new e[n].constructor(i),
  4975. Er(t[n], e[n], i))
  4976. } else {
  4977. var r = e[n]
  4978. , o = t[n]
  4979. , a = r.length;
  4980. if (N(r[0]))
  4981. for (var s = r[0].length, l = 0; l < a; l++)
  4982. o[l] ? Er(o[l], r[l], s) : o[l] = Array.prototype.slice.call(r[l]);
  4983. else
  4984. Er(o, r, a);
  4985. o.length = r.length
  4986. }
  4987. else
  4988. t[n] = e[n]
  4989. }
  4990. function Vr(t, e, n, i, r, o, a, s) {
  4991. 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++) {
  4992. var v = l[y]
  4993. , m = i[v];
  4994. if (null != m && null != n[v] && (d || o[v]))
  4995. if (!q(m) || N(m) || Q(m))
  4996. g.push(v);
  4997. else {
  4998. if (e) {
  4999. s || (n[v] = m,
  5000. t.updateDuringAnimation(e));
  5001. continue
  5002. }
  5003. Vr(t, v, n[v], m, r, o && o[v], a, s)
  5004. }
  5005. else
  5006. s || (n[v] = m,
  5007. t.updateDuringAnimation(e),
  5008. g.push(v))
  5009. }
  5010. var x = g.length;
  5011. if (!c && x)
  5012. for (var _ = 0; _ < f.length; _++) {
  5013. if ((w = f[_]).targetName === e)
  5014. if (w.stopTracks(g)) {
  5015. var b = P(f, w);
  5016. f.splice(b, 1)
  5017. }
  5018. }
  5019. if (r.force || (g = B(g, (function(t) {
  5020. return e = i[t],
  5021. r = n[t],
  5022. !(e === r || N(e) && N(r) && function(t, e) {
  5023. var n = t.length;
  5024. if (n !== e.length)
  5025. return !1;
  5026. for (var i = 0; i < n; i++)
  5027. if (t[i] !== e[i])
  5028. return !1;
  5029. return !0
  5030. }(e, r));
  5031. var e, r
  5032. }
  5033. )),
  5034. x = g.length),
  5035. x > 0 || r.force && !a.length) {
  5036. var w, S = void 0, M = void 0, I = void 0;
  5037. if (s) {
  5038. M = {},
  5039. p && (S = {});
  5040. for (_ = 0; _ < x; _++) {
  5041. M[v = g[_]] = n[v],
  5042. p ? S[v] = i[v] : n[v] = i[v]
  5043. }
  5044. } else if (p) {
  5045. I = {};
  5046. for (_ = 0; _ < x; _++) {
  5047. I[v = g[_]] = Pi(n[v]),
  5048. zr(n, i, v)
  5049. }
  5050. }
  5051. (w = new Vi(n,!1,!1,c ? B(f, (function(t) {
  5052. return t.targetName === e
  5053. }
  5054. )) : null)).targetName = e,
  5055. r.scope && (w.scope = r.scope),
  5056. p && S && w.whenWithKeys(0, S, g),
  5057. I && w.whenWithKeys(0, I, g),
  5058. w.whenWithKeys(null == u ? 500 : u, s ? M : i, g).delay(h || 0),
  5059. t.addAnimator(w, e),
  5060. a.push(w)
  5061. }
  5062. }
  5063. R(Rr, jt),
  5064. R(Rr, vr);
  5065. var Br = function(t) {
  5066. function e(e) {
  5067. var n = t.call(this) || this;
  5068. return n.isGroup = !0,
  5069. n._children = [],
  5070. n.attr(e),
  5071. n
  5072. }
  5073. return n(e, t),
  5074. e.prototype.childrenRef = function() {
  5075. return this._children
  5076. }
  5077. ,
  5078. e.prototype.children = function() {
  5079. return this._children.slice()
  5080. }
  5081. ,
  5082. e.prototype.childAt = function(t) {
  5083. return this._children[t]
  5084. }
  5085. ,
  5086. e.prototype.childOfName = function(t) {
  5087. for (var e = this._children, n = 0; n < e.length; n++)
  5088. if (e[n].name === t)
  5089. return e[n]
  5090. }
  5091. ,
  5092. e.prototype.childCount = function() {
  5093. return this._children.length
  5094. }
  5095. ,
  5096. e.prototype.add = function(t) {
  5097. return t && t !== this && t.parent !== this && (this._children.push(t),
  5098. this._doAdd(t)),
  5099. this
  5100. }
  5101. ,
  5102. e.prototype.addBefore = function(t, e) {
  5103. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  5104. var n = this._children
  5105. , i = n.indexOf(e);
  5106. i >= 0 && (n.splice(i, 0, t),
  5107. this._doAdd(t))
  5108. }
  5109. return this
  5110. }
  5111. ,
  5112. e.prototype.replace = function(t, e) {
  5113. var n = P(this._children, t);
  5114. return n >= 0 && this.replaceAt(e, n),
  5115. this
  5116. }
  5117. ,
  5118. e.prototype.replaceAt = function(t, e) {
  5119. var n = this._children
  5120. , i = n[e];
  5121. if (t && t !== this && t.parent !== this && t !== i) {
  5122. n[e] = t,
  5123. i.parent = null;
  5124. var r = this.__zr;
  5125. r && i.removeSelfFromZr(r),
  5126. this._doAdd(t)
  5127. }
  5128. return this
  5129. }
  5130. ,
  5131. e.prototype._doAdd = function(t) {
  5132. t.parent && t.parent.remove(t),
  5133. t.parent = this;
  5134. var e = this.__zr;
  5135. e && e !== t.__zr && t.addSelfToZr(e),
  5136. e && e.refresh()
  5137. }
  5138. ,
  5139. e.prototype.remove = function(t) {
  5140. var e = this.__zr
  5141. , n = this._children
  5142. , i = P(n, t);
  5143. return i < 0 || (n.splice(i, 1),
  5144. t.parent = null,
  5145. e && t.removeSelfFromZr(e),
  5146. e && e.refresh()),
  5147. this
  5148. }
  5149. ,
  5150. e.prototype.removeAll = function() {
  5151. for (var t = this._children, e = this.__zr, n = 0; n < t.length; n++) {
  5152. var i = t[n];
  5153. e && i.removeSelfFromZr(e),
  5154. i.parent = null
  5155. }
  5156. return t.length = 0,
  5157. this
  5158. }
  5159. ,
  5160. e.prototype.eachChild = function(t, e) {
  5161. for (var n = this._children, i = 0; i < n.length; i++) {
  5162. var r = n[i];
  5163. t.call(e, r, i)
  5164. }
  5165. return this
  5166. }
  5167. ,
  5168. e.prototype.traverse = function(t, e) {
  5169. for (var n = 0; n < this._children.length; n++) {
  5170. var i = this._children[n]
  5171. , r = t.call(e, i);
  5172. i.isGroup && !r && i.traverse(t, e)
  5173. }
  5174. return this
  5175. }
  5176. ,
  5177. e.prototype.addSelfToZr = function(e) {
  5178. t.prototype.addSelfToZr.call(this, e);
  5179. for (var n = 0; n < this._children.length; n++) {
  5180. this._children[n].addSelfToZr(e)
  5181. }
  5182. }
  5183. ,
  5184. e.prototype.removeSelfFromZr = function(e) {
  5185. t.prototype.removeSelfFromZr.call(this, e);
  5186. for (var n = 0; n < this._children.length; n++) {
  5187. this._children[n].removeSelfFromZr(e)
  5188. }
  5189. }
  5190. ,
  5191. e.prototype.getBoundingRect = function(t) {
  5192. for (var e = new ze(0,0,0,0), n = t || this._children, i = [], r = null, o = 0; o < n.length; o++) {
  5193. var a = n[o];
  5194. if (!a.ignore && !a.invisible) {
  5195. var s = a.getBoundingRect()
  5196. , l = a.getLocalTransform(i);
  5197. l ? (ze.applyTransform(e, s, l),
  5198. (r = r || e.clone()).union(e)) : (r = r || s.clone()).union(s)
  5199. }
  5200. }
  5201. return r || e
  5202. }
  5203. ,
  5204. e
  5205. }(Rr);
  5206. Br.prototype.type = "group";
  5207. /*!
  5208. * ZRender, a high performance 2d drawing library.
  5209. *
  5210. * Copyright (c) 2013, Baidu Inc.
  5211. * All rights reserved.
  5212. *
  5213. * LICENSE
  5214. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  5215. */
  5216. var Fr = {}
  5217. , Gr = {};
  5218. var Wr, Hr = function() {
  5219. function t(t, e, n) {
  5220. var i = this;
  5221. this._sleepAfterStill = 10,
  5222. this._stillFrameAccum = 0,
  5223. this._needsRefresh = !0,
  5224. this._needsRefreshHover = !0,
  5225. this._darkMode = !1,
  5226. n = n || {},
  5227. this.dom = e,
  5228. this.id = t;
  5229. var o = new rn
  5230. , a = n.renderer || "canvas";
  5231. Fr[a] || (a = G(Fr)[0]),
  5232. n.useDirtyRect = null != n.useDirtyRect && n.useDirtyRect;
  5233. var s = new Fr[a](e,o,n,t)
  5234. , l = n.ssr || s.ssrOnly;
  5235. this.storage = o,
  5236. this.painter = s;
  5237. var u, h = r.node || r.worker || l ? null : new or(s.getViewportRoot(),s.root), c = n.useCoarsePointer;
  5238. (null == c || "auto" === c ? r.touchEventsSupported : !!c) && (u = rt(n.pointerSize, 44)),
  5239. this.handler = new Ye(o,s,h,s.root,u),
  5240. this.animation = new Wi({
  5241. stage: {
  5242. update: l ? null : function() {
  5243. return i._flush(!0)
  5244. }
  5245. }
  5246. }),
  5247. l || this.animation.start()
  5248. }
  5249. return t.prototype.add = function(t) {
  5250. !this._disposed && t && (this.storage.addRoot(t),
  5251. t.addSelfToZr(this),
  5252. this.refresh())
  5253. }
  5254. ,
  5255. t.prototype.remove = function(t) {
  5256. !this._disposed && t && (this.storage.delRoot(t),
  5257. t.removeSelfFromZr(this),
  5258. this.refresh())
  5259. }
  5260. ,
  5261. t.prototype.configLayer = function(t, e) {
  5262. this._disposed || (this.painter.configLayer && this.painter.configLayer(t, e),
  5263. this.refresh())
  5264. }
  5265. ,
  5266. t.prototype.setBackgroundColor = function(t) {
  5267. this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(t),
  5268. this.refresh(),
  5269. this._backgroundColor = t,
  5270. this._darkMode = function(t) {
  5271. if (!t)
  5272. return !1;
  5273. if ("string" == typeof t)
  5274. return oi(t, 1) < .4;
  5275. if (t.colorStops) {
  5276. for (var e = t.colorStops, n = 0, i = e.length, r = 0; r < i; r++)
  5277. n += oi(e[r].color, 1);
  5278. return (n /= i) < .4
  5279. }
  5280. return !1
  5281. }(t))
  5282. }
  5283. ,
  5284. t.prototype.getBackgroundColor = function() {
  5285. return this._backgroundColor
  5286. }
  5287. ,
  5288. t.prototype.setDarkMode = function(t) {
  5289. this._darkMode = t
  5290. }
  5291. ,
  5292. t.prototype.isDarkMode = function() {
  5293. return this._darkMode
  5294. }
  5295. ,
  5296. t.prototype.refreshImmediately = function(t) {
  5297. this._disposed || (t || this.animation.update(!0),
  5298. this._needsRefresh = !1,
  5299. this.painter.refresh(),
  5300. this._needsRefresh = !1)
  5301. }
  5302. ,
  5303. t.prototype.refresh = function() {
  5304. this._disposed || (this._needsRefresh = !0,
  5305. this.animation.start())
  5306. }
  5307. ,
  5308. t.prototype.flush = function() {
  5309. this._disposed || this._flush(!1)
  5310. }
  5311. ,
  5312. t.prototype._flush = function(t) {
  5313. var e, n = Bi();
  5314. this._needsRefresh && (e = !0,
  5315. this.refreshImmediately(t)),
  5316. this._needsRefreshHover && (e = !0,
  5317. this.refreshHoverImmediately());
  5318. var i = Bi();
  5319. e ? (this._stillFrameAccum = 0,
  5320. this.trigger("rendered", {
  5321. elapsedTime: i - n
  5322. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++,
  5323. this._stillFrameAccum > this._sleepAfterStill && this.animation.stop())
  5324. }
  5325. ,
  5326. t.prototype.setSleepAfterStill = function(t) {
  5327. this._sleepAfterStill = t
  5328. }
  5329. ,
  5330. t.prototype.wakeUp = function() {
  5331. this._disposed || (this.animation.start(),
  5332. this._stillFrameAccum = 0)
  5333. }
  5334. ,
  5335. t.prototype.refreshHover = function() {
  5336. this._needsRefreshHover = !0
  5337. }
  5338. ,
  5339. t.prototype.refreshHoverImmediately = function() {
  5340. this._disposed || (this._needsRefreshHover = !1,
  5341. this.painter.refreshHover && "canvas" === this.painter.getType() && this.painter.refreshHover())
  5342. }
  5343. ,
  5344. t.prototype.resize = function(t) {
  5345. this._disposed || (t = t || {},
  5346. this.painter.resize(t.width, t.height),
  5347. this.handler.resize())
  5348. }
  5349. ,
  5350. t.prototype.clearAnimation = function() {
  5351. this._disposed || this.animation.clear()
  5352. }
  5353. ,
  5354. t.prototype.getWidth = function() {
  5355. if (!this._disposed)
  5356. return this.painter.getWidth()
  5357. }
  5358. ,
  5359. t.prototype.getHeight = function() {
  5360. if (!this._disposed)
  5361. return this.painter.getHeight()
  5362. }
  5363. ,
  5364. t.prototype.setCursorStyle = function(t) {
  5365. this._disposed || this.handler.setCursorStyle(t)
  5366. }
  5367. ,
  5368. t.prototype.findHover = function(t, e) {
  5369. if (!this._disposed)
  5370. return this.handler.findHover(t, e)
  5371. }
  5372. ,
  5373. t.prototype.on = function(t, e, n) {
  5374. return this._disposed || this.handler.on(t, e, n),
  5375. this
  5376. }
  5377. ,
  5378. t.prototype.off = function(t, e) {
  5379. this._disposed || this.handler.off(t, e)
  5380. }
  5381. ,
  5382. t.prototype.trigger = function(t, e) {
  5383. this._disposed || this.handler.trigger(t, e)
  5384. }
  5385. ,
  5386. t.prototype.clear = function() {
  5387. if (!this._disposed) {
  5388. for (var t = this.storage.getRoots(), e = 0; e < t.length; e++)
  5389. t[e]instanceof Br && t[e].removeSelfFromZr(this);
  5390. this.storage.delAllRoots(),
  5391. this.painter.clear()
  5392. }
  5393. }
  5394. ,
  5395. t.prototype.dispose = function() {
  5396. var t;
  5397. this._disposed || (this.animation.stop(),
  5398. this.clear(),
  5399. this.storage.dispose(),
  5400. this.painter.dispose(),
  5401. this.handler.dispose(),
  5402. this.animation = this.storage = this.painter = this.handler = null,
  5403. this._disposed = !0,
  5404. t = this.id,
  5405. delete Gr[t])
  5406. }
  5407. ,
  5408. t
  5409. }();
  5410. function Yr(t, e) {
  5411. var n = new Hr(M(),t,e);
  5412. return Gr[n.id] = n,
  5413. n
  5414. }
  5415. function Xr(t, e) {
  5416. Fr[t] = e
  5417. }
  5418. function Ur(t) {
  5419. if ("function" == typeof Wr)
  5420. return Wr(t)
  5421. }
  5422. function Zr(t) {
  5423. Wr = t
  5424. }
  5425. var jr = Object.freeze({
  5426. __proto__: null,
  5427. init: Yr,
  5428. dispose: function(t) {
  5429. t.dispose()
  5430. },
  5431. disposeAll: function() {
  5432. for (var t in Gr)
  5433. Gr.hasOwnProperty(t) && Gr[t].dispose();
  5434. Gr = {}
  5435. },
  5436. getInstance: function(t) {
  5437. return Gr[t]
  5438. },
  5439. registerPainter: Xr,
  5440. getElementSSRData: Ur,
  5441. registerSSRDataGetter: Zr,
  5442. version: "5.6.1"
  5443. })
  5444. , qr = 1e-4;
  5445. function Kr(t, e, n, i) {
  5446. var r = e[0]
  5447. , o = e[1]
  5448. , a = n[0]
  5449. , s = n[1]
  5450. , l = o - r
  5451. , u = s - a;
  5452. if (0 === l)
  5453. return 0 === u ? a : (a + s) / 2;
  5454. if (i)
  5455. if (l > 0) {
  5456. if (t <= r)
  5457. return a;
  5458. if (t >= o)
  5459. return s
  5460. } else {
  5461. if (t >= r)
  5462. return a;
  5463. if (t <= o)
  5464. return s
  5465. }
  5466. else {
  5467. if (t === r)
  5468. return a;
  5469. if (t === o)
  5470. return s
  5471. }
  5472. return (t - r) / l * u + a
  5473. }
  5474. function $r(t, e) {
  5475. switch (t) {
  5476. case "center":
  5477. case "middle":
  5478. t = "50%";
  5479. break;
  5480. case "left":
  5481. case "top":
  5482. t = "0%";
  5483. break;
  5484. case "right":
  5485. case "bottom":
  5486. t = "100%"
  5487. }
  5488. return U(t) ? (n = t,
  5489. n.replace(/^\s+|\s+$/g, "")).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t;
  5490. var n
  5491. }
  5492. function Jr(t, e, n) {
  5493. return null == e && (e = 10),
  5494. e = Math.min(Math.max(0, e), 20),
  5495. t = (+t).toFixed(e),
  5496. n ? t : +t
  5497. }
  5498. function Qr(t) {
  5499. return t.sort((function(t, e) {
  5500. return t - e
  5501. }
  5502. )),
  5503. t
  5504. }
  5505. function to(t) {
  5506. if (t = +t,
  5507. isNaN(t))
  5508. return 0;
  5509. if (t > 1e-14)
  5510. for (var e = 1, n = 0; n < 15; n++,
  5511. e *= 10)
  5512. if (Math.round(t * e) / e === t)
  5513. return n;
  5514. return eo(t)
  5515. }
  5516. function eo(t) {
  5517. var e = t.toString().toLowerCase()
  5518. , n = e.indexOf("e")
  5519. , i = n > 0 ? +e.slice(n + 1) : 0
  5520. , r = n > 0 ? n : e.length
  5521. , o = e.indexOf(".")
  5522. , a = o < 0 ? 0 : r - 1 - o;
  5523. return Math.max(0, a - i)
  5524. }
  5525. function no(t, e) {
  5526. var n = Math.log
  5527. , i = Math.LN10
  5528. , r = Math.floor(n(t[1] - t[0]) / i)
  5529. , o = Math.round(n(Math.abs(e[1] - e[0])) / i)
  5530. , a = Math.min(Math.max(-r + o, 0), 20);
  5531. return isFinite(a) ? a : 20
  5532. }
  5533. function io(t, e) {
  5534. var n = V(t, (function(t, e) {
  5535. return t + (isNaN(e) ? 0 : e)
  5536. }
  5537. ), 0);
  5538. if (0 === n)
  5539. return [];
  5540. for (var i = Math.pow(10, e), r = z(t, (function(t) {
  5541. return (isNaN(t) ? 0 : t) / n * i * 100
  5542. }
  5543. )), o = 100 * i, a = z(r, (function(t) {
  5544. return Math.floor(t)
  5545. }
  5546. )), s = V(a, (function(t, e) {
  5547. return t + e
  5548. }
  5549. ), 0), l = z(r, (function(t, e) {
  5550. return t - a[e]
  5551. }
  5552. )); s < o; ) {
  5553. for (var u = Number.NEGATIVE_INFINITY, h = null, c = 0, p = l.length; c < p; ++c)
  5554. l[c] > u && (u = l[c],
  5555. h = c);
  5556. ++a[h],
  5557. l[h] = 0,
  5558. ++s
  5559. }
  5560. return z(a, (function(t) {
  5561. return t / i
  5562. }
  5563. ))
  5564. }
  5565. function ro(t, e) {
  5566. var n = Math.max(to(t), to(e))
  5567. , i = t + e;
  5568. return n > 20 ? i : Jr(i, n)
  5569. }
  5570. var oo = 9007199254740991;
  5571. function ao(t) {
  5572. var e = 2 * Math.PI;
  5573. return (t % e + e) % e
  5574. }
  5575. function so(t) {
  5576. return t > -1e-4 && t < qr
  5577. }
  5578. 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)?)?)?)?)?$/;
  5579. function uo(t) {
  5580. if (t instanceof Date)
  5581. return t;
  5582. if (U(t)) {
  5583. var e = lo.exec(t);
  5584. if (!e)
  5585. return new Date(NaN);
  5586. if (e[8]) {
  5587. var n = +e[4] || 0;
  5588. return "Z" !== e[8].toUpperCase() && (n -= +e[8].slice(0, 3)),
  5589. 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))
  5590. }
  5591. 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)
  5592. }
  5593. return null == t ? new Date(NaN) : new Date(Math.round(t))
  5594. }
  5595. function ho(t) {
  5596. return Math.pow(10, co(t))
  5597. }
  5598. function co(t) {
  5599. if (0 === t)
  5600. return 0;
  5601. var e = Math.floor(Math.log(t) / Math.LN10);
  5602. return t / Math.pow(10, e) >= 10 && e++,
  5603. e
  5604. }
  5605. function po(t, e) {
  5606. var n = co(t)
  5607. , i = Math.pow(10, n)
  5608. , r = t / i;
  5609. 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,
  5610. n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t
  5611. }
  5612. function fo(t, e) {
  5613. var n = (t.length - 1) * e + 1
  5614. , i = Math.floor(n)
  5615. , r = +t[i - 1]
  5616. , o = n - i;
  5617. return o ? r + o * (t[i] - r) : r
  5618. }
  5619. function go(t) {
  5620. t.sort((function(t, e) {
  5621. return s(t, e, 0) ? -1 : 1
  5622. }
  5623. ));
  5624. for (var e = -1 / 0, n = 1, i = 0; i < t.length; ) {
  5625. for (var r = t[i].interval, o = t[i].close, a = 0; a < 2; a++)
  5626. r[a] <= e && (r[a] = e,
  5627. o[a] = a ? 1 : 1 - n),
  5628. e = r[a],
  5629. n = o[a];
  5630. r[0] === r[1] && o[0] * o[1] != 1 ? t.splice(i, 1) : i++
  5631. }
  5632. return t;
  5633. function s(t, e, n) {
  5634. 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))
  5635. }
  5636. }
  5637. function yo(t) {
  5638. var e = parseFloat(t);
  5639. return e == t && (0 !== e || !U(t) || t.indexOf("x") <= 0) ? e : NaN
  5640. }
  5641. function vo(t) {
  5642. return !isNaN(yo(t))
  5643. }
  5644. function mo() {
  5645. return Math.round(9 * Math.random())
  5646. }
  5647. function xo(t, e) {
  5648. return 0 === e ? t : xo(e, t % e)
  5649. }
  5650. function _o(t, e) {
  5651. return null == t ? e : null == e ? t : t * e / xo(t, e)
  5652. }
  5653. "undefined" != typeof console && console.warn && console.log;
  5654. function bo(t) {
  5655. 0
  5656. }
  5657. function wo(t) {
  5658. throw new Error(t)
  5659. }
  5660. function So(t, e, n) {
  5661. return (e - t) * n + t
  5662. }
  5663. var Mo = "series\0"
  5664. , Io = "\0_ec_\0";
  5665. function To(t) {
  5666. return t instanceof Array ? t : null == t ? [] : [t]
  5667. }
  5668. function Co(t, e, n) {
  5669. if (t) {
  5670. t[e] = t[e] || {},
  5671. t.emphasis = t.emphasis || {},
  5672. t.emphasis[e] = t.emphasis[e] || {};
  5673. for (var i = 0, r = n.length; i < r; i++) {
  5674. var o = n[i];
  5675. !t.emphasis[e].hasOwnProperty(o) && t[e].hasOwnProperty(o) && (t.emphasis[e][o] = t[e][o])
  5676. }
  5677. }
  5678. }
  5679. 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"];
  5680. function Ao(t) {
  5681. return !q(t) || Y(t) || t instanceof Date ? t : t.value
  5682. }
  5683. function ko(t) {
  5684. return q(t) && !(t instanceof Array)
  5685. }
  5686. function Lo(t, e, n) {
  5687. var i = "normalMerge" === n
  5688. , r = "replaceMerge" === n
  5689. , o = "replaceAll" === n;
  5690. t = t || [],
  5691. e = (e || []).slice();
  5692. var a = yt();
  5693. E(e, (function(t, n) {
  5694. q(t) || (e[n] = null)
  5695. }
  5696. ));
  5697. var s, l, u = function(t, e, n) {
  5698. var i = [];
  5699. if ("replaceAll" === n)
  5700. return i;
  5701. for (var r = 0; r < t.length; r++) {
  5702. var o = t[r];
  5703. o && null != o.id && e.set(o.id, r),
  5704. i.push({
  5705. existing: "replaceMerge" === n || Eo(o) ? null : o,
  5706. newOption: null,
  5707. keyInfo: null,
  5708. brandNew: null
  5709. })
  5710. }
  5711. return i
  5712. }(t, a, n);
  5713. return (i || r) && function(t, e, n, i) {
  5714. E(i, (function(r, o) {
  5715. if (r && null != r.id) {
  5716. var a = Oo(r.id)
  5717. , s = n.get(a);
  5718. if (null != s) {
  5719. var l = t[s];
  5720. lt(!l.newOption, 'Duplicated option on id "' + a + '".'),
  5721. l.newOption = r,
  5722. l.existing = e[s],
  5723. i[o] = null
  5724. }
  5725. }
  5726. }
  5727. ))
  5728. }(u, t, a, e),
  5729. i && function(t, e) {
  5730. E(e, (function(n, i) {
  5731. if (n && null != n.name)
  5732. for (var r = 0; r < t.length; r++) {
  5733. var o = t[r].existing;
  5734. if (!t[r].newOption && o && (null == o.id || null == n.id) && !Eo(n) && !Eo(o) && Po("name", o, n))
  5735. return t[r].newOption = n,
  5736. void (e[i] = null)
  5737. }
  5738. }
  5739. ))
  5740. }(u, e),
  5741. i || r ? function(t, e, n) {
  5742. E(e, (function(e) {
  5743. if (e) {
  5744. for (var i, r = 0; (i = t[r]) && (i.newOption || Eo(i.existing) || i.existing && null != e.id && !Po("id", e, i.existing)); )
  5745. r++;
  5746. i ? (i.newOption = e,
  5747. i.brandNew = n) : t.push({
  5748. newOption: e,
  5749. brandNew: n,
  5750. existing: null,
  5751. keyInfo: null
  5752. }),
  5753. r++
  5754. }
  5755. }
  5756. ))
  5757. }(u, e, r) : o && function(t, e) {
  5758. E(e, (function(e) {
  5759. t.push({
  5760. newOption: e,
  5761. brandNew: !0,
  5762. existing: null,
  5763. keyInfo: null
  5764. })
  5765. }
  5766. ))
  5767. }(u, e),
  5768. s = u,
  5769. l = yt(),
  5770. E(s, (function(t) {
  5771. var e = t.existing;
  5772. e && l.set(e.id, t)
  5773. }
  5774. )),
  5775. E(s, (function(t) {
  5776. var e = t.newOption;
  5777. lt(!e || null == e.id || !l.get(e.id) || l.get(e.id) === t, "id duplicates: " + (e && e.id)),
  5778. e && null != e.id && l.set(e.id, t),
  5779. !t.keyInfo && (t.keyInfo = {})
  5780. }
  5781. )),
  5782. E(s, (function(t, e) {
  5783. var n = t.existing
  5784. , i = t.newOption
  5785. , r = t.keyInfo;
  5786. if (q(i)) {
  5787. if (r.name = null != i.name ? Oo(i.name) : n ? n.name : Mo + e,
  5788. n)
  5789. r.id = Oo(n.id);
  5790. else if (null != i.id)
  5791. r.id = Oo(i.id);
  5792. else {
  5793. var o = 0;
  5794. do {
  5795. r.id = "\0" + r.name + "\0" + o++
  5796. } while (l.get(r.id))
  5797. }
  5798. l.set(r.id, t)
  5799. }
  5800. }
  5801. )),
  5802. u
  5803. }
  5804. function Po(t, e, n) {
  5805. var i = Ro(e[t], null)
  5806. , r = Ro(n[t], null);
  5807. return null != i && null != r && i === r
  5808. }
  5809. function Oo(t) {
  5810. return Ro(t, "")
  5811. }
  5812. function Ro(t, e) {
  5813. return null == t ? e : U(t) ? t : j(t) || Z(t) ? t + "" : e
  5814. }
  5815. function No(t) {
  5816. var e = t.name;
  5817. return !(!e || !e.indexOf(Mo))
  5818. }
  5819. function Eo(t) {
  5820. return t && null != t.id && 0 === Oo(t.id).indexOf(Io)
  5821. }
  5822. function zo(t, e) {
  5823. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? Y(e.dataIndex) ? z(e.dataIndex, (function(e) {
  5824. return t.indexOfRawIndex(e)
  5825. }
  5826. )) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? Y(e.name) ? z(e.name, (function(e) {
  5827. return t.indexOfName(e)
  5828. }
  5829. )) : t.indexOfName(e.name) : void 0
  5830. }
  5831. function Vo() {
  5832. var t = "__ec_inner_" + Bo++;
  5833. return function(e) {
  5834. return e[t] || (e[t] = {})
  5835. }
  5836. }
  5837. var Bo = mo();
  5838. function Fo(t, e, n) {
  5839. var i = Go(e, n)
  5840. , r = i.mainTypeSpecified
  5841. , o = i.queryOptionMap
  5842. , a = i.others
  5843. , s = n ? n.defaultMainType : null;
  5844. return !r && s && o.set(s, {}),
  5845. o.each((function(e, i) {
  5846. var r = Yo(t, i, e, {
  5847. useDefault: s === i,
  5848. enableAll: !n || null == n.enableAll || n.enableAll,
  5849. enableNone: !n || null == n.enableNone || n.enableNone
  5850. });
  5851. a[i + "Models"] = r.models,
  5852. a[i + "Model"] = r.models[0]
  5853. }
  5854. )),
  5855. a
  5856. }
  5857. function Go(t, e) {
  5858. var n;
  5859. if (U(t)) {
  5860. var i = {};
  5861. i[t + "Index"] = 0,
  5862. n = i
  5863. } else
  5864. n = t;
  5865. var r = yt()
  5866. , o = {}
  5867. , a = !1;
  5868. return E(n, (function(t, n) {
  5869. if ("dataIndex" !== n && "dataIndexInside" !== n) {
  5870. var i = n.match(/^(\w+)(Index|Id|Name)$/) || []
  5871. , s = i[1]
  5872. , l = (i[2] || "").toLowerCase();
  5873. if (s && l && !(e && e.includeMainTypes && P(e.includeMainTypes, s) < 0))
  5874. a = a || !!s,
  5875. (r.get(s) || r.set(s, {}))[l] = t
  5876. } else
  5877. o[n] = t
  5878. }
  5879. )),
  5880. {
  5881. mainTypeSpecified: a,
  5882. queryOptionMap: r,
  5883. others: o
  5884. }
  5885. }
  5886. var Wo = {
  5887. useDefault: !0,
  5888. enableAll: !1,
  5889. enableNone: !1
  5890. }
  5891. , Ho = {
  5892. useDefault: !1,
  5893. enableAll: !0,
  5894. enableNone: !0
  5895. };
  5896. function Yo(t, e, n, i) {
  5897. i = i || Wo;
  5898. var r = n.index
  5899. , o = n.id
  5900. , a = n.name
  5901. , s = {
  5902. models: null,
  5903. specified: null != r || null != o || null != a
  5904. };
  5905. if (!s.specified) {
  5906. var l = void 0;
  5907. return s.models = i.useDefault && (l = t.getComponent(e)) ? [l] : [],
  5908. s
  5909. }
  5910. return "none" === r || !1 === r ? (lt(i.enableNone, '`"none"` or `false` is not a valid value on index option.'),
  5911. s.models = [],
  5912. s) : ("all" === r && (lt(i.enableAll, '`"all"` is not a valid value on index option.'),
  5913. r = o = a = null),
  5914. s.models = t.queryComponents({
  5915. mainType: e,
  5916. index: r,
  5917. id: o,
  5918. name: a
  5919. }),
  5920. s)
  5921. }
  5922. function Xo(t, e, n) {
  5923. t.setAttribute ? t.setAttribute(e, n) : t[e] = n
  5924. }
  5925. function Uo(t, e) {
  5926. var n = yt()
  5927. , i = [];
  5928. return E(t, (function(t) {
  5929. var r = e(t);
  5930. (n.get(r) || (i.push(r),
  5931. n.set(r, []))).push(t)
  5932. }
  5933. )),
  5934. {
  5935. keys: i,
  5936. buckets: n
  5937. }
  5938. }
  5939. function Zo(t, e, n, i, r) {
  5940. var o = null == e || "auto" === e;
  5941. if (null == i)
  5942. return i;
  5943. if (j(i))
  5944. return Jr(f = So(n || 0, i, r), o ? Math.max(to(n || 0), to(i)) : e);
  5945. if (U(i))
  5946. return r < 1 ? n : i;
  5947. for (var a = [], s = n, l = i, u = Math.max(s ? s.length : 0, l.length), h = 0; h < u; ++h) {
  5948. var c = t.getDimensionInfo(h);
  5949. if (c && "ordinal" === c.type)
  5950. a[h] = (r < 1 && s ? s : l)[h];
  5951. else {
  5952. var p = s && s[h] ? s[h] : 0
  5953. , d = l[h]
  5954. , f = So(p, d, r);
  5955. a[h] = Jr(f, o ? Math.max(to(p), to(d)) : e)
  5956. }
  5957. }
  5958. return a
  5959. }
  5960. var jo = "___EC__COMPONENT__CONTAINER___"
  5961. , qo = "___EC__EXTENDED_CLASS___";
  5962. function Ko(t) {
  5963. var e = {
  5964. main: "",
  5965. sub: ""
  5966. };
  5967. if (t) {
  5968. var n = t.split(".");
  5969. e.main = n[0] || "",
  5970. e.sub = n[1] || ""
  5971. }
  5972. return e
  5973. }
  5974. function $o(t, e) {
  5975. t.$constructor = t,
  5976. t.extend = function(t) {
  5977. var e, i, r = this;
  5978. return X(i = r) && /^class\s/.test(Function.prototype.toString.call(i)) ? e = function(t) {
  5979. function e() {
  5980. return t.apply(this, arguments) || this
  5981. }
  5982. return n(e, t),
  5983. e
  5984. }(r) : (e = function() {
  5985. (t.$constructor || r).apply(this, arguments)
  5986. }
  5987. ,
  5988. O(e, this)),
  5989. A(e.prototype, t),
  5990. e[qo] = !0,
  5991. e.extend = this.extend,
  5992. e.superCall = ta,
  5993. e.superApply = ea,
  5994. e.superClass = r,
  5995. e
  5996. }
  5997. }
  5998. function Jo(t, e) {
  5999. t.extend = e.extend
  6000. }
  6001. var Qo = Math.round(10 * Math.random());
  6002. function ta(t, e) {
  6003. for (var n = [], i = 2; i < arguments.length; i++)
  6004. n[i - 2] = arguments[i];
  6005. return this.superClass.prototype[e].apply(t, n)
  6006. }
  6007. function ea(t, e, n) {
  6008. return this.superClass.prototype[e].apply(t, n)
  6009. }
  6010. function na(t) {
  6011. var e = {};
  6012. t.registerClass = function(t) {
  6013. var n, i = t.type || t.prototype.type;
  6014. if (i) {
  6015. lt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n = i), 'componentType "' + n + '" illegal'),
  6016. t.prototype.type = i;
  6017. var r = Ko(i);
  6018. if (r.sub) {
  6019. if (r.sub !== jo) {
  6020. var o = function(t) {
  6021. var n = e[t.main];
  6022. n && n[jo] || ((n = e[t.main] = {})[jo] = !0);
  6023. return n
  6024. }(r);
  6025. o[r.sub] = t
  6026. }
  6027. } else
  6028. e[r.main] = t
  6029. }
  6030. return t
  6031. }
  6032. ,
  6033. t.getClass = function(t, n, i) {
  6034. var r = e[t];
  6035. if (r && r[jo] && (r = n ? r[n] : null),
  6036. i && !r)
  6037. throw new Error(n ? "Component " + t + "." + (n || "") + " is used but not imported." : t + ".type should be specified.");
  6038. return r
  6039. }
  6040. ,
  6041. t.getClassesByMainType = function(t) {
  6042. var n = Ko(t)
  6043. , i = []
  6044. , r = e[n.main];
  6045. return r && r[jo] ? E(r, (function(t, e) {
  6046. e !== jo && i.push(t)
  6047. }
  6048. )) : i.push(r),
  6049. i
  6050. }
  6051. ,
  6052. t.hasClass = function(t) {
  6053. var n = Ko(t);
  6054. return !!e[n.main]
  6055. }
  6056. ,
  6057. t.getAllClassMainTypes = function() {
  6058. var t = [];
  6059. return E(e, (function(e, n) {
  6060. t.push(n)
  6061. }
  6062. )),
  6063. t
  6064. }
  6065. ,
  6066. t.hasSubTypes = function(t) {
  6067. var n = Ko(t)
  6068. , i = e[n.main];
  6069. return i && i[jo]
  6070. }
  6071. }
  6072. function ia(t, e) {
  6073. for (var n = 0; n < t.length; n++)
  6074. t[n][1] || (t[n][1] = t[n][0]);
  6075. return e = e || !1,
  6076. function(n, i, r) {
  6077. for (var o = {}, a = 0; a < t.length; a++) {
  6078. var s = t[a][1];
  6079. if (!(i && P(i, s) >= 0 || r && P(r, s) < 0)) {
  6080. var l = n.getShallow(s, e);
  6081. null != l && (o[t[a][0]] = l)
  6082. }
  6083. }
  6084. return o
  6085. }
  6086. }
  6087. var ra = ia([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]])
  6088. , oa = function() {
  6089. function t() {}
  6090. return t.prototype.getAreaStyle = function(t, e) {
  6091. return ra(this, t, e)
  6092. }
  6093. ,
  6094. t
  6095. }()
  6096. , aa = new En(50);
  6097. function sa(t) {
  6098. if ("string" == typeof t) {
  6099. var e = aa.get(t);
  6100. return e && e.image
  6101. }
  6102. return t
  6103. }
  6104. function la(t, e, n, i, r) {
  6105. if (t) {
  6106. if ("string" == typeof t) {
  6107. if (e && e.__zrImageSrc === t || !n)
  6108. return e;
  6109. var o = aa.get(t)
  6110. , a = {
  6111. hostEl: n,
  6112. cb: i,
  6113. cbPayload: r
  6114. };
  6115. return o ? !ha(e = o.image) && o.pending.push(a) : ((e = h.loadImage(t, ua, ua)).__zrImageSrc = t,
  6116. aa.put(t, e.__cachedImgObj = {
  6117. image: e,
  6118. pending: [a]
  6119. })),
  6120. e
  6121. }
  6122. return t
  6123. }
  6124. return e
  6125. }
  6126. function ua() {
  6127. var t = this.__cachedImgObj;
  6128. this.onload = this.onerror = this.__cachedImgObj = null;
  6129. for (var e = 0; e < t.pending.length; e++) {
  6130. var n = t.pending[e]
  6131. , i = n.cb;
  6132. i && i(this, n.cbPayload),
  6133. n.hostEl.dirty()
  6134. }
  6135. t.pending.length = 0
  6136. }
  6137. function ha(t) {
  6138. return t && t.width && t.height
  6139. }
  6140. var ca = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  6141. function pa(t, e, n, i, r, o) {
  6142. if (!n)
  6143. return t.text = "",
  6144. void (t.isTruncated = !1);
  6145. var a = (e + "").split("\n");
  6146. o = da(n, i, r, o);
  6147. for (var s = !1, l = {}, u = 0, h = a.length; u < h; u++)
  6148. fa(l, a[u], o),
  6149. a[u] = l.textLine,
  6150. s = s || l.isTruncated;
  6151. t.text = a.join("\n"),
  6152. t.isTruncated = s
  6153. }
  6154. function da(t, e, n, i) {
  6155. var r = A({}, i = i || {});
  6156. r.font = e,
  6157. n = rt(n, "..."),
  6158. r.maxIterations = rt(i.maxIterations, 2);
  6159. var o = r.minChar = rt(i.minChar, 0);
  6160. r.cnCharWidth = br("国", e);
  6161. var a = r.ascCharWidth = br("a", e);
  6162. r.placeholder = rt(i.placeholder, "");
  6163. for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= a; l++)
  6164. s -= a;
  6165. var u = br(n, e);
  6166. return u > s && (n = "",
  6167. u = 0),
  6168. s = t - u,
  6169. r.ellipsis = n,
  6170. r.ellipsisWidth = u,
  6171. r.contentWidth = s,
  6172. r.containerWidth = t,
  6173. r
  6174. }
  6175. function fa(t, e, n) {
  6176. var i = n.containerWidth
  6177. , r = n.font
  6178. , o = n.contentWidth;
  6179. if (!i)
  6180. return t.textLine = "",
  6181. void (t.isTruncated = !1);
  6182. var a = br(e, r);
  6183. if (a <= i)
  6184. return t.textLine = e,
  6185. void (t.isTruncated = !1);
  6186. for (var s = 0; ; s++) {
  6187. if (a <= o || s >= n.maxIterations) {
  6188. e += n.ellipsis;
  6189. break
  6190. }
  6191. var l = 0 === s ? ga(e, o, n.ascCharWidth, n.cnCharWidth) : a > 0 ? Math.floor(e.length * o / a) : 0;
  6192. a = br(e = e.substr(0, l), r)
  6193. }
  6194. "" === e && (e = n.placeholder),
  6195. t.textLine = e,
  6196. t.isTruncated = !0
  6197. }
  6198. function ga(t, e, n, i) {
  6199. for (var r = 0, o = 0, a = t.length; o < a && r < e; o++) {
  6200. var s = t.charCodeAt(o);
  6201. r += 0 <= s && s <= 127 ? n : i
  6202. }
  6203. return o
  6204. }
  6205. var ya = function() {}
  6206. , va = function(t) {
  6207. this.tokens = [],
  6208. t && (this.tokens = t)
  6209. }
  6210. , ma = function() {
  6211. this.width = 0,
  6212. this.height = 0,
  6213. this.contentWidth = 0,
  6214. this.contentHeight = 0,
  6215. this.outerWidth = 0,
  6216. this.outerHeight = 0,
  6217. this.lines = [],
  6218. this.isTruncated = !1
  6219. };
  6220. function xa(t, e, n, i, r) {
  6221. var o, a, s = "" === e, l = r && n.rich[r] || {}, u = t.lines, h = l.font || n.font, c = !1;
  6222. if (i) {
  6223. var p = l.padding
  6224. , d = p ? p[1] + p[3] : 0;
  6225. if (null != l.width && "auto" !== l.width) {
  6226. var f = Cr(l.width, i.width) + d;
  6227. u.length > 0 && f + i.accumWidth > i.width && (o = e.split("\n"),
  6228. c = !0),
  6229. i.accumWidth = f
  6230. } else {
  6231. var g = wa(e, h, i.width, i.breakAll, i.accumWidth);
  6232. i.accumWidth = g.accumWidth + d,
  6233. a = g.linesWidths,
  6234. o = g.lines
  6235. }
  6236. } else
  6237. o = e.split("\n");
  6238. for (var y = 0; y < o.length; y++) {
  6239. var v = o[y]
  6240. , m = new ya;
  6241. if (m.styleName = r,
  6242. m.text = v,
  6243. m.isLineHolder = !v && !s,
  6244. "number" == typeof l.width ? m.width = l.width : m.width = a ? a[y] : br(v, h),
  6245. y || c)
  6246. u.push(new va([m]));
  6247. else {
  6248. var x = (u[u.length - 1] || (u[0] = new va)).tokens
  6249. , _ = x.length;
  6250. 1 === _ && x[0].isLineHolder ? x[0] = m : (v || !_ || s) && x.push(m)
  6251. }
  6252. }
  6253. }
  6254. var _a = V(",&?/;] ".split(""), (function(t, e) {
  6255. return t[e] = !0,
  6256. t
  6257. }
  6258. ), {});
  6259. function ba(t) {
  6260. return !function(t) {
  6261. var e = t.charCodeAt(0);
  6262. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303
  6263. }(t) || !!_a[t]
  6264. }
  6265. function wa(t, e, n, i, r) {
  6266. for (var o = [], a = [], s = "", l = "", u = 0, h = 0, c = 0; c < t.length; c++) {
  6267. var p = t.charAt(c);
  6268. if ("\n" !== p) {
  6269. var d = br(p, e)
  6270. , f = !i && !ba(p);
  6271. (o.length ? h + d > n : r + h + d > n) ? h ? (s || l) && (f ? (s || (s = l,
  6272. l = "",
  6273. h = u = 0),
  6274. o.push(s),
  6275. a.push(h - u),
  6276. l += p,
  6277. s = "",
  6278. h = u += d) : (l && (s += l,
  6279. l = "",
  6280. u = 0),
  6281. o.push(s),
  6282. a.push(h),
  6283. s = p,
  6284. h = d)) : f ? (o.push(l),
  6285. a.push(u),
  6286. l = p,
  6287. u = d) : (o.push(p),
  6288. a.push(d)) : (h += d,
  6289. f ? (l += p,
  6290. u += d) : (l && (s += l,
  6291. l = "",
  6292. u = 0),
  6293. s += p))
  6294. } else
  6295. l && (s += l,
  6296. h += u),
  6297. o.push(s),
  6298. a.push(h),
  6299. s = "",
  6300. l = "",
  6301. u = 0,
  6302. h = 0
  6303. }
  6304. return o.length || s || (s = t,
  6305. l = "",
  6306. u = 0),
  6307. l && (s += l),
  6308. s && (o.push(s),
  6309. a.push(h)),
  6310. 1 === o.length && (h += r),
  6311. {
  6312. accumWidth: h,
  6313. lines: o,
  6314. linesWidths: a
  6315. }
  6316. }
  6317. var Sa = "__zr_style_" + Math.round(10 * Math.random())
  6318. , Ma = {
  6319. shadowBlur: 0,
  6320. shadowOffsetX: 0,
  6321. shadowOffsetY: 0,
  6322. shadowColor: "#000",
  6323. opacity: 1,
  6324. blend: "source-over"
  6325. }
  6326. , Ia = {
  6327. style: {
  6328. shadowBlur: !0,
  6329. shadowOffsetX: !0,
  6330. shadowOffsetY: !0,
  6331. shadowColor: !0,
  6332. opacity: !0
  6333. }
  6334. };
  6335. Ma[Sa] = !0;
  6336. var Ta = ["z", "z2", "invisible"]
  6337. , Ca = ["invisible"]
  6338. , Da = function(t) {
  6339. function e(e) {
  6340. return t.call(this, e) || this
  6341. }
  6342. var i;
  6343. return n(e, t),
  6344. e.prototype._init = function(e) {
  6345. for (var n = G(e), i = 0; i < n.length; i++) {
  6346. var r = n[i];
  6347. "style" === r ? this.useStyle(e[r]) : t.prototype.attrKV.call(this, r, e[r])
  6348. }
  6349. this.style || this.useStyle({})
  6350. }
  6351. ,
  6352. e.prototype.beforeBrush = function() {}
  6353. ,
  6354. e.prototype.afterBrush = function() {}
  6355. ,
  6356. e.prototype.innerBeforeBrush = function() {}
  6357. ,
  6358. e.prototype.innerAfterBrush = function() {}
  6359. ,
  6360. e.prototype.shouldBePainted = function(t, e, n, i) {
  6361. var r = this.transform;
  6362. if (this.ignore || this.invisible || 0 === this.style.opacity || this.culling && function(t, e, n) {
  6363. Aa.copy(t.getBoundingRect()),
  6364. t.transform && Aa.applyTransform(t.transform);
  6365. return ka.width = e,
  6366. ka.height = n,
  6367. !Aa.intersect(ka)
  6368. }(this, t, e) || r && !r[0] && !r[3])
  6369. return !1;
  6370. if (n && this.__clipPaths)
  6371. for (var o = 0; o < this.__clipPaths.length; ++o)
  6372. if (this.__clipPaths[o].isZeroArea())
  6373. return !1;
  6374. if (i && this.parent)
  6375. for (var a = this.parent; a; ) {
  6376. if (a.ignore)
  6377. return !1;
  6378. a = a.parent
  6379. }
  6380. return !0
  6381. }
  6382. ,
  6383. e.prototype.contain = function(t, e) {
  6384. return this.rectContain(t, e)
  6385. }
  6386. ,
  6387. e.prototype.traverse = function(t, e) {
  6388. t.call(e, this)
  6389. }
  6390. ,
  6391. e.prototype.rectContain = function(t, e) {
  6392. var n = this.transformCoordToLocal(t, e);
  6393. return this.getBoundingRect().contain(n[0], n[1])
  6394. }
  6395. ,
  6396. e.prototype.getPaintRect = function() {
  6397. var t = this._paintRect;
  6398. if (!this._paintRect || this.__dirty) {
  6399. var e = this.transform
  6400. , n = this.getBoundingRect()
  6401. , i = this.style
  6402. , r = i.shadowBlur || 0
  6403. , o = i.shadowOffsetX || 0
  6404. , a = i.shadowOffsetY || 0;
  6405. t = this._paintRect || (this._paintRect = new ze(0,0,0,0)),
  6406. e ? ze.applyTransform(t, n, e) : t.copy(n),
  6407. (r || o || a) && (t.width += 2 * r + Math.abs(o),
  6408. t.height += 2 * r + Math.abs(a),
  6409. t.x = Math.min(t.x, t.x + o - r),
  6410. t.y = Math.min(t.y, t.y + a - r));
  6411. var s = this.dirtyRectTolerance;
  6412. t.isZero() || (t.x = Math.floor(t.x - s),
  6413. t.y = Math.floor(t.y - s),
  6414. t.width = Math.ceil(t.width + 1 + 2 * s),
  6415. t.height = Math.ceil(t.height + 1 + 2 * s))
  6416. }
  6417. return t
  6418. }
  6419. ,
  6420. e.prototype.setPrevPaintRect = function(t) {
  6421. t ? (this._prevPaintRect = this._prevPaintRect || new ze(0,0,0,0),
  6422. this._prevPaintRect.copy(t)) : this._prevPaintRect = null
  6423. }
  6424. ,
  6425. e.prototype.getPrevPaintRect = function() {
  6426. return this._prevPaintRect
  6427. }
  6428. ,
  6429. e.prototype.animateStyle = function(t) {
  6430. return this.animate("style", t)
  6431. }
  6432. ,
  6433. e.prototype.updateDuringAnimation = function(t) {
  6434. "style" === t ? this.dirtyStyle() : this.markRedraw()
  6435. }
  6436. ,
  6437. e.prototype.attrKV = function(e, n) {
  6438. "style" !== e ? t.prototype.attrKV.call(this, e, n) : this.style ? this.setStyle(n) : this.useStyle(n)
  6439. }
  6440. ,
  6441. e.prototype.setStyle = function(t, e) {
  6442. return "string" == typeof t ? this.style[t] = e : A(this.style, t),
  6443. this.dirtyStyle(),
  6444. this
  6445. }
  6446. ,
  6447. e.prototype.dirtyStyle = function(t) {
  6448. t || this.markRedraw(),
  6449. this.__dirty |= 2,
  6450. this._rect && (this._rect = null)
  6451. }
  6452. ,
  6453. e.prototype.dirty = function() {
  6454. this.dirtyStyle()
  6455. }
  6456. ,
  6457. e.prototype.styleChanged = function() {
  6458. return !!(2 & this.__dirty)
  6459. }
  6460. ,
  6461. e.prototype.styleUpdated = function() {
  6462. this.__dirty &= -3
  6463. }
  6464. ,
  6465. e.prototype.createStyle = function(t) {
  6466. return mt(Ma, t)
  6467. }
  6468. ,
  6469. e.prototype.useStyle = function(t) {
  6470. t[Sa] || (t = this.createStyle(t)),
  6471. this.__inHover ? this.__hoverStyle = t : this.style = t,
  6472. this.dirtyStyle()
  6473. }
  6474. ,
  6475. e.prototype.isStyleObject = function(t) {
  6476. return t[Sa]
  6477. }
  6478. ,
  6479. e.prototype._innerSaveToNormal = function(e) {
  6480. t.prototype._innerSaveToNormal.call(this, e);
  6481. var n = this._normalState;
  6482. e.style && !n.style && (n.style = this._mergeStyle(this.createStyle(), this.style)),
  6483. this._savePrimaryToNormal(e, n, Ta)
  6484. }
  6485. ,
  6486. e.prototype._applyStateObj = function(e, n, i, r, o, a) {
  6487. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  6488. var s, l = !(n && r);
  6489. if (n && n.style ? o ? r ? s = n.style : (s = this._mergeStyle(this.createStyle(), i.style),
  6490. this._mergeStyle(s, n.style)) : (s = this._mergeStyle(this.createStyle(), r ? this.style : i.style),
  6491. this._mergeStyle(s, n.style)) : l && (s = i.style),
  6492. s)
  6493. if (o) {
  6494. var u = this.style;
  6495. if (this.style = this.createStyle(l ? {} : u),
  6496. l)
  6497. for (var h = G(u), c = 0; c < h.length; c++) {
  6498. (d = h[c])in s && (s[d] = s[d],
  6499. this.style[d] = u[d])
  6500. }
  6501. var p = G(s);
  6502. for (c = 0; c < p.length; c++) {
  6503. var d = p[c];
  6504. this.style[d] = this.style[d]
  6505. }
  6506. this._transitionState(e, {
  6507. style: s
  6508. }, a, this.getAnimationStyleProps())
  6509. } else
  6510. this.useStyle(s);
  6511. var f = this.__inHover ? Ca : Ta;
  6512. for (c = 0; c < f.length; c++) {
  6513. d = f[c];
  6514. n && null != n[d] ? this[d] = n[d] : l && null != i[d] && (this[d] = i[d])
  6515. }
  6516. }
  6517. ,
  6518. e.prototype._mergeStates = function(e) {
  6519. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  6520. var o = e[r];
  6521. o.style && (n = n || {},
  6522. this._mergeStyle(n, o.style))
  6523. }
  6524. return n && (i.style = n),
  6525. i
  6526. }
  6527. ,
  6528. e.prototype._mergeStyle = function(t, e) {
  6529. return A(t, e),
  6530. t
  6531. }
  6532. ,
  6533. e.prototype.getAnimationStyleProps = function() {
  6534. return Ia
  6535. }
  6536. ,
  6537. e.initDefaultProps = ((i = e.prototype).type = "displayable",
  6538. i.invisible = !1,
  6539. i.z = 0,
  6540. i.z2 = 0,
  6541. i.zlevel = 0,
  6542. i.culling = !1,
  6543. i.cursor = "pointer",
  6544. i.rectHover = !1,
  6545. i.incremental = !1,
  6546. i._rect = null,
  6547. i.dirtyRectTolerance = 0,
  6548. void (i.__dirty = 3)),
  6549. e
  6550. }(Rr)
  6551. , Aa = new ze(0,0,0,0)
  6552. , ka = new ze(0,0,0,0);
  6553. var La = Math.min
  6554. , Pa = Math.max
  6555. , Oa = Math.sin
  6556. , Ra = Math.cos
  6557. , Na = 2 * Math.PI
  6558. , Ea = Mt()
  6559. , za = Mt()
  6560. , Va = Mt();
  6561. function Ba(t, e, n) {
  6562. if (0 !== t.length) {
  6563. for (var i = t[0], r = i[0], o = i[0], a = i[1], s = i[1], l = 1; l < t.length; l++)
  6564. i = t[l],
  6565. r = La(r, i[0]),
  6566. o = Pa(o, i[0]),
  6567. a = La(a, i[1]),
  6568. s = Pa(s, i[1]);
  6569. e[0] = r,
  6570. e[1] = a,
  6571. n[0] = o,
  6572. n[1] = s
  6573. }
  6574. }
  6575. function Fa(t, e, n, i, r, o) {
  6576. r[0] = La(t, n),
  6577. r[1] = La(e, i),
  6578. o[0] = Pa(t, n),
  6579. o[1] = Pa(e, i)
  6580. }
  6581. var Ga = []
  6582. , Wa = [];
  6583. function Ha(t, e, n, i, r, o, a, s, l, u) {
  6584. var h = bn
  6585. , c = mn
  6586. , p = h(t, n, r, a, Ga);
  6587. l[0] = 1 / 0,
  6588. l[1] = 1 / 0,
  6589. u[0] = -1 / 0,
  6590. u[1] = -1 / 0;
  6591. for (var d = 0; d < p; d++) {
  6592. var f = c(t, n, r, a, Ga[d]);
  6593. l[0] = La(f, l[0]),
  6594. u[0] = Pa(f, u[0])
  6595. }
  6596. p = h(e, i, o, s, Wa);
  6597. for (d = 0; d < p; d++) {
  6598. var g = c(e, i, o, s, Wa[d]);
  6599. l[1] = La(g, l[1]),
  6600. u[1] = Pa(g, u[1])
  6601. }
  6602. l[0] = La(t, l[0]),
  6603. u[0] = Pa(t, u[0]),
  6604. l[0] = La(a, l[0]),
  6605. u[0] = Pa(a, u[0]),
  6606. l[1] = La(e, l[1]),
  6607. u[1] = Pa(e, u[1]),
  6608. l[1] = La(s, l[1]),
  6609. u[1] = Pa(s, u[1])
  6610. }
  6611. function Ya(t, e, n, i, r, o, a, s) {
  6612. var l = Cn
  6613. , u = In
  6614. , h = Pa(La(l(t, n, r), 1), 0)
  6615. , c = Pa(La(l(e, i, o), 1), 0)
  6616. , p = u(t, n, r, h)
  6617. , d = u(e, i, o, c);
  6618. a[0] = La(t, r, p),
  6619. a[1] = La(e, o, d),
  6620. s[0] = Pa(t, r, p),
  6621. s[1] = Pa(e, o, d)
  6622. }
  6623. function Xa(t, e, n, i, r, o, a, s, l) {
  6624. var u = Ht
  6625. , h = Yt
  6626. , c = Math.abs(r - o);
  6627. if (c % Na < 1e-4 && c > 1e-4)
  6628. return s[0] = t - n,
  6629. s[1] = e - i,
  6630. l[0] = t + n,
  6631. void (l[1] = e + i);
  6632. if (Ea[0] = Ra(r) * n + t,
  6633. Ea[1] = Oa(r) * i + e,
  6634. za[0] = Ra(o) * n + t,
  6635. za[1] = Oa(o) * i + e,
  6636. u(s, Ea, za),
  6637. h(l, Ea, za),
  6638. (r %= Na) < 0 && (r += Na),
  6639. (o %= Na) < 0 && (o += Na),
  6640. r > o && !a ? o += Na : r < o && a && (r += Na),
  6641. a) {
  6642. var p = o;
  6643. o = r,
  6644. r = p
  6645. }
  6646. for (var d = 0; d < o; d += Math.PI / 2)
  6647. d > r && (Va[0] = Ra(d) * n + t,
  6648. Va[1] = Oa(d) * i + e,
  6649. u(s, Va, s),
  6650. h(l, Va, l))
  6651. }
  6652. var Ua = {
  6653. M: 1,
  6654. L: 2,
  6655. C: 3,
  6656. Q: 4,
  6657. A: 5,
  6658. Z: 6,
  6659. R: 7
  6660. }
  6661. , Za = []
  6662. , ja = []
  6663. , qa = []
  6664. , Ka = []
  6665. , $a = []
  6666. , Ja = []
  6667. , Qa = Math.min
  6668. , ts = Math.max
  6669. , es = Math.cos
  6670. , ns = Math.sin
  6671. , is = Math.abs
  6672. , rs = Math.PI
  6673. , os = 2 * rs
  6674. , as = "undefined" != typeof Float32Array
  6675. , ss = [];
  6676. function ls(t) {
  6677. return Math.round(t / rs * 1e8) / 1e8 % 2 * rs
  6678. }
  6679. function us(t, e) {
  6680. var n = ls(t[0]);
  6681. n < 0 && (n += os);
  6682. var i = n - t[0]
  6683. , r = t[1];
  6684. r += i,
  6685. !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))),
  6686. t[0] = n,
  6687. t[1] = r
  6688. }
  6689. var hs = function() {
  6690. function t(t) {
  6691. this.dpr = 1,
  6692. this._xi = 0,
  6693. this._yi = 0,
  6694. this._x0 = 0,
  6695. this._y0 = 0,
  6696. this._len = 0,
  6697. t && (this._saveData = !1),
  6698. this._saveData && (this.data = [])
  6699. }
  6700. return t.prototype.increaseVersion = function() {
  6701. this._version++
  6702. }
  6703. ,
  6704. t.prototype.getVersion = function() {
  6705. return this._version
  6706. }
  6707. ,
  6708. t.prototype.setScale = function(t, e, n) {
  6709. (n = n || 0) > 0 && (this._ux = is(n / sr / t) || 0,
  6710. this._uy = is(n / sr / e) || 0)
  6711. }
  6712. ,
  6713. t.prototype.setDPR = function(t) {
  6714. this.dpr = t
  6715. }
  6716. ,
  6717. t.prototype.setContext = function(t) {
  6718. this._ctx = t
  6719. }
  6720. ,
  6721. t.prototype.getContext = function() {
  6722. return this._ctx
  6723. }
  6724. ,
  6725. t.prototype.beginPath = function() {
  6726. return this._ctx && this._ctx.beginPath(),
  6727. this.reset(),
  6728. this
  6729. }
  6730. ,
  6731. t.prototype.reset = function() {
  6732. this._saveData && (this._len = 0),
  6733. this._pathSegLen && (this._pathSegLen = null,
  6734. this._pathLen = 0),
  6735. this._version++
  6736. }
  6737. ,
  6738. t.prototype.moveTo = function(t, e) {
  6739. return this._drawPendingPt(),
  6740. this.addData(Ua.M, t, e),
  6741. this._ctx && this._ctx.moveTo(t, e),
  6742. this._x0 = t,
  6743. this._y0 = e,
  6744. this._xi = t,
  6745. this._yi = e,
  6746. this
  6747. }
  6748. ,
  6749. t.prototype.lineTo = function(t, e) {
  6750. var n = is(t - this._xi)
  6751. , i = is(e - this._yi)
  6752. , r = n > this._ux || i > this._uy;
  6753. if (this.addData(Ua.L, t, e),
  6754. this._ctx && r && this._ctx.lineTo(t, e),
  6755. r)
  6756. this._xi = t,
  6757. this._yi = e,
  6758. this._pendingPtDist = 0;
  6759. else {
  6760. var o = n * n + i * i;
  6761. o > this._pendingPtDist && (this._pendingPtX = t,
  6762. this._pendingPtY = e,
  6763. this._pendingPtDist = o)
  6764. }
  6765. return this
  6766. }
  6767. ,
  6768. t.prototype.bezierCurveTo = function(t, e, n, i, r, o) {
  6769. return this._drawPendingPt(),
  6770. this.addData(Ua.C, t, e, n, i, r, o),
  6771. this._ctx && this._ctx.bezierCurveTo(t, e, n, i, r, o),
  6772. this._xi = r,
  6773. this._yi = o,
  6774. this
  6775. }
  6776. ,
  6777. t.prototype.quadraticCurveTo = function(t, e, n, i) {
  6778. return this._drawPendingPt(),
  6779. this.addData(Ua.Q, t, e, n, i),
  6780. this._ctx && this._ctx.quadraticCurveTo(t, e, n, i),
  6781. this._xi = n,
  6782. this._yi = i,
  6783. this
  6784. }
  6785. ,
  6786. t.prototype.arc = function(t, e, n, i, r, o) {
  6787. this._drawPendingPt(),
  6788. ss[0] = i,
  6789. ss[1] = r,
  6790. us(ss, o),
  6791. i = ss[0];
  6792. var a = (r = ss[1]) - i;
  6793. return this.addData(Ua.A, t, e, n, n, i, a, 0, o ? 0 : 1),
  6794. this._ctx && this._ctx.arc(t, e, n, i, r, o),
  6795. this._xi = es(r) * n + t,
  6796. this._yi = ns(r) * n + e,
  6797. this
  6798. }
  6799. ,
  6800. t.prototype.arcTo = function(t, e, n, i, r) {
  6801. return this._drawPendingPt(),
  6802. this._ctx && this._ctx.arcTo(t, e, n, i, r),
  6803. this
  6804. }
  6805. ,
  6806. t.prototype.rect = function(t, e, n, i) {
  6807. return this._drawPendingPt(),
  6808. this._ctx && this._ctx.rect(t, e, n, i),
  6809. this.addData(Ua.R, t, e, n, i),
  6810. this
  6811. }
  6812. ,
  6813. t.prototype.closePath = function() {
  6814. this._drawPendingPt(),
  6815. this.addData(Ua.Z);
  6816. var t = this._ctx
  6817. , e = this._x0
  6818. , n = this._y0;
  6819. return t && t.closePath(),
  6820. this._xi = e,
  6821. this._yi = n,
  6822. this
  6823. }
  6824. ,
  6825. t.prototype.fill = function(t) {
  6826. t && t.fill(),
  6827. this.toStatic()
  6828. }
  6829. ,
  6830. t.prototype.stroke = function(t) {
  6831. t && t.stroke(),
  6832. this.toStatic()
  6833. }
  6834. ,
  6835. t.prototype.len = function() {
  6836. return this._len
  6837. }
  6838. ,
  6839. t.prototype.setData = function(t) {
  6840. var e = t.length;
  6841. this.data && this.data.length === e || !as || (this.data = new Float32Array(e));
  6842. for (var n = 0; n < e; n++)
  6843. this.data[n] = t[n];
  6844. this._len = e
  6845. }
  6846. ,
  6847. t.prototype.appendPath = function(t) {
  6848. t instanceof Array || (t = [t]);
  6849. for (var e = t.length, n = 0, i = this._len, r = 0; r < e; r++)
  6850. n += t[r].len();
  6851. as && this.data instanceof Float32Array && (this.data = new Float32Array(i + n));
  6852. for (r = 0; r < e; r++)
  6853. for (var o = t[r].data, a = 0; a < o.length; a++)
  6854. this.data[i++] = o[a];
  6855. this._len = i
  6856. }
  6857. ,
  6858. t.prototype.addData = function(t, e, n, i, r, o, a, s, l) {
  6859. if (this._saveData) {
  6860. var u = this.data;
  6861. this._len + arguments.length > u.length && (this._expandData(),
  6862. u = this.data);
  6863. for (var h = 0; h < arguments.length; h++)
  6864. u[this._len++] = arguments[h]
  6865. }
  6866. }
  6867. ,
  6868. t.prototype._drawPendingPt = function() {
  6869. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY),
  6870. this._pendingPtDist = 0)
  6871. }
  6872. ,
  6873. t.prototype._expandData = function() {
  6874. if (!(this.data instanceof Array)) {
  6875. for (var t = [], e = 0; e < this._len; e++)
  6876. t[e] = this.data[e];
  6877. this.data = t
  6878. }
  6879. }
  6880. ,
  6881. t.prototype.toStatic = function() {
  6882. if (this._saveData) {
  6883. this._drawPendingPt();
  6884. var t = this.data;
  6885. t instanceof Array && (t.length = this._len,
  6886. as && this._len > 11 && (this.data = new Float32Array(t)))
  6887. }
  6888. }
  6889. ,
  6890. t.prototype.getBoundingRect = function() {
  6891. qa[0] = qa[1] = $a[0] = $a[1] = Number.MAX_VALUE,
  6892. Ka[0] = Ka[1] = Ja[0] = Ja[1] = -Number.MAX_VALUE;
  6893. var t, e = this.data, n = 0, i = 0, r = 0, o = 0;
  6894. for (t = 0; t < this._len; ) {
  6895. var a = e[t++]
  6896. , s = 1 === t;
  6897. switch (s && (r = n = e[t],
  6898. o = i = e[t + 1]),
  6899. a) {
  6900. case Ua.M:
  6901. n = r = e[t++],
  6902. i = o = e[t++],
  6903. $a[0] = r,
  6904. $a[1] = o,
  6905. Ja[0] = r,
  6906. Ja[1] = o;
  6907. break;
  6908. case Ua.L:
  6909. Fa(n, i, e[t], e[t + 1], $a, Ja),
  6910. n = e[t++],
  6911. i = e[t++];
  6912. break;
  6913. case Ua.C:
  6914. Ha(n, i, e[t++], e[t++], e[t++], e[t++], e[t], e[t + 1], $a, Ja),
  6915. n = e[t++],
  6916. i = e[t++];
  6917. break;
  6918. case Ua.Q:
  6919. Ya(n, i, e[t++], e[t++], e[t], e[t + 1], $a, Ja),
  6920. n = e[t++],
  6921. i = e[t++];
  6922. break;
  6923. case Ua.A:
  6924. var l = e[t++]
  6925. , u = e[t++]
  6926. , h = e[t++]
  6927. , c = e[t++]
  6928. , p = e[t++]
  6929. , d = e[t++] + p;
  6930. t += 1;
  6931. var f = !e[t++];
  6932. s && (r = es(p) * h + l,
  6933. o = ns(p) * c + u),
  6934. Xa(l, u, h, c, p, d, f, $a, Ja),
  6935. n = es(d) * h + l,
  6936. i = ns(d) * c + u;
  6937. break;
  6938. case Ua.R:
  6939. Fa(r = n = e[t++], o = i = e[t++], r + e[t++], o + e[t++], $a, Ja);
  6940. break;
  6941. case Ua.Z:
  6942. n = r,
  6943. i = o
  6944. }
  6945. Ht(qa, qa, $a),
  6946. Yt(Ka, Ka, Ja)
  6947. }
  6948. return 0 === t && (qa[0] = qa[1] = Ka[0] = Ka[1] = 0),
  6949. new ze(qa[0],qa[1],Ka[0] - qa[0],Ka[1] - qa[1])
  6950. }
  6951. ,
  6952. t.prototype._calculateLength = function() {
  6953. var t = this.data
  6954. , e = this._len
  6955. , n = this._ux
  6956. , i = this._uy
  6957. , r = 0
  6958. , o = 0
  6959. , a = 0
  6960. , s = 0;
  6961. this._pathSegLen || (this._pathSegLen = []);
  6962. for (var l = this._pathSegLen, u = 0, h = 0, c = 0; c < e; ) {
  6963. var p = t[c++]
  6964. , d = 1 === c;
  6965. d && (a = r = t[c],
  6966. s = o = t[c + 1]);
  6967. var f = -1;
  6968. switch (p) {
  6969. case Ua.M:
  6970. r = a = t[c++],
  6971. o = s = t[c++];
  6972. break;
  6973. case Ua.L:
  6974. var g = t[c++]
  6975. , y = (x = t[c++]) - o;
  6976. (is(A = g - r) > n || is(y) > i || c === e - 1) && (f = Math.sqrt(A * A + y * y),
  6977. r = g,
  6978. o = x);
  6979. break;
  6980. case Ua.C:
  6981. var v = t[c++]
  6982. , m = t[c++]
  6983. , x = (g = t[c++],
  6984. t[c++])
  6985. , _ = t[c++]
  6986. , b = t[c++];
  6987. f = Mn(r, o, v, m, g, x, _, b, 10),
  6988. r = _,
  6989. o = b;
  6990. break;
  6991. case Ua.Q:
  6992. f = kn(r, o, v = t[c++], m = t[c++], g = t[c++], x = t[c++], 10),
  6993. r = g,
  6994. o = x;
  6995. break;
  6996. case Ua.A:
  6997. var w = t[c++]
  6998. , S = t[c++]
  6999. , M = t[c++]
  7000. , I = t[c++]
  7001. , T = t[c++]
  7002. , C = t[c++]
  7003. , D = C + T;
  7004. c += 1,
  7005. d && (a = es(T) * M + w,
  7006. s = ns(T) * I + S),
  7007. f = ts(M, I) * Qa(os, Math.abs(C)),
  7008. r = es(D) * M + w,
  7009. o = ns(D) * I + S;
  7010. break;
  7011. case Ua.R:
  7012. a = r = t[c++],
  7013. s = o = t[c++],
  7014. f = 2 * t[c++] + 2 * t[c++];
  7015. break;
  7016. case Ua.Z:
  7017. var A = a - r;
  7018. y = s - o;
  7019. f = Math.sqrt(A * A + y * y),
  7020. r = a,
  7021. o = s
  7022. }
  7023. f >= 0 && (l[h++] = f,
  7024. u += f)
  7025. }
  7026. return this._pathLen = u,
  7027. u
  7028. }
  7029. ,
  7030. t.prototype.rebuildPath = function(t, e) {
  7031. var n, i, r, o, a, s, l, u, h, c, p = this.data, d = this._ux, f = this._uy, g = this._len, y = e < 1, v = 0, m = 0, x = 0;
  7032. if (!y || (this._pathSegLen || this._calculateLength(),
  7033. l = this._pathSegLen,
  7034. u = e * this._pathLen))
  7035. t: for (var _ = 0; _ < g; ) {
  7036. var b = p[_++]
  7037. , w = 1 === _;
  7038. switch (w && (n = r = p[_],
  7039. i = o = p[_ + 1]),
  7040. b !== Ua.L && x > 0 && (t.lineTo(h, c),
  7041. x = 0),
  7042. b) {
  7043. case Ua.M:
  7044. n = r = p[_++],
  7045. i = o = p[_++],
  7046. t.moveTo(r, o);
  7047. break;
  7048. case Ua.L:
  7049. a = p[_++],
  7050. s = p[_++];
  7051. var S = is(a - r)
  7052. , M = is(s - o);
  7053. if (S > d || M > f) {
  7054. if (y) {
  7055. if (v + (j = l[m++]) > u) {
  7056. var I = (u - v) / j;
  7057. t.lineTo(r * (1 - I) + a * I, o * (1 - I) + s * I);
  7058. break t
  7059. }
  7060. v += j
  7061. }
  7062. t.lineTo(a, s),
  7063. r = a,
  7064. o = s,
  7065. x = 0
  7066. } else {
  7067. var T = S * S + M * M;
  7068. T > x && (h = a,
  7069. c = s,
  7070. x = T)
  7071. }
  7072. break;
  7073. case Ua.C:
  7074. var C = p[_++]
  7075. , D = p[_++]
  7076. , A = p[_++]
  7077. , k = p[_++]
  7078. , L = p[_++]
  7079. , P = p[_++];
  7080. if (y) {
  7081. if (v + (j = l[m++]) > u) {
  7082. wn(r, C, A, L, I = (u - v) / j, Za),
  7083. wn(o, D, k, P, I, ja),
  7084. t.bezierCurveTo(Za[1], ja[1], Za[2], ja[2], Za[3], ja[3]);
  7085. break t
  7086. }
  7087. v += j
  7088. }
  7089. t.bezierCurveTo(C, D, A, k, L, P),
  7090. r = L,
  7091. o = P;
  7092. break;
  7093. case Ua.Q:
  7094. C = p[_++],
  7095. D = p[_++],
  7096. A = p[_++],
  7097. k = p[_++];
  7098. if (y) {
  7099. if (v + (j = l[m++]) > u) {
  7100. Dn(r, C, A, I = (u - v) / j, Za),
  7101. Dn(o, D, k, I, ja),
  7102. t.quadraticCurveTo(Za[1], ja[1], Za[2], ja[2]);
  7103. break t
  7104. }
  7105. v += j
  7106. }
  7107. t.quadraticCurveTo(C, D, A, k),
  7108. r = A,
  7109. o = k;
  7110. break;
  7111. case Ua.A:
  7112. var O = p[_++]
  7113. , R = p[_++]
  7114. , N = p[_++]
  7115. , E = p[_++]
  7116. , z = p[_++]
  7117. , V = p[_++]
  7118. , B = p[_++]
  7119. , F = !p[_++]
  7120. , G = N > E ? N : E
  7121. , W = is(N - E) > .001
  7122. , H = z + V
  7123. , Y = !1;
  7124. if (y)
  7125. v + (j = l[m++]) > u && (H = z + V * (u - v) / j,
  7126. Y = !0),
  7127. v += j;
  7128. if (W && t.ellipse ? t.ellipse(O, R, N, E, B, z, H, F) : t.arc(O, R, G, z, H, F),
  7129. Y)
  7130. break t;
  7131. w && (n = es(z) * N + O,
  7132. i = ns(z) * E + R),
  7133. r = es(H) * N + O,
  7134. o = ns(H) * E + R;
  7135. break;
  7136. case Ua.R:
  7137. n = r = p[_],
  7138. i = o = p[_ + 1],
  7139. a = p[_++],
  7140. s = p[_++];
  7141. var X = p[_++]
  7142. , U = p[_++];
  7143. if (y) {
  7144. if (v + (j = l[m++]) > u) {
  7145. var Z = u - v;
  7146. t.moveTo(a, s),
  7147. t.lineTo(a + Qa(Z, X), s),
  7148. (Z -= X) > 0 && t.lineTo(a + X, s + Qa(Z, U)),
  7149. (Z -= U) > 0 && t.lineTo(a + ts(X - Z, 0), s + U),
  7150. (Z -= X) > 0 && t.lineTo(a, s + ts(U - Z, 0));
  7151. break t
  7152. }
  7153. v += j
  7154. }
  7155. t.rect(a, s, X, U);
  7156. break;
  7157. case Ua.Z:
  7158. if (y) {
  7159. var j;
  7160. if (v + (j = l[m++]) > u) {
  7161. I = (u - v) / j;
  7162. t.lineTo(r * (1 - I) + n * I, o * (1 - I) + i * I);
  7163. break t
  7164. }
  7165. v += j
  7166. }
  7167. t.closePath(),
  7168. r = n,
  7169. o = i
  7170. }
  7171. }
  7172. }
  7173. ,
  7174. t.prototype.clone = function() {
  7175. var e = new t
  7176. , n = this.data;
  7177. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n),
  7178. e._len = this._len,
  7179. e
  7180. }
  7181. ,
  7182. t.CMD = Ua,
  7183. t.initDefaultProps = function() {
  7184. var e = t.prototype;
  7185. e._saveData = !0,
  7186. e._ux = 0,
  7187. e._uy = 0,
  7188. e._pendingPtDist = 0,
  7189. e._version = 0
  7190. }(),
  7191. t
  7192. }();
  7193. function cs(t, e, n, i, r, o, a) {
  7194. if (0 === r)
  7195. return !1;
  7196. var s = r
  7197. , l = 0;
  7198. 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)
  7199. return !1;
  7200. if (t === n)
  7201. return Math.abs(o - t) <= s / 2;
  7202. var u = (l = (e - i) / (t - n)) * o - a + (t * i - n * e) / (t - n);
  7203. return u * u / (l * l + 1) <= s / 2 * s / 2
  7204. }
  7205. function ps(t, e, n, i, r, o, a, s, l, u, h) {
  7206. if (0 === l)
  7207. return !1;
  7208. var c = l;
  7209. 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
  7210. }
  7211. function ds(t, e, n, i, r, o, a, s, l) {
  7212. if (0 === a)
  7213. return !1;
  7214. var u = a;
  7215. 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
  7216. }
  7217. var fs = 2 * Math.PI;
  7218. function gs(t) {
  7219. return (t %= fs) < 0 && (t += fs),
  7220. t
  7221. }
  7222. var ys = 2 * Math.PI;
  7223. function vs(t, e, n, i, r, o, a, s, l) {
  7224. if (0 === a)
  7225. return !1;
  7226. var u = a;
  7227. s -= t,
  7228. l -= e;
  7229. var h = Math.sqrt(s * s + l * l);
  7230. if (h - u > n || h + u < n)
  7231. return !1;
  7232. if (Math.abs(i - r) % ys < 1e-4)
  7233. return !0;
  7234. if (o) {
  7235. var c = i;
  7236. i = gs(r),
  7237. r = gs(c)
  7238. } else
  7239. i = gs(i),
  7240. r = gs(r);
  7241. i > r && (r += ys);
  7242. var p = Math.atan2(l, s);
  7243. return p < 0 && (p += ys),
  7244. p >= i && p <= r || p + ys >= i && p + ys <= r
  7245. }
  7246. function ms(t, e, n, i, r, o) {
  7247. if (o > e && o > i || o < e && o < i)
  7248. return 0;
  7249. if (i === e)
  7250. return 0;
  7251. var a = (o - e) / (i - e)
  7252. , s = i < e ? 1 : -1;
  7253. 1 !== a && 0 !== a || (s = i < e ? .5 : -.5);
  7254. var l = a * (n - t) + t;
  7255. return l === r ? 1 / 0 : l > r ? s : 0
  7256. }
  7257. var xs = hs.CMD
  7258. , _s = 2 * Math.PI;
  7259. var bs = [-1, -1, -1]
  7260. , ws = [-1, -1];
  7261. function Ss(t, e, n, i, r, o, a, s, l, u) {
  7262. if (u > e && u > i && u > o && u > s || u < e && u < i && u < o && u < s)
  7263. return 0;
  7264. var h, c = _n(e, i, o, s, u, bs);
  7265. if (0 === c)
  7266. return 0;
  7267. for (var p = 0, d = -1, f = void 0, g = void 0, y = 0; y < c; y++) {
  7268. var v = bs[y]
  7269. , m = 0 === v || 1 === v ? .5 : 1;
  7270. mn(t, n, r, a, v) < l || (d < 0 && (d = bn(e, i, o, s, ws),
  7271. ws[1] < ws[0] && d > 1 && (h = void 0,
  7272. h = ws[0],
  7273. ws[0] = ws[1],
  7274. ws[1] = h),
  7275. f = mn(e, i, o, s, ws[0]),
  7276. d > 1 && (g = mn(e, i, o, s, ws[1]))),
  7277. 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)
  7278. }
  7279. return p
  7280. }
  7281. function Ms(t, e, n, i, r, o, a, s) {
  7282. if (s > e && s > i && s > o || s < e && s < i && s < o)
  7283. return 0;
  7284. var l = function(t, e, n, i, r) {
  7285. var o = t - 2 * e + n
  7286. , a = 2 * (e - t)
  7287. , s = t - i
  7288. , l = 0;
  7289. if (yn(o))
  7290. vn(a) && (h = -s / a) >= 0 && h <= 1 && (r[l++] = h);
  7291. else {
  7292. var u = a * a - 4 * o * s;
  7293. if (yn(u))
  7294. (h = -a / (2 * o)) >= 0 && h <= 1 && (r[l++] = h);
  7295. else if (u > 0) {
  7296. var h, c = ln(u), p = (-a - c) / (2 * o);
  7297. (h = (-a + c) / (2 * o)) >= 0 && h <= 1 && (r[l++] = h),
  7298. p >= 0 && p <= 1 && (r[l++] = p)
  7299. }
  7300. }
  7301. return l
  7302. }(e, i, o, s, bs);
  7303. if (0 === l)
  7304. return 0;
  7305. var u = Cn(e, i, o);
  7306. if (u >= 0 && u <= 1) {
  7307. for (var h = 0, c = In(e, i, o, u), p = 0; p < l; p++) {
  7308. var d = 0 === bs[p] || 1 === bs[p] ? .5 : 1;
  7309. In(t, n, r, bs[p]) < a || (bs[p] < u ? h += c < e ? d : -d : h += o < c ? d : -d)
  7310. }
  7311. return h
  7312. }
  7313. d = 0 === bs[0] || 1 === bs[0] ? .5 : 1;
  7314. return In(t, n, r, bs[0]) < a ? 0 : o < e ? d : -d
  7315. }
  7316. function Is(t, e, n, i, r, o, a, s) {
  7317. if ((s -= e) > n || s < -n)
  7318. return 0;
  7319. var l = Math.sqrt(n * n - s * s);
  7320. bs[0] = -l,
  7321. bs[1] = l;
  7322. var u = Math.abs(i - r);
  7323. if (u < 1e-4)
  7324. return 0;
  7325. if (u >= _s - 1e-4) {
  7326. i = 0,
  7327. r = _s;
  7328. var h = o ? 1 : -1;
  7329. return a >= bs[0] + t && a <= bs[1] + t ? h : 0
  7330. }
  7331. if (i > r) {
  7332. var c = i;
  7333. i = r,
  7334. r = c
  7335. }
  7336. i < 0 && (i += _s,
  7337. r += _s);
  7338. for (var p = 0, d = 0; d < 2; d++) {
  7339. var f = bs[d];
  7340. if (f + t > a) {
  7341. var g = Math.atan2(s, f);
  7342. h = o ? 1 : -1;
  7343. g < 0 && (g = _s + g),
  7344. (g >= i && g <= r || g + _s >= i && g + _s <= r) && (g > Math.PI / 2 && g < 1.5 * Math.PI && (h = -h),
  7345. p += h)
  7346. }
  7347. }
  7348. return p
  7349. }
  7350. function Ts(t, e, n, i, r) {
  7351. 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; ) {
  7352. var v = u[y++]
  7353. , m = 1 === y;
  7354. switch (v === xs.M && y > 1 && (n || (c += ms(p, d, f, g, i, r))),
  7355. m && (f = p = u[y],
  7356. g = d = u[y + 1]),
  7357. v) {
  7358. case xs.M:
  7359. p = f = u[y++],
  7360. d = g = u[y++];
  7361. break;
  7362. case xs.L:
  7363. if (n) {
  7364. if (cs(p, d, u[y], u[y + 1], e, i, r))
  7365. return !0
  7366. } else
  7367. c += ms(p, d, u[y], u[y + 1], i, r) || 0;
  7368. p = u[y++],
  7369. d = u[y++];
  7370. break;
  7371. case xs.C:
  7372. if (n) {
  7373. if (ps(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], e, i, r))
  7374. return !0
  7375. } else
  7376. c += Ss(p, d, u[y++], u[y++], u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  7377. p = u[y++],
  7378. d = u[y++];
  7379. break;
  7380. case xs.Q:
  7381. if (n) {
  7382. if (ds(p, d, u[y++], u[y++], u[y], u[y + 1], e, i, r))
  7383. return !0
  7384. } else
  7385. c += Ms(p, d, u[y++], u[y++], u[y], u[y + 1], i, r) || 0;
  7386. p = u[y++],
  7387. d = u[y++];
  7388. break;
  7389. case xs.A:
  7390. var x = u[y++]
  7391. , _ = u[y++]
  7392. , b = u[y++]
  7393. , w = u[y++]
  7394. , S = u[y++]
  7395. , M = u[y++];
  7396. y += 1;
  7397. var I = !!(1 - u[y++]);
  7398. o = Math.cos(S) * b + x,
  7399. a = Math.sin(S) * w + _,
  7400. m ? (f = o,
  7401. g = a) : c += ms(p, d, o, a, i, r);
  7402. var T = (i - x) * w / b + x;
  7403. if (n) {
  7404. if (vs(x, _, w, S, S + M, I, e, T, r))
  7405. return !0
  7406. } else
  7407. c += Is(x, _, w, S, S + M, I, T, r);
  7408. p = Math.cos(S + M) * b + x,
  7409. d = Math.sin(S + M) * w + _;
  7410. break;
  7411. case xs.R:
  7412. if (f = p = u[y++],
  7413. g = d = u[y++],
  7414. o = f + u[y++],
  7415. a = g + u[y++],
  7416. n) {
  7417. 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))
  7418. return !0
  7419. } else
  7420. c += ms(o, g, o, a, i, r),
  7421. c += ms(f, a, f, g, i, r);
  7422. break;
  7423. case xs.Z:
  7424. if (n) {
  7425. if (cs(p, d, f, g, e, i, r))
  7426. return !0
  7427. } else
  7428. c += ms(p, d, f, g, i, r);
  7429. p = f,
  7430. d = g
  7431. }
  7432. }
  7433. return n || (s = d,
  7434. l = g,
  7435. Math.abs(s - l) < 1e-4) || (c += ms(p, d, f, g, i, r) || 0),
  7436. 0 !== c
  7437. }
  7438. var Cs = k({
  7439. fill: "#000",
  7440. stroke: null,
  7441. strokePercent: 1,
  7442. fillOpacity: 1,
  7443. strokeOpacity: 1,
  7444. lineDashOffset: 0,
  7445. lineWidth: 1,
  7446. lineCap: "butt",
  7447. miterLimit: 10,
  7448. strokeNoScale: !1,
  7449. strokeFirst: !1
  7450. }, Ma)
  7451. , Ds = {
  7452. style: k({
  7453. fill: !0,
  7454. stroke: !0,
  7455. strokePercent: !0,
  7456. fillOpacity: !0,
  7457. strokeOpacity: !0,
  7458. lineDashOffset: !0,
  7459. lineWidth: !0,
  7460. miterLimit: !0
  7461. }, Ia.style)
  7462. }
  7463. , As = mr.concat(["invisible", "culling", "z", "z2", "zlevel", "parent"])
  7464. , ks = function(t) {
  7465. function e(e) {
  7466. return t.call(this, e) || this
  7467. }
  7468. var i;
  7469. return n(e, t),
  7470. e.prototype.update = function() {
  7471. var n = this;
  7472. t.prototype.update.call(this);
  7473. var i = this.style;
  7474. if (i.decal) {
  7475. var r = this._decalEl = this._decalEl || new e;
  7476. r.buildPath === e.prototype.buildPath && (r.buildPath = function(t) {
  7477. n.buildPath(t, n.shape)
  7478. }
  7479. ),
  7480. r.silent = !0;
  7481. var o = r.style;
  7482. for (var a in i)
  7483. o[a] !== i[a] && (o[a] = i[a]);
  7484. o.fill = i.fill ? i.decal : null,
  7485. o.decal = null,
  7486. o.shadowColor = null,
  7487. i.strokeFirst && (o.stroke = null);
  7488. for (var s = 0; s < As.length; ++s)
  7489. r[As[s]] = this[As[s]];
  7490. r.__dirty |= 1
  7491. } else
  7492. this._decalEl && (this._decalEl = null)
  7493. }
  7494. ,
  7495. e.prototype.getDecalElement = function() {
  7496. return this._decalEl
  7497. }
  7498. ,
  7499. e.prototype._init = function(e) {
  7500. var n = G(e);
  7501. this.shape = this.getDefaultShape();
  7502. var i = this.getDefaultStyle();
  7503. i && this.useStyle(i);
  7504. for (var r = 0; r < n.length; r++) {
  7505. var o = n[r]
  7506. , a = e[o];
  7507. "style" === o ? this.style ? A(this.style, a) : this.useStyle(a) : "shape" === o ? A(this.shape, a) : t.prototype.attrKV.call(this, o, a)
  7508. }
  7509. this.style || this.useStyle({})
  7510. }
  7511. ,
  7512. e.prototype.getDefaultStyle = function() {
  7513. return null
  7514. }
  7515. ,
  7516. e.prototype.getDefaultShape = function() {
  7517. return {}
  7518. }
  7519. ,
  7520. e.prototype.canBeInsideText = function() {
  7521. return this.hasFill()
  7522. }
  7523. ,
  7524. e.prototype.getInsideTextFill = function() {
  7525. var t = this.style.fill;
  7526. if ("none" !== t) {
  7527. if (U(t)) {
  7528. var e = oi(t, 0);
  7529. return e > .5 ? lr : e > .2 ? "#eee" : ur
  7530. }
  7531. if (t)
  7532. return ur
  7533. }
  7534. return lr
  7535. }
  7536. ,
  7537. e.prototype.getInsideTextStroke = function(t) {
  7538. var e = this.style.fill;
  7539. if (U(e)) {
  7540. var n = this.__zr;
  7541. if (!(!n || !n.isDarkMode()) === oi(t, 0) < .4)
  7542. return e
  7543. }
  7544. }
  7545. ,
  7546. e.prototype.buildPath = function(t, e, n) {}
  7547. ,
  7548. e.prototype.pathUpdated = function() {
  7549. this.__dirty &= -5
  7550. }
  7551. ,
  7552. e.prototype.getUpdatedPathProxy = function(t) {
  7553. return !this.path && this.createPathProxy(),
  7554. this.path.beginPath(),
  7555. this.buildPath(this.path, this.shape, t),
  7556. this.path
  7557. }
  7558. ,
  7559. e.prototype.createPathProxy = function() {
  7560. this.path = new hs(!1)
  7561. }
  7562. ,
  7563. e.prototype.hasStroke = function() {
  7564. var t = this.style
  7565. , e = t.stroke;
  7566. return !(null == e || "none" === e || !(t.lineWidth > 0))
  7567. }
  7568. ,
  7569. e.prototype.hasFill = function() {
  7570. var t = this.style.fill;
  7571. return null != t && "none" !== t
  7572. }
  7573. ,
  7574. e.prototype.getBoundingRect = function() {
  7575. var t = this._rect
  7576. , e = this.style
  7577. , n = !t;
  7578. if (n) {
  7579. var i = !1;
  7580. this.path || (i = !0,
  7581. this.createPathProxy());
  7582. var r = this.path;
  7583. (i || 4 & this.__dirty) && (r.beginPath(),
  7584. this.buildPath(r, this.shape, !1),
  7585. this.pathUpdated()),
  7586. t = r.getBoundingRect()
  7587. }
  7588. if (this._rect = t,
  7589. this.hasStroke() && this.path && this.path.len() > 0) {
  7590. var o = this._rectStroke || (this._rectStroke = t.clone());
  7591. if (this.__dirty || n) {
  7592. o.copy(t);
  7593. var a = e.strokeNoScale ? this.getLineScale() : 1
  7594. , s = e.lineWidth;
  7595. if (!this.hasFill()) {
  7596. var l = this.strokeContainThreshold;
  7597. s = Math.max(s, null == l ? 4 : l)
  7598. }
  7599. a > 1e-10 && (o.width += s / a,
  7600. o.height += s / a,
  7601. o.x -= s / a / 2,
  7602. o.y -= s / a / 2)
  7603. }
  7604. return o
  7605. }
  7606. return t
  7607. }
  7608. ,
  7609. e.prototype.contain = function(t, e) {
  7610. var n = this.transformCoordToLocal(t, e)
  7611. , i = this.getBoundingRect()
  7612. , r = this.style;
  7613. if (t = n[0],
  7614. e = n[1],
  7615. i.contain(t, e)) {
  7616. var o = this.path;
  7617. if (this.hasStroke()) {
  7618. var a = r.lineWidth
  7619. , s = r.strokeNoScale ? this.getLineScale() : 1;
  7620. if (s > 1e-10 && (this.hasFill() || (a = Math.max(a, this.strokeContainThreshold)),
  7621. function(t, e, n, i) {
  7622. return Ts(t, e, !0, n, i)
  7623. }(o, a / s, t, e)))
  7624. return !0
  7625. }
  7626. if (this.hasFill())
  7627. return function(t, e, n) {
  7628. return Ts(t, 0, !1, e, n)
  7629. }(o, t, e)
  7630. }
  7631. return !1
  7632. }
  7633. ,
  7634. e.prototype.dirtyShape = function() {
  7635. this.__dirty |= 4,
  7636. this._rect && (this._rect = null),
  7637. this._decalEl && this._decalEl.dirtyShape(),
  7638. this.markRedraw()
  7639. }
  7640. ,
  7641. e.prototype.dirty = function() {
  7642. this.dirtyStyle(),
  7643. this.dirtyShape()
  7644. }
  7645. ,
  7646. e.prototype.animateShape = function(t) {
  7647. return this.animate("shape", t)
  7648. }
  7649. ,
  7650. e.prototype.updateDuringAnimation = function(t) {
  7651. "style" === t ? this.dirtyStyle() : "shape" === t ? this.dirtyShape() : this.markRedraw()
  7652. }
  7653. ,
  7654. e.prototype.attrKV = function(e, n) {
  7655. "shape" === e ? this.setShape(n) : t.prototype.attrKV.call(this, e, n)
  7656. }
  7657. ,
  7658. e.prototype.setShape = function(t, e) {
  7659. var n = this.shape;
  7660. return n || (n = this.shape = {}),
  7661. "string" == typeof t ? n[t] = e : A(n, t),
  7662. this.dirtyShape(),
  7663. this
  7664. }
  7665. ,
  7666. e.prototype.shapeChanged = function() {
  7667. return !!(4 & this.__dirty)
  7668. }
  7669. ,
  7670. e.prototype.createStyle = function(t) {
  7671. return mt(Cs, t)
  7672. }
  7673. ,
  7674. e.prototype._innerSaveToNormal = function(e) {
  7675. t.prototype._innerSaveToNormal.call(this, e);
  7676. var n = this._normalState;
  7677. e.shape && !n.shape && (n.shape = A({}, this.shape))
  7678. }
  7679. ,
  7680. e.prototype._applyStateObj = function(e, n, i, r, o, a) {
  7681. t.prototype._applyStateObj.call(this, e, n, i, r, o, a);
  7682. var s, l = !(n && r);
  7683. if (n && n.shape ? o ? r ? s = n.shape : (s = A({}, i.shape),
  7684. A(s, n.shape)) : (s = A({}, r ? this.shape : i.shape),
  7685. A(s, n.shape)) : l && (s = i.shape),
  7686. s)
  7687. if (o) {
  7688. this.shape = A({}, this.shape);
  7689. for (var u = {}, h = G(s), c = 0; c < h.length; c++) {
  7690. var p = h[c];
  7691. "object" == typeof s[p] ? this.shape[p] = s[p] : u[p] = s[p]
  7692. }
  7693. this._transitionState(e, {
  7694. shape: u
  7695. }, a)
  7696. } else
  7697. this.shape = s,
  7698. this.dirtyShape()
  7699. }
  7700. ,
  7701. e.prototype._mergeStates = function(e) {
  7702. for (var n, i = t.prototype._mergeStates.call(this, e), r = 0; r < e.length; r++) {
  7703. var o = e[r];
  7704. o.shape && (n = n || {},
  7705. this._mergeStyle(n, o.shape))
  7706. }
  7707. return n && (i.shape = n),
  7708. i
  7709. }
  7710. ,
  7711. e.prototype.getAnimationStyleProps = function() {
  7712. return Ds
  7713. }
  7714. ,
  7715. e.prototype.isZeroArea = function() {
  7716. return !1
  7717. }
  7718. ,
  7719. e.extend = function(t) {
  7720. var i = function(e) {
  7721. function i(n) {
  7722. var i = e.call(this, n) || this;
  7723. return t.init && t.init.call(i, n),
  7724. i
  7725. }
  7726. return n(i, e),
  7727. i.prototype.getDefaultStyle = function() {
  7728. return T(t.style)
  7729. }
  7730. ,
  7731. i.prototype.getDefaultShape = function() {
  7732. return T(t.shape)
  7733. }
  7734. ,
  7735. i
  7736. }(e);
  7737. for (var r in t)
  7738. "function" == typeof t[r] && (i.prototype[r] = t[r]);
  7739. return i
  7740. }
  7741. ,
  7742. e.initDefaultProps = ((i = e.prototype).type = "path",
  7743. i.strokeContainThreshold = 5,
  7744. i.segmentIgnoreThreshold = 0,
  7745. i.subPixelOptimize = !1,
  7746. i.autoBatch = !1,
  7747. void (i.__dirty = 7)),
  7748. e
  7749. }(Da)
  7750. , Ls = k({
  7751. strokeFirst: !0,
  7752. font: a,
  7753. x: 0,
  7754. y: 0,
  7755. textAlign: "left",
  7756. textBaseline: "top",
  7757. miterLimit: 2
  7758. }, Cs)
  7759. , Ps = function(t) {
  7760. function e() {
  7761. return null !== t && t.apply(this, arguments) || this
  7762. }
  7763. return n(e, t),
  7764. e.prototype.hasStroke = function() {
  7765. var t = this.style
  7766. , e = t.stroke;
  7767. return null != e && "none" !== e && t.lineWidth > 0
  7768. }
  7769. ,
  7770. e.prototype.hasFill = function() {
  7771. var t = this.style.fill;
  7772. return null != t && "none" !== t
  7773. }
  7774. ,
  7775. e.prototype.createStyle = function(t) {
  7776. return mt(Ls, t)
  7777. }
  7778. ,
  7779. e.prototype.setBoundingRect = function(t) {
  7780. this._rect = t
  7781. }
  7782. ,
  7783. e.prototype.getBoundingRect = function() {
  7784. var t = this.style;
  7785. if (!this._rect) {
  7786. var e = t.text;
  7787. null != e ? e += "" : e = "";
  7788. var n = Sr(e, t.font, t.textAlign, t.textBaseline);
  7789. if (n.x += t.x || 0,
  7790. n.y += t.y || 0,
  7791. this.hasStroke()) {
  7792. var i = t.lineWidth;
  7793. n.x -= i / 2,
  7794. n.y -= i / 2,
  7795. n.width += i,
  7796. n.height += i
  7797. }
  7798. this._rect = n
  7799. }
  7800. return this._rect
  7801. }
  7802. ,
  7803. e.initDefaultProps = void (e.prototype.dirtyRectTolerance = 10),
  7804. e
  7805. }(Da);
  7806. Ps.prototype.type = "tspan";
  7807. var Os = k({
  7808. x: 0,
  7809. y: 0
  7810. }, Ma)
  7811. , Rs = {
  7812. style: k({
  7813. x: !0,
  7814. y: !0,
  7815. width: !0,
  7816. height: !0,
  7817. sx: !0,
  7818. sy: !0,
  7819. sWidth: !0,
  7820. sHeight: !0
  7821. }, Ia.style)
  7822. };
  7823. var Ns = function(t) {
  7824. function e() {
  7825. return null !== t && t.apply(this, arguments) || this
  7826. }
  7827. return n(e, t),
  7828. e.prototype.createStyle = function(t) {
  7829. return mt(Os, t)
  7830. }
  7831. ,
  7832. e.prototype._getSize = function(t) {
  7833. var e = this.style
  7834. , n = e[t];
  7835. if (null != n)
  7836. return n;
  7837. var i, r = (i = e.image) && "string" != typeof i && i.width && i.height ? e.image : this.__image;
  7838. if (!r)
  7839. return 0;
  7840. var o = "width" === t ? "height" : "width"
  7841. , a = e[o];
  7842. return null == a ? r[t] : r[t] / r[o] * a
  7843. }
  7844. ,
  7845. e.prototype.getWidth = function() {
  7846. return this._getSize("width")
  7847. }
  7848. ,
  7849. e.prototype.getHeight = function() {
  7850. return this._getSize("height")
  7851. }
  7852. ,
  7853. e.prototype.getAnimationStyleProps = function() {
  7854. return Rs
  7855. }
  7856. ,
  7857. e.prototype.getBoundingRect = function() {
  7858. var t = this.style;
  7859. return this._rect || (this._rect = new ze(t.x || 0,t.y || 0,this.getWidth(),this.getHeight())),
  7860. this._rect
  7861. }
  7862. ,
  7863. e
  7864. }(Da);
  7865. Ns.prototype.type = "image";
  7866. var Es = Math.round;
  7867. function zs(t, e, n) {
  7868. if (e) {
  7869. var i = e.x1
  7870. , r = e.x2
  7871. , o = e.y1
  7872. , a = e.y2;
  7873. t.x1 = i,
  7874. t.x2 = r,
  7875. t.y1 = o,
  7876. t.y2 = a;
  7877. var s = n && n.lineWidth;
  7878. return s ? (Es(2 * i) === Es(2 * r) && (t.x1 = t.x2 = Bs(i, s, !0)),
  7879. Es(2 * o) === Es(2 * a) && (t.y1 = t.y2 = Bs(o, s, !0)),
  7880. t) : t
  7881. }
  7882. }
  7883. function Vs(t, e, n) {
  7884. if (e) {
  7885. var i = e.x
  7886. , r = e.y
  7887. , o = e.width
  7888. , a = e.height;
  7889. t.x = i,
  7890. t.y = r,
  7891. t.width = o,
  7892. t.height = a;
  7893. var s = n && n.lineWidth;
  7894. return s ? (t.x = Bs(i, s, !0),
  7895. t.y = Bs(r, s, !0),
  7896. t.width = Math.max(Bs(i + o, s, !1) - t.x, 0 === o ? 0 : 1),
  7897. t.height = Math.max(Bs(r + a, s, !1) - t.y, 0 === a ? 0 : 1),
  7898. t) : t
  7899. }
  7900. }
  7901. function Bs(t, e, n) {
  7902. if (!e)
  7903. return t;
  7904. var i = Es(2 * t);
  7905. return (i + Es(e)) % 2 == 0 ? i / 2 : (i + (n ? 1 : -1)) / 2
  7906. }
  7907. var Fs = function() {
  7908. this.x = 0,
  7909. this.y = 0,
  7910. this.width = 0,
  7911. this.height = 0
  7912. }
  7913. , Gs = {}
  7914. , Ws = function(t) {
  7915. function e(e) {
  7916. return t.call(this, e) || this
  7917. }
  7918. return n(e, t),
  7919. e.prototype.getDefaultShape = function() {
  7920. return new Fs
  7921. }
  7922. ,
  7923. e.prototype.buildPath = function(t, e) {
  7924. var n, i, r, o;
  7925. if (this.subPixelOptimize) {
  7926. var a = Vs(Gs, e, this.style);
  7927. n = a.x,
  7928. i = a.y,
  7929. r = a.width,
  7930. o = a.height,
  7931. a.r = e.r,
  7932. e = a
  7933. } else
  7934. n = e.x,
  7935. i = e.y,
  7936. r = e.width,
  7937. o = e.height;
  7938. e.r ? function(t, e) {
  7939. var n, i, r, o, a, s = e.x, l = e.y, u = e.width, h = e.height, c = e.r;
  7940. u < 0 && (s += u,
  7941. u = -u),
  7942. h < 0 && (l += h,
  7943. h = -h),
  7944. "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],
  7945. i = o = c[1]) : 3 === c.length ? (n = c[0],
  7946. i = o = c[1],
  7947. r = c[2]) : (n = c[0],
  7948. i = c[1],
  7949. r = c[2],
  7950. o = c[3]) : n = i = r = o = 0,
  7951. n + i > u && (n *= u / (a = n + i),
  7952. i *= u / a),
  7953. r + o > u && (r *= u / (a = r + o),
  7954. o *= u / a),
  7955. i + r > h && (i *= h / (a = i + r),
  7956. r *= h / a),
  7957. n + o > h && (n *= h / (a = n + o),
  7958. o *= h / a),
  7959. t.moveTo(s + n, l),
  7960. t.lineTo(s + u - i, l),
  7961. 0 !== i && t.arc(s + u - i, l + i, i, -Math.PI / 2, 0),
  7962. t.lineTo(s + u, l + h - r),
  7963. 0 !== r && t.arc(s + u - r, l + h - r, r, 0, Math.PI / 2),
  7964. t.lineTo(s + o, l + h),
  7965. 0 !== o && t.arc(s + o, l + h - o, o, Math.PI / 2, Math.PI),
  7966. t.lineTo(s, l + n),
  7967. 0 !== n && t.arc(s + n, l + n, n, Math.PI, 1.5 * Math.PI)
  7968. }(t, e) : t.rect(n, i, r, o)
  7969. }
  7970. ,
  7971. e.prototype.isZeroArea = function() {
  7972. return !this.shape.width || !this.shape.height
  7973. }
  7974. ,
  7975. e
  7976. }(ks);
  7977. Ws.prototype.type = "rect";
  7978. var Hs = {
  7979. fill: "#000"
  7980. }
  7981. , Ys = {
  7982. style: k({
  7983. fill: !0,
  7984. stroke: !0,
  7985. fillOpacity: !0,
  7986. strokeOpacity: !0,
  7987. lineWidth: !0,
  7988. fontSize: !0,
  7989. lineHeight: !0,
  7990. width: !0,
  7991. height: !0,
  7992. textShadowColor: !0,
  7993. textShadowBlur: !0,
  7994. textShadowOffsetX: !0,
  7995. textShadowOffsetY: !0,
  7996. backgroundColor: !0,
  7997. padding: !0,
  7998. borderColor: !0,
  7999. borderWidth: !0,
  8000. borderRadius: !0
  8001. }, Ia.style)
  8002. }
  8003. , Xs = function(t) {
  8004. function e(e) {
  8005. var n = t.call(this) || this;
  8006. return n.type = "text",
  8007. n._children = [],
  8008. n._defaultStyle = Hs,
  8009. n.attr(e),
  8010. n
  8011. }
  8012. return n(e, t),
  8013. e.prototype.childrenRef = function() {
  8014. return this._children
  8015. }
  8016. ,
  8017. e.prototype.update = function() {
  8018. t.prototype.update.call(this),
  8019. this.styleChanged() && this._updateSubTexts();
  8020. for (var e = 0; e < this._children.length; e++) {
  8021. var n = this._children[e];
  8022. n.zlevel = this.zlevel,
  8023. n.z = this.z,
  8024. n.z2 = this.z2,
  8025. n.culling = this.culling,
  8026. n.cursor = this.cursor,
  8027. n.invisible = this.invisible
  8028. }
  8029. }
  8030. ,
  8031. e.prototype.updateTransform = function() {
  8032. var e = this.innerTransformable;
  8033. e ? (e.updateTransform(),
  8034. e.transform && (this.transform = e.transform)) : t.prototype.updateTransform.call(this)
  8035. }
  8036. ,
  8037. e.prototype.getLocalTransform = function(e) {
  8038. var n = this.innerTransformable;
  8039. return n ? n.getLocalTransform(e) : t.prototype.getLocalTransform.call(this, e)
  8040. }
  8041. ,
  8042. e.prototype.getComputedTransform = function() {
  8043. return this.__hostTarget && (this.__hostTarget.getComputedTransform(),
  8044. this.__hostTarget.updateInnerText(!0)),
  8045. t.prototype.getComputedTransform.call(this)
  8046. }
  8047. ,
  8048. e.prototype._updateSubTexts = function() {
  8049. var t;
  8050. this._childCursor = 0,
  8051. Js(t = this.style),
  8052. E(t.rich, Js),
  8053. this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(),
  8054. this._children.length = this._childCursor,
  8055. this.styleUpdated()
  8056. }
  8057. ,
  8058. e.prototype.addSelfToZr = function(e) {
  8059. t.prototype.addSelfToZr.call(this, e);
  8060. for (var n = 0; n < this._children.length; n++)
  8061. this._children[n].__zr = e
  8062. }
  8063. ,
  8064. e.prototype.removeSelfFromZr = function(e) {
  8065. t.prototype.removeSelfFromZr.call(this, e);
  8066. for (var n = 0; n < this._children.length; n++)
  8067. this._children[n].__zr = null
  8068. }
  8069. ,
  8070. e.prototype.getBoundingRect = function() {
  8071. if (this.styleChanged() && this._updateSubTexts(),
  8072. !this._rect) {
  8073. for (var t = new ze(0,0,0,0), e = this._children, n = [], i = null, r = 0; r < e.length; r++) {
  8074. var o = e[r]
  8075. , a = o.getBoundingRect()
  8076. , s = o.getLocalTransform(n);
  8077. s ? (t.copy(a),
  8078. t.applyTransform(s),
  8079. (i = i || t.clone()).union(t)) : (i = i || a.clone()).union(a)
  8080. }
  8081. this._rect = i || t
  8082. }
  8083. return this._rect
  8084. }
  8085. ,
  8086. e.prototype.setDefaultTextStyle = function(t) {
  8087. this._defaultStyle = t || Hs
  8088. }
  8089. ,
  8090. e.prototype.setTextContent = function(t) {
  8091. 0
  8092. }
  8093. ,
  8094. e.prototype._mergeStyle = function(t, e) {
  8095. if (!e)
  8096. return t;
  8097. var n = e.rich
  8098. , i = t.rich || n && {};
  8099. return A(t, e),
  8100. n && i ? (this._mergeRich(i, n),
  8101. t.rich = i) : i && (t.rich = i),
  8102. t
  8103. }
  8104. ,
  8105. e.prototype._mergeRich = function(t, e) {
  8106. for (var n = G(e), i = 0; i < n.length; i++) {
  8107. var r = n[i];
  8108. t[r] = t[r] || {},
  8109. A(t[r], e[r])
  8110. }
  8111. }
  8112. ,
  8113. e.prototype.getAnimationStyleProps = function() {
  8114. return Ys
  8115. }
  8116. ,
  8117. e.prototype._getOrCreateChild = function(t) {
  8118. var e = this._children[this._childCursor];
  8119. return e && e instanceof t || (e = new t),
  8120. this._children[this._childCursor++] = e,
  8121. e.__zr = this.__zr,
  8122. e.parent = this,
  8123. e
  8124. }
  8125. ,
  8126. e.prototype._updatePlainTexts = function() {
  8127. var t = this.style
  8128. , e = t.font || a
  8129. , n = t.padding
  8130. , i = function(t, e) {
  8131. null != t && (t += "");
  8132. var n, i = e.overflow, r = e.padding, o = e.font, a = "truncate" === i, s = Tr(o), l = rt(e.lineHeight, s), u = !!e.backgroundColor, h = "truncate" === e.lineOverflow, c = !1, p = e.width, d = (n = null == p || "break" !== i && "breakAll" !== i ? t ? t.split("\n") : [] : t ? wa(t, e.font, p, "breakAll" === i, 0).lines : []).length * l, f = rt(e.height, d);
  8133. if (d > f && h) {
  8134. var g = Math.floor(f / l);
  8135. c = c || n.length > g,
  8136. n = n.slice(0, g)
  8137. }
  8138. if (t && a && null != p)
  8139. for (var y = da(p, o, e.ellipsis, {
  8140. minChar: e.truncateMinChar,
  8141. placeholder: e.placeholder
  8142. }), v = {}, m = 0; m < n.length; m++)
  8143. fa(v, n[m], y),
  8144. n[m] = v.textLine,
  8145. c = c || v.isTruncated;
  8146. var x = f
  8147. , _ = 0;
  8148. for (m = 0; m < n.length; m++)
  8149. _ = Math.max(br(n[m], o), _);
  8150. null == p && (p = _);
  8151. var b = _;
  8152. return r && (x += r[0] + r[2],
  8153. b += r[1] + r[3],
  8154. p += r[1] + r[3]),
  8155. u && (b = p),
  8156. {
  8157. lines: n,
  8158. height: f,
  8159. outerWidth: b,
  8160. outerHeight: x,
  8161. lineHeight: l,
  8162. calculatedLineHeight: s,
  8163. contentWidth: _,
  8164. contentHeight: d,
  8165. width: p,
  8166. isTruncated: c
  8167. }
  8168. }(nl(t), t)
  8169. , r = il(t)
  8170. , o = !!t.backgroundColor
  8171. , s = i.outerHeight
  8172. , l = i.outerWidth
  8173. , u = i.contentWidth
  8174. , h = i.lines
  8175. , c = i.lineHeight
  8176. , p = this._defaultStyle;
  8177. this.isTruncated = !!i.isTruncated;
  8178. var d = t.x || 0
  8179. , f = t.y || 0
  8180. , g = t.align || p.align || "left"
  8181. , y = t.verticalAlign || p.verticalAlign || "top"
  8182. , v = d
  8183. , m = Ir(f, i.contentHeight, y);
  8184. if (r || n) {
  8185. var x = Mr(d, l, g)
  8186. , _ = Ir(f, s, y);
  8187. r && this._renderBackground(t, t, x, _, l, s)
  8188. }
  8189. m += c / 2,
  8190. n && (v = el(d, g, n),
  8191. "top" === y ? m += n[0] : "bottom" === y && (m -= n[2]));
  8192. for (var b = 0, w = !1, S = (tl("fill"in t ? t.fill : (w = !0,
  8193. p.fill))), M = (Qs("stroke"in t ? t.stroke : o || p.autoStroke && !w ? null : (b = 2,
  8194. 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++) {
  8195. var A = this._getOrCreateChild(Ps)
  8196. , k = A.createStyle();
  8197. A.useStyle(k),
  8198. k.text = h[D],
  8199. k.x = v,
  8200. k.y = m,
  8201. g && (k.textAlign = g),
  8202. k.textBaseline = "middle",
  8203. k.opacity = t.opacity,
  8204. k.strokeFirst = !0,
  8205. I && (k.shadowBlur = t.textShadowBlur || 0,
  8206. k.shadowColor = t.textShadowColor || "transparent",
  8207. k.shadowOffsetX = t.textShadowOffsetX || 0,
  8208. k.shadowOffsetY = t.textShadowOffsetY || 0),
  8209. k.stroke = M,
  8210. k.fill = S,
  8211. M && (k.lineWidth = t.lineWidth || b,
  8212. k.lineDash = t.lineDash,
  8213. k.lineDashOffset = t.lineDashOffset || 0),
  8214. k.font = e,
  8215. Ks(k, t),
  8216. m += c,
  8217. T && A.setBoundingRect(new ze(Mr(k.x, u, k.textAlign),Ir(k.y, C, k.textBaseline),u,C))
  8218. }
  8219. }
  8220. ,
  8221. e.prototype._updateRichTexts = function() {
  8222. var t = this.style
  8223. , e = function(t, e) {
  8224. var n = new ma;
  8225. if (null != t && (t += ""),
  8226. !t)
  8227. return n;
  8228. for (var i, r = e.width, o = e.height, a = e.overflow, s = "break" !== a && "breakAll" !== a || null == r ? null : {
  8229. width: r,
  8230. accumWidth: 0,
  8231. breakAll: "breakAll" === a
  8232. }, l = ca.lastIndex = 0; null != (i = ca.exec(t)); ) {
  8233. var u = i.index;
  8234. u > l && xa(n, t.substring(l, u), e, s),
  8235. xa(n, i[2], e, s, i[1]),
  8236. l = ca.lastIndex
  8237. }
  8238. l < t.length && xa(n, t.substring(l, t.length), e, s);
  8239. var h = []
  8240. , c = 0
  8241. , p = 0
  8242. , d = e.padding
  8243. , f = "truncate" === a
  8244. , g = "truncate" === e.lineOverflow
  8245. , y = {};
  8246. function v(t, e, n) {
  8247. t.width = e,
  8248. t.lineHeight = n,
  8249. c += n,
  8250. p = Math.max(p, e)
  8251. }
  8252. t: for (var m = 0; m < n.lines.length; m++) {
  8253. for (var x = n.lines[m], _ = 0, b = 0, w = 0; w < x.tokens.length; w++) {
  8254. var S = (R = x.tokens[w]).styleName && e.rich[R.styleName] || {}
  8255. , M = R.textPadding = S.padding
  8256. , I = M ? M[1] + M[3] : 0
  8257. , T = R.font = S.font || e.font;
  8258. R.contentHeight = Tr(T);
  8259. var C = rt(S.height, R.contentHeight);
  8260. if (R.innerHeight = C,
  8261. M && (C += M[0] + M[2]),
  8262. R.height = C,
  8263. R.lineHeight = ot(S.lineHeight, e.lineHeight, C),
  8264. R.align = S && S.align || e.align,
  8265. R.verticalAlign = S && S.verticalAlign || "middle",
  8266. g && null != o && c + R.lineHeight > o) {
  8267. var D = n.lines.length;
  8268. w > 0 ? (x.tokens = x.tokens.slice(0, w),
  8269. v(x, b, _),
  8270. n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m),
  8271. n.isTruncated = n.isTruncated || n.lines.length < D;
  8272. break t
  8273. }
  8274. var A = S.width
  8275. , k = null == A || "auto" === A;
  8276. if ("string" == typeof A && "%" === A.charAt(A.length - 1))
  8277. R.percentWidth = A,
  8278. h.push(R),
  8279. R.contentWidth = br(R.text, T);
  8280. else {
  8281. if (k) {
  8282. var L = S.backgroundColor
  8283. , P = L && L.image;
  8284. P && ha(P = sa(P)) && (R.width = Math.max(R.width, P.width * C / P.height))
  8285. }
  8286. var O = f && null != r ? r - b : null;
  8287. null != O && O < R.width ? !k || O < I ? (R.text = "",
  8288. R.width = R.contentWidth = 0) : (pa(y, R.text, O - I, T, e.ellipsis, {
  8289. minChar: e.truncateMinChar
  8290. }),
  8291. R.text = y.text,
  8292. n.isTruncated = n.isTruncated || y.isTruncated,
  8293. R.width = R.contentWidth = br(R.text, T)) : R.contentWidth = br(R.text, T)
  8294. }
  8295. R.width += I,
  8296. b += R.width,
  8297. S && (_ = Math.max(_, R.lineHeight))
  8298. }
  8299. v(x, b, _)
  8300. }
  8301. for (n.outerWidth = n.width = rt(r, p),
  8302. n.outerHeight = n.height = rt(o, c),
  8303. n.contentHeight = c,
  8304. n.contentWidth = p,
  8305. d && (n.outerWidth += d[1] + d[3],
  8306. n.outerHeight += d[0] + d[2]),
  8307. m = 0; m < h.length; m++) {
  8308. var R, N = (R = h[m]).percentWidth;
  8309. R.width = parseInt(N, 10) / 100 * n.width
  8310. }
  8311. return n
  8312. }(nl(t), t)
  8313. , n = e.width
  8314. , i = e.outerWidth
  8315. , r = e.outerHeight
  8316. , o = t.padding
  8317. , a = t.x || 0
  8318. , s = t.y || 0
  8319. , l = this._defaultStyle
  8320. , u = t.align || l.align
  8321. , h = t.verticalAlign || l.verticalAlign;
  8322. this.isTruncated = !!e.isTruncated;
  8323. var c = Mr(a, i, u)
  8324. , p = Ir(s, r, h)
  8325. , d = c
  8326. , f = p;
  8327. o && (d += o[3],
  8328. f += o[0]);
  8329. var g = d + n;
  8330. il(t) && this._renderBackground(t, t, c, p, i, r);
  8331. for (var y = !!t.backgroundColor, v = 0; v < e.lines.length; v++) {
  8332. 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); )
  8333. this._placeToken(C, t, b, f, M, "left", y),
  8334. w -= C.width,
  8335. M += C.width,
  8336. S++;
  8337. for (; T >= 0 && "right" === (C = x[T]).align; )
  8338. this._placeToken(C, t, b, f, I, "right", y),
  8339. w -= C.width,
  8340. I -= C.width,
  8341. T--;
  8342. for (M += (n - (M - d) - (g - I) - w) / 2; S <= T; )
  8343. C = x[S],
  8344. this._placeToken(C, t, b, f, M + C.width / 2, "center", y),
  8345. M += C.width,
  8346. S++;
  8347. f += b
  8348. }
  8349. }
  8350. ,
  8351. e.prototype._placeToken = function(t, e, n, i, r, o, s) {
  8352. var l = e.rich[t.styleName] || {};
  8353. l.text = t.text;
  8354. var u = t.verticalAlign
  8355. , h = i + n / 2;
  8356. "top" === u ? h = i + t.height / 2 : "bottom" === u && (h = i + n - t.height / 2),
  8357. !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);
  8358. var c = !!l.backgroundColor
  8359. , p = t.textPadding;
  8360. p && (r = el(r, o, p),
  8361. h -= t.height / 2 - p[0] - t.innerHeight / 2);
  8362. var d = this._getOrCreateChild(Ps)
  8363. , f = d.createStyle();
  8364. d.useStyle(f);
  8365. var g = this._defaultStyle
  8366. , y = !1
  8367. , v = 0
  8368. , m = tl("fill"in l ? l.fill : "fill"in e ? e.fill : (y = !0,
  8369. g.fill))
  8370. , x = Qs("stroke"in l ? l.stroke : "stroke"in e ? e.stroke : c || s || g.autoStroke && !y ? null : (v = 2,
  8371. g.stroke))
  8372. , _ = l.textShadowBlur > 0 || e.textShadowBlur > 0;
  8373. f.text = t.text,
  8374. f.x = r,
  8375. f.y = h,
  8376. _ && (f.shadowBlur = l.textShadowBlur || e.textShadowBlur || 0,
  8377. f.shadowColor = l.textShadowColor || e.textShadowColor || "transparent",
  8378. f.shadowOffsetX = l.textShadowOffsetX || e.textShadowOffsetX || 0,
  8379. f.shadowOffsetY = l.textShadowOffsetY || e.textShadowOffsetY || 0),
  8380. f.textAlign = o,
  8381. f.textBaseline = "middle",
  8382. f.font = t.font || a,
  8383. f.opacity = ot(l.opacity, e.opacity, 1),
  8384. Ks(f, l),
  8385. x && (f.lineWidth = ot(l.lineWidth, e.lineWidth, v),
  8386. f.lineDash = rt(l.lineDash, e.lineDash),
  8387. f.lineDashOffset = e.lineDashOffset || 0,
  8388. f.stroke = x),
  8389. m && (f.fill = m);
  8390. var b = t.contentWidth
  8391. , w = t.contentHeight;
  8392. d.setBoundingRect(new ze(Mr(f.x, b, f.textAlign),Ir(f.y, w, f.textBaseline),b,w))
  8393. }
  8394. ,
  8395. e.prototype._renderBackground = function(t, e, n, i, r, o) {
  8396. var a, s, l, u = t.backgroundColor, h = t.borderWidth, c = t.borderColor, p = u && u.image, d = u && !p, f = t.borderRadius, g = this;
  8397. if (d || t.lineHeight || h && c) {
  8398. (a = this._getOrCreateChild(Ws)).useStyle(a.createStyle()),
  8399. a.style.fill = null;
  8400. var y = a.shape;
  8401. y.x = n,
  8402. y.y = i,
  8403. y.width = r,
  8404. y.height = o,
  8405. y.r = f,
  8406. a.dirtyShape()
  8407. }
  8408. if (d)
  8409. (l = a.style).fill = u || null,
  8410. l.fillOpacity = rt(t.fillOpacity, 1);
  8411. else if (p) {
  8412. (s = this._getOrCreateChild(Ns)).onload = function() {
  8413. g.dirtyStyle()
  8414. }
  8415. ;
  8416. var v = s.style;
  8417. v.image = u.image,
  8418. v.x = n,
  8419. v.y = i,
  8420. v.width = r,
  8421. v.height = o
  8422. }
  8423. h && c && ((l = a.style).lineWidth = h,
  8424. l.stroke = c,
  8425. l.strokeOpacity = rt(t.strokeOpacity, 1),
  8426. l.lineDash = t.borderDash,
  8427. l.lineDashOffset = t.borderDashOffset || 0,
  8428. a.strokeContainThreshold = 0,
  8429. a.hasFill() && a.hasStroke() && (l.strokeFirst = !0,
  8430. l.lineWidth *= 2));
  8431. var m = (a || s).style;
  8432. m.shadowBlur = t.shadowBlur || 0,
  8433. m.shadowColor = t.shadowColor || "transparent",
  8434. m.shadowOffsetX = t.shadowOffsetX || 0,
  8435. m.shadowOffsetY = t.shadowOffsetY || 0,
  8436. m.opacity = ot(t.opacity, e.opacity, 1)
  8437. }
  8438. ,
  8439. e.makeFont = function(t) {
  8440. var e = "";
  8441. return $s(t) && (e = [t.fontStyle, t.fontWeight, qs(t.fontSize), t.fontFamily || "sans-serif"].join(" ")),
  8442. e && ut(e) || t.textFont || t.font
  8443. }
  8444. ,
  8445. e
  8446. }(Da)
  8447. , Us = {
  8448. left: !0,
  8449. right: 1,
  8450. center: 1
  8451. }
  8452. , Zs = {
  8453. top: 1,
  8454. bottom: 1,
  8455. middle: 1
  8456. }
  8457. , js = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  8458. function qs(t) {
  8459. return "string" != typeof t || -1 === t.indexOf("px") && -1 === t.indexOf("rem") && -1 === t.indexOf("em") ? isNaN(+t) ? "12px" : t + "px" : t
  8460. }
  8461. function Ks(t, e) {
  8462. for (var n = 0; n < js.length; n++) {
  8463. var i = js[n]
  8464. , r = e[i];
  8465. null != r && (t[i] = r)
  8466. }
  8467. }
  8468. function $s(t) {
  8469. return null != t.fontSize || t.fontFamily || t.fontWeight
  8470. }
  8471. function Js(t) {
  8472. if (t) {
  8473. t.font = Xs.makeFont(t);
  8474. var e = t.align;
  8475. "middle" === e && (e = "center"),
  8476. t.align = null == e || Us[e] ? e : "left";
  8477. var n = t.verticalAlign;
  8478. "center" === n && (n = "middle"),
  8479. t.verticalAlign = null == n || Zs[n] ? n : "top",
  8480. t.padding && (t.padding = st(t.padding))
  8481. }
  8482. }
  8483. function Qs(t, e) {
  8484. return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  8485. }
  8486. function tl(t) {
  8487. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  8488. }
  8489. function el(t, e, n) {
  8490. return "right" === e ? t - n[1] : "center" === e ? t + n[3] / 2 - n[1] / 2 : t + n[3]
  8491. }
  8492. function nl(t) {
  8493. var e = t.text;
  8494. return null != e && (e += ""),
  8495. e
  8496. }
  8497. function il(t) {
  8498. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor)
  8499. }
  8500. var rl = Vo()
  8501. , ol = function(t, e, n, i) {
  8502. if (i) {
  8503. var r = rl(i);
  8504. r.dataIndex = n,
  8505. r.dataType = e,
  8506. r.seriesIndex = t,
  8507. r.ssrType = "chart",
  8508. "group" === i.type && i.traverse((function(i) {
  8509. var r = rl(i);
  8510. r.seriesIndex = t,
  8511. r.dataIndex = n,
  8512. r.dataType = e,
  8513. r.ssrType = "chart"
  8514. }
  8515. ))
  8516. }
  8517. }
  8518. , al = 1
  8519. , sl = {}
  8520. , ll = Vo()
  8521. , ul = Vo()
  8522. , hl = ["emphasis", "blur", "select"]
  8523. , cl = ["normal", "emphasis", "blur", "select"]
  8524. , pl = 10
  8525. , dl = "highlight"
  8526. , fl = "downplay"
  8527. , gl = "select"
  8528. , yl = "unselect"
  8529. , vl = "toggleSelect";
  8530. function ml(t) {
  8531. return null != t && "none" !== t
  8532. }
  8533. function xl(t, e, n) {
  8534. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e),
  8535. t.hoverState = n
  8536. }
  8537. function _l(t) {
  8538. xl(t, "emphasis", 2)
  8539. }
  8540. function bl(t) {
  8541. 2 === t.hoverState && xl(t, "normal", 0)
  8542. }
  8543. function wl(t) {
  8544. xl(t, "blur", 1)
  8545. }
  8546. function Sl(t) {
  8547. 1 === t.hoverState && xl(t, "normal", 0)
  8548. }
  8549. function Ml(t) {
  8550. t.selected = !0
  8551. }
  8552. function Il(t) {
  8553. t.selected = !1
  8554. }
  8555. function Tl(t, e, n) {
  8556. e(t, n)
  8557. }
  8558. function Cl(t, e, n) {
  8559. Tl(t, e, n),
  8560. t.isGroup && t.traverse((function(t) {
  8561. Tl(t, e, n)
  8562. }
  8563. ))
  8564. }
  8565. function Dl(t, e) {
  8566. switch (e) {
  8567. case "emphasis":
  8568. t.hoverState = 2;
  8569. break;
  8570. case "normal":
  8571. t.hoverState = 0;
  8572. break;
  8573. case "blur":
  8574. t.hoverState = 1;
  8575. break;
  8576. case "select":
  8577. t.selected = !0
  8578. }
  8579. }
  8580. function Al(t, e) {
  8581. var n = this.states[t];
  8582. if (this.style) {
  8583. if ("emphasis" === t)
  8584. return function(t, e, n, i) {
  8585. var r = n && P(n, "select") >= 0
  8586. , o = !1;
  8587. if (t instanceof ks) {
  8588. var a = ll(t)
  8589. , s = r && a.selectFill || a.normalFill
  8590. , l = r && a.selectStroke || a.normalStroke;
  8591. if (ml(s) || ml(l)) {
  8592. var u = (i = i || {}).style || {};
  8593. "inherit" === u.fill ? (o = !0,
  8594. i = A({}, i),
  8595. (u = A({}, u)).fill = s) : !ml(u.fill) && ml(s) ? (o = !0,
  8596. i = A({}, i),
  8597. (u = A({}, u)).fill = si(s)) : !ml(u.stroke) && ml(l) && (o || (i = A({}, i),
  8598. u = A({}, u)),
  8599. u.stroke = si(l)),
  8600. i.style = u
  8601. }
  8602. }
  8603. if (i && null == i.z2) {
  8604. o || (i = A({}, i));
  8605. var h = t.z2EmphasisLift;
  8606. i.z2 = t.z2 + (null != h ? h : pl)
  8607. }
  8608. return i
  8609. }(this, 0, e, n);
  8610. if ("blur" === t)
  8611. return function(t, e, n) {
  8612. var i = P(t.currentStates, e) >= 0
  8613. , r = t.style.opacity
  8614. , o = i ? null : function(t, e, n, i) {
  8615. for (var r = t.style, o = {}, a = 0; a < e.length; a++) {
  8616. var s = e[a]
  8617. , l = r[s];
  8618. o[s] = null == l ? i && i[s] : l
  8619. }
  8620. for (a = 0; a < t.animators.length; a++) {
  8621. var u = t.animators[a];
  8622. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && "style" === u.targetName && u.saveTo(o, e)
  8623. }
  8624. return o
  8625. }(t, ["opacity"], e, {
  8626. opacity: 1
  8627. })
  8628. , a = (n = n || {}).style || {};
  8629. return null == a.opacity && (n = A({}, n),
  8630. a = A({
  8631. opacity: i ? r : .1 * o.opacity
  8632. }, a),
  8633. n.style = a),
  8634. n
  8635. }(this, t, n);
  8636. if ("select" === t)
  8637. return function(t, e, n) {
  8638. if (n && null == n.z2) {
  8639. n = A({}, n);
  8640. var i = t.z2SelectLift;
  8641. n.z2 = t.z2 + (null != i ? i : 9)
  8642. }
  8643. return n
  8644. }(this, 0, n)
  8645. }
  8646. return n
  8647. }
  8648. function kl(t) {
  8649. t.stateProxy = Al;
  8650. var e = t.getTextContent()
  8651. , n = t.getTextGuideLine();
  8652. e && (e.stateProxy = Al),
  8653. n && (n.stateProxy = Al)
  8654. }
  8655. function Ll(t, e) {
  8656. !Bl(t, e) && !t.__highByOuter && Cl(t, _l)
  8657. }
  8658. function Pl(t, e) {
  8659. !Bl(t, e) && !t.__highByOuter && Cl(t, bl)
  8660. }
  8661. function Ol(t, e) {
  8662. t.__highByOuter |= 1 << (e || 0),
  8663. Cl(t, _l)
  8664. }
  8665. function Rl(t, e) {
  8666. !(t.__highByOuter &= ~(1 << (e || 0))) && Cl(t, bl)
  8667. }
  8668. function Nl(t) {
  8669. Cl(t, wl)
  8670. }
  8671. function El(t) {
  8672. Cl(t, Sl)
  8673. }
  8674. function zl(t) {
  8675. Cl(t, Ml)
  8676. }
  8677. function Vl(t) {
  8678. Cl(t, Il)
  8679. }
  8680. function Bl(t, e) {
  8681. return t.__highDownSilentOnTouch && e.zrByTouch
  8682. }
  8683. function Fl(t) {
  8684. var e = t.getModel()
  8685. , n = []
  8686. , i = [];
  8687. e.eachComponent((function(e, r) {
  8688. var o = ul(r)
  8689. , a = "series" === e
  8690. , s = a ? t.getViewOfSeriesModel(r) : t.getViewOfComponentModel(r);
  8691. !a && i.push(s),
  8692. o.isBlured && (s.group.traverse((function(t) {
  8693. Sl(t)
  8694. }
  8695. )),
  8696. a && n.push(r)),
  8697. o.isBlured = !1
  8698. }
  8699. )),
  8700. E(i, (function(t) {
  8701. t && t.toggleBlurSeries && t.toggleBlurSeries(n, !1, e)
  8702. }
  8703. ))
  8704. }
  8705. function Gl(t, e, n, i) {
  8706. var r = i.getModel();
  8707. function o(t, e) {
  8708. for (var n = 0; n < e.length; n++) {
  8709. var i = t.getItemGraphicEl(e[n]);
  8710. i && El(i)
  8711. }
  8712. }
  8713. if (n = n || "coordinateSystem",
  8714. null != t && e && "none" !== e) {
  8715. var a = r.getSeriesByIndex(t)
  8716. , s = a.coordinateSystem;
  8717. s && s.master && (s = s.master);
  8718. var l = [];
  8719. r.eachSeries((function(t) {
  8720. var r = a === t
  8721. , u = t.coordinateSystem;
  8722. if (u && u.master && (u = u.master),
  8723. !("series" === n && !r || "coordinateSystem" === n && !(u && s ? u === s : r) || "series" === e && r)) {
  8724. if (i.getViewOfSeriesModel(t).group.traverse((function(t) {
  8725. t.__highByOuter && r && "self" === e || wl(t)
  8726. }
  8727. )),
  8728. N(e))
  8729. o(t.getData(), e);
  8730. else if (q(e))
  8731. for (var h = G(e), c = 0; c < h.length; c++)
  8732. o(t.getData(h[c]), e[h[c]]);
  8733. l.push(t),
  8734. ul(t).isBlured = !0
  8735. }
  8736. }
  8737. )),
  8738. r.eachComponent((function(t, e) {
  8739. if ("series" !== t) {
  8740. var n = i.getViewOfComponentModel(e);
  8741. n && n.toggleBlurSeries && n.toggleBlurSeries(l, !0, r)
  8742. }
  8743. }
  8744. ))
  8745. }
  8746. }
  8747. function Wl(t, e, n) {
  8748. if (null != t && null != e) {
  8749. var i = n.getModel().getComponent(t, e);
  8750. if (i) {
  8751. ul(i).isBlured = !0;
  8752. var r = n.getViewOfComponentModel(i);
  8753. r && r.focusBlurEnabled && r.group.traverse((function(t) {
  8754. wl(t)
  8755. }
  8756. ))
  8757. }
  8758. }
  8759. }
  8760. function Hl(t, e, n, i) {
  8761. var r = {
  8762. focusSelf: !1,
  8763. dispatchers: null
  8764. };
  8765. if (null == t || "series" === t || null == e || null == n)
  8766. return r;
  8767. var o = i.getModel().getComponent(t, e);
  8768. if (!o)
  8769. return r;
  8770. var a = i.getViewOfComponentModel(o);
  8771. if (!a || !a.findHighDownDispatchers)
  8772. return r;
  8773. for (var s, l = a.findHighDownDispatchers(n), u = 0; u < l.length; u++)
  8774. if ("self" === rl(l[u]).focus) {
  8775. s = !0;
  8776. break
  8777. }
  8778. return {
  8779. focusSelf: s,
  8780. dispatchers: l
  8781. }
  8782. }
  8783. function Yl(t) {
  8784. E(t.getAllData(), (function(e) {
  8785. var n = e.data
  8786. , i = e.type;
  8787. n.eachItemGraphicEl((function(e, n) {
  8788. t.isSelected(n, i) ? zl(e) : Vl(e)
  8789. }
  8790. ))
  8791. }
  8792. ))
  8793. }
  8794. function Xl(t) {
  8795. var e = [];
  8796. return t.eachSeries((function(t) {
  8797. E(t.getAllData(), (function(n) {
  8798. n.data;
  8799. var i = n.type
  8800. , r = t.getSelectedDataIndices();
  8801. if (r.length > 0) {
  8802. var o = {
  8803. dataIndex: r,
  8804. seriesIndex: t.seriesIndex
  8805. };
  8806. null != i && (o.dataType = i),
  8807. e.push(o)
  8808. }
  8809. }
  8810. ))
  8811. }
  8812. )),
  8813. e
  8814. }
  8815. function Ul(t, e, n) {
  8816. Jl(t, !0),
  8817. Cl(t, kl),
  8818. jl(t, e, n)
  8819. }
  8820. function Zl(t, e, n, i) {
  8821. i ? function(t) {
  8822. Jl(t, !1)
  8823. }(t) : Ul(t, e, n)
  8824. }
  8825. function jl(t, e, n) {
  8826. var i = rl(t);
  8827. null != e ? (i.focus = e,
  8828. i.blurScope = n) : i.focus && (i.focus = null)
  8829. }
  8830. var ql = ["emphasis", "blur", "select"]
  8831. , Kl = {
  8832. itemStyle: "getItemStyle",
  8833. lineStyle: "getLineStyle",
  8834. areaStyle: "getAreaStyle"
  8835. };
  8836. function $l(t, e, n, i) {
  8837. n = n || "itemStyle";
  8838. for (var r = 0; r < ql.length; r++) {
  8839. var o = ql[r]
  8840. , a = e.getModel([o, n]);
  8841. t.ensureState(o).style = i ? i(a) : a[Kl[n]]()
  8842. }
  8843. }
  8844. function Jl(t, e) {
  8845. var n = !1 === e
  8846. , i = t;
  8847. t.highDownSilentOnTouch && (i.__highDownSilentOnTouch = t.highDownSilentOnTouch),
  8848. n && !i.__highDownDispatcher || (i.__highByOuter = i.__highByOuter || 0,
  8849. i.__highDownDispatcher = !n)
  8850. }
  8851. function Ql(t) {
  8852. return !(!t || !t.__highDownDispatcher)
  8853. }
  8854. function tu(t) {
  8855. var e = t.type;
  8856. return e === gl || e === yl || e === vl
  8857. }
  8858. function eu(t) {
  8859. var e = t.type;
  8860. return e === dl || e === fl
  8861. }
  8862. var nu = hs.CMD
  8863. , iu = [[], [], []]
  8864. , ru = Math.sqrt
  8865. , ou = Math.atan2;
  8866. function au(t, e) {
  8867. if (e) {
  8868. var n, i, r, o, a, s, l = t.data, u = t.len(), h = nu.M, c = nu.C, p = nu.L, d = nu.R, f = nu.A, g = nu.Q;
  8869. for (r = 0,
  8870. o = 0; r < u; ) {
  8871. switch (n = l[r++],
  8872. o = r,
  8873. i = 0,
  8874. n) {
  8875. case h:
  8876. case p:
  8877. i = 1;
  8878. break;
  8879. case c:
  8880. i = 3;
  8881. break;
  8882. case g:
  8883. i = 2;
  8884. break;
  8885. case f:
  8886. var y = e[4]
  8887. , v = e[5]
  8888. , m = ru(e[0] * e[0] + e[1] * e[1])
  8889. , x = ru(e[2] * e[2] + e[3] * e[3])
  8890. , _ = ou(-e[1] / x, e[0] / m);
  8891. l[r] *= m,
  8892. l[r++] += y,
  8893. l[r] *= x,
  8894. l[r++] += v,
  8895. l[r++] *= m,
  8896. l[r++] *= x,
  8897. l[r++] += _,
  8898. l[r++] += _,
  8899. o = r += 2;
  8900. break;
  8901. case d:
  8902. s[0] = l[r++],
  8903. s[1] = l[r++],
  8904. Wt(s, s, e),
  8905. l[o++] = s[0],
  8906. l[o++] = s[1],
  8907. s[0] += l[r++],
  8908. s[1] += l[r++],
  8909. Wt(s, s, e),
  8910. l[o++] = s[0],
  8911. l[o++] = s[1]
  8912. }
  8913. for (a = 0; a < i; a++) {
  8914. var b = iu[a];
  8915. b[0] = l[r++],
  8916. b[1] = l[r++],
  8917. Wt(b, b, e),
  8918. l[o++] = b[0],
  8919. l[o++] = b[1]
  8920. }
  8921. }
  8922. t.increaseVersion()
  8923. }
  8924. }
  8925. var su = Math.sqrt
  8926. , lu = Math.sin
  8927. , uu = Math.cos
  8928. , hu = Math.PI;
  8929. function cu(t) {
  8930. return Math.sqrt(t[0] * t[0] + t[1] * t[1])
  8931. }
  8932. function pu(t, e) {
  8933. return (t[0] * e[0] + t[1] * e[1]) / (cu(t) * cu(e))
  8934. }
  8935. function du(t, e) {
  8936. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(pu(t, e))
  8937. }
  8938. function fu(t, e, n, i, r, o, a, s, l, u, h) {
  8939. var c = l * (hu / 180)
  8940. , p = uu(c) * (t - n) / 2 + lu(c) * (e - i) / 2
  8941. , d = -1 * lu(c) * (t - n) / 2 + uu(c) * (e - i) / 2
  8942. , f = p * p / (a * a) + d * d / (s * s);
  8943. f > 1 && (a *= su(f),
  8944. s *= su(f));
  8945. 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
  8946. , y = g * a * d / s
  8947. , v = g * -s * p / a
  8948. , m = (t + n) / 2 + uu(c) * y - lu(c) * v
  8949. , x = (e + i) / 2 + lu(c) * y + uu(c) * v
  8950. , _ = du([1, 0], [(p - y) / a, (d - v) / s])
  8951. , b = [(p - y) / a, (d - v) / s]
  8952. , w = [(-1 * p - y) / a, (-1 * d - v) / s]
  8953. , S = du(b, w);
  8954. if (pu(b, w) <= -1 && (S = hu),
  8955. pu(b, w) >= 1 && (S = 0),
  8956. S < 0) {
  8957. var M = Math.round(S / hu * 1e6) / 1e6;
  8958. S = 2 * hu + M % 2 * hu
  8959. }
  8960. h.addData(u, m, x, a, s, _, S, c, o)
  8961. }
  8962. var gu = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi
  8963. , yu = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  8964. var vu = function(t) {
  8965. function e() {
  8966. return null !== t && t.apply(this, arguments) || this
  8967. }
  8968. return n(e, t),
  8969. e.prototype.applyTransform = function(t) {}
  8970. ,
  8971. e
  8972. }(ks);
  8973. function mu(t) {
  8974. return null != t.setData
  8975. }
  8976. function xu(t, e) {
  8977. var n = function(t) {
  8978. var e = new hs;
  8979. if (!t)
  8980. return e;
  8981. var n, i = 0, r = 0, o = i, a = r, s = hs.CMD, l = t.match(gu);
  8982. if (!l)
  8983. return e;
  8984. for (var u = 0; u < l.length; u++) {
  8985. for (var h = l[u], c = h.charAt(0), p = void 0, d = h.match(yu) || [], f = d.length, g = 0; g < f; g++)
  8986. d[g] = parseFloat(d[g]);
  8987. for (var y = 0; y < f; ) {
  8988. var v = void 0
  8989. , m = void 0
  8990. , x = void 0
  8991. , _ = void 0
  8992. , b = void 0
  8993. , w = void 0
  8994. , S = void 0
  8995. , M = i
  8996. , I = r
  8997. , T = void 0
  8998. , C = void 0;
  8999. switch (c) {
  9000. case "l":
  9001. i += d[y++],
  9002. r += d[y++],
  9003. p = s.L,
  9004. e.addData(p, i, r);
  9005. break;
  9006. case "L":
  9007. i = d[y++],
  9008. r = d[y++],
  9009. p = s.L,
  9010. e.addData(p, i, r);
  9011. break;
  9012. case "m":
  9013. i += d[y++],
  9014. r += d[y++],
  9015. p = s.M,
  9016. e.addData(p, i, r),
  9017. o = i,
  9018. a = r,
  9019. c = "l";
  9020. break;
  9021. case "M":
  9022. i = d[y++],
  9023. r = d[y++],
  9024. p = s.M,
  9025. e.addData(p, i, r),
  9026. o = i,
  9027. a = r,
  9028. c = "L";
  9029. break;
  9030. case "h":
  9031. i += d[y++],
  9032. p = s.L,
  9033. e.addData(p, i, r);
  9034. break;
  9035. case "H":
  9036. i = d[y++],
  9037. p = s.L,
  9038. e.addData(p, i, r);
  9039. break;
  9040. case "v":
  9041. r += d[y++],
  9042. p = s.L,
  9043. e.addData(p, i, r);
  9044. break;
  9045. case "V":
  9046. r = d[y++],
  9047. p = s.L,
  9048. e.addData(p, i, r);
  9049. break;
  9050. case "C":
  9051. p = s.C,
  9052. e.addData(p, d[y++], d[y++], d[y++], d[y++], d[y++], d[y++]),
  9053. i = d[y - 2],
  9054. r = d[y - 1];
  9055. break;
  9056. case "c":
  9057. p = s.C,
  9058. e.addData(p, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r, d[y++] + i, d[y++] + r),
  9059. i += d[y - 2],
  9060. r += d[y - 1];
  9061. break;
  9062. case "S":
  9063. v = i,
  9064. m = r,
  9065. T = e.len(),
  9066. C = e.data,
  9067. n === s.C && (v += i - C[T - 4],
  9068. m += r - C[T - 3]),
  9069. p = s.C,
  9070. M = d[y++],
  9071. I = d[y++],
  9072. i = d[y++],
  9073. r = d[y++],
  9074. e.addData(p, v, m, M, I, i, r);
  9075. break;
  9076. case "s":
  9077. v = i,
  9078. m = r,
  9079. T = e.len(),
  9080. C = e.data,
  9081. n === s.C && (v += i - C[T - 4],
  9082. m += r - C[T - 3]),
  9083. p = s.C,
  9084. M = i + d[y++],
  9085. I = r + d[y++],
  9086. i += d[y++],
  9087. r += d[y++],
  9088. e.addData(p, v, m, M, I, i, r);
  9089. break;
  9090. case "Q":
  9091. M = d[y++],
  9092. I = d[y++],
  9093. i = d[y++],
  9094. r = d[y++],
  9095. p = s.Q,
  9096. e.addData(p, M, I, i, r);
  9097. break;
  9098. case "q":
  9099. M = d[y++] + i,
  9100. I = d[y++] + r,
  9101. i += d[y++],
  9102. r += d[y++],
  9103. p = s.Q,
  9104. e.addData(p, M, I, i, r);
  9105. break;
  9106. case "T":
  9107. v = i,
  9108. m = r,
  9109. T = e.len(),
  9110. C = e.data,
  9111. n === s.Q && (v += i - C[T - 4],
  9112. m += r - C[T - 3]),
  9113. i = d[y++],
  9114. r = d[y++],
  9115. p = s.Q,
  9116. e.addData(p, v, m, i, r);
  9117. break;
  9118. case "t":
  9119. v = i,
  9120. m = r,
  9121. T = e.len(),
  9122. C = e.data,
  9123. n === s.Q && (v += i - C[T - 4],
  9124. m += r - C[T - 3]),
  9125. i += d[y++],
  9126. r += d[y++],
  9127. p = s.Q,
  9128. e.addData(p, v, m, i, r);
  9129. break;
  9130. case "A":
  9131. x = d[y++],
  9132. _ = d[y++],
  9133. b = d[y++],
  9134. w = d[y++],
  9135. S = d[y++],
  9136. fu(M = i, I = r, i = d[y++], r = d[y++], w, S, x, _, b, p = s.A, e);
  9137. break;
  9138. case "a":
  9139. x = d[y++],
  9140. _ = d[y++],
  9141. b = d[y++],
  9142. w = d[y++],
  9143. S = d[y++],
  9144. fu(M = i, I = r, i += d[y++], r += d[y++], w, S, x, _, b, p = s.A, e)
  9145. }
  9146. }
  9147. "z" !== c && "Z" !== c || (p = s.Z,
  9148. e.addData(p),
  9149. i = o,
  9150. r = a),
  9151. n = p
  9152. }
  9153. return e.toStatic(),
  9154. e
  9155. }(t)
  9156. , i = A({}, e);
  9157. return i.buildPath = function(t) {
  9158. if (mu(t)) {
  9159. t.setData(n.data),
  9160. (e = t.getContext()) && t.rebuildPath(e, 1)
  9161. } else {
  9162. var e = t;
  9163. n.rebuildPath(e, 1)
  9164. }
  9165. }
  9166. ,
  9167. i.applyTransform = function(t) {
  9168. au(n, t),
  9169. this.dirtyShape()
  9170. }
  9171. ,
  9172. i
  9173. }
  9174. function _u(t, e) {
  9175. return new vu(xu(t, e))
  9176. }
  9177. function bu(t, e) {
  9178. e = e || {};
  9179. var n = new ks;
  9180. return t.shape && n.setShape(t.shape),
  9181. n.setStyle(t.style),
  9182. e.bakeTransform ? au(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t),
  9183. n.buildPath = t.buildPath,
  9184. n.applyTransform = n.applyTransform,
  9185. n.z = t.z,
  9186. n.z2 = t.z2,
  9187. n.zlevel = t.zlevel,
  9188. n
  9189. }
  9190. var wu = function() {
  9191. this.cx = 0,
  9192. this.cy = 0,
  9193. this.r = 0
  9194. }
  9195. , Su = function(t) {
  9196. function e(e) {
  9197. return t.call(this, e) || this
  9198. }
  9199. return n(e, t),
  9200. e.prototype.getDefaultShape = function() {
  9201. return new wu
  9202. }
  9203. ,
  9204. e.prototype.buildPath = function(t, e) {
  9205. t.moveTo(e.cx + e.r, e.cy),
  9206. t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI)
  9207. }
  9208. ,
  9209. e
  9210. }(ks);
  9211. Su.prototype.type = "circle";
  9212. var Mu = function() {
  9213. this.cx = 0,
  9214. this.cy = 0,
  9215. this.rx = 0,
  9216. this.ry = 0
  9217. }
  9218. , Iu = function(t) {
  9219. function e(e) {
  9220. return t.call(this, e) || this
  9221. }
  9222. return n(e, t),
  9223. e.prototype.getDefaultShape = function() {
  9224. return new Mu
  9225. }
  9226. ,
  9227. e.prototype.buildPath = function(t, e) {
  9228. var n = .5522848
  9229. , i = e.cx
  9230. , r = e.cy
  9231. , o = e.rx
  9232. , a = e.ry
  9233. , s = o * n
  9234. , l = a * n;
  9235. t.moveTo(i - o, r),
  9236. t.bezierCurveTo(i - o, r - l, i - s, r - a, i, r - a),
  9237. t.bezierCurveTo(i + s, r - a, i + o, r - l, i + o, r),
  9238. t.bezierCurveTo(i + o, r + l, i + s, r + a, i, r + a),
  9239. t.bezierCurveTo(i - s, r + a, i - o, r + l, i - o, r),
  9240. t.closePath()
  9241. }
  9242. ,
  9243. e
  9244. }(ks);
  9245. Iu.prototype.type = "ellipse";
  9246. var Tu = Math.PI
  9247. , Cu = 2 * Tu
  9248. , Du = Math.sin
  9249. , Au = Math.cos
  9250. , ku = Math.acos
  9251. , Lu = Math.atan2
  9252. , Pu = Math.abs
  9253. , Ou = Math.sqrt
  9254. , Ru = Math.max
  9255. , Nu = Math.min
  9256. , Eu = 1e-4;
  9257. function zu(t, e, n, i, r, o, a) {
  9258. var s = t - n
  9259. , l = e - i
  9260. , u = (a ? o : -o) / Ou(s * s + l * l)
  9261. , h = u * l
  9262. , c = -u * s
  9263. , p = t + h
  9264. , d = e + c
  9265. , f = n + h
  9266. , g = i + c
  9267. , y = (p + f) / 2
  9268. , v = (d + g) / 2
  9269. , m = f - p
  9270. , x = g - d
  9271. , _ = m * m + x * x
  9272. , b = r - o
  9273. , w = p * g - f * d
  9274. , S = (x < 0 ? -1 : 1) * Ou(Ru(0, b * b * _ - w * w))
  9275. , M = (w * x - m * S) / _
  9276. , I = (-w * m - x * S) / _
  9277. , T = (w * x + m * S) / _
  9278. , C = (-w * m + x * S) / _
  9279. , D = M - y
  9280. , A = I - v
  9281. , k = T - y
  9282. , L = C - v;
  9283. return D * D + A * A > k * k + L * L && (M = T,
  9284. I = C),
  9285. {
  9286. cx: M,
  9287. cy: I,
  9288. x0: -h,
  9289. y0: -c,
  9290. x1: M * (r / b - 1),
  9291. y1: I * (r / b - 1)
  9292. }
  9293. }
  9294. function Vu(t, e) {
  9295. var n, i = Ru(e.r, 0), r = Ru(e.r0 || 0, 0), o = i > 0;
  9296. if (o || r > 0) {
  9297. if (o || (i = r,
  9298. r = 0),
  9299. r > i) {
  9300. var a = i;
  9301. i = r,
  9302. r = a
  9303. }
  9304. var s = e.startAngle
  9305. , l = e.endAngle;
  9306. if (!isNaN(s) && !isNaN(l)) {
  9307. var u = e.cx
  9308. , h = e.cy
  9309. , c = !!e.clockwise
  9310. , p = Pu(l - s)
  9311. , d = p > Cu && p % Cu;
  9312. if (d > Eu && (p = d),
  9313. i > Eu)
  9314. if (p > Cu - Eu)
  9315. t.moveTo(u + i * Au(s), h + i * Du(s)),
  9316. t.arc(u, h, i, s, l, !c),
  9317. r > Eu && (t.moveTo(u + r * Au(l), h + r * Du(l)),
  9318. t.arc(u, h, r, l, s, c));
  9319. else {
  9320. var f = void 0
  9321. , g = void 0
  9322. , y = void 0
  9323. , v = void 0
  9324. , m = void 0
  9325. , x = void 0
  9326. , _ = void 0
  9327. , b = void 0
  9328. , w = void 0
  9329. , S = void 0
  9330. , M = void 0
  9331. , I = void 0
  9332. , T = void 0
  9333. , C = void 0
  9334. , D = void 0
  9335. , A = void 0
  9336. , k = i * Au(s)
  9337. , L = i * Du(s)
  9338. , P = r * Au(l)
  9339. , O = r * Du(l)
  9340. , R = p > Eu;
  9341. if (R) {
  9342. var N = e.cornerRadius;
  9343. N && (n = function(t) {
  9344. var e;
  9345. if (Y(t)) {
  9346. var n = t.length;
  9347. if (!n)
  9348. return t;
  9349. 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
  9350. } else
  9351. e = [t, t, t, t];
  9352. return e
  9353. }(N),
  9354. f = n[0],
  9355. g = n[1],
  9356. y = n[2],
  9357. v = n[3]);
  9358. var E = Pu(i - r) / 2;
  9359. if (m = Nu(E, y),
  9360. x = Nu(E, v),
  9361. _ = Nu(E, f),
  9362. b = Nu(E, g),
  9363. M = w = Ru(m, x),
  9364. I = S = Ru(_, b),
  9365. (w > Eu || S > Eu) && (T = i * Au(l),
  9366. C = i * Du(l),
  9367. D = r * Au(s),
  9368. A = r * Du(s),
  9369. p < Tu)) {
  9370. var z = function(t, e, n, i, r, o, a, s) {
  9371. var l = n - t
  9372. , u = i - e
  9373. , h = a - r
  9374. , c = s - o
  9375. , p = c * l - h * u;
  9376. if (!(p * p < Eu))
  9377. return [t + (p = (h * (e - o) - c * (t - r)) / p) * l, e + p * u]
  9378. }(k, L, D, A, T, C, P, O);
  9379. if (z) {
  9380. var V = k - z[0]
  9381. , B = L - z[1]
  9382. , F = T - z[0]
  9383. , G = C - z[1]
  9384. , W = 1 / Du(ku((V * F + B * G) / (Ou(V * V + B * B) * Ou(F * F + G * G))) / 2)
  9385. , H = Ou(z[0] * z[0] + z[1] * z[1]);
  9386. M = Nu(w, (i - H) / (W + 1)),
  9387. I = Nu(S, (r - H) / (W - 1))
  9388. }
  9389. }
  9390. }
  9391. if (R)
  9392. if (M > Eu) {
  9393. var X = Nu(y, M)
  9394. , U = Nu(v, M)
  9395. , Z = zu(D, A, k, L, i, X, c)
  9396. , j = zu(T, C, P, O, i, U, c);
  9397. t.moveTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0),
  9398. 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),
  9399. t.arc(u, h, i, Lu(Z.cy + Z.y1, Z.cx + Z.x1), Lu(j.cy + j.y1, j.cx + j.x1), !c),
  9400. U > 0 && t.arc(u + j.cx, h + j.cy, U, Lu(j.y1, j.x1), Lu(j.y0, j.x0), !c))
  9401. } else
  9402. t.moveTo(u + k, h + L),
  9403. t.arc(u, h, i, s, l, !c);
  9404. else
  9405. t.moveTo(u + k, h + L);
  9406. if (r > Eu && R)
  9407. if (I > Eu) {
  9408. X = Nu(f, I),
  9409. Z = zu(P, O, T, C, r, -(U = Nu(g, I)), c),
  9410. j = zu(k, L, D, A, r, -X, c);
  9411. t.lineTo(u + Z.cx + Z.x0, h + Z.cy + Z.y0),
  9412. 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),
  9413. t.arc(u, h, r, Lu(Z.cy + Z.y1, Z.cx + Z.x1), Lu(j.cy + j.y1, j.cx + j.x1), c),
  9414. X > 0 && t.arc(u + j.cx, h + j.cy, X, Lu(j.y1, j.x1), Lu(j.y0, j.x0), !c))
  9415. } else
  9416. t.lineTo(u + P, h + O),
  9417. t.arc(u, h, r, l, s, c);
  9418. else
  9419. t.lineTo(u + P, h + O)
  9420. }
  9421. else
  9422. t.moveTo(u, h);
  9423. t.closePath()
  9424. }
  9425. }
  9426. }
  9427. var Bu = function() {
  9428. this.cx = 0,
  9429. this.cy = 0,
  9430. this.r0 = 0,
  9431. this.r = 0,
  9432. this.startAngle = 0,
  9433. this.endAngle = 2 * Math.PI,
  9434. this.clockwise = !0,
  9435. this.cornerRadius = 0
  9436. }
  9437. , Fu = function(t) {
  9438. function e(e) {
  9439. return t.call(this, e) || this
  9440. }
  9441. return n(e, t),
  9442. e.prototype.getDefaultShape = function() {
  9443. return new Bu
  9444. }
  9445. ,
  9446. e.prototype.buildPath = function(t, e) {
  9447. Vu(t, e)
  9448. }
  9449. ,
  9450. e.prototype.isZeroArea = function() {
  9451. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0
  9452. }
  9453. ,
  9454. e
  9455. }(ks);
  9456. Fu.prototype.type = "sector";
  9457. var Gu = function() {
  9458. this.cx = 0,
  9459. this.cy = 0,
  9460. this.r = 0,
  9461. this.r0 = 0
  9462. }
  9463. , Wu = function(t) {
  9464. function e(e) {
  9465. return t.call(this, e) || this
  9466. }
  9467. return n(e, t),
  9468. e.prototype.getDefaultShape = function() {
  9469. return new Gu
  9470. }
  9471. ,
  9472. e.prototype.buildPath = function(t, e) {
  9473. var n = e.cx
  9474. , i = e.cy
  9475. , r = 2 * Math.PI;
  9476. t.moveTo(n + e.r, i),
  9477. t.arc(n, i, e.r, 0, r, !1),
  9478. t.moveTo(n + e.r0, i),
  9479. t.arc(n, i, e.r0, 0, r, !0)
  9480. }
  9481. ,
  9482. e
  9483. }(ks);
  9484. function Hu(t, e, n) {
  9485. var i = e.smooth
  9486. , r = e.points;
  9487. if (r && r.length >= 2) {
  9488. if (i) {
  9489. var o = function(t, e, n, i) {
  9490. var r, o, a, s, l = [], u = [], h = [], c = [];
  9491. if (i) {
  9492. a = [1 / 0, 1 / 0],
  9493. s = [-1 / 0, -1 / 0];
  9494. for (var p = 0, d = t.length; p < d; p++)
  9495. Ht(a, a, t[p]),
  9496. Yt(s, s, t[p]);
  9497. Ht(a, a, i[0]),
  9498. Yt(s, s, i[1])
  9499. }
  9500. for (p = 0,
  9501. d = t.length; p < d; p++) {
  9502. var f = t[p];
  9503. if (n)
  9504. r = t[p ? p - 1 : d - 1],
  9505. o = t[(p + 1) % d];
  9506. else {
  9507. if (0 === p || p === d - 1) {
  9508. l.push(Tt(t[p]));
  9509. continue
  9510. }
  9511. r = t[p - 1],
  9512. o = t[p + 1]
  9513. }
  9514. kt(u, o, r),
  9515. Nt(u, u, e);
  9516. var g = zt(f, r)
  9517. , y = zt(f, o)
  9518. , v = g + y;
  9519. 0 !== v && (g /= v,
  9520. y /= v),
  9521. Nt(h, u, -g),
  9522. Nt(c, u, y);
  9523. var m = Dt([], f, h)
  9524. , x = Dt([], f, c);
  9525. i && (Yt(m, m, a),
  9526. Ht(m, m, s),
  9527. Yt(x, x, a),
  9528. Ht(x, x, s)),
  9529. l.push(m),
  9530. l.push(x)
  9531. }
  9532. return n && l.push(l.shift()),
  9533. l
  9534. }(r, i, n, e.smoothConstraint);
  9535. t.moveTo(r[0][0], r[0][1]);
  9536. for (var a = r.length, s = 0; s < (n ? a : a - 1); s++) {
  9537. var l = o[2 * s]
  9538. , u = o[2 * s + 1]
  9539. , h = r[(s + 1) % a];
  9540. t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1])
  9541. }
  9542. } else {
  9543. t.moveTo(r[0][0], r[0][1]);
  9544. s = 1;
  9545. for (var c = r.length; s < c; s++)
  9546. t.lineTo(r[s][0], r[s][1])
  9547. }
  9548. n && t.closePath()
  9549. }
  9550. }
  9551. Wu.prototype.type = "ring";
  9552. var Yu = function() {
  9553. this.points = null,
  9554. this.smooth = 0,
  9555. this.smoothConstraint = null
  9556. }
  9557. , Xu = function(t) {
  9558. function e(e) {
  9559. return t.call(this, e) || this
  9560. }
  9561. return n(e, t),
  9562. e.prototype.getDefaultShape = function() {
  9563. return new Yu
  9564. }
  9565. ,
  9566. e.prototype.buildPath = function(t, e) {
  9567. Hu(t, e, !0)
  9568. }
  9569. ,
  9570. e
  9571. }(ks);
  9572. Xu.prototype.type = "polygon";
  9573. var Uu = function() {
  9574. this.points = null,
  9575. this.percent = 1,
  9576. this.smooth = 0,
  9577. this.smoothConstraint = null
  9578. }
  9579. , Zu = function(t) {
  9580. function e(e) {
  9581. return t.call(this, e) || this
  9582. }
  9583. return n(e, t),
  9584. e.prototype.getDefaultStyle = function() {
  9585. return {
  9586. stroke: "#000",
  9587. fill: null
  9588. }
  9589. }
  9590. ,
  9591. e.prototype.getDefaultShape = function() {
  9592. return new Uu
  9593. }
  9594. ,
  9595. e.prototype.buildPath = function(t, e) {
  9596. Hu(t, e, !1)
  9597. }
  9598. ,
  9599. e
  9600. }(ks);
  9601. Zu.prototype.type = "polyline";
  9602. var ju = {}
  9603. , qu = function() {
  9604. this.x1 = 0,
  9605. this.y1 = 0,
  9606. this.x2 = 0,
  9607. this.y2 = 0,
  9608. this.percent = 1
  9609. }
  9610. , Ku = function(t) {
  9611. function e(e) {
  9612. return t.call(this, e) || this
  9613. }
  9614. return n(e, t),
  9615. e.prototype.getDefaultStyle = function() {
  9616. return {
  9617. stroke: "#000",
  9618. fill: null
  9619. }
  9620. }
  9621. ,
  9622. e.prototype.getDefaultShape = function() {
  9623. return new qu
  9624. }
  9625. ,
  9626. e.prototype.buildPath = function(t, e) {
  9627. var n, i, r, o;
  9628. if (this.subPixelOptimize) {
  9629. var a = zs(ju, e, this.style);
  9630. n = a.x1,
  9631. i = a.y1,
  9632. r = a.x2,
  9633. o = a.y2
  9634. } else
  9635. n = e.x1,
  9636. i = e.y1,
  9637. r = e.x2,
  9638. o = e.y2;
  9639. var s = e.percent;
  9640. 0 !== s && (t.moveTo(n, i),
  9641. s < 1 && (r = n * (1 - s) + r * s,
  9642. o = i * (1 - s) + o * s),
  9643. t.lineTo(r, o))
  9644. }
  9645. ,
  9646. e.prototype.pointAt = function(t) {
  9647. var e = this.shape;
  9648. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
  9649. }
  9650. ,
  9651. e
  9652. }(ks);
  9653. Ku.prototype.type = "line";
  9654. var $u = []
  9655. , Ju = function() {
  9656. this.x1 = 0,
  9657. this.y1 = 0,
  9658. this.x2 = 0,
  9659. this.y2 = 0,
  9660. this.cpx1 = 0,
  9661. this.cpy1 = 0,
  9662. this.percent = 1
  9663. };
  9664. function Qu(t, e, n) {
  9665. var i = t.cpx2
  9666. , r = t.cpy2;
  9667. 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)]
  9668. }
  9669. var th = function(t) {
  9670. function e(e) {
  9671. return t.call(this, e) || this
  9672. }
  9673. return n(e, t),
  9674. e.prototype.getDefaultStyle = function() {
  9675. return {
  9676. stroke: "#000",
  9677. fill: null
  9678. }
  9679. }
  9680. ,
  9681. e.prototype.getDefaultShape = function() {
  9682. return new Ju
  9683. }
  9684. ,
  9685. e.prototype.buildPath = function(t, e) {
  9686. var n = e.x1
  9687. , i = e.y1
  9688. , r = e.x2
  9689. , o = e.y2
  9690. , a = e.cpx1
  9691. , s = e.cpy1
  9692. , l = e.cpx2
  9693. , u = e.cpy2
  9694. , h = e.percent;
  9695. 0 !== h && (t.moveTo(n, i),
  9696. null == l || null == u ? (h < 1 && (Dn(n, a, r, h, $u),
  9697. a = $u[1],
  9698. r = $u[2],
  9699. Dn(i, s, o, h, $u),
  9700. s = $u[1],
  9701. o = $u[2]),
  9702. t.quadraticCurveTo(a, s, r, o)) : (h < 1 && (wn(n, a, l, r, h, $u),
  9703. a = $u[1],
  9704. l = $u[2],
  9705. r = $u[3],
  9706. wn(i, s, u, o, h, $u),
  9707. s = $u[1],
  9708. u = $u[2],
  9709. o = $u[3]),
  9710. t.bezierCurveTo(a, s, l, u, r, o)))
  9711. }
  9712. ,
  9713. e.prototype.pointAt = function(t) {
  9714. return Qu(this.shape, t, !1)
  9715. }
  9716. ,
  9717. e.prototype.tangentAt = function(t) {
  9718. var e = Qu(this.shape, t, !0);
  9719. return Et(e, e)
  9720. }
  9721. ,
  9722. e
  9723. }(ks);
  9724. th.prototype.type = "bezier-curve";
  9725. var eh = function() {
  9726. this.cx = 0,
  9727. this.cy = 0,
  9728. this.r = 0,
  9729. this.startAngle = 0,
  9730. this.endAngle = 2 * Math.PI,
  9731. this.clockwise = !0
  9732. }
  9733. , nh = function(t) {
  9734. function e(e) {
  9735. return t.call(this, e) || this
  9736. }
  9737. return n(e, t),
  9738. e.prototype.getDefaultStyle = function() {
  9739. return {
  9740. stroke: "#000",
  9741. fill: null
  9742. }
  9743. }
  9744. ,
  9745. e.prototype.getDefaultShape = function() {
  9746. return new eh
  9747. }
  9748. ,
  9749. e.prototype.buildPath = function(t, e) {
  9750. var n = e.cx
  9751. , i = e.cy
  9752. , r = Math.max(e.r, 0)
  9753. , o = e.startAngle
  9754. , a = e.endAngle
  9755. , s = e.clockwise
  9756. , l = Math.cos(o)
  9757. , u = Math.sin(o);
  9758. t.moveTo(l * r + n, u * r + i),
  9759. t.arc(n, i, r, o, a, !s)
  9760. }
  9761. ,
  9762. e
  9763. }(ks);
  9764. nh.prototype.type = "arc";
  9765. var ih = function(t) {
  9766. function e() {
  9767. var e = null !== t && t.apply(this, arguments) || this;
  9768. return e.type = "compound",
  9769. e
  9770. }
  9771. return n(e, t),
  9772. e.prototype._updatePathDirty = function() {
  9773. for (var t = this.shape.paths, e = this.shapeChanged(), n = 0; n < t.length; n++)
  9774. e = e || t[n].shapeChanged();
  9775. e && this.dirtyShape()
  9776. }
  9777. ,
  9778. e.prototype.beforeBrush = function() {
  9779. this._updatePathDirty();
  9780. for (var t = this.shape.paths || [], e = this.getGlobalScale(), n = 0; n < t.length; n++)
  9781. t[n].path || t[n].createPathProxy(),
  9782. t[n].path.setScale(e[0], e[1], t[n].segmentIgnoreThreshold)
  9783. }
  9784. ,
  9785. e.prototype.buildPath = function(t, e) {
  9786. for (var n = e.paths || [], i = 0; i < n.length; i++)
  9787. n[i].buildPath(t, n[i].shape, !0)
  9788. }
  9789. ,
  9790. e.prototype.afterBrush = function() {
  9791. for (var t = this.shape.paths || [], e = 0; e < t.length; e++)
  9792. t[e].pathUpdated()
  9793. }
  9794. ,
  9795. e.prototype.getBoundingRect = function() {
  9796. return this._updatePathDirty.call(this),
  9797. ks.prototype.getBoundingRect.call(this)
  9798. }
  9799. ,
  9800. e
  9801. }(ks)
  9802. , rh = function() {
  9803. function t(t) {
  9804. this.colorStops = t || []
  9805. }
  9806. return t.prototype.addColorStop = function(t, e) {
  9807. this.colorStops.push({
  9808. offset: t,
  9809. color: e
  9810. })
  9811. }
  9812. ,
  9813. t
  9814. }()
  9815. , oh = function(t) {
  9816. function e(e, n, i, r, o, a) {
  9817. var s = t.call(this, o) || this;
  9818. return s.x = null == e ? 0 : e,
  9819. s.y = null == n ? 0 : n,
  9820. s.x2 = null == i ? 1 : i,
  9821. s.y2 = null == r ? 0 : r,
  9822. s.type = "linear",
  9823. s.global = a || !1,
  9824. s
  9825. }
  9826. return n(e, t),
  9827. e
  9828. }(rh)
  9829. , ah = function(t) {
  9830. function e(e, n, i, r, o) {
  9831. var a = t.call(this, r) || this;
  9832. return a.x = null == e ? .5 : e,
  9833. a.y = null == n ? .5 : n,
  9834. a.r = null == i ? .5 : i,
  9835. a.type = "radial",
  9836. a.global = o || !1,
  9837. a
  9838. }
  9839. return n(e, t),
  9840. e
  9841. }(rh)
  9842. , sh = [0, 0]
  9843. , lh = [0, 0]
  9844. , uh = new De
  9845. , hh = new De
  9846. , ch = function() {
  9847. function t(t, e) {
  9848. this._corners = [],
  9849. this._axes = [],
  9850. this._origin = [0, 0];
  9851. for (var n = 0; n < 4; n++)
  9852. this._corners[n] = new De;
  9853. for (n = 0; n < 2; n++)
  9854. this._axes[n] = new De;
  9855. t && this.fromBoundingRect(t, e)
  9856. }
  9857. return t.prototype.fromBoundingRect = function(t, e) {
  9858. var n = this._corners
  9859. , i = this._axes
  9860. , r = t.x
  9861. , o = t.y
  9862. , a = r + t.width
  9863. , s = o + t.height;
  9864. if (n[0].set(r, o),
  9865. n[1].set(a, o),
  9866. n[2].set(a, s),
  9867. n[3].set(r, s),
  9868. e)
  9869. for (var l = 0; l < 4; l++)
  9870. n[l].transform(e);
  9871. De.sub(i[0], n[1], n[0]),
  9872. De.sub(i[1], n[3], n[0]),
  9873. i[0].normalize(),
  9874. i[1].normalize();
  9875. for (l = 0; l < 2; l++)
  9876. this._origin[l] = i[l].dot(n[0])
  9877. }
  9878. ,
  9879. t.prototype.intersect = function(t, e) {
  9880. var n = !0
  9881. , i = !e;
  9882. return uh.set(1 / 0, 1 / 0),
  9883. hh.set(0, 0),
  9884. !this._intersectCheckOneSide(this, t, uh, hh, i, 1) && (n = !1,
  9885. i) || !this._intersectCheckOneSide(t, this, uh, hh, i, -1) && (n = !1,
  9886. i) || i || De.copy(e, n ? uh : hh),
  9887. n
  9888. }
  9889. ,
  9890. t.prototype._intersectCheckOneSide = function(t, e, n, i, r, o) {
  9891. for (var a = !0, s = 0; s < 2; s++) {
  9892. var l = this._axes[s];
  9893. if (this._getProjMinMaxOnAxis(s, t._corners, sh),
  9894. this._getProjMinMaxOnAxis(s, e._corners, lh),
  9895. sh[1] < lh[0] || sh[0] > lh[1]) {
  9896. if (a = !1,
  9897. r)
  9898. return a;
  9899. var u = Math.abs(lh[0] - sh[1])
  9900. , h = Math.abs(sh[0] - lh[1]);
  9901. Math.min(u, h) > i.len() && (u < h ? De.scale(i, l, -u * o) : De.scale(i, l, h * o))
  9902. } else if (n) {
  9903. u = Math.abs(lh[0] - sh[1]),
  9904. h = Math.abs(sh[0] - lh[1]);
  9905. Math.min(u, h) < n.len() && (u < h ? De.scale(n, l, u * o) : De.scale(n, l, -h * o))
  9906. }
  9907. }
  9908. return a
  9909. }
  9910. ,
  9911. t.prototype._getProjMinMaxOnAxis = function(t, e, n) {
  9912. 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++) {
  9913. var u = e[l].dot(i) + r[t];
  9914. a = Math.min(u, a),
  9915. s = Math.max(u, s)
  9916. }
  9917. n[0] = a,
  9918. n[1] = s
  9919. }
  9920. ,
  9921. t
  9922. }()
  9923. , ph = []
  9924. , dh = function(t) {
  9925. function e() {
  9926. var e = null !== t && t.apply(this, arguments) || this;
  9927. return e.notClear = !0,
  9928. e.incremental = !0,
  9929. e._displayables = [],
  9930. e._temporaryDisplayables = [],
  9931. e._cursor = 0,
  9932. e
  9933. }
  9934. return n(e, t),
  9935. e.prototype.traverse = function(t, e) {
  9936. t.call(e, this)
  9937. }
  9938. ,
  9939. e.prototype.useStyle = function() {
  9940. this.style = {}
  9941. }
  9942. ,
  9943. e.prototype.getCursor = function() {
  9944. return this._cursor
  9945. }
  9946. ,
  9947. e.prototype.innerAfterBrush = function() {
  9948. this._cursor = this._displayables.length
  9949. }
  9950. ,
  9951. e.prototype.clearDisplaybles = function() {
  9952. this._displayables = [],
  9953. this._temporaryDisplayables = [],
  9954. this._cursor = 0,
  9955. this.markRedraw(),
  9956. this.notClear = !1
  9957. }
  9958. ,
  9959. e.prototype.clearTemporalDisplayables = function() {
  9960. this._temporaryDisplayables = []
  9961. }
  9962. ,
  9963. e.prototype.addDisplayable = function(t, e) {
  9964. e ? this._temporaryDisplayables.push(t) : this._displayables.push(t),
  9965. this.markRedraw()
  9966. }
  9967. ,
  9968. e.prototype.addDisplayables = function(t, e) {
  9969. e = e || !1;
  9970. for (var n = 0; n < t.length; n++)
  9971. this.addDisplayable(t[n], e)
  9972. }
  9973. ,
  9974. e.prototype.getDisplayables = function() {
  9975. return this._displayables
  9976. }
  9977. ,
  9978. e.prototype.getTemporalDisplayables = function() {
  9979. return this._temporaryDisplayables
  9980. }
  9981. ,
  9982. e.prototype.eachPendingDisplayable = function(t) {
  9983. for (var e = this._cursor; e < this._displayables.length; e++)
  9984. t && t(this._displayables[e]);
  9985. for (e = 0; e < this._temporaryDisplayables.length; e++)
  9986. t && t(this._temporaryDisplayables[e])
  9987. }
  9988. ,
  9989. e.prototype.update = function() {
  9990. this.updateTransform();
  9991. for (var t = this._cursor; t < this._displayables.length; t++) {
  9992. (e = this._displayables[t]).parent = this,
  9993. e.update(),
  9994. e.parent = null
  9995. }
  9996. for (t = 0; t < this._temporaryDisplayables.length; t++) {
  9997. var e;
  9998. (e = this._temporaryDisplayables[t]).parent = this,
  9999. e.update(),
  10000. e.parent = null
  10001. }
  10002. }
  10003. ,
  10004. e.prototype.getBoundingRect = function() {
  10005. if (!this._rect) {
  10006. for (var t = new ze(1 / 0,1 / 0,-1 / 0,-1 / 0), e = 0; e < this._displayables.length; e++) {
  10007. var n = this._displayables[e]
  10008. , i = n.getBoundingRect().clone();
  10009. n.needLocalTransform() && i.applyTransform(n.getLocalTransform(ph)),
  10010. t.union(i)
  10011. }
  10012. this._rect = t
  10013. }
  10014. return this._rect
  10015. }
  10016. ,
  10017. e.prototype.contain = function(t, e) {
  10018. var n = this.transformCoordToLocal(t, e);
  10019. if (this.getBoundingRect().contain(n[0], n[1]))
  10020. for (var i = 0; i < this._displayables.length; i++) {
  10021. if (this._displayables[i].contain(t, e))
  10022. return !0
  10023. }
  10024. return !1
  10025. }
  10026. ,
  10027. e
  10028. }(Da)
  10029. , fh = Vo();
  10030. function gh(t, e, n, i, r) {
  10031. var o;
  10032. if (e && e.ecModel) {
  10033. var a = e.ecModel.getUpdatePayload();
  10034. o = a && a.animation
  10035. }
  10036. var s = "update" === t;
  10037. if (e && e.isAnimationEnabled()) {
  10038. var l = void 0
  10039. , u = void 0
  10040. , h = void 0;
  10041. return i ? (l = rt(i.duration, 200),
  10042. u = rt(i.easing, "cubicOut"),
  10043. h = 0) : (l = e.getShallow(s ? "animationDurationUpdate" : "animationDuration"),
  10044. u = e.getShallow(s ? "animationEasingUpdate" : "animationEasing"),
  10045. h = e.getShallow(s ? "animationDelayUpdate" : "animationDelay")),
  10046. o && (null != o.duration && (l = o.duration),
  10047. null != o.easing && (u = o.easing),
  10048. null != o.delay && (h = o.delay)),
  10049. X(h) && (h = h(n, r)),
  10050. X(l) && (l = l(n)),
  10051. {
  10052. duration: l || 0,
  10053. delay: h,
  10054. easing: u
  10055. }
  10056. }
  10057. return null
  10058. }
  10059. function yh(t, e, n, i, r, o, a) {
  10060. var s, l = !1;
  10061. X(r) ? (a = o,
  10062. o = r,
  10063. r = null) : q(r) && (o = r.cb,
  10064. a = r.during,
  10065. l = r.isFrom,
  10066. s = r.removeOpt,
  10067. r = r.dataIndex);
  10068. var u = "leave" === t;
  10069. u || e.stopAnimation("leave");
  10070. var h = gh(t, i, r, u ? s || {} : null, i && i.getAnimationDelayParams ? i.getAnimationDelayParams(e, r) : null);
  10071. if (h && h.duration > 0) {
  10072. var c = {
  10073. duration: h.duration,
  10074. delay: h.delay || 0,
  10075. easing: h.easing,
  10076. done: o,
  10077. force: !!o || !!a,
  10078. setToFinal: !u,
  10079. scope: t,
  10080. during: a
  10081. };
  10082. l ? e.animateFrom(n, c) : e.animateTo(n, c)
  10083. } else
  10084. e.stopAnimation(),
  10085. !l && e.attr(n),
  10086. a && a(1),
  10087. o && o()
  10088. }
  10089. function vh(t, e, n, i, r, o) {
  10090. yh("update", t, e, n, i, r, o)
  10091. }
  10092. function mh(t, e, n, i, r, o) {
  10093. yh("enter", t, e, n, i, r, o)
  10094. }
  10095. function xh(t) {
  10096. if (!t.__zr)
  10097. return !0;
  10098. for (var e = 0; e < t.animators.length; e++) {
  10099. if ("leave" === t.animators[e].scope)
  10100. return !0
  10101. }
  10102. return !1
  10103. }
  10104. function _h(t, e, n, i, r, o) {
  10105. xh(t) || yh("leave", t, e, n, i, r, o)
  10106. }
  10107. function bh(t, e, n, i) {
  10108. t.removeTextContent(),
  10109. t.removeTextGuideLine(),
  10110. _h(t, {
  10111. style: {
  10112. opacity: 0
  10113. }
  10114. }, e, n, i)
  10115. }
  10116. function wh(t, e, n) {
  10117. function i() {
  10118. t.parent && t.parent.remove(t)
  10119. }
  10120. t.isGroup ? t.traverse((function(t) {
  10121. t.isGroup || bh(t, e, n, i)
  10122. }
  10123. )) : bh(t, e, n, i)
  10124. }
  10125. function Sh(t) {
  10126. fh(t).oldStyle = t.style
  10127. }
  10128. var Mh = Math.max
  10129. , Ih = Math.min
  10130. , Th = {};
  10131. function Ch(t) {
  10132. return ks.extend(t)
  10133. }
  10134. var Dh = function(t, e) {
  10135. var i = xu(t, e);
  10136. return function(t) {
  10137. function e(e) {
  10138. var n = t.call(this, e) || this;
  10139. return n.applyTransform = i.applyTransform,
  10140. n.buildPath = i.buildPath,
  10141. n
  10142. }
  10143. return n(e, t),
  10144. e
  10145. }(vu)
  10146. };
  10147. function Ah(t, e) {
  10148. return Dh(t, e)
  10149. }
  10150. function kh(t, e) {
  10151. Th[t] = e
  10152. }
  10153. function Lh(t) {
  10154. if (Th.hasOwnProperty(t))
  10155. return Th[t]
  10156. }
  10157. function Ph(t, e, n, i) {
  10158. var r = _u(t, e);
  10159. return n && ("center" === i && (n = Rh(n, r.getBoundingRect())),
  10160. Eh(r, n)),
  10161. r
  10162. }
  10163. function Oh(t, e, n) {
  10164. var i = new Ns({
  10165. style: {
  10166. image: t,
  10167. x: e.x,
  10168. y: e.y,
  10169. width: e.width,
  10170. height: e.height
  10171. },
  10172. onload: function(t) {
  10173. if ("center" === n) {
  10174. var r = {
  10175. width: t.width,
  10176. height: t.height
  10177. };
  10178. i.setStyle(Rh(e, r))
  10179. }
  10180. }
  10181. });
  10182. return i
  10183. }
  10184. function Rh(t, e) {
  10185. var n, i = e.width / e.height, r = t.height * i;
  10186. return n = r <= t.width ? t.height : (r = t.width) / i,
  10187. {
  10188. x: t.x + t.width / 2 - r / 2,
  10189. y: t.y + t.height / 2 - n / 2,
  10190. width: r,
  10191. height: n
  10192. }
  10193. }
  10194. var Nh = function(t, e) {
  10195. for (var n = [], i = t.length, r = 0; r < i; r++) {
  10196. var o = t[r];
  10197. n.push(o.getUpdatedPathProxy(!0))
  10198. }
  10199. var a = new ks(e);
  10200. return a.createPathProxy(),
  10201. a.buildPath = function(t) {
  10202. if (mu(t)) {
  10203. t.appendPath(n);
  10204. var e = t.getContext();
  10205. e && t.rebuildPath(e, 1)
  10206. }
  10207. }
  10208. ,
  10209. a
  10210. };
  10211. function Eh(t, e) {
  10212. if (t.applyTransform) {
  10213. var n = t.getBoundingRect().calculateTransform(e);
  10214. t.applyTransform(n)
  10215. }
  10216. }
  10217. function zh(t, e) {
  10218. return zs(t, t, {
  10219. lineWidth: e
  10220. }),
  10221. t
  10222. }
  10223. var Vh = Bs;
  10224. function Bh(t, e) {
  10225. for (var n = xe([]); t && t !== e; )
  10226. be(n, t.getLocalTransform(), n),
  10227. t = t.parent;
  10228. return n
  10229. }
  10230. function Fh(t, e, n) {
  10231. return e && !N(e) && (e = vr.getLocalTransform(e)),
  10232. n && (e = Ie([], e)),
  10233. Wt([], t, e)
  10234. }
  10235. function Gh(t, e, n) {
  10236. var i = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0])
  10237. , r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2])
  10238. , o = ["left" === t ? -i : "right" === t ? i : 0, "top" === t ? -r : "bottom" === t ? r : 0];
  10239. return o = Fh(o, e, n),
  10240. Math.abs(o[0]) > Math.abs(o[1]) ? o[0] > 0 ? "right" : "left" : o[1] > 0 ? "bottom" : "top"
  10241. }
  10242. function Wh(t) {
  10243. return !t.isGroup
  10244. }
  10245. function Hh(t, e, n) {
  10246. if (t && e) {
  10247. var i, r = (i = {},
  10248. t.traverse((function(t) {
  10249. Wh(t) && t.anid && (i[t.anid] = t)
  10250. }
  10251. )),
  10252. i);
  10253. e.traverse((function(t) {
  10254. if (Wh(t) && t.anid) {
  10255. var e = r[t.anid];
  10256. if (e) {
  10257. var i = o(t);
  10258. t.attr(o(e)),
  10259. vh(t, i, n, rl(t).dataIndex)
  10260. }
  10261. }
  10262. }
  10263. ))
  10264. }
  10265. function o(t) {
  10266. var e = {
  10267. x: t.x,
  10268. y: t.y,
  10269. rotation: t.rotation
  10270. };
  10271. return function(t) {
  10272. return null != t.shape
  10273. }(t) && (e.shape = A({}, t.shape)),
  10274. e
  10275. }
  10276. }
  10277. function Yh(t, e) {
  10278. return z(t, (function(t) {
  10279. var n = t[0];
  10280. n = Mh(n, e.x),
  10281. n = Ih(n, e.x + e.width);
  10282. var i = t[1];
  10283. return i = Mh(i, e.y),
  10284. [n, i = Ih(i, e.y + e.height)]
  10285. }
  10286. ))
  10287. }
  10288. function Xh(t, e) {
  10289. var n = Mh(t.x, e.x)
  10290. , i = Ih(t.x + t.width, e.x + e.width)
  10291. , r = Mh(t.y, e.y)
  10292. , o = Ih(t.y + t.height, e.y + e.height);
  10293. if (i >= n && o >= r)
  10294. return {
  10295. x: n,
  10296. y: r,
  10297. width: i - n,
  10298. height: o - r
  10299. }
  10300. }
  10301. function Uh(t, e, n) {
  10302. var i = A({
  10303. rectHover: !0
  10304. }, e)
  10305. , r = i.style = {
  10306. strokeNoScale: !0
  10307. };
  10308. if (n = n || {
  10309. x: -1,
  10310. y: -1,
  10311. width: 2,
  10312. height: 2
  10313. },
  10314. t)
  10315. return 0 === t.indexOf("image://") ? (r.image = t.slice(8),
  10316. k(r, n),
  10317. new Ns(i)) : Ph(t.replace("path://", ""), i, n, "center")
  10318. }
  10319. function Zh(t, e, n, i, r) {
  10320. for (var o = 0, a = r[r.length - 1]; o < r.length; o++) {
  10321. var s = r[o];
  10322. if (jh(t, e, n, i, s[0], s[1], a[0], a[1]))
  10323. return !0;
  10324. a = s
  10325. }
  10326. }
  10327. function jh(t, e, n, i, r, o, a, s) {
  10328. var l, u = n - t, h = i - e, c = a - r, p = s - o, d = qh(c, p, u, h);
  10329. if ((l = d) <= 1e-6 && l >= -1e-6)
  10330. return !1;
  10331. var f = t - r
  10332. , g = e - o
  10333. , y = qh(f, g, u, h) / d;
  10334. if (y < 0 || y > 1)
  10335. return !1;
  10336. var v = qh(f, g, c, p) / d;
  10337. return !(v < 0 || v > 1)
  10338. }
  10339. function qh(t, e, n, i) {
  10340. return t * i - n * e
  10341. }
  10342. function Kh(t) {
  10343. var e = t.itemTooltipOption
  10344. , n = t.componentModel
  10345. , i = t.itemName
  10346. , r = U(e) ? {
  10347. formatter: e
  10348. } : e
  10349. , o = n.mainType
  10350. , a = n.componentIndex
  10351. , s = {
  10352. componentType: o,
  10353. name: i,
  10354. $vars: ["name"]
  10355. };
  10356. s[o + "Index"] = a;
  10357. var l = t.formatterParamsExtra;
  10358. l && E(G(l), (function(t) {
  10359. _t(s, t) || (s[t] = l[t],
  10360. s.$vars.push(t))
  10361. }
  10362. ));
  10363. var u = rl(t.el);
  10364. u.componentMainType = o,
  10365. u.componentIndex = a,
  10366. u.tooltipConfig = {
  10367. name: i,
  10368. option: k({
  10369. content: i,
  10370. encodeHTMLContent: !0,
  10371. formatterParams: s
  10372. }, r)
  10373. }
  10374. }
  10375. function $h(t, e) {
  10376. var n;
  10377. t.isGroup && (n = e(t)),
  10378. n || t.traverse(e)
  10379. }
  10380. function Jh(t, e) {
  10381. if (t)
  10382. if (Y(t))
  10383. for (var n = 0; n < t.length; n++)
  10384. $h(t[n], e);
  10385. else
  10386. $h(t, e)
  10387. }
  10388. kh("circle", Su),
  10389. kh("ellipse", Iu),
  10390. kh("sector", Fu),
  10391. kh("ring", Wu),
  10392. kh("polygon", Xu),
  10393. kh("polyline", Zu),
  10394. kh("rect", Ws),
  10395. kh("line", Ku),
  10396. kh("bezierCurve", th),
  10397. kh("arc", nh);
  10398. var Qh = Object.freeze({
  10399. __proto__: null,
  10400. updateProps: vh,
  10401. initProps: mh,
  10402. removeElement: _h,
  10403. removeElementWithFadeOut: wh,
  10404. isElementRemoved: xh,
  10405. extendShape: Ch,
  10406. extendPath: Ah,
  10407. registerShape: kh,
  10408. getShapeClass: Lh,
  10409. makePath: Ph,
  10410. makeImage: Oh,
  10411. mergePath: Nh,
  10412. resizePath: Eh,
  10413. subPixelOptimizeLine: zh,
  10414. subPixelOptimizeRect: function(t) {
  10415. return Vs(t.shape, t.shape, t.style),
  10416. t
  10417. },
  10418. subPixelOptimize: Vh,
  10419. getTransform: Bh,
  10420. applyTransform: Fh,
  10421. transformDirection: Gh,
  10422. groupTransition: Hh,
  10423. clipPointsByRect: Yh,
  10424. clipRectByRect: Xh,
  10425. createIcon: Uh,
  10426. linePolygonIntersect: Zh,
  10427. lineLineIntersect: jh,
  10428. setTooltipConfig: Kh,
  10429. traverseElements: Jh,
  10430. Group: Br,
  10431. Image: Ns,
  10432. Text: Xs,
  10433. Circle: Su,
  10434. Ellipse: Iu,
  10435. Sector: Fu,
  10436. Ring: Wu,
  10437. Polygon: Xu,
  10438. Polyline: Zu,
  10439. Rect: Ws,
  10440. Line: Ku,
  10441. BezierCurve: th,
  10442. Arc: nh,
  10443. IncrementalDisplayable: dh,
  10444. CompoundPath: ih,
  10445. LinearGradient: oh,
  10446. RadialGradient: ah,
  10447. BoundingRect: ze,
  10448. OrientedBoundingRect: ch,
  10449. Point: De,
  10450. Path: ks
  10451. })
  10452. , tc = {};
  10453. function ec(t, e) {
  10454. for (var n = 0; n < hl.length; n++) {
  10455. var i = hl[n]
  10456. , r = e[i]
  10457. , o = t.ensureState(i);
  10458. o.style = o.style || {},
  10459. o.style.text = r
  10460. }
  10461. var a = t.currentStates.slice();
  10462. t.clearStates(!0),
  10463. t.setStyle({
  10464. text: e.normal
  10465. }),
  10466. t.useStates(a, !0)
  10467. }
  10468. function nc(t, e, n) {
  10469. var i, r = t.labelFetcher, o = t.labelDataIndex, a = t.labelDimIndex, s = e.normal;
  10470. r && (i = r.getFormattedLabel(o, "normal", null, a, s && s.get("formatter"), null != n ? {
  10471. interpolatedValue: n
  10472. } : null)),
  10473. null == i && (i = X(t.defaultText) ? t.defaultText(o, t, n) : t.defaultText);
  10474. for (var l = {
  10475. normal: i
  10476. }, u = 0; u < hl.length; u++) {
  10477. var h = hl[u]
  10478. , c = e[h];
  10479. l[h] = rt(r ? r.getFormattedLabel(o, h, null, a, c && c.get("formatter")) : null, i)
  10480. }
  10481. return l
  10482. }
  10483. function ic(t, e, n, i) {
  10484. n = n || tc;
  10485. for (var r = t instanceof Xs, o = !1, a = 0; a < cl.length; a++) {
  10486. if ((p = e[cl[a]]) && p.getShallow("show")) {
  10487. o = !0;
  10488. break
  10489. }
  10490. }
  10491. var s = r ? t : t.getTextContent();
  10492. if (o) {
  10493. r || (s || (s = new Xs,
  10494. t.setTextContent(s)),
  10495. t.stateProxy && (s.stateProxy = t.stateProxy));
  10496. var l = nc(n, e)
  10497. , u = e.normal
  10498. , h = !!u.getShallow("show")
  10499. , c = oc(u, i && i.normal, n, !1, !r);
  10500. c.text = l.normal,
  10501. r || t.setTextConfig(ac(u, n, !1));
  10502. for (a = 0; a < hl.length; a++) {
  10503. var p, d = hl[a];
  10504. if (p = e[d]) {
  10505. var f = s.ensureState(d)
  10506. , g = !!rt(p.getShallow("show"), h);
  10507. if (g !== h && (f.ignore = !g),
  10508. f.style = oc(p, i && i[d], n, !0, !r),
  10509. f.style.text = l[d],
  10510. !r)
  10511. t.ensureState(d).textConfig = ac(p, n, !0)
  10512. }
  10513. }
  10514. s.silent = !!u.getShallow("silent"),
  10515. null != s.style.x && (c.x = s.style.x),
  10516. null != s.style.y && (c.y = s.style.y),
  10517. s.ignore = !h,
  10518. s.useStyle(c),
  10519. s.dirty(),
  10520. n.enableTextSetter && (pc(s).setLabelText = function(t) {
  10521. var i = nc(n, e, t);
  10522. ec(s, i)
  10523. }
  10524. )
  10525. } else
  10526. s && (s.ignore = !0);
  10527. t.dirty()
  10528. }
  10529. function rc(t, e) {
  10530. e = e || "label";
  10531. for (var n = {
  10532. normal: t.getModel(e)
  10533. }, i = 0; i < hl.length; i++) {
  10534. var r = hl[i];
  10535. n[r] = t.getModel([r, e])
  10536. }
  10537. return n
  10538. }
  10539. function oc(t, e, n, i, r) {
  10540. var o = {};
  10541. return function(t, e, n, i, r) {
  10542. n = n || tc;
  10543. var o, a = e.ecModel, s = a && a.option.textStyle, l = function(t) {
  10544. var e;
  10545. for (; t && t !== t.ecModel; ) {
  10546. var n = (t.option || tc).rich;
  10547. if (n) {
  10548. e = e || {};
  10549. for (var i = G(n), r = 0; r < i.length; r++) {
  10550. e[i[r]] = 1
  10551. }
  10552. }
  10553. t = t.parentModel
  10554. }
  10555. return e
  10556. }(e);
  10557. if (l)
  10558. for (var u in o = {},
  10559. l)
  10560. if (l.hasOwnProperty(u)) {
  10561. var h = e.getModel(["rich", u]);
  10562. hc(o[u] = {}, h, s, n, i, r, !1, !0)
  10563. }
  10564. o && (t.rich = o);
  10565. var c = e.get("overflow");
  10566. c && (t.overflow = c);
  10567. var p = e.get("minMargin");
  10568. null != p && (t.margin = p);
  10569. hc(t, e, s, n, i, r, !0, !1)
  10570. }(o, t, n, i, r),
  10571. e && A(o, e),
  10572. o
  10573. }
  10574. function ac(t, e, n) {
  10575. e = e || {};
  10576. var i, r = {}, o = t.getShallow("rotate"), a = rt(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  10577. return "outside" === (i = t.getShallow("position") || (n ? null : "inside")) && (i = e.defaultOutsidePosition || "top"),
  10578. null != i && (r.position = i),
  10579. null != s && (r.offset = s),
  10580. null != o && (o *= Math.PI / 180,
  10581. r.rotation = o),
  10582. null != a && (r.distance = a),
  10583. r.outsideFill = "inherit" === t.get("color") ? e.inheritColor || null : "auto",
  10584. r
  10585. }
  10586. var sc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"]
  10587. , lc = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"]
  10588. , uc = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  10589. function hc(t, e, n, i, r, o, a, s) {
  10590. n = !r && n || tc;
  10591. var l = i && i.inheritColor
  10592. , u = e.getShallow("color")
  10593. , h = e.getShallow("textBorderColor")
  10594. , c = rt(e.getShallow("opacity"), n.opacity);
  10595. "inherit" !== u && "auto" !== u || (u = l || null),
  10596. "inherit" !== h && "auto" !== h || (h = l || null),
  10597. o || (u = u || n.color,
  10598. h = h || n.textBorderColor),
  10599. null != u && (t.fill = u),
  10600. null != h && (t.stroke = h);
  10601. var p = rt(e.getShallow("textBorderWidth"), n.textBorderWidth);
  10602. null != p && (t.lineWidth = p);
  10603. var d = rt(e.getShallow("textBorderType"), n.textBorderType);
  10604. null != d && (t.lineDash = d);
  10605. var f = rt(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  10606. null != f && (t.lineDashOffset = f),
  10607. r || null != c || s || (c = i && i.defaultOpacity),
  10608. null != c && (t.opacity = c),
  10609. r || o || null == t.fill && i.inheritColor && (t.fill = i.inheritColor);
  10610. for (var g = 0; g < sc.length; g++) {
  10611. var y = sc[g];
  10612. null != (m = rt(e.getShallow(y), n[y])) && (t[y] = m)
  10613. }
  10614. for (g = 0; g < lc.length; g++) {
  10615. y = lc[g];
  10616. null != (m = e.getShallow(y)) && (t[y] = m)
  10617. }
  10618. if (null == t.verticalAlign) {
  10619. var v = e.getShallow("baseline");
  10620. null != v && (t.verticalAlign = v)
  10621. }
  10622. if (!a || !i.disableBox) {
  10623. for (g = 0; g < uc.length; g++) {
  10624. var m;
  10625. y = uc[g];
  10626. null != (m = e.getShallow(y)) && (t[y] = m)
  10627. }
  10628. var x = e.getShallow("borderType");
  10629. null != x && (t.borderDash = x),
  10630. "auto" !== t.backgroundColor && "inherit" !== t.backgroundColor || !l || (t.backgroundColor = l),
  10631. "auto" !== t.borderColor && "inherit" !== t.borderColor || !l || (t.borderColor = l)
  10632. }
  10633. }
  10634. function cc(t, e) {
  10635. var n = e && e.getModel("textStyle");
  10636. 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(" "))
  10637. }
  10638. var pc = Vo();
  10639. function dc(t, e, n, i) {
  10640. if (t) {
  10641. var r = pc(t);
  10642. r.prevValue = r.value,
  10643. r.value = n;
  10644. var o = e.normal;
  10645. r.valueAnimation = o.get("valueAnimation"),
  10646. r.valueAnimation && (r.precision = o.get("precision"),
  10647. r.defaultInterpolatedText = i,
  10648. r.statesModels = e)
  10649. }
  10650. }
  10651. function fc(t, e, n, i, r) {
  10652. var o = pc(t);
  10653. if (o.valueAnimation && o.prevValue !== o.value) {
  10654. var a = o.defaultInterpolatedText
  10655. , s = rt(o.interpolatedValue, o.prevValue)
  10656. , l = o.value;
  10657. t.percent = 0,
  10658. (null == o.prevValue ? mh : vh)(t, {
  10659. percent: 1
  10660. }, i, e, null, (function(i) {
  10661. var u = Zo(n, o.precision, s, l, i);
  10662. o.interpolatedValue = 1 === i ? null : u;
  10663. var h = nc({
  10664. labelDataIndex: e,
  10665. labelFetcher: r,
  10666. defaultText: a ? a(u) : u + ""
  10667. }, o.statesModels, u);
  10668. ec(t, h)
  10669. }
  10670. ))
  10671. }
  10672. }
  10673. var gc, yc, vc = ["textStyle", "color"], mc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], xc = new Xs, _c = function() {
  10674. function t() {}
  10675. return t.prototype.getTextColor = function(t) {
  10676. var e = this.ecModel;
  10677. return this.getShallow("color") || (!t && e ? e.get(vc) : null)
  10678. }
  10679. ,
  10680. t.prototype.getFont = function() {
  10681. return cc({
  10682. fontStyle: this.getShallow("fontStyle"),
  10683. fontWeight: this.getShallow("fontWeight"),
  10684. fontSize: this.getShallow("fontSize"),
  10685. fontFamily: this.getShallow("fontFamily")
  10686. }, this.ecModel)
  10687. }
  10688. ,
  10689. t.prototype.getTextRect = function(t) {
  10690. for (var e = {
  10691. text: t,
  10692. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  10693. }, n = 0; n < mc.length; n++)
  10694. e[mc[n]] = this.getShallow(mc[n]);
  10695. return xc.useStyle(e),
  10696. xc.update(),
  10697. xc.getBoundingRect()
  10698. }
  10699. ,
  10700. t
  10701. }(), bc = [["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["lineDash", "type"], ["lineDashOffset", "dashOffset"], ["lineCap", "cap"], ["lineJoin", "join"], ["miterLimit"]], wc = ia(bc), Sc = function() {
  10702. function t() {}
  10703. return t.prototype.getLineStyle = function(t) {
  10704. return wc(this, t)
  10705. }
  10706. ,
  10707. t
  10708. }(), Mc = [["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["lineDash", "borderType"], ["lineDashOffset", "borderDashOffset"], ["lineCap", "borderCap"], ["lineJoin", "borderJoin"], ["miterLimit", "borderMiterLimit"]], Ic = ia(Mc), Tc = function() {
  10709. function t() {}
  10710. return t.prototype.getItemStyle = function(t, e) {
  10711. return Ic(this, t, e)
  10712. }
  10713. ,
  10714. t
  10715. }(), Cc = function() {
  10716. function t(t, e, n) {
  10717. this.parentModel = e,
  10718. this.ecModel = n,
  10719. this.option = t
  10720. }
  10721. return t.prototype.init = function(t, e, n) {
  10722. for (var i = [], r = 3; r < arguments.length; r++)
  10723. i[r - 3] = arguments[r]
  10724. }
  10725. ,
  10726. t.prototype.mergeOption = function(t, e) {
  10727. C(this.option, t, !0)
  10728. }
  10729. ,
  10730. t.prototype.get = function(t, e) {
  10731. return null == t ? this.option : this._doGet(this.parsePath(t), !e && this.parentModel)
  10732. }
  10733. ,
  10734. t.prototype.getShallow = function(t, e) {
  10735. var n = this.option
  10736. , i = null == n ? n : n[t];
  10737. if (null == i && !e) {
  10738. var r = this.parentModel;
  10739. r && (i = r.getShallow(t))
  10740. }
  10741. return i
  10742. }
  10743. ,
  10744. t.prototype.getModel = function(e, n) {
  10745. var i = null != e
  10746. , r = i ? this.parsePath(e) : null;
  10747. return new t(i ? this._doGet(r) : this.option,n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)
  10748. }
  10749. ,
  10750. t.prototype.isEmpty = function() {
  10751. return null == this.option
  10752. }
  10753. ,
  10754. t.prototype.restoreData = function() {}
  10755. ,
  10756. t.prototype.clone = function() {
  10757. return new (0,
  10758. this.constructor)(T(this.option))
  10759. }
  10760. ,
  10761. t.prototype.parsePath = function(t) {
  10762. return "string" == typeof t ? t.split(".") : t
  10763. }
  10764. ,
  10765. t.prototype.resolveParentPath = function(t) {
  10766. return t
  10767. }
  10768. ,
  10769. t.prototype.isAnimationEnabled = function() {
  10770. if (!r.node && this.option) {
  10771. if (null != this.option.animation)
  10772. return !!this.option.animation;
  10773. if (this.parentModel)
  10774. return this.parentModel.isAnimationEnabled()
  10775. }
  10776. }
  10777. ,
  10778. t.prototype._doGet = function(t, e) {
  10779. var n = this.option;
  10780. if (!t)
  10781. return n;
  10782. for (var i = 0; i < t.length && (!t[i] || null != (n = n && "object" == typeof n ? n[t[i]] : null)); i++)
  10783. ;
  10784. return null == n && e && (n = e._doGet(this.resolveParentPath(t), e.parentModel)),
  10785. n
  10786. }
  10787. ,
  10788. t
  10789. }();
  10790. $o(Cc),
  10791. gc = Cc,
  10792. yc = ["__\0is_clz", Qo++].join("_"),
  10793. gc.prototype[yc] = !0,
  10794. gc.isInstance = function(t) {
  10795. return !(!t || !t[yc])
  10796. }
  10797. ,
  10798. R(Cc, Sc),
  10799. R(Cc, Tc),
  10800. R(Cc, oa),
  10801. R(Cc, _c);
  10802. var Dc = Math.round(10 * Math.random());
  10803. function Ac(t) {
  10804. return [t || "", Dc++].join("_")
  10805. }
  10806. function kc(t, e) {
  10807. return C(C({}, t, !0), e, !0)
  10808. }
  10809. var Lc = "ZH"
  10810. , Pc = "EN"
  10811. , Oc = Pc
  10812. , Rc = {}
  10813. , Nc = {}
  10814. , Ec = r.domSupported && (document.documentElement.lang || navigator.language || navigator.browserLanguage || Oc).toUpperCase().indexOf(Lc) > -1 ? Lc : Oc;
  10815. function zc(t, e) {
  10816. t = t.toUpperCase(),
  10817. Nc[t] = new Cc(e),
  10818. Rc[t] = e
  10819. }
  10820. function Vc(t) {
  10821. return Nc[t]
  10822. }
  10823. zc(Pc, {
  10824. time: {
  10825. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  10826. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  10827. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  10828. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  10829. },
  10830. legend: {
  10831. selector: {
  10832. all: "All",
  10833. inverse: "Inv"
  10834. }
  10835. },
  10836. toolbox: {
  10837. brush: {
  10838. title: {
  10839. rect: "Box Select",
  10840. polygon: "Lasso Select",
  10841. lineX: "Horizontally Select",
  10842. lineY: "Vertically Select",
  10843. keep: "Keep Selections",
  10844. clear: "Clear Selections"
  10845. }
  10846. },
  10847. dataView: {
  10848. title: "Data View",
  10849. lang: ["Data View", "Close", "Refresh"]
  10850. },
  10851. dataZoom: {
  10852. title: {
  10853. zoom: "Zoom",
  10854. back: "Zoom Reset"
  10855. }
  10856. },
  10857. magicType: {
  10858. title: {
  10859. line: "Switch to Line Chart",
  10860. bar: "Switch to Bar Chart",
  10861. stack: "Stack",
  10862. tiled: "Tile"
  10863. }
  10864. },
  10865. restore: {
  10866. title: "Restore"
  10867. },
  10868. saveAsImage: {
  10869. title: "Save as Image",
  10870. lang: ["Right Click to Save Image"]
  10871. }
  10872. },
  10873. series: {
  10874. typeNames: {
  10875. pie: "Pie chart",
  10876. bar: "Bar chart",
  10877. line: "Line chart",
  10878. scatter: "Scatter plot",
  10879. effectScatter: "Ripple scatter plot",
  10880. radar: "Radar chart",
  10881. tree: "Tree",
  10882. treemap: "Treemap",
  10883. boxplot: "Boxplot",
  10884. candlestick: "Candlestick",
  10885. k: "K line chart",
  10886. heatmap: "Heat map",
  10887. map: "Map",
  10888. parallel: "Parallel coordinate map",
  10889. lines: "Line graph",
  10890. graph: "Relationship graph",
  10891. sankey: "Sankey diagram",
  10892. funnel: "Funnel chart",
  10893. gauge: "Gauge",
  10894. pictorialBar: "Pictorial bar",
  10895. themeRiver: "Theme River Map",
  10896. sunburst: "Sunburst",
  10897. custom: "Custom chart",
  10898. chart: "Chart"
  10899. }
  10900. },
  10901. aria: {
  10902. general: {
  10903. withTitle: 'This is a chart about "{title}"',
  10904. withoutTitle: "This is a chart"
  10905. },
  10906. series: {
  10907. single: {
  10908. prefix: "",
  10909. withName: " with type {seriesType} named {seriesName}.",
  10910. withoutName: " with type {seriesType}."
  10911. },
  10912. multiple: {
  10913. prefix: ". It consists of {seriesCount} series count.",
  10914. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  10915. withoutName: " The {seriesId} series is a {seriesType}.",
  10916. separator: {
  10917. middle: "",
  10918. end: ""
  10919. }
  10920. }
  10921. },
  10922. data: {
  10923. allData: "The data is as follows: ",
  10924. partialData: "The first {displayCnt} items are: ",
  10925. withName: "the data for {name} is {value}",
  10926. withoutName: "{value}",
  10927. separator: {
  10928. middle: ", ",
  10929. end: ". "
  10930. }
  10931. }
  10932. }
  10933. }),
  10934. zc(Lc, {
  10935. time: {
  10936. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  10937. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  10938. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  10939. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  10940. },
  10941. legend: {
  10942. selector: {
  10943. all: "全选",
  10944. inverse: "反选"
  10945. }
  10946. },
  10947. toolbox: {
  10948. brush: {
  10949. title: {
  10950. rect: "矩形选择",
  10951. polygon: "圈选",
  10952. lineX: "横向选择",
  10953. lineY: "纵向选择",
  10954. keep: "保持选择",
  10955. clear: "清除选择"
  10956. }
  10957. },
  10958. dataView: {
  10959. title: "数据视图",
  10960. lang: ["数据视图", "关闭", "刷新"]
  10961. },
  10962. dataZoom: {
  10963. title: {
  10964. zoom: "区域缩放",
  10965. back: "区域缩放还原"
  10966. }
  10967. },
  10968. magicType: {
  10969. title: {
  10970. line: "切换为折线图",
  10971. bar: "切换为柱状图",
  10972. stack: "切换为堆叠",
  10973. tiled: "切换为平铺"
  10974. }
  10975. },
  10976. restore: {
  10977. title: "还原"
  10978. },
  10979. saveAsImage: {
  10980. title: "保存为图片",
  10981. lang: ["右键另存为图片"]
  10982. }
  10983. },
  10984. series: {
  10985. typeNames: {
  10986. pie: "饼图",
  10987. bar: "柱状图",
  10988. line: "折线图",
  10989. scatter: "散点图",
  10990. effectScatter: "涟漪散点图",
  10991. radar: "雷达图",
  10992. tree: "树图",
  10993. treemap: "矩形树图",
  10994. boxplot: "箱型图",
  10995. candlestick: "K线图",
  10996. k: "K线图",
  10997. heatmap: "热力图",
  10998. map: "地图",
  10999. parallel: "平行坐标图",
  11000. lines: "线图",
  11001. graph: "关系图",
  11002. sankey: "桑基图",
  11003. funnel: "漏斗图",
  11004. gauge: "仪表盘图",
  11005. pictorialBar: "象形柱图",
  11006. themeRiver: "主题河流图",
  11007. sunburst: "旭日图",
  11008. custom: "自定义图表",
  11009. chart: "图表"
  11010. }
  11011. },
  11012. aria: {
  11013. general: {
  11014. withTitle: "这是一个关于“{title}”的图表。",
  11015. withoutTitle: "这是一个图表,"
  11016. },
  11017. series: {
  11018. single: {
  11019. prefix: "",
  11020. withName: "图表类型是{seriesType},表示{seriesName}。",
  11021. withoutName: "图表类型是{seriesType}。"
  11022. },
  11023. multiple: {
  11024. prefix: "它由{seriesCount}个图表系列组成。",
  11025. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  11026. withoutName: "第{seriesId}个系列是一个{seriesType},",
  11027. separator: {
  11028. middle: ";",
  11029. end: "。"
  11030. }
  11031. }
  11032. },
  11033. data: {
  11034. allData: "其数据是——",
  11035. partialData: "其中,前{displayCnt}项是——",
  11036. withName: "{name}的数据是{value}",
  11037. withoutName: "{value}",
  11038. separator: {
  11039. middle: ",",
  11040. end: ""
  11041. }
  11042. }
  11043. }
  11044. });
  11045. var Bc = 1e3
  11046. , Fc = 6e4
  11047. , Gc = 36e5
  11048. , Wc = 864e5
  11049. , Hc = 31536e6
  11050. , Yc = {
  11051. year: "{yyyy}",
  11052. month: "{MMM}",
  11053. day: "{d}",
  11054. hour: "{HH}:{mm}",
  11055. minute: "{HH}:{mm}",
  11056. second: "{HH}:{mm}:{ss}",
  11057. millisecond: "{HH}:{mm}:{ss} {SSS}",
  11058. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  11059. }
  11060. , Xc = "{yyyy}-{MM}-{dd}"
  11061. , Uc = {
  11062. year: "{yyyy}",
  11063. month: "{yyyy}-{MM}",
  11064. day: Xc,
  11065. hour: Xc + " " + Yc.hour,
  11066. minute: Xc + " " + Yc.minute,
  11067. second: Xc + " " + Yc.second,
  11068. millisecond: Yc.none
  11069. }
  11070. , Zc = ["year", "month", "day", "hour", "minute", "second", "millisecond"]
  11071. , jc = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  11072. function qc(t, e) {
  11073. return "0000".substr(0, e - (t += "").length) + t
  11074. }
  11075. function Kc(t) {
  11076. switch (t) {
  11077. case "half-year":
  11078. case "quarter":
  11079. return "month";
  11080. case "week":
  11081. case "half-week":
  11082. return "day";
  11083. case "half-day":
  11084. case "quarter-day":
  11085. return "hour";
  11086. default:
  11087. return t
  11088. }
  11089. }
  11090. function $c(t) {
  11091. return t === Kc(t)
  11092. }
  11093. function Jc(t, e, n, i) {
  11094. var r = uo(t)
  11095. , o = r[ep(n)]()
  11096. , a = r[np(n)]() + 1
  11097. , s = Math.floor((a - 1) / 3) + 1
  11098. , l = r[ip(n)]()
  11099. , u = r["get" + (n ? "UTC" : "") + "Day"]()
  11100. , h = r[rp(n)]()
  11101. , c = (h - 1) % 12 + 1
  11102. , p = r[op(n)]()
  11103. , d = r[ap(n)]()
  11104. , f = r[sp(n)]()
  11105. , g = h >= 12 ? "pm" : "am"
  11106. , y = g.toUpperCase()
  11107. , v = (i instanceof Cc ? i : Vc(i || Ec) || Nc[Oc]).getModel("time")
  11108. , m = v.get("month")
  11109. , x = v.get("monthAbbr")
  11110. , _ = v.get("dayOfWeek")
  11111. , b = v.get("dayOfWeekAbbr");
  11112. return (e || "").replace(/{a}/g, g + "").replace(/{A}/g, y + "").replace(/{yyyy}/g, o + "").replace(/{yy}/g, qc(o % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, m[a - 1]).replace(/{MMM}/g, x[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, _[u]).replace(/{ee}/g, b[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 + "")
  11113. }
  11114. function Qc(t, e) {
  11115. var n = uo(t)
  11116. , i = n[np(e)]() + 1
  11117. , r = n[ip(e)]()
  11118. , o = n[rp(e)]()
  11119. , a = n[op(e)]()
  11120. , s = n[ap(e)]()
  11121. , l = 0 === n[sp(e)]()
  11122. , u = l && 0 === s
  11123. , h = u && 0 === a
  11124. , c = h && 0 === o
  11125. , p = c && 1 === r;
  11126. return p && 1 === i ? "year" : p ? "month" : c ? "day" : h ? "hour" : u ? "minute" : l ? "second" : "millisecond"
  11127. }
  11128. function tp(t, e, n) {
  11129. var i = j(t) ? uo(t) : t;
  11130. switch (e = e || Qc(t, n)) {
  11131. case "year":
  11132. return i[ep(n)]();
  11133. case "half-year":
  11134. return i[np(n)]() >= 6 ? 1 : 0;
  11135. case "quarter":
  11136. return Math.floor((i[np(n)]() + 1) / 4);
  11137. case "month":
  11138. return i[np(n)]();
  11139. case "day":
  11140. return i[ip(n)]();
  11141. case "half-day":
  11142. return i[rp(n)]() / 24;
  11143. case "hour":
  11144. return i[rp(n)]();
  11145. case "minute":
  11146. return i[op(n)]();
  11147. case "second":
  11148. return i[ap(n)]();
  11149. case "millisecond":
  11150. return i[sp(n)]()
  11151. }
  11152. }
  11153. function ep(t) {
  11154. return t ? "getUTCFullYear" : "getFullYear"
  11155. }
  11156. function np(t) {
  11157. return t ? "getUTCMonth" : "getMonth"
  11158. }
  11159. function ip(t) {
  11160. return t ? "getUTCDate" : "getDate"
  11161. }
  11162. function rp(t) {
  11163. return t ? "getUTCHours" : "getHours"
  11164. }
  11165. function op(t) {
  11166. return t ? "getUTCMinutes" : "getMinutes"
  11167. }
  11168. function ap(t) {
  11169. return t ? "getUTCSeconds" : "getSeconds"
  11170. }
  11171. function sp(t) {
  11172. return t ? "getUTCMilliseconds" : "getMilliseconds"
  11173. }
  11174. function lp(t) {
  11175. return t ? "setUTCFullYear" : "setFullYear"
  11176. }
  11177. function up(t) {
  11178. return t ? "setUTCMonth" : "setMonth"
  11179. }
  11180. function hp(t) {
  11181. return t ? "setUTCDate" : "setDate"
  11182. }
  11183. function cp(t) {
  11184. return t ? "setUTCHours" : "setHours"
  11185. }
  11186. function pp(t) {
  11187. return t ? "setUTCMinutes" : "setMinutes"
  11188. }
  11189. function dp(t) {
  11190. return t ? "setUTCSeconds" : "setSeconds"
  11191. }
  11192. function fp(t) {
  11193. return t ? "setUTCMilliseconds" : "setMilliseconds"
  11194. }
  11195. function gp(t) {
  11196. if (!vo(t))
  11197. return U(t) ? t : "-";
  11198. var e = (t + "").split(".");
  11199. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "")
  11200. }
  11201. function yp(t, e) {
  11202. return t = (t || "").toLowerCase().replace(/-(.)/g, (function(t, e) {
  11203. return e.toUpperCase()
  11204. }
  11205. )),
  11206. e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)),
  11207. t
  11208. }
  11209. var vp = st;
  11210. function mp(t, e, n) {
  11211. function i(t) {
  11212. return t && ut(t) ? t : "-"
  11213. }
  11214. function r(t) {
  11215. return !(null == t || isNaN(t) || !isFinite(t))
  11216. }
  11217. var o = "time" === e
  11218. , a = t instanceof Date;
  11219. if (o || a) {
  11220. var s = o ? uo(t) : t;
  11221. if (!isNaN(+s))
  11222. return Jc(s, "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}", n);
  11223. if (a)
  11224. return "-"
  11225. }
  11226. if ("ordinal" === e)
  11227. return Z(t) ? i(t) : j(t) && r(t) ? t + "" : "-";
  11228. var l = yo(t);
  11229. return r(l) ? gp(l) : Z(t) ? i(t) : "boolean" == typeof t ? t + "" : "-"
  11230. }
  11231. var xp = ["a", "b", "c", "d", "e", "f", "g"]
  11232. , _p = function(t, e) {
  11233. return "{" + t + (null == e ? "" : e) + "}"
  11234. };
  11235. function bp(t, e, n) {
  11236. Y(e) || (e = [e]);
  11237. var i = e.length;
  11238. if (!i)
  11239. return "";
  11240. for (var r = e[0].$vars || [], o = 0; o < r.length; o++) {
  11241. var a = xp[o];
  11242. t = t.replace(_p(a), _p(a, 0))
  11243. }
  11244. for (var s = 0; s < i; s++)
  11245. for (var l = 0; l < r.length; l++) {
  11246. var u = e[s][r[l]];
  11247. t = t.replace(_p(xp[l], s), n ? re(u) : u)
  11248. }
  11249. return t
  11250. }
  11251. function wp(t, e) {
  11252. var n = U(t) ? {
  11253. color: t,
  11254. extraCssText: e
  11255. } : t || {}
  11256. , i = n.color
  11257. , r = n.type;
  11258. e = n.extraCssText;
  11259. var o = n.renderMode || "html";
  11260. 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>' : {
  11261. renderMode: o,
  11262. content: "{" + (n.markerId || "markerX") + "|} ",
  11263. style: "subItem" === r ? {
  11264. width: 4,
  11265. height: 4,
  11266. borderRadius: 2,
  11267. backgroundColor: i
  11268. } : {
  11269. width: 10,
  11270. height: 10,
  11271. borderRadius: 5,
  11272. backgroundColor: i
  11273. }
  11274. } : ""
  11275. }
  11276. function Sp(t, e) {
  11277. return e = e || "transparent",
  11278. U(t) ? t : q(t) && t.colorStops && (t.colorStops[0] || {}).color || e
  11279. }
  11280. function Mp(t, e) {
  11281. if ("_blank" === e || "blank" === e) {
  11282. var n = window.open();
  11283. n.opener = null,
  11284. n.location.href = t
  11285. } else
  11286. window.open(t, e)
  11287. }
  11288. var Ip = E
  11289. , Tp = ["left", "right", "top", "bottom", "width", "height"]
  11290. , Cp = [["width", "left", "right"], ["height", "top", "bottom"]];
  11291. function Dp(t, e, n, i, r) {
  11292. var o = 0
  11293. , a = 0;
  11294. null == i && (i = 1 / 0),
  11295. null == r && (r = 1 / 0);
  11296. var s = 0;
  11297. e.eachChild((function(l, u) {
  11298. var h, c, p = l.getBoundingRect(), d = e.childAt(u + 1), f = d && d.getBoundingRect();
  11299. if ("horizontal" === t) {
  11300. var g = p.width + (f ? -f.x + p.x : 0);
  11301. (h = o + g) > i || l.newline ? (o = 0,
  11302. h = g,
  11303. a += s + n,
  11304. s = p.height) : s = Math.max(s, p.height)
  11305. } else {
  11306. var y = p.height + (f ? -f.y + p.y : 0);
  11307. (c = a + y) > r || l.newline ? (o += s + n,
  11308. a = 0,
  11309. c = y,
  11310. s = p.width) : s = Math.max(s, p.width)
  11311. }
  11312. l.newline || (l.x = o,
  11313. l.y = a,
  11314. l.markRedraw(),
  11315. "horizontal" === t ? o = h + n : a = c + n)
  11316. }
  11317. ))
  11318. }
  11319. var Ap = Dp;
  11320. H(Dp, "vertical"),
  11321. H(Dp, "horizontal");
  11322. function kp(t, e, n) {
  11323. n = vp(n || 0);
  11324. var i = e.width
  11325. , r = e.height
  11326. , o = $r(t.left, i)
  11327. , a = $r(t.top, r)
  11328. , s = $r(t.right, i)
  11329. , l = $r(t.bottom, r)
  11330. , u = $r(t.width, i)
  11331. , h = $r(t.height, r)
  11332. , c = n[2] + n[0]
  11333. , p = n[1] + n[3]
  11334. , d = t.aspect;
  11335. switch (isNaN(u) && (u = i - s - p - o),
  11336. isNaN(h) && (h = r - l - c - a),
  11337. null != d && (isNaN(u) && isNaN(h) && (d > i / r ? u = .8 * i : h = .8 * r),
  11338. isNaN(u) && (u = d * h),
  11339. isNaN(h) && (h = u / d)),
  11340. isNaN(o) && (o = i - s - u - p),
  11341. isNaN(a) && (a = r - l - h - c),
  11342. t.left || t.right) {
  11343. case "center":
  11344. o = i / 2 - u / 2 - n[3];
  11345. break;
  11346. case "right":
  11347. o = i - u - p
  11348. }
  11349. switch (t.top || t.bottom) {
  11350. case "middle":
  11351. case "center":
  11352. a = r / 2 - h / 2 - n[0];
  11353. break;
  11354. case "bottom":
  11355. a = r - h - c
  11356. }
  11357. o = o || 0,
  11358. a = a || 0,
  11359. isNaN(u) && (u = i - p - o - (s || 0)),
  11360. isNaN(h) && (h = r - c - a - (l || 0));
  11361. var f = new ze(o + n[3],a + n[0],u,h);
  11362. return f.margin = n,
  11363. f
  11364. }
  11365. function Lp(t, e, n, i, r, o) {
  11366. var a, s = !r || !r.hv || r.hv[0], l = !r || !r.hv || r.hv[1], u = r && r.boundingMode || "all";
  11367. if ((o = o || t).x = t.x,
  11368. o.y = t.y,
  11369. !s && !l)
  11370. return !1;
  11371. if ("raw" === u)
  11372. a = "group" === t.type ? new ze(0,0,+e.width || 0,+e.height || 0) : t.getBoundingRect();
  11373. else if (a = t.getBoundingRect(),
  11374. t.needLocalTransform()) {
  11375. var h = t.getLocalTransform();
  11376. (a = a.clone()).applyTransform(h)
  11377. }
  11378. var c = kp(k({
  11379. width: a.width,
  11380. height: a.height
  11381. }, e), n, i)
  11382. , p = s ? c.x - a.x : 0
  11383. , d = l ? c.y - a.y : 0;
  11384. return "raw" === u ? (o.x = p,
  11385. o.y = d) : (o.x += p,
  11386. o.y += d),
  11387. o === t && t.markRedraw(),
  11388. !0
  11389. }
  11390. function Pp(t) {
  11391. var e = t.layoutMode || t.constructor.layoutMode;
  11392. return q(e) ? e : e ? {
  11393. type: e
  11394. } : null
  11395. }
  11396. function Op(t, e, n) {
  11397. var i = n && n.ignoreSize;
  11398. !Y(i) && (i = [i, i]);
  11399. var r = a(Cp[0], 0)
  11400. , o = a(Cp[1], 1);
  11401. function a(n, r) {
  11402. var o = {}
  11403. , a = 0
  11404. , u = {}
  11405. , h = 0;
  11406. if (Ip(n, (function(e) {
  11407. u[e] = t[e]
  11408. }
  11409. )),
  11410. Ip(n, (function(t) {
  11411. s(e, t) && (o[t] = u[t] = e[t]),
  11412. l(o, t) && a++,
  11413. l(u, t) && h++
  11414. }
  11415. )),
  11416. i[r])
  11417. return l(e, n[1]) ? u[n[2]] = null : l(e, n[2]) && (u[n[1]] = null),
  11418. u;
  11419. if (2 !== h && a) {
  11420. if (a >= 2)
  11421. return o;
  11422. for (var c = 0; c < n.length; c++) {
  11423. var p = n[c];
  11424. if (!s(o, p) && s(t, p)) {
  11425. o[p] = t[p];
  11426. break
  11427. }
  11428. }
  11429. return o
  11430. }
  11431. return u
  11432. }
  11433. function s(t, e) {
  11434. return t.hasOwnProperty(e)
  11435. }
  11436. function l(t, e) {
  11437. return null != t[e] && "auto" !== t[e]
  11438. }
  11439. function u(t, e, n) {
  11440. Ip(t, (function(t) {
  11441. e[t] = n[t]
  11442. }
  11443. ))
  11444. }
  11445. u(Cp[0], t, r),
  11446. u(Cp[1], t, o)
  11447. }
  11448. function Rp(t) {
  11449. return Np({}, t)
  11450. }
  11451. function Np(t, e) {
  11452. return e && t && Ip(Tp, (function(n) {
  11453. e.hasOwnProperty(n) && (t[n] = e[n])
  11454. }
  11455. )),
  11456. t
  11457. }
  11458. var Ep = Vo()
  11459. , zp = function(t) {
  11460. function e(e, n, i) {
  11461. var r = t.call(this, e, n, i) || this;
  11462. return r.uid = Ac("ec_cpt_model"),
  11463. r
  11464. }
  11465. return n(e, t),
  11466. e.prototype.init = function(t, e, n) {
  11467. this.mergeDefaultAndTheme(t, n)
  11468. }
  11469. ,
  11470. e.prototype.mergeDefaultAndTheme = function(t, e) {
  11471. var n = Pp(this)
  11472. , i = n ? Rp(t) : {};
  11473. C(t, e.getTheme().get(this.mainType)),
  11474. C(t, this.getDefaultOption()),
  11475. n && Op(t, i, n)
  11476. }
  11477. ,
  11478. e.prototype.mergeOption = function(t, e) {
  11479. C(this.option, t, !0);
  11480. var n = Pp(this);
  11481. n && Op(this.option, t, n)
  11482. }
  11483. ,
  11484. e.prototype.optionUpdated = function(t, e) {}
  11485. ,
  11486. e.prototype.getDefaultOption = function() {
  11487. var t = this.constructor;
  11488. if (!function(t) {
  11489. return !(!t || !t[qo])
  11490. }(t))
  11491. return t.defaultOption;
  11492. var e = Ep(this);
  11493. if (!e.defaultOption) {
  11494. for (var n = [], i = t; i; ) {
  11495. var r = i.prototype.defaultOption;
  11496. r && n.push(r),
  11497. i = i.superClass
  11498. }
  11499. for (var o = {}, a = n.length - 1; a >= 0; a--)
  11500. o = C(o, n[a], !0);
  11501. e.defaultOption = o
  11502. }
  11503. return e.defaultOption
  11504. }
  11505. ,
  11506. e.prototype.getReferringComponents = function(t, e) {
  11507. var n = t + "Index"
  11508. , i = t + "Id";
  11509. return Yo(this.ecModel, t, {
  11510. index: this.get(n, !0),
  11511. id: this.get(i, !0)
  11512. }, e)
  11513. }
  11514. ,
  11515. e.prototype.getBoxLayoutParams = function() {
  11516. var t = this;
  11517. return {
  11518. left: t.get("left"),
  11519. top: t.get("top"),
  11520. right: t.get("right"),
  11521. bottom: t.get("bottom"),
  11522. width: t.get("width"),
  11523. height: t.get("height")
  11524. }
  11525. }
  11526. ,
  11527. e.prototype.getZLevelKey = function() {
  11528. return ""
  11529. }
  11530. ,
  11531. e.prototype.setZLevel = function(t) {
  11532. this.option.zlevel = t
  11533. }
  11534. ,
  11535. e.protoInitialize = function() {
  11536. var t = e.prototype;
  11537. t.type = "component",
  11538. t.id = "",
  11539. t.name = "",
  11540. t.mainType = "",
  11541. t.subType = "",
  11542. t.componentIndex = 0
  11543. }(),
  11544. e
  11545. }(Cc);
  11546. Jo(zp, Cc),
  11547. na(zp),
  11548. function(t) {
  11549. var e = {};
  11550. t.registerSubTypeDefaulter = function(t, n) {
  11551. var i = Ko(t);
  11552. e[i.main] = n
  11553. }
  11554. ,
  11555. t.determineSubType = function(n, i) {
  11556. var r = i.type;
  11557. if (!r) {
  11558. var o = Ko(n).main;
  11559. t.hasSubTypes(n) && e[o] && (r = e[o](i))
  11560. }
  11561. return r
  11562. }
  11563. }(zp),
  11564. function(t, e) {
  11565. function n(t, e) {
  11566. return t[e] || (t[e] = {
  11567. predecessor: [],
  11568. successor: []
  11569. }),
  11570. t[e]
  11571. }
  11572. t.topologicalTravel = function(t, i, r, o) {
  11573. if (t.length) {
  11574. var a = function(t) {
  11575. var i = {}
  11576. , r = [];
  11577. return E(t, (function(o) {
  11578. var a = n(i, o)
  11579. , s = function(t, e) {
  11580. var n = [];
  11581. return E(t, (function(t) {
  11582. P(e, t) >= 0 && n.push(t)
  11583. }
  11584. )),
  11585. n
  11586. }(a.originalDeps = e(o), t);
  11587. a.entryCount = s.length,
  11588. 0 === a.entryCount && r.push(o),
  11589. E(s, (function(t) {
  11590. P(a.predecessor, t) < 0 && a.predecessor.push(t);
  11591. var e = n(i, t);
  11592. P(e.successor, t) < 0 && e.successor.push(o)
  11593. }
  11594. ))
  11595. }
  11596. )),
  11597. {
  11598. graph: i,
  11599. noEntryList: r
  11600. }
  11601. }(i)
  11602. , s = a.graph
  11603. , l = a.noEntryList
  11604. , u = {};
  11605. for (E(t, (function(t) {
  11606. u[t] = !0
  11607. }
  11608. )); l.length; ) {
  11609. var h = l.pop()
  11610. , c = s[h]
  11611. , p = !!u[h];
  11612. p && (r.call(o, h, c.originalDeps.slice()),
  11613. delete u[h]),
  11614. E(c.successor, p ? f : d)
  11615. }
  11616. E(u, (function() {
  11617. var t = "";
  11618. throw new Error(t)
  11619. }
  11620. ))
  11621. }
  11622. function d(t) {
  11623. s[t].entryCount--,
  11624. 0 === s[t].entryCount && l.push(t)
  11625. }
  11626. function f(t) {
  11627. u[t] = !0,
  11628. d(t)
  11629. }
  11630. }
  11631. }(zp, (function(t) {
  11632. var e = [];
  11633. E(zp.getClassesByMainType(t), (function(t) {
  11634. e = e.concat(t.dependencies || t.prototype.dependencies || [])
  11635. }
  11636. )),
  11637. e = z(e, (function(t) {
  11638. return Ko(t).main
  11639. }
  11640. )),
  11641. "dataset" !== t && P(e, "dataset") <= 0 && e.unshift("dataset");
  11642. return e
  11643. }
  11644. ));
  11645. var Vp = "";
  11646. "undefined" != typeof navigator && (Vp = navigator.platform || "");
  11647. var Bp = "rgba(0, 0, 0, 0.2)"
  11648. , Fp = {
  11649. darkMode: "auto",
  11650. colorBy: "series",
  11651. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  11652. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  11653. aria: {
  11654. decal: {
  11655. decals: [{
  11656. color: Bp,
  11657. dashArrayX: [1, 0],
  11658. dashArrayY: [2, 5],
  11659. symbolSize: 1,
  11660. rotation: Math.PI / 6
  11661. }, {
  11662. color: Bp,
  11663. symbol: "circle",
  11664. dashArrayX: [[8, 8], [0, 8, 8, 0]],
  11665. dashArrayY: [6, 0],
  11666. symbolSize: .8
  11667. }, {
  11668. color: Bp,
  11669. dashArrayX: [1, 0],
  11670. dashArrayY: [4, 3],
  11671. rotation: -Math.PI / 4
  11672. }, {
  11673. color: Bp,
  11674. dashArrayX: [[6, 6], [0, 6, 6, 0]],
  11675. dashArrayY: [6, 0]
  11676. }, {
  11677. color: Bp,
  11678. dashArrayX: [[1, 0], [1, 6]],
  11679. dashArrayY: [1, 0, 6, 0],
  11680. rotation: Math.PI / 4
  11681. }, {
  11682. color: Bp,
  11683. symbol: "triangle",
  11684. dashArrayX: [[9, 9], [0, 9, 9, 0]],
  11685. dashArrayY: [7, 2],
  11686. symbolSize: .75
  11687. }]
  11688. }
  11689. },
  11690. textStyle: {
  11691. fontFamily: Vp.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  11692. fontSize: 12,
  11693. fontStyle: "normal",
  11694. fontWeight: "normal"
  11695. },
  11696. blendMode: null,
  11697. stateAnimation: {
  11698. duration: 300,
  11699. easing: "cubicOut"
  11700. },
  11701. animation: "auto",
  11702. animationDuration: 1e3,
  11703. animationDurationUpdate: 500,
  11704. animationEasing: "cubicInOut",
  11705. animationEasingUpdate: "cubicInOut",
  11706. animationThreshold: 2e3,
  11707. progressiveThreshold: 3e3,
  11708. progressive: 400,
  11709. hoverLayerThreshold: 3e3,
  11710. useUTC: !1
  11711. }
  11712. , Gp = yt(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"])
  11713. , Wp = "original"
  11714. , Hp = "arrayRows"
  11715. , Yp = "objectRows"
  11716. , Xp = "keyedColumns"
  11717. , Up = "typedArray"
  11718. , Zp = "unknown"
  11719. , jp = "column"
  11720. , qp = "row"
  11721. , Kp = 1
  11722. , $p = 2
  11723. , Jp = 3
  11724. , Qp = Vo();
  11725. function td(t, e, n) {
  11726. var i = {}
  11727. , r = nd(e);
  11728. if (!r || !t)
  11729. return i;
  11730. var o, a, s = [], l = [], u = e.ecModel, h = Qp(u).datasetMap, c = r.uid + "_" + n.seriesLayoutBy;
  11731. E(t = t.slice(), (function(e, n) {
  11732. var r = q(e) ? e : t[n] = {
  11733. name: e
  11734. };
  11735. "ordinal" === r.type && null == o && (o = n,
  11736. a = f(r)),
  11737. i[r.name] = []
  11738. }
  11739. ));
  11740. var p = h.get(c) || h.set(c, {
  11741. categoryWayDim: a,
  11742. valueWayDim: 0
  11743. });
  11744. function d(t, e, n) {
  11745. for (var i = 0; i < n; i++)
  11746. t.push(e + i)
  11747. }
  11748. function f(t) {
  11749. var e = t.dimsDef;
  11750. return e ? e.length : 1
  11751. }
  11752. return E(t, (function(t, e) {
  11753. var n = t.name
  11754. , r = f(t);
  11755. if (null == o) {
  11756. var a = p.valueWayDim;
  11757. d(i[n], a, r),
  11758. d(l, a, r),
  11759. p.valueWayDim += r
  11760. } else if (o === e)
  11761. d(i[n], 0, r),
  11762. d(s, 0, r);
  11763. else {
  11764. a = p.categoryWayDim;
  11765. d(i[n], a, r),
  11766. d(l, a, r),
  11767. p.categoryWayDim += r
  11768. }
  11769. }
  11770. )),
  11771. s.length && (i.itemName = s),
  11772. l.length && (i.seriesName = l),
  11773. i
  11774. }
  11775. function ed(t, e, n) {
  11776. var i = {};
  11777. if (!nd(t))
  11778. return i;
  11779. var r, o = e.sourceFormat, a = e.dimensionsDefine;
  11780. o !== Yp && o !== Xp || E(a, (function(t, e) {
  11781. "name" === (q(t) ? t.name : t) && (r = e)
  11782. }
  11783. ));
  11784. var s = function() {
  11785. for (var t = {}, i = {}, s = [], l = 0, u = Math.min(5, n); l < u; l++) {
  11786. var h = rd(e.data, o, e.seriesLayoutBy, a, e.startIndex, l);
  11787. s.push(h);
  11788. var c = h === Jp;
  11789. if (c && null == t.v && l !== r && (t.v = l),
  11790. (null == t.n || t.n === t.v || !c && s[t.n] === Jp) && (t.n = l),
  11791. p(t) && s[t.n] !== Jp)
  11792. return t;
  11793. c || (h === $p && null == i.v && l !== r && (i.v = l),
  11794. null != i.n && i.n !== i.v || (i.n = l))
  11795. }
  11796. function p(t) {
  11797. return null != t.v && null != t.n
  11798. }
  11799. return p(t) ? t : p(i) ? i : null
  11800. }();
  11801. if (s) {
  11802. i.value = [s.v];
  11803. var l = null != r ? r : s.n;
  11804. i.itemName = [l],
  11805. i.seriesName = [l]
  11806. }
  11807. return i
  11808. }
  11809. function nd(t) {
  11810. if (!t.get("data", !0))
  11811. return Yo(t.ecModel, "dataset", {
  11812. index: t.get("datasetIndex", !0),
  11813. id: t.get("datasetId", !0)
  11814. }, Wo).models[0]
  11815. }
  11816. function id(t, e) {
  11817. return rd(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e)
  11818. }
  11819. function rd(t, e, n, i, r, o) {
  11820. var a, s, l;
  11821. if ($(t))
  11822. return Jp;
  11823. if (i) {
  11824. var u = i[o];
  11825. q(u) ? (s = u.name,
  11826. l = u.type) : U(u) && (s = u)
  11827. }
  11828. if (null != l)
  11829. return "ordinal" === l ? Kp : Jp;
  11830. if (e === Hp) {
  11831. var h = t;
  11832. if (n === qp) {
  11833. for (var c = h[o], p = 0; p < (c || []).length && p < 5; p++)
  11834. if (null != (a = m(c[r + p])))
  11835. return a
  11836. } else
  11837. for (p = 0; p < h.length && p < 5; p++) {
  11838. var d = h[r + p];
  11839. if (d && null != (a = m(d[o])))
  11840. return a
  11841. }
  11842. } else if (e === Yp) {
  11843. var f = t;
  11844. if (!s)
  11845. return Jp;
  11846. for (p = 0; p < f.length && p < 5; p++) {
  11847. if ((y = f[p]) && null != (a = m(y[s])))
  11848. return a
  11849. }
  11850. } else if (e === Xp) {
  11851. if (!s)
  11852. return Jp;
  11853. if (!(c = t[s]) || $(c))
  11854. return Jp;
  11855. for (p = 0; p < c.length && p < 5; p++)
  11856. if (null != (a = m(c[p])))
  11857. return a
  11858. } else if (e === Wp) {
  11859. var g = t;
  11860. for (p = 0; p < g.length && p < 5; p++) {
  11861. var y, v = Ao(y = g[p]);
  11862. if (!Y(v))
  11863. return Jp;
  11864. if (null != (a = m(v[o])))
  11865. return a
  11866. }
  11867. }
  11868. function m(t) {
  11869. var e = U(t);
  11870. return null != t && Number.isFinite(Number(t)) && "" !== t ? e ? $p : Jp : e && "-" !== t ? Kp : void 0
  11871. }
  11872. return Jp
  11873. }
  11874. var od = yt();
  11875. var ad, sd, ld, ud = Vo(), hd = Vo(), cd = function() {
  11876. function t() {}
  11877. return t.prototype.getColorFromPalette = function(t, e, n) {
  11878. var i = To(this.get("color", !0))
  11879. , r = this.get("colorLayer", !0);
  11880. return dd(this, ud, i, r, t, e, n)
  11881. }
  11882. ,
  11883. t.prototype.clearColorPalette = function() {
  11884. !function(t, e) {
  11885. e(t).paletteIdx = 0,
  11886. e(t).paletteNameMap = {}
  11887. }(this, ud)
  11888. }
  11889. ,
  11890. t
  11891. }();
  11892. function pd(t, e, n, i) {
  11893. var r = To(t.get(["aria", "decal", "decals"]));
  11894. return dd(t, hd, r, null, e, n, i)
  11895. }
  11896. function dd(t, e, n, i, r, o, a) {
  11897. var s = e(o = o || t)
  11898. , l = s.paletteIdx || 0
  11899. , u = s.paletteNameMap = s.paletteNameMap || {};
  11900. if (u.hasOwnProperty(r))
  11901. return u[r];
  11902. var h = null != a && i ? function(t, e) {
  11903. for (var n = t.length, i = 0; i < n; i++)
  11904. if (t[i].length > e)
  11905. return t[i];
  11906. return t[n - 1]
  11907. }(i, a) : n;
  11908. if ((h = h || n) && h.length) {
  11909. var c = h[l];
  11910. return r && (u[r] = c),
  11911. s.paletteIdx = (l + 1) % h.length,
  11912. c
  11913. }
  11914. }
  11915. var fd = "\0_ec_inner";
  11916. var gd = function(t) {
  11917. function e() {
  11918. return null !== t && t.apply(this, arguments) || this
  11919. }
  11920. return n(e, t),
  11921. e.prototype.init = function(t, e, n, i, r, o) {
  11922. i = i || {},
  11923. this.option = null,
  11924. this._theme = new Cc(i),
  11925. this._locale = new Cc(r),
  11926. this._optionManager = o
  11927. }
  11928. ,
  11929. e.prototype.setOption = function(t, e, n) {
  11930. var i = md(e);
  11931. this._optionManager.setOption(t, n, i),
  11932. this._resetOption(null, i)
  11933. }
  11934. ,
  11935. e.prototype.resetOption = function(t, e) {
  11936. return this._resetOption(t, md(e))
  11937. }
  11938. ,
  11939. e.prototype._resetOption = function(t, e) {
  11940. var n = !1
  11941. , i = this._optionManager;
  11942. if (!t || "recreate" === t) {
  11943. var r = i.mountOption("recreate" === t);
  11944. 0,
  11945. this.option && "recreate" !== t ? (this.restoreData(),
  11946. this._mergeOption(r, e)) : ld(this, r),
  11947. n = !0
  11948. }
  11949. if ("timeline" !== t && "media" !== t || this.restoreData(),
  11950. !t || "recreate" === t || "timeline" === t) {
  11951. var o = i.getTimelineOption(this);
  11952. o && (n = !0,
  11953. this._mergeOption(o, e))
  11954. }
  11955. if (!t || "recreate" === t || "media" === t) {
  11956. var a = i.getMediaOption(this);
  11957. a.length && E(a, (function(t) {
  11958. n = !0,
  11959. this._mergeOption(t, e)
  11960. }
  11961. ), this)
  11962. }
  11963. return n
  11964. }
  11965. ,
  11966. e.prototype.mergeOption = function(t) {
  11967. this._mergeOption(t, null)
  11968. }
  11969. ,
  11970. e.prototype._mergeOption = function(t, e) {
  11971. var n = this.option
  11972. , i = this._componentsMap
  11973. , r = this._componentsCount
  11974. , o = []
  11975. , a = yt()
  11976. , s = e && e.replaceMergeMainTypeMap;
  11977. Qp(this).datasetMap = yt(),
  11978. E(t, (function(t, e) {
  11979. null != t && (zp.hasClass(e) ? e && (o.push(e),
  11980. a.set(e, !0)) : n[e] = null == n[e] ? T(t) : C(n[e], t, !0))
  11981. }
  11982. )),
  11983. s && s.each((function(t, e) {
  11984. zp.hasClass(e) && !a.get(e) && (o.push(e),
  11985. a.set(e, !0))
  11986. }
  11987. )),
  11988. zp.topologicalTravel(o, zp.getAllClassMainTypes(), (function(e) {
  11989. var o = function(t, e, n) {
  11990. var i = od.get(e);
  11991. if (!i)
  11992. return n;
  11993. var r = i(t);
  11994. return r ? n.concat(r) : n
  11995. }(this, e, To(t[e]))
  11996. , a = i.get(e)
  11997. , l = a ? s && s.get(e) ? "replaceMerge" : "normalMerge" : "replaceAll"
  11998. , u = Lo(a, o, l);
  11999. (function(t, e, n) {
  12000. E(t, (function(t) {
  12001. var i = t.newOption;
  12002. q(i) && (t.keyInfo.mainType = e,
  12003. t.keyInfo.subType = function(t, e, n, i) {
  12004. return e.type ? e.type : n ? n.subType : i.determineSubType(t, e)
  12005. }(e, i, t.existing, n))
  12006. }
  12007. ))
  12008. }
  12009. )(u, e, zp),
  12010. n[e] = null,
  12011. i.set(e, null),
  12012. r.set(e, 0);
  12013. var h, c = [], p = [], d = 0;
  12014. E(u, (function(t, n) {
  12015. var i = t.existing
  12016. , r = t.newOption;
  12017. if (r) {
  12018. var o = "series" === e
  12019. , a = zp.getClass(e, t.keyInfo.subType, !o);
  12020. if (!a)
  12021. return;
  12022. if ("tooltip" === e) {
  12023. if (h)
  12024. return void 0;
  12025. h = !0
  12026. }
  12027. if (i && i.constructor === a)
  12028. i.name = t.keyInfo.name,
  12029. i.mergeOption(r, this),
  12030. i.optionUpdated(r, !1);
  12031. else {
  12032. var s = A({
  12033. componentIndex: n
  12034. }, t.keyInfo);
  12035. A(i = new a(r,this,this,s), s),
  12036. t.brandNew && (i.__requireNewView = !0),
  12037. i.init(r, this, this),
  12038. i.optionUpdated(null, !0)
  12039. }
  12040. } else
  12041. i && (i.mergeOption({}, this),
  12042. i.optionUpdated({}, !1));
  12043. i ? (c.push(i.option),
  12044. p.push(i),
  12045. d++) : (c.push(void 0),
  12046. p.push(void 0))
  12047. }
  12048. ), this),
  12049. n[e] = c,
  12050. i.set(e, p),
  12051. r.set(e, d),
  12052. "series" === e && ad(this)
  12053. }
  12054. ), this),
  12055. this._seriesIndices || ad(this)
  12056. }
  12057. ,
  12058. e.prototype.getOption = function() {
  12059. var t = T(this.option);
  12060. return E(t, (function(e, n) {
  12061. if (zp.hasClass(n)) {
  12062. for (var i = To(e), r = i.length, o = !1, a = r - 1; a >= 0; a--)
  12063. i[a] && !Eo(i[a]) ? o = !0 : (i[a] = null,
  12064. !o && r--);
  12065. i.length = r,
  12066. t[n] = i
  12067. }
  12068. }
  12069. )),
  12070. delete t[fd],
  12071. t
  12072. }
  12073. ,
  12074. e.prototype.getTheme = function() {
  12075. return this._theme
  12076. }
  12077. ,
  12078. e.prototype.getLocaleModel = function() {
  12079. return this._locale
  12080. }
  12081. ,
  12082. e.prototype.setUpdatePayload = function(t) {
  12083. this._payload = t
  12084. }
  12085. ,
  12086. e.prototype.getUpdatePayload = function() {
  12087. return this._payload
  12088. }
  12089. ,
  12090. e.prototype.getComponent = function(t, e) {
  12091. var n = this._componentsMap.get(t);
  12092. if (n) {
  12093. var i = n[e || 0];
  12094. if (i)
  12095. return i;
  12096. if (null == e)
  12097. for (var r = 0; r < n.length; r++)
  12098. if (n[r])
  12099. return n[r]
  12100. }
  12101. }
  12102. ,
  12103. e.prototype.queryComponents = function(t) {
  12104. var e = t.mainType;
  12105. if (!e)
  12106. return [];
  12107. var n, i = t.index, r = t.id, o = t.name, a = this._componentsMap.get(e);
  12108. return a && a.length ? (null != i ? (n = [],
  12109. E(To(i), (function(t) {
  12110. a[t] && n.push(a[t])
  12111. }
  12112. ))) : n = null != r ? yd("id", r, a) : null != o ? yd("name", o, a) : B(a, (function(t) {
  12113. return !!t
  12114. }
  12115. )),
  12116. vd(n, t)) : []
  12117. }
  12118. ,
  12119. e.prototype.findComponents = function(t) {
  12120. var e, n, i, r, o, a = t.query, s = t.mainType, l = (n = s + "Index",
  12121. i = s + "Id",
  12122. r = s + "Name",
  12123. !(e = a) || null == e[n] && null == e[i] && null == e[r] ? null : {
  12124. mainType: s,
  12125. index: e[n],
  12126. id: e[i],
  12127. name: e[r]
  12128. }), u = l ? this.queryComponents(l) : B(this._componentsMap.get(s), (function(t) {
  12129. return !!t
  12130. }
  12131. ));
  12132. return o = vd(u, t),
  12133. t.filter ? B(o, t.filter) : o
  12134. }
  12135. ,
  12136. e.prototype.eachComponent = function(t, e, n) {
  12137. var i = this._componentsMap;
  12138. if (X(t)) {
  12139. var r = e
  12140. , o = t;
  12141. i.each((function(t, e) {
  12142. for (var n = 0; t && n < t.length; n++) {
  12143. var i = t[n];
  12144. i && o.call(r, e, i, i.componentIndex)
  12145. }
  12146. }
  12147. ))
  12148. } else
  12149. for (var a = U(t) ? i.get(t) : q(t) ? this.findComponents(t) : null, s = 0; a && s < a.length; s++) {
  12150. var l = a[s];
  12151. l && e.call(n, l, l.componentIndex)
  12152. }
  12153. }
  12154. ,
  12155. e.prototype.getSeriesByName = function(t) {
  12156. var e = Ro(t, null);
  12157. return B(this._componentsMap.get("series"), (function(t) {
  12158. return !!t && null != e && t.name === e
  12159. }
  12160. ))
  12161. }
  12162. ,
  12163. e.prototype.getSeriesByIndex = function(t) {
  12164. return this._componentsMap.get("series")[t]
  12165. }
  12166. ,
  12167. e.prototype.getSeriesByType = function(t) {
  12168. return B(this._componentsMap.get("series"), (function(e) {
  12169. return !!e && e.subType === t
  12170. }
  12171. ))
  12172. }
  12173. ,
  12174. e.prototype.getSeries = function() {
  12175. return B(this._componentsMap.get("series"), (function(t) {
  12176. return !!t
  12177. }
  12178. ))
  12179. }
  12180. ,
  12181. e.prototype.getSeriesCount = function() {
  12182. return this._componentsCount.get("series")
  12183. }
  12184. ,
  12185. e.prototype.eachSeries = function(t, e) {
  12186. sd(this),
  12187. E(this._seriesIndices, (function(n) {
  12188. var i = this._componentsMap.get("series")[n];
  12189. t.call(e, i, n)
  12190. }
  12191. ), this)
  12192. }
  12193. ,
  12194. e.prototype.eachRawSeries = function(t, e) {
  12195. E(this._componentsMap.get("series"), (function(n) {
  12196. n && t.call(e, n, n.componentIndex)
  12197. }
  12198. ))
  12199. }
  12200. ,
  12201. e.prototype.eachSeriesByType = function(t, e, n) {
  12202. sd(this),
  12203. E(this._seriesIndices, (function(i) {
  12204. var r = this._componentsMap.get("series")[i];
  12205. r.subType === t && e.call(n, r, i)
  12206. }
  12207. ), this)
  12208. }
  12209. ,
  12210. e.prototype.eachRawSeriesByType = function(t, e, n) {
  12211. return E(this.getSeriesByType(t), e, n)
  12212. }
  12213. ,
  12214. e.prototype.isSeriesFiltered = function(t) {
  12215. return sd(this),
  12216. null == this._seriesIndicesMap.get(t.componentIndex)
  12217. }
  12218. ,
  12219. e.prototype.getCurrentSeriesIndices = function() {
  12220. return (this._seriesIndices || []).slice()
  12221. }
  12222. ,
  12223. e.prototype.filterSeries = function(t, e) {
  12224. sd(this);
  12225. var n = [];
  12226. E(this._seriesIndices, (function(i) {
  12227. var r = this._componentsMap.get("series")[i];
  12228. t.call(e, r, i) && n.push(i)
  12229. }
  12230. ), this),
  12231. this._seriesIndices = n,
  12232. this._seriesIndicesMap = yt(n)
  12233. }
  12234. ,
  12235. e.prototype.restoreData = function(t) {
  12236. ad(this);
  12237. var e = this._componentsMap
  12238. , n = [];
  12239. e.each((function(t, e) {
  12240. zp.hasClass(e) && n.push(e)
  12241. }
  12242. )),
  12243. zp.topologicalTravel(n, zp.getAllClassMainTypes(), (function(n) {
  12244. E(e.get(n), (function(e) {
  12245. !e || "series" === n && function(t, e) {
  12246. if (e) {
  12247. var n = e.seriesIndex
  12248. , i = e.seriesId
  12249. , r = e.seriesName;
  12250. return null != n && t.componentIndex !== n || null != i && t.id !== i || null != r && t.name !== r
  12251. }
  12252. }(e, t) || e.restoreData()
  12253. }
  12254. ))
  12255. }
  12256. ))
  12257. }
  12258. ,
  12259. e.internalField = (ad = function(t) {
  12260. var e = t._seriesIndices = [];
  12261. E(t._componentsMap.get("series"), (function(t) {
  12262. t && e.push(t.componentIndex)
  12263. }
  12264. )),
  12265. t._seriesIndicesMap = yt(e)
  12266. }
  12267. ,
  12268. sd = function(t) {}
  12269. ,
  12270. void (ld = function(t, e) {
  12271. t.option = {},
  12272. t.option[fd] = 1,
  12273. t._componentsMap = yt({
  12274. series: []
  12275. }),
  12276. t._componentsCount = yt();
  12277. var n = e.aria;
  12278. q(n) && null == n.enabled && (n.enabled = !0),
  12279. function(t, e) {
  12280. var n = t.color && !t.colorLayer;
  12281. E(e, (function(e, i) {
  12282. "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))
  12283. }
  12284. ))
  12285. }(e, t._theme.option),
  12286. C(e, Fp, !1),
  12287. t._mergeOption(e, null)
  12288. }
  12289. )),
  12290. e
  12291. }(Cc);
  12292. function yd(t, e, n) {
  12293. if (Y(e)) {
  12294. var i = yt();
  12295. return E(e, (function(t) {
  12296. null != t && (null != Ro(t, null) && i.set(t, !0))
  12297. }
  12298. )),
  12299. B(n, (function(e) {
  12300. return e && i.get(e[t])
  12301. }
  12302. ))
  12303. }
  12304. var r = Ro(e, null);
  12305. return B(n, (function(e) {
  12306. return e && null != r && e[t] === r
  12307. }
  12308. ))
  12309. }
  12310. function vd(t, e) {
  12311. return e.hasOwnProperty("subType") ? B(t, (function(t) {
  12312. return t && t.subType === e.subType
  12313. }
  12314. )) : t
  12315. }
  12316. function md(t) {
  12317. var e = yt();
  12318. return t && E(To(t.replaceMerge), (function(t) {
  12319. e.set(t, !0)
  12320. }
  12321. )),
  12322. {
  12323. replaceMergeMainTypeMap: e
  12324. }
  12325. }
  12326. R(gd, cd);
  12327. var xd = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isSSR", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getOption", "getId", "updateLabelLayout"]
  12328. , _d = function(t) {
  12329. E(xd, (function(e) {
  12330. this[e] = W(t[e], t)
  12331. }
  12332. ), this)
  12333. }
  12334. , bd = {}
  12335. , wd = function() {
  12336. function t() {
  12337. this._coordinateSystems = []
  12338. }
  12339. return t.prototype.create = function(t, e) {
  12340. var n = [];
  12341. E(bd, (function(i, r) {
  12342. var o = i.create(t, e);
  12343. n = n.concat(o || [])
  12344. }
  12345. )),
  12346. this._coordinateSystems = n
  12347. }
  12348. ,
  12349. t.prototype.update = function(t, e) {
  12350. E(this._coordinateSystems, (function(n) {
  12351. n.update && n.update(t, e)
  12352. }
  12353. ))
  12354. }
  12355. ,
  12356. t.prototype.getCoordinateSystems = function() {
  12357. return this._coordinateSystems.slice()
  12358. }
  12359. ,
  12360. t.register = function(t, e) {
  12361. bd[t] = e
  12362. }
  12363. ,
  12364. t.get = function(t) {
  12365. return bd[t]
  12366. }
  12367. ,
  12368. t
  12369. }()
  12370. , Sd = /^(min|max)?(.+)$/
  12371. , Md = function() {
  12372. function t(t) {
  12373. this._timelineOptions = [],
  12374. this._mediaList = [],
  12375. this._currentMediaIndices = [],
  12376. this._api = t
  12377. }
  12378. return t.prototype.setOption = function(t, e, n) {
  12379. t && (E(To(t.series), (function(t) {
  12380. t && t.data && $(t.data) && ct(t.data)
  12381. }
  12382. )),
  12383. E(To(t.dataset), (function(t) {
  12384. t && t.source && $(t.source) && ct(t.source)
  12385. }
  12386. ))),
  12387. t = T(t);
  12388. var i = this._optionBackup
  12389. , r = function(t, e, n) {
  12390. var i, r, o = [], a = t.baseOption, s = t.timeline, l = t.options, u = t.media, h = !!t.media, c = !!(l || s || a && a.timeline);
  12391. a ? (r = a).timeline || (r.timeline = s) : ((c || h) && (t.options = t.media = null),
  12392. r = t);
  12393. h && Y(u) && E(u, (function(t) {
  12394. t && t.option && (t.query ? o.push(t) : i || (i = t))
  12395. }
  12396. ));
  12397. function p(t) {
  12398. E(e, (function(e) {
  12399. e(t, n)
  12400. }
  12401. ))
  12402. }
  12403. return p(r),
  12404. E(l, (function(t) {
  12405. return p(t)
  12406. }
  12407. )),
  12408. E(o, (function(t) {
  12409. return p(t.option)
  12410. }
  12411. )),
  12412. {
  12413. baseOption: r,
  12414. timelineOptions: l || [],
  12415. mediaDefault: i,
  12416. mediaList: o
  12417. }
  12418. }(t, e, !i);
  12419. this._newBaseOption = r.baseOption,
  12420. i ? (r.timelineOptions.length && (i.timelineOptions = r.timelineOptions),
  12421. r.mediaList.length && (i.mediaList = r.mediaList),
  12422. r.mediaDefault && (i.mediaDefault = r.mediaDefault)) : this._optionBackup = r
  12423. }
  12424. ,
  12425. t.prototype.mountOption = function(t) {
  12426. var e = this._optionBackup;
  12427. return this._timelineOptions = e.timelineOptions,
  12428. this._mediaList = e.mediaList,
  12429. this._mediaDefault = e.mediaDefault,
  12430. this._currentMediaIndices = [],
  12431. T(t ? e.baseOption : this._newBaseOption)
  12432. }
  12433. ,
  12434. t.prototype.getTimelineOption = function(t) {
  12435. var e, n = this._timelineOptions;
  12436. if (n.length) {
  12437. var i = t.getComponent("timeline");
  12438. i && (e = T(n[i.getCurrentIndex()]))
  12439. }
  12440. return e
  12441. }
  12442. ,
  12443. t.prototype.getMediaOption = function(t) {
  12444. var e, n, i = this._api.getWidth(), r = this._api.getHeight(), o = this._mediaList, a = this._mediaDefault, s = [], l = [];
  12445. if (!o.length && !a)
  12446. return l;
  12447. for (var u = 0, h = o.length; u < h; u++)
  12448. Id(o[u].query, i, r) && s.push(u);
  12449. return !s.length && a && (s = [-1]),
  12450. s.length && (e = s,
  12451. n = this._currentMediaIndices,
  12452. e.join(",") !== n.join(",")) && (l = z(s, (function(t) {
  12453. return T(-1 === t ? a.option : o[t].option)
  12454. }
  12455. ))),
  12456. this._currentMediaIndices = s,
  12457. l
  12458. }
  12459. ,
  12460. t
  12461. }();
  12462. function Id(t, e, n) {
  12463. var i = {
  12464. width: e,
  12465. height: n,
  12466. aspectratio: e / n
  12467. }
  12468. , r = !0;
  12469. return E(t, (function(t, e) {
  12470. var n = e.match(Sd);
  12471. if (n && n[1] && n[2]) {
  12472. var o = n[1]
  12473. , a = n[2].toLowerCase();
  12474. (function(t, e, n) {
  12475. return "min" === n ? t >= e : "max" === n ? t <= e : t === e
  12476. }
  12477. )(i[a], t, o) || (r = !1)
  12478. }
  12479. }
  12480. )),
  12481. r
  12482. }
  12483. var Td = E
  12484. , Cd = q
  12485. , Dd = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  12486. function Ad(t) {
  12487. var e = t && t.itemStyle;
  12488. if (e)
  12489. for (var n = 0, i = Dd.length; n < i; n++) {
  12490. var r = Dd[n]
  12491. , o = e.normal
  12492. , a = e.emphasis;
  12493. o && o[r] && (t[r] = t[r] || {},
  12494. t[r].normal ? C(t[r].normal, o[r]) : t[r].normal = o[r],
  12495. o[r] = null),
  12496. a && a[r] && (t[r] = t[r] || {},
  12497. t[r].emphasis ? C(t[r].emphasis, a[r]) : t[r].emphasis = a[r],
  12498. a[r] = null)
  12499. }
  12500. }
  12501. function kd(t, e, n) {
  12502. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  12503. var i = t[e].normal
  12504. , r = t[e].emphasis;
  12505. i && (n ? (t[e].normal = t[e].emphasis = null,
  12506. k(t[e], i)) : t[e] = i),
  12507. r && (t.emphasis = t.emphasis || {},
  12508. t.emphasis[e] = r,
  12509. r.focus && (t.emphasis.focus = r.focus),
  12510. r.blurScope && (t.emphasis.blurScope = r.blurScope))
  12511. }
  12512. }
  12513. function Ld(t) {
  12514. kd(t, "itemStyle"),
  12515. kd(t, "lineStyle"),
  12516. kd(t, "areaStyle"),
  12517. kd(t, "label"),
  12518. kd(t, "labelLine"),
  12519. kd(t, "upperLabel"),
  12520. kd(t, "edgeLabel")
  12521. }
  12522. function Pd(t, e) {
  12523. var n = Cd(t) && t[e]
  12524. , i = Cd(n) && n.textStyle;
  12525. if (i) {
  12526. 0;
  12527. for (var r = 0, o = Do.length; r < o; r++) {
  12528. var a = Do[r];
  12529. i.hasOwnProperty(a) && (n[a] = i[a])
  12530. }
  12531. }
  12532. }
  12533. function Od(t) {
  12534. t && (Ld(t),
  12535. Pd(t, "label"),
  12536. t.emphasis && Pd(t.emphasis, "label"))
  12537. }
  12538. function Rd(t) {
  12539. return Y(t) ? t : t ? [t] : []
  12540. }
  12541. function Nd(t) {
  12542. return (Y(t) ? t[0] : t) || {}
  12543. }
  12544. function Ed(t, e) {
  12545. Td(Rd(t.series), (function(t) {
  12546. Cd(t) && function(t) {
  12547. if (Cd(t)) {
  12548. Ad(t),
  12549. Ld(t),
  12550. Pd(t, "label"),
  12551. Pd(t, "upperLabel"),
  12552. Pd(t, "edgeLabel"),
  12553. t.emphasis && (Pd(t.emphasis, "label"),
  12554. Pd(t.emphasis, "upperLabel"),
  12555. Pd(t.emphasis, "edgeLabel"));
  12556. var e = t.markPoint;
  12557. e && (Ad(e),
  12558. Od(e));
  12559. var n = t.markLine;
  12560. n && (Ad(n),
  12561. Od(n));
  12562. var i = t.markArea;
  12563. i && Od(i);
  12564. var r = t.data;
  12565. if ("graph" === t.type) {
  12566. r = r || t.nodes;
  12567. var o = t.links || t.edges;
  12568. if (o && !$(o))
  12569. for (var a = 0; a < o.length; a++)
  12570. Od(o[a]);
  12571. E(t.categories, (function(t) {
  12572. Ld(t)
  12573. }
  12574. ))
  12575. }
  12576. if (r && !$(r))
  12577. for (a = 0; a < r.length; a++)
  12578. Od(r[a]);
  12579. if ((e = t.markPoint) && e.data) {
  12580. var s = e.data;
  12581. for (a = 0; a < s.length; a++)
  12582. Od(s[a])
  12583. }
  12584. if ((n = t.markLine) && n.data) {
  12585. var l = n.data;
  12586. for (a = 0; a < l.length; a++)
  12587. Y(l[a]) ? (Od(l[a][0]),
  12588. Od(l[a][1])) : Od(l[a])
  12589. }
  12590. "gauge" === t.type ? (Pd(t, "axisLabel"),
  12591. Pd(t, "title"),
  12592. Pd(t, "detail")) : "treemap" === t.type ? (kd(t.breadcrumb, "itemStyle"),
  12593. E(t.levels, (function(t) {
  12594. Ld(t)
  12595. }
  12596. ))) : "tree" === t.type && Ld(t.leaves)
  12597. }
  12598. }(t)
  12599. }
  12600. ));
  12601. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  12602. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"),
  12603. Td(n, (function(e) {
  12604. Td(Rd(t[e]), (function(t) {
  12605. t && (Pd(t, "axisLabel"),
  12606. Pd(t.axisPointer, "label"))
  12607. }
  12608. ))
  12609. }
  12610. )),
  12611. Td(Rd(t.parallel), (function(t) {
  12612. var e = t && t.parallelAxisDefault;
  12613. Pd(e, "axisLabel"),
  12614. Pd(e && e.axisPointer, "label")
  12615. }
  12616. )),
  12617. Td(Rd(t.calendar), (function(t) {
  12618. kd(t, "itemStyle"),
  12619. Pd(t, "dayLabel"),
  12620. Pd(t, "monthLabel"),
  12621. Pd(t, "yearLabel")
  12622. }
  12623. )),
  12624. Td(Rd(t.radar), (function(t) {
  12625. Pd(t, "name"),
  12626. t.name && null == t.axisName && (t.axisName = t.name,
  12627. delete t.name),
  12628. null != t.nameGap && null == t.axisNameGap && (t.axisNameGap = t.nameGap,
  12629. delete t.nameGap)
  12630. }
  12631. )),
  12632. Td(Rd(t.geo), (function(t) {
  12633. Cd(t) && (Od(t),
  12634. Td(Rd(t.regions), (function(t) {
  12635. Od(t)
  12636. }
  12637. )))
  12638. }
  12639. )),
  12640. Td(Rd(t.timeline), (function(t) {
  12641. Od(t),
  12642. kd(t, "label"),
  12643. kd(t, "itemStyle"),
  12644. kd(t, "controlStyle", !0);
  12645. var e = t.data;
  12646. Y(e) && E(e, (function(t) {
  12647. q(t) && (kd(t, "label"),
  12648. kd(t, "itemStyle"))
  12649. }
  12650. ))
  12651. }
  12652. )),
  12653. Td(Rd(t.toolbox), (function(t) {
  12654. kd(t, "iconStyle"),
  12655. Td(t.feature, (function(t) {
  12656. kd(t, "iconStyle")
  12657. }
  12658. ))
  12659. }
  12660. )),
  12661. Pd(Nd(t.axisPointer), "label"),
  12662. Pd(Nd(t.tooltip).axisPointer, "label")
  12663. }
  12664. function zd(t) {
  12665. t && E(Vd, (function(e) {
  12666. e[0]in t && !(e[1]in t) && (t[e[1]] = t[e[0]])
  12667. }
  12668. ))
  12669. }
  12670. var Vd = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]]
  12671. , Bd = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"]
  12672. , Fd = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
  12673. function Gd(t) {
  12674. var e = t && t.itemStyle;
  12675. if (e)
  12676. for (var n = 0; n < Fd.length; n++) {
  12677. var i = Fd[n][1]
  12678. , r = Fd[n][0];
  12679. null != e[i] && (e[r] = e[i])
  12680. }
  12681. }
  12682. function Wd(t) {
  12683. t && "edge" === t.alignTo && null != t.margin && null == t.edgeDistance && (t.edgeDistance = t.margin)
  12684. }
  12685. function Hd(t) {
  12686. t && t.downplay && !t.blur && (t.blur = t.downplay)
  12687. }
  12688. function Yd(t, e) {
  12689. if (t)
  12690. for (var n = 0; n < t.length; n++)
  12691. e(t[n]),
  12692. t[n] && Yd(t[n].children, e)
  12693. }
  12694. function Xd(t, e) {
  12695. Ed(t, e),
  12696. t.series = To(t.series),
  12697. E(t.series, (function(t) {
  12698. if (q(t)) {
  12699. var e = t.type;
  12700. if ("line" === e)
  12701. null != t.clipOverflow && (t.clip = t.clipOverflow);
  12702. else if ("pie" === e || "gauge" === e) {
  12703. if (null != t.clockWise && (t.clockwise = t.clockWise),
  12704. Wd(t.label),
  12705. (r = t.data) && !$(r))
  12706. for (var n = 0; n < r.length; n++)
  12707. Wd(r[n]);
  12708. null != t.hoverOffset && (t.emphasis = t.emphasis || {},
  12709. (t.emphasis.scaleSize = null) && (t.emphasis.scaleSize = t.hoverOffset))
  12710. } else if ("gauge" === e) {
  12711. var i = function(t, e) {
  12712. for (var n = e.split(","), i = t, r = 0; r < n.length && null != (i = i && i[n[r]]); r++)
  12713. ;
  12714. return i
  12715. }(t, "pointer.color");
  12716. null != i && function(t, e, n, i) {
  12717. for (var r, o = e.split(","), a = t, s = 0; s < o.length - 1; s++)
  12718. null == a[r = o[s]] && (a[r] = {}),
  12719. a = a[r];
  12720. (i || null == a[o[s]]) && (a[o[s]] = n)
  12721. }(t, "itemStyle.color", i)
  12722. } else if ("bar" === e) {
  12723. var r;
  12724. if (Gd(t),
  12725. Gd(t.backgroundStyle),
  12726. Gd(t.emphasis),
  12727. (r = t.data) && !$(r))
  12728. for (n = 0; n < r.length; n++)
  12729. "object" == typeof r[n] && (Gd(r[n]),
  12730. Gd(r[n] && r[n].emphasis))
  12731. } else if ("sunburst" === e) {
  12732. var o = t.highlightPolicy;
  12733. o && (t.emphasis = t.emphasis || {},
  12734. t.emphasis.focus || (t.emphasis.focus = o)),
  12735. Hd(t),
  12736. Yd(t.data, Hd)
  12737. } else
  12738. "graph" === e || "sankey" === e ? function(t) {
  12739. t && null != t.focusNodeAdjacency && (t.emphasis = t.emphasis || {},
  12740. null == t.emphasis.focus && (t.emphasis.focus = "adjacency"))
  12741. }(t) : "map" === e && (t.mapType && !t.map && (t.map = t.mapType),
  12742. t.mapLocation && k(t, t.mapLocation));
  12743. null != t.hoverAnimation && (t.emphasis = t.emphasis || {},
  12744. t.emphasis && null == t.emphasis.scale && (t.emphasis.scale = t.hoverAnimation)),
  12745. zd(t)
  12746. }
  12747. }
  12748. )),
  12749. t.dataRange && (t.visualMap = t.dataRange),
  12750. E(Bd, (function(e) {
  12751. var n = t[e];
  12752. n && (Y(n) || (n = [n]),
  12753. E(n, (function(t) {
  12754. zd(t)
  12755. }
  12756. )))
  12757. }
  12758. ))
  12759. }
  12760. function Ud(t) {
  12761. E(t, (function(e, n) {
  12762. var i = []
  12763. , r = [NaN, NaN]
  12764. , o = [e.stackResultDimension, e.stackedOverDimension]
  12765. , a = e.data
  12766. , s = e.isStackedByIndex
  12767. , l = e.seriesModel.get("stackStrategy") || "samesign";
  12768. a.modify(o, (function(o, u, h) {
  12769. var c, p, d = a.get(e.stackedDimension, h);
  12770. if (isNaN(d))
  12771. return r;
  12772. s ? p = a.getRawIndex(h) : c = a.get(e.stackedByDimension, h);
  12773. for (var f = NaN, g = n - 1; g >= 0; g--) {
  12774. var y = t[g];
  12775. if (s || (p = y.data.rawIndexOf(y.stackedByDimension, c)),
  12776. p >= 0) {
  12777. var v = y.data.getByRawIndex(y.stackResultDimension, p);
  12778. if ("all" === l || "positive" === l && v > 0 || "negative" === l && v < 0 || "samesign" === l && d >= 0 && v > 0 || "samesign" === l && d <= 0 && v < 0) {
  12779. d = ro(d, v),
  12780. f = v;
  12781. break
  12782. }
  12783. }
  12784. }
  12785. return i[0] = d,
  12786. i[1] = f,
  12787. i
  12788. }
  12789. ))
  12790. }
  12791. ))
  12792. }
  12793. var Zd, jd, qd, Kd, $d, Jd = function(t) {
  12794. this.data = t.data || (t.sourceFormat === Xp ? {} : []),
  12795. this.sourceFormat = t.sourceFormat || Zp,
  12796. this.seriesLayoutBy = t.seriesLayoutBy || jp,
  12797. this.startIndex = t.startIndex || 0,
  12798. this.dimensionsDetectedCount = t.dimensionsDetectedCount,
  12799. this.metaRawOption = t.metaRawOption;
  12800. var e = this.dimensionsDefine = t.dimensionsDefine;
  12801. if (e)
  12802. for (var n = 0; n < e.length; n++) {
  12803. var i = e[n];
  12804. null == i.type && id(this, n) === Kp && (i.type = "ordinal")
  12805. }
  12806. };
  12807. function Qd(t) {
  12808. return t instanceof Jd
  12809. }
  12810. function tf(t, e, n) {
  12811. n = n || nf(t);
  12812. var i = e.seriesLayoutBy
  12813. , r = function(t, e, n, i, r) {
  12814. var o, a;
  12815. if (!t)
  12816. return {
  12817. dimensionsDefine: rf(r),
  12818. startIndex: a,
  12819. dimensionsDetectedCount: o
  12820. };
  12821. if (e === Hp) {
  12822. var s = t;
  12823. "auto" === i || null == i ? of((function(t) {
  12824. null != t && "-" !== t && (U(t) ? null == a && (a = 1) : a = 0)
  12825. }
  12826. ), n, s, 10) : a = j(i) ? i : i ? 1 : 0,
  12827. r || 1 !== a || (r = [],
  12828. of((function(t, e) {
  12829. r[e] = null != t ? t + "" : ""
  12830. }
  12831. ), n, s, 1 / 0)),
  12832. o = r ? r.length : n === qp ? s.length : s[0] ? s[0].length : null
  12833. } else if (e === Yp)
  12834. r || (r = function(t) {
  12835. var e, n = 0;
  12836. for (; n < t.length && !(e = t[n++]); )
  12837. ;
  12838. if (e)
  12839. return G(e)
  12840. }(t));
  12841. else if (e === Xp)
  12842. r || (r = [],
  12843. E(t, (function(t, e) {
  12844. r.push(e)
  12845. }
  12846. )));
  12847. else if (e === Wp) {
  12848. var l = Ao(t[0]);
  12849. o = Y(l) && l.length || 1
  12850. }
  12851. return {
  12852. startIndex: a,
  12853. dimensionsDefine: rf(r),
  12854. dimensionsDetectedCount: o
  12855. }
  12856. }(t, n, i, e.sourceHeader, e.dimensions);
  12857. return new Jd({
  12858. data: t,
  12859. sourceFormat: n,
  12860. seriesLayoutBy: i,
  12861. dimensionsDefine: r.dimensionsDefine,
  12862. startIndex: r.startIndex,
  12863. dimensionsDetectedCount: r.dimensionsDetectedCount,
  12864. metaRawOption: T(e)
  12865. })
  12866. }
  12867. function ef(t) {
  12868. return new Jd({
  12869. data: t,
  12870. sourceFormat: $(t) ? Up : Wp
  12871. })
  12872. }
  12873. function nf(t) {
  12874. var e = Zp;
  12875. if ($(t))
  12876. e = Up;
  12877. else if (Y(t)) {
  12878. 0 === t.length && (e = Hp);
  12879. for (var n = 0, i = t.length; n < i; n++) {
  12880. var r = t[n];
  12881. if (null != r) {
  12882. if (Y(r) || $(r)) {
  12883. e = Hp;
  12884. break
  12885. }
  12886. if (q(r)) {
  12887. e = Yp;
  12888. break
  12889. }
  12890. }
  12891. }
  12892. } else if (q(t))
  12893. for (var o in t)
  12894. if (_t(t, o) && N(t[o])) {
  12895. e = Xp;
  12896. break
  12897. }
  12898. return e
  12899. }
  12900. function rf(t) {
  12901. if (t) {
  12902. var e = yt();
  12903. return z(t, (function(t, n) {
  12904. var i = {
  12905. name: (t = q(t) ? t : {
  12906. name: t
  12907. }).name,
  12908. displayName: t.displayName,
  12909. type: t.type
  12910. };
  12911. if (null == i.name)
  12912. return i;
  12913. i.name += "",
  12914. null == i.displayName && (i.displayName = i.name);
  12915. var r = e.get(i.name);
  12916. return r ? i.name += "-" + r.count++ : e.set(i.name, {
  12917. count: 1
  12918. }),
  12919. i
  12920. }
  12921. ))
  12922. }
  12923. }
  12924. function of(t, e, n, i) {
  12925. if (e === qp)
  12926. for (var r = 0; r < n.length && r < i; r++)
  12927. t(n[r] ? n[r][0] : null, r);
  12928. else {
  12929. var o = n[0] || [];
  12930. for (r = 0; r < o.length && r < i; r++)
  12931. t(o[r], r)
  12932. }
  12933. }
  12934. function af(t) {
  12935. var e = t.sourceFormat;
  12936. return e === Yp || e === Xp
  12937. }
  12938. var sf = function() {
  12939. function t(t, e) {
  12940. var n = Qd(t) ? t : ef(t);
  12941. this._source = n;
  12942. var i = this._data = n.data;
  12943. n.sourceFormat === Up && (this._offset = 0,
  12944. this._dimSize = e,
  12945. this._data = i),
  12946. $d(this, i, n)
  12947. }
  12948. return t.prototype.getSource = function() {
  12949. return this._source
  12950. }
  12951. ,
  12952. t.prototype.count = function() {
  12953. return 0
  12954. }
  12955. ,
  12956. t.prototype.getItem = function(t, e) {}
  12957. ,
  12958. t.prototype.appendData = function(t) {}
  12959. ,
  12960. t.prototype.clean = function() {}
  12961. ,
  12962. t.protoInitialize = function() {
  12963. var e = t.prototype;
  12964. e.pure = !1,
  12965. e.persistent = !0
  12966. }(),
  12967. t.internalField = function() {
  12968. var t;
  12969. $d = function(t, r, o) {
  12970. var a = o.sourceFormat
  12971. , s = o.seriesLayoutBy
  12972. , l = o.startIndex
  12973. , u = o.dimensionsDefine
  12974. , h = Kd[vf(a, s)];
  12975. if (A(t, h),
  12976. a === Up)
  12977. t.getItem = e,
  12978. t.count = i,
  12979. t.fillStorage = n;
  12980. else {
  12981. var c = hf(a, s);
  12982. t.getItem = W(c, null, r, l, u);
  12983. var p = df(a, s);
  12984. t.count = W(p, null, r, l, u)
  12985. }
  12986. }
  12987. ;
  12988. var e = function(t, e) {
  12989. t -= this._offset,
  12990. e = e || [];
  12991. for (var n = this._data, i = this._dimSize, r = i * t, o = 0; o < i; o++)
  12992. e[o] = n[r + o];
  12993. return e
  12994. }
  12995. , n = function(t, e, n, i) {
  12996. for (var r = this._data, o = this._dimSize, a = 0; a < o; a++) {
  12997. 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++) {
  12998. var d = r[p * o + a];
  12999. c[t + p] = d,
  13000. d < l && (l = d),
  13001. d > u && (u = d)
  13002. }
  13003. s[0] = l,
  13004. s[1] = u
  13005. }
  13006. }
  13007. , i = function() {
  13008. return this._data ? this._data.length / this._dimSize : 0
  13009. };
  13010. function r(t) {
  13011. for (var e = 0; e < t.length; e++)
  13012. this._data.push(t[e])
  13013. }
  13014. (t = {})[Hp + "_" + jp] = {
  13015. pure: !0,
  13016. appendData: r
  13017. },
  13018. t[Hp + "_" + qp] = {
  13019. pure: !0,
  13020. appendData: function() {
  13021. throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
  13022. }
  13023. },
  13024. t[Yp] = {
  13025. pure: !0,
  13026. appendData: r
  13027. },
  13028. t[Xp] = {
  13029. pure: !0,
  13030. appendData: function(t) {
  13031. var e = this._data;
  13032. E(t, (function(t, n) {
  13033. for (var i = e[n] || (e[n] = []), r = 0; r < (t || []).length; r++)
  13034. i.push(t[r])
  13035. }
  13036. ))
  13037. }
  13038. },
  13039. t[Wp] = {
  13040. appendData: r
  13041. },
  13042. t[Up] = {
  13043. persistent: !1,
  13044. pure: !0,
  13045. appendData: function(t) {
  13046. this._data = t
  13047. },
  13048. clean: function() {
  13049. this._offset += this.count(),
  13050. this._data = null
  13051. }
  13052. },
  13053. Kd = t
  13054. }(),
  13055. t
  13056. }()
  13057. , lf = function(t, e, n, i) {
  13058. return t[i]
  13059. }
  13060. , uf = ((Zd = {})[Hp + "_" + jp] = function(t, e, n, i) {
  13061. return t[i + e]
  13062. }
  13063. ,
  13064. Zd[Hp + "_" + qp] = function(t, e, n, i, r) {
  13065. i += e;
  13066. for (var o = r || [], a = t, s = 0; s < a.length; s++) {
  13067. var l = a[s];
  13068. o[s] = l ? l[i] : null
  13069. }
  13070. return o
  13071. }
  13072. ,
  13073. Zd[Yp] = lf,
  13074. Zd[Xp] = function(t, e, n, i, r) {
  13075. for (var o = r || [], a = 0; a < n.length; a++) {
  13076. var s = n[a].name;
  13077. 0;
  13078. var l = t[s];
  13079. o[a] = l ? l[i] : null
  13080. }
  13081. return o
  13082. }
  13083. ,
  13084. Zd[Wp] = lf,
  13085. Zd);
  13086. function hf(t, e) {
  13087. var n = uf[vf(t, e)];
  13088. return n
  13089. }
  13090. var cf = function(t, e, n) {
  13091. return t.length
  13092. }
  13093. , pf = ((jd = {})[Hp + "_" + jp] = function(t, e, n) {
  13094. return Math.max(0, t.length - e)
  13095. }
  13096. ,
  13097. jd[Hp + "_" + qp] = function(t, e, n) {
  13098. var i = t[0];
  13099. return i ? Math.max(0, i.length - e) : 0
  13100. }
  13101. ,
  13102. jd[Yp] = cf,
  13103. jd[Xp] = function(t, e, n) {
  13104. var i = n[0].name;
  13105. var r = t[i];
  13106. return r ? r.length : 0
  13107. }
  13108. ,
  13109. jd[Wp] = cf,
  13110. jd);
  13111. function df(t, e) {
  13112. var n = pf[vf(t, e)];
  13113. return n
  13114. }
  13115. var ff = function(t, e, n) {
  13116. return t[e]
  13117. }
  13118. , gf = ((qd = {})[Hp] = ff,
  13119. qd[Yp] = function(t, e, n) {
  13120. return t[n]
  13121. }
  13122. ,
  13123. qd[Xp] = ff,
  13124. qd[Wp] = function(t, e, n) {
  13125. var i = Ao(t);
  13126. return i instanceof Array ? i[e] : i
  13127. }
  13128. ,
  13129. qd[Up] = ff,
  13130. qd);
  13131. function yf(t) {
  13132. var e = gf[t];
  13133. return e
  13134. }
  13135. function vf(t, e) {
  13136. return t === Hp ? t + "_" + e : t
  13137. }
  13138. function mf(t, e, n) {
  13139. if (t) {
  13140. var i = t.getRawDataItem(e);
  13141. if (null != i) {
  13142. var r = t.getStore()
  13143. , o = r.getSource().sourceFormat;
  13144. if (null != n) {
  13145. var a = t.getDimensionIndex(n)
  13146. , s = r.getDimensionProperty(a);
  13147. return yf(o)(i, a, s)
  13148. }
  13149. var l = i;
  13150. return o === Wp && (l = Ao(i)),
  13151. l
  13152. }
  13153. }
  13154. }
  13155. var xf = /\{@(.+?)\}/g
  13156. , _f = function() {
  13157. function t() {}
  13158. return t.prototype.getDataParams = function(t, e) {
  13159. var n = this.getData(e)
  13160. , i = this.getRawValue(t, e)
  13161. , r = n.getRawIndex(t)
  13162. , o = n.getName(t)
  13163. , a = n.getRawDataItem(t)
  13164. , s = n.getItemVisual(t, "style")
  13165. , l = s && s[n.getItemVisual(t, "drawType") || "fill"]
  13166. , u = s && s.stroke
  13167. , h = this.mainType
  13168. , c = "series" === h
  13169. , p = n.userOutput && n.userOutput.get();
  13170. return {
  13171. componentType: h,
  13172. componentSubType: this.subType,
  13173. componentIndex: this.componentIndex,
  13174. seriesType: c ? this.subType : null,
  13175. seriesIndex: this.seriesIndex,
  13176. seriesId: c ? this.id : null,
  13177. seriesName: c ? this.name : null,
  13178. name: o,
  13179. dataIndex: r,
  13180. data: a,
  13181. dataType: e,
  13182. value: i,
  13183. color: l,
  13184. borderColor: u,
  13185. dimensionNames: p ? p.fullDimensions : null,
  13186. encode: p ? p.encode : null,
  13187. $vars: ["seriesName", "name", "value"]
  13188. }
  13189. }
  13190. ,
  13191. t.prototype.getFormattedLabel = function(t, e, n, i, r, o) {
  13192. e = e || "normal";
  13193. var a = this.getData(n)
  13194. , s = this.getDataParams(t, n);
  13195. (o && (s.value = o.interpolatedValue),
  13196. null != i && Y(s.value) && (s.value = s.value[i]),
  13197. r) || (r = a.getItemModel(t).get("normal" === e ? ["label", "formatter"] : [e, "label", "formatter"]));
  13198. return X(r) ? (s.status = e,
  13199. s.dimensionIndex = i,
  13200. r(s)) : U(r) ? bp(r, s).replace(xf, (function(e, n) {
  13201. var i = n.length
  13202. , r = n;
  13203. "[" === r.charAt(0) && "]" === r.charAt(i - 1) && (r = +r.slice(1, i - 1));
  13204. var s = mf(a, t, r);
  13205. if (o && Y(o.interpolatedValue)) {
  13206. var l = a.getDimensionIndex(r);
  13207. l >= 0 && (s = o.interpolatedValue[l])
  13208. }
  13209. return null != s ? s + "" : ""
  13210. }
  13211. )) : void 0
  13212. }
  13213. ,
  13214. t.prototype.getRawValue = function(t, e) {
  13215. return mf(this.getData(e), t)
  13216. }
  13217. ,
  13218. t.prototype.formatTooltip = function(t, e, n) {}
  13219. ,
  13220. t
  13221. }();
  13222. function bf(t) {
  13223. var e, n;
  13224. return q(t) ? t.type && (n = t) : e = t,
  13225. {
  13226. text: e,
  13227. frag: n
  13228. }
  13229. }
  13230. function wf(t) {
  13231. return new Sf(t)
  13232. }
  13233. var Sf = function() {
  13234. function t(t) {
  13235. t = t || {},
  13236. this._reset = t.reset,
  13237. this._plan = t.plan,
  13238. this._count = t.count,
  13239. this._onDirty = t.onDirty,
  13240. this._dirty = !0
  13241. }
  13242. return t.prototype.perform = function(t) {
  13243. var e, n = this._upstream, i = t && t.skip;
  13244. if (this._dirty && n) {
  13245. var r = this.context;
  13246. r.data = r.outputData = n.context.outputData
  13247. }
  13248. this.__pipeline && (this.__pipeline.currentTask = this),
  13249. this._plan && !i && (e = this._plan(this.context));
  13250. var o, a = h(this._modBy), s = this._modDataCount || 0, l = h(t && t.modBy), u = t && t.modDataCount || 0;
  13251. function h(t) {
  13252. return !(t >= 1) && (t = 1),
  13253. t
  13254. }
  13255. a === l && s === u || (e = "reset"),
  13256. (this._dirty || "reset" === e) && (this._dirty = !1,
  13257. o = this._doReset(i)),
  13258. this._modBy = l,
  13259. this._modDataCount = u;
  13260. var c = t && t.step;
  13261. if (this._dueEnd = n ? n._outputDueEnd : this._count ? this._count(this.context) : 1 / 0,
  13262. this._progress) {
  13263. var p = this._dueIndex
  13264. , d = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
  13265. if (!i && (o || p < d)) {
  13266. var f = this._progress;
  13267. if (Y(f))
  13268. for (var g = 0; g < f.length; g++)
  13269. this._doProgress(f[g], p, d, l, u);
  13270. else
  13271. this._doProgress(f, p, d, l, u)
  13272. }
  13273. this._dueIndex = d;
  13274. var y = null != this._settedOutputEnd ? this._settedOutputEnd : d;
  13275. 0,
  13276. this._outputDueEnd = y
  13277. } else
  13278. this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
  13279. return this.unfinished()
  13280. }
  13281. ,
  13282. t.prototype.dirty = function() {
  13283. this._dirty = !0,
  13284. this._onDirty && this._onDirty(this.context)
  13285. }
  13286. ,
  13287. t.prototype._doProgress = function(t, e, n, i, r) {
  13288. Mf.reset(e, n, i, r),
  13289. this._callingProgress = t,
  13290. this._callingProgress({
  13291. start: e,
  13292. end: n,
  13293. count: n - e,
  13294. next: Mf.next
  13295. }, this.context)
  13296. }
  13297. ,
  13298. t.prototype._doReset = function(t) {
  13299. var e, n;
  13300. this._dueIndex = this._outputDueEnd = this._dueEnd = 0,
  13301. this._settedOutputEnd = null,
  13302. !t && this._reset && ((e = this._reset(this.context)) && e.progress && (n = e.forceFirstProgress,
  13303. e = e.progress),
  13304. Y(e) && !e.length && (e = null)),
  13305. this._progress = e,
  13306. this._modBy = this._modDataCount = null;
  13307. var i = this._downstream;
  13308. return i && i.dirty(),
  13309. n
  13310. }
  13311. ,
  13312. t.prototype.unfinished = function() {
  13313. return this._progress && this._dueIndex < this._dueEnd
  13314. }
  13315. ,
  13316. t.prototype.pipe = function(t) {
  13317. (this._downstream !== t || this._dirty) && (this._downstream = t,
  13318. t._upstream = this,
  13319. t.dirty())
  13320. }
  13321. ,
  13322. t.prototype.dispose = function() {
  13323. this._disposed || (this._upstream && (this._upstream._downstream = null),
  13324. this._downstream && (this._downstream._upstream = null),
  13325. this._dirty = !1,
  13326. this._disposed = !0)
  13327. }
  13328. ,
  13329. t.prototype.getUpstream = function() {
  13330. return this._upstream
  13331. }
  13332. ,
  13333. t.prototype.getDownstream = function() {
  13334. return this._downstream
  13335. }
  13336. ,
  13337. t.prototype.setOutputEnd = function(t) {
  13338. this._outputDueEnd = this._settedOutputEnd = t
  13339. }
  13340. ,
  13341. t
  13342. }()
  13343. , Mf = function() {
  13344. var t, e, n, i, r, o = {
  13345. reset: function(l, u, h, c) {
  13346. e = l,
  13347. t = u,
  13348. n = h,
  13349. i = c,
  13350. r = Math.ceil(i / n),
  13351. o.next = n > 1 && i > 0 ? s : a
  13352. }
  13353. };
  13354. return o;
  13355. function a() {
  13356. return e < t ? e++ : null
  13357. }
  13358. function s() {
  13359. var o = e % r * n + Math.ceil(e / r)
  13360. , a = e >= t ? null : o < i ? o : e;
  13361. return e++,
  13362. a
  13363. }
  13364. }();
  13365. function If(t, e) {
  13366. var n = e && e.type;
  13367. return "ordinal" === n ? t : ("time" !== n || j(t) || null == t || "-" === t || (t = +uo(t)),
  13368. null == t || "" === t ? NaN : Number(t))
  13369. }
  13370. var Tf = yt({
  13371. number: function(t) {
  13372. return parseFloat(t)
  13373. },
  13374. time: function(t) {
  13375. return +uo(t)
  13376. },
  13377. trim: function(t) {
  13378. return U(t) ? ut(t) : t
  13379. }
  13380. });
  13381. function Cf(t) {
  13382. return Tf.get(t)
  13383. }
  13384. var Df = {
  13385. lt: function(t, e) {
  13386. return t < e
  13387. },
  13388. lte: function(t, e) {
  13389. return t <= e
  13390. },
  13391. gt: function(t, e) {
  13392. return t > e
  13393. },
  13394. gte: function(t, e) {
  13395. return t >= e
  13396. }
  13397. }
  13398. , Af = function() {
  13399. function t(t, e) {
  13400. if (!j(e)) {
  13401. var n = "";
  13402. 0,
  13403. wo(n)
  13404. }
  13405. this._opFn = Df[t],
  13406. this._rvalFloat = yo(e)
  13407. }
  13408. return t.prototype.evaluate = function(t) {
  13409. return j(t) ? this._opFn(t, this._rvalFloat) : this._opFn(yo(t), this._rvalFloat)
  13410. }
  13411. ,
  13412. t
  13413. }()
  13414. , kf = function() {
  13415. function t(t, e) {
  13416. var n = "desc" === t;
  13417. this._resultLT = n ? 1 : -1,
  13418. null == e && (e = n ? "min" : "max"),
  13419. this._incomparable = "min" === e ? -1 / 0 : 1 / 0
  13420. }
  13421. return t.prototype.evaluate = function(t, e) {
  13422. var n = j(t) ? t : yo(t)
  13423. , i = j(e) ? e : yo(e)
  13424. , r = isNaN(n)
  13425. , o = isNaN(i);
  13426. if (r && (n = this._incomparable),
  13427. o && (i = this._incomparable),
  13428. r && o) {
  13429. var a = U(t)
  13430. , s = U(e);
  13431. a && (n = s ? t : 0),
  13432. s && (i = a ? e : 0)
  13433. }
  13434. return n < i ? this._resultLT : n > i ? -this._resultLT : 0
  13435. }
  13436. ,
  13437. t
  13438. }()
  13439. , Lf = function() {
  13440. function t(t, e) {
  13441. this._rval = e,
  13442. this._isEQ = t,
  13443. this._rvalTypeof = typeof e,
  13444. this._rvalFloat = yo(e)
  13445. }
  13446. return t.prototype.evaluate = function(t) {
  13447. var e = t === this._rval;
  13448. if (!e) {
  13449. var n = typeof t;
  13450. n === this._rvalTypeof || "number" !== n && "number" !== this._rvalTypeof || (e = yo(t) === this._rvalFloat)
  13451. }
  13452. return this._isEQ ? e : !e
  13453. }
  13454. ,
  13455. t
  13456. }();
  13457. function Pf(t, e) {
  13458. return "eq" === t || "ne" === t ? new Lf("eq" === t,e) : _t(Df, t) ? new Af(t,e) : null
  13459. }
  13460. var Of = function() {
  13461. function t() {}
  13462. return t.prototype.getRawData = function() {
  13463. throw new Error("not supported")
  13464. }
  13465. ,
  13466. t.prototype.getRawDataItem = function(t) {
  13467. throw new Error("not supported")
  13468. }
  13469. ,
  13470. t.prototype.cloneRawData = function() {}
  13471. ,
  13472. t.prototype.getDimensionInfo = function(t) {}
  13473. ,
  13474. t.prototype.cloneAllDimensionInfo = function() {}
  13475. ,
  13476. t.prototype.count = function() {}
  13477. ,
  13478. t.prototype.retrieveValue = function(t, e) {}
  13479. ,
  13480. t.prototype.retrieveValueFromItem = function(t, e) {}
  13481. ,
  13482. t.prototype.convertValue = function(t, e) {
  13483. return If(t, e)
  13484. }
  13485. ,
  13486. t
  13487. }();
  13488. function Rf(t) {
  13489. var e = t.sourceFormat;
  13490. if (!Ff(e)) {
  13491. var n = "";
  13492. 0,
  13493. wo(n)
  13494. }
  13495. return t.data
  13496. }
  13497. function Nf(t) {
  13498. var e = t.sourceFormat
  13499. , n = t.data;
  13500. if (!Ff(e)) {
  13501. var i = "";
  13502. 0,
  13503. wo(i)
  13504. }
  13505. if (e === Hp) {
  13506. for (var r = [], o = 0, a = n.length; o < a; o++)
  13507. r.push(n[o].slice());
  13508. return r
  13509. }
  13510. if (e === Yp) {
  13511. for (r = [],
  13512. o = 0,
  13513. a = n.length; o < a; o++)
  13514. r.push(A({}, n[o]));
  13515. return r
  13516. }
  13517. }
  13518. function Ef(t, e, n) {
  13519. if (null != n)
  13520. return j(n) || !isNaN(n) && !_t(e, n) ? t[n] : _t(e, n) ? e[n] : void 0
  13521. }
  13522. function zf(t) {
  13523. return T(t)
  13524. }
  13525. var Vf = yt();
  13526. function Bf(t, e, n, i) {
  13527. var r = "";
  13528. e.length || wo(r),
  13529. q(t) || wo(r);
  13530. var o = t.type
  13531. , a = Vf.get(o);
  13532. a || wo(r);
  13533. var s = z(e, (function(t) {
  13534. return function(t, e) {
  13535. var n = new Of
  13536. , i = t.data
  13537. , r = n.sourceFormat = t.sourceFormat
  13538. , o = t.startIndex
  13539. , a = "";
  13540. t.seriesLayoutBy !== jp && wo(a);
  13541. var s = []
  13542. , l = {}
  13543. , u = t.dimensionsDefine;
  13544. if (u)
  13545. E(u, (function(t, e) {
  13546. var n = t.name
  13547. , i = {
  13548. index: e,
  13549. name: n,
  13550. displayName: t.displayName
  13551. };
  13552. if (s.push(i),
  13553. null != n) {
  13554. var r = "";
  13555. _t(l, n) && wo(r),
  13556. l[n] = i
  13557. }
  13558. }
  13559. ));
  13560. else
  13561. for (var h = 0; h < t.dimensionsDetectedCount; h++)
  13562. s.push({
  13563. index: h
  13564. });
  13565. var c = hf(r, jp);
  13566. e.__isBuiltIn && (n.getRawDataItem = function(t) {
  13567. return c(i, o, s, t)
  13568. }
  13569. ,
  13570. n.getRawData = W(Rf, null, t)),
  13571. n.cloneRawData = W(Nf, null, t);
  13572. var p = df(r, jp);
  13573. n.count = W(p, null, i, o, s);
  13574. var d = yf(r);
  13575. n.retrieveValue = function(t, e) {
  13576. var n = c(i, o, s, t);
  13577. return f(n, e)
  13578. }
  13579. ;
  13580. var f = n.retrieveValueFromItem = function(t, e) {
  13581. if (null != t) {
  13582. var n = s[e];
  13583. return n ? d(t, e, n.name) : void 0
  13584. }
  13585. }
  13586. ;
  13587. return n.getDimensionInfo = W(Ef, null, s, l),
  13588. n.cloneAllDimensionInfo = W(zf, null, s),
  13589. n
  13590. }(t, a)
  13591. }
  13592. ))
  13593. , l = To(a.transform({
  13594. upstream: s[0],
  13595. upstreamList: s,
  13596. config: T(t.config)
  13597. }));
  13598. return z(l, (function(t, n) {
  13599. var i, r = "";
  13600. q(t) || wo(r),
  13601. t.data || wo(r),
  13602. Ff(nf(t.data)) || wo(r);
  13603. var o = e[0];
  13604. if (o && 0 === n && !t.dimensions) {
  13605. var a = o.startIndex;
  13606. a && (t.data = o.data.slice(0, a).concat(t.data)),
  13607. i = {
  13608. seriesLayoutBy: jp,
  13609. sourceHeader: a,
  13610. dimensions: o.metaRawOption.dimensions
  13611. }
  13612. } else
  13613. i = {
  13614. seriesLayoutBy: jp,
  13615. sourceHeader: 0,
  13616. dimensions: t.dimensions
  13617. };
  13618. return tf(t.data, i, null)
  13619. }
  13620. ))
  13621. }
  13622. function Ff(t) {
  13623. return t === Hp || t === Yp
  13624. }
  13625. var Gf, Wf = "undefined", Hf = typeof Uint32Array === Wf ? Array : Uint32Array, Yf = typeof Uint16Array === Wf ? Array : Uint16Array, Xf = typeof Int32Array === Wf ? Array : Int32Array, Uf = typeof Float64Array === Wf ? Array : Float64Array, Zf = {
  13626. float: Uf,
  13627. int: Xf,
  13628. ordinal: Array,
  13629. number: Array,
  13630. time: Uf
  13631. };
  13632. function jf(t) {
  13633. return t > 65535 ? Hf : Yf
  13634. }
  13635. function qf(t, e, n, i, r) {
  13636. var o = Zf[n || "float"];
  13637. if (r) {
  13638. var a = t[e]
  13639. , s = a && a.length;
  13640. if (s !== i) {
  13641. for (var l = new o(i), u = 0; u < s; u++)
  13642. l[u] = a[u];
  13643. t[e] = l
  13644. }
  13645. } else
  13646. t[e] = new o(i)
  13647. }
  13648. var Kf = function() {
  13649. function t() {
  13650. this._chunks = [],
  13651. this._rawExtent = [],
  13652. this._extent = [],
  13653. this._count = 0,
  13654. this._rawCount = 0,
  13655. this._calcDimNameToIdx = yt()
  13656. }
  13657. return t.prototype.initData = function(t, e, n) {
  13658. this._provider = t,
  13659. this._chunks = [],
  13660. this._indices = null,
  13661. this.getRawIndex = this._getRawIdxIdentity;
  13662. var i = t.getSource()
  13663. , r = this.defaultDimValueGetter = Gf[i.sourceFormat];
  13664. this._dimValueGetter = n || r,
  13665. this._rawExtent = [];
  13666. af(i);
  13667. this._dimensions = z(e, (function(t) {
  13668. return {
  13669. type: t.type,
  13670. property: t.property
  13671. }
  13672. }
  13673. )),
  13674. this._initDataFromProvider(0, t.count())
  13675. }
  13676. ,
  13677. t.prototype.getProvider = function() {
  13678. return this._provider
  13679. }
  13680. ,
  13681. t.prototype.getSource = function() {
  13682. return this._provider.getSource()
  13683. }
  13684. ,
  13685. t.prototype.ensureCalculationDimension = function(t, e) {
  13686. var n = this._calcDimNameToIdx
  13687. , i = this._dimensions
  13688. , r = n.get(t);
  13689. if (null != r) {
  13690. if (i[r].type === e)
  13691. return r
  13692. } else
  13693. r = i.length;
  13694. return i[r] = {
  13695. type: e
  13696. },
  13697. n.set(t, r),
  13698. this._chunks[r] = new Zf[e || "float"](this._rawCount),
  13699. this._rawExtent[r] = [1 / 0, -1 / 0],
  13700. r
  13701. }
  13702. ,
  13703. t.prototype.collectOrdinalMeta = function(t, e) {
  13704. var n = this._chunks[t]
  13705. , i = this._dimensions[t]
  13706. , r = this._rawExtent
  13707. , o = i.ordinalOffset || 0
  13708. , a = n.length;
  13709. 0 === o && (r[t] = [1 / 0, -1 / 0]);
  13710. for (var s = r[t], l = o; l < a; l++) {
  13711. var u = n[l] = e.parseAndCollect(n[l]);
  13712. isNaN(u) || (s[0] = Math.min(u, s[0]),
  13713. s[1] = Math.max(u, s[1]))
  13714. }
  13715. i.ordinalMeta = e,
  13716. i.ordinalOffset = a,
  13717. i.type = "ordinal"
  13718. }
  13719. ,
  13720. t.prototype.getOrdinalMeta = function(t) {
  13721. return this._dimensions[t].ordinalMeta
  13722. }
  13723. ,
  13724. t.prototype.getDimensionProperty = function(t) {
  13725. var e = this._dimensions[t];
  13726. return e && e.property
  13727. }
  13728. ,
  13729. t.prototype.appendData = function(t) {
  13730. var e = this._provider
  13731. , n = this.count();
  13732. e.appendData(t);
  13733. var i = e.count();
  13734. return e.persistent || (i += n),
  13735. n < i && this._initDataFromProvider(n, i, !0),
  13736. [n, i]
  13737. }
  13738. ,
  13739. t.prototype.appendValues = function(t, e) {
  13740. 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++) {
  13741. qf(n, l, (d = i[l]).type, s, !0)
  13742. }
  13743. for (var u = [], h = a; h < s; h++)
  13744. for (var c = h - a, p = 0; p < r; p++) {
  13745. var d = i[p]
  13746. , f = Gf.arrayRows.call(this, t[c] || u, d.property, c, p);
  13747. n[p][h] = f;
  13748. var g = o[p];
  13749. f < g[0] && (g[0] = f),
  13750. f > g[1] && (g[1] = f)
  13751. }
  13752. return this._rawCount = this._count = s,
  13753. {
  13754. start: a,
  13755. end: s
  13756. }
  13757. }
  13758. ,
  13759. t.prototype._initDataFromProvider = function(t, e, n) {
  13760. for (var i = this._provider, r = this._chunks, o = this._dimensions, a = o.length, s = this._rawExtent, l = z(o, (function(t) {
  13761. return t.property
  13762. }
  13763. )), u = 0; u < a; u++) {
  13764. var h = o[u];
  13765. s[u] || (s[u] = [1 / 0, -1 / 0]),
  13766. qf(r, u, h.type, e, n)
  13767. }
  13768. if (i.fillStorage)
  13769. i.fillStorage(t, e, r, s);
  13770. else
  13771. for (var c = [], p = t; p < e; p++) {
  13772. c = i.getItem(p, c);
  13773. for (var d = 0; d < a; d++) {
  13774. var f = r[d]
  13775. , g = this._dimValueGetter(c, l[d], p, d);
  13776. f[p] = g;
  13777. var y = s[d];
  13778. g < y[0] && (y[0] = g),
  13779. g > y[1] && (y[1] = g)
  13780. }
  13781. }
  13782. !i.persistent && i.clean && i.clean(),
  13783. this._rawCount = this._count = e,
  13784. this._extent = []
  13785. }
  13786. ,
  13787. t.prototype.count = function() {
  13788. return this._count
  13789. }
  13790. ,
  13791. t.prototype.get = function(t, e) {
  13792. if (!(e >= 0 && e < this._count))
  13793. return NaN;
  13794. var n = this._chunks[t];
  13795. return n ? n[this.getRawIndex(e)] : NaN
  13796. }
  13797. ,
  13798. t.prototype.getValues = function(t, e) {
  13799. var n = []
  13800. , i = [];
  13801. if (null == e) {
  13802. e = t,
  13803. t = [];
  13804. for (var r = 0; r < this._dimensions.length; r++)
  13805. i.push(r)
  13806. } else
  13807. i = t;
  13808. r = 0;
  13809. for (var o = i.length; r < o; r++)
  13810. n.push(this.get(i[r], e));
  13811. return n
  13812. }
  13813. ,
  13814. t.prototype.getByRawIndex = function(t, e) {
  13815. if (!(e >= 0 && e < this._rawCount))
  13816. return NaN;
  13817. var n = this._chunks[t];
  13818. return n ? n[e] : NaN
  13819. }
  13820. ,
  13821. t.prototype.getSum = function(t) {
  13822. var e = 0;
  13823. if (this._chunks[t])
  13824. for (var n = 0, i = this.count(); n < i; n++) {
  13825. var r = this.get(t, n);
  13826. isNaN(r) || (e += r)
  13827. }
  13828. return e
  13829. }
  13830. ,
  13831. t.prototype.getMedian = function(t) {
  13832. var e = [];
  13833. this.each([t], (function(t) {
  13834. isNaN(t) || e.push(t)
  13835. }
  13836. ));
  13837. var n = e.sort((function(t, e) {
  13838. return t - e
  13839. }
  13840. ))
  13841. , i = this.count();
  13842. return 0 === i ? 0 : i % 2 == 1 ? n[(i - 1) / 2] : (n[i / 2] + n[i / 2 - 1]) / 2
  13843. }
  13844. ,
  13845. t.prototype.indexOfRawIndex = function(t) {
  13846. if (t >= this._rawCount || t < 0)
  13847. return -1;
  13848. if (!this._indices)
  13849. return t;
  13850. var e = this._indices
  13851. , n = e[t];
  13852. if (null != n && n < this._count && n === t)
  13853. return t;
  13854. for (var i = 0, r = this._count - 1; i <= r; ) {
  13855. var o = (i + r) / 2 | 0;
  13856. if (e[o] < t)
  13857. i = o + 1;
  13858. else {
  13859. if (!(e[o] > t))
  13860. return o;
  13861. r = o - 1
  13862. }
  13863. }
  13864. return -1
  13865. }
  13866. ,
  13867. t.prototype.indicesOfNearest = function(t, e, n) {
  13868. var i = this._chunks[t]
  13869. , r = [];
  13870. if (!i)
  13871. return r;
  13872. null == n && (n = 1 / 0);
  13873. for (var o = 1 / 0, a = -1, s = 0, l = 0, u = this.count(); l < u; l++) {
  13874. var h = e - i[this.getRawIndex(l)]
  13875. , c = Math.abs(h);
  13876. c <= n && ((c < o || c === o && h >= 0 && a < 0) && (o = c,
  13877. a = h,
  13878. s = 0),
  13879. h === a && (r[s++] = l))
  13880. }
  13881. return r.length = s,
  13882. r
  13883. }
  13884. ,
  13885. t.prototype.getIndices = function() {
  13886. var t, e = this._indices;
  13887. if (e) {
  13888. var n = e.constructor
  13889. , i = this._count;
  13890. if (n === Array) {
  13891. t = new n(i);
  13892. for (var r = 0; r < i; r++)
  13893. t[r] = e[r]
  13894. } else
  13895. t = new n(e.buffer,0,i)
  13896. } else {
  13897. t = new (n = jf(this._rawCount))(this.count());
  13898. for (r = 0; r < t.length; r++)
  13899. t[r] = r
  13900. }
  13901. return t
  13902. }
  13903. ,
  13904. t.prototype.filter = function(t, e) {
  13905. if (!this._count)
  13906. return this;
  13907. 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++) {
  13908. var c = void 0
  13909. , p = n.getRawIndex(h);
  13910. if (0 === a)
  13911. c = e(h);
  13912. else if (1 === a) {
  13913. c = e(u[l][p], h)
  13914. } else {
  13915. for (var d = 0; d < a; d++)
  13916. o[d] = u[t[d]][p];
  13917. o[d] = h,
  13918. c = e.apply(null, o)
  13919. }
  13920. c && (r[s++] = p)
  13921. }
  13922. return s < i && (n._indices = r),
  13923. n._count = s,
  13924. n._extent = [],
  13925. n._updateGetRawIdx(),
  13926. n
  13927. }
  13928. ,
  13929. t.prototype.selectRange = function(t) {
  13930. var e = this.clone()
  13931. , n = e._count;
  13932. if (!n)
  13933. return this;
  13934. var i = G(t)
  13935. , r = i.length;
  13936. if (!r)
  13937. return this;
  13938. var o = e.count()
  13939. , a = new (jf(e._rawCount))(o)
  13940. , s = 0
  13941. , l = i[0]
  13942. , u = t[l][0]
  13943. , h = t[l][1]
  13944. , c = e._chunks
  13945. , p = !1;
  13946. if (!e._indices) {
  13947. var d = 0;
  13948. if (1 === r) {
  13949. for (var f = c[i[0]], g = 0; g < n; g++) {
  13950. ((x = f[g]) >= u && x <= h || isNaN(x)) && (a[s++] = d),
  13951. d++
  13952. }
  13953. p = !0
  13954. } else if (2 === r) {
  13955. f = c[i[0]];
  13956. var y = c[i[1]]
  13957. , v = t[i[1]][0]
  13958. , m = t[i[1]][1];
  13959. for (g = 0; g < n; g++) {
  13960. var x = f[g]
  13961. , _ = y[g];
  13962. (x >= u && x <= h || isNaN(x)) && (_ >= v && _ <= m || isNaN(_)) && (a[s++] = d),
  13963. d++
  13964. }
  13965. p = !0
  13966. }
  13967. }
  13968. if (!p)
  13969. if (1 === r)
  13970. for (g = 0; g < o; g++) {
  13971. var b = e.getRawIndex(g);
  13972. ((x = c[i[0]][b]) >= u && x <= h || isNaN(x)) && (a[s++] = b)
  13973. }
  13974. else
  13975. for (g = 0; g < o; g++) {
  13976. for (var w = !0, S = (b = e.getRawIndex(g),
  13977. 0); S < r; S++) {
  13978. var M = i[S];
  13979. ((x = c[M][b]) < t[M][0] || x > t[M][1]) && (w = !1)
  13980. }
  13981. w && (a[s++] = e.getRawIndex(g))
  13982. }
  13983. return s < o && (e._indices = a),
  13984. e._count = s,
  13985. e._extent = [],
  13986. e._updateGetRawIdx(),
  13987. e
  13988. }
  13989. ,
  13990. t.prototype.map = function(t, e) {
  13991. var n = this.clone(t);
  13992. return this._updateDims(n, t, e),
  13993. n
  13994. }
  13995. ,
  13996. t.prototype.modify = function(t, e) {
  13997. this._updateDims(this, t, e)
  13998. }
  13999. ,
  14000. t.prototype._updateDims = function(t, e, n) {
  14001. for (var i = t._chunks, r = [], o = e.length, a = t.count(), s = [], l = t._rawExtent, u = 0; u < e.length; u++)
  14002. l[e[u]] = [1 / 0, -1 / 0];
  14003. for (var h = 0; h < a; h++) {
  14004. for (var c = t.getRawIndex(h), p = 0; p < o; p++)
  14005. s[p] = i[e[p]][c];
  14006. s[o] = h;
  14007. var d = n && n.apply(null, s);
  14008. if (null != d) {
  14009. "object" != typeof d && (r[0] = d,
  14010. d = r);
  14011. for (u = 0; u < d.length; u++) {
  14012. var f = e[u]
  14013. , g = d[u]
  14014. , y = l[f]
  14015. , v = i[f];
  14016. v && (v[c] = g),
  14017. g < y[0] && (y[0] = g),
  14018. g > y[1] && (y[1] = g)
  14019. }
  14020. }
  14021. }
  14022. }
  14023. ,
  14024. t.prototype.lttbDownSample = function(t, e) {
  14025. var n, i, r, o = this.clone([t], !0), a = o._chunks[t], s = this.count(), l = 0, u = Math.floor(1 / e), h = this.getRawIndex(0), c = new (jf(this._rawCount))(Math.min(2 * (Math.ceil(s / u) + 2), s));
  14026. c[l++] = h;
  14027. for (var p = 1; p < s - 1; p += u) {
  14028. 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++) {
  14029. var m = a[I = this.getRawIndex(v)];
  14030. isNaN(m) || (y += m)
  14031. }
  14032. y /= f - d;
  14033. var x = p
  14034. , _ = Math.min(p + u, s)
  14035. , b = p - 1
  14036. , w = a[h];
  14037. n = -1,
  14038. r = x;
  14039. var S = -1
  14040. , M = 0;
  14041. for (v = x; v < _; v++) {
  14042. var I;
  14043. m = a[I = this.getRawIndex(v)];
  14044. isNaN(m) ? (M++,
  14045. S < 0 && (S = I)) : (i = Math.abs((b - g) * (m - w) - (b - v) * (y - w))) > n && (n = i,
  14046. r = I)
  14047. }
  14048. M > 0 && M < _ - x && (c[l++] = Math.min(S, r),
  14049. r = Math.max(S, r)),
  14050. c[l++] = r,
  14051. h = r
  14052. }
  14053. return c[l++] = this.getRawIndex(s - 1),
  14054. o._count = l,
  14055. o._indices = c,
  14056. o.getRawIndex = this._getRawIdx,
  14057. o
  14058. }
  14059. ,
  14060. t.prototype.minmaxDownSample = function(t, e) {
  14061. for (var n = this.clone([t], !0), i = n._chunks, r = Math.floor(1 / e), o = i[t], a = this.count(), s = new (jf(this._rawCount))(2 * Math.ceil(a / r)), l = 0, u = 0; u < a; u += r) {
  14062. var h = u
  14063. , c = o[this.getRawIndex(h)]
  14064. , p = u
  14065. , d = o[this.getRawIndex(p)]
  14066. , f = r;
  14067. u + r > a && (f = a - u);
  14068. for (var g = 0; g < f; g++) {
  14069. var y = o[this.getRawIndex(u + g)];
  14070. y < c && (c = y,
  14071. h = u + g),
  14072. y > d && (d = y,
  14073. p = u + g)
  14074. }
  14075. var v = this.getRawIndex(h)
  14076. , m = this.getRawIndex(p);
  14077. h < p ? (s[l++] = v,
  14078. s[l++] = m) : (s[l++] = m,
  14079. s[l++] = v)
  14080. }
  14081. return n._count = l,
  14082. n._indices = s,
  14083. n._updateGetRawIdx(),
  14084. n
  14085. }
  14086. ,
  14087. t.prototype.downSample = function(t, e, n, i) {
  14088. 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) {
  14089. s > u - d && (s = u - d,
  14090. a.length = s);
  14091. for (var f = 0; f < s; f++) {
  14092. var g = this.getRawIndex(d + f);
  14093. a[f] = l[g]
  14094. }
  14095. var y = n(a)
  14096. , v = this.getRawIndex(Math.min(d + i(a, y) || 0, u - 1));
  14097. l[v] = y,
  14098. y < h[0] && (h[0] = y),
  14099. y > h[1] && (h[1] = y),
  14100. c[p++] = v
  14101. }
  14102. return r._count = p,
  14103. r._indices = c,
  14104. r._updateGetRawIdx(),
  14105. r
  14106. }
  14107. ,
  14108. t.prototype.each = function(t, e) {
  14109. if (this._count)
  14110. for (var n = t.length, i = this._chunks, r = 0, o = this.count(); r < o; r++) {
  14111. var a = this.getRawIndex(r);
  14112. switch (n) {
  14113. case 0:
  14114. e(r);
  14115. break;
  14116. case 1:
  14117. e(i[t[0]][a], r);
  14118. break;
  14119. case 2:
  14120. e(i[t[0]][a], i[t[1]][a], r);
  14121. break;
  14122. default:
  14123. for (var s = 0, l = []; s < n; s++)
  14124. l[s] = i[t[s]][a];
  14125. l[s] = r,
  14126. e.apply(null, l)
  14127. }
  14128. }
  14129. }
  14130. ,
  14131. t.prototype.getDataExtent = function(t) {
  14132. var e = this._chunks[t]
  14133. , n = [1 / 0, -1 / 0];
  14134. if (!e)
  14135. return n;
  14136. var i, r = this.count();
  14137. if (!this._indices)
  14138. return this._rawExtent[t].slice();
  14139. if (i = this._extent[t])
  14140. return i.slice();
  14141. for (var o = (i = n)[0], a = i[1], s = 0; s < r; s++) {
  14142. var l = e[this.getRawIndex(s)];
  14143. l < o && (o = l),
  14144. l > a && (a = l)
  14145. }
  14146. return i = [o, a],
  14147. this._extent[t] = i,
  14148. i
  14149. }
  14150. ,
  14151. t.prototype.getRawDataItem = function(t) {
  14152. var e = this.getRawIndex(t);
  14153. if (this._provider.persistent)
  14154. return this._provider.getItem(e);
  14155. for (var n = [], i = this._chunks, r = 0; r < i.length; r++)
  14156. n.push(i[r][e]);
  14157. return n
  14158. }
  14159. ,
  14160. t.prototype.clone = function(e, n) {
  14161. var i, r, o = new t, a = this._chunks, s = e && V(e, (function(t, e) {
  14162. return t[e] = !0,
  14163. t
  14164. }
  14165. ), {});
  14166. if (s)
  14167. for (var l = 0; l < a.length; l++)
  14168. o._chunks[l] = s[l] ? (i = a[l],
  14169. r = void 0,
  14170. (r = i.constructor) === Array ? i.slice() : new r(i)) : a[l];
  14171. else
  14172. o._chunks = a;
  14173. return this._copyCommonProps(o),
  14174. n || (o._indices = this._cloneIndices()),
  14175. o._updateGetRawIdx(),
  14176. o
  14177. }
  14178. ,
  14179. t.prototype._copyCommonProps = function(t) {
  14180. t._count = this._count,
  14181. t._rawCount = this._rawCount,
  14182. t._provider = this._provider,
  14183. t._dimensions = this._dimensions,
  14184. t._extent = T(this._extent),
  14185. t._rawExtent = T(this._rawExtent)
  14186. }
  14187. ,
  14188. t.prototype._cloneIndices = function() {
  14189. if (this._indices) {
  14190. var t = this._indices.constructor
  14191. , e = void 0;
  14192. if (t === Array) {
  14193. var n = this._indices.length;
  14194. e = new t(n);
  14195. for (var i = 0; i < n; i++)
  14196. e[i] = this._indices[i]
  14197. } else
  14198. e = new t(this._indices);
  14199. return e
  14200. }
  14201. return null
  14202. }
  14203. ,
  14204. t.prototype._getRawIdxIdentity = function(t) {
  14205. return t
  14206. }
  14207. ,
  14208. t.prototype._getRawIdx = function(t) {
  14209. return t < this._count && t >= 0 ? this._indices[t] : -1
  14210. }
  14211. ,
  14212. t.prototype._updateGetRawIdx = function() {
  14213. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity
  14214. }
  14215. ,
  14216. t.internalField = function() {
  14217. function t(t, e, n, i) {
  14218. return If(t[i], this._dimensions[i])
  14219. }
  14220. Gf = {
  14221. arrayRows: t,
  14222. objectRows: function(t, e, n, i) {
  14223. return If(t[e], this._dimensions[i])
  14224. },
  14225. keyedColumns: t,
  14226. original: function(t, e, n, i) {
  14227. var r = t && (null == t.value ? t : t.value);
  14228. return If(r instanceof Array ? r[i] : r, this._dimensions[i])
  14229. },
  14230. typedArray: function(t, e, n, i) {
  14231. return t[i]
  14232. }
  14233. }
  14234. }(),
  14235. t
  14236. }()
  14237. , $f = function() {
  14238. function t(t) {
  14239. this._sourceList = [],
  14240. this._storeList = [],
  14241. this._upstreamSignList = [],
  14242. this._versionSignBase = 0,
  14243. this._dirty = !0,
  14244. this._sourceHost = t
  14245. }
  14246. return t.prototype.dirty = function() {
  14247. this._setLocalSource([], []),
  14248. this._storeList = [],
  14249. this._dirty = !0
  14250. }
  14251. ,
  14252. t.prototype._setLocalSource = function(t, e) {
  14253. this._sourceList = t,
  14254. this._upstreamSignList = e,
  14255. this._versionSignBase++,
  14256. this._versionSignBase > 9e10 && (this._versionSignBase = 0)
  14257. }
  14258. ,
  14259. t.prototype._getVersionSign = function() {
  14260. return this._sourceHost.uid + "_" + this._versionSignBase
  14261. }
  14262. ,
  14263. t.prototype.prepareSource = function() {
  14264. this._isDirty() && (this._createSource(),
  14265. this._dirty = !1)
  14266. }
  14267. ,
  14268. t.prototype._createSource = function() {
  14269. this._setLocalSource([], []);
  14270. var t, e, n = this._sourceHost, i = this._getUpstreamSourceManagers(), r = !!i.length;
  14271. if (Qf(n)) {
  14272. var o = n
  14273. , a = void 0
  14274. , s = void 0
  14275. , l = void 0;
  14276. if (r) {
  14277. var u = i[0];
  14278. u.prepareSource(),
  14279. a = (l = u.getSource()).data,
  14280. s = l.sourceFormat,
  14281. e = [u._getVersionSign()]
  14282. } else
  14283. s = $(a = o.get("data", !0)) ? Up : Wp,
  14284. e = [];
  14285. var h = this._getSourceMetaRawOption() || {}
  14286. , c = l && l.metaRawOption || {}
  14287. , p = rt(h.seriesLayoutBy, c.seriesLayoutBy) || null
  14288. , d = rt(h.sourceHeader, c.sourceHeader)
  14289. , f = rt(h.dimensions, c.dimensions);
  14290. t = p !== c.seriesLayoutBy || !!d != !!c.sourceHeader || f ? [tf(a, {
  14291. seriesLayoutBy: p,
  14292. sourceHeader: d,
  14293. dimensions: f
  14294. }, s)] : []
  14295. } else {
  14296. var g = n;
  14297. if (r) {
  14298. var y = this._applyTransform(i);
  14299. t = y.sourceList,
  14300. e = y.upstreamSignList
  14301. } else {
  14302. t = [tf(g.get("source", !0), this._getSourceMetaRawOption(), null)],
  14303. e = []
  14304. }
  14305. }
  14306. this._setLocalSource(t, e)
  14307. }
  14308. ,
  14309. t.prototype._applyTransform = function(t) {
  14310. var e, n = this._sourceHost, i = n.get("transform", !0), r = n.get("fromTransformResult", !0);
  14311. if (null != r) {
  14312. var o = "";
  14313. 1 !== t.length && tg(o)
  14314. }
  14315. var a, s = [], l = [];
  14316. return E(t, (function(t) {
  14317. t.prepareSource();
  14318. var e = t.getSource(r || 0)
  14319. , n = "";
  14320. null == r || e || tg(n),
  14321. s.push(e),
  14322. l.push(t._getVersionSign())
  14323. }
  14324. )),
  14325. i ? e = function(t, e, n) {
  14326. var i = To(t)
  14327. , r = i.length
  14328. , o = "";
  14329. r || wo(o);
  14330. for (var a = 0, s = r; a < s; a++)
  14331. e = Bf(i[a], e),
  14332. a !== s - 1 && (e.length = Math.max(e.length, 1));
  14333. return e
  14334. }(i, s, n.componentIndex) : null != r && (e = [(a = s[0],
  14335. new Jd({
  14336. data: a.data,
  14337. sourceFormat: a.sourceFormat,
  14338. seriesLayoutBy: a.seriesLayoutBy,
  14339. dimensionsDefine: T(a.dimensionsDefine),
  14340. startIndex: a.startIndex,
  14341. dimensionsDetectedCount: a.dimensionsDetectedCount
  14342. }))]),
  14343. {
  14344. sourceList: e,
  14345. upstreamSignList: l
  14346. }
  14347. }
  14348. ,
  14349. t.prototype._isDirty = function() {
  14350. if (this._dirty)
  14351. return !0;
  14352. for (var t = this._getUpstreamSourceManagers(), e = 0; e < t.length; e++) {
  14353. var n = t[e];
  14354. if (n._isDirty() || this._upstreamSignList[e] !== n._getVersionSign())
  14355. return !0
  14356. }
  14357. }
  14358. ,
  14359. t.prototype.getSource = function(t) {
  14360. t = t || 0;
  14361. var e = this._sourceList[t];
  14362. if (!e) {
  14363. var n = this._getUpstreamSourceManagers();
  14364. return n[0] && n[0].getSource(t)
  14365. }
  14366. return e
  14367. }
  14368. ,
  14369. t.prototype.getSharedDataStore = function(t) {
  14370. var e = t.makeStoreSchema();
  14371. return this._innerGetDataStore(e.dimensions, t.source, e.hash)
  14372. }
  14373. ,
  14374. t.prototype._innerGetDataStore = function(t, e, n) {
  14375. var i = this._storeList
  14376. , r = i[0];
  14377. r || (r = i[0] = {});
  14378. var o = r[n];
  14379. if (!o) {
  14380. var a = this._getUpstreamSourceManagers()[0];
  14381. Qf(this._sourceHost) && a ? o = a._innerGetDataStore(t, e, n) : (o = new Kf).initData(new sf(e,t.length), t),
  14382. r[n] = o
  14383. }
  14384. return o
  14385. }
  14386. ,
  14387. t.prototype._getUpstreamSourceManagers = function() {
  14388. var t = this._sourceHost;
  14389. if (Qf(t)) {
  14390. var e = nd(t);
  14391. return e ? [e.getSourceManager()] : []
  14392. }
  14393. return z(function(t) {
  14394. return t.get("transform", !0) || t.get("fromTransformResult", !0) ? Yo(t.ecModel, "dataset", {
  14395. index: t.get("fromDatasetIndex", !0),
  14396. id: t.get("fromDatasetId", !0)
  14397. }, Wo).models : []
  14398. }(t), (function(t) {
  14399. return t.getSourceManager()
  14400. }
  14401. ))
  14402. }
  14403. ,
  14404. t.prototype._getSourceMetaRawOption = function() {
  14405. var t, e, n, i = this._sourceHost;
  14406. if (Qf(i))
  14407. t = i.get("seriesLayoutBy", !0),
  14408. e = i.get("sourceHeader", !0),
  14409. n = i.get("dimensions", !0);
  14410. else if (!this._getUpstreamSourceManagers().length) {
  14411. var r = i;
  14412. t = r.get("seriesLayoutBy", !0),
  14413. e = r.get("sourceHeader", !0),
  14414. n = r.get("dimensions", !0)
  14415. }
  14416. return {
  14417. seriesLayoutBy: t,
  14418. sourceHeader: e,
  14419. dimensions: n
  14420. }
  14421. }
  14422. ,
  14423. t
  14424. }();
  14425. function Jf(t) {
  14426. t.option.transform && ct(t.option.transform)
  14427. }
  14428. function Qf(t) {
  14429. return "series" === t.mainType
  14430. }
  14431. function tg(t) {
  14432. throw new Error(t)
  14433. }
  14434. function eg(t) {
  14435. var e = t.lineHeight;
  14436. return null == e ? "line-height:1" : "line-height:" + re(e + "") + "px"
  14437. }
  14438. function ng(t, e) {
  14439. var n = t.color || "#6e7079"
  14440. , i = t.fontSize || 12
  14441. , r = t.fontWeight || "400"
  14442. , o = t.color || "#464646"
  14443. , a = t.fontSize || 14
  14444. , s = t.fontWeight || "900";
  14445. return "html" === e ? {
  14446. nameStyle: "font-size:" + re(i + "") + "px;color:" + re(n) + ";font-weight:" + re(r + ""),
  14447. valueStyle: "font-size:" + re(a + "") + "px;color:" + re(o) + ";font-weight:" + re(s + "")
  14448. } : {
  14449. nameStyle: {
  14450. fontSize: i,
  14451. fill: n,
  14452. fontWeight: r
  14453. },
  14454. valueStyle: {
  14455. fontSize: a,
  14456. fill: o,
  14457. fontWeight: s
  14458. }
  14459. }
  14460. }
  14461. var ig = [0, 10, 20, 30]
  14462. , rg = ["", "\n", "\n\n", "\n\n\n"];
  14463. function og(t, e) {
  14464. return e.type = t,
  14465. e
  14466. }
  14467. function ag(t) {
  14468. return "section" === t.type
  14469. }
  14470. function sg(t) {
  14471. return ag(t) ? ug : hg
  14472. }
  14473. function lg(t) {
  14474. if (ag(t)) {
  14475. var e = 0
  14476. , n = t.blocks.length
  14477. , i = n > 1 || n > 0 && !t.noHeader;
  14478. return E(t.blocks, (function(t) {
  14479. var n = lg(t);
  14480. n >= e && (e = n + +(i && (!n || ag(t) && !t.noHeader)))
  14481. }
  14482. )),
  14483. e
  14484. }
  14485. return 0
  14486. }
  14487. function ug(t, e, n, i) {
  14488. var r, o = e.noHeader, a = (r = lg(e),
  14489. {
  14490. html: ig[r],
  14491. richText: rg[r]
  14492. }), s = [], l = e.blocks || [];
  14493. lt(!l || Y(l)),
  14494. l = l || [];
  14495. var u = t.orderMode;
  14496. if (e.sortBlocks && u) {
  14497. l = l.slice();
  14498. var h = {
  14499. valueAsc: "asc",
  14500. valueDesc: "desc"
  14501. };
  14502. if (_t(h, u)) {
  14503. var c = new kf(h[u],null);
  14504. l.sort((function(t, e) {
  14505. return c.evaluate(t.sortParam, e.sortParam)
  14506. }
  14507. ))
  14508. } else
  14509. "seriesDesc" === u && l.reverse()
  14510. }
  14511. E(l, (function(n, r) {
  14512. var o = e.valueFormatter
  14513. , l = sg(n)(o ? A(A({}, t), {
  14514. valueFormatter: o
  14515. }) : t, n, r > 0 ? a.html : 0, i);
  14516. null != l && s.push(l)
  14517. }
  14518. ));
  14519. var p = "richText" === t.renderMode ? s.join(a.richText) : pg(i, s.join(""), o ? n : a.html);
  14520. if (o)
  14521. return p;
  14522. var d = mp(e.header, "ordinal", t.useUTC)
  14523. , f = ng(i, t.renderMode).nameStyle
  14524. , g = eg(i);
  14525. return "richText" === t.renderMode ? dg(t, d, f) + a.richText + p : pg(i, '<div style="' + f + ";" + g + ';">' + re(d) + "</div>" + p, n)
  14526. }
  14527. function hg(t, e, n, i) {
  14528. var r = t.renderMode
  14529. , o = e.noName
  14530. , a = e.noValue
  14531. , s = !e.markerType
  14532. , l = e.name
  14533. , u = t.useUTC
  14534. , h = e.valueFormatter || t.valueFormatter || function(t) {
  14535. return z(t = Y(t) ? t : [t], (function(t, e) {
  14536. return mp(t, Y(d) ? d[e] : d, u)
  14537. }
  14538. ))
  14539. }
  14540. ;
  14541. if (!o || !a) {
  14542. var c = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", r)
  14543. , p = o ? "" : mp(l, "ordinal", u)
  14544. , d = e.valueType
  14545. , f = a ? [] : h(e.value, e.dataIndex)
  14546. , g = !s || !o
  14547. , y = !s && o
  14548. , v = ng(i, r)
  14549. , m = v.nameStyle
  14550. , x = v.valueStyle;
  14551. return "richText" === r ? (s ? "" : c) + (o ? "" : dg(t, p, m)) + (a ? "" : function(t, e, n, i, r) {
  14552. var o = [r]
  14553. , a = i ? 10 : 20;
  14554. return n && o.push({
  14555. padding: [0, 0, 0, a],
  14556. align: "right"
  14557. }),
  14558. t.markupStyleCreator.wrapRichTextStyle(Y(e) ? e.join(" ") : e, o)
  14559. }(t, f, g, y, x)) : pg(i, (s ? "" : c) + (o ? "" : function(t, e, n) {
  14560. return '<span style="' + n + ";" + (e ? "margin-left:2px" : "") + '">' + re(t) + "</span>"
  14561. }(p, !s, m)) + (a ? "" : function(t, e, n, i) {
  14562. var r = n ? "10px" : "20px"
  14563. , o = e ? "float:right;margin-left:" + r : "";
  14564. return t = Y(t) ? t : [t],
  14565. '<span style="' + o + ";" + i + '">' + z(t, (function(t) {
  14566. return re(t)
  14567. }
  14568. )).join("&nbsp;&nbsp;") + "</span>"
  14569. }(f, g, y, x)), n)
  14570. }
  14571. }
  14572. function cg(t, e, n, i, r, o) {
  14573. if (t)
  14574. return sg(t)({
  14575. useUTC: r,
  14576. renderMode: n,
  14577. orderMode: i,
  14578. markupStyleCreator: e,
  14579. valueFormatter: t.valueFormatter
  14580. }, t, 0, o)
  14581. }
  14582. function pg(t, e, n) {
  14583. return '<div style="' + ("margin: " + n + "px 0 0") + ";" + eg(t) + ';">' + e + '<div style="clear:both"></div></div>'
  14584. }
  14585. function dg(t, e, n) {
  14586. return t.markupStyleCreator.wrapRichTextStyle(e, n)
  14587. }
  14588. function fg(t, e) {
  14589. return Sp(t.getData().getItemVisual(e, "style")[t.visualDrawType])
  14590. }
  14591. function gg(t, e) {
  14592. var n = t.get("padding");
  14593. return null != n ? n : "richText" === e ? [8, 10] : 10
  14594. }
  14595. var yg = function() {
  14596. function t() {
  14597. this.richTextStyles = {},
  14598. this._nextStyleNameId = mo()
  14599. }
  14600. return t.prototype._generateStyleName = function() {
  14601. return "__EC_aUTo_" + this._nextStyleNameId++
  14602. }
  14603. ,
  14604. t.prototype.makeTooltipMarker = function(t, e, n) {
  14605. var i = "richText" === n ? this._generateStyleName() : null
  14606. , r = wp({
  14607. color: e,
  14608. type: t,
  14609. renderMode: n,
  14610. markerId: i
  14611. });
  14612. return U(r) ? r : (this.richTextStyles[i] = r.style,
  14613. r.content)
  14614. }
  14615. ,
  14616. t.prototype.wrapRichTextStyle = function(t, e) {
  14617. var n = {};
  14618. Y(e) ? E(e, (function(t) {
  14619. return A(n, t)
  14620. }
  14621. )) : A(n, e);
  14622. var i = this._generateStyleName();
  14623. return this.richTextStyles[i] = n,
  14624. "{" + i + "|" + t + "}"
  14625. }
  14626. ,
  14627. t
  14628. }();
  14629. function vg(t) {
  14630. var e, n, i, r, o = t.series, a = t.dataIndex, s = t.multipleSeries, l = o.getData(), u = l.mapDimensionsAll("defaultedTooltip"), h = u.length, c = o.getRawValue(a), p = Y(c), d = fg(o, a);
  14631. if (h > 1 || p && !h) {
  14632. var f = function(t, e, n, i, r) {
  14633. var o = e.getData()
  14634. , a = V(t, (function(t, e, n) {
  14635. var i = o.getDimensionInfo(n);
  14636. return t || i && !1 !== i.tooltip && null != i.displayName
  14637. }
  14638. ), !1)
  14639. , s = []
  14640. , l = []
  14641. , u = [];
  14642. function h(t, e) {
  14643. var n = o.getDimensionInfo(e);
  14644. n && !1 !== n.otherDims.tooltip && (a ? u.push(og("nameValue", {
  14645. markerType: "subItem",
  14646. markerColor: r,
  14647. name: n.displayName,
  14648. value: t,
  14649. valueType: n.type
  14650. })) : (s.push(t),
  14651. l.push(n.type)))
  14652. }
  14653. return i.length ? E(i, (function(t) {
  14654. h(mf(o, n, t), t)
  14655. }
  14656. )) : E(t, h),
  14657. {
  14658. inlineValues: s,
  14659. inlineValueTypes: l,
  14660. blocks: u
  14661. }
  14662. }(c, o, a, u, d);
  14663. e = f.inlineValues,
  14664. n = f.inlineValueTypes,
  14665. i = f.blocks,
  14666. r = f.inlineValues[0]
  14667. } else if (h) {
  14668. var g = l.getDimensionInfo(u[0]);
  14669. r = e = mf(l, a, u[0]),
  14670. n = g.type
  14671. } else
  14672. r = e = p ? c[0] : c;
  14673. var y = No(o)
  14674. , v = y && o.name || ""
  14675. , m = l.getName(a)
  14676. , x = s ? v : m;
  14677. return og("section", {
  14678. header: v,
  14679. noHeader: s || !y,
  14680. sortParam: r,
  14681. blocks: [og("nameValue", {
  14682. markerType: "item",
  14683. markerColor: d,
  14684. name: x,
  14685. noName: !ut(x),
  14686. value: e,
  14687. valueType: n,
  14688. dataIndex: a
  14689. })].concat(i || [])
  14690. })
  14691. }
  14692. var mg = Vo();
  14693. function xg(t, e) {
  14694. return t.getName(e) || t.getId(e)
  14695. }
  14696. var _g = "__universalTransitionEnabled"
  14697. , bg = function(t) {
  14698. function e() {
  14699. var e = null !== t && t.apply(this, arguments) || this;
  14700. return e._selectedDataIndicesMap = {},
  14701. e
  14702. }
  14703. return n(e, t),
  14704. e.prototype.init = function(t, e, n) {
  14705. this.seriesIndex = this.componentIndex,
  14706. this.dataTask = wf({
  14707. count: Sg,
  14708. reset: Mg
  14709. }),
  14710. this.dataTask.context = {
  14711. model: this
  14712. },
  14713. this.mergeDefaultAndTheme(t, n),
  14714. (mg(this).sourceManager = new $f(this)).prepareSource();
  14715. var i = this.getInitialData(t, n);
  14716. Tg(i, this),
  14717. this.dataTask.context.data = i,
  14718. mg(this).dataBeforeProcessed = i,
  14719. wg(this),
  14720. this._initSelectedMapFromData(i)
  14721. }
  14722. ,
  14723. e.prototype.mergeDefaultAndTheme = function(t, e) {
  14724. var n = Pp(this)
  14725. , i = n ? Rp(t) : {}
  14726. , r = this.subType;
  14727. zp.hasClass(r) && (r += "Series"),
  14728. C(t, e.getTheme().get(this.subType)),
  14729. C(t, this.getDefaultOption()),
  14730. Co(t, "label", ["show"]),
  14731. this.fillDataTextStyle(t.data),
  14732. n && Op(t, i, n)
  14733. }
  14734. ,
  14735. e.prototype.mergeOption = function(t, e) {
  14736. t = C(this.option, t, !0),
  14737. this.fillDataTextStyle(t.data);
  14738. var n = Pp(this);
  14739. n && Op(this.option, t, n);
  14740. var i = mg(this).sourceManager;
  14741. i.dirty(),
  14742. i.prepareSource();
  14743. var r = this.getInitialData(t, e);
  14744. Tg(r, this),
  14745. this.dataTask.dirty(),
  14746. this.dataTask.context.data = r,
  14747. mg(this).dataBeforeProcessed = r,
  14748. wg(this),
  14749. this._initSelectedMapFromData(r)
  14750. }
  14751. ,
  14752. e.prototype.fillDataTextStyle = function(t) {
  14753. if (t && !$(t))
  14754. for (var e = ["show"], n = 0; n < t.length; n++)
  14755. t[n] && t[n].label && Co(t[n], "label", e)
  14756. }
  14757. ,
  14758. e.prototype.getInitialData = function(t, e) {}
  14759. ,
  14760. e.prototype.appendData = function(t) {
  14761. this.getRawData().appendData(t.data)
  14762. }
  14763. ,
  14764. e.prototype.getData = function(t) {
  14765. var e = Dg(this);
  14766. if (e) {
  14767. var n = e.context.data;
  14768. return null != t && n.getLinkedData ? n.getLinkedData(t) : n
  14769. }
  14770. return mg(this).data
  14771. }
  14772. ,
  14773. e.prototype.getAllData = function() {
  14774. var t = this.getData();
  14775. return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{
  14776. data: t
  14777. }]
  14778. }
  14779. ,
  14780. e.prototype.setData = function(t) {
  14781. var e = Dg(this);
  14782. if (e) {
  14783. var n = e.context;
  14784. n.outputData = t,
  14785. e !== this.dataTask && (n.data = t)
  14786. }
  14787. mg(this).data = t
  14788. }
  14789. ,
  14790. e.prototype.getEncode = function() {
  14791. var t = this.get("encode", !0);
  14792. if (t)
  14793. return yt(t)
  14794. }
  14795. ,
  14796. e.prototype.getSourceManager = function() {
  14797. return mg(this).sourceManager
  14798. }
  14799. ,
  14800. e.prototype.getSource = function() {
  14801. return this.getSourceManager().getSource()
  14802. }
  14803. ,
  14804. e.prototype.getRawData = function() {
  14805. return mg(this).dataBeforeProcessed
  14806. }
  14807. ,
  14808. e.prototype.getColorBy = function() {
  14809. return this.get("colorBy") || "series"
  14810. }
  14811. ,
  14812. e.prototype.isColorBySeries = function() {
  14813. return "series" === this.getColorBy()
  14814. }
  14815. ,
  14816. e.prototype.getBaseAxis = function() {
  14817. var t = this.coordinateSystem;
  14818. return t && t.getBaseAxis && t.getBaseAxis()
  14819. }
  14820. ,
  14821. e.prototype.formatTooltip = function(t, e, n) {
  14822. return vg({
  14823. series: this,
  14824. dataIndex: t,
  14825. multipleSeries: e
  14826. })
  14827. }
  14828. ,
  14829. e.prototype.isAnimationEnabled = function() {
  14830. var t = this.ecModel;
  14831. if (r.node && (!t || !t.ssr))
  14832. return !1;
  14833. var e = this.getShallow("animation");
  14834. return e && this.getData().count() > this.getShallow("animationThreshold") && (e = !1),
  14835. !!e
  14836. }
  14837. ,
  14838. e.prototype.restoreData = function() {
  14839. this.dataTask.dirty()
  14840. }
  14841. ,
  14842. e.prototype.getColorFromPalette = function(t, e, n) {
  14843. var i = this.ecModel
  14844. , r = cd.prototype.getColorFromPalette.call(this, t, e, n);
  14845. return r || (r = i.getColorFromPalette(t, e, n)),
  14846. r
  14847. }
  14848. ,
  14849. e.prototype.coordDimToDataDim = function(t) {
  14850. return this.getRawData().mapDimensionsAll(t)
  14851. }
  14852. ,
  14853. e.prototype.getProgressive = function() {
  14854. return this.get("progressive")
  14855. }
  14856. ,
  14857. e.prototype.getProgressiveThreshold = function() {
  14858. return this.get("progressiveThreshold")
  14859. }
  14860. ,
  14861. e.prototype.select = function(t, e) {
  14862. this._innerSelect(this.getData(e), t)
  14863. }
  14864. ,
  14865. e.prototype.unselect = function(t, e) {
  14866. var n = this.option.selectedMap;
  14867. if (n) {
  14868. var i = this.option.selectedMode
  14869. , r = this.getData(e);
  14870. if ("series" === i || "all" === n)
  14871. return this.option.selectedMap = {},
  14872. void (this._selectedDataIndicesMap = {});
  14873. for (var o = 0; o < t.length; o++) {
  14874. var a = xg(r, t[o]);
  14875. n[a] = !1,
  14876. this._selectedDataIndicesMap[a] = -1
  14877. }
  14878. }
  14879. }
  14880. ,
  14881. e.prototype.toggleSelect = function(t, e) {
  14882. for (var n = [], i = 0; i < t.length; i++)
  14883. n[0] = t[i],
  14884. this.isSelected(t[i], e) ? this.unselect(n, e) : this.select(n, e)
  14885. }
  14886. ,
  14887. e.prototype.getSelectedDataIndices = function() {
  14888. if ("all" === this.option.selectedMap)
  14889. return [].slice.call(this.getData().getIndices());
  14890. for (var t = this._selectedDataIndicesMap, e = G(t), n = [], i = 0; i < e.length; i++) {
  14891. var r = t[e[i]];
  14892. r >= 0 && n.push(r)
  14893. }
  14894. return n
  14895. }
  14896. ,
  14897. e.prototype.isSelected = function(t, e) {
  14898. var n = this.option.selectedMap;
  14899. if (!n)
  14900. return !1;
  14901. var i = this.getData(e);
  14902. return ("all" === n || n[xg(i, t)]) && !i.getItemModel(t).get(["select", "disabled"])
  14903. }
  14904. ,
  14905. e.prototype.isUniversalTransitionEnabled = function() {
  14906. if (this[_g])
  14907. return !0;
  14908. var t = this.option.universalTransition;
  14909. return !!t && (!0 === t || t && t.enabled)
  14910. }
  14911. ,
  14912. e.prototype._innerSelect = function(t, e) {
  14913. var n, i, r = this.option, o = r.selectedMode, a = e.length;
  14914. if (o && a)
  14915. if ("series" === o)
  14916. r.selectedMap = "all";
  14917. else if ("multiple" === o) {
  14918. q(r.selectedMap) || (r.selectedMap = {});
  14919. for (var s = r.selectedMap, l = 0; l < a; l++) {
  14920. var u = e[l];
  14921. s[c = xg(t, u)] = !0,
  14922. this._selectedDataIndicesMap[c] = t.getRawIndex(u)
  14923. }
  14924. } else if ("single" === o || !0 === o) {
  14925. var h = e[a - 1]
  14926. , c = xg(t, h);
  14927. r.selectedMap = ((n = {})[c] = !0,
  14928. n),
  14929. this._selectedDataIndicesMap = ((i = {})[c] = t.getRawIndex(h),
  14930. i)
  14931. }
  14932. }
  14933. ,
  14934. e.prototype._initSelectedMapFromData = function(t) {
  14935. if (!this.option.selectedMap) {
  14936. var e = [];
  14937. t.hasItemOption && t.each((function(n) {
  14938. var i = t.getRawDataItem(n);
  14939. i && i.selected && e.push(n)
  14940. }
  14941. )),
  14942. e.length > 0 && this._innerSelect(t, e)
  14943. }
  14944. }
  14945. ,
  14946. e.registerClass = function(t) {
  14947. return zp.registerClass(t)
  14948. }
  14949. ,
  14950. e.protoInitialize = function() {
  14951. var t = e.prototype;
  14952. t.type = "series.__base__",
  14953. t.seriesIndex = 0,
  14954. t.ignoreStyleOnData = !1,
  14955. t.hasSymbolVisual = !1,
  14956. t.defaultSymbol = "circle",
  14957. t.visualStyleAccessPath = "itemStyle",
  14958. t.visualDrawType = "fill"
  14959. }(),
  14960. e
  14961. }(zp);
  14962. function wg(t) {
  14963. var e = t.name;
  14964. No(t) || (t.name = function(t) {
  14965. var e = t.getRawData()
  14966. , n = e.mapDimensionsAll("seriesName")
  14967. , i = [];
  14968. return E(n, (function(t) {
  14969. var n = e.getDimensionInfo(t);
  14970. n.displayName && i.push(n.displayName)
  14971. }
  14972. )),
  14973. i.join(" ")
  14974. }(t) || e)
  14975. }
  14976. function Sg(t) {
  14977. return t.model.getRawData().count()
  14978. }
  14979. function Mg(t) {
  14980. var e = t.model;
  14981. return e.setData(e.getRawData().cloneShallow()),
  14982. Ig
  14983. }
  14984. function Ig(t, e) {
  14985. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData)
  14986. }
  14987. function Tg(t, e) {
  14988. E(vt(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), (function(n) {
  14989. t.wrapMethod(n, H(Cg, e))
  14990. }
  14991. ))
  14992. }
  14993. function Cg(t, e) {
  14994. var n = Dg(t);
  14995. return n && n.setOutputEnd((e || this).count()),
  14996. e
  14997. }
  14998. function Dg(t) {
  14999. var e = (t.ecModel || {}).scheduler
  15000. , n = e && e.getPipeline(t.uid);
  15001. if (n) {
  15002. var i = n.currentTask;
  15003. if (i) {
  15004. var r = i.agentStubMap;
  15005. r && (i = r.get(t.uid))
  15006. }
  15007. return i
  15008. }
  15009. }
  15010. R(bg, _f),
  15011. R(bg, cd),
  15012. Jo(bg, zp);
  15013. var Ag = function() {
  15014. function t() {
  15015. this.group = new Br,
  15016. this.uid = Ac("viewComponent")
  15017. }
  15018. return t.prototype.init = function(t, e) {}
  15019. ,
  15020. t.prototype.render = function(t, e, n, i) {}
  15021. ,
  15022. t.prototype.dispose = function(t, e) {}
  15023. ,
  15024. t.prototype.updateView = function(t, e, n, i) {}
  15025. ,
  15026. t.prototype.updateLayout = function(t, e, n, i) {}
  15027. ,
  15028. t.prototype.updateVisual = function(t, e, n, i) {}
  15029. ,
  15030. t.prototype.toggleBlurSeries = function(t, e, n) {}
  15031. ,
  15032. t.prototype.eachRendered = function(t) {
  15033. var e = this.group;
  15034. e && e.traverse(t)
  15035. }
  15036. ,
  15037. t
  15038. }();
  15039. function kg() {
  15040. var t = Vo();
  15041. return function(e) {
  15042. var n = t(e)
  15043. , i = e.pipelineContext
  15044. , r = !!n.large
  15045. , o = !!n.progressiveRender
  15046. , a = n.large = !(!i || !i.large)
  15047. , s = n.progressiveRender = !(!i || !i.progressiveRender);
  15048. return !(r === a && o === s) && "reset"
  15049. }
  15050. }
  15051. $o(Ag),
  15052. na(Ag);
  15053. var Lg = Vo()
  15054. , Pg = kg()
  15055. , Og = function() {
  15056. function t() {
  15057. this.group = new Br,
  15058. this.uid = Ac("viewChart"),
  15059. this.renderTask = wf({
  15060. plan: Eg,
  15061. reset: zg
  15062. }),
  15063. this.renderTask.context = {
  15064. view: this
  15065. }
  15066. }
  15067. return t.prototype.init = function(t, e) {}
  15068. ,
  15069. t.prototype.render = function(t, e, n, i) {
  15070. 0
  15071. }
  15072. ,
  15073. t.prototype.highlight = function(t, e, n, i) {
  15074. var r = t.getData(i && i.dataType);
  15075. r && Ng(r, i, "emphasis")
  15076. }
  15077. ,
  15078. t.prototype.downplay = function(t, e, n, i) {
  15079. var r = t.getData(i && i.dataType);
  15080. r && Ng(r, i, "normal")
  15081. }
  15082. ,
  15083. t.prototype.remove = function(t, e) {
  15084. this.group.removeAll()
  15085. }
  15086. ,
  15087. t.prototype.dispose = function(t, e) {}
  15088. ,
  15089. t.prototype.updateView = function(t, e, n, i) {
  15090. this.render(t, e, n, i)
  15091. }
  15092. ,
  15093. t.prototype.updateLayout = function(t, e, n, i) {
  15094. this.render(t, e, n, i)
  15095. }
  15096. ,
  15097. t.prototype.updateVisual = function(t, e, n, i) {
  15098. this.render(t, e, n, i)
  15099. }
  15100. ,
  15101. t.prototype.eachRendered = function(t) {
  15102. Jh(this.group, t)
  15103. }
  15104. ,
  15105. t.markUpdateMethod = function(t, e) {
  15106. Lg(t).updateMethod = e
  15107. }
  15108. ,
  15109. t.protoInitialize = void (t.prototype.type = "chart"),
  15110. t
  15111. }();
  15112. function Rg(t, e, n) {
  15113. t && Ql(t) && ("emphasis" === e ? Ol : Rl)(t, n)
  15114. }
  15115. function Ng(t, e, n) {
  15116. var i = zo(t, e)
  15117. , r = e && null != e.highlightKey ? function(t) {
  15118. var e = sl[t];
  15119. return null == e && al <= 32 && (e = sl[t] = al++),
  15120. e
  15121. }(e.highlightKey) : null;
  15122. null != i ? E(To(i), (function(e) {
  15123. Rg(t.getItemGraphicEl(e), n, r)
  15124. }
  15125. )) : t.eachItemGraphicEl((function(t) {
  15126. Rg(t, n, r)
  15127. }
  15128. ))
  15129. }
  15130. function Eg(t) {
  15131. return Pg(t.model)
  15132. }
  15133. function zg(t) {
  15134. var e = t.model
  15135. , n = t.ecModel
  15136. , i = t.api
  15137. , r = t.payload
  15138. , o = e.pipelineContext.progressiveRender
  15139. , a = t.view
  15140. , s = r && Lg(r).updateMethod
  15141. , l = o ? "incrementalPrepareRender" : s && a[s] ? s : "render";
  15142. return "render" !== l && a[l](e, n, i, r),
  15143. Vg[l]
  15144. }
  15145. $o(Og),
  15146. na(Og);
  15147. var Vg = {
  15148. incrementalPrepareRender: {
  15149. progress: function(t, e) {
  15150. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload)
  15151. }
  15152. },
  15153. render: {
  15154. forceFirstProgress: !0,
  15155. progress: function(t, e) {
  15156. e.view.render(e.model, e.ecModel, e.api, e.payload)
  15157. }
  15158. }
  15159. }
  15160. , Bg = "\0__throttleOriginMethod"
  15161. , Fg = "\0__throttleRate"
  15162. , Gg = "\0__throttleType";
  15163. function Wg(t, e, n) {
  15164. var i, r, o, a, s, l = 0, u = 0, h = null;
  15165. function c() {
  15166. u = (new Date).getTime(),
  15167. h = null,
  15168. t.apply(o, a || [])
  15169. }
  15170. e = e || 0;
  15171. var p = function() {
  15172. for (var t = [], p = 0; p < arguments.length; p++)
  15173. t[p] = arguments[p];
  15174. i = (new Date).getTime(),
  15175. o = this,
  15176. a = t;
  15177. var d = s || e
  15178. , f = s || n;
  15179. s = null,
  15180. r = i - (f ? l : u) - d,
  15181. clearTimeout(h),
  15182. f ? h = setTimeout(c, d) : r >= 0 ? c() : h = setTimeout(c, -r),
  15183. l = i
  15184. };
  15185. return p.clear = function() {
  15186. h && (clearTimeout(h),
  15187. h = null)
  15188. }
  15189. ,
  15190. p.debounceNextCall = function(t) {
  15191. s = t
  15192. }
  15193. ,
  15194. p
  15195. }
  15196. function Hg(t, e, n, i) {
  15197. var r = t[e];
  15198. if (r) {
  15199. var o = r[Bg] || r
  15200. , a = r[Gg];
  15201. if (r[Fg] !== n || a !== i) {
  15202. if (null == n || !i)
  15203. return t[e] = o;
  15204. (r = t[e] = Wg(o, n, "debounce" === i))[Bg] = o,
  15205. r[Gg] = i,
  15206. r[Fg] = n
  15207. }
  15208. return r
  15209. }
  15210. }
  15211. function Yg(t, e) {
  15212. var n = t[e];
  15213. n && n[Bg] && (n.clear && n.clear(),
  15214. t[e] = n[Bg])
  15215. }
  15216. var Xg = Vo()
  15217. , Ug = {
  15218. itemStyle: ia(Mc, !0),
  15219. lineStyle: ia(bc, !0)
  15220. }
  15221. , Zg = {
  15222. lineStyle: "stroke",
  15223. itemStyle: "fill"
  15224. };
  15225. function jg(t, e) {
  15226. var n = t.visualStyleMapper || Ug[e];
  15227. return n || (console.warn("Unknown style type '" + e + "'."),
  15228. Ug.itemStyle)
  15229. }
  15230. function qg(t, e) {
  15231. var n = t.visualDrawType || Zg[e];
  15232. return n || (console.warn("Unknown style type '" + e + "'."),
  15233. "fill")
  15234. }
  15235. var Kg = {
  15236. createOnAllSeries: !0,
  15237. performRawSeries: !0,
  15238. reset: function(t, e) {
  15239. var n = t.getData()
  15240. , i = t.visualStyleAccessPath || "itemStyle"
  15241. , r = t.getModel(i)
  15242. , o = jg(t, i)(r)
  15243. , a = r.getShallow("decal");
  15244. a && (n.setVisual("decal", a),
  15245. a.dirty = !0);
  15246. var s = qg(t, i)
  15247. , l = o[s]
  15248. , u = X(l) ? l : null
  15249. , h = "auto" === o.fill || "auto" === o.stroke;
  15250. if (!o[s] || u || h) {
  15251. var c = t.getColorFromPalette(t.name, null, e.getSeriesCount());
  15252. o[s] || (o[s] = c,
  15253. n.setVisual("colorFromPalette", !0)),
  15254. o.fill = "auto" === o.fill || X(o.fill) ? c : o.fill,
  15255. o.stroke = "auto" === o.stroke || X(o.stroke) ? c : o.stroke
  15256. }
  15257. if (n.setVisual("style", o),
  15258. n.setVisual("drawType", s),
  15259. !e.isSeriesFiltered(t) && u)
  15260. return n.setVisual("colorFromPalette", !1),
  15261. {
  15262. dataEach: function(e, n) {
  15263. var i = t.getDataParams(n)
  15264. , r = A({}, o);
  15265. r[s] = u(i),
  15266. e.setItemVisual(n, "style", r)
  15267. }
  15268. }
  15269. }
  15270. }
  15271. , $g = new Cc
  15272. , Jg = {
  15273. createOnAllSeries: !0,
  15274. performRawSeries: !0,
  15275. reset: function(t, e) {
  15276. if (!t.ignoreStyleOnData && !e.isSeriesFiltered(t)) {
  15277. var n = t.getData()
  15278. , i = t.visualStyleAccessPath || "itemStyle"
  15279. , r = jg(t, i)
  15280. , o = n.getVisual("drawType");
  15281. return {
  15282. dataEach: n.hasItemOption ? function(t, e) {
  15283. var n = t.getRawDataItem(e);
  15284. if (n && n[i]) {
  15285. $g.option = n[i];
  15286. var a = r($g);
  15287. A(t.ensureUniqueItemVisual(e, "style"), a),
  15288. $g.option.decal && (t.setItemVisual(e, "decal", $g.option.decal),
  15289. $g.option.decal.dirty = !0),
  15290. o in a && t.setItemVisual(e, "colorFromPalette", !1)
  15291. }
  15292. }
  15293. : null
  15294. }
  15295. }
  15296. }
  15297. }
  15298. , Qg = {
  15299. performRawSeries: !0,
  15300. overallReset: function(t) {
  15301. var e = yt();
  15302. t.eachSeries((function(t) {
  15303. var n = t.getColorBy();
  15304. if (!t.isColorBySeries()) {
  15305. var i = t.type + "-" + n
  15306. , r = e.get(i);
  15307. r || (r = {},
  15308. e.set(i, r)),
  15309. Xg(t).scope = r
  15310. }
  15311. }
  15312. )),
  15313. t.eachSeries((function(e) {
  15314. if (!e.isColorBySeries() && !t.isSeriesFiltered(e)) {
  15315. var n = e.getRawData()
  15316. , i = {}
  15317. , r = e.getData()
  15318. , o = Xg(e).scope
  15319. , a = e.visualStyleAccessPath || "itemStyle"
  15320. , s = qg(e, a);
  15321. r.each((function(t) {
  15322. var e = r.getRawIndex(t);
  15323. i[e] = t
  15324. }
  15325. )),
  15326. n.each((function(t) {
  15327. var a = i[t];
  15328. if (r.getItemVisual(a, "colorFromPalette")) {
  15329. var l = r.ensureUniqueItemVisual(a, "style")
  15330. , u = n.getName(t) || t + ""
  15331. , h = n.count();
  15332. l[s] = e.getColorFromPalette(u, o, h)
  15333. }
  15334. }
  15335. ))
  15336. }
  15337. }
  15338. ))
  15339. }
  15340. }
  15341. , ty = Math.PI;
  15342. var ey = function() {
  15343. function t(t, e, n, i) {
  15344. this._stageTaskMap = yt(),
  15345. this.ecInstance = t,
  15346. this.api = e,
  15347. n = this._dataProcessorHandlers = n.slice(),
  15348. i = this._visualHandlers = i.slice(),
  15349. this._allHandlers = n.concat(i)
  15350. }
  15351. return t.prototype.restoreData = function(t, e) {
  15352. t.restoreData(e),
  15353. this._stageTaskMap.each((function(t) {
  15354. var e = t.overallTask;
  15355. e && e.dirty()
  15356. }
  15357. ))
  15358. }
  15359. ,
  15360. t.prototype.getPerformArgs = function(t, e) {
  15361. if (t.__pipeline) {
  15362. var n = this._pipelineMap.get(t.__pipeline.id)
  15363. , i = n.context
  15364. , r = !e && n.progressiveEnabled && (!i || i.progressiveRender) && t.__idxInPipeline > n.blockIndex ? n.step : null
  15365. , o = i && i.modDataCount;
  15366. return {
  15367. step: r,
  15368. modBy: null != o ? Math.ceil(o / r) : null,
  15369. modDataCount: o
  15370. }
  15371. }
  15372. }
  15373. ,
  15374. t.prototype.getPipeline = function(t) {
  15375. return this._pipelineMap.get(t)
  15376. }
  15377. ,
  15378. t.prototype.updateStreamModes = function(t, e) {
  15379. var n = this._pipelineMap.get(t.uid)
  15380. , i = t.getData().count()
  15381. , r = n.progressiveEnabled && e.incrementalPrepareRender && i >= n.threshold
  15382. , o = t.get("large") && i >= t.get("largeThreshold")
  15383. , a = "mod" === t.get("progressiveChunkMode") ? i : null;
  15384. t.pipelineContext = n.context = {
  15385. progressiveRender: r,
  15386. modDataCount: a,
  15387. large: o
  15388. }
  15389. }
  15390. ,
  15391. t.prototype.restorePipelines = function(t) {
  15392. var e = this
  15393. , n = e._pipelineMap = yt();
  15394. t.eachSeries((function(t) {
  15395. var i = t.getProgressive()
  15396. , r = t.uid;
  15397. n.set(r, {
  15398. id: r,
  15399. head: null,
  15400. tail: null,
  15401. threshold: t.getProgressiveThreshold(),
  15402. progressiveEnabled: i && !(t.preventIncremental && t.preventIncremental()),
  15403. blockIndex: -1,
  15404. step: Math.round(i || 700),
  15405. count: 0
  15406. }),
  15407. e._pipe(t, t.dataTask)
  15408. }
  15409. ))
  15410. }
  15411. ,
  15412. t.prototype.prepareStageTasks = function() {
  15413. var t = this._stageTaskMap
  15414. , e = this.api.getModel()
  15415. , n = this.api;
  15416. E(this._allHandlers, (function(i) {
  15417. var r = t.get(i.uid) || t.set(i.uid, {})
  15418. , o = "";
  15419. lt(!(i.reset && i.overallReset), o),
  15420. i.reset && this._createSeriesStageTask(i, r, e, n),
  15421. i.overallReset && this._createOverallStageTask(i, r, e, n)
  15422. }
  15423. ), this)
  15424. }
  15425. ,
  15426. t.prototype.prepareView = function(t, e, n, i) {
  15427. var r = t.renderTask
  15428. , o = r.context;
  15429. o.model = e,
  15430. o.ecModel = n,
  15431. o.api = i,
  15432. r.__block = !t.incrementalPrepareRender,
  15433. this._pipe(e, r)
  15434. }
  15435. ,
  15436. t.prototype.performDataProcessorTasks = function(t, e) {
  15437. this._performStageTasks(this._dataProcessorHandlers, t, e, {
  15438. block: !0
  15439. })
  15440. }
  15441. ,
  15442. t.prototype.performVisualTasks = function(t, e, n) {
  15443. this._performStageTasks(this._visualHandlers, t, e, n)
  15444. }
  15445. ,
  15446. t.prototype._performStageTasks = function(t, e, n, i) {
  15447. i = i || {};
  15448. var r = !1
  15449. , o = this;
  15450. function a(t, e) {
  15451. return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id))
  15452. }
  15453. E(t, (function(t, s) {
  15454. if (!i.visualType || i.visualType === t.visualType) {
  15455. var l = o._stageTaskMap.get(t.uid)
  15456. , u = l.seriesTaskMap
  15457. , h = l.overallTask;
  15458. if (h) {
  15459. var c, p = h.agentStubMap;
  15460. p.each((function(t) {
  15461. a(i, t) && (t.dirty(),
  15462. c = !0)
  15463. }
  15464. )),
  15465. c && h.dirty(),
  15466. o.updatePayload(h, n);
  15467. var d = o.getPerformArgs(h, i.block);
  15468. p.each((function(t) {
  15469. t.perform(d)
  15470. }
  15471. )),
  15472. h.perform(d) && (r = !0)
  15473. } else
  15474. u && u.each((function(s, l) {
  15475. a(i, s) && s.dirty();
  15476. var u = o.getPerformArgs(s, i.block);
  15477. u.skip = !t.performRawSeries && e.isSeriesFiltered(s.context.model),
  15478. o.updatePayload(s, n),
  15479. s.perform(u) && (r = !0)
  15480. }
  15481. ))
  15482. }
  15483. }
  15484. )),
  15485. this.unfinished = r || this.unfinished
  15486. }
  15487. ,
  15488. t.prototype.performSeriesTasks = function(t) {
  15489. var e;
  15490. t.eachSeries((function(t) {
  15491. e = t.dataTask.perform() || e
  15492. }
  15493. )),
  15494. this.unfinished = e || this.unfinished
  15495. }
  15496. ,
  15497. t.prototype.plan = function() {
  15498. this._pipelineMap.each((function(t) {
  15499. var e = t.tail;
  15500. do {
  15501. if (e.__block) {
  15502. t.blockIndex = e.__idxInPipeline;
  15503. break
  15504. }
  15505. e = e.getUpstream()
  15506. } while (e)
  15507. }
  15508. ))
  15509. }
  15510. ,
  15511. t.prototype.updatePayload = function(t, e) {
  15512. "remain" !== e && (t.context.payload = e)
  15513. }
  15514. ,
  15515. t.prototype._createSeriesStageTask = function(t, e, n, i) {
  15516. var r = this
  15517. , o = e.seriesTaskMap
  15518. , a = e.seriesTaskMap = yt()
  15519. , s = t.seriesType
  15520. , l = t.getTargetSeries;
  15521. function u(e) {
  15522. var s = e.uid
  15523. , l = a.set(s, o && o.get(s) || wf({
  15524. plan: ay,
  15525. reset: sy,
  15526. count: hy
  15527. }));
  15528. l.context = {
  15529. model: e,
  15530. ecModel: n,
  15531. api: i,
  15532. useClearVisual: t.isVisual && !t.isLayout,
  15533. plan: t.plan,
  15534. reset: t.reset,
  15535. scheduler: r
  15536. },
  15537. r._pipe(e, l)
  15538. }
  15539. t.createOnAllSeries ? n.eachRawSeries(u) : s ? n.eachRawSeriesByType(s, u) : l && l(n, i).each(u)
  15540. }
  15541. ,
  15542. t.prototype._createOverallStageTask = function(t, e, n, i) {
  15543. var r = this
  15544. , o = e.overallTask = e.overallTask || wf({
  15545. reset: ny
  15546. });
  15547. o.context = {
  15548. ecModel: n,
  15549. api: i,
  15550. overallReset: t.overallReset,
  15551. scheduler: r
  15552. };
  15553. var a = o.agentStubMap
  15554. , s = o.agentStubMap = yt()
  15555. , l = t.seriesType
  15556. , u = t.getTargetSeries
  15557. , h = !0
  15558. , c = !1
  15559. , p = "";
  15560. function d(t) {
  15561. var e = t.uid
  15562. , n = s.set(e, a && a.get(e) || (c = !0,
  15563. wf({
  15564. reset: iy,
  15565. onDirty: oy
  15566. })));
  15567. n.context = {
  15568. model: t,
  15569. overallProgress: h
  15570. },
  15571. n.agent = o,
  15572. n.__block = h,
  15573. r._pipe(t, n)
  15574. }
  15575. lt(!t.createOnAllSeries, p),
  15576. l ? n.eachRawSeriesByType(l, d) : u ? u(n, i).each(d) : (h = !1,
  15577. E(n.getSeries(), d)),
  15578. c && o.dirty()
  15579. }
  15580. ,
  15581. t.prototype._pipe = function(t, e) {
  15582. var n = t.uid
  15583. , i = this._pipelineMap.get(n);
  15584. !i.head && (i.head = e),
  15585. i.tail && i.tail.pipe(e),
  15586. i.tail = e,
  15587. e.__idxInPipeline = i.count++,
  15588. e.__pipeline = i
  15589. }
  15590. ,
  15591. t.wrapStageHandler = function(t, e) {
  15592. return X(t) && (t = {
  15593. overallReset: t,
  15594. seriesType: cy(t)
  15595. }),
  15596. t.uid = Ac("stageHandler"),
  15597. e && (t.visualType = e),
  15598. t
  15599. }
  15600. ,
  15601. t
  15602. }();
  15603. function ny(t) {
  15604. t.overallReset(t.ecModel, t.api, t.payload)
  15605. }
  15606. function iy(t) {
  15607. return t.overallProgress && ry
  15608. }
  15609. function ry() {
  15610. this.agent.dirty(),
  15611. this.getDownstream().dirty()
  15612. }
  15613. function oy() {
  15614. this.agent && this.agent.dirty()
  15615. }
  15616. function ay(t) {
  15617. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null
  15618. }
  15619. function sy(t) {
  15620. t.useClearVisual && t.data.clearAllVisual();
  15621. var e = t.resetDefines = To(t.reset(t.model, t.ecModel, t.api, t.payload));
  15622. return e.length > 1 ? z(e, (function(t, e) {
  15623. return uy(e)
  15624. }
  15625. )) : ly
  15626. }
  15627. var ly = uy(0);
  15628. function uy(t) {
  15629. return function(e, n) {
  15630. var i = n.data
  15631. , r = n.resetDefines[t];
  15632. if (r && r.dataEach)
  15633. for (var o = e.start; o < e.end; o++)
  15634. r.dataEach(i, o);
  15635. else
  15636. r && r.progress && r.progress(e, i)
  15637. }
  15638. }
  15639. function hy(t) {
  15640. return t.data.count()
  15641. }
  15642. function cy(t) {
  15643. py = null;
  15644. try {
  15645. t(dy, fy)
  15646. } catch (t) {}
  15647. return py
  15648. }
  15649. var py, dy = {}, fy = {};
  15650. function gy(t, e) {
  15651. for (var n in e.prototype)
  15652. t[n] = bt
  15653. }
  15654. gy(dy, gd),
  15655. gy(fy, _d),
  15656. dy.eachSeriesByType = dy.eachRawSeriesByType = function(t) {
  15657. py = t
  15658. }
  15659. ,
  15660. dy.eachComponent = function(t) {
  15661. "series" === t.mainType && t.subType && (py = t.subType)
  15662. }
  15663. ;
  15664. var yy = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"]
  15665. , vy = {
  15666. color: yy,
  15667. colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], yy]
  15668. }
  15669. , my = "#B9B8CE"
  15670. , xy = "#100C2A"
  15671. , _y = function() {
  15672. return {
  15673. axisLine: {
  15674. lineStyle: {
  15675. color: my
  15676. }
  15677. },
  15678. splitLine: {
  15679. lineStyle: {
  15680. color: "#484753"
  15681. }
  15682. },
  15683. splitArea: {
  15684. areaStyle: {
  15685. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  15686. }
  15687. },
  15688. minorSplitLine: {
  15689. lineStyle: {
  15690. color: "#20203B"
  15691. }
  15692. }
  15693. }
  15694. }
  15695. , by = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"]
  15696. , wy = {
  15697. darkMode: !0,
  15698. color: by,
  15699. backgroundColor: xy,
  15700. axisPointer: {
  15701. lineStyle: {
  15702. color: "#817f91"
  15703. },
  15704. crossStyle: {
  15705. color: "#817f91"
  15706. },
  15707. label: {
  15708. color: "#fff"
  15709. }
  15710. },
  15711. legend: {
  15712. textStyle: {
  15713. color: my
  15714. },
  15715. pageTextStyle: {
  15716. color: my
  15717. }
  15718. },
  15719. textStyle: {
  15720. color: my
  15721. },
  15722. title: {
  15723. textStyle: {
  15724. color: "#EEF1FA"
  15725. },
  15726. subtextStyle: {
  15727. color: "#B9B8CE"
  15728. }
  15729. },
  15730. toolbox: {
  15731. iconStyle: {
  15732. borderColor: my
  15733. }
  15734. },
  15735. dataZoom: {
  15736. borderColor: "#71708A",
  15737. textStyle: {
  15738. color: my
  15739. },
  15740. brushStyle: {
  15741. color: "rgba(135,163,206,0.3)"
  15742. },
  15743. handleStyle: {
  15744. color: "#353450",
  15745. borderColor: "#C5CBE3"
  15746. },
  15747. moveHandleStyle: {
  15748. color: "#B0B6C3",
  15749. opacity: .3
  15750. },
  15751. fillerColor: "rgba(135,163,206,0.2)",
  15752. emphasis: {
  15753. handleStyle: {
  15754. borderColor: "#91B7F2",
  15755. color: "#4D587D"
  15756. },
  15757. moveHandleStyle: {
  15758. color: "#636D9A",
  15759. opacity: .7
  15760. }
  15761. },
  15762. dataBackground: {
  15763. lineStyle: {
  15764. color: "#71708A",
  15765. width: 1
  15766. },
  15767. areaStyle: {
  15768. color: "#71708A"
  15769. }
  15770. },
  15771. selectedDataBackground: {
  15772. lineStyle: {
  15773. color: "#87A3CE"
  15774. },
  15775. areaStyle: {
  15776. color: "#87A3CE"
  15777. }
  15778. }
  15779. },
  15780. visualMap: {
  15781. textStyle: {
  15782. color: my
  15783. }
  15784. },
  15785. timeline: {
  15786. lineStyle: {
  15787. color: my
  15788. },
  15789. label: {
  15790. color: my
  15791. },
  15792. controlStyle: {
  15793. color: my,
  15794. borderColor: my
  15795. }
  15796. },
  15797. calendar: {
  15798. itemStyle: {
  15799. color: xy
  15800. },
  15801. dayLabel: {
  15802. color: my
  15803. },
  15804. monthLabel: {
  15805. color: my
  15806. },
  15807. yearLabel: {
  15808. color: my
  15809. }
  15810. },
  15811. timeAxis: _y(),
  15812. logAxis: _y(),
  15813. valueAxis: _y(),
  15814. categoryAxis: _y(),
  15815. line: {
  15816. symbol: "circle"
  15817. },
  15818. graph: {
  15819. color: by
  15820. },
  15821. gauge: {
  15822. title: {
  15823. color: my
  15824. },
  15825. axisLine: {
  15826. lineStyle: {
  15827. color: [[1, "rgba(207,212,219,0.2)"]]
  15828. }
  15829. },
  15830. axisLabel: {
  15831. color: my
  15832. },
  15833. detail: {
  15834. color: "#EEF1FA"
  15835. }
  15836. },
  15837. candlestick: {
  15838. itemStyle: {
  15839. color: "#f64e56",
  15840. color0: "#54ea92",
  15841. borderColor: "#f64e56",
  15842. borderColor0: "#54ea92"
  15843. }
  15844. }
  15845. };
  15846. wy.categoryAxis.splitLine.show = !1;
  15847. var Sy = function() {
  15848. function t() {}
  15849. return t.prototype.normalizeQuery = function(t) {
  15850. var e = {}
  15851. , n = {}
  15852. , i = {};
  15853. if (U(t)) {
  15854. var r = Ko(t);
  15855. e.mainType = r.main || null,
  15856. e.subType = r.sub || null
  15857. } else {
  15858. var o = ["Index", "Name", "Id"]
  15859. , a = {
  15860. name: 1,
  15861. dataIndex: 1,
  15862. dataType: 1
  15863. };
  15864. E(t, (function(t, r) {
  15865. for (var s = !1, l = 0; l < o.length; l++) {
  15866. var u = o[l]
  15867. , h = r.lastIndexOf(u);
  15868. if (h > 0 && h === r.length - u.length) {
  15869. var c = r.slice(0, h);
  15870. "data" !== c && (e.mainType = c,
  15871. e[u.toLowerCase()] = t,
  15872. s = !0)
  15873. }
  15874. }
  15875. a.hasOwnProperty(r) && (n[r] = t,
  15876. s = !0),
  15877. s || (i[r] = t)
  15878. }
  15879. ))
  15880. }
  15881. return {
  15882. cptQuery: e,
  15883. dataQuery: n,
  15884. otherQuery: i
  15885. }
  15886. }
  15887. ,
  15888. t.prototype.filter = function(t, e) {
  15889. var n = this.eventInfo;
  15890. if (!n)
  15891. return !0;
  15892. var i = n.targetEl
  15893. , r = n.packedEvent
  15894. , o = n.model
  15895. , a = n.view;
  15896. if (!o || !a)
  15897. return !0;
  15898. var s = e.cptQuery
  15899. , l = e.dataQuery;
  15900. 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));
  15901. function u(t, e, n, i) {
  15902. return null == t[n] || e[i || n] === t[n]
  15903. }
  15904. }
  15905. ,
  15906. t.prototype.afterTrigger = function() {
  15907. this.eventInfo = null
  15908. }
  15909. ,
  15910. t
  15911. }()
  15912. , My = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"]
  15913. , Iy = My.concat(["symbolKeepAspect"])
  15914. , Ty = {
  15915. createOnAllSeries: !0,
  15916. performRawSeries: !0,
  15917. reset: function(t, e) {
  15918. var n = t.getData();
  15919. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon),
  15920. t.hasSymbolVisual) {
  15921. for (var i = {}, r = {}, o = !1, a = 0; a < My.length; a++) {
  15922. var s = My[a]
  15923. , l = t.get(s);
  15924. X(l) ? (o = !0,
  15925. r[s] = l) : i[s] = l
  15926. }
  15927. if (i.symbol = i.symbol || t.defaultSymbol,
  15928. n.setVisual(A({
  15929. legendIcon: t.legendIcon || i.symbol,
  15930. symbolKeepAspect: t.get("symbolKeepAspect")
  15931. }, i)),
  15932. !e.isSeriesFiltered(t)) {
  15933. var u = G(r);
  15934. return {
  15935. dataEach: o ? function(e, n) {
  15936. for (var i = t.getRawValue(n), o = t.getDataParams(n), a = 0; a < u.length; a++) {
  15937. var s = u[a];
  15938. e.setItemVisual(n, s, r[s](i, o))
  15939. }
  15940. }
  15941. : null
  15942. }
  15943. }
  15944. }
  15945. }
  15946. }
  15947. , Cy = {
  15948. createOnAllSeries: !0,
  15949. performRawSeries: !0,
  15950. reset: function(t, e) {
  15951. if (t.hasSymbolVisual && !e.isSeriesFiltered(t))
  15952. return {
  15953. dataEach: t.getData().hasItemOption ? function(t, e) {
  15954. for (var n = t.getItemModel(e), i = 0; i < Iy.length; i++) {
  15955. var r = Iy[i]
  15956. , o = n.getShallow(r, !0);
  15957. null != o && t.setItemVisual(e, r, o)
  15958. }
  15959. }
  15960. : null
  15961. }
  15962. }
  15963. };
  15964. function Dy(t, e, n) {
  15965. switch (n) {
  15966. case "color":
  15967. return t.getItemVisual(e, "style")[t.getVisual("drawType")];
  15968. case "opacity":
  15969. return t.getItemVisual(e, "style").opacity;
  15970. case "symbol":
  15971. case "symbolSize":
  15972. case "liftZ":
  15973. return t.getItemVisual(e, n)
  15974. }
  15975. }
  15976. function Ay(t, e) {
  15977. switch (e) {
  15978. case "color":
  15979. return t.getVisual("style")[t.getVisual("drawType")];
  15980. case "opacity":
  15981. return t.getVisual("style").opacity;
  15982. case "symbol":
  15983. case "symbolSize":
  15984. case "liftZ":
  15985. return t.getVisual(e)
  15986. }
  15987. }
  15988. function ky(t, e, n, i) {
  15989. switch (n) {
  15990. case "color":
  15991. t.ensureUniqueItemVisual(e, "style")[t.getVisual("drawType")] = i,
  15992. t.setItemVisual(e, "colorFromPalette", !1);
  15993. break;
  15994. case "opacity":
  15995. t.ensureUniqueItemVisual(e, "style").opacity = i;
  15996. break;
  15997. case "symbol":
  15998. case "symbolSize":
  15999. case "liftZ":
  16000. t.setItemVisual(e, n, i)
  16001. }
  16002. }
  16003. function Ly(t, e) {
  16004. function n(e, n) {
  16005. var i = [];
  16006. return e.eachComponent({
  16007. mainType: "series",
  16008. subType: t,
  16009. query: n
  16010. }, (function(t) {
  16011. i.push(t.seriesIndex)
  16012. }
  16013. )),
  16014. i
  16015. }
  16016. E([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], (function(t) {
  16017. e(t[0], (function(e, i, r) {
  16018. e = A({}, e),
  16019. r.dispatchAction(A(e, {
  16020. type: t[1],
  16021. seriesIndex: n(i, e)
  16022. }))
  16023. }
  16024. ))
  16025. }
  16026. ))
  16027. }
  16028. function Py(t, e, n, i, r) {
  16029. var o = t + e;
  16030. n.isSilent(o) || i.eachComponent({
  16031. mainType: "series",
  16032. subType: "pie"
  16033. }, (function(t) {
  16034. for (var e = t.seriesIndex, i = t.option.selectedMap, a = r.selected, s = 0; s < a.length; s++)
  16035. if (a[s].seriesIndex === e) {
  16036. var l = t.getData()
  16037. , u = zo(l, r.fromActionPayload);
  16038. n.trigger(o, {
  16039. type: o,
  16040. seriesId: t.id,
  16041. name: Y(u) ? l.getName(u[0]) : l.getName(u),
  16042. selected: U(i) ? i : A({}, i)
  16043. })
  16044. }
  16045. }
  16046. ))
  16047. }
  16048. function Oy(t, e, n) {
  16049. for (var i; t && (!e(t) || (i = t,
  16050. !n)); )
  16051. t = t.__hostTarget || t.parent;
  16052. return i
  16053. }
  16054. var Ry = Math.round(9 * Math.random())
  16055. , Ny = "function" == typeof Object.defineProperty
  16056. , Ey = function() {
  16057. function t() {
  16058. this._id = "__ec_inner_" + Ry++
  16059. }
  16060. return t.prototype.get = function(t) {
  16061. return this._guard(t)[this._id]
  16062. }
  16063. ,
  16064. t.prototype.set = function(t, e) {
  16065. var n = this._guard(t);
  16066. return Ny ? Object.defineProperty(n, this._id, {
  16067. value: e,
  16068. enumerable: !1,
  16069. configurable: !0
  16070. }) : n[this._id] = e,
  16071. this
  16072. }
  16073. ,
  16074. t.prototype.delete = function(t) {
  16075. return !!this.has(t) && (delete this._guard(t)[this._id],
  16076. !0)
  16077. }
  16078. ,
  16079. t.prototype.has = function(t) {
  16080. return !!this._guard(t)[this._id]
  16081. }
  16082. ,
  16083. t.prototype._guard = function(t) {
  16084. if (t !== Object(t))
  16085. throw TypeError("Value of WeakMap is not a non-null object.");
  16086. return t
  16087. }
  16088. ,
  16089. t
  16090. }()
  16091. , zy = ks.extend({
  16092. type: "triangle",
  16093. shape: {
  16094. cx: 0,
  16095. cy: 0,
  16096. width: 0,
  16097. height: 0
  16098. },
  16099. buildPath: function(t, e) {
  16100. var n = e.cx
  16101. , i = e.cy
  16102. , r = e.width / 2
  16103. , o = e.height / 2;
  16104. t.moveTo(n, i - o),
  16105. t.lineTo(n + r, i + o),
  16106. t.lineTo(n - r, i + o),
  16107. t.closePath()
  16108. }
  16109. })
  16110. , Vy = ks.extend({
  16111. type: "diamond",
  16112. shape: {
  16113. cx: 0,
  16114. cy: 0,
  16115. width: 0,
  16116. height: 0
  16117. },
  16118. buildPath: function(t, e) {
  16119. var n = e.cx
  16120. , i = e.cy
  16121. , r = e.width / 2
  16122. , o = e.height / 2;
  16123. t.moveTo(n, i - o),
  16124. t.lineTo(n + r, i),
  16125. t.lineTo(n, i + o),
  16126. t.lineTo(n - r, i),
  16127. t.closePath()
  16128. }
  16129. })
  16130. , By = ks.extend({
  16131. type: "pin",
  16132. shape: {
  16133. x: 0,
  16134. y: 0,
  16135. width: 0,
  16136. height: 0
  16137. },
  16138. buildPath: function(t, e) {
  16139. var n = e.x
  16140. , i = e.y
  16141. , r = e.width / 5 * 3
  16142. , o = Math.max(r, e.height)
  16143. , a = r / 2
  16144. , s = a * a / (o - a)
  16145. , l = i - o + a + s
  16146. , u = Math.asin(s / a)
  16147. , h = Math.cos(u) * a
  16148. , c = Math.sin(u)
  16149. , p = Math.cos(u)
  16150. , d = .6 * a
  16151. , f = .7 * a;
  16152. t.moveTo(n - h, l + s),
  16153. t.arc(n, l, a, Math.PI - u, 2 * Math.PI + u),
  16154. t.bezierCurveTo(n + h - c * d, l + s + p * d, n, i - f, n, i),
  16155. t.bezierCurveTo(n, i - f, n - h + c * d, l + s + p * d, n - h, l + s),
  16156. t.closePath()
  16157. }
  16158. })
  16159. , Fy = ks.extend({
  16160. type: "arrow",
  16161. shape: {
  16162. x: 0,
  16163. y: 0,
  16164. width: 0,
  16165. height: 0
  16166. },
  16167. buildPath: function(t, e) {
  16168. var n = e.height
  16169. , i = e.width
  16170. , r = e.x
  16171. , o = e.y
  16172. , a = i / 3 * 2;
  16173. t.moveTo(r, o),
  16174. t.lineTo(r + a, o + n),
  16175. t.lineTo(r, o + n / 4 * 3),
  16176. t.lineTo(r - a, o + n),
  16177. t.lineTo(r, o),
  16178. t.closePath()
  16179. }
  16180. })
  16181. , Gy = {
  16182. line: function(t, e, n, i, r) {
  16183. r.x1 = t,
  16184. r.y1 = e + i / 2,
  16185. r.x2 = t + n,
  16186. r.y2 = e + i / 2
  16187. },
  16188. rect: function(t, e, n, i, r) {
  16189. r.x = t,
  16190. r.y = e,
  16191. r.width = n,
  16192. r.height = i
  16193. },
  16194. roundRect: function(t, e, n, i, r) {
  16195. r.x = t,
  16196. r.y = e,
  16197. r.width = n,
  16198. r.height = i,
  16199. r.r = Math.min(n, i) / 4
  16200. },
  16201. square: function(t, e, n, i, r) {
  16202. var o = Math.min(n, i);
  16203. r.x = t,
  16204. r.y = e,
  16205. r.width = o,
  16206. r.height = o
  16207. },
  16208. circle: function(t, e, n, i, r) {
  16209. r.cx = t + n / 2,
  16210. r.cy = e + i / 2,
  16211. r.r = Math.min(n, i) / 2
  16212. },
  16213. diamond: function(t, e, n, i, r) {
  16214. r.cx = t + n / 2,
  16215. r.cy = e + i / 2,
  16216. r.width = n,
  16217. r.height = i
  16218. },
  16219. pin: function(t, e, n, i, r) {
  16220. r.x = t + n / 2,
  16221. r.y = e + i / 2,
  16222. r.width = n,
  16223. r.height = i
  16224. },
  16225. arrow: function(t, e, n, i, r) {
  16226. r.x = t + n / 2,
  16227. r.y = e + i / 2,
  16228. r.width = n,
  16229. r.height = i
  16230. },
  16231. triangle: function(t, e, n, i, r) {
  16232. r.cx = t + n / 2,
  16233. r.cy = e + i / 2,
  16234. r.width = n,
  16235. r.height = i
  16236. }
  16237. }
  16238. , Wy = {};
  16239. E({
  16240. line: Ku,
  16241. rect: Ws,
  16242. roundRect: Ws,
  16243. square: Ws,
  16244. circle: Su,
  16245. diamond: Vy,
  16246. pin: By,
  16247. arrow: Fy,
  16248. triangle: zy
  16249. }, (function(t, e) {
  16250. Wy[e] = new t
  16251. }
  16252. ));
  16253. var Hy = ks.extend({
  16254. type: "symbol",
  16255. shape: {
  16256. symbolType: "",
  16257. x: 0,
  16258. y: 0,
  16259. width: 0,
  16260. height: 0
  16261. },
  16262. calculateTextPosition: function(t, e, n) {
  16263. var i = Dr(t, e, n)
  16264. , r = this.shape;
  16265. return r && "pin" === r.symbolType && "inside" === e.position && (i.y = n.y + .4 * n.height),
  16266. i
  16267. },
  16268. buildPath: function(t, e, n) {
  16269. var i = e.symbolType;
  16270. if ("none" !== i) {
  16271. var r = Wy[i];
  16272. r || (r = Wy[i = "rect"]),
  16273. Gy[i](e.x, e.y, e.width, e.height, r.shape),
  16274. r.buildPath(t, r.shape, n)
  16275. }
  16276. }
  16277. });
  16278. function Yy(t, e) {
  16279. if ("image" !== this.type) {
  16280. var n = this.style;
  16281. this.__isEmptyBrush ? (n.stroke = t,
  16282. n.fill = e || "#fff",
  16283. n.lineWidth = 2) : "line" === this.shape.symbolType ? n.stroke = t : n.fill = t,
  16284. this.markRedraw()
  16285. }
  16286. }
  16287. function Xy(t, e, n, i, r, o, a) {
  16288. var s, l = 0 === t.indexOf("empty");
  16289. return l && (t = t.substr(5, 1).toLowerCase() + t.substr(6)),
  16290. (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({
  16291. shape: {
  16292. symbolType: t,
  16293. x: e,
  16294. y: n,
  16295. width: i,
  16296. height: r
  16297. }
  16298. })).__isEmptyBrush = l,
  16299. s.setColor = Yy,
  16300. o && s.setColor(o),
  16301. s
  16302. }
  16303. function Uy(t) {
  16304. return Y(t) || (t = [+t, +t]),
  16305. [t[0] || 0, t[1] || 0]
  16306. }
  16307. function Zy(t, e) {
  16308. if (null != t)
  16309. return Y(t) || (t = [t, t]),
  16310. [$r(t[0], e[0]) || 0, $r(rt(t[1], t[0]), e[1]) || 0]
  16311. }
  16312. function jy(t) {
  16313. return isFinite(t)
  16314. }
  16315. function qy(t, e, n) {
  16316. for (var i = "radial" === e.type ? function(t, e, n) {
  16317. var i = n.width
  16318. , r = n.height
  16319. , o = Math.min(i, r)
  16320. , a = null == e.x ? .5 : e.x
  16321. , s = null == e.y ? .5 : e.y
  16322. , l = null == e.r ? .5 : e.r;
  16323. return e.global || (a = a * i + n.x,
  16324. s = s * r + n.y,
  16325. l *= o),
  16326. a = jy(a) ? a : .5,
  16327. s = jy(s) ? s : .5,
  16328. l = l >= 0 && jy(l) ? l : .5,
  16329. t.createRadialGradient(a, s, 0, a, s, l)
  16330. }(t, e, n) : function(t, e, n) {
  16331. var i = null == e.x ? 0 : e.x
  16332. , r = null == e.x2 ? 1 : e.x2
  16333. , o = null == e.y ? 0 : e.y
  16334. , a = null == e.y2 ? 0 : e.y2;
  16335. return e.global || (i = i * n.width + n.x,
  16336. r = r * n.width + n.x,
  16337. o = o * n.height + n.y,
  16338. a = a * n.height + n.y),
  16339. i = jy(i) ? i : 0,
  16340. r = jy(r) ? r : 1,
  16341. o = jy(o) ? o : 0,
  16342. a = jy(a) ? a : 0,
  16343. t.createLinearGradient(i, o, r, a)
  16344. }(t, e, n), r = e.colorStops, o = 0; o < r.length; o++)
  16345. i.addColorStop(r[o].offset, r[o].color);
  16346. return i
  16347. }
  16348. function Ky(t) {
  16349. return parseInt(t, 10)
  16350. }
  16351. function $y(t, e, n) {
  16352. var i = ["width", "height"][e]
  16353. , r = ["clientWidth", "clientHeight"][e]
  16354. , o = ["paddingLeft", "paddingTop"][e]
  16355. , a = ["paddingRight", "paddingBottom"][e];
  16356. if (null != n[i] && "auto" !== n[i])
  16357. return parseFloat(n[i]);
  16358. var s = document.defaultView.getComputedStyle(t);
  16359. return (t[r] || Ky(s[i]) || Ky(t.style[i])) - (Ky(s[o]) || 0) - (Ky(s[a]) || 0) | 0
  16360. }
  16361. function Jy(t) {
  16362. var e, n, i = t.style, r = i.lineDash && i.lineWidth > 0 && (e = i.lineDash,
  16363. n = i.lineWidth,
  16364. e && "solid" !== e && n > 0 ? "dashed" === e ? [4 * n, 2 * n] : "dotted" === e ? [n] : j(e) ? [e] : Y(e) ? e : null : null), o = i.lineDashOffset;
  16365. if (r) {
  16366. var a = i.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  16367. a && 1 !== a && (r = z(r, (function(t) {
  16368. return t / a
  16369. }
  16370. )),
  16371. o /= a)
  16372. }
  16373. return [r, o]
  16374. }
  16375. var Qy = new hs(!0);
  16376. function tv(t) {
  16377. var e = t.stroke;
  16378. return !(null == e || "none" === e || !(t.lineWidth > 0))
  16379. }
  16380. function ev(t) {
  16381. return "string" == typeof t && "none" !== t
  16382. }
  16383. function nv(t) {
  16384. var e = t.fill;
  16385. return null != e && "none" !== e
  16386. }
  16387. function iv(t, e) {
  16388. if (null != e.fillOpacity && 1 !== e.fillOpacity) {
  16389. var n = t.globalAlpha;
  16390. t.globalAlpha = e.fillOpacity * e.opacity,
  16391. t.fill(),
  16392. t.globalAlpha = n
  16393. } else
  16394. t.fill()
  16395. }
  16396. function rv(t, e) {
  16397. if (null != e.strokeOpacity && 1 !== e.strokeOpacity) {
  16398. var n = t.globalAlpha;
  16399. t.globalAlpha = e.strokeOpacity * e.opacity,
  16400. t.stroke(),
  16401. t.globalAlpha = n
  16402. } else
  16403. t.stroke()
  16404. }
  16405. function ov(t, e, n) {
  16406. var i = la(e.image, e.__image, n);
  16407. if (ha(i)) {
  16408. var r = t.createPattern(i, e.repeat || "repeat");
  16409. if ("function" == typeof DOMMatrix && r && r.setTransform) {
  16410. var o = new DOMMatrix;
  16411. o.translateSelf(e.x || 0, e.y || 0),
  16412. o.rotateSelf(0, 0, (e.rotation || 0) * wt),
  16413. o.scaleSelf(e.scaleX || 1, e.scaleY || 1),
  16414. r.setTransform(o)
  16415. }
  16416. return r
  16417. }
  16418. }
  16419. var av = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"]
  16420. , sv = [["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]];
  16421. function lv(t, e, n, i, r) {
  16422. var o = !1;
  16423. if (!i && e === (n = n || {}))
  16424. return !1;
  16425. if (i || e.opacity !== n.opacity) {
  16426. cv(t, r),
  16427. o = !0;
  16428. var a = Math.max(Math.min(e.opacity, 1), 0);
  16429. t.globalAlpha = isNaN(a) ? Ma.opacity : a
  16430. }
  16431. (i || e.blend !== n.blend) && (o || (cv(t, r),
  16432. o = !0),
  16433. t.globalCompositeOperation = e.blend || Ma.blend);
  16434. for (var s = 0; s < av.length; s++) {
  16435. var l = av[s];
  16436. (i || e[l] !== n[l]) && (o || (cv(t, r),
  16437. o = !0),
  16438. t[l] = t.dpr * (e[l] || 0))
  16439. }
  16440. return (i || e.shadowColor !== n.shadowColor) && (o || (cv(t, r),
  16441. o = !0),
  16442. t.shadowColor = e.shadowColor || Ma.shadowColor),
  16443. o
  16444. }
  16445. function uv(t, e, n, i, r) {
  16446. var o = pv(e, r.inHover)
  16447. , a = i ? null : n && pv(n, r.inHover) || {};
  16448. if (o === a)
  16449. return !1;
  16450. var s = lv(t, o, a, i, r);
  16451. if ((i || o.fill !== a.fill) && (s || (cv(t, r),
  16452. s = !0),
  16453. ev(o.fill) && (t.fillStyle = o.fill)),
  16454. (i || o.stroke !== a.stroke) && (s || (cv(t, r),
  16455. s = !0),
  16456. ev(o.stroke) && (t.strokeStyle = o.stroke)),
  16457. (i || o.opacity !== a.opacity) && (s || (cv(t, r),
  16458. s = !0),
  16459. t.globalAlpha = null == o.opacity ? 1 : o.opacity),
  16460. e.hasStroke()) {
  16461. var l = o.lineWidth / (o.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  16462. t.lineWidth !== l && (s || (cv(t, r),
  16463. s = !0),
  16464. t.lineWidth = l)
  16465. }
  16466. for (var u = 0; u < sv.length; u++) {
  16467. var h = sv[u]
  16468. , c = h[0];
  16469. (i || o[c] !== a[c]) && (s || (cv(t, r),
  16470. s = !0),
  16471. t[c] = o[c] || h[1])
  16472. }
  16473. return s
  16474. }
  16475. function hv(t, e) {
  16476. var n = e.transform
  16477. , i = t.dpr || 1;
  16478. 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)
  16479. }
  16480. function cv(t, e) {
  16481. e.batchFill && t.fill(),
  16482. e.batchStroke && t.stroke(),
  16483. e.batchFill = "",
  16484. e.batchStroke = ""
  16485. }
  16486. function pv(t, e) {
  16487. return e && t.__hoverStyle || t.style
  16488. }
  16489. function dv(t, e) {
  16490. fv(t, e, {
  16491. inHover: !1,
  16492. viewWidth: 0,
  16493. viewHeight: 0
  16494. }, !0)
  16495. }
  16496. function fv(t, e, n, i) {
  16497. var r = e.transform;
  16498. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1))
  16499. return e.__dirty &= -2,
  16500. void (e.__isRendered = !1);
  16501. var o = e.__clipPaths
  16502. , s = n.prevElClipPaths
  16503. , l = !1
  16504. , u = !1;
  16505. if (s && !function(t, e) {
  16506. if (t === e || !t && !e)
  16507. return !1;
  16508. if (!t || !e || t.length !== e.length)
  16509. return !0;
  16510. for (var n = 0; n < t.length; n++)
  16511. if (t[n] !== e[n])
  16512. return !0;
  16513. return !1
  16514. }(o, s) || (s && s.length && (cv(t, n),
  16515. t.restore(),
  16516. u = l = !0,
  16517. n.prevElClipPaths = null,
  16518. n.allClipped = !1,
  16519. n.prevEl = null),
  16520. o && o.length && (cv(t, n),
  16521. t.save(),
  16522. function(t, e, n) {
  16523. for (var i = !1, r = 0; r < t.length; r++) {
  16524. var o = t[r];
  16525. i = i || o.isZeroArea(),
  16526. hv(e, o),
  16527. e.beginPath(),
  16528. o.buildPath(e, o.shape),
  16529. e.clip()
  16530. }
  16531. n.allClipped = i
  16532. }(o, t, n),
  16533. l = !0),
  16534. n.prevElClipPaths = o),
  16535. n.allClipped)
  16536. e.__isRendered = !1;
  16537. else {
  16538. e.beforeBrush && e.beforeBrush(),
  16539. e.innerBeforeBrush();
  16540. var h = n.prevEl;
  16541. h || (u = l = !0);
  16542. var c, p, d = e instanceof ks && e.autoBatch && function(t) {
  16543. var e = nv(t)
  16544. , n = tv(t);
  16545. return !(t.lineDash || !(+e ^ +n) || e && "string" != typeof t.fill || n && "string" != typeof t.stroke || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1)
  16546. }(e.style);
  16547. l || (c = r,
  16548. p = h.transform,
  16549. 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),
  16550. hv(t, e)) : d || cv(t, n);
  16551. var f = pv(e, n.inHover);
  16552. e instanceof ks ? (1 !== n.lastDrawType && (u = !0,
  16553. n.lastDrawType = 1),
  16554. uv(t, e, h, u, n),
  16555. d && (n.batchFill || n.batchStroke) || t.beginPath(),
  16556. function(t, e, n, i) {
  16557. var r, o = tv(n), a = nv(n), s = n.strokePercent, l = s < 1, u = !e.path;
  16558. e.silent && !l || !u || e.createPathProxy();
  16559. var h = e.path || Qy
  16560. , c = e.__dirty;
  16561. if (!i) {
  16562. var p = n.fill
  16563. , d = n.stroke
  16564. , f = a && !!p.colorStops
  16565. , g = o && !!d.colorStops
  16566. , y = a && !!p.image
  16567. , v = o && !!d.image
  16568. , m = void 0
  16569. , x = void 0
  16570. , _ = void 0
  16571. , b = void 0
  16572. , w = void 0;
  16573. (f || g) && (w = e.getBoundingRect()),
  16574. f && (m = c ? qy(t, p, w) : e.__canvasFillGradient,
  16575. e.__canvasFillGradient = m),
  16576. g && (x = c ? qy(t, d, w) : e.__canvasStrokeGradient,
  16577. e.__canvasStrokeGradient = x),
  16578. y && (_ = c || !e.__canvasFillPattern ? ov(t, p, e) : e.__canvasFillPattern,
  16579. e.__canvasFillPattern = _),
  16580. v && (b = c || !e.__canvasStrokePattern ? ov(t, d, e) : e.__canvasStrokePattern,
  16581. e.__canvasStrokePattern = _),
  16582. f ? t.fillStyle = m : y && (_ ? t.fillStyle = _ : a = !1),
  16583. g ? t.strokeStyle = x : v && (b ? t.strokeStyle = b : o = !1)
  16584. }
  16585. var S, M, I = e.getGlobalScale();
  16586. h.setScale(I[0], I[1], e.segmentIgnoreThreshold),
  16587. t.setLineDash && n.lineDash && (S = (r = Jy(e))[0],
  16588. M = r[1]);
  16589. var T = !0;
  16590. (u || 4 & c) && (h.setDPR(t.dpr),
  16591. l ? h.setContext(null) : (h.setContext(t),
  16592. T = !1),
  16593. h.reset(),
  16594. e.buildPath(h, e.shape, i),
  16595. h.toStatic(),
  16596. e.pathUpdated()),
  16597. T && h.rebuildPath(t, l ? s : 1),
  16598. S && (t.setLineDash(S),
  16599. t.lineDashOffset = M),
  16600. i || (n.strokeFirst ? (o && rv(t, n),
  16601. a && iv(t, n)) : (a && iv(t, n),
  16602. o && rv(t, n))),
  16603. S && t.setLineDash([])
  16604. }(t, e, f, d),
  16605. d && (n.batchFill = f.fill || "",
  16606. n.batchStroke = f.stroke || "")) : e instanceof Ps ? (3 !== n.lastDrawType && (u = !0,
  16607. n.lastDrawType = 3),
  16608. uv(t, e, h, u, n),
  16609. function(t, e, n) {
  16610. var i, r = n.text;
  16611. if (null != r && (r += ""),
  16612. r) {
  16613. t.font = n.font || a,
  16614. t.textAlign = n.textAlign,
  16615. t.textBaseline = n.textBaseline;
  16616. var o = void 0
  16617. , s = void 0;
  16618. t.setLineDash && n.lineDash && (o = (i = Jy(e))[0],
  16619. s = i[1]),
  16620. o && (t.setLineDash(o),
  16621. t.lineDashOffset = s),
  16622. n.strokeFirst ? (tv(n) && t.strokeText(r, n.x, n.y),
  16623. nv(n) && t.fillText(r, n.x, n.y)) : (nv(n) && t.fillText(r, n.x, n.y),
  16624. tv(n) && t.strokeText(r, n.x, n.y)),
  16625. o && t.setLineDash([])
  16626. }
  16627. }(t, e, f)) : e instanceof Ns ? (2 !== n.lastDrawType && (u = !0,
  16628. n.lastDrawType = 2),
  16629. function(t, e, n, i, r) {
  16630. lv(t, pv(e, r.inHover), n && pv(n, r.inHover), i, r)
  16631. }(t, e, h, u, n),
  16632. function(t, e, n) {
  16633. var i = e.__image = la(n.image, e.__image, e, e.onload);
  16634. if (i && ha(i)) {
  16635. var r = n.x || 0
  16636. , o = n.y || 0
  16637. , a = e.getWidth()
  16638. , s = e.getHeight()
  16639. , l = i.width / i.height;
  16640. if (null == a && null != s ? a = s * l : null == s && null != a ? s = a / l : null == a && null == s && (a = i.width,
  16641. s = i.height),
  16642. n.sWidth && n.sHeight) {
  16643. var u = n.sx || 0
  16644. , h = n.sy || 0;
  16645. t.drawImage(i, u, h, n.sWidth, n.sHeight, r, o, a, s)
  16646. } else if (n.sx && n.sy) {
  16647. var c = a - (u = n.sx)
  16648. , p = s - (h = n.sy);
  16649. t.drawImage(i, u, h, c, p, r, o, a, s)
  16650. } else
  16651. t.drawImage(i, r, o, a, s)
  16652. }
  16653. }(t, e, f)) : e.getTemporalDisplayables && (4 !== n.lastDrawType && (u = !0,
  16654. n.lastDrawType = 4),
  16655. function(t, e, n) {
  16656. var i = e.getDisplayables()
  16657. , r = e.getTemporalDisplayables();
  16658. t.save();
  16659. var o, a, s = {
  16660. prevElClipPaths: null,
  16661. prevEl: null,
  16662. allClipped: !1,
  16663. viewWidth: n.viewWidth,
  16664. viewHeight: n.viewHeight,
  16665. inHover: n.inHover
  16666. };
  16667. for (o = e.getCursor(),
  16668. a = i.length; o < a; o++) {
  16669. (h = i[o]).beforeBrush && h.beforeBrush(),
  16670. h.innerBeforeBrush(),
  16671. fv(t, h, s, o === a - 1),
  16672. h.innerAfterBrush(),
  16673. h.afterBrush && h.afterBrush(),
  16674. s.prevEl = h
  16675. }
  16676. for (var l = 0, u = r.length; l < u; l++) {
  16677. var h;
  16678. (h = r[l]).beforeBrush && h.beforeBrush(),
  16679. h.innerBeforeBrush(),
  16680. fv(t, h, s, l === u - 1),
  16681. h.innerAfterBrush(),
  16682. h.afterBrush && h.afterBrush(),
  16683. s.prevEl = h
  16684. }
  16685. e.clearTemporalDisplayables(),
  16686. e.notClear = !0,
  16687. t.restore()
  16688. }(t, e, n)),
  16689. d && i && cv(t, n),
  16690. e.innerAfterBrush(),
  16691. e.afterBrush && e.afterBrush(),
  16692. n.prevEl = e,
  16693. e.__dirty = 0,
  16694. e.__isRendered = !0
  16695. }
  16696. }
  16697. var gv = new Ey
  16698. , yv = new En(100)
  16699. , vv = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  16700. function mv(t, e) {
  16701. if ("none" === t)
  16702. return null;
  16703. var n = e.getDevicePixelRatio()
  16704. , i = e.getZr()
  16705. , r = "svg" === i.painter.type;
  16706. t.dirty && gv.delete(t);
  16707. var o = gv.get(t);
  16708. if (o)
  16709. return o;
  16710. var a = k(t, {
  16711. symbol: "rect",
  16712. symbolSize: 1,
  16713. symbolKeepAspect: !0,
  16714. color: "rgba(0, 0, 0, 0.2)",
  16715. backgroundColor: null,
  16716. dashArrayX: 5,
  16717. dashArrayY: 5,
  16718. rotation: 0,
  16719. maxTileWidth: 512,
  16720. maxTileHeight: 512
  16721. });
  16722. "none" === a.backgroundColor && (a.backgroundColor = null);
  16723. var s = {
  16724. repeat: "repeat"
  16725. };
  16726. return function(t) {
  16727. for (var e, o = [n], s = !0, l = 0; l < vv.length; ++l) {
  16728. var u = a[vv[l]];
  16729. if (null != u && !Y(u) && !U(u) && !j(u) && "boolean" != typeof u) {
  16730. s = !1;
  16731. break
  16732. }
  16733. o.push(u)
  16734. }
  16735. if (s) {
  16736. e = o.join(",") + (r ? "-svg" : "");
  16737. var c = yv.get(e);
  16738. c && (r ? t.svgElement = c : t.image = c)
  16739. }
  16740. var p, d = _v(a.dashArrayX), f = function(t) {
  16741. if (!t || "object" == typeof t && 0 === t.length)
  16742. return [0, 0];
  16743. if (j(t)) {
  16744. var e = Math.ceil(t);
  16745. return [e, e]
  16746. }
  16747. var n = z(t, (function(t) {
  16748. return Math.ceil(t)
  16749. }
  16750. ));
  16751. return t.length % 2 ? n.concat(n) : n
  16752. }(a.dashArrayY), g = xv(a.symbol), y = (b = d,
  16753. z(b, (function(t) {
  16754. return bv(t)
  16755. }
  16756. ))), v = bv(f), m = !r && h.createCanvas(), x = r && {
  16757. tag: "g",
  16758. attrs: {},
  16759. key: "dcl",
  16760. children: []
  16761. }, _ = function() {
  16762. for (var t = 1, e = 0, n = y.length; e < n; ++e)
  16763. t = _o(t, y[e]);
  16764. var i = 1;
  16765. for (e = 0,
  16766. n = g.length; e < n; ++e)
  16767. i = _o(i, g[e].length);
  16768. t *= i;
  16769. var r = v * y.length * g.length;
  16770. return {
  16771. width: Math.max(1, Math.min(t, a.maxTileWidth)),
  16772. height: Math.max(1, Math.min(r, a.maxTileHeight))
  16773. }
  16774. }();
  16775. var b;
  16776. m && (m.width = _.width * n,
  16777. m.height = _.height * n,
  16778. p = m.getContext("2d"));
  16779. (function() {
  16780. p && (p.clearRect(0, 0, m.width, m.height),
  16781. a.backgroundColor && (p.fillStyle = a.backgroundColor,
  16782. p.fillRect(0, 0, m.width, m.height)));
  16783. for (var t = 0, e = 0; e < f.length; ++e)
  16784. t += f[e];
  16785. if (t <= 0)
  16786. return;
  16787. var o = -v
  16788. , s = 0
  16789. , l = 0
  16790. , u = 0;
  16791. for (; o < _.height; ) {
  16792. if (s % 2 == 0) {
  16793. for (var h = l / 2 % g.length, c = 0, y = 0, b = 0; c < 2 * _.width; ) {
  16794. var w = 0;
  16795. for (e = 0; e < d[u].length; ++e)
  16796. w += d[u][e];
  16797. if (w <= 0)
  16798. break;
  16799. if (y % 2 == 0) {
  16800. var S = .5 * (1 - a.symbolSize)
  16801. , M = c + d[u][y] * S
  16802. , I = o + f[s] * S
  16803. , T = d[u][y] * a.symbolSize
  16804. , C = f[s] * a.symbolSize
  16805. , D = b / 2 % g[h].length;
  16806. A(M, I, T, C, g[h][D])
  16807. }
  16808. c += d[u][y],
  16809. ++b,
  16810. ++y === d[u].length && (y = 0)
  16811. }
  16812. ++u === d.length && (u = 0)
  16813. }
  16814. o += f[s],
  16815. ++l,
  16816. ++s === f.length && (s = 0)
  16817. }
  16818. function A(t, e, o, s, l) {
  16819. var u = r ? 1 : n
  16820. , h = Xy(l, t * u, e * u, o * u, s * u, a.color, a.symbolKeepAspect);
  16821. if (r) {
  16822. var c = i.painter.renderOneToVNode(h);
  16823. c && x.children.push(c)
  16824. } else
  16825. dv(p, h)
  16826. }
  16827. }
  16828. )(),
  16829. s && yv.put(e, m || x);
  16830. t.image = m,
  16831. t.svgElement = x,
  16832. t.svgWidth = _.width,
  16833. t.svgHeight = _.height
  16834. }(s),
  16835. s.rotation = a.rotation,
  16836. s.scaleX = s.scaleY = r ? 1 : 1 / n,
  16837. gv.set(t, s),
  16838. t.dirty = !1,
  16839. s
  16840. }
  16841. function xv(t) {
  16842. if (!t || 0 === t.length)
  16843. return [["rect"]];
  16844. if (U(t))
  16845. return [[t]];
  16846. for (var e = !0, n = 0; n < t.length; ++n)
  16847. if (!U(t[n])) {
  16848. e = !1;
  16849. break
  16850. }
  16851. if (e)
  16852. return xv([t]);
  16853. var i = [];
  16854. for (n = 0; n < t.length; ++n)
  16855. U(t[n]) ? i.push([t[n]]) : i.push(t[n]);
  16856. return i
  16857. }
  16858. function _v(t) {
  16859. if (!t || 0 === t.length)
  16860. return [[0, 0]];
  16861. if (j(t))
  16862. return [[r = Math.ceil(t), r]];
  16863. for (var e = !0, n = 0; n < t.length; ++n)
  16864. if (!j(t[n])) {
  16865. e = !1;
  16866. break
  16867. }
  16868. if (e)
  16869. return _v([t]);
  16870. var i = [];
  16871. for (n = 0; n < t.length; ++n)
  16872. if (j(t[n])) {
  16873. var r = Math.ceil(t[n]);
  16874. i.push([r, r])
  16875. } else {
  16876. (r = z(t[n], (function(t) {
  16877. return Math.ceil(t)
  16878. }
  16879. ))).length % 2 == 1 ? i.push(r.concat(r)) : i.push(r)
  16880. }
  16881. return i
  16882. }
  16883. function bv(t) {
  16884. for (var e = 0, n = 0; n < t.length; ++n)
  16885. e += t[n];
  16886. return t.length % 2 == 1 ? 2 * e : e
  16887. }
  16888. var wv = new jt
  16889. , Sv = {};
  16890. function Mv(t) {
  16891. return Sv[t]
  16892. }
  16893. var Iv = 2e3
  16894. , Tv = 4500
  16895. , Cv = {
  16896. PROCESSOR: {
  16897. FILTER: 1e3,
  16898. SERIES_FILTER: 800,
  16899. STATISTIC: 5e3
  16900. },
  16901. VISUAL: {
  16902. LAYOUT: 1e3,
  16903. PROGRESSIVE_LAYOUT: 1100,
  16904. GLOBAL: Iv,
  16905. CHART: 3e3,
  16906. POST_CHART_LAYOUT: 4600,
  16907. COMPONENT: 4e3,
  16908. BRUSH: 5e3,
  16909. CHART_ITEM: Tv,
  16910. ARIA: 6e3,
  16911. DECAL: 7e3
  16912. }
  16913. }
  16914. , Dv = "__flagInMainProcess"
  16915. , Av = "__pendingUpdate"
  16916. , kv = "__needsUpdateStatus"
  16917. , Lv = /^[a-zA-Z0-9_]+$/
  16918. , Pv = "__connectUpdateStatus";
  16919. function Ov(t) {
  16920. return function() {
  16921. for (var e = [], n = 0; n < arguments.length; n++)
  16922. e[n] = arguments[n];
  16923. if (!this.isDisposed())
  16924. return Nv(this, t, e);
  16925. om(this.id)
  16926. }
  16927. }
  16928. function Rv(t) {
  16929. return function() {
  16930. for (var e = [], n = 0; n < arguments.length; n++)
  16931. e[n] = arguments[n];
  16932. return Nv(this, t, e)
  16933. }
  16934. }
  16935. function Nv(t, e, n) {
  16936. return n[0] = n[0] && n[0].toLowerCase(),
  16937. jt.prototype[e].apply(t, n)
  16938. }
  16939. var Ev, zv, Vv, Bv, Fv, Gv, Wv, Hv, Yv, Xv, Uv, Zv, jv, qv, Kv, $v, Jv, Qv, tm = function(t) {
  16940. function e() {
  16941. return null !== t && t.apply(this, arguments) || this
  16942. }
  16943. return n(e, t),
  16944. e
  16945. }(jt), em = tm.prototype;
  16946. em.on = Rv("on"),
  16947. em.off = Rv("off");
  16948. var nm = function(t) {
  16949. function e(e, n, i) {
  16950. var r = t.call(this, new Sy) || this;
  16951. r._chartsViews = [],
  16952. r._chartsMap = {},
  16953. r._componentsViews = [],
  16954. r._componentsMap = {},
  16955. r._pendingActions = [],
  16956. i = i || {},
  16957. U(n) && (n = cm[n]),
  16958. r._dom = e;
  16959. var o = "canvas"
  16960. , a = "auto"
  16961. , s = !1;
  16962. i.ssr && Zr((function(t) {
  16963. var e = rl(t)
  16964. , n = e.dataIndex;
  16965. if (null != n) {
  16966. var i = yt();
  16967. return i.set("series_index", e.seriesIndex),
  16968. i.set("data_index", n),
  16969. e.ssrType && i.set("ssr_type", e.ssrType),
  16970. i
  16971. }
  16972. }
  16973. ));
  16974. var l = r._zr = Yr(e, {
  16975. renderer: i.renderer || o,
  16976. devicePixelRatio: i.devicePixelRatio,
  16977. width: i.width,
  16978. height: i.height,
  16979. ssr: i.ssr,
  16980. useDirtyRect: rt(i.useDirtyRect, s),
  16981. useCoarsePointer: rt(i.useCoarsePointer, a),
  16982. pointerSize: i.pointerSize
  16983. });
  16984. r._ssr = i.ssr,
  16985. r._throttledZrFlush = Wg(W(l.flush, l), 17),
  16986. (n = T(n)) && Xd(n, !0),
  16987. r._theme = n,
  16988. r._locale = function(t) {
  16989. if (U(t)) {
  16990. var e = Rc[t.toUpperCase()] || {};
  16991. return t === Lc || t === Pc ? T(e) : C(T(e), T(Rc[Oc]), !1)
  16992. }
  16993. return C(T(t), T(Rc[Oc]), !1)
  16994. }(i.locale || Ec),
  16995. r._coordSysMgr = new wd;
  16996. var u = r._api = Kv(r);
  16997. function h(t, e) {
  16998. return t.__prio - e.__prio
  16999. }
  17000. return Qe(hm, h),
  17001. Qe(lm, h),
  17002. r._scheduler = new ey(r,u,lm,hm),
  17003. r._messageCenter = new tm,
  17004. r._initEvents(),
  17005. r.resize = W(r.resize, r),
  17006. l.animation.on("frame", r._onframe, r),
  17007. Xv(l, r),
  17008. Uv(l, r),
  17009. ct(r),
  17010. r
  17011. }
  17012. return n(e, t),
  17013. e.prototype._onframe = function() {
  17014. if (!this._disposed) {
  17015. Qv(this);
  17016. var t = this._scheduler;
  17017. if (this[Av]) {
  17018. var e = this[Av].silent;
  17019. this[Dv] = !0;
  17020. try {
  17021. Ev(this),
  17022. Bv.update.call(this, null, this[Av].updateParams)
  17023. } catch (t) {
  17024. throw this[Dv] = !1,
  17025. this[Av] = null,
  17026. t
  17027. }
  17028. this._zr.flush(),
  17029. this[Dv] = !1,
  17030. this[Av] = null,
  17031. Hv.call(this, e),
  17032. Yv.call(this, e)
  17033. } else if (t.unfinished) {
  17034. var n = 1
  17035. , i = this._model
  17036. , r = this._api;
  17037. t.unfinished = !1;
  17038. do {
  17039. var o = +new Date;
  17040. t.performSeriesTasks(i),
  17041. t.performDataProcessorTasks(i),
  17042. Gv(this, i),
  17043. t.performVisualTasks(i),
  17044. qv(this, this._model, r, "remain", {}),
  17045. n -= +new Date - o
  17046. } while (n > 0 && t.unfinished);
  17047. t.unfinished || this._zr.flush()
  17048. }
  17049. }
  17050. }
  17051. ,
  17052. e.prototype.getDom = function() {
  17053. return this._dom
  17054. }
  17055. ,
  17056. e.prototype.getId = function() {
  17057. return this.id
  17058. }
  17059. ,
  17060. e.prototype.getZr = function() {
  17061. return this._zr
  17062. }
  17063. ,
  17064. e.prototype.isSSR = function() {
  17065. return this._ssr
  17066. }
  17067. ,
  17068. e.prototype.setOption = function(t, e, n) {
  17069. if (!this[Dv])
  17070. if (this._disposed)
  17071. om(this.id);
  17072. else {
  17073. var i, r, o;
  17074. if (q(e) && (n = e.lazyUpdate,
  17075. i = e.silent,
  17076. r = e.replaceMerge,
  17077. o = e.transition,
  17078. e = e.notMerge),
  17079. this[Dv] = !0,
  17080. !this._model || e) {
  17081. var a = new Md(this._api)
  17082. , s = this._theme
  17083. , l = this._model = new gd;
  17084. l.scheduler = this._scheduler,
  17085. l.ssr = this._ssr,
  17086. l.init(null, null, null, s, this._locale, a)
  17087. }
  17088. this._model.setOption(t, {
  17089. replaceMerge: r
  17090. }, um);
  17091. var u = {
  17092. seriesTransition: o,
  17093. optionChanged: !0
  17094. };
  17095. if (n)
  17096. this[Av] = {
  17097. silent: i,
  17098. updateParams: u
  17099. },
  17100. this[Dv] = !1,
  17101. this.getZr().wakeUp();
  17102. else {
  17103. try {
  17104. Ev(this),
  17105. Bv.update.call(this, null, u)
  17106. } catch (t) {
  17107. throw this[Av] = null,
  17108. this[Dv] = !1,
  17109. t
  17110. }
  17111. this._ssr || this._zr.flush(),
  17112. this[Av] = null,
  17113. this[Dv] = !1,
  17114. Hv.call(this, i),
  17115. Yv.call(this, i)
  17116. }
  17117. }
  17118. }
  17119. ,
  17120. e.prototype.setTheme = function() {
  17121. bo()
  17122. }
  17123. ,
  17124. e.prototype.getModel = function() {
  17125. return this._model
  17126. }
  17127. ,
  17128. e.prototype.getOption = function() {
  17129. return this._model && this._model.getOption()
  17130. }
  17131. ,
  17132. e.prototype.getWidth = function() {
  17133. return this._zr.getWidth()
  17134. }
  17135. ,
  17136. e.prototype.getHeight = function() {
  17137. return this._zr.getHeight()
  17138. }
  17139. ,
  17140. e.prototype.getDevicePixelRatio = function() {
  17141. return this._zr.painter.dpr || r.hasGlobalWindow && window.devicePixelRatio || 1
  17142. }
  17143. ,
  17144. e.prototype.getRenderedCanvas = function(t) {
  17145. return this.renderToCanvas(t)
  17146. }
  17147. ,
  17148. e.prototype.renderToCanvas = function(t) {
  17149. t = t || {};
  17150. var e = this._zr.painter;
  17151. return e.getRenderedCanvas({
  17152. backgroundColor: t.backgroundColor || this._model.get("backgroundColor"),
  17153. pixelRatio: t.pixelRatio || this.getDevicePixelRatio()
  17154. })
  17155. }
  17156. ,
  17157. e.prototype.renderToSVGString = function(t) {
  17158. t = t || {};
  17159. var e = this._zr.painter;
  17160. return e.renderToString({
  17161. useViewBox: t.useViewBox
  17162. })
  17163. }
  17164. ,
  17165. e.prototype.getSvgDataURL = function() {
  17166. if (r.svgSupported) {
  17167. var t = this._zr;
  17168. return E(t.storage.getDisplayList(), (function(t) {
  17169. t.stopAnimation(null, !0)
  17170. }
  17171. )),
  17172. t.painter.toDataURL()
  17173. }
  17174. }
  17175. ,
  17176. e.prototype.getDataURL = function(t) {
  17177. if (!this._disposed) {
  17178. var e = (t = t || {}).excludeComponents
  17179. , n = this._model
  17180. , i = []
  17181. , r = this;
  17182. E(e, (function(t) {
  17183. n.eachComponent({
  17184. mainType: t
  17185. }, (function(t) {
  17186. var e = r._componentsMap[t.__viewId];
  17187. e.group.ignore || (i.push(e),
  17188. e.group.ignore = !0)
  17189. }
  17190. ))
  17191. }
  17192. ));
  17193. var o = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png"));
  17194. return E(i, (function(t) {
  17195. t.group.ignore = !1
  17196. }
  17197. )),
  17198. o
  17199. }
  17200. om(this.id)
  17201. }
  17202. ,
  17203. e.prototype.getConnectedDataURL = function(t) {
  17204. if (!this._disposed) {
  17205. var e = "svg" === t.type
  17206. , n = this.group
  17207. , i = Math.min
  17208. , r = Math.max
  17209. , o = 1 / 0;
  17210. if (fm[n]) {
  17211. var a = o
  17212. , s = o
  17213. , l = -1 / 0
  17214. , u = -1 / 0
  17215. , c = []
  17216. , p = t && t.pixelRatio || this.getDevicePixelRatio();
  17217. E(dm, (function(o, h) {
  17218. if (o.group === n) {
  17219. var p = e ? o.getZr().painter.getSvgDom().innerHTML : o.renderToCanvas(T(t))
  17220. , d = o.getDom().getBoundingClientRect();
  17221. a = i(d.left, a),
  17222. s = i(d.top, s),
  17223. l = r(d.right, l),
  17224. u = r(d.bottom, u),
  17225. c.push({
  17226. dom: p,
  17227. left: d.left,
  17228. top: d.top
  17229. })
  17230. }
  17231. }
  17232. ));
  17233. var d = (l *= p) - (a *= p)
  17234. , f = (u *= p) - (s *= p)
  17235. , g = h.createCanvas()
  17236. , y = Yr(g, {
  17237. renderer: e ? "svg" : "canvas"
  17238. });
  17239. if (y.resize({
  17240. width: d,
  17241. height: f
  17242. }),
  17243. e) {
  17244. var v = "";
  17245. return E(c, (function(t) {
  17246. var e = t.left - a
  17247. , n = t.top - s;
  17248. v += '<g transform="translate(' + e + "," + n + ')">' + t.dom + "</g>"
  17249. }
  17250. )),
  17251. y.painter.getSvgRoot().innerHTML = v,
  17252. t.connectedBackgroundColor && y.painter.setBackgroundColor(t.connectedBackgroundColor),
  17253. y.refreshImmediately(),
  17254. y.painter.toDataURL()
  17255. }
  17256. return t.connectedBackgroundColor && y.add(new Ws({
  17257. shape: {
  17258. x: 0,
  17259. y: 0,
  17260. width: d,
  17261. height: f
  17262. },
  17263. style: {
  17264. fill: t.connectedBackgroundColor
  17265. }
  17266. })),
  17267. E(c, (function(t) {
  17268. var e = new Ns({
  17269. style: {
  17270. x: t.left * p - a,
  17271. y: t.top * p - s,
  17272. image: t.dom
  17273. }
  17274. });
  17275. y.add(e)
  17276. }
  17277. )),
  17278. y.refreshImmediately(),
  17279. g.toDataURL("image/" + (t && t.type || "png"))
  17280. }
  17281. return this.getDataURL(t)
  17282. }
  17283. om(this.id)
  17284. }
  17285. ,
  17286. e.prototype.convertToPixel = function(t, e) {
  17287. return Fv(this, "convertToPixel", t, e)
  17288. }
  17289. ,
  17290. e.prototype.convertFromPixel = function(t, e) {
  17291. return Fv(this, "convertFromPixel", t, e)
  17292. }
  17293. ,
  17294. e.prototype.containPixel = function(t, e) {
  17295. var n;
  17296. if (!this._disposed)
  17297. return E(Fo(this._model, t), (function(t, i) {
  17298. i.indexOf("Models") >= 0 && E(t, (function(t) {
  17299. var r = t.coordinateSystem;
  17300. if (r && r.containPoint)
  17301. n = n || !!r.containPoint(e);
  17302. else if ("seriesModels" === i) {
  17303. var o = this._chartsMap[t.__viewId];
  17304. o && o.containPoint && (n = n || o.containPoint(e, t))
  17305. } else
  17306. 0
  17307. }
  17308. ), this)
  17309. }
  17310. ), this),
  17311. !!n;
  17312. om(this.id)
  17313. }
  17314. ,
  17315. e.prototype.getVisual = function(t, e) {
  17316. var n = Fo(this._model, t, {
  17317. defaultMainType: "series"
  17318. })
  17319. , i = n.seriesModel;
  17320. var r = i.getData()
  17321. , o = n.hasOwnProperty("dataIndexInside") ? n.dataIndexInside : n.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(n.dataIndex) : null;
  17322. return null != o ? Dy(r, o, e) : Ay(r, e)
  17323. }
  17324. ,
  17325. e.prototype.getViewOfComponentModel = function(t) {
  17326. return this._componentsMap[t.__viewId]
  17327. }
  17328. ,
  17329. e.prototype.getViewOfSeriesModel = function(t) {
  17330. return this._chartsMap[t.__viewId]
  17331. }
  17332. ,
  17333. e.prototype._initEvents = function() {
  17334. var t, e, n, i = this;
  17335. E(rm, (function(t) {
  17336. var e = function(e) {
  17337. var n, r = i.getModel(), o = e.target, a = "globalout" === t;
  17338. if (a ? n = {} : o && Oy(o, (function(t) {
  17339. var e = rl(t);
  17340. if (e && null != e.dataIndex) {
  17341. var i = e.dataModel || r.getSeriesByIndex(e.seriesIndex);
  17342. return n = i && i.getDataParams(e.dataIndex, e.dataType, o) || {},
  17343. !0
  17344. }
  17345. if (e.eventData)
  17346. return n = A({}, e.eventData),
  17347. !0
  17348. }
  17349. ), !0),
  17350. n) {
  17351. var s = n.componentType
  17352. , l = n.componentIndex;
  17353. "markLine" !== s && "markPoint" !== s && "markArea" !== s || (s = "series",
  17354. l = n.seriesIndex);
  17355. var u = s && null != l && r.getComponent(s, l)
  17356. , h = u && i["series" === u.mainType ? "_chartsMap" : "_componentsMap"][u.__viewId];
  17357. 0,
  17358. n.event = e,
  17359. n.type = t,
  17360. i._$eventProcessor.eventInfo = {
  17361. targetEl: o,
  17362. packedEvent: n,
  17363. model: u,
  17364. view: h
  17365. },
  17366. i.trigger(t, n)
  17367. }
  17368. };
  17369. e.zrEventfulCallAtLast = !0,
  17370. i._zr.on(t, e, i)
  17371. }
  17372. )),
  17373. E(sm, (function(t, e) {
  17374. i._messageCenter.on(e, (function(t) {
  17375. this.trigger(e, t)
  17376. }
  17377. ), i)
  17378. }
  17379. )),
  17380. E(["selectchanged"], (function(t) {
  17381. i._messageCenter.on(t, (function(e) {
  17382. this.trigger(t, e)
  17383. }
  17384. ), i)
  17385. }
  17386. )),
  17387. t = this._messageCenter,
  17388. e = this,
  17389. n = this._api,
  17390. t.on("selectchanged", (function(t) {
  17391. var i = n.getModel();
  17392. t.isFromClick ? (Py("map", "selectchanged", e, i, t),
  17393. Py("pie", "selectchanged", e, i, t)) : "select" === t.fromAction ? (Py("map", "selected", e, i, t),
  17394. Py("pie", "selected", e, i, t)) : "unselect" === t.fromAction && (Py("map", "unselected", e, i, t),
  17395. Py("pie", "unselected", e, i, t))
  17396. }
  17397. ))
  17398. }
  17399. ,
  17400. e.prototype.isDisposed = function() {
  17401. return this._disposed
  17402. }
  17403. ,
  17404. e.prototype.clear = function() {
  17405. this._disposed ? om(this.id) : this.setOption({
  17406. series: []
  17407. }, !0)
  17408. }
  17409. ,
  17410. e.prototype.dispose = function() {
  17411. if (this._disposed)
  17412. om(this.id);
  17413. else {
  17414. this._disposed = !0,
  17415. this.getDom() && Xo(this.getDom(), vm, "");
  17416. var t = this
  17417. , e = t._api
  17418. , n = t._model;
  17419. E(t._componentsViews, (function(t) {
  17420. t.dispose(n, e)
  17421. }
  17422. )),
  17423. E(t._chartsViews, (function(t) {
  17424. t.dispose(n, e)
  17425. }
  17426. )),
  17427. t._zr.dispose(),
  17428. 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,
  17429. delete dm[t.id]
  17430. }
  17431. }
  17432. ,
  17433. e.prototype.resize = function(t) {
  17434. if (!this[Dv])
  17435. if (this._disposed)
  17436. om(this.id);
  17437. else {
  17438. this._zr.resize(t);
  17439. var e = this._model;
  17440. if (this._loadingFX && this._loadingFX.resize(),
  17441. e) {
  17442. var n = e.resetOption("media")
  17443. , i = t && t.silent;
  17444. this[Av] && (null == i && (i = this[Av].silent),
  17445. n = !0,
  17446. this[Av] = null),
  17447. this[Dv] = !0;
  17448. try {
  17449. n && Ev(this),
  17450. Bv.update.call(this, {
  17451. type: "resize",
  17452. animation: A({
  17453. duration: 0
  17454. }, t && t.animation)
  17455. })
  17456. } catch (t) {
  17457. throw this[Dv] = !1,
  17458. t
  17459. }
  17460. this[Dv] = !1,
  17461. Hv.call(this, i),
  17462. Yv.call(this, i)
  17463. }
  17464. }
  17465. }
  17466. ,
  17467. e.prototype.showLoading = function(t, e) {
  17468. if (this._disposed)
  17469. om(this.id);
  17470. else if (q(t) && (e = t,
  17471. t = ""),
  17472. t = t || "default",
  17473. this.hideLoading(),
  17474. pm[t]) {
  17475. var n = pm[t](this._api, e)
  17476. , i = this._zr;
  17477. this._loadingFX = n,
  17478. i.add(n)
  17479. }
  17480. }
  17481. ,
  17482. e.prototype.hideLoading = function() {
  17483. this._disposed ? om(this.id) : (this._loadingFX && this._zr.remove(this._loadingFX),
  17484. this._loadingFX = null)
  17485. }
  17486. ,
  17487. e.prototype.makeActionFromEvent = function(t) {
  17488. var e = A({}, t);
  17489. return e.type = sm[t.type],
  17490. e
  17491. }
  17492. ,
  17493. e.prototype.dispatchAction = function(t, e) {
  17494. if (this._disposed)
  17495. om(this.id);
  17496. else if (q(e) || (e = {
  17497. silent: !!e
  17498. }),
  17499. am[t.type] && this._model)
  17500. if (this[Dv])
  17501. this._pendingActions.push(t);
  17502. else {
  17503. var n = e.silent;
  17504. Wv.call(this, t, n);
  17505. var i = e.flush;
  17506. i ? this._zr.flush() : !1 !== i && r.browser.weChat && this._throttledZrFlush(),
  17507. Hv.call(this, n),
  17508. Yv.call(this, n)
  17509. }
  17510. }
  17511. ,
  17512. e.prototype.updateLabelLayout = function() {
  17513. wv.trigger("series:layoutlabels", this._model, this._api, {
  17514. updatedSeries: []
  17515. })
  17516. }
  17517. ,
  17518. e.prototype.appendData = function(t) {
  17519. if (this._disposed)
  17520. om(this.id);
  17521. else {
  17522. var e = t.seriesIndex
  17523. , n = this.getModel().getSeriesByIndex(e);
  17524. 0,
  17525. n.appendData(t),
  17526. this._scheduler.unfinished = !0,
  17527. this.getZr().wakeUp()
  17528. }
  17529. }
  17530. ,
  17531. e.internalField = function() {
  17532. function t(t) {
  17533. t.clearColorPalette(),
  17534. t.eachSeries((function(t) {
  17535. t.clearColorPalette()
  17536. }
  17537. ))
  17538. }
  17539. function e(t) {
  17540. for (var e = [], n = t.currentStates, i = 0; i < n.length; i++) {
  17541. var r = n[i];
  17542. "emphasis" !== r && "blur" !== r && "select" !== r && e.push(r)
  17543. }
  17544. t.selected && t.states.select && e.push("select"),
  17545. 2 === t.hoverState && t.states.emphasis ? e.push("emphasis") : 1 === t.hoverState && t.states.blur && e.push("blur"),
  17546. t.useStates(e)
  17547. }
  17548. function i(t, e) {
  17549. if (!t.preventAutoZ) {
  17550. var n = t.get("z") || 0
  17551. , i = t.get("zlevel") || 0;
  17552. e.eachRendered((function(t) {
  17553. return o(t, n, i, -1 / 0),
  17554. !0
  17555. }
  17556. ))
  17557. }
  17558. }
  17559. function o(t, e, n, i) {
  17560. var r = t.getTextContent()
  17561. , a = t.getTextGuideLine();
  17562. if (t.isGroup)
  17563. for (var s = t.childrenRef(), l = 0; l < s.length; l++)
  17564. i = Math.max(o(s[l], e, n, i), i);
  17565. else
  17566. t.z = e,
  17567. t.zlevel = n,
  17568. i = Math.max(t.z2, i);
  17569. if (r && (r.z = e,
  17570. r.zlevel = n,
  17571. isFinite(i) && (r.z2 = i + 2)),
  17572. a) {
  17573. var u = t.textGuideLineConfig;
  17574. a.z = e,
  17575. a.zlevel = n,
  17576. isFinite(i) && (a.z2 = i + (u && u.showAbove ? 1 : -1))
  17577. }
  17578. return i
  17579. }
  17580. function a(t, e) {
  17581. e.eachRendered((function(t) {
  17582. if (!xh(t)) {
  17583. var e = t.getTextContent()
  17584. , n = t.getTextGuideLine();
  17585. t.stateTransition && (t.stateTransition = null),
  17586. e && e.stateTransition && (e.stateTransition = null),
  17587. n && n.stateTransition && (n.stateTransition = null),
  17588. t.hasState() ? (t.prevStates = t.currentStates,
  17589. t.clearStates()) : t.prevStates && (t.prevStates = null)
  17590. }
  17591. }
  17592. ))
  17593. }
  17594. function s(t, n) {
  17595. var i = t.getModel("stateAnimation")
  17596. , r = t.isAnimationEnabled()
  17597. , o = i.get("duration")
  17598. , a = o > 0 ? {
  17599. duration: o,
  17600. delay: i.get("delay"),
  17601. easing: i.get("easing")
  17602. } : null;
  17603. n.eachRendered((function(t) {
  17604. if (t.states && t.states.emphasis) {
  17605. if (xh(t))
  17606. return;
  17607. if (t instanceof ks && function(t) {
  17608. var e = ll(t);
  17609. e.normalFill = t.style.fill,
  17610. e.normalStroke = t.style.stroke;
  17611. var n = t.states.select || {};
  17612. e.selectFill = n.style && n.style.fill || null,
  17613. e.selectStroke = n.style && n.style.stroke || null
  17614. }(t),
  17615. t.__dirty) {
  17616. var n = t.prevStates;
  17617. n && t.useStates(n)
  17618. }
  17619. if (r) {
  17620. t.stateTransition = a;
  17621. var i = t.getTextContent()
  17622. , o = t.getTextGuideLine();
  17623. i && (i.stateTransition = a),
  17624. o && (o.stateTransition = a)
  17625. }
  17626. t.__dirty && e(t)
  17627. }
  17628. }
  17629. ))
  17630. }
  17631. Ev = function(t) {
  17632. var e = t._scheduler;
  17633. e.restorePipelines(t._model),
  17634. e.prepareStageTasks(),
  17635. zv(t, !0),
  17636. zv(t, !1),
  17637. e.plan()
  17638. }
  17639. ,
  17640. zv = function(t, e) {
  17641. 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++)
  17642. r[l].__alive = !1;
  17643. function u(t) {
  17644. var l = t.__requireNewView;
  17645. t.__requireNewView = !1;
  17646. var u = "_ec_" + t.id + "_" + t.type
  17647. , h = !l && o[u];
  17648. if (!h) {
  17649. var c = Ko(t.type)
  17650. , p = e ? Ag.getClass(c.main, c.sub) : Og.getClass(c.sub);
  17651. 0,
  17652. (h = new p).init(n, s),
  17653. o[u] = h,
  17654. r.push(h),
  17655. a.add(h.group)
  17656. }
  17657. t.__viewId = h.__id = u,
  17658. h.__alive = !0,
  17659. h.__model = t,
  17660. h.group.__ecComponentInfo = {
  17661. mainType: t.mainType,
  17662. index: t.componentIndex
  17663. },
  17664. !e && i.prepareView(h, t, n, s)
  17665. }
  17666. e ? n.eachComponent((function(t, e) {
  17667. "series" !== t && u(e)
  17668. }
  17669. )) : n.eachSeries(u);
  17670. for (l = 0; l < r.length; ) {
  17671. var h = r[l];
  17672. h.__alive ? l++ : (!e && h.renderTask.dispose(),
  17673. a.remove(h.group),
  17674. h.dispose(n, s),
  17675. r.splice(l, 1),
  17676. o[h.__id] === h && delete o[h.__id],
  17677. h.__id = h.group.__ecComponentInfo = null)
  17678. }
  17679. }
  17680. ,
  17681. Vv = function(t, e, n, i, r) {
  17682. var o = t._model;
  17683. if (o.setUpdatePayload(n),
  17684. i) {
  17685. var a = {};
  17686. a[i + "Id"] = n[i + "Id"],
  17687. a[i + "Index"] = n[i + "Index"],
  17688. a[i + "Name"] = n[i + "Name"];
  17689. var s = {
  17690. mainType: i,
  17691. query: a
  17692. };
  17693. r && (s.subType = r);
  17694. var l, u = n.excludeSeriesId;
  17695. null != u && (l = yt(),
  17696. E(To(u), (function(t) {
  17697. var e = Ro(t, null);
  17698. null != e && l.set(e, !0)
  17699. }
  17700. ))),
  17701. o && o.eachComponent(s, (function(e) {
  17702. if (!(l && null != l.get(e.id)))
  17703. if (eu(n))
  17704. if (e instanceof bg)
  17705. n.type !== dl || n.notBlur || e.get(["emphasis", "disabled"]) || function(t, e, n) {
  17706. var i = t.seriesIndex
  17707. , r = t.getData(e.dataType);
  17708. if (r) {
  17709. var o = zo(r, e);
  17710. o = (Y(o) ? o[0] : o) || 0;
  17711. var a = r.getItemGraphicEl(o);
  17712. if (!a)
  17713. for (var s = r.count(), l = 0; !a && l < s; )
  17714. a = r.getItemGraphicEl(l++);
  17715. if (a) {
  17716. var u = rl(a);
  17717. Gl(i, u.focus, u.blurScope, n)
  17718. } else {
  17719. var h = t.get(["emphasis", "focus"])
  17720. , c = t.get(["emphasis", "blurScope"]);
  17721. null != h && Gl(i, h, c, n)
  17722. }
  17723. }
  17724. }(e, n, t._api);
  17725. else {
  17726. var i = Hl(e.mainType, e.componentIndex, n.name, t._api)
  17727. , r = i.focusSelf
  17728. , o = i.dispatchers;
  17729. n.type === dl && r && !n.notBlur && Wl(e.mainType, e.componentIndex, t._api),
  17730. o && E(o, (function(t) {
  17731. n.type === dl ? Ol(t) : Rl(t)
  17732. }
  17733. ))
  17734. }
  17735. else
  17736. tu(n) && e instanceof bg && (!function(t, e, n) {
  17737. if (tu(e)) {
  17738. var i = e.dataType
  17739. , r = zo(t.getData(i), e);
  17740. Y(r) || (r = [r]),
  17741. t[e.type === vl ? "toggleSelect" : e.type === gl ? "select" : "unselect"](r, i)
  17742. }
  17743. }(e, n, t._api),
  17744. Yl(e),
  17745. Jv(t))
  17746. }
  17747. ), t),
  17748. o && o.eachComponent(s, (function(e) {
  17749. l && null != l.get(e.id) || h(t["series" === i ? "_chartsMap" : "_componentsMap"][e.__viewId])
  17750. }
  17751. ), t)
  17752. } else
  17753. E([].concat(t._componentsViews).concat(t._chartsViews), h);
  17754. function h(i) {
  17755. i && i.__alive && i[e] && i[e](i.__model, o, t._api, n)
  17756. }
  17757. }
  17758. ,
  17759. Bv = {
  17760. prepareAndUpdate: function(t) {
  17761. Ev(this),
  17762. Bv.update.call(this, t, {
  17763. optionChanged: null != t.newOption
  17764. })
  17765. },
  17766. update: function(e, n) {
  17767. var i = this._model
  17768. , r = this._api
  17769. , o = this._zr
  17770. , a = this._coordSysMgr
  17771. , s = this._scheduler;
  17772. if (i) {
  17773. i.setUpdatePayload(e),
  17774. s.restoreData(i, e),
  17775. s.performSeriesTasks(i),
  17776. a.create(i, r),
  17777. s.performDataProcessorTasks(i, e),
  17778. Gv(this, i),
  17779. a.update(i, r),
  17780. t(i),
  17781. s.performVisualTasks(i, e),
  17782. Zv(this, i, r, e, n);
  17783. var l = i.get("backgroundColor") || "transparent"
  17784. , u = i.get("darkMode");
  17785. o.setBackgroundColor(l),
  17786. null != u && "auto" !== u && o.setDarkMode(u),
  17787. wv.trigger("afterupdate", i, r)
  17788. }
  17789. },
  17790. updateTransform: function(e) {
  17791. var n = this
  17792. , i = this._model
  17793. , r = this._api;
  17794. if (i) {
  17795. i.setUpdatePayload(e);
  17796. var o = [];
  17797. i.eachComponent((function(t, a) {
  17798. if ("series" !== t) {
  17799. var s = n.getViewOfComponentModel(a);
  17800. if (s && s.__alive)
  17801. if (s.updateTransform) {
  17802. var l = s.updateTransform(a, i, r, e);
  17803. l && l.update && o.push(s)
  17804. } else
  17805. o.push(s)
  17806. }
  17807. }
  17808. ));
  17809. var a = yt();
  17810. i.eachSeries((function(t) {
  17811. var o = n._chartsMap[t.__viewId];
  17812. if (o.updateTransform) {
  17813. var s = o.updateTransform(t, i, r, e);
  17814. s && s.update && a.set(t.uid, 1)
  17815. } else
  17816. a.set(t.uid, 1)
  17817. }
  17818. )),
  17819. t(i),
  17820. this._scheduler.performVisualTasks(i, e, {
  17821. setDirty: !0,
  17822. dirtyMap: a
  17823. }),
  17824. qv(this, i, r, e, {}, a),
  17825. wv.trigger("afterupdate", i, r)
  17826. }
  17827. },
  17828. updateView: function(e) {
  17829. var n = this._model;
  17830. n && (n.setUpdatePayload(e),
  17831. Og.markUpdateMethod(e, "updateView"),
  17832. t(n),
  17833. this._scheduler.performVisualTasks(n, e, {
  17834. setDirty: !0
  17835. }),
  17836. Zv(this, n, this._api, e, {}),
  17837. wv.trigger("afterupdate", n, this._api))
  17838. },
  17839. updateVisual: function(e) {
  17840. var n = this
  17841. , i = this._model;
  17842. i && (i.setUpdatePayload(e),
  17843. i.eachSeries((function(t) {
  17844. t.getData().clearAllVisual()
  17845. }
  17846. )),
  17847. Og.markUpdateMethod(e, "updateVisual"),
  17848. t(i),
  17849. this._scheduler.performVisualTasks(i, e, {
  17850. visualType: "visual",
  17851. setDirty: !0
  17852. }),
  17853. i.eachComponent((function(t, r) {
  17854. if ("series" !== t) {
  17855. var o = n.getViewOfComponentModel(r);
  17856. o && o.__alive && o.updateVisual(r, i, n._api, e)
  17857. }
  17858. }
  17859. )),
  17860. i.eachSeries((function(t) {
  17861. n._chartsMap[t.__viewId].updateVisual(t, i, n._api, e)
  17862. }
  17863. )),
  17864. wv.trigger("afterupdate", i, this._api))
  17865. },
  17866. updateLayout: function(t) {
  17867. Bv.update.call(this, t)
  17868. }
  17869. },
  17870. Fv = function(t, e, n, i) {
  17871. if (t._disposed)
  17872. om(t.id);
  17873. else {
  17874. for (var r, o = t._model, a = t._coordSysMgr.getCoordinateSystems(), s = Fo(o, n), l = 0; l < a.length; l++) {
  17875. var u = a[l];
  17876. if (u[e] && null != (r = u[e](o, s, i)))
  17877. return r
  17878. }
  17879. 0
  17880. }
  17881. }
  17882. ,
  17883. Gv = function(t, e) {
  17884. var n = t._chartsMap
  17885. , i = t._scheduler;
  17886. e.eachSeries((function(t) {
  17887. i.updateStreamModes(t, n[t.__viewId])
  17888. }
  17889. ))
  17890. }
  17891. ,
  17892. Wv = function(t, e) {
  17893. var n = this
  17894. , i = this.getModel()
  17895. , r = t.type
  17896. , o = t.escapeConnect
  17897. , a = am[r]
  17898. , s = a.actionInfo
  17899. , l = (s.update || "update").split(":")
  17900. , u = l.pop()
  17901. , h = null != l[0] && Ko(l[0]);
  17902. this[Dv] = !0;
  17903. var c = [t]
  17904. , p = !1;
  17905. t.batch && (p = !0,
  17906. c = z(t.batch, (function(e) {
  17907. return (e = k(A({}, e), t)).batch = null,
  17908. e
  17909. }
  17910. )));
  17911. var d, f = [], g = tu(t), y = eu(t);
  17912. if (y && Fl(this._api),
  17913. E(c, (function(e) {
  17914. if ((d = (d = a.action(e, n._model, n._api)) || A({}, e)).type = s.event || d.type,
  17915. f.push(d),
  17916. y) {
  17917. var i = Go(t)
  17918. , r = i.queryOptionMap
  17919. , o = i.mainTypeSpecified ? r.keys()[0] : "series";
  17920. Vv(n, u, e, o),
  17921. Jv(n)
  17922. } else
  17923. g ? (Vv(n, u, e, "series"),
  17924. Jv(n)) : h && Vv(n, u, e, h.main, h.sub)
  17925. }
  17926. )),
  17927. "none" !== u && !y && !g && !h)
  17928. try {
  17929. this[Av] ? (Ev(this),
  17930. Bv.update.call(this, t),
  17931. this[Av] = null) : Bv[u].call(this, t)
  17932. } catch (t) {
  17933. throw this[Dv] = !1,
  17934. t
  17935. }
  17936. if (d = p ? {
  17937. type: s.event || r,
  17938. escapeConnect: o,
  17939. batch: f
  17940. } : f[0],
  17941. this[Dv] = !1,
  17942. !e) {
  17943. var v = this._messageCenter;
  17944. if (v.trigger(d.type, d),
  17945. g) {
  17946. var m = {
  17947. type: "selectchanged",
  17948. escapeConnect: o,
  17949. selected: Xl(i),
  17950. isFromClick: t.isFromClick || !1,
  17951. fromAction: t.type,
  17952. fromActionPayload: t
  17953. };
  17954. v.trigger(m.type, m)
  17955. }
  17956. }
  17957. }
  17958. ,
  17959. Hv = function(t) {
  17960. for (var e = this._pendingActions; e.length; ) {
  17961. var n = e.shift();
  17962. Wv.call(this, n, t)
  17963. }
  17964. }
  17965. ,
  17966. Yv = function(t) {
  17967. !t && this.trigger("updated")
  17968. }
  17969. ,
  17970. Xv = function(t, e) {
  17971. t.on("rendered", (function(n) {
  17972. e.trigger("rendered", n),
  17973. !t.animation.isFinished() || e[Av] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished")
  17974. }
  17975. ))
  17976. }
  17977. ,
  17978. Uv = function(t, e) {
  17979. t.on("mouseover", (function(t) {
  17980. var n = Oy(t.target, Ql);
  17981. n && (!function(t, e, n) {
  17982. var i = rl(t)
  17983. , r = Hl(i.componentMainType, i.componentIndex, i.componentHighDownName, n)
  17984. , o = r.dispatchers
  17985. , a = r.focusSelf;
  17986. o ? (a && Wl(i.componentMainType, i.componentIndex, n),
  17987. E(o, (function(t) {
  17988. return Ll(t, e)
  17989. }
  17990. ))) : (Gl(i.seriesIndex, i.focus, i.blurScope, n),
  17991. "self" === i.focus && Wl(i.componentMainType, i.componentIndex, n),
  17992. Ll(t, e))
  17993. }(n, t, e._api),
  17994. Jv(e))
  17995. }
  17996. )).on("mouseout", (function(t) {
  17997. var n = Oy(t.target, Ql);
  17998. n && (!function(t, e, n) {
  17999. Fl(n);
  18000. var i = rl(t)
  18001. , r = Hl(i.componentMainType, i.componentIndex, i.componentHighDownName, n).dispatchers;
  18002. r ? E(r, (function(t) {
  18003. return Pl(t, e)
  18004. }
  18005. )) : Pl(t, e)
  18006. }(n, t, e._api),
  18007. Jv(e))
  18008. }
  18009. )).on("click", (function(t) {
  18010. var n = Oy(t.target, (function(t) {
  18011. return null != rl(t).dataIndex
  18012. }
  18013. ), !0);
  18014. if (n) {
  18015. var i = n.selected ? "unselect" : "select"
  18016. , r = rl(n);
  18017. e._api.dispatchAction({
  18018. type: i,
  18019. dataType: r.dataType,
  18020. dataIndexInside: r.dataIndex,
  18021. seriesIndex: r.seriesIndex,
  18022. isFromClick: !0
  18023. })
  18024. }
  18025. }
  18026. ))
  18027. }
  18028. ,
  18029. Zv = function(t, e, n, i, r) {
  18030. !function(t) {
  18031. var e = []
  18032. , n = []
  18033. , i = !1;
  18034. if (t.eachComponent((function(t, r) {
  18035. var o = r.get("zlevel") || 0
  18036. , a = r.get("z") || 0
  18037. , s = r.getZLevelKey();
  18038. i = i || !!s,
  18039. ("series" === t ? n : e).push({
  18040. zlevel: o,
  18041. z: a,
  18042. idx: r.componentIndex,
  18043. type: t,
  18044. key: s
  18045. })
  18046. }
  18047. )),
  18048. i) {
  18049. var r, o, a = e.concat(n);
  18050. Qe(a, (function(t, e) {
  18051. return t.zlevel === e.zlevel ? t.z - e.z : t.zlevel - e.zlevel
  18052. }
  18053. )),
  18054. E(a, (function(e) {
  18055. var n = t.getComponent(e.type, e.idx)
  18056. , i = e.zlevel
  18057. , a = e.key;
  18058. null != r && (i = Math.max(r, i)),
  18059. a ? (i === r && a !== o && i++,
  18060. o = a) : o && (i === r && i++,
  18061. o = ""),
  18062. r = i,
  18063. n.setZLevel(i)
  18064. }
  18065. ))
  18066. }
  18067. }(e),
  18068. jv(t, e, n, i, r),
  18069. E(t._chartsViews, (function(t) {
  18070. t.__alive = !1
  18071. }
  18072. )),
  18073. qv(t, e, n, i, r),
  18074. E(t._chartsViews, (function(t) {
  18075. t.__alive || t.remove(e, n)
  18076. }
  18077. ))
  18078. }
  18079. ,
  18080. jv = function(t, e, n, r, o, l) {
  18081. E(l || t._componentsViews, (function(t) {
  18082. var o = t.__model;
  18083. a(o, t),
  18084. t.render(o, e, n, r),
  18085. i(o, t),
  18086. s(o, t)
  18087. }
  18088. ))
  18089. }
  18090. ,
  18091. qv = function(t, e, n, o, l, u) {
  18092. var h = t._scheduler;
  18093. l = A(l || {}, {
  18094. updatedSeries: e.getSeries()
  18095. }),
  18096. wv.trigger("series:beforeupdate", e, n, l);
  18097. var c = !1;
  18098. e.eachSeries((function(e) {
  18099. var n = t._chartsMap[e.__viewId];
  18100. n.__alive = !0;
  18101. var i = n.renderTask;
  18102. h.updatePayload(i, o),
  18103. a(e, n),
  18104. u && u.get(e.uid) && i.dirty(),
  18105. i.perform(h.getPerformArgs(i)) && (c = !0),
  18106. n.group.silent = !!e.get("silent"),
  18107. function(t, e) {
  18108. var n = t.get("blendMode") || null;
  18109. e.eachRendered((function(t) {
  18110. t.isGroup || (t.style.blend = n)
  18111. }
  18112. ))
  18113. }(e, n),
  18114. Yl(e)
  18115. }
  18116. )),
  18117. h.unfinished = c || h.unfinished,
  18118. wv.trigger("series:layoutlabels", e, n, l),
  18119. wv.trigger("series:transition", e, n, l),
  18120. e.eachSeries((function(e) {
  18121. var n = t._chartsMap[e.__viewId];
  18122. i(e, n),
  18123. s(e, n)
  18124. }
  18125. )),
  18126. function(t, e) {
  18127. var n = t._zr
  18128. , i = n.storage
  18129. , o = 0;
  18130. i.traverse((function(t) {
  18131. t.isGroup || o++
  18132. }
  18133. )),
  18134. o > e.get("hoverLayerThreshold") && !r.node && !r.worker && e.eachSeries((function(e) {
  18135. if (!e.preventUsingHoverLayer) {
  18136. var n = t._chartsMap[e.__viewId];
  18137. n.__alive && n.eachRendered((function(t) {
  18138. t.states.emphasis && (t.states.emphasis.hoverLayer = !0)
  18139. }
  18140. ))
  18141. }
  18142. }
  18143. ))
  18144. }(t, e),
  18145. wv.trigger("series:afterupdate", e, n, l)
  18146. }
  18147. ,
  18148. Jv = function(t) {
  18149. t[kv] = !0,
  18150. t.getZr().wakeUp()
  18151. }
  18152. ,
  18153. Qv = function(t) {
  18154. t[kv] && (t.getZr().storage.traverse((function(t) {
  18155. xh(t) || e(t)
  18156. }
  18157. )),
  18158. t[kv] = !1)
  18159. }
  18160. ,
  18161. Kv = function(t) {
  18162. return new (function(e) {
  18163. function i() {
  18164. return null !== e && e.apply(this, arguments) || this
  18165. }
  18166. return n(i, e),
  18167. i.prototype.getCoordinateSystems = function() {
  18168. return t._coordSysMgr.getCoordinateSystems()
  18169. }
  18170. ,
  18171. i.prototype.getComponentByElement = function(e) {
  18172. for (; e; ) {
  18173. var n = e.__ecComponentInfo;
  18174. if (null != n)
  18175. return t._model.getComponent(n.mainType, n.index);
  18176. e = e.parent
  18177. }
  18178. }
  18179. ,
  18180. i.prototype.enterEmphasis = function(e, n) {
  18181. Ol(e, n),
  18182. Jv(t)
  18183. }
  18184. ,
  18185. i.prototype.leaveEmphasis = function(e, n) {
  18186. Rl(e, n),
  18187. Jv(t)
  18188. }
  18189. ,
  18190. i.prototype.enterBlur = function(e) {
  18191. Nl(e),
  18192. Jv(t)
  18193. }
  18194. ,
  18195. i.prototype.leaveBlur = function(e) {
  18196. El(e),
  18197. Jv(t)
  18198. }
  18199. ,
  18200. i.prototype.enterSelect = function(e) {
  18201. zl(e),
  18202. Jv(t)
  18203. }
  18204. ,
  18205. i.prototype.leaveSelect = function(e) {
  18206. Vl(e),
  18207. Jv(t)
  18208. }
  18209. ,
  18210. i.prototype.getModel = function() {
  18211. return t.getModel()
  18212. }
  18213. ,
  18214. i.prototype.getViewOfComponentModel = function(e) {
  18215. return t.getViewOfComponentModel(e)
  18216. }
  18217. ,
  18218. i.prototype.getViewOfSeriesModel = function(e) {
  18219. return t.getViewOfSeriesModel(e)
  18220. }
  18221. ,
  18222. i
  18223. }(_d))(t)
  18224. }
  18225. ,
  18226. $v = function(t) {
  18227. function e(t, e) {
  18228. for (var n = 0; n < t.length; n++) {
  18229. t[n][Pv] = e
  18230. }
  18231. }
  18232. E(sm, (function(n, i) {
  18233. t._messageCenter.on(i, (function(n) {
  18234. if (fm[t.group] && 0 !== t[Pv]) {
  18235. if (n && n.escapeConnect)
  18236. return;
  18237. var i = t.makeActionFromEvent(n)
  18238. , r = [];
  18239. E(dm, (function(e) {
  18240. e !== t && e.group === t.group && r.push(e)
  18241. }
  18242. )),
  18243. e(r, 0),
  18244. E(r, (function(t) {
  18245. 1 !== t[Pv] && t.dispatchAction(i)
  18246. }
  18247. )),
  18248. e(r, 2)
  18249. }
  18250. }
  18251. ))
  18252. }
  18253. ))
  18254. }
  18255. }(),
  18256. e
  18257. }(jt)
  18258. , im = nm.prototype;
  18259. im.on = Ov("on"),
  18260. im.off = Ov("off"),
  18261. im.one = function(t, e, n) {
  18262. var i = this;
  18263. bo(),
  18264. this.on.call(this, t, (function n() {
  18265. for (var r = [], o = 0; o < arguments.length; o++)
  18266. r[o] = arguments[o];
  18267. e && e.apply && e.apply(this, r),
  18268. i.off(t, n)
  18269. }
  18270. ), n)
  18271. }
  18272. ;
  18273. var rm = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  18274. function om(t) {
  18275. 0
  18276. }
  18277. var am = {}
  18278. , sm = {}
  18279. , lm = []
  18280. , um = []
  18281. , hm = []
  18282. , cm = {}
  18283. , pm = {}
  18284. , dm = {}
  18285. , fm = {}
  18286. , gm = +new Date - 0
  18287. , ym = +new Date - 0
  18288. , vm = "_echarts_instance_";
  18289. function mm(t) {
  18290. fm[t] = !1
  18291. }
  18292. var xm = mm;
  18293. function _m(t) {
  18294. return dm[function(t, e) {
  18295. return t.getAttribute ? t.getAttribute(e) : t[e]
  18296. }(t, vm)]
  18297. }
  18298. function bm(t, e) {
  18299. cm[t] = e
  18300. }
  18301. function wm(t) {
  18302. P(um, t) < 0 && um.push(t)
  18303. }
  18304. function Sm(t, e) {
  18305. Pm(lm, t, e, 2e3)
  18306. }
  18307. function Mm(t) {
  18308. Tm("afterinit", t)
  18309. }
  18310. function Im(t) {
  18311. Tm("afterupdate", t)
  18312. }
  18313. function Tm(t, e) {
  18314. wv.on(t, e)
  18315. }
  18316. function Cm(t, e, n) {
  18317. X(e) && (n = e,
  18318. e = "");
  18319. var i = q(t) ? t.type : [t, t = {
  18320. event: e
  18321. }][0];
  18322. t.event = (t.event || i).toLowerCase(),
  18323. e = t.event,
  18324. sm[e] || (lt(Lv.test(i) && Lv.test(e)),
  18325. am[i] || (am[i] = {
  18326. action: n,
  18327. actionInfo: t
  18328. }),
  18329. sm[e] = i)
  18330. }
  18331. function Dm(t, e) {
  18332. wd.register(t, e)
  18333. }
  18334. function Am(t, e) {
  18335. Pm(hm, t, e, 1e3, "layout")
  18336. }
  18337. function km(t, e) {
  18338. Pm(hm, t, e, 3e3, "visual")
  18339. }
  18340. var Lm = [];
  18341. function Pm(t, e, n, i, r) {
  18342. if ((X(e) || q(e)) && (n = e,
  18343. e = i),
  18344. !(P(Lm, n) >= 0)) {
  18345. Lm.push(n);
  18346. var o = ey.wrapStageHandler(n, r);
  18347. o.__prio = e,
  18348. o.__raw = n,
  18349. t.push(o)
  18350. }
  18351. }
  18352. function Om(t, e) {
  18353. pm[t] = e
  18354. }
  18355. function Rm(t, e, n) {
  18356. var i = Mv("registerMap");
  18357. i && i(t, e, n)
  18358. }
  18359. var Nm = function(t) {
  18360. var e = (t = T(t)).type
  18361. , n = "";
  18362. e || wo(n);
  18363. var i = e.split(":");
  18364. 2 !== i.length && wo(n);
  18365. var r = !1;
  18366. "echarts" === i[0] && (e = i[1],
  18367. r = !0),
  18368. t.__isBuiltIn = r,
  18369. Vf.set(e, t)
  18370. };
  18371. km(Iv, Kg),
  18372. km(Tv, Jg),
  18373. km(Tv, Qg),
  18374. km(Iv, Ty),
  18375. km(Tv, Cy),
  18376. km(7e3, (function(t, e) {
  18377. t.eachRawSeries((function(n) {
  18378. if (!t.isSeriesFiltered(n)) {
  18379. var i = n.getData();
  18380. i.hasItemVisual() && i.each((function(t) {
  18381. var n = i.getItemVisual(t, "decal");
  18382. n && (i.ensureUniqueItemVisual(t, "style").decal = mv(n, e))
  18383. }
  18384. ));
  18385. var r = i.getVisual("decal");
  18386. if (r)
  18387. i.getVisual("style").decal = mv(r, e)
  18388. }
  18389. }
  18390. ))
  18391. }
  18392. )),
  18393. wm(Xd),
  18394. Sm(900, (function(t) {
  18395. var e = yt();
  18396. t.eachSeries((function(t) {
  18397. var n = t.get("stack");
  18398. if (n) {
  18399. var i = e.get(n) || e.set(n, [])
  18400. , r = t.getData()
  18401. , o = {
  18402. stackResultDimension: r.getCalculationInfo("stackResultDimension"),
  18403. stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
  18404. stackedDimension: r.getCalculationInfo("stackedDimension"),
  18405. stackedByDimension: r.getCalculationInfo("stackedByDimension"),
  18406. isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
  18407. data: r,
  18408. seriesModel: t
  18409. };
  18410. if (!o.stackedDimension || !o.isStackedByIndex && !o.stackedByDimension)
  18411. return;
  18412. i.length && r.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel),
  18413. i.push(o)
  18414. }
  18415. }
  18416. )),
  18417. e.each(Ud)
  18418. }
  18419. )),
  18420. Om("default", (function(t, e) {
  18421. k(e = e || {}, {
  18422. text: "loading",
  18423. textColor: "#000",
  18424. fontSize: 12,
  18425. fontWeight: "normal",
  18426. fontStyle: "normal",
  18427. fontFamily: "sans-serif",
  18428. maskColor: "rgba(255, 255, 255, 0.8)",
  18429. showSpinner: !0,
  18430. color: "#5470c6",
  18431. spinnerRadius: 10,
  18432. lineWidth: 5,
  18433. zlevel: 0
  18434. });
  18435. var n = new Br
  18436. , i = new Ws({
  18437. style: {
  18438. fill: e.maskColor
  18439. },
  18440. zlevel: e.zlevel,
  18441. z: 1e4
  18442. });
  18443. n.add(i);
  18444. var r, o = new Xs({
  18445. style: {
  18446. text: e.text,
  18447. fill: e.textColor,
  18448. fontSize: e.fontSize,
  18449. fontWeight: e.fontWeight,
  18450. fontStyle: e.fontStyle,
  18451. fontFamily: e.fontFamily
  18452. },
  18453. zlevel: e.zlevel,
  18454. z: 10001
  18455. }), a = new Ws({
  18456. style: {
  18457. fill: "none"
  18458. },
  18459. textContent: o,
  18460. textConfig: {
  18461. position: "right",
  18462. distance: 10
  18463. },
  18464. zlevel: e.zlevel,
  18465. z: 10001
  18466. });
  18467. return n.add(a),
  18468. e.showSpinner && ((r = new nh({
  18469. shape: {
  18470. startAngle: -ty / 2,
  18471. endAngle: -ty / 2 + .1,
  18472. r: e.spinnerRadius
  18473. },
  18474. style: {
  18475. stroke: e.color,
  18476. lineCap: "round",
  18477. lineWidth: e.lineWidth
  18478. },
  18479. zlevel: e.zlevel,
  18480. z: 10001
  18481. })).animateShape(!0).when(1e3, {
  18482. endAngle: 3 * ty / 2
  18483. }).start("circularInOut"),
  18484. r.animateShape(!0).when(1e3, {
  18485. startAngle: 3 * ty / 2
  18486. }).delay(300).start("circularInOut"),
  18487. n.add(r)),
  18488. n.resize = function() {
  18489. var n = o.getBoundingRect().width
  18490. , s = e.showSpinner ? e.spinnerRadius : 0
  18491. , 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)
  18492. , u = t.getHeight() / 2;
  18493. e.showSpinner && r.setShape({
  18494. cx: l,
  18495. cy: u
  18496. }),
  18497. a.setShape({
  18498. x: l - s,
  18499. y: u - s,
  18500. width: 2 * s,
  18501. height: 2 * s
  18502. }),
  18503. i.setShape({
  18504. x: 0,
  18505. y: 0,
  18506. width: t.getWidth(),
  18507. height: t.getHeight()
  18508. })
  18509. }
  18510. ,
  18511. n.resize(),
  18512. n
  18513. }
  18514. )),
  18515. Cm({
  18516. type: dl,
  18517. event: dl,
  18518. update: dl
  18519. }, bt),
  18520. Cm({
  18521. type: fl,
  18522. event: fl,
  18523. update: fl
  18524. }, bt),
  18525. Cm({
  18526. type: gl,
  18527. event: gl,
  18528. update: gl
  18529. }, bt),
  18530. Cm({
  18531. type: yl,
  18532. event: yl,
  18533. update: yl
  18534. }, bt),
  18535. Cm({
  18536. type: vl,
  18537. event: vl,
  18538. update: vl
  18539. }, bt),
  18540. bm("light", vy),
  18541. bm("dark", wy);
  18542. var Em = []
  18543. , zm = {
  18544. registerPreprocessor: wm,
  18545. registerProcessor: Sm,
  18546. registerPostInit: Mm,
  18547. registerPostUpdate: Im,
  18548. registerUpdateLifecycle: Tm,
  18549. registerAction: Cm,
  18550. registerCoordinateSystem: Dm,
  18551. registerLayout: Am,
  18552. registerVisual: km,
  18553. registerTransform: Nm,
  18554. registerLoading: Om,
  18555. registerMap: Rm,
  18556. registerImpl: function(t, e) {
  18557. Sv[t] = e
  18558. },
  18559. PRIORITY: Cv,
  18560. ComponentModel: zp,
  18561. ComponentView: Ag,
  18562. SeriesModel: bg,
  18563. ChartView: Og,
  18564. registerComponentModel: function(t) {
  18565. zp.registerClass(t)
  18566. },
  18567. registerComponentView: function(t) {
  18568. Ag.registerClass(t)
  18569. },
  18570. registerSeriesModel: function(t) {
  18571. bg.registerClass(t)
  18572. },
  18573. registerChartView: function(t) {
  18574. Og.registerClass(t)
  18575. },
  18576. registerSubTypeDefaulter: function(t, e) {
  18577. zp.registerSubTypeDefaulter(t, e)
  18578. },
  18579. registerPainter: function(t, e) {
  18580. Xr(t, e)
  18581. }
  18582. };
  18583. function Vm(t) {
  18584. Y(t) ? E(t, (function(t) {
  18585. Vm(t)
  18586. }
  18587. )) : P(Em, t) >= 0 || (Em.push(t),
  18588. X(t) && (t = {
  18589. install: t
  18590. }),
  18591. t.install(zm))
  18592. }
  18593. function Bm(t) {
  18594. return null == t ? 0 : t.length || 1
  18595. }
  18596. function Fm(t) {
  18597. return t
  18598. }
  18599. var Gm = function() {
  18600. function t(t, e, n, i, r, o) {
  18601. this._old = t,
  18602. this._new = e,
  18603. this._oldKeyGetter = n || Fm,
  18604. this._newKeyGetter = i || Fm,
  18605. this.context = r,
  18606. this._diffModeMultiple = "multiple" === o
  18607. }
  18608. return t.prototype.add = function(t) {
  18609. return this._add = t,
  18610. this
  18611. }
  18612. ,
  18613. t.prototype.update = function(t) {
  18614. return this._update = t,
  18615. this
  18616. }
  18617. ,
  18618. t.prototype.updateManyToOne = function(t) {
  18619. return this._updateManyToOne = t,
  18620. this
  18621. }
  18622. ,
  18623. t.prototype.updateOneToMany = function(t) {
  18624. return this._updateOneToMany = t,
  18625. this
  18626. }
  18627. ,
  18628. t.prototype.updateManyToMany = function(t) {
  18629. return this._updateManyToMany = t,
  18630. this
  18631. }
  18632. ,
  18633. t.prototype.remove = function(t) {
  18634. return this._remove = t,
  18635. this
  18636. }
  18637. ,
  18638. t.prototype.execute = function() {
  18639. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]()
  18640. }
  18641. ,
  18642. t.prototype._executeOneToOne = function() {
  18643. var t = this._old
  18644. , e = this._new
  18645. , n = {}
  18646. , i = new Array(t.length)
  18647. , r = new Array(e.length);
  18648. this._initIndexMap(t, null, i, "_oldKeyGetter"),
  18649. this._initIndexMap(e, n, r, "_newKeyGetter");
  18650. for (var o = 0; o < t.length; o++) {
  18651. var a = i[o]
  18652. , s = n[a]
  18653. , l = Bm(s);
  18654. if (l > 1) {
  18655. var u = s.shift();
  18656. 1 === s.length && (n[a] = s[0]),
  18657. this._update && this._update(u, o)
  18658. } else
  18659. 1 === l ? (n[a] = null,
  18660. this._update && this._update(s, o)) : this._remove && this._remove(o)
  18661. }
  18662. this._performRestAdd(r, n)
  18663. }
  18664. ,
  18665. t.prototype._executeMultiple = function() {
  18666. var t = this._old
  18667. , e = this._new
  18668. , n = {}
  18669. , i = {}
  18670. , r = []
  18671. , o = [];
  18672. this._initIndexMap(t, n, r, "_oldKeyGetter"),
  18673. this._initIndexMap(e, i, o, "_newKeyGetter");
  18674. for (var a = 0; a < r.length; a++) {
  18675. var s = r[a]
  18676. , l = n[s]
  18677. , u = i[s]
  18678. , h = Bm(l)
  18679. , c = Bm(u);
  18680. if (h > 1 && 1 === c)
  18681. this._updateManyToOne && this._updateManyToOne(u, l),
  18682. i[s] = null;
  18683. else if (1 === h && c > 1)
  18684. this._updateOneToMany && this._updateOneToMany(u, l),
  18685. i[s] = null;
  18686. else if (1 === h && 1 === c)
  18687. this._update && this._update(u, l),
  18688. i[s] = null;
  18689. else if (h > 1 && c > 1)
  18690. this._updateManyToMany && this._updateManyToMany(u, l),
  18691. i[s] = null;
  18692. else if (h > 1)
  18693. for (var p = 0; p < h; p++)
  18694. this._remove && this._remove(l[p]);
  18695. else
  18696. this._remove && this._remove(l)
  18697. }
  18698. this._performRestAdd(o, i)
  18699. }
  18700. ,
  18701. t.prototype._performRestAdd = function(t, e) {
  18702. for (var n = 0; n < t.length; n++) {
  18703. var i = t[n]
  18704. , r = e[i]
  18705. , o = Bm(r);
  18706. if (o > 1)
  18707. for (var a = 0; a < o; a++)
  18708. this._add && this._add(r[a]);
  18709. else
  18710. 1 === o && this._add && this._add(r);
  18711. e[i] = null
  18712. }
  18713. }
  18714. ,
  18715. t.prototype._initIndexMap = function(t, e, n, i) {
  18716. for (var r = this._diffModeMultiple, o = 0; o < t.length; o++) {
  18717. var a = "_ec_" + this[i](t[o], o);
  18718. if (r || (n[o] = a),
  18719. e) {
  18720. var s = e[a]
  18721. , l = Bm(s);
  18722. 0 === l ? (e[a] = o,
  18723. r && n.push(a)) : 1 === l ? e[a] = [s, o] : s.push(o)
  18724. }
  18725. }
  18726. }
  18727. ,
  18728. t
  18729. }()
  18730. , Wm = function() {
  18731. function t(t, e) {
  18732. this._encode = t,
  18733. this._schema = e
  18734. }
  18735. return t.prototype.get = function() {
  18736. return {
  18737. fullDimensions: this._getFullDimensionNames(),
  18738. encode: this._encode
  18739. }
  18740. }
  18741. ,
  18742. t.prototype._getFullDimensionNames = function() {
  18743. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []),
  18744. this._cachedDimNames
  18745. }
  18746. ,
  18747. t
  18748. }();
  18749. function Hm(t, e) {
  18750. return t.hasOwnProperty(e) || (t[e] = []),
  18751. t[e]
  18752. }
  18753. function Ym(t) {
  18754. return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
  18755. }
  18756. var Xm = function(t) {
  18757. this.otherDims = {},
  18758. null != t && A(this, t)
  18759. }
  18760. , Um = Vo()
  18761. , Zm = {
  18762. float: "f",
  18763. int: "i",
  18764. ordinal: "o",
  18765. number: "n",
  18766. time: "t"
  18767. }
  18768. , jm = function() {
  18769. function t(t) {
  18770. this.dimensions = t.dimensions,
  18771. this._dimOmitted = t.dimensionOmitted,
  18772. this.source = t.source,
  18773. this._fullDimCount = t.fullDimensionCount,
  18774. this._updateDimOmitted(t.dimensionOmitted)
  18775. }
  18776. return t.prototype.isDimensionOmitted = function() {
  18777. return this._dimOmitted
  18778. }
  18779. ,
  18780. t.prototype._updateDimOmitted = function(t) {
  18781. this._dimOmitted = t,
  18782. t && (this._dimNameMap || (this._dimNameMap = $m(this.source)))
  18783. }
  18784. ,
  18785. t.prototype.getSourceDimensionIndex = function(t) {
  18786. return rt(this._dimNameMap.get(t), -1)
  18787. }
  18788. ,
  18789. t.prototype.getSourceDimension = function(t) {
  18790. var e = this.source.dimensionsDefine;
  18791. if (e)
  18792. return e[t]
  18793. }
  18794. ,
  18795. t.prototype.makeStoreSchema = function() {
  18796. for (var t = this._fullDimCount, e = af(this.source), n = !Jm(t), i = "", r = [], o = 0, a = 0; o < t; o++) {
  18797. var s = void 0
  18798. , l = void 0
  18799. , u = void 0
  18800. , h = this.dimensions[a];
  18801. if (h && h.storeDimIndex === o)
  18802. s = e ? h.name : null,
  18803. l = h.type,
  18804. u = h.ordinalMeta,
  18805. a++;
  18806. else {
  18807. var c = this.getSourceDimension(o);
  18808. c && (s = e ? c.name : null,
  18809. l = c.type)
  18810. }
  18811. r.push({
  18812. property: s,
  18813. type: l,
  18814. ordinalMeta: u
  18815. }),
  18816. !e || null == s || h && h.isCalculationCoord || (i += n ? s.replace(/\`/g, "`1").replace(/\$/g, "`2") : s),
  18817. i += "$",
  18818. i += Zm[l] || "f",
  18819. u && (i += u.uid),
  18820. i += "$"
  18821. }
  18822. var p = this.source;
  18823. return {
  18824. dimensions: r,
  18825. hash: [p.seriesLayoutBy, p.startIndex, i].join("$$")
  18826. }
  18827. }
  18828. ,
  18829. t.prototype.makeOutputDimensionNames = function() {
  18830. for (var t = [], e = 0, n = 0; e < this._fullDimCount; e++) {
  18831. var i = void 0
  18832. , r = this.dimensions[n];
  18833. if (r && r.storeDimIndex === e)
  18834. r.isCalculationCoord || (i = r.name),
  18835. n++;
  18836. else {
  18837. var o = this.getSourceDimension(e);
  18838. o && (i = o.name)
  18839. }
  18840. t.push(i)
  18841. }
  18842. return t
  18843. }
  18844. ,
  18845. t.prototype.appendCalculationDimension = function(t) {
  18846. this.dimensions.push(t),
  18847. t.isCalculationCoord = !0,
  18848. this._fullDimCount++,
  18849. this._updateDimOmitted(!0)
  18850. }
  18851. ,
  18852. t
  18853. }();
  18854. function qm(t) {
  18855. return t instanceof jm
  18856. }
  18857. function Km(t) {
  18858. for (var e = yt(), n = 0; n < (t || []).length; n++) {
  18859. var i = t[n]
  18860. , r = q(i) ? i.name : i;
  18861. null != r && null == e.get(r) && e.set(r, n)
  18862. }
  18863. return e
  18864. }
  18865. function $m(t) {
  18866. var e = Um(t);
  18867. return e.dimNameMap || (e.dimNameMap = Km(t.dimensionsDefine))
  18868. }
  18869. function Jm(t) {
  18870. return t > 30
  18871. }
  18872. var Qm, tx, ex, nx, ix, rx, ox, ax = q, sx = z, lx = "undefined" == typeof Int32Array ? Array : Int32Array, ux = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], hx = ["_approximateExtent"], cx = function() {
  18873. function t(t, e) {
  18874. var n;
  18875. this.type = "list",
  18876. this._dimOmitted = !1,
  18877. this._nameList = [],
  18878. this._idList = [],
  18879. this._visual = {},
  18880. this._layout = {},
  18881. this._itemVisuals = [],
  18882. this._itemLayouts = [],
  18883. this._graphicEls = [],
  18884. this._approximateExtent = {},
  18885. this._calculationInfo = {},
  18886. this.hasItemOption = !1,
  18887. this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "minmaxDownSample", "lttbDownSample", "map"],
  18888. this.CHANGABLE_METHODS = ["filterSelf", "selectRange"],
  18889. this.DOWNSAMPLE_METHODS = ["downSample", "minmaxDownSample", "lttbDownSample"];
  18890. var i = !1;
  18891. qm(t) ? (n = t.dimensions,
  18892. this._dimOmitted = t.isDimensionOmitted(),
  18893. this._schema = t) : (i = !0,
  18894. n = t),
  18895. n = n || ["x", "y"];
  18896. for (var r = {}, o = [], a = {}, s = !1, l = {}, u = 0; u < n.length; u++) {
  18897. var h = n[u]
  18898. , c = U(h) ? new Xm({
  18899. name: h
  18900. }) : h instanceof Xm ? h : new Xm(h)
  18901. , p = c.name;
  18902. c.type = c.type || "float",
  18903. c.coordDim || (c.coordDim = p,
  18904. c.coordDimIndex = 0);
  18905. var d = c.otherDims = c.otherDims || {};
  18906. o.push(p),
  18907. r[p] = c,
  18908. null != l[p] && (s = !0),
  18909. c.createInvertedIndices && (a[p] = []),
  18910. 0 === d.itemName && (this._nameDimIdx = u),
  18911. 0 === d.itemId && (this._idDimIdx = u),
  18912. i && (c.storeDimIndex = u)
  18913. }
  18914. if (this.dimensions = o,
  18915. this._dimInfos = r,
  18916. this._initGetDimensionInfo(s),
  18917. this.hostModel = e,
  18918. this._invertedIndicesMap = a,
  18919. this._dimOmitted) {
  18920. var f = this._dimIdxToName = yt();
  18921. E(o, (function(t) {
  18922. f.set(r[t].storeDimIndex, t)
  18923. }
  18924. ))
  18925. }
  18926. }
  18927. return t.prototype.getDimension = function(t) {
  18928. var e = this._recognizeDimIndex(t);
  18929. if (null == e)
  18930. return t;
  18931. if (e = t,
  18932. !this._dimOmitted)
  18933. return this.dimensions[e];
  18934. var n = this._dimIdxToName.get(e);
  18935. if (null != n)
  18936. return n;
  18937. var i = this._schema.getSourceDimension(e);
  18938. return i ? i.name : void 0
  18939. }
  18940. ,
  18941. t.prototype.getDimensionIndex = function(t) {
  18942. var e = this._recognizeDimIndex(t);
  18943. if (null != e)
  18944. return e;
  18945. if (null == t)
  18946. return -1;
  18947. var n = this._getDimInfo(t);
  18948. return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(t) : -1
  18949. }
  18950. ,
  18951. t.prototype._recognizeDimIndex = function(t) {
  18952. if (j(t) || null != t && !isNaN(t) && !this._getDimInfo(t) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(t) < 0))
  18953. return +t
  18954. }
  18955. ,
  18956. t.prototype._getStoreDimIndex = function(t) {
  18957. var e = this.getDimensionIndex(t);
  18958. return e
  18959. }
  18960. ,
  18961. t.prototype.getDimensionInfo = function(t) {
  18962. return this._getDimInfo(this.getDimension(t))
  18963. }
  18964. ,
  18965. t.prototype._initGetDimensionInfo = function(t) {
  18966. var e = this._dimInfos;
  18967. this._getDimInfo = t ? function(t) {
  18968. return e.hasOwnProperty(t) ? e[t] : void 0
  18969. }
  18970. : function(t) {
  18971. return e[t]
  18972. }
  18973. }
  18974. ,
  18975. t.prototype.getDimensionsOnCoord = function() {
  18976. return this._dimSummary.dataDimsOnCoord.slice()
  18977. }
  18978. ,
  18979. t.prototype.mapDimension = function(t, e) {
  18980. var n = this._dimSummary;
  18981. if (null == e)
  18982. return n.encodeFirstDimNotExtra[t];
  18983. var i = n.encode[t];
  18984. return i ? i[e] : null
  18985. }
  18986. ,
  18987. t.prototype.mapDimensionsAll = function(t) {
  18988. return (this._dimSummary.encode[t] || []).slice()
  18989. }
  18990. ,
  18991. t.prototype.getStore = function() {
  18992. return this._store
  18993. }
  18994. ,
  18995. t.prototype.initData = function(t, e, n) {
  18996. var i, r = this;
  18997. if (t instanceof Kf && (i = t),
  18998. !i) {
  18999. var o = this.dimensions
  19000. , a = Qd(t) || N(t) ? new sf(t,o.length) : t;
  19001. i = new Kf;
  19002. var s = sx(o, (function(t) {
  19003. return {
  19004. type: r._dimInfos[t].type,
  19005. property: t
  19006. }
  19007. }
  19008. ));
  19009. i.initData(a, s, n)
  19010. }
  19011. this._store = i,
  19012. this._nameList = (e || []).slice(),
  19013. this._idList = [],
  19014. this._nameRepeatCount = {},
  19015. this._doInit(0, i.count()),
  19016. this._dimSummary = function(t, e) {
  19017. var n = {}
  19018. , i = n.encode = {}
  19019. , r = yt()
  19020. , o = []
  19021. , a = []
  19022. , s = {};
  19023. E(t.dimensions, (function(e) {
  19024. var n, l = t.getDimensionInfo(e), u = l.coordDim;
  19025. if (u) {
  19026. var h = l.coordDimIndex;
  19027. Hm(i, u)[h] = e,
  19028. l.isExtraCoord || (r.set(u, 1),
  19029. "ordinal" !== (n = l.type) && "time" !== n && (o[0] = e),
  19030. Hm(s, u)[h] = t.getDimensionIndex(l.name)),
  19031. l.defaultTooltip && a.push(e)
  19032. }
  19033. Gp.each((function(t, e) {
  19034. var n = Hm(i, e)
  19035. , r = l.otherDims[e];
  19036. null != r && !1 !== r && (n[r] = l.name)
  19037. }
  19038. ))
  19039. }
  19040. ));
  19041. var l = []
  19042. , u = {};
  19043. r.each((function(t, e) {
  19044. var n = i[e];
  19045. u[e] = n[0],
  19046. l = l.concat(n)
  19047. }
  19048. )),
  19049. n.dataDimsOnCoord = l,
  19050. n.dataDimIndicesOnCoord = z(l, (function(e) {
  19051. return t.getDimensionInfo(e).storeDimIndex
  19052. }
  19053. )),
  19054. n.encodeFirstDimNotExtra = u;
  19055. var h = i.label;
  19056. h && h.length && (o = h.slice());
  19057. var c = i.tooltip;
  19058. return c && c.length ? a = c.slice() : a.length || (a = o.slice()),
  19059. i.defaultedLabel = o,
  19060. i.defaultedTooltip = a,
  19061. n.userOutput = new Wm(s,e),
  19062. n
  19063. }(this, this._schema),
  19064. this.userOutput = this._dimSummary.userOutput
  19065. }
  19066. ,
  19067. t.prototype.appendData = function(t) {
  19068. var e = this._store.appendData(t);
  19069. this._doInit(e[0], e[1])
  19070. }
  19071. ,
  19072. t.prototype.appendValues = function(t, e) {
  19073. var n = this._store.appendValues(t, e && e.length)
  19074. , i = n.start
  19075. , r = n.end
  19076. , o = this._shouldMakeIdFromName();
  19077. if (this._updateOrdinalMeta(),
  19078. e)
  19079. for (var a = i; a < r; a++) {
  19080. var s = a - i;
  19081. this._nameList[a] = e[s],
  19082. o && ox(this, a)
  19083. }
  19084. }
  19085. ,
  19086. t.prototype._updateOrdinalMeta = function() {
  19087. for (var t = this._store, e = this.dimensions, n = 0; n < e.length; n++) {
  19088. var i = this._dimInfos[e[n]];
  19089. i.ordinalMeta && t.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta)
  19090. }
  19091. }
  19092. ,
  19093. t.prototype._shouldMakeIdFromName = function() {
  19094. var t = this._store.getProvider();
  19095. return null == this._idDimIdx && t.getSource().sourceFormat !== Up && !t.fillStorage
  19096. }
  19097. ,
  19098. t.prototype._doInit = function(t, e) {
  19099. if (!(t >= e)) {
  19100. var n = this._store.getProvider();
  19101. this._updateOrdinalMeta();
  19102. var i = this._nameList
  19103. , r = this._idList;
  19104. if (n.getSource().sourceFormat === Wp && !n.pure)
  19105. for (var o = [], a = t; a < e; a++) {
  19106. var s = n.getItem(a, o);
  19107. if (!this.hasItemOption && ko(s) && (this.hasItemOption = !0),
  19108. s) {
  19109. var l = s.name;
  19110. null == i[a] && null != l && (i[a] = Ro(l, null));
  19111. var u = s.id;
  19112. null == r[a] && null != u && (r[a] = Ro(u, null))
  19113. }
  19114. }
  19115. if (this._shouldMakeIdFromName())
  19116. for (a = t; a < e; a++)
  19117. ox(this, a);
  19118. Qm(this)
  19119. }
  19120. }
  19121. ,
  19122. t.prototype.getApproximateExtent = function(t) {
  19123. return this._approximateExtent[t] || this._store.getDataExtent(this._getStoreDimIndex(t))
  19124. }
  19125. ,
  19126. t.prototype.setApproximateExtent = function(t, e) {
  19127. e = this.getDimension(e),
  19128. this._approximateExtent[e] = t.slice()
  19129. }
  19130. ,
  19131. t.prototype.getCalculationInfo = function(t) {
  19132. return this._calculationInfo[t]
  19133. }
  19134. ,
  19135. t.prototype.setCalculationInfo = function(t, e) {
  19136. ax(t) ? A(this._calculationInfo, t) : this._calculationInfo[t] = e
  19137. }
  19138. ,
  19139. t.prototype.getName = function(t) {
  19140. var e = this.getRawIndex(t)
  19141. , n = this._nameList[e];
  19142. return null == n && null != this._nameDimIdx && (n = ex(this, this._nameDimIdx, e)),
  19143. null == n && (n = ""),
  19144. n
  19145. }
  19146. ,
  19147. t.prototype._getCategory = function(t, e) {
  19148. var n = this._store.get(t, e)
  19149. , i = this._store.getOrdinalMeta(t);
  19150. return i ? i.categories[n] : n
  19151. }
  19152. ,
  19153. t.prototype.getId = function(t) {
  19154. return tx(this, this.getRawIndex(t))
  19155. }
  19156. ,
  19157. t.prototype.count = function() {
  19158. return this._store.count()
  19159. }
  19160. ,
  19161. t.prototype.get = function(t, e) {
  19162. var n = this._store
  19163. , i = this._dimInfos[t];
  19164. if (i)
  19165. return n.get(i.storeDimIndex, e)
  19166. }
  19167. ,
  19168. t.prototype.getByRawIndex = function(t, e) {
  19169. var n = this._store
  19170. , i = this._dimInfos[t];
  19171. if (i)
  19172. return n.getByRawIndex(i.storeDimIndex, e)
  19173. }
  19174. ,
  19175. t.prototype.getIndices = function() {
  19176. return this._store.getIndices()
  19177. }
  19178. ,
  19179. t.prototype.getDataExtent = function(t) {
  19180. return this._store.getDataExtent(this._getStoreDimIndex(t))
  19181. }
  19182. ,
  19183. t.prototype.getSum = function(t) {
  19184. return this._store.getSum(this._getStoreDimIndex(t))
  19185. }
  19186. ,
  19187. t.prototype.getMedian = function(t) {
  19188. return this._store.getMedian(this._getStoreDimIndex(t))
  19189. }
  19190. ,
  19191. t.prototype.getValues = function(t, e) {
  19192. var n = this
  19193. , i = this._store;
  19194. return Y(t) ? i.getValues(sx(t, (function(t) {
  19195. return n._getStoreDimIndex(t)
  19196. }
  19197. )), e) : i.getValues(t)
  19198. }
  19199. ,
  19200. t.prototype.hasValue = function(t) {
  19201. for (var e = this._dimSummary.dataDimIndicesOnCoord, n = 0, i = e.length; n < i; n++)
  19202. if (isNaN(this._store.get(e[n], t)))
  19203. return !1;
  19204. return !0
  19205. }
  19206. ,
  19207. t.prototype.indexOfName = function(t) {
  19208. for (var e = 0, n = this._store.count(); e < n; e++)
  19209. if (this.getName(e) === t)
  19210. return e;
  19211. return -1
  19212. }
  19213. ,
  19214. t.prototype.getRawIndex = function(t) {
  19215. return this._store.getRawIndex(t)
  19216. }
  19217. ,
  19218. t.prototype.indexOfRawIndex = function(t) {
  19219. return this._store.indexOfRawIndex(t)
  19220. }
  19221. ,
  19222. t.prototype.rawIndexOf = function(t, e) {
  19223. var n = t && this._invertedIndicesMap[t];
  19224. var i = n && n[e];
  19225. return null == i || isNaN(i) ? -1 : i
  19226. }
  19227. ,
  19228. t.prototype.indicesOfNearest = function(t, e, n) {
  19229. return this._store.indicesOfNearest(this._getStoreDimIndex(t), e, n)
  19230. }
  19231. ,
  19232. t.prototype.each = function(t, e, n) {
  19233. X(t) && (n = e,
  19234. e = t,
  19235. t = []);
  19236. var i = n || this
  19237. , r = sx(nx(t), this._getStoreDimIndex, this);
  19238. this._store.each(r, i ? W(e, i) : e)
  19239. }
  19240. ,
  19241. t.prototype.filterSelf = function(t, e, n) {
  19242. X(t) && (n = e,
  19243. e = t,
  19244. t = []);
  19245. var i = n || this
  19246. , r = sx(nx(t), this._getStoreDimIndex, this);
  19247. return this._store = this._store.filter(r, i ? W(e, i) : e),
  19248. this
  19249. }
  19250. ,
  19251. t.prototype.selectRange = function(t) {
  19252. var e = this
  19253. , n = {};
  19254. return E(G(t), (function(i) {
  19255. var r = e._getStoreDimIndex(i);
  19256. n[r] = t[i]
  19257. }
  19258. )),
  19259. this._store = this._store.selectRange(n),
  19260. this
  19261. }
  19262. ,
  19263. t.prototype.mapArray = function(t, e, n) {
  19264. X(t) && (n = e,
  19265. e = t,
  19266. t = []),
  19267. n = n || this;
  19268. var i = [];
  19269. return this.each(t, (function() {
  19270. i.push(e && e.apply(this, arguments))
  19271. }
  19272. ), n),
  19273. i
  19274. }
  19275. ,
  19276. t.prototype.map = function(t, e, n, i) {
  19277. var r = n || i || this
  19278. , o = sx(nx(t), this._getStoreDimIndex, this)
  19279. , a = rx(this);
  19280. return a._store = this._store.map(o, r ? W(e, r) : e),
  19281. a
  19282. }
  19283. ,
  19284. t.prototype.modify = function(t, e, n, i) {
  19285. var r = n || i || this;
  19286. var o = sx(nx(t), this._getStoreDimIndex, this);
  19287. this._store.modify(o, r ? W(e, r) : e)
  19288. }
  19289. ,
  19290. t.prototype.downSample = function(t, e, n, i) {
  19291. var r = rx(this);
  19292. return r._store = this._store.downSample(this._getStoreDimIndex(t), e, n, i),
  19293. r
  19294. }
  19295. ,
  19296. t.prototype.minmaxDownSample = function(t, e) {
  19297. var n = rx(this);
  19298. return n._store = this._store.minmaxDownSample(this._getStoreDimIndex(t), e),
  19299. n
  19300. }
  19301. ,
  19302. t.prototype.lttbDownSample = function(t, e) {
  19303. var n = rx(this);
  19304. return n._store = this._store.lttbDownSample(this._getStoreDimIndex(t), e),
  19305. n
  19306. }
  19307. ,
  19308. t.prototype.getRawDataItem = function(t) {
  19309. return this._store.getRawDataItem(t)
  19310. }
  19311. ,
  19312. t.prototype.getItemModel = function(t) {
  19313. var e = this.hostModel
  19314. , n = this.getRawDataItem(t);
  19315. return new Cc(n,e,e && e.ecModel)
  19316. }
  19317. ,
  19318. t.prototype.diff = function(t) {
  19319. var e = this;
  19320. return new Gm(t ? t.getStore().getIndices() : [],this.getStore().getIndices(),(function(e) {
  19321. return tx(t, e)
  19322. }
  19323. ),(function(t) {
  19324. return tx(e, t)
  19325. }
  19326. ))
  19327. }
  19328. ,
  19329. t.prototype.getVisual = function(t) {
  19330. var e = this._visual;
  19331. return e && e[t]
  19332. }
  19333. ,
  19334. t.prototype.setVisual = function(t, e) {
  19335. this._visual = this._visual || {},
  19336. ax(t) ? A(this._visual, t) : this._visual[t] = e
  19337. }
  19338. ,
  19339. t.prototype.getItemVisual = function(t, e) {
  19340. var n = this._itemVisuals[t]
  19341. , i = n && n[e];
  19342. return null == i ? this.getVisual(e) : i
  19343. }
  19344. ,
  19345. t.prototype.hasItemVisual = function() {
  19346. return this._itemVisuals.length > 0
  19347. }
  19348. ,
  19349. t.prototype.ensureUniqueItemVisual = function(t, e) {
  19350. var n = this._itemVisuals
  19351. , i = n[t];
  19352. i || (i = n[t] = {});
  19353. var r = i[e];
  19354. return null == r && (Y(r = this.getVisual(e)) ? r = r.slice() : ax(r) && (r = A({}, r)),
  19355. i[e] = r),
  19356. r
  19357. }
  19358. ,
  19359. t.prototype.setItemVisual = function(t, e, n) {
  19360. var i = this._itemVisuals[t] || {};
  19361. this._itemVisuals[t] = i,
  19362. ax(e) ? A(i, e) : i[e] = n
  19363. }
  19364. ,
  19365. t.prototype.clearAllVisual = function() {
  19366. this._visual = {},
  19367. this._itemVisuals = []
  19368. }
  19369. ,
  19370. t.prototype.setLayout = function(t, e) {
  19371. ax(t) ? A(this._layout, t) : this._layout[t] = e
  19372. }
  19373. ,
  19374. t.prototype.getLayout = function(t) {
  19375. return this._layout[t]
  19376. }
  19377. ,
  19378. t.prototype.getItemLayout = function(t) {
  19379. return this._itemLayouts[t]
  19380. }
  19381. ,
  19382. t.prototype.setItemLayout = function(t, e, n) {
  19383. this._itemLayouts[t] = n ? A(this._itemLayouts[t] || {}, e) : e
  19384. }
  19385. ,
  19386. t.prototype.clearItemLayouts = function() {
  19387. this._itemLayouts.length = 0
  19388. }
  19389. ,
  19390. t.prototype.setItemGraphicEl = function(t, e) {
  19391. var n = this.hostModel && this.hostModel.seriesIndex;
  19392. ol(n, this.dataType, t, e),
  19393. this._graphicEls[t] = e
  19394. }
  19395. ,
  19396. t.prototype.getItemGraphicEl = function(t) {
  19397. return this._graphicEls[t]
  19398. }
  19399. ,
  19400. t.prototype.eachItemGraphicEl = function(t, e) {
  19401. E(this._graphicEls, (function(n, i) {
  19402. n && t && t.call(e, n, i)
  19403. }
  19404. ))
  19405. }
  19406. ,
  19407. t.prototype.cloneShallow = function(e) {
  19408. return e || (e = new t(this._schema ? this._schema : sx(this.dimensions, this._getDimInfo, this),this.hostModel)),
  19409. ix(e, this),
  19410. e._store = this._store,
  19411. e
  19412. }
  19413. ,
  19414. t.prototype.wrapMethod = function(t, e) {
  19415. var n = this[t];
  19416. X(n) && (this.__wrappedMethods = this.__wrappedMethods || [],
  19417. this.__wrappedMethods.push(t),
  19418. this[t] = function() {
  19419. var t = n.apply(this, arguments);
  19420. return e.apply(this, [t].concat(at(arguments)))
  19421. }
  19422. )
  19423. }
  19424. ,
  19425. t.internalField = (Qm = function(t) {
  19426. var e = t._invertedIndicesMap;
  19427. E(e, (function(n, i) {
  19428. var r = t._dimInfos[i]
  19429. , o = r.ordinalMeta
  19430. , a = t._store;
  19431. if (o) {
  19432. n = e[i] = new lx(o.categories.length);
  19433. for (var s = 0; s < n.length; s++)
  19434. n[s] = -1;
  19435. for (s = 0; s < a.count(); s++)
  19436. n[a.get(r.storeDimIndex, s)] = s
  19437. }
  19438. }
  19439. ))
  19440. }
  19441. ,
  19442. ex = function(t, e, n) {
  19443. return Ro(t._getCategory(e, n), null)
  19444. }
  19445. ,
  19446. tx = function(t, e) {
  19447. var n = t._idList[e];
  19448. return null == n && null != t._idDimIdx && (n = ex(t, t._idDimIdx, e)),
  19449. null == n && (n = "e\0\0" + e),
  19450. n
  19451. }
  19452. ,
  19453. nx = function(t) {
  19454. return Y(t) || (t = null != t ? [t] : []),
  19455. t
  19456. }
  19457. ,
  19458. rx = function(e) {
  19459. var n = new t(e._schema ? e._schema : sx(e.dimensions, e._getDimInfo, e),e.hostModel);
  19460. return ix(n, e),
  19461. n
  19462. }
  19463. ,
  19464. ix = function(t, e) {
  19465. E(ux.concat(e.__wrappedMethods || []), (function(n) {
  19466. e.hasOwnProperty(n) && (t[n] = e[n])
  19467. }
  19468. )),
  19469. t.__wrappedMethods = e.__wrappedMethods,
  19470. E(hx, (function(n) {
  19471. t[n] = T(e[n])
  19472. }
  19473. )),
  19474. t._calculationInfo = A({}, e._calculationInfo)
  19475. }
  19476. ,
  19477. void (ox = function(t, e) {
  19478. var n = t._nameList
  19479. , i = t._idList
  19480. , r = t._nameDimIdx
  19481. , o = t._idDimIdx
  19482. , a = n[e]
  19483. , s = i[e];
  19484. if (null == a && null != r && (n[e] = a = ex(t, r, e)),
  19485. null == s && null != o && (i[e] = s = ex(t, o, e)),
  19486. null == s && null != a) {
  19487. var l = t._nameRepeatCount
  19488. , u = l[a] = (l[a] || 0) + 1;
  19489. s = a,
  19490. u > 1 && (s += "__ec__" + u),
  19491. i[e] = s
  19492. }
  19493. }
  19494. )),
  19495. t
  19496. }();
  19497. function px(t, e) {
  19498. Qd(t) || (t = ef(t));
  19499. var n = (e = e || {}).coordDimensions || []
  19500. , i = e.dimensionsDefine || t.dimensionsDefine || []
  19501. , r = yt()
  19502. , o = []
  19503. , a = function(t, e, n, i) {
  19504. var r = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, i || 0);
  19505. return E(e, (function(t) {
  19506. var e;
  19507. q(t) && (e = t.dimsDef) && (r = Math.max(r, e.length))
  19508. }
  19509. )),
  19510. r
  19511. }(t, n, i, e.dimensionsCount)
  19512. , s = e.canOmitUnusedDimensions && Jm(a)
  19513. , l = i === t.dimensionsDefine
  19514. , u = l ? $m(t) : Km(i)
  19515. , h = e.encodeDefine;
  19516. !h && e.encodeDefaulter && (h = e.encodeDefaulter(t, a));
  19517. for (var c = yt(h), p = new Xf(a), d = 0; d < p.length; d++)
  19518. p[d] = -1;
  19519. function f(t) {
  19520. var e = p[t];
  19521. if (e < 0) {
  19522. var n = i[t]
  19523. , r = q(n) ? n : {
  19524. name: n
  19525. }
  19526. , a = new Xm
  19527. , s = r.name;
  19528. null != s && null != u.get(s) && (a.name = a.displayName = s),
  19529. null != r.type && (a.type = r.type),
  19530. null != r.displayName && (a.displayName = r.displayName);
  19531. var l = o.length;
  19532. return p[t] = l,
  19533. a.storeDimIndex = t,
  19534. o.push(a),
  19535. a
  19536. }
  19537. return o[e]
  19538. }
  19539. if (!s)
  19540. for (d = 0; d < a; d++)
  19541. f(d);
  19542. c.each((function(t, e) {
  19543. var n = To(t).slice();
  19544. if (1 === n.length && !U(n[0]) && n[0] < 0)
  19545. c.set(e, !1);
  19546. else {
  19547. var i = c.set(e, []);
  19548. E(n, (function(t, n) {
  19549. var r = U(t) ? u.get(t) : t;
  19550. null != r && r < a && (i[n] = r,
  19551. y(f(r), e, n))
  19552. }
  19553. ))
  19554. }
  19555. }
  19556. ));
  19557. var g = 0;
  19558. function y(t, e, n) {
  19559. null != Gp.get(e) ? t.otherDims[e] = n : (t.coordDim = e,
  19560. t.coordDimIndex = n,
  19561. r.set(e, !0))
  19562. }
  19563. E(n, (function(t) {
  19564. var e, n, i, r;
  19565. if (U(t))
  19566. e = t,
  19567. r = {};
  19568. else {
  19569. e = (r = t).name;
  19570. var o = r.ordinalMeta;
  19571. r.ordinalMeta = null,
  19572. (r = A({}, r)).ordinalMeta = o,
  19573. n = r.dimsDef,
  19574. i = r.otherDims,
  19575. r.name = r.coordDim = r.coordDimIndex = r.dimsDef = r.otherDims = null
  19576. }
  19577. var s = c.get(e);
  19578. if (!1 !== s) {
  19579. if (!(s = To(s)).length)
  19580. for (var u = 0; u < (n && n.length || 1); u++) {
  19581. for (; g < a && null != f(g).coordDim; )
  19582. g++;
  19583. g < a && s.push(g++)
  19584. }
  19585. E(s, (function(t, o) {
  19586. var a = f(t);
  19587. if (l && null != r.type && (a.type = r.type),
  19588. y(k(a, r), e, o),
  19589. null == a.name && n) {
  19590. var s = n[o];
  19591. !q(s) && (s = {
  19592. name: s
  19593. }),
  19594. a.name = a.displayName = s.name,
  19595. a.defaultTooltip = s.defaultTooltip
  19596. }
  19597. i && k(a.otherDims, i)
  19598. }
  19599. ))
  19600. }
  19601. }
  19602. ));
  19603. var v = e.generateCoord
  19604. , m = e.generateCoordCount
  19605. , x = null != m;
  19606. m = v ? m || 1 : 0;
  19607. var _ = v || "value";
  19608. function b(t) {
  19609. null == t.name && (t.name = t.coordDim)
  19610. }
  19611. if (s)
  19612. E(o, (function(t) {
  19613. b(t)
  19614. }
  19615. )),
  19616. o.sort((function(t, e) {
  19617. return t.storeDimIndex - e.storeDimIndex
  19618. }
  19619. ));
  19620. else
  19621. for (var w = 0; w < a; w++) {
  19622. var S = f(w);
  19623. null == S.coordDim && (S.coordDim = dx(_, r, x),
  19624. S.coordDimIndex = 0,
  19625. (!v || m <= 0) && (S.isExtraCoord = !0),
  19626. m--),
  19627. b(S),
  19628. null != S.type || id(t, w) !== Kp && (!S.isExtraCoord || null == S.otherDims.itemName && null == S.otherDims.seriesName) || (S.type = "ordinal")
  19629. }
  19630. return function(t) {
  19631. for (var e = yt(), n = 0; n < t.length; n++) {
  19632. var i = t[n]
  19633. , r = i.name
  19634. , o = e.get(r) || 0;
  19635. o > 0 && (i.name = r + (o - 1)),
  19636. o++,
  19637. e.set(r, o)
  19638. }
  19639. }(o),
  19640. new jm({
  19641. source: t,
  19642. dimensions: o,
  19643. fullDimensionCount: a,
  19644. dimensionOmitted: s
  19645. })
  19646. }
  19647. function dx(t, e, n) {
  19648. if (n || e.hasKey(t)) {
  19649. for (var i = 0; e.hasKey(t + i); )
  19650. i++;
  19651. t += i
  19652. }
  19653. return e.set(t, !0),
  19654. t
  19655. }
  19656. var fx = function(t) {
  19657. this.coordSysDims = [],
  19658. this.axisMap = yt(),
  19659. this.categoryAxisMap = yt(),
  19660. this.coordSysName = t
  19661. };
  19662. var gx = {
  19663. cartesian2d: function(t, e, n, i) {
  19664. var r = t.getReferringComponents("xAxis", Wo).models[0]
  19665. , o = t.getReferringComponents("yAxis", Wo).models[0];
  19666. e.coordSysDims = ["x", "y"],
  19667. n.set("x", r),
  19668. n.set("y", o),
  19669. yx(r) && (i.set("x", r),
  19670. e.firstCategoryDimIndex = 0),
  19671. yx(o) && (i.set("y", o),
  19672. null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  19673. },
  19674. singleAxis: function(t, e, n, i) {
  19675. var r = t.getReferringComponents("singleAxis", Wo).models[0];
  19676. e.coordSysDims = ["single"],
  19677. n.set("single", r),
  19678. yx(r) && (i.set("single", r),
  19679. e.firstCategoryDimIndex = 0)
  19680. },
  19681. polar: function(t, e, n, i) {
  19682. var r = t.getReferringComponents("polar", Wo).models[0]
  19683. , o = r.findAxisModel("radiusAxis")
  19684. , a = r.findAxisModel("angleAxis");
  19685. e.coordSysDims = ["radius", "angle"],
  19686. n.set("radius", o),
  19687. n.set("angle", a),
  19688. yx(o) && (i.set("radius", o),
  19689. e.firstCategoryDimIndex = 0),
  19690. yx(a) && (i.set("angle", a),
  19691. null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
  19692. },
  19693. geo: function(t, e, n, i) {
  19694. e.coordSysDims = ["lng", "lat"]
  19695. },
  19696. parallel: function(t, e, n, i) {
  19697. var r = t.ecModel
  19698. , o = r.getComponent("parallel", t.get("parallelIndex"))
  19699. , a = e.coordSysDims = o.dimensions.slice();
  19700. E(o.parallelAxisIndex, (function(t, o) {
  19701. var s = r.getComponent("parallelAxis", t)
  19702. , l = a[o];
  19703. n.set(l, s),
  19704. yx(s) && (i.set(l, s),
  19705. null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = o))
  19706. }
  19707. ))
  19708. }
  19709. };
  19710. function yx(t) {
  19711. return "category" === t.get("type")
  19712. }
  19713. function vx(t, e, n) {
  19714. var i, r, o, a = (n = n || {}).byIndex, s = n.stackedCoordDimension;
  19715. !function(t) {
  19716. return !qm(t.schema)
  19717. }(e) ? (r = e.schema,
  19718. i = r.dimensions,
  19719. o = e.store) : i = e;
  19720. var l, u, h, c, p = !(!t || !t.get("stack"));
  19721. if (E(i, (function(t, e) {
  19722. U(t) && (i[e] = t = {
  19723. name: t
  19724. }),
  19725. p && !t.isExtraCoord && (a || l || !t.ordinalMeta || (l = t),
  19726. u || "ordinal" === t.type || "time" === t.type || s && s !== t.coordDim || (u = t))
  19727. }
  19728. )),
  19729. !u || a || l || (a = !0),
  19730. u) {
  19731. h = "__\0ecstackresult_" + t.id,
  19732. c = "__\0ecstackedover_" + t.id,
  19733. l && (l.createInvertedIndices = !0);
  19734. var d = u.coordDim
  19735. , f = u.type
  19736. , g = 0;
  19737. E(i, (function(t) {
  19738. t.coordDim === d && g++
  19739. }
  19740. ));
  19741. var y = {
  19742. name: h,
  19743. coordDim: d,
  19744. coordDimIndex: g,
  19745. type: f,
  19746. isExtraCoord: !0,
  19747. isCalculationCoord: !0,
  19748. storeDimIndex: i.length
  19749. }
  19750. , v = {
  19751. name: c,
  19752. coordDim: c,
  19753. coordDimIndex: g + 1,
  19754. type: f,
  19755. isExtraCoord: !0,
  19756. isCalculationCoord: !0,
  19757. storeDimIndex: i.length + 1
  19758. };
  19759. r ? (o && (y.storeDimIndex = o.ensureCalculationDimension(c, f),
  19760. v.storeDimIndex = o.ensureCalculationDimension(h, f)),
  19761. r.appendCalculationDimension(y),
  19762. r.appendCalculationDimension(v)) : (i.push(y),
  19763. i.push(v))
  19764. }
  19765. return {
  19766. stackedDimension: u && u.name,
  19767. stackedByDimension: l && l.name,
  19768. isStackedByIndex: a,
  19769. stackedOverDimension: c,
  19770. stackResultDimension: h
  19771. }
  19772. }
  19773. function mx(t, e) {
  19774. return !!e && e === t.getCalculationInfo("stackedDimension")
  19775. }
  19776. function xx(t, e) {
  19777. return mx(t, e) ? t.getCalculationInfo("stackResultDimension") : e
  19778. }
  19779. function _x(t, e, n) {
  19780. n = n || {};
  19781. var i, r = e.getSourceManager(), o = !1;
  19782. t ? (o = !0,
  19783. i = ef(t)) : o = (i = r.getSource()).sourceFormat === Wp;
  19784. var a = function(t) {
  19785. var e = t.get("coordinateSystem")
  19786. , n = new fx(e)
  19787. , i = gx[e];
  19788. if (i)
  19789. return i(t, n, n.axisMap, n.categoryAxisMap),
  19790. n
  19791. }(e)
  19792. , s = function(t, e) {
  19793. var n, i = t.get("coordinateSystem"), r = wd.get(i);
  19794. return e && e.coordSysDims && (n = z(e.coordSysDims, (function(t) {
  19795. var n = {
  19796. name: t
  19797. }
  19798. , i = e.axisMap.get(t);
  19799. if (i) {
  19800. var r = i.get("type");
  19801. n.type = Ym(r)
  19802. }
  19803. return n
  19804. }
  19805. ))),
  19806. n || (n = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]),
  19807. n
  19808. }(e, a)
  19809. , l = n.useEncodeDefaulter
  19810. , u = X(l) ? l : l ? H(td, s, e) : null
  19811. , h = px(i, {
  19812. coordDimensions: s,
  19813. generateCoord: n.generateCoord,
  19814. encodeDefine: e.getEncode(),
  19815. encodeDefaulter: u,
  19816. canOmitUnusedDimensions: !o
  19817. })
  19818. , c = function(t, e, n) {
  19819. var i, r;
  19820. return n && E(t, (function(t, o) {
  19821. var a = t.coordDim
  19822. , s = n.categoryAxisMap.get(a);
  19823. s && (null == i && (i = o),
  19824. t.ordinalMeta = s.getOrdinalMeta(),
  19825. e && (t.createInvertedIndices = !0)),
  19826. null != t.otherDims.itemName && (r = !0)
  19827. }
  19828. )),
  19829. r || null == i || (t[i].otherDims.itemName = 0),
  19830. i
  19831. }(h.dimensions, n.createInvertedIndices, a)
  19832. , p = o ? null : r.getSharedDataStore(h)
  19833. , d = vx(e, {
  19834. schema: h,
  19835. store: p
  19836. })
  19837. , f = new cx(h,e);
  19838. f.setCalculationInfo(d);
  19839. var g = null != c && function(t) {
  19840. if (t.sourceFormat === Wp) {
  19841. var e = function(t) {
  19842. var e = 0;
  19843. for (; e < t.length && null == t[e]; )
  19844. e++;
  19845. return t[e]
  19846. }(t.data || []);
  19847. return !Y(Ao(e))
  19848. }
  19849. }(i) ? function(t, e, n, i) {
  19850. return i === c ? n : this.defaultDimValueGetter(t, e, n, i)
  19851. }
  19852. : null;
  19853. return f.hasItemOption = !1,
  19854. f.initData(o ? i : p, null, g),
  19855. f
  19856. }
  19857. var bx = function() {
  19858. function t(t) {
  19859. this._setting = t || {},
  19860. this._extent = [1 / 0, -1 / 0]
  19861. }
  19862. return t.prototype.getSetting = function(t) {
  19863. return this._setting[t]
  19864. }
  19865. ,
  19866. t.prototype.unionExtent = function(t) {
  19867. var e = this._extent;
  19868. t[0] < e[0] && (e[0] = t[0]),
  19869. t[1] > e[1] && (e[1] = t[1])
  19870. }
  19871. ,
  19872. t.prototype.unionExtentFromData = function(t, e) {
  19873. this.unionExtent(t.getApproximateExtent(e))
  19874. }
  19875. ,
  19876. t.prototype.getExtent = function() {
  19877. return this._extent.slice()
  19878. }
  19879. ,
  19880. t.prototype.setExtent = function(t, e) {
  19881. var n = this._extent;
  19882. isNaN(t) || (n[0] = t),
  19883. isNaN(e) || (n[1] = e)
  19884. }
  19885. ,
  19886. t.prototype.isInExtentRange = function(t) {
  19887. return this._extent[0] <= t && this._extent[1] >= t
  19888. }
  19889. ,
  19890. t.prototype.isBlank = function() {
  19891. return this._isBlank
  19892. }
  19893. ,
  19894. t.prototype.setBlank = function(t) {
  19895. this._isBlank = t
  19896. }
  19897. ,
  19898. t
  19899. }();
  19900. na(bx);
  19901. var Sx = 0
  19902. , Mx = function() {
  19903. function t(t) {
  19904. this.categories = t.categories || [],
  19905. this._needCollect = t.needCollect,
  19906. this._deduplication = t.deduplication,
  19907. this.uid = ++Sx
  19908. }
  19909. return t.createByAxisModel = function(e) {
  19910. var n = e.option
  19911. , i = n.data
  19912. , r = i && z(i, Ix);
  19913. return new t({
  19914. categories: r,
  19915. needCollect: !r,
  19916. deduplication: !1 !== n.dedplication
  19917. })
  19918. }
  19919. ,
  19920. t.prototype.getOrdinal = function(t) {
  19921. return this._getOrCreateMap().get(t)
  19922. }
  19923. ,
  19924. t.prototype.parseAndCollect = function(t) {
  19925. var e, n = this._needCollect;
  19926. if (!U(t) && !n)
  19927. return t;
  19928. if (n && !this._deduplication)
  19929. return e = this.categories.length,
  19930. this.categories[e] = t,
  19931. e;
  19932. var i = this._getOrCreateMap();
  19933. return null == (e = i.get(t)) && (n ? (e = this.categories.length,
  19934. this.categories[e] = t,
  19935. i.set(t, e)) : e = NaN),
  19936. e
  19937. }
  19938. ,
  19939. t.prototype._getOrCreateMap = function() {
  19940. return this._map || (this._map = yt(this.categories))
  19941. }
  19942. ,
  19943. t
  19944. }();
  19945. function Ix(t) {
  19946. return q(t) && null != t.value ? t.value : t + ""
  19947. }
  19948. function Tx(t) {
  19949. return "interval" === t.type || "log" === t.type
  19950. }
  19951. function Cx(t, e, n, i) {
  19952. var r = {}
  19953. , o = t[1] - t[0]
  19954. , a = r.interval = po(o / e, !0);
  19955. null != n && a < n && (a = r.interval = n),
  19956. null != i && a > i && (a = r.interval = i);
  19957. var s = r.intervalPrecision = Ax(a);
  19958. return function(t, e) {
  19959. !isFinite(t[0]) && (t[0] = e[0]),
  19960. !isFinite(t[1]) && (t[1] = e[1]),
  19961. kx(t, 0, e),
  19962. kx(t, 1, e),
  19963. t[0] > t[1] && (t[0] = t[1])
  19964. }(r.niceTickExtent = [Jr(Math.ceil(t[0] / a) * a, s), Jr(Math.floor(t[1] / a) * a, s)], t),
  19965. r
  19966. }
  19967. function Dx(t) {
  19968. var e = Math.pow(10, co(t))
  19969. , n = t / e;
  19970. return n ? 2 === n ? n = 3 : 3 === n ? n = 5 : n *= 2 : n = 1,
  19971. Jr(n * e)
  19972. }
  19973. function Ax(t) {
  19974. return to(t) + 2
  19975. }
  19976. function kx(t, e, n) {
  19977. t[e] = Math.max(Math.min(t[e], n[1]), n[0])
  19978. }
  19979. function Lx(t, e) {
  19980. return t >= e[0] && t <= e[1]
  19981. }
  19982. function Px(t, e) {
  19983. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
  19984. }
  19985. function Ox(t, e) {
  19986. return t * (e[1] - e[0]) + e[0]
  19987. }
  19988. var Rx = function(t) {
  19989. function e(e) {
  19990. var n = t.call(this, e) || this;
  19991. n.type = "ordinal";
  19992. var i = n.getSetting("ordinalMeta");
  19993. return i || (i = new Mx({})),
  19994. Y(i) && (i = new Mx({
  19995. categories: z(i, (function(t) {
  19996. return q(t) ? t.value : t
  19997. }
  19998. ))
  19999. })),
  20000. n._ordinalMeta = i,
  20001. n._extent = n.getSetting("extent") || [0, i.categories.length - 1],
  20002. n
  20003. }
  20004. return n(e, t),
  20005. e.prototype.parse = function(t) {
  20006. return null == t ? NaN : U(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t)
  20007. }
  20008. ,
  20009. e.prototype.contain = function(t) {
  20010. return Lx(t = this.parse(t), this._extent) && null != this._ordinalMeta.categories[t]
  20011. }
  20012. ,
  20013. e.prototype.normalize = function(t) {
  20014. return Px(t = this._getTickNumber(this.parse(t)), this._extent)
  20015. }
  20016. ,
  20017. e.prototype.scale = function(t) {
  20018. return t = Math.round(Ox(t, this._extent)),
  20019. this.getRawOrdinalNumber(t)
  20020. }
  20021. ,
  20022. e.prototype.getTicks = function() {
  20023. for (var t = [], e = this._extent, n = e[0]; n <= e[1]; )
  20024. t.push({
  20025. value: n
  20026. }),
  20027. n++;
  20028. return t
  20029. }
  20030. ,
  20031. e.prototype.getMinorTicks = function(t) {}
  20032. ,
  20033. e.prototype.setSortInfo = function(t) {
  20034. if (null != t) {
  20035. 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) {
  20036. var s = e[r];
  20037. n[r] = s,
  20038. i[s] = r
  20039. }
  20040. for (var l = 0; r < o; ++r) {
  20041. for (; null != i[l]; )
  20042. l++;
  20043. n.push(l),
  20044. i[l] = r
  20045. }
  20046. } else
  20047. this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null
  20048. }
  20049. ,
  20050. e.prototype._getTickNumber = function(t) {
  20051. var e = this._ticksByOrdinalNumber;
  20052. return e && t >= 0 && t < e.length ? e[t] : t
  20053. }
  20054. ,
  20055. e.prototype.getRawOrdinalNumber = function(t) {
  20056. var e = this._ordinalNumbersByTick;
  20057. return e && t >= 0 && t < e.length ? e[t] : t
  20058. }
  20059. ,
  20060. e.prototype.getLabel = function(t) {
  20061. if (!this.isBlank()) {
  20062. var e = this.getRawOrdinalNumber(t.value)
  20063. , n = this._ordinalMeta.categories[e];
  20064. return null == n ? "" : n + ""
  20065. }
  20066. }
  20067. ,
  20068. e.prototype.count = function() {
  20069. return this._extent[1] - this._extent[0] + 1
  20070. }
  20071. ,
  20072. e.prototype.unionExtentFromData = function(t, e) {
  20073. this.unionExtent(t.getApproximateExtent(e))
  20074. }
  20075. ,
  20076. e.prototype.isInExtentRange = function(t) {
  20077. return t = this._getTickNumber(t),
  20078. this._extent[0] <= t && this._extent[1] >= t
  20079. }
  20080. ,
  20081. e.prototype.getOrdinalMeta = function() {
  20082. return this._ordinalMeta
  20083. }
  20084. ,
  20085. e.prototype.calcNiceTicks = function() {}
  20086. ,
  20087. e.prototype.calcNiceExtent = function() {}
  20088. ,
  20089. e.type = "ordinal",
  20090. e
  20091. }(bx);
  20092. bx.registerClass(Rx);
  20093. var Nx = Jr
  20094. , Ex = function(t) {
  20095. function e() {
  20096. var e = null !== t && t.apply(this, arguments) || this;
  20097. return e.type = "interval",
  20098. e._interval = 0,
  20099. e._intervalPrecision = 2,
  20100. e
  20101. }
  20102. return n(e, t),
  20103. e.prototype.parse = function(t) {
  20104. return t
  20105. }
  20106. ,
  20107. e.prototype.contain = function(t) {
  20108. return Lx(t, this._extent)
  20109. }
  20110. ,
  20111. e.prototype.normalize = function(t) {
  20112. return Px(t, this._extent)
  20113. }
  20114. ,
  20115. e.prototype.scale = function(t) {
  20116. return Ox(t, this._extent)
  20117. }
  20118. ,
  20119. e.prototype.setExtent = function(t, e) {
  20120. var n = this._extent;
  20121. isNaN(t) || (n[0] = parseFloat(t)),
  20122. isNaN(e) || (n[1] = parseFloat(e))
  20123. }
  20124. ,
  20125. e.prototype.unionExtent = function(t) {
  20126. var e = this._extent;
  20127. t[0] < e[0] && (e[0] = t[0]),
  20128. t[1] > e[1] && (e[1] = t[1]),
  20129. this.setExtent(e[0], e[1])
  20130. }
  20131. ,
  20132. e.prototype.getInterval = function() {
  20133. return this._interval
  20134. }
  20135. ,
  20136. e.prototype.setInterval = function(t) {
  20137. this._interval = t,
  20138. this._niceExtent = this._extent.slice(),
  20139. this._intervalPrecision = Ax(t)
  20140. }
  20141. ,
  20142. e.prototype.getTicks = function(t) {
  20143. var e = this._interval
  20144. , n = this._extent
  20145. , i = this._niceExtent
  20146. , r = this._intervalPrecision
  20147. , o = [];
  20148. if (!e)
  20149. return o;
  20150. n[0] < i[0] && (t ? o.push({
  20151. value: Nx(i[0] - e, r)
  20152. }) : o.push({
  20153. value: n[0]
  20154. }));
  20155. for (var a = i[0]; a <= i[1] && (o.push({
  20156. value: a
  20157. }),
  20158. (a = Nx(a + e, r)) !== o[o.length - 1].value); )
  20159. if (o.length > 1e4)
  20160. return [];
  20161. var s = o.length ? o[o.length - 1].value : i[1];
  20162. return n[1] > s && (t ? o.push({
  20163. value: Nx(s + e, r)
  20164. }) : o.push({
  20165. value: n[1]
  20166. })),
  20167. o
  20168. }
  20169. ,
  20170. e.prototype.getMinorTicks = function(t) {
  20171. for (var e = this.getTicks(!0), n = [], i = this.getExtent(), r = 1; r < e.length; r++) {
  20172. for (var o = e[r], a = e[r - 1], s = 0, l = [], u = (o.value - a.value) / t; s < t - 1; ) {
  20173. var h = Nx(a.value + (s + 1) * u);
  20174. h > i[0] && h < i[1] && l.push(h),
  20175. s++
  20176. }
  20177. n.push(l)
  20178. }
  20179. return n
  20180. }
  20181. ,
  20182. e.prototype.getLabel = function(t, e) {
  20183. if (null == t)
  20184. return "";
  20185. var n = e && e.precision;
  20186. return null == n ? n = to(t.value) || 0 : "auto" === n && (n = this._intervalPrecision),
  20187. gp(Nx(t.value, n, !0))
  20188. }
  20189. ,
  20190. e.prototype.calcNiceTicks = function(t, e, n) {
  20191. t = t || 5;
  20192. var i = this._extent
  20193. , r = i[1] - i[0];
  20194. if (isFinite(r)) {
  20195. r < 0 && (r = -r,
  20196. i.reverse());
  20197. var o = Cx(i, t, e, n);
  20198. this._intervalPrecision = o.intervalPrecision,
  20199. this._interval = o.interval,
  20200. this._niceExtent = o.niceTickExtent
  20201. }
  20202. }
  20203. ,
  20204. e.prototype.calcNiceExtent = function(t) {
  20205. var e = this._extent;
  20206. if (e[0] === e[1])
  20207. if (0 !== e[0]) {
  20208. var n = Math.abs(e[0]);
  20209. t.fixMax || (e[1] += n / 2),
  20210. e[0] -= n / 2
  20211. } else
  20212. e[1] = 1;
  20213. var i = e[1] - e[0];
  20214. isFinite(i) || (e[0] = 0,
  20215. e[1] = 1),
  20216. this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  20217. var r = this._interval;
  20218. t.fixMin || (e[0] = Nx(Math.floor(e[0] / r) * r)),
  20219. t.fixMax || (e[1] = Nx(Math.ceil(e[1] / r) * r))
  20220. }
  20221. ,
  20222. e.prototype.setNiceExtent = function(t, e) {
  20223. this._niceExtent = [t, e]
  20224. }
  20225. ,
  20226. e.type = "interval",
  20227. e
  20228. }(bx);
  20229. bx.registerClass(Ex);
  20230. var zx = "undefined" != typeof Float32Array
  20231. , Vx = zx ? Float32Array : Array;
  20232. function Bx(t) {
  20233. return Y(t) ? zx ? new Float32Array(t) : t : new Vx(t)
  20234. }
  20235. var Fx = "__ec_stack_";
  20236. function Gx(t) {
  20237. return t.get("stack") || Fx + t.seriesIndex
  20238. }
  20239. function Wx(t) {
  20240. return t.dim + t.index
  20241. }
  20242. function Hx(t, e) {
  20243. var n = [];
  20244. return e.eachSeriesByType(t, (function(t) {
  20245. jx(t) && n.push(t)
  20246. }
  20247. )),
  20248. n
  20249. }
  20250. function Yx(t) {
  20251. var e = function(t) {
  20252. var e = {};
  20253. E(t, (function(t) {
  20254. var n = t.coordinateSystem.getBaseAxis();
  20255. if ("time" === n.type || "value" === n.type)
  20256. 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) {
  20257. var u = a.get(o, s);
  20258. e[r] ? e[r].push(u) : e[r] = [u]
  20259. }
  20260. }
  20261. ));
  20262. var n = {};
  20263. for (var i in e)
  20264. if (e.hasOwnProperty(i)) {
  20265. var r = e[i];
  20266. if (r) {
  20267. r.sort((function(t, e) {
  20268. return t - e
  20269. }
  20270. ));
  20271. for (var o = null, a = 1; a < r.length; ++a) {
  20272. var s = r[a] - r[a - 1];
  20273. s > 0 && (o = null === o ? s : Math.min(o, s))
  20274. }
  20275. n[i] = o
  20276. }
  20277. }
  20278. return n
  20279. }(t)
  20280. , n = [];
  20281. return E(t, (function(t) {
  20282. var i, r = t.coordinateSystem.getBaseAxis(), o = r.getExtent();
  20283. if ("category" === r.type)
  20284. i = r.getBandWidth();
  20285. else if ("value" === r.type || "time" === r.type) {
  20286. var a = r.dim + "_" + r.index
  20287. , s = e[a]
  20288. , l = Math.abs(o[1] - o[0])
  20289. , u = r.scale.getExtent()
  20290. , h = Math.abs(u[1] - u[0]);
  20291. i = s ? l / h * s : l
  20292. } else {
  20293. var c = t.getData();
  20294. i = Math.abs(o[1] - o[0]) / c.count()
  20295. }
  20296. var p = $r(t.get("barWidth"), i)
  20297. , d = $r(t.get("barMaxWidth"), i)
  20298. , f = $r(t.get("barMinWidth") || (qx(t) ? .5 : 1), i)
  20299. , g = t.get("barGap")
  20300. , y = t.get("barCategoryGap");
  20301. n.push({
  20302. bandWidth: i,
  20303. barWidth: p,
  20304. barMaxWidth: d,
  20305. barMinWidth: f,
  20306. barGap: g,
  20307. barCategoryGap: y,
  20308. axisKey: Wx(r),
  20309. stackId: Gx(t)
  20310. })
  20311. }
  20312. )),
  20313. Xx(n)
  20314. }
  20315. function Xx(t) {
  20316. var e = {};
  20317. E(t, (function(t, n) {
  20318. var i = t.axisKey
  20319. , r = t.bandWidth
  20320. , o = e[i] || {
  20321. bandWidth: r,
  20322. remainedWidth: r,
  20323. autoWidthCount: 0,
  20324. categoryGap: null,
  20325. gap: "20%",
  20326. stacks: {}
  20327. }
  20328. , a = o.stacks;
  20329. e[i] = o;
  20330. var s = t.stackId;
  20331. a[s] || o.autoWidthCount++,
  20332. a[s] = a[s] || {
  20333. width: 0,
  20334. maxWidth: 0
  20335. };
  20336. var l = t.barWidth;
  20337. l && !a[s].width && (a[s].width = l,
  20338. l = Math.min(o.remainedWidth, l),
  20339. o.remainedWidth -= l);
  20340. var u = t.barMaxWidth;
  20341. u && (a[s].maxWidth = u);
  20342. var h = t.barMinWidth;
  20343. h && (a[s].minWidth = h);
  20344. var c = t.barGap;
  20345. null != c && (o.gap = c);
  20346. var p = t.barCategoryGap;
  20347. null != p && (o.categoryGap = p)
  20348. }
  20349. ));
  20350. var n = {};
  20351. return E(e, (function(t, e) {
  20352. n[e] = {};
  20353. var i = t.stacks
  20354. , r = t.bandWidth
  20355. , o = t.categoryGap;
  20356. if (null == o) {
  20357. var a = G(i).length;
  20358. o = Math.max(35 - 4 * a, 15) + "%"
  20359. }
  20360. var s = $r(o, r)
  20361. , l = $r(t.gap, 1)
  20362. , u = t.remainedWidth
  20363. , h = t.autoWidthCount
  20364. , c = (u - s) / (h + (h - 1) * l);
  20365. c = Math.max(c, 0),
  20366. E(i, (function(t) {
  20367. var e = t.maxWidth
  20368. , n = t.minWidth;
  20369. if (t.width) {
  20370. i = t.width;
  20371. e && (i = Math.min(i, e)),
  20372. n && (i = Math.max(i, n)),
  20373. t.width = i,
  20374. u -= i + l * i,
  20375. h--
  20376. } else {
  20377. var i = c;
  20378. e && e < i && (i = Math.min(e, u)),
  20379. n && n > i && (i = n),
  20380. i !== c && (t.width = i,
  20381. u -= i + l * i,
  20382. h--)
  20383. }
  20384. }
  20385. )),
  20386. c = (u - s) / (h + (h - 1) * l),
  20387. c = Math.max(c, 0);
  20388. var p, d = 0;
  20389. E(i, (function(t, e) {
  20390. t.width || (t.width = c),
  20391. p = t,
  20392. d += t.width * (1 + l)
  20393. }
  20394. )),
  20395. p && (d -= p.width * l);
  20396. var f = -d / 2;
  20397. E(i, (function(t, i) {
  20398. n[e][i] = n[e][i] || {
  20399. bandWidth: r,
  20400. offset: f,
  20401. width: t.width
  20402. },
  20403. f += t.width * (1 + l)
  20404. }
  20405. ))
  20406. }
  20407. )),
  20408. n
  20409. }
  20410. function Ux(t, e) {
  20411. var n = Hx(t, e)
  20412. , i = Yx(n);
  20413. E(n, (function(t) {
  20414. var e = t.getData()
  20415. , n = t.coordinateSystem.getBaseAxis()
  20416. , r = Gx(t)
  20417. , o = i[Wx(n)][r]
  20418. , a = o.offset
  20419. , s = o.width;
  20420. e.setLayout({
  20421. bandWidth: o.bandWidth,
  20422. offset: a,
  20423. size: s
  20424. })
  20425. }
  20426. ))
  20427. }
  20428. function Zx(t) {
  20429. return {
  20430. seriesType: t,
  20431. plan: kg(),
  20432. reset: function(t) {
  20433. if (jx(t)) {
  20434. var e = t.getData()
  20435. , n = t.coordinateSystem
  20436. , i = n.getBaseAxis()
  20437. , r = n.getOtherAxis(i)
  20438. , o = e.getDimensionIndex(e.mapDimension(r.dim))
  20439. , a = e.getDimensionIndex(e.mapDimension(i.dim))
  20440. , s = t.get("showBackground", !0)
  20441. , l = e.mapDimension(r.dim)
  20442. , u = e.getCalculationInfo("stackResultDimension")
  20443. , h = mx(e, l) && !!e.getCalculationInfo("stackedOnSeries")
  20444. , c = r.isHorizontal()
  20445. , p = function(t, e) {
  20446. var n = e.model.get("startValue");
  20447. n || (n = 0);
  20448. return e.toGlobalCoord(e.dataToCoord("log" === e.type ? n > 0 ? n : 1 : n))
  20449. }(0, r)
  20450. , d = qx(t)
  20451. , f = t.get("barMinHeight") || 0
  20452. , g = u && e.getDimensionIndex(u)
  20453. , y = e.getLayout("size")
  20454. , v = e.getLayout("offset");
  20455. return {
  20456. progress: function(t, e) {
  20457. 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()); ) {
  20458. var S = b.get(h ? g : o, i)
  20459. , M = b.get(a, i)
  20460. , I = p
  20461. , T = void 0;
  20462. h && (T = +S - b.get(o, i));
  20463. var C = void 0
  20464. , D = void 0
  20465. , A = void 0
  20466. , k = void 0;
  20467. if (c) {
  20468. var L = n.dataToPoint([S, M]);
  20469. if (h)
  20470. I = n.dataToPoint([T, M])[0];
  20471. C = I,
  20472. D = L[1] + v,
  20473. A = L[0] - I,
  20474. k = y,
  20475. Math.abs(A) < f && (A = (A < 0 ? -1 : 1) * f)
  20476. } else {
  20477. L = n.dataToPoint([M, S]);
  20478. if (h)
  20479. I = n.dataToPoint([M, T])[1];
  20480. C = L[0] + v,
  20481. D = I,
  20482. A = y,
  20483. k = L[1] - I,
  20484. Math.abs(k) < f && (k = (k <= 0 ? -1 : 1) * f)
  20485. }
  20486. d ? (l[w] = C,
  20487. l[w + 1] = D,
  20488. l[w + 2] = c ? A : k,
  20489. u && (u[w] = c ? x.x : C,
  20490. u[w + 1] = c ? D : x.y,
  20491. u[w + 2] = _),
  20492. m[i] = i) : e.setItemLayout(i, {
  20493. x: C,
  20494. y: D,
  20495. width: A,
  20496. height: k
  20497. }),
  20498. w += 3
  20499. }
  20500. d && e.setLayout({
  20501. largePoints: l,
  20502. largeDataIndices: m,
  20503. largeBackgroundPoints: u,
  20504. valueAxisHorizontal: c
  20505. })
  20506. }
  20507. }
  20508. }
  20509. }
  20510. }
  20511. }
  20512. function jx(t) {
  20513. return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
  20514. }
  20515. function qx(t) {
  20516. return t.pipelineContext && t.pipelineContext.large
  20517. }
  20518. var Kx = function(t) {
  20519. function e(e) {
  20520. var n = t.call(this, e) || this;
  20521. return n.type = "time",
  20522. n
  20523. }
  20524. return n(e, t),
  20525. e.prototype.getLabel = function(t) {
  20526. var e = this.getSetting("useUTC");
  20527. return Jc(t.value, Uc[function(t) {
  20528. switch (t) {
  20529. case "year":
  20530. case "month":
  20531. return "day";
  20532. case "millisecond":
  20533. return "millisecond";
  20534. default:
  20535. return "second"
  20536. }
  20537. }(Kc(this._minLevelUnit))] || Uc.second, e, this.getSetting("locale"))
  20538. }
  20539. ,
  20540. e.prototype.getFormattedLabel = function(t, e, n) {
  20541. var i = this.getSetting("useUTC");
  20542. return function(t, e, n, i, r) {
  20543. var o = null;
  20544. if (U(n))
  20545. o = n;
  20546. else if (X(n))
  20547. o = n(t.value, e, {
  20548. level: t.level
  20549. });
  20550. else {
  20551. var a = A({}, Yc);
  20552. if (t.level > 0)
  20553. for (var s = 0; s < Zc.length; ++s)
  20554. a[Zc[s]] = "{primary|" + a[Zc[s]] + "}";
  20555. var l = n ? !1 === n.inherit ? n : k(n, a) : a
  20556. , u = Qc(t.value, r);
  20557. if (l[u])
  20558. o = l[u];
  20559. else if (l.inherit) {
  20560. for (s = jc.indexOf(u) - 1; s >= 0; --s)
  20561. if (l[u]) {
  20562. o = l[u];
  20563. break
  20564. }
  20565. o = o || a.none
  20566. }
  20567. if (Y(o)) {
  20568. var h = null == t.level ? 0 : t.level >= 0 ? t.level : o.length + t.level;
  20569. o = o[h = Math.min(h, o.length - 1)]
  20570. }
  20571. }
  20572. return Jc(new Date(t.value), o, r, i)
  20573. }(t, e, n, this.getSetting("locale"), i)
  20574. }
  20575. ,
  20576. e.prototype.getTicks = function() {
  20577. var t = this._interval
  20578. , e = this._extent
  20579. , n = [];
  20580. if (!t)
  20581. return n;
  20582. n.push({
  20583. value: e[0],
  20584. level: 0
  20585. });
  20586. var i = this.getSetting("useUTC")
  20587. , r = function(t, e, n, i) {
  20588. var r = 1e4
  20589. , o = jc
  20590. , a = 0;
  20591. function s(t, e, n, r, o, a, s) {
  20592. for (var l = new Date(e), u = e, h = l[r](); u < n && u <= i[1]; )
  20593. s.push({
  20594. value: u
  20595. }),
  20596. h += t,
  20597. l[o](h),
  20598. u = l.getTime();
  20599. s.push({
  20600. value: u,
  20601. notAdd: !0
  20602. })
  20603. }
  20604. function l(t, r, o) {
  20605. var a = []
  20606. , l = !r.length;
  20607. if (!function(t, e, n, i) {
  20608. var r = uo(e)
  20609. , o = uo(n)
  20610. , a = function(t) {
  20611. return tp(r, t, i) === tp(o, t, i)
  20612. }
  20613. , s = function() {
  20614. return a("year")
  20615. }
  20616. , l = function() {
  20617. return s() && a("month")
  20618. }
  20619. , u = function() {
  20620. return l() && a("day")
  20621. }
  20622. , h = function() {
  20623. return u() && a("hour")
  20624. }
  20625. , c = function() {
  20626. return h() && a("minute")
  20627. }
  20628. , p = function() {
  20629. return c() && a("second")
  20630. }
  20631. , d = function() {
  20632. return p() && a("millisecond")
  20633. };
  20634. switch (t) {
  20635. case "year":
  20636. return s();
  20637. case "month":
  20638. return l();
  20639. case "day":
  20640. return u();
  20641. case "hour":
  20642. return h();
  20643. case "minute":
  20644. return c();
  20645. case "second":
  20646. return p();
  20647. case "millisecond":
  20648. return d()
  20649. }
  20650. }(Kc(t), i[0], i[1], n)) {
  20651. l && (r = [{
  20652. value: i_(new Date(i[0]), t, n)
  20653. }, {
  20654. value: i[1]
  20655. }]);
  20656. for (var u = 0; u < r.length - 1; u++) {
  20657. var h = r[u].value
  20658. , c = r[u + 1].value;
  20659. if (h !== c) {
  20660. var p = void 0
  20661. , d = void 0
  20662. , f = void 0
  20663. , g = !1;
  20664. switch (t) {
  20665. case "year":
  20666. p = Math.max(1, Math.round(e / Wc / 365)),
  20667. d = ep(n),
  20668. f = lp(n);
  20669. break;
  20670. case "half-year":
  20671. case "quarter":
  20672. case "month":
  20673. p = Qx(e),
  20674. d = np(n),
  20675. f = up(n);
  20676. break;
  20677. case "week":
  20678. case "half-week":
  20679. case "day":
  20680. p = Jx(e),
  20681. d = ip(n),
  20682. f = hp(n),
  20683. g = !0;
  20684. break;
  20685. case "half-day":
  20686. case "quarter-day":
  20687. case "hour":
  20688. p = t_(e),
  20689. d = rp(n),
  20690. f = cp(n);
  20691. break;
  20692. case "minute":
  20693. p = e_(e, !0),
  20694. d = op(n),
  20695. f = pp(n);
  20696. break;
  20697. case "second":
  20698. p = e_(e, !1),
  20699. d = ap(n),
  20700. f = dp(n);
  20701. break;
  20702. case "millisecond":
  20703. p = n_(e),
  20704. d = sp(n),
  20705. f = fp(n)
  20706. }
  20707. s(p, h, c, d, f, g, a),
  20708. "year" === t && o.length > 1 && 0 === u && o.unshift({
  20709. value: o[0].value - p
  20710. })
  20711. }
  20712. }
  20713. for (u = 0; u < a.length; u++)
  20714. o.push(a[u]);
  20715. return a
  20716. }
  20717. }
  20718. for (var u = [], h = [], c = 0, p = 0, d = 0; d < o.length && a++ < r; ++d) {
  20719. var f = Kc(o[d]);
  20720. if ($c(o[d]))
  20721. if (l(o[d], u[u.length - 1] || [], h),
  20722. f !== (o[d + 1] ? Kc(o[d + 1]) : null)) {
  20723. if (h.length) {
  20724. p = c,
  20725. h.sort((function(t, e) {
  20726. return t.value - e.value
  20727. }
  20728. ));
  20729. for (var g = [], y = 0; y < h.length; ++y) {
  20730. var v = h[y].value;
  20731. 0 !== y && h[y - 1].value === v || (g.push(h[y]),
  20732. v >= i[0] && v <= i[1] && c++)
  20733. }
  20734. var m = (i[1] - i[0]) / e;
  20735. if (c > 1.5 * m && p > m / 1.5)
  20736. break;
  20737. if (u.push(g),
  20738. c > m || t === o[d])
  20739. break
  20740. }
  20741. h = []
  20742. }
  20743. }
  20744. 0;
  20745. var x = B(z(u, (function(t) {
  20746. return B(t, (function(t) {
  20747. return t.value >= i[0] && t.value <= i[1] && !t.notAdd
  20748. }
  20749. ))
  20750. }
  20751. )), (function(t) {
  20752. return t.length > 0
  20753. }
  20754. ))
  20755. , _ = []
  20756. , b = x.length - 1;
  20757. for (d = 0; d < x.length; ++d)
  20758. for (var w = x[d], S = 0; S < w.length; ++S)
  20759. _.push({
  20760. value: w[S].value,
  20761. level: b - d
  20762. });
  20763. _.sort((function(t, e) {
  20764. return t.value - e.value
  20765. }
  20766. ));
  20767. var M = [];
  20768. for (d = 0; d < _.length; ++d)
  20769. 0 !== d && _[d].value === _[d - 1].value || M.push(_[d]);
  20770. return M
  20771. }(this._minLevelUnit, this._approxInterval, i, e);
  20772. return (n = n.concat(r)).push({
  20773. value: e[1],
  20774. level: 0
  20775. }),
  20776. n
  20777. }
  20778. ,
  20779. e.prototype.calcNiceExtent = function(t) {
  20780. var e = this._extent;
  20781. if (e[0] === e[1] && (e[0] -= Wc,
  20782. e[1] += Wc),
  20783. e[1] === -1 / 0 && e[0] === 1 / 0) {
  20784. var n = new Date;
  20785. e[1] = +new Date(n.getFullYear(),n.getMonth(),n.getDate()),
  20786. e[0] = e[1] - Wc
  20787. }
  20788. this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval)
  20789. }
  20790. ,
  20791. e.prototype.calcNiceTicks = function(t, e, n) {
  20792. t = t || 10;
  20793. var i = this._extent
  20794. , r = i[1] - i[0];
  20795. this._approxInterval = r / t,
  20796. null != e && this._approxInterval < e && (this._approxInterval = e),
  20797. null != n && this._approxInterval > n && (this._approxInterval = n);
  20798. var o = $x.length
  20799. , a = Math.min(function(t, e, n, i) {
  20800. for (; n < i; ) {
  20801. var r = n + i >>> 1;
  20802. t[r][1] < e ? n = r + 1 : i = r
  20803. }
  20804. return n
  20805. }($x, this._approxInterval, 0, o), o - 1);
  20806. this._interval = $x[a][1],
  20807. this._minLevelUnit = $x[Math.max(a - 1, 0)][0]
  20808. }
  20809. ,
  20810. e.prototype.parse = function(t) {
  20811. return j(t) ? t : +uo(t)
  20812. }
  20813. ,
  20814. e.prototype.contain = function(t) {
  20815. return Lx(this.parse(t), this._extent)
  20816. }
  20817. ,
  20818. e.prototype.normalize = function(t) {
  20819. return Px(this.parse(t), this._extent)
  20820. }
  20821. ,
  20822. e.prototype.scale = function(t) {
  20823. return Ox(t, this._extent)
  20824. }
  20825. ,
  20826. e.type = "time",
  20827. e
  20828. }(Ex)
  20829. , $x = [["second", Bc], ["minute", Fc], ["hour", Gc], ["quarter-day", 216e5], ["half-day", 432e5], ["day", 10368e4], ["half-week", 3024e5], ["week", 6048e5], ["month", 26784e5], ["quarter", 8208e6], ["half-year", Hc / 2], ["year", Hc]];
  20830. function Jx(t, e) {
  20831. return (t /= Wc) > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1
  20832. }
  20833. function Qx(t) {
  20834. return (t /= 2592e6) > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1
  20835. }
  20836. function t_(t) {
  20837. return (t /= Gc) > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1
  20838. }
  20839. function e_(t, e) {
  20840. return (t /= e ? Fc : Bc) > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1
  20841. }
  20842. function n_(t) {
  20843. return po(t, !0)
  20844. }
  20845. function i_(t, e, n) {
  20846. var i = new Date(t);
  20847. switch (Kc(e)) {
  20848. case "year":
  20849. case "month":
  20850. i[up(n)](0);
  20851. case "day":
  20852. i[hp(n)](1);
  20853. case "hour":
  20854. i[cp(n)](0);
  20855. case "minute":
  20856. i[pp(n)](0);
  20857. case "second":
  20858. i[dp(n)](0),
  20859. i[fp(n)](0)
  20860. }
  20861. return i.getTime()
  20862. }
  20863. bx.registerClass(Kx);
  20864. var r_ = bx.prototype
  20865. , o_ = Ex.prototype
  20866. , a_ = Jr
  20867. , s_ = Math.floor
  20868. , l_ = Math.ceil
  20869. , u_ = Math.pow
  20870. , h_ = Math.log
  20871. , c_ = function(t) {
  20872. function e() {
  20873. var e = null !== t && t.apply(this, arguments) || this;
  20874. return e.type = "log",
  20875. e.base = 10,
  20876. e._originalScale = new Ex,
  20877. e._interval = 0,
  20878. e
  20879. }
  20880. return n(e, t),
  20881. e.prototype.getTicks = function(t) {
  20882. var e = this._originalScale
  20883. , n = this._extent
  20884. , i = e.getExtent();
  20885. return z(o_.getTicks.call(this, t), (function(t) {
  20886. var e = t.value
  20887. , r = Jr(u_(this.base, e));
  20888. return r = e === n[0] && this._fixMin ? d_(r, i[0]) : r,
  20889. {
  20890. value: r = e === n[1] && this._fixMax ? d_(r, i[1]) : r
  20891. }
  20892. }
  20893. ), this)
  20894. }
  20895. ,
  20896. e.prototype.setExtent = function(t, e) {
  20897. var n = h_(this.base);
  20898. t = h_(Math.max(0, t)) / n,
  20899. e = h_(Math.max(0, e)) / n,
  20900. o_.setExtent.call(this, t, e)
  20901. }
  20902. ,
  20903. e.prototype.getExtent = function() {
  20904. var t = this.base
  20905. , e = r_.getExtent.call(this);
  20906. e[0] = u_(t, e[0]),
  20907. e[1] = u_(t, e[1]);
  20908. var n = this._originalScale.getExtent();
  20909. return this._fixMin && (e[0] = d_(e[0], n[0])),
  20910. this._fixMax && (e[1] = d_(e[1], n[1])),
  20911. e
  20912. }
  20913. ,
  20914. e.prototype.unionExtent = function(t) {
  20915. this._originalScale.unionExtent(t);
  20916. var e = this.base;
  20917. t[0] = h_(t[0]) / h_(e),
  20918. t[1] = h_(t[1]) / h_(e),
  20919. r_.unionExtent.call(this, t)
  20920. }
  20921. ,
  20922. e.prototype.unionExtentFromData = function(t, e) {
  20923. this.unionExtent(t.getApproximateExtent(e))
  20924. }
  20925. ,
  20926. e.prototype.calcNiceTicks = function(t) {
  20927. t = t || 10;
  20928. var e = this._extent
  20929. , n = e[1] - e[0];
  20930. if (!(n === 1 / 0 || n <= 0)) {
  20931. var i = ho(n);
  20932. for (t / n * i <= .5 && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0; )
  20933. i *= 10;
  20934. var r = [Jr(l_(e[0] / i) * i), Jr(s_(e[1] / i) * i)];
  20935. this._interval = i,
  20936. this._niceExtent = r
  20937. }
  20938. }
  20939. ,
  20940. e.prototype.calcNiceExtent = function(t) {
  20941. o_.calcNiceExtent.call(this, t),
  20942. this._fixMin = t.fixMin,
  20943. this._fixMax = t.fixMax
  20944. }
  20945. ,
  20946. e.prototype.parse = function(t) {
  20947. return t
  20948. }
  20949. ,
  20950. e.prototype.contain = function(t) {
  20951. return Lx(t = h_(t) / h_(this.base), this._extent)
  20952. }
  20953. ,
  20954. e.prototype.normalize = function(t) {
  20955. return Px(t = h_(t) / h_(this.base), this._extent)
  20956. }
  20957. ,
  20958. e.prototype.scale = function(t) {
  20959. return t = Ox(t, this._extent),
  20960. u_(this.base, t)
  20961. }
  20962. ,
  20963. e.type = "log",
  20964. e
  20965. }(bx)
  20966. , p_ = c_.prototype;
  20967. function d_(t, e) {
  20968. return a_(t, to(e))
  20969. }
  20970. p_.getMinorTicks = o_.getMinorTicks,
  20971. p_.getLabel = o_.getLabel,
  20972. bx.registerClass(c_);
  20973. var f_ = function() {
  20974. function t(t, e, n) {
  20975. this._prepareParams(t, e, n)
  20976. }
  20977. return t.prototype._prepareParams = function(t, e, n) {
  20978. n[1] < n[0] && (n = [NaN, NaN]),
  20979. this._dataMin = n[0],
  20980. this._dataMax = n[1];
  20981. var i = this._isOrdinal = "ordinal" === t.type;
  20982. this._needCrossZero = "interval" === t.type && e.getNeedCrossZero && e.getNeedCrossZero();
  20983. var r = e.get("min", !0);
  20984. null == r && (r = e.get("startValue", !0));
  20985. var o = this._modelMinRaw = r;
  20986. X(o) ? this._modelMinNum = m_(t, o({
  20987. min: n[0],
  20988. max: n[1]
  20989. })) : "dataMin" !== o && (this._modelMinNum = m_(t, o));
  20990. var a = this._modelMaxRaw = e.get("max", !0);
  20991. if (X(a) ? this._modelMaxNum = m_(t, a({
  20992. min: n[0],
  20993. max: n[1]
  20994. })) : "dataMax" !== a && (this._modelMaxNum = m_(t, a)),
  20995. i)
  20996. this._axisDataLen = e.getCategories().length;
  20997. else {
  20998. var s = e.get("boundaryGap")
  20999. , l = Y(s) ? s : [s || 0, s || 0];
  21000. "boolean" == typeof l[0] || "boolean" == typeof l[1] ? this._boundaryGapInner = [0, 0] : this._boundaryGapInner = [Cr(l[0], 1), Cr(l[1], 1)]
  21001. }
  21002. }
  21003. ,
  21004. t.prototype.calculate = function() {
  21005. var t = this._isOrdinal
  21006. , e = this._dataMin
  21007. , n = this._dataMax
  21008. , i = this._axisDataLen
  21009. , r = this._boundaryGapInner
  21010. , o = t ? null : n - e || Math.abs(e)
  21011. , a = "dataMin" === this._modelMinRaw ? e : this._modelMinNum
  21012. , s = "dataMax" === this._modelMaxRaw ? n : this._modelMaxNum
  21013. , l = null != a
  21014. , u = null != s;
  21015. null == a && (a = t ? i ? 0 : NaN : e - r[0] * o),
  21016. null == s && (s = t ? i ? i - 1 : NaN : n + r[1] * o),
  21017. (null == a || !isFinite(a)) && (a = NaN),
  21018. (null == s || !isFinite(s)) && (s = NaN);
  21019. var h = nt(a) || nt(s) || t && !i;
  21020. this._needCrossZero && (a > 0 && s > 0 && !l && (a = 0),
  21021. a < 0 && s < 0 && !u && (s = 0));
  21022. var c = this._determinedMin
  21023. , p = this._determinedMax;
  21024. return null != c && (a = c,
  21025. l = !0),
  21026. null != p && (s = p,
  21027. u = !0),
  21028. {
  21029. min: a,
  21030. max: s,
  21031. minFixed: l,
  21032. maxFixed: u,
  21033. isBlank: h
  21034. }
  21035. }
  21036. ,
  21037. t.prototype.modifyDataMinMax = function(t, e) {
  21038. this[y_[t]] = e
  21039. }
  21040. ,
  21041. t.prototype.setDeterminedMinMax = function(t, e) {
  21042. var n = g_[t];
  21043. this[n] = e
  21044. }
  21045. ,
  21046. t.prototype.freeze = function() {
  21047. this.frozen = !0
  21048. }
  21049. ,
  21050. t
  21051. }()
  21052. , g_ = {
  21053. min: "_determinedMin",
  21054. max: "_determinedMax"
  21055. }
  21056. , y_ = {
  21057. min: "_dataMin",
  21058. max: "_dataMax"
  21059. };
  21060. function v_(t, e, n) {
  21061. var i = t.rawExtentInfo;
  21062. return i || (i = new f_(t,e,n),
  21063. t.rawExtentInfo = i,
  21064. i)
  21065. }
  21066. function m_(t, e) {
  21067. return null == e ? null : nt(e) ? NaN : t.parse(e)
  21068. }
  21069. function x_(t, e) {
  21070. var n = t.type
  21071. , i = v_(t, e, t.getExtent()).calculate();
  21072. t.setBlank(i.isBlank);
  21073. var r = i.min
  21074. , o = i.max
  21075. , a = e.ecModel;
  21076. if (a && "time" === n) {
  21077. var s = Hx("bar", a)
  21078. , l = !1;
  21079. if (E(s, (function(t) {
  21080. l = l || t.getBaseAxis() === e.axis
  21081. }
  21082. )),
  21083. l) {
  21084. var u = Yx(s)
  21085. , h = function(t, e, n, i) {
  21086. var r = n.axis.getExtent()
  21087. , o = Math.abs(r[1] - r[0])
  21088. , a = function(t, e, n) {
  21089. if (t && e) {
  21090. var i = t[Wx(e)];
  21091. return null != i && null != n ? i[Gx(n)] : i
  21092. }
  21093. }(i, n.axis);
  21094. if (void 0 === a)
  21095. return {
  21096. min: t,
  21097. max: e
  21098. };
  21099. var s = 1 / 0;
  21100. E(a, (function(t) {
  21101. s = Math.min(t.offset, s)
  21102. }
  21103. ));
  21104. var l = -1 / 0;
  21105. E(a, (function(t) {
  21106. l = Math.max(t.offset + t.width, l)
  21107. }
  21108. )),
  21109. s = Math.abs(s),
  21110. l = Math.abs(l);
  21111. var u = s + l
  21112. , h = e - t
  21113. , c = h / (1 - (s + l) / o) - h;
  21114. return e += c * (l / u),
  21115. t -= c * (s / u),
  21116. {
  21117. min: t,
  21118. max: e
  21119. }
  21120. }(r, o, e, u);
  21121. r = h.min,
  21122. o = h.max
  21123. }
  21124. }
  21125. return {
  21126. extent: [r, o],
  21127. fixMin: i.minFixed,
  21128. fixMax: i.maxFixed
  21129. }
  21130. }
  21131. function __(t, e) {
  21132. var n = e
  21133. , i = x_(t, n)
  21134. , r = i.extent
  21135. , o = n.get("splitNumber");
  21136. t instanceof c_ && (t.base = n.get("logBase"));
  21137. var a = t.type
  21138. , s = n.get("interval")
  21139. , l = "interval" === a || "time" === a;
  21140. t.setExtent(r[0], r[1]),
  21141. t.calcNiceExtent({
  21142. splitNumber: o,
  21143. fixMin: i.fixMin,
  21144. fixMax: i.fixMax,
  21145. minInterval: l ? n.get("minInterval") : null,
  21146. maxInterval: l ? n.get("maxInterval") : null
  21147. }),
  21148. null != s && t.setInterval && t.setInterval(s)
  21149. }
  21150. function b_(t, e) {
  21151. if (e = e || t.get("type"))
  21152. switch (e) {
  21153. case "category":
  21154. return new Rx({
  21155. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  21156. extent: [1 / 0, -1 / 0]
  21157. });
  21158. case "time":
  21159. return new Kx({
  21160. locale: t.ecModel.getLocaleModel(),
  21161. useUTC: t.ecModel.get("useUTC")
  21162. });
  21163. default:
  21164. return new (bx.getClass(e) || Ex)
  21165. }
  21166. }
  21167. function w_(t) {
  21168. var e, n, i = t.getLabelModel().get("formatter"), r = "category" === t.type ? t.scale.getExtent()[0] : null;
  21169. return "time" === t.scale.type ? (n = i,
  21170. function(e, i) {
  21171. return t.scale.getFormattedLabel(e, i, n)
  21172. }
  21173. ) : U(i) ? function(e) {
  21174. return function(n) {
  21175. var i = t.scale.getLabel(n);
  21176. return e.replace("{value}", null != i ? i : "")
  21177. }
  21178. }(i) : X(i) ? (e = i,
  21179. function(n, i) {
  21180. return null != r && (i = n.value - r),
  21181. e(S_(t, n), i, null != n.level ? {
  21182. level: n.level
  21183. } : null)
  21184. }
  21185. ) : function(e) {
  21186. return t.scale.getLabel(e)
  21187. }
  21188. }
  21189. function S_(t, e) {
  21190. return "category" === t.type ? t.scale.getLabel(e) : e.value
  21191. }
  21192. function M_(t, e) {
  21193. var n = e * Math.PI / 180
  21194. , i = t.width
  21195. , r = t.height
  21196. , o = i * Math.abs(Math.cos(n)) + Math.abs(r * Math.sin(n))
  21197. , a = i * Math.abs(Math.sin(n)) + Math.abs(r * Math.cos(n));
  21198. return new ze(t.x,t.y,o,a)
  21199. }
  21200. function I_(t) {
  21201. var e = t.get("interval");
  21202. return null == e ? "auto" : e
  21203. }
  21204. function T_(t) {
  21205. return "category" === t.type && 0 === I_(t.getLabelModel())
  21206. }
  21207. function C_(t, e) {
  21208. var n = {};
  21209. return E(t.mapDimensionsAll(e), (function(e) {
  21210. n[xx(t, e)] = !0
  21211. }
  21212. )),
  21213. G(n)
  21214. }
  21215. var D_ = function() {
  21216. function t() {}
  21217. return t.prototype.getNeedCrossZero = function() {
  21218. return !this.option.scale
  21219. }
  21220. ,
  21221. t.prototype.getCoordSysModel = function() {}
  21222. ,
  21223. t
  21224. }();
  21225. var A_ = {
  21226. isDimensionStacked: mx,
  21227. enableDataStack: vx,
  21228. getStackedDimension: xx
  21229. };
  21230. var k_ = Object.freeze({
  21231. __proto__: null,
  21232. createList: function(t) {
  21233. return _x(null, t)
  21234. },
  21235. getLayoutRect: kp,
  21236. dataStack: A_,
  21237. createScale: function(t, e) {
  21238. var n = e;
  21239. e instanceof Cc || (n = new Cc(e));
  21240. var i = b_(n);
  21241. return i.setExtent(t[0], t[1]),
  21242. __(i, n),
  21243. i
  21244. },
  21245. mixinAxisModelCommonMethods: function(t) {
  21246. R(t, D_)
  21247. },
  21248. getECData: rl,
  21249. createTextStyle: function(t, e) {
  21250. return oc(t, null, null, "normal" !== (e = e || {}).state)
  21251. },
  21252. createDimensions: function(t, e) {
  21253. return px(t, e).dimensions
  21254. },
  21255. createSymbol: Xy,
  21256. enableHoverEmphasis: Ul
  21257. });
  21258. function L_(t, e) {
  21259. return Math.abs(t - e) < 1e-8
  21260. }
  21261. function P_(t, e, n) {
  21262. var i = 0
  21263. , r = t[0];
  21264. if (!r)
  21265. return !1;
  21266. for (var o = 1; o < t.length; o++) {
  21267. var a = t[o];
  21268. i += ms(r[0], r[1], a[0], a[1], e, n),
  21269. r = a
  21270. }
  21271. var s = t[0];
  21272. return L_(r[0], s[0]) && L_(r[1], s[1]) || (i += ms(r[0], r[1], s[0], s[1], e, n)),
  21273. 0 !== i
  21274. }
  21275. var O_ = [];
  21276. function R_(t, e) {
  21277. for (var n = 0; n < t.length; n++)
  21278. Wt(t[n], t[n], e)
  21279. }
  21280. function N_(t, e, n, i) {
  21281. for (var r = 0; r < t.length; r++) {
  21282. var o = t[r];
  21283. i && (o = i.project(o)),
  21284. o && isFinite(o[0]) && isFinite(o[1]) && (Ht(e, e, o),
  21285. Yt(n, n, o))
  21286. }
  21287. }
  21288. var E_ = function() {
  21289. function t(t) {
  21290. this.name = t
  21291. }
  21292. return t.prototype.setCenter = function(t) {
  21293. this._center = t
  21294. }
  21295. ,
  21296. t.prototype.getCenter = function() {
  21297. var t = this._center;
  21298. return t || (t = this._center = this.calcCenter()),
  21299. t
  21300. }
  21301. ,
  21302. t
  21303. }()
  21304. , z_ = function(t, e) {
  21305. this.type = "polygon",
  21306. this.exterior = t,
  21307. this.interiors = e
  21308. }
  21309. , V_ = function(t) {
  21310. this.type = "linestring",
  21311. this.points = t
  21312. }
  21313. , B_ = function(t) {
  21314. function e(e, n, i) {
  21315. var r = t.call(this, e) || this;
  21316. return r.type = "geoJSON",
  21317. r.geometries = n,
  21318. r._center = i && [i[0], i[1]],
  21319. r
  21320. }
  21321. return n(e, t),
  21322. e.prototype.calcCenter = function() {
  21323. for (var t, e = this.geometries, n = 0, i = 0; i < e.length; i++) {
  21324. var r = e[i]
  21325. , o = r.exterior
  21326. , a = o && o.length;
  21327. a > n && (t = r,
  21328. n = a)
  21329. }
  21330. if (t)
  21331. return function(t) {
  21332. 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++) {
  21333. var l = t[s][0]
  21334. , u = t[s][1]
  21335. , h = o * u - l * a;
  21336. e += h,
  21337. n += (o + l) * h,
  21338. i += (a + u) * h,
  21339. o = l,
  21340. a = u
  21341. }
  21342. return e ? [n / e / 3, i / e / 3, e] : [t[0][0] || 0, t[0][1] || 0]
  21343. }(t.exterior);
  21344. var s = this.getBoundingRect();
  21345. return [s.x + s.width / 2, s.y + s.height / 2]
  21346. }
  21347. ,
  21348. e.prototype.getBoundingRect = function(t) {
  21349. var e = this._rect;
  21350. if (e && !t)
  21351. return e;
  21352. var n = [1 / 0, 1 / 0]
  21353. , i = [-1 / 0, -1 / 0];
  21354. return E(this.geometries, (function(e) {
  21355. "polygon" === e.type ? N_(e.exterior, n, i, t) : E(e.points, (function(e) {
  21356. N_(e, n, i, t)
  21357. }
  21358. ))
  21359. }
  21360. )),
  21361. isFinite(n[0]) && isFinite(n[1]) && isFinite(i[0]) && isFinite(i[1]) || (n[0] = n[1] = i[0] = i[1] = 0),
  21362. e = new ze(n[0],n[1],i[0] - n[0],i[1] - n[1]),
  21363. t || (this._rect = e),
  21364. e
  21365. }
  21366. ,
  21367. e.prototype.contain = function(t) {
  21368. var e = this.getBoundingRect()
  21369. , n = this.geometries;
  21370. if (!e.contain(t[0], t[1]))
  21371. return !1;
  21372. t: for (var i = 0, r = n.length; i < r; i++) {
  21373. var o = n[i];
  21374. if ("polygon" === o.type) {
  21375. var a = o.exterior
  21376. , s = o.interiors;
  21377. if (P_(a, t[0], t[1])) {
  21378. for (var l = 0; l < (s ? s.length : 0); l++)
  21379. if (P_(s[l], t[0], t[1]))
  21380. continue t;
  21381. return !0
  21382. }
  21383. }
  21384. }
  21385. return !1
  21386. }
  21387. ,
  21388. e.prototype.transformTo = function(t, e, n, i) {
  21389. var r = this.getBoundingRect()
  21390. , o = r.width / r.height;
  21391. n ? i || (i = n / o) : n = o * i;
  21392. for (var a = new ze(t,e,n,i), s = r.calculateTransform(a), l = this.geometries, u = 0; u < l.length; u++) {
  21393. var h = l[u];
  21394. "polygon" === h.type ? (R_(h.exterior, s),
  21395. E(h.interiors, (function(t) {
  21396. R_(t, s)
  21397. }
  21398. ))) : E(h.points, (function(t) {
  21399. R_(t, s)
  21400. }
  21401. ))
  21402. }
  21403. (r = this._rect).copy(a),
  21404. this._center = [r.x + r.width / 2, r.y + r.height / 2]
  21405. }
  21406. ,
  21407. e.prototype.cloneShallow = function(t) {
  21408. null == t && (t = this.name);
  21409. var n = new e(t,this.geometries,this._center);
  21410. return n._rect = this._rect,
  21411. n.transformTo = null,
  21412. n
  21413. }
  21414. ,
  21415. e
  21416. }(E_)
  21417. , F_ = function(t) {
  21418. function e(e, n) {
  21419. var i = t.call(this, e) || this;
  21420. return i.type = "geoSVG",
  21421. i._elOnlyForCalculate = n,
  21422. i
  21423. }
  21424. return n(e, t),
  21425. e.prototype.calcCenter = function() {
  21426. 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; )
  21427. be(i, r.getLocalTransform(), i),
  21428. r = r.parent;
  21429. return Ie(i, i),
  21430. Wt(n, n, i),
  21431. n
  21432. }
  21433. ,
  21434. e
  21435. }(E_);
  21436. function G_(t, e, n) {
  21437. for (var i = 0; i < t.length; i++)
  21438. t[i] = W_(t[i], e[i], n)
  21439. }
  21440. function W_(t, e, n) {
  21441. for (var i = [], r = e[0], o = e[1], a = 0; a < t.length; a += 2) {
  21442. var s = t.charCodeAt(a) - 64
  21443. , l = t.charCodeAt(a + 1) - 64;
  21444. s = s >> 1 ^ -(1 & s),
  21445. l = l >> 1 ^ -(1 & l),
  21446. r = s += r,
  21447. o = l += o,
  21448. i.push([s / n, l / n])
  21449. }
  21450. return i
  21451. }
  21452. function H_(t, e) {
  21453. return z(B((t = function(t) {
  21454. if (!t.UTF8Encoding)
  21455. return t;
  21456. var e = t
  21457. , n = e.UTF8Scale;
  21458. return null == n && (n = 1024),
  21459. E(e.features, (function(t) {
  21460. var e = t.geometry
  21461. , i = e.encodeOffsets
  21462. , r = e.coordinates;
  21463. if (i)
  21464. switch (e.type) {
  21465. case "LineString":
  21466. e.coordinates = W_(r, i, n);
  21467. break;
  21468. case "Polygon":
  21469. case "MultiLineString":
  21470. G_(r, i, n);
  21471. break;
  21472. case "MultiPolygon":
  21473. E(r, (function(t, e) {
  21474. return G_(t, i[e], n)
  21475. }
  21476. ))
  21477. }
  21478. }
  21479. )),
  21480. e.UTF8Encoding = !1,
  21481. e
  21482. }(t)).features, (function(t) {
  21483. return t.geometry && t.properties && t.geometry.coordinates.length > 0
  21484. }
  21485. )), (function(t) {
  21486. var n = t.properties
  21487. , i = t.geometry
  21488. , r = [];
  21489. switch (i.type) {
  21490. case "Polygon":
  21491. var o = i.coordinates;
  21492. r.push(new z_(o[0],o.slice(1)));
  21493. break;
  21494. case "MultiPolygon":
  21495. E(i.coordinates, (function(t) {
  21496. t[0] && r.push(new z_(t[0],t.slice(1)))
  21497. }
  21498. ));
  21499. break;
  21500. case "LineString":
  21501. r.push(new V_([i.coordinates]));
  21502. break;
  21503. case "MultiLineString":
  21504. r.push(new V_(i.coordinates))
  21505. }
  21506. var a = new B_(n[e || "name"],r,n.cp);
  21507. return a.properties = n,
  21508. a
  21509. }
  21510. ))
  21511. }
  21512. var Y_ = Object.freeze({
  21513. __proto__: null,
  21514. linearMap: Kr,
  21515. round: Jr,
  21516. asc: Qr,
  21517. getPrecision: to,
  21518. getPrecisionSafe: eo,
  21519. getPixelPrecision: no,
  21520. getPercentWithPrecision: function(t, e, n) {
  21521. return t[e] && io(t, n)[e] || 0
  21522. },
  21523. MAX_SAFE_INTEGER: oo,
  21524. remRadian: ao,
  21525. isRadianAroundZero: so,
  21526. parseDate: uo,
  21527. quantity: ho,
  21528. quantityExponent: co,
  21529. nice: po,
  21530. quantile: fo,
  21531. reformIntervals: go,
  21532. isNumeric: vo,
  21533. numericToNumber: yo
  21534. })
  21535. , X_ = Object.freeze({
  21536. __proto__: null,
  21537. parse: uo,
  21538. format: Jc
  21539. })
  21540. , U_ = Object.freeze({
  21541. __proto__: null,
  21542. extendShape: Ch,
  21543. extendPath: Ah,
  21544. makePath: Ph,
  21545. makeImage: Oh,
  21546. mergePath: Nh,
  21547. resizePath: Eh,
  21548. createIcon: Uh,
  21549. updateProps: vh,
  21550. initProps: mh,
  21551. getTransform: Bh,
  21552. clipPointsByRect: Yh,
  21553. clipRectByRect: Xh,
  21554. registerShape: kh,
  21555. getShapeClass: Lh,
  21556. Group: Br,
  21557. Image: Ns,
  21558. Text: Xs,
  21559. Circle: Su,
  21560. Ellipse: Iu,
  21561. Sector: Fu,
  21562. Ring: Wu,
  21563. Polygon: Xu,
  21564. Polyline: Zu,
  21565. Rect: Ws,
  21566. Line: Ku,
  21567. BezierCurve: th,
  21568. Arc: nh,
  21569. IncrementalDisplayable: dh,
  21570. CompoundPath: ih,
  21571. LinearGradient: oh,
  21572. RadialGradient: ah,
  21573. BoundingRect: ze
  21574. })
  21575. , Z_ = Object.freeze({
  21576. __proto__: null,
  21577. addCommas: gp,
  21578. toCamelCase: yp,
  21579. normalizeCssArray: vp,
  21580. encodeHTML: re,
  21581. formatTpl: bp,
  21582. getTooltipMarker: wp,
  21583. formatTime: function(t, e, n) {
  21584. "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy");
  21585. var i = uo(e)
  21586. , r = n ? "getUTC" : "get"
  21587. , o = i[r + "FullYear"]()
  21588. , a = i[r + "Month"]() + 1
  21589. , s = i[r + "Date"]()
  21590. , l = i[r + "Hours"]()
  21591. , u = i[r + "Minutes"]()
  21592. , h = i[r + "Seconds"]()
  21593. , c = i[r + "Milliseconds"]();
  21594. 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))
  21595. },
  21596. capitalFirst: function(t) {
  21597. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
  21598. },
  21599. truncateText: function(t, e, n, i, r) {
  21600. var o = {};
  21601. return pa(o, t, e, n, i, r),
  21602. o.text
  21603. },
  21604. getTextRect: function(t, e, n, i, r, o, a, s) {
  21605. return new Xs({
  21606. style: {
  21607. text: t,
  21608. font: e,
  21609. align: n,
  21610. verticalAlign: i,
  21611. padding: r,
  21612. rich: o,
  21613. overflow: a ? "truncate" : null,
  21614. lineHeight: s
  21615. }
  21616. }).getBoundingRect()
  21617. }
  21618. })
  21619. , j_ = Object.freeze({
  21620. __proto__: null,
  21621. map: z,
  21622. each: E,
  21623. indexOf: P,
  21624. inherits: O,
  21625. reduce: V,
  21626. filter: B,
  21627. bind: W,
  21628. curry: H,
  21629. isArray: Y,
  21630. isString: U,
  21631. isObject: q,
  21632. isFunction: X,
  21633. extend: A,
  21634. defaults: k,
  21635. clone: T,
  21636. merge: C
  21637. })
  21638. , q_ = Vo();
  21639. function K_(t, e) {
  21640. var n = z(e, (function(e) {
  21641. return t.scale.parse(e)
  21642. }
  21643. ));
  21644. return "time" === t.type && n.length > 0 && (n.sort(),
  21645. n.unshift(n[0]),
  21646. n.push(n[n.length - 1])),
  21647. n
  21648. }
  21649. function $_(t) {
  21650. var e = t.getLabelModel().get("customValues");
  21651. if (e) {
  21652. var n = w_(t)
  21653. , i = t.scale.getExtent();
  21654. return {
  21655. labels: z(B(K_(t, e), (function(t) {
  21656. return t >= i[0] && t <= i[1]
  21657. }
  21658. )), (function(e) {
  21659. var i = {
  21660. value: e
  21661. };
  21662. return {
  21663. formattedLabel: n(i),
  21664. rawLabel: t.scale.getLabel(i),
  21665. tickValue: e
  21666. }
  21667. }
  21668. ))
  21669. }
  21670. }
  21671. return "category" === t.type ? function(t) {
  21672. var e = t.getLabelModel()
  21673. , n = Q_(t, e);
  21674. return !e.get("show") || t.scale.isBlank() ? {
  21675. labels: [],
  21676. labelCategoryInterval: n.labelCategoryInterval
  21677. } : n
  21678. }(t) : function(t) {
  21679. var e = t.scale.getTicks()
  21680. , n = w_(t);
  21681. return {
  21682. labels: z(e, (function(e, i) {
  21683. return {
  21684. level: e.level,
  21685. formattedLabel: n(e, i),
  21686. rawLabel: t.scale.getLabel(e),
  21687. tickValue: e.value
  21688. }
  21689. }
  21690. ))
  21691. }
  21692. }(t)
  21693. }
  21694. function J_(t, e) {
  21695. var n = t.getTickModel().get("customValues");
  21696. if (n) {
  21697. var i = t.scale.getExtent();
  21698. return {
  21699. ticks: B(K_(t, n), (function(t) {
  21700. return t >= i[0] && t <= i[1]
  21701. }
  21702. ))
  21703. }
  21704. }
  21705. return "category" === t.type ? function(t, e) {
  21706. var n, i, r = tb(t, "ticks"), o = I_(e), a = eb(r, o);
  21707. if (a)
  21708. return a;
  21709. e.get("show") && !t.scale.isBlank() || (n = []);
  21710. if (X(o))
  21711. n = rb(t, o, !0);
  21712. else if ("auto" === o) {
  21713. var s = Q_(t, t.getLabelModel());
  21714. i = s.labelCategoryInterval,
  21715. n = z(s.labels, (function(t) {
  21716. return t.tickValue
  21717. }
  21718. ))
  21719. } else
  21720. n = ib(t, i = o, !0);
  21721. return nb(r, o, {
  21722. ticks: n,
  21723. tickCategoryInterval: i
  21724. })
  21725. }(t, e) : {
  21726. ticks: z(t.scale.getTicks(), (function(t) {
  21727. return t.value
  21728. }
  21729. ))
  21730. }
  21731. }
  21732. function Q_(t, e) {
  21733. var n, i, r = tb(t, "labels"), o = I_(e), a = eb(r, o);
  21734. return a || (X(o) ? n = rb(t, o) : (i = "auto" === o ? function(t) {
  21735. var e = q_(t).autoInterval;
  21736. return null != e ? e : q_(t).autoInterval = t.calculateCategoryInterval()
  21737. }(t) : o,
  21738. n = ib(t, i)),
  21739. nb(r, o, {
  21740. labels: n,
  21741. labelCategoryInterval: i
  21742. }))
  21743. }
  21744. function tb(t, e) {
  21745. return q_(t)[e] || (q_(t)[e] = [])
  21746. }
  21747. function eb(t, e) {
  21748. for (var n = 0; n < t.length; n++)
  21749. if (t[n].key === e)
  21750. return t[n].value
  21751. }
  21752. function nb(t, e, n) {
  21753. return t.push({
  21754. key: e,
  21755. value: n
  21756. }),
  21757. n
  21758. }
  21759. function ib(t, e, n) {
  21760. var i = w_(t)
  21761. , r = t.scale
  21762. , o = r.getExtent()
  21763. , a = t.getLabelModel()
  21764. , s = []
  21765. , l = Math.max((e || 0) + 1, 1)
  21766. , u = o[0]
  21767. , h = r.count();
  21768. 0 !== u && l > 1 && h / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  21769. var c = T_(t)
  21770. , p = a.get("showMinLabel") || c
  21771. , d = a.get("showMaxLabel") || c;
  21772. p && u !== o[0] && g(o[0]);
  21773. for (var f = u; f <= o[1]; f += l)
  21774. g(f);
  21775. function g(t) {
  21776. var e = {
  21777. value: t
  21778. };
  21779. s.push(n ? t : {
  21780. formattedLabel: i(e),
  21781. rawLabel: r.getLabel(e),
  21782. tickValue: t
  21783. })
  21784. }
  21785. return d && f - l !== o[1] && g(o[1]),
  21786. s
  21787. }
  21788. function rb(t, e, n) {
  21789. var i = t.scale
  21790. , r = w_(t)
  21791. , o = [];
  21792. return E(i.getTicks(), (function(t) {
  21793. var a = i.getLabel(t)
  21794. , s = t.value;
  21795. e(t.value, a) && o.push(n ? s : {
  21796. formattedLabel: r(t),
  21797. rawLabel: a,
  21798. tickValue: s
  21799. })
  21800. }
  21801. )),
  21802. o
  21803. }
  21804. var ob = [0, 1]
  21805. , ab = function() {
  21806. function t(t, e, n) {
  21807. this.onBand = !1,
  21808. this.inverse = !1,
  21809. this.dim = t,
  21810. this.scale = e,
  21811. this._extent = n || [0, 0]
  21812. }
  21813. return t.prototype.contain = function(t) {
  21814. var e = this._extent
  21815. , n = Math.min(e[0], e[1])
  21816. , i = Math.max(e[0], e[1]);
  21817. return t >= n && t <= i
  21818. }
  21819. ,
  21820. t.prototype.containData = function(t) {
  21821. return this.scale.contain(t)
  21822. }
  21823. ,
  21824. t.prototype.getExtent = function() {
  21825. return this._extent.slice()
  21826. }
  21827. ,
  21828. t.prototype.getPixelPrecision = function(t) {
  21829. return no(t || this.scale.getExtent(), this._extent)
  21830. }
  21831. ,
  21832. t.prototype.setExtent = function(t, e) {
  21833. var n = this._extent;
  21834. n[0] = t,
  21835. n[1] = e
  21836. }
  21837. ,
  21838. t.prototype.dataToCoord = function(t, e) {
  21839. var n = this._extent
  21840. , i = this.scale;
  21841. return t = i.normalize(t),
  21842. this.onBand && "ordinal" === i.type && sb(n = n.slice(), i.count()),
  21843. Kr(t, ob, n, e)
  21844. }
  21845. ,
  21846. t.prototype.coordToData = function(t, e) {
  21847. var n = this._extent
  21848. , i = this.scale;
  21849. this.onBand && "ordinal" === i.type && sb(n = n.slice(), i.count());
  21850. var r = Kr(t, n, ob, e);
  21851. return this.scale.scale(r)
  21852. }
  21853. ,
  21854. t.prototype.pointToData = function(t, e) {}
  21855. ,
  21856. t.prototype.getTicksCoords = function(t) {
  21857. var e = (t = t || {}).tickModel || this.getTickModel()
  21858. , n = z(J_(this, e).ticks, (function(t) {
  21859. return {
  21860. coord: this.dataToCoord("ordinal" === this.scale.type ? this.scale.getRawOrdinalNumber(t) : t),
  21861. tickValue: t
  21862. }
  21863. }
  21864. ), this);
  21865. return function(t, e, n, i) {
  21866. var r = e.length;
  21867. if (!t.onBand || n || !r)
  21868. return;
  21869. var o, a, s = t.getExtent();
  21870. if (1 === r)
  21871. e[0].coord = s[0],
  21872. o = e[1] = {
  21873. coord: s[1],
  21874. tickValue: e[0].tickValue
  21875. };
  21876. else {
  21877. var l = e[r - 1].tickValue - e[0].tickValue
  21878. , u = (e[r - 1].coord - e[0].coord) / l;
  21879. E(e, (function(t) {
  21880. t.coord -= u / 2
  21881. }
  21882. ));
  21883. var h = t.scale.getExtent();
  21884. a = 1 + h[1] - e[r - 1].tickValue,
  21885. o = {
  21886. coord: e[r - 1].coord + u * a,
  21887. tickValue: h[1] + 1
  21888. },
  21889. e.push(o)
  21890. }
  21891. var c = s[0] > s[1];
  21892. p(e[0].coord, s[0]) && (i ? e[0].coord = s[0] : e.shift());
  21893. i && p(s[0], e[0].coord) && e.unshift({
  21894. coord: s[0]
  21895. });
  21896. p(s[1], o.coord) && (i ? o.coord = s[1] : e.pop());
  21897. i && p(o.coord, s[1]) && e.push({
  21898. coord: s[1]
  21899. });
  21900. function p(t, e) {
  21901. return t = Jr(t),
  21902. e = Jr(e),
  21903. c ? t > e : t < e
  21904. }
  21905. }(this, n, e.get("alignWithLabel"), t.clamp),
  21906. n
  21907. }
  21908. ,
  21909. t.prototype.getMinorTicksCoords = function() {
  21910. if ("ordinal" === this.scale.type)
  21911. return [];
  21912. var t = this.model.getModel("minorTick").get("splitNumber");
  21913. return t > 0 && t < 100 || (t = 5),
  21914. z(this.scale.getMinorTicks(t), (function(t) {
  21915. return z(t, (function(t) {
  21916. return {
  21917. coord: this.dataToCoord(t),
  21918. tickValue: t
  21919. }
  21920. }
  21921. ), this)
  21922. }
  21923. ), this)
  21924. }
  21925. ,
  21926. t.prototype.getViewLabels = function() {
  21927. return $_(this).labels
  21928. }
  21929. ,
  21930. t.prototype.getLabelModel = function() {
  21931. return this.model.getModel("axisLabel")
  21932. }
  21933. ,
  21934. t.prototype.getTickModel = function() {
  21935. return this.model.getModel("axisTick")
  21936. }
  21937. ,
  21938. t.prototype.getBandWidth = function() {
  21939. var t = this._extent
  21940. , e = this.scale.getExtent()
  21941. , n = e[1] - e[0] + (this.onBand ? 1 : 0);
  21942. 0 === n && (n = 1);
  21943. var i = Math.abs(t[1] - t[0]);
  21944. return Math.abs(i) / n
  21945. }
  21946. ,
  21947. t.prototype.calculateCategoryInterval = function() {
  21948. return function(t) {
  21949. var e = function(t) {
  21950. var e = t.getLabelModel();
  21951. return {
  21952. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  21953. labelRotate: e.get("rotate") || 0,
  21954. font: e.getFont()
  21955. }
  21956. }(t)
  21957. , n = w_(t)
  21958. , i = (e.axisRotate - e.labelRotate) / 180 * Math.PI
  21959. , r = t.scale
  21960. , o = r.getExtent()
  21961. , a = r.count();
  21962. if (o[1] - o[0] < 1)
  21963. return 0;
  21964. var s = 1;
  21965. a > 40 && (s = Math.max(1, Math.floor(a / 40)));
  21966. 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) {
  21967. var f, g, y = Sr(n({
  21968. value: l
  21969. }), e.font, "center", "top");
  21970. f = 1.3 * y.width,
  21971. g = 1.3 * y.height,
  21972. p = Math.max(p, f, 7),
  21973. d = Math.max(d, g, 7)
  21974. }
  21975. var v = p / h
  21976. , m = d / c;
  21977. isNaN(v) && (v = 1 / 0),
  21978. isNaN(m) && (m = 1 / 0);
  21979. var x = Math.max(0, Math.floor(Math.min(v, m)))
  21980. , _ = q_(t.model)
  21981. , b = t.getExtent()
  21982. , w = _.lastAutoInterval
  21983. , S = _.lastTickCount;
  21984. 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,
  21985. _.lastAutoInterval = x,
  21986. _.axisExtent0 = b[0],
  21987. _.axisExtent1 = b[1]),
  21988. x
  21989. }(this)
  21990. }
  21991. ,
  21992. t
  21993. }();
  21994. function sb(t, e) {
  21995. var n = (t[1] - t[0]) / e / 2;
  21996. t[0] += n,
  21997. t[1] -= n
  21998. }
  21999. var lb = 2 * Math.PI
  22000. , ub = hs.CMD
  22001. , hb = ["top", "right", "bottom", "left"];
  22002. function cb(t, e, n, i, r) {
  22003. var o = n.width
  22004. , a = n.height;
  22005. switch (t) {
  22006. case "top":
  22007. i.set(n.x + o / 2, n.y - e),
  22008. r.set(0, -1);
  22009. break;
  22010. case "bottom":
  22011. i.set(n.x + o / 2, n.y + a + e),
  22012. r.set(0, 1);
  22013. break;
  22014. case "left":
  22015. i.set(n.x - e, n.y + a / 2),
  22016. r.set(-1, 0);
  22017. break;
  22018. case "right":
  22019. i.set(n.x + o + e, n.y + a / 2),
  22020. r.set(1, 0)
  22021. }
  22022. }
  22023. function pb(t, e, n, i, r, o, a, s, l) {
  22024. a -= t,
  22025. s -= e;
  22026. var u = Math.sqrt(a * a + s * s)
  22027. , h = (a /= u) * n + t
  22028. , c = (s /= u) * n + e;
  22029. if (Math.abs(i - r) % lb < 1e-4)
  22030. return l[0] = h,
  22031. l[1] = c,
  22032. u - n;
  22033. if (o) {
  22034. var p = i;
  22035. i = gs(r),
  22036. r = gs(p)
  22037. } else
  22038. i = gs(i),
  22039. r = gs(r);
  22040. i > r && (r += lb);
  22041. var d = Math.atan2(s, a);
  22042. if (d < 0 && (d += lb),
  22043. d >= i && d <= r || d + lb >= i && d + lb <= r)
  22044. return l[0] = h,
  22045. l[1] = c,
  22046. u - n;
  22047. var f = n * Math.cos(i) + t
  22048. , g = n * Math.sin(i) + e
  22049. , y = n * Math.cos(r) + t
  22050. , v = n * Math.sin(r) + e
  22051. , m = (f - a) * (f - a) + (g - s) * (g - s)
  22052. , x = (y - a) * (y - a) + (v - s) * (v - s);
  22053. return m < x ? (l[0] = f,
  22054. l[1] = g,
  22055. Math.sqrt(m)) : (l[0] = y,
  22056. l[1] = v,
  22057. Math.sqrt(x))
  22058. }
  22059. function db(t, e, n, i, r, o, a, s) {
  22060. var l = r - t
  22061. , u = o - e
  22062. , h = n - t
  22063. , c = i - e
  22064. , p = Math.sqrt(h * h + c * c)
  22065. , d = (l * (h /= p) + u * (c /= p)) / p;
  22066. s && (d = Math.min(Math.max(d, 0), 1)),
  22067. d *= p;
  22068. var f = a[0] = t + d * h
  22069. , g = a[1] = e + d * c;
  22070. return Math.sqrt((f - r) * (f - r) + (g - o) * (g - o))
  22071. }
  22072. function fb(t, e, n, i, r, o, a) {
  22073. n < 0 && (t += n,
  22074. n = -n),
  22075. i < 0 && (e += i,
  22076. i = -i);
  22077. var s = t + n
  22078. , l = e + i
  22079. , u = a[0] = Math.min(Math.max(r, t), s)
  22080. , h = a[1] = Math.min(Math.max(o, e), l);
  22081. return Math.sqrt((u - r) * (u - r) + (h - o) * (h - o))
  22082. }
  22083. var gb = [];
  22084. function yb(t, e, n) {
  22085. var i = fb(e.x, e.y, e.width, e.height, t.x, t.y, gb);
  22086. return n.set(gb[0], gb[1]),
  22087. i
  22088. }
  22089. function vb(t, e, n) {
  22090. 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; ) {
  22091. var f = h[d++];
  22092. 1 === d && (s = o = h[d],
  22093. l = a = h[d + 1]);
  22094. var g = u;
  22095. switch (f) {
  22096. case ub.M:
  22097. o = s = h[d++],
  22098. a = l = h[d++];
  22099. break;
  22100. case ub.L:
  22101. g = db(o, a, h[d], h[d + 1], c, p, gb, !0),
  22102. o = h[d++],
  22103. a = h[d++];
  22104. break;
  22105. case ub.C:
  22106. g = Sn(o, a, h[d++], h[d++], h[d++], h[d++], h[d], h[d + 1], c, p, gb),
  22107. o = h[d++],
  22108. a = h[d++];
  22109. break;
  22110. case ub.Q:
  22111. g = An(o, a, h[d++], h[d++], h[d], h[d + 1], c, p, gb),
  22112. o = h[d++],
  22113. a = h[d++];
  22114. break;
  22115. case ub.A:
  22116. var y = h[d++]
  22117. , v = h[d++]
  22118. , m = h[d++]
  22119. , x = h[d++]
  22120. , _ = h[d++]
  22121. , b = h[d++];
  22122. d += 1;
  22123. var w = !!(1 - h[d++]);
  22124. i = Math.cos(_) * m + y,
  22125. r = Math.sin(_) * x + v,
  22126. d <= 1 && (s = i,
  22127. l = r),
  22128. g = pb(y, v, x, _, _ + b, w, (c - y) * x / m + y, p, gb),
  22129. o = Math.cos(_ + b) * m + y,
  22130. a = Math.sin(_ + b) * x + v;
  22131. break;
  22132. case ub.R:
  22133. g = fb(s = o = h[d++], l = a = h[d++], h[d++], h[d++], c, p, gb);
  22134. break;
  22135. case ub.Z:
  22136. g = db(o, a, s, l, c, p, gb, !0),
  22137. o = s,
  22138. a = l
  22139. }
  22140. g < u && (u = g,
  22141. n.set(gb[0], gb[1]))
  22142. }
  22143. return u
  22144. }
  22145. var mb = new De
  22146. , xb = new De
  22147. , _b = new De
  22148. , bb = new De
  22149. , wb = new De;
  22150. function Sb(t, e) {
  22151. if (t) {
  22152. var n = t.getTextGuideLine()
  22153. , i = t.getTextContent();
  22154. if (i && n) {
  22155. var r = t.textGuideLineConfig || {}
  22156. , o = [[0, 0], [0, 0], [0, 0]]
  22157. , a = r.candidates || hb
  22158. , s = i.getBoundingRect().clone();
  22159. s.applyTransform(i.getComputedTransform());
  22160. var l = 1 / 0
  22161. , u = r.anchor
  22162. , h = t.getComputedTransform()
  22163. , c = h && Ie([], h)
  22164. , p = e.get("length2") || 0;
  22165. u && _b.copy(u);
  22166. for (var d = 0; d < a.length; d++) {
  22167. cb(a[d], 0, s, mb, bb),
  22168. De.scaleAndAdd(xb, mb, bb, p),
  22169. xb.transform(c);
  22170. var f = t.getBoundingRect()
  22171. , g = u ? u.distance(xb) : t instanceof ks ? vb(xb, t.path, _b) : yb(xb, f, _b);
  22172. g < l && (l = g,
  22173. xb.transform(h),
  22174. _b.transform(h),
  22175. _b.toArray(o[0]),
  22176. xb.toArray(o[1]),
  22177. mb.toArray(o[2]))
  22178. }
  22179. Tb(o, e.get("minTurnAngle")),
  22180. n.setShape({
  22181. points: o
  22182. })
  22183. }
  22184. }
  22185. }
  22186. var Mb = []
  22187. , Ib = new De;
  22188. function Tb(t, e) {
  22189. if (e <= 180 && e > 0) {
  22190. e = e / 180 * Math.PI,
  22191. mb.fromArray(t[0]),
  22192. xb.fromArray(t[1]),
  22193. _b.fromArray(t[2]),
  22194. De.sub(bb, mb, xb),
  22195. De.sub(wb, _b, xb);
  22196. var n = bb.len()
  22197. , i = wb.len();
  22198. if (!(n < .001 || i < .001)) {
  22199. bb.scale(1 / n),
  22200. wb.scale(1 / i);
  22201. var r = bb.dot(wb);
  22202. if (Math.cos(e) < r) {
  22203. var o = db(xb.x, xb.y, _b.x, _b.y, mb.x, mb.y, Mb, !1);
  22204. Ib.fromArray(Mb),
  22205. Ib.scaleAndAdd(wb, o / Math.tan(Math.PI - e));
  22206. var a = _b.x !== xb.x ? (Ib.x - xb.x) / (_b.x - xb.x) : (Ib.y - xb.y) / (_b.y - xb.y);
  22207. if (isNaN(a))
  22208. return;
  22209. a < 0 ? De.copy(Ib, xb) : a > 1 && De.copy(Ib, _b),
  22210. Ib.toArray(t[1])
  22211. }
  22212. }
  22213. }
  22214. }
  22215. function Cb(t, e, n) {
  22216. if (n <= 180 && n > 0) {
  22217. n = n / 180 * Math.PI,
  22218. mb.fromArray(t[0]),
  22219. xb.fromArray(t[1]),
  22220. _b.fromArray(t[2]),
  22221. De.sub(bb, xb, mb),
  22222. De.sub(wb, _b, xb);
  22223. var i = bb.len()
  22224. , r = wb.len();
  22225. if (!(i < .001 || r < .001))
  22226. if (bb.scale(1 / i),
  22227. wb.scale(1 / r),
  22228. bb.dot(e) < Math.cos(n)) {
  22229. var o = db(xb.x, xb.y, _b.x, _b.y, mb.x, mb.y, Mb, !1);
  22230. Ib.fromArray(Mb);
  22231. var a = Math.PI / 2
  22232. , s = a + Math.acos(wb.dot(e)) - n;
  22233. if (s >= a)
  22234. De.copy(Ib, _b);
  22235. else {
  22236. Ib.scaleAndAdd(wb, o / Math.tan(Math.PI / 2 - s));
  22237. var l = _b.x !== xb.x ? (Ib.x - xb.x) / (_b.x - xb.x) : (Ib.y - xb.y) / (_b.y - xb.y);
  22238. if (isNaN(l))
  22239. return;
  22240. l < 0 ? De.copy(Ib, xb) : l > 1 && De.copy(Ib, _b)
  22241. }
  22242. Ib.toArray(t[1])
  22243. }
  22244. }
  22245. }
  22246. function Db(t, e, n, i) {
  22247. var r = "normal" === n
  22248. , o = r ? t : t.ensureState(n);
  22249. o.ignore = e;
  22250. var a = i.get("smooth");
  22251. a && !0 === a && (a = .3),
  22252. o.shape = o.shape || {},
  22253. a > 0 && (o.shape.smooth = a);
  22254. var s = i.getModel("lineStyle").getLineStyle();
  22255. r ? t.useStyle(s) : o.style = s
  22256. }
  22257. function Ab(t, e) {
  22258. var n = e.smooth
  22259. , i = e.points;
  22260. if (i)
  22261. if (t.moveTo(i[0][0], i[0][1]),
  22262. n > 0 && i.length >= 3) {
  22263. var r = Vt(i[0], i[1])
  22264. , o = Vt(i[1], i[2]);
  22265. if (!r || !o)
  22266. return t.lineTo(i[1][0], i[1][1]),
  22267. void t.lineTo(i[2][0], i[2][1]);
  22268. var a = Math.min(r, o) * n
  22269. , s = Gt([], i[1], i[0], a / r)
  22270. , l = Gt([], i[1], i[2], a / o)
  22271. , u = Gt([], s, l, .5);
  22272. t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]),
  22273. t.bezierCurveTo(l[0], l[1], l[0], l[1], i[2][0], i[2][1])
  22274. } else
  22275. for (var h = 1; h < i.length; h++)
  22276. t.lineTo(i[h][0], i[h][1])
  22277. }
  22278. function kb(t, e, n) {
  22279. var i = t.getTextGuideLine()
  22280. , r = t.getTextContent();
  22281. if (r) {
  22282. for (var o = e.normal, a = o.get("show"), s = r.ignore, l = 0; l < cl.length; l++) {
  22283. var u = cl[l]
  22284. , h = e[u]
  22285. , c = "normal" === u;
  22286. if (h) {
  22287. var p = h.get("show");
  22288. if ((c ? s : rt(r.states[u] && r.states[u].ignore, s)) || !rt(p, a)) {
  22289. var d = c ? i : i && i.states[u];
  22290. d && (d.ignore = !0),
  22291. i && Db(i, !0, u, h);
  22292. continue
  22293. }
  22294. i || (i = new Zu,
  22295. t.setTextGuideLine(i),
  22296. c || !s && a || Db(i, !0, "normal", e.normal),
  22297. t.stateProxy && (i.stateProxy = t.stateProxy)),
  22298. Db(i, !1, u, h)
  22299. }
  22300. }
  22301. if (i) {
  22302. k(i.style, n),
  22303. i.style.fill = null;
  22304. var f = o.get("showAbove");
  22305. (t.textGuideLineConfig = t.textGuideLineConfig || {}).showAbove = f || !1,
  22306. i.buildPath = Ab
  22307. }
  22308. } else
  22309. i && t.removeTextGuideLine()
  22310. }
  22311. function Lb(t, e) {
  22312. e = e || "labelLine";
  22313. for (var n = {
  22314. normal: t.getModel(e)
  22315. }, i = 0; i < hl.length; i++) {
  22316. var r = hl[i];
  22317. n[r] = t.getModel([r, e])
  22318. }
  22319. return n
  22320. }
  22321. function Pb(t) {
  22322. for (var e = [], n = 0; n < t.length; n++) {
  22323. var i = t[n];
  22324. if (!i.defaultAttr.ignore) {
  22325. var r = i.label
  22326. , o = r.getComputedTransform()
  22327. , a = r.getBoundingRect()
  22328. , s = !o || o[1] < 1e-5 && o[2] < 1e-5
  22329. , l = r.style.margin || 0
  22330. , u = a.clone();
  22331. u.applyTransform(o),
  22332. u.x -= l / 2,
  22333. u.y -= l / 2,
  22334. u.width += l,
  22335. u.height += l;
  22336. var h = s ? new ch(a,o) : null;
  22337. e.push({
  22338. label: r,
  22339. labelLine: i.labelLine,
  22340. rect: u,
  22341. localRect: a,
  22342. obb: h,
  22343. priority: i.priority,
  22344. defaultAttr: i.defaultAttr,
  22345. layoutOption: i.computedLayoutOption,
  22346. axisAligned: s,
  22347. transform: o
  22348. })
  22349. }
  22350. }
  22351. return e
  22352. }
  22353. function Ob(t, e, n, i, r, o) {
  22354. var a = t.length;
  22355. if (!(a < 2)) {
  22356. t.sort((function(t, n) {
  22357. return t.rect[e] - n.rect[e]
  22358. }
  22359. ));
  22360. for (var s, l = 0, u = !1, h = 0, c = 0; c < a; c++) {
  22361. var p = t[c]
  22362. , d = p.rect;
  22363. (s = d[e] - l) < 0 && (d[e] -= s,
  22364. p.label[e] -= s,
  22365. u = !0),
  22366. h += Math.max(-s, 0),
  22367. l = d[e] + d[n]
  22368. }
  22369. h > 0 && o && _(-h / a, 0, a);
  22370. var f, g, y = t[0], v = t[a - 1];
  22371. return m(),
  22372. f < 0 && b(-f, .8),
  22373. g < 0 && b(g, .8),
  22374. m(),
  22375. x(f, g, 1),
  22376. x(g, f, -1),
  22377. m(),
  22378. f < 0 && w(-f),
  22379. g < 0 && w(g),
  22380. u
  22381. }
  22382. function m() {
  22383. f = y.rect[e] - i,
  22384. g = r - v.rect[e] - v.rect[n]
  22385. }
  22386. function x(t, e, n) {
  22387. if (t < 0) {
  22388. var i = Math.min(e, -t);
  22389. if (i > 0) {
  22390. _(i * n, 0, a);
  22391. var r = i + t;
  22392. r < 0 && b(-r * n, 1)
  22393. } else
  22394. b(-t * n, 1)
  22395. }
  22396. }
  22397. function _(n, i, r) {
  22398. 0 !== n && (u = !0);
  22399. for (var o = i; o < r; o++) {
  22400. var a = t[o];
  22401. a.rect[e] += n,
  22402. a.label[e] += n
  22403. }
  22404. }
  22405. function b(i, r) {
  22406. for (var o = [], s = 0, l = 1; l < a; l++) {
  22407. var u = t[l - 1].rect
  22408. , h = Math.max(t[l].rect[e] - u[e] - u[n], 0);
  22409. o.push(h),
  22410. s += h
  22411. }
  22412. if (s) {
  22413. var c = Math.min(Math.abs(i) / s, r);
  22414. if (i > 0)
  22415. for (l = 0; l < a - 1; l++) {
  22416. _(o[l] * c, 0, l + 1)
  22417. }
  22418. else
  22419. for (l = a - 1; l > 0; l--) {
  22420. _(-(o[l - 1] * c), l, a)
  22421. }
  22422. }
  22423. }
  22424. function w(t) {
  22425. var e = t < 0 ? -1 : 1;
  22426. t = Math.abs(t);
  22427. for (var n = Math.ceil(t / (a - 1)), i = 0; i < a - 1; i++)
  22428. if (e > 0 ? _(n, 0, i + 1) : _(-n, a - i - 1, a),
  22429. (t -= n) <= 0)
  22430. return
  22431. }
  22432. }
  22433. function Rb(t, e, n, i) {
  22434. return Ob(t, "y", "height", e, n, i)
  22435. }
  22436. function Nb(t) {
  22437. var e = [];
  22438. t.sort((function(t, e) {
  22439. return e.priority - t.priority
  22440. }
  22441. ));
  22442. var n = new ze(0,0,0,0);
  22443. function i(t) {
  22444. if (!t.ignore) {
  22445. var e = t.ensureState("emphasis");
  22446. null == e.ignore && (e.ignore = !1)
  22447. }
  22448. t.ignore = !0
  22449. }
  22450. for (var r = 0; r < t.length; r++) {
  22451. var o = t[r]
  22452. , a = o.axisAligned
  22453. , s = o.localRect
  22454. , l = o.transform
  22455. , u = o.label
  22456. , h = o.labelLine;
  22457. n.copy(o.rect),
  22458. n.width -= .1,
  22459. n.height -= .1,
  22460. n.x += .05,
  22461. n.y += .05;
  22462. for (var c = o.obb, p = !1, d = 0; d < e.length; d++) {
  22463. var f = e[d];
  22464. if (n.intersect(f.rect)) {
  22465. if (a && f.axisAligned) {
  22466. p = !0;
  22467. break
  22468. }
  22469. if (f.obb || (f.obb = new ch(f.localRect,f.transform)),
  22470. c || (c = new ch(s,l)),
  22471. c.intersect(f.obb)) {
  22472. p = !0;
  22473. break
  22474. }
  22475. }
  22476. }
  22477. p ? (i(u),
  22478. h && i(h)) : (u.attr("ignore", o.defaultAttr.ignore),
  22479. h && h.attr("ignore", o.defaultAttr.labelGuideIgnore),
  22480. e.push(o))
  22481. }
  22482. }
  22483. function Eb(t) {
  22484. if (t) {
  22485. for (var e = [], n = 0; n < t.length; n++)
  22486. e.push(t[n].slice());
  22487. return e
  22488. }
  22489. }
  22490. function zb(t, e) {
  22491. var n = t.label
  22492. , i = e && e.getTextGuideLine();
  22493. return {
  22494. dataIndex: t.dataIndex,
  22495. dataType: t.dataType,
  22496. seriesIndex: t.seriesModel.seriesIndex,
  22497. text: t.label.style.text,
  22498. rect: t.hostRect,
  22499. labelRect: t.rect,
  22500. align: n.style.align,
  22501. verticalAlign: n.style.verticalAlign,
  22502. labelLinePoints: Eb(i && i.shape.points)
  22503. }
  22504. }
  22505. var Vb = ["align", "verticalAlign", "width", "height", "fontSize"]
  22506. , Bb = new vr
  22507. , Fb = Vo()
  22508. , Gb = Vo();
  22509. function Wb(t, e, n) {
  22510. for (var i = 0; i < n.length; i++) {
  22511. var r = n[i];
  22512. null != e[r] && (t[r] = e[r])
  22513. }
  22514. }
  22515. var Hb = ["x", "y", "rotation"]
  22516. , Yb = function() {
  22517. function t() {
  22518. this._labelList = [],
  22519. this._chartViewList = []
  22520. }
  22521. return t.prototype.clearLabels = function() {
  22522. this._labelList = [],
  22523. this._chartViewList = []
  22524. }
  22525. ,
  22526. t.prototype._addLabel = function(t, e, n, i, r) {
  22527. var o = i.style
  22528. , a = i.__hostTarget.textConfig || {}
  22529. , s = i.getComputedTransform()
  22530. , l = i.getBoundingRect().plain();
  22531. ze.applyTransform(l, l, s),
  22532. s ? Bb.setLocalTransform(s) : (Bb.x = Bb.y = Bb.rotation = Bb.originX = Bb.originY = 0,
  22533. Bb.scaleX = Bb.scaleY = 1),
  22534. Bb.rotation = gs(Bb.rotation);
  22535. var u, h = i.__hostTarget;
  22536. if (h) {
  22537. u = h.getBoundingRect().plain();
  22538. var c = h.getComputedTransform();
  22539. ze.applyTransform(u, u, c)
  22540. }
  22541. var p = u && h.getTextGuideLine();
  22542. this._labelList.push({
  22543. label: i,
  22544. labelLine: p,
  22545. seriesModel: n,
  22546. dataIndex: t,
  22547. dataType: e,
  22548. layoutOption: r,
  22549. computedLayoutOption: null,
  22550. rect: l,
  22551. hostRect: u,
  22552. priority: u ? u.width * u.height : 0,
  22553. defaultAttr: {
  22554. ignore: i.ignore,
  22555. labelGuideIgnore: p && p.ignore,
  22556. x: Bb.x,
  22557. y: Bb.y,
  22558. scaleX: Bb.scaleX,
  22559. scaleY: Bb.scaleY,
  22560. rotation: Bb.rotation,
  22561. style: {
  22562. x: o.x,
  22563. y: o.y,
  22564. align: o.align,
  22565. verticalAlign: o.verticalAlign,
  22566. width: o.width,
  22567. height: o.height,
  22568. fontSize: o.fontSize
  22569. },
  22570. cursor: i.cursor,
  22571. attachedPos: a.position,
  22572. attachedRot: a.rotation
  22573. }
  22574. })
  22575. }
  22576. ,
  22577. t.prototype.addLabelsOfSeries = function(t) {
  22578. var e = this;
  22579. this._chartViewList.push(t);
  22580. var n = t.__model
  22581. , i = n.get("labelLayout");
  22582. (X(i) || G(i).length) && t.group.traverse((function(t) {
  22583. if (t.ignore)
  22584. return !0;
  22585. var r = t.getTextContent()
  22586. , o = rl(t);
  22587. r && !r.disableLabelLayout && e._addLabel(o.dataIndex, o.dataType, n, r, i)
  22588. }
  22589. ))
  22590. }
  22591. ,
  22592. t.prototype.updateLayoutConfig = function(t) {
  22593. var e = t.getWidth()
  22594. , n = t.getHeight();
  22595. function i(t, e) {
  22596. return function() {
  22597. Sb(t, e)
  22598. }
  22599. }
  22600. for (var r = 0; r < this._labelList.length; r++) {
  22601. var o = this._labelList[r]
  22602. , a = o.label
  22603. , s = a.__hostTarget
  22604. , l = o.defaultAttr
  22605. , u = void 0;
  22606. u = (u = X(o.layoutOption) ? o.layoutOption(zb(o, s)) : o.layoutOption) || {},
  22607. o.computedLayoutOption = u;
  22608. var h = Math.PI / 180;
  22609. s && s.setTextConfig({
  22610. local: !1,
  22611. position: null != u.x || null != u.y ? null : l.attachedPos,
  22612. rotation: null != u.rotate ? u.rotate * h : l.attachedRot,
  22613. offset: [u.dx || 0, u.dy || 0]
  22614. });
  22615. var c = !1;
  22616. if (null != u.x ? (a.x = $r(u.x, e),
  22617. a.setStyle("x", 0),
  22618. c = !0) : (a.x = l.x,
  22619. a.setStyle("x", l.style.x)),
  22620. null != u.y ? (a.y = $r(u.y, n),
  22621. a.setStyle("y", 0),
  22622. c = !0) : (a.y = l.y,
  22623. a.setStyle("y", l.style.y)),
  22624. u.labelLinePoints) {
  22625. var p = s.getTextGuideLine();
  22626. p && (p.setShape({
  22627. points: u.labelLinePoints
  22628. }),
  22629. c = !1)
  22630. }
  22631. Fb(a).needsUpdateLabelLine = c,
  22632. a.rotation = null != u.rotate ? u.rotate * h : l.rotation,
  22633. a.scaleX = l.scaleX,
  22634. a.scaleY = l.scaleY;
  22635. for (var d = 0; d < Vb.length; d++) {
  22636. var f = Vb[d];
  22637. a.setStyle(f, null != u[f] ? u[f] : l.style[f])
  22638. }
  22639. if (u.draggable) {
  22640. if (a.draggable = !0,
  22641. a.cursor = "move",
  22642. s) {
  22643. var g = o.seriesModel;
  22644. if (null != o.dataIndex)
  22645. g = o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);
  22646. a.on("drag", i(s, g.getModel("labelLine")))
  22647. }
  22648. } else
  22649. a.off("drag"),
  22650. a.cursor = l.cursor
  22651. }
  22652. }
  22653. ,
  22654. t.prototype.layout = function(t) {
  22655. var e, n = t.getWidth(), i = t.getHeight(), r = Pb(this._labelList), o = B(r, (function(t) {
  22656. return "shiftX" === t.layoutOption.moveOverlap
  22657. }
  22658. )), a = B(r, (function(t) {
  22659. return "shiftY" === t.layoutOption.moveOverlap
  22660. }
  22661. ));
  22662. Ob(o, "x", "width", 0, n, e),
  22663. Rb(a, 0, i),
  22664. Nb(B(r, (function(t) {
  22665. return t.layoutOption.hideOverlap
  22666. }
  22667. )))
  22668. }
  22669. ,
  22670. t.prototype.processLabelsOverall = function() {
  22671. var t = this;
  22672. E(this._chartViewList, (function(e) {
  22673. var n = e.__model
  22674. , i = e.ignoreLabelLineUpdate
  22675. , r = n.isAnimationEnabled();
  22676. e.group.traverse((function(e) {
  22677. if (e.ignore && !e.forceLabelAnimation)
  22678. return !0;
  22679. var o = !i
  22680. , a = e.getTextContent();
  22681. !o && a && (o = Fb(a).needsUpdateLabelLine),
  22682. o && t._updateLabelLine(e, n),
  22683. r && t._animateLabels(e, n)
  22684. }
  22685. ))
  22686. }
  22687. ))
  22688. }
  22689. ,
  22690. t.prototype._updateLabelLine = function(t, e) {
  22691. var n = t.getTextContent()
  22692. , i = rl(t)
  22693. , r = i.dataIndex;
  22694. if (n && null != r) {
  22695. var o = e.getData(i.dataType)
  22696. , a = o.getItemModel(r)
  22697. , s = {}
  22698. , l = o.getItemVisual(r, "style");
  22699. if (l) {
  22700. var u = o.getVisual("drawType");
  22701. s.stroke = l[u]
  22702. }
  22703. var h = a.getModel("labelLine");
  22704. kb(t, Lb(a), s),
  22705. Sb(t, h)
  22706. }
  22707. }
  22708. ,
  22709. t.prototype._animateLabels = function(t, e) {
  22710. var n = t.getTextContent()
  22711. , i = t.getTextGuideLine();
  22712. if (n && (t.forceLabelAnimation || !n.ignore && !n.invisible && !t.disableLabelAnimation && !xh(t))) {
  22713. var r = (d = Fb(n)).oldLayout
  22714. , o = rl(t)
  22715. , a = o.dataIndex
  22716. , s = {
  22717. x: n.x,
  22718. y: n.y,
  22719. rotation: n.rotation
  22720. }
  22721. , l = e.getData(o.dataType);
  22722. if (r) {
  22723. n.attr(r);
  22724. var u = t.prevStates;
  22725. u && (P(u, "select") >= 0 && n.attr(d.oldLayoutSelect),
  22726. P(u, "emphasis") >= 0 && n.attr(d.oldLayoutEmphasis)),
  22727. vh(n, s, e, a)
  22728. } else if (n.attr(s),
  22729. !pc(n).valueAnimation) {
  22730. var h = rt(n.style.opacity, 1);
  22731. n.style.opacity = 0,
  22732. mh(n, {
  22733. style: {
  22734. opacity: h
  22735. }
  22736. }, e, a)
  22737. }
  22738. if (d.oldLayout = s,
  22739. n.states.select) {
  22740. var c = d.oldLayoutSelect = {};
  22741. Wb(c, s, Hb),
  22742. Wb(c, n.states.select, Hb)
  22743. }
  22744. if (n.states.emphasis) {
  22745. var p = d.oldLayoutEmphasis = {};
  22746. Wb(p, s, Hb),
  22747. Wb(p, n.states.emphasis, Hb)
  22748. }
  22749. fc(n, a, l, e, e)
  22750. }
  22751. if (i && !i.ignore && !i.invisible) {
  22752. r = (d = Gb(i)).oldLayout;
  22753. var d, f = {
  22754. points: i.shape.points
  22755. };
  22756. r ? (i.attr({
  22757. shape: r
  22758. }),
  22759. vh(i, {
  22760. shape: f
  22761. }, e)) : (i.setShape(f),
  22762. i.style.strokePercent = 0,
  22763. mh(i, {
  22764. style: {
  22765. strokePercent: 1
  22766. }
  22767. }, e)),
  22768. d.oldLayout = f
  22769. }
  22770. }
  22771. ,
  22772. t
  22773. }()
  22774. , Xb = Vo();
  22775. var Ub = Math.sin
  22776. , Zb = Math.cos
  22777. , jb = Math.PI
  22778. , qb = 2 * Math.PI
  22779. , Kb = 180 / jb
  22780. , $b = function() {
  22781. function t() {}
  22782. return t.prototype.reset = function(t) {
  22783. this._start = !0,
  22784. this._d = [],
  22785. this._str = "",
  22786. this._p = Math.pow(10, t || 4)
  22787. }
  22788. ,
  22789. t.prototype.moveTo = function(t, e) {
  22790. this._add("M", t, e)
  22791. }
  22792. ,
  22793. t.prototype.lineTo = function(t, e) {
  22794. this._add("L", t, e)
  22795. }
  22796. ,
  22797. t.prototype.bezierCurveTo = function(t, e, n, i, r, o) {
  22798. this._add("C", t, e, n, i, r, o)
  22799. }
  22800. ,
  22801. t.prototype.quadraticCurveTo = function(t, e, n, i) {
  22802. this._add("Q", t, e, n, i)
  22803. }
  22804. ,
  22805. t.prototype.arc = function(t, e, n, i, r, o) {
  22806. this.ellipse(t, e, n, n, 0, i, r, o)
  22807. }
  22808. ,
  22809. t.prototype.ellipse = function(t, e, n, i, r, o, a, s) {
  22810. var l = a - o
  22811. , u = !s
  22812. , h = Math.abs(l)
  22813. , c = pi(h - qb) || (u ? l >= qb : -l >= qb)
  22814. , p = l > 0 ? l % qb : l % qb + qb
  22815. , d = !1;
  22816. d = !!c || !pi(h) && p >= jb == !!u;
  22817. var f = t + n * Zb(o)
  22818. , g = e + i * Ub(o);
  22819. this._start && this._add("M", f, g);
  22820. var y = Math.round(r * Kb);
  22821. if (c) {
  22822. var v = 1 / this._p
  22823. , m = (u ? 1 : -1) * (qb - v);
  22824. this._add("A", n, i, y, 1, +u, t + n * Zb(o + m), e + i * Ub(o + m)),
  22825. v > .01 && this._add("A", n, i, y, 0, +u, f, g)
  22826. } else {
  22827. var x = t + n * Zb(a)
  22828. , _ = e + i * Ub(a);
  22829. this._add("A", n, i, y, +d, +u, x, _)
  22830. }
  22831. }
  22832. ,
  22833. t.prototype.rect = function(t, e, n, i) {
  22834. this._add("M", t, e),
  22835. this._add("l", n, 0),
  22836. this._add("l", 0, i),
  22837. this._add("l", -n, 0),
  22838. this._add("Z")
  22839. }
  22840. ,
  22841. t.prototype.closePath = function() {
  22842. this._d.length > 0 && this._add("Z")
  22843. }
  22844. ,
  22845. t.prototype._add = function(t, e, n, i, r, o, a, s, l) {
  22846. for (var u = [], h = this._p, c = 1; c < arguments.length; c++) {
  22847. var p = arguments[c];
  22848. if (isNaN(p))
  22849. return void (this._invalid = !0);
  22850. u.push(Math.round(p * h) / h)
  22851. }
  22852. this._d.push(t + u.join(" ")),
  22853. this._start = "Z" === t
  22854. }
  22855. ,
  22856. t.prototype.generateStr = function() {
  22857. this._str = this._invalid ? "" : this._d.join(""),
  22858. this._d = []
  22859. }
  22860. ,
  22861. t.prototype.getStr = function() {
  22862. return this._str
  22863. }
  22864. ,
  22865. t
  22866. }()
  22867. , Jb = "none"
  22868. , Qb = Math.round;
  22869. var tw = ["lineCap", "miterLimit", "lineJoin"]
  22870. , ew = z(tw, (function(t) {
  22871. return "stroke-" + t.toLowerCase()
  22872. }
  22873. ));
  22874. function nw(t, e, n, i) {
  22875. var r = null == e.opacity ? 1 : e.opacity;
  22876. if (n instanceof Ns)
  22877. t("opacity", r);
  22878. else {
  22879. if (function(t) {
  22880. var e = t.fill;
  22881. return null != e && e !== Jb
  22882. }(e)) {
  22883. var o = hi(e.fill);
  22884. t("fill", o.color);
  22885. var a = null != e.fillOpacity ? e.fillOpacity * o.opacity * r : o.opacity * r;
  22886. (i || a < 1) && t("fill-opacity", a)
  22887. } else
  22888. t("fill", Jb);
  22889. if (function(t) {
  22890. var e = t.stroke;
  22891. return null != e && e !== Jb
  22892. }(e)) {
  22893. var s = hi(e.stroke);
  22894. t("stroke", s.color);
  22895. var l = e.strokeNoScale ? n.getLineScale() : 1
  22896. , u = l ? (e.lineWidth || 0) / l : 0
  22897. , h = null != e.strokeOpacity ? e.strokeOpacity * s.opacity * r : s.opacity * r
  22898. , c = e.strokeFirst;
  22899. if ((i || 1 !== u) && t("stroke-width", u),
  22900. (i || c) && t("paint-order", c ? "stroke" : "fill"),
  22901. (i || h < 1) && t("stroke-opacity", h),
  22902. e.lineDash) {
  22903. var p = Jy(n)
  22904. , d = p[0]
  22905. , f = p[1];
  22906. d && (f = Qb(f || 0),
  22907. t("stroke-dasharray", d.join(",")),
  22908. (f || i) && t("stroke-dashoffset", f))
  22909. } else
  22910. i && t("stroke-dasharray", Jb);
  22911. for (var g = 0; g < tw.length; g++) {
  22912. var y = tw[g];
  22913. if (i || e[y] !== Cs[y]) {
  22914. var v = e[y] || Cs[y];
  22915. v && t(ew[g], v)
  22916. }
  22917. }
  22918. } else
  22919. i && t("stroke", Jb)
  22920. }
  22921. }
  22922. var iw = "http://www.w3.org/2000/svg"
  22923. , rw = "http://www.w3.org/1999/xlink"
  22924. , ow = "ecmeta_";
  22925. function aw(t) {
  22926. return document.createElementNS(iw, t)
  22927. }
  22928. function sw(t, e, n, i, r) {
  22929. return {
  22930. tag: t,
  22931. attrs: n || {},
  22932. children: i,
  22933. text: r,
  22934. key: e
  22935. }
  22936. }
  22937. function lw(t, e) {
  22938. var n = (e = e || {}).newline ? "\n" : "";
  22939. return function t(e) {
  22940. var i = e.children
  22941. , r = e.tag
  22942. , o = e.attrs
  22943. , a = e.text;
  22944. return function(t, e) {
  22945. var n = [];
  22946. if (e)
  22947. for (var i in e) {
  22948. var r = e[i]
  22949. , o = i;
  22950. !1 !== r && (!0 !== r && null != r && (o += '="' + r + '"'),
  22951. n.push(o))
  22952. }
  22953. return "<" + t + " " + n.join(" ") + ">"
  22954. }(r, o) + ("style" !== r ? re(a) : a || "") + (i ? "" + n + z(i, (function(e) {
  22955. return t(e)
  22956. }
  22957. )).join(n) + n : "") + ("</" + r + ">")
  22958. }(t)
  22959. }
  22960. function uw(t) {
  22961. return {
  22962. zrId: t,
  22963. shadowCache: {},
  22964. patternCache: {},
  22965. gradientCache: {},
  22966. clipPathCache: {},
  22967. defs: {},
  22968. cssNodes: {},
  22969. cssAnims: {},
  22970. cssStyleCache: {},
  22971. cssAnimIdx: 0,
  22972. shadowIdx: 0,
  22973. gradientIdx: 0,
  22974. patternIdx: 0,
  22975. clipPathIdx: 0
  22976. }
  22977. }
  22978. function hw(t, e, n, i) {
  22979. return sw("svg", "root", {
  22980. width: t,
  22981. height: e,
  22982. xmlns: iw,
  22983. "xmlns:xlink": rw,
  22984. version: "1.1",
  22985. baseProfile: "full",
  22986. viewBox: !!i && "0 0 " + t + " " + e
  22987. }, n)
  22988. }
  22989. var cw = 0;
  22990. function pw() {
  22991. return cw++
  22992. }
  22993. var dw = {
  22994. cubicIn: "0.32,0,0.67,0",
  22995. cubicOut: "0.33,1,0.68,1",
  22996. cubicInOut: "0.65,0,0.35,1",
  22997. quadraticIn: "0.11,0,0.5,0",
  22998. quadraticOut: "0.5,1,0.89,1",
  22999. quadraticInOut: "0.45,0,0.55,1",
  23000. quarticIn: "0.5,0,0.75,0",
  23001. quarticOut: "0.25,1,0.5,1",
  23002. quarticInOut: "0.76,0,0.24,1",
  23003. quinticIn: "0.64,0,0.78,0",
  23004. quinticOut: "0.22,1,0.36,1",
  23005. quinticInOut: "0.83,0,0.17,1",
  23006. sinusoidalIn: "0.12,0,0.39,0",
  23007. sinusoidalOut: "0.61,1,0.88,1",
  23008. sinusoidalInOut: "0.37,0,0.63,1",
  23009. exponentialIn: "0.7,0,0.84,0",
  23010. exponentialOut: "0.16,1,0.3,1",
  23011. exponentialInOut: "0.87,0,0.13,1",
  23012. circularIn: "0.55,0,1,0.45",
  23013. circularOut: "0,0.55,0.45,1",
  23014. circularInOut: "0.85,0,0.15,1"
  23015. }
  23016. , fw = "transform-origin";
  23017. function gw(t, e, n) {
  23018. var i = A({}, t.shape);
  23019. A(i, e),
  23020. t.buildPath(n, i);
  23021. var r = new $b;
  23022. return r.reset(wi(t)),
  23023. n.rebuildPath(r, 1),
  23024. r.generateStr(),
  23025. r.getStr()
  23026. }
  23027. function yw(t, e) {
  23028. var n = e.originX
  23029. , i = e.originY;
  23030. (n || i) && (t[fw] = n + "px " + i + "px")
  23031. }
  23032. var vw = {
  23033. fill: "fill",
  23034. opacity: "opacity",
  23035. lineWidth: "stroke-width",
  23036. lineDashOffset: "stroke-dashoffset"
  23037. };
  23038. function mw(t, e) {
  23039. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  23040. return e.cssAnims[n] = t,
  23041. n
  23042. }
  23043. function xw(t) {
  23044. return U(t) ? dw[t] ? "cubic-bezier(" + dw[t] + ")" : Pn(t) ? t : "" : ""
  23045. }
  23046. function _w(t, e, n, i) {
  23047. var r = t.animators
  23048. , o = r.length
  23049. , a = [];
  23050. if (t instanceof ih) {
  23051. var s = function(t, e, n) {
  23052. var i, r, o = t.shape.paths, a = {};
  23053. if (E(o, (function(t) {
  23054. var e = uw(n.zrId);
  23055. e.animation = !0,
  23056. _w(t, {}, e, !0);
  23057. var o = e.cssAnims
  23058. , s = e.cssNodes
  23059. , l = G(o)
  23060. , u = l.length;
  23061. if (u) {
  23062. var h = o[r = l[u - 1]];
  23063. for (var c in h) {
  23064. var p = h[c];
  23065. a[c] = a[c] || {
  23066. d: ""
  23067. },
  23068. a[c].d += p.d || ""
  23069. }
  23070. for (var d in s) {
  23071. var f = s[d].animation;
  23072. f.indexOf(r) >= 0 && (i = f)
  23073. }
  23074. }
  23075. }
  23076. )),
  23077. i) {
  23078. e.d = !1;
  23079. var s = mw(a, n);
  23080. return i.replace(r, s)
  23081. }
  23082. }(t, e, n);
  23083. if (s)
  23084. a.push(s);
  23085. else if (!o)
  23086. return
  23087. } else if (!o)
  23088. return;
  23089. for (var l = {}, u = 0; u < o; u++) {
  23090. var h = r[u]
  23091. , c = [h.getMaxTime() / 1e3 + "s"]
  23092. , p = xw(h.getClip().easing)
  23093. , d = h.getDelay();
  23094. p ? c.push(p) : c.push("linear"),
  23095. d && c.push(d / 1e3 + "s"),
  23096. h.getLoop() && c.push("infinite");
  23097. var f = c.join(" ");
  23098. l[f] = l[f] || [f, []],
  23099. l[f][1].push(h)
  23100. }
  23101. function g(r) {
  23102. var o, a = r[1], s = a.length, l = {}, u = {}, h = {}, c = "animation-timing-function";
  23103. function p(t, e, n) {
  23104. for (var i = t.getTracks(), r = t.getMaxTime(), o = 0; o < i.length; o++) {
  23105. var a = i[o];
  23106. if (a.needsAnimate()) {
  23107. var s = a.keyframes
  23108. , l = a.propName;
  23109. if (n && (l = n(l)),
  23110. l)
  23111. for (var u = 0; u < s.length; u++) {
  23112. var h = s[u]
  23113. , p = Math.round(h.time / r * 100) + "%"
  23114. , d = xw(h.easing)
  23115. , f = h.rawValue;
  23116. (U(f) || j(f)) && (e[p] = e[p] || {},
  23117. e[p][l] = h.rawValue,
  23118. d && (e[p][c] = d))
  23119. }
  23120. }
  23121. }
  23122. }
  23123. for (var d = 0; d < s; d++) {
  23124. (S = (w = a[d]).targetName) ? "shape" === S && p(w, u) : !i && p(w, l)
  23125. }
  23126. for (var f in l) {
  23127. var g = {};
  23128. xr(g, t),
  23129. A(g, l[f]);
  23130. var y = Si(g)
  23131. , v = l[f][c];
  23132. h[f] = y ? {
  23133. transform: y
  23134. } : {},
  23135. yw(h[f], g),
  23136. v && (h[f][c] = v)
  23137. }
  23138. var m = !0;
  23139. for (var f in u) {
  23140. h[f] = h[f] || {};
  23141. var x = !o;
  23142. v = u[f][c];
  23143. x && (o = new hs);
  23144. var _ = o.len();
  23145. o.reset(),
  23146. h[f].d = gw(t, u[f], o);
  23147. var b = o.len();
  23148. if (!x && _ !== b) {
  23149. m = !1;
  23150. break
  23151. }
  23152. v && (h[f][c] = v)
  23153. }
  23154. if (!m)
  23155. for (var f in h)
  23156. delete h[f].d;
  23157. if (!i)
  23158. for (d = 0; d < s; d++) {
  23159. var w, S;
  23160. "style" === (S = (w = a[d]).targetName) && p(w, h, (function(t) {
  23161. return vw[t]
  23162. }
  23163. ))
  23164. }
  23165. var M, I = G(h), T = !0;
  23166. for (d = 1; d < I.length; d++) {
  23167. var C = I[d - 1]
  23168. , D = I[d];
  23169. if (h[C][fw] !== h[D][fw]) {
  23170. T = !1;
  23171. break
  23172. }
  23173. M = h[C][fw]
  23174. }
  23175. if (T && M) {
  23176. for (var f in h)
  23177. h[f][fw] && delete h[f][fw];
  23178. e[fw] = M
  23179. }
  23180. if (B(I, (function(t) {
  23181. return G(h[t]).length > 0
  23182. }
  23183. )).length)
  23184. return mw(h, n) + " " + r[0] + " both"
  23185. }
  23186. for (var y in l) {
  23187. (s = g(l[y])) && a.push(s)
  23188. }
  23189. if (a.length) {
  23190. var v = n.zrId + "-cls-" + pw();
  23191. n.cssNodes["." + v] = {
  23192. animation: a.join(",")
  23193. },
  23194. e.class = v
  23195. }
  23196. }
  23197. function bw(t, e, n, i) {
  23198. var r = JSON.stringify(t)
  23199. , o = n.cssStyleCache[r];
  23200. o || (o = n.zrId + "-cls-" + pw(),
  23201. n.cssStyleCache[r] = o,
  23202. n.cssNodes["." + o + (i ? ":hover" : "")] = t),
  23203. e.class = e.class ? e.class + " " + o : o
  23204. }
  23205. var ww = Math.round;
  23206. function Sw(t) {
  23207. return t && U(t.src)
  23208. }
  23209. function Mw(t) {
  23210. return t && X(t.toDataURL)
  23211. }
  23212. function Iw(t, e, n, i) {
  23213. nw((function(r, o) {
  23214. var a = "fill" === r || "stroke" === r;
  23215. a && _i(o) ? Ew(e, t, r, i) : a && vi(o) ? zw(n, t, r, i) : t[r] = o,
  23216. a && i.ssr && "none" === o && (t["pointer-events"] = "visible")
  23217. }
  23218. ), e, n, !1),
  23219. function(t, e, n) {
  23220. var i = t.style;
  23221. if (function(t) {
  23222. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY)
  23223. }(i)) {
  23224. var r = function(t) {
  23225. var e = t.style
  23226. , n = t.getGlobalScale();
  23227. return [e.shadowColor, (e.shadowBlur || 0).toFixed(2), (e.shadowOffsetX || 0).toFixed(2), (e.shadowOffsetY || 0).toFixed(2), n[0], n[1]].join(",")
  23228. }(t)
  23229. , o = n.shadowCache
  23230. , a = o[r];
  23231. if (!a) {
  23232. var s = t.getGlobalScale()
  23233. , l = s[0]
  23234. , u = s[1];
  23235. if (!l || !u)
  23236. return;
  23237. var h = i.shadowOffsetX || 0
  23238. , c = i.shadowOffsetY || 0
  23239. , p = i.shadowBlur
  23240. , d = hi(i.shadowColor)
  23241. , f = d.opacity
  23242. , g = d.color
  23243. , y = p / 2 / l + " " + p / 2 / u;
  23244. a = n.zrId + "-s" + n.shadowIdx++,
  23245. n.defs[a] = sw("filter", a, {
  23246. id: a,
  23247. x: "-100%",
  23248. y: "-100%",
  23249. width: "300%",
  23250. height: "300%"
  23251. }, [sw("feDropShadow", "", {
  23252. dx: h / l,
  23253. dy: c / u,
  23254. stdDeviation: y,
  23255. "flood-color": g,
  23256. "flood-opacity": f
  23257. })]),
  23258. o[r] = a
  23259. }
  23260. e.filter = bi(a)
  23261. }
  23262. }(n, t, i)
  23263. }
  23264. function Tw(t, e) {
  23265. var n = Ur(e);
  23266. n && (n.each((function(e, n) {
  23267. null != e && (t[(ow + n).toLowerCase()] = e + "")
  23268. }
  23269. )),
  23270. e.isSilent() && (t[ow + "silent"] = "true"))
  23271. }
  23272. function Cw(t) {
  23273. return pi(t[0] - 1) && pi(t[1]) && pi(t[2]) && pi(t[3] - 1)
  23274. }
  23275. function Dw(t, e, n) {
  23276. if (e && (!function(t) {
  23277. return pi(t[4]) && pi(t[5])
  23278. }(e) || !Cw(e))) {
  23279. var i = n ? 10 : 1e4;
  23280. t.transform = Cw(e) ? "translate(" + ww(e[4] * i) / i + " " + ww(e[5] * i) / i + ")" : function(t) {
  23281. return "matrix(" + di(t[0]) + "," + di(t[1]) + "," + di(t[2]) + "," + di(t[3]) + "," + fi(t[4]) + "," + fi(t[5]) + ")"
  23282. }(e)
  23283. }
  23284. }
  23285. function Aw(t, e, n) {
  23286. for (var i = t.points, r = [], o = 0; o < i.length; o++)
  23287. r.push(ww(i[o][0] * n) / n),
  23288. r.push(ww(i[o][1] * n) / n);
  23289. e.points = r.join(" ")
  23290. }
  23291. function kw(t) {
  23292. return !t.smooth
  23293. }
  23294. var Lw, Pw, Ow = {
  23295. circle: [(Lw = ["cx", "cy", "r"],
  23296. Pw = z(Lw, (function(t) {
  23297. return "string" == typeof t ? [t, t] : t
  23298. }
  23299. )),
  23300. function(t, e, n) {
  23301. for (var i = 0; i < Pw.length; i++) {
  23302. var r = Pw[i]
  23303. , o = t[r[0]];
  23304. null != o && (e[r[1]] = ww(o * n) / n)
  23305. }
  23306. }
  23307. )],
  23308. polyline: [Aw, kw],
  23309. polygon: [Aw, kw]
  23310. };
  23311. function Rw(t, e) {
  23312. var n = t.style
  23313. , i = t.shape
  23314. , r = Ow[t.type]
  23315. , o = {}
  23316. , a = e.animation
  23317. , s = "path"
  23318. , l = t.style.strokePercent
  23319. , u = e.compress && wi(t) || 4;
  23320. if (!r || e.willUpdate || r[1] && !r[1](i) || a && function(t) {
  23321. for (var e = t.animators, n = 0; n < e.length; n++)
  23322. if ("shape" === e[n].targetName)
  23323. return !0;
  23324. return !1
  23325. }(t) || l < 1) {
  23326. var h = !t.path || t.shapeChanged();
  23327. t.path || t.createPathProxy();
  23328. var c = t.path;
  23329. h && (c.beginPath(),
  23330. t.buildPath(c, t.shape),
  23331. t.pathUpdated());
  23332. var p = c.getVersion()
  23333. , d = t
  23334. , f = d.__svgPathBuilder;
  23335. d.__svgPathVersion === p && f && l === d.__svgPathStrokePercent || (f || (f = d.__svgPathBuilder = new $b),
  23336. f.reset(u),
  23337. c.rebuildPath(f, l),
  23338. f.generateStr(),
  23339. d.__svgPathVersion = p,
  23340. d.__svgPathStrokePercent = l),
  23341. o.d = f.getStr()
  23342. } else {
  23343. s = t.type;
  23344. var g = Math.pow(10, u);
  23345. r[0](i, o, g)
  23346. }
  23347. return Dw(o, t.transform),
  23348. Iw(o, n, t, e),
  23349. Tw(o, t),
  23350. e.animation && _w(t, o, e),
  23351. e.emphasis && function(t, e, n) {
  23352. if (!t.ignore)
  23353. if (t.isSilent())
  23354. bw(u = {
  23355. "pointer-events": "none"
  23356. }, e, n, !0);
  23357. else {
  23358. var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}
  23359. , r = i.fill;
  23360. if (!r) {
  23361. var o = t.style && t.style.fill
  23362. , a = t.states.select && t.states.select.style && t.states.select.style.fill
  23363. , s = t.currentStates.indexOf("select") >= 0 && a || o;
  23364. s && (r = si(s))
  23365. }
  23366. var l = i.lineWidth;
  23367. l && (l /= !i.strokeNoScale && t.transform ? t.transform[0] : 1);
  23368. var u = {
  23369. cursor: "pointer"
  23370. };
  23371. r && (u.fill = r),
  23372. i.stroke && (u.stroke = i.stroke),
  23373. l && (u["stroke-width"] = l),
  23374. bw(u, e, n, !0)
  23375. }
  23376. }(t, o, e),
  23377. sw(s, t.id + "", o)
  23378. }
  23379. function Nw(t, e) {
  23380. return t instanceof ks ? Rw(t, e) : t instanceof Ns ? function(t, e) {
  23381. var n = t.style
  23382. , i = n.image;
  23383. if (i && !U(i) && (Sw(i) ? i = i.src : Mw(i) && (i = i.toDataURL())),
  23384. i) {
  23385. var r = n.x || 0
  23386. , o = n.y || 0
  23387. , a = {
  23388. href: i,
  23389. width: n.width,
  23390. height: n.height
  23391. };
  23392. return r && (a.x = r),
  23393. o && (a.y = o),
  23394. Dw(a, t.transform),
  23395. Iw(a, n, t, e),
  23396. Tw(a, t),
  23397. e.animation && _w(t, a, e),
  23398. sw("image", t.id + "", a)
  23399. }
  23400. }(t, e) : t instanceof Ps ? function(t, e) {
  23401. var n = t.style
  23402. , i = n.text;
  23403. if (null != i && (i += ""),
  23404. i && !isNaN(n.x) && !isNaN(n.y)) {
  23405. var r = n.font || a
  23406. , s = n.x || 0
  23407. , l = function(t, e, n) {
  23408. return "top" === n ? t += e / 2 : "bottom" === n && (t -= e / 2),
  23409. t
  23410. }(n.y || 0, Tr(r), n.textBaseline)
  23411. , u = {
  23412. "dominant-baseline": "central",
  23413. "text-anchor": gi[n.textAlign] || n.textAlign
  23414. };
  23415. if ($s(n)) {
  23416. var h = ""
  23417. , c = n.fontStyle
  23418. , p = qs(n.fontSize);
  23419. if (!parseFloat(p))
  23420. return;
  23421. var d = n.fontFamily || o
  23422. , f = n.fontWeight;
  23423. h += "font-size:" + p + ";font-family:" + d + ";",
  23424. c && "normal" !== c && (h += "font-style:" + c + ";"),
  23425. f && "normal" !== f && (h += "font-weight:" + f + ";"),
  23426. u.style = h
  23427. } else
  23428. u.style = "font: " + r;
  23429. return i.match(/\s/) && (u["xml:space"] = "preserve"),
  23430. s && (u.x = s),
  23431. l && (u.y = l),
  23432. Dw(u, t.transform),
  23433. Iw(u, n, t, e),
  23434. Tw(u, t),
  23435. e.animation && _w(t, u, e),
  23436. sw("text", t.id + "", u, void 0, i)
  23437. }
  23438. }(t, e) : void 0
  23439. }
  23440. function Ew(t, e, n, i) {
  23441. var r, o = t[n], a = {
  23442. gradientUnits: o.global ? "userSpaceOnUse" : "objectBoundingBox"
  23443. };
  23444. if (mi(o))
  23445. r = "linearGradient",
  23446. a.x1 = o.x,
  23447. a.y1 = o.y,
  23448. a.x2 = o.x2,
  23449. a.y2 = o.y2;
  23450. else {
  23451. if (!xi(o))
  23452. return void 0;
  23453. r = "radialGradient",
  23454. a.cx = rt(o.x, .5),
  23455. a.cy = rt(o.y, .5),
  23456. a.r = rt(o.r, .5)
  23457. }
  23458. for (var s = o.colorStops, l = [], u = 0, h = s.length; u < h; ++u) {
  23459. var c = 100 * fi(s[u].offset) + "%"
  23460. , p = hi(s[u].color)
  23461. , d = p.color
  23462. , f = p.opacity
  23463. , g = {
  23464. offset: c
  23465. };
  23466. g["stop-color"] = d,
  23467. f < 1 && (g["stop-opacity"] = f),
  23468. l.push(sw("stop", u + "", g))
  23469. }
  23470. var y = lw(sw(r, "", a, l))
  23471. , v = i.gradientCache
  23472. , m = v[y];
  23473. m || (m = i.zrId + "-g" + i.gradientIdx++,
  23474. v[y] = m,
  23475. a.id = m,
  23476. i.defs[m] = sw(r, m, a, l)),
  23477. e[n] = bi(m)
  23478. }
  23479. function zw(t, e, n, i) {
  23480. var r, o = t.style[n], a = t.getBoundingRect(), s = {}, l = o.repeat, u = "no-repeat" === l, h = "repeat-x" === l, c = "repeat-y" === l;
  23481. if (yi(o)) {
  23482. var p = o.imageWidth
  23483. , d = o.imageHeight
  23484. , f = void 0
  23485. , g = o.image;
  23486. if (U(g) ? f = g : Sw(g) ? f = g.src : Mw(g) && (f = g.toDataURL()),
  23487. "undefined" == typeof Image) {
  23488. var y = "Image width/height must been given explictly in svg-ssr renderer.";
  23489. lt(p, y),
  23490. lt(d, y)
  23491. } else if (null == p || null == d) {
  23492. var v = function(t, e) {
  23493. if (t) {
  23494. var n = t.elm
  23495. , i = p || e.width
  23496. , r = d || e.height;
  23497. "pattern" === t.tag && (h ? (r = 1,
  23498. i /= a.width) : c && (i = 1,
  23499. r /= a.height)),
  23500. t.attrs.width = i,
  23501. t.attrs.height = r,
  23502. n && (n.setAttribute("width", i),
  23503. n.setAttribute("height", r))
  23504. }
  23505. }
  23506. , m = la(f, null, t, (function(t) {
  23507. u || v(w, t),
  23508. v(r, t)
  23509. }
  23510. ));
  23511. m && m.width && m.height && (p = p || m.width,
  23512. d = d || m.height)
  23513. }
  23514. r = sw("image", "img", {
  23515. href: f,
  23516. width: p,
  23517. height: d
  23518. }),
  23519. s.width = p,
  23520. s.height = d
  23521. } else
  23522. o.svgElement && (r = T(o.svgElement),
  23523. s.width = o.svgWidth,
  23524. s.height = o.svgHeight);
  23525. if (r) {
  23526. var x, _;
  23527. u ? x = _ = 1 : h ? (_ = 1,
  23528. x = s.width / a.width) : c ? (x = 1,
  23529. _ = s.height / a.height) : s.patternUnits = "userSpaceOnUse",
  23530. null == x || isNaN(x) || (s.width = x),
  23531. null == _ || isNaN(_) || (s.height = _);
  23532. var b = Si(o);
  23533. b && (s.patternTransform = b);
  23534. var w = sw("pattern", "", s, [r])
  23535. , S = lw(w)
  23536. , M = i.patternCache
  23537. , I = M[S];
  23538. I || (I = i.zrId + "-p" + i.patternIdx++,
  23539. M[S] = I,
  23540. s.id = I,
  23541. w = i.defs[I] = sw("pattern", I, s, [r])),
  23542. e[n] = bi(I)
  23543. }
  23544. }
  23545. function Vw(t, e, n) {
  23546. var i = n.clipPathCache
  23547. , r = n.defs
  23548. , o = i[t.id];
  23549. if (!o) {
  23550. var a = {
  23551. id: o = n.zrId + "-c" + n.clipPathIdx++
  23552. };
  23553. i[t.id] = o,
  23554. r[o] = sw("clipPath", o, a, [Rw(t, n)])
  23555. }
  23556. e["clip-path"] = bi(o)
  23557. }
  23558. function Bw(t) {
  23559. return document.createTextNode(t)
  23560. }
  23561. function Fw(t, e, n) {
  23562. t.insertBefore(e, n)
  23563. }
  23564. function Gw(t, e) {
  23565. t.removeChild(e)
  23566. }
  23567. function Ww(t, e) {
  23568. t.appendChild(e)
  23569. }
  23570. function Hw(t) {
  23571. return t.parentNode
  23572. }
  23573. function Yw(t) {
  23574. return t.nextSibling
  23575. }
  23576. function Xw(t, e) {
  23577. t.textContent = e
  23578. }
  23579. var Uw = sw("", "");
  23580. function Zw(t) {
  23581. return void 0 === t
  23582. }
  23583. function jw(t) {
  23584. return void 0 !== t
  23585. }
  23586. function qw(t, e, n) {
  23587. for (var i = {}, r = e; r <= n; ++r) {
  23588. var o = t[r].key;
  23589. void 0 !== o && (i[o] = r)
  23590. }
  23591. return i
  23592. }
  23593. function Kw(t, e) {
  23594. var n = t.key === e.key;
  23595. return t.tag === e.tag && n
  23596. }
  23597. function $w(t) {
  23598. var e, n = t.children, i = t.tag;
  23599. if (jw(i)) {
  23600. var r = t.elm = aw(i);
  23601. if (tS(Uw, t),
  23602. Y(n))
  23603. for (e = 0; e < n.length; ++e) {
  23604. var o = n[e];
  23605. null != o && Ww(r, $w(o))
  23606. }
  23607. else
  23608. jw(t.text) && !q(t.text) && Ww(r, Bw(t.text))
  23609. } else
  23610. t.elm = Bw(t.text);
  23611. return t.elm
  23612. }
  23613. function Jw(t, e, n, i, r) {
  23614. for (; i <= r; ++i) {
  23615. var o = n[i];
  23616. null != o && Fw(t, $w(o), e)
  23617. }
  23618. }
  23619. function Qw(t, e, n, i) {
  23620. for (; n <= i; ++n) {
  23621. var r = e[n];
  23622. if (null != r)
  23623. if (jw(r.tag))
  23624. Gw(Hw(r.elm), r.elm);
  23625. else
  23626. Gw(t, r.elm)
  23627. }
  23628. }
  23629. function tS(t, e) {
  23630. var n, i = e.elm, r = t && t.attrs || {}, o = e.attrs || {};
  23631. if (r !== o) {
  23632. for (n in o) {
  23633. var a = o[n];
  23634. 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(rw, n, a) : i.setAttribute(n, a))
  23635. }
  23636. for (n in r)
  23637. n in o || i.removeAttribute(n)
  23638. }
  23639. }
  23640. function eS(t, e) {
  23641. var n = e.elm = t.elm
  23642. , i = t.children
  23643. , r = e.children;
  23644. t !== e && (tS(t, e),
  23645. Zw(e.text) ? jw(i) && jw(r) ? i !== r && function(t, e, n) {
  23646. 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; )
  23647. null == u ? u = e[++a] : null == h ? h = e[--l] : null == p ? p = n[++s] : null == d ? d = n[--c] : Kw(u, p) ? (eS(u, p),
  23648. u = e[++a],
  23649. p = n[++s]) : Kw(h, d) ? (eS(h, d),
  23650. h = e[--l],
  23651. d = n[--c]) : Kw(u, d) ? (eS(u, d),
  23652. Fw(t, u.elm, Yw(h.elm)),
  23653. u = e[++a],
  23654. d = n[--c]) : Kw(h, p) ? (eS(h, p),
  23655. Fw(t, h.elm, u.elm),
  23656. h = e[--l],
  23657. p = n[++s]) : (Zw(i) && (i = qw(e, a, l)),
  23658. Zw(r = i[p.key]) || (o = e[r]).tag !== p.tag ? Fw(t, $w(p), u.elm) : (eS(o, p),
  23659. e[r] = void 0,
  23660. Fw(t, o.elm, u.elm)),
  23661. p = n[++s]);
  23662. (a <= l || s <= c) && (a > l ? Jw(t, null == n[c + 1] ? null : n[c + 1].elm, n, s, c) : Qw(t, e, a, l))
  23663. }(n, i, r) : jw(r) ? (jw(t.text) && Xw(n, ""),
  23664. Jw(n, null, r, 0, r.length - 1)) : jw(i) ? Qw(n, i, 0, i.length - 1) : jw(t.text) && Xw(n, "") : t.text !== e.text && (jw(i) && Qw(n, i, 0, i.length - 1),
  23665. Xw(n, e.text)))
  23666. }
  23667. var nS = 0
  23668. , iS = function() {
  23669. function t(t, e, n) {
  23670. if (this.type = "svg",
  23671. this.refreshHover = rS("refreshHover"),
  23672. this.configLayer = rS("configLayer"),
  23673. this.storage = e,
  23674. this._opts = n = A({}, n),
  23675. this.root = t,
  23676. this._id = "zr" + nS++,
  23677. this._oldVNode = hw(n.width, n.height),
  23678. t && !n.ssr) {
  23679. var i = this._viewport = document.createElement("div");
  23680. i.style.cssText = "position:relative;overflow:hidden";
  23681. var r = this._svgDom = this._oldVNode.elm = aw("svg");
  23682. tS(null, this._oldVNode),
  23683. i.appendChild(r),
  23684. t.appendChild(i)
  23685. }
  23686. this.resize(n.width, n.height)
  23687. }
  23688. return t.prototype.getType = function() {
  23689. return this.type
  23690. }
  23691. ,
  23692. t.prototype.getViewportRoot = function() {
  23693. return this._viewport
  23694. }
  23695. ,
  23696. t.prototype.getViewportRootOffset = function() {
  23697. var t = this.getViewportRoot();
  23698. if (t)
  23699. return {
  23700. offsetLeft: t.offsetLeft || 0,
  23701. offsetTop: t.offsetTop || 0
  23702. }
  23703. }
  23704. ,
  23705. t.prototype.getSvgDom = function() {
  23706. return this._svgDom
  23707. }
  23708. ,
  23709. t.prototype.refresh = function() {
  23710. if (this.root) {
  23711. var t = this.renderToVNode({
  23712. willUpdate: !0
  23713. });
  23714. t.attrs.style = "position:absolute;left:0;top:0;user-select:none",
  23715. function(t, e) {
  23716. if (Kw(t, e))
  23717. eS(t, e);
  23718. else {
  23719. var n = t.elm
  23720. , i = Hw(n);
  23721. $w(e),
  23722. null !== i && (Fw(i, e.elm, Yw(n)),
  23723. Qw(i, [t], 0, 0))
  23724. }
  23725. }(this._oldVNode, t),
  23726. this._oldVNode = t
  23727. }
  23728. }
  23729. ,
  23730. t.prototype.renderOneToVNode = function(t) {
  23731. return Nw(t, uw(this._id))
  23732. }
  23733. ,
  23734. t.prototype.renderToVNode = function(t) {
  23735. t = t || {};
  23736. var e = this.storage.getDisplayList(!0)
  23737. , n = this._width
  23738. , i = this._height
  23739. , r = uw(this._id);
  23740. r.animation = t.animation,
  23741. r.willUpdate = t.willUpdate,
  23742. r.compress = t.compress,
  23743. r.emphasis = t.emphasis,
  23744. r.ssr = this._opts.ssr;
  23745. var o = []
  23746. , a = this._bgVNode = function(t, e, n, i) {
  23747. var r;
  23748. if (n && "none" !== n)
  23749. if (r = sw("rect", "bg", {
  23750. width: t,
  23751. height: e,
  23752. x: "0",
  23753. y: "0"
  23754. }),
  23755. _i(n))
  23756. Ew({
  23757. fill: n
  23758. }, r.attrs, "fill", i);
  23759. else if (vi(n))
  23760. zw({
  23761. style: {
  23762. fill: n
  23763. },
  23764. dirty: bt,
  23765. getBoundingRect: function() {
  23766. return {
  23767. width: t,
  23768. height: e
  23769. }
  23770. }
  23771. }, r.attrs, "fill", i);
  23772. else {
  23773. var o = hi(n)
  23774. , a = o.color
  23775. , s = o.opacity;
  23776. r.attrs.fill = a,
  23777. s < 1 && (r.attrs["fill-opacity"] = s)
  23778. }
  23779. return r
  23780. }(n, i, this._backgroundColor, r);
  23781. a && o.push(a);
  23782. var s = t.compress ? null : this._mainVNode = sw("g", "main", {}, []);
  23783. this._paintList(e, r, s ? s.children : o),
  23784. s && o.push(s);
  23785. var l = z(G(r.defs), (function(t) {
  23786. return r.defs[t]
  23787. }
  23788. ));
  23789. if (l.length && o.push(sw("defs", "defs", {}, l)),
  23790. t.animation) {
  23791. var u = function(t, e, n) {
  23792. var i = (n = n || {}).newline ? "\n" : ""
  23793. , r = " {" + i
  23794. , o = i + "}"
  23795. , a = z(G(t), (function(e) {
  23796. return e + r + z(G(t[e]), (function(n) {
  23797. return n + ":" + t[e][n] + ";"
  23798. }
  23799. )).join(i) + o
  23800. }
  23801. )).join(i)
  23802. , s = z(G(e), (function(t) {
  23803. return "@keyframes " + t + r + z(G(e[t]), (function(n) {
  23804. return n + r + z(G(e[t][n]), (function(i) {
  23805. var r = e[t][n][i];
  23806. return "d" === i && (r = 'path("' + r + '")'),
  23807. i + ":" + r + ";"
  23808. }
  23809. )).join(i) + o
  23810. }
  23811. )).join(i) + o
  23812. }
  23813. )).join(i);
  23814. return a || s ? ["<![CDATA[", a, s, "]]>"].join(i) : ""
  23815. }(r.cssNodes, r.cssAnims, {
  23816. newline: !0
  23817. });
  23818. if (u) {
  23819. var h = sw("style", "stl", {}, [], u);
  23820. o.push(h)
  23821. }
  23822. }
  23823. return hw(n, i, o, t.useViewBox)
  23824. }
  23825. ,
  23826. t.prototype.renderToString = function(t) {
  23827. return t = t || {},
  23828. lw(this.renderToVNode({
  23829. animation: rt(t.cssAnimation, !0),
  23830. emphasis: rt(t.cssEmphasis, !0),
  23831. willUpdate: !1,
  23832. compress: !0,
  23833. useViewBox: rt(t.useViewBox, !0)
  23834. }), {
  23835. newline: !0
  23836. })
  23837. }
  23838. ,
  23839. t.prototype.setBackgroundColor = function(t) {
  23840. this._backgroundColor = t
  23841. }
  23842. ,
  23843. t.prototype.getSvgRoot = function() {
  23844. return this._mainVNode && this._mainVNode.elm
  23845. }
  23846. ,
  23847. t.prototype._paintList = function(t, e, n) {
  23848. for (var i, r, o = t.length, a = [], s = 0, l = 0, u = 0; u < o; u++) {
  23849. var h = t[u];
  23850. if (!h.invisible) {
  23851. var c = h.__clipPaths
  23852. , p = c && c.length || 0
  23853. , d = r && r.length || 0
  23854. , f = void 0;
  23855. for (f = Math.max(p - 1, d - 1); f >= 0 && (!c || !r || c[f] !== r[f]); f--)
  23856. ;
  23857. for (var g = d - 1; g > f; g--)
  23858. i = a[--s - 1];
  23859. for (var y = f + 1; y < p; y++) {
  23860. var v = {};
  23861. Vw(c[y], v, e);
  23862. var m = sw("g", "clip-g-" + l++, v, []);
  23863. (i ? i.children : n).push(m),
  23864. a[s++] = m,
  23865. i = m
  23866. }
  23867. r = c;
  23868. var x = Nw(h, e);
  23869. x && (i ? i.children : n).push(x)
  23870. }
  23871. }
  23872. }
  23873. ,
  23874. t.prototype.resize = function(t, e) {
  23875. var n = this._opts
  23876. , i = this.root
  23877. , r = this._viewport;
  23878. if (null != t && (n.width = t),
  23879. null != e && (n.height = e),
  23880. i && r && (r.style.display = "none",
  23881. t = $y(i, 0, n),
  23882. e = $y(i, 1, n),
  23883. r.style.display = ""),
  23884. this._width !== t || this._height !== e) {
  23885. if (this._width = t,
  23886. this._height = e,
  23887. r) {
  23888. var o = r.style;
  23889. o.width = t + "px",
  23890. o.height = e + "px"
  23891. }
  23892. if (vi(this._backgroundColor))
  23893. this.refresh();
  23894. else {
  23895. var a = this._svgDom;
  23896. a && (a.setAttribute("width", t),
  23897. a.setAttribute("height", e));
  23898. var s = this._bgVNode && this._bgVNode.elm;
  23899. s && (s.setAttribute("width", t),
  23900. s.setAttribute("height", e))
  23901. }
  23902. }
  23903. }
  23904. ,
  23905. t.prototype.getWidth = function() {
  23906. return this._width
  23907. }
  23908. ,
  23909. t.prototype.getHeight = function() {
  23910. return this._height
  23911. }
  23912. ,
  23913. t.prototype.dispose = function() {
  23914. this.root && (this.root.innerHTML = ""),
  23915. this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null
  23916. }
  23917. ,
  23918. t.prototype.clear = function() {
  23919. this._svgDom && (this._svgDom.innerHTML = null),
  23920. this._oldVNode = null
  23921. }
  23922. ,
  23923. t.prototype.toDataURL = function(t) {
  23924. var e = this.renderToString()
  23925. , n = "data:image/svg+xml;";
  23926. return t ? (e = Mi(e)) && n + "base64," + e : n + "charset=UTF-8," + encodeURIComponent(e)
  23927. }
  23928. ,
  23929. t
  23930. }();
  23931. function rS(t) {
  23932. return function() {
  23933. 0
  23934. }
  23935. }
  23936. function oS(t, e, n) {
  23937. var i = h.createCanvas()
  23938. , r = e.getWidth()
  23939. , o = e.getHeight()
  23940. , a = i.style;
  23941. return a && (a.position = "absolute",
  23942. a.left = "0",
  23943. a.top = "0",
  23944. a.width = r + "px",
  23945. a.height = o + "px",
  23946. i.setAttribute("data-zr-dom-id", t)),
  23947. i.width = r * n,
  23948. i.height = o * n,
  23949. i
  23950. }
  23951. var aS = function(t) {
  23952. function e(e, n, i) {
  23953. var r, o = t.call(this) || this;
  23954. o.motionBlur = !1,
  23955. o.lastFrameAlpha = .7,
  23956. o.dpr = 1,
  23957. o.virtual = !1,
  23958. o.config = {},
  23959. o.incremental = !1,
  23960. o.zlevel = 0,
  23961. o.maxRepaintRectCount = 5,
  23962. o.__dirty = !0,
  23963. o.__firstTimePaint = !0,
  23964. o.__used = !1,
  23965. o.__drawIndex = 0,
  23966. o.__startIndex = 0,
  23967. o.__endIndex = 0,
  23968. o.__prevStartIndex = null,
  23969. o.__prevEndIndex = null,
  23970. i = i || sr,
  23971. "string" == typeof e ? r = oS(e, n, i) : q(e) && (e = (r = e).id),
  23972. o.id = e,
  23973. o.dom = r;
  23974. var a = r.style;
  23975. return a && (xt(r),
  23976. r.onselectstart = function() {
  23977. return !1
  23978. }
  23979. ,
  23980. a.padding = "0",
  23981. a.margin = "0",
  23982. a.borderWidth = "0"),
  23983. o.painter = n,
  23984. o.dpr = i,
  23985. o
  23986. }
  23987. return n(e, t),
  23988. e.prototype.getElementCount = function() {
  23989. return this.__endIndex - this.__startIndex
  23990. }
  23991. ,
  23992. e.prototype.afterBrush = function() {
  23993. this.__prevStartIndex = this.__startIndex,
  23994. this.__prevEndIndex = this.__endIndex
  23995. }
  23996. ,
  23997. e.prototype.initContext = function() {
  23998. this.ctx = this.dom.getContext("2d"),
  23999. this.ctx.dpr = this.dpr
  24000. }
  24001. ,
  24002. e.prototype.setUnpainted = function() {
  24003. this.__firstTimePaint = !0
  24004. }
  24005. ,
  24006. e.prototype.createBackBuffer = function() {
  24007. var t = this.dpr;
  24008. this.domBack = oS("back-" + this.id, this.painter, t),
  24009. this.ctxBack = this.domBack.getContext("2d"),
  24010. 1 !== t && this.ctxBack.scale(t, t)
  24011. }
  24012. ,
  24013. e.prototype.createRepaintRects = function(t, e, n, i) {
  24014. if (this.__firstTimePaint)
  24015. return this.__firstTimePaint = !1,
  24016. null;
  24017. var r, o = [], a = this.maxRepaintRectCount, s = !1, l = new ze(0,0,0,0);
  24018. function u(t) {
  24019. if (t.isFinite() && !t.isZero())
  24020. if (0 === o.length) {
  24021. (e = new ze(0,0,0,0)).copy(t),
  24022. o.push(e)
  24023. } else {
  24024. for (var e, n = !1, i = 1 / 0, r = 0, u = 0; u < o.length; ++u) {
  24025. var h = o[u];
  24026. if (h.intersect(t)) {
  24027. var c = new ze(0,0,0,0);
  24028. c.copy(h),
  24029. c.union(t),
  24030. o[u] = c,
  24031. n = !0;
  24032. break
  24033. }
  24034. if (s) {
  24035. l.copy(t),
  24036. l.union(h);
  24037. var p = t.width * t.height
  24038. , d = h.width * h.height
  24039. , f = l.width * l.height - p - d;
  24040. f < i && (i = f,
  24041. r = u)
  24042. }
  24043. }
  24044. if (s && (o[r].union(t),
  24045. n = !0),
  24046. !n)
  24047. (e = new ze(0,0,0,0)).copy(t),
  24048. o.push(e);
  24049. s || (s = o.length >= a)
  24050. }
  24051. }
  24052. for (var h = this.__startIndex; h < this.__endIndex; ++h) {
  24053. if (d = t[h]) {
  24054. var c = d.shouldBePainted(n, i, !0, !0);
  24055. (f = d.__isRendered && (1 & d.__dirty || !c) ? d.getPrevPaintRect() : null) && u(f);
  24056. var p = c && (1 & d.__dirty || !d.__isRendered) ? d.getPaintRect() : null;
  24057. p && u(p)
  24058. }
  24059. }
  24060. for (h = this.__prevStartIndex; h < this.__prevEndIndex; ++h) {
  24061. var d, f;
  24062. c = (d = e[h]) && d.shouldBePainted(n, i, !0, !0);
  24063. if (d && (!c || !d.__zr) && d.__isRendered)
  24064. (f = d.getPrevPaintRect()) && u(f)
  24065. }
  24066. do {
  24067. r = !1;
  24068. for (h = 0; h < o.length; )
  24069. if (o[h].isZero())
  24070. o.splice(h, 1);
  24071. else {
  24072. for (var g = h + 1; g < o.length; )
  24073. o[h].intersect(o[g]) ? (r = !0,
  24074. o[h].union(o[g]),
  24075. o.splice(g, 1)) : g++;
  24076. h++
  24077. }
  24078. } while (r);
  24079. return this._paintRects = o,
  24080. o
  24081. }
  24082. ,
  24083. e.prototype.debugGetPaintRects = function() {
  24084. return (this._paintRects || []).slice()
  24085. }
  24086. ,
  24087. e.prototype.resize = function(t, e) {
  24088. var n = this.dpr
  24089. , i = this.dom
  24090. , r = i.style
  24091. , o = this.domBack;
  24092. r && (r.width = t + "px",
  24093. r.height = e + "px"),
  24094. i.width = t * n,
  24095. i.height = e * n,
  24096. o && (o.width = t * n,
  24097. o.height = e * n,
  24098. 1 !== n && this.ctxBack.scale(n, n))
  24099. }
  24100. ,
  24101. e.prototype.clear = function(t, e, n) {
  24102. var i = this.dom
  24103. , r = this.ctx
  24104. , o = i.width
  24105. , a = i.height;
  24106. e = e || this.clearColor;
  24107. var s = this.motionBlur && !t
  24108. , l = this.lastFrameAlpha
  24109. , u = this.dpr
  24110. , h = this;
  24111. s && (this.domBack || this.createBackBuffer(),
  24112. this.ctxBack.globalCompositeOperation = "copy",
  24113. this.ctxBack.drawImage(i, 0, 0, o / u, a / u));
  24114. var c = this.domBack;
  24115. function p(t, n, i, o) {
  24116. if (r.clearRect(t, n, i, o),
  24117. e && "transparent" !== e) {
  24118. var a = void 0;
  24119. if (Q(e))
  24120. a = (e.global || e.__width === i && e.__height === o) && e.__canvasGradient || qy(r, e, {
  24121. x: 0,
  24122. y: 0,
  24123. width: i,
  24124. height: o
  24125. }),
  24126. e.__canvasGradient = a,
  24127. e.__width = i,
  24128. e.__height = o;
  24129. else
  24130. tt(e) && (e.scaleX = e.scaleX || u,
  24131. e.scaleY = e.scaleY || u,
  24132. a = ov(r, e, {
  24133. dirty: function() {
  24134. h.setUnpainted(),
  24135. h.painter.refresh()
  24136. }
  24137. }));
  24138. r.save(),
  24139. r.fillStyle = a || e,
  24140. r.fillRect(t, n, i, o),
  24141. r.restore()
  24142. }
  24143. s && (r.save(),
  24144. r.globalAlpha = l,
  24145. r.drawImage(c, t, n, i, o),
  24146. r.restore())
  24147. }
  24148. !n || s ? p(0, 0, o, a) : n.length && E(n, (function(t) {
  24149. p(t.x * u, t.y * u, t.width * u, t.height * u)
  24150. }
  24151. ))
  24152. }
  24153. ,
  24154. e
  24155. }(jt)
  24156. , sS = 1e5
  24157. , lS = 314159
  24158. , uS = .01;
  24159. var hS = function() {
  24160. function t(t, e, n, i) {
  24161. this.type = "canvas",
  24162. this._zlevelList = [],
  24163. this._prevDisplayList = [],
  24164. this._layers = {},
  24165. this._layerConfig = {},
  24166. this._needsManuallyCompositing = !1,
  24167. this.type = "canvas";
  24168. var r = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  24169. this._opts = n = A({}, n || {}),
  24170. this.dpr = n.devicePixelRatio || sr,
  24171. this._singleCanvas = r,
  24172. this.root = t,
  24173. t.style && (xt(t),
  24174. t.innerHTML = ""),
  24175. this.storage = e;
  24176. var o = this._zlevelList;
  24177. this._prevDisplayList = [];
  24178. var a = this._layers;
  24179. if (r) {
  24180. var s = t
  24181. , l = s.width
  24182. , u = s.height;
  24183. null != n.width && (l = n.width),
  24184. null != n.height && (u = n.height),
  24185. this.dpr = n.devicePixelRatio || 1,
  24186. s.width = l * this.dpr,
  24187. s.height = u * this.dpr,
  24188. this._width = l,
  24189. this._height = u;
  24190. var h = new aS(s,this,this.dpr);
  24191. h.__builtin__ = !0,
  24192. h.initContext(),
  24193. a[314159] = h,
  24194. h.zlevel = lS,
  24195. o.push(lS),
  24196. this._domRoot = t
  24197. } else {
  24198. this._width = $y(t, 0, n),
  24199. this._height = $y(t, 1, n);
  24200. var c = this._domRoot = function(t, e) {
  24201. var n = document.createElement("div");
  24202. return n.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";",
  24203. n
  24204. }(this._width, this._height);
  24205. t.appendChild(c)
  24206. }
  24207. }
  24208. return t.prototype.getType = function() {
  24209. return "canvas"
  24210. }
  24211. ,
  24212. t.prototype.isSingleCanvas = function() {
  24213. return this._singleCanvas
  24214. }
  24215. ,
  24216. t.prototype.getViewportRoot = function() {
  24217. return this._domRoot
  24218. }
  24219. ,
  24220. t.prototype.getViewportRootOffset = function() {
  24221. var t = this.getViewportRoot();
  24222. if (t)
  24223. return {
  24224. offsetLeft: t.offsetLeft || 0,
  24225. offsetTop: t.offsetTop || 0
  24226. }
  24227. }
  24228. ,
  24229. t.prototype.refresh = function(t) {
  24230. var e = this.storage.getDisplayList(!0)
  24231. , n = this._prevDisplayList
  24232. , i = this._zlevelList;
  24233. this._redrawId = Math.random(),
  24234. this._paintList(e, n, t, this._redrawId);
  24235. for (var r = 0; r < i.length; r++) {
  24236. var o = i[r]
  24237. , a = this._layers[o];
  24238. if (!a.__builtin__ && a.refresh) {
  24239. var s = 0 === r ? this._backgroundColor : null;
  24240. a.refresh(s)
  24241. }
  24242. }
  24243. return this._opts.useDirtyRect && (this._prevDisplayList = e.slice()),
  24244. this
  24245. }
  24246. ,
  24247. t.prototype.refreshHover = function() {
  24248. this._paintHoverList(this.storage.getDisplayList(!1))
  24249. }
  24250. ,
  24251. t.prototype._paintHoverList = function(t) {
  24252. var e = t.length
  24253. , n = this._hoverlayer;
  24254. if (n && n.clear(),
  24255. e) {
  24256. for (var i, r = {
  24257. inHover: !0,
  24258. viewWidth: this._width,
  24259. viewHeight: this._height
  24260. }, o = 0; o < e; o++) {
  24261. var a = t[o];
  24262. a.__inHover && (n || (n = this._hoverlayer = this.getLayer(sS)),
  24263. i || (i = n.ctx).save(),
  24264. fv(i, a, r, o === e - 1))
  24265. }
  24266. i && i.restore()
  24267. }
  24268. }
  24269. ,
  24270. t.prototype.getHoverLayer = function() {
  24271. return this.getLayer(sS)
  24272. }
  24273. ,
  24274. t.prototype.paintOne = function(t, e) {
  24275. dv(t, e)
  24276. }
  24277. ,
  24278. t.prototype._paintList = function(t, e, n, i) {
  24279. if (this._redrawId === i) {
  24280. n = n || !1,
  24281. this._updateLayerStatus(t);
  24282. var r = this._doPaintList(t, e, n)
  24283. , o = r.finished
  24284. , a = r.needsRefreshHover;
  24285. if (this._needsManuallyCompositing && this._compositeManually(),
  24286. a && this._paintHoverList(t),
  24287. o)
  24288. this.eachLayer((function(t) {
  24289. t.afterBrush && t.afterBrush()
  24290. }
  24291. ));
  24292. else {
  24293. var s = this;
  24294. on((function() {
  24295. s._paintList(t, e, n, i)
  24296. }
  24297. ))
  24298. }
  24299. }
  24300. }
  24301. ,
  24302. t.prototype._compositeManually = function() {
  24303. var t = this.getLayer(lS).ctx
  24304. , e = this._domRoot.width
  24305. , n = this._domRoot.height;
  24306. t.clearRect(0, 0, e, n),
  24307. this.eachBuiltinLayer((function(i) {
  24308. i.virtual && t.drawImage(i.dom, 0, 0, e, n)
  24309. }
  24310. ))
  24311. }
  24312. ,
  24313. t.prototype._doPaintList = function(t, e, n) {
  24314. for (var i = this, o = [], a = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  24315. var l = this._zlevelList[s]
  24316. , u = this._layers[l];
  24317. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || n) && o.push(u)
  24318. }
  24319. for (var h = !0, c = !1, p = function(r) {
  24320. var s, l = o[r], u = l.ctx, p = a && l.createRepaintRects(t, e, d._width, d._height), f = n ? l.__startIndex : l.__drawIndex, g = !n && l.incremental && Date.now, y = g && Date.now(), v = l.zlevel === d._zlevelList[0] ? d._backgroundColor : null;
  24321. if (l.__startIndex === l.__endIndex)
  24322. l.clear(!1, v, p);
  24323. else if (f === l.__startIndex) {
  24324. var m = t[f];
  24325. m.incremental && m.notClear && !n || l.clear(!1, v, p)
  24326. }
  24327. -1 === f && (console.error("For some unknown reason. drawIndex is -1"),
  24328. f = l.__startIndex);
  24329. var x = function(e) {
  24330. var n = {
  24331. inHover: !1,
  24332. allClipped: !1,
  24333. prevEl: null,
  24334. viewWidth: i._width,
  24335. viewHeight: i._height
  24336. };
  24337. for (s = f; s < l.__endIndex; s++) {
  24338. var r = t[s];
  24339. if (r.__inHover && (c = !0),
  24340. i._doPaintEl(r, l, a, e, n, s === l.__endIndex - 1),
  24341. g)
  24342. if (Date.now() - y > 15)
  24343. break
  24344. }
  24345. n.prevElClipPaths && u.restore()
  24346. };
  24347. if (p)
  24348. if (0 === p.length)
  24349. s = l.__endIndex;
  24350. else
  24351. for (var _ = d.dpr, b = 0; b < p.length; ++b) {
  24352. var w = p[b];
  24353. u.save(),
  24354. u.beginPath(),
  24355. u.rect(w.x * _, w.y * _, w.width * _, w.height * _),
  24356. u.clip(),
  24357. x(w),
  24358. u.restore()
  24359. }
  24360. else
  24361. u.save(),
  24362. x(),
  24363. u.restore();
  24364. l.__drawIndex = s,
  24365. l.__drawIndex < l.__endIndex && (h = !1)
  24366. }, d = this, f = 0; f < o.length; f++)
  24367. p(f);
  24368. return r.wxa && E(this._layers, (function(t) {
  24369. t && t.ctx && t.ctx.draw && t.ctx.draw()
  24370. }
  24371. )),
  24372. {
  24373. finished: h,
  24374. needsRefreshHover: c
  24375. }
  24376. }
  24377. ,
  24378. t.prototype._doPaintEl = function(t, e, n, i, r, o) {
  24379. var a = e.ctx;
  24380. if (n) {
  24381. var s = t.getPaintRect();
  24382. (!i || s && s.intersect(i)) && (fv(a, t, r, o),
  24383. t.setPrevPaintRect(s))
  24384. } else
  24385. fv(a, t, r, o)
  24386. }
  24387. ,
  24388. t.prototype.getLayer = function(t, e) {
  24389. this._singleCanvas && !this._needsManuallyCompositing && (t = lS);
  24390. var n = this._layers[t];
  24391. return n || ((n = new aS("zr_" + t,this,this.dpr)).zlevel = t,
  24392. n.__builtin__ = !0,
  24393. this._layerConfig[t] ? C(n, this._layerConfig[t], !0) : this._layerConfig[t - uS] && C(n, this._layerConfig[t - uS], !0),
  24394. e && (n.virtual = e),
  24395. this.insertLayer(t, n),
  24396. n.initContext()),
  24397. n
  24398. }
  24399. ,
  24400. t.prototype.insertLayer = function(t, e) {
  24401. var n = this._layers
  24402. , i = this._zlevelList
  24403. , r = i.length
  24404. , o = this._domRoot
  24405. , a = null
  24406. , s = -1;
  24407. if (!n[t] && function(t) {
  24408. return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
  24409. }(e)) {
  24410. if (r > 0 && t > i[0]) {
  24411. for (s = 0; s < r - 1 && !(i[s] < t && i[s + 1] > t); s++)
  24412. ;
  24413. a = n[i[s]]
  24414. }
  24415. if (i.splice(s + 1, 0, t),
  24416. n[t] = e,
  24417. !e.virtual)
  24418. if (a) {
  24419. var l = a.dom;
  24420. l.nextSibling ? o.insertBefore(e.dom, l.nextSibling) : o.appendChild(e.dom)
  24421. } else
  24422. o.firstChild ? o.insertBefore(e.dom, o.firstChild) : o.appendChild(e.dom);
  24423. e.painter || (e.painter = this)
  24424. }
  24425. }
  24426. ,
  24427. t.prototype.eachLayer = function(t, e) {
  24428. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  24429. var r = n[i];
  24430. t.call(e, this._layers[r], r)
  24431. }
  24432. }
  24433. ,
  24434. t.prototype.eachBuiltinLayer = function(t, e) {
  24435. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  24436. var r = n[i]
  24437. , o = this._layers[r];
  24438. o.__builtin__ && t.call(e, o, r)
  24439. }
  24440. }
  24441. ,
  24442. t.prototype.eachOtherLayer = function(t, e) {
  24443. for (var n = this._zlevelList, i = 0; i < n.length; i++) {
  24444. var r = n[i]
  24445. , o = this._layers[r];
  24446. o.__builtin__ || t.call(e, o, r)
  24447. }
  24448. }
  24449. ,
  24450. t.prototype.getLayers = function() {
  24451. return this._layers
  24452. }
  24453. ,
  24454. t.prototype._updateLayerStatus = function(t) {
  24455. function e(t) {
  24456. o && (o.__endIndex !== t && (o.__dirty = !0),
  24457. o.__endIndex = t)
  24458. }
  24459. if (this.eachBuiltinLayer((function(t, e) {
  24460. t.__dirty = t.__used = !1
  24461. }
  24462. )),
  24463. this._singleCanvas)
  24464. for (var n = 1; n < t.length; n++) {
  24465. if ((s = t[n]).zlevel !== t[n - 1].zlevel || s.incremental) {
  24466. this._needsManuallyCompositing = !0;
  24467. break
  24468. }
  24469. }
  24470. var i, r, o = null, a = 0;
  24471. for (r = 0; r < t.length; r++) {
  24472. var s, l = (s = t[r]).zlevel, u = void 0;
  24473. i !== l && (i = l,
  24474. a = 0),
  24475. s.incremental ? ((u = this.getLayer(l + .001, this._needsManuallyCompositing)).incremental = !0,
  24476. a = 1) : u = this.getLayer(l + (a > 0 ? uS : 0), this._needsManuallyCompositing),
  24477. u.__builtin__ || I("ZLevel " + l + " has been used by unkown layer " + u.id),
  24478. u !== o && (u.__used = !0,
  24479. u.__startIndex !== r && (u.__dirty = !0),
  24480. u.__startIndex = r,
  24481. u.incremental ? u.__drawIndex = -1 : u.__drawIndex = r,
  24482. e(r),
  24483. o = u),
  24484. 1 & s.__dirty && !s.__inHover && (u.__dirty = !0,
  24485. u.incremental && u.__drawIndex < 0 && (u.__drawIndex = r))
  24486. }
  24487. e(r),
  24488. this.eachBuiltinLayer((function(t, e) {
  24489. !t.__used && t.getElementCount() > 0 && (t.__dirty = !0,
  24490. t.__startIndex = t.__endIndex = t.__drawIndex = 0),
  24491. t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex)
  24492. }
  24493. ))
  24494. }
  24495. ,
  24496. t.prototype.clear = function() {
  24497. return this.eachBuiltinLayer(this._clearLayer),
  24498. this
  24499. }
  24500. ,
  24501. t.prototype._clearLayer = function(t) {
  24502. t.clear()
  24503. }
  24504. ,
  24505. t.prototype.setBackgroundColor = function(t) {
  24506. this._backgroundColor = t,
  24507. E(this._layers, (function(t) {
  24508. t.setUnpainted()
  24509. }
  24510. ))
  24511. }
  24512. ,
  24513. t.prototype.configLayer = function(t, e) {
  24514. if (e) {
  24515. var n = this._layerConfig;
  24516. n[t] ? C(n[t], e, !0) : n[t] = e;
  24517. for (var i = 0; i < this._zlevelList.length; i++) {
  24518. var r = this._zlevelList[i];
  24519. if (r === t || r === t + uS)
  24520. C(this._layers[r], n[t], !0)
  24521. }
  24522. }
  24523. }
  24524. ,
  24525. t.prototype.delLayer = function(t) {
  24526. var e = this._layers
  24527. , n = this._zlevelList
  24528. , i = e[t];
  24529. i && (i.dom.parentNode.removeChild(i.dom),
  24530. delete e[t],
  24531. n.splice(P(n, t), 1))
  24532. }
  24533. ,
  24534. t.prototype.resize = function(t, e) {
  24535. if (this._domRoot.style) {
  24536. var n = this._domRoot;
  24537. n.style.display = "none";
  24538. var i = this._opts
  24539. , r = this.root;
  24540. if (null != t && (i.width = t),
  24541. null != e && (i.height = e),
  24542. t = $y(r, 0, i),
  24543. e = $y(r, 1, i),
  24544. n.style.display = "",
  24545. this._width !== t || e !== this._height) {
  24546. for (var o in n.style.width = t + "px",
  24547. n.style.height = e + "px",
  24548. this._layers)
  24549. this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e);
  24550. this.refresh(!0)
  24551. }
  24552. this._width = t,
  24553. this._height = e
  24554. } else {
  24555. if (null == t || null == e)
  24556. return;
  24557. this._width = t,
  24558. this._height = e,
  24559. this.getLayer(lS).resize(t, e)
  24560. }
  24561. return this
  24562. }
  24563. ,
  24564. t.prototype.clearLayer = function(t) {
  24565. var e = this._layers[t];
  24566. e && e.clear()
  24567. }
  24568. ,
  24569. t.prototype.dispose = function() {
  24570. this.root.innerHTML = "",
  24571. this.root = this.storage = this._domRoot = this._layers = null
  24572. }
  24573. ,
  24574. t.prototype.getRenderedCanvas = function(t) {
  24575. if (t = t || {},
  24576. this._singleCanvas && !this._compositeManually)
  24577. return this._layers[314159].dom;
  24578. var e = new aS("image",this,t.pixelRatio || this.dpr);
  24579. e.initContext(),
  24580. e.clear(!1, t.backgroundColor || this._backgroundColor);
  24581. var n = e.ctx;
  24582. if (t.pixelRatio <= this.dpr) {
  24583. this.refresh();
  24584. var i = e.dom.width
  24585. , r = e.dom.height;
  24586. this.eachLayer((function(t) {
  24587. t.__builtin__ ? n.drawImage(t.dom, 0, 0, i, r) : t.renderToCanvas && (n.save(),
  24588. t.renderToCanvas(n),
  24589. n.restore())
  24590. }
  24591. ))
  24592. } else
  24593. for (var o = {
  24594. inHover: !1,
  24595. viewWidth: this._width,
  24596. viewHeight: this._height
  24597. }, a = this.storage.getDisplayList(!0), s = 0, l = a.length; s < l; s++) {
  24598. var u = a[s];
  24599. fv(n, u, o, s === l - 1)
  24600. }
  24601. return e.dom
  24602. }
  24603. ,
  24604. t.prototype.getWidth = function() {
  24605. return this._width
  24606. }
  24607. ,
  24608. t.prototype.getHeight = function() {
  24609. return this._height
  24610. }
  24611. ,
  24612. t
  24613. }();
  24614. var cS = function(t) {
  24615. function e() {
  24616. var n = null !== t && t.apply(this, arguments) || this;
  24617. return n.type = e.type,
  24618. n.hasSymbolVisual = !0,
  24619. n
  24620. }
  24621. return n(e, t),
  24622. e.prototype.getInitialData = function(t) {
  24623. return _x(null, this, {
  24624. useEncodeDefaulter: !0
  24625. })
  24626. }
  24627. ,
  24628. e.prototype.getLegendIcon = function(t) {
  24629. var e = new Br
  24630. , n = Xy("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1);
  24631. e.add(n),
  24632. n.setStyle(t.lineStyle);
  24633. var i = this.getData().getVisual("symbol")
  24634. , r = this.getData().getVisual("symbolRotate")
  24635. , o = "none" === i ? "circle" : i
  24636. , a = .8 * t.itemHeight
  24637. , s = Xy(o, (t.itemWidth - a) / 2, (t.itemHeight - a) / 2, a, a, t.itemStyle.fill);
  24638. e.add(s),
  24639. s.setStyle(t.itemStyle);
  24640. var l = "inherit" === t.iconRotate ? r : t.iconRotate || 0;
  24641. return s.rotation = l * Math.PI / 180,
  24642. s.setOrigin([t.itemWidth / 2, t.itemHeight / 2]),
  24643. o.indexOf("empty") > -1 && (s.style.stroke = s.style.fill,
  24644. s.style.fill = "#fff",
  24645. s.style.lineWidth = 2),
  24646. e
  24647. }
  24648. ,
  24649. e.type = "series.line",
  24650. e.dependencies = ["grid", "polar"],
  24651. e.defaultOption = {
  24652. z: 3,
  24653. coordinateSystem: "cartesian2d",
  24654. legendHoverLink: !0,
  24655. clip: !0,
  24656. label: {
  24657. position: "top"
  24658. },
  24659. endLabel: {
  24660. show: !1,
  24661. valueAnimation: !0,
  24662. distance: 8
  24663. },
  24664. lineStyle: {
  24665. width: 2,
  24666. type: "solid"
  24667. },
  24668. emphasis: {
  24669. scale: !0
  24670. },
  24671. step: !1,
  24672. smooth: !1,
  24673. smoothMonotone: null,
  24674. symbol: "emptyCircle",
  24675. symbolSize: 4,
  24676. symbolRotate: null,
  24677. showSymbol: !0,
  24678. showAllSymbol: "auto",
  24679. connectNulls: !1,
  24680. sampling: "none",
  24681. animationEasing: "linear",
  24682. progressive: 0,
  24683. hoverLayerThreshold: 1 / 0,
  24684. universalTransition: {
  24685. divideShape: "clone"
  24686. },
  24687. triggerLineEvent: !1
  24688. },
  24689. e
  24690. }(bg);
  24691. function pS(t, e) {
  24692. var n = t.mapDimensionsAll("defaultedLabel")
  24693. , i = n.length;
  24694. if (1 === i) {
  24695. var r = mf(t, e, n[0]);
  24696. return null != r ? r + "" : null
  24697. }
  24698. if (i) {
  24699. for (var o = [], a = 0; a < n.length; a++)
  24700. o.push(mf(t, e, n[a]));
  24701. return o.join(" ")
  24702. }
  24703. }
  24704. function dS(t, e) {
  24705. var n = t.mapDimensionsAll("defaultedLabel");
  24706. if (!Y(e))
  24707. return e + "";
  24708. for (var i = [], r = 0; r < n.length; r++) {
  24709. var o = t.getDimensionIndex(n[r]);
  24710. o >= 0 && i.push(e[o])
  24711. }
  24712. return i.join(" ")
  24713. }
  24714. var fS = function(t) {
  24715. function e(e, n, i, r) {
  24716. var o = t.call(this) || this;
  24717. return o.updateData(e, n, i, r),
  24718. o
  24719. }
  24720. return n(e, t),
  24721. e.prototype._createSymbol = function(t, e, n, i, r) {
  24722. this.removeAll();
  24723. var o = Xy(t, -1, -1, 2, 2, null, r);
  24724. o.attr({
  24725. z2: 100,
  24726. culling: !0,
  24727. scaleX: i[0] / 2,
  24728. scaleY: i[1] / 2
  24729. }),
  24730. o.drift = gS,
  24731. this._symbolType = t,
  24732. this.add(o)
  24733. }
  24734. ,
  24735. e.prototype.stopSymbolAnimation = function(t) {
  24736. this.childAt(0).stopAnimation(null, t)
  24737. }
  24738. ,
  24739. e.prototype.getSymbolType = function() {
  24740. return this._symbolType
  24741. }
  24742. ,
  24743. e.prototype.getSymbolPath = function() {
  24744. return this.childAt(0)
  24745. }
  24746. ,
  24747. e.prototype.highlight = function() {
  24748. Ol(this.childAt(0))
  24749. }
  24750. ,
  24751. e.prototype.downplay = function() {
  24752. Rl(this.childAt(0))
  24753. }
  24754. ,
  24755. e.prototype.setZ = function(t, e) {
  24756. var n = this.childAt(0);
  24757. n.zlevel = t,
  24758. n.z = e
  24759. }
  24760. ,
  24761. e.prototype.setDraggable = function(t, e) {
  24762. var n = this.childAt(0);
  24763. n.draggable = t,
  24764. n.cursor = !e && t ? "move" : n.cursor
  24765. }
  24766. ,
  24767. e.prototype.updateData = function(t, n, i, r) {
  24768. this.silent = !1;
  24769. var o = t.getItemVisual(n, "symbol") || "circle"
  24770. , a = t.hostModel
  24771. , s = e.getSymbolSize(t, n)
  24772. , l = o !== this._symbolType
  24773. , u = r && r.disableAnimation;
  24774. if (l) {
  24775. var h = t.getItemVisual(n, "symbolKeepAspect");
  24776. this._createSymbol(o, t, n, s, h)
  24777. } else {
  24778. (p = this.childAt(0)).silent = !1;
  24779. var c = {
  24780. scaleX: s[0] / 2,
  24781. scaleY: s[1] / 2
  24782. };
  24783. u ? p.attr(c) : vh(p, c, a, n),
  24784. Sh(p)
  24785. }
  24786. if (this._updateCommon(t, n, s, i, r),
  24787. l) {
  24788. var p = this.childAt(0);
  24789. if (!u) {
  24790. c = {
  24791. scaleX: this._sizeX,
  24792. scaleY: this._sizeY,
  24793. style: {
  24794. opacity: p.style.opacity
  24795. }
  24796. };
  24797. p.scaleX = p.scaleY = 0,
  24798. p.style.opacity = 0,
  24799. mh(p, c, a, n)
  24800. }
  24801. }
  24802. u && this.childAt(0).stopAnimation("leave")
  24803. }
  24804. ,
  24805. e.prototype._updateCommon = function(t, e, n, i, r) {
  24806. var o, a, s, l, u, h, c, p, d, f = this.childAt(0), g = t.hostModel;
  24807. if (i && (o = i.emphasisItemStyle,
  24808. a = i.blurItemStyle,
  24809. s = i.selectItemStyle,
  24810. l = i.focus,
  24811. u = i.blurScope,
  24812. c = i.labelStatesModels,
  24813. p = i.hoverScale,
  24814. d = i.cursorStyle,
  24815. h = i.emphasisDisabled),
  24816. !i || t.hasItemOption) {
  24817. var y = i && i.itemModel ? i.itemModel : t.getItemModel(e)
  24818. , v = y.getModel("emphasis");
  24819. o = v.getModel("itemStyle").getItemStyle(),
  24820. s = y.getModel(["select", "itemStyle"]).getItemStyle(),
  24821. a = y.getModel(["blur", "itemStyle"]).getItemStyle(),
  24822. l = v.get("focus"),
  24823. u = v.get("blurScope"),
  24824. h = v.get("disabled"),
  24825. c = rc(y),
  24826. p = v.getShallow("scale"),
  24827. d = y.getShallow("cursor")
  24828. }
  24829. var m = t.getItemVisual(e, "symbolRotate");
  24830. f.attr("rotation", (m || 0) * Math.PI / 180 || 0);
  24831. var x = Zy(t.getItemVisual(e, "symbolOffset"), n);
  24832. x && (f.x = x[0],
  24833. f.y = x[1]),
  24834. d && f.attr("cursor", d);
  24835. var _ = t.getItemVisual(e, "style")
  24836. , b = _.fill;
  24837. if (f instanceof Ns) {
  24838. var w = f.style;
  24839. f.useStyle(A({
  24840. image: w.image,
  24841. x: w.x,
  24842. y: w.y,
  24843. width: w.width,
  24844. height: w.height
  24845. }, _))
  24846. } else
  24847. f.__isEmptyBrush ? f.useStyle(A({}, _)) : f.useStyle(_),
  24848. f.style.decal = null,
  24849. f.setColor(b, r && r.symbolInnerColor),
  24850. f.style.strokeNoScale = !0;
  24851. var S = t.getItemVisual(e, "liftZ")
  24852. , M = this._z2;
  24853. null != S ? null == M && (this._z2 = f.z2,
  24854. f.z2 += S) : null != M && (f.z2 = M,
  24855. this._z2 = null);
  24856. var I = r && r.useNameLabel;
  24857. ic(f, c, {
  24858. labelFetcher: g,
  24859. labelDataIndex: e,
  24860. defaultText: function(e) {
  24861. return I ? t.getName(e) : pS(t, e)
  24862. },
  24863. inheritColor: b,
  24864. defaultOpacity: _.opacity
  24865. }),
  24866. this._sizeX = n[0] / 2,
  24867. this._sizeY = n[1] / 2;
  24868. var T = f.ensureState("emphasis");
  24869. T.style = o,
  24870. f.ensureState("select").style = s,
  24871. f.ensureState("blur").style = a;
  24872. var C = null == p || !0 === p ? Math.max(1.1, 3 / this._sizeY) : isFinite(p) && p > 0 ? +p : 1;
  24873. T.scaleX = this._sizeX * C,
  24874. T.scaleY = this._sizeY * C,
  24875. this.setSymbolScale(1),
  24876. Zl(this, l, u, h)
  24877. }
  24878. ,
  24879. e.prototype.setSymbolScale = function(t) {
  24880. this.scaleX = this.scaleY = t
  24881. }
  24882. ,
  24883. e.prototype.fadeOut = function(t, e, n) {
  24884. var i = this.childAt(0)
  24885. , r = rl(this).dataIndex
  24886. , o = n && n.animation;
  24887. if (this.silent = i.silent = !0,
  24888. n && n.fadeLabel) {
  24889. var a = i.getTextContent();
  24890. a && _h(a, {
  24891. style: {
  24892. opacity: 0
  24893. }
  24894. }, e, {
  24895. dataIndex: r,
  24896. removeOpt: o,
  24897. cb: function() {
  24898. i.removeTextContent()
  24899. }
  24900. })
  24901. } else
  24902. i.removeTextContent();
  24903. _h(i, {
  24904. style: {
  24905. opacity: 0
  24906. },
  24907. scaleX: 0,
  24908. scaleY: 0
  24909. }, e, {
  24910. dataIndex: r,
  24911. cb: t,
  24912. removeOpt: o
  24913. })
  24914. }
  24915. ,
  24916. e.getSymbolSize = function(t, e) {
  24917. return Uy(t.getItemVisual(e, "symbolSize"))
  24918. }
  24919. ,
  24920. e
  24921. }(Br);
  24922. function gS(t, e) {
  24923. this.parent.drift(t, e)
  24924. }
  24925. function yS(t, e, n, i) {
  24926. 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")
  24927. }
  24928. function vS(t) {
  24929. return null == t || q(t) || (t = {
  24930. isIgnore: t
  24931. }),
  24932. t || {}
  24933. }
  24934. function mS(t) {
  24935. var e = t.hostModel
  24936. , n = e.getModel("emphasis");
  24937. return {
  24938. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  24939. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  24940. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  24941. focus: n.get("focus"),
  24942. blurScope: n.get("blurScope"),
  24943. emphasisDisabled: n.get("disabled"),
  24944. hoverScale: n.get("scale"),
  24945. labelStatesModels: rc(e),
  24946. cursorStyle: e.get("cursor")
  24947. }
  24948. }
  24949. var xS = function() {
  24950. function t(t) {
  24951. this.group = new Br,
  24952. this._SymbolCtor = t || fS
  24953. }
  24954. return t.prototype.updateData = function(t, e) {
  24955. this._progressiveEls = null,
  24956. e = vS(e);
  24957. var n = this.group
  24958. , i = t.hostModel
  24959. , r = this._data
  24960. , o = this._SymbolCtor
  24961. , a = e.disableAnimation
  24962. , s = mS(t)
  24963. , l = {
  24964. disableAnimation: a
  24965. }
  24966. , u = e.getSymbolPoint || function(e) {
  24967. return t.getItemLayout(e)
  24968. }
  24969. ;
  24970. r || n.removeAll(),
  24971. t.diff(r).add((function(i) {
  24972. var r = u(i);
  24973. if (yS(t, r, i, e)) {
  24974. var a = new o(t,i,s,l);
  24975. a.setPosition(r),
  24976. t.setItemGraphicEl(i, a),
  24977. n.add(a)
  24978. }
  24979. }
  24980. )).update((function(h, c) {
  24981. var p = r.getItemGraphicEl(c)
  24982. , d = u(h);
  24983. if (yS(t, d, h, e)) {
  24984. var f = t.getItemVisual(h, "symbol") || "circle"
  24985. , g = p && p.getSymbolType && p.getSymbolType();
  24986. if (!p || g && g !== f)
  24987. n.remove(p),
  24988. (p = new o(t,h,s,l)).setPosition(d);
  24989. else {
  24990. p.updateData(t, h, s, l);
  24991. var y = {
  24992. x: d[0],
  24993. y: d[1]
  24994. };
  24995. a ? p.attr(y) : vh(p, y, i)
  24996. }
  24997. n.add(p),
  24998. t.setItemGraphicEl(h, p)
  24999. } else
  25000. n.remove(p)
  25001. }
  25002. )).remove((function(t) {
  25003. var e = r.getItemGraphicEl(t);
  25004. e && e.fadeOut((function() {
  25005. n.remove(e)
  25006. }
  25007. ), i)
  25008. }
  25009. )).execute(),
  25010. this._getSymbolPoint = u,
  25011. this._data = t
  25012. }
  25013. ,
  25014. t.prototype.updateLayout = function() {
  25015. var t = this
  25016. , e = this._data;
  25017. e && e.eachItemGraphicEl((function(e, n) {
  25018. var i = t._getSymbolPoint(n);
  25019. e.setPosition(i),
  25020. e.markRedraw()
  25021. }
  25022. ))
  25023. }
  25024. ,
  25025. t.prototype.incrementalPrepareUpdate = function(t) {
  25026. this._seriesScope = mS(t),
  25027. this._data = null,
  25028. this.group.removeAll()
  25029. }
  25030. ,
  25031. t.prototype.incrementalUpdate = function(t, e, n) {
  25032. function i(t) {
  25033. t.isGroup || (t.incremental = !0,
  25034. t.ensureState("emphasis").hoverLayer = !0)
  25035. }
  25036. this._progressiveEls = [],
  25037. n = vS(n);
  25038. for (var r = t.start; r < t.end; r++) {
  25039. var o = e.getItemLayout(r);
  25040. if (yS(e, o, r, n)) {
  25041. var a = new this._SymbolCtor(e,r,this._seriesScope);
  25042. a.traverse(i),
  25043. a.setPosition(o),
  25044. this.group.add(a),
  25045. e.setItemGraphicEl(r, a),
  25046. this._progressiveEls.push(a)
  25047. }
  25048. }
  25049. }
  25050. ,
  25051. t.prototype.eachRendered = function(t) {
  25052. Jh(this._progressiveEls || this.group, t)
  25053. }
  25054. ,
  25055. t.prototype.remove = function(t) {
  25056. var e = this.group
  25057. , n = this._data;
  25058. n && t ? n.eachItemGraphicEl((function(t) {
  25059. t.fadeOut((function() {
  25060. e.remove(t)
  25061. }
  25062. ), n.hostModel)
  25063. }
  25064. )) : e.removeAll()
  25065. }
  25066. ,
  25067. t
  25068. }();
  25069. function _S(t, e, n) {
  25070. var i = t.getBaseAxis()
  25071. , r = t.getOtherAxis(i)
  25072. , o = function(t, e) {
  25073. var n = 0
  25074. , i = t.scale.getExtent();
  25075. "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]);
  25076. return n
  25077. }(r, n)
  25078. , a = i.dim
  25079. , s = r.dim
  25080. , l = e.mapDimension(s)
  25081. , u = e.mapDimension(a)
  25082. , h = "x" === s || "radius" === s ? 1 : 0
  25083. , c = z(t.dimensions, (function(t) {
  25084. return e.mapDimension(t)
  25085. }
  25086. ))
  25087. , p = !1
  25088. , d = e.getCalculationInfo("stackResultDimension");
  25089. return mx(e, c[0]) && (p = !0,
  25090. c[0] = d),
  25091. mx(e, c[1]) && (p = !0,
  25092. c[1] = d),
  25093. {
  25094. dataDimsForPoint: c,
  25095. valueStart: o,
  25096. valueAxisDim: s,
  25097. baseAxisDim: a,
  25098. stacked: !!p,
  25099. valueDim: l,
  25100. baseDim: u,
  25101. baseDataOffset: h,
  25102. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  25103. }
  25104. }
  25105. function bS(t, e, n, i) {
  25106. var r = NaN;
  25107. t.stacked && (r = n.get(n.getCalculationInfo("stackedOverDimension"), i)),
  25108. isNaN(r) && (r = t.valueStart);
  25109. var o = t.baseDataOffset
  25110. , a = [];
  25111. return a[o] = n.get(t.baseDim, i),
  25112. a[1 - o] = r,
  25113. e.dataToPoint(a)
  25114. }
  25115. var wS = Math.min
  25116. , SS = Math.max;
  25117. function MS(t, e) {
  25118. return isNaN(t) || isNaN(e)
  25119. }
  25120. function IS(t, e, n, i, r, o, a, s, l) {
  25121. for (var u, h, c, p, d, f, g = n, y = 0; y < i; y++) {
  25122. var v = e[2 * g]
  25123. , m = e[2 * g + 1];
  25124. if (g >= r || g < 0)
  25125. break;
  25126. if (MS(v, m)) {
  25127. if (l) {
  25128. g += o;
  25129. continue
  25130. }
  25131. break
  25132. }
  25133. if (g === n)
  25134. t[o > 0 ? "moveTo" : "lineTo"](v, m),
  25135. c = v,
  25136. p = m;
  25137. else {
  25138. var x = v - u
  25139. , _ = m - h;
  25140. if (x * x + _ * _ < .5) {
  25141. g += o;
  25142. continue
  25143. }
  25144. if (a > 0) {
  25145. for (var b = g + o, w = e[2 * b], S = e[2 * b + 1]; w === v && S === m && y < i; )
  25146. y++,
  25147. g += o,
  25148. w = e[2 * (b += o)],
  25149. S = e[2 * b + 1],
  25150. x = (v = e[2 * g]) - u,
  25151. _ = (m = e[2 * g + 1]) - h;
  25152. var M = y + 1;
  25153. if (l)
  25154. for (; MS(w, S) && M < i; )
  25155. M++,
  25156. w = e[2 * (b += o)],
  25157. S = e[2 * b + 1];
  25158. var I = .5
  25159. , T = 0
  25160. , C = 0
  25161. , D = void 0
  25162. , A = void 0;
  25163. if (M >= i || MS(w, S))
  25164. d = v,
  25165. f = m;
  25166. else {
  25167. T = w - u,
  25168. C = S - h;
  25169. var k = v - u
  25170. , L = w - v
  25171. , P = m - h
  25172. , O = S - m
  25173. , R = void 0
  25174. , N = void 0;
  25175. if ("x" === s) {
  25176. var E = T > 0 ? 1 : -1;
  25177. d = v - E * (R = Math.abs(k)) * a,
  25178. f = m,
  25179. D = v + E * (N = Math.abs(L)) * a,
  25180. A = m
  25181. } else if ("y" === s) {
  25182. var z = C > 0 ? 1 : -1;
  25183. d = v,
  25184. f = m - z * (R = Math.abs(P)) * a,
  25185. D = v,
  25186. A = m + z * (N = Math.abs(O)) * a
  25187. } else
  25188. R = Math.sqrt(k * k + P * P),
  25189. d = v - T * a * (1 - (I = (N = Math.sqrt(L * L + O * O)) / (N + R))),
  25190. f = m - C * a * (1 - I),
  25191. A = m + C * a * I,
  25192. D = wS(D = v + T * a * I, SS(w, v)),
  25193. A = wS(A, SS(S, m)),
  25194. D = SS(D, wS(w, v)),
  25195. f = m - (C = (A = SS(A, wS(S, m))) - m) * R / N,
  25196. d = wS(d = v - (T = D - v) * R / N, SS(u, v)),
  25197. f = wS(f, SS(h, m)),
  25198. D = v + (T = v - (d = SS(d, wS(u, v)))) * N / R,
  25199. A = m + (C = m - (f = SS(f, wS(h, m)))) * N / R
  25200. }
  25201. t.bezierCurveTo(c, p, d, f, v, m),
  25202. c = D,
  25203. p = A
  25204. } else
  25205. t.lineTo(v, m)
  25206. }
  25207. u = v,
  25208. h = m,
  25209. g += o
  25210. }
  25211. return y
  25212. }
  25213. var TS = function() {
  25214. this.smooth = 0,
  25215. this.smoothConstraint = !0
  25216. }
  25217. , CS = function(t) {
  25218. function e(e) {
  25219. var n = t.call(this, e) || this;
  25220. return n.type = "ec-polyline",
  25221. n
  25222. }
  25223. return n(e, t),
  25224. e.prototype.getDefaultStyle = function() {
  25225. return {
  25226. stroke: "#000",
  25227. fill: null
  25228. }
  25229. }
  25230. ,
  25231. e.prototype.getDefaultShape = function() {
  25232. return new TS
  25233. }
  25234. ,
  25235. e.prototype.buildPath = function(t, e) {
  25236. var n = e.points
  25237. , i = 0
  25238. , r = n.length / 2;
  25239. if (e.connectNulls) {
  25240. for (; r > 0 && MS(n[2 * r - 2], n[2 * r - 1]); r--)
  25241. ;
  25242. for (; i < r && MS(n[2 * i], n[2 * i + 1]); i++)
  25243. ;
  25244. }
  25245. for (; i < r; )
  25246. i += IS(t, n, i, r, r, 1, e.smooth, e.smoothMonotone, e.connectNulls) + 1
  25247. }
  25248. ,
  25249. e.prototype.getPointOn = function(t, e) {
  25250. this.path || (this.createPathProxy(),
  25251. this.buildPath(this.path, this.shape));
  25252. for (var n, i, r = this.path.data, o = hs.CMD, a = "x" === e, s = [], l = 0; l < r.length; ) {
  25253. var u = void 0
  25254. , h = void 0
  25255. , c = void 0
  25256. , p = void 0
  25257. , d = void 0
  25258. , f = void 0
  25259. , g = void 0;
  25260. switch (r[l++]) {
  25261. case o.M:
  25262. n = r[l++],
  25263. i = r[l++];
  25264. break;
  25265. case o.L:
  25266. if (u = r[l++],
  25267. h = r[l++],
  25268. (g = a ? (t - n) / (u - n) : (t - i) / (h - i)) <= 1 && g >= 0) {
  25269. var y = a ? (h - i) * g + i : (u - n) * g + n;
  25270. return a ? [t, y] : [y, t]
  25271. }
  25272. n = u,
  25273. i = h;
  25274. break;
  25275. case o.C:
  25276. u = r[l++],
  25277. h = r[l++],
  25278. c = r[l++],
  25279. p = r[l++],
  25280. d = r[l++],
  25281. f = r[l++];
  25282. var v = a ? _n(n, u, c, d, t, s) : _n(i, h, p, f, t, s);
  25283. if (v > 0)
  25284. for (var m = 0; m < v; m++) {
  25285. var x = s[m];
  25286. if (x <= 1 && x >= 0) {
  25287. y = a ? mn(i, h, p, f, x) : mn(n, u, c, d, x);
  25288. return a ? [t, y] : [y, t]
  25289. }
  25290. }
  25291. n = d,
  25292. i = f
  25293. }
  25294. }
  25295. }
  25296. ,
  25297. e
  25298. }(ks)
  25299. , DS = function(t) {
  25300. function e() {
  25301. return null !== t && t.apply(this, arguments) || this
  25302. }
  25303. return n(e, t),
  25304. e
  25305. }(TS)
  25306. , AS = function(t) {
  25307. function e(e) {
  25308. var n = t.call(this, e) || this;
  25309. return n.type = "ec-polygon",
  25310. n
  25311. }
  25312. return n(e, t),
  25313. e.prototype.getDefaultShape = function() {
  25314. return new DS
  25315. }
  25316. ,
  25317. e.prototype.buildPath = function(t, e) {
  25318. var n = e.points
  25319. , i = e.stackedOnPoints
  25320. , r = 0
  25321. , o = n.length / 2
  25322. , a = e.smoothMonotone;
  25323. if (e.connectNulls) {
  25324. for (; o > 0 && MS(n[2 * o - 2], n[2 * o - 1]); o--)
  25325. ;
  25326. for (; r < o && MS(n[2 * r], n[2 * r + 1]); r++)
  25327. ;
  25328. }
  25329. for (; r < o; ) {
  25330. var s = IS(t, n, r, o, o, 1, e.smooth, a, e.connectNulls);
  25331. IS(t, i, r + s - 1, s, o, -1, e.stackedOnSmooth, a, e.connectNulls),
  25332. r += s + 1,
  25333. t.closePath()
  25334. }
  25335. }
  25336. ,
  25337. e
  25338. }(ks);
  25339. function kS(t, e, n, i, r) {
  25340. var o = t.getArea()
  25341. , a = o.x
  25342. , s = o.y
  25343. , l = o.width
  25344. , u = o.height
  25345. , h = n.get(["lineStyle", "width"]) || 0;
  25346. a -= h / 2,
  25347. s -= h / 2,
  25348. l += h,
  25349. u += h,
  25350. l = Math.ceil(l),
  25351. a !== Math.floor(a) && (a = Math.floor(a),
  25352. l++);
  25353. var c = new Ws({
  25354. shape: {
  25355. x: a,
  25356. y: s,
  25357. width: l,
  25358. height: u
  25359. }
  25360. });
  25361. if (e) {
  25362. var p = t.getBaseAxis()
  25363. , d = p.isHorizontal()
  25364. , f = p.inverse;
  25365. d ? (f && (c.shape.x += l),
  25366. c.shape.width = 0) : (f || (c.shape.y += u),
  25367. c.shape.height = 0);
  25368. var g = X(r) ? function(t) {
  25369. r(t, c)
  25370. }
  25371. : null;
  25372. mh(c, {
  25373. shape: {
  25374. width: l,
  25375. height: u,
  25376. x: a,
  25377. y: s
  25378. }
  25379. }, n, null, i, g)
  25380. }
  25381. return c
  25382. }
  25383. function LS(t, e, n) {
  25384. var i = t.getArea()
  25385. , r = Jr(i.r0, 1)
  25386. , o = Jr(i.r, 1)
  25387. , a = new Fu({
  25388. shape: {
  25389. cx: Jr(t.cx, 1),
  25390. cy: Jr(t.cy, 1),
  25391. r0: r,
  25392. r: o,
  25393. startAngle: i.startAngle,
  25394. endAngle: i.endAngle,
  25395. clockwise: i.clockwise
  25396. }
  25397. });
  25398. e && ("angle" === t.getBaseAxis().dim ? a.shape.endAngle = i.startAngle : a.shape.r = r,
  25399. mh(a, {
  25400. shape: {
  25401. endAngle: i.endAngle,
  25402. r: o
  25403. }
  25404. }, n));
  25405. return a
  25406. }
  25407. function PS(t, e, n, i, r) {
  25408. return t ? "polar" === t.type ? LS(t, e, n) : "cartesian2d" === t.type ? kS(t, e, n, i, r) : null : null
  25409. }
  25410. function OS(t, e) {
  25411. return t.type === e
  25412. }
  25413. function RS(t, e) {
  25414. if (t.length === e.length) {
  25415. for (var n = 0; n < t.length; n++)
  25416. if (t[n] !== e[n])
  25417. return;
  25418. return !0
  25419. }
  25420. }
  25421. function NS(t) {
  25422. for (var e = 1 / 0, n = 1 / 0, i = -1 / 0, r = -1 / 0, o = 0; o < t.length; ) {
  25423. var a = t[o++]
  25424. , s = t[o++];
  25425. isNaN(a) || (e = Math.min(a, e),
  25426. i = Math.max(a, i)),
  25427. isNaN(s) || (n = Math.min(s, n),
  25428. r = Math.max(s, r))
  25429. }
  25430. return [[e, n], [i, r]]
  25431. }
  25432. function ES(t, e) {
  25433. var n = NS(t)
  25434. , i = n[0]
  25435. , r = n[1]
  25436. , o = NS(e)
  25437. , a = o[0]
  25438. , s = o[1];
  25439. 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]))
  25440. }
  25441. function zS(t) {
  25442. return j(t) ? t : t ? .5 : 0
  25443. }
  25444. function VS(t, e, n, i, r) {
  25445. var o = n.getBaseAxis()
  25446. , a = "x" === o.dim || "radius" === o.dim ? 0 : 1
  25447. , s = []
  25448. , l = 0
  25449. , u = []
  25450. , h = []
  25451. , c = []
  25452. , p = [];
  25453. if (r) {
  25454. for (l = 0; l < t.length; l += 2) {
  25455. var d = e || t;
  25456. isNaN(d[l]) || isNaN(d[l + 1]) || p.push(t[l], t[l + 1])
  25457. }
  25458. t = p
  25459. }
  25460. for (l = 0; l < t.length - 2; l += 2)
  25461. switch (c[0] = t[l + 2],
  25462. c[1] = t[l + 3],
  25463. h[0] = t[l],
  25464. h[1] = t[l + 1],
  25465. s.push(h[0], h[1]),
  25466. i) {
  25467. case "end":
  25468. u[a] = c[a],
  25469. u[1 - a] = h[1 - a],
  25470. s.push(u[0], u[1]);
  25471. break;
  25472. case "middle":
  25473. var f = (h[a] + c[a]) / 2
  25474. , g = [];
  25475. u[a] = g[a] = f,
  25476. u[1 - a] = h[1 - a],
  25477. g[1 - a] = c[1 - a],
  25478. s.push(u[0], u[1]),
  25479. s.push(g[0], g[1]);
  25480. break;
  25481. default:
  25482. u[a] = h[a],
  25483. u[1 - a] = c[1 - a],
  25484. s.push(u[0], u[1])
  25485. }
  25486. return s.push(t[l++], t[l++]),
  25487. s
  25488. }
  25489. function BS(t, e, n) {
  25490. var i = t.getVisual("visualMeta");
  25491. if (i && i.length && t.count() && "cartesian2d" === e.type) {
  25492. for (var r, o, a = i.length - 1; a >= 0; a--) {
  25493. var s = t.getDimensionInfo(i[a].dimension);
  25494. if ("x" === (r = s && s.coordDim) || "y" === r) {
  25495. o = i[a];
  25496. break
  25497. }
  25498. }
  25499. if (o) {
  25500. var l = e.getAxis(r)
  25501. , u = z(o.stops, (function(t) {
  25502. return {
  25503. coord: l.toGlobalCoord(l.dataToCoord(t.value)),
  25504. color: t.color
  25505. }
  25506. }
  25507. ))
  25508. , h = u.length
  25509. , c = o.outerColors.slice();
  25510. h && u[0].coord > u[h - 1].coord && (u.reverse(),
  25511. c.reverse());
  25512. var p = function(t, e) {
  25513. var n, i, r = [], o = t.length;
  25514. function a(t, e, n) {
  25515. var i = t.coord;
  25516. return {
  25517. coord: n,
  25518. color: ti((n - i) / (e.coord - i), [t.color, e.color])
  25519. }
  25520. }
  25521. for (var s = 0; s < o; s++) {
  25522. var l = t[s]
  25523. , u = l.coord;
  25524. if (u < 0)
  25525. n = l;
  25526. else {
  25527. if (u > e) {
  25528. i ? r.push(a(i, l, e)) : n && r.push(a(n, l, 0), a(n, l, e));
  25529. break
  25530. }
  25531. n && (r.push(a(n, l, 0)),
  25532. n = null),
  25533. r.push(l),
  25534. i = l
  25535. }
  25536. }
  25537. return r
  25538. }(u, "x" === r ? n.getWidth() : n.getHeight())
  25539. , d = p.length;
  25540. if (!d && h)
  25541. return u[0].coord < 0 ? c[1] ? c[1] : u[h - 1].color : c[0] ? c[0] : u[0].color;
  25542. var f = p[0].coord - 10
  25543. , g = p[d - 1].coord + 10
  25544. , y = g - f;
  25545. if (y < .001)
  25546. return "transparent";
  25547. E(p, (function(t) {
  25548. t.offset = (t.coord - f) / y
  25549. }
  25550. )),
  25551. p.push({
  25552. offset: d ? p[d - 1].offset : .5,
  25553. color: c[1] || "transparent"
  25554. }),
  25555. p.unshift({
  25556. offset: d ? p[0].offset : .5,
  25557. color: c[0] || "transparent"
  25558. });
  25559. var v = new oh(0,0,0,0,p,!0);
  25560. return v[r] = f,
  25561. v[r + "2"] = g,
  25562. v
  25563. }
  25564. }
  25565. }
  25566. function FS(t, e, n) {
  25567. var i = t.get("showAllSymbol")
  25568. , r = "auto" === i;
  25569. if (!i || r) {
  25570. var o = n.getAxesByScale("ordinal")[0];
  25571. if (o && (!r || !function(t, e) {
  25572. var n = t.getExtent()
  25573. , i = Math.abs(n[1] - n[0]) / t.scale.count();
  25574. isNaN(i) && (i = 0);
  25575. for (var r = e.count(), o = Math.max(1, Math.round(r / 5)), a = 0; a < r; a += o)
  25576. if (1.5 * fS.getSymbolSize(e, a)[t.isHorizontal() ? 1 : 0] > i)
  25577. return !1;
  25578. return !0
  25579. }(o, e))) {
  25580. var a = e.mapDimension(o.dim)
  25581. , s = {};
  25582. return E(o.getViewLabels(), (function(t) {
  25583. var e = o.scale.getRawOrdinalNumber(t.tickValue);
  25584. s[e] = 1
  25585. }
  25586. )),
  25587. function(t) {
  25588. return !s.hasOwnProperty(e.get(a, t))
  25589. }
  25590. }
  25591. }
  25592. }
  25593. function GS(t, e) {
  25594. return [t[2 * e], t[2 * e + 1]]
  25595. }
  25596. function WS(t) {
  25597. if (t.get(["endLabel", "show"]))
  25598. return !0;
  25599. for (var e = 0; e < hl.length; e++)
  25600. if (t.get([hl[e], "endLabel", "show"]))
  25601. return !0;
  25602. return !1
  25603. }
  25604. function HS(t, e, n, i) {
  25605. if (OS(e, "cartesian2d")) {
  25606. var r = i.getModel("endLabel")
  25607. , o = r.get("valueAnimation")
  25608. , a = i.getData()
  25609. , s = {
  25610. lastFrameIndex: 0
  25611. }
  25612. , l = WS(i) ? function(n, i) {
  25613. t._endLabelOnDuring(n, i, a, s, o, r, e)
  25614. }
  25615. : null
  25616. , u = e.getBaseAxis().isHorizontal()
  25617. , h = kS(e, n, i, (function() {
  25618. var e = t._endLabel;
  25619. e && n && null != s.originalX && e.attr({
  25620. x: s.originalX,
  25621. y: s.originalY
  25622. })
  25623. }
  25624. ), l);
  25625. if (!i.get("clip", !0)) {
  25626. var c = h.shape
  25627. , p = Math.max(c.width, c.height);
  25628. u ? (c.y -= p,
  25629. c.height += 2 * p) : (c.x -= p,
  25630. c.width += 2 * p)
  25631. }
  25632. return l && l(1, h),
  25633. h
  25634. }
  25635. return LS(e, n, i)
  25636. }
  25637. var YS = function(t) {
  25638. function e() {
  25639. return null !== t && t.apply(this, arguments) || this
  25640. }
  25641. return n(e, t),
  25642. e.prototype.init = function() {
  25643. var t = new Br
  25644. , e = new xS;
  25645. this.group.add(e.group),
  25646. this._symbolDraw = e,
  25647. this._lineGroup = t,
  25648. this._changePolyState = W(this._changePolyState, this)
  25649. }
  25650. ,
  25651. e.prototype.render = function(t, e, n) {
  25652. var i = t.coordinateSystem
  25653. , r = this.group
  25654. , o = t.getData()
  25655. , a = t.getModel("lineStyle")
  25656. , s = t.getModel("areaStyle")
  25657. , l = o.getLayout("points") || []
  25658. , u = "polar" === i.type
  25659. , h = this._coordSys
  25660. , c = this._symbolDraw
  25661. , p = this._polyline
  25662. , d = this._polygon
  25663. , f = this._lineGroup
  25664. , g = !e.ssr && t.get("animation")
  25665. , y = !s.isEmpty()
  25666. , v = s.get("origin")
  25667. , m = _S(i, o, v)
  25668. , x = y && function(t, e, n) {
  25669. if (!n.valueDim)
  25670. return [];
  25671. for (var i = e.count(), r = Bx(2 * i), o = 0; o < i; o++) {
  25672. var a = bS(n, t, e, o);
  25673. r[2 * o] = a[0],
  25674. r[2 * o + 1] = a[1]
  25675. }
  25676. return r
  25677. }(i, o, m)
  25678. , _ = t.get("showSymbol")
  25679. , b = t.get("connectNulls")
  25680. , w = _ && !u && FS(t, o, i)
  25681. , S = this._data;
  25682. S && S.eachItemGraphicEl((function(t, e) {
  25683. t.__temp && (r.remove(t),
  25684. S.setItemGraphicEl(e, null))
  25685. }
  25686. )),
  25687. _ || c.remove(),
  25688. r.add(f);
  25689. var M, I = !u && t.get("step");
  25690. i && i.getArea && t.get("clip", !0) && (null != (M = i.getArea()).width ? (M.x -= .1,
  25691. M.y -= .1,
  25692. M.width += .2,
  25693. M.height += .2) : M.r0 && (M.r0 -= .5,
  25694. M.r += .5)),
  25695. this._clipShapeForSymbol = M;
  25696. var T = BS(o, i, n) || o.getVisual("style")[o.getVisual("drawType")];
  25697. if (p && h.type === i.type && I === this._step) {
  25698. y && !d ? d = this._newPolygon(l, x) : d && !y && (f.remove(d),
  25699. d = this._polygon = null),
  25700. u || this._initOrUpdateEndLabel(t, i, Sp(T));
  25701. var C = f.getClipPath();
  25702. if (C)
  25703. mh(C, {
  25704. shape: HS(this, i, !1, t).shape
  25705. }, t);
  25706. else
  25707. f.setClipPath(HS(this, i, !0, t));
  25708. _ && c.updateData(o, {
  25709. isIgnore: w,
  25710. clipShape: M,
  25711. disableAnimation: !0,
  25712. getSymbolPoint: function(t) {
  25713. return [l[2 * t], l[2 * t + 1]]
  25714. }
  25715. }),
  25716. RS(this._stackedOnPoints, x) && RS(this._points, l) || (g ? this._doUpdateAnimation(o, x, i, n, I, v, b) : (I && (x && (x = VS(x, l, i, I, b)),
  25717. l = VS(l, null, i, I, b)),
  25718. p.setShape({
  25719. points: l
  25720. }),
  25721. d && d.setShape({
  25722. points: l,
  25723. stackedOnPoints: x
  25724. })))
  25725. } else
  25726. _ && c.updateData(o, {
  25727. isIgnore: w,
  25728. clipShape: M,
  25729. disableAnimation: !0,
  25730. getSymbolPoint: function(t) {
  25731. return [l[2 * t], l[2 * t + 1]]
  25732. }
  25733. }),
  25734. g && this._initSymbolLabelAnimation(o, i, M),
  25735. I && (x && (x = VS(x, l, i, I, b)),
  25736. l = VS(l, null, i, I, b)),
  25737. p = this._newPolyline(l),
  25738. y ? d = this._newPolygon(l, x) : d && (f.remove(d),
  25739. d = this._polygon = null),
  25740. u || this._initOrUpdateEndLabel(t, i, Sp(T)),
  25741. f.setClipPath(HS(this, i, !0, t));
  25742. var D = t.getModel("emphasis")
  25743. , A = D.get("focus")
  25744. , L = D.get("blurScope")
  25745. , P = D.get("disabled");
  25746. (p.useStyle(k(a.getLineStyle(), {
  25747. fill: "none",
  25748. stroke: T,
  25749. lineJoin: "bevel"
  25750. })),
  25751. $l(p, t, "lineStyle"),
  25752. p.style.lineWidth > 0 && "bolder" === t.get(["emphasis", "lineStyle", "width"])) && (p.getState("emphasis").style.lineWidth = +p.style.lineWidth + 1);
  25753. rl(p).seriesIndex = t.seriesIndex,
  25754. Zl(p, A, L, P);
  25755. var O = zS(t.get("smooth"))
  25756. , R = t.get("smoothMonotone");
  25757. if (p.setShape({
  25758. smooth: O,
  25759. smoothMonotone: R,
  25760. connectNulls: b
  25761. }),
  25762. d) {
  25763. var N = o.getCalculationInfo("stackedOnSeries")
  25764. , E = 0;
  25765. d.useStyle(k(s.getAreaStyle(), {
  25766. fill: T,
  25767. opacity: .7,
  25768. lineJoin: "bevel",
  25769. decal: o.getVisual("style").decal
  25770. })),
  25771. N && (E = zS(N.get("smooth"))),
  25772. d.setShape({
  25773. smooth: O,
  25774. stackedOnSmooth: E,
  25775. smoothMonotone: R,
  25776. connectNulls: b
  25777. }),
  25778. $l(d, t, "areaStyle"),
  25779. rl(d).seriesIndex = t.seriesIndex,
  25780. Zl(d, A, L, P)
  25781. }
  25782. var z = this._changePolyState;
  25783. o.eachItemGraphicEl((function(t) {
  25784. t && (t.onHoverStateChange = z)
  25785. }
  25786. )),
  25787. this._polyline.onHoverStateChange = z,
  25788. this._data = o,
  25789. this._coordSys = i,
  25790. this._stackedOnPoints = x,
  25791. this._points = l,
  25792. this._step = I,
  25793. this._valueOrigin = v,
  25794. t.get("triggerLineEvent") && (this.packEventData(t, p),
  25795. d && this.packEventData(t, d))
  25796. }
  25797. ,
  25798. e.prototype.packEventData = function(t, e) {
  25799. rl(e).eventData = {
  25800. componentType: "series",
  25801. componentSubType: "line",
  25802. componentIndex: t.componentIndex,
  25803. seriesIndex: t.seriesIndex,
  25804. seriesName: t.name,
  25805. seriesType: "line"
  25806. }
  25807. }
  25808. ,
  25809. e.prototype.highlight = function(t, e, n, i) {
  25810. var r = t.getData()
  25811. , o = zo(r, i);
  25812. if (this._changePolyState("emphasis"),
  25813. !(o instanceof Array) && null != o && o >= 0) {
  25814. var a = r.getLayout("points")
  25815. , s = r.getItemGraphicEl(o);
  25816. if (!s) {
  25817. var l = a[2 * o]
  25818. , u = a[2 * o + 1];
  25819. if (isNaN(l) || isNaN(u))
  25820. return;
  25821. if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(l, u))
  25822. return;
  25823. var h = t.get("zlevel") || 0
  25824. , c = t.get("z") || 0;
  25825. (s = new fS(r,o)).x = l,
  25826. s.y = u,
  25827. s.setZ(h, c);
  25828. var p = s.getSymbolPath().getTextContent();
  25829. p && (p.zlevel = h,
  25830. p.z = c,
  25831. p.z2 = this._polyline.z2 + 1),
  25832. s.__temp = !0,
  25833. r.setItemGraphicEl(o, s),
  25834. s.stopSymbolAnimation(!0),
  25835. this.group.add(s)
  25836. }
  25837. s.highlight()
  25838. } else
  25839. Og.prototype.highlight.call(this, t, e, n, i)
  25840. }
  25841. ,
  25842. e.prototype.downplay = function(t, e, n, i) {
  25843. var r = t.getData()
  25844. , o = zo(r, i);
  25845. if (this._changePolyState("normal"),
  25846. null != o && o >= 0) {
  25847. var a = r.getItemGraphicEl(o);
  25848. a && (a.__temp ? (r.setItemGraphicEl(o, null),
  25849. this.group.remove(a)) : a.downplay())
  25850. } else
  25851. Og.prototype.downplay.call(this, t, e, n, i)
  25852. }
  25853. ,
  25854. e.prototype._changePolyState = function(t) {
  25855. var e = this._polygon;
  25856. Dl(this._polyline, t),
  25857. e && Dl(e, t)
  25858. }
  25859. ,
  25860. e.prototype._newPolyline = function(t) {
  25861. var e = this._polyline;
  25862. return e && this._lineGroup.remove(e),
  25863. e = new CS({
  25864. shape: {
  25865. points: t
  25866. },
  25867. segmentIgnoreThreshold: 2,
  25868. z2: 10
  25869. }),
  25870. this._lineGroup.add(e),
  25871. this._polyline = e,
  25872. e
  25873. }
  25874. ,
  25875. e.prototype._newPolygon = function(t, e) {
  25876. var n = this._polygon;
  25877. return n && this._lineGroup.remove(n),
  25878. n = new AS({
  25879. shape: {
  25880. points: t,
  25881. stackedOnPoints: e
  25882. },
  25883. segmentIgnoreThreshold: 2
  25884. }),
  25885. this._lineGroup.add(n),
  25886. this._polygon = n,
  25887. n
  25888. }
  25889. ,
  25890. e.prototype._initSymbolLabelAnimation = function(t, e, n) {
  25891. var i, r, o = e.getBaseAxis(), a = o.inverse;
  25892. "cartesian2d" === e.type ? (i = o.isHorizontal(),
  25893. r = !1) : "polar" === e.type && (i = "angle" === o.dim,
  25894. r = !0);
  25895. var s = t.hostModel
  25896. , l = s.get("animationDuration");
  25897. X(l) && (l = l(null));
  25898. var u = s.get("animationDelay") || 0
  25899. , h = X(u) ? u(null) : u;
  25900. t.eachItemGraphicEl((function(t, o) {
  25901. var s = t;
  25902. if (s) {
  25903. var c = [t.x, t.y]
  25904. , p = void 0
  25905. , d = void 0
  25906. , f = void 0;
  25907. if (n)
  25908. if (r) {
  25909. var g = n
  25910. , y = e.pointToCoord(c);
  25911. i ? (p = g.startAngle,
  25912. d = g.endAngle,
  25913. f = -y[1] / 180 * Math.PI) : (p = g.r0,
  25914. d = g.r,
  25915. f = y[0])
  25916. } else {
  25917. var v = n;
  25918. i ? (p = v.x,
  25919. d = v.x + v.width,
  25920. f = t.x) : (p = v.y + v.height,
  25921. d = v.y,
  25922. f = t.y)
  25923. }
  25924. var m = d === p ? 0 : (f - p) / (d - p);
  25925. a && (m = 1 - m);
  25926. var x = X(u) ? u(o) : l * m + h
  25927. , _ = s.getSymbolPath()
  25928. , b = _.getTextContent();
  25929. s.attr({
  25930. scaleX: 0,
  25931. scaleY: 0
  25932. }),
  25933. s.animateTo({
  25934. scaleX: 1,
  25935. scaleY: 1
  25936. }, {
  25937. duration: 200,
  25938. setToFinal: !0,
  25939. delay: x
  25940. }),
  25941. b && b.animateFrom({
  25942. style: {
  25943. opacity: 0
  25944. }
  25945. }, {
  25946. duration: 300,
  25947. delay: x
  25948. }),
  25949. _.disableLabelAnimation = !0
  25950. }
  25951. }
  25952. ))
  25953. }
  25954. ,
  25955. e.prototype._initOrUpdateEndLabel = function(t, e, n) {
  25956. var i = t.getModel("endLabel");
  25957. if (WS(t)) {
  25958. var r = t.getData()
  25959. , o = this._polyline
  25960. , a = r.getLayout("points");
  25961. if (!a)
  25962. return o.removeTextContent(),
  25963. void (this._endLabel = null);
  25964. var s = this._endLabel;
  25965. s || ((s = this._endLabel = new Xs({
  25966. z2: 200
  25967. })).ignoreClip = !0,
  25968. o.setTextContent(this._endLabel),
  25969. o.disableLabelAnimation = !0);
  25970. var l = function(t) {
  25971. for (var e, n, i = t.length / 2; i > 0 && (e = t[2 * i - 2],
  25972. n = t[2 * i - 1],
  25973. isNaN(e) || isNaN(n)); i--)
  25974. ;
  25975. return i - 1
  25976. }(a);
  25977. l >= 0 && (ic(o, rc(t, "endLabel"), {
  25978. inheritColor: n,
  25979. labelFetcher: t,
  25980. labelDataIndex: l,
  25981. defaultText: function(t, e, n) {
  25982. return null != n ? dS(r, n) : pS(r, t)
  25983. },
  25984. enableTextSetter: !0
  25985. }, function(t, e) {
  25986. var n = e.getBaseAxis()
  25987. , i = n.isHorizontal()
  25988. , r = n.inverse
  25989. , o = i ? r ? "right" : "left" : "center"
  25990. , a = i ? "middle" : r ? "top" : "bottom";
  25991. return {
  25992. normal: {
  25993. align: t.get("align") || o,
  25994. verticalAlign: t.get("verticalAlign") || a
  25995. }
  25996. }
  25997. }(i, e)),
  25998. o.textConfig.position = null)
  25999. } else
  26000. this._endLabel && (this._polyline.removeTextContent(),
  26001. this._endLabel = null)
  26002. }
  26003. ,
  26004. e.prototype._endLabelOnDuring = function(t, e, n, i, r, o, a) {
  26005. var s = this._endLabel
  26006. , l = this._polyline;
  26007. if (s) {
  26008. t < 1 && null == i.originalX && (i.originalX = s.x,
  26009. i.originalY = s.y);
  26010. var u = n.getLayout("points")
  26011. , h = n.hostModel
  26012. , c = h.get("connectNulls")
  26013. , p = o.get("precision")
  26014. , d = o.get("distance") || 0
  26015. , f = a.getBaseAxis()
  26016. , g = f.isHorizontal()
  26017. , y = f.inverse
  26018. , v = e.shape
  26019. , m = y ? g ? v.x : v.y + v.height : g ? v.x + v.width : v.y
  26020. , x = (g ? d : 0) * (y ? -1 : 1)
  26021. , _ = (g ? 0 : -d) * (y ? -1 : 1)
  26022. , b = g ? "x" : "y"
  26023. , w = function(t, e, n) {
  26024. for (var i, r, o = t.length / 2, a = "x" === n ? 0 : 1, s = 0, l = -1, u = 0; u < o; u++)
  26025. if (r = t[2 * u + a],
  26026. !isNaN(r) && !isNaN(t[2 * u + 1 - a]))
  26027. if (0 !== u) {
  26028. if (i <= e && r >= e || i >= e && r <= e) {
  26029. l = u;
  26030. break
  26031. }
  26032. s = u,
  26033. i = r
  26034. } else
  26035. i = r;
  26036. return {
  26037. range: [s, l],
  26038. t: (e - i) / (r - i)
  26039. }
  26040. }(u, m, b)
  26041. , S = w.range
  26042. , M = S[1] - S[0]
  26043. , I = void 0;
  26044. if (M >= 1) {
  26045. if (M > 1 && !c) {
  26046. var T = GS(u, S[0]);
  26047. s.attr({
  26048. x: T[0] + x,
  26049. y: T[1] + _
  26050. }),
  26051. r && (I = h.getRawValue(S[0]))
  26052. } else {
  26053. (T = l.getPointOn(m, b)) && s.attr({
  26054. x: T[0] + x,
  26055. y: T[1] + _
  26056. });
  26057. var C = h.getRawValue(S[0])
  26058. , D = h.getRawValue(S[1]);
  26059. r && (I = Zo(n, p, C, D, w.t))
  26060. }
  26061. i.lastFrameIndex = S[0]
  26062. } else {
  26063. var A = 1 === t || i.lastFrameIndex > 0 ? S[0] : 0;
  26064. T = GS(u, A);
  26065. r && (I = h.getRawValue(A)),
  26066. s.attr({
  26067. x: T[0] + x,
  26068. y: T[1] + _
  26069. })
  26070. }
  26071. if (r) {
  26072. var k = pc(s);
  26073. "function" == typeof k.setLabelText && k.setLabelText(I)
  26074. }
  26075. }
  26076. }
  26077. ,
  26078. e.prototype._doUpdateAnimation = function(t, e, n, i, r, o, a) {
  26079. var s = this._polyline
  26080. , l = this._polygon
  26081. , u = t.hostModel
  26082. , h = function(t, e, n, i, r, o, a, s) {
  26083. for (var l = function(t, e) {
  26084. var n = [];
  26085. return e.diff(t).add((function(t) {
  26086. n.push({
  26087. cmd: "+",
  26088. idx: t
  26089. })
  26090. }
  26091. )).update((function(t, e) {
  26092. n.push({
  26093. cmd: "=",
  26094. idx: e,
  26095. idx1: t
  26096. })
  26097. }
  26098. )).remove((function(t) {
  26099. n.push({
  26100. cmd: "-",
  26101. idx: t
  26102. })
  26103. }
  26104. )).execute(),
  26105. n
  26106. }(t, e), u = [], h = [], c = [], p = [], d = [], f = [], g = [], y = _S(r, e, a), v = t.getLayout("points") || [], m = e.getLayout("points") || [], x = 0; x < l.length; x++) {
  26107. var _ = l[x]
  26108. , b = !0
  26109. , w = void 0
  26110. , S = void 0;
  26111. switch (_.cmd) {
  26112. case "=":
  26113. w = 2 * _.idx,
  26114. S = 2 * _.idx1;
  26115. var M = v[w]
  26116. , I = v[w + 1]
  26117. , T = m[S]
  26118. , C = m[S + 1];
  26119. (isNaN(M) || isNaN(I)) && (M = T,
  26120. I = C),
  26121. u.push(M, I),
  26122. h.push(T, C),
  26123. c.push(n[w], n[w + 1]),
  26124. p.push(i[S], i[S + 1]),
  26125. g.push(e.getRawIndex(_.idx1));
  26126. break;
  26127. case "+":
  26128. var D = _.idx
  26129. , A = y.dataDimsForPoint
  26130. , k = r.dataToPoint([e.get(A[0], D), e.get(A[1], D)]);
  26131. S = 2 * D,
  26132. u.push(k[0], k[1]),
  26133. h.push(m[S], m[S + 1]);
  26134. var L = bS(y, r, e, D);
  26135. c.push(L[0], L[1]),
  26136. p.push(i[S], i[S + 1]),
  26137. g.push(e.getRawIndex(D));
  26138. break;
  26139. case "-":
  26140. b = !1
  26141. }
  26142. b && (d.push(_),
  26143. f.push(f.length))
  26144. }
  26145. f.sort((function(t, e) {
  26146. return g[t] - g[e]
  26147. }
  26148. ));
  26149. var P = u.length
  26150. , O = Bx(P)
  26151. , R = Bx(P)
  26152. , N = Bx(P)
  26153. , E = Bx(P)
  26154. , z = [];
  26155. for (x = 0; x < f.length; x++) {
  26156. var V = f[x]
  26157. , B = 2 * x
  26158. , F = 2 * V;
  26159. O[B] = u[F],
  26160. O[B + 1] = u[F + 1],
  26161. R[B] = h[F],
  26162. R[B + 1] = h[F + 1],
  26163. N[B] = c[F],
  26164. N[B + 1] = c[F + 1],
  26165. E[B] = p[F],
  26166. E[B + 1] = p[F + 1],
  26167. z[x] = d[V]
  26168. }
  26169. return {
  26170. current: O,
  26171. next: R,
  26172. stackedOnCurrent: N,
  26173. stackedOnNext: E,
  26174. status: z
  26175. }
  26176. }(this._data, t, this._stackedOnPoints, e, this._coordSys, 0, this._valueOrigin)
  26177. , c = h.current
  26178. , p = h.stackedOnCurrent
  26179. , d = h.next
  26180. , f = h.stackedOnNext;
  26181. if (r && (p = VS(h.stackedOnCurrent, h.current, n, r, a),
  26182. c = VS(h.current, null, n, r, a),
  26183. f = VS(h.stackedOnNext, h.next, n, r, a),
  26184. d = VS(h.next, null, n, r, a)),
  26185. ES(c, d) > 3e3 || l && ES(p, f) > 3e3)
  26186. return s.stopAnimation(),
  26187. s.setShape({
  26188. points: d
  26189. }),
  26190. void (l && (l.stopAnimation(),
  26191. l.setShape({
  26192. points: d,
  26193. stackedOnPoints: f
  26194. })));
  26195. s.shape.__points = h.current,
  26196. s.shape.points = c;
  26197. var g = {
  26198. shape: {
  26199. points: d
  26200. }
  26201. };
  26202. h.current !== c && (g.shape.__points = h.next),
  26203. s.stopAnimation(),
  26204. vh(s, g, u),
  26205. l && (l.setShape({
  26206. points: c,
  26207. stackedOnPoints: p
  26208. }),
  26209. l.stopAnimation(),
  26210. vh(l, {
  26211. shape: {
  26212. stackedOnPoints: f
  26213. }
  26214. }, u),
  26215. s.shape.points !== l.shape.points && (l.shape.points = s.shape.points));
  26216. for (var y = [], v = h.status, m = 0; m < v.length; m++) {
  26217. if ("=" === v[m].cmd) {
  26218. var x = t.getItemGraphicEl(v[m].idx1);
  26219. x && y.push({
  26220. el: x,
  26221. ptIdx: m
  26222. })
  26223. }
  26224. }
  26225. s.animators && s.animators.length && s.animators[0].during((function() {
  26226. l && l.dirtyShape();
  26227. for (var t = s.shape.__points, e = 0; e < y.length; e++) {
  26228. var n = y[e].el
  26229. , i = 2 * y[e].ptIdx;
  26230. n.x = t[i],
  26231. n.y = t[i + 1],
  26232. n.markRedraw()
  26233. }
  26234. }
  26235. ))
  26236. }
  26237. ,
  26238. e.prototype.remove = function(t) {
  26239. var e = this.group
  26240. , n = this._data;
  26241. this._lineGroup.removeAll(),
  26242. this._symbolDraw.remove(!0),
  26243. n && n.eachItemGraphicEl((function(t, i) {
  26244. t.__temp && (e.remove(t),
  26245. n.setItemGraphicEl(i, null))
  26246. }
  26247. )),
  26248. this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null
  26249. }
  26250. ,
  26251. e.type = "line",
  26252. e
  26253. }(Og);
  26254. function XS(t, e) {
  26255. return {
  26256. seriesType: t,
  26257. plan: kg(),
  26258. reset: function(t) {
  26259. var n = t.getData()
  26260. , i = t.coordinateSystem
  26261. , r = t.pipelineContext
  26262. , o = e || r.large;
  26263. if (i) {
  26264. var a = z(i.dimensions, (function(t) {
  26265. return n.mapDimension(t)
  26266. }
  26267. )).slice(0, 2)
  26268. , s = a.length
  26269. , l = n.getCalculationInfo("stackResultDimension");
  26270. mx(n, a[0]) && (a[0] = l),
  26271. mx(n, a[1]) && (a[1] = l);
  26272. var u = n.getStore()
  26273. , h = n.getDimensionIndex(a[0])
  26274. , c = n.getDimensionIndex(a[1]);
  26275. return s && {
  26276. progress: function(t, e) {
  26277. for (var n = t.end - t.start, r = o && Bx(n * s), a = [], l = [], p = t.start, d = 0; p < t.end; p++) {
  26278. var f = void 0;
  26279. if (1 === s) {
  26280. var g = u.get(h, p);
  26281. f = i.dataToPoint(g, null, l)
  26282. } else
  26283. a[0] = u.get(h, p),
  26284. a[1] = u.get(c, p),
  26285. f = i.dataToPoint(a, null, l);
  26286. o ? (r[d++] = f[0],
  26287. r[d++] = f[1]) : e.setItemLayout(p, f.slice())
  26288. }
  26289. o && e.setLayout("points", r)
  26290. }
  26291. }
  26292. }
  26293. }
  26294. }
  26295. }
  26296. var US = {
  26297. average: function(t) {
  26298. for (var e = 0, n = 0, i = 0; i < t.length; i++)
  26299. isNaN(t[i]) || (e += t[i],
  26300. n++);
  26301. return 0 === n ? NaN : e / n
  26302. },
  26303. sum: function(t) {
  26304. for (var e = 0, n = 0; n < t.length; n++)
  26305. e += t[n] || 0;
  26306. return e
  26307. },
  26308. max: function(t) {
  26309. for (var e = -1 / 0, n = 0; n < t.length; n++)
  26310. t[n] > e && (e = t[n]);
  26311. return isFinite(e) ? e : NaN
  26312. },
  26313. min: function(t) {
  26314. for (var e = 1 / 0, n = 0; n < t.length; n++)
  26315. t[n] < e && (e = t[n]);
  26316. return isFinite(e) ? e : NaN
  26317. },
  26318. nearest: function(t) {
  26319. return t[0]
  26320. }
  26321. }
  26322. , ZS = function(t) {
  26323. return Math.round(t.length / 2)
  26324. };
  26325. function jS(t) {
  26326. return {
  26327. seriesType: t,
  26328. reset: function(t, e, n) {
  26329. var i = t.getData()
  26330. , r = t.get("sampling")
  26331. , o = t.coordinateSystem
  26332. , a = i.count();
  26333. if (a > 10 && "cartesian2d" === o.type && r) {
  26334. var s = o.getBaseAxis()
  26335. , l = o.getOtherAxis(s)
  26336. , u = s.getExtent()
  26337. , h = n.getDevicePixelRatio()
  26338. , c = Math.abs(u[1] - u[0]) * (h || 1)
  26339. , p = Math.round(a / c);
  26340. if (isFinite(p) && p > 1) {
  26341. "lttb" === r ? t.setData(i.lttbDownSample(i.mapDimension(l.dim), 1 / p)) : "minmax" === r && t.setData(i.minmaxDownSample(i.mapDimension(l.dim), 1 / p));
  26342. var d = void 0;
  26343. U(r) ? d = US[r] : X(r) && (d = r),
  26344. d && t.setData(i.downSample(i.mapDimension(l.dim), 1 / p, d, ZS))
  26345. }
  26346. }
  26347. }
  26348. }
  26349. }
  26350. var qS = function(t) {
  26351. function e() {
  26352. var n = null !== t && t.apply(this, arguments) || this;
  26353. return n.type = e.type,
  26354. n
  26355. }
  26356. return n(e, t),
  26357. e.prototype.getInitialData = function(t, e) {
  26358. return _x(null, this, {
  26359. useEncodeDefaulter: !0
  26360. })
  26361. }
  26362. ,
  26363. e.prototype.getMarkerPosition = function(t, e, n) {
  26364. var i = this.coordinateSystem;
  26365. if (i && i.clampData) {
  26366. var r = i.clampData(t)
  26367. , o = i.dataToPoint(r);
  26368. if (n)
  26369. E(i.getAxes(), (function(t, n) {
  26370. if ("category" === t.type && null != e) {
  26371. var i = t.getTicksCoords()
  26372. , a = t.getTickModel().get("alignWithLabel")
  26373. , s = r[n]
  26374. , l = "x1" === e[n] || "y1" === e[n];
  26375. if (l && !a && (s += 1),
  26376. i.length < 2)
  26377. return;
  26378. if (2 === i.length)
  26379. return void (o[n] = t.toGlobalCoord(t.getExtent()[l ? 1 : 0]));
  26380. for (var u = void 0, h = void 0, c = 1, p = 0; p < i.length; p++) {
  26381. var d = i[p].coord
  26382. , f = p === i.length - 1 ? i[p - 1].tickValue + c : i[p].tickValue;
  26383. if (f === s) {
  26384. h = d;
  26385. break
  26386. }
  26387. if (f < s)
  26388. u = d;
  26389. else if (null != u && f > s) {
  26390. h = (d + u) / 2;
  26391. break
  26392. }
  26393. 1 === p && (c = f - i[0].tickValue)
  26394. }
  26395. null == h && (u ? u && (h = i[i.length - 1].coord) : h = i[0].coord),
  26396. o[n] = t.toGlobalCoord(h)
  26397. }
  26398. }
  26399. ));
  26400. else {
  26401. var a = this.getData()
  26402. , s = a.getLayout("offset")
  26403. , l = a.getLayout("size")
  26404. , u = i.getBaseAxis().isHorizontal() ? 0 : 1;
  26405. o[u] += s + l / 2
  26406. }
  26407. return o
  26408. }
  26409. return [NaN, NaN]
  26410. }
  26411. ,
  26412. e.type = "series.__base_bar__",
  26413. e.defaultOption = {
  26414. z: 2,
  26415. coordinateSystem: "cartesian2d",
  26416. legendHoverLink: !0,
  26417. barMinHeight: 0,
  26418. barMinAngle: 0,
  26419. large: !1,
  26420. largeThreshold: 400,
  26421. progressive: 3e3,
  26422. progressiveChunkMode: "mod"
  26423. },
  26424. e
  26425. }(bg);
  26426. bg.registerClass(qS);
  26427. var KS = function(t) {
  26428. function e() {
  26429. var n = null !== t && t.apply(this, arguments) || this;
  26430. return n.type = e.type,
  26431. n
  26432. }
  26433. return n(e, t),
  26434. e.prototype.getInitialData = function() {
  26435. return _x(null, this, {
  26436. useEncodeDefaulter: !0,
  26437. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  26438. })
  26439. }
  26440. ,
  26441. e.prototype.getProgressive = function() {
  26442. return !!this.get("large") && this.get("progressive")
  26443. }
  26444. ,
  26445. e.prototype.getProgressiveThreshold = function() {
  26446. var t = this.get("progressiveThreshold")
  26447. , e = this.get("largeThreshold");
  26448. return e > t && (t = e),
  26449. t
  26450. }
  26451. ,
  26452. e.prototype.brushSelector = function(t, e, n) {
  26453. return n.rect(e.getItemLayout(t))
  26454. }
  26455. ,
  26456. e.type = "series.bar",
  26457. e.dependencies = ["grid", "polar"],
  26458. e.defaultOption = kc(qS.defaultOption, {
  26459. clip: !0,
  26460. roundCap: !1,
  26461. showBackground: !1,
  26462. backgroundStyle: {
  26463. color: "rgba(180, 180, 180, 0.2)",
  26464. borderColor: null,
  26465. borderWidth: 0,
  26466. borderType: "solid",
  26467. borderRadius: 0,
  26468. shadowBlur: 0,
  26469. shadowColor: null,
  26470. shadowOffsetX: 0,
  26471. shadowOffsetY: 0,
  26472. opacity: 1
  26473. },
  26474. select: {
  26475. itemStyle: {
  26476. borderColor: "#212121"
  26477. }
  26478. },
  26479. realtimeSort: !1
  26480. }),
  26481. e
  26482. }(qS)
  26483. , $S = function() {
  26484. this.cx = 0,
  26485. this.cy = 0,
  26486. this.r0 = 0,
  26487. this.r = 0,
  26488. this.startAngle = 0,
  26489. this.endAngle = 2 * Math.PI,
  26490. this.clockwise = !0
  26491. }
  26492. , JS = function(t) {
  26493. function e(e) {
  26494. var n = t.call(this, e) || this;
  26495. return n.type = "sausage",
  26496. n
  26497. }
  26498. return n(e, t),
  26499. e.prototype.getDefaultShape = function() {
  26500. return new $S
  26501. }
  26502. ,
  26503. e.prototype.buildPath = function(t, e) {
  26504. var n = e.cx
  26505. , i = e.cy
  26506. , r = Math.max(e.r0 || 0, 0)
  26507. , o = Math.max(e.r, 0)
  26508. , a = .5 * (o - r)
  26509. , s = r + a
  26510. , l = e.startAngle
  26511. , u = e.endAngle
  26512. , h = e.clockwise
  26513. , c = 2 * Math.PI
  26514. , p = h ? u - l < c : l - u < c;
  26515. p || (l = u - (h ? c : -c));
  26516. var d = Math.cos(l)
  26517. , f = Math.sin(l)
  26518. , g = Math.cos(u)
  26519. , y = Math.sin(u);
  26520. p ? (t.moveTo(d * r + n, f * r + i),
  26521. t.arc(d * s + n, f * s + i, a, -Math.PI + l, l, !h)) : t.moveTo(d * o + n, f * o + i),
  26522. t.arc(n, i, o, l, u, !h),
  26523. t.arc(g * s + n, y * s + i, a, u - 2 * Math.PI, u - Math.PI, !h),
  26524. 0 !== r && t.arc(n, i, r, u, l, h)
  26525. }
  26526. ,
  26527. e
  26528. }(ks);
  26529. function QS(t, e, n) {
  26530. return e * Math.sin(t) * (n ? -1 : 1)
  26531. }
  26532. function tM(t, e, n) {
  26533. return e * Math.cos(t) * (n ? 1 : -1)
  26534. }
  26535. function eM(t, e, n) {
  26536. var i = t.get("borderRadius");
  26537. if (null == i)
  26538. return n ? {
  26539. cornerRadius: 0
  26540. } : null;
  26541. Y(i) || (i = [i, i, i, i]);
  26542. var r = Math.abs(e.r || 0 - e.r0 || 0);
  26543. return {
  26544. cornerRadius: z(i, (function(t) {
  26545. return Cr(t, r)
  26546. }
  26547. ))
  26548. }
  26549. }
  26550. var nM = Math.max
  26551. , iM = Math.min;
  26552. var rM = function(t) {
  26553. function e() {
  26554. var n = t.call(this) || this;
  26555. return n.type = e.type,
  26556. n._isFirstFrame = !0,
  26557. n
  26558. }
  26559. return n(e, t),
  26560. e.prototype.render = function(t, e, n, i) {
  26561. this._model = t,
  26562. this._removeOnRenderedListener(n),
  26563. this._updateDrawMode(t);
  26564. var r = t.get("coordinateSystem");
  26565. ("cartesian2d" === r || "polar" === r) && (this._progressiveEls = null,
  26566. this._isLargeDraw ? this._renderLarge(t, e, n) : this._renderNormal(t, e, n, i))
  26567. }
  26568. ,
  26569. e.prototype.incrementalPrepareRender = function(t) {
  26570. this._clear(),
  26571. this._updateDrawMode(t),
  26572. this._updateLargeClip(t)
  26573. }
  26574. ,
  26575. e.prototype.incrementalRender = function(t, e) {
  26576. this._progressiveEls = [],
  26577. this._incrementalRenderLarge(t, e)
  26578. }
  26579. ,
  26580. e.prototype.eachRendered = function(t) {
  26581. Jh(this._progressiveEls || this.group, t)
  26582. }
  26583. ,
  26584. e.prototype._updateDrawMode = function(t) {
  26585. var e = t.pipelineContext.large;
  26586. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e,
  26587. this._clear())
  26588. }
  26589. ,
  26590. e.prototype._renderNormal = function(t, e, n, i) {
  26591. var r, o = this.group, a = t.getData(), s = this._data, l = t.coordinateSystem, u = l.getBaseAxis();
  26592. "cartesian2d" === l.type ? r = u.isHorizontal() : "polar" === l.type && (r = "angle" === u.dim);
  26593. var h = t.isAnimationEnabled() ? t : null
  26594. , c = function(t, e) {
  26595. var n = t.get("realtimeSort", !0)
  26596. , i = e.getBaseAxis();
  26597. 0;
  26598. if (n && "category" === i.type && "cartesian2d" === e.type)
  26599. return {
  26600. baseAxis: i,
  26601. otherAxis: e.getOtherAxis(i)
  26602. }
  26603. }(t, l);
  26604. c && this._enableRealtimeSort(c, a, n);
  26605. var p = t.get("clip", !0) || c
  26606. , d = function(t, e) {
  26607. var n = t.getArea && t.getArea();
  26608. if (OS(t, "cartesian2d")) {
  26609. var i = t.getBaseAxis();
  26610. if ("category" !== i.type || !i.onBand) {
  26611. var r = e.getLayout("bandWidth");
  26612. i.isHorizontal() ? (n.x -= r,
  26613. n.width += 2 * r) : (n.y -= r,
  26614. n.height += 2 * r)
  26615. }
  26616. }
  26617. return n
  26618. }(l, a);
  26619. o.removeClipPath();
  26620. var f = t.get("roundCap", !0)
  26621. , g = t.get("showBackground", !0)
  26622. , y = t.getModel("backgroundStyle")
  26623. , v = y.get("borderRadius") || 0
  26624. , m = []
  26625. , x = this._backgroundEls
  26626. , _ = i && i.isInitSort
  26627. , b = i && "changeAxisOrder" === i.type;
  26628. function w(t) {
  26629. var e = pM[l.type](a, t)
  26630. , n = function(t, e, n) {
  26631. var i = "polar" === t.type ? Fu : Ws;
  26632. return new i({
  26633. shape: xM(e, n, t),
  26634. silent: !0,
  26635. z2: 0
  26636. })
  26637. }(l, r, e);
  26638. return n.useStyle(y.getItemStyle()),
  26639. "cartesian2d" === l.type ? n.setShape("r", v) : n.setShape("cornerRadius", v),
  26640. m[t] = n,
  26641. n
  26642. }
  26643. a.diff(s).add((function(e) {
  26644. var n = a.getItemModel(e)
  26645. , i = pM[l.type](a, e, n);
  26646. if (g && w(e),
  26647. a.hasValue(e) && cM[l.type](i)) {
  26648. var s = !1;
  26649. p && (s = oM[l.type](d, i));
  26650. var y = aM[l.type](t, a, e, i, r, h, u.model, !1, f);
  26651. c && (y.forceLabelAnimation = !0),
  26652. fM(y, a, e, n, i, t, r, "polar" === l.type),
  26653. _ ? y.attr({
  26654. shape: i
  26655. }) : c ? sM(c, h, y, i, e, r, !1, !1) : mh(y, {
  26656. shape: i
  26657. }, t, e),
  26658. a.setItemGraphicEl(e, y),
  26659. o.add(y),
  26660. y.ignore = s
  26661. }
  26662. }
  26663. )).update((function(e, n) {
  26664. var i = a.getItemModel(e)
  26665. , S = pM[l.type](a, e, i);
  26666. if (g) {
  26667. var M = void 0;
  26668. 0 === x.length ? M = w(n) : ((M = x[n]).useStyle(y.getItemStyle()),
  26669. "cartesian2d" === l.type ? M.setShape("r", v) : M.setShape("cornerRadius", v),
  26670. m[e] = M);
  26671. var I = pM[l.type](a, e);
  26672. vh(M, {
  26673. shape: xM(r, I, l)
  26674. }, h, e)
  26675. }
  26676. var T = s.getItemGraphicEl(n);
  26677. if (a.hasValue(e) && cM[l.type](S)) {
  26678. var C = !1;
  26679. if (p && (C = oM[l.type](d, S)) && o.remove(T),
  26680. T ? Sh(T) : T = aM[l.type](t, a, e, S, r, h, u.model, !!T, f),
  26681. c && (T.forceLabelAnimation = !0),
  26682. b) {
  26683. var D = T.getTextContent();
  26684. if (D) {
  26685. var A = pc(D);
  26686. null != A.prevValue && (A.prevValue = A.value)
  26687. }
  26688. } else
  26689. fM(T, a, e, i, S, t, r, "polar" === l.type);
  26690. _ ? T.attr({
  26691. shape: S
  26692. }) : c ? sM(c, h, T, S, e, r, !0, b) : vh(T, {
  26693. shape: S
  26694. }, t, e, null),
  26695. a.setItemGraphicEl(e, T),
  26696. T.ignore = C,
  26697. o.add(T)
  26698. } else
  26699. o.remove(T)
  26700. }
  26701. )).remove((function(e) {
  26702. var n = s.getItemGraphicEl(e);
  26703. n && wh(n, t, e)
  26704. }
  26705. )).execute();
  26706. var S = this._backgroundGroup || (this._backgroundGroup = new Br);
  26707. S.removeAll();
  26708. for (var M = 0; M < m.length; ++M)
  26709. S.add(m[M]);
  26710. o.add(S),
  26711. this._backgroundEls = m,
  26712. this._data = a
  26713. }
  26714. ,
  26715. e.prototype._renderLarge = function(t, e, n) {
  26716. this._clear(),
  26717. vM(t, this.group),
  26718. this._updateLargeClip(t)
  26719. }
  26720. ,
  26721. e.prototype._incrementalRenderLarge = function(t, e) {
  26722. this._removeBackground(),
  26723. vM(e, this.group, this._progressiveEls, !0)
  26724. }
  26725. ,
  26726. e.prototype._updateLargeClip = function(t) {
  26727. var e = t.get("clip", !0) && PS(t.coordinateSystem, !1, t)
  26728. , n = this.group;
  26729. e ? n.setClipPath(e) : n.removeClipPath()
  26730. }
  26731. ,
  26732. e.prototype._enableRealtimeSort = function(t, e, n) {
  26733. var i = this;
  26734. if (e.count()) {
  26735. var r = t.baseAxis;
  26736. if (this._isFirstFrame)
  26737. this._dispatchInitSort(e, t, n),
  26738. this._isFirstFrame = !1;
  26739. else {
  26740. var o = function(t) {
  26741. var n = e.getItemGraphicEl(t)
  26742. , i = n && n.shape;
  26743. return i && Math.abs(r.isHorizontal() ? i.height : i.width) || 0
  26744. };
  26745. this._onRendered = function() {
  26746. i._updateSortWithinSameData(e, o, r, n)
  26747. }
  26748. ,
  26749. n.getZr().on("rendered", this._onRendered)
  26750. }
  26751. }
  26752. }
  26753. ,
  26754. e.prototype._dataSort = function(t, e, n) {
  26755. var i = [];
  26756. return t.each(t.mapDimension(e.dim), (function(t, e) {
  26757. var r = n(e);
  26758. r = null == r ? NaN : r,
  26759. i.push({
  26760. dataIndex: e,
  26761. mappedValue: r,
  26762. ordinalNumber: t
  26763. })
  26764. }
  26765. )),
  26766. i.sort((function(t, e) {
  26767. return e.mappedValue - t.mappedValue
  26768. }
  26769. )),
  26770. {
  26771. ordinalNumbers: z(i, (function(t) {
  26772. return t.ordinalNumber
  26773. }
  26774. ))
  26775. }
  26776. }
  26777. ,
  26778. e.prototype._isOrderChangedWithinSameData = function(t, e, n) {
  26779. for (var i = n.scale, r = t.mapDimension(n.dim), o = Number.MAX_VALUE, a = 0, s = i.getOrdinalMeta().categories.length; a < s; ++a) {
  26780. var l = t.rawIndexOf(r, i.getRawOrdinalNumber(a))
  26781. , u = l < 0 ? Number.MIN_VALUE : e(t.indexOfRawIndex(l));
  26782. if (u > o)
  26783. return !0;
  26784. o = u
  26785. }
  26786. return !1
  26787. }
  26788. ,
  26789. e.prototype._isOrderDifferentInView = function(t, e) {
  26790. 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)
  26791. if (t.ordinalNumbers[r] !== n.getRawOrdinalNumber(r))
  26792. return !0
  26793. }
  26794. ,
  26795. e.prototype._updateSortWithinSameData = function(t, e, n, i) {
  26796. if (this._isOrderChangedWithinSameData(t, e, n)) {
  26797. var r = this._dataSort(t, n, e);
  26798. this._isOrderDifferentInView(r, n) && (this._removeOnRenderedListener(i),
  26799. i.dispatchAction({
  26800. type: "changeAxisOrder",
  26801. componentType: n.dim + "Axis",
  26802. axisId: n.index,
  26803. sortInfo: r
  26804. }))
  26805. }
  26806. }
  26807. ,
  26808. e.prototype._dispatchInitSort = function(t, e, n) {
  26809. var i = e.baseAxis
  26810. , r = this._dataSort(t, i, (function(n) {
  26811. return t.get(t.mapDimension(e.otherAxis.dim), n)
  26812. }
  26813. ));
  26814. n.dispatchAction({
  26815. type: "changeAxisOrder",
  26816. componentType: i.dim + "Axis",
  26817. isInitSort: !0,
  26818. axisId: i.index,
  26819. sortInfo: r
  26820. })
  26821. }
  26822. ,
  26823. e.prototype.remove = function(t, e) {
  26824. this._clear(this._model),
  26825. this._removeOnRenderedListener(e)
  26826. }
  26827. ,
  26828. e.prototype.dispose = function(t, e) {
  26829. this._removeOnRenderedListener(e)
  26830. }
  26831. ,
  26832. e.prototype._removeOnRenderedListener = function(t) {
  26833. this._onRendered && (t.getZr().off("rendered", this._onRendered),
  26834. this._onRendered = null)
  26835. }
  26836. ,
  26837. e.prototype._clear = function(t) {
  26838. var e = this.group
  26839. , n = this._data;
  26840. t && t.isAnimationEnabled() && n && !this._isLargeDraw ? (this._removeBackground(),
  26841. this._backgroundEls = [],
  26842. n.eachItemGraphicEl((function(e) {
  26843. wh(e, t, rl(e).dataIndex)
  26844. }
  26845. ))) : e.removeAll(),
  26846. this._data = null,
  26847. this._isFirstFrame = !0
  26848. }
  26849. ,
  26850. e.prototype._removeBackground = function() {
  26851. this.group.remove(this._backgroundGroup),
  26852. this._backgroundGroup = null
  26853. }
  26854. ,
  26855. e.type = "bar",
  26856. e
  26857. }(Og)
  26858. , oM = {
  26859. cartesian2d: function(t, e) {
  26860. var n = e.width < 0 ? -1 : 1
  26861. , i = e.height < 0 ? -1 : 1;
  26862. n < 0 && (e.x += e.width,
  26863. e.width = -e.width),
  26864. i < 0 && (e.y += e.height,
  26865. e.height = -e.height);
  26866. var r = t.x + t.width
  26867. , o = t.y + t.height
  26868. , a = nM(e.x, t.x)
  26869. , s = iM(e.x + e.width, r)
  26870. , l = nM(e.y, t.y)
  26871. , u = iM(e.y + e.height, o)
  26872. , h = s < a
  26873. , c = u < l;
  26874. return e.x = h && a > r ? s : a,
  26875. e.y = c && l > o ? u : l,
  26876. e.width = h ? 0 : s - a,
  26877. e.height = c ? 0 : u - l,
  26878. n < 0 && (e.x += e.width,
  26879. e.width = -e.width),
  26880. i < 0 && (e.y += e.height,
  26881. e.height = -e.height),
  26882. h || c
  26883. },
  26884. polar: function(t, e) {
  26885. var n = e.r0 <= e.r ? 1 : -1;
  26886. if (n < 0) {
  26887. var i = e.r;
  26888. e.r = e.r0,
  26889. e.r0 = i
  26890. }
  26891. var r = iM(e.r, t.r)
  26892. , o = nM(e.r0, t.r0);
  26893. e.r = r,
  26894. e.r0 = o;
  26895. var a = r - o < 0;
  26896. if (n < 0) {
  26897. i = e.r;
  26898. e.r = e.r0,
  26899. e.r0 = i
  26900. }
  26901. return a
  26902. }
  26903. }
  26904. , aM = {
  26905. cartesian2d: function(t, e, n, i, r, o, a, s, l) {
  26906. var u = new Ws({
  26907. shape: A({}, i),
  26908. z2: 1
  26909. });
  26910. (u.__dataIndex = n,
  26911. u.name = "item",
  26912. o) && (u.shape[r ? "height" : "width"] = 0);
  26913. return u
  26914. },
  26915. polar: function(t, e, n, i, r, o, a, s, l) {
  26916. var u = !r && l ? JS : Fu
  26917. , h = new u({
  26918. shape: i,
  26919. z2: 1
  26920. });
  26921. h.name = "item";
  26922. var c, p, d = dM(r);
  26923. if (h.calculateTextPosition = (c = d,
  26924. p = ({
  26925. isRoundCap: u === JS
  26926. } || {}).isRoundCap,
  26927. function(t, e, n) {
  26928. var i = e.position;
  26929. if (!i || i instanceof Array)
  26930. return Dr(t, e, n);
  26931. var r = c(i)
  26932. , o = null != e.distance ? e.distance : 5
  26933. , a = this.shape
  26934. , s = a.cx
  26935. , l = a.cy
  26936. , u = a.r
  26937. , h = a.r0
  26938. , d = (u + h) / 2
  26939. , f = a.startAngle
  26940. , g = a.endAngle
  26941. , y = (f + g) / 2
  26942. , v = p ? Math.abs(u - h) / 2 : 0
  26943. , m = Math.cos
  26944. , x = Math.sin
  26945. , _ = s + u * m(f)
  26946. , b = l + u * x(f)
  26947. , w = "left"
  26948. , S = "top";
  26949. switch (r) {
  26950. case "startArc":
  26951. _ = s + (h - o) * m(y),
  26952. b = l + (h - o) * x(y),
  26953. w = "center",
  26954. S = "top";
  26955. break;
  26956. case "insideStartArc":
  26957. _ = s + (h + o) * m(y),
  26958. b = l + (h + o) * x(y),
  26959. w = "center",
  26960. S = "bottom";
  26961. break;
  26962. case "startAngle":
  26963. _ = s + d * m(f) + QS(f, o + v, !1),
  26964. b = l + d * x(f) + tM(f, o + v, !1),
  26965. w = "right",
  26966. S = "middle";
  26967. break;
  26968. case "insideStartAngle":
  26969. _ = s + d * m(f) + QS(f, -o + v, !1),
  26970. b = l + d * x(f) + tM(f, -o + v, !1),
  26971. w = "left",
  26972. S = "middle";
  26973. break;
  26974. case "middle":
  26975. _ = s + d * m(y),
  26976. b = l + d * x(y),
  26977. w = "center",
  26978. S = "middle";
  26979. break;
  26980. case "endArc":
  26981. _ = s + (u + o) * m(y),
  26982. b = l + (u + o) * x(y),
  26983. w = "center",
  26984. S = "bottom";
  26985. break;
  26986. case "insideEndArc":
  26987. _ = s + (u - o) * m(y),
  26988. b = l + (u - o) * x(y),
  26989. w = "center",
  26990. S = "top";
  26991. break;
  26992. case "endAngle":
  26993. _ = s + d * m(g) + QS(g, o + v, !0),
  26994. b = l + d * x(g) + tM(g, o + v, !0),
  26995. w = "left",
  26996. S = "middle";
  26997. break;
  26998. case "insideEndAngle":
  26999. _ = s + d * m(g) + QS(g, -o + v, !0),
  27000. b = l + d * x(g) + tM(g, -o + v, !0),
  27001. w = "right",
  27002. S = "middle";
  27003. break;
  27004. default:
  27005. return Dr(t, e, n)
  27006. }
  27007. return (t = t || {}).x = _,
  27008. t.y = b,
  27009. t.align = w,
  27010. t.verticalAlign = S,
  27011. t
  27012. }
  27013. ),
  27014. o) {
  27015. var f = r ? "r" : "endAngle"
  27016. , g = {};
  27017. h.shape[f] = r ? i.r0 : i.startAngle,
  27018. g[f] = i[f],
  27019. (s ? vh : mh)(h, {
  27020. shape: g
  27021. }, o)
  27022. }
  27023. return h
  27024. }
  27025. };
  27026. function sM(t, e, n, i, r, o, a, s) {
  27027. var l, u;
  27028. o ? (u = {
  27029. x: i.x,
  27030. width: i.width
  27031. },
  27032. l = {
  27033. y: i.y,
  27034. height: i.height
  27035. }) : (u = {
  27036. y: i.y,
  27037. height: i.height
  27038. },
  27039. l = {
  27040. x: i.x,
  27041. width: i.width
  27042. }),
  27043. s || (a ? vh : mh)(n, {
  27044. shape: l
  27045. }, e, r, null),
  27046. (a ? vh : mh)(n, {
  27047. shape: u
  27048. }, e ? t.baseAxis.model : null, r)
  27049. }
  27050. function lM(t, e) {
  27051. for (var n = 0; n < e.length; n++)
  27052. if (!isFinite(t[e[n]]))
  27053. return !0;
  27054. return !1
  27055. }
  27056. var uM = ["x", "y", "width", "height"]
  27057. , hM = ["cx", "cy", "r", "startAngle", "endAngle"]
  27058. , cM = {
  27059. cartesian2d: function(t) {
  27060. return !lM(t, uM)
  27061. },
  27062. polar: function(t) {
  27063. return !lM(t, hM)
  27064. }
  27065. }
  27066. , pM = {
  27067. cartesian2d: function(t, e, n) {
  27068. var i = t.getItemLayout(e)
  27069. , r = n ? function(t, e) {
  27070. var n = t.get(["itemStyle", "borderColor"]);
  27071. if (!n || "none" === n)
  27072. return 0;
  27073. var i = t.get(["itemStyle", "borderWidth"]) || 0
  27074. , r = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width)
  27075. , o = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  27076. return Math.min(i, r, o)
  27077. }(n, i) : 0
  27078. , o = i.width > 0 ? 1 : -1
  27079. , a = i.height > 0 ? 1 : -1;
  27080. return {
  27081. x: i.x + o * r / 2,
  27082. y: i.y + a * r / 2,
  27083. width: i.width - o * r,
  27084. height: i.height - a * r
  27085. }
  27086. },
  27087. polar: function(t, e, n) {
  27088. var i = t.getItemLayout(e);
  27089. return {
  27090. cx: i.cx,
  27091. cy: i.cy,
  27092. r0: i.r0,
  27093. r: i.r,
  27094. startAngle: i.startAngle,
  27095. endAngle: i.endAngle,
  27096. clockwise: i.clockwise
  27097. }
  27098. }
  27099. };
  27100. function dM(t) {
  27101. return function(t) {
  27102. var e = t ? "Arc" : "Angle";
  27103. return function(t) {
  27104. switch (t) {
  27105. case "start":
  27106. case "insideStart":
  27107. case "end":
  27108. case "insideEnd":
  27109. return t + e;
  27110. default:
  27111. return t
  27112. }
  27113. }
  27114. }(t)
  27115. }
  27116. function fM(t, e, n, i, r, o, a, s) {
  27117. var l = e.getItemVisual(n, "style");
  27118. if (s) {
  27119. if (!o.get("roundCap")) {
  27120. var u = t.shape;
  27121. A(u, eM(i.getModel("itemStyle"), u, !0)),
  27122. t.setShape(u)
  27123. }
  27124. } else {
  27125. var h = i.get(["itemStyle", "borderRadius"]) || 0;
  27126. t.setShape("r", h)
  27127. }
  27128. t.useStyle(l);
  27129. var c = i.getShallow("cursor");
  27130. c && t.attr("cursor", c);
  27131. 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"
  27132. , d = rc(i);
  27133. ic(t, d, {
  27134. labelFetcher: o,
  27135. labelDataIndex: n,
  27136. defaultText: pS(o.getData(), n),
  27137. inheritColor: l.fill,
  27138. defaultOpacity: l.opacity,
  27139. defaultOutsidePosition: p
  27140. });
  27141. var f = t.getTextContent();
  27142. if (s && f) {
  27143. var g = i.get(["label", "position"]);
  27144. t.textConfig.inside = "middle" === g || null,
  27145. function(t, e, n, i) {
  27146. if (j(i))
  27147. t.setTextConfig({
  27148. rotation: i
  27149. });
  27150. else if (Y(e))
  27151. t.setTextConfig({
  27152. rotation: 0
  27153. });
  27154. else {
  27155. var r, o = t.shape, a = o.clockwise ? o.startAngle : o.endAngle, s = o.clockwise ? o.endAngle : o.startAngle, l = (a + s) / 2, u = n(e);
  27156. switch (u) {
  27157. case "startArc":
  27158. case "insideStartArc":
  27159. case "middle":
  27160. case "insideEndArc":
  27161. case "endArc":
  27162. r = l;
  27163. break;
  27164. case "startAngle":
  27165. case "insideStartAngle":
  27166. r = a;
  27167. break;
  27168. case "endAngle":
  27169. case "insideEndAngle":
  27170. r = s;
  27171. break;
  27172. default:
  27173. return void t.setTextConfig({
  27174. rotation: 0
  27175. })
  27176. }
  27177. var h = 1.5 * Math.PI - r;
  27178. "middle" === u && h > Math.PI / 2 && h < 1.5 * Math.PI && (h -= Math.PI),
  27179. t.setTextConfig({
  27180. rotation: h
  27181. })
  27182. }
  27183. }(t, "outside" === g ? p : g, dM(a), i.get(["label", "rotate"]))
  27184. }
  27185. dc(f, d, o.getRawValue(n), (function(t) {
  27186. return dS(e, t)
  27187. }
  27188. ));
  27189. var y = i.getModel(["emphasis"]);
  27190. Zl(t, y.get("focus"), y.get("blurScope"), y.get("disabled")),
  27191. $l(t, i),
  27192. function(t) {
  27193. return null != t.startAngle && null != t.endAngle && t.startAngle === t.endAngle
  27194. }(r) && (t.style.fill = "none",
  27195. t.style.stroke = "none",
  27196. E(t.states, (function(t) {
  27197. t.style && (t.style.fill = t.style.stroke = "none")
  27198. }
  27199. )))
  27200. }
  27201. var gM = function() {}
  27202. , yM = function(t) {
  27203. function e(e) {
  27204. var n = t.call(this, e) || this;
  27205. return n.type = "largeBar",
  27206. n
  27207. }
  27208. return n(e, t),
  27209. e.prototype.getDefaultShape = function() {
  27210. return new gM
  27211. }
  27212. ,
  27213. e.prototype.buildPath = function(t, e) {
  27214. for (var n = e.points, i = this.baseDimIdx, r = 1 - this.baseDimIdx, o = [], a = [], s = this.barWidth, l = 0; l < n.length; l += 3)
  27215. a[i] = s,
  27216. a[r] = n[l + 2],
  27217. o[i] = n[l + i],
  27218. o[r] = n[l + r],
  27219. t.rect(o[0], o[1], a[0], a[1])
  27220. }
  27221. ,
  27222. e
  27223. }(ks);
  27224. function vM(t, e, n, i) {
  27225. var r = t.getData()
  27226. , o = r.getLayout("valueAxisHorizontal") ? 1 : 0
  27227. , a = r.getLayout("largeDataIndices")
  27228. , s = r.getLayout("size")
  27229. , l = t.getModel("backgroundStyle")
  27230. , u = r.getLayout("largeBackgroundPoints");
  27231. if (u) {
  27232. var h = new yM({
  27233. shape: {
  27234. points: u
  27235. },
  27236. incremental: !!i,
  27237. silent: !0,
  27238. z2: 0
  27239. });
  27240. h.baseDimIdx = o,
  27241. h.largeDataIndices = a,
  27242. h.barWidth = s,
  27243. h.useStyle(l.getItemStyle()),
  27244. e.add(h),
  27245. n && n.push(h)
  27246. }
  27247. var c = new yM({
  27248. shape: {
  27249. points: r.getLayout("largePoints")
  27250. },
  27251. incremental: !!i,
  27252. ignoreCoarsePointer: !0,
  27253. z2: 1
  27254. });
  27255. c.baseDimIdx = o,
  27256. c.largeDataIndices = a,
  27257. c.barWidth = s,
  27258. e.add(c),
  27259. c.useStyle(r.getVisual("style")),
  27260. c.style.stroke = null,
  27261. rl(c).seriesIndex = t.seriesIndex,
  27262. t.get("silent") || (c.on("mousedown", mM),
  27263. c.on("mousemove", mM)),
  27264. n && n.push(c)
  27265. }
  27266. var mM = Wg((function(t) {
  27267. var e = function(t, e, n) {
  27268. 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++) {
  27269. var p = 3 * h;
  27270. if (l[i] = u,
  27271. l[r] = o[p + 2],
  27272. s[i] = o[p + i],
  27273. s[r] = o[p + r],
  27274. l[r] < 0 && (s[r] += l[r],
  27275. l[r] = -l[r]),
  27276. e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1])
  27277. return a[h]
  27278. }
  27279. return -1
  27280. }(this, t.offsetX, t.offsetY);
  27281. rl(this).dataIndex = e >= 0 ? e : null
  27282. }
  27283. ), 30, !1);
  27284. function xM(t, e, n) {
  27285. if (OS(n, "cartesian2d")) {
  27286. var i = e
  27287. , r = n.getArea();
  27288. return {
  27289. x: t ? i.x : r.x,
  27290. y: t ? r.y : i.y,
  27291. width: t ? i.width : r.width,
  27292. height: t ? r.height : i.height
  27293. }
  27294. }
  27295. var o = e;
  27296. return {
  27297. cx: (r = n.getArea()).cx,
  27298. cy: r.cy,
  27299. r0: t ? r.r0 : o.r0,
  27300. r: t ? r.r : o.r,
  27301. startAngle: t ? o.startAngle : 0,
  27302. endAngle: t ? o.endAngle : 2 * Math.PI
  27303. }
  27304. }
  27305. var _M = 2 * Math.PI
  27306. , bM = Math.PI / 180;
  27307. function wM(t, e) {
  27308. return kp(t.getBoxLayoutParams(), {
  27309. width: e.getWidth(),
  27310. height: e.getHeight()
  27311. })
  27312. }
  27313. function SM(t, e) {
  27314. var n = wM(t, e)
  27315. , i = t.get("center")
  27316. , r = t.get("radius");
  27317. Y(r) || (r = [0, r]);
  27318. var o, a, s = $r(n.width, e.getWidth()), l = $r(n.height, e.getHeight()), u = Math.min(s, l), h = $r(r[0], u / 2), c = $r(r[1], u / 2), p = t.coordinateSystem;
  27319. if (p) {
  27320. var d = p.dataToPoint(i);
  27321. o = d[0] || 0,
  27322. a = d[1] || 0
  27323. } else
  27324. Y(i) || (i = [i, i]),
  27325. o = $r(i[0], s) + n.x,
  27326. a = $r(i[1], l) + n.y;
  27327. return {
  27328. cx: o,
  27329. cy: a,
  27330. r0: h,
  27331. r: c
  27332. }
  27333. }
  27334. function MM(t, e, n) {
  27335. e.eachSeriesByType(t, (function(t) {
  27336. var e = t.getData()
  27337. , i = e.mapDimension("value")
  27338. , r = wM(t, n)
  27339. , o = SM(t, n)
  27340. , a = o.cx
  27341. , s = o.cy
  27342. , l = o.r
  27343. , u = o.r0
  27344. , h = -t.get("startAngle") * bM
  27345. , c = t.get("endAngle")
  27346. , p = t.get("padAngle") * bM;
  27347. c = "auto" === c ? h - _M : -c * bM;
  27348. var d = t.get("minAngle") * bM + p
  27349. , f = 0;
  27350. e.each(i, (function(t) {
  27351. !isNaN(t) && f++
  27352. }
  27353. ));
  27354. var g = e.getSum(i)
  27355. , y = Math.PI / (g || f) * 2
  27356. , v = t.get("clockwise")
  27357. , m = t.get("roseType")
  27358. , x = t.get("stillShowZeroSum")
  27359. , _ = e.getDataExtent(i);
  27360. _[0] = 0;
  27361. var b = v ? 1 : -1
  27362. , w = [h, c]
  27363. , S = b * p / 2;
  27364. us(w, !v),
  27365. h = w[0],
  27366. c = w[1];
  27367. var M = IM(t);
  27368. M.startAngle = h,
  27369. M.endAngle = c,
  27370. M.clockwise = v;
  27371. var I = Math.abs(c - h)
  27372. , T = I
  27373. , C = 0
  27374. , D = h;
  27375. if (e.setLayout({
  27376. viewRect: r,
  27377. r: l
  27378. }),
  27379. e.each(i, (function(t, n) {
  27380. var i;
  27381. if (isNaN(t))
  27382. e.setItemLayout(n, {
  27383. angle: NaN,
  27384. startAngle: NaN,
  27385. endAngle: NaN,
  27386. clockwise: v,
  27387. cx: a,
  27388. cy: s,
  27389. r0: u,
  27390. r: m ? NaN : l
  27391. });
  27392. else {
  27393. (i = "area" !== m ? 0 === g && x ? y : t * y : I / f) < d ? (i = d,
  27394. T -= d) : C += t;
  27395. var r = D + b * i
  27396. , o = 0
  27397. , h = 0;
  27398. p > i ? h = o = D + b * i / 2 : (o = D + S,
  27399. h = r - S),
  27400. e.setItemLayout(n, {
  27401. angle: i,
  27402. startAngle: o,
  27403. endAngle: h,
  27404. clockwise: v,
  27405. cx: a,
  27406. cy: s,
  27407. r0: u,
  27408. r: m ? Kr(t, _, [u, l]) : l
  27409. }),
  27410. D = r
  27411. }
  27412. }
  27413. )),
  27414. T < _M && f)
  27415. if (T <= .001) {
  27416. var A = I / f;
  27417. e.each(i, (function(t, n) {
  27418. if (!isNaN(t)) {
  27419. var i = e.getItemLayout(n);
  27420. i.angle = A;
  27421. var r = 0
  27422. , o = 0;
  27423. A < p ? o = r = h + b * (n + .5) * A : (r = h + b * n * A + S,
  27424. o = h + b * (n + 1) * A - S),
  27425. i.startAngle = r,
  27426. i.endAngle = o
  27427. }
  27428. }
  27429. ))
  27430. } else
  27431. y = T / C,
  27432. D = h,
  27433. e.each(i, (function(t, n) {
  27434. if (!isNaN(t)) {
  27435. var i = e.getItemLayout(n)
  27436. , r = i.angle === d ? d : t * y
  27437. , o = 0
  27438. , a = 0;
  27439. r < p ? a = o = D + b * r / 2 : (o = D + S,
  27440. a = D + b * r - S),
  27441. i.startAngle = o,
  27442. i.endAngle = a,
  27443. D += b * r
  27444. }
  27445. }
  27446. ))
  27447. }
  27448. ))
  27449. }
  27450. var IM = Vo();
  27451. function TM(t) {
  27452. return {
  27453. seriesType: t,
  27454. reset: function(t, e) {
  27455. var n = e.findComponents({
  27456. mainType: "legend"
  27457. });
  27458. if (n && n.length) {
  27459. var i = t.getData();
  27460. i.filterSelf((function(t) {
  27461. for (var e = i.getName(t), r = 0; r < n.length; r++)
  27462. if (!n[r].isSelected(e))
  27463. return !1;
  27464. return !0
  27465. }
  27466. ))
  27467. }
  27468. }
  27469. }
  27470. }
  27471. var CM = Math.PI / 180;
  27472. function DM(t, e, n, i, r, o, a, s, l, u) {
  27473. if (!(t.length < 2)) {
  27474. for (var h = t.length, c = 0; c < h; c++)
  27475. if ("outer" === t[c].position && "labelLine" === t[c].labelAlignTo) {
  27476. var p = t[c].label.x - u;
  27477. t[c].linePoints[1][0] += p,
  27478. t[c].label.x = u
  27479. }
  27480. Rb(t, l, l + a) && function(t) {
  27481. for (var o = {
  27482. list: [],
  27483. maxY: 0
  27484. }, a = {
  27485. list: [],
  27486. maxY: 0
  27487. }, s = 0; s < t.length; s++)
  27488. if ("none" === t[s].labelAlignTo) {
  27489. var l = t[s]
  27490. , u = l.label.y > n ? a : o
  27491. , h = Math.abs(l.label.y - n);
  27492. if (h >= u.maxY) {
  27493. var c = l.label.x - e - l.len2 * r
  27494. , p = i + l.len
  27495. , f = Math.abs(c) < p ? Math.sqrt(h * h / (1 - c * c / p / p)) : p;
  27496. u.rB = f,
  27497. u.maxY = h
  27498. }
  27499. u.list.push(l)
  27500. }
  27501. d(o),
  27502. d(a)
  27503. }(t)
  27504. }
  27505. function d(t) {
  27506. for (var o = t.rB, a = o * o, s = 0; s < t.list.length; s++) {
  27507. var l = t.list[s]
  27508. , u = Math.abs(l.label.y - n)
  27509. , h = i + l.len
  27510. , c = h * h
  27511. , p = Math.sqrt(Math.abs((1 - u * u / a) * c))
  27512. , d = e + (p + l.len2) * r
  27513. , f = d - l.label.x;
  27514. AM(l, l.targetTextWidth - f * r, !0),
  27515. l.label.x = d
  27516. }
  27517. }
  27518. }
  27519. function AM(t, e, n) {
  27520. if (void 0 === n && (n = !1),
  27521. null == t.labelStyleWidth) {
  27522. var i = t.label
  27523. , r = i.style
  27524. , o = t.rect
  27525. , a = r.backgroundColor
  27526. , s = r.padding
  27527. , l = s ? s[1] + s[3] : 0
  27528. , u = r.overflow
  27529. , h = o.width + (a ? 0 : l);
  27530. if (e < h || n) {
  27531. var c = o.height;
  27532. if (u && u.match("break")) {
  27533. i.setStyle("backgroundColor", null),
  27534. i.setStyle("width", e - l);
  27535. var p = i.getBoundingRect();
  27536. i.setStyle("width", Math.ceil(p.width)),
  27537. i.setStyle("backgroundColor", a)
  27538. } else {
  27539. var d = e - l
  27540. , f = e < h ? d : n ? d > t.unconstrainedWidth ? null : d : null;
  27541. i.setStyle("width", f)
  27542. }
  27543. var g = i.getBoundingRect();
  27544. o.width = g.width;
  27545. var y = (i.style.margin || 0) + 2.1;
  27546. o.height = g.height + y,
  27547. o.y -= (o.height - c) / 2
  27548. }
  27549. }
  27550. }
  27551. function kM(t) {
  27552. return "center" === t.position
  27553. }
  27554. function LM(t) {
  27555. var e, n, i = t.getData(), r = [], o = !1, a = (t.get("minShowLabelAngle") || 0) * CM, s = i.getLayout("viewRect"), l = i.getLayout("r"), u = s.width, h = s.x, c = s.y, p = s.height;
  27556. function d(t) {
  27557. t.ignore = !0
  27558. }
  27559. i.each((function(t) {
  27560. var s = i.getItemGraphicEl(t)
  27561. , c = s.shape
  27562. , p = s.getTextContent()
  27563. , f = s.getTextGuideLine()
  27564. , g = i.getItemModel(t)
  27565. , y = g.getModel("label")
  27566. , v = y.get("position") || g.get(["emphasis", "label", "position"])
  27567. , m = y.get("distanceToLabelLine")
  27568. , x = y.get("alignTo")
  27569. , _ = $r(y.get("edgeDistance"), u)
  27570. , b = y.get("bleedMargin")
  27571. , w = g.getModel("labelLine")
  27572. , S = w.get("length");
  27573. S = $r(S, u);
  27574. var M = w.get("length2");
  27575. if (M = $r(M, u),
  27576. Math.abs(c.endAngle - c.startAngle) < a)
  27577. return E(p.states, d),
  27578. p.ignore = !0,
  27579. void (f && (E(f.states, d),
  27580. f.ignore = !0));
  27581. if (function(t) {
  27582. if (!t.ignore)
  27583. return !0;
  27584. for (var e in t.states)
  27585. if (!1 === t.states[e].ignore)
  27586. return !0;
  27587. return !1
  27588. }(p)) {
  27589. var I, T, C, D, A = (c.startAngle + c.endAngle) / 2, k = Math.cos(A), L = Math.sin(A);
  27590. e = c.cx,
  27591. n = c.cy;
  27592. var P = "inside" === v || "inner" === v;
  27593. if ("center" === v)
  27594. I = c.cx,
  27595. T = c.cy,
  27596. D = "center";
  27597. else {
  27598. var O = (P ? (c.r + c.r0) / 2 * k : c.r * k) + e
  27599. , R = (P ? (c.r + c.r0) / 2 * L : c.r * L) + n;
  27600. if (I = O + 3 * k,
  27601. T = R + 3 * L,
  27602. !P) {
  27603. var N = O + k * (S + l - c.r)
  27604. , z = R + L * (S + l - c.r)
  27605. , V = N + (k < 0 ? -1 : 1) * M;
  27606. I = "edge" === x ? k < 0 ? h + _ : h + u - _ : V + (k < 0 ? -m : m),
  27607. T = z,
  27608. C = [[O, R], [N, z], [V, z]]
  27609. }
  27610. D = P ? "center" : "edge" === x ? k > 0 ? "right" : "left" : k > 0 ? "left" : "right"
  27611. }
  27612. var B = Math.PI
  27613. , F = 0
  27614. , G = y.get("rotate");
  27615. if (j(G))
  27616. F = G * (B / 180);
  27617. else if ("center" === v)
  27618. F = 0;
  27619. else if ("radial" === G || !0 === G) {
  27620. F = k < 0 ? -A + B : -A
  27621. } else if ("tangential" === G && "outside" !== v && "outer" !== v) {
  27622. var W = Math.atan2(k, L);
  27623. W < 0 && (W = 2 * B + W),
  27624. L > 0 && (W = B + W),
  27625. F = W - B
  27626. }
  27627. if (o = !!F,
  27628. p.x = I,
  27629. p.y = T,
  27630. p.rotation = F,
  27631. p.setStyle({
  27632. verticalAlign: "middle"
  27633. }),
  27634. P) {
  27635. p.setStyle({
  27636. align: D
  27637. });
  27638. var H = p.states.select;
  27639. H && (H.x += p.x,
  27640. H.y += p.y)
  27641. } else {
  27642. var Y = p.getBoundingRect().clone();
  27643. Y.applyTransform(p.getComputedTransform());
  27644. var X = (p.style.margin || 0) + 2.1;
  27645. Y.y -= X / 2,
  27646. Y.height += X,
  27647. r.push({
  27648. label: p,
  27649. labelLine: f,
  27650. position: v,
  27651. len: S,
  27652. len2: M,
  27653. minTurnAngle: w.get("minTurnAngle"),
  27654. maxSurfaceAngle: w.get("maxSurfaceAngle"),
  27655. surfaceNormal: new De(k,L),
  27656. linePoints: C,
  27657. textAlign: D,
  27658. labelDistance: m,
  27659. labelAlignTo: x,
  27660. edgeDistance: _,
  27661. bleedMargin: b,
  27662. rect: Y,
  27663. unconstrainedWidth: Y.width,
  27664. labelStyleWidth: p.style.width
  27665. })
  27666. }
  27667. s.setTextConfig({
  27668. inside: P
  27669. })
  27670. }
  27671. }
  27672. )),
  27673. !o && t.get("avoidLabelOverlap") && function(t, e, n, i, r, o, a, s) {
  27674. for (var l = [], u = [], h = Number.MAX_VALUE, c = -Number.MAX_VALUE, p = 0; p < t.length; p++) {
  27675. var d = t[p].label;
  27676. kM(t[p]) || (d.x < e ? (h = Math.min(h, d.x),
  27677. l.push(t[p])) : (c = Math.max(c, d.x),
  27678. u.push(t[p])))
  27679. }
  27680. for (p = 0; p < t.length; p++)
  27681. if (!kM(y = t[p]) && y.linePoints) {
  27682. if (null != y.labelStyleWidth)
  27683. continue;
  27684. d = y.label;
  27685. var f = y.linePoints
  27686. , g = void 0;
  27687. 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,
  27688. y.targetTextWidth = g,
  27689. AM(y, g)
  27690. }
  27691. for (DM(u, e, n, i, 1, 0, o, 0, s, c),
  27692. DM(l, e, n, i, -1, 0, o, 0, s, h),
  27693. p = 0; p < t.length; p++) {
  27694. var y;
  27695. if (!kM(y = t[p]) && y.linePoints) {
  27696. d = y.label,
  27697. f = y.linePoints;
  27698. var v = "edge" === y.labelAlignTo
  27699. , m = d.style.padding
  27700. , x = m ? m[1] + m[3] : 0
  27701. , _ = d.style.backgroundColor ? 0 : x
  27702. , b = y.rect.width + _
  27703. , w = f[1][0] - f[2][0];
  27704. 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,
  27705. f[1][0] = f[2][0] + w),
  27706. f[1][1] = f[2][1] = d.y
  27707. }
  27708. }
  27709. }(r, e, n, l, u, p, h, c);
  27710. for (var f = 0; f < r.length; f++) {
  27711. var g = r[f]
  27712. , y = g.label
  27713. , v = g.labelLine
  27714. , m = isNaN(y.x) || isNaN(y.y);
  27715. if (y) {
  27716. y.setStyle({
  27717. align: g.textAlign
  27718. }),
  27719. m && (E(y.states, d),
  27720. y.ignore = !0);
  27721. var x = y.states.select;
  27722. x && (x.x += y.x,
  27723. x.y += y.y)
  27724. }
  27725. if (v) {
  27726. var _ = g.linePoints;
  27727. m || !_ ? (E(v.states, d),
  27728. v.ignore = !0) : (Tb(_, g.minTurnAngle),
  27729. Cb(_, g.surfaceNormal, g.maxSurfaceAngle),
  27730. v.setShape({
  27731. points: _
  27732. }),
  27733. y.__hostTarget.textGuideLineConfig = {
  27734. anchor: new De(_[0][0],_[0][1])
  27735. })
  27736. }
  27737. }
  27738. }
  27739. var PM = function(t) {
  27740. function e(e, n, i) {
  27741. var r = t.call(this) || this;
  27742. r.z2 = 2;
  27743. var o = new Xs;
  27744. return r.setTextContent(o),
  27745. r.updateData(e, n, i, !0),
  27746. r
  27747. }
  27748. return n(e, t),
  27749. e.prototype.updateData = function(t, e, n, i) {
  27750. var r = this
  27751. , o = t.hostModel
  27752. , a = t.getItemModel(e)
  27753. , s = a.getModel("emphasis")
  27754. , l = t.getItemLayout(e)
  27755. , u = A(eM(a.getModel("itemStyle"), l, !0), l);
  27756. if (isNaN(u.startAngle))
  27757. r.setShape(u);
  27758. else {
  27759. if (i) {
  27760. r.setShape(u);
  27761. var h = o.getShallow("animationType");
  27762. o.ecModel.ssr ? (mh(r, {
  27763. scaleX: 0,
  27764. scaleY: 0
  27765. }, o, {
  27766. dataIndex: e,
  27767. isFrom: !0
  27768. }),
  27769. r.originX = u.cx,
  27770. r.originY = u.cy) : "scale" === h ? (r.shape.r = l.r0,
  27771. mh(r, {
  27772. shape: {
  27773. r: l.r
  27774. }
  27775. }, o, e)) : null != n ? (r.setShape({
  27776. startAngle: n,
  27777. endAngle: n
  27778. }),
  27779. mh(r, {
  27780. shape: {
  27781. startAngle: l.startAngle,
  27782. endAngle: l.endAngle
  27783. }
  27784. }, o, e)) : (r.shape.endAngle = l.startAngle,
  27785. vh(r, {
  27786. shape: {
  27787. endAngle: l.endAngle
  27788. }
  27789. }, o, e))
  27790. } else
  27791. Sh(r),
  27792. vh(r, {
  27793. shape: u
  27794. }, o, e);
  27795. r.useStyle(t.getItemVisual(e, "style")),
  27796. $l(r, a);
  27797. var c = (l.startAngle + l.endAngle) / 2
  27798. , p = o.get("selectedOffset")
  27799. , d = Math.cos(c) * p
  27800. , f = Math.sin(c) * p
  27801. , g = a.getShallow("cursor");
  27802. g && r.attr("cursor", g),
  27803. this._updateLabel(o, t, e),
  27804. r.ensureState("emphasis").shape = A({
  27805. r: l.r + (s.get("scale") && s.get("scaleSize") || 0)
  27806. }, eM(s.getModel("itemStyle"), l)),
  27807. A(r.ensureState("select"), {
  27808. x: d,
  27809. y: f,
  27810. shape: eM(a.getModel(["select", "itemStyle"]), l)
  27811. }),
  27812. A(r.ensureState("blur"), {
  27813. shape: eM(a.getModel(["blur", "itemStyle"]), l)
  27814. });
  27815. var y = r.getTextGuideLine()
  27816. , v = r.getTextContent();
  27817. y && A(y.ensureState("select"), {
  27818. x: d,
  27819. y: f
  27820. }),
  27821. A(v.ensureState("select"), {
  27822. x: d,
  27823. y: f
  27824. }),
  27825. Zl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  27826. }
  27827. }
  27828. ,
  27829. e.prototype._updateLabel = function(t, e, n) {
  27830. var i = this
  27831. , r = e.getItemModel(n)
  27832. , o = r.getModel("labelLine")
  27833. , a = e.getItemVisual(n, "style")
  27834. , s = a && a.fill
  27835. , l = a && a.opacity;
  27836. ic(i, rc(r), {
  27837. labelFetcher: e.hostModel,
  27838. labelDataIndex: n,
  27839. inheritColor: s,
  27840. defaultOpacity: l,
  27841. defaultText: t.getFormattedLabel(n, "normal") || e.getName(n)
  27842. });
  27843. var u = i.getTextContent();
  27844. i.setTextConfig({
  27845. position: null,
  27846. rotation: null
  27847. }),
  27848. u.attr({
  27849. z2: 10
  27850. });
  27851. var h = t.get(["label", "position"]);
  27852. if ("outside" !== h && "outer" !== h)
  27853. i.removeTextGuideLine();
  27854. else {
  27855. var c = this.getTextGuideLine();
  27856. c || (c = new Zu,
  27857. this.setTextGuideLine(c)),
  27858. kb(this, Lb(r), {
  27859. stroke: s,
  27860. opacity: ot(o.get(["lineStyle", "opacity"]), l, 1)
  27861. })
  27862. }
  27863. }
  27864. ,
  27865. e
  27866. }(Fu)
  27867. , OM = function(t) {
  27868. function e() {
  27869. var e = null !== t && t.apply(this, arguments) || this;
  27870. return e.ignoreLabelLineUpdate = !0,
  27871. e
  27872. }
  27873. return n(e, t),
  27874. e.prototype.render = function(t, e, n, i) {
  27875. var r, o = t.getData(), a = this._data, s = this.group;
  27876. if (!a && o.count() > 0) {
  27877. for (var l = o.getItemLayout(0), u = 1; isNaN(l && l.startAngle) && u < o.count(); ++u)
  27878. l = o.getItemLayout(u);
  27879. l && (r = l.startAngle)
  27880. }
  27881. if (this._emptyCircleSector && s.remove(this._emptyCircleSector),
  27882. 0 === o.count() && t.get("showEmptyCircle")) {
  27883. var h = IM(t)
  27884. , c = new Fu({
  27885. shape: A(SM(t, n), h)
  27886. });
  27887. c.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),
  27888. this._emptyCircleSector = c,
  27889. s.add(c)
  27890. }
  27891. o.diff(a).add((function(t) {
  27892. var e = new PM(o,t,r);
  27893. o.setItemGraphicEl(t, e),
  27894. s.add(e)
  27895. }
  27896. )).update((function(t, e) {
  27897. var n = a.getItemGraphicEl(e);
  27898. n.updateData(o, t, r),
  27899. n.off("click"),
  27900. s.add(n),
  27901. o.setItemGraphicEl(t, n)
  27902. }
  27903. )).remove((function(e) {
  27904. wh(a.getItemGraphicEl(e), t, e)
  27905. }
  27906. )).execute(),
  27907. LM(t),
  27908. "expansion" !== t.get("animationTypeUpdate") && (this._data = o)
  27909. }
  27910. ,
  27911. e.prototype.dispose = function() {}
  27912. ,
  27913. e.prototype.containPoint = function(t, e) {
  27914. var n = e.getData().getItemLayout(0);
  27915. if (n) {
  27916. var i = t[0] - n.cx
  27917. , r = t[1] - n.cy
  27918. , o = Math.sqrt(i * i + r * r);
  27919. return o <= n.r && o >= n.r0
  27920. }
  27921. }
  27922. ,
  27923. e.type = "pie",
  27924. e
  27925. }(Og);
  27926. function RM(t, e, n) {
  27927. e = Y(e) && {
  27928. coordDimensions: e
  27929. } || A({
  27930. encodeDefine: t.getEncode()
  27931. }, e);
  27932. var i = t.getSource()
  27933. , r = px(i, e).dimensions
  27934. , o = new cx(r,t);
  27935. return o.initData(i, n),
  27936. o
  27937. }
  27938. var NM = function() {
  27939. function t(t, e) {
  27940. this._getDataWithEncodedVisual = t,
  27941. this._getRawData = e
  27942. }
  27943. return t.prototype.getAllNames = function() {
  27944. var t = this._getRawData();
  27945. return t.mapArray(t.getName)
  27946. }
  27947. ,
  27948. t.prototype.containName = function(t) {
  27949. return this._getRawData().indexOfName(t) >= 0
  27950. }
  27951. ,
  27952. t.prototype.indexOfName = function(t) {
  27953. return this._getDataWithEncodedVisual().indexOfName(t)
  27954. }
  27955. ,
  27956. t.prototype.getItemVisual = function(t, e) {
  27957. return this._getDataWithEncodedVisual().getItemVisual(t, e)
  27958. }
  27959. ,
  27960. t
  27961. }()
  27962. , EM = Vo()
  27963. , zM = function(t) {
  27964. function e() {
  27965. return null !== t && t.apply(this, arguments) || this
  27966. }
  27967. return n(e, t),
  27968. e.prototype.init = function(e) {
  27969. t.prototype.init.apply(this, arguments),
  27970. this.legendVisualProvider = new NM(W(this.getData, this),W(this.getRawData, this)),
  27971. this._defaultLabelLine(e)
  27972. }
  27973. ,
  27974. e.prototype.mergeOption = function() {
  27975. t.prototype.mergeOption.apply(this, arguments)
  27976. }
  27977. ,
  27978. e.prototype.getInitialData = function() {
  27979. return RM(this, {
  27980. coordDimensions: ["value"],
  27981. encodeDefaulter: H(ed, this)
  27982. })
  27983. }
  27984. ,
  27985. e.prototype.getDataParams = function(e) {
  27986. var n = this.getData()
  27987. , i = EM(n)
  27988. , r = i.seats;
  27989. if (!r) {
  27990. var o = [];
  27991. n.each(n.mapDimension("value"), (function(t) {
  27992. o.push(t)
  27993. }
  27994. )),
  27995. r = i.seats = io(o, n.hostModel.get("percentPrecision"))
  27996. }
  27997. var a = t.prototype.getDataParams.call(this, e);
  27998. return a.percent = r[e] || 0,
  27999. a.$vars.push("percent"),
  28000. a
  28001. }
  28002. ,
  28003. e.prototype._defaultLabelLine = function(t) {
  28004. Co(t, "labelLine", ["show"]);
  28005. var e = t.labelLine
  28006. , n = t.emphasis.labelLine;
  28007. e.show = e.show && t.label.show,
  28008. n.show = n.show && t.emphasis.label.show
  28009. }
  28010. ,
  28011. e.type = "series.pie",
  28012. e.defaultOption = {
  28013. z: 2,
  28014. legendHoverLink: !0,
  28015. colorBy: "data",
  28016. center: ["50%", "50%"],
  28017. radius: [0, "75%"],
  28018. clockwise: !0,
  28019. startAngle: 90,
  28020. endAngle: "auto",
  28021. padAngle: 0,
  28022. minAngle: 0,
  28023. minShowLabelAngle: 0,
  28024. selectedOffset: 10,
  28025. percentPrecision: 2,
  28026. stillShowZeroSum: !0,
  28027. left: 0,
  28028. top: 0,
  28029. right: 0,
  28030. bottom: 0,
  28031. width: null,
  28032. height: null,
  28033. label: {
  28034. rotate: 0,
  28035. show: !0,
  28036. overflow: "truncate",
  28037. position: "outer",
  28038. alignTo: "none",
  28039. edgeDistance: "25%",
  28040. bleedMargin: 10,
  28041. distanceToLabelLine: 5
  28042. },
  28043. labelLine: {
  28044. show: !0,
  28045. length: 15,
  28046. length2: 15,
  28047. smooth: !1,
  28048. minTurnAngle: 90,
  28049. maxSurfaceAngle: 90,
  28050. lineStyle: {
  28051. width: 1,
  28052. type: "solid"
  28053. }
  28054. },
  28055. itemStyle: {
  28056. borderWidth: 1,
  28057. borderJoin: "round"
  28058. },
  28059. showEmptyCircle: !0,
  28060. emptyCircleStyle: {
  28061. color: "lightgray",
  28062. opacity: 1
  28063. },
  28064. labelLayout: {
  28065. hideOverlap: !0
  28066. },
  28067. emphasis: {
  28068. scale: !0,
  28069. scaleSize: 5
  28070. },
  28071. avoidLabelOverlap: !0,
  28072. animationType: "expansion",
  28073. animationDuration: 1e3,
  28074. animationTypeUpdate: "transition",
  28075. animationEasingUpdate: "cubicInOut",
  28076. animationDurationUpdate: 500,
  28077. animationEasing: "cubicInOut"
  28078. },
  28079. e
  28080. }(bg);
  28081. var VM = function(t) {
  28082. function e() {
  28083. var n = null !== t && t.apply(this, arguments) || this;
  28084. return n.type = e.type,
  28085. n.hasSymbolVisual = !0,
  28086. n
  28087. }
  28088. return n(e, t),
  28089. e.prototype.getInitialData = function(t, e) {
  28090. return _x(null, this, {
  28091. useEncodeDefaulter: !0
  28092. })
  28093. }
  28094. ,
  28095. e.prototype.getProgressive = function() {
  28096. var t = this.option.progressive;
  28097. return null == t ? this.option.large ? 5e3 : this.get("progressive") : t
  28098. }
  28099. ,
  28100. e.prototype.getProgressiveThreshold = function() {
  28101. var t = this.option.progressiveThreshold;
  28102. return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t
  28103. }
  28104. ,
  28105. e.prototype.brushSelector = function(t, e, n) {
  28106. return n.point(e.getItemLayout(t))
  28107. }
  28108. ,
  28109. e.prototype.getZLevelKey = function() {
  28110. return this.getData().count() > this.getProgressiveThreshold() ? this.id : ""
  28111. }
  28112. ,
  28113. e.type = "series.scatter",
  28114. e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"],
  28115. e.defaultOption = {
  28116. coordinateSystem: "cartesian2d",
  28117. z: 2,
  28118. legendHoverLink: !0,
  28119. symbolSize: 10,
  28120. large: !1,
  28121. largeThreshold: 2e3,
  28122. itemStyle: {
  28123. opacity: .8
  28124. },
  28125. emphasis: {
  28126. scale: !0
  28127. },
  28128. clip: !0,
  28129. select: {
  28130. itemStyle: {
  28131. borderColor: "#212121"
  28132. }
  28133. },
  28134. universalTransition: {
  28135. divideShape: "clone"
  28136. }
  28137. },
  28138. e
  28139. }(bg)
  28140. , BM = function() {}
  28141. , FM = function(t) {
  28142. function e(e) {
  28143. var n = t.call(this, e) || this;
  28144. return n._off = 0,
  28145. n.hoverDataIdx = -1,
  28146. n
  28147. }
  28148. return n(e, t),
  28149. e.prototype.getDefaultShape = function() {
  28150. return new BM
  28151. }
  28152. ,
  28153. e.prototype.reset = function() {
  28154. this.notClear = !1,
  28155. this._off = 0
  28156. }
  28157. ,
  28158. e.prototype.buildPath = function(t, e) {
  28159. var n, i = e.points, r = e.size, o = this.symbolProxy, a = o.shape, s = t.getContext ? t.getContext() : t, l = s && r[0] < 4, u = this.softClipShape;
  28160. if (l)
  28161. this._ctx = s;
  28162. else {
  28163. for (this._ctx = null,
  28164. n = this._off; n < i.length; ) {
  28165. var h = i[n++]
  28166. , c = i[n++];
  28167. isNaN(h) || isNaN(c) || (u && !u.contain(h, c) || (a.x = h - r[0] / 2,
  28168. a.y = c - r[1] / 2,
  28169. a.width = r[0],
  28170. a.height = r[1],
  28171. o.buildPath(t, a, !0)))
  28172. }
  28173. this.incremental && (this._off = n,
  28174. this.notClear = !0)
  28175. }
  28176. }
  28177. ,
  28178. e.prototype.afterBrush = function() {
  28179. var t, e = this.shape, n = e.points, i = e.size, r = this._ctx, o = this.softClipShape;
  28180. if (r) {
  28181. for (t = this._off; t < n.length; ) {
  28182. var a = n[t++]
  28183. , s = n[t++];
  28184. isNaN(a) || isNaN(s) || (o && !o.contain(a, s) || r.fillRect(a - i[0] / 2, s - i[1] / 2, i[0], i[1]))
  28185. }
  28186. this.incremental && (this._off = t,
  28187. this.notClear = !0)
  28188. }
  28189. }
  28190. ,
  28191. e.prototype.findDataIndex = function(t, e) {
  28192. 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--) {
  28193. var l = 2 * s
  28194. , u = i[l] - o / 2
  28195. , h = i[l + 1] - a / 2;
  28196. if (t >= u && e >= h && t <= u + o && e <= h + a)
  28197. return s
  28198. }
  28199. return -1
  28200. }
  28201. ,
  28202. e.prototype.contain = function(t, e) {
  28203. var n = this.transformCoordToLocal(t, e)
  28204. , i = this.getBoundingRect();
  28205. return t = n[0],
  28206. e = n[1],
  28207. i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1,
  28208. !1)
  28209. }
  28210. ,
  28211. e.prototype.getBoundingRect = function() {
  28212. var t = this._rect;
  28213. if (!t) {
  28214. 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; ) {
  28215. var c = n[h++]
  28216. , p = n[h++];
  28217. a = Math.min(c, a),
  28218. l = Math.max(c, l),
  28219. s = Math.min(p, s),
  28220. u = Math.max(p, u)
  28221. }
  28222. t = this._rect = new ze(a - r / 2,s - o / 2,l - a + r,u - s + o)
  28223. }
  28224. return t
  28225. }
  28226. ,
  28227. e
  28228. }(ks)
  28229. , GM = function() {
  28230. function t() {
  28231. this.group = new Br
  28232. }
  28233. return t.prototype.updateData = function(t, e) {
  28234. this._clear();
  28235. var n = this._create();
  28236. n.setShape({
  28237. points: t.getLayout("points")
  28238. }),
  28239. this._setCommon(n, t, e)
  28240. }
  28241. ,
  28242. t.prototype.updateLayout = function(t) {
  28243. var e = t.getLayout("points");
  28244. this.group.eachChild((function(t) {
  28245. if (null != t.startIndex) {
  28246. var n = 2 * (t.endIndex - t.startIndex)
  28247. , i = 4 * t.startIndex * 2;
  28248. e = new Float32Array(e.buffer,i,n)
  28249. }
  28250. t.setShape("points", e),
  28251. t.reset()
  28252. }
  28253. ))
  28254. }
  28255. ,
  28256. t.prototype.incrementalPrepareUpdate = function(t) {
  28257. this._clear()
  28258. }
  28259. ,
  28260. t.prototype.incrementalUpdate = function(t, e, n) {
  28261. var i = this._newAdded[0]
  28262. , r = e.getLayout("points")
  28263. , o = i && i.shape.points;
  28264. if (o && o.length < 2e4) {
  28265. var a = o.length
  28266. , s = new Float32Array(a + r.length);
  28267. s.set(o),
  28268. s.set(r, a),
  28269. i.endIndex = t.end,
  28270. i.setShape({
  28271. points: s
  28272. })
  28273. } else {
  28274. this._newAdded = [];
  28275. var l = this._create();
  28276. l.startIndex = t.start,
  28277. l.endIndex = t.end,
  28278. l.incremental = !0,
  28279. l.setShape({
  28280. points: r
  28281. }),
  28282. this._setCommon(l, e, n)
  28283. }
  28284. }
  28285. ,
  28286. t.prototype.eachRendered = function(t) {
  28287. this._newAdded[0] && t(this._newAdded[0])
  28288. }
  28289. ,
  28290. t.prototype._create = function() {
  28291. var t = new FM({
  28292. cursor: "default"
  28293. });
  28294. return t.ignoreCoarsePointer = !0,
  28295. this.group.add(t),
  28296. this._newAdded.push(t),
  28297. t
  28298. }
  28299. ,
  28300. t.prototype._setCommon = function(t, e, n) {
  28301. var i = e.hostModel;
  28302. n = n || {};
  28303. var r = e.getVisual("symbolSize");
  28304. t.setShape("size", r instanceof Array ? r : [r, r]),
  28305. t.softClipShape = n.clipShape || null,
  28306. t.symbolProxy = Xy(e.getVisual("symbol"), 0, 0, 0, 0),
  28307. t.setColor = t.symbolProxy.setColor;
  28308. var o = t.shape.size[0] < 4;
  28309. t.useStyle(i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
  28310. var a = e.getVisual("style")
  28311. , s = a && a.fill;
  28312. s && t.setColor(s);
  28313. var l = rl(t);
  28314. l.seriesIndex = i.seriesIndex,
  28315. t.on("mousemove", (function(e) {
  28316. l.dataIndex = null;
  28317. var n = t.hoverDataIdx;
  28318. n >= 0 && (l.dataIndex = n + (t.startIndex || 0))
  28319. }
  28320. ))
  28321. }
  28322. ,
  28323. t.prototype.remove = function() {
  28324. this._clear()
  28325. }
  28326. ,
  28327. t.prototype._clear = function() {
  28328. this._newAdded = [],
  28329. this.group.removeAll()
  28330. }
  28331. ,
  28332. t
  28333. }()
  28334. , WM = function(t) {
  28335. function e() {
  28336. var n = null !== t && t.apply(this, arguments) || this;
  28337. return n.type = e.type,
  28338. n
  28339. }
  28340. return n(e, t),
  28341. e.prototype.render = function(t, e, n) {
  28342. var i = t.getData();
  28343. this._updateSymbolDraw(i, t).updateData(i, {
  28344. clipShape: this._getClipShape(t)
  28345. }),
  28346. this._finished = !0
  28347. }
  28348. ,
  28349. e.prototype.incrementalPrepareRender = function(t, e, n) {
  28350. var i = t.getData();
  28351. this._updateSymbolDraw(i, t).incrementalPrepareUpdate(i),
  28352. this._finished = !1
  28353. }
  28354. ,
  28355. e.prototype.incrementalRender = function(t, e, n) {
  28356. this._symbolDraw.incrementalUpdate(t, e.getData(), {
  28357. clipShape: this._getClipShape(e)
  28358. }),
  28359. this._finished = t.end === e.getData().count()
  28360. }
  28361. ,
  28362. e.prototype.updateTransform = function(t, e, n) {
  28363. var i = t.getData();
  28364. if (this.group.dirty(),
  28365. !this._finished || i.count() > 1e4)
  28366. return {
  28367. update: !0
  28368. };
  28369. var r = XS("").reset(t, e, n);
  28370. r.progress && r.progress({
  28371. start: 0,
  28372. end: i.count(),
  28373. count: i.count()
  28374. }, i),
  28375. this._symbolDraw.updateLayout(i)
  28376. }
  28377. ,
  28378. e.prototype.eachRendered = function(t) {
  28379. this._symbolDraw && this._symbolDraw.eachRendered(t)
  28380. }
  28381. ,
  28382. e.prototype._getClipShape = function(t) {
  28383. if (t.get("clip", !0)) {
  28384. var e = t.coordinateSystem;
  28385. return e && e.getArea && e.getArea(.1)
  28386. }
  28387. }
  28388. ,
  28389. e.prototype._updateSymbolDraw = function(t, e) {
  28390. var n = this._symbolDraw
  28391. , i = e.pipelineContext.large;
  28392. return n && i === this._isLargeDraw || (n && n.remove(),
  28393. n = this._symbolDraw = i ? new GM : new xS,
  28394. this._isLargeDraw = i,
  28395. this.group.removeAll()),
  28396. this.group.add(n.group),
  28397. n
  28398. }
  28399. ,
  28400. e.prototype.remove = function(t, e) {
  28401. this._symbolDraw && this._symbolDraw.remove(!0),
  28402. this._symbolDraw = null
  28403. }
  28404. ,
  28405. e.prototype.dispose = function() {}
  28406. ,
  28407. e.type = "scatter",
  28408. e
  28409. }(Og)
  28410. , HM = function(t) {
  28411. function e() {
  28412. return null !== t && t.apply(this, arguments) || this
  28413. }
  28414. return n(e, t),
  28415. e.type = "grid",
  28416. e.dependencies = ["xAxis", "yAxis"],
  28417. e.layoutMode = "box",
  28418. e.defaultOption = {
  28419. show: !1,
  28420. z: 0,
  28421. left: "10%",
  28422. top: 60,
  28423. right: "10%",
  28424. bottom: 70,
  28425. containLabel: !1,
  28426. backgroundColor: "rgba(0,0,0,0)",
  28427. borderWidth: 1,
  28428. borderColor: "#ccc"
  28429. },
  28430. e
  28431. }(zp)
  28432. , YM = function(t) {
  28433. function e() {
  28434. return null !== t && t.apply(this, arguments) || this
  28435. }
  28436. return n(e, t),
  28437. e.prototype.getCoordSysModel = function() {
  28438. return this.getReferringComponents("grid", Wo).models[0]
  28439. }
  28440. ,
  28441. e.type = "cartesian2dAxis",
  28442. e
  28443. }(zp);
  28444. R(YM, D_);
  28445. var XM = {
  28446. show: !0,
  28447. z: 0,
  28448. inverse: !1,
  28449. name: "",
  28450. nameLocation: "end",
  28451. nameRotate: null,
  28452. nameTruncate: {
  28453. maxWidth: null,
  28454. ellipsis: "...",
  28455. placeholder: "."
  28456. },
  28457. nameTextStyle: {},
  28458. nameGap: 15,
  28459. silent: !1,
  28460. triggerEvent: !1,
  28461. tooltip: {
  28462. show: !1
  28463. },
  28464. axisPointer: {},
  28465. axisLine: {
  28466. show: !0,
  28467. onZero: !0,
  28468. onZeroAxisIndex: null,
  28469. lineStyle: {
  28470. color: "#6E7079",
  28471. width: 1,
  28472. type: "solid"
  28473. },
  28474. symbol: ["none", "none"],
  28475. symbolSize: [10, 15]
  28476. },
  28477. axisTick: {
  28478. show: !0,
  28479. inside: !1,
  28480. length: 5,
  28481. lineStyle: {
  28482. width: 1
  28483. }
  28484. },
  28485. axisLabel: {
  28486. show: !0,
  28487. inside: !1,
  28488. rotate: 0,
  28489. showMinLabel: null,
  28490. showMaxLabel: null,
  28491. margin: 8,
  28492. fontSize: 12
  28493. },
  28494. splitLine: {
  28495. show: !0,
  28496. showMinLine: !0,
  28497. showMaxLine: !0,
  28498. lineStyle: {
  28499. color: ["#E0E6F1"],
  28500. width: 1,
  28501. type: "solid"
  28502. }
  28503. },
  28504. splitArea: {
  28505. show: !1,
  28506. areaStyle: {
  28507. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  28508. }
  28509. }
  28510. }
  28511. , UM = C({
  28512. boundaryGap: !0,
  28513. deduplication: null,
  28514. splitLine: {
  28515. show: !1
  28516. },
  28517. axisTick: {
  28518. alignWithLabel: !1,
  28519. interval: "auto"
  28520. },
  28521. axisLabel: {
  28522. interval: "auto"
  28523. }
  28524. }, XM)
  28525. , ZM = C({
  28526. boundaryGap: [0, 0],
  28527. axisLine: {
  28528. show: "auto"
  28529. },
  28530. axisTick: {
  28531. show: "auto"
  28532. },
  28533. splitNumber: 5,
  28534. minorTick: {
  28535. show: !1,
  28536. splitNumber: 5,
  28537. length: 3,
  28538. lineStyle: {}
  28539. },
  28540. minorSplitLine: {
  28541. show: !1,
  28542. lineStyle: {
  28543. color: "#F4F7FD",
  28544. width: 1
  28545. }
  28546. }
  28547. }, XM)
  28548. , jM = {
  28549. category: UM,
  28550. value: ZM,
  28551. time: C({
  28552. splitNumber: 6,
  28553. axisLabel: {
  28554. showMinLabel: !1,
  28555. showMaxLabel: !1,
  28556. rich: {
  28557. primary: {
  28558. fontWeight: "bold"
  28559. }
  28560. }
  28561. },
  28562. splitLine: {
  28563. show: !1
  28564. }
  28565. }, ZM),
  28566. log: k({
  28567. logBase: 10
  28568. }, ZM)
  28569. }
  28570. , qM = {
  28571. value: 1,
  28572. category: 1,
  28573. time: 1,
  28574. log: 1
  28575. };
  28576. function KM(t, e, i, r) {
  28577. E(qM, (function(o, a) {
  28578. var s = C(C({}, jM[a], !0), r, !0)
  28579. , l = function(t) {
  28580. function i() {
  28581. var n = null !== t && t.apply(this, arguments) || this;
  28582. return n.type = e + "Axis." + a,
  28583. n
  28584. }
  28585. return n(i, t),
  28586. i.prototype.mergeDefaultAndTheme = function(t, e) {
  28587. var n = Pp(this)
  28588. , i = n ? Rp(t) : {};
  28589. C(t, e.getTheme().get(a + "Axis")),
  28590. C(t, this.getDefaultOption()),
  28591. t.type = $M(t),
  28592. n && Op(t, i, n)
  28593. }
  28594. ,
  28595. i.prototype.optionUpdated = function() {
  28596. "category" === this.option.type && (this.__ordinalMeta = Mx.createByAxisModel(this))
  28597. }
  28598. ,
  28599. i.prototype.getCategories = function(t) {
  28600. var e = this.option;
  28601. if ("category" === e.type)
  28602. return t ? e.data : this.__ordinalMeta.categories
  28603. }
  28604. ,
  28605. i.prototype.getOrdinalMeta = function() {
  28606. return this.__ordinalMeta
  28607. }
  28608. ,
  28609. i.type = e + "Axis." + a,
  28610. i.defaultOption = s,
  28611. i
  28612. }(i);
  28613. t.registerComponentModel(l)
  28614. }
  28615. )),
  28616. t.registerSubTypeDefaulter(e + "Axis", $M)
  28617. }
  28618. function $M(t) {
  28619. return t.type || (t.data ? "category" : "value")
  28620. }
  28621. var JM = function() {
  28622. function t(t) {
  28623. this.type = "cartesian",
  28624. this._dimList = [],
  28625. this._axes = {},
  28626. this.name = t || ""
  28627. }
  28628. return t.prototype.getAxis = function(t) {
  28629. return this._axes[t]
  28630. }
  28631. ,
  28632. t.prototype.getAxes = function() {
  28633. return z(this._dimList, (function(t) {
  28634. return this._axes[t]
  28635. }
  28636. ), this)
  28637. }
  28638. ,
  28639. t.prototype.getAxesByScale = function(t) {
  28640. return t = t.toLowerCase(),
  28641. B(this.getAxes(), (function(e) {
  28642. return e.scale.type === t
  28643. }
  28644. ))
  28645. }
  28646. ,
  28647. t.prototype.addAxis = function(t) {
  28648. var e = t.dim;
  28649. this._axes[e] = t,
  28650. this._dimList.push(e)
  28651. }
  28652. ,
  28653. t
  28654. }()
  28655. , QM = ["x", "y"];
  28656. function tI(t) {
  28657. return "interval" === t.type || "time" === t.type
  28658. }
  28659. var eI = function(t) {
  28660. function e() {
  28661. var e = null !== t && t.apply(this, arguments) || this;
  28662. return e.type = "cartesian2d",
  28663. e.dimensions = QM,
  28664. e
  28665. }
  28666. return n(e, t),
  28667. e.prototype.calcAffineTransform = function() {
  28668. this._transform = this._invTransform = null;
  28669. var t = this.getAxis("x").scale
  28670. , e = this.getAxis("y").scale;
  28671. if (tI(t) && tI(e)) {
  28672. var n = t.getExtent()
  28673. , i = e.getExtent()
  28674. , r = this.dataToPoint([n[0], i[0]])
  28675. , o = this.dataToPoint([n[1], i[1]])
  28676. , a = n[1] - n[0]
  28677. , s = i[1] - i[0];
  28678. if (a && s) {
  28679. var l = (o[0] - r[0]) / a
  28680. , u = (o[1] - r[1]) / s
  28681. , h = r[0] - n[0] * l
  28682. , c = r[1] - i[0] * u
  28683. , p = this._transform = [l, 0, 0, u, h, c];
  28684. this._invTransform = Ie([], p)
  28685. }
  28686. }
  28687. }
  28688. ,
  28689. e.prototype.getBaseAxis = function() {
  28690. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
  28691. }
  28692. ,
  28693. e.prototype.containPoint = function(t) {
  28694. var e = this.getAxis("x")
  28695. , n = this.getAxis("y");
  28696. return e.contain(e.toLocalCoord(t[0])) && n.contain(n.toLocalCoord(t[1]))
  28697. }
  28698. ,
  28699. e.prototype.containData = function(t) {
  28700. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
  28701. }
  28702. ,
  28703. e.prototype.containZone = function(t, e) {
  28704. var n = this.dataToPoint(t)
  28705. , i = this.dataToPoint(e)
  28706. , r = this.getArea()
  28707. , o = new ze(n[0],n[1],i[0] - n[0],i[1] - n[1]);
  28708. return r.intersect(o)
  28709. }
  28710. ,
  28711. e.prototype.dataToPoint = function(t, e, n) {
  28712. n = n || [];
  28713. var i = t[0]
  28714. , r = t[1];
  28715. if (this._transform && null != i && isFinite(i) && null != r && isFinite(r))
  28716. return Wt(n, t, this._transform);
  28717. var o = this.getAxis("x")
  28718. , a = this.getAxis("y");
  28719. return n[0] = o.toGlobalCoord(o.dataToCoord(i, e)),
  28720. n[1] = a.toGlobalCoord(a.dataToCoord(r, e)),
  28721. n
  28722. }
  28723. ,
  28724. e.prototype.clampData = function(t, e) {
  28725. var n = this.getAxis("x").scale
  28726. , i = this.getAxis("y").scale
  28727. , r = n.getExtent()
  28728. , o = i.getExtent()
  28729. , a = n.parse(t[0])
  28730. , s = i.parse(t[1]);
  28731. return (e = e || [])[0] = Math.min(Math.max(Math.min(r[0], r[1]), a), Math.max(r[0], r[1])),
  28732. e[1] = Math.min(Math.max(Math.min(o[0], o[1]), s), Math.max(o[0], o[1])),
  28733. e
  28734. }
  28735. ,
  28736. e.prototype.pointToData = function(t, e) {
  28737. var n = [];
  28738. if (this._invTransform)
  28739. return Wt(n, t, this._invTransform);
  28740. var i = this.getAxis("x")
  28741. , r = this.getAxis("y");
  28742. return n[0] = i.coordToData(i.toLocalCoord(t[0]), e),
  28743. n[1] = r.coordToData(r.toLocalCoord(t[1]), e),
  28744. n
  28745. }
  28746. ,
  28747. e.prototype.getOtherAxis = function(t) {
  28748. return this.getAxis("x" === t.dim ? "y" : "x")
  28749. }
  28750. ,
  28751. e.prototype.getArea = function(t) {
  28752. t = t || 0;
  28753. var e = this.getAxis("x").getGlobalExtent()
  28754. , n = this.getAxis("y").getGlobalExtent()
  28755. , i = Math.min(e[0], e[1]) - t
  28756. , r = Math.min(n[0], n[1]) - t
  28757. , o = Math.max(e[0], e[1]) - i + t
  28758. , a = Math.max(n[0], n[1]) - r + t;
  28759. return new ze(i,r,o,a)
  28760. }
  28761. ,
  28762. e
  28763. }(JM)
  28764. , nI = function(t) {
  28765. function e(e, n, i, r, o) {
  28766. var a = t.call(this, e, n, i) || this;
  28767. return a.index = 0,
  28768. a.type = r || "value",
  28769. a.position = o || "bottom",
  28770. a
  28771. }
  28772. return n(e, t),
  28773. e.prototype.isHorizontal = function() {
  28774. var t = this.position;
  28775. return "top" === t || "bottom" === t
  28776. }
  28777. ,
  28778. e.prototype.getGlobalExtent = function(t) {
  28779. var e = this.getExtent();
  28780. return e[0] = this.toGlobalCoord(e[0]),
  28781. e[1] = this.toGlobalCoord(e[1]),
  28782. t && e[0] > e[1] && e.reverse(),
  28783. e
  28784. }
  28785. ,
  28786. e.prototype.pointToData = function(t, e) {
  28787. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
  28788. }
  28789. ,
  28790. e.prototype.setCategorySortInfo = function(t) {
  28791. if ("category" !== this.type)
  28792. return !1;
  28793. this.model.option.categorySortInfo = t,
  28794. this.scale.setSortInfo(t)
  28795. }
  28796. ,
  28797. e
  28798. }(ab);
  28799. function iI(t, e, n) {
  28800. n = n || {};
  28801. var i = t.coordinateSystem
  28802. , r = e.axis
  28803. , o = {}
  28804. , a = r.getAxesOnZeroOf()[0]
  28805. , s = r.position
  28806. , l = a ? "onZero" : s
  28807. , u = r.dim
  28808. , h = i.getRect()
  28809. , c = [h.x, h.x + h.width, h.y, h.y + h.height]
  28810. , p = {
  28811. left: 0,
  28812. right: 1,
  28813. top: 0,
  28814. bottom: 1,
  28815. onZero: 2
  28816. }
  28817. , d = e.get("offset") || 0
  28818. , f = "x" === u ? [c[2] - d, c[3] + d] : [c[0] - d, c[1] + d];
  28819. if (a) {
  28820. var g = a.toGlobalCoord(a.dataToCoord(0));
  28821. f[p.onZero] = Math.max(Math.min(g, f[1]), f[0])
  28822. }
  28823. o.position = ["y" === u ? f[p[l]] : c[0], "x" === u ? f[p[l]] : c[3]],
  28824. o.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
  28825. o.labelDirection = o.tickDirection = o.nameDirection = {
  28826. top: -1,
  28827. bottom: 1,
  28828. left: -1,
  28829. right: 1
  28830. }[s],
  28831. o.labelOffset = a ? f[p[s]] - f[p.onZero] : 0,
  28832. e.get(["axisTick", "inside"]) && (o.tickDirection = -o.tickDirection),
  28833. it(n.labelInside, e.get(["axisLabel", "inside"])) && (o.labelDirection = -o.labelDirection);
  28834. var y = e.get(["axisLabel", "rotate"]);
  28835. return o.labelRotate = "top" === l ? -y : y,
  28836. o.z2 = 1,
  28837. o
  28838. }
  28839. function rI(t) {
  28840. return "cartesian2d" === t.get("coordinateSystem")
  28841. }
  28842. function oI(t) {
  28843. var e = {
  28844. xAxisModel: null,
  28845. yAxisModel: null
  28846. };
  28847. return E(e, (function(n, i) {
  28848. var r = i.replace(/Model$/, "")
  28849. , o = t.getReferringComponents(r, Wo).models[0];
  28850. e[i] = o
  28851. }
  28852. )),
  28853. e
  28854. }
  28855. var aI = Math.log;
  28856. function sI(t, e, n) {
  28857. var i = Ex.prototype
  28858. , r = i.getTicks.call(n)
  28859. , o = i.getTicks.call(n, !0)
  28860. , a = r.length - 1
  28861. , s = i.getInterval.call(n)
  28862. , l = x_(t, e)
  28863. , u = l.extent
  28864. , h = l.fixMin
  28865. , c = l.fixMax;
  28866. if ("log" === t.type) {
  28867. var p = aI(t.base);
  28868. u = [aI(u[0]) / p, aI(u[1]) / p]
  28869. }
  28870. t.setExtent(u[0], u[1]),
  28871. t.calcNiceExtent({
  28872. splitNumber: a,
  28873. fixMin: h,
  28874. fixMax: c
  28875. });
  28876. var d = i.getExtent.call(t);
  28877. h && (u[0] = d[0]),
  28878. c && (u[1] = d[1]);
  28879. var f = i.getInterval.call(t)
  28880. , g = u[0]
  28881. , y = u[1];
  28882. if (h && c)
  28883. f = (y - g) / a;
  28884. else if (h)
  28885. for (y = u[0] + f * a; y < u[1] && isFinite(y) && isFinite(u[1]); )
  28886. f = Dx(f),
  28887. y = u[0] + f * a;
  28888. else if (c)
  28889. for (g = u[1] - f * a; g > u[0] && isFinite(g) && isFinite(u[0]); )
  28890. f = Dx(f),
  28891. g = u[1] - f * a;
  28892. else {
  28893. t.getTicks().length - 1 > a && (f = Dx(f));
  28894. var v = f * a;
  28895. (g = Jr((y = Math.ceil(u[1] / f) * f) - v)) < 0 && u[0] >= 0 ? (g = 0,
  28896. y = Jr(v)) : y > 0 && u[1] <= 0 && (y = 0,
  28897. g = -Jr(v))
  28898. }
  28899. var m = (r[0].value - o[0].value) / s
  28900. , x = (r[a].value - o[a].value) / s;
  28901. i.setExtent.call(t, g + f * m, y + f * x),
  28902. i.setInterval.call(t, f),
  28903. (m || x) && i.setNiceExtent.call(t, g + f, y - f)
  28904. }
  28905. var lI = function() {
  28906. function t(t, e, n) {
  28907. this.type = "grid",
  28908. this._coordsMap = {},
  28909. this._coordsList = [],
  28910. this._axesMap = {},
  28911. this._axesList = [],
  28912. this.axisPointerEnabled = !0,
  28913. this.dimensions = QM,
  28914. this._initCartesian(t, e, n),
  28915. this.model = t
  28916. }
  28917. return t.prototype.getRect = function() {
  28918. return this._rect
  28919. }
  28920. ,
  28921. t.prototype.update = function(t, e) {
  28922. var n = this._axesMap;
  28923. function i(t) {
  28924. var e, n = G(t), i = n.length;
  28925. if (i) {
  28926. for (var r = [], o = i - 1; o >= 0; o--) {
  28927. var a = t[+n[o]]
  28928. , s = a.model
  28929. , l = a.scale;
  28930. Tx(l) && s.get("alignTicks") && null == s.get("interval") ? r.push(a) : (__(l, s),
  28931. Tx(l) && (e = a))
  28932. }
  28933. r.length && (e || __((e = r.pop()).scale, e.model),
  28934. E(r, (function(t) {
  28935. sI(t.scale, t.model, e.scale)
  28936. }
  28937. )))
  28938. }
  28939. }
  28940. this._updateScale(t, this.model),
  28941. i(n.x),
  28942. i(n.y);
  28943. var r = {};
  28944. E(n.x, (function(t) {
  28945. hI(n, "y", t, r)
  28946. }
  28947. )),
  28948. E(n.y, (function(t) {
  28949. hI(n, "x", t, r)
  28950. }
  28951. )),
  28952. this.resize(this.model, e)
  28953. }
  28954. ,
  28955. t.prototype.resize = function(t, e, n) {
  28956. var i = t.getBoxLayoutParams()
  28957. , r = !n && t.get("containLabel")
  28958. , o = kp(i, {
  28959. width: e.getWidth(),
  28960. height: e.getHeight()
  28961. });
  28962. this._rect = o;
  28963. var a = this._axesList;
  28964. function s() {
  28965. E(a, (function(t) {
  28966. var e = t.isHorizontal()
  28967. , n = e ? [0, o.width] : [0, o.height]
  28968. , i = t.inverse ? 1 : 0;
  28969. t.setExtent(n[i], n[1 - i]),
  28970. function(t, e) {
  28971. var n = t.getExtent()
  28972. , i = n[0] + n[1];
  28973. t.toGlobalCoord = "x" === t.dim ? function(t) {
  28974. return t + e
  28975. }
  28976. : function(t) {
  28977. return i - t + e
  28978. }
  28979. ,
  28980. t.toLocalCoord = "x" === t.dim ? function(t) {
  28981. return t - e
  28982. }
  28983. : function(t) {
  28984. return i - t + e
  28985. }
  28986. }(t, e ? o.x : o.y)
  28987. }
  28988. ))
  28989. }
  28990. s(),
  28991. r && (E(a, (function(t) {
  28992. if (!t.model.get(["axisLabel", "inside"])) {
  28993. var e = function(t) {
  28994. var e = t.model
  28995. , n = t.scale;
  28996. if (e.get(["axisLabel", "show"]) && !n.isBlank()) {
  28997. var i, r, o = n.getExtent();
  28998. r = n instanceof Rx ? n.count() : (i = n.getTicks()).length;
  28999. var a, s = t.getLabelModel(), l = w_(t), u = 1;
  29000. r > 40 && (u = Math.ceil(r / 40));
  29001. for (var h = 0; h < r; h += u) {
  29002. var c = l(i ? i[h] : {
  29003. value: o[0] + h
  29004. }, h)
  29005. , p = M_(s.getTextRect(c), s.get("rotate") || 0);
  29006. a ? a.union(p) : a = p
  29007. }
  29008. return a
  29009. }
  29010. }(t);
  29011. if (e) {
  29012. var n = t.isHorizontal() ? "height" : "width"
  29013. , i = t.model.get(["axisLabel", "margin"]);
  29014. o[n] -= e[n] + i,
  29015. "top" === t.position ? o.y += e.height + i : "left" === t.position && (o.x += e.width + i)
  29016. }
  29017. }
  29018. }
  29019. )),
  29020. s()),
  29021. E(this._coordsList, (function(t) {
  29022. t.calcAffineTransform()
  29023. }
  29024. ))
  29025. }
  29026. ,
  29027. t.prototype.getAxis = function(t, e) {
  29028. var n = this._axesMap[t];
  29029. if (null != n)
  29030. return n[e || 0]
  29031. }
  29032. ,
  29033. t.prototype.getAxes = function() {
  29034. return this._axesList.slice()
  29035. }
  29036. ,
  29037. t.prototype.getCartesian = function(t, e) {
  29038. if (null != t && null != e) {
  29039. var n = "x" + t + "y" + e;
  29040. return this._coordsMap[n]
  29041. }
  29042. q(t) && (e = t.yAxisIndex,
  29043. t = t.xAxisIndex);
  29044. for (var i = 0, r = this._coordsList; i < r.length; i++)
  29045. if (r[i].getAxis("x").index === t || r[i].getAxis("y").index === e)
  29046. return r[i]
  29047. }
  29048. ,
  29049. t.prototype.getCartesians = function() {
  29050. return this._coordsList.slice()
  29051. }
  29052. ,
  29053. t.prototype.convertToPixel = function(t, e, n) {
  29054. var i = this._findConvertTarget(e);
  29055. return i.cartesian ? i.cartesian.dataToPoint(n) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(n)) : null
  29056. }
  29057. ,
  29058. t.prototype.convertFromPixel = function(t, e, n) {
  29059. var i = this._findConvertTarget(e);
  29060. return i.cartesian ? i.cartesian.pointToData(n) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(n)) : null
  29061. }
  29062. ,
  29063. t.prototype._findConvertTarget = function(t) {
  29064. var e, n, i = t.seriesModel, r = t.xAxisModel || i && i.getReferringComponents("xAxis", Wo).models[0], o = t.yAxisModel || i && i.getReferringComponents("yAxis", Wo).models[0], a = t.gridModel, s = this._coordsList;
  29065. if (i)
  29066. P(s, e = i.coordinateSystem) < 0 && (e = null);
  29067. else if (r && o)
  29068. e = this.getCartesian(r.componentIndex, o.componentIndex);
  29069. else if (r)
  29070. n = this.getAxis("x", r.componentIndex);
  29071. else if (o)
  29072. n = this.getAxis("y", o.componentIndex);
  29073. else if (a) {
  29074. a.coordinateSystem === this && (e = this._coordsList[0])
  29075. }
  29076. return {
  29077. cartesian: e,
  29078. axis: n
  29079. }
  29080. }
  29081. ,
  29082. t.prototype.containPoint = function(t) {
  29083. var e = this._coordsList[0];
  29084. if (e)
  29085. return e.containPoint(t)
  29086. }
  29087. ,
  29088. t.prototype._initCartesian = function(t, e, n) {
  29089. var i = this
  29090. , r = this
  29091. , o = {
  29092. left: !1,
  29093. right: !1,
  29094. top: !1,
  29095. bottom: !1
  29096. }
  29097. , a = {
  29098. x: {},
  29099. y: {}
  29100. }
  29101. , s = {
  29102. x: 0,
  29103. y: 0
  29104. };
  29105. if (e.eachComponent("xAxis", l("x"), this),
  29106. e.eachComponent("yAxis", l("y"), this),
  29107. !s.x || !s.y)
  29108. return this._axesMap = {},
  29109. void (this._axesList = []);
  29110. function l(e) {
  29111. return function(n, i) {
  29112. if (uI(n, t)) {
  29113. var l = n.get("position");
  29114. "x" === e ? "top" !== l && "bottom" !== l && (l = o.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = o.left ? "right" : "left"),
  29115. o[l] = !0;
  29116. var u = new nI(e,b_(n),[0, 0],n.get("type"),l)
  29117. , h = "category" === u.type;
  29118. u.onBand = h && n.get("boundaryGap"),
  29119. u.inverse = n.get("inverse"),
  29120. n.axis = u,
  29121. u.model = n,
  29122. u.grid = r,
  29123. u.index = i,
  29124. r._axesList.push(u),
  29125. a[e][i] = u,
  29126. s[e]++
  29127. }
  29128. }
  29129. }
  29130. this._axesMap = a,
  29131. E(a.x, (function(e, n) {
  29132. E(a.y, (function(r, o) {
  29133. var a = "x" + n + "y" + o
  29134. , s = new eI(a);
  29135. s.master = i,
  29136. s.model = t,
  29137. i._coordsMap[a] = s,
  29138. i._coordsList.push(s),
  29139. s.addAxis(e),
  29140. s.addAxis(r)
  29141. }
  29142. ))
  29143. }
  29144. ))
  29145. }
  29146. ,
  29147. t.prototype._updateScale = function(t, e) {
  29148. function n(t, e) {
  29149. E(C_(t, e.dim), (function(n) {
  29150. e.scale.unionExtentFromData(t, n)
  29151. }
  29152. ))
  29153. }
  29154. E(this._axesList, (function(t) {
  29155. if (t.scale.setExtent(1 / 0, -1 / 0),
  29156. "category" === t.type) {
  29157. var e = t.model.get("categorySortInfo");
  29158. t.scale.setSortInfo(e)
  29159. }
  29160. }
  29161. )),
  29162. t.eachSeries((function(t) {
  29163. if (rI(t)) {
  29164. var i = oI(t)
  29165. , r = i.xAxisModel
  29166. , o = i.yAxisModel;
  29167. if (!uI(r, e) || !uI(o, e))
  29168. return;
  29169. var a = this.getCartesian(r.componentIndex, o.componentIndex)
  29170. , s = t.getData()
  29171. , l = a.getAxis("x")
  29172. , u = a.getAxis("y");
  29173. n(s, l),
  29174. n(s, u)
  29175. }
  29176. }
  29177. ), this)
  29178. }
  29179. ,
  29180. t.prototype.getTooltipAxes = function(t) {
  29181. var e = []
  29182. , n = [];
  29183. return E(this.getCartesians(), (function(i) {
  29184. var r = null != t && "auto" !== t ? i.getAxis(t) : i.getBaseAxis()
  29185. , o = i.getOtherAxis(r);
  29186. P(e, r) < 0 && e.push(r),
  29187. P(n, o) < 0 && n.push(o)
  29188. }
  29189. )),
  29190. {
  29191. baseAxes: e,
  29192. otherAxes: n
  29193. }
  29194. }
  29195. ,
  29196. t.create = function(e, n) {
  29197. var i = [];
  29198. return e.eachComponent("grid", (function(r, o) {
  29199. var a = new t(r,e,n);
  29200. a.name = "grid_" + o,
  29201. a.resize(r, n, !0),
  29202. r.coordinateSystem = a,
  29203. i.push(a)
  29204. }
  29205. )),
  29206. e.eachSeries((function(t) {
  29207. if (rI(t)) {
  29208. var e = oI(t)
  29209. , n = e.xAxisModel
  29210. , i = e.yAxisModel
  29211. , r = n.getCoordSysModel();
  29212. 0;
  29213. var o = r.coordinateSystem;
  29214. t.coordinateSystem = o.getCartesian(n.componentIndex, i.componentIndex)
  29215. }
  29216. }
  29217. )),
  29218. i
  29219. }
  29220. ,
  29221. t.dimensions = QM,
  29222. t
  29223. }();
  29224. function uI(t, e) {
  29225. return t.getCoordSysModel() === e
  29226. }
  29227. function hI(t, e, n, i) {
  29228. n.getAxesOnZeroOf = function() {
  29229. return r ? [r] : []
  29230. }
  29231. ;
  29232. var r, o = t[e], a = n.model, s = a.get(["axisLine", "onZero"]), l = a.get(["axisLine", "onZeroAxisIndex"]);
  29233. if (s) {
  29234. if (null != l)
  29235. cI(o[l]) && (r = o[l]);
  29236. else
  29237. for (var u in o)
  29238. if (o.hasOwnProperty(u) && cI(o[u]) && !i[h(o[u])]) {
  29239. r = o[u];
  29240. break
  29241. }
  29242. r && (i[h(r)] = !0)
  29243. }
  29244. function h(t) {
  29245. return t.dim + "_" + t.index
  29246. }
  29247. }
  29248. function cI(t) {
  29249. return t && "category" !== t.type && "time" !== t.type && function(t) {
  29250. var e = t.scale.getExtent()
  29251. , n = e[0]
  29252. , i = e[1];
  29253. return !(n > 0 && i > 0 || n < 0 && i < 0)
  29254. }(t)
  29255. }
  29256. var pI = Math.PI
  29257. , dI = function() {
  29258. function t(t, e) {
  29259. this.group = new Br,
  29260. this.opt = e,
  29261. this.axisModel = t,
  29262. k(e, {
  29263. labelOffset: 0,
  29264. nameDirection: 1,
  29265. tickDirection: 1,
  29266. labelDirection: 1,
  29267. silent: !0,
  29268. handleAutoShown: function() {
  29269. return !0
  29270. }
  29271. });
  29272. var n = new Br({
  29273. x: e.position[0],
  29274. y: e.position[1],
  29275. rotation: e.rotation
  29276. });
  29277. n.updateTransform(),
  29278. this._transformGroup = n
  29279. }
  29280. return t.prototype.hasBuilder = function(t) {
  29281. return !!fI[t]
  29282. }
  29283. ,
  29284. t.prototype.add = function(t) {
  29285. fI[t](this.opt, this.axisModel, this.group, this._transformGroup)
  29286. }
  29287. ,
  29288. t.prototype.getGroup = function() {
  29289. return this.group
  29290. }
  29291. ,
  29292. t.innerTextLayout = function(t, e, n) {
  29293. var i, r, o = ao(e - t);
  29294. return so(o) ? (r = n > 0 ? "top" : "bottom",
  29295. i = "center") : so(o - pI) ? (r = n > 0 ? "bottom" : "top",
  29296. i = "center") : (r = "middle",
  29297. i = o > 0 && o < pI ? n > 0 ? "right" : "left" : n > 0 ? "left" : "right"),
  29298. {
  29299. rotation: o,
  29300. textAlign: i,
  29301. textVerticalAlign: r
  29302. }
  29303. }
  29304. ,
  29305. t.makeAxisEventDataBase = function(t) {
  29306. var e = {
  29307. componentType: t.mainType,
  29308. componentIndex: t.componentIndex
  29309. };
  29310. return e[t.mainType + "Index"] = t.componentIndex,
  29311. e
  29312. }
  29313. ,
  29314. t.isLabelSilent = function(t) {
  29315. var e = t.get("tooltip");
  29316. return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
  29317. }
  29318. ,
  29319. t
  29320. }()
  29321. , fI = {
  29322. axisLine: function(t, e, n, i) {
  29323. var r = e.get(["axisLine", "show"]);
  29324. if ("auto" === r && t.handleAutoShown && (r = t.handleAutoShown("axisLine")),
  29325. r) {
  29326. var o = e.axis.getExtent()
  29327. , a = i.transform
  29328. , s = [o[0], 0]
  29329. , l = [o[1], 0]
  29330. , u = s[0] > l[0];
  29331. a && (Wt(s, s, a),
  29332. Wt(l, l, a));
  29333. var h = A({
  29334. lineCap: "round"
  29335. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle())
  29336. , c = new Ku({
  29337. shape: {
  29338. x1: s[0],
  29339. y1: s[1],
  29340. x2: l[0],
  29341. y2: l[1]
  29342. },
  29343. style: h,
  29344. strokeContainThreshold: t.strokeContainThreshold || 5,
  29345. silent: !0,
  29346. z2: 1
  29347. });
  29348. zh(c.shape, c.style.lineWidth),
  29349. c.anid = "line",
  29350. n.add(c);
  29351. var p = e.get(["axisLine", "symbol"]);
  29352. if (null != p) {
  29353. var d = e.get(["axisLine", "symbolSize"]);
  29354. U(p) && (p = [p, p]),
  29355. (U(d) || j(d)) && (d = [d, d]);
  29356. var f = Zy(e.get(["axisLine", "symbolOffset"]) || 0, d)
  29357. , g = d[0]
  29358. , y = d[1];
  29359. E([{
  29360. rotate: t.rotation + Math.PI / 2,
  29361. offset: f[0],
  29362. r: 0
  29363. }, {
  29364. rotate: t.rotation - Math.PI / 2,
  29365. offset: f[1],
  29366. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  29367. }], (function(e, i) {
  29368. if ("none" !== p[i] && null != p[i]) {
  29369. var r = Xy(p[i], -g / 2, -y / 2, g, y, h.stroke, !0)
  29370. , o = e.r + e.offset
  29371. , a = u ? l : s;
  29372. r.attr({
  29373. rotation: e.rotate,
  29374. x: a[0] + o * Math.cos(t.rotation),
  29375. y: a[1] - o * Math.sin(t.rotation),
  29376. silent: !0,
  29377. z2: 11
  29378. }),
  29379. n.add(r)
  29380. }
  29381. }
  29382. ))
  29383. }
  29384. }
  29385. },
  29386. axisTickLabel: function(t, e, n, i) {
  29387. var r = function(t, e, n, i) {
  29388. var r = n.axis
  29389. , o = n.getModel("axisTick")
  29390. , a = o.get("show");
  29391. "auto" === a && i.handleAutoShown && (a = i.handleAutoShown("axisTick"));
  29392. if (!a || r.scale.isBlank())
  29393. return;
  29394. for (var s = o.getModel("lineStyle"), l = i.tickDirection * o.get("length"), u = mI(r.getTicksCoords(), e.transform, l, k(s.getLineStyle(), {
  29395. stroke: n.get(["axisLine", "lineStyle", "color"])
  29396. }), "ticks"), h = 0; h < u.length; h++)
  29397. t.add(u[h]);
  29398. return u
  29399. }(n, i, e, t)
  29400. , o = function(t, e, n, i) {
  29401. var r = n.axis
  29402. , o = it(i.axisLabelShow, n.get(["axisLabel", "show"]));
  29403. if (!o || r.scale.isBlank())
  29404. return;
  29405. var a = n.getModel("axisLabel")
  29406. , s = a.get("margin")
  29407. , l = r.getViewLabels()
  29408. , u = (it(i.labelRotate, a.get("rotate")) || 0) * pI / 180
  29409. , h = dI.innerTextLayout(i.rotation, u, i.labelDirection)
  29410. , c = n.getCategories && n.getCategories(!0)
  29411. , p = []
  29412. , d = dI.isLabelSilent(n)
  29413. , f = n.get("triggerEvent");
  29414. return E(l, (function(o, u) {
  29415. var g = "ordinal" === r.scale.type ? r.scale.getRawOrdinalNumber(o.tickValue) : o.tickValue
  29416. , y = o.formattedLabel
  29417. , v = o.rawLabel
  29418. , m = a;
  29419. if (c && c[g]) {
  29420. var x = c[g];
  29421. q(x) && x.textStyle && (m = new Cc(x.textStyle,a,n.ecModel))
  29422. }
  29423. var _ = m.getTextColor() || n.get(["axisLine", "lineStyle", "color"])
  29424. , b = r.dataToCoord(g)
  29425. , w = m.getShallow("align", !0) || h.textAlign
  29426. , S = rt(m.getShallow("alignMinLabel", !0), w)
  29427. , M = rt(m.getShallow("alignMaxLabel", !0), w)
  29428. , I = m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || h.textVerticalAlign
  29429. , T = rt(m.getShallow("verticalAlignMinLabel", !0), I)
  29430. , C = rt(m.getShallow("verticalAlignMaxLabel", !0), I)
  29431. , D = new Xs({
  29432. x: b,
  29433. y: i.labelOffset + i.labelDirection * s,
  29434. rotation: h.rotation,
  29435. silent: d,
  29436. z2: 10 + (o.level || 0),
  29437. style: oc(m, {
  29438. text: y,
  29439. align: 0 === u ? S : u === l.length - 1 ? M : w,
  29440. verticalAlign: 0 === u ? T : u === l.length - 1 ? C : I,
  29441. fill: X(_) ? _("category" === r.type ? v : "value" === r.type ? g + "" : g, u) : _
  29442. })
  29443. });
  29444. if (D.anid = "label_" + g,
  29445. Kh({
  29446. el: D,
  29447. componentModel: n,
  29448. itemName: y,
  29449. formatterParamsExtra: {
  29450. isTruncated: function() {
  29451. return D.isTruncated
  29452. },
  29453. value: v,
  29454. tickIndex: u
  29455. }
  29456. }),
  29457. f) {
  29458. var A = dI.makeAxisEventDataBase(n);
  29459. A.targetType = "axisLabel",
  29460. A.value = v,
  29461. A.tickIndex = u,
  29462. "category" === r.type && (A.dataIndex = g),
  29463. rl(D).eventData = A
  29464. }
  29465. e.add(D),
  29466. D.updateTransform(),
  29467. p.push(D),
  29468. t.add(D),
  29469. D.decomposeTransform()
  29470. }
  29471. )),
  29472. p
  29473. }(n, i, e, t);
  29474. (function(t, e, n) {
  29475. if (T_(t.axis))
  29476. return;
  29477. var i = t.get(["axisLabel", "showMinLabel"])
  29478. , r = t.get(["axisLabel", "showMaxLabel"]);
  29479. e = e || [],
  29480. n = n || [];
  29481. var o = e[0]
  29482. , a = e[1]
  29483. , s = e[e.length - 1]
  29484. , l = e[e.length - 2]
  29485. , u = n[0]
  29486. , h = n[1]
  29487. , c = n[n.length - 1]
  29488. , p = n[n.length - 2];
  29489. !1 === i ? (gI(o),
  29490. gI(u)) : yI(o, a) && (i ? (gI(a),
  29491. gI(h)) : (gI(o),
  29492. gI(u)));
  29493. !1 === r ? (gI(s),
  29494. gI(c)) : yI(l, s) && (r ? (gI(l),
  29495. gI(p)) : (gI(s),
  29496. gI(c)))
  29497. }(e, o, r),
  29498. function(t, e, n, i) {
  29499. var r = n.axis
  29500. , o = n.getModel("minorTick");
  29501. if (!o.get("show") || r.scale.isBlank())
  29502. return;
  29503. var a = r.getMinorTicksCoords();
  29504. if (!a.length)
  29505. return;
  29506. for (var s = o.getModel("lineStyle"), l = i * o.get("length"), u = k(s.getLineStyle(), k(n.getModel("axisTick").getLineStyle(), {
  29507. stroke: n.get(["axisLine", "lineStyle", "color"])
  29508. })), h = 0; h < a.length; h++)
  29509. for (var c = mI(a[h], e.transform, l, u, "minorticks_" + h), p = 0; p < c.length; p++)
  29510. t.add(c[p])
  29511. }(n, i, e, t.tickDirection),
  29512. e.get(["axisLabel", "hideOverlap"])) && Nb(Pb(z(o, (function(t) {
  29513. return {
  29514. label: t,
  29515. priority: t.z2,
  29516. defaultAttr: {
  29517. ignore: t.ignore
  29518. }
  29519. }
  29520. }
  29521. ))))
  29522. },
  29523. axisName: function(t, e, n, i) {
  29524. var r = it(t.axisName, e.get("name"));
  29525. if (r) {
  29526. var o, a, s = e.get("nameLocation"), l = t.nameDirection, u = e.getModel("nameTextStyle"), h = e.get("nameGap") || 0, c = e.axis.getExtent(), p = c[0] > c[1] ? -1 : 1, d = ["start" === s ? c[0] - p * h : "end" === s ? c[1] + p * h : (c[0] + c[1]) / 2, vI(s) ? t.labelOffset + l * h : 0], f = e.get("nameRotate");
  29527. null != f && (f = f * pI / 180),
  29528. vI(s) ? o = dI.innerTextLayout(t.rotation, null != f ? f : t.rotation, l) : (o = function(t, e, n, i) {
  29529. var r, o, a = ao(n - t), s = i[0] > i[1], l = "start" === e && !s || "start" !== e && s;
  29530. so(a - pI / 2) ? (o = l ? "bottom" : "top",
  29531. r = "center") : so(a - 1.5 * pI) ? (o = l ? "top" : "bottom",
  29532. r = "center") : (o = "middle",
  29533. r = a < 1.5 * pI && a > pI / 2 ? l ? "left" : "right" : l ? "right" : "left");
  29534. return {
  29535. rotation: a,
  29536. textAlign: r,
  29537. textVerticalAlign: o
  29538. }
  29539. }(t.rotation, s, f || 0, c),
  29540. null != (a = t.axisNameAvailableWidth) && (a = Math.abs(a / Math.sin(o.rotation)),
  29541. !isFinite(a) && (a = null)));
  29542. var g = u.getFont()
  29543. , y = e.get("nameTruncate", !0) || {}
  29544. , v = y.ellipsis
  29545. , m = it(t.nameTruncateMaxWidth, y.maxWidth, a)
  29546. , x = new Xs({
  29547. x: d[0],
  29548. y: d[1],
  29549. rotation: o.rotation,
  29550. silent: dI.isLabelSilent(e),
  29551. style: oc(u, {
  29552. text: r,
  29553. font: g,
  29554. overflow: "truncate",
  29555. width: m,
  29556. ellipsis: v,
  29557. fill: u.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  29558. align: u.get("align") || o.textAlign,
  29559. verticalAlign: u.get("verticalAlign") || o.textVerticalAlign
  29560. }),
  29561. z2: 1
  29562. });
  29563. if (Kh({
  29564. el: x,
  29565. componentModel: e,
  29566. itemName: r
  29567. }),
  29568. x.__fullText = r,
  29569. x.anid = "name",
  29570. e.get("triggerEvent")) {
  29571. var _ = dI.makeAxisEventDataBase(e);
  29572. _.targetType = "axisName",
  29573. _.name = r,
  29574. rl(x).eventData = _
  29575. }
  29576. i.add(x),
  29577. x.updateTransform(),
  29578. n.add(x),
  29579. x.decomposeTransform()
  29580. }
  29581. }
  29582. };
  29583. function gI(t) {
  29584. t && (t.ignore = !0)
  29585. }
  29586. function yI(t, e) {
  29587. var n = t && t.getBoundingRect().clone()
  29588. , i = e && e.getBoundingRect().clone();
  29589. if (n && i) {
  29590. var r = xe([]);
  29591. return Se(r, r, -t.rotation),
  29592. n.applyTransform(be([], r, t.getLocalTransform())),
  29593. i.applyTransform(be([], r, e.getLocalTransform())),
  29594. n.intersect(i)
  29595. }
  29596. }
  29597. function vI(t) {
  29598. return "middle" === t || "center" === t
  29599. }
  29600. function mI(t, e, n, i, r) {
  29601. for (var o = [], a = [], s = [], l = 0; l < t.length; l++) {
  29602. var u = t[l].coord;
  29603. a[0] = u,
  29604. a[1] = 0,
  29605. s[0] = u,
  29606. s[1] = n,
  29607. e && (Wt(a, a, e),
  29608. Wt(s, s, e));
  29609. var h = new Ku({
  29610. shape: {
  29611. x1: a[0],
  29612. y1: a[1],
  29613. x2: s[0],
  29614. y2: s[1]
  29615. },
  29616. style: i,
  29617. z2: 2,
  29618. autoBatch: !0,
  29619. silent: !0
  29620. });
  29621. zh(h.shape, h.style.lineWidth),
  29622. h.anid = r + "_" + t[l].tickValue,
  29623. o.push(h)
  29624. }
  29625. return o
  29626. }
  29627. function xI(t, e) {
  29628. var n = {
  29629. axesInfo: {},
  29630. seriesInvolved: !1,
  29631. coordSysAxesInfo: {},
  29632. coordSysMap: {}
  29633. };
  29634. return function(t, e, n) {
  29635. var i = e.getComponent("tooltip")
  29636. , r = e.getComponent("axisPointer")
  29637. , o = r.get("link", !0) || []
  29638. , a = [];
  29639. E(n.getCoordinateSystems(), (function(n) {
  29640. if (n.axisPointerEnabled) {
  29641. var s = MI(n.model)
  29642. , l = t.coordSysAxesInfo[s] = {};
  29643. t.coordSysMap[s] = n;
  29644. var u = n.model.getModel("tooltip", i);
  29645. if (E(n.getAxes(), H(d, !1, null)),
  29646. n.getTooltipAxes && i && u.get("show")) {
  29647. var h = "axis" === u.get("trigger")
  29648. , c = "cross" === u.get(["axisPointer", "type"])
  29649. , p = n.getTooltipAxes(u.get(["axisPointer", "axis"]));
  29650. (h || c) && E(p.baseAxes, H(d, !c || "cross", h)),
  29651. c && E(p.otherAxes, H(d, "cross", !1))
  29652. }
  29653. }
  29654. function d(i, s, h) {
  29655. var c = h.model.getModel("axisPointer", r)
  29656. , p = c.get("show");
  29657. if (p && ("auto" !== p || i || SI(c))) {
  29658. null == s && (s = c.get("triggerTooltip")),
  29659. c = i ? function(t, e, n, i, r, o) {
  29660. var a = e.getModel("axisPointer")
  29661. , s = {};
  29662. E(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], (function(t) {
  29663. s[t] = T(a.get(t))
  29664. }
  29665. )),
  29666. s.snap = "category" !== t.type && !!o,
  29667. "cross" === a.get("type") && (s.type = "line");
  29668. var l = s.label || (s.label = {});
  29669. if (null == l.show && (l.show = !1),
  29670. "cross" === r) {
  29671. var u = a.get(["label", "show"]);
  29672. if (l.show = null == u || u,
  29673. !o) {
  29674. var h = s.lineStyle = a.get("crossStyle");
  29675. h && k(l, h.textStyle)
  29676. }
  29677. }
  29678. return t.model.getModel("axisPointer", new Cc(s,n,i))
  29679. }(h, u, r, e, i, s) : c;
  29680. var d = c.get("snap")
  29681. , f = c.get("triggerEmphasis")
  29682. , g = MI(h.model)
  29683. , y = s || d || "category" === h.type
  29684. , v = t.axesInfo[g] = {
  29685. key: g,
  29686. axis: h,
  29687. coordSys: n,
  29688. axisPointerModel: c,
  29689. triggerTooltip: s,
  29690. triggerEmphasis: f,
  29691. involveSeries: y,
  29692. snap: d,
  29693. useHandle: SI(c),
  29694. seriesModels: [],
  29695. linkGroup: null
  29696. };
  29697. l[g] = v,
  29698. t.seriesInvolved = t.seriesInvolved || y;
  29699. var m = function(t, e) {
  29700. for (var n = e.model, i = e.dim, r = 0; r < t.length; r++) {
  29701. var o = t[r] || {};
  29702. if (_I(o[i + "AxisId"], n.id) || _I(o[i + "AxisIndex"], n.componentIndex) || _I(o[i + "AxisName"], n.name))
  29703. return r
  29704. }
  29705. }(o, h);
  29706. if (null != m) {
  29707. var x = a[m] || (a[m] = {
  29708. axesInfo: {}
  29709. });
  29710. x.axesInfo[g] = v,
  29711. x.mapper = o[m].mapper,
  29712. v.linkGroup = x
  29713. }
  29714. }
  29715. }
  29716. }
  29717. ))
  29718. }(n, t, e),
  29719. n.seriesInvolved && function(t, e) {
  29720. e.eachSeries((function(e) {
  29721. var n = e.coordinateSystem
  29722. , i = e.get(["tooltip", "trigger"], !0)
  29723. , r = e.get(["tooltip", "show"], !0);
  29724. n && "none" !== i && !1 !== i && "item" !== i && !1 !== r && !1 !== e.get(["axisPointer", "show"], !0) && E(t.coordSysAxesInfo[MI(n.model)], (function(t) {
  29725. var i = t.axis;
  29726. n.getAxis(i.dim) === i && (t.seriesModels.push(e),
  29727. null == t.seriesDataCount && (t.seriesDataCount = 0),
  29728. t.seriesDataCount += e.getData().count())
  29729. }
  29730. ))
  29731. }
  29732. ))
  29733. }(n, t),
  29734. n
  29735. }
  29736. function _I(t, e) {
  29737. return "all" === t || Y(t) && P(t, e) >= 0 || t === e
  29738. }
  29739. function bI(t) {
  29740. var e = wI(t);
  29741. if (e) {
  29742. var n = e.axisPointerModel
  29743. , i = e.axis.scale
  29744. , r = n.option
  29745. , o = n.get("status")
  29746. , a = n.get("value");
  29747. null != a && (a = i.parse(a));
  29748. var s = SI(n);
  29749. null == o && (r.status = s ? "show" : "hide");
  29750. var l = i.getExtent().slice();
  29751. l[0] > l[1] && l.reverse(),
  29752. (null == a || a > l[1]) && (a = l[1]),
  29753. a < l[0] && (a = l[0]),
  29754. r.value = a,
  29755. s && (r.status = e.axis.scale.isBlank() ? "hide" : "show")
  29756. }
  29757. }
  29758. function wI(t) {
  29759. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  29760. return e && e.axesInfo[MI(t)]
  29761. }
  29762. function SI(t) {
  29763. return !!t.get(["handle", "show"])
  29764. }
  29765. function MI(t) {
  29766. return t.type + "||" + t.id
  29767. }
  29768. var II = {}
  29769. , TI = function(t) {
  29770. function e() {
  29771. var n = null !== t && t.apply(this, arguments) || this;
  29772. return n.type = e.type,
  29773. n
  29774. }
  29775. return n(e, t),
  29776. e.prototype.render = function(e, n, i, r) {
  29777. this.axisPointerClass && bI(e),
  29778. t.prototype.render.apply(this, arguments),
  29779. this._doUpdateAxisPointerClass(e, i, !0)
  29780. }
  29781. ,
  29782. e.prototype.updateAxisPointer = function(t, e, n, i) {
  29783. this._doUpdateAxisPointerClass(t, n, !1)
  29784. }
  29785. ,
  29786. e.prototype.remove = function(t, e) {
  29787. var n = this._axisPointer;
  29788. n && n.remove(e)
  29789. }
  29790. ,
  29791. e.prototype.dispose = function(e, n) {
  29792. this._disposeAxisPointer(n),
  29793. t.prototype.dispose.apply(this, arguments)
  29794. }
  29795. ,
  29796. e.prototype._doUpdateAxisPointerClass = function(t, n, i) {
  29797. var r = e.getAxisPointerClass(this.axisPointerClass);
  29798. if (r) {
  29799. var o = function(t) {
  29800. var e = wI(t);
  29801. return e && e.axisPointerModel
  29802. }(t);
  29803. o ? (this._axisPointer || (this._axisPointer = new r)).render(t, o, n, i) : this._disposeAxisPointer(n)
  29804. }
  29805. }
  29806. ,
  29807. e.prototype._disposeAxisPointer = function(t) {
  29808. this._axisPointer && this._axisPointer.dispose(t),
  29809. this._axisPointer = null
  29810. }
  29811. ,
  29812. e.registerAxisPointerClass = function(t, e) {
  29813. II[t] = e
  29814. }
  29815. ,
  29816. e.getAxisPointerClass = function(t) {
  29817. return t && II[t]
  29818. }
  29819. ,
  29820. e.type = "axis",
  29821. e
  29822. }(Ag)
  29823. , CI = Vo();
  29824. function DI(t, e, n, i) {
  29825. var r = n.axis;
  29826. if (!r.scale.isBlank()) {
  29827. var o = n.getModel("splitArea")
  29828. , a = o.getModel("areaStyle")
  29829. , s = a.get("color")
  29830. , l = i.coordinateSystem.getRect()
  29831. , u = r.getTicksCoords({
  29832. tickModel: o,
  29833. clamp: !0
  29834. });
  29835. if (u.length) {
  29836. var h = s.length
  29837. , c = CI(t).splitAreaColors
  29838. , p = yt()
  29839. , d = 0;
  29840. if (c)
  29841. for (var f = 0; f < u.length; f++) {
  29842. var g = c.get(u[f].tickValue);
  29843. if (null != g) {
  29844. d = (g + (h - 1) * f) % h;
  29845. break
  29846. }
  29847. }
  29848. var y = r.toGlobalCoord(u[0].coord)
  29849. , v = a.getAreaStyle();
  29850. s = Y(s) ? s : [s];
  29851. for (f = 1; f < u.length; f++) {
  29852. var m = r.toGlobalCoord(u[f].coord)
  29853. , x = void 0
  29854. , _ = void 0
  29855. , b = void 0
  29856. , w = void 0;
  29857. r.isHorizontal() ? (x = y,
  29858. _ = l.y,
  29859. b = m - x,
  29860. w = l.height,
  29861. y = x + b) : (x = l.x,
  29862. _ = y,
  29863. b = l.width,
  29864. y = _ + (w = m - _));
  29865. var S = u[f - 1].tickValue;
  29866. null != S && p.set(S, d),
  29867. e.add(new Ws({
  29868. anid: null != S ? "area_" + S : null,
  29869. shape: {
  29870. x: x,
  29871. y: _,
  29872. width: b,
  29873. height: w
  29874. },
  29875. style: k({
  29876. fill: s[d]
  29877. }, v),
  29878. autoBatch: !0,
  29879. silent: !0
  29880. })),
  29881. d = (d + 1) % h
  29882. }
  29883. CI(t).splitAreaColors = p
  29884. }
  29885. }
  29886. }
  29887. function AI(t) {
  29888. CI(t).splitAreaColors = null
  29889. }
  29890. var kI = ["axisLine", "axisTickLabel", "axisName"]
  29891. , LI = ["splitArea", "splitLine", "minorSplitLine"]
  29892. , PI = function(t) {
  29893. function e() {
  29894. var n = null !== t && t.apply(this, arguments) || this;
  29895. return n.type = e.type,
  29896. n.axisPointerClass = "CartesianAxisPointer",
  29897. n
  29898. }
  29899. return n(e, t),
  29900. e.prototype.render = function(e, n, i, r) {
  29901. this.group.removeAll();
  29902. var o = this._axisGroup;
  29903. if (this._axisGroup = new Br,
  29904. this.group.add(this._axisGroup),
  29905. e.get("show")) {
  29906. var a = e.getCoordSysModel()
  29907. , s = iI(a, e)
  29908. , l = new dI(e,A({
  29909. handleAutoShown: function(t) {
  29910. for (var n = a.coordinateSystem.getCartesians(), i = 0; i < n.length; i++)
  29911. if (Tx(n[i].getOtherAxis(e.axis).scale))
  29912. return !0;
  29913. return !1
  29914. }
  29915. }, s));
  29916. E(kI, l.add, l),
  29917. this._axisGroup.add(l.getGroup()),
  29918. E(LI, (function(t) {
  29919. e.get([t, "show"]) && OI[t](this, this._axisGroup, e, a)
  29920. }
  29921. ), this),
  29922. r && "changeAxisOrder" === r.type && r.isInitSort || Hh(o, this._axisGroup, e),
  29923. t.prototype.render.call(this, e, n, i, r)
  29924. }
  29925. }
  29926. ,
  29927. e.prototype.remove = function() {
  29928. AI(this)
  29929. }
  29930. ,
  29931. e.type = "cartesianAxis",
  29932. e
  29933. }(TI)
  29934. , OI = {
  29935. splitLine: function(t, e, n, i) {
  29936. var r = n.axis;
  29937. if (!r.scale.isBlank()) {
  29938. var o = n.getModel("splitLine")
  29939. , a = o.getModel("lineStyle")
  29940. , s = a.get("color")
  29941. , l = !1 !== o.get("showMinLine")
  29942. , u = !1 !== o.get("showMaxLine");
  29943. s = Y(s) ? s : [s];
  29944. for (var h = i.coordinateSystem.getRect(), c = r.isHorizontal(), p = 0, d = r.getTicksCoords({
  29945. tickModel: o
  29946. }), f = [], g = [], y = a.getLineStyle(), v = 0; v < d.length; v++) {
  29947. var m = r.toGlobalCoord(d[v].coord);
  29948. if ((0 !== v || l) && (v !== d.length - 1 || u)) {
  29949. var x = d[v].tickValue;
  29950. c ? (f[0] = m,
  29951. f[1] = h.y,
  29952. g[0] = m,
  29953. g[1] = h.y + h.height) : (f[0] = h.x,
  29954. f[1] = m,
  29955. g[0] = h.x + h.width,
  29956. g[1] = m);
  29957. var _ = p++ % s.length
  29958. , b = new Ku({
  29959. anid: null != x ? "line_" + x : null,
  29960. autoBatch: !0,
  29961. shape: {
  29962. x1: f[0],
  29963. y1: f[1],
  29964. x2: g[0],
  29965. y2: g[1]
  29966. },
  29967. style: k({
  29968. stroke: s[_]
  29969. }, y),
  29970. silent: !0
  29971. });
  29972. zh(b.shape, y.lineWidth),
  29973. e.add(b)
  29974. }
  29975. }
  29976. }
  29977. },
  29978. minorSplitLine: function(t, e, n, i) {
  29979. var r = n.axis
  29980. , o = n.getModel("minorSplitLine").getModel("lineStyle")
  29981. , a = i.coordinateSystem.getRect()
  29982. , s = r.isHorizontal()
  29983. , l = r.getMinorTicksCoords();
  29984. if (l.length)
  29985. for (var u = [], h = [], c = o.getLineStyle(), p = 0; p < l.length; p++)
  29986. for (var d = 0; d < l[p].length; d++) {
  29987. var f = r.toGlobalCoord(l[p][d].coord);
  29988. s ? (u[0] = f,
  29989. u[1] = a.y,
  29990. h[0] = f,
  29991. h[1] = a.y + a.height) : (u[0] = a.x,
  29992. u[1] = f,
  29993. h[0] = a.x + a.width,
  29994. h[1] = f);
  29995. var g = new Ku({
  29996. anid: "minor_line_" + l[p][d].tickValue,
  29997. autoBatch: !0,
  29998. shape: {
  29999. x1: u[0],
  30000. y1: u[1],
  30001. x2: h[0],
  30002. y2: h[1]
  30003. },
  30004. style: c,
  30005. silent: !0
  30006. });
  30007. zh(g.shape, c.lineWidth),
  30008. e.add(g)
  30009. }
  30010. },
  30011. splitArea: function(t, e, n, i) {
  30012. DI(t, e, n, i)
  30013. }
  30014. }
  30015. , RI = function(t) {
  30016. function e() {
  30017. var n = null !== t && t.apply(this, arguments) || this;
  30018. return n.type = e.type,
  30019. n
  30020. }
  30021. return n(e, t),
  30022. e.type = "xAxis",
  30023. e
  30024. }(PI)
  30025. , NI = function(t) {
  30026. function e() {
  30027. var e = null !== t && t.apply(this, arguments) || this;
  30028. return e.type = RI.type,
  30029. e
  30030. }
  30031. return n(e, t),
  30032. e.type = "yAxis",
  30033. e
  30034. }(PI)
  30035. , EI = function(t) {
  30036. function e() {
  30037. var e = null !== t && t.apply(this, arguments) || this;
  30038. return e.type = "grid",
  30039. e
  30040. }
  30041. return n(e, t),
  30042. e.prototype.render = function(t, e) {
  30043. this.group.removeAll(),
  30044. t.get("show") && this.group.add(new Ws({
  30045. shape: t.coordinateSystem.getRect(),
  30046. style: k({
  30047. fill: t.get("backgroundColor")
  30048. }, t.getItemStyle()),
  30049. silent: !0,
  30050. z2: -1
  30051. }))
  30052. }
  30053. ,
  30054. e.type = "grid",
  30055. e
  30056. }(Ag)
  30057. , zI = {
  30058. offset: 0
  30059. };
  30060. function VI(t) {
  30061. t.registerComponentView(EI),
  30062. t.registerComponentModel(HM),
  30063. t.registerCoordinateSystem("cartesian2d", lI),
  30064. KM(t, "x", YM, zI),
  30065. KM(t, "y", YM, zI),
  30066. t.registerComponentView(RI),
  30067. t.registerComponentView(NI),
  30068. t.registerPreprocessor((function(t) {
  30069. t.xAxis && t.yAxis && !t.grid && (t.grid = {})
  30070. }
  30071. ))
  30072. }
  30073. function BI(t) {
  30074. t.eachSeriesByType("radar", (function(t) {
  30075. var e = t.getData()
  30076. , n = []
  30077. , i = t.coordinateSystem;
  30078. if (i) {
  30079. var r = i.getIndicatorAxes();
  30080. E(r, (function(t, o) {
  30081. e.each(e.mapDimension(r[o].dim), (function(t, e) {
  30082. n[e] = n[e] || [];
  30083. var r = i.dataToPoint(t, o);
  30084. n[e][o] = FI(r) ? r : GI(i)
  30085. }
  30086. ))
  30087. }
  30088. )),
  30089. e.each((function(t) {
  30090. var r = F(n[t], (function(t) {
  30091. return FI(t)
  30092. }
  30093. )) || GI(i);
  30094. n[t].push(r.slice()),
  30095. e.setItemLayout(t, n[t])
  30096. }
  30097. ))
  30098. }
  30099. }
  30100. ))
  30101. }
  30102. function FI(t) {
  30103. return !isNaN(t[0]) && !isNaN(t[1])
  30104. }
  30105. function GI(t) {
  30106. return [t.cx, t.cy]
  30107. }
  30108. function WI(t) {
  30109. var e = t.polar;
  30110. if (e) {
  30111. Y(e) || (e = [e]);
  30112. var n = [];
  30113. E(e, (function(e, i) {
  30114. e.indicator ? (e.type && !e.shape && (e.shape = e.type),
  30115. t.radar = t.radar || [],
  30116. Y(t.radar) || (t.radar = [t.radar]),
  30117. t.radar.push(e)) : n.push(e)
  30118. }
  30119. )),
  30120. t.polar = n
  30121. }
  30122. E(t.series, (function(t) {
  30123. t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex)
  30124. }
  30125. ))
  30126. }
  30127. var HI = function(t) {
  30128. function e() {
  30129. var n = null !== t && t.apply(this, arguments) || this;
  30130. return n.type = e.type,
  30131. n
  30132. }
  30133. return n(e, t),
  30134. e.prototype.render = function(t, e, n) {
  30135. var i = t.coordinateSystem
  30136. , r = this.group
  30137. , o = t.getData()
  30138. , a = this._data;
  30139. function s(t, e) {
  30140. var n = t.getItemVisual(e, "symbol") || "circle";
  30141. if ("none" !== n) {
  30142. var i = Uy(t.getItemVisual(e, "symbolSize"))
  30143. , r = Xy(n, -1, -1, 2, 2)
  30144. , o = t.getItemVisual(e, "symbolRotate") || 0;
  30145. return r.attr({
  30146. style: {
  30147. strokeNoScale: !0
  30148. },
  30149. z2: 100,
  30150. scaleX: i[0] / 2,
  30151. scaleY: i[1] / 2,
  30152. rotation: o * Math.PI / 180 || 0
  30153. }),
  30154. r
  30155. }
  30156. }
  30157. function l(e, n, i, r, o, a) {
  30158. i.removeAll();
  30159. for (var l = 0; l < n.length - 1; l++) {
  30160. var u = s(r, o);
  30161. u && (u.__dimIdx = l,
  30162. e[l] ? (u.setPosition(e[l]),
  30163. Qh[a ? "initProps" : "updateProps"](u, {
  30164. x: n[l][0],
  30165. y: n[l][1]
  30166. }, t, o)) : u.setPosition(n[l]),
  30167. i.add(u))
  30168. }
  30169. }
  30170. function u(t) {
  30171. return z(t, (function(t) {
  30172. return [i.cx, i.cy]
  30173. }
  30174. ))
  30175. }
  30176. o.diff(a).add((function(e) {
  30177. var n = o.getItemLayout(e);
  30178. if (n) {
  30179. var i = new Xu
  30180. , r = new Zu
  30181. , a = {
  30182. shape: {
  30183. points: n
  30184. }
  30185. };
  30186. i.shape.points = u(n),
  30187. r.shape.points = u(n),
  30188. mh(i, a, t, e),
  30189. mh(r, a, t, e);
  30190. var s = new Br
  30191. , h = new Br;
  30192. s.add(r),
  30193. s.add(i),
  30194. s.add(h),
  30195. l(r.shape.points, n, h, o, e, !0),
  30196. o.setItemGraphicEl(e, s)
  30197. }
  30198. }
  30199. )).update((function(e, n) {
  30200. var i = a.getItemGraphicEl(n)
  30201. , r = i.childAt(0)
  30202. , s = i.childAt(1)
  30203. , u = i.childAt(2)
  30204. , h = {
  30205. shape: {
  30206. points: o.getItemLayout(e)
  30207. }
  30208. };
  30209. h.shape.points && (l(r.shape.points, h.shape.points, u, o, e, !1),
  30210. Sh(s),
  30211. Sh(r),
  30212. vh(r, h, t),
  30213. vh(s, h, t),
  30214. o.setItemGraphicEl(e, i))
  30215. }
  30216. )).remove((function(t) {
  30217. r.remove(a.getItemGraphicEl(t))
  30218. }
  30219. )).execute(),
  30220. o.eachItemGraphicEl((function(t, e) {
  30221. var n = o.getItemModel(e)
  30222. , i = t.childAt(0)
  30223. , a = t.childAt(1)
  30224. , s = t.childAt(2)
  30225. , l = o.getItemVisual(e, "style")
  30226. , u = l.fill;
  30227. r.add(t),
  30228. i.useStyle(k(n.getModel("lineStyle").getLineStyle(), {
  30229. fill: "none",
  30230. stroke: u
  30231. })),
  30232. $l(i, n, "lineStyle"),
  30233. $l(a, n, "areaStyle");
  30234. var h = n.getModel("areaStyle")
  30235. , c = h.isEmpty() && h.parentModel.isEmpty();
  30236. a.ignore = c,
  30237. E(["emphasis", "select", "blur"], (function(t) {
  30238. var e = n.getModel([t, "areaStyle"])
  30239. , i = e.isEmpty() && e.parentModel.isEmpty();
  30240. a.ensureState(t).ignore = i && c
  30241. }
  30242. )),
  30243. a.useStyle(k(h.getAreaStyle(), {
  30244. fill: u,
  30245. opacity: .7,
  30246. decal: l.decal
  30247. }));
  30248. var p = n.getModel("emphasis")
  30249. , d = p.getModel("itemStyle").getItemStyle();
  30250. s.eachChild((function(t) {
  30251. if (t instanceof Ns) {
  30252. var i = t.style;
  30253. t.useStyle(A({
  30254. image: i.image,
  30255. x: i.x,
  30256. y: i.y,
  30257. width: i.width,
  30258. height: i.height
  30259. }, l))
  30260. } else
  30261. t.useStyle(l),
  30262. t.setColor(u),
  30263. t.style.strokeNoScale = !0;
  30264. t.ensureState("emphasis").style = T(d);
  30265. var r = o.getStore().get(o.getDimensionIndex(t.__dimIdx), e);
  30266. (null == r || isNaN(r)) && (r = ""),
  30267. ic(t, rc(n), {
  30268. labelFetcher: o.hostModel,
  30269. labelDataIndex: e,
  30270. labelDimIndex: t.__dimIdx,
  30271. defaultText: r,
  30272. inheritColor: u,
  30273. defaultOpacity: l.opacity
  30274. })
  30275. }
  30276. )),
  30277. Zl(t, p.get("focus"), p.get("blurScope"), p.get("disabled"))
  30278. }
  30279. )),
  30280. this._data = o
  30281. }
  30282. ,
  30283. e.prototype.remove = function() {
  30284. this.group.removeAll(),
  30285. this._data = null
  30286. }
  30287. ,
  30288. e.type = "radar",
  30289. e
  30290. }(Og)
  30291. , YI = function(t) {
  30292. function e() {
  30293. var n = null !== t && t.apply(this, arguments) || this;
  30294. return n.type = e.type,
  30295. n.hasSymbolVisual = !0,
  30296. n
  30297. }
  30298. return n(e, t),
  30299. e.prototype.init = function(e) {
  30300. t.prototype.init.apply(this, arguments),
  30301. this.legendVisualProvider = new NM(W(this.getData, this),W(this.getRawData, this))
  30302. }
  30303. ,
  30304. e.prototype.getInitialData = function(t, e) {
  30305. return RM(this, {
  30306. generateCoord: "indicator_",
  30307. generateCoordCount: 1 / 0
  30308. })
  30309. }
  30310. ,
  30311. e.prototype.formatTooltip = function(t, e, n) {
  30312. var i = this.getData()
  30313. , r = this.coordinateSystem.getIndicatorAxes()
  30314. , o = this.getData().getName(t)
  30315. , a = "" === o ? this.name : o
  30316. , s = fg(this, t);
  30317. return og("section", {
  30318. header: a,
  30319. sortBlocks: !0,
  30320. blocks: z(r, (function(e) {
  30321. var n = i.get(i.mapDimension(e.dim), t);
  30322. return og("nameValue", {
  30323. markerType: "subItem",
  30324. markerColor: s,
  30325. name: e.name,
  30326. value: n,
  30327. sortParam: n
  30328. })
  30329. }
  30330. ))
  30331. })
  30332. }
  30333. ,
  30334. e.prototype.getTooltipPosition = function(t) {
  30335. if (null != t)
  30336. for (var e = this.getData(), n = this.coordinateSystem, i = e.getValues(z(n.dimensions, (function(t) {
  30337. return e.mapDimension(t)
  30338. }
  30339. )), t), r = 0, o = i.length; r < o; r++)
  30340. if (!isNaN(i[r])) {
  30341. var a = n.getIndicatorAxes();
  30342. return n.coordToPoint(a[r].dataToCoord(i[r]), r)
  30343. }
  30344. }
  30345. ,
  30346. e.type = "series.radar",
  30347. e.dependencies = ["radar"],
  30348. e.defaultOption = {
  30349. z: 2,
  30350. colorBy: "data",
  30351. coordinateSystem: "radar",
  30352. legendHoverLink: !0,
  30353. radarIndex: 0,
  30354. lineStyle: {
  30355. width: 2,
  30356. type: "solid",
  30357. join: "round"
  30358. },
  30359. label: {
  30360. position: "top"
  30361. },
  30362. symbolSize: 8
  30363. },
  30364. e
  30365. }(bg)
  30366. , XI = jM.value;
  30367. function UI(t, e) {
  30368. return k({
  30369. show: e
  30370. }, t)
  30371. }
  30372. var ZI = function(t) {
  30373. function e() {
  30374. var n = null !== t && t.apply(this, arguments) || this;
  30375. return n.type = e.type,
  30376. n
  30377. }
  30378. return n(e, t),
  30379. e.prototype.optionUpdated = function() {
  30380. var t = this.get("boundaryGap")
  30381. , e = this.get("splitNumber")
  30382. , n = this.get("scale")
  30383. , i = this.get("axisLine")
  30384. , r = this.get("axisTick")
  30385. , o = this.get("axisLabel")
  30386. , a = this.get("axisName")
  30387. , s = this.get(["axisName", "show"])
  30388. , l = this.get(["axisName", "formatter"])
  30389. , u = this.get("axisNameGap")
  30390. , h = this.get("triggerEvent")
  30391. , c = z(this.get("indicator") || [], (function(c) {
  30392. null != c.max && c.max > 0 && !c.min ? c.min = 0 : null != c.min && c.min < 0 && !c.max && (c.max = 0);
  30393. var p = a;
  30394. null != c.color && (p = k({
  30395. color: c.color
  30396. }, a));
  30397. var d = C(T(c), {
  30398. boundaryGap: t,
  30399. splitNumber: e,
  30400. scale: n,
  30401. axisLine: i,
  30402. axisTick: r,
  30403. axisLabel: o,
  30404. name: c.text,
  30405. showName: s,
  30406. nameLocation: "end",
  30407. nameGap: u,
  30408. nameTextStyle: p,
  30409. triggerEvent: h
  30410. }, !1);
  30411. if (U(l)) {
  30412. var f = d.name;
  30413. d.name = l.replace("{value}", null != f ? f : "")
  30414. } else
  30415. X(l) && (d.name = l(d.name, d));
  30416. var g = new Cc(d,null,this.ecModel);
  30417. return R(g, D_.prototype),
  30418. g.mainType = "radar",
  30419. g.componentIndex = this.componentIndex,
  30420. g
  30421. }
  30422. ), this);
  30423. this._indicatorModels = c
  30424. }
  30425. ,
  30426. e.prototype.getIndicatorModels = function() {
  30427. return this._indicatorModels
  30428. }
  30429. ,
  30430. e.type = "radar",
  30431. e.defaultOption = {
  30432. z: 0,
  30433. center: ["50%", "50%"],
  30434. radius: "75%",
  30435. startAngle: 90,
  30436. axisName: {
  30437. show: !0
  30438. },
  30439. boundaryGap: [0, 0],
  30440. splitNumber: 5,
  30441. axisNameGap: 15,
  30442. scale: !1,
  30443. shape: "polygon",
  30444. axisLine: C({
  30445. lineStyle: {
  30446. color: "#bbb"
  30447. }
  30448. }, XI.axisLine),
  30449. axisLabel: UI(XI.axisLabel, !1),
  30450. axisTick: UI(XI.axisTick, !1),
  30451. splitLine: UI(XI.splitLine, !0),
  30452. splitArea: UI(XI.splitArea, !0),
  30453. indicator: []
  30454. },
  30455. e
  30456. }(zp)
  30457. , jI = ["axisLine", "axisTickLabel", "axisName"]
  30458. , qI = function(t) {
  30459. function e() {
  30460. var n = null !== t && t.apply(this, arguments) || this;
  30461. return n.type = e.type,
  30462. n
  30463. }
  30464. return n(e, t),
  30465. e.prototype.render = function(t, e, n) {
  30466. this.group.removeAll(),
  30467. this._buildAxes(t),
  30468. this._buildSplitLineAndArea(t)
  30469. }
  30470. ,
  30471. e.prototype._buildAxes = function(t) {
  30472. var e = t.coordinateSystem;
  30473. E(z(e.getIndicatorAxes(), (function(t) {
  30474. var n = t.model.get("showName") ? t.name : "";
  30475. return new dI(t.model,{
  30476. axisName: n,
  30477. position: [e.cx, e.cy],
  30478. rotation: t.angle,
  30479. labelDirection: -1,
  30480. tickDirection: -1,
  30481. nameDirection: 1
  30482. })
  30483. }
  30484. )), (function(t) {
  30485. E(jI, t.add, t),
  30486. this.group.add(t.getGroup())
  30487. }
  30488. ), this)
  30489. }
  30490. ,
  30491. e.prototype._buildSplitLineAndArea = function(t) {
  30492. var e = t.coordinateSystem
  30493. , n = e.getIndicatorAxes();
  30494. if (n.length) {
  30495. var i = t.get("shape")
  30496. , r = t.getModel("splitLine")
  30497. , o = t.getModel("splitArea")
  30498. , a = r.getModel("lineStyle")
  30499. , s = o.getModel("areaStyle")
  30500. , l = r.get("show")
  30501. , u = o.get("show")
  30502. , h = a.get("color")
  30503. , c = s.get("color")
  30504. , p = Y(h) ? h : [h]
  30505. , d = Y(c) ? c : [c]
  30506. , f = []
  30507. , g = [];
  30508. if ("circle" === i)
  30509. for (var y = n[0].getTicksCoords(), v = e.cx, m = e.cy, x = 0; x < y.length; x++) {
  30510. if (l)
  30511. f[C(f, p, x)].push(new Su({
  30512. shape: {
  30513. cx: v,
  30514. cy: m,
  30515. r: y[x].coord
  30516. }
  30517. }));
  30518. if (u && x < y.length - 1)
  30519. g[C(g, d, x)].push(new Wu({
  30520. shape: {
  30521. cx: v,
  30522. cy: m,
  30523. r0: y[x].coord,
  30524. r: y[x + 1].coord
  30525. }
  30526. }))
  30527. }
  30528. else {
  30529. var _, b = z(n, (function(t, n) {
  30530. var i = t.getTicksCoords();
  30531. return _ = null == _ ? i.length - 1 : Math.min(i.length - 1, _),
  30532. z(i, (function(t) {
  30533. return e.coordToPoint(t.coord, n)
  30534. }
  30535. ))
  30536. }
  30537. )), w = [];
  30538. for (x = 0; x <= _; x++) {
  30539. for (var S = [], M = 0; M < n.length; M++)
  30540. S.push(b[M][x]);
  30541. if (S[0] && S.push(S[0].slice()),
  30542. l)
  30543. f[C(f, p, x)].push(new Zu({
  30544. shape: {
  30545. points: S
  30546. }
  30547. }));
  30548. if (u && w)
  30549. g[C(g, d, x - 1)].push(new Xu({
  30550. shape: {
  30551. points: S.concat(w)
  30552. }
  30553. }));
  30554. w = S.slice().reverse()
  30555. }
  30556. }
  30557. var I = a.getLineStyle()
  30558. , T = s.getAreaStyle();
  30559. E(g, (function(t, e) {
  30560. this.group.add(Nh(t, {
  30561. style: k({
  30562. stroke: "none",
  30563. fill: d[e % d.length]
  30564. }, T),
  30565. silent: !0
  30566. }))
  30567. }
  30568. ), this),
  30569. E(f, (function(t, e) {
  30570. this.group.add(Nh(t, {
  30571. style: k({
  30572. fill: "none",
  30573. stroke: p[e % p.length]
  30574. }, I),
  30575. silent: !0
  30576. }))
  30577. }
  30578. ), this)
  30579. }
  30580. function C(t, e, n) {
  30581. var i = n % e.length;
  30582. return t[i] = t[i] || [],
  30583. i
  30584. }
  30585. }
  30586. ,
  30587. e.type = "radar",
  30588. e
  30589. }(Ag)
  30590. , KI = function(t) {
  30591. function e(e, n, i) {
  30592. var r = t.call(this, e, n, i) || this;
  30593. return r.type = "value",
  30594. r.angle = 0,
  30595. r.name = "",
  30596. r
  30597. }
  30598. return n(e, t),
  30599. e
  30600. }(ab)
  30601. , $I = function() {
  30602. function t(t, e, n) {
  30603. this.dimensions = [],
  30604. this._model = t,
  30605. this._indicatorAxes = z(t.getIndicatorModels(), (function(t, e) {
  30606. var n = "indicator_" + e
  30607. , i = new KI(n,new Ex);
  30608. return i.name = t.get("name"),
  30609. i.model = t,
  30610. t.axis = i,
  30611. this.dimensions.push(n),
  30612. i
  30613. }
  30614. ), this),
  30615. this.resize(t, n)
  30616. }
  30617. return t.prototype.getIndicatorAxes = function() {
  30618. return this._indicatorAxes
  30619. }
  30620. ,
  30621. t.prototype.dataToPoint = function(t, e) {
  30622. var n = this._indicatorAxes[e];
  30623. return this.coordToPoint(n.dataToCoord(t), e)
  30624. }
  30625. ,
  30626. t.prototype.coordToPoint = function(t, e) {
  30627. var n = this._indicatorAxes[e].angle;
  30628. return [this.cx + t * Math.cos(n), this.cy - t * Math.sin(n)]
  30629. }
  30630. ,
  30631. t.prototype.pointToData = function(t) {
  30632. var e = t[0] - this.cx
  30633. , n = t[1] - this.cy
  30634. , i = Math.sqrt(e * e + n * n);
  30635. e /= i,
  30636. n /= i;
  30637. for (var r, o = Math.atan2(-n, e), a = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
  30638. var u = this._indicatorAxes[l]
  30639. , h = Math.abs(o - u.angle);
  30640. h < a && (r = u,
  30641. s = l,
  30642. a = h)
  30643. }
  30644. return [s, +(r && r.coordToData(i))]
  30645. }
  30646. ,
  30647. t.prototype.resize = function(t, e) {
  30648. var n = t.get("center")
  30649. , i = e.getWidth()
  30650. , r = e.getHeight()
  30651. , o = Math.min(i, r) / 2;
  30652. this.cx = $r(n[0], i),
  30653. this.cy = $r(n[1], r),
  30654. this.startAngle = t.get("startAngle") * Math.PI / 180;
  30655. var a = t.get("radius");
  30656. (U(a) || j(a)) && (a = [0, a]),
  30657. this.r0 = $r(a[0], o),
  30658. this.r = $r(a[1], o),
  30659. E(this._indicatorAxes, (function(t, e) {
  30660. t.setExtent(this.r0, this.r);
  30661. var n = this.startAngle + e * Math.PI * 2 / this._indicatorAxes.length;
  30662. n = Math.atan2(Math.sin(n), Math.cos(n)),
  30663. t.angle = n
  30664. }
  30665. ), this)
  30666. }
  30667. ,
  30668. t.prototype.update = function(t, e) {
  30669. var n = this._indicatorAxes
  30670. , i = this._model;
  30671. E(n, (function(t) {
  30672. t.scale.setExtent(1 / 0, -1 / 0)
  30673. }
  30674. )),
  30675. t.eachSeriesByType("radar", (function(e, r) {
  30676. if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === i) {
  30677. var o = e.getData();
  30678. E(n, (function(t) {
  30679. t.scale.unionExtentFromData(o, o.mapDimension(t.dim))
  30680. }
  30681. ))
  30682. }
  30683. }
  30684. ), this);
  30685. var r = i.get("splitNumber")
  30686. , o = new Ex;
  30687. o.setExtent(0, r),
  30688. o.setInterval(1),
  30689. E(n, (function(t, e) {
  30690. sI(t.scale, t.model, o)
  30691. }
  30692. ))
  30693. }
  30694. ,
  30695. t.prototype.convertToPixel = function(t, e, n) {
  30696. return console.warn("Not implemented."),
  30697. null
  30698. }
  30699. ,
  30700. t.prototype.convertFromPixel = function(t, e, n) {
  30701. return console.warn("Not implemented."),
  30702. null
  30703. }
  30704. ,
  30705. t.prototype.containPoint = function(t) {
  30706. return console.warn("Not implemented."),
  30707. !1
  30708. }
  30709. ,
  30710. t.create = function(e, n) {
  30711. var i = [];
  30712. return e.eachComponent("radar", (function(r) {
  30713. var o = new t(r,e,n);
  30714. i.push(o),
  30715. r.coordinateSystem = o
  30716. }
  30717. )),
  30718. e.eachSeriesByType("radar", (function(t) {
  30719. "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0])
  30720. }
  30721. )),
  30722. i
  30723. }
  30724. ,
  30725. t.dimensions = [],
  30726. t
  30727. }();
  30728. function JI(t) {
  30729. t.registerCoordinateSystem("radar", $I),
  30730. t.registerComponentModel(ZI),
  30731. t.registerComponentView(qI),
  30732. t.registerVisual({
  30733. seriesType: "radar",
  30734. reset: function(t) {
  30735. var e = t.getData();
  30736. e.each((function(t) {
  30737. e.setItemVisual(t, "legendIcon", "roundRect")
  30738. }
  30739. )),
  30740. e.setVisual("legendIcon", "roundRect")
  30741. }
  30742. })
  30743. }
  30744. var QI = "\0_ec_interaction_mutex";
  30745. function tT(t, e) {
  30746. return !!eT(t)[e]
  30747. }
  30748. function eT(t) {
  30749. return t[QI] || (t[QI] = {})
  30750. }
  30751. Cm({
  30752. type: "takeGlobalCursor",
  30753. event: "globalCursorTaken",
  30754. update: "update"
  30755. }, bt);
  30756. var nT = function(t) {
  30757. function e(e) {
  30758. var n = t.call(this) || this;
  30759. n._zr = e;
  30760. var i = W(n._mousedownHandler, n)
  30761. , r = W(n._mousemoveHandler, n)
  30762. , o = W(n._mouseupHandler, n)
  30763. , a = W(n._mousewheelHandler, n)
  30764. , s = W(n._pinchHandler, n);
  30765. return n.enable = function(t, n) {
  30766. this.disable(),
  30767. this._opt = k(T(n) || {}, {
  30768. zoomOnMouseWheel: !0,
  30769. moveOnMouseMove: !0,
  30770. moveOnMouseWheel: !1,
  30771. preventDefaultMouseMove: !0
  30772. }),
  30773. null == t && (t = !0),
  30774. !0 !== t && "move" !== t && "pan" !== t || (e.on("mousedown", i),
  30775. e.on("mousemove", r),
  30776. e.on("mouseup", o)),
  30777. !0 !== t && "scale" !== t && "zoom" !== t || (e.on("mousewheel", a),
  30778. e.on("pinch", s))
  30779. }
  30780. ,
  30781. n.disable = function() {
  30782. e.off("mousedown", i),
  30783. e.off("mousemove", r),
  30784. e.off("mouseup", o),
  30785. e.off("mousewheel", a),
  30786. e.off("pinch", s)
  30787. }
  30788. ,
  30789. n
  30790. }
  30791. return n(e, t),
  30792. e.prototype.isDragging = function() {
  30793. return this._dragging
  30794. }
  30795. ,
  30796. e.prototype.isPinching = function() {
  30797. return this._pinching
  30798. }
  30799. ,
  30800. e.prototype.setPointerChecker = function(t) {
  30801. this.pointerChecker = t
  30802. }
  30803. ,
  30804. e.prototype.dispose = function() {
  30805. this.disable()
  30806. }
  30807. ,
  30808. e.prototype._mousedownHandler = function(t) {
  30809. if (!fe(t)) {
  30810. for (var e = t.target; e; ) {
  30811. if (e.draggable)
  30812. return;
  30813. e = e.__hostTarget || e.parent
  30814. }
  30815. var n = t.offsetX
  30816. , i = t.offsetY;
  30817. this.pointerChecker && this.pointerChecker(t, n, i) && (this._x = n,
  30818. this._y = i,
  30819. this._dragging = !0)
  30820. }
  30821. }
  30822. ,
  30823. e.prototype._mousemoveHandler = function(t) {
  30824. if (this._dragging && oT("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !tT(this._zr, "globalPan")) {
  30825. var e = t.offsetX
  30826. , n = t.offsetY
  30827. , i = this._x
  30828. , r = this._y
  30829. , o = e - i
  30830. , a = n - r;
  30831. this._x = e,
  30832. this._y = n,
  30833. this._opt.preventDefaultMouseMove && de(t.event),
  30834. rT(this, "pan", "moveOnMouseMove", t, {
  30835. dx: o,
  30836. dy: a,
  30837. oldX: i,
  30838. oldY: r,
  30839. newX: e,
  30840. newY: n,
  30841. isAvailableBehavior: null
  30842. })
  30843. }
  30844. }
  30845. ,
  30846. e.prototype._mouseupHandler = function(t) {
  30847. fe(t) || (this._dragging = !1)
  30848. }
  30849. ,
  30850. e.prototype._mousewheelHandler = function(t) {
  30851. var e = oT("zoomOnMouseWheel", t, this._opt)
  30852. , n = oT("moveOnMouseWheel", t, this._opt)
  30853. , i = t.wheelDelta
  30854. , r = Math.abs(i)
  30855. , o = t.offsetX
  30856. , a = t.offsetY;
  30857. if (0 !== i && (e || n)) {
  30858. if (e) {
  30859. var s = r > 3 ? 1.4 : r > 1 ? 1.2 : 1.1;
  30860. iT(this, "zoom", "zoomOnMouseWheel", t, {
  30861. scale: i > 0 ? s : 1 / s,
  30862. originX: o,
  30863. originY: a,
  30864. isAvailableBehavior: null
  30865. })
  30866. }
  30867. if (n) {
  30868. var l = Math.abs(i);
  30869. iT(this, "scrollMove", "moveOnMouseWheel", t, {
  30870. scrollDelta: (i > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05),
  30871. originX: o,
  30872. originY: a,
  30873. isAvailableBehavior: null
  30874. })
  30875. }
  30876. }
  30877. }
  30878. ,
  30879. e.prototype._pinchHandler = function(t) {
  30880. tT(this._zr, "globalPan") || iT(this, "zoom", null, t, {
  30881. scale: t.pinchScale > 1 ? 1.1 : 1 / 1.1,
  30882. originX: t.pinchX,
  30883. originY: t.pinchY,
  30884. isAvailableBehavior: null
  30885. })
  30886. }
  30887. ,
  30888. e
  30889. }(jt);
  30890. function iT(t, e, n, i, r) {
  30891. t.pointerChecker && t.pointerChecker(i, r.originX, r.originY) && (de(i.event),
  30892. rT(t, e, n, i, r))
  30893. }
  30894. function rT(t, e, n, i, r) {
  30895. r.isAvailableBehavior = W(oT, null, n, i),
  30896. t.trigger(e, r)
  30897. }
  30898. function oT(t, e, n) {
  30899. var i = n[t];
  30900. return !t || i && (!U(i) || e.event[i + "Key"])
  30901. }
  30902. function aT(t, e, n) {
  30903. var i = t.target;
  30904. i.x += e,
  30905. i.y += n,
  30906. i.dirty()
  30907. }
  30908. function sT(t, e, n, i) {
  30909. var r = t.target
  30910. , o = t.zoomLimit
  30911. , a = t.zoom = t.zoom || 1;
  30912. if (a *= e,
  30913. o) {
  30914. var s = o.min || 0
  30915. , l = o.max || 1 / 0;
  30916. a = Math.max(Math.min(l, a), s)
  30917. }
  30918. var u = a / t.zoom;
  30919. t.zoom = a,
  30920. r.x -= (n - r.x) * (u - 1),
  30921. r.y -= (i - r.y) * (u - 1),
  30922. r.scaleX *= u,
  30923. r.scaleY *= u,
  30924. r.dirty()
  30925. }
  30926. var lT, uT = {
  30927. axisPointer: 1,
  30928. tooltip: 1,
  30929. brush: 1
  30930. };
  30931. function hT(t, e, n) {
  30932. var i = e.getComponentByElement(t.topTarget)
  30933. , r = i && i.coordinateSystem;
  30934. return i && i !== n && !uT.hasOwnProperty(i.mainType) && r && r.model !== n
  30935. }
  30936. function cT(t) {
  30937. U(t) && (t = (new DOMParser).parseFromString(t, "text/xml"));
  30938. var e = t;
  30939. for (9 === e.nodeType && (e = e.firstChild); "svg" !== e.nodeName.toLowerCase() || 1 !== e.nodeType; )
  30940. e = e.nextSibling;
  30941. return e
  30942. }
  30943. var pT = {
  30944. fill: "fill",
  30945. stroke: "stroke",
  30946. "stroke-width": "lineWidth",
  30947. opacity: "opacity",
  30948. "fill-opacity": "fillOpacity",
  30949. "stroke-opacity": "strokeOpacity",
  30950. "stroke-dasharray": "lineDash",
  30951. "stroke-dashoffset": "lineDashOffset",
  30952. "stroke-linecap": "lineCap",
  30953. "stroke-linejoin": "lineJoin",
  30954. "stroke-miterlimit": "miterLimit",
  30955. "font-family": "fontFamily",
  30956. "font-size": "fontSize",
  30957. "font-style": "fontStyle",
  30958. "font-weight": "fontWeight",
  30959. "text-anchor": "textAlign",
  30960. visibility: "visibility",
  30961. display: "display"
  30962. }
  30963. , dT = G(pT)
  30964. , fT = {
  30965. "alignment-baseline": "textBaseline",
  30966. "stop-color": "stopColor"
  30967. }
  30968. , gT = G(fT)
  30969. , yT = function() {
  30970. function t() {
  30971. this._defs = {},
  30972. this._root = null
  30973. }
  30974. return t.prototype.parse = function(t, e) {
  30975. e = e || {};
  30976. var n = cT(t);
  30977. this._defsUsePending = [];
  30978. var i = new Br;
  30979. this._root = i;
  30980. var r = []
  30981. , o = n.getAttribute("viewBox") || ""
  30982. , a = parseFloat(n.getAttribute("width") || e.width)
  30983. , s = parseFloat(n.getAttribute("height") || e.height);
  30984. isNaN(a) && (a = null),
  30985. isNaN(s) && (s = null),
  30986. wT(n, i, null, !0, !1);
  30987. for (var l, u, h = n.firstChild; h; )
  30988. this._parseNode(h, i, r, null, !1, !1),
  30989. h = h.nextSibling;
  30990. if (function(t, e) {
  30991. for (var n = 0; n < e.length; n++) {
  30992. var i = e[n];
  30993. i[0].style[i[1]] = t[i[2]]
  30994. }
  30995. }(this._defs, this._defsUsePending),
  30996. this._defsUsePending = [],
  30997. o) {
  30998. var c = TT(o);
  30999. c.length >= 4 && (l = {
  31000. x: parseFloat(c[0] || 0),
  31001. y: parseFloat(c[1] || 0),
  31002. width: parseFloat(c[2]),
  31003. height: parseFloat(c[3])
  31004. })
  31005. }
  31006. if (l && null != a && null != s && (u = LT(l, {
  31007. x: 0,
  31008. y: 0,
  31009. width: a,
  31010. height: s
  31011. }),
  31012. !e.ignoreViewBox)) {
  31013. var p = i;
  31014. (i = new Br).add(p),
  31015. p.scaleX = p.scaleY = u.scale,
  31016. p.x = u.x,
  31017. p.y = u.y
  31018. }
  31019. return e.ignoreRootClip || null == a || null == s || i.setClipPath(new Ws({
  31020. shape: {
  31021. x: 0,
  31022. y: 0,
  31023. width: a,
  31024. height: s
  31025. }
  31026. })),
  31027. {
  31028. root: i,
  31029. width: a,
  31030. height: s,
  31031. viewBoxRect: l,
  31032. viewBoxTransform: u,
  31033. named: r
  31034. }
  31035. }
  31036. ,
  31037. t.prototype._parseNode = function(t, e, n, i, r, o) {
  31038. var a, s = t.nodeName.toLowerCase(), l = i;
  31039. if ("defs" === s && (r = !0),
  31040. "text" === s && (o = !0),
  31041. "defs" === s || "switch" === s)
  31042. a = e;
  31043. else {
  31044. if (!r) {
  31045. var u = lT[s];
  31046. if (u && _t(lT, s)) {
  31047. a = u.call(this, t, e);
  31048. var h = t.getAttribute("name");
  31049. if (h) {
  31050. var c = {
  31051. name: h,
  31052. namedFrom: null,
  31053. svgNodeTagLower: s,
  31054. el: a
  31055. };
  31056. n.push(c),
  31057. "g" === s && (l = c)
  31058. } else
  31059. i && n.push({
  31060. name: i.name,
  31061. namedFrom: i,
  31062. svgNodeTagLower: s,
  31063. el: a
  31064. });
  31065. e.add(a)
  31066. }
  31067. }
  31068. var p = vT[s];
  31069. if (p && _t(vT, s)) {
  31070. var d = p.call(this, t)
  31071. , f = t.getAttribute("id");
  31072. f && (this._defs[f] = d)
  31073. }
  31074. }
  31075. if (a && a.isGroup)
  31076. for (var g = t.firstChild; g; )
  31077. 1 === g.nodeType ? this._parseNode(g, a, n, l, r, o) : 3 === g.nodeType && o && this._parseText(g, a),
  31078. g = g.nextSibling
  31079. }
  31080. ,
  31081. t.prototype._parseText = function(t, e) {
  31082. var n = new Ps({
  31083. style: {
  31084. text: t.textContent
  31085. },
  31086. silent: !0,
  31087. x: this._textX || 0,
  31088. y: this._textY || 0
  31089. });
  31090. _T(e, n),
  31091. wT(t, n, this._defsUsePending, !1, !1),
  31092. function(t, e) {
  31093. var n = e.__selfStyle;
  31094. if (n) {
  31095. var i = n.textBaseline
  31096. , r = i;
  31097. 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",
  31098. t.style.textBaseline = r
  31099. }
  31100. var o = e.__inheritedStyle;
  31101. if (o) {
  31102. var a = o.textAlign
  31103. , s = a;
  31104. a && ("middle" === a && (s = "center"),
  31105. t.style.textAlign = s)
  31106. }
  31107. }(n, e);
  31108. var i = n.style
  31109. , r = i.fontSize;
  31110. r && r < 9 && (i.fontSize = 9,
  31111. n.scaleX *= r / 9,
  31112. n.scaleY *= r / 9);
  31113. var o = (i.fontSize || i.fontFamily) && [i.fontStyle, i.fontWeight, (i.fontSize || 12) + "px", i.fontFamily || "sans-serif"].join(" ");
  31114. i.font = o;
  31115. var a = n.getBoundingRect();
  31116. return this._textX += a.width,
  31117. e.add(n),
  31118. n
  31119. }
  31120. ,
  31121. t.internalField = void (lT = {
  31122. g: function(t, e) {
  31123. var n = new Br;
  31124. return _T(e, n),
  31125. wT(t, n, this._defsUsePending, !1, !1),
  31126. n
  31127. },
  31128. rect: function(t, e) {
  31129. var n = new Ws;
  31130. return _T(e, n),
  31131. wT(t, n, this._defsUsePending, !1, !1),
  31132. n.setShape({
  31133. x: parseFloat(t.getAttribute("x") || "0"),
  31134. y: parseFloat(t.getAttribute("y") || "0"),
  31135. width: parseFloat(t.getAttribute("width") || "0"),
  31136. height: parseFloat(t.getAttribute("height") || "0")
  31137. }),
  31138. n.silent = !0,
  31139. n
  31140. },
  31141. circle: function(t, e) {
  31142. var n = new Su;
  31143. return _T(e, n),
  31144. wT(t, n, this._defsUsePending, !1, !1),
  31145. n.setShape({
  31146. cx: parseFloat(t.getAttribute("cx") || "0"),
  31147. cy: parseFloat(t.getAttribute("cy") || "0"),
  31148. r: parseFloat(t.getAttribute("r") || "0")
  31149. }),
  31150. n.silent = !0,
  31151. n
  31152. },
  31153. line: function(t, e) {
  31154. var n = new Ku;
  31155. return _T(e, n),
  31156. wT(t, n, this._defsUsePending, !1, !1),
  31157. n.setShape({
  31158. x1: parseFloat(t.getAttribute("x1") || "0"),
  31159. y1: parseFloat(t.getAttribute("y1") || "0"),
  31160. x2: parseFloat(t.getAttribute("x2") || "0"),
  31161. y2: parseFloat(t.getAttribute("y2") || "0")
  31162. }),
  31163. n.silent = !0,
  31164. n
  31165. },
  31166. ellipse: function(t, e) {
  31167. var n = new Iu;
  31168. return _T(e, n),
  31169. wT(t, n, this._defsUsePending, !1, !1),
  31170. n.setShape({
  31171. cx: parseFloat(t.getAttribute("cx") || "0"),
  31172. cy: parseFloat(t.getAttribute("cy") || "0"),
  31173. rx: parseFloat(t.getAttribute("rx") || "0"),
  31174. ry: parseFloat(t.getAttribute("ry") || "0")
  31175. }),
  31176. n.silent = !0,
  31177. n
  31178. },
  31179. polygon: function(t, e) {
  31180. var n, i = t.getAttribute("points");
  31181. i && (n = bT(i));
  31182. var r = new Xu({
  31183. shape: {
  31184. points: n || []
  31185. },
  31186. silent: !0
  31187. });
  31188. return _T(e, r),
  31189. wT(t, r, this._defsUsePending, !1, !1),
  31190. r
  31191. },
  31192. polyline: function(t, e) {
  31193. var n, i = t.getAttribute("points");
  31194. i && (n = bT(i));
  31195. var r = new Zu({
  31196. shape: {
  31197. points: n || []
  31198. },
  31199. silent: !0
  31200. });
  31201. return _T(e, r),
  31202. wT(t, r, this._defsUsePending, !1, !1),
  31203. r
  31204. },
  31205. image: function(t, e) {
  31206. var n = new Ns;
  31207. return _T(e, n),
  31208. wT(t, n, this._defsUsePending, !1, !1),
  31209. n.setStyle({
  31210. image: t.getAttribute("xlink:href") || t.getAttribute("href"),
  31211. x: +t.getAttribute("x"),
  31212. y: +t.getAttribute("y"),
  31213. width: +t.getAttribute("width"),
  31214. height: +t.getAttribute("height")
  31215. }),
  31216. n.silent = !0,
  31217. n
  31218. },
  31219. text: function(t, e) {
  31220. var n = t.getAttribute("x") || "0"
  31221. , i = t.getAttribute("y") || "0"
  31222. , r = t.getAttribute("dx") || "0"
  31223. , o = t.getAttribute("dy") || "0";
  31224. this._textX = parseFloat(n) + parseFloat(r),
  31225. this._textY = parseFloat(i) + parseFloat(o);
  31226. var a = new Br;
  31227. return _T(e, a),
  31228. wT(t, a, this._defsUsePending, !1, !0),
  31229. a
  31230. },
  31231. tspan: function(t, e) {
  31232. var n = t.getAttribute("x")
  31233. , i = t.getAttribute("y");
  31234. null != n && (this._textX = parseFloat(n)),
  31235. null != i && (this._textY = parseFloat(i));
  31236. var r = t.getAttribute("dx") || "0"
  31237. , o = t.getAttribute("dy") || "0"
  31238. , a = new Br;
  31239. return _T(e, a),
  31240. wT(t, a, this._defsUsePending, !1, !0),
  31241. this._textX += parseFloat(r),
  31242. this._textY += parseFloat(o),
  31243. a
  31244. },
  31245. path: function(t, e) {
  31246. var n = _u(t.getAttribute("d") || "");
  31247. return _T(e, n),
  31248. wT(t, n, this._defsUsePending, !1, !1),
  31249. n.silent = !0,
  31250. n
  31251. }
  31252. }),
  31253. t
  31254. }()
  31255. , vT = {
  31256. lineargradient: function(t) {
  31257. var e = parseInt(t.getAttribute("x1") || "0", 10)
  31258. , n = parseInt(t.getAttribute("y1") || "0", 10)
  31259. , i = parseInt(t.getAttribute("x2") || "10", 10)
  31260. , r = parseInt(t.getAttribute("y2") || "0", 10)
  31261. , o = new oh(e,n,i,r);
  31262. return mT(t, o),
  31263. xT(t, o),
  31264. o
  31265. },
  31266. radialgradient: function(t) {
  31267. var e = parseInt(t.getAttribute("cx") || "0", 10)
  31268. , n = parseInt(t.getAttribute("cy") || "0", 10)
  31269. , i = parseInt(t.getAttribute("r") || "0", 10)
  31270. , r = new ah(e,n,i);
  31271. return mT(t, r),
  31272. xT(t, r),
  31273. r
  31274. }
  31275. };
  31276. function mT(t, e) {
  31277. "userSpaceOnUse" === t.getAttribute("gradientUnits") && (e.global = !0)
  31278. }
  31279. function xT(t, e) {
  31280. for (var n = t.firstChild; n; ) {
  31281. if (1 === n.nodeType && "stop" === n.nodeName.toLocaleLowerCase()) {
  31282. var i = n.getAttribute("offset")
  31283. , r = void 0;
  31284. r = i && i.indexOf("%") > 0 ? parseInt(i, 10) / 100 : i ? parseFloat(i) : 0;
  31285. var o = {};
  31286. kT(n, o, o);
  31287. var a = o.stopColor || n.getAttribute("stop-color") || "#000000";
  31288. e.colorStops.push({
  31289. offset: r,
  31290. color: a
  31291. })
  31292. }
  31293. n = n.nextSibling
  31294. }
  31295. }
  31296. function _T(t, e) {
  31297. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}),
  31298. k(e.__inheritedStyle, t.__inheritedStyle))
  31299. }
  31300. function bT(t) {
  31301. for (var e = TT(t), n = [], i = 0; i < e.length; i += 2) {
  31302. var r = parseFloat(e[i])
  31303. , o = parseFloat(e[i + 1]);
  31304. n.push([r, o])
  31305. }
  31306. return n
  31307. }
  31308. function wT(t, e, n, i, r) {
  31309. var o = e
  31310. , a = o.__inheritedStyle = o.__inheritedStyle || {}
  31311. , s = {};
  31312. 1 === t.nodeType && (function(t, e) {
  31313. var n = t.getAttribute("transform");
  31314. if (n) {
  31315. n = n.replace(/,/g, " ");
  31316. var i = []
  31317. , r = null;
  31318. n.replace(CT, (function(t, e, n) {
  31319. return i.push(e, n),
  31320. ""
  31321. }
  31322. ));
  31323. for (var o = i.length - 1; o > 0; o -= 2) {
  31324. var a = i[o]
  31325. , s = i[o - 1]
  31326. , l = TT(a);
  31327. switch (r = r || [1, 0, 0, 1, 0, 0],
  31328. s) {
  31329. case "translate":
  31330. we(r, r, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  31331. break;
  31332. case "scale":
  31333. Me(r, r, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  31334. break;
  31335. case "rotate":
  31336. Se(r, r, -parseFloat(l[0]) * DT, [parseFloat(l[1] || "0"), parseFloat(l[2] || "0")]);
  31337. break;
  31338. case "skewX":
  31339. be(r, [1, 0, Math.tan(parseFloat(l[0]) * DT), 1, 0, 0], r);
  31340. break;
  31341. case "skewY":
  31342. be(r, [1, Math.tan(parseFloat(l[0]) * DT), 0, 1, 0, 0], r);
  31343. break;
  31344. case "matrix":
  31345. r[0] = parseFloat(l[0]),
  31346. r[1] = parseFloat(l[1]),
  31347. r[2] = parseFloat(l[2]),
  31348. r[3] = parseFloat(l[3]),
  31349. r[4] = parseFloat(l[4]),
  31350. r[5] = parseFloat(l[5])
  31351. }
  31352. }
  31353. e.setLocalTransform(r)
  31354. }
  31355. }(t, e),
  31356. kT(t, a, s),
  31357. i || function(t, e, n) {
  31358. for (var i = 0; i < dT.length; i++) {
  31359. var r = dT[i];
  31360. null != (o = t.getAttribute(r)) && (e[pT[r]] = o)
  31361. }
  31362. for (i = 0; i < gT.length; i++) {
  31363. var o;
  31364. r = gT[i];
  31365. null != (o = t.getAttribute(r)) && (n[fT[r]] = o)
  31366. }
  31367. }(t, a, s)),
  31368. o.style = o.style || {},
  31369. null != a.fill && (o.style.fill = MT(o, "fill", a.fill, n)),
  31370. null != a.stroke && (o.style.stroke = MT(o, "stroke", a.stroke, n)),
  31371. E(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], (function(t) {
  31372. null != a[t] && (o.style[t] = parseFloat(a[t]))
  31373. }
  31374. )),
  31375. E(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign"], (function(t) {
  31376. null != a[t] && (o.style[t] = a[t])
  31377. }
  31378. )),
  31379. r && (o.__selfStyle = s),
  31380. a.lineDash && (o.style.lineDash = z(TT(a.lineDash), (function(t) {
  31381. return parseFloat(t)
  31382. }
  31383. ))),
  31384. "hidden" !== a.visibility && "collapse" !== a.visibility || (o.invisible = !0),
  31385. "none" === a.display && (o.ignore = !0)
  31386. }
  31387. var ST = /^url\(\s*#(.*?)\)/;
  31388. function MT(t, e, n, i) {
  31389. var r = n && n.match(ST);
  31390. if (!r)
  31391. return "none" === n && (n = null),
  31392. n;
  31393. var o = ut(r[1]);
  31394. i.push([t, e, o])
  31395. }
  31396. var IT = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  31397. function TT(t) {
  31398. return t.match(IT) || []
  31399. }
  31400. var CT = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g
  31401. , DT = Math.PI / 180;
  31402. var AT = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  31403. function kT(t, e, n) {
  31404. var i, r = t.getAttribute("style");
  31405. if (r)
  31406. for (AT.lastIndex = 0; null != (i = AT.exec(r)); ) {
  31407. var o = i[1]
  31408. , a = _t(pT, o) ? pT[o] : null;
  31409. a && (e[a] = i[2]);
  31410. var s = _t(fT, o) ? fT[o] : null;
  31411. s && (n[s] = i[2])
  31412. }
  31413. }
  31414. function LT(t, e) {
  31415. var n = e.width / t.width
  31416. , i = e.height / t.height
  31417. , r = Math.min(n, i);
  31418. return {
  31419. scale: r,
  31420. x: -(t.x + t.width / 2) * r + (e.x + e.width / 2),
  31421. y: -(t.y + t.height / 2) * r + (e.y + e.height / 2)
  31422. }
  31423. }
  31424. var PT = yt(["rect", "circle", "line", "ellipse", "polygon", "polyline", "path", "text", "tspan", "g"])
  31425. , OT = function() {
  31426. function t(t, e) {
  31427. this.type = "geoSVG",
  31428. this._usedGraphicMap = yt(),
  31429. this._freedGraphics = [],
  31430. this._mapName = t,
  31431. this._parsedXML = cT(e)
  31432. }
  31433. return t.prototype.load = function() {
  31434. var t = this._firstGraphic;
  31435. if (!t) {
  31436. t = this._firstGraphic = this._buildGraphic(this._parsedXML),
  31437. this._freedGraphics.push(t),
  31438. this._boundingRect = this._firstGraphic.boundingRect.clone();
  31439. var e = function(t) {
  31440. var e = []
  31441. , n = yt();
  31442. return E(t, (function(t) {
  31443. if (null == t.namedFrom) {
  31444. var i = new F_(t.name,t.el);
  31445. e.push(i),
  31446. n.set(t.name, i)
  31447. }
  31448. }
  31449. )),
  31450. {
  31451. regions: e,
  31452. regionsMap: n
  31453. }
  31454. }(t.named)
  31455. , n = e.regions
  31456. , i = e.regionsMap;
  31457. this._regions = n,
  31458. this._regionsMap = i
  31459. }
  31460. return {
  31461. boundingRect: this._boundingRect,
  31462. regions: this._regions,
  31463. regionsMap: this._regionsMap
  31464. }
  31465. }
  31466. ,
  31467. t.prototype._buildGraphic = function(t) {
  31468. var e, n, i, r;
  31469. try {
  31470. lt(null != (n = (e = t && (i = t,
  31471. r = {
  31472. ignoreViewBox: !0,
  31473. ignoreRootClip: !0
  31474. },
  31475. (new yT).parse(i, r)) || {}).root))
  31476. } catch (t) {
  31477. throw new Error("Invalid svg format\n" + t.message)
  31478. }
  31479. var o = new Br;
  31480. o.add(n),
  31481. o.isGeoSVGGraphicRoot = !0;
  31482. var a = e.width
  31483. , s = e.height
  31484. , l = e.viewBoxRect
  31485. , u = this._boundingRect;
  31486. if (!u) {
  31487. var h = void 0
  31488. , c = void 0
  31489. , p = void 0
  31490. , d = void 0;
  31491. if (null != a ? (h = 0,
  31492. p = a) : l && (h = l.x,
  31493. p = l.width),
  31494. null != s ? (c = 0,
  31495. d = s) : l && (c = l.y,
  31496. d = l.height),
  31497. null == h || null == c) {
  31498. var f = n.getBoundingRect();
  31499. null == h && (h = f.x,
  31500. p = f.width),
  31501. null == c && (c = f.y,
  31502. d = f.height)
  31503. }
  31504. u = this._boundingRect = new ze(h,c,p,d)
  31505. }
  31506. if (l) {
  31507. var g = LT(l, u);
  31508. n.scaleX = n.scaleY = g.scale,
  31509. n.x = g.x,
  31510. n.y = g.y
  31511. }
  31512. o.setClipPath(new Ws({
  31513. shape: u.plain()
  31514. }));
  31515. var y = [];
  31516. return E(e.named, (function(t) {
  31517. var e;
  31518. null != PT.get(t.svgNodeTagLower) && (y.push(t),
  31519. (e = t.el).silent = !1,
  31520. e.isGroup && e.traverse((function(t) {
  31521. t.silent = !1
  31522. }
  31523. )))
  31524. }
  31525. )),
  31526. {
  31527. root: o,
  31528. boundingRect: u,
  31529. named: y
  31530. }
  31531. }
  31532. ,
  31533. t.prototype.useGraphic = function(t) {
  31534. var e = this._usedGraphicMap
  31535. , n = e.get(t);
  31536. return n || (n = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML),
  31537. e.set(t, n),
  31538. n)
  31539. }
  31540. ,
  31541. t.prototype.freeGraphic = function(t) {
  31542. var e = this._usedGraphicMap
  31543. , n = e.get(t);
  31544. n && (e.removeKey(t),
  31545. this._freedGraphics.push(n))
  31546. }
  31547. ,
  31548. t
  31549. }();
  31550. for (var RT = [126, 25], NT = "南海诸岛", ET = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], zT = 0; zT < ET.length; zT++)
  31551. for (var VT = 0; VT < ET[zT].length; VT++)
  31552. ET[zT][VT][0] /= 10.5,
  31553. ET[zT][VT][1] /= -14,
  31554. ET[zT][VT][0] += RT[0],
  31555. ET[zT][VT][1] += RT[1];
  31556. var BT = {
  31557. "南海诸岛": [32, 80],
  31558. "广东": [0, -10],
  31559. "香港": [10, 5],
  31560. "澳门": [-10, 10],
  31561. "天津": [5, 5]
  31562. };
  31563. var FT = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
  31564. var GT = function() {
  31565. function t(t, e, n) {
  31566. var i;
  31567. this.type = "geoJSON",
  31568. this._parsedMap = yt(),
  31569. this._mapName = t,
  31570. this._specialAreas = n,
  31571. this._geoJSON = U(i = e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(i) : new Function("return (" + i + ");")() : i
  31572. }
  31573. return t.prototype.load = function(t, e) {
  31574. e = e || "name";
  31575. var n = this._parsedMap.get(e);
  31576. if (!n) {
  31577. var i = this._parseToRegions(e);
  31578. n = this._parsedMap.set(e, {
  31579. regions: i,
  31580. boundingRect: WT(i)
  31581. })
  31582. }
  31583. var r = yt()
  31584. , o = [];
  31585. return E(n.regions, (function(e) {
  31586. var n = e.name;
  31587. t && _t(t, n) && (e = e.cloneShallow(n = t[n])),
  31588. o.push(e),
  31589. r.set(n, e)
  31590. }
  31591. )),
  31592. {
  31593. regions: o,
  31594. boundingRect: n.boundingRect || new ze(0,0,0,0),
  31595. regionsMap: r
  31596. }
  31597. }
  31598. ,
  31599. t.prototype._parseToRegions = function(t) {
  31600. var e, n = this._mapName, i = this._geoJSON;
  31601. try {
  31602. e = i ? H_(i, t) : []
  31603. } catch (t) {
  31604. throw new Error("Invalid geoJson format\n" + t.message)
  31605. }
  31606. return function(t, e) {
  31607. if ("china" === t) {
  31608. for (var n = 0; n < e.length; n++)
  31609. if (e[n].name === NT)
  31610. return;
  31611. e.push(new B_(NT,z(ET, (function(t) {
  31612. return {
  31613. type: "polygon",
  31614. exterior: t
  31615. }
  31616. }
  31617. )),RT))
  31618. }
  31619. }(n, e),
  31620. E(e, (function(t) {
  31621. var e = t.name;
  31622. !function(t, e) {
  31623. if ("china" === t) {
  31624. var n = BT[e.name];
  31625. if (n) {
  31626. var i = e.getCenter();
  31627. i[0] += n[0] / 10.5,
  31628. i[1] += -n[1] / 14,
  31629. e.setCenter(i)
  31630. }
  31631. }
  31632. }(n, t),
  31633. function(t, e) {
  31634. "china" === t && "台湾" === e.name && e.geometries.push({
  31635. type: "polygon",
  31636. exterior: FT[0]
  31637. })
  31638. }(n, t);
  31639. var i = this._specialAreas && this._specialAreas[e];
  31640. i && t.transformTo(i.left, i.top, i.width, i.height)
  31641. }
  31642. ), this),
  31643. e
  31644. }
  31645. ,
  31646. t.prototype.getMapForUser = function() {
  31647. return {
  31648. geoJson: this._geoJSON,
  31649. geoJSON: this._geoJSON,
  31650. specialAreas: this._specialAreas
  31651. }
  31652. }
  31653. ,
  31654. t
  31655. }();
  31656. function WT(t) {
  31657. for (var e, n = 0; n < t.length; n++) {
  31658. var i = t[n].getBoundingRect();
  31659. (e = e || i.clone()).union(i)
  31660. }
  31661. return e
  31662. }
  31663. var HT = yt()
  31664. , YT = function(t, e, n) {
  31665. if (e.svg) {
  31666. var i = new OT(t,e.svg);
  31667. HT.set(t, i)
  31668. } else {
  31669. var r = e.geoJson || e.geoJSON;
  31670. r && !e.features ? n = e.specialAreas : r = e;
  31671. i = new GT(t,r,n);
  31672. HT.set(t, i)
  31673. }
  31674. }
  31675. , XT = function(t) {
  31676. return HT.get(t)
  31677. }
  31678. , UT = function(t) {
  31679. var e = HT.get(t);
  31680. return e && "geoJSON" === e.type && e.getMapForUser()
  31681. }
  31682. , ZT = function(t, e, n) {
  31683. var i = HT.get(t);
  31684. if (i)
  31685. return i.load(e, n)
  31686. }
  31687. , jT = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"]
  31688. , qT = yt(jT)
  31689. , KT = yt(jT.concat(["g"]))
  31690. , $T = yt(jT.concat(["g"]))
  31691. , JT = Vo();
  31692. function QT(t) {
  31693. var e = t.getItemStyle()
  31694. , n = t.get("areaColor");
  31695. return null != n && (e.fill = n),
  31696. e
  31697. }
  31698. function tC(t) {
  31699. var e = t.style;
  31700. e && (e.stroke = e.stroke || e.fill,
  31701. e.fill = null)
  31702. }
  31703. var eC = function() {
  31704. function t(t) {
  31705. var e = new Br;
  31706. this.uid = Ac("ec_map_draw"),
  31707. this._controller = new nT(t.getZr()),
  31708. this._controllerHost = {
  31709. target: e
  31710. },
  31711. this.group = e,
  31712. e.add(this._regionsGroup = new Br),
  31713. e.add(this._svgGroup = new Br)
  31714. }
  31715. return t.prototype.draw = function(t, e, n, i, r) {
  31716. var o = "geo" === t.mainType
  31717. , a = t.getData && t.getData();
  31718. o && e.eachComponent({
  31719. mainType: "series",
  31720. subType: "map"
  31721. }, (function(e) {
  31722. a || e.getHostGeoModel() !== t || (a = e.getData())
  31723. }
  31724. ));
  31725. var s = t.coordinateSystem
  31726. , l = this._regionsGroup
  31727. , u = this.group
  31728. , h = s.getTransformInfo()
  31729. , c = h.raw
  31730. , p = h.roam;
  31731. !l.childAt(0) || r ? (u.x = p.x,
  31732. u.y = p.y,
  31733. u.scaleX = p.scaleX,
  31734. u.scaleY = p.scaleY,
  31735. u.dirty()) : vh(u, p, t);
  31736. var d = a && a.getVisual("visualMeta") && a.getVisual("visualMeta").length > 0
  31737. , f = {
  31738. api: n,
  31739. geo: s,
  31740. mapOrGeoModel: t,
  31741. data: a,
  31742. isVisualEncodedByVisualMap: d,
  31743. isGeo: o,
  31744. transformInfoRaw: c
  31745. };
  31746. "geoJSON" === s.resourceType ? this._buildGeoJSON(f) : "geoSVG" === s.resourceType && this._buildSVG(f),
  31747. this._updateController(t, e, n),
  31748. this._updateMapSelectHandler(t, l, n, i)
  31749. }
  31750. ,
  31751. t.prototype._buildGeoJSON = function(t) {
  31752. var e = this._regionsGroupByName = yt()
  31753. , n = yt()
  31754. , i = this._regionsGroup
  31755. , r = t.transformInfoRaw
  31756. , o = t.mapOrGeoModel
  31757. , a = t.data
  31758. , s = t.geo.projection
  31759. , l = s && s.stream;
  31760. function u(t, e) {
  31761. return e && (t = e(t)),
  31762. t && [t[0] * r.scaleX + r.x, t[1] * r.scaleY + r.y]
  31763. }
  31764. function h(t) {
  31765. for (var e = [], n = !l && s && s.project, i = 0; i < t.length; ++i) {
  31766. var r = u(t[i], n);
  31767. r && e.push(r)
  31768. }
  31769. return e
  31770. }
  31771. function c(t) {
  31772. return {
  31773. shape: {
  31774. points: h(t)
  31775. }
  31776. }
  31777. }
  31778. i.removeAll(),
  31779. E(t.geo.regions, (function(r) {
  31780. var h = r.name
  31781. , p = e.get(h)
  31782. , d = n.get(h) || {}
  31783. , f = d.dataIdx
  31784. , g = d.regionModel;
  31785. if (!p) {
  31786. p = e.set(h, new Br),
  31787. i.add(p),
  31788. f = a ? a.indexOfName(h) : null;
  31789. var y = (g = t.isGeo ? o.getRegionModel(h) : a ? a.getItemModel(f) : null).get("silent", !0);
  31790. null != y && (p.silent = y),
  31791. n.set(h, {
  31792. dataIdx: f,
  31793. regionModel: g
  31794. })
  31795. }
  31796. var v = []
  31797. , m = [];
  31798. E(r.geometries, (function(t) {
  31799. if ("polygon" === t.type) {
  31800. var e = [t.exterior].concat(t.interiors || []);
  31801. l && (e = sC(e, l)),
  31802. E(e, (function(t) {
  31803. v.push(new Xu(c(t)))
  31804. }
  31805. ))
  31806. } else {
  31807. var n = t.points;
  31808. l && (n = sC(n, l, !0)),
  31809. E(n, (function(t) {
  31810. m.push(new Zu(c(t)))
  31811. }
  31812. ))
  31813. }
  31814. }
  31815. ));
  31816. var x = u(r.getCenter(), s && s.project);
  31817. function _(e, n) {
  31818. if (e.length) {
  31819. var i = new ih({
  31820. culling: !0,
  31821. segmentIgnoreThreshold: 1,
  31822. shape: {
  31823. paths: e
  31824. }
  31825. });
  31826. p.add(i),
  31827. nC(t, i, f, g),
  31828. iC(t, i, h, g, o, f, x),
  31829. n && (tC(i),
  31830. E(i.states, tC))
  31831. }
  31832. }
  31833. _(v),
  31834. _(m, !0)
  31835. }
  31836. )),
  31837. e.each((function(e, i) {
  31838. var r = n.get(i)
  31839. , a = r.dataIdx
  31840. , s = r.regionModel;
  31841. rC(t, e, i, s, o, a),
  31842. oC(t, e, i, s, o),
  31843. aC(t, e, i, s, o)
  31844. }
  31845. ), this)
  31846. }
  31847. ,
  31848. t.prototype._buildSVG = function(t) {
  31849. var e = t.geo.map
  31850. , n = t.transformInfoRaw;
  31851. this._svgGroup.x = n.x,
  31852. this._svgGroup.y = n.y,
  31853. this._svgGroup.scaleX = n.scaleX,
  31854. this._svgGroup.scaleY = n.scaleY,
  31855. this._svgResourceChanged(e) && (this._freeSVG(),
  31856. this._useSVG(e));
  31857. var i = this._svgDispatcherMap = yt()
  31858. , r = !1;
  31859. E(this._svgGraphicRecord.named, (function(e) {
  31860. var n = e.name
  31861. , o = t.mapOrGeoModel
  31862. , a = t.data
  31863. , s = e.svgNodeTagLower
  31864. , l = e.el
  31865. , u = a ? a.indexOfName(n) : null
  31866. , h = o.getRegionModel(n);
  31867. null != qT.get(s) && l instanceof Da && nC(t, l, u, h),
  31868. l instanceof Da && (l.culling = !0);
  31869. var c = h.get("silent", !0);
  31870. (null != c && (l.silent = c),
  31871. l.z2EmphasisLift = 0,
  31872. e.namedFrom) || (null != $T.get(s) && iC(t, l, n, h, o, u, null),
  31873. rC(t, l, n, h, o, u),
  31874. oC(t, l, n, h, o),
  31875. null != KT.get(s) && ("self" === aC(t, l, n, h, o) && (r = !0),
  31876. (i.get(n) || i.set(n, [])).push(l)))
  31877. }
  31878. ), this),
  31879. this._enableBlurEntireSVG(r, t)
  31880. }
  31881. ,
  31882. t.prototype._enableBlurEntireSVG = function(t, e) {
  31883. if (t && e.isGeo) {
  31884. var n = e.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle().opacity;
  31885. this._svgGraphicRecord.root.traverse((function(t) {
  31886. if (!t.isGroup) {
  31887. kl(t);
  31888. var e = t.ensureState("blur").style || {};
  31889. null == e.opacity && null != n && (e.opacity = n),
  31890. t.ensureState("emphasis")
  31891. }
  31892. }
  31893. ))
  31894. }
  31895. }
  31896. ,
  31897. t.prototype.remove = function() {
  31898. this._regionsGroup.removeAll(),
  31899. this._regionsGroupByName = null,
  31900. this._svgGroup.removeAll(),
  31901. this._freeSVG(),
  31902. this._controller.dispose(),
  31903. this._controllerHost = null
  31904. }
  31905. ,
  31906. t.prototype.findHighDownDispatchers = function(t, e) {
  31907. if (null == t)
  31908. return [];
  31909. var n = e.coordinateSystem;
  31910. if ("geoJSON" === n.resourceType) {
  31911. var i = this._regionsGroupByName;
  31912. if (i) {
  31913. var r = i.get(t);
  31914. return r ? [r] : []
  31915. }
  31916. } else if ("geoSVG" === n.resourceType)
  31917. return this._svgDispatcherMap && this._svgDispatcherMap.get(t) || []
  31918. }
  31919. ,
  31920. t.prototype._svgResourceChanged = function(t) {
  31921. return this._svgMapName !== t
  31922. }
  31923. ,
  31924. t.prototype._useSVG = function(t) {
  31925. var e = XT(t);
  31926. if (e && "geoSVG" === e.type) {
  31927. var n = e.useGraphic(this.uid);
  31928. this._svgGroup.add(n.root),
  31929. this._svgGraphicRecord = n,
  31930. this._svgMapName = t
  31931. }
  31932. }
  31933. ,
  31934. t.prototype._freeSVG = function() {
  31935. var t = this._svgMapName;
  31936. if (null != t) {
  31937. var e = XT(t);
  31938. e && "geoSVG" === e.type && e.freeGraphic(this.uid),
  31939. this._svgGraphicRecord = null,
  31940. this._svgDispatcherMap = null,
  31941. this._svgGroup.removeAll(),
  31942. this._svgMapName = null
  31943. }
  31944. }
  31945. ,
  31946. t.prototype._updateController = function(t, e, n) {
  31947. var i = t.coordinateSystem
  31948. , r = this._controller
  31949. , o = this._controllerHost;
  31950. o.zoomLimit = t.get("scaleLimit"),
  31951. o.zoom = i.getZoom(),
  31952. r.enable(t.get("roam") || !1);
  31953. var a = t.mainType;
  31954. function s() {
  31955. var e = {
  31956. type: "geoRoam",
  31957. componentType: a
  31958. };
  31959. return e[a + "Id"] = t.id,
  31960. e
  31961. }
  31962. r.off("pan").on("pan", (function(t) {
  31963. this._mouseDownFlag = !1,
  31964. aT(o, t.dx, t.dy),
  31965. n.dispatchAction(A(s(), {
  31966. dx: t.dx,
  31967. dy: t.dy,
  31968. animation: {
  31969. duration: 0
  31970. }
  31971. }))
  31972. }
  31973. ), this),
  31974. r.off("zoom").on("zoom", (function(t) {
  31975. this._mouseDownFlag = !1,
  31976. sT(o, t.scale, t.originX, t.originY),
  31977. n.dispatchAction(A(s(), {
  31978. totalZoom: o.zoom,
  31979. zoom: t.scale,
  31980. originX: t.originX,
  31981. originY: t.originY,
  31982. animation: {
  31983. duration: 0
  31984. }
  31985. }))
  31986. }
  31987. ), this),
  31988. r.setPointerChecker((function(e, r, o) {
  31989. return i.containPoint([r, o]) && !hT(e, n, t)
  31990. }
  31991. ))
  31992. }
  31993. ,
  31994. t.prototype.resetForLabelLayout = function() {
  31995. this.group.traverse((function(t) {
  31996. var e = t.getTextContent();
  31997. e && (e.ignore = JT(e).ignore)
  31998. }
  31999. ))
  32000. }
  32001. ,
  32002. t.prototype._updateMapSelectHandler = function(t, e, n, i) {
  32003. var r = this;
  32004. e.off("mousedown"),
  32005. e.off("click"),
  32006. t.get("selectedMode") && (e.on("mousedown", (function() {
  32007. r._mouseDownFlag = !0
  32008. }
  32009. )),
  32010. e.on("click", (function(t) {
  32011. r._mouseDownFlag && (r._mouseDownFlag = !1)
  32012. }
  32013. )))
  32014. }
  32015. ,
  32016. t
  32017. }();
  32018. function nC(t, e, n, i) {
  32019. var r = i.getModel("itemStyle")
  32020. , o = i.getModel(["emphasis", "itemStyle"])
  32021. , a = i.getModel(["blur", "itemStyle"])
  32022. , s = i.getModel(["select", "itemStyle"])
  32023. , l = QT(r)
  32024. , u = QT(o)
  32025. , h = QT(s)
  32026. , c = QT(a)
  32027. , p = t.data;
  32028. if (p) {
  32029. var d = p.getItemVisual(n, "style")
  32030. , f = p.getItemVisual(n, "decal");
  32031. t.isVisualEncodedByVisualMap && d.fill && (l.fill = d.fill),
  32032. f && (l.decal = mv(f, t.api))
  32033. }
  32034. e.setStyle(l),
  32035. e.style.strokeNoScale = !0,
  32036. e.ensureState("emphasis").style = u,
  32037. e.ensureState("select").style = h,
  32038. e.ensureState("blur").style = c,
  32039. kl(e)
  32040. }
  32041. function iC(t, e, n, i, r, o, a) {
  32042. var s = t.data
  32043. , l = t.isGeo
  32044. , u = s && isNaN(s.get(s.mapDimension("value"), o))
  32045. , h = s && s.getItemLayout(o);
  32046. if (l || u || h && h.showLabel) {
  32047. var c = l ? n : o
  32048. , p = void 0;
  32049. (!s || o >= 0) && (p = r);
  32050. var d = a ? {
  32051. normal: {
  32052. align: "center",
  32053. verticalAlign: "middle"
  32054. }
  32055. } : null;
  32056. ic(e, rc(i), {
  32057. labelFetcher: p,
  32058. labelDataIndex: c,
  32059. defaultText: n
  32060. }, d);
  32061. var f = e.getTextContent();
  32062. if (f && (JT(f).ignore = f.ignore,
  32063. e.textConfig && a)) {
  32064. var g = e.getBoundingRect().clone();
  32065. e.textConfig.layoutRect = g,
  32066. e.textConfig.position = [(a[0] - g.x) / g.width * 100 + "%", (a[1] - g.y) / g.height * 100 + "%"]
  32067. }
  32068. e.disableLabelAnimation = !0
  32069. } else
  32070. e.removeTextContent(),
  32071. e.removeTextConfig(),
  32072. e.disableLabelAnimation = null
  32073. }
  32074. function rC(t, e, n, i, r, o) {
  32075. t.data ? t.data.setItemGraphicEl(o, e) : rl(e).eventData = {
  32076. componentType: "geo",
  32077. componentIndex: r.componentIndex,
  32078. geoIndex: r.componentIndex,
  32079. name: n,
  32080. region: i && i.option || {}
  32081. }
  32082. }
  32083. function oC(t, e, n, i, r) {
  32084. t.data || Kh({
  32085. el: e,
  32086. componentModel: r,
  32087. itemName: n,
  32088. itemTooltipOption: i.get("tooltip")
  32089. })
  32090. }
  32091. function aC(t, e, n, i, r) {
  32092. e.highDownSilentOnTouch = !!r.get("selectedMode");
  32093. var o = i.getModel("emphasis")
  32094. , a = o.get("focus");
  32095. return Zl(e, a, o.get("blurScope"), o.get("disabled")),
  32096. t.isGeo && function(t, e, n) {
  32097. var i = rl(t);
  32098. i.componentMainType = e.mainType,
  32099. i.componentIndex = e.componentIndex,
  32100. i.componentHighDownName = n
  32101. }(e, r, n),
  32102. a
  32103. }
  32104. function sC(t, e, n) {
  32105. var i, r = [];
  32106. function o() {
  32107. i = []
  32108. }
  32109. function a() {
  32110. i.length && (r.push(i),
  32111. i = [])
  32112. }
  32113. var s = e({
  32114. polygonStart: o,
  32115. polygonEnd: a,
  32116. lineStart: o,
  32117. lineEnd: a,
  32118. point: function(t, e) {
  32119. isFinite(t) && isFinite(e) && i.push([t, e])
  32120. },
  32121. sphere: function() {}
  32122. });
  32123. return !n && s.polygonStart(),
  32124. E(t, (function(t) {
  32125. s.lineStart();
  32126. for (var e = 0; e < t.length; e++)
  32127. s.point(t[e][0], t[e][1]);
  32128. s.lineEnd()
  32129. }
  32130. )),
  32131. !n && s.polygonEnd(),
  32132. r
  32133. }
  32134. var lC = function(t) {
  32135. function e() {
  32136. var n = null !== t && t.apply(this, arguments) || this;
  32137. return n.type = e.type,
  32138. n
  32139. }
  32140. return n(e, t),
  32141. e.prototype.render = function(t, e, n, i) {
  32142. if (!i || "mapToggleSelect" !== i.type || i.from !== this.uid) {
  32143. var r = this.group;
  32144. if (r.removeAll(),
  32145. !t.getHostGeoModel()) {
  32146. if (this._mapDraw && i && "geoRoam" === i.type && this._mapDraw.resetForLabelLayout(),
  32147. i && "geoRoam" === i.type && "series" === i.componentType && i.seriesId === t.id)
  32148. (o = this._mapDraw) && r.add(o.group);
  32149. else if (t.needsDrawMap) {
  32150. var o = this._mapDraw || new eC(n);
  32151. r.add(o.group),
  32152. o.draw(t, e, n, this, i),
  32153. this._mapDraw = o
  32154. } else
  32155. this._mapDraw && this._mapDraw.remove(),
  32156. this._mapDraw = null;
  32157. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, n)
  32158. }
  32159. }
  32160. }
  32161. ,
  32162. e.prototype.remove = function() {
  32163. this._mapDraw && this._mapDraw.remove(),
  32164. this._mapDraw = null,
  32165. this.group.removeAll()
  32166. }
  32167. ,
  32168. e.prototype.dispose = function() {
  32169. this._mapDraw && this._mapDraw.remove(),
  32170. this._mapDraw = null
  32171. }
  32172. ,
  32173. e.prototype._renderSymbols = function(t, e, n) {
  32174. var i = t.originalData
  32175. , r = this.group;
  32176. i.each(i.mapDimension("value"), (function(e, n) {
  32177. if (!isNaN(e)) {
  32178. var o = i.getItemLayout(n);
  32179. if (o && o.point) {
  32180. var a = o.point
  32181. , s = o.offset
  32182. , l = new Su({
  32183. style: {
  32184. fill: t.getData().getVisual("style").fill
  32185. },
  32186. shape: {
  32187. cx: a[0] + 9 * s,
  32188. cy: a[1],
  32189. r: 3
  32190. },
  32191. silent: !0,
  32192. z2: 8 + (s ? 0 : 11)
  32193. });
  32194. if (!s) {
  32195. var u = t.mainSeries.getData()
  32196. , h = i.getName(n)
  32197. , c = u.indexOfName(h)
  32198. , p = i.getItemModel(n)
  32199. , d = p.getModel("label")
  32200. , f = u.getItemGraphicEl(c);
  32201. ic(l, rc(p), {
  32202. labelFetcher: {
  32203. getFormattedLabel: function(e, n) {
  32204. return t.getFormattedLabel(c, n)
  32205. }
  32206. },
  32207. defaultText: h
  32208. }),
  32209. l.disableLabelAnimation = !0,
  32210. d.get("position") || l.setTextConfig({
  32211. position: "bottom"
  32212. }),
  32213. f.onHoverStateChange = function(t) {
  32214. Dl(l, t)
  32215. }
  32216. }
  32217. r.add(l)
  32218. }
  32219. }
  32220. }
  32221. ))
  32222. }
  32223. ,
  32224. e.type = "map",
  32225. e
  32226. }(Og)
  32227. , uC = function(t) {
  32228. function e() {
  32229. var n = null !== t && t.apply(this, arguments) || this;
  32230. return n.type = e.type,
  32231. n.needsDrawMap = !1,
  32232. n.seriesGroup = [],
  32233. n.getTooltipPosition = function(t) {
  32234. if (null != t) {
  32235. var e = this.getData().getName(t)
  32236. , n = this.coordinateSystem
  32237. , i = n.getRegion(e);
  32238. return i && n.dataToPoint(i.getCenter())
  32239. }
  32240. }
  32241. ,
  32242. n
  32243. }
  32244. return n(e, t),
  32245. e.prototype.getInitialData = function(t) {
  32246. for (var e = RM(this, {
  32247. coordDimensions: ["value"],
  32248. encodeDefaulter: H(ed, this)
  32249. }), n = yt(), i = [], r = 0, o = e.count(); r < o; r++) {
  32250. var a = e.getName(r);
  32251. n.set(a, r)
  32252. }
  32253. return E(ZT(this.getMapType(), this.option.nameMap, this.option.nameProperty).regions, (function(t) {
  32254. var r, o = t.name, a = n.get(o), s = t.properties && t.properties.echartsStyle;
  32255. null == a ? (r = {
  32256. name: o
  32257. },
  32258. i.push(r)) : r = e.getRawDataItem(a),
  32259. s && C(r, s)
  32260. }
  32261. )),
  32262. e.appendData(i),
  32263. e
  32264. }
  32265. ,
  32266. e.prototype.getHostGeoModel = function() {
  32267. var t = this.option.geoIndex;
  32268. return null != t ? this.ecModel.getComponent("geo", t) : null
  32269. }
  32270. ,
  32271. e.prototype.getMapType = function() {
  32272. return (this.getHostGeoModel() || this).option.map
  32273. }
  32274. ,
  32275. e.prototype.getRawValue = function(t) {
  32276. var e = this.getData();
  32277. return e.get(e.mapDimension("value"), t)
  32278. }
  32279. ,
  32280. e.prototype.getRegionModel = function(t) {
  32281. var e = this.getData();
  32282. return e.getItemModel(e.indexOfName(t))
  32283. }
  32284. ,
  32285. e.prototype.formatTooltip = function(t, e, n) {
  32286. for (var i = this.getData(), r = this.getRawValue(t), o = i.getName(t), a = this.seriesGroup, s = [], l = 0; l < a.length; l++) {
  32287. var u = a[l].originalData.indexOfName(o)
  32288. , h = i.mapDimension("value");
  32289. isNaN(a[l].originalData.get(h, u)) || s.push(a[l].name)
  32290. }
  32291. return og("section", {
  32292. header: s.join(", "),
  32293. noHeader: !s.length,
  32294. blocks: [og("nameValue", {
  32295. name: o,
  32296. value: r
  32297. })]
  32298. })
  32299. }
  32300. ,
  32301. e.prototype.setZoom = function(t) {
  32302. this.option.zoom = t
  32303. }
  32304. ,
  32305. e.prototype.setCenter = function(t) {
  32306. this.option.center = t
  32307. }
  32308. ,
  32309. e.prototype.getLegendIcon = function(t) {
  32310. var e = t.icon || "roundRect"
  32311. , n = Xy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill);
  32312. return n.setStyle(t.itemStyle),
  32313. n.style.stroke = "none",
  32314. e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill,
  32315. n.style.fill = "#fff",
  32316. n.style.lineWidth = 2),
  32317. n
  32318. }
  32319. ,
  32320. e.type = "series.map",
  32321. e.dependencies = ["geo"],
  32322. e.layoutMode = "box",
  32323. e.defaultOption = {
  32324. z: 2,
  32325. coordinateSystem: "geo",
  32326. map: "",
  32327. left: "center",
  32328. top: "center",
  32329. aspectScale: null,
  32330. showLegendSymbol: !0,
  32331. boundingCoords: null,
  32332. center: null,
  32333. zoom: 1,
  32334. scaleLimit: null,
  32335. selectedMode: !0,
  32336. label: {
  32337. show: !1,
  32338. color: "#000"
  32339. },
  32340. itemStyle: {
  32341. borderWidth: .5,
  32342. borderColor: "#444",
  32343. areaColor: "#eee"
  32344. },
  32345. emphasis: {
  32346. label: {
  32347. show: !0,
  32348. color: "rgb(100,0,0)"
  32349. },
  32350. itemStyle: {
  32351. areaColor: "rgba(255,215,0,0.8)"
  32352. }
  32353. },
  32354. select: {
  32355. label: {
  32356. show: !0,
  32357. color: "rgb(100,0,0)"
  32358. },
  32359. itemStyle: {
  32360. color: "rgba(255,215,0,0.8)"
  32361. }
  32362. },
  32363. nameProperty: "name"
  32364. },
  32365. e
  32366. }(bg);
  32367. function hC(t) {
  32368. var e = {};
  32369. t.eachSeriesByType("map", (function(t) {
  32370. var n = t.getHostGeoModel()
  32371. , i = n ? "o" + n.id : "i" + t.getMapType();
  32372. (e[i] = e[i] || []).push(t)
  32373. }
  32374. )),
  32375. E(e, (function(t, e) {
  32376. for (var n, i, r, o = (n = z(t, (function(t) {
  32377. return t.getData()
  32378. }
  32379. )),
  32380. i = t[0].get("mapValueCalculation"),
  32381. r = {},
  32382. E(n, (function(t) {
  32383. t.each(t.mapDimension("value"), (function(e, n) {
  32384. var i = "ec-" + t.getName(n);
  32385. r[i] = r[i] || [],
  32386. isNaN(e) || r[i].push(e)
  32387. }
  32388. ))
  32389. }
  32390. )),
  32391. n[0].map(n[0].mapDimension("value"), (function(t, e) {
  32392. 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++)
  32393. s = Math.min(s, r[o][h]),
  32394. l = Math.max(l, r[o][h]),
  32395. a += r[o][h];
  32396. return 0 === u ? NaN : "min" === i ? s : "max" === i ? l : "average" === i ? a / u : a
  32397. }
  32398. ))), a = 0; a < t.length; a++)
  32399. t[a].originalData = t[a].getData();
  32400. for (a = 0; a < t.length; a++)
  32401. t[a].seriesGroup = t,
  32402. t[a].needsDrawMap = 0 === a && !t[a].getHostGeoModel(),
  32403. t[a].setData(o.cloneShallow()),
  32404. t[a].mainSeries = t[0]
  32405. }
  32406. ))
  32407. }
  32408. function cC(t) {
  32409. var e = {};
  32410. t.eachSeriesByType("map", (function(n) {
  32411. var i = n.getMapType();
  32412. if (!n.getHostGeoModel() && !e[i]) {
  32413. var r = {};
  32414. E(n.seriesGroup, (function(e) {
  32415. var n = e.coordinateSystem
  32416. , i = e.originalData;
  32417. e.get("showLegendSymbol") && t.getComponent("legend") && i.each(i.mapDimension("value"), (function(t, e) {
  32418. var o = i.getName(e)
  32419. , a = n.getRegion(o);
  32420. if (a && !isNaN(t)) {
  32421. var s = r[o] || 0
  32422. , l = n.dataToPoint(a.getCenter());
  32423. r[o] = s + 1,
  32424. i.setItemLayout(e, {
  32425. point: l,
  32426. offset: s
  32427. })
  32428. }
  32429. }
  32430. ))
  32431. }
  32432. ));
  32433. var o = n.getData();
  32434. o.each((function(t) {
  32435. var e = o.getName(t)
  32436. , n = o.getItemLayout(t) || {};
  32437. n.showLabel = !r[e],
  32438. o.setItemLayout(t, n)
  32439. }
  32440. )),
  32441. e[i] = !0
  32442. }
  32443. }
  32444. ))
  32445. }
  32446. var pC = Wt
  32447. , dC = function(t) {
  32448. function e(e) {
  32449. var n = t.call(this) || this;
  32450. return n.type = "view",
  32451. n.dimensions = ["x", "y"],
  32452. n._roamTransformable = new vr,
  32453. n._rawTransformable = new vr,
  32454. n.name = e,
  32455. n
  32456. }
  32457. return n(e, t),
  32458. e.prototype.setBoundingRect = function(t, e, n, i) {
  32459. return this._rect = new ze(t,e,n,i),
  32460. this._rect
  32461. }
  32462. ,
  32463. e.prototype.getBoundingRect = function() {
  32464. return this._rect
  32465. }
  32466. ,
  32467. e.prototype.setViewRect = function(t, e, n, i) {
  32468. this._transformTo(t, e, n, i),
  32469. this._viewRect = new ze(t,e,n,i)
  32470. }
  32471. ,
  32472. e.prototype._transformTo = function(t, e, n, i) {
  32473. var r = this.getBoundingRect()
  32474. , o = this._rawTransformable;
  32475. o.transform = r.calculateTransform(new ze(t,e,n,i));
  32476. var a = o.parent;
  32477. o.parent = null,
  32478. o.decomposeTransform(),
  32479. o.parent = a,
  32480. this._updateTransform()
  32481. }
  32482. ,
  32483. e.prototype.setCenter = function(t, e) {
  32484. t && (this._center = [$r(t[0], e.getWidth()), $r(t[1], e.getHeight())],
  32485. this._updateCenterAndZoom())
  32486. }
  32487. ,
  32488. e.prototype.setZoom = function(t) {
  32489. t = t || 1;
  32490. var e = this.zoomLimit;
  32491. e && (null != e.max && (t = Math.min(e.max, t)),
  32492. null != e.min && (t = Math.max(e.min, t))),
  32493. this._zoom = t,
  32494. this._updateCenterAndZoom()
  32495. }
  32496. ,
  32497. e.prototype.getDefaultCenter = function() {
  32498. var t = this.getBoundingRect();
  32499. return [t.x + t.width / 2, t.y + t.height / 2]
  32500. }
  32501. ,
  32502. e.prototype.getCenter = function() {
  32503. return this._center || this.getDefaultCenter()
  32504. }
  32505. ,
  32506. e.prototype.getZoom = function() {
  32507. return this._zoom || 1
  32508. }
  32509. ,
  32510. e.prototype.getRoamTransform = function() {
  32511. return this._roamTransformable.getLocalTransform()
  32512. }
  32513. ,
  32514. e.prototype._updateCenterAndZoom = function() {
  32515. var t = this._rawTransformable.getLocalTransform()
  32516. , e = this._roamTransformable
  32517. , n = this.getDefaultCenter()
  32518. , i = this.getCenter()
  32519. , r = this.getZoom();
  32520. i = Wt([], i, t),
  32521. n = Wt([], n, t),
  32522. e.originX = i[0],
  32523. e.originY = i[1],
  32524. e.x = n[0] - i[0],
  32525. e.y = n[1] - i[1],
  32526. e.scaleX = e.scaleY = r,
  32527. this._updateTransform()
  32528. }
  32529. ,
  32530. e.prototype._updateTransform = function() {
  32531. var t = this._roamTransformable
  32532. , e = this._rawTransformable;
  32533. e.parent = t,
  32534. t.updateTransform(),
  32535. e.updateTransform(),
  32536. _e(this.transform || (this.transform = []), e.transform || [1, 0, 0, 1, 0, 0]),
  32537. this._rawTransform = e.getLocalTransform(),
  32538. this.invTransform = this.invTransform || [],
  32539. Ie(this.invTransform, this.transform),
  32540. this.decomposeTransform()
  32541. }
  32542. ,
  32543. e.prototype.getTransformInfo = function() {
  32544. var t = this._rawTransformable
  32545. , e = this._roamTransformable
  32546. , n = new vr;
  32547. return n.transform = e.transform,
  32548. n.decomposeTransform(),
  32549. {
  32550. roam: {
  32551. x: n.x,
  32552. y: n.y,
  32553. scaleX: n.scaleX,
  32554. scaleY: n.scaleY
  32555. },
  32556. raw: {
  32557. x: t.x,
  32558. y: t.y,
  32559. scaleX: t.scaleX,
  32560. scaleY: t.scaleY
  32561. }
  32562. }
  32563. }
  32564. ,
  32565. e.prototype.getViewRect = function() {
  32566. return this._viewRect
  32567. }
  32568. ,
  32569. e.prototype.getViewRectAfterRoam = function() {
  32570. var t = this.getBoundingRect().clone();
  32571. return t.applyTransform(this.transform),
  32572. t
  32573. }
  32574. ,
  32575. e.prototype.dataToPoint = function(t, e, n) {
  32576. var i = e ? this._rawTransform : this.transform;
  32577. return n = n || [],
  32578. i ? pC(n, t, i) : It(n, t)
  32579. }
  32580. ,
  32581. e.prototype.pointToData = function(t) {
  32582. var e = this.invTransform;
  32583. return e ? pC([], t, e) : [t[0], t[1]]
  32584. }
  32585. ,
  32586. e.prototype.convertToPixel = function(t, e, n) {
  32587. var i = fC(e);
  32588. return i === this ? i.dataToPoint(n) : null
  32589. }
  32590. ,
  32591. e.prototype.convertFromPixel = function(t, e, n) {
  32592. var i = fC(e);
  32593. return i === this ? i.pointToData(n) : null
  32594. }
  32595. ,
  32596. e.prototype.containPoint = function(t) {
  32597. return this.getViewRectAfterRoam().contain(t[0], t[1])
  32598. }
  32599. ,
  32600. e.dimensions = ["x", "y"],
  32601. e
  32602. }(vr);
  32603. function fC(t) {
  32604. var e = t.seriesModel;
  32605. return e ? e.coordinateSystem : null
  32606. }
  32607. var gC = {
  32608. geoJSON: {
  32609. aspectScale: .75,
  32610. invertLongitute: !0
  32611. },
  32612. geoSVG: {
  32613. aspectScale: 1,
  32614. invertLongitute: !1
  32615. }
  32616. }
  32617. , yC = ["lng", "lat"]
  32618. , vC = function(t) {
  32619. function e(e, n, i) {
  32620. var r = t.call(this, e) || this;
  32621. r.dimensions = yC,
  32622. r.type = "geo",
  32623. r._nameCoordMap = yt(),
  32624. r.map = n;
  32625. var o, a = i.projection, s = ZT(n, i.nameMap, i.nameProperty), l = XT(n), u = (r.resourceType = l ? l.type : null,
  32626. r.regions = s.regions), h = gC[l.type];
  32627. if (r._regionsMap = s.regionsMap,
  32628. r.regions = s.regions,
  32629. r.projection = a,
  32630. a)
  32631. for (var c = 0; c < u.length; c++) {
  32632. var p = u[c].getBoundingRect(a);
  32633. (o = o || p.clone()).union(p)
  32634. }
  32635. else
  32636. o = s.boundingRect;
  32637. return r.setBoundingRect(o.x, o.y, o.width, o.height),
  32638. r.aspectScale = a ? 1 : rt(i.aspectScale, h.aspectScale),
  32639. r._invertLongitute = !a && h.invertLongitute,
  32640. r
  32641. }
  32642. return n(e, t),
  32643. e.prototype._transformTo = function(t, e, n, i) {
  32644. var r = this.getBoundingRect()
  32645. , o = this._invertLongitute;
  32646. r = r.clone(),
  32647. o && (r.y = -r.y - r.height);
  32648. var a = this._rawTransformable;
  32649. a.transform = r.calculateTransform(new ze(t,e,n,i));
  32650. var s = a.parent;
  32651. a.parent = null,
  32652. a.decomposeTransform(),
  32653. a.parent = s,
  32654. o && (a.scaleY = -a.scaleY),
  32655. this._updateTransform()
  32656. }
  32657. ,
  32658. e.prototype.getRegion = function(t) {
  32659. return this._regionsMap.get(t)
  32660. }
  32661. ,
  32662. e.prototype.getRegionByCoord = function(t) {
  32663. for (var e = this.regions, n = 0; n < e.length; n++) {
  32664. var i = e[n];
  32665. if ("geoJSON" === i.type && i.contain(t))
  32666. return e[n]
  32667. }
  32668. }
  32669. ,
  32670. e.prototype.addGeoCoord = function(t, e) {
  32671. this._nameCoordMap.set(t, e)
  32672. }
  32673. ,
  32674. e.prototype.getGeoCoord = function(t) {
  32675. var e = this._regionsMap.get(t);
  32676. return this._nameCoordMap.get(t) || e && e.getCenter()
  32677. }
  32678. ,
  32679. e.prototype.dataToPoint = function(t, e, n) {
  32680. if (U(t) && (t = this.getGeoCoord(t)),
  32681. t) {
  32682. var i = this.projection;
  32683. return i && (t = i.project(t)),
  32684. t && this.projectedToPoint(t, e, n)
  32685. }
  32686. }
  32687. ,
  32688. e.prototype.pointToData = function(t) {
  32689. var e = this.projection;
  32690. return e && (t = e.unproject(t)),
  32691. t && this.pointToProjected(t)
  32692. }
  32693. ,
  32694. e.prototype.pointToProjected = function(e) {
  32695. return t.prototype.pointToData.call(this, e)
  32696. }
  32697. ,
  32698. e.prototype.projectedToPoint = function(e, n, i) {
  32699. return t.prototype.dataToPoint.call(this, e, n, i)
  32700. }
  32701. ,
  32702. e.prototype.convertToPixel = function(t, e, n) {
  32703. var i = mC(e);
  32704. return i === this ? i.dataToPoint(n) : null
  32705. }
  32706. ,
  32707. e.prototype.convertFromPixel = function(t, e, n) {
  32708. var i = mC(e);
  32709. return i === this ? i.pointToData(n) : null
  32710. }
  32711. ,
  32712. e
  32713. }(dC);
  32714. function mC(t) {
  32715. var e = t.geoModel
  32716. , n = t.seriesModel;
  32717. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Wo).models[0] || {}).coordinateSystem : null
  32718. }
  32719. function xC(t, e) {
  32720. var n = t.get("boundingCoords");
  32721. if (null != n) {
  32722. var i = n[0]
  32723. , r = n[1];
  32724. if (isFinite(i[0]) && isFinite(i[1]) && isFinite(r[0]) && isFinite(r[1])) {
  32725. var o = this.projection;
  32726. if (o) {
  32727. var a = i[0]
  32728. , s = i[1]
  32729. , l = r[0]
  32730. , u = r[1];
  32731. i = [1 / 0, 1 / 0],
  32732. r = [-1 / 0, -1 / 0];
  32733. var h = function(t, e, n, a) {
  32734. for (var s = n - t, l = a - e, u = 0; u <= 100; u++) {
  32735. var h = u / 100
  32736. , c = o.project([t + s * h, e + l * h]);
  32737. Ht(i, i, c),
  32738. Yt(r, r, c)
  32739. }
  32740. };
  32741. h(a, s, l, s),
  32742. h(l, s, l, u),
  32743. h(l, u, a, u),
  32744. h(a, u, l, s)
  32745. }
  32746. this.setBoundingRect(i[0], i[1], r[0] - i[0], r[1] - i[1])
  32747. } else
  32748. 0
  32749. }
  32750. var c, p, d, f = this.getBoundingRect(), g = t.get("layoutCenter"), y = t.get("layoutSize"), v = e.getWidth(), m = e.getHeight(), x = f.width / f.height * this.aspectScale, _ = !1;
  32751. if (g && y && (c = [$r(g[0], v), $r(g[1], m)],
  32752. p = $r(y, Math.min(v, m)),
  32753. isNaN(c[0]) || isNaN(c[1]) || isNaN(p) || (_ = !0)),
  32754. _)
  32755. d = {},
  32756. x > 1 ? (d.width = p,
  32757. d.height = p / x) : (d.height = p,
  32758. d.width = p * x),
  32759. d.y = c[1] - d.height / 2,
  32760. d.x = c[0] - d.width / 2;
  32761. else {
  32762. var b = t.getBoxLayoutParams();
  32763. b.aspect = x,
  32764. d = kp(b, {
  32765. width: v,
  32766. height: m
  32767. })
  32768. }
  32769. this.setViewRect(d.x, d.y, d.width, d.height),
  32770. this.setCenter(t.get("center"), e),
  32771. this.setZoom(t.get("zoom"))
  32772. }
  32773. R(vC, dC);
  32774. var _C = function() {
  32775. function t() {
  32776. this.dimensions = yC
  32777. }
  32778. return t.prototype.create = function(t, e) {
  32779. var n = [];
  32780. function i(t) {
  32781. return {
  32782. nameProperty: t.get("nameProperty"),
  32783. aspectScale: t.get("aspectScale"),
  32784. projection: t.get("projection")
  32785. }
  32786. }
  32787. t.eachComponent("geo", (function(t, r) {
  32788. var o = t.get("map")
  32789. , a = new vC(o + r,o,A({
  32790. nameMap: t.get("nameMap")
  32791. }, i(t)));
  32792. a.zoomLimit = t.get("scaleLimit"),
  32793. n.push(a),
  32794. t.coordinateSystem = a,
  32795. a.model = t,
  32796. a.resize = xC,
  32797. a.resize(t, e)
  32798. }
  32799. )),
  32800. t.eachSeries((function(t) {
  32801. if ("geo" === t.get("coordinateSystem")) {
  32802. var e = t.get("geoIndex") || 0;
  32803. t.coordinateSystem = n[e]
  32804. }
  32805. }
  32806. ));
  32807. var r = {};
  32808. return t.eachSeriesByType("map", (function(t) {
  32809. if (!t.getHostGeoModel()) {
  32810. var e = t.getMapType();
  32811. r[e] = r[e] || [],
  32812. r[e].push(t)
  32813. }
  32814. }
  32815. )),
  32816. E(r, (function(t, r) {
  32817. var o = z(t, (function(t) {
  32818. return t.get("nameMap")
  32819. }
  32820. ))
  32821. , a = new vC(r,r,A({
  32822. nameMap: D(o)
  32823. }, i(t[0])));
  32824. a.zoomLimit = it.apply(null, z(t, (function(t) {
  32825. return t.get("scaleLimit")
  32826. }
  32827. ))),
  32828. n.push(a),
  32829. a.resize = xC,
  32830. a.resize(t[0], e),
  32831. E(t, (function(t) {
  32832. t.coordinateSystem = a,
  32833. function(t, e) {
  32834. E(e.get("geoCoord"), (function(e, n) {
  32835. t.addGeoCoord(n, e)
  32836. }
  32837. ))
  32838. }(a, t)
  32839. }
  32840. ))
  32841. }
  32842. )),
  32843. n
  32844. }
  32845. ,
  32846. t.prototype.getFilledRegions = function(t, e, n, i) {
  32847. for (var r = (t || []).slice(), o = yt(), a = 0; a < r.length; a++)
  32848. o.set(r[a].name, r[a]);
  32849. return E(ZT(e, n, i).regions, (function(t) {
  32850. var e = t.name
  32851. , n = o.get(e)
  32852. , i = t.properties && t.properties.echartsStyle;
  32853. n || (n = {
  32854. name: e
  32855. },
  32856. r.push(n)),
  32857. i && C(n, i)
  32858. }
  32859. )),
  32860. r
  32861. }
  32862. ,
  32863. t
  32864. }()
  32865. , bC = new _C
  32866. , wC = function(t) {
  32867. function e() {
  32868. var n = null !== t && t.apply(this, arguments) || this;
  32869. return n.type = e.type,
  32870. n
  32871. }
  32872. return n(e, t),
  32873. e.prototype.init = function(t, e, n) {
  32874. var i = XT(t.map);
  32875. if (i && "geoJSON" === i.type) {
  32876. var r = t.itemStyle = t.itemStyle || {};
  32877. "color"in r || (r.color = "#eee")
  32878. }
  32879. this.mergeDefaultAndTheme(t, n),
  32880. Co(t, "label", ["show"])
  32881. }
  32882. ,
  32883. e.prototype.optionUpdated = function() {
  32884. var t = this
  32885. , e = this.option;
  32886. e.regions = bC.getFilledRegions(e.regions, e.map, e.nameMap, e.nameProperty);
  32887. var n = {};
  32888. this._optionModelMap = V(e.regions || [], (function(e, i) {
  32889. var r = i.name;
  32890. return r && (e.set(r, new Cc(i,t,t.ecModel)),
  32891. i.selected && (n[r] = !0)),
  32892. e
  32893. }
  32894. ), yt()),
  32895. e.selectedMap || (e.selectedMap = n)
  32896. }
  32897. ,
  32898. e.prototype.getRegionModel = function(t) {
  32899. return this._optionModelMap.get(t) || new Cc(null,this,this.ecModel)
  32900. }
  32901. ,
  32902. e.prototype.getFormattedLabel = function(t, e) {
  32903. var n = this.getRegionModel(t)
  32904. , i = "normal" === e ? n.get(["label", "formatter"]) : n.get(["emphasis", "label", "formatter"])
  32905. , r = {
  32906. name: t
  32907. };
  32908. return X(i) ? (r.status = e,
  32909. i(r)) : U(i) ? i.replace("{a}", null != t ? t : "") : void 0
  32910. }
  32911. ,
  32912. e.prototype.setZoom = function(t) {
  32913. this.option.zoom = t
  32914. }
  32915. ,
  32916. e.prototype.setCenter = function(t) {
  32917. this.option.center = t
  32918. }
  32919. ,
  32920. e.prototype.select = function(t) {
  32921. var e = this.option
  32922. , n = e.selectedMode;
  32923. n && ("multiple" !== n && (e.selectedMap = null),
  32924. (e.selectedMap || (e.selectedMap = {}))[t] = !0)
  32925. }
  32926. ,
  32927. e.prototype.unSelect = function(t) {
  32928. var e = this.option.selectedMap;
  32929. e && (e[t] = !1)
  32930. }
  32931. ,
  32932. e.prototype.toggleSelected = function(t) {
  32933. this[this.isSelected(t) ? "unSelect" : "select"](t)
  32934. }
  32935. ,
  32936. e.prototype.isSelected = function(t) {
  32937. var e = this.option.selectedMap;
  32938. return !(!e || !e[t])
  32939. }
  32940. ,
  32941. e.type = "geo",
  32942. e.layoutMode = "box",
  32943. e.defaultOption = {
  32944. z: 0,
  32945. show: !0,
  32946. left: "center",
  32947. top: "center",
  32948. aspectScale: null,
  32949. silent: !1,
  32950. map: "",
  32951. boundingCoords: null,
  32952. center: null,
  32953. zoom: 1,
  32954. scaleLimit: null,
  32955. label: {
  32956. show: !1,
  32957. color: "#000"
  32958. },
  32959. itemStyle: {
  32960. borderWidth: .5,
  32961. borderColor: "#444"
  32962. },
  32963. emphasis: {
  32964. label: {
  32965. show: !0,
  32966. color: "rgb(100,0,0)"
  32967. },
  32968. itemStyle: {
  32969. color: "rgba(255,215,0,0.8)"
  32970. }
  32971. },
  32972. select: {
  32973. label: {
  32974. show: !0,
  32975. color: "rgb(100,0,0)"
  32976. },
  32977. itemStyle: {
  32978. color: "rgba(255,215,0,0.8)"
  32979. }
  32980. },
  32981. regions: []
  32982. },
  32983. e
  32984. }(zp);
  32985. function SC(t, e) {
  32986. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e)
  32987. }
  32988. function MC(t, e, n, i) {
  32989. var r = t.getZoom()
  32990. , o = t.getCenter()
  32991. , a = e.zoom
  32992. , s = t.projectedToPoint ? t.projectedToPoint(o) : t.dataToPoint(o);
  32993. if (null != e.dx && null != e.dy && (s[0] -= e.dx,
  32994. s[1] -= e.dy,
  32995. t.setCenter(SC(t, s), i)),
  32996. null != a) {
  32997. if (n) {
  32998. var l = n.min || 0
  32999. , u = n.max || 1 / 0;
  33000. a = Math.max(Math.min(r * a, u), l) / r
  33001. }
  33002. t.scaleX *= a,
  33003. t.scaleY *= a;
  33004. var h = (e.originX - t.x) * (a - 1)
  33005. , c = (e.originY - t.y) * (a - 1);
  33006. t.x -= h,
  33007. t.y -= c,
  33008. t.updateTransform(),
  33009. t.setCenter(SC(t, s), i),
  33010. t.setZoom(a * r)
  33011. }
  33012. return {
  33013. center: t.getCenter(),
  33014. zoom: t.getZoom()
  33015. }
  33016. }
  33017. var IC = function(t) {
  33018. function e() {
  33019. var n = null !== t && t.apply(this, arguments) || this;
  33020. return n.type = e.type,
  33021. n.focusBlurEnabled = !0,
  33022. n
  33023. }
  33024. return n(e, t),
  33025. e.prototype.init = function(t, e) {
  33026. this._api = e
  33027. }
  33028. ,
  33029. e.prototype.render = function(t, e, n, i) {
  33030. if (this._model = t,
  33031. !t.get("show"))
  33032. return this._mapDraw && this._mapDraw.remove(),
  33033. void (this._mapDraw = null);
  33034. this._mapDraw || (this._mapDraw = new eC(n));
  33035. var r = this._mapDraw;
  33036. r.draw(t, e, n, this, i),
  33037. r.group.on("click", this._handleRegionClick, this),
  33038. r.group.silent = t.get("silent"),
  33039. this.group.add(r.group),
  33040. this.updateSelectStatus(t, e, n)
  33041. }
  33042. ,
  33043. e.prototype._handleRegionClick = function(t) {
  33044. var e;
  33045. Oy(t.target, (function(t) {
  33046. return null != (e = rl(t).eventData)
  33047. }
  33048. ), !0),
  33049. e && this._api.dispatchAction({
  33050. type: "geoToggleSelect",
  33051. geoId: this._model.id,
  33052. name: e.name
  33053. })
  33054. }
  33055. ,
  33056. e.prototype.updateSelectStatus = function(t, e, n) {
  33057. var i = this;
  33058. this._mapDraw.group.traverse((function(t) {
  33059. var e = rl(t).eventData;
  33060. if (e)
  33061. return i._model.isSelected(e.name) ? n.enterSelect(t) : n.leaveSelect(t),
  33062. !0
  33063. }
  33064. ))
  33065. }
  33066. ,
  33067. e.prototype.findHighDownDispatchers = function(t) {
  33068. return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model)
  33069. }
  33070. ,
  33071. e.prototype.dispose = function() {
  33072. this._mapDraw && this._mapDraw.remove()
  33073. }
  33074. ,
  33075. e.type = "geo",
  33076. e
  33077. }(Ag);
  33078. function TC(t, e, n) {
  33079. YT(t, e, n)
  33080. }
  33081. function CC(t) {
  33082. function e(e, n) {
  33083. n.update = "geo:updateSelectStatus",
  33084. t.registerAction(n, (function(t, n) {
  33085. var i = {}
  33086. , r = [];
  33087. return n.eachComponent({
  33088. mainType: "geo",
  33089. query: t
  33090. }, (function(n) {
  33091. n[e](t.name),
  33092. E(n.coordinateSystem.regions, (function(t) {
  33093. i[t.name] = n.isSelected(t.name) || !1
  33094. }
  33095. ));
  33096. var o = [];
  33097. E(i, (function(t, e) {
  33098. i[e] && o.push(e)
  33099. }
  33100. )),
  33101. r.push({
  33102. geoIndex: n.componentIndex,
  33103. name: o
  33104. })
  33105. }
  33106. )),
  33107. {
  33108. selected: i,
  33109. allSelected: r,
  33110. name: t.name
  33111. }
  33112. }
  33113. ))
  33114. }
  33115. t.registerCoordinateSystem("geo", bC),
  33116. t.registerComponentModel(wC),
  33117. t.registerComponentView(IC),
  33118. t.registerImpl("registerMap", TC),
  33119. t.registerImpl("getMap", (function(t) {
  33120. return UT(t)
  33121. }
  33122. )),
  33123. e("toggleSelected", {
  33124. type: "geoToggleSelect",
  33125. event: "geoselectchanged"
  33126. }),
  33127. e("select", {
  33128. type: "geoSelect",
  33129. event: "geoselected"
  33130. }),
  33131. e("unSelect", {
  33132. type: "geoUnSelect",
  33133. event: "geounselected"
  33134. }),
  33135. t.registerAction({
  33136. type: "geoRoam",
  33137. event: "geoRoam",
  33138. update: "updateTransform"
  33139. }, (function(t, e, n) {
  33140. var i = t.componentType || "series";
  33141. e.eachComponent({
  33142. mainType: i,
  33143. query: t
  33144. }, (function(e) {
  33145. var r = e.coordinateSystem;
  33146. if ("geo" === r.type) {
  33147. var o = MC(r, t, e.get("scaleLimit"), n);
  33148. e.setCenter && e.setCenter(o.center),
  33149. e.setZoom && e.setZoom(o.zoom),
  33150. "series" === i && E(e.seriesGroup, (function(t) {
  33151. t.setCenter(o.center),
  33152. t.setZoom(o.zoom)
  33153. }
  33154. ))
  33155. }
  33156. }
  33157. ))
  33158. }
  33159. ))
  33160. }
  33161. function DC(t, e) {
  33162. var n = t.isExpand ? t.children : []
  33163. , i = t.parentNode.children
  33164. , r = t.hierNode.i ? i[t.hierNode.i - 1] : null;
  33165. if (n.length) {
  33166. !function(t) {
  33167. var e = t.children
  33168. , n = e.length
  33169. , i = 0
  33170. , r = 0;
  33171. for (; --n >= 0; ) {
  33172. var o = e[n];
  33173. o.hierNode.prelim += i,
  33174. o.hierNode.modifier += i,
  33175. r += o.hierNode.change,
  33176. i += o.hierNode.shift + r
  33177. }
  33178. }(t);
  33179. var o = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  33180. r ? (t.hierNode.prelim = r.hierNode.prelim + e(t, r),
  33181. t.hierNode.modifier = t.hierNode.prelim - o) : t.hierNode.prelim = o
  33182. } else
  33183. r && (t.hierNode.prelim = r.hierNode.prelim + e(t, r));
  33184. t.parentNode.hierNode.defaultAncestor = function(t, e, n, i) {
  33185. if (e) {
  33186. 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 = PC(s),
  33187. o = OC(o),
  33188. s && o; ) {
  33189. r = PC(r),
  33190. a = OC(a),
  33191. r.hierNode.ancestor = t;
  33192. var p = s.hierNode.prelim + c - o.hierNode.prelim - u + i(s, o);
  33193. p > 0 && (NC(RC(s, t, n), t, p),
  33194. u += p,
  33195. l += p),
  33196. c += s.hierNode.modifier,
  33197. u += o.hierNode.modifier,
  33198. l += r.hierNode.modifier,
  33199. h += a.hierNode.modifier
  33200. }
  33201. s && !PC(r) && (r.hierNode.thread = s,
  33202. r.hierNode.modifier += c - l),
  33203. o && !OC(a) && (a.hierNode.thread = o,
  33204. a.hierNode.modifier += u - h,
  33205. n = t)
  33206. }
  33207. return n
  33208. }(t, r, t.parentNode.hierNode.defaultAncestor || i[0], e)
  33209. }
  33210. function AC(t) {
  33211. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  33212. t.setLayout({
  33213. x: e
  33214. }, !0),
  33215. t.hierNode.modifier += t.parentNode.hierNode.modifier
  33216. }
  33217. function kC(t) {
  33218. return arguments.length ? t : EC
  33219. }
  33220. function LC(t, e) {
  33221. return t -= Math.PI / 2,
  33222. {
  33223. x: e * Math.cos(t),
  33224. y: e * Math.sin(t)
  33225. }
  33226. }
  33227. function PC(t) {
  33228. var e = t.children;
  33229. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread
  33230. }
  33231. function OC(t) {
  33232. var e = t.children;
  33233. return e.length && t.isExpand ? e[0] : t.hierNode.thread
  33234. }
  33235. function RC(t, e, n) {
  33236. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n
  33237. }
  33238. function NC(t, e, n) {
  33239. var i = n / (e.hierNode.i - t.hierNode.i);
  33240. e.hierNode.change -= i,
  33241. e.hierNode.shift += n,
  33242. e.hierNode.modifier += n,
  33243. e.hierNode.prelim += n,
  33244. t.hierNode.change += i
  33245. }
  33246. function EC(t, e) {
  33247. return t.parentNode === e.parentNode ? 1 : 2
  33248. }
  33249. var zC = function() {
  33250. this.parentPoint = [],
  33251. this.childPoints = []
  33252. }
  33253. , VC = function(t) {
  33254. function e(e) {
  33255. return t.call(this, e) || this
  33256. }
  33257. return n(e, t),
  33258. e.prototype.getDefaultStyle = function() {
  33259. return {
  33260. stroke: "#000",
  33261. fill: null
  33262. }
  33263. }
  33264. ,
  33265. e.prototype.getDefaultShape = function() {
  33266. return new zC
  33267. }
  33268. ,
  33269. e.prototype.buildPath = function(t, e) {
  33270. var n = e.childPoints
  33271. , i = n.length
  33272. , r = e.parentPoint
  33273. , o = n[0]
  33274. , a = n[i - 1];
  33275. if (1 === i)
  33276. return t.moveTo(r[0], r[1]),
  33277. void t.lineTo(o[0], o[1]);
  33278. var s = e.orient
  33279. , l = "TB" === s || "BT" === s ? 0 : 1
  33280. , u = 1 - l
  33281. , h = $r(e.forkPosition, 1)
  33282. , c = [];
  33283. c[l] = r[l],
  33284. c[u] = r[u] + (a[u] - r[u]) * h,
  33285. t.moveTo(r[0], r[1]),
  33286. t.lineTo(c[0], c[1]),
  33287. t.moveTo(o[0], o[1]),
  33288. c[l] = o[l],
  33289. t.lineTo(c[0], c[1]),
  33290. c[l] = a[l],
  33291. t.lineTo(c[0], c[1]),
  33292. t.lineTo(a[0], a[1]);
  33293. for (var p = 1; p < i - 1; p++) {
  33294. var d = n[p];
  33295. t.moveTo(d[0], d[1]),
  33296. c[l] = d[l],
  33297. t.lineTo(c[0], c[1])
  33298. }
  33299. }
  33300. ,
  33301. e
  33302. }(ks)
  33303. , BC = function(t) {
  33304. function e() {
  33305. var n = null !== t && t.apply(this, arguments) || this;
  33306. return n.type = e.type,
  33307. n._mainGroup = new Br,
  33308. n
  33309. }
  33310. return n(e, t),
  33311. e.prototype.init = function(t, e) {
  33312. this._controller = new nT(e.getZr()),
  33313. this._controllerHost = {
  33314. target: this.group
  33315. },
  33316. this.group.add(this._mainGroup)
  33317. }
  33318. ,
  33319. e.prototype.render = function(t, e, n) {
  33320. var i = t.getData()
  33321. , r = t.layoutInfo
  33322. , o = this._mainGroup;
  33323. "radial" === t.get("layout") ? (o.x = r.x + r.width / 2,
  33324. o.y = r.y + r.height / 2) : (o.x = r.x,
  33325. o.y = r.y),
  33326. this._updateViewCoordSys(t, n),
  33327. this._updateController(t, e, n);
  33328. var a = this._data;
  33329. i.diff(a).add((function(e) {
  33330. FC(i, e) && GC(i, e, null, o, t)
  33331. }
  33332. )).update((function(e, n) {
  33333. var r = a.getItemGraphicEl(n);
  33334. FC(i, e) ? GC(i, e, r, o, t) : r && YC(a, n, r, o, t)
  33335. }
  33336. )).remove((function(e) {
  33337. var n = a.getItemGraphicEl(e);
  33338. n && YC(a, e, n, o, t)
  33339. }
  33340. )).execute(),
  33341. this._nodeScaleRatio = t.get("nodeScaleRatio"),
  33342. this._updateNodeAndLinkScale(t),
  33343. !0 === t.get("expandAndCollapse") && i.eachItemGraphicEl((function(e, i) {
  33344. e.off("click").on("click", (function() {
  33345. n.dispatchAction({
  33346. type: "treeExpandAndCollapse",
  33347. seriesId: t.id,
  33348. dataIndex: i
  33349. })
  33350. }
  33351. ))
  33352. }
  33353. )),
  33354. this._data = i
  33355. }
  33356. ,
  33357. e.prototype._updateViewCoordSys = function(t, e) {
  33358. var n = t.getData()
  33359. , i = [];
  33360. n.each((function(t) {
  33361. var e = n.getItemLayout(t);
  33362. !e || isNaN(e.x) || isNaN(e.y) || i.push([+e.x, +e.y])
  33363. }
  33364. ));
  33365. var r = []
  33366. , o = [];
  33367. Ba(i, r, o);
  33368. var a = this._min
  33369. , s = this._max;
  33370. o[0] - r[0] == 0 && (r[0] = a ? a[0] : r[0] - 1,
  33371. o[0] = s ? s[0] : o[0] + 1),
  33372. o[1] - r[1] == 0 && (r[1] = a ? a[1] : r[1] - 1,
  33373. o[1] = s ? s[1] : o[1] + 1);
  33374. var l = t.coordinateSystem = new dC;
  33375. l.zoomLimit = t.get("scaleLimit"),
  33376. l.setBoundingRect(r[0], r[1], o[0] - r[0], o[1] - r[1]),
  33377. l.setCenter(t.get("center"), e),
  33378. l.setZoom(t.get("zoom")),
  33379. this.group.attr({
  33380. x: l.x,
  33381. y: l.y,
  33382. scaleX: l.scaleX,
  33383. scaleY: l.scaleY
  33384. }),
  33385. this._min = r,
  33386. this._max = o
  33387. }
  33388. ,
  33389. e.prototype._updateController = function(t, e, n) {
  33390. var i = this
  33391. , r = this._controller
  33392. , o = this._controllerHost
  33393. , a = this.group;
  33394. r.setPointerChecker((function(e, i, r) {
  33395. var o = a.getBoundingRect();
  33396. return o.applyTransform(a.transform),
  33397. o.contain(i, r) && !hT(e, n, t)
  33398. }
  33399. )),
  33400. r.enable(t.get("roam")),
  33401. o.zoomLimit = t.get("scaleLimit"),
  33402. o.zoom = t.coordinateSystem.getZoom(),
  33403. r.off("pan").off("zoom").on("pan", (function(e) {
  33404. aT(o, e.dx, e.dy),
  33405. n.dispatchAction({
  33406. seriesId: t.id,
  33407. type: "treeRoam",
  33408. dx: e.dx,
  33409. dy: e.dy
  33410. })
  33411. }
  33412. )).on("zoom", (function(e) {
  33413. sT(o, e.scale, e.originX, e.originY),
  33414. n.dispatchAction({
  33415. seriesId: t.id,
  33416. type: "treeRoam",
  33417. zoom: e.scale,
  33418. originX: e.originX,
  33419. originY: e.originY
  33420. }),
  33421. i._updateNodeAndLinkScale(t),
  33422. n.updateLabelLayout()
  33423. }
  33424. ))
  33425. }
  33426. ,
  33427. e.prototype._updateNodeAndLinkScale = function(t) {
  33428. var e = t.getData()
  33429. , n = this._getNodeGlobalScale(t);
  33430. e.eachItemGraphicEl((function(t, e) {
  33431. t.setSymbolScale(n)
  33432. }
  33433. ))
  33434. }
  33435. ,
  33436. e.prototype._getNodeGlobalScale = function(t) {
  33437. var e = t.coordinateSystem;
  33438. if ("view" !== e.type)
  33439. return 1;
  33440. var n = this._nodeScaleRatio
  33441. , i = e.scaleX || 1;
  33442. return ((e.getZoom() - 1) * n + 1) / i
  33443. }
  33444. ,
  33445. e.prototype.dispose = function() {
  33446. this._controller && this._controller.dispose(),
  33447. this._controllerHost = null
  33448. }
  33449. ,
  33450. e.prototype.remove = function() {
  33451. this._mainGroup.removeAll(),
  33452. this._data = null
  33453. }
  33454. ,
  33455. e.type = "tree",
  33456. e
  33457. }(Og);
  33458. function FC(t, e) {
  33459. var n = t.getItemLayout(e);
  33460. return n && !isNaN(n.x) && !isNaN(n.y)
  33461. }
  33462. function GC(t, e, n, i, r) {
  33463. var o = !n
  33464. , a = t.tree.getNodeByDataIndex(e)
  33465. , s = a.getModel()
  33466. , l = a.getVisual("style").fill
  33467. , u = !1 === a.isExpand && 0 !== a.children.length ? l : "#fff"
  33468. , h = t.tree.root
  33469. , c = a.parentNode === h ? a : a.parentNode || a
  33470. , p = t.getItemGraphicEl(c.dataIndex)
  33471. , d = c.getLayout()
  33472. , f = p ? {
  33473. x: p.__oldX,
  33474. y: p.__oldY,
  33475. rawX: p.__radialOldRawX,
  33476. rawY: p.__radialOldRawY
  33477. } : d
  33478. , g = a.getLayout();
  33479. o ? ((n = new fS(t,e,null,{
  33480. symbolInnerColor: u,
  33481. useNameLabel: !0
  33482. })).x = f.x,
  33483. n.y = f.y) : n.updateData(t, e, null, {
  33484. symbolInnerColor: u,
  33485. useNameLabel: !0
  33486. }),
  33487. n.__radialOldRawX = n.__radialRawX,
  33488. n.__radialOldRawY = n.__radialRawY,
  33489. n.__radialRawX = g.rawX,
  33490. n.__radialRawY = g.rawY,
  33491. i.add(n),
  33492. t.setItemGraphicEl(e, n),
  33493. n.__oldX = n.x,
  33494. n.__oldY = n.y,
  33495. vh(n, {
  33496. x: g.x,
  33497. y: g.y
  33498. }, r);
  33499. var y = n.getSymbolPath();
  33500. if ("radial" === r.get("layout")) {
  33501. var v = h.children[0]
  33502. , m = v.getLayout()
  33503. , x = v.children.length
  33504. , _ = void 0
  33505. , b = void 0;
  33506. if (g.x === m.x && !0 === a.isExpand && v.children.length) {
  33507. var w = {
  33508. x: (v.children[0].getLayout().x + v.children[x - 1].getLayout().x) / 2,
  33509. y: (v.children[0].getLayout().y + v.children[x - 1].getLayout().y) / 2
  33510. };
  33511. (_ = Math.atan2(w.y - m.y, w.x - m.x)) < 0 && (_ = 2 * Math.PI + _),
  33512. (b = w.x < m.x) && (_ -= Math.PI)
  33513. } else
  33514. (_ = Math.atan2(g.y - m.y, g.x - m.x)) < 0 && (_ = 2 * Math.PI + _),
  33515. 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);
  33516. var S = b ? "left" : "right"
  33517. , M = s.getModel("label")
  33518. , I = M.get("rotate")
  33519. , T = I * (Math.PI / 180)
  33520. , C = y.getTextContent();
  33521. C && (y.setTextConfig({
  33522. position: M.get("position") || S,
  33523. rotation: null == I ? -_ : T,
  33524. origin: "center"
  33525. }),
  33526. C.setStyle("verticalAlign", "middle"))
  33527. }
  33528. var D = s.get(["emphasis", "focus"])
  33529. , A = "relative" === D ? vt(a.getAncestorsIndices(), a.getDescendantIndices()) : "ancestor" === D ? a.getAncestorsIndices() : "descendant" === D ? a.getDescendantIndices() : null;
  33530. A && (rl(n).focus = A),
  33531. function(t, e, n, i, r, o, a, s) {
  33532. var l = e.getModel()
  33533. , u = t.get("edgeShape")
  33534. , h = t.get("layout")
  33535. , c = t.getOrient()
  33536. , p = t.get(["lineStyle", "curveness"])
  33537. , d = t.get("edgeForkPosition")
  33538. , f = l.getModel("lineStyle").getLineStyle()
  33539. , g = i.__edge;
  33540. if ("curve" === u)
  33541. e.parentNode && e.parentNode !== n && (g || (g = i.__edge = new th({
  33542. shape: XC(h, c, p, r, r)
  33543. })),
  33544. vh(g, {
  33545. shape: XC(h, c, p, o, a)
  33546. }, t));
  33547. else if ("polyline" === u)
  33548. if ("orthogonal" === h) {
  33549. if (e !== n && e.children && 0 !== e.children.length && !0 === e.isExpand) {
  33550. for (var y = e.children, v = [], m = 0; m < y.length; m++) {
  33551. var x = y[m].getLayout();
  33552. v.push([x.x, x.y])
  33553. }
  33554. g || (g = i.__edge = new VC({
  33555. shape: {
  33556. parentPoint: [a.x, a.y],
  33557. childPoints: [[a.x, a.y]],
  33558. orient: c,
  33559. forkPosition: d
  33560. }
  33561. })),
  33562. vh(g, {
  33563. shape: {
  33564. parentPoint: [a.x, a.y],
  33565. childPoints: v
  33566. }
  33567. }, t)
  33568. }
  33569. } else
  33570. 0;
  33571. g && ("polyline" !== u || e.isExpand) && (g.useStyle(k({
  33572. strokeNoScale: !0,
  33573. fill: null
  33574. }, f)),
  33575. $l(g, l, "lineStyle"),
  33576. kl(g),
  33577. s.add(g))
  33578. }(r, a, h, n, f, d, g, i),
  33579. n.__edge && (n.onHoverStateChange = function(e) {
  33580. if ("blur" !== e) {
  33581. var i = a.parentNode && t.getItemGraphicEl(a.parentNode.dataIndex);
  33582. i && 1 === i.hoverState || Dl(n.__edge, e)
  33583. }
  33584. }
  33585. )
  33586. }
  33587. function WC(t, e, n, i, r) {
  33588. var o = HC(e.tree.root, t)
  33589. , a = o.source
  33590. , s = o.sourceLayout
  33591. , l = e.getItemGraphicEl(t.dataIndex);
  33592. if (l) {
  33593. var u = e.getItemGraphicEl(a.dataIndex).__edge
  33594. , h = l.__edge || (!1 === a.isExpand || 1 === a.children.length ? u : void 0)
  33595. , c = i.get("edgeShape")
  33596. , p = i.get("layout")
  33597. , d = i.get("orient")
  33598. , f = i.get(["lineStyle", "curveness"]);
  33599. h && ("curve" === c ? _h(h, {
  33600. shape: XC(p, d, f, s, s),
  33601. style: {
  33602. opacity: 0
  33603. }
  33604. }, i, {
  33605. cb: function() {
  33606. n.remove(h)
  33607. },
  33608. removeOpt: r
  33609. }) : "polyline" === c && "orthogonal" === i.get("layout") && _h(h, {
  33610. shape: {
  33611. parentPoint: [s.x, s.y],
  33612. childPoints: [[s.x, s.y]]
  33613. },
  33614. style: {
  33615. opacity: 0
  33616. }
  33617. }, i, {
  33618. cb: function() {
  33619. n.remove(h)
  33620. },
  33621. removeOpt: r
  33622. }))
  33623. }
  33624. }
  33625. function HC(t, e) {
  33626. for (var n, i = e.parentNode === t ? e : e.parentNode || e; null == (n = i.getLayout()); )
  33627. i = i.parentNode === t ? i : i.parentNode || i;
  33628. return {
  33629. source: i,
  33630. sourceLayout: n
  33631. }
  33632. }
  33633. function YC(t, e, n, i, r) {
  33634. var o = t.tree.getNodeByDataIndex(e)
  33635. , a = HC(t.tree.root, o).sourceLayout
  33636. , s = {
  33637. duration: r.get("animationDurationUpdate"),
  33638. easing: r.get("animationEasingUpdate")
  33639. };
  33640. _h(n, {
  33641. x: a.x + 1,
  33642. y: a.y + 1
  33643. }, r, {
  33644. cb: function() {
  33645. i.remove(n),
  33646. t.setItemGraphicEl(e, null)
  33647. },
  33648. removeOpt: s
  33649. }),
  33650. n.fadeOut(null, t.hostModel, {
  33651. fadeLabel: !0,
  33652. animation: s
  33653. }),
  33654. o.children.forEach((function(e) {
  33655. WC(e, t, i, r, s)
  33656. }
  33657. )),
  33658. WC(o, t, i, r, s)
  33659. }
  33660. function XC(t, e, n, i, r) {
  33661. var o, a, s, l, u, h, c, p;
  33662. if ("radial" === t) {
  33663. u = i.rawX,
  33664. c = i.rawY,
  33665. h = r.rawX,
  33666. p = r.rawY;
  33667. var d = LC(u, c)
  33668. , f = LC(u, c + (p - c) * n)
  33669. , g = LC(h, p + (c - p) * n)
  33670. , y = LC(h, p);
  33671. return {
  33672. x1: d.x || 0,
  33673. y1: d.y || 0,
  33674. x2: y.x || 0,
  33675. y2: y.y || 0,
  33676. cpx1: f.x || 0,
  33677. cpy1: f.y || 0,
  33678. cpx2: g.x || 0,
  33679. cpy2: g.y || 0
  33680. }
  33681. }
  33682. return u = i.x,
  33683. c = i.y,
  33684. h = r.x,
  33685. p = r.y,
  33686. "LR" !== e && "RL" !== e || (o = u + (h - u) * n,
  33687. a = c,
  33688. s = h + (u - h) * n,
  33689. l = p),
  33690. "TB" !== e && "BT" !== e || (o = u,
  33691. a = c + (p - c) * n,
  33692. s = h,
  33693. l = p + (c - p) * n),
  33694. {
  33695. x1: u,
  33696. y1: c,
  33697. x2: h,
  33698. y2: p,
  33699. cpx1: o,
  33700. cpy1: a,
  33701. cpx2: s,
  33702. cpy2: l
  33703. }
  33704. }
  33705. var UC = Vo();
  33706. function ZC(t) {
  33707. var e = t.mainData
  33708. , n = t.datas;
  33709. n || (n = {
  33710. main: e
  33711. },
  33712. t.datasAttr = {
  33713. main: "data"
  33714. }),
  33715. t.datas = t.mainData = null,
  33716. QC(e, n, t),
  33717. E(n, (function(n) {
  33718. E(e.TRANSFERABLE_METHODS, (function(e) {
  33719. n.wrapMethod(e, H(jC, t))
  33720. }
  33721. ))
  33722. }
  33723. )),
  33724. e.wrapMethod("cloneShallow", H(KC, t)),
  33725. E(e.CHANGABLE_METHODS, (function(n) {
  33726. e.wrapMethod(n, H(qC, t))
  33727. }
  33728. )),
  33729. lt(n[e.dataType] === e)
  33730. }
  33731. function jC(t, e) {
  33732. if (UC(i = this).mainData === i) {
  33733. var n = A({}, UC(this).datas);
  33734. n[this.dataType] = e,
  33735. QC(e, n, t)
  33736. } else
  33737. tD(e, this.dataType, UC(this).mainData, t);
  33738. var i;
  33739. return e
  33740. }
  33741. function qC(t, e) {
  33742. return t.struct && t.struct.update(),
  33743. e
  33744. }
  33745. function KC(t, e) {
  33746. return E(UC(e).datas, (function(n, i) {
  33747. n !== e && tD(n.cloneShallow(), i, e, t)
  33748. }
  33749. )),
  33750. e
  33751. }
  33752. function $C(t) {
  33753. var e = UC(this).mainData;
  33754. return null == t || null == e ? e : UC(e).datas[t]
  33755. }
  33756. function JC() {
  33757. var t = UC(this).mainData;
  33758. return null == t ? [{
  33759. data: t
  33760. }] : z(G(UC(t).datas), (function(e) {
  33761. return {
  33762. type: e,
  33763. data: UC(t).datas[e]
  33764. }
  33765. }
  33766. ))
  33767. }
  33768. function QC(t, e, n) {
  33769. UC(t).datas = {},
  33770. E(e, (function(e, i) {
  33771. tD(e, i, t, n)
  33772. }
  33773. ))
  33774. }
  33775. function tD(t, e, n, i) {
  33776. UC(n).datas[e] = t,
  33777. UC(t).mainData = n,
  33778. t.dataType = e,
  33779. i.struct && (t[i.structAttr] = i.struct,
  33780. i.struct[i.datasAttr[e]] = t),
  33781. t.getLinkedData = $C,
  33782. t.getLinkedDataAll = JC
  33783. }
  33784. var eD = function() {
  33785. function t(t, e) {
  33786. this.depth = 0,
  33787. this.height = 0,
  33788. this.dataIndex = -1,
  33789. this.children = [],
  33790. this.viewChildren = [],
  33791. this.isExpand = !1,
  33792. this.name = t || "",
  33793. this.hostTree = e
  33794. }
  33795. return t.prototype.isRemoved = function() {
  33796. return this.dataIndex < 0
  33797. }
  33798. ,
  33799. t.prototype.eachNode = function(t, e, n) {
  33800. X(t) && (n = e,
  33801. e = t,
  33802. t = null),
  33803. U(t = t || {}) && (t = {
  33804. order: t
  33805. });
  33806. var i, r = t.order || "preorder", o = this[t.attr || "children"];
  33807. "preorder" === r && (i = e.call(n, this));
  33808. for (var a = 0; !i && a < o.length; a++)
  33809. o[a].eachNode(t, e, n);
  33810. "postorder" === r && e.call(n, this)
  33811. }
  33812. ,
  33813. t.prototype.updateDepthAndHeight = function(t) {
  33814. var e = 0;
  33815. this.depth = t;
  33816. for (var n = 0; n < this.children.length; n++) {
  33817. var i = this.children[n];
  33818. i.updateDepthAndHeight(t + 1),
  33819. i.height > e && (e = i.height)
  33820. }
  33821. this.height = e + 1
  33822. }
  33823. ,
  33824. t.prototype.getNodeById = function(t) {
  33825. if (this.getId() === t)
  33826. return this;
  33827. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  33828. var r = n[e].getNodeById(t);
  33829. if (r)
  33830. return r
  33831. }
  33832. }
  33833. ,
  33834. t.prototype.contains = function(t) {
  33835. if (t === this)
  33836. return !0;
  33837. for (var e = 0, n = this.children, i = n.length; e < i; e++) {
  33838. var r = n[e].contains(t);
  33839. if (r)
  33840. return r
  33841. }
  33842. }
  33843. ,
  33844. t.prototype.getAncestors = function(t) {
  33845. for (var e = [], n = t ? this : this.parentNode; n; )
  33846. e.push(n),
  33847. n = n.parentNode;
  33848. return e.reverse(),
  33849. e
  33850. }
  33851. ,
  33852. t.prototype.getAncestorsIndices = function() {
  33853. for (var t = [], e = this; e; )
  33854. t.push(e.dataIndex),
  33855. e = e.parentNode;
  33856. return t.reverse(),
  33857. t
  33858. }
  33859. ,
  33860. t.prototype.getDescendantIndices = function() {
  33861. var t = [];
  33862. return this.eachNode((function(e) {
  33863. t.push(e.dataIndex)
  33864. }
  33865. )),
  33866. t
  33867. }
  33868. ,
  33869. t.prototype.getValue = function(t) {
  33870. var e = this.hostTree.data;
  33871. return e.getStore().get(e.getDimensionIndex(t || "value"), this.dataIndex)
  33872. }
  33873. ,
  33874. t.prototype.setLayout = function(t, e) {
  33875. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, t, e)
  33876. }
  33877. ,
  33878. t.prototype.getLayout = function() {
  33879. return this.hostTree.data.getItemLayout(this.dataIndex)
  33880. }
  33881. ,
  33882. t.prototype.getModel = function(t) {
  33883. if (!(this.dataIndex < 0))
  33884. return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)
  33885. }
  33886. ,
  33887. t.prototype.getLevelModel = function() {
  33888. return (this.hostTree.levelModels || [])[this.depth]
  33889. }
  33890. ,
  33891. t.prototype.setVisual = function(t, e) {
  33892. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, t, e)
  33893. }
  33894. ,
  33895. t.prototype.getVisual = function(t) {
  33896. return this.hostTree.data.getItemVisual(this.dataIndex, t)
  33897. }
  33898. ,
  33899. t.prototype.getRawIndex = function() {
  33900. return this.hostTree.data.getRawIndex(this.dataIndex)
  33901. }
  33902. ,
  33903. t.prototype.getId = function() {
  33904. return this.hostTree.data.getId(this.dataIndex)
  33905. }
  33906. ,
  33907. t.prototype.getChildIndex = function() {
  33908. if (this.parentNode) {
  33909. for (var t = this.parentNode.children, e = 0; e < t.length; ++e)
  33910. if (t[e] === this)
  33911. return e;
  33912. return -1
  33913. }
  33914. return -1
  33915. }
  33916. ,
  33917. t.prototype.isAncestorOf = function(t) {
  33918. for (var e = t.parentNode; e; ) {
  33919. if (e === this)
  33920. return !0;
  33921. e = e.parentNode
  33922. }
  33923. return !1
  33924. }
  33925. ,
  33926. t.prototype.isDescendantOf = function(t) {
  33927. return t !== this && t.isAncestorOf(this)
  33928. }
  33929. ,
  33930. t
  33931. }()
  33932. , nD = function() {
  33933. function t(t) {
  33934. this.type = "tree",
  33935. this._nodes = [],
  33936. this.hostModel = t
  33937. }
  33938. return t.prototype.eachNode = function(t, e, n) {
  33939. this.root.eachNode(t, e, n)
  33940. }
  33941. ,
  33942. t.prototype.getNodeByDataIndex = function(t) {
  33943. var e = this.data.getRawIndex(t);
  33944. return this._nodes[e]
  33945. }
  33946. ,
  33947. t.prototype.getNodeById = function(t) {
  33948. return this.root.getNodeById(t)
  33949. }
  33950. ,
  33951. t.prototype.update = function() {
  33952. for (var t = this.data, e = this._nodes, n = 0, i = e.length; n < i; n++)
  33953. e[n].dataIndex = -1;
  33954. for (n = 0,
  33955. i = t.count(); n < i; n++)
  33956. e[t.getRawIndex(n)].dataIndex = n
  33957. }
  33958. ,
  33959. t.prototype.clearLayouts = function() {
  33960. this.data.clearItemLayouts()
  33961. }
  33962. ,
  33963. t.createTree = function(e, n, i) {
  33964. var r = new t(n)
  33965. , o = []
  33966. , a = 1;
  33967. !function t(e, n) {
  33968. var i = e.value;
  33969. a = Math.max(a, Y(i) ? i.length : 1),
  33970. o.push(e);
  33971. var s = new eD(Ro(e.name, ""),r);
  33972. n ? function(t, e) {
  33973. var n = e.children;
  33974. if (t.parentNode === e)
  33975. return;
  33976. n.push(t),
  33977. t.parentNode = e
  33978. }(s, n) : r.root = s,
  33979. r._nodes.push(s);
  33980. var l = e.children;
  33981. if (l)
  33982. for (var u = 0; u < l.length; u++)
  33983. t(l[u], s)
  33984. }(e),
  33985. r.root.updateDepthAndHeight(0);
  33986. var s = px(o, {
  33987. coordDimensions: ["value"],
  33988. dimensionsCount: a
  33989. }).dimensions
  33990. , l = new cx(s,n);
  33991. return l.initData(o),
  33992. i && i(l),
  33993. ZC({
  33994. mainData: l,
  33995. struct: r,
  33996. structAttr: "tree"
  33997. }),
  33998. r.update(),
  33999. r
  34000. }
  34001. ,
  34002. t
  34003. }();
  34004. function iD(t, e, n) {
  34005. if (t && P(e, t.type) >= 0) {
  34006. var i = n.getData().tree.root
  34007. , r = t.targetNode;
  34008. if (U(r) && (r = i.getNodeById(r)),
  34009. r && i.contains(r))
  34010. return {
  34011. node: r
  34012. };
  34013. var o = t.targetNodeId;
  34014. if (null != o && (r = i.getNodeById(o)))
  34015. return {
  34016. node: r
  34017. }
  34018. }
  34019. }
  34020. function rD(t) {
  34021. for (var e = []; t; )
  34022. (t = t.parentNode) && e.push(t);
  34023. return e.reverse()
  34024. }
  34025. function oD(t, e) {
  34026. return P(rD(t), e) >= 0
  34027. }
  34028. function aD(t, e) {
  34029. for (var n = []; t; ) {
  34030. var i = t.dataIndex;
  34031. n.push({
  34032. name: t.name,
  34033. dataIndex: i,
  34034. value: e.getRawValue(i)
  34035. }),
  34036. t = t.parentNode
  34037. }
  34038. return n.reverse(),
  34039. n
  34040. }
  34041. var sD = function(t) {
  34042. function e() {
  34043. var e = null !== t && t.apply(this, arguments) || this;
  34044. return e.hasSymbolVisual = !0,
  34045. e.ignoreStyleOnData = !0,
  34046. e
  34047. }
  34048. return n(e, t),
  34049. e.prototype.getInitialData = function(t) {
  34050. var e = {
  34051. name: t.name,
  34052. children: t.data
  34053. }
  34054. , n = t.leaves || {}
  34055. , i = new Cc(n,this,this.ecModel)
  34056. , r = nD.createTree(e, this, (function(t) {
  34057. t.wrapMethod("getItemModel", (function(t, e) {
  34058. var n = r.getNodeByDataIndex(e);
  34059. return n && n.children.length && n.isExpand || (t.parentModel = i),
  34060. t
  34061. }
  34062. ))
  34063. }
  34064. ));
  34065. var o = 0;
  34066. r.eachNode("preorder", (function(t) {
  34067. t.depth > o && (o = t.depth)
  34068. }
  34069. ));
  34070. var a = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : o;
  34071. return r.root.eachNode("preorder", (function(t) {
  34072. var e = t.hostTree.data.getRawDataItem(t.dataIndex);
  34073. t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= a
  34074. }
  34075. )),
  34076. r.data
  34077. }
  34078. ,
  34079. e.prototype.getOrient = function() {
  34080. var t = this.get("orient");
  34081. return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"),
  34082. t
  34083. }
  34084. ,
  34085. e.prototype.setZoom = function(t) {
  34086. this.option.zoom = t
  34087. }
  34088. ,
  34089. e.prototype.setCenter = function(t) {
  34090. this.option.center = t
  34091. }
  34092. ,
  34093. e.prototype.formatTooltip = function(t, e, n) {
  34094. for (var i = this.getData().tree, r = i.root.children[0], o = i.getNodeByDataIndex(t), a = o.getValue(), s = o.name; o && o !== r; )
  34095. s = o.parentNode.name + "." + s,
  34096. o = o.parentNode;
  34097. return og("nameValue", {
  34098. name: s,
  34099. value: a,
  34100. noValue: isNaN(a) || null == a
  34101. })
  34102. }
  34103. ,
  34104. e.prototype.getDataParams = function(e) {
  34105. var n = t.prototype.getDataParams.apply(this, arguments)
  34106. , i = this.getData().tree.getNodeByDataIndex(e);
  34107. return n.treeAncestors = aD(i, this),
  34108. n.collapsed = !i.isExpand,
  34109. n
  34110. }
  34111. ,
  34112. e.type = "series.tree",
  34113. e.layoutMode = "box",
  34114. e.defaultOption = {
  34115. z: 2,
  34116. coordinateSystem: "view",
  34117. left: "12%",
  34118. top: "12%",
  34119. right: "12%",
  34120. bottom: "12%",
  34121. layout: "orthogonal",
  34122. edgeShape: "curve",
  34123. edgeForkPosition: "50%",
  34124. roam: !1,
  34125. nodeScaleRatio: .4,
  34126. center: null,
  34127. zoom: 1,
  34128. orient: "LR",
  34129. symbol: "emptyCircle",
  34130. symbolSize: 7,
  34131. expandAndCollapse: !0,
  34132. initialTreeDepth: 2,
  34133. lineStyle: {
  34134. color: "#ccc",
  34135. width: 1.5,
  34136. curveness: .5
  34137. },
  34138. itemStyle: {
  34139. color: "lightsteelblue",
  34140. borderWidth: 1.5
  34141. },
  34142. label: {
  34143. show: !0
  34144. },
  34145. animationEasing: "linear",
  34146. animationDuration: 700,
  34147. animationDurationUpdate: 500
  34148. },
  34149. e
  34150. }(bg);
  34151. function lD(t, e) {
  34152. for (var n, i = [t]; n = i.pop(); )
  34153. if (e(n),
  34154. n.isExpand) {
  34155. var r = n.children;
  34156. if (r.length)
  34157. for (var o = r.length - 1; o >= 0; o--)
  34158. i.push(r[o])
  34159. }
  34160. }
  34161. function uD(t, e) {
  34162. t.eachSeriesByType("tree", (function(t) {
  34163. !function(t, e) {
  34164. var n = function(t, e) {
  34165. return kp(t.getBoxLayoutParams(), {
  34166. width: e.getWidth(),
  34167. height: e.getHeight()
  34168. })
  34169. }(t, e);
  34170. t.layoutInfo = n;
  34171. var i = t.get("layout")
  34172. , r = 0
  34173. , o = 0
  34174. , a = null;
  34175. "radial" === i ? (r = 2 * Math.PI,
  34176. o = Math.min(n.height, n.width) / 2,
  34177. a = kC((function(t, e) {
  34178. return (t.parentNode === e.parentNode ? 1 : 2) / t.depth
  34179. }
  34180. ))) : (r = n.width,
  34181. o = n.height,
  34182. a = kC());
  34183. var s = t.getData().tree.root
  34184. , l = s.children[0];
  34185. if (l) {
  34186. !function(t) {
  34187. var e = t;
  34188. e.hierNode = {
  34189. defaultAncestor: null,
  34190. ancestor: e,
  34191. prelim: 0,
  34192. modifier: 0,
  34193. change: 0,
  34194. shift: 0,
  34195. i: 0,
  34196. thread: null
  34197. };
  34198. for (var n, i, r = [e]; n = r.pop(); )
  34199. if (i = n.children,
  34200. n.isExpand && i.length)
  34201. for (var o = i.length - 1; o >= 0; o--) {
  34202. var a = i[o];
  34203. a.hierNode = {
  34204. defaultAncestor: null,
  34205. ancestor: a,
  34206. prelim: 0,
  34207. modifier: 0,
  34208. change: 0,
  34209. shift: 0,
  34210. i: o,
  34211. thread: null
  34212. },
  34213. r.push(a)
  34214. }
  34215. }(s),
  34216. function(t, e, n) {
  34217. for (var i, r = [t], o = []; i = r.pop(); )
  34218. if (o.push(i),
  34219. i.isExpand) {
  34220. var a = i.children;
  34221. if (a.length)
  34222. for (var s = 0; s < a.length; s++)
  34223. r.push(a[s])
  34224. }
  34225. for (; i = o.pop(); )
  34226. e(i, n)
  34227. }(l, DC, a),
  34228. s.hierNode.modifier = -l.hierNode.prelim,
  34229. lD(l, AC);
  34230. var u = l
  34231. , h = l
  34232. , c = l;
  34233. lD(l, (function(t) {
  34234. var e = t.getLayout().x;
  34235. e < u.getLayout().x && (u = t),
  34236. e > h.getLayout().x && (h = t),
  34237. t.depth > c.depth && (c = t)
  34238. }
  34239. ));
  34240. var p = u === h ? 1 : a(u, h) / 2
  34241. , d = p - u.getLayout().x
  34242. , f = 0
  34243. , g = 0
  34244. , y = 0
  34245. , v = 0;
  34246. if ("radial" === i)
  34247. f = r / (h.getLayout().x + p + d),
  34248. g = o / (c.depth - 1 || 1),
  34249. lD(l, (function(t) {
  34250. y = (t.getLayout().x + d) * f,
  34251. v = (t.depth - 1) * g;
  34252. var e = LC(y, v);
  34253. t.setLayout({
  34254. x: e.x,
  34255. y: e.y,
  34256. rawX: y,
  34257. rawY: v
  34258. }, !0)
  34259. }
  34260. ));
  34261. else {
  34262. var m = t.getOrient();
  34263. "RL" === m || "LR" === m ? (g = o / (h.getLayout().x + p + d),
  34264. f = r / (c.depth - 1 || 1),
  34265. lD(l, (function(t) {
  34266. v = (t.getLayout().x + d) * g,
  34267. y = "LR" === m ? (t.depth - 1) * f : r - (t.depth - 1) * f,
  34268. t.setLayout({
  34269. x: y,
  34270. y: v
  34271. }, !0)
  34272. }
  34273. ))) : "TB" !== m && "BT" !== m || (f = r / (h.getLayout().x + p + d),
  34274. g = o / (c.depth - 1 || 1),
  34275. lD(l, (function(t) {
  34276. y = (t.getLayout().x + d) * f,
  34277. v = "TB" === m ? (t.depth - 1) * g : o - (t.depth - 1) * g,
  34278. t.setLayout({
  34279. x: y,
  34280. y: v
  34281. }, !0)
  34282. }
  34283. )))
  34284. }
  34285. }
  34286. }(t, e)
  34287. }
  34288. ))
  34289. }
  34290. function hD(t) {
  34291. t.eachSeriesByType("tree", (function(t) {
  34292. var e = t.getData();
  34293. e.tree.eachNode((function(t) {
  34294. var n = t.getModel().getModel("itemStyle").getItemStyle();
  34295. A(e.ensureUniqueItemVisual(t.dataIndex, "style"), n)
  34296. }
  34297. ))
  34298. }
  34299. ))
  34300. }
  34301. var cD = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  34302. function pD(t) {
  34303. var e = t.getData().tree
  34304. , n = {};
  34305. e.eachNode((function(e) {
  34306. for (var i = e; i && i.depth > 1; )
  34307. i = i.parentNode;
  34308. var r = pd(t.ecModel, i.name || i.dataIndex + "", n);
  34309. e.setVisual("decal", r)
  34310. }
  34311. ))
  34312. }
  34313. var dD = function(t) {
  34314. function e() {
  34315. var n = null !== t && t.apply(this, arguments) || this;
  34316. return n.type = e.type,
  34317. n.preventUsingHoverLayer = !0,
  34318. n
  34319. }
  34320. return n(e, t),
  34321. e.prototype.getInitialData = function(t, e) {
  34322. var n = {
  34323. name: t.name,
  34324. children: t.data
  34325. };
  34326. fD(n);
  34327. var i = t.levels || []
  34328. , r = this.designatedVisualItemStyle = {}
  34329. , o = new Cc({
  34330. itemStyle: r
  34331. },this,e);
  34332. i = t.levels = function(t, e) {
  34333. var n, i, r = To(e.get("color")), o = To(e.get(["aria", "decal", "decals"]));
  34334. if (!r)
  34335. return;
  34336. t = t || [],
  34337. E(t, (function(t) {
  34338. var e = new Cc(t)
  34339. , r = e.get("color")
  34340. , o = e.get("decal");
  34341. (e.get(["itemStyle", "color"]) || r && "none" !== r) && (n = !0),
  34342. (e.get(["itemStyle", "decal"]) || o && "none" !== o) && (i = !0)
  34343. }
  34344. ));
  34345. var a = t[0] || (t[0] = {});
  34346. n || (a.color = r.slice());
  34347. !i && o && (a.decal = o.slice());
  34348. return t
  34349. }(i, e);
  34350. var a = z(i || [], (function(t) {
  34351. return new Cc(t,o,e)
  34352. }
  34353. ), this)
  34354. , s = nD.createTree(n, this, (function(t) {
  34355. t.wrapMethod("getItemModel", (function(t, e) {
  34356. var n = s.getNodeByDataIndex(e)
  34357. , i = n ? a[n.depth] : null;
  34358. return t.parentModel = i || o,
  34359. t
  34360. }
  34361. ))
  34362. }
  34363. ));
  34364. return s.data
  34365. }
  34366. ,
  34367. e.prototype.optionUpdated = function() {
  34368. this.resetViewRoot()
  34369. }
  34370. ,
  34371. e.prototype.formatTooltip = function(t, e, n) {
  34372. var i = this.getData()
  34373. , r = this.getRawValue(t);
  34374. return og("nameValue", {
  34375. name: i.getName(t),
  34376. value: r
  34377. })
  34378. }
  34379. ,
  34380. e.prototype.getDataParams = function(e) {
  34381. var n = t.prototype.getDataParams.apply(this, arguments)
  34382. , i = this.getData().tree.getNodeByDataIndex(e);
  34383. return n.treeAncestors = aD(i, this),
  34384. n.treePathInfo = n.treeAncestors,
  34385. n
  34386. }
  34387. ,
  34388. e.prototype.setLayoutInfo = function(t) {
  34389. this.layoutInfo = this.layoutInfo || {},
  34390. A(this.layoutInfo, t)
  34391. }
  34392. ,
  34393. e.prototype.mapIdToIndex = function(t) {
  34394. var e = this._idIndexMap;
  34395. e || (e = this._idIndexMap = yt(),
  34396. this._idIndexMapCount = 0);
  34397. var n = e.get(t);
  34398. return null == n && e.set(t, n = this._idIndexMapCount++),
  34399. n
  34400. }
  34401. ,
  34402. e.prototype.getViewRoot = function() {
  34403. return this._viewRoot
  34404. }
  34405. ,
  34406. e.prototype.resetViewRoot = function(t) {
  34407. t ? this._viewRoot = t : t = this._viewRoot;
  34408. var e = this.getRawData().tree.root;
  34409. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  34410. }
  34411. ,
  34412. e.prototype.enableAriaDecal = function() {
  34413. pD(this)
  34414. }
  34415. ,
  34416. e.type = "series.treemap",
  34417. e.layoutMode = "box",
  34418. e.defaultOption = {
  34419. progressive: 0,
  34420. left: "center",
  34421. top: "middle",
  34422. width: "80%",
  34423. height: "80%",
  34424. sort: !0,
  34425. clipWindow: "origin",
  34426. squareRatio: .5 * (1 + Math.sqrt(5)),
  34427. leafDepth: null,
  34428. drillDownIcon: "▶",
  34429. zoomToNodeRatio: .1024,
  34430. scaleLimit: null,
  34431. roam: !0,
  34432. nodeClick: "zoomToNode",
  34433. animation: !0,
  34434. animationDurationUpdate: 900,
  34435. animationEasing: "quinticInOut",
  34436. breadcrumb: {
  34437. show: !0,
  34438. height: 22,
  34439. left: "center",
  34440. top: "bottom",
  34441. emptyItemWidth: 25,
  34442. itemStyle: {
  34443. color: "rgba(0,0,0,0.7)",
  34444. textStyle: {
  34445. color: "#fff"
  34446. }
  34447. },
  34448. emphasis: {
  34449. itemStyle: {
  34450. color: "rgba(0,0,0,0.9)"
  34451. }
  34452. }
  34453. },
  34454. label: {
  34455. show: !0,
  34456. distance: 0,
  34457. padding: 5,
  34458. position: "inside",
  34459. color: "#fff",
  34460. overflow: "truncate"
  34461. },
  34462. upperLabel: {
  34463. show: !1,
  34464. position: [0, "50%"],
  34465. height: 20,
  34466. overflow: "truncate",
  34467. verticalAlign: "middle"
  34468. },
  34469. itemStyle: {
  34470. color: null,
  34471. colorAlpha: null,
  34472. colorSaturation: null,
  34473. borderWidth: 0,
  34474. gapWidth: 0,
  34475. borderColor: "#fff",
  34476. borderColorSaturation: null
  34477. },
  34478. emphasis: {
  34479. upperLabel: {
  34480. show: !0,
  34481. position: [0, "50%"],
  34482. overflow: "truncate",
  34483. verticalAlign: "middle"
  34484. }
  34485. },
  34486. visualDimension: 0,
  34487. visualMin: null,
  34488. visualMax: null,
  34489. color: [],
  34490. colorAlpha: null,
  34491. colorSaturation: null,
  34492. colorMappingBy: "index",
  34493. visibleMin: 10,
  34494. childrenVisibleMin: null,
  34495. levels: []
  34496. },
  34497. e
  34498. }(bg);
  34499. function fD(t) {
  34500. var e = 0;
  34501. E(t.children, (function(t) {
  34502. fD(t);
  34503. var n = t.value;
  34504. Y(n) && (n = n[0]),
  34505. e += n
  34506. }
  34507. ));
  34508. var n = t.value;
  34509. Y(n) && (n = n[0]),
  34510. (null == n || isNaN(n)) && (n = e),
  34511. n < 0 && (n = 0),
  34512. Y(t.value) ? t.value[0] = n : t.value = n
  34513. }
  34514. var gD = function() {
  34515. function t(t) {
  34516. this.group = new Br,
  34517. t.add(this.group)
  34518. }
  34519. return t.prototype.render = function(t, e, n, i) {
  34520. var r = t.getModel("breadcrumb")
  34521. , o = this.group;
  34522. if (o.removeAll(),
  34523. r.get("show") && n) {
  34524. var a = r.getModel("itemStyle")
  34525. , s = r.getModel("emphasis")
  34526. , l = a.getModel("textStyle")
  34527. , u = s.getModel(["itemStyle", "textStyle"])
  34528. , h = {
  34529. pos: {
  34530. left: r.get("left"),
  34531. right: r.get("right"),
  34532. top: r.get("top"),
  34533. bottom: r.get("bottom")
  34534. },
  34535. box: {
  34536. width: e.getWidth(),
  34537. height: e.getHeight()
  34538. },
  34539. emptyItemWidth: r.get("emptyItemWidth"),
  34540. totalWidth: 0,
  34541. renderList: []
  34542. };
  34543. this._prepare(n, h, l),
  34544. this._renderContent(t, h, a, s, l, u, i),
  34545. Lp(o, h.pos, h.box)
  34546. }
  34547. }
  34548. ,
  34549. t.prototype._prepare = function(t, e, n) {
  34550. for (var i = t; i; i = i.parentNode) {
  34551. var r = Ro(i.getModel().get("name"), "")
  34552. , o = n.getTextRect(r)
  34553. , a = Math.max(o.width + 16, e.emptyItemWidth);
  34554. e.totalWidth += a + 8,
  34555. e.renderList.push({
  34556. node: i,
  34557. text: r,
  34558. width: a
  34559. })
  34560. }
  34561. }
  34562. ,
  34563. t.prototype._renderContent = function(t, e, n, i, r, o, a) {
  34564. 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,
  34565. l = e.box,
  34566. h = l.width,
  34567. c = l.height,
  34568. p = $r(s.left, h),
  34569. d = $r(s.top, c),
  34570. f = $r(s.right, h),
  34571. g = $r(s.bottom, c),
  34572. (isNaN(p) || isNaN(parseFloat(s.left))) && (p = 0),
  34573. (isNaN(f) || isNaN(parseFloat(s.right))) && (f = h),
  34574. (isNaN(d) || isNaN(parseFloat(s.top))) && (d = 0),
  34575. (isNaN(g) || isNaN(parseFloat(s.bottom))) && (g = c),
  34576. u = vp(u || 0),
  34577. {
  34578. width: Math.max(f - p - u[1] - u[3], 0),
  34579. height: Math.max(g - d - u[0] - u[2], 0)
  34580. }), _ = e.totalWidth, b = e.renderList, w = i.getModel("itemStyle").getItemStyle(), S = b.length - 1; S >= 0; S--) {
  34581. var M = b[S]
  34582. , I = M.node
  34583. , T = M.width
  34584. , C = M.text;
  34585. _ > x.width && (_ -= T - v,
  34586. T = v,
  34587. C = null);
  34588. var D = new Xu({
  34589. shape: {
  34590. points: yD(y, 0, T, m, S === b.length - 1, 0 === S)
  34591. },
  34592. style: k(n.getItemStyle(), {
  34593. lineJoin: "bevel"
  34594. }),
  34595. textContent: new Xs({
  34596. style: oc(r, {
  34597. text: C
  34598. })
  34599. }),
  34600. textConfig: {
  34601. position: "inside"
  34602. },
  34603. z2: 1e5,
  34604. onclick: H(a, I)
  34605. });
  34606. D.disableLabelAnimation = !0,
  34607. D.getTextContent().ensureState("emphasis").style = oc(o, {
  34608. text: C
  34609. }),
  34610. D.ensureState("emphasis").style = w,
  34611. Zl(D, i.get("focus"), i.get("blurScope"), i.get("disabled")),
  34612. this.group.add(D),
  34613. vD(D, t, I),
  34614. y += T + 8
  34615. }
  34616. }
  34617. ,
  34618. t.prototype.remove = function() {
  34619. this.group.removeAll()
  34620. }
  34621. ,
  34622. t
  34623. }();
  34624. function yD(t, e, n, i, r, o) {
  34625. var a = [[r ? t : t - 5, e], [t + n, e], [t + n, e + i], [r ? t : t - 5, e + i]];
  34626. return !o && a.splice(2, 0, [t + n + 5, e + i / 2]),
  34627. !r && a.push([t, e + i / 2]),
  34628. a
  34629. }
  34630. function vD(t, e, n) {
  34631. rl(t).eventData = {
  34632. componentType: "series",
  34633. componentSubType: "treemap",
  34634. componentIndex: e.componentIndex,
  34635. seriesIndex: e.seriesIndex,
  34636. seriesName: e.name,
  34637. seriesType: "treemap",
  34638. selfType: "breadcrumb",
  34639. nodeData: {
  34640. dataIndex: n && n.dataIndex,
  34641. name: n && n.name
  34642. },
  34643. treePathInfo: n && aD(n, e)
  34644. }
  34645. }
  34646. var mD = function() {
  34647. function t() {
  34648. this._storage = [],
  34649. this._elExistsMap = {}
  34650. }
  34651. return t.prototype.add = function(t, e, n, i, r) {
  34652. return !this._elExistsMap[t.id] && (this._elExistsMap[t.id] = !0,
  34653. this._storage.push({
  34654. el: t,
  34655. target: e,
  34656. duration: n,
  34657. delay: i,
  34658. easing: r
  34659. }),
  34660. !0)
  34661. }
  34662. ,
  34663. t.prototype.finished = function(t) {
  34664. return this._finishedCallback = t,
  34665. this
  34666. }
  34667. ,
  34668. t.prototype.start = function() {
  34669. for (var t = this, e = this._storage.length, n = function() {
  34670. --e <= 0 && (t._storage.length = 0,
  34671. t._elExistsMap = {},
  34672. t._finishedCallback && t._finishedCallback())
  34673. }, i = 0, r = this._storage.length; i < r; i++) {
  34674. var o = this._storage[i];
  34675. o.el.animateTo(o.target, {
  34676. duration: o.duration,
  34677. delay: o.delay,
  34678. easing: o.easing,
  34679. setToFinal: !0,
  34680. done: n,
  34681. aborted: n
  34682. })
  34683. }
  34684. return this
  34685. }
  34686. ,
  34687. t
  34688. }();
  34689. var xD = Br
  34690. , _D = Ws
  34691. , bD = "label"
  34692. , wD = "upperLabel"
  34693. , SD = ia([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]])
  34694. , MD = function(t) {
  34695. var e = SD(t);
  34696. return e.stroke = e.fill = e.lineWidth = null,
  34697. e
  34698. }
  34699. , ID = Vo()
  34700. , TD = function(t) {
  34701. function e() {
  34702. var n = null !== t && t.apply(this, arguments) || this;
  34703. return n.type = e.type,
  34704. n._state = "ready",
  34705. n._storage = {
  34706. nodeGroup: [],
  34707. background: [],
  34708. content: []
  34709. },
  34710. n
  34711. }
  34712. return n(e, t),
  34713. e.prototype.render = function(t, e, n, i) {
  34714. if (!(P(e.findComponents({
  34715. mainType: "series",
  34716. subType: "treemap",
  34717. query: i
  34718. }), t) < 0)) {
  34719. this.seriesModel = t,
  34720. this.api = n,
  34721. this.ecModel = e;
  34722. var r = iD(i, ["treemapZoomToNode", "treemapRootToNode"], t)
  34723. , o = i && i.type
  34724. , a = t.layoutInfo
  34725. , s = !this._oldTree
  34726. , l = this._storage
  34727. , u = "treemapRootToNode" === o && r && l ? {
  34728. rootNodeGroup: l.nodeGroup[r.node.getRawIndex()],
  34729. direction: i.direction
  34730. } : null
  34731. , h = this._giveContainerGroup(a)
  34732. , c = t.get("animation")
  34733. , p = this._doRender(h, t, u);
  34734. !c || s || o && "treemapZoomToNode" !== o && "treemapRootToNode" !== o ? p.renderFinally() : this._doAnimation(h, p, t, u),
  34735. this._resetController(n),
  34736. this._renderBreadcrumb(t, n, r)
  34737. }
  34738. }
  34739. ,
  34740. e.prototype._giveContainerGroup = function(t) {
  34741. var e = this._containerGroup;
  34742. return e || (e = this._containerGroup = new xD,
  34743. this._initEvents(e),
  34744. this.group.add(e)),
  34745. e.x = t.x,
  34746. e.y = t.y,
  34747. e
  34748. }
  34749. ,
  34750. e.prototype._doRender = function(t, e, n) {
  34751. var i = e.getData().tree
  34752. , r = this._oldTree
  34753. , o = {
  34754. nodeGroup: [],
  34755. background: [],
  34756. content: []
  34757. }
  34758. , a = {
  34759. nodeGroup: [],
  34760. background: [],
  34761. content: []
  34762. }
  34763. , s = this._storage
  34764. , l = [];
  34765. function u(t, i, r, u) {
  34766. return function(t, e, n, i, r, o, a, s, l, u) {
  34767. if (!a)
  34768. return;
  34769. var h = a.getLayout()
  34770. , c = t.getData()
  34771. , p = a.getModel();
  34772. if (c.setItemGraphicEl(a.dataIndex, null),
  34773. !h || !h.isInView)
  34774. return;
  34775. var d = h.width
  34776. , f = h.height
  34777. , g = h.borderWidth
  34778. , y = h.invisible
  34779. , v = a.getRawIndex()
  34780. , m = s && s.getRawIndex()
  34781. , x = a.viewChildren
  34782. , _ = h.upperHeight
  34783. , b = x && x.length
  34784. , w = p.getModel("itemStyle")
  34785. , S = p.getModel(["emphasis", "itemStyle"])
  34786. , M = p.getModel(["blur", "itemStyle"])
  34787. , I = p.getModel(["select", "itemStyle"])
  34788. , T = w.get("borderRadius") || 0
  34789. , C = W("nodeGroup", xD);
  34790. if (!C)
  34791. return;
  34792. if (l.add(C),
  34793. C.x = h.x || 0,
  34794. C.y = h.y || 0,
  34795. C.markRedraw(),
  34796. ID(C).nodeWidth = d,
  34797. ID(C).nodeHeight = f,
  34798. h.isAboveViewRoot)
  34799. return C;
  34800. var D = W("background", _D, u, 20);
  34801. D && z(C, D, b && h.upperLabelHeight);
  34802. var k = p.getModel("emphasis")
  34803. , L = k.get("focus")
  34804. , P = k.get("blurScope")
  34805. , O = k.get("disabled")
  34806. , R = "ancestor" === L ? a.getAncestorsIndices() : "descendant" === L ? a.getDescendantIndices() : L;
  34807. if (b)
  34808. Ql(C) && Jl(C, !1),
  34809. D && (Jl(D, !O),
  34810. c.setItemGraphicEl(a.dataIndex, D),
  34811. jl(D, R, P));
  34812. else {
  34813. var N = W("content", _D, u, 30);
  34814. N && V(C, N),
  34815. D.disableMorphing = !0,
  34816. D && Ql(D) && Jl(D, !1),
  34817. Jl(C, !O),
  34818. c.setItemGraphicEl(a.dataIndex, C);
  34819. var E = p.getShallow("cursor");
  34820. E && N.attr("cursor", E),
  34821. jl(C, R, P)
  34822. }
  34823. return C;
  34824. function z(e, n, i) {
  34825. var r = rl(n);
  34826. if (r.dataIndex = a.dataIndex,
  34827. r.seriesIndex = t.seriesIndex,
  34828. n.setShape({
  34829. x: 0,
  34830. y: 0,
  34831. width: d,
  34832. height: f,
  34833. r: T
  34834. }),
  34835. y)
  34836. B(n);
  34837. else {
  34838. n.invisible = !1;
  34839. var o = a.getVisual("style")
  34840. , s = o.stroke
  34841. , l = MD(w);
  34842. l.fill = s;
  34843. var u = SD(S);
  34844. u.fill = S.get("borderColor");
  34845. var h = SD(M);
  34846. h.fill = M.get("borderColor");
  34847. var c = SD(I);
  34848. if (c.fill = I.get("borderColor"),
  34849. i) {
  34850. var p = d - 2 * g;
  34851. F(n, s, o.opacity, {
  34852. x: g,
  34853. y: 0,
  34854. width: p,
  34855. height: _
  34856. })
  34857. } else
  34858. n.removeTextContent();
  34859. n.setStyle(l),
  34860. n.ensureState("emphasis").style = u,
  34861. n.ensureState("blur").style = h,
  34862. n.ensureState("select").style = c,
  34863. kl(n)
  34864. }
  34865. e.add(n)
  34866. }
  34867. function V(e, n) {
  34868. var i = rl(n);
  34869. i.dataIndex = a.dataIndex,
  34870. i.seriesIndex = t.seriesIndex;
  34871. var r = Math.max(d - 2 * g, 0)
  34872. , o = Math.max(f - 2 * g, 0);
  34873. if (n.culling = !0,
  34874. n.setShape({
  34875. x: g,
  34876. y: g,
  34877. width: r,
  34878. height: o,
  34879. r: T
  34880. }),
  34881. y)
  34882. B(n);
  34883. else {
  34884. n.invisible = !1;
  34885. var s = a.getVisual("style")
  34886. , l = s.fill
  34887. , u = MD(w);
  34888. u.fill = l,
  34889. u.decal = s.decal;
  34890. var h = SD(S)
  34891. , c = SD(M)
  34892. , p = SD(I);
  34893. F(n, l, s.opacity, null),
  34894. n.setStyle(u),
  34895. n.ensureState("emphasis").style = h,
  34896. n.ensureState("blur").style = c,
  34897. n.ensureState("select").style = p,
  34898. kl(n)
  34899. }
  34900. e.add(n)
  34901. }
  34902. function B(t) {
  34903. !t.invisible && o.push(t)
  34904. }
  34905. function F(e, n, i, r) {
  34906. var o = p.getModel(r ? wD : bD)
  34907. , s = Ro(p.get("name"), null)
  34908. , l = o.getShallow("show");
  34909. ic(e, rc(p, r ? wD : bD), {
  34910. defaultText: l ? s : null,
  34911. inheritColor: n,
  34912. defaultOpacity: i,
  34913. labelFetcher: t,
  34914. labelDataIndex: a.dataIndex
  34915. });
  34916. var u = e.getTextContent();
  34917. if (u) {
  34918. var c = u.style
  34919. , d = st(c.padding || 0);
  34920. r && (e.setTextConfig({
  34921. layoutRect: r
  34922. }),
  34923. u.disableLabelLayout = !0),
  34924. u.beforeUpdate = function() {
  34925. var t = Math.max((r ? r.width : e.shape.width) - d[1] - d[3], 0)
  34926. , n = Math.max((r ? r.height : e.shape.height) - d[0] - d[2], 0);
  34927. c.width === t && c.height === n || u.setStyle({
  34928. width: t,
  34929. height: n
  34930. })
  34931. }
  34932. ,
  34933. c.truncateMinChar = 2,
  34934. c.lineOverflow = "truncate",
  34935. G(c, r, h);
  34936. var f = u.getState("emphasis");
  34937. G(f ? f.style : null, r, h)
  34938. }
  34939. }
  34940. function G(e, n, i) {
  34941. var r = e ? e.text : null;
  34942. if (!n && i.isLeafRoot && null != r) {
  34943. var o = t.get("drillDownIcon", !0);
  34944. e.text = o ? o + " " + r : r
  34945. }
  34946. }
  34947. function W(t, i, o, a) {
  34948. var s = null != m && n[t][m]
  34949. , l = r[t];
  34950. return s ? (n[t][m] = null,
  34951. H(l, s)) : y || ((s = new i)instanceof Da && (s.z2 = function(t, e) {
  34952. return 100 * t + e
  34953. }(o, a)),
  34954. Y(l, s)),
  34955. e[t][v] = s
  34956. }
  34957. function H(t, e) {
  34958. var n = t[v] = {};
  34959. e instanceof xD ? (n.oldX = e.x,
  34960. n.oldY = e.y) : n.oldShape = A({}, e.shape)
  34961. }
  34962. function Y(t, e) {
  34963. var n = t[v] = {}
  34964. , o = a.parentNode
  34965. , s = e instanceof Br;
  34966. if (o && (!i || "drillDown" === i.direction)) {
  34967. var l = 0
  34968. , u = 0
  34969. , h = r.background[o.getRawIndex()];
  34970. !i && h && h.oldShape && (l = h.oldShape.width,
  34971. u = h.oldShape.height),
  34972. s ? (n.oldX = 0,
  34973. n.oldY = u) : n.oldShape = {
  34974. x: l,
  34975. y: u,
  34976. width: 0,
  34977. height: 0
  34978. }
  34979. }
  34980. n.fadein = !s
  34981. }
  34982. }(e, a, s, n, o, l, t, i, r, u)
  34983. }
  34984. !function t(e, n, i, r, o) {
  34985. r ? (n = e,
  34986. E(e, (function(t, e) {
  34987. !t.isRemoved() && s(e, e)
  34988. }
  34989. ))) : new Gm(n,e,a,a).add(s).update(s).remove(H(s, null)).execute();
  34990. function a(t) {
  34991. return t.getId()
  34992. }
  34993. function s(a, s) {
  34994. var l = null != a ? e[a] : null
  34995. , h = null != s ? n[s] : null
  34996. , c = u(l, h, i, o);
  34997. c && t(l && l.viewChildren || [], h && h.viewChildren || [], c, r, o + 1)
  34998. }
  34999. }(i.root ? [i.root] : [], r && r.root ? [r.root] : [], t, i === r || !r, 0);
  35000. var h = function(t) {
  35001. var e = {
  35002. nodeGroup: [],
  35003. background: [],
  35004. content: []
  35005. };
  35006. return t && E(t, (function(t, n) {
  35007. var i = e[n];
  35008. E(t, (function(t) {
  35009. t && (i.push(t),
  35010. ID(t).willDelete = !0)
  35011. }
  35012. ))
  35013. }
  35014. )),
  35015. e
  35016. }(s);
  35017. if (this._oldTree = i,
  35018. this._storage = a,
  35019. this._controllerHost) {
  35020. var c = this.seriesModel.layoutInfo
  35021. , p = i.root.getLayout();
  35022. p.width === c.width && p.height === c.height && (this._controllerHost.zoom = 1)
  35023. }
  35024. return {
  35025. lastsForAnimation: o,
  35026. willDeleteEls: h,
  35027. renderFinally: function() {
  35028. E(h, (function(t) {
  35029. E(t, (function(t) {
  35030. t.parent && t.parent.remove(t)
  35031. }
  35032. ))
  35033. }
  35034. )),
  35035. E(l, (function(t) {
  35036. t.invisible = !0,
  35037. t.dirty()
  35038. }
  35039. ))
  35040. }
  35041. }
  35042. }
  35043. ,
  35044. e.prototype._doAnimation = function(t, e, n, i) {
  35045. var r = n.get("animationDurationUpdate")
  35046. , o = n.get("animationEasing")
  35047. , a = (X(r) ? 0 : r) || 0
  35048. , s = (X(o) ? null : o) || "cubicOut"
  35049. , l = new mD;
  35050. E(e.willDeleteEls, (function(t, e) {
  35051. E(t, (function(t, n) {
  35052. if (!t.invisible) {
  35053. var r, o = t.parent, u = ID(o);
  35054. if (i && "drillDown" === i.direction)
  35055. r = o === i.rootNodeGroup ? {
  35056. shape: {
  35057. x: 0,
  35058. y: 0,
  35059. width: u.nodeWidth,
  35060. height: u.nodeHeight
  35061. },
  35062. style: {
  35063. opacity: 0
  35064. }
  35065. } : {
  35066. style: {
  35067. opacity: 0
  35068. }
  35069. };
  35070. else {
  35071. var h = 0
  35072. , c = 0;
  35073. u.willDelete || (h = u.nodeWidth / 2,
  35074. c = u.nodeHeight / 2),
  35075. r = "nodeGroup" === e ? {
  35076. x: h,
  35077. y: c,
  35078. style: {
  35079. opacity: 0
  35080. }
  35081. } : {
  35082. shape: {
  35083. x: h,
  35084. y: c,
  35085. width: 0,
  35086. height: 0
  35087. },
  35088. style: {
  35089. opacity: 0
  35090. }
  35091. }
  35092. }
  35093. r && l.add(t, r, a, 0, s)
  35094. }
  35095. }
  35096. ))
  35097. }
  35098. )),
  35099. E(this._storage, (function(t, n) {
  35100. E(t, (function(t, i) {
  35101. var r = e.lastsForAnimation[n][i]
  35102. , o = {};
  35103. r && (t instanceof Br ? null != r.oldX && (o.x = t.x,
  35104. o.y = t.y,
  35105. t.x = r.oldX,
  35106. t.y = r.oldY) : (r.oldShape && (o.shape = A({}, t.shape),
  35107. t.setShape(r.oldShape)),
  35108. r.fadein ? (t.setStyle("opacity", 0),
  35109. o.style = {
  35110. opacity: 1
  35111. }) : 1 !== t.style.opacity && (o.style = {
  35112. opacity: 1
  35113. })),
  35114. l.add(t, o, a, 0, s))
  35115. }
  35116. ))
  35117. }
  35118. ), this),
  35119. this._state = "animating",
  35120. l.finished(W((function() {
  35121. this._state = "ready",
  35122. e.renderFinally()
  35123. }
  35124. ), this)).start()
  35125. }
  35126. ,
  35127. e.prototype._resetController = function(t) {
  35128. var e = this._controller
  35129. , n = this._controllerHost;
  35130. n || (this._controllerHost = {
  35131. target: this.group
  35132. },
  35133. n = this._controllerHost),
  35134. e || ((e = this._controller = new nT(t.getZr())).enable(this.seriesModel.get("roam")),
  35135. n.zoomLimit = this.seriesModel.get("scaleLimit"),
  35136. n.zoom = this.seriesModel.get("zoom"),
  35137. e.on("pan", W(this._onPan, this)),
  35138. e.on("zoom", W(this._onZoom, this)));
  35139. var i = new ze(0,0,t.getWidth(),t.getHeight());
  35140. e.setPointerChecker((function(t, e, n) {
  35141. return i.contain(e, n)
  35142. }
  35143. ))
  35144. }
  35145. ,
  35146. e.prototype._clearController = function() {
  35147. var t = this._controller;
  35148. this._controllerHost = null,
  35149. t && (t.dispose(),
  35150. t = null)
  35151. }
  35152. ,
  35153. e.prototype._onPan = function(t) {
  35154. if ("animating" !== this._state && (Math.abs(t.dx) > 3 || Math.abs(t.dy) > 3)) {
  35155. var e = this.seriesModel.getData().tree.root;
  35156. if (!e)
  35157. return;
  35158. var n = e.getLayout();
  35159. if (!n)
  35160. return;
  35161. this.api.dispatchAction({
  35162. type: "treemapMove",
  35163. from: this.uid,
  35164. seriesId: this.seriesModel.id,
  35165. rootRect: {
  35166. x: n.x + t.dx,
  35167. y: n.y + t.dy,
  35168. width: n.width,
  35169. height: n.height
  35170. }
  35171. })
  35172. }
  35173. }
  35174. ,
  35175. e.prototype._onZoom = function(t) {
  35176. var e = t.originX
  35177. , n = t.originY
  35178. , i = t.scale;
  35179. if ("animating" !== this._state) {
  35180. var r = this.seriesModel.getData().tree.root;
  35181. if (!r)
  35182. return;
  35183. var o = r.getLayout();
  35184. if (!o)
  35185. return;
  35186. var a, s = new ze(o.x,o.y,o.width,o.height), l = this._controllerHost;
  35187. a = l.zoomLimit;
  35188. var u = l.zoom = l.zoom || 1;
  35189. if (u *= i,
  35190. a) {
  35191. var h = a.min || 0
  35192. , c = a.max || 1 / 0;
  35193. u = Math.max(Math.min(c, u), h)
  35194. }
  35195. var p = u / l.zoom;
  35196. l.zoom = u;
  35197. var d = this.seriesModel.layoutInfo
  35198. , f = [1, 0, 0, 1, 0, 0];
  35199. we(f, f, [-(e -= d.x), -(n -= d.y)]),
  35200. Me(f, f, [p, p]),
  35201. we(f, f, [e, n]),
  35202. s.applyTransform(f),
  35203. this.api.dispatchAction({
  35204. type: "treemapRender",
  35205. from: this.uid,
  35206. seriesId: this.seriesModel.id,
  35207. rootRect: {
  35208. x: s.x,
  35209. y: s.y,
  35210. width: s.width,
  35211. height: s.height
  35212. }
  35213. })
  35214. }
  35215. }
  35216. ,
  35217. e.prototype._initEvents = function(t) {
  35218. var e = this;
  35219. t.on("click", (function(t) {
  35220. if ("ready" === e._state) {
  35221. var n = e.seriesModel.get("nodeClick", !0);
  35222. if (n) {
  35223. var i = e.findTarget(t.offsetX, t.offsetY);
  35224. if (i) {
  35225. var r = i.node;
  35226. if (r.getLayout().isLeafRoot)
  35227. e._rootToNode(i);
  35228. else if ("zoomToNode" === n)
  35229. e._zoomToNode(i);
  35230. else if ("link" === n) {
  35231. var o = r.hostTree.data.getItemModel(r.dataIndex)
  35232. , a = o.get("link", !0)
  35233. , s = o.get("target", !0) || "blank";
  35234. a && Mp(a, s)
  35235. }
  35236. }
  35237. }
  35238. }
  35239. }
  35240. ), this)
  35241. }
  35242. ,
  35243. e.prototype._renderBreadcrumb = function(t, e, n) {
  35244. var i = this;
  35245. n || (n = null != t.get("leafDepth", !0) ? {
  35246. node: t.getViewRoot()
  35247. } : this.findTarget(e.getWidth() / 2, e.getHeight() / 2)) || (n = {
  35248. node: t.getData().tree.root
  35249. }),
  35250. (this._breadcrumb || (this._breadcrumb = new gD(this.group))).render(t, e, n.node, (function(e) {
  35251. "animating" !== i._state && (oD(t.getViewRoot(), e) ? i._rootToNode({
  35252. node: e
  35253. }) : i._zoomToNode({
  35254. node: e
  35255. }))
  35256. }
  35257. ))
  35258. }
  35259. ,
  35260. e.prototype.remove = function() {
  35261. this._clearController(),
  35262. this._containerGroup && this._containerGroup.removeAll(),
  35263. this._storage = {
  35264. nodeGroup: [],
  35265. background: [],
  35266. content: []
  35267. },
  35268. this._state = "ready",
  35269. this._breadcrumb && this._breadcrumb.remove()
  35270. }
  35271. ,
  35272. e.prototype.dispose = function() {
  35273. this._clearController()
  35274. }
  35275. ,
  35276. e.prototype._zoomToNode = function(t) {
  35277. this.api.dispatchAction({
  35278. type: "treemapZoomToNode",
  35279. from: this.uid,
  35280. seriesId: this.seriesModel.id,
  35281. targetNode: t.node
  35282. })
  35283. }
  35284. ,
  35285. e.prototype._rootToNode = function(t) {
  35286. this.api.dispatchAction({
  35287. type: "treemapRootToNode",
  35288. from: this.uid,
  35289. seriesId: this.seriesModel.id,
  35290. targetNode: t.node
  35291. })
  35292. }
  35293. ,
  35294. e.prototype.findTarget = function(t, e) {
  35295. var n;
  35296. return this.seriesModel.getViewRoot().eachNode({
  35297. attr: "viewChildren",
  35298. order: "preorder"
  35299. }, (function(i) {
  35300. var r = this._storage.background[i.getRawIndex()];
  35301. if (r) {
  35302. var o = r.transformCoordToLocal(t, e)
  35303. , a = r.shape;
  35304. if (!(a.x <= o[0] && o[0] <= a.x + a.width && a.y <= o[1] && o[1] <= a.y + a.height))
  35305. return !1;
  35306. n = {
  35307. node: i,
  35308. offsetX: o[0],
  35309. offsetY: o[1]
  35310. }
  35311. }
  35312. }
  35313. ), this),
  35314. n
  35315. }
  35316. ,
  35317. e.type = "treemap",
  35318. e
  35319. }(Og);
  35320. var CD = E
  35321. , DD = q
  35322. , AD = -1
  35323. , kD = function() {
  35324. function t(e) {
  35325. var n = e.mappingMethod
  35326. , i = e.type
  35327. , r = this.option = T(e);
  35328. this.type = i,
  35329. this.mappingMethod = n,
  35330. this._normalizeData = FD[n];
  35331. var o = t.visualHandlers[i];
  35332. this.applyVisual = o.applyVisual,
  35333. this.getColorMapper = o.getColorMapper,
  35334. this._normalizedToVisual = o._normalizedToVisual[n],
  35335. "piecewise" === n ? (LD(r),
  35336. function(t) {
  35337. var e = t.pieceList;
  35338. t.hasSpecialVisual = !1,
  35339. E(e, (function(e, n) {
  35340. e.originIndex = n,
  35341. null != e.visual && (t.hasSpecialVisual = !0)
  35342. }
  35343. ))
  35344. }(r)) : "category" === n ? r.categories ? function(t) {
  35345. var e = t.categories
  35346. , n = t.categoryMap = {}
  35347. , i = t.visual;
  35348. if (CD(e, (function(t, e) {
  35349. n[t] = e
  35350. }
  35351. )),
  35352. !Y(i)) {
  35353. var r = [];
  35354. q(i) ? CD(i, (function(t, e) {
  35355. var i = n[e];
  35356. r[null != i ? i : AD] = t
  35357. }
  35358. )) : r[-1] = i,
  35359. i = BD(t, r)
  35360. }
  35361. for (var o = e.length - 1; o >= 0; o--)
  35362. null == i[o] && (delete n[e[o]],
  35363. e.pop())
  35364. }(r) : LD(r, !0) : (lt("linear" !== n || r.dataExtent),
  35365. LD(r))
  35366. }
  35367. return t.prototype.mapValueToVisual = function(t) {
  35368. var e = this._normalizeData(t);
  35369. return this._normalizedToVisual(e, t)
  35370. }
  35371. ,
  35372. t.prototype.getNormalizer = function() {
  35373. return W(this._normalizeData, this)
  35374. }
  35375. ,
  35376. t.listVisualTypes = function() {
  35377. return G(t.visualHandlers)
  35378. }
  35379. ,
  35380. t.isValidType = function(e) {
  35381. return t.visualHandlers.hasOwnProperty(e)
  35382. }
  35383. ,
  35384. t.eachVisual = function(t, e, n) {
  35385. q(t) ? E(t, e, n) : e.call(n, t)
  35386. }
  35387. ,
  35388. t.mapVisual = function(e, n, i) {
  35389. var r, o = Y(e) ? [] : q(e) ? {} : (r = !0,
  35390. null);
  35391. return t.eachVisual(e, (function(t, e) {
  35392. var a = n.call(i, t, e);
  35393. r ? o = a : o[e] = a
  35394. }
  35395. )),
  35396. o
  35397. }
  35398. ,
  35399. t.retrieveVisuals = function(e) {
  35400. var n, i = {};
  35401. return e && CD(t.visualHandlers, (function(t, r) {
  35402. e.hasOwnProperty(r) && (i[r] = e[r],
  35403. n = !0)
  35404. }
  35405. )),
  35406. n ? i : null
  35407. }
  35408. ,
  35409. t.prepareVisualTypes = function(t) {
  35410. if (Y(t))
  35411. t = t.slice();
  35412. else {
  35413. if (!DD(t))
  35414. return [];
  35415. var e = [];
  35416. CD(t, (function(t, n) {
  35417. e.push(n)
  35418. }
  35419. )),
  35420. t = e
  35421. }
  35422. return t.sort((function(t, e) {
  35423. return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1
  35424. }
  35425. )),
  35426. t
  35427. }
  35428. ,
  35429. t.dependsOn = function(t, e) {
  35430. return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e
  35431. }
  35432. ,
  35433. t.findPieceIndex = function(t, e, n) {
  35434. for (var i, r = 1 / 0, o = 0, a = e.length; o < a; o++) {
  35435. var s = e[o].value;
  35436. if (null != s) {
  35437. if (s === t || U(s) && s === t + "")
  35438. return o;
  35439. n && c(s, o)
  35440. }
  35441. }
  35442. for (o = 0,
  35443. a = e.length; o < a; o++) {
  35444. var l = e[o]
  35445. , u = l.interval
  35446. , h = l.close;
  35447. if (u) {
  35448. if (u[0] === -1 / 0) {
  35449. if (GD(h[1], t, u[1]))
  35450. return o
  35451. } else if (u[1] === 1 / 0) {
  35452. if (GD(h[0], u[0], t))
  35453. return o
  35454. } else if (GD(h[0], u[0], t) && GD(h[1], t, u[1]))
  35455. return o;
  35456. n && c(u[0], o),
  35457. n && c(u[1], o)
  35458. }
  35459. }
  35460. if (n)
  35461. return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : i;
  35462. function c(e, n) {
  35463. var o = Math.abs(e - t);
  35464. o < r && (r = o,
  35465. i = n)
  35466. }
  35467. }
  35468. ,
  35469. t.visualHandlers = {
  35470. color: {
  35471. applyVisual: RD("color"),
  35472. getColorMapper: function() {
  35473. var t = this.option;
  35474. return W("category" === t.mappingMethod ? function(t, e) {
  35475. return !e && (t = this._normalizeData(t)),
  35476. ND.call(this, t)
  35477. }
  35478. : function(e, n, i) {
  35479. var r = !!i;
  35480. return !n && (e = this._normalizeData(e)),
  35481. i = Jn(e, t.parsedVisual, i),
  35482. r ? i : ri(i, "rgba")
  35483. }
  35484. , this)
  35485. },
  35486. _normalizedToVisual: {
  35487. linear: function(t) {
  35488. return ri(Jn(t, this.option.parsedVisual), "rgba")
  35489. },
  35490. category: ND,
  35491. piecewise: function(t, e) {
  35492. var n = VD.call(this, e);
  35493. return null == n && (n = ri(Jn(t, this.option.parsedVisual), "rgba")),
  35494. n
  35495. },
  35496. fixed: ED
  35497. }
  35498. },
  35499. colorHue: PD((function(t, e) {
  35500. return ni(t, e)
  35501. }
  35502. )),
  35503. colorSaturation: PD((function(t, e) {
  35504. return ni(t, null, e)
  35505. }
  35506. )),
  35507. colorLightness: PD((function(t, e) {
  35508. return ni(t, null, null, e)
  35509. }
  35510. )),
  35511. colorAlpha: PD((function(t, e) {
  35512. return ii(t, e)
  35513. }
  35514. )),
  35515. decal: {
  35516. applyVisual: RD("decal"),
  35517. _normalizedToVisual: {
  35518. linear: null,
  35519. category: ND,
  35520. piecewise: null,
  35521. fixed: null
  35522. }
  35523. },
  35524. opacity: {
  35525. applyVisual: RD("opacity"),
  35526. _normalizedToVisual: zD([0, 1])
  35527. },
  35528. liftZ: {
  35529. applyVisual: RD("liftZ"),
  35530. _normalizedToVisual: {
  35531. linear: ED,
  35532. category: ED,
  35533. piecewise: ED,
  35534. fixed: ED
  35535. }
  35536. },
  35537. symbol: {
  35538. applyVisual: function(t, e, n) {
  35539. n("symbol", this.mapValueToVisual(t))
  35540. },
  35541. _normalizedToVisual: {
  35542. linear: OD,
  35543. category: ND,
  35544. piecewise: function(t, e) {
  35545. var n = VD.call(this, e);
  35546. return null == n && (n = OD.call(this, t)),
  35547. n
  35548. },
  35549. fixed: ED
  35550. }
  35551. },
  35552. symbolSize: {
  35553. applyVisual: RD("symbolSize"),
  35554. _normalizedToVisual: zD([0, 1])
  35555. }
  35556. },
  35557. t
  35558. }();
  35559. function LD(t, e) {
  35560. var n = t.visual
  35561. , i = [];
  35562. q(n) ? CD(n, (function(t) {
  35563. i.push(t)
  35564. }
  35565. )) : null != n && i.push(n);
  35566. e || 1 !== i.length || {
  35567. color: 1,
  35568. symbol: 1
  35569. }.hasOwnProperty(t.type) || (i[1] = i[0]),
  35570. BD(t, i)
  35571. }
  35572. function PD(t) {
  35573. return {
  35574. applyVisual: function(e, n, i) {
  35575. var r = this.mapValueToVisual(e);
  35576. i("color", t(n("color"), r))
  35577. },
  35578. _normalizedToVisual: zD([0, 1])
  35579. }
  35580. }
  35581. function OD(t) {
  35582. var e = this.option.visual;
  35583. return e[Math.round(Kr(t, [0, 1], [0, e.length - 1], !0))] || {}
  35584. }
  35585. function RD(t) {
  35586. return function(e, n, i) {
  35587. i(t, this.mapValueToVisual(e))
  35588. }
  35589. }
  35590. function ND(t) {
  35591. var e = this.option.visual;
  35592. return e[this.option.loop && t !== AD ? t % e.length : t]
  35593. }
  35594. function ED() {
  35595. return this.option.visual[0]
  35596. }
  35597. function zD(t) {
  35598. return {
  35599. linear: function(e) {
  35600. return Kr(e, t, this.option.visual, !0)
  35601. },
  35602. category: ND,
  35603. piecewise: function(e, n) {
  35604. var i = VD.call(this, n);
  35605. return null == i && (i = Kr(e, t, this.option.visual, !0)),
  35606. i
  35607. },
  35608. fixed: ED
  35609. }
  35610. }
  35611. function VD(t) {
  35612. var e = this.option
  35613. , n = e.pieceList;
  35614. if (e.hasSpecialVisual) {
  35615. var i = n[kD.findPieceIndex(t, n)];
  35616. if (i && i.visual)
  35617. return i.visual[this.type]
  35618. }
  35619. }
  35620. function BD(t, e) {
  35621. return t.visual = e,
  35622. "color" === t.type && (t.parsedVisual = z(e, (function(t) {
  35623. var e = qn(t);
  35624. return e || [0, 0, 0, 1]
  35625. }
  35626. ))),
  35627. e
  35628. }
  35629. var FD = {
  35630. linear: function(t) {
  35631. return Kr(t, this.option.dataExtent, [0, 1], !0)
  35632. },
  35633. piecewise: function(t) {
  35634. var e = this.option.pieceList
  35635. , n = kD.findPieceIndex(t, e, !0);
  35636. if (null != n)
  35637. return Kr(n, [0, e.length - 1], [0, 1], !0)
  35638. },
  35639. category: function(t) {
  35640. var e = this.option.categories ? this.option.categoryMap[t] : t;
  35641. return null == e ? AD : e
  35642. },
  35643. fixed: bt
  35644. };
  35645. function GD(t, e, n) {
  35646. return t ? e <= n : e < n
  35647. }
  35648. var WD = Vo()
  35649. , HD = {
  35650. seriesType: "treemap",
  35651. reset: function(t) {
  35652. var e = t.getData().tree.root;
  35653. e.isRemoved() || YD(e, {}, t.getViewRoot().getAncestors(), t)
  35654. }
  35655. };
  35656. function YD(t, e, n, i) {
  35657. var r = t.getModel()
  35658. , o = t.getLayout()
  35659. , a = t.hostTree.data;
  35660. if (o && !o.invisible && o.isInView) {
  35661. var s, l = r.getModel("itemStyle"), u = function(t, e, n) {
  35662. var i = A({}, e)
  35663. , r = n.designatedVisualItemStyle;
  35664. return E(["color", "colorAlpha", "colorSaturation"], (function(n) {
  35665. r[n] = e[n];
  35666. var o = t.get(n);
  35667. r[n] = null,
  35668. null != o && (i[n] = o)
  35669. }
  35670. )),
  35671. i
  35672. }(l, e, i), h = a.ensureUniqueItemVisual(t.dataIndex, "style"), c = l.get("borderColor"), p = l.get("borderColorSaturation");
  35673. null != p && (c = function(t, e) {
  35674. return null != e ? ni(e, null, null, t) : null
  35675. }(p, s = XD(u))),
  35676. h.stroke = c;
  35677. var d = t.viewChildren;
  35678. if (d && d.length) {
  35679. var f = function(t, e, n, i, r, o) {
  35680. if (!o || !o.length)
  35681. return;
  35682. var a = ZD(e, "color") || null != r.color && "none" !== r.color && (ZD(e, "colorAlpha") || ZD(e, "colorSaturation"));
  35683. if (!a)
  35684. return;
  35685. var s = e.get("visualMin")
  35686. , l = e.get("visualMax")
  35687. , u = n.dataExtent.slice();
  35688. null != s && s < u[0] && (u[0] = s),
  35689. null != l && l > u[1] && (u[1] = l);
  35690. var h = e.get("colorMappingBy")
  35691. , c = {
  35692. type: a.name,
  35693. dataExtent: u,
  35694. visual: a.range
  35695. };
  35696. "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category",
  35697. c.loop = !0);
  35698. var p = new kD(c);
  35699. return WD(p).drColorMappingBy = h,
  35700. p
  35701. }(0, r, o, 0, u, d);
  35702. E(d, (function(t, e) {
  35703. if (t.depth >= n.length || t === n[t.depth]) {
  35704. var o = function(t, e, n, i, r, o) {
  35705. var a = A({}, e);
  35706. if (r) {
  35707. var s = r.type
  35708. , l = "color" === s && WD(r).drColorMappingBy
  35709. , u = "index" === l ? i : "id" === l ? o.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  35710. a[s] = r.mapValueToVisual(u)
  35711. }
  35712. return a
  35713. }(r, u, t, e, f, i);
  35714. YD(t, o, n, i)
  35715. }
  35716. }
  35717. ))
  35718. } else
  35719. s = XD(u),
  35720. h.fill = s
  35721. }
  35722. }
  35723. function XD(t) {
  35724. var e = UD(t, "color");
  35725. if (e) {
  35726. var n = UD(t, "colorAlpha")
  35727. , i = UD(t, "colorSaturation");
  35728. return i && (e = ni(e, null, null, i)),
  35729. n && (e = ii(e, n)),
  35730. e
  35731. }
  35732. }
  35733. function UD(t, e) {
  35734. var n = t[e];
  35735. if (null != n && "none" !== n)
  35736. return n
  35737. }
  35738. function ZD(t, e) {
  35739. var n = t.get(e);
  35740. return Y(n) && n.length ? {
  35741. name: e,
  35742. range: n
  35743. } : null
  35744. }
  35745. var jD = Math.max
  35746. , qD = Math.min
  35747. , KD = it
  35748. , $D = E
  35749. , JD = ["itemStyle", "borderWidth"]
  35750. , QD = ["itemStyle", "gapWidth"]
  35751. , tA = ["upperLabel", "show"]
  35752. , eA = ["upperLabel", "height"]
  35753. , nA = {
  35754. seriesType: "treemap",
  35755. reset: function(t, e, n, i) {
  35756. var r = n.getWidth()
  35757. , o = n.getHeight()
  35758. , a = t.option
  35759. , s = kp(t.getBoxLayoutParams(), {
  35760. width: n.getWidth(),
  35761. height: n.getHeight()
  35762. })
  35763. , l = a.size || []
  35764. , u = $r(KD(s.width, l[0]), r)
  35765. , h = $r(KD(s.height, l[1]), o)
  35766. , c = i && i.type
  35767. , p = iD(i, ["treemapZoomToNode", "treemapRootToNode"], t)
  35768. , d = "treemapRender" === c || "treemapMove" === c ? i.rootRect : null
  35769. , f = t.getViewRoot()
  35770. , g = rD(f);
  35771. if ("treemapMove" !== c) {
  35772. var y = "treemapZoomToNode" === c ? function(t, e, n, i, r) {
  35773. var o, a = (e || {}).node, s = [i, r];
  35774. if (!a || a === n)
  35775. return s;
  35776. var l = i * r
  35777. , u = l * t.option.zoomToNodeRatio;
  35778. for (; o = a.parentNode; ) {
  35779. for (var h = 0, c = o.children, p = 0, d = c.length; p < d; p++)
  35780. h += c[p].getValue();
  35781. var f = a.getValue();
  35782. if (0 === f)
  35783. return s;
  35784. u *= h / f;
  35785. var g = o.getModel()
  35786. , y = g.get(JD);
  35787. (u += 4 * y * y + (3 * y + Math.max(y, sA(g))) * Math.pow(u, .5)) > oo && (u = oo),
  35788. a = o
  35789. }
  35790. u < l && (u = l);
  35791. var v = Math.pow(u / l, .5);
  35792. return [i * v, r * v]
  35793. }(t, p, f, u, h) : d ? [d.width, d.height] : [u, h]
  35794. , v = a.sort;
  35795. v && "asc" !== v && "desc" !== v && (v = "desc");
  35796. var m = {
  35797. squareRatio: a.squareRatio,
  35798. sort: v,
  35799. leafDepth: a.leafDepth
  35800. };
  35801. f.hostTree.clearLayouts();
  35802. var x = {
  35803. x: 0,
  35804. y: 0,
  35805. width: y[0],
  35806. height: y[1],
  35807. area: y[0] * y[1]
  35808. };
  35809. f.setLayout(x),
  35810. iA(f, m, !1, 0),
  35811. x = f.getLayout(),
  35812. $D(g, (function(t, e) {
  35813. var n = (g[e + 1] || f).getValue();
  35814. t.setLayout(A({
  35815. dataExtent: [n, n],
  35816. borderWidth: 0,
  35817. upperHeight: 0
  35818. }, x))
  35819. }
  35820. ))
  35821. }
  35822. var _ = t.getData().tree.root;
  35823. _.setLayout(function(t, e, n) {
  35824. if (e)
  35825. return {
  35826. x: e.x,
  35827. y: e.y
  35828. };
  35829. var i = {
  35830. x: 0,
  35831. y: 0
  35832. };
  35833. if (!n)
  35834. return i;
  35835. var r = n.node
  35836. , o = r.getLayout();
  35837. if (!o)
  35838. return i;
  35839. var a = [o.width / 2, o.height / 2]
  35840. , s = r;
  35841. for (; s; ) {
  35842. var l = s.getLayout();
  35843. a[0] += l.x,
  35844. a[1] += l.y,
  35845. s = s.parentNode
  35846. }
  35847. return {
  35848. x: t.width / 2 - a[0],
  35849. y: t.height / 2 - a[1]
  35850. }
  35851. }(s, d, p), !0),
  35852. t.setLayoutInfo(s),
  35853. aA(_, new ze(-s.x,-s.y,r,o), g, f, 0)
  35854. }
  35855. };
  35856. function iA(t, e, n, i) {
  35857. var r, o;
  35858. if (!t.isRemoved()) {
  35859. var a = t.getLayout();
  35860. r = a.width,
  35861. o = a.height;
  35862. var s = t.getModel()
  35863. , l = s.get(JD)
  35864. , u = s.get(QD) / 2
  35865. , h = sA(s)
  35866. , c = Math.max(l, h)
  35867. , p = l - u
  35868. , d = c - u;
  35869. t.setLayout({
  35870. borderWidth: l,
  35871. upperHeight: c,
  35872. upperLabelHeight: h
  35873. }, !0);
  35874. var f = (r = jD(r - 2 * p, 0)) * (o = jD(o - p - d, 0))
  35875. , g = function(t, e, n, i, r, o) {
  35876. var a = t.children || []
  35877. , s = i.sort;
  35878. "asc" !== s && "desc" !== s && (s = null);
  35879. var l = null != i.leafDepth && i.leafDepth <= o;
  35880. if (r && !l)
  35881. return t.viewChildren = [];
  35882. a = B(a, (function(t) {
  35883. return !t.isRemoved()
  35884. }
  35885. )),
  35886. function(t, e) {
  35887. e && t.sort((function(t, n) {
  35888. var i = "asc" === e ? t.getValue() - n.getValue() : n.getValue() - t.getValue();
  35889. return 0 === i ? "asc" === e ? t.dataIndex - n.dataIndex : n.dataIndex - t.dataIndex : i
  35890. }
  35891. ))
  35892. }(a, s);
  35893. var u = function(t, e, n) {
  35894. for (var i = 0, r = 0, o = e.length; r < o; r++)
  35895. i += e[r].getValue();
  35896. var a, s = t.get("visualDimension");
  35897. e && e.length ? "value" === s && n ? (a = [e[e.length - 1].getValue(), e[0].getValue()],
  35898. "asc" === n && a.reverse()) : (a = [1 / 0, -1 / 0],
  35899. $D(e, (function(t) {
  35900. var e = t.getValue(s);
  35901. e < a[0] && (a[0] = e),
  35902. e > a[1] && (a[1] = e)
  35903. }
  35904. ))) : a = [NaN, NaN];
  35905. return {
  35906. sum: i,
  35907. dataExtent: a
  35908. }
  35909. }(e, a, s);
  35910. if (0 === u.sum)
  35911. return t.viewChildren = [];
  35912. if (u.sum = function(t, e, n, i, r) {
  35913. if (!i)
  35914. return n;
  35915. for (var o = t.get("visibleMin"), a = r.length, s = a, l = a - 1; l >= 0; l--) {
  35916. var u = r["asc" === i ? a - l - 1 : l].getValue();
  35917. u / n * e < o && (s = l,
  35918. n -= u)
  35919. }
  35920. return "asc" === i ? r.splice(0, a - s) : r.splice(s, a - s),
  35921. n
  35922. }(e, n, u.sum, s, a),
  35923. 0 === u.sum)
  35924. return t.viewChildren = [];
  35925. for (var h = 0, c = a.length; h < c; h++) {
  35926. var p = a[h].getValue() / u.sum * n;
  35927. a[h].setLayout({
  35928. area: p
  35929. })
  35930. }
  35931. l && (a.length && t.setLayout({
  35932. isLeafRoot: !0
  35933. }, !0),
  35934. a.length = 0);
  35935. return t.viewChildren = a,
  35936. t.setLayout({
  35937. dataExtent: u.dataExtent
  35938. }, !0),
  35939. a
  35940. }(t, s, f, e, n, i);
  35941. if (g.length) {
  35942. var y = {
  35943. x: p,
  35944. y: d,
  35945. width: r,
  35946. height: o
  35947. }
  35948. , v = qD(r, o)
  35949. , m = 1 / 0
  35950. , x = [];
  35951. x.area = 0;
  35952. for (var _ = 0, b = g.length; _ < b; ) {
  35953. var w = g[_];
  35954. x.push(w),
  35955. x.area += w.getLayout().area;
  35956. var S = rA(x, v, e.squareRatio);
  35957. S <= m ? (_++,
  35958. m = S) : (x.area -= x.pop().getLayout().area,
  35959. oA(x, v, y, u, !1),
  35960. v = qD(y.width, y.height),
  35961. x.length = x.area = 0,
  35962. m = 1 / 0)
  35963. }
  35964. if (x.length && oA(x, v, y, u, !0),
  35965. !n) {
  35966. var M = s.get("childrenVisibleMin");
  35967. null != M && f < M && (n = !0)
  35968. }
  35969. for (_ = 0,
  35970. b = g.length; _ < b; _++)
  35971. iA(g[_], e, n, i + 1)
  35972. }
  35973. }
  35974. }
  35975. function rA(t, e, n) {
  35976. for (var i = 0, r = 1 / 0, o = 0, a = void 0, s = t.length; o < s; o++)
  35977. (a = t[o].getLayout().area) && (a < r && (r = a),
  35978. a > i && (i = a));
  35979. var l = t.area * t.area
  35980. , u = e * e * n;
  35981. return l ? jD(u * i / l, l / (u * r)) : 1 / 0
  35982. }
  35983. function oA(t, e, n, i, r) {
  35984. var o = e === n.width ? 0 : 1
  35985. , a = 1 - o
  35986. , s = ["x", "y"]
  35987. , l = ["width", "height"]
  35988. , u = n[s[o]]
  35989. , h = e ? t.area / e : 0;
  35990. (r || h > n[l[a]]) && (h = n[l[a]]);
  35991. for (var c = 0, p = t.length; c < p; c++) {
  35992. var d = t[c]
  35993. , f = {}
  35994. , g = h ? d.getLayout().area / h : 0
  35995. , y = f[l[a]] = jD(h - 2 * i, 0)
  35996. , v = n[s[o]] + n[l[o]] - u
  35997. , m = c === p - 1 || v < g ? v : g
  35998. , x = f[l[o]] = jD(m - 2 * i, 0);
  35999. f[s[a]] = n[s[a]] + qD(i, y / 2),
  36000. f[s[o]] = u + qD(i, x / 2),
  36001. u += m,
  36002. d.setLayout(f, !0)
  36003. }
  36004. n[s[a]] += h,
  36005. n[l[a]] -= h
  36006. }
  36007. function aA(t, e, n, i, r) {
  36008. var o = t.getLayout()
  36009. , a = n[r]
  36010. , s = a && a === t;
  36011. if (!(a && !s || r === n.length && t !== i)) {
  36012. t.setLayout({
  36013. isInView: !0,
  36014. invisible: !s && !e.intersect(o),
  36015. isAboveViewRoot: s
  36016. }, !0);
  36017. var l = new ze(e.x - o.x,e.y - o.y,e.width,e.height);
  36018. $D(t.viewChildren || [], (function(t) {
  36019. aA(t, l, n, i, r + 1)
  36020. }
  36021. ))
  36022. }
  36023. }
  36024. function sA(t) {
  36025. return t.get(tA) ? t.get(eA) : 0
  36026. }
  36027. function lA(t) {
  36028. var e = t.findComponents({
  36029. mainType: "legend"
  36030. });
  36031. e && e.length && t.eachSeriesByType("graph", (function(t) {
  36032. var n = t.getCategoriesData()
  36033. , i = t.getGraph().data
  36034. , r = n.mapArray(n.getName);
  36035. i.filterSelf((function(t) {
  36036. var n = i.getItemModel(t).getShallow("category");
  36037. if (null != n) {
  36038. j(n) && (n = r[n]);
  36039. for (var o = 0; o < e.length; o++)
  36040. if (!e[o].isSelected(n))
  36041. return !1
  36042. }
  36043. return !0
  36044. }
  36045. ))
  36046. }
  36047. ))
  36048. }
  36049. function uA(t) {
  36050. var e = {};
  36051. t.eachSeriesByType("graph", (function(t) {
  36052. var n = t.getCategoriesData()
  36053. , i = t.getData()
  36054. , r = {};
  36055. n.each((function(i) {
  36056. var o = n.getName(i);
  36057. r["ec-" + o] = i;
  36058. var a = n.getItemModel(i)
  36059. , s = a.getModel("itemStyle").getItemStyle();
  36060. s.fill || (s.fill = t.getColorFromPalette(o, e)),
  36061. n.setItemVisual(i, "style", s);
  36062. for (var l = ["symbol", "symbolSize", "symbolKeepAspect"], u = 0; u < l.length; u++) {
  36063. var h = a.getShallow(l[u], !0);
  36064. null != h && n.setItemVisual(i, l[u], h)
  36065. }
  36066. }
  36067. )),
  36068. n.count() && i.each((function(t) {
  36069. var e = i.getItemModel(t).getShallow("category");
  36070. if (null != e) {
  36071. U(e) && (e = r["ec-" + e]);
  36072. var o = n.getItemVisual(e, "style");
  36073. A(i.ensureUniqueItemVisual(t, "style"), o);
  36074. for (var a = ["symbol", "symbolSize", "symbolKeepAspect"], s = 0; s < a.length; s++)
  36075. i.setItemVisual(t, a[s], n.getItemVisual(e, a[s]))
  36076. }
  36077. }
  36078. ))
  36079. }
  36080. ))
  36081. }
  36082. function hA(t) {
  36083. return t instanceof Array || (t = [t, t]),
  36084. t
  36085. }
  36086. function cA(t) {
  36087. t.eachSeriesByType("graph", (function(t) {
  36088. var e = t.getGraph()
  36089. , n = t.getEdgeData()
  36090. , i = hA(t.get("edgeSymbol"))
  36091. , r = hA(t.get("edgeSymbolSize"));
  36092. n.setVisual("fromSymbol", i && i[0]),
  36093. n.setVisual("toSymbol", i && i[1]),
  36094. n.setVisual("fromSymbolSize", r && r[0]),
  36095. n.setVisual("toSymbolSize", r && r[1]),
  36096. n.setVisual("style", t.getModel("lineStyle").getLineStyle()),
  36097. n.each((function(t) {
  36098. var i = n.getItemModel(t)
  36099. , r = e.getEdgeByIndex(t)
  36100. , o = hA(i.getShallow("symbol", !0))
  36101. , a = hA(i.getShallow("symbolSize", !0))
  36102. , s = i.getModel("lineStyle").getLineStyle()
  36103. , l = n.ensureUniqueItemVisual(t, "style");
  36104. switch (A(l, s),
  36105. l.stroke) {
  36106. case "source":
  36107. var u = r.node1.getVisual("style");
  36108. l.stroke = u && u.fill;
  36109. break;
  36110. case "target":
  36111. u = r.node2.getVisual("style");
  36112. l.stroke = u && u.fill
  36113. }
  36114. o[0] && r.setVisual("fromSymbol", o[0]),
  36115. o[1] && r.setVisual("toSymbol", o[1]),
  36116. a[0] && r.setVisual("fromSymbolSize", a[0]),
  36117. a[1] && r.setVisual("toSymbolSize", a[1])
  36118. }
  36119. ))
  36120. }
  36121. ))
  36122. }
  36123. var pA = "--\x3e"
  36124. , dA = function(t) {
  36125. return t.get("autoCurveness") || null
  36126. }
  36127. , fA = function(t, e) {
  36128. var n = dA(t)
  36129. , i = 20
  36130. , r = [];
  36131. if (j(n))
  36132. i = n;
  36133. else if (Y(n))
  36134. return void (t.__curvenessList = n);
  36135. e > i && (i = e);
  36136. var o = i % 2 ? i + 2 : i + 3;
  36137. r = [];
  36138. for (var a = 0; a < o; a++)
  36139. r.push((a % 2 ? a + 1 : a) / 10 * (a % 2 ? -1 : 1));
  36140. t.__curvenessList = r
  36141. }
  36142. , gA = function(t, e, n) {
  36143. var i = [t.id, t.dataIndex].join(".")
  36144. , r = [e.id, e.dataIndex].join(".");
  36145. return [n.uid, i, r].join(pA)
  36146. }
  36147. , yA = function(t) {
  36148. var e = t.split(pA);
  36149. return [e[0], e[2], e[1]].join(pA)
  36150. }
  36151. , vA = function(t, e) {
  36152. var n = e.__edgeMap;
  36153. return n[t] ? n[t].length : 0
  36154. };
  36155. function mA(t, e, n, i) {
  36156. var r = dA(e)
  36157. , o = Y(r);
  36158. if (!r)
  36159. return null;
  36160. var a = function(t, e) {
  36161. var n = gA(t.node1, t.node2, e);
  36162. return e.__edgeMap[n]
  36163. }(t, e);
  36164. if (!a)
  36165. return null;
  36166. for (var s = -1, l = 0; l < a.length; l++)
  36167. if (a[l] === n) {
  36168. s = l;
  36169. break
  36170. }
  36171. var u = function(t, e) {
  36172. return vA(gA(t.node1, t.node2, e), e) + vA(gA(t.node2, t.node1, e), e)
  36173. }(t, e);
  36174. fA(e, u),
  36175. t.lineStyle = t.lineStyle || {};
  36176. var h = gA(t.node1, t.node2, e)
  36177. , c = e.__curvenessList
  36178. , p = o || u % 2 ? 0 : 1;
  36179. if (a.isForward)
  36180. return c[p + s];
  36181. var d = yA(h)
  36182. , f = vA(d, e)
  36183. , g = c[s + f + p];
  36184. 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]
  36185. }
  36186. function xA(t) {
  36187. var e = t.coordinateSystem;
  36188. if (!e || "view" === e.type) {
  36189. var n = t.getGraph();
  36190. n.eachNode((function(t) {
  36191. var e = t.getModel();
  36192. t.setLayout([+e.get("x"), +e.get("y")])
  36193. }
  36194. )),
  36195. _A(n, t)
  36196. }
  36197. }
  36198. function _A(t, e) {
  36199. t.eachEdge((function(t, n) {
  36200. var i = ot(t.getModel().get(["lineStyle", "curveness"]), -mA(t, e, n, !0), 0)
  36201. , r = Tt(t.node1.getLayout())
  36202. , o = Tt(t.node2.getLayout())
  36203. , a = [r, o];
  36204. +i && a.push([(r[0] + o[0]) / 2 - (r[1] - o[1]) * i, (r[1] + o[1]) / 2 - (o[0] - r[0]) * i]),
  36205. t.setLayout(a)
  36206. }
  36207. ))
  36208. }
  36209. function bA(t, e) {
  36210. t.eachSeriesByType("graph", (function(t) {
  36211. var e = t.get("layout")
  36212. , n = t.coordinateSystem;
  36213. if (n && "view" !== n.type) {
  36214. var i = t.getData()
  36215. , r = [];
  36216. E(n.dimensions, (function(t) {
  36217. r = r.concat(i.mapDimensionsAll(t))
  36218. }
  36219. ));
  36220. for (var o = 0; o < i.count(); o++) {
  36221. for (var a = [], s = !1, l = 0; l < r.length; l++) {
  36222. var u = i.get(r[l], o);
  36223. isNaN(u) || (s = !0),
  36224. a.push(u)
  36225. }
  36226. s ? i.setItemLayout(o, n.dataToPoint(a)) : i.setItemLayout(o, [NaN, NaN])
  36227. }
  36228. _A(i.graph, t)
  36229. } else
  36230. e && "none" !== e || xA(t)
  36231. }
  36232. ))
  36233. }
  36234. function wA(t) {
  36235. var e = t.coordinateSystem;
  36236. if ("view" !== e.type)
  36237. return 1;
  36238. var n = t.option.nodeScaleRatio
  36239. , i = e.scaleX;
  36240. return ((e.getZoom() - 1) * n + 1) / i
  36241. }
  36242. function SA(t) {
  36243. var e = t.getVisual("symbolSize");
  36244. return e instanceof Array && (e = (e[0] + e[1]) / 2),
  36245. +e
  36246. }
  36247. var MA = Math.PI
  36248. , IA = [];
  36249. function TA(t, e, n, i) {
  36250. var r = t.coordinateSystem;
  36251. if (!r || "view" === r.type) {
  36252. var o = r.getBoundingRect()
  36253. , a = t.getData()
  36254. , s = a.graph
  36255. , l = o.width / 2 + o.x
  36256. , u = o.height / 2 + o.y
  36257. , h = Math.min(o.width, o.height) / 2
  36258. , c = a.count();
  36259. if (a.setLayout({
  36260. cx: l,
  36261. cy: u
  36262. }),
  36263. c) {
  36264. if (n) {
  36265. var p = r.pointToData(i)
  36266. , d = p[0]
  36267. , f = p[1]
  36268. , g = [d - l, f - u];
  36269. Et(g, g),
  36270. Nt(g, g, h),
  36271. n.setLayout([l + g[0], u + g[1]], !0),
  36272. DA(n, t.get(["circular", "rotateLabel"]), l, u)
  36273. }
  36274. CA[e](t, s, a, h, l, u, c),
  36275. s.eachEdge((function(e, n) {
  36276. var i, r = ot(e.getModel().get(["lineStyle", "curveness"]), mA(e, t, n), 0), o = Tt(e.node1.getLayout()), a = Tt(e.node2.getLayout()), s = (o[0] + a[0]) / 2, h = (o[1] + a[1]) / 2;
  36277. +r && (i = [l * (r *= 3) + s * (1 - r), u * r + h * (1 - r)]),
  36278. e.setLayout([o, a, i])
  36279. }
  36280. ))
  36281. }
  36282. }
  36283. }
  36284. var CA = {
  36285. value: function(t, e, n, i, r, o, a) {
  36286. var s = 0
  36287. , l = n.getSum("value")
  36288. , u = 2 * Math.PI / (l || a);
  36289. e.eachNode((function(t) {
  36290. var e = t.getValue("value")
  36291. , n = u * (l ? e : 1) / 2;
  36292. s += n,
  36293. t.setLayout([i * Math.cos(s) + r, i * Math.sin(s) + o]),
  36294. s += n
  36295. }
  36296. ))
  36297. },
  36298. symbolSize: function(t, e, n, i, r, o, a) {
  36299. var s = 0;
  36300. IA.length = a;
  36301. var l = wA(t);
  36302. e.eachNode((function(t) {
  36303. var e = SA(t);
  36304. isNaN(e) && (e = 2),
  36305. e < 0 && (e = 0),
  36306. e *= l;
  36307. var n = Math.asin(e / 2 / i);
  36308. isNaN(n) && (n = MA / 2),
  36309. IA[t.dataIndex] = n,
  36310. s += 2 * n
  36311. }
  36312. ));
  36313. var u = (2 * MA - s) / a / 2
  36314. , h = 0;
  36315. e.eachNode((function(t) {
  36316. var e = u + IA[t.dataIndex];
  36317. h += e,
  36318. (!t.getLayout() || !t.getLayout().fixed) && t.setLayout([i * Math.cos(h) + r, i * Math.sin(h) + o]),
  36319. h += e
  36320. }
  36321. ))
  36322. }
  36323. };
  36324. function DA(t, e, n, i) {
  36325. var r = t.getGraphicEl();
  36326. if (r) {
  36327. var o = t.getModel().get(["label", "rotate"]) || 0
  36328. , a = r.getSymbolPath();
  36329. if (e) {
  36330. var s = t.getLayout()
  36331. , l = Math.atan2(s[1] - i, s[0] - n);
  36332. l < 0 && (l = 2 * Math.PI + l);
  36333. var u = s[0] < n;
  36334. u && (l -= Math.PI);
  36335. var h = u ? "left" : "right";
  36336. a.setTextConfig({
  36337. rotation: -l,
  36338. position: h,
  36339. origin: "center"
  36340. });
  36341. var c = a.ensureState("emphasis");
  36342. A(c.textConfig || (c.textConfig = {}), {
  36343. position: h
  36344. })
  36345. } else
  36346. a.setTextConfig({
  36347. rotation: o *= Math.PI / 180
  36348. })
  36349. }
  36350. }
  36351. function AA(t) {
  36352. t.eachSeriesByType("graph", (function(t) {
  36353. "circular" === t.get("layout") && TA(t, "symbolSize")
  36354. }
  36355. ))
  36356. }
  36357. var kA = At;
  36358. function LA(t) {
  36359. t.eachSeriesByType("graph", (function(t) {
  36360. var e = t.coordinateSystem;
  36361. if (!e || "view" === e.type)
  36362. if ("force" === t.get("layout")) {
  36363. var n = t.preservedPoints || {}
  36364. , i = t.getGraph()
  36365. , r = i.data
  36366. , o = i.edgeData
  36367. , a = t.getModel("force")
  36368. , s = a.get("initLayout");
  36369. t.preservedPoints ? r.each((function(t) {
  36370. var e = r.getId(t);
  36371. r.setItemLayout(t, n[e] || [NaN, NaN])
  36372. }
  36373. )) : s && "none" !== s ? "circular" === s && TA(t, "value") : xA(t);
  36374. var l = r.getDataExtent("value")
  36375. , u = o.getDataExtent("value")
  36376. , h = a.get("repulsion")
  36377. , c = a.get("edgeLength")
  36378. , p = Y(h) ? h : [h, h]
  36379. , d = Y(c) ? c : [c, c];
  36380. d = [d[1], d[0]];
  36381. var f = r.mapArray("value", (function(t, e) {
  36382. var n = r.getItemLayout(e)
  36383. , i = Kr(t, l, p);
  36384. return isNaN(i) && (i = (p[0] + p[1]) / 2),
  36385. {
  36386. w: i,
  36387. rep: i,
  36388. fixed: r.getItemModel(e).get("fixed"),
  36389. p: !n || isNaN(n[0]) || isNaN(n[1]) ? null : n
  36390. }
  36391. }
  36392. ))
  36393. , g = o.mapArray("value", (function(e, n) {
  36394. var r = i.getEdgeByIndex(n)
  36395. , o = Kr(e, u, d);
  36396. isNaN(o) && (o = (d[0] + d[1]) / 2);
  36397. var a = r.getModel()
  36398. , s = ot(r.getModel().get(["lineStyle", "curveness"]), -mA(r, t, n, !0), 0);
  36399. return {
  36400. n1: f[r.node1.dataIndex],
  36401. n2: f[r.node2.dataIndex],
  36402. d: o,
  36403. curveness: s,
  36404. ignoreForceLayout: a.get("ignoreForceLayout")
  36405. }
  36406. }
  36407. ))
  36408. , y = e.getBoundingRect()
  36409. , v = function(t, e, n) {
  36410. 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++) {
  36411. var c = i[h];
  36412. c.p || (c.p = Mt(a * (Math.random() - .5) + l[0], s * (Math.random() - .5) + l[1])),
  36413. c.pp = Tt(c.p),
  36414. c.edges = null
  36415. }
  36416. var p, d, f = null == n.friction ? .6 : n.friction, g = f;
  36417. return {
  36418. warmUp: function() {
  36419. g = .8 * f
  36420. },
  36421. setFixed: function(t) {
  36422. i[t].fixed = !0
  36423. },
  36424. setUnfixed: function(t) {
  36425. i[t].fixed = !1
  36426. },
  36427. beforeStep: function(t) {
  36428. p = t
  36429. },
  36430. afterStep: function(t) {
  36431. d = t
  36432. },
  36433. step: function(t) {
  36434. p && p(i, r);
  36435. for (var e = [], n = i.length, o = 0; o < r.length; o++) {
  36436. var a = r[o];
  36437. if (!a.ignoreForceLayout) {
  36438. var s = a.n1;
  36439. kt(e, (y = a.n2).p, s.p);
  36440. var h = Lt(e) - a.d
  36441. , c = y.w / (s.w + y.w);
  36442. isNaN(c) && (c = 0),
  36443. Et(e, e),
  36444. !s.fixed && kA(s.p, s.p, e, c * h * g),
  36445. !y.fixed && kA(y.p, y.p, e, -(1 - c) * h * g)
  36446. }
  36447. }
  36448. for (o = 0; o < n; o++)
  36449. (x = i[o]).fixed || (kt(e, l, x.p),
  36450. kA(x.p, x.p, e, u * g));
  36451. for (o = 0; o < n; o++) {
  36452. s = i[o];
  36453. for (var f = o + 1; f < n; f++) {
  36454. var y;
  36455. kt(e, (y = i[f]).p, s.p),
  36456. 0 === (h = Lt(e)) && (Ct(e, Math.random() - .5, Math.random() - .5),
  36457. h = 1);
  36458. var v = (s.rep + y.rep) / h / h;
  36459. !s.fixed && kA(s.pp, s.pp, e, v),
  36460. !y.fixed && kA(y.pp, y.pp, e, -v)
  36461. }
  36462. }
  36463. var m = [];
  36464. for (o = 0; o < n; o++) {
  36465. var x;
  36466. (x = i[o]).fixed || (kt(m, x.p, x.pp),
  36467. kA(x.p, x.p, m, g),
  36468. It(x.pp, x.p))
  36469. }
  36470. var _ = (g *= .992) < .01;
  36471. d && d(i, r, _),
  36472. t && t(_)
  36473. }
  36474. }
  36475. }(f, g, {
  36476. rect: y,
  36477. gravity: a.get("gravity"),
  36478. friction: a.get("friction")
  36479. });
  36480. v.beforeStep((function(t, e) {
  36481. for (var n = 0, r = t.length; n < r; n++)
  36482. t[n].fixed && It(t[n].p, i.getNodeByIndex(n).getLayout())
  36483. }
  36484. )),
  36485. v.afterStep((function(t, e, o) {
  36486. for (var a = 0, s = t.length; a < s; a++)
  36487. t[a].fixed || i.getNodeByIndex(a).setLayout(t[a].p),
  36488. n[r.getId(a)] = t[a].p;
  36489. for (a = 0,
  36490. s = e.length; a < s; a++) {
  36491. var l = e[a]
  36492. , u = i.getEdgeByIndex(a)
  36493. , h = l.n1.p
  36494. , c = l.n2.p
  36495. , p = u.getLayout();
  36496. (p = p ? p.slice() : [])[0] = p[0] || [],
  36497. p[1] = p[1] || [],
  36498. It(p[0], h),
  36499. It(p[1], c),
  36500. +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]),
  36501. u.setLayout(p)
  36502. }
  36503. }
  36504. )),
  36505. t.forceLayout = v,
  36506. t.preservedPoints = n,
  36507. v.step()
  36508. } else
  36509. t.forceLayout = null
  36510. }
  36511. ))
  36512. }
  36513. function PA(t, e) {
  36514. var n = [];
  36515. return t.eachSeriesByType("graph", (function(t) {
  36516. var i = t.get("coordinateSystem");
  36517. if (!i || "view" === i) {
  36518. var r = t.getData()
  36519. , o = []
  36520. , a = [];
  36521. Ba(r.mapArray((function(t) {
  36522. var e = r.getItemModel(t);
  36523. return [+e.get("x"), +e.get("y")]
  36524. }
  36525. )), o, a),
  36526. a[0] - o[0] == 0 && (a[0] += 1,
  36527. o[0] -= 1),
  36528. a[1] - o[1] == 0 && (a[1] += 1,
  36529. o[1] -= 1);
  36530. var s = (a[0] - o[0]) / (a[1] - o[1])
  36531. , l = function(t, e, n) {
  36532. return kp(A(t.getBoxLayoutParams(), {
  36533. aspect: n
  36534. }), {
  36535. width: e.getWidth(),
  36536. height: e.getHeight()
  36537. })
  36538. }(t, e, s);
  36539. isNaN(s) && (o = [l.x, l.y],
  36540. a = [l.x + l.width, l.y + l.height]);
  36541. var u = a[0] - o[0]
  36542. , h = a[1] - o[1]
  36543. , c = l.width
  36544. , p = l.height
  36545. , d = t.coordinateSystem = new dC;
  36546. d.zoomLimit = t.get("scaleLimit"),
  36547. d.setBoundingRect(o[0], o[1], u, h),
  36548. d.setViewRect(l.x, l.y, c, p),
  36549. d.setCenter(t.get("center"), e),
  36550. d.setZoom(t.get("zoom")),
  36551. n.push(d)
  36552. }
  36553. }
  36554. )),
  36555. n
  36556. }
  36557. var OA = Ku.prototype
  36558. , RA = th.prototype
  36559. , NA = function() {
  36560. this.x1 = 0,
  36561. this.y1 = 0,
  36562. this.x2 = 0,
  36563. this.y2 = 0,
  36564. this.percent = 1
  36565. };
  36566. !function(t) {
  36567. function e() {
  36568. return null !== t && t.apply(this, arguments) || this
  36569. }
  36570. n(e, t)
  36571. }(NA);
  36572. function EA(t) {
  36573. return isNaN(+t.cpx1) || isNaN(+t.cpy1)
  36574. }
  36575. var zA = function(t) {
  36576. function e(e) {
  36577. var n = t.call(this, e) || this;
  36578. return n.type = "ec-line",
  36579. n
  36580. }
  36581. return n(e, t),
  36582. e.prototype.getDefaultStyle = function() {
  36583. return {
  36584. stroke: "#000",
  36585. fill: null
  36586. }
  36587. }
  36588. ,
  36589. e.prototype.getDefaultShape = function() {
  36590. return new NA
  36591. }
  36592. ,
  36593. e.prototype.buildPath = function(t, e) {
  36594. EA(e) ? OA.buildPath.call(this, t, e) : RA.buildPath.call(this, t, e)
  36595. }
  36596. ,
  36597. e.prototype.pointAt = function(t) {
  36598. return EA(this.shape) ? OA.pointAt.call(this, t) : RA.pointAt.call(this, t)
  36599. }
  36600. ,
  36601. e.prototype.tangentAt = function(t) {
  36602. var e = this.shape
  36603. , n = EA(e) ? [e.x2 - e.x1, e.y2 - e.y1] : RA.tangentAt.call(this, t);
  36604. return Et(n, n)
  36605. }
  36606. ,
  36607. e
  36608. }(ks)
  36609. , VA = ["fromSymbol", "toSymbol"];
  36610. function BA(t) {
  36611. return "_" + t + "Type"
  36612. }
  36613. function FA(t, e, n) {
  36614. var i = e.getItemVisual(n, t);
  36615. if (!i || "none" === i)
  36616. return i;
  36617. var r = e.getItemVisual(n, t + "Size")
  36618. , o = e.getItemVisual(n, t + "Rotate")
  36619. , a = e.getItemVisual(n, t + "Offset")
  36620. , s = e.getItemVisual(n, t + "KeepAspect")
  36621. , l = Uy(r);
  36622. return i + l + Zy(a || 0, l) + (o || "") + (s || "")
  36623. }
  36624. function GA(t, e, n) {
  36625. var i = e.getItemVisual(n, t);
  36626. if (i && "none" !== i) {
  36627. var r = e.getItemVisual(n, t + "Size")
  36628. , o = e.getItemVisual(n, t + "Rotate")
  36629. , a = e.getItemVisual(n, t + "Offset")
  36630. , s = e.getItemVisual(n, t + "KeepAspect")
  36631. , l = Uy(r)
  36632. , u = Zy(a || 0, l)
  36633. , h = Xy(i, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  36634. return h.__specifiedRotation = null == o || isNaN(o) ? void 0 : +o * Math.PI / 180 || 0,
  36635. h.name = t,
  36636. h
  36637. }
  36638. }
  36639. function WA(t, e) {
  36640. t.x1 = e[0][0],
  36641. t.y1 = e[0][1],
  36642. t.x2 = e[1][0],
  36643. t.y2 = e[1][1],
  36644. t.percent = 1;
  36645. var n = e[2];
  36646. n ? (t.cpx1 = n[0],
  36647. t.cpy1 = n[1]) : (t.cpx1 = NaN,
  36648. t.cpy1 = NaN)
  36649. }
  36650. var HA = function(t) {
  36651. function e(e, n, i) {
  36652. var r = t.call(this) || this;
  36653. return r._createLine(e, n, i),
  36654. r
  36655. }
  36656. return n(e, t),
  36657. e.prototype._createLine = function(t, e, n) {
  36658. var i = t.hostModel
  36659. , r = function(t) {
  36660. var e = new zA({
  36661. name: "line",
  36662. subPixelOptimize: !0
  36663. });
  36664. return WA(e.shape, t),
  36665. e
  36666. }(t.getItemLayout(e));
  36667. r.shape.percent = 0,
  36668. mh(r, {
  36669. shape: {
  36670. percent: 1
  36671. }
  36672. }, i, e),
  36673. this.add(r),
  36674. E(VA, (function(n) {
  36675. var i = GA(n, t, e);
  36676. this.add(i),
  36677. this[BA(n)] = FA(n, t, e)
  36678. }
  36679. ), this),
  36680. this._updateCommonStl(t, e, n)
  36681. }
  36682. ,
  36683. e.prototype.updateData = function(t, e, n) {
  36684. var i = t.hostModel
  36685. , r = this.childOfName("line")
  36686. , o = t.getItemLayout(e)
  36687. , a = {
  36688. shape: {}
  36689. };
  36690. WA(a.shape, o),
  36691. vh(r, a, i, e),
  36692. E(VA, (function(n) {
  36693. var i = FA(n, t, e)
  36694. , r = BA(n);
  36695. if (this[r] !== i) {
  36696. this.remove(this.childOfName(n));
  36697. var o = GA(n, t, e);
  36698. this.add(o)
  36699. }
  36700. this[r] = i
  36701. }
  36702. ), this),
  36703. this._updateCommonStl(t, e, n)
  36704. }
  36705. ,
  36706. e.prototype.getLinePath = function() {
  36707. return this.childAt(0)
  36708. }
  36709. ,
  36710. e.prototype._updateCommonStl = function(t, e, n) {
  36711. var i = t.hostModel
  36712. , r = this.childOfName("line")
  36713. , o = n && n.emphasisLineStyle
  36714. , a = n && n.blurLineStyle
  36715. , s = n && n.selectLineStyle
  36716. , l = n && n.labelStatesModels
  36717. , u = n && n.emphasisDisabled
  36718. , h = n && n.focus
  36719. , c = n && n.blurScope;
  36720. if (!n || t.hasItemOption) {
  36721. var p = t.getItemModel(e)
  36722. , d = p.getModel("emphasis");
  36723. o = d.getModel("lineStyle").getLineStyle(),
  36724. a = p.getModel(["blur", "lineStyle"]).getLineStyle(),
  36725. s = p.getModel(["select", "lineStyle"]).getLineStyle(),
  36726. u = d.get("disabled"),
  36727. h = d.get("focus"),
  36728. c = d.get("blurScope"),
  36729. l = rc(p)
  36730. }
  36731. var f = t.getItemVisual(e, "style")
  36732. , g = f.stroke;
  36733. r.useStyle(f),
  36734. r.style.fill = null,
  36735. r.style.strokeNoScale = !0,
  36736. r.ensureState("emphasis").style = o,
  36737. r.ensureState("blur").style = a,
  36738. r.ensureState("select").style = s,
  36739. E(VA, (function(t) {
  36740. var e = this.childOfName(t);
  36741. if (e) {
  36742. e.setColor(g),
  36743. e.style.opacity = f.opacity;
  36744. for (var n = 0; n < hl.length; n++) {
  36745. var i = hl[n]
  36746. , o = r.getState(i);
  36747. if (o) {
  36748. var a = o.style || {}
  36749. , s = e.ensureState(i)
  36750. , l = s.style || (s.style = {});
  36751. null != a.stroke && (l[e.__isEmptyBrush ? "stroke" : "fill"] = a.stroke),
  36752. null != a.opacity && (l.opacity = a.opacity)
  36753. }
  36754. }
  36755. e.markRedraw()
  36756. }
  36757. }
  36758. ), this);
  36759. var y = i.getRawValue(e);
  36760. ic(this, l, {
  36761. labelDataIndex: e,
  36762. labelFetcher: {
  36763. getFormattedLabel: function(e, n) {
  36764. return i.getFormattedLabel(e, n, t.dataType)
  36765. }
  36766. },
  36767. inheritColor: g || "#000",
  36768. defaultOpacity: f.opacity,
  36769. defaultText: (null == y ? t.getName(e) : isFinite(y) ? Jr(y) : y) + ""
  36770. });
  36771. var v = this.getTextContent();
  36772. if (v) {
  36773. var m = l.normal;
  36774. v.__align = v.style.align,
  36775. v.__verticalAlign = v.style.verticalAlign,
  36776. v.__position = m.get("position") || "middle";
  36777. var x = m.get("distance");
  36778. Y(x) || (x = [x, x]),
  36779. v.__labelDistance = x
  36780. }
  36781. this.setTextConfig({
  36782. position: null,
  36783. local: !0,
  36784. inside: !1
  36785. }),
  36786. Zl(this, h, c, u)
  36787. }
  36788. ,
  36789. e.prototype.highlight = function() {
  36790. Ol(this)
  36791. }
  36792. ,
  36793. e.prototype.downplay = function() {
  36794. Rl(this)
  36795. }
  36796. ,
  36797. e.prototype.updateLayout = function(t, e) {
  36798. this.setLinePoints(t.getItemLayout(e))
  36799. }
  36800. ,
  36801. e.prototype.setLinePoints = function(t) {
  36802. var e = this.childOfName("line");
  36803. WA(e.shape, t),
  36804. e.dirty()
  36805. }
  36806. ,
  36807. e.prototype.beforeUpdate = function() {
  36808. var t = this
  36809. , e = t.childOfName("fromSymbol")
  36810. , n = t.childOfName("toSymbol")
  36811. , i = t.getTextContent();
  36812. if (e || n || i && !i.ignore) {
  36813. for (var r = 1, o = this.parent; o; )
  36814. o.scaleX && (r /= o.scaleX),
  36815. o = o.parent;
  36816. var a = t.childOfName("line");
  36817. if (this.__dirty || a.__dirty) {
  36818. var s = a.shape.percent
  36819. , l = a.pointAt(0)
  36820. , u = a.pointAt(s)
  36821. , h = kt([], u, l);
  36822. if (Et(h, h),
  36823. e && (e.setPosition(l),
  36824. S(e, 0),
  36825. e.scaleX = e.scaleY = r * s,
  36826. e.markRedraw()),
  36827. n && (n.setPosition(u),
  36828. S(n, 1),
  36829. n.scaleX = n.scaleY = r * s,
  36830. n.markRedraw()),
  36831. i && !i.ignore) {
  36832. i.x = i.y = 0,
  36833. i.originX = i.originY = 0;
  36834. var c = void 0
  36835. , p = void 0
  36836. , d = i.__labelDistance
  36837. , f = d[0] * r
  36838. , g = d[1] * r
  36839. , y = s / 2
  36840. , v = a.tangentAt(y)
  36841. , m = [v[1], -v[0]]
  36842. , x = a.pointAt(y);
  36843. m[1] > 0 && (m[0] = -m[0],
  36844. m[1] = -m[1]);
  36845. var _ = v[0] < 0 ? -1 : 1;
  36846. if ("start" !== i.__position && "end" !== i.__position) {
  36847. var b = -Math.atan2(v[1], v[0]);
  36848. u[0] < l[0] && (b = Math.PI + b),
  36849. i.rotation = b
  36850. }
  36851. var w = void 0;
  36852. switch (i.__position) {
  36853. case "insideStartTop":
  36854. case "insideMiddleTop":
  36855. case "insideEndTop":
  36856. case "middle":
  36857. w = -g,
  36858. p = "bottom";
  36859. break;
  36860. case "insideStartBottom":
  36861. case "insideMiddleBottom":
  36862. case "insideEndBottom":
  36863. w = g,
  36864. p = "top";
  36865. break;
  36866. default:
  36867. w = 0,
  36868. p = "middle"
  36869. }
  36870. switch (i.__position) {
  36871. case "end":
  36872. i.x = h[0] * f + u[0],
  36873. i.y = h[1] * g + u[1],
  36874. c = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center",
  36875. p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";
  36876. break;
  36877. case "start":
  36878. i.x = -h[0] * f + l[0],
  36879. i.y = -h[1] * g + l[1],
  36880. c = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center",
  36881. p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
  36882. break;
  36883. case "insideStartTop":
  36884. case "insideStart":
  36885. case "insideStartBottom":
  36886. i.x = f * _ + l[0],
  36887. i.y = l[1] + w,
  36888. c = v[0] < 0 ? "right" : "left",
  36889. i.originX = -f * _,
  36890. i.originY = -w;
  36891. break;
  36892. case "insideMiddleTop":
  36893. case "insideMiddle":
  36894. case "insideMiddleBottom":
  36895. case "middle":
  36896. i.x = x[0],
  36897. i.y = x[1] + w,
  36898. c = "center",
  36899. i.originY = -w;
  36900. break;
  36901. case "insideEndTop":
  36902. case "insideEnd":
  36903. case "insideEndBottom":
  36904. i.x = -f * _ + u[0],
  36905. i.y = u[1] + w,
  36906. c = v[0] >= 0 ? "right" : "left",
  36907. i.originX = f * _,
  36908. i.originY = -w
  36909. }
  36910. i.scaleX = i.scaleY = r,
  36911. i.setStyle({
  36912. verticalAlign: i.__verticalAlign || p,
  36913. align: i.__align || c
  36914. })
  36915. }
  36916. }
  36917. }
  36918. function S(t, e) {
  36919. var n = t.__specifiedRotation;
  36920. if (null == n) {
  36921. var i = a.tangentAt(e);
  36922. t.attr("rotation", (1 === e ? -1 : 1) * Math.PI / 2 - Math.atan2(i[1], i[0]))
  36923. } else
  36924. t.attr("rotation", n)
  36925. }
  36926. }
  36927. ,
  36928. e
  36929. }(Br)
  36930. , YA = function() {
  36931. function t(t) {
  36932. this.group = new Br,
  36933. this._LineCtor = t || HA
  36934. }
  36935. return t.prototype.updateData = function(t) {
  36936. var e = this;
  36937. this._progressiveEls = null;
  36938. var n = this
  36939. , i = n.group
  36940. , r = n._lineData;
  36941. n._lineData = t,
  36942. r || i.removeAll();
  36943. var o = XA(t);
  36944. t.diff(r).add((function(n) {
  36945. e._doAdd(t, n, o)
  36946. }
  36947. )).update((function(n, i) {
  36948. e._doUpdate(r, t, i, n, o)
  36949. }
  36950. )).remove((function(t) {
  36951. i.remove(r.getItemGraphicEl(t))
  36952. }
  36953. )).execute()
  36954. }
  36955. ,
  36956. t.prototype.updateLayout = function() {
  36957. var t = this._lineData;
  36958. t && t.eachItemGraphicEl((function(e, n) {
  36959. e.updateLayout(t, n)
  36960. }
  36961. ), this)
  36962. }
  36963. ,
  36964. t.prototype.incrementalPrepareUpdate = function(t) {
  36965. this._seriesScope = XA(t),
  36966. this._lineData = null,
  36967. this.group.removeAll()
  36968. }
  36969. ,
  36970. t.prototype.incrementalUpdate = function(t, e) {
  36971. function n(t) {
  36972. t.isGroup || function(t) {
  36973. return t.animators && t.animators.length > 0
  36974. }(t) || (t.incremental = !0,
  36975. t.ensureState("emphasis").hoverLayer = !0)
  36976. }
  36977. this._progressiveEls = [];
  36978. for (var i = t.start; i < t.end; i++) {
  36979. if (ZA(e.getItemLayout(i))) {
  36980. var r = new this._LineCtor(e,i,this._seriesScope);
  36981. r.traverse(n),
  36982. this.group.add(r),
  36983. e.setItemGraphicEl(i, r),
  36984. this._progressiveEls.push(r)
  36985. }
  36986. }
  36987. }
  36988. ,
  36989. t.prototype.remove = function() {
  36990. this.group.removeAll()
  36991. }
  36992. ,
  36993. t.prototype.eachRendered = function(t) {
  36994. Jh(this._progressiveEls || this.group, t)
  36995. }
  36996. ,
  36997. t.prototype._doAdd = function(t, e, n) {
  36998. if (ZA(t.getItemLayout(e))) {
  36999. var i = new this._LineCtor(t,e,n);
  37000. t.setItemGraphicEl(e, i),
  37001. this.group.add(i)
  37002. }
  37003. }
  37004. ,
  37005. t.prototype._doUpdate = function(t, e, n, i, r) {
  37006. var o = t.getItemGraphicEl(n);
  37007. ZA(e.getItemLayout(i)) ? (o ? o.updateData(e, i, r) : o = new this._LineCtor(e,i,r),
  37008. e.setItemGraphicEl(i, o),
  37009. this.group.add(o)) : this.group.remove(o)
  37010. }
  37011. ,
  37012. t
  37013. }();
  37014. function XA(t) {
  37015. var e = t.hostModel
  37016. , n = e.getModel("emphasis");
  37017. return {
  37018. lineStyle: e.getModel("lineStyle").getLineStyle(),
  37019. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  37020. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  37021. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  37022. emphasisDisabled: n.get("disabled"),
  37023. blurScope: n.get("blurScope"),
  37024. focus: n.get("focus"),
  37025. labelStatesModels: rc(e)
  37026. }
  37027. }
  37028. function UA(t) {
  37029. return isNaN(t[0]) || isNaN(t[1])
  37030. }
  37031. function ZA(t) {
  37032. return t && !UA(t[0]) && !UA(t[1])
  37033. }
  37034. var jA = []
  37035. , qA = []
  37036. , KA = []
  37037. , $A = In
  37038. , JA = Ft
  37039. , QA = Math.abs;
  37040. function tk(t, e, n) {
  37041. 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) {
  37042. jA[0] = $A(r[0], o[0], a[0], h),
  37043. jA[1] = $A(r[1], o[1], a[1], h),
  37044. (d = QA(JA(jA, e) - l)) < s && (s = d,
  37045. i = h)
  37046. }
  37047. for (var c = 0; c < 32; c++) {
  37048. var p = i + u;
  37049. qA[0] = $A(r[0], o[0], a[0], i),
  37050. qA[1] = $A(r[1], o[1], a[1], i),
  37051. KA[0] = $A(r[0], o[0], a[0], p),
  37052. KA[1] = $A(r[1], o[1], a[1], p);
  37053. var d = JA(qA, e) - l;
  37054. if (QA(d) < .01)
  37055. break;
  37056. var f = JA(KA, e) - l;
  37057. u /= 2,
  37058. d < 0 ? f >= 0 ? i += u : i -= u : f >= 0 ? i -= u : i += u
  37059. }
  37060. return i
  37061. }
  37062. function ek(t, e) {
  37063. var n = []
  37064. , i = Dn
  37065. , r = [[], [], []]
  37066. , o = [[], []]
  37067. , a = [];
  37068. e /= 2,
  37069. t.eachEdge((function(t, s) {
  37070. var l = t.getLayout()
  37071. , u = t.getVisual("fromSymbol")
  37072. , h = t.getVisual("toSymbol");
  37073. l.__original || (l.__original = [Tt(l[0]), Tt(l[1])],
  37074. l[2] && l.__original.push(Tt(l[2])));
  37075. var c = l.__original;
  37076. if (null != l[2]) {
  37077. if (It(r[0], c[0]),
  37078. It(r[1], c[2]),
  37079. It(r[2], c[1]),
  37080. u && "none" !== u) {
  37081. var p = SA(t.node1)
  37082. , d = tk(r, c[0], p * e);
  37083. i(r[0][0], r[1][0], r[2][0], d, n),
  37084. r[0][0] = n[3],
  37085. r[1][0] = n[4],
  37086. i(r[0][1], r[1][1], r[2][1], d, n),
  37087. r[0][1] = n[3],
  37088. r[1][1] = n[4]
  37089. }
  37090. if (h && "none" !== h) {
  37091. p = SA(t.node2),
  37092. d = tk(r, c[1], p * e);
  37093. i(r[0][0], r[1][0], r[2][0], d, n),
  37094. r[1][0] = n[1],
  37095. r[2][0] = n[2],
  37096. i(r[0][1], r[1][1], r[2][1], d, n),
  37097. r[1][1] = n[1],
  37098. r[2][1] = n[2]
  37099. }
  37100. It(l[0], r[0]),
  37101. It(l[1], r[2]),
  37102. It(l[2], r[1])
  37103. } else {
  37104. if (It(o[0], c[0]),
  37105. It(o[1], c[1]),
  37106. kt(a, o[1], o[0]),
  37107. Et(a, a),
  37108. u && "none" !== u) {
  37109. p = SA(t.node1);
  37110. At(o[0], o[0], a, p * e)
  37111. }
  37112. if (h && "none" !== h) {
  37113. p = SA(t.node2);
  37114. At(o[1], o[1], a, -p * e)
  37115. }
  37116. It(l[0], o[0]),
  37117. It(l[1], o[1])
  37118. }
  37119. }
  37120. ))
  37121. }
  37122. function nk(t) {
  37123. return "view" === t.type
  37124. }
  37125. var ik = function(t) {
  37126. function e() {
  37127. var n = null !== t && t.apply(this, arguments) || this;
  37128. return n.type = e.type,
  37129. n
  37130. }
  37131. return n(e, t),
  37132. e.prototype.init = function(t, e) {
  37133. var n = new xS
  37134. , i = new YA
  37135. , r = this.group;
  37136. this._controller = new nT(e.getZr()),
  37137. this._controllerHost = {
  37138. target: r
  37139. },
  37140. r.add(n.group),
  37141. r.add(i.group),
  37142. this._symbolDraw = n,
  37143. this._lineDraw = i,
  37144. this._firstRender = !0
  37145. }
  37146. ,
  37147. e.prototype.render = function(t, e, n) {
  37148. var i = this
  37149. , r = t.coordinateSystem;
  37150. this._model = t;
  37151. var o = this._symbolDraw
  37152. , a = this._lineDraw
  37153. , s = this.group;
  37154. if (nk(r)) {
  37155. var l = {
  37156. x: r.x,
  37157. y: r.y,
  37158. scaleX: r.scaleX,
  37159. scaleY: r.scaleY
  37160. };
  37161. this._firstRender ? s.attr(l) : vh(s, l, t)
  37162. }
  37163. ek(t.getGraph(), wA(t));
  37164. var u = t.getData();
  37165. o.updateData(u);
  37166. var h = t.getEdgeData();
  37167. a.updateData(h),
  37168. this._updateNodeAndLinkScale(),
  37169. this._updateController(t, e, n),
  37170. clearTimeout(this._layoutTimeout);
  37171. var c = t.forceLayout
  37172. , p = t.get(["force", "layoutAnimation"]);
  37173. c && this._startForceLayoutIteration(c, p);
  37174. var d = t.get("layout");
  37175. u.graph.eachNode((function(e) {
  37176. var n = e.dataIndex
  37177. , r = e.getGraphicEl()
  37178. , o = e.getModel();
  37179. if (r) {
  37180. r.off("drag").off("dragend");
  37181. var a = o.get("draggable");
  37182. a && r.on("drag", (function(o) {
  37183. switch (d) {
  37184. case "force":
  37185. c.warmUp(),
  37186. !i._layouting && i._startForceLayoutIteration(c, p),
  37187. c.setFixed(n),
  37188. u.setItemLayout(n, [r.x, r.y]);
  37189. break;
  37190. case "circular":
  37191. u.setItemLayout(n, [r.x, r.y]),
  37192. e.setLayout({
  37193. fixed: !0
  37194. }, !0),
  37195. TA(t, "symbolSize", e, [o.offsetX, o.offsetY]),
  37196. i.updateLayout(t);
  37197. break;
  37198. default:
  37199. u.setItemLayout(n, [r.x, r.y]),
  37200. _A(t.getGraph(), t),
  37201. i.updateLayout(t)
  37202. }
  37203. }
  37204. )).on("dragend", (function() {
  37205. c && c.setUnfixed(n)
  37206. }
  37207. )),
  37208. r.setDraggable(a, !!o.get("cursor")),
  37209. "adjacency" === o.get(["emphasis", "focus"]) && (rl(r).focus = e.getAdjacentDataIndices())
  37210. }
  37211. }
  37212. )),
  37213. u.graph.eachEdge((function(t) {
  37214. var e = t.getGraphicEl()
  37215. , n = t.getModel().get(["emphasis", "focus"]);
  37216. e && "adjacency" === n && (rl(e).focus = {
  37217. edge: [t.dataIndex],
  37218. node: [t.node1.dataIndex, t.node2.dataIndex]
  37219. })
  37220. }
  37221. ));
  37222. var f = "circular" === t.get("layout") && t.get(["circular", "rotateLabel"])
  37223. , g = u.getLayout("cx")
  37224. , y = u.getLayout("cy");
  37225. u.graph.eachNode((function(t) {
  37226. DA(t, f, g, y)
  37227. }
  37228. )),
  37229. this._firstRender = !1
  37230. }
  37231. ,
  37232. e.prototype.dispose = function() {
  37233. this.remove(),
  37234. this._controller && this._controller.dispose(),
  37235. this._controllerHost = null
  37236. }
  37237. ,
  37238. e.prototype._startForceLayoutIteration = function(t, e) {
  37239. var n = this;
  37240. !function i() {
  37241. t.step((function(t) {
  37242. n.updateLayout(n._model),
  37243. (n._layouting = !t) && (e ? n._layoutTimeout = setTimeout(i, 16) : i())
  37244. }
  37245. ))
  37246. }()
  37247. }
  37248. ,
  37249. e.prototype._updateController = function(t, e, n) {
  37250. var i = this
  37251. , r = this._controller
  37252. , o = this._controllerHost
  37253. , a = this.group;
  37254. r.setPointerChecker((function(e, i, r) {
  37255. var o = a.getBoundingRect();
  37256. return o.applyTransform(a.transform),
  37257. o.contain(i, r) && !hT(e, n, t)
  37258. }
  37259. )),
  37260. nk(t.coordinateSystem) ? (r.enable(t.get("roam")),
  37261. o.zoomLimit = t.get("scaleLimit"),
  37262. o.zoom = t.coordinateSystem.getZoom(),
  37263. r.off("pan").off("zoom").on("pan", (function(e) {
  37264. aT(o, e.dx, e.dy),
  37265. n.dispatchAction({
  37266. seriesId: t.id,
  37267. type: "graphRoam",
  37268. dx: e.dx,
  37269. dy: e.dy
  37270. })
  37271. }
  37272. )).on("zoom", (function(e) {
  37273. sT(o, e.scale, e.originX, e.originY),
  37274. n.dispatchAction({
  37275. seriesId: t.id,
  37276. type: "graphRoam",
  37277. zoom: e.scale,
  37278. originX: e.originX,
  37279. originY: e.originY
  37280. }),
  37281. i._updateNodeAndLinkScale(),
  37282. ek(t.getGraph(), wA(t)),
  37283. i._lineDraw.updateLayout(),
  37284. n.updateLabelLayout()
  37285. }
  37286. ))) : r.disable()
  37287. }
  37288. ,
  37289. e.prototype._updateNodeAndLinkScale = function() {
  37290. var t = this._model
  37291. , e = t.getData()
  37292. , n = wA(t);
  37293. e.eachItemGraphicEl((function(t, e) {
  37294. t && t.setSymbolScale(n)
  37295. }
  37296. ))
  37297. }
  37298. ,
  37299. e.prototype.updateLayout = function(t) {
  37300. ek(t.getGraph(), wA(t)),
  37301. this._symbolDraw.updateLayout(),
  37302. this._lineDraw.updateLayout()
  37303. }
  37304. ,
  37305. e.prototype.remove = function() {
  37306. clearTimeout(this._layoutTimeout),
  37307. this._layouting = !1,
  37308. this._layoutTimeout = null,
  37309. this._symbolDraw && this._symbolDraw.remove(),
  37310. this._lineDraw && this._lineDraw.remove()
  37311. }
  37312. ,
  37313. e.type = "graph",
  37314. e
  37315. }(Og);
  37316. function rk(t) {
  37317. return "_EC_" + t
  37318. }
  37319. var ok = function() {
  37320. function t(t) {
  37321. this.type = "graph",
  37322. this.nodes = [],
  37323. this.edges = [],
  37324. this._nodesMap = {},
  37325. this._edgesMap = {},
  37326. this._directed = t || !1
  37327. }
  37328. return t.prototype.isDirected = function() {
  37329. return this._directed
  37330. }
  37331. ,
  37332. t.prototype.addNode = function(t, e) {
  37333. t = null == t ? "" + e : "" + t;
  37334. var n = this._nodesMap;
  37335. if (!n[rk(t)]) {
  37336. var i = new ak(t,e);
  37337. return i.hostGraph = this,
  37338. this.nodes.push(i),
  37339. n[rk(t)] = i,
  37340. i
  37341. }
  37342. }
  37343. ,
  37344. t.prototype.getNodeByIndex = function(t) {
  37345. var e = this.data.getRawIndex(t);
  37346. return this.nodes[e]
  37347. }
  37348. ,
  37349. t.prototype.getNodeById = function(t) {
  37350. return this._nodesMap[rk(t)]
  37351. }
  37352. ,
  37353. t.prototype.addEdge = function(t, e, n) {
  37354. var i = this._nodesMap
  37355. , r = this._edgesMap;
  37356. if (j(t) && (t = this.nodes[t]),
  37357. j(e) && (e = this.nodes[e]),
  37358. t instanceof ak || (t = i[rk(t)]),
  37359. e instanceof ak || (e = i[rk(e)]),
  37360. t && e) {
  37361. var o = t.id + "-" + e.id
  37362. , a = new sk(t,e,n);
  37363. return a.hostGraph = this,
  37364. this._directed && (t.outEdges.push(a),
  37365. e.inEdges.push(a)),
  37366. t.edges.push(a),
  37367. t !== e && e.edges.push(a),
  37368. this.edges.push(a),
  37369. r[o] = a,
  37370. a
  37371. }
  37372. }
  37373. ,
  37374. t.prototype.getEdgeByIndex = function(t) {
  37375. var e = this.edgeData.getRawIndex(t);
  37376. return this.edges[e]
  37377. }
  37378. ,
  37379. t.prototype.getEdge = function(t, e) {
  37380. t instanceof ak && (t = t.id),
  37381. e instanceof ak && (e = e.id);
  37382. var n = this._edgesMap;
  37383. return this._directed ? n[t + "-" + e] : n[t + "-" + e] || n[e + "-" + t]
  37384. }
  37385. ,
  37386. t.prototype.eachNode = function(t, e) {
  37387. for (var n = this.nodes, i = n.length, r = 0; r < i; r++)
  37388. n[r].dataIndex >= 0 && t.call(e, n[r], r)
  37389. }
  37390. ,
  37391. t.prototype.eachEdge = function(t, e) {
  37392. for (var n = this.edges, i = n.length, r = 0; r < i; r++)
  37393. n[r].dataIndex >= 0 && n[r].node1.dataIndex >= 0 && n[r].node2.dataIndex >= 0 && t.call(e, n[r], r)
  37394. }
  37395. ,
  37396. t.prototype.breadthFirstTraverse = function(t, e, n, i) {
  37397. if (e instanceof ak || (e = this._nodesMap[rk(e)]),
  37398. e) {
  37399. for (var r = "out" === n ? "outEdges" : "in" === n ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
  37400. this.nodes[o].__visited = !1;
  37401. if (!t.call(i, e, null))
  37402. for (var a = [e]; a.length; ) {
  37403. var s = a.shift()
  37404. , l = s[r];
  37405. for (o = 0; o < l.length; o++) {
  37406. var u = l[o]
  37407. , h = u.node1 === s ? u.node2 : u.node1;
  37408. if (!h.__visited) {
  37409. if (t.call(i, h, s))
  37410. return;
  37411. a.push(h),
  37412. h.__visited = !0
  37413. }
  37414. }
  37415. }
  37416. }
  37417. }
  37418. ,
  37419. t.prototype.update = function() {
  37420. for (var t = this.data, e = this.edgeData, n = this.nodes, i = this.edges, r = 0, o = n.length; r < o; r++)
  37421. n[r].dataIndex = -1;
  37422. for (r = 0,
  37423. o = t.count(); r < o; r++)
  37424. n[t.getRawIndex(r)].dataIndex = r;
  37425. e.filterSelf((function(t) {
  37426. var n = i[e.getRawIndex(t)];
  37427. return n.node1.dataIndex >= 0 && n.node2.dataIndex >= 0
  37428. }
  37429. ));
  37430. for (r = 0,
  37431. o = i.length; r < o; r++)
  37432. i[r].dataIndex = -1;
  37433. for (r = 0,
  37434. o = e.count(); r < o; r++)
  37435. i[e.getRawIndex(r)].dataIndex = r
  37436. }
  37437. ,
  37438. t.prototype.clone = function() {
  37439. for (var e = new t(this._directed), n = this.nodes, i = this.edges, r = 0; r < n.length; r++)
  37440. e.addNode(n[r].id, n[r].dataIndex);
  37441. for (r = 0; r < i.length; r++) {
  37442. var o = i[r];
  37443. e.addEdge(o.node1.id, o.node2.id, o.dataIndex)
  37444. }
  37445. return e
  37446. }
  37447. ,
  37448. t
  37449. }()
  37450. , ak = function() {
  37451. function t(t, e) {
  37452. this.inEdges = [],
  37453. this.outEdges = [],
  37454. this.edges = [],
  37455. this.dataIndex = -1,
  37456. this.id = null == t ? "" : t,
  37457. this.dataIndex = null == e ? -1 : e
  37458. }
  37459. return t.prototype.degree = function() {
  37460. return this.edges.length
  37461. }
  37462. ,
  37463. t.prototype.inDegree = function() {
  37464. return this.inEdges.length
  37465. }
  37466. ,
  37467. t.prototype.outDegree = function() {
  37468. return this.outEdges.length
  37469. }
  37470. ,
  37471. t.prototype.getModel = function(t) {
  37472. if (!(this.dataIndex < 0))
  37473. return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)
  37474. }
  37475. ,
  37476. t.prototype.getAdjacentDataIndices = function() {
  37477. for (var t = {
  37478. edge: [],
  37479. node: []
  37480. }, e = 0; e < this.edges.length; e++) {
  37481. var n = this.edges[e];
  37482. n.dataIndex < 0 || (t.edge.push(n.dataIndex),
  37483. t.node.push(n.node1.dataIndex, n.node2.dataIndex))
  37484. }
  37485. return t
  37486. }
  37487. ,
  37488. t.prototype.getTrajectoryDataIndices = function() {
  37489. for (var t = yt(), e = yt(), n = 0; n < this.edges.length; n++) {
  37490. var i = this.edges[n];
  37491. if (!(i.dataIndex < 0)) {
  37492. t.set(i.dataIndex, !0);
  37493. for (var r = [i.node1], o = [i.node2], a = 0; a < r.length; ) {
  37494. var s = r[a];
  37495. a++,
  37496. e.set(s.dataIndex, !0);
  37497. for (var l = 0; l < s.inEdges.length; l++)
  37498. t.set(s.inEdges[l].dataIndex, !0),
  37499. r.push(s.inEdges[l].node1)
  37500. }
  37501. for (a = 0; a < o.length; ) {
  37502. var u = o[a];
  37503. a++,
  37504. e.set(u.dataIndex, !0);
  37505. for (l = 0; l < u.outEdges.length; l++)
  37506. t.set(u.outEdges[l].dataIndex, !0),
  37507. o.push(u.outEdges[l].node2)
  37508. }
  37509. }
  37510. }
  37511. return {
  37512. edge: t.keys(),
  37513. node: e.keys()
  37514. }
  37515. }
  37516. ,
  37517. t
  37518. }()
  37519. , sk = function() {
  37520. function t(t, e, n) {
  37521. this.dataIndex = -1,
  37522. this.node1 = t,
  37523. this.node2 = e,
  37524. this.dataIndex = null == n ? -1 : n
  37525. }
  37526. return t.prototype.getModel = function(t) {
  37527. if (!(this.dataIndex < 0))
  37528. return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)
  37529. }
  37530. ,
  37531. t.prototype.getAdjacentDataIndices = function() {
  37532. return {
  37533. edge: [this.dataIndex],
  37534. node: [this.node1.dataIndex, this.node2.dataIndex]
  37535. }
  37536. }
  37537. ,
  37538. t.prototype.getTrajectoryDataIndices = function() {
  37539. var t = yt()
  37540. , e = yt();
  37541. t.set(this.dataIndex, !0);
  37542. for (var n = [this.node1], i = [this.node2], r = 0; r < n.length; ) {
  37543. var o = n[r];
  37544. r++,
  37545. e.set(o.dataIndex, !0);
  37546. for (var a = 0; a < o.inEdges.length; a++)
  37547. t.set(o.inEdges[a].dataIndex, !0),
  37548. n.push(o.inEdges[a].node1)
  37549. }
  37550. for (r = 0; r < i.length; ) {
  37551. var s = i[r];
  37552. r++,
  37553. e.set(s.dataIndex, !0);
  37554. for (a = 0; a < s.outEdges.length; a++)
  37555. t.set(s.outEdges[a].dataIndex, !0),
  37556. i.push(s.outEdges[a].node2)
  37557. }
  37558. return {
  37559. edge: t.keys(),
  37560. node: e.keys()
  37561. }
  37562. }
  37563. ,
  37564. t
  37565. }();
  37566. function lk(t, e) {
  37567. return {
  37568. getValue: function(n) {
  37569. var i = this[t][e];
  37570. return i.getStore().get(i.getDimensionIndex(n || "value"), this.dataIndex)
  37571. },
  37572. setVisual: function(n, i) {
  37573. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, i)
  37574. },
  37575. getVisual: function(n) {
  37576. return this[t][e].getItemVisual(this.dataIndex, n)
  37577. },
  37578. setLayout: function(n, i) {
  37579. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, i)
  37580. },
  37581. getLayout: function() {
  37582. return this[t][e].getItemLayout(this.dataIndex)
  37583. },
  37584. getGraphicEl: function() {
  37585. return this[t][e].getItemGraphicEl(this.dataIndex)
  37586. },
  37587. getRawIndex: function() {
  37588. return this[t][e].getRawIndex(this.dataIndex)
  37589. }
  37590. }
  37591. }
  37592. function uk(t, e, n, i, r) {
  37593. for (var o = new ok(i), a = 0; a < t.length; a++)
  37594. o.addNode(it(t[a].id, t[a].name, a), a);
  37595. var s = []
  37596. , l = []
  37597. , u = 0;
  37598. for (a = 0; a < e.length; a++) {
  37599. var h = e[a]
  37600. , c = h.source
  37601. , p = h.target;
  37602. o.addEdge(c, p, u) && (l.push(h),
  37603. s.push(it(Ro(h.id, null), c + " > " + p)),
  37604. u++)
  37605. }
  37606. var d, f = n.get("coordinateSystem");
  37607. if ("cartesian2d" === f || "polar" === f)
  37608. d = _x(t, n);
  37609. else {
  37610. var g = wd.get(f)
  37611. , y = g && g.dimensions || [];
  37612. P(y, "value") < 0 && y.concat(["value"]);
  37613. var v = px(t, {
  37614. coordDimensions: y,
  37615. encodeDefine: n.getEncode()
  37616. }).dimensions;
  37617. (d = new cx(v,n)).initData(t)
  37618. }
  37619. var m = new cx(["value"],n);
  37620. return m.initData(l, s),
  37621. r && r(d, m),
  37622. ZC({
  37623. mainData: d,
  37624. struct: o,
  37625. structAttr: "graph",
  37626. datas: {
  37627. node: d,
  37628. edge: m
  37629. },
  37630. datasAttr: {
  37631. node: "data",
  37632. edge: "edgeData"
  37633. }
  37634. }),
  37635. o.update(),
  37636. o
  37637. }
  37638. R(ak, lk("hostGraph", "data")),
  37639. R(sk, lk("hostGraph", "edgeData"));
  37640. var hk = function(t) {
  37641. function e() {
  37642. var n = null !== t && t.apply(this, arguments) || this;
  37643. return n.type = e.type,
  37644. n.hasSymbolVisual = !0,
  37645. n
  37646. }
  37647. return n(e, t),
  37648. e.prototype.init = function(e) {
  37649. t.prototype.init.apply(this, arguments);
  37650. var n = this;
  37651. function i() {
  37652. return n._categoriesData
  37653. }
  37654. this.legendVisualProvider = new NM(i,i),
  37655. this.fillDataTextStyle(e.edges || e.links),
  37656. this._updateCategoriesData()
  37657. }
  37658. ,
  37659. e.prototype.mergeOption = function(e) {
  37660. t.prototype.mergeOption.apply(this, arguments),
  37661. this.fillDataTextStyle(e.edges || e.links),
  37662. this._updateCategoriesData()
  37663. }
  37664. ,
  37665. e.prototype.mergeDefaultAndTheme = function(e) {
  37666. t.prototype.mergeDefaultAndTheme.apply(this, arguments),
  37667. Co(e, "edgeLabel", ["show"])
  37668. }
  37669. ,
  37670. e.prototype.getInitialData = function(t, e) {
  37671. var n, i = t.edges || t.links || [], r = t.data || t.nodes || [], o = this;
  37672. if (r && i) {
  37673. dA(n = this) && (n.__curvenessList = [],
  37674. n.__edgeMap = {},
  37675. fA(n));
  37676. var a = uk(r, i, this, !0, (function(t, e) {
  37677. t.wrapMethod("getItemModel", (function(t) {
  37678. var e = o._categoriesModels[t.getShallow("category")];
  37679. return e && (e.parentModel = t.parentModel,
  37680. t.parentModel = e),
  37681. t
  37682. }
  37683. ));
  37684. var n = Cc.prototype.getModel;
  37685. function i(t, e) {
  37686. var i = n.call(this, t, e);
  37687. return i.resolveParentPath = r,
  37688. i
  37689. }
  37690. function r(t) {
  37691. if (t && ("label" === t[0] || "label" === t[1])) {
  37692. var e = t.slice();
  37693. return "label" === t[0] ? e[0] = "edgeLabel" : "label" === t[1] && (e[1] = "edgeLabel"),
  37694. e
  37695. }
  37696. return t
  37697. }
  37698. e.wrapMethod("getItemModel", (function(t) {
  37699. return t.resolveParentPath = r,
  37700. t.getModel = i,
  37701. t
  37702. }
  37703. ))
  37704. }
  37705. ));
  37706. return E(a.edges, (function(t) {
  37707. !function(t, e, n, i) {
  37708. if (dA(n)) {
  37709. var r = gA(t, e, n)
  37710. , o = n.__edgeMap
  37711. , a = o[yA(r)];
  37712. o[r] && !a ? o[r].isForward = !0 : a && o[r] && (a.isForward = !0,
  37713. o[r].isForward = !1),
  37714. o[r] = o[r] || [],
  37715. o[r].push(i)
  37716. }
  37717. }(t.node1, t.node2, this, t.dataIndex)
  37718. }
  37719. ), this),
  37720. a.data
  37721. }
  37722. }
  37723. ,
  37724. e.prototype.getGraph = function() {
  37725. return this.getData().graph
  37726. }
  37727. ,
  37728. e.prototype.getEdgeData = function() {
  37729. return this.getGraph().edgeData
  37730. }
  37731. ,
  37732. e.prototype.getCategoriesData = function() {
  37733. return this._categoriesData
  37734. }
  37735. ,
  37736. e.prototype.formatTooltip = function(t, e, n) {
  37737. if ("edge" === n) {
  37738. var i = this.getData()
  37739. , r = this.getDataParams(t, n)
  37740. , o = i.graph.getEdgeByIndex(t)
  37741. , a = i.getName(o.node1.dataIndex)
  37742. , s = i.getName(o.node2.dataIndex)
  37743. , l = [];
  37744. return null != a && l.push(a),
  37745. null != s && l.push(s),
  37746. og("nameValue", {
  37747. name: l.join(" > "),
  37748. value: r.value,
  37749. noValue: null == r.value
  37750. })
  37751. }
  37752. return vg({
  37753. series: this,
  37754. dataIndex: t,
  37755. multipleSeries: e
  37756. })
  37757. }
  37758. ,
  37759. e.prototype._updateCategoriesData = function() {
  37760. var t = z(this.option.categories || [], (function(t) {
  37761. return null != t.value ? t : A({
  37762. value: 0
  37763. }, t)
  37764. }
  37765. ))
  37766. , e = new cx(["value"],this);
  37767. e.initData(t),
  37768. this._categoriesData = e,
  37769. this._categoriesModels = e.mapArray((function(t) {
  37770. return e.getItemModel(t)
  37771. }
  37772. ))
  37773. }
  37774. ,
  37775. e.prototype.setZoom = function(t) {
  37776. this.option.zoom = t
  37777. }
  37778. ,
  37779. e.prototype.setCenter = function(t) {
  37780. this.option.center = t
  37781. }
  37782. ,
  37783. e.prototype.isAnimationEnabled = function() {
  37784. return t.prototype.isAnimationEnabled.call(this) && !("force" === this.get("layout") && this.get(["force", "layoutAnimation"]))
  37785. }
  37786. ,
  37787. e.type = "series.graph",
  37788. e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"],
  37789. e.defaultOption = {
  37790. z: 2,
  37791. coordinateSystem: "view",
  37792. legendHoverLink: !0,
  37793. layout: null,
  37794. circular: {
  37795. rotateLabel: !1
  37796. },
  37797. force: {
  37798. initLayout: null,
  37799. repulsion: [0, 50],
  37800. gravity: .1,
  37801. friction: .6,
  37802. edgeLength: 30,
  37803. layoutAnimation: !0
  37804. },
  37805. left: "center",
  37806. top: "center",
  37807. symbol: "circle",
  37808. symbolSize: 10,
  37809. edgeSymbol: ["none", "none"],
  37810. edgeSymbolSize: 10,
  37811. edgeLabel: {
  37812. position: "middle",
  37813. distance: 5
  37814. },
  37815. draggable: !1,
  37816. roam: !1,
  37817. center: null,
  37818. zoom: 1,
  37819. nodeScaleRatio: .6,
  37820. label: {
  37821. show: !1,
  37822. formatter: "{b}"
  37823. },
  37824. itemStyle: {},
  37825. lineStyle: {
  37826. color: "#aaa",
  37827. width: 1,
  37828. opacity: .5
  37829. },
  37830. emphasis: {
  37831. scale: !0,
  37832. label: {
  37833. show: !0
  37834. }
  37835. },
  37836. select: {
  37837. itemStyle: {
  37838. borderColor: "#212121"
  37839. }
  37840. }
  37841. },
  37842. e
  37843. }(bg)
  37844. , ck = {
  37845. type: "graphRoam",
  37846. event: "graphRoam",
  37847. update: "none"
  37848. };
  37849. var pk = function() {
  37850. this.angle = 0,
  37851. this.width = 10,
  37852. this.r = 10,
  37853. this.x = 0,
  37854. this.y = 0
  37855. }
  37856. , dk = function(t) {
  37857. function e(e) {
  37858. var n = t.call(this, e) || this;
  37859. return n.type = "pointer",
  37860. n
  37861. }
  37862. return n(e, t),
  37863. e.prototype.getDefaultShape = function() {
  37864. return new pk
  37865. }
  37866. ,
  37867. e.prototype.buildPath = function(t, e) {
  37868. var n = Math.cos
  37869. , i = Math.sin
  37870. , r = e.r
  37871. , o = e.width
  37872. , a = e.angle
  37873. , s = e.x - n(a) * o * (o >= r / 3 ? 1 : 2)
  37874. , l = e.y - i(a) * o * (o >= r / 3 ? 1 : 2);
  37875. a = e.angle - Math.PI / 2,
  37876. t.moveTo(s, l),
  37877. t.lineTo(e.x + n(a) * o, e.y + i(a) * o),
  37878. t.lineTo(e.x + n(e.angle) * r, e.y + i(e.angle) * r),
  37879. t.lineTo(e.x - n(a) * o, e.y - i(a) * o),
  37880. t.lineTo(s, l)
  37881. }
  37882. ,
  37883. e
  37884. }(ks);
  37885. function fk(t, e) {
  37886. var n = null == t ? "" : t + "";
  37887. return e && (U(e) ? n = e.replace("{value}", n) : X(e) && (n = e(t))),
  37888. n
  37889. }
  37890. var gk = function(t) {
  37891. function e() {
  37892. var n = null !== t && t.apply(this, arguments) || this;
  37893. return n.type = e.type,
  37894. n
  37895. }
  37896. return n(e, t),
  37897. e.prototype.render = function(t, e, n) {
  37898. this.group.removeAll();
  37899. var i = t.get(["axisLine", "lineStyle", "color"])
  37900. , r = function(t, e) {
  37901. var n = t.get("center")
  37902. , i = e.getWidth()
  37903. , r = e.getHeight()
  37904. , o = Math.min(i, r);
  37905. return {
  37906. cx: $r(n[0], e.getWidth()),
  37907. cy: $r(n[1], e.getHeight()),
  37908. r: $r(t.get("radius"), o / 2)
  37909. }
  37910. }(t, n);
  37911. this._renderMain(t, e, n, i, r),
  37912. this._data = t.getData()
  37913. }
  37914. ,
  37915. e.prototype.dispose = function() {}
  37916. ,
  37917. e.prototype._renderMain = function(t, e, n, i, r) {
  37918. var o = this.group
  37919. , a = t.get("clockwise")
  37920. , s = -t.get("startAngle") / 180 * Math.PI
  37921. , l = -t.get("endAngle") / 180 * Math.PI
  37922. , u = t.getModel("axisLine")
  37923. , h = u.get("roundCap") ? JS : Fu
  37924. , c = u.get("show")
  37925. , p = u.getModel("lineStyle")
  37926. , d = p.get("width")
  37927. , f = [s, l];
  37928. us(f, !a);
  37929. for (var g = (l = f[1]) - (s = f[0]), y = s, v = [], m = 0; c && m < i.length; m++) {
  37930. var x = new h({
  37931. shape: {
  37932. startAngle: y,
  37933. endAngle: l = s + g * Math.min(Math.max(i[m][0], 0), 1),
  37934. cx: r.cx,
  37935. cy: r.cy,
  37936. clockwise: a,
  37937. r0: r.r - d,
  37938. r: r.r
  37939. },
  37940. silent: !0
  37941. });
  37942. x.setStyle({
  37943. fill: i[m][1]
  37944. }),
  37945. x.setStyle(p.getLineStyle(["color", "width"])),
  37946. v.push(x),
  37947. y = l
  37948. }
  37949. v.reverse(),
  37950. E(v, (function(t) {
  37951. return o.add(t)
  37952. }
  37953. ));
  37954. var _ = function(t) {
  37955. if (t <= 0)
  37956. return i[0][1];
  37957. var e;
  37958. for (e = 0; e < i.length; e++)
  37959. if (i[e][0] >= t && (0 === e ? 0 : i[e - 1][0]) < t)
  37960. return i[e][1];
  37961. return i[e - 1][1]
  37962. };
  37963. this._renderTicks(t, e, n, _, r, s, l, a, d),
  37964. this._renderTitleAndDetail(t, e, n, _, r),
  37965. this._renderAnchor(t, r),
  37966. this._renderPointer(t, e, n, _, r, s, l, a, d)
  37967. }
  37968. ,
  37969. e.prototype._renderTicks = function(t, e, n, i, r, o, a, s, l) {
  37970. 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++) {
  37971. if (u = Math.cos(M),
  37972. h = Math.sin(M),
  37973. v.get("show")) {
  37974. var L = new Ku({
  37975. shape: {
  37976. x1: u * (f - (P = A ? A + l : l)) + p,
  37977. y1: h * (f - P) + d,
  37978. x2: u * (f - w - P) + p,
  37979. y2: h * (f - w - P) + d
  37980. },
  37981. style: C,
  37982. silent: !0
  37983. });
  37984. "auto" === C.stroke && L.setStyle({
  37985. stroke: i(k / _)
  37986. }),
  37987. c.add(L)
  37988. }
  37989. if (x.get("show")) {
  37990. var P = x.get("distance") + A
  37991. , O = fk(Jr(k / _ * (y - g) + g), x.get("formatter"))
  37992. , R = i(k / _)
  37993. , N = u * (f - w - P) + p
  37994. , E = h * (f - w - P) + d
  37995. , z = x.get("rotate")
  37996. , V = 0;
  37997. "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),
  37998. 0 === V ? c.add(new Xs({
  37999. style: oc(x, {
  38000. text: O,
  38001. x: N,
  38002. y: E,
  38003. verticalAlign: h < -.8 ? "top" : h > .8 ? "bottom" : "middle",
  38004. align: u < -.4 ? "left" : u > .4 ? "right" : "center"
  38005. }, {
  38006. inheritColor: R
  38007. }),
  38008. silent: !0
  38009. })) : c.add(new Xs({
  38010. style: oc(x, {
  38011. text: O,
  38012. x: N,
  38013. y: E,
  38014. verticalAlign: "middle",
  38015. align: "center"
  38016. }, {
  38017. inheritColor: R
  38018. }),
  38019. silent: !0,
  38020. originX: N,
  38021. originY: E,
  38022. rotation: V
  38023. }))
  38024. }
  38025. if (m.get("show") && k !== _) {
  38026. P = (P = m.get("distance")) ? P + l : l;
  38027. for (var B = 0; B <= b; B++) {
  38028. u = Math.cos(M),
  38029. h = Math.sin(M);
  38030. var F = new Ku({
  38031. shape: {
  38032. x1: u * (f - P) + p,
  38033. y1: h * (f - P) + d,
  38034. x2: u * (f - S - P) + p,
  38035. y2: h * (f - S - P) + d
  38036. },
  38037. silent: !0,
  38038. style: D
  38039. });
  38040. "auto" === D.stroke && F.setStyle({
  38041. stroke: i((k + B / b) / _)
  38042. }),
  38043. c.add(F),
  38044. M += T
  38045. }
  38046. M -= T
  38047. } else
  38048. M += I
  38049. }
  38050. }
  38051. ,
  38052. e.prototype._renderPointer = function(t, e, n, i, r, o, a, s, l) {
  38053. var u = this.group
  38054. , h = this._data
  38055. , c = this._progressEls
  38056. , p = []
  38057. , d = t.get(["pointer", "show"])
  38058. , f = t.getModel("progress")
  38059. , g = f.get("show")
  38060. , y = t.getData()
  38061. , v = y.mapDimension("value")
  38062. , m = +t.get("min")
  38063. , x = +t.get("max")
  38064. , _ = [m, x]
  38065. , b = [o, a];
  38066. function w(e, n) {
  38067. var i, o = y.getItemModel(e).getModel("pointer"), a = $r(o.get("width"), r.r), s = $r(o.get("length"), r.r), l = t.get(["pointer", "icon"]), u = o.get("offsetCenter"), h = $r(u[0], r.r), c = $r(u[1], r.r), p = o.get("keepAspect");
  38068. return (i = l ? Xy(l, h - a / 2, c - s, a, s, null, p) : new dk({
  38069. shape: {
  38070. angle: -Math.PI / 2,
  38071. width: a,
  38072. r: s,
  38073. x: h,
  38074. y: c
  38075. }
  38076. })).rotation = -(n + Math.PI / 2),
  38077. i.x = r.cx,
  38078. i.y = r.cy,
  38079. i
  38080. }
  38081. function S(t, e) {
  38082. var n = f.get("roundCap") ? JS : Fu
  38083. , i = f.get("overlap")
  38084. , a = i ? f.get("width") : l / y.count()
  38085. , u = i ? r.r - a : r.r - (t + 1) * a
  38086. , h = i ? r.r : r.r - t * a
  38087. , c = new n({
  38088. shape: {
  38089. startAngle: o,
  38090. endAngle: e,
  38091. cx: r.cx,
  38092. cy: r.cy,
  38093. clockwise: s,
  38094. r0: u,
  38095. r: h
  38096. }
  38097. });
  38098. return i && (c.z2 = Kr(y.get(v, t), [m, x], [100, 0], !0)),
  38099. c
  38100. }
  38101. (g || d) && (y.diff(h).add((function(e) {
  38102. var n = y.get(v, e);
  38103. if (d) {
  38104. var i = w(e, o);
  38105. mh(i, {
  38106. rotation: -((isNaN(+n) ? b[0] : Kr(n, _, b, !0)) + Math.PI / 2)
  38107. }, t),
  38108. u.add(i),
  38109. y.setItemGraphicEl(e, i)
  38110. }
  38111. if (g) {
  38112. var r = S(e, o)
  38113. , a = f.get("clip");
  38114. mh(r, {
  38115. shape: {
  38116. endAngle: Kr(n, _, b, a)
  38117. }
  38118. }, t),
  38119. u.add(r),
  38120. ol(t.seriesIndex, y.dataType, e, r),
  38121. p[e] = r
  38122. }
  38123. }
  38124. )).update((function(e, n) {
  38125. var i = y.get(v, e);
  38126. if (d) {
  38127. var r = h.getItemGraphicEl(n)
  38128. , a = r ? r.rotation : o
  38129. , s = w(e, a);
  38130. s.rotation = a,
  38131. vh(s, {
  38132. rotation: -((isNaN(+i) ? b[0] : Kr(i, _, b, !0)) + Math.PI / 2)
  38133. }, t),
  38134. u.add(s),
  38135. y.setItemGraphicEl(e, s)
  38136. }
  38137. if (g) {
  38138. var l = c[n]
  38139. , m = S(e, l ? l.shape.endAngle : o)
  38140. , x = f.get("clip");
  38141. vh(m, {
  38142. shape: {
  38143. endAngle: Kr(i, _, b, x)
  38144. }
  38145. }, t),
  38146. u.add(m),
  38147. ol(t.seriesIndex, y.dataType, e, m),
  38148. p[e] = m
  38149. }
  38150. }
  38151. )).execute(),
  38152. y.each((function(t) {
  38153. var e = y.getItemModel(t)
  38154. , n = e.getModel("emphasis")
  38155. , r = n.get("focus")
  38156. , o = n.get("blurScope")
  38157. , a = n.get("disabled");
  38158. if (d) {
  38159. var s = y.getItemGraphicEl(t)
  38160. , l = y.getItemVisual(t, "style")
  38161. , u = l.fill;
  38162. if (s instanceof Ns) {
  38163. var h = s.style;
  38164. s.useStyle(A({
  38165. image: h.image,
  38166. x: h.x,
  38167. y: h.y,
  38168. width: h.width,
  38169. height: h.height
  38170. }, l))
  38171. } else
  38172. s.useStyle(l),
  38173. "pointer" !== s.type && s.setColor(u);
  38174. s.setStyle(e.getModel(["pointer", "itemStyle"]).getItemStyle()),
  38175. "auto" === s.style.fill && s.setStyle("fill", i(Kr(y.get(v, t), _, [0, 1], !0))),
  38176. s.z2EmphasisLift = 0,
  38177. $l(s, e),
  38178. Zl(s, r, o, a)
  38179. }
  38180. if (g) {
  38181. var c = p[t];
  38182. c.useStyle(y.getItemVisual(t, "style")),
  38183. c.setStyle(e.getModel(["progress", "itemStyle"]).getItemStyle()),
  38184. c.z2EmphasisLift = 0,
  38185. $l(c, e),
  38186. Zl(c, r, o, a)
  38187. }
  38188. }
  38189. )),
  38190. this._progressEls = p)
  38191. }
  38192. ,
  38193. e.prototype._renderAnchor = function(t, e) {
  38194. var n = t.getModel("anchor");
  38195. if (n.get("show")) {
  38196. var i = n.get("size")
  38197. , r = n.get("icon")
  38198. , o = n.get("offsetCenter")
  38199. , a = n.get("keepAspect")
  38200. , 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);
  38201. s.z2 = n.get("showAbove") ? 1 : 0,
  38202. s.setStyle(n.getModel("itemStyle").getItemStyle()),
  38203. this.group.add(s)
  38204. }
  38205. }
  38206. ,
  38207. e.prototype._renderTitleAndDetail = function(t, e, n, i, r) {
  38208. var o = this
  38209. , a = t.getData()
  38210. , s = a.mapDimension("value")
  38211. , l = +t.get("min")
  38212. , u = +t.get("max")
  38213. , h = new Br
  38214. , c = []
  38215. , p = []
  38216. , d = t.isAnimationEnabled()
  38217. , f = t.get(["pointer", "showAbove"]);
  38218. a.diff(this._data).add((function(t) {
  38219. c[t] = new Xs({
  38220. silent: !0
  38221. }),
  38222. p[t] = new Xs({
  38223. silent: !0
  38224. })
  38225. }
  38226. )).update((function(t, e) {
  38227. c[t] = o._titleEls[e],
  38228. p[t] = o._detailEls[e]
  38229. }
  38230. )).execute(),
  38231. a.each((function(e) {
  38232. var n = a.getItemModel(e)
  38233. , o = a.get(s, e)
  38234. , g = new Br
  38235. , y = i(Kr(o, [l, u], [0, 1], !0))
  38236. , v = n.getModel("title");
  38237. if (v.get("show")) {
  38238. var m = v.get("offsetCenter")
  38239. , x = r.cx + $r(m[0], r.r)
  38240. , _ = r.cy + $r(m[1], r.r);
  38241. (D = c[e]).attr({
  38242. z2: f ? 0 : 2,
  38243. style: oc(v, {
  38244. x: x,
  38245. y: _,
  38246. text: a.getName(e),
  38247. align: "center",
  38248. verticalAlign: "middle"
  38249. }, {
  38250. inheritColor: y
  38251. })
  38252. }),
  38253. g.add(D)
  38254. }
  38255. var b = n.getModel("detail");
  38256. if (b.get("show")) {
  38257. var w = b.get("offsetCenter")
  38258. , S = r.cx + $r(w[0], r.r)
  38259. , M = r.cy + $r(w[1], r.r)
  38260. , I = $r(b.get("width"), r.r)
  38261. , T = $r(b.get("height"), r.r)
  38262. , C = t.get(["progress", "show"]) ? a.getItemVisual(e, "style").fill : y
  38263. , D = p[e]
  38264. , A = b.get("formatter");
  38265. D.attr({
  38266. z2: f ? 0 : 2,
  38267. style: oc(b, {
  38268. x: S,
  38269. y: M,
  38270. text: fk(o, A),
  38271. width: isNaN(I) ? null : I,
  38272. height: isNaN(T) ? null : T,
  38273. align: "center",
  38274. verticalAlign: "middle"
  38275. }, {
  38276. inheritColor: C
  38277. })
  38278. }),
  38279. dc(D, {
  38280. normal: b
  38281. }, o, (function(t) {
  38282. return fk(t, A)
  38283. }
  38284. )),
  38285. d && fc(D, e, a, t, {
  38286. getFormattedLabel: function(t, e, n, i, r, a) {
  38287. return fk(a ? a.interpolatedValue : o, A)
  38288. }
  38289. }),
  38290. g.add(D)
  38291. }
  38292. h.add(g)
  38293. }
  38294. )),
  38295. this.group.add(h),
  38296. this._titleEls = c,
  38297. this._detailEls = p
  38298. }
  38299. ,
  38300. e.type = "gauge",
  38301. e
  38302. }(Og)
  38303. , yk = function(t) {
  38304. function e() {
  38305. var n = null !== t && t.apply(this, arguments) || this;
  38306. return n.type = e.type,
  38307. n.visualStyleAccessPath = "itemStyle",
  38308. n
  38309. }
  38310. return n(e, t),
  38311. e.prototype.getInitialData = function(t, e) {
  38312. return RM(this, ["value"])
  38313. }
  38314. ,
  38315. e.type = "series.gauge",
  38316. e.defaultOption = {
  38317. z: 2,
  38318. colorBy: "data",
  38319. center: ["50%", "50%"],
  38320. legendHoverLink: !0,
  38321. radius: "75%",
  38322. startAngle: 225,
  38323. endAngle: -45,
  38324. clockwise: !0,
  38325. min: 0,
  38326. max: 100,
  38327. splitNumber: 10,
  38328. axisLine: {
  38329. show: !0,
  38330. roundCap: !1,
  38331. lineStyle: {
  38332. color: [[1, "#E6EBF8"]],
  38333. width: 10
  38334. }
  38335. },
  38336. progress: {
  38337. show: !1,
  38338. overlap: !0,
  38339. width: 10,
  38340. roundCap: !1,
  38341. clip: !0
  38342. },
  38343. splitLine: {
  38344. show: !0,
  38345. length: 10,
  38346. distance: 10,
  38347. lineStyle: {
  38348. color: "#63677A",
  38349. width: 3,
  38350. type: "solid"
  38351. }
  38352. },
  38353. axisTick: {
  38354. show: !0,
  38355. splitNumber: 5,
  38356. length: 6,
  38357. distance: 10,
  38358. lineStyle: {
  38359. color: "#63677A",
  38360. width: 1,
  38361. type: "solid"
  38362. }
  38363. },
  38364. axisLabel: {
  38365. show: !0,
  38366. distance: 15,
  38367. color: "#464646",
  38368. fontSize: 12,
  38369. rotate: 0
  38370. },
  38371. pointer: {
  38372. icon: null,
  38373. offsetCenter: [0, 0],
  38374. show: !0,
  38375. showAbove: !0,
  38376. length: "60%",
  38377. width: 6,
  38378. keepAspect: !1
  38379. },
  38380. anchor: {
  38381. show: !1,
  38382. showAbove: !1,
  38383. size: 6,
  38384. icon: "circle",
  38385. offsetCenter: [0, 0],
  38386. keepAspect: !1,
  38387. itemStyle: {
  38388. color: "#fff",
  38389. borderWidth: 0,
  38390. borderColor: "#5470c6"
  38391. }
  38392. },
  38393. title: {
  38394. show: !0,
  38395. offsetCenter: [0, "20%"],
  38396. color: "#464646",
  38397. fontSize: 16,
  38398. valueAnimation: !1
  38399. },
  38400. detail: {
  38401. show: !0,
  38402. backgroundColor: "rgba(0,0,0,0)",
  38403. borderWidth: 0,
  38404. borderColor: "#ccc",
  38405. width: 100,
  38406. height: null,
  38407. padding: [5, 10],
  38408. offsetCenter: [0, "40%"],
  38409. color: "#464646",
  38410. fontSize: 30,
  38411. fontWeight: "bold",
  38412. lineHeight: 30,
  38413. valueAnimation: !1
  38414. }
  38415. },
  38416. e
  38417. }(bg);
  38418. var vk = ["itemStyle", "opacity"]
  38419. , mk = function(t) {
  38420. function e(e, n) {
  38421. var i = t.call(this) || this
  38422. , r = i
  38423. , o = new Zu
  38424. , a = new Xs;
  38425. return r.setTextContent(a),
  38426. i.setTextGuideLine(o),
  38427. i.updateData(e, n, !0),
  38428. i
  38429. }
  38430. return n(e, t),
  38431. e.prototype.updateData = function(t, e, n) {
  38432. var i = this
  38433. , r = t.hostModel
  38434. , o = t.getItemModel(e)
  38435. , a = t.getItemLayout(e)
  38436. , s = o.getModel("emphasis")
  38437. , l = o.get(vk);
  38438. l = null == l ? 1 : l,
  38439. n || Sh(i),
  38440. i.useStyle(t.getItemVisual(e, "style")),
  38441. i.style.lineJoin = "round",
  38442. n ? (i.setShape({
  38443. points: a.points
  38444. }),
  38445. i.style.opacity = 0,
  38446. mh(i, {
  38447. style: {
  38448. opacity: l
  38449. }
  38450. }, r, e)) : vh(i, {
  38451. style: {
  38452. opacity: l
  38453. },
  38454. shape: {
  38455. points: a.points
  38456. }
  38457. }, r, e),
  38458. $l(i, o),
  38459. this._updateLabel(t, e),
  38460. Zl(this, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  38461. }
  38462. ,
  38463. e.prototype._updateLabel = function(t, e) {
  38464. var n = this
  38465. , i = this.getTextGuideLine()
  38466. , r = n.getTextContent()
  38467. , o = t.hostModel
  38468. , a = t.getItemModel(e)
  38469. , s = t.getItemLayout(e).label
  38470. , l = t.getItemVisual(e, "style")
  38471. , u = l.fill;
  38472. ic(r, rc(a), {
  38473. labelFetcher: t.hostModel,
  38474. labelDataIndex: e,
  38475. defaultOpacity: l.opacity,
  38476. defaultText: t.getName(e)
  38477. }, {
  38478. normal: {
  38479. align: s.textAlign,
  38480. verticalAlign: s.verticalAlign
  38481. }
  38482. }),
  38483. n.setTextConfig({
  38484. local: !0,
  38485. inside: !!s.inside,
  38486. insideStroke: u,
  38487. outsideFill: u
  38488. });
  38489. var h = s.linePoints;
  38490. i.setShape({
  38491. points: h
  38492. }),
  38493. n.textGuideLineConfig = {
  38494. anchor: h ? new De(h[0][0],h[0][1]) : null
  38495. },
  38496. vh(r, {
  38497. style: {
  38498. x: s.x,
  38499. y: s.y
  38500. }
  38501. }, o, e),
  38502. r.attr({
  38503. rotation: s.rotation,
  38504. originX: s.x,
  38505. originY: s.y,
  38506. z2: 10
  38507. }),
  38508. kb(n, Lb(a), {
  38509. stroke: u
  38510. })
  38511. }
  38512. ,
  38513. e
  38514. }(Xu)
  38515. , xk = function(t) {
  38516. function e() {
  38517. var n = null !== t && t.apply(this, arguments) || this;
  38518. return n.type = e.type,
  38519. n.ignoreLabelLineUpdate = !0,
  38520. n
  38521. }
  38522. return n(e, t),
  38523. e.prototype.render = function(t, e, n) {
  38524. var i = t.getData()
  38525. , r = this._data
  38526. , o = this.group;
  38527. i.diff(r).add((function(t) {
  38528. var e = new mk(i,t);
  38529. i.setItemGraphicEl(t, e),
  38530. o.add(e)
  38531. }
  38532. )).update((function(t, e) {
  38533. var n = r.getItemGraphicEl(e);
  38534. n.updateData(i, t),
  38535. o.add(n),
  38536. i.setItemGraphicEl(t, n)
  38537. }
  38538. )).remove((function(e) {
  38539. wh(r.getItemGraphicEl(e), t, e)
  38540. }
  38541. )).execute(),
  38542. this._data = i
  38543. }
  38544. ,
  38545. e.prototype.remove = function() {
  38546. this.group.removeAll(),
  38547. this._data = null
  38548. }
  38549. ,
  38550. e.prototype.dispose = function() {}
  38551. ,
  38552. e.type = "funnel",
  38553. e
  38554. }(Og)
  38555. , _k = function(t) {
  38556. function e() {
  38557. var n = null !== t && t.apply(this, arguments) || this;
  38558. return n.type = e.type,
  38559. n
  38560. }
  38561. return n(e, t),
  38562. e.prototype.init = function(e) {
  38563. t.prototype.init.apply(this, arguments),
  38564. this.legendVisualProvider = new NM(W(this.getData, this),W(this.getRawData, this)),
  38565. this._defaultLabelLine(e)
  38566. }
  38567. ,
  38568. e.prototype.getInitialData = function(t, e) {
  38569. return RM(this, {
  38570. coordDimensions: ["value"],
  38571. encodeDefaulter: H(ed, this)
  38572. })
  38573. }
  38574. ,
  38575. e.prototype._defaultLabelLine = function(t) {
  38576. Co(t, "labelLine", ["show"]);
  38577. var e = t.labelLine
  38578. , n = t.emphasis.labelLine;
  38579. e.show = e.show && t.label.show,
  38580. n.show = n.show && t.emphasis.label.show
  38581. }
  38582. ,
  38583. e.prototype.getDataParams = function(e) {
  38584. var n = this.getData()
  38585. , i = t.prototype.getDataParams.call(this, e)
  38586. , r = n.mapDimension("value")
  38587. , o = n.getSum(r);
  38588. return i.percent = o ? +(n.get(r, e) / o * 100).toFixed(2) : 0,
  38589. i.$vars.push("percent"),
  38590. i
  38591. }
  38592. ,
  38593. e.type = "series.funnel",
  38594. e.defaultOption = {
  38595. z: 2,
  38596. legendHoverLink: !0,
  38597. colorBy: "data",
  38598. left: 80,
  38599. top: 60,
  38600. right: 80,
  38601. bottom: 60,
  38602. minSize: "0%",
  38603. maxSize: "100%",
  38604. sort: "descending",
  38605. orient: "vertical",
  38606. gap: 0,
  38607. funnelAlign: "center",
  38608. label: {
  38609. show: !0,
  38610. position: "outer"
  38611. },
  38612. labelLine: {
  38613. show: !0,
  38614. length: 20,
  38615. lineStyle: {
  38616. width: 1
  38617. }
  38618. },
  38619. itemStyle: {
  38620. borderColor: "#fff",
  38621. borderWidth: 1
  38622. },
  38623. emphasis: {
  38624. label: {
  38625. show: !0
  38626. }
  38627. },
  38628. select: {
  38629. itemStyle: {
  38630. borderColor: "#212121"
  38631. }
  38632. }
  38633. },
  38634. e
  38635. }(bg);
  38636. function bk(t, e) {
  38637. t.eachSeriesByType("funnel", (function(t) {
  38638. var n = t.getData()
  38639. , i = n.mapDimension("value")
  38640. , r = t.get("sort")
  38641. , o = function(t, e) {
  38642. return kp(t.getBoxLayoutParams(), {
  38643. width: e.getWidth(),
  38644. height: e.getHeight()
  38645. })
  38646. }(t, e)
  38647. , a = t.get("orient")
  38648. , s = o.width
  38649. , l = o.height
  38650. , u = function(t, e) {
  38651. for (var n = t.mapDimension("value"), i = t.mapArray(n, (function(t) {
  38652. return t
  38653. }
  38654. )), r = [], o = "ascending" === e, a = 0, s = t.count(); a < s; a++)
  38655. r[a] = a;
  38656. return X(e) ? r.sort(e) : "none" !== e && r.sort((function(t, e) {
  38657. return o ? i[t] - i[e] : i[e] - i[t]
  38658. }
  38659. )),
  38660. r
  38661. }(n, r)
  38662. , h = o.x
  38663. , c = o.y
  38664. , p = "horizontal" === a ? [$r(t.get("minSize"), l), $r(t.get("maxSize"), l)] : [$r(t.get("minSize"), s), $r(t.get("maxSize"), s)]
  38665. , d = n.getDataExtent(i)
  38666. , f = t.get("min")
  38667. , g = t.get("max");
  38668. null == f && (f = Math.min(d[0], 0)),
  38669. null == g && (g = d[1]);
  38670. var y = t.get("funnelAlign")
  38671. , v = t.get("gap")
  38672. , m = (("horizontal" === a ? s : l) - v * (n.count() - 1)) / n.count()
  38673. , x = function(t, e) {
  38674. if ("horizontal" === a) {
  38675. var r = Kr(n.get(i, t) || 0, [f, g], p, !0)
  38676. , o = void 0;
  38677. switch (y) {
  38678. case "top":
  38679. o = c;
  38680. break;
  38681. case "center":
  38682. o = c + (l - r) / 2;
  38683. break;
  38684. case "bottom":
  38685. o = c + (l - r)
  38686. }
  38687. return [[e, o], [e, o + r]]
  38688. }
  38689. var u, d = Kr(n.get(i, t) || 0, [f, g], p, !0);
  38690. switch (y) {
  38691. case "left":
  38692. u = h;
  38693. break;
  38694. case "center":
  38695. u = h + (s - d) / 2;
  38696. break;
  38697. case "right":
  38698. u = h + s - d
  38699. }
  38700. return [[u, e], [u + d, e]]
  38701. };
  38702. "ascending" === r && (m = -m,
  38703. v = -v,
  38704. "horizontal" === a ? h += s : c += l,
  38705. u = u.reverse());
  38706. for (var _ = 0; _ < u.length; _++) {
  38707. var b = u[_]
  38708. , w = u[_ + 1]
  38709. , S = n.getItemModel(b);
  38710. if ("horizontal" === a) {
  38711. var M = S.get(["itemStyle", "width"]);
  38712. null == M ? M = m : (M = $r(M, s),
  38713. "ascending" === r && (M = -M));
  38714. var I = x(b, h)
  38715. , T = x(w, h + M);
  38716. h += M + v,
  38717. n.setItemLayout(b, {
  38718. points: I.concat(T.slice().reverse())
  38719. })
  38720. } else {
  38721. var C = S.get(["itemStyle", "height"]);
  38722. null == C ? C = m : (C = $r(C, l),
  38723. "ascending" === r && (C = -C));
  38724. I = x(b, c),
  38725. T = x(w, c + C);
  38726. c += C + v,
  38727. n.setItemLayout(b, {
  38728. points: I.concat(T.slice().reverse())
  38729. })
  38730. }
  38731. }
  38732. !function(t) {
  38733. var e = t.hostModel.get("orient");
  38734. t.each((function(n) {
  38735. var i, r, o, a, s = t.getItemModel(n), l = s.getModel("label").get("position"), u = s.getModel("labelLine"), h = t.getItemLayout(n), c = h.points, p = "inner" === l || "inside" === l || "center" === l || "insideLeft" === l || "insideRight" === l;
  38736. if (p)
  38737. "insideLeft" === l ? (r = (c[0][0] + c[3][0]) / 2 + 5,
  38738. o = (c[0][1] + c[3][1]) / 2,
  38739. i = "left") : "insideRight" === l ? (r = (c[1][0] + c[2][0]) / 2 - 5,
  38740. o = (c[1][1] + c[2][1]) / 2,
  38741. i = "right") : (r = (c[0][0] + c[1][0] + c[2][0] + c[3][0]) / 4,
  38742. o = (c[0][1] + c[1][1] + c[2][1] + c[3][1]) / 4,
  38743. i = "center"),
  38744. a = [[r, o], [r, o]];
  38745. else {
  38746. var d = void 0
  38747. , f = void 0
  38748. , g = void 0
  38749. , y = void 0
  38750. , v = u.get("length");
  38751. "left" === l ? (d = (c[3][0] + c[0][0]) / 2,
  38752. f = (c[3][1] + c[0][1]) / 2,
  38753. r = (g = d - v) - 5,
  38754. i = "right") : "right" === l ? (d = (c[1][0] + c[2][0]) / 2,
  38755. f = (c[1][1] + c[2][1]) / 2,
  38756. r = (g = d + v) + 5,
  38757. i = "left") : "top" === l ? (d = (c[3][0] + c[0][0]) / 2,
  38758. o = (y = (f = (c[3][1] + c[0][1]) / 2) - v) - 5,
  38759. i = "center") : "bottom" === l ? (d = (c[1][0] + c[2][0]) / 2,
  38760. o = (y = (f = (c[1][1] + c[2][1]) / 2) + v) + 5,
  38761. i = "center") : "rightTop" === l ? (d = "horizontal" === e ? c[3][0] : c[1][0],
  38762. f = "horizontal" === e ? c[3][1] : c[1][1],
  38763. "horizontal" === e ? (o = (y = f - v) - 5,
  38764. i = "center") : (r = (g = d + v) + 5,
  38765. i = "top")) : "rightBottom" === l ? (d = c[2][0],
  38766. f = c[2][1],
  38767. "horizontal" === e ? (o = (y = f + v) + 5,
  38768. i = "center") : (r = (g = d + v) + 5,
  38769. i = "bottom")) : "leftTop" === l ? (d = c[0][0],
  38770. f = "horizontal" === e ? c[0][1] : c[1][1],
  38771. "horizontal" === e ? (o = (y = f - v) - 5,
  38772. i = "center") : (r = (g = d - v) - 5,
  38773. i = "right")) : "leftBottom" === l ? (d = "horizontal" === e ? c[1][0] : c[3][0],
  38774. f = "horizontal" === e ? c[1][1] : c[2][1],
  38775. "horizontal" === e ? (o = (y = f + v) + 5,
  38776. i = "center") : (r = (g = d - v) - 5,
  38777. i = "right")) : (d = (c[1][0] + c[2][0]) / 2,
  38778. f = (c[1][1] + c[2][1]) / 2,
  38779. "horizontal" === e ? (o = (y = f + v) + 5,
  38780. i = "center") : (r = (g = d + v) + 5,
  38781. i = "left")),
  38782. "horizontal" === e ? r = g = d : o = y = f,
  38783. a = [[d, f], [g, y]]
  38784. }
  38785. h.label = {
  38786. linePoints: a,
  38787. x: r,
  38788. y: o,
  38789. verticalAlign: "middle",
  38790. textAlign: i,
  38791. inside: p
  38792. }
  38793. }
  38794. ))
  38795. }(n)
  38796. }
  38797. ))
  38798. }
  38799. var wk = function(t) {
  38800. function e() {
  38801. var n = null !== t && t.apply(this, arguments) || this;
  38802. return n.type = e.type,
  38803. n._dataGroup = new Br,
  38804. n._initialized = !1,
  38805. n
  38806. }
  38807. return n(e, t),
  38808. e.prototype.init = function() {
  38809. this.group.add(this._dataGroup)
  38810. }
  38811. ,
  38812. e.prototype.render = function(t, e, n, i) {
  38813. this._progressiveEls = null;
  38814. var r = this._dataGroup
  38815. , o = t.getData()
  38816. , a = this._data
  38817. , s = t.coordinateSystem
  38818. , l = s.dimensions
  38819. , u = Ik(t);
  38820. if (o.diff(a).add((function(t) {
  38821. Tk(Mk(o, r, t, l, s), o, t, u)
  38822. }
  38823. )).update((function(e, n) {
  38824. var i = a.getItemGraphicEl(n)
  38825. , r = Sk(o, e, l, s);
  38826. o.setItemGraphicEl(e, i),
  38827. vh(i, {
  38828. shape: {
  38829. points: r
  38830. }
  38831. }, t, e),
  38832. Sh(i),
  38833. Tk(i, o, e, u)
  38834. }
  38835. )).remove((function(t) {
  38836. var e = a.getItemGraphicEl(t);
  38837. r.remove(e)
  38838. }
  38839. )).execute(),
  38840. !this._initialized) {
  38841. this._initialized = !0;
  38842. var h = function(t, e, n) {
  38843. var i = t.model
  38844. , r = t.getRect()
  38845. , o = new Ws({
  38846. shape: {
  38847. x: r.x,
  38848. y: r.y,
  38849. width: r.width,
  38850. height: r.height
  38851. }
  38852. })
  38853. , a = "horizontal" === i.get("layout") ? "width" : "height";
  38854. return o.setShape(a, 0),
  38855. mh(o, {
  38856. shape: {
  38857. width: r.width,
  38858. height: r.height
  38859. }
  38860. }, e, n),
  38861. o
  38862. }(s, t, (function() {
  38863. setTimeout((function() {
  38864. r.removeClipPath()
  38865. }
  38866. ))
  38867. }
  38868. ));
  38869. r.setClipPath(h)
  38870. }
  38871. this._data = o
  38872. }
  38873. ,
  38874. e.prototype.incrementalPrepareRender = function(t, e, n) {
  38875. this._initialized = !0,
  38876. this._data = null,
  38877. this._dataGroup.removeAll()
  38878. }
  38879. ,
  38880. e.prototype.incrementalRender = function(t, e, n) {
  38881. for (var i = e.getData(), r = e.coordinateSystem, o = r.dimensions, a = Ik(e), s = this._progressiveEls = [], l = t.start; l < t.end; l++) {
  38882. var u = Mk(i, this._dataGroup, l, o, r);
  38883. u.incremental = !0,
  38884. Tk(u, i, l, a),
  38885. s.push(u)
  38886. }
  38887. }
  38888. ,
  38889. e.prototype.remove = function() {
  38890. this._dataGroup && this._dataGroup.removeAll(),
  38891. this._data = null
  38892. }
  38893. ,
  38894. e.type = "parallel",
  38895. e
  38896. }(Og);
  38897. function Sk(t, e, n, i) {
  38898. for (var r, o = [], a = 0; a < n.length; a++) {
  38899. var s = n[a]
  38900. , l = t.get(t.mapDimension(s), e);
  38901. r = l,
  38902. ("category" === i.getAxis(s).type ? null == r : null == r || isNaN(r)) || o.push(i.dataToPoint(l, s))
  38903. }
  38904. return o
  38905. }
  38906. function Mk(t, e, n, i, r) {
  38907. var o = Sk(t, n, i, r)
  38908. , a = new Zu({
  38909. shape: {
  38910. points: o
  38911. },
  38912. z2: 10
  38913. });
  38914. return e.add(a),
  38915. t.setItemGraphicEl(n, a),
  38916. a
  38917. }
  38918. function Ik(t) {
  38919. var e = t.get("smooth", !0);
  38920. return !0 === e && (e = .3),
  38921. nt(e = yo(e)) && (e = 0),
  38922. {
  38923. smooth: e
  38924. }
  38925. }
  38926. function Tk(t, e, n, i) {
  38927. t.useStyle(e.getItemVisual(n, "style")),
  38928. t.style.fill = null,
  38929. t.setShape("smooth", i.smooth);
  38930. var r = e.getItemModel(n)
  38931. , o = r.getModel("emphasis");
  38932. $l(t, r, "lineStyle"),
  38933. Zl(t, o.get("focus"), o.get("blurScope"), o.get("disabled"))
  38934. }
  38935. var Ck = function(t) {
  38936. function e() {
  38937. var n = null !== t && t.apply(this, arguments) || this;
  38938. return n.type = e.type,
  38939. n.visualStyleAccessPath = "lineStyle",
  38940. n.visualDrawType = "stroke",
  38941. n
  38942. }
  38943. return n(e, t),
  38944. e.prototype.getInitialData = function(t, e) {
  38945. return _x(null, this, {
  38946. useEncodeDefaulter: W(Dk, null, this)
  38947. })
  38948. }
  38949. ,
  38950. e.prototype.getRawIndicesByActiveState = function(t) {
  38951. var e = this.coordinateSystem
  38952. , n = this.getData()
  38953. , i = [];
  38954. return e.eachActiveState(n, (function(e, r) {
  38955. t === e && i.push(n.getRawIndex(r))
  38956. }
  38957. )),
  38958. i
  38959. }
  38960. ,
  38961. e.type = "series.parallel",
  38962. e.dependencies = ["parallel"],
  38963. e.defaultOption = {
  38964. z: 2,
  38965. coordinateSystem: "parallel",
  38966. parallelIndex: 0,
  38967. label: {
  38968. show: !1
  38969. },
  38970. inactiveOpacity: .05,
  38971. activeOpacity: 1,
  38972. lineStyle: {
  38973. width: 1,
  38974. opacity: .45,
  38975. type: "solid"
  38976. },
  38977. emphasis: {
  38978. label: {
  38979. show: !1
  38980. }
  38981. },
  38982. progressive: 500,
  38983. smooth: !1,
  38984. animationEasing: "linear"
  38985. },
  38986. e
  38987. }(bg);
  38988. function Dk(t) {
  38989. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  38990. if (e) {
  38991. var n = {};
  38992. return E(e.dimensions, (function(t) {
  38993. var e = +t.replace("dim", "");
  38994. n[t] = e
  38995. }
  38996. )),
  38997. n
  38998. }
  38999. }
  39000. var Ak = ["lineStyle", "opacity"]
  39001. , kk = {
  39002. seriesType: "parallel",
  39003. reset: function(t, e) {
  39004. var n = t.coordinateSystem
  39005. , i = {
  39006. normal: t.get(["lineStyle", "opacity"]),
  39007. active: t.get("activeOpacity"),
  39008. inactive: t.get("inactiveOpacity")
  39009. };
  39010. return {
  39011. progress: function(t, e) {
  39012. n.eachActiveState(e, (function(t, n) {
  39013. var r = i[t];
  39014. if ("normal" === t && e.hasItemOption) {
  39015. var o = e.getItemModel(n).get(Ak, !0);
  39016. null != o && (r = o)
  39017. }
  39018. e.ensureUniqueItemVisual(n, "style").opacity = r
  39019. }
  39020. ), t.start, t.end)
  39021. }
  39022. }
  39023. }
  39024. };
  39025. function Lk(t) {
  39026. !function(t) {
  39027. if (t.parallel)
  39028. return;
  39029. var e = !1;
  39030. E(t.series, (function(t) {
  39031. t && "parallel" === t.type && (e = !0)
  39032. }
  39033. )),
  39034. e && (t.parallel = [{}])
  39035. }(t),
  39036. function(t) {
  39037. var e = To(t.parallelAxis);
  39038. E(e, (function(e) {
  39039. if (q(e)) {
  39040. var n = e.parallelIndex || 0
  39041. , i = To(t.parallel)[n];
  39042. i && i.parallelAxisDefault && C(e, i.parallelAxisDefault, !1)
  39043. }
  39044. }
  39045. ))
  39046. }(t)
  39047. }
  39048. var Pk = function(t) {
  39049. function e() {
  39050. var n = null !== t && t.apply(this, arguments) || this;
  39051. return n.type = e.type,
  39052. n
  39053. }
  39054. return n(e, t),
  39055. e.prototype.render = function(t, e, n) {
  39056. this._model = t,
  39057. this._api = n,
  39058. this._handlers || (this._handlers = {},
  39059. E(Ok, (function(t, e) {
  39060. n.getZr().on(e, this._handlers[e] = W(t, this))
  39061. }
  39062. ), this)),
  39063. Hg(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate")
  39064. }
  39065. ,
  39066. e.prototype.dispose = function(t, e) {
  39067. Yg(this, "_throttledDispatchExpand"),
  39068. E(this._handlers, (function(t, n) {
  39069. e.getZr().off(n, t)
  39070. }
  39071. )),
  39072. this._handlers = null
  39073. }
  39074. ,
  39075. e.prototype._throttledDispatchExpand = function(t) {
  39076. this._dispatchExpand(t)
  39077. }
  39078. ,
  39079. e.prototype._dispatchExpand = function(t) {
  39080. t && this._api.dispatchAction(A({
  39081. type: "parallelAxisExpand"
  39082. }, t))
  39083. }
  39084. ,
  39085. e.type = "parallel",
  39086. e
  39087. }(Ag)
  39088. , Ok = {
  39089. mousedown: function(t) {
  39090. Rk(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY])
  39091. },
  39092. mouseup: function(t) {
  39093. var e = this._mouseDownPoint;
  39094. if (Rk(this, "click") && e) {
  39095. var n = [t.offsetX, t.offsetY];
  39096. if (Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2) > 5)
  39097. return;
  39098. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  39099. "none" !== i.behavior && this._dispatchExpand({
  39100. axisExpandWindow: i.axisExpandWindow
  39101. })
  39102. }
  39103. this._mouseDownPoint = null
  39104. },
  39105. mousemove: function(t) {
  39106. if (!this._mouseDownPoint && Rk(this, "mousemove")) {
  39107. var e = this._model
  39108. , n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY])
  39109. , i = n.behavior;
  39110. "jump" === i && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),
  39111. this._throttledDispatchExpand("none" === i ? null : {
  39112. axisExpandWindow: n.axisExpandWindow,
  39113. animation: "jump" === i ? null : {
  39114. duration: 0
  39115. }
  39116. })
  39117. }
  39118. }
  39119. };
  39120. function Rk(t, e) {
  39121. var n = t._model;
  39122. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e
  39123. }
  39124. var Nk = function(t) {
  39125. function e() {
  39126. var n = null !== t && t.apply(this, arguments) || this;
  39127. return n.type = e.type,
  39128. n
  39129. }
  39130. return n(e, t),
  39131. e.prototype.init = function() {
  39132. t.prototype.init.apply(this, arguments),
  39133. this.mergeOption({})
  39134. }
  39135. ,
  39136. e.prototype.mergeOption = function(t) {
  39137. var e = this.option;
  39138. t && C(e, t, !0),
  39139. this._initDimensions()
  39140. }
  39141. ,
  39142. e.prototype.contains = function(t, e) {
  39143. var n = t.get("parallelIndex");
  39144. return null != n && e.getComponent("parallel", n) === this
  39145. }
  39146. ,
  39147. e.prototype.setAxisExpand = function(t) {
  39148. E(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], (function(e) {
  39149. t.hasOwnProperty(e) && (this.option[e] = t[e])
  39150. }
  39151. ), this)
  39152. }
  39153. ,
  39154. e.prototype._initDimensions = function() {
  39155. var t = this.dimensions = []
  39156. , e = this.parallelAxisIndex = [];
  39157. E(B(this.ecModel.queryComponents({
  39158. mainType: "parallelAxis"
  39159. }), (function(t) {
  39160. return (t.get("parallelIndex") || 0) === this.componentIndex
  39161. }
  39162. ), this), (function(n) {
  39163. t.push("dim" + n.get("dim")),
  39164. e.push(n.componentIndex)
  39165. }
  39166. ))
  39167. }
  39168. ,
  39169. e.type = "parallel",
  39170. e.dependencies = ["parallelAxis"],
  39171. e.layoutMode = "box",
  39172. e.defaultOption = {
  39173. z: 0,
  39174. left: 80,
  39175. top: 60,
  39176. right: 80,
  39177. bottom: 60,
  39178. layout: "horizontal",
  39179. axisExpandable: !1,
  39180. axisExpandCenter: null,
  39181. axisExpandCount: 0,
  39182. axisExpandWidth: 50,
  39183. axisExpandRate: 17,
  39184. axisExpandDebounce: 50,
  39185. axisExpandSlideTriggerArea: [-.15, .05, .4],
  39186. axisExpandTriggerOn: "click",
  39187. parallelAxisDefault: null
  39188. },
  39189. e
  39190. }(zp)
  39191. , Ek = function(t) {
  39192. function e(e, n, i, r, o) {
  39193. var a = t.call(this, e, n, i) || this;
  39194. return a.type = r || "value",
  39195. a.axisIndex = o,
  39196. a
  39197. }
  39198. return n(e, t),
  39199. e.prototype.isHorizontal = function() {
  39200. return "horizontal" !== this.coordinateSystem.getModel().get("layout")
  39201. }
  39202. ,
  39203. e
  39204. }(ab);
  39205. function zk(t, e, n, i, r, o) {
  39206. t = t || 0;
  39207. var a = n[1] - n[0];
  39208. if (null != r && (r = Bk(r, [0, a])),
  39209. null != o && (o = Math.max(o, null != r ? r : 0)),
  39210. "all" === i) {
  39211. var s = Math.abs(e[1] - e[0]);
  39212. s = Bk(s, [0, a]),
  39213. r = o = Bk(s, [r, o]),
  39214. i = 0
  39215. }
  39216. e[0] = Bk(e[0], n),
  39217. e[1] = Bk(e[1], n);
  39218. var l = Vk(e, i);
  39219. e[i] += t;
  39220. var u, h = r || 0, c = n.slice();
  39221. return l.sign < 0 ? c[0] += h : c[1] -= h,
  39222. e[i] = Bk(e[i], c),
  39223. u = Vk(e, i),
  39224. null != r && (u.sign !== l.sign || u.span < r) && (e[1 - i] = e[i] + l.sign * r),
  39225. u = Vk(e, i),
  39226. null != o && u.span > o && (e[1 - i] = e[i] + u.sign * o),
  39227. e
  39228. }
  39229. function Vk(t, e) {
  39230. var n = t[e] - t[1 - e];
  39231. return {
  39232. span: Math.abs(n),
  39233. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  39234. }
  39235. }
  39236. function Bk(t, e) {
  39237. return Math.min(null != e[1] ? e[1] : 1 / 0, Math.max(null != e[0] ? e[0] : -1 / 0, t))
  39238. }
  39239. var Fk = E
  39240. , Gk = Math.min
  39241. , Wk = Math.max
  39242. , Hk = Math.floor
  39243. , Yk = Math.ceil
  39244. , Xk = Jr
  39245. , Uk = Math.PI
  39246. , Zk = function() {
  39247. function t(t, e, n) {
  39248. this.type = "parallel",
  39249. this._axesMap = yt(),
  39250. this._axesLayout = {},
  39251. this.dimensions = t.dimensions,
  39252. this._model = t,
  39253. this._init(t, e, n)
  39254. }
  39255. return t.prototype._init = function(t, e, n) {
  39256. var i = t.dimensions
  39257. , r = t.parallelAxisIndex;
  39258. Fk(i, (function(t, n) {
  39259. var i = r[n]
  39260. , o = e.getComponent("parallelAxis", i)
  39261. , a = this._axesMap.set(t, new Ek(t,b_(o),[0, 0],o.get("type"),i))
  39262. , s = "category" === a.type;
  39263. a.onBand = s && o.get("boundaryGap"),
  39264. a.inverse = o.get("inverse"),
  39265. o.axis = a,
  39266. a.model = o,
  39267. a.coordinateSystem = o.coordinateSystem = this
  39268. }
  39269. ), this)
  39270. }
  39271. ,
  39272. t.prototype.update = function(t, e) {
  39273. this._updateAxesFromSeries(this._model, t)
  39274. }
  39275. ,
  39276. t.prototype.containPoint = function(t) {
  39277. var e = this._makeLayoutInfo()
  39278. , n = e.axisBase
  39279. , i = e.layoutBase
  39280. , r = e.pixelDimIndex
  39281. , o = t[1 - r]
  39282. , a = t[r];
  39283. return o >= n && o <= n + e.axisLength && a >= i && a <= i + e.layoutLength
  39284. }
  39285. ,
  39286. t.prototype.getModel = function() {
  39287. return this._model
  39288. }
  39289. ,
  39290. t.prototype._updateAxesFromSeries = function(t, e) {
  39291. e.eachSeries((function(n) {
  39292. if (t.contains(n, e)) {
  39293. var i = n.getData();
  39294. Fk(this.dimensions, (function(t) {
  39295. var e = this._axesMap.get(t);
  39296. e.scale.unionExtentFromData(i, i.mapDimension(t)),
  39297. __(e.scale, e.model)
  39298. }
  39299. ), this)
  39300. }
  39301. }
  39302. ), this)
  39303. }
  39304. ,
  39305. t.prototype.resize = function(t, e) {
  39306. this._rect = kp(t.getBoxLayoutParams(), {
  39307. width: e.getWidth(),
  39308. height: e.getHeight()
  39309. }),
  39310. this._layoutAxes()
  39311. }
  39312. ,
  39313. t.prototype.getRect = function() {
  39314. return this._rect
  39315. }
  39316. ,
  39317. t.prototype._makeLayoutInfo = function() {
  39318. var t, e = this._model, n = this._rect, i = ["x", "y"], r = ["width", "height"], o = e.get("layout"), a = "horizontal" === o ? 0 : 1, s = n[r[a]], l = [0, s], u = this.dimensions.length, h = jk(e.get("axisExpandWidth"), l), c = jk(e.get("axisExpandCount") || 0, [0, u]), p = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0, d = e.get("axisExpandWindow");
  39319. d ? (t = jk(d[1] - d[0], l),
  39320. d[1] = d[0] + t) : (t = jk(h * (c - 1), l),
  39321. (d = [h * (e.get("axisExpandCenter") || Hk(u / 2)) - t / 2])[1] = d[0] + t);
  39322. var f = (s - t) / (u - c);
  39323. f < 3 && (f = 0);
  39324. var g = [Hk(Xk(d[0] / h, 1)) + 1, Yk(Xk(d[1] / h, 1)) - 1]
  39325. , y = f / h * d[0];
  39326. return {
  39327. layout: o,
  39328. pixelDimIndex: a,
  39329. layoutBase: n[i[a]],
  39330. layoutLength: s,
  39331. axisBase: n[i[1 - a]],
  39332. axisLength: n[r[1 - a]],
  39333. axisExpandable: p,
  39334. axisExpandWidth: h,
  39335. axisCollapseWidth: f,
  39336. axisExpandWindow: d,
  39337. axisCount: u,
  39338. winInnerIndices: g,
  39339. axisExpandWindow0Pos: y
  39340. }
  39341. }
  39342. ,
  39343. t.prototype._layoutAxes = function() {
  39344. var t = this._rect
  39345. , e = this._axesMap
  39346. , n = this.dimensions
  39347. , i = this._makeLayoutInfo()
  39348. , r = i.layout;
  39349. e.each((function(t) {
  39350. var e = [0, i.axisLength]
  39351. , n = t.inverse ? 1 : 0;
  39352. t.setExtent(e[n], e[1 - n])
  39353. }
  39354. )),
  39355. Fk(n, (function(e, n) {
  39356. var o = (i.axisExpandable ? Kk : qk)(n, i)
  39357. , a = {
  39358. horizontal: {
  39359. x: o.position,
  39360. y: i.axisLength
  39361. },
  39362. vertical: {
  39363. x: 0,
  39364. y: o.position
  39365. }
  39366. }
  39367. , s = {
  39368. horizontal: Uk / 2,
  39369. vertical: 0
  39370. }
  39371. , l = [a[r].x + t.x, a[r].y + t.y]
  39372. , u = s[r]
  39373. , h = [1, 0, 0, 1, 0, 0];
  39374. Se(h, h, u),
  39375. we(h, h, l),
  39376. this._axesLayout[e] = {
  39377. position: l,
  39378. rotation: u,
  39379. transform: h,
  39380. axisNameAvailableWidth: o.axisNameAvailableWidth,
  39381. axisLabelShow: o.axisLabelShow,
  39382. nameTruncateMaxWidth: o.nameTruncateMaxWidth,
  39383. tickDirection: 1,
  39384. labelDirection: 1
  39385. }
  39386. }
  39387. ), this)
  39388. }
  39389. ,
  39390. t.prototype.getAxis = function(t) {
  39391. return this._axesMap.get(t)
  39392. }
  39393. ,
  39394. t.prototype.dataToPoint = function(t, e) {
  39395. return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t), e)
  39396. }
  39397. ,
  39398. t.prototype.eachActiveState = function(t, e, n, i) {
  39399. null == n && (n = 0),
  39400. null == i && (i = t.count());
  39401. var r = this._axesMap
  39402. , o = this.dimensions
  39403. , a = []
  39404. , s = [];
  39405. E(o, (function(e) {
  39406. a.push(t.mapDimension(e)),
  39407. s.push(r.get(e).model)
  39408. }
  39409. ));
  39410. for (var l = this.hasAxisBrushed(), u = n; u < i; u++) {
  39411. var h = void 0;
  39412. if (l) {
  39413. h = "active";
  39414. for (var c = t.getValues(a, u), p = 0, d = o.length; p < d; p++) {
  39415. if ("inactive" === s[p].getActiveState(c[p])) {
  39416. h = "inactive";
  39417. break
  39418. }
  39419. }
  39420. } else
  39421. h = "normal";
  39422. e(h, u)
  39423. }
  39424. }
  39425. ,
  39426. t.prototype.hasAxisBrushed = function() {
  39427. for (var t = this.dimensions, e = this._axesMap, n = !1, i = 0, r = t.length; i < r; i++)
  39428. "normal" !== e.get(t[i]).model.getActiveState() && (n = !0);
  39429. return n
  39430. }
  39431. ,
  39432. t.prototype.axisCoordToPoint = function(t, e) {
  39433. return Fh([t, 0], this._axesLayout[e].transform)
  39434. }
  39435. ,
  39436. t.prototype.getAxisLayout = function(t) {
  39437. return T(this._axesLayout[t])
  39438. }
  39439. ,
  39440. t.prototype.getSlidedAxisExpandWindow = function(t) {
  39441. var e = this._makeLayoutInfo()
  39442. , n = e.pixelDimIndex
  39443. , i = e.axisExpandWindow.slice()
  39444. , r = i[1] - i[0]
  39445. , o = [0, e.axisExpandWidth * (e.axisCount - 1)];
  39446. if (!this.containPoint(t))
  39447. return {
  39448. behavior: "none",
  39449. axisExpandWindow: i
  39450. };
  39451. var a, s = t[n] - e.layoutBase - e.axisExpandWindow0Pos, l = "slide", u = e.axisCollapseWidth, h = this._model.get("axisExpandSlideTriggerArea"), c = null != h[0];
  39452. if (u)
  39453. c && u && s < r * h[0] ? (l = "jump",
  39454. a = s - r * h[2]) : c && u && s > r * (1 - h[0]) ? (l = "jump",
  39455. a = s - r * (1 - h[2])) : (a = s - r * h[1]) >= 0 && (a = s - r * (1 - h[1])) <= 0 && (a = 0),
  39456. (a *= e.axisExpandWidth / u) ? zk(a, i, o, "all") : l = "none";
  39457. else {
  39458. var p = i[1] - i[0];
  39459. (i = [Wk(0, o[1] * s / p - p / 2)])[1] = Gk(o[1], i[0] + p),
  39460. i[0] = i[1] - p
  39461. }
  39462. return {
  39463. axisExpandWindow: i,
  39464. behavior: l
  39465. }
  39466. }
  39467. ,
  39468. t
  39469. }();
  39470. function jk(t, e) {
  39471. return Gk(Wk(t, e[0]), e[1])
  39472. }
  39473. function qk(t, e) {
  39474. var n = e.layoutLength / (e.axisCount - 1);
  39475. return {
  39476. position: n * t,
  39477. axisNameAvailableWidth: n,
  39478. axisLabelShow: !0
  39479. }
  39480. }
  39481. function Kk(t, e) {
  39482. var n, i, r = e.layoutLength, o = e.axisExpandWidth, a = e.axisCount, s = e.axisCollapseWidth, l = e.winInnerIndices, u = s, h = !1;
  39483. return t < l[0] ? (n = t * s,
  39484. i = s) : t <= l[1] ? (n = e.axisExpandWindow0Pos + t * o - e.axisExpandWindow[0],
  39485. u = o,
  39486. h = !0) : (n = r - (a - 1 - t) * s,
  39487. i = s),
  39488. {
  39489. position: n,
  39490. axisNameAvailableWidth: u,
  39491. axisLabelShow: h,
  39492. nameTruncateMaxWidth: i
  39493. }
  39494. }
  39495. var $k = {
  39496. create: function(t, e) {
  39497. var n = [];
  39498. return t.eachComponent("parallel", (function(i, r) {
  39499. var o = new Zk(i,t,e);
  39500. o.name = "parallel_" + r,
  39501. o.resize(i, e),
  39502. i.coordinateSystem = o,
  39503. o.model = i,
  39504. n.push(o)
  39505. }
  39506. )),
  39507. t.eachSeries((function(t) {
  39508. if ("parallel" === t.get("coordinateSystem")) {
  39509. var e = t.getReferringComponents("parallel", Wo).models[0];
  39510. t.coordinateSystem = e.coordinateSystem
  39511. }
  39512. }
  39513. )),
  39514. n
  39515. }
  39516. }
  39517. , Jk = function(t) {
  39518. function e() {
  39519. var n = null !== t && t.apply(this, arguments) || this;
  39520. return n.type = e.type,
  39521. n.activeIntervals = [],
  39522. n
  39523. }
  39524. return n(e, t),
  39525. e.prototype.getAreaSelectStyle = function() {
  39526. return ia([["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"]])(this.getModel("areaSelectStyle"))
  39527. }
  39528. ,
  39529. e.prototype.setActiveIntervals = function(t) {
  39530. var e = this.activeIntervals = T(t);
  39531. if (e)
  39532. for (var n = e.length - 1; n >= 0; n--)
  39533. Qr(e[n])
  39534. }
  39535. ,
  39536. e.prototype.getActiveState = function(t) {
  39537. var e = this.activeIntervals;
  39538. if (!e.length)
  39539. return "normal";
  39540. if (null == t || isNaN(+t))
  39541. return "inactive";
  39542. if (1 === e.length) {
  39543. var n = e[0];
  39544. if (n[0] <= t && t <= n[1])
  39545. return "active"
  39546. } else
  39547. for (var i = 0, r = e.length; i < r; i++)
  39548. if (e[i][0] <= t && t <= e[i][1])
  39549. return "active";
  39550. return "inactive"
  39551. }
  39552. ,
  39553. e
  39554. }(zp);
  39555. R(Jk, D_);
  39556. var Qk = !0
  39557. , tL = Math.min
  39558. , eL = Math.max
  39559. , nL = Math.pow
  39560. , iL = "globalPan"
  39561. , rL = {
  39562. w: [0, 0],
  39563. e: [0, 1],
  39564. n: [1, 0],
  39565. s: [1, 1]
  39566. }
  39567. , oL = {
  39568. w: "ew",
  39569. e: "ew",
  39570. n: "ns",
  39571. s: "ns",
  39572. ne: "nesw",
  39573. sw: "nesw",
  39574. nw: "nwse",
  39575. se: "nwse"
  39576. }
  39577. , aL = {
  39578. brushStyle: {
  39579. lineWidth: 2,
  39580. stroke: "rgba(210,219,238,0.3)",
  39581. fill: "#D2DBEE"
  39582. },
  39583. transformable: !0,
  39584. brushMode: "single",
  39585. removeOnClick: !1
  39586. }
  39587. , sL = 0
  39588. , lL = function(t) {
  39589. function e(e) {
  39590. var n = t.call(this) || this;
  39591. return n._track = [],
  39592. n._covers = [],
  39593. n._handlers = {},
  39594. n._zr = e,
  39595. n.group = new Br,
  39596. n._uid = "brushController_" + sL++,
  39597. E(NL, (function(t, e) {
  39598. this._handlers[e] = W(t, this)
  39599. }
  39600. ), n),
  39601. n
  39602. }
  39603. return n(e, t),
  39604. e.prototype.enableBrush = function(t) {
  39605. return this._brushType && this._doDisableBrush(),
  39606. t.brushType && this._doEnableBrush(t),
  39607. this
  39608. }
  39609. ,
  39610. e.prototype._doEnableBrush = function(t) {
  39611. var e = this._zr;
  39612. this._enableGlobalPan || function(t, e, n) {
  39613. eT(t)[e] = n
  39614. }(e, iL, this._uid),
  39615. E(this._handlers, (function(t, n) {
  39616. e.on(n, t)
  39617. }
  39618. )),
  39619. this._brushType = t.brushType,
  39620. this._brushOption = C(T(aL), t, !0)
  39621. }
  39622. ,
  39623. e.prototype._doDisableBrush = function() {
  39624. var t = this._zr;
  39625. !function(t, e, n) {
  39626. var i = eT(t);
  39627. i[e] === n && (i[e] = null)
  39628. }(t, iL, this._uid),
  39629. E(this._handlers, (function(e, n) {
  39630. t.off(n, e)
  39631. }
  39632. )),
  39633. this._brushType = this._brushOption = null
  39634. }
  39635. ,
  39636. e.prototype.setPanels = function(t) {
  39637. if (t && t.length) {
  39638. var e = this._panels = {};
  39639. E(t, (function(t) {
  39640. e[t.panelId] = T(t)
  39641. }
  39642. ))
  39643. } else
  39644. this._panels = null;
  39645. return this
  39646. }
  39647. ,
  39648. e.prototype.mount = function(t) {
  39649. t = t || {},
  39650. this._enableGlobalPan = t.enableGlobalPan;
  39651. var e = this.group;
  39652. return this._zr.add(e),
  39653. e.attr({
  39654. x: t.x || 0,
  39655. y: t.y || 0,
  39656. rotation: t.rotation || 0,
  39657. scaleX: t.scaleX || 1,
  39658. scaleY: t.scaleY || 1
  39659. }),
  39660. this._transform = e.getLocalTransform(),
  39661. this
  39662. }
  39663. ,
  39664. e.prototype.updateCovers = function(t) {
  39665. t = z(t, (function(t) {
  39666. return C(T(aL), t, !0)
  39667. }
  39668. ));
  39669. var e = this._covers
  39670. , n = this._covers = []
  39671. , i = this
  39672. , r = this._creatingCover;
  39673. return new Gm(e,t,(function(t, e) {
  39674. return o(t.__brushOption, e)
  39675. }
  39676. ),o).add(a).update(a).remove((function(t) {
  39677. e[t] !== r && i.group.remove(e[t])
  39678. }
  39679. )).execute(),
  39680. this;
  39681. function o(t, e) {
  39682. return (null != t.id ? t.id : "\0-brush-index-" + e) + "-" + t.brushType
  39683. }
  39684. function a(o, a) {
  39685. var s = t[o];
  39686. if (null != a && e[a] === r)
  39687. n[o] = e[a];
  39688. else {
  39689. var l = n[o] = null != a ? (e[a].__brushOption = s,
  39690. e[a]) : hL(i, uL(i, s));
  39691. dL(i, l)
  39692. }
  39693. }
  39694. }
  39695. ,
  39696. e.prototype.unmount = function() {
  39697. return this.enableBrush(!1),
  39698. vL(this),
  39699. this._zr.remove(this.group),
  39700. this
  39701. }
  39702. ,
  39703. e.prototype.dispose = function() {
  39704. this.unmount(),
  39705. this.off()
  39706. }
  39707. ,
  39708. e
  39709. }(jt);
  39710. function uL(t, e) {
  39711. var n = zL[e.brushType].createCover(t, e);
  39712. return n.__brushOption = e,
  39713. pL(n, e),
  39714. t.group.add(n),
  39715. n
  39716. }
  39717. function hL(t, e) {
  39718. var n = fL(e);
  39719. return n.endCreating && (n.endCreating(t, e),
  39720. pL(e, e.__brushOption)),
  39721. e
  39722. }
  39723. function cL(t, e) {
  39724. var n = e.__brushOption;
  39725. fL(e).updateCoverShape(t, e, n.range, n)
  39726. }
  39727. function pL(t, e) {
  39728. var n = e.z;
  39729. null == n && (n = 1e4),
  39730. t.traverse((function(t) {
  39731. t.z = n,
  39732. t.z2 = n
  39733. }
  39734. ))
  39735. }
  39736. function dL(t, e) {
  39737. fL(e).updateCommon(t, e),
  39738. cL(t, e)
  39739. }
  39740. function fL(t) {
  39741. return zL[t.__brushOption.brushType]
  39742. }
  39743. function gL(t, e, n) {
  39744. var i, r = t._panels;
  39745. if (!r)
  39746. return Qk;
  39747. var o = t._transform;
  39748. return E(r, (function(t) {
  39749. t.isTargetByCursor(e, n, o) && (i = t)
  39750. }
  39751. )),
  39752. i
  39753. }
  39754. function yL(t, e) {
  39755. var n = t._panels;
  39756. if (!n)
  39757. return Qk;
  39758. var i = e.__brushOption.panelId;
  39759. return null != i ? n[i] : Qk
  39760. }
  39761. function vL(t) {
  39762. var e = t._covers
  39763. , n = e.length;
  39764. return E(e, (function(e) {
  39765. t.group.remove(e)
  39766. }
  39767. ), t),
  39768. e.length = 0,
  39769. !!n
  39770. }
  39771. function mL(t, e) {
  39772. var n = z(t._covers, (function(t) {
  39773. var e = t.__brushOption
  39774. , n = T(e.range);
  39775. return {
  39776. brushType: e.brushType,
  39777. panelId: e.panelId,
  39778. range: n
  39779. }
  39780. }
  39781. ));
  39782. t.trigger("brush", {
  39783. areas: n,
  39784. isEnd: !!e.isEnd,
  39785. removeOnClick: !!e.removeOnClick
  39786. })
  39787. }
  39788. function xL(t) {
  39789. var e = t.length - 1;
  39790. return e < 0 && (e = 0),
  39791. [t[0], t[e]]
  39792. }
  39793. function _L(t, e, n, i) {
  39794. var r = new Br;
  39795. return r.add(new Ws({
  39796. name: "main",
  39797. style: ML(n),
  39798. silent: !0,
  39799. draggable: !0,
  39800. cursor: "move",
  39801. drift: H(CL, t, e, r, ["n", "s", "w", "e"]),
  39802. ondragend: H(mL, e, {
  39803. isEnd: !0
  39804. })
  39805. })),
  39806. E(i, (function(n) {
  39807. r.add(new Ws({
  39808. name: n.join(""),
  39809. style: {
  39810. opacity: 0
  39811. },
  39812. draggable: !0,
  39813. silent: !0,
  39814. invisible: !0,
  39815. drift: H(CL, t, e, r, n),
  39816. ondragend: H(mL, e, {
  39817. isEnd: !0
  39818. })
  39819. }))
  39820. }
  39821. )),
  39822. r
  39823. }
  39824. function bL(t, e, n, i) {
  39825. var r = i.brushStyle.lineWidth || 0
  39826. , o = eL(r, 6)
  39827. , a = n[0][0]
  39828. , s = n[1][0]
  39829. , l = a - r / 2
  39830. , u = s - r / 2
  39831. , h = n[0][1]
  39832. , c = n[1][1]
  39833. , p = h - o + r / 2
  39834. , d = c - o + r / 2
  39835. , f = h - a
  39836. , g = c - s
  39837. , y = f + r
  39838. , v = g + r;
  39839. SL(t, e, "main", a, s, f, g),
  39840. i.transformable && (SL(t, e, "w", l, u, o, v),
  39841. SL(t, e, "e", p, u, o, v),
  39842. SL(t, e, "n", l, u, y, o),
  39843. SL(t, e, "s", l, d, y, o),
  39844. SL(t, e, "nw", l, u, o, o),
  39845. SL(t, e, "ne", p, u, o, o),
  39846. SL(t, e, "sw", l, d, o, o),
  39847. SL(t, e, "se", p, d, o, o))
  39848. }
  39849. function wL(t, e) {
  39850. var n = e.__brushOption
  39851. , i = n.transformable
  39852. , r = e.childAt(0);
  39853. r.useStyle(ML(n)),
  39854. r.attr({
  39855. silent: !i,
  39856. cursor: i ? "move" : "default"
  39857. }),
  39858. E([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], (function(n) {
  39859. var r = e.childOfName(n.join(""))
  39860. , o = 1 === n.length ? TL(t, n[0]) : function(t, e) {
  39861. var n = [TL(t, e[0]), TL(t, e[1])];
  39862. return ("e" === n[0] || "w" === n[0]) && n.reverse(),
  39863. n.join("")
  39864. }(t, n);
  39865. r && r.attr({
  39866. silent: !i,
  39867. invisible: !i,
  39868. cursor: i ? oL[o] + "-resize" : null
  39869. })
  39870. }
  39871. ))
  39872. }
  39873. function SL(t, e, n, i, r, o, a) {
  39874. var s = e.childOfName(n);
  39875. s && s.setShape(function(t) {
  39876. var e = tL(t[0][0], t[1][0])
  39877. , n = tL(t[0][1], t[1][1])
  39878. , i = eL(t[0][0], t[1][0])
  39879. , r = eL(t[0][1], t[1][1]);
  39880. return {
  39881. x: e,
  39882. y: n,
  39883. width: i - e,
  39884. height: r - n
  39885. }
  39886. }(kL(t, e, [[i, r], [i + o, r + a]])))
  39887. }
  39888. function ML(t) {
  39889. return k({
  39890. strokeNoScale: !0
  39891. }, t.brushStyle)
  39892. }
  39893. function IL(t, e, n, i) {
  39894. var r = [tL(t, n), tL(e, i)]
  39895. , o = [eL(t, n), eL(e, i)];
  39896. return [[r[0], o[0]], [r[1], o[1]]]
  39897. }
  39898. function TL(t, e) {
  39899. var n = Gh({
  39900. w: "left",
  39901. e: "right",
  39902. n: "top",
  39903. s: "bottom"
  39904. }[e], function(t) {
  39905. return Bh(t.group)
  39906. }(t));
  39907. return {
  39908. left: "w",
  39909. right: "e",
  39910. top: "n",
  39911. bottom: "s"
  39912. }[n]
  39913. }
  39914. function CL(t, e, n, i, r, o) {
  39915. var a = n.__brushOption
  39916. , s = t.toRectRange(a.range)
  39917. , l = AL(e, r, o);
  39918. E(i, (function(t) {
  39919. var e = rL[t];
  39920. s[e[0]][e[1]] += l[e[0]]
  39921. }
  39922. )),
  39923. a.range = t.fromRectRange(IL(s[0][0], s[1][0], s[0][1], s[1][1])),
  39924. dL(e, n),
  39925. mL(e, {
  39926. isEnd: !1
  39927. })
  39928. }
  39929. function DL(t, e, n, i) {
  39930. var r = e.__brushOption.range
  39931. , o = AL(t, n, i);
  39932. E(r, (function(t) {
  39933. t[0] += o[0],
  39934. t[1] += o[1]
  39935. }
  39936. )),
  39937. dL(t, e),
  39938. mL(t, {
  39939. isEnd: !1
  39940. })
  39941. }
  39942. function AL(t, e, n) {
  39943. var i = t.group
  39944. , r = i.transformCoordToLocal(e, n)
  39945. , o = i.transformCoordToLocal(0, 0);
  39946. return [r[0] - o[0], r[1] - o[1]]
  39947. }
  39948. function kL(t, e, n) {
  39949. var i = yL(t, e);
  39950. return i && i !== Qk ? i.clipPath(n, t._transform) : T(n)
  39951. }
  39952. function LL(t) {
  39953. var e = t.event;
  39954. e.preventDefault && e.preventDefault()
  39955. }
  39956. function PL(t, e, n) {
  39957. return t.childOfName("main").contain(e, n)
  39958. }
  39959. function OL(t, e, n, i) {
  39960. var r, o = t._creatingCover, a = t._creatingPanel, s = t._brushOption;
  39961. if (t._track.push(n.slice()),
  39962. function(t) {
  39963. var e = t._track;
  39964. if (!e.length)
  39965. return !1;
  39966. var n = e[e.length - 1]
  39967. , i = e[0]
  39968. , r = n[0] - i[0]
  39969. , o = n[1] - i[1];
  39970. return nL(r * r + o * o, .5) > 6
  39971. }(t) || o) {
  39972. if (a && !o) {
  39973. "single" === s.brushMode && vL(t);
  39974. var l = T(s);
  39975. l.brushType = RL(l.brushType, a),
  39976. l.panelId = a === Qk ? null : a.panelId,
  39977. o = t._creatingCover = uL(t, l),
  39978. t._covers.push(o)
  39979. }
  39980. if (o) {
  39981. var u = zL[RL(t._brushType, a)];
  39982. o.__brushOption.range = u.getCreatingRange(kL(t, o, t._track)),
  39983. i && (hL(t, o),
  39984. u.updateCommon(t, o)),
  39985. cL(t, o),
  39986. r = {
  39987. isEnd: i
  39988. }
  39989. }
  39990. } else
  39991. i && "single" === s.brushMode && s.removeOnClick && gL(t, e, n) && vL(t) && (r = {
  39992. isEnd: i,
  39993. removeOnClick: !0
  39994. });
  39995. return r
  39996. }
  39997. function RL(t, e) {
  39998. return "auto" === t ? e.defaultBrushType : t
  39999. }
  40000. var NL = {
  40001. mousedown: function(t) {
  40002. if (this._dragging)
  40003. EL(this, t);
  40004. else if (!t.target || !t.target.draggable) {
  40005. LL(t);
  40006. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  40007. this._creatingCover = null,
  40008. (this._creatingPanel = gL(this, t, e)) && (this._dragging = !0,
  40009. this._track = [e.slice()])
  40010. }
  40011. },
  40012. mousemove: function(t) {
  40013. var e = t.offsetX
  40014. , n = t.offsetY
  40015. , i = this.group.transformCoordToLocal(e, n);
  40016. if (function(t, e, n) {
  40017. if (t._brushType && !function(t, e, n) {
  40018. var i = t._zr;
  40019. return e < 0 || e > i.getWidth() || n < 0 || n > i.getHeight()
  40020. }(t, e.offsetX, e.offsetY)) {
  40021. var i = t._zr
  40022. , r = t._covers
  40023. , o = gL(t, e, n);
  40024. if (!t._dragging)
  40025. for (var a = 0; a < r.length; a++) {
  40026. var s = r[a].__brushOption;
  40027. if (o && (o === Qk || s.panelId === o.panelId) && zL[s.brushType].contain(r[a], n[0], n[1]))
  40028. return
  40029. }
  40030. o && i.setCursorStyle("crosshair")
  40031. }
  40032. }(this, t, i),
  40033. this._dragging) {
  40034. LL(t);
  40035. var r = OL(this, t, i, !1);
  40036. r && mL(this, r)
  40037. }
  40038. },
  40039. mouseup: function(t) {
  40040. EL(this, t)
  40041. }
  40042. };
  40043. function EL(t, e) {
  40044. if (t._dragging) {
  40045. LL(e);
  40046. var n = e.offsetX
  40047. , i = e.offsetY
  40048. , r = t.group.transformCoordToLocal(n, i)
  40049. , o = OL(t, e, r, !0);
  40050. t._dragging = !1,
  40051. t._track = [],
  40052. t._creatingCover = null,
  40053. o && mL(t, o)
  40054. }
  40055. }
  40056. var zL = {
  40057. lineX: VL(0),
  40058. lineY: VL(1),
  40059. rect: {
  40060. createCover: function(t, e) {
  40061. function n(t) {
  40062. return t
  40063. }
  40064. return _L({
  40065. toRectRange: n,
  40066. fromRectRange: n
  40067. }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]])
  40068. },
  40069. getCreatingRange: function(t) {
  40070. var e = xL(t);
  40071. return IL(e[1][0], e[1][1], e[0][0], e[0][1])
  40072. },
  40073. updateCoverShape: function(t, e, n, i) {
  40074. bL(t, e, n, i)
  40075. },
  40076. updateCommon: wL,
  40077. contain: PL
  40078. },
  40079. polygon: {
  40080. createCover: function(t, e) {
  40081. var n = new Br;
  40082. return n.add(new Zu({
  40083. name: "main",
  40084. style: ML(e),
  40085. silent: !0
  40086. })),
  40087. n
  40088. },
  40089. getCreatingRange: function(t) {
  40090. return t
  40091. },
  40092. endCreating: function(t, e) {
  40093. e.remove(e.childAt(0)),
  40094. e.add(new Xu({
  40095. name: "main",
  40096. draggable: !0,
  40097. drift: H(DL, t, e),
  40098. ondragend: H(mL, t, {
  40099. isEnd: !0
  40100. })
  40101. }))
  40102. },
  40103. updateCoverShape: function(t, e, n, i) {
  40104. e.childAt(0).setShape({
  40105. points: kL(t, e, n)
  40106. })
  40107. },
  40108. updateCommon: wL,
  40109. contain: PL
  40110. }
  40111. };
  40112. function VL(t) {
  40113. return {
  40114. createCover: function(e, n) {
  40115. return _L({
  40116. toRectRange: function(e) {
  40117. var n = [e, [0, 100]];
  40118. return t && n.reverse(),
  40119. n
  40120. },
  40121. fromRectRange: function(e) {
  40122. return e[t]
  40123. }
  40124. }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t])
  40125. },
  40126. getCreatingRange: function(e) {
  40127. var n = xL(e);
  40128. return [tL(n[0][t], n[1][t]), eL(n[0][t], n[1][t])]
  40129. },
  40130. updateCoverShape: function(e, n, i, r) {
  40131. var o, a = yL(e, n);
  40132. if (a !== Qk && a.getLinearBrushOtherExtent)
  40133. o = a.getLinearBrushOtherExtent(t);
  40134. else {
  40135. var s = e._zr;
  40136. o = [0, [s.getWidth(), s.getHeight()][1 - t]]
  40137. }
  40138. var l = [i, o];
  40139. t && l.reverse(),
  40140. bL(e, n, l, r)
  40141. },
  40142. updateCommon: wL,
  40143. contain: PL
  40144. }
  40145. }
  40146. function BL(t) {
  40147. return t = WL(t),
  40148. function(e) {
  40149. return Yh(e, t)
  40150. }
  40151. }
  40152. function FL(t, e) {
  40153. return t = WL(t),
  40154. function(n) {
  40155. var i = null != e ? e : n
  40156. , r = i ? t.width : t.height
  40157. , o = i ? t.x : t.y;
  40158. return [o, o + (r || 0)]
  40159. }
  40160. }
  40161. function GL(t, e, n) {
  40162. var i = WL(t);
  40163. return function(t, r) {
  40164. return i.contain(r[0], r[1]) && !hT(t, e, n)
  40165. }
  40166. }
  40167. function WL(t) {
  40168. return ze.create(t)
  40169. }
  40170. var HL = ["axisLine", "axisTickLabel", "axisName"]
  40171. , YL = function(t) {
  40172. function e() {
  40173. var n = null !== t && t.apply(this, arguments) || this;
  40174. return n.type = e.type,
  40175. n
  40176. }
  40177. return n(e, t),
  40178. e.prototype.init = function(e, n) {
  40179. t.prototype.init.apply(this, arguments),
  40180. (this._brushController = new lL(n.getZr())).on("brush", W(this._onBrush, this))
  40181. }
  40182. ,
  40183. e.prototype.render = function(t, e, n, i) {
  40184. if (!function(t, e, n) {
  40185. return n && "axisAreaSelect" === n.type && e.findComponents({
  40186. mainType: "parallelAxis",
  40187. query: n
  40188. })[0] === t
  40189. }(t, e, i)) {
  40190. this.axisModel = t,
  40191. this.api = n,
  40192. this.group.removeAll();
  40193. var r = this._axisGroup;
  40194. if (this._axisGroup = new Br,
  40195. this.group.add(this._axisGroup),
  40196. t.get("show")) {
  40197. var o = function(t, e) {
  40198. return e.getComponent("parallel", t.get("parallelIndex"))
  40199. }(t, e)
  40200. , a = o.coordinateSystem
  40201. , s = t.getAreaSelectStyle()
  40202. , l = s.width
  40203. , u = t.axis.dim
  40204. , h = A({
  40205. strokeContainThreshold: l
  40206. }, a.getAxisLayout(u))
  40207. , c = new dI(t,h);
  40208. E(HL, c.add, c),
  40209. this._axisGroup.add(c.getGroup()),
  40210. this._refreshBrushController(h, s, t, o, l, n),
  40211. Hh(r, this._axisGroup, t)
  40212. }
  40213. }
  40214. }
  40215. ,
  40216. e.prototype._refreshBrushController = function(t, e, n, i, r, o) {
  40217. var a = n.axis.getExtent()
  40218. , s = a[1] - a[0]
  40219. , l = Math.min(30, .1 * Math.abs(s))
  40220. , u = ze.create({
  40221. x: a[0],
  40222. y: -r / 2,
  40223. width: s,
  40224. height: r
  40225. });
  40226. u.x -= l,
  40227. u.width += 2 * l,
  40228. this._brushController.mount({
  40229. enableGlobalPan: !0,
  40230. rotation: t.rotation,
  40231. x: t.position[0],
  40232. y: t.position[1]
  40233. }).setPanels([{
  40234. panelId: "pl",
  40235. clipPath: BL(u),
  40236. isTargetByCursor: GL(u, o, i),
  40237. getLinearBrushOtherExtent: FL(u, 0)
  40238. }]).enableBrush({
  40239. brushType: "lineX",
  40240. brushStyle: e,
  40241. removeOnClick: !0
  40242. }).updateCovers(function(t) {
  40243. var e = t.axis;
  40244. return z(t.activeIntervals, (function(t) {
  40245. return {
  40246. brushType: "lineX",
  40247. panelId: "pl",
  40248. range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
  40249. }
  40250. }
  40251. ))
  40252. }(n))
  40253. }
  40254. ,
  40255. e.prototype._onBrush = function(t) {
  40256. var e = t.areas
  40257. , n = this.axisModel
  40258. , i = n.axis
  40259. , r = z(e, (function(t) {
  40260. return [i.coordToData(t.range[0], !0), i.coordToData(t.range[1], !0)]
  40261. }
  40262. ));
  40263. (!n.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  40264. type: "axisAreaSelect",
  40265. parallelAxisId: n.id,
  40266. intervals: r
  40267. })
  40268. }
  40269. ,
  40270. e.prototype.dispose = function() {
  40271. this._brushController.dispose()
  40272. }
  40273. ,
  40274. e.type = "parallelAxis",
  40275. e
  40276. }(Ag);
  40277. var XL = {
  40278. type: "axisAreaSelect",
  40279. event: "axisAreaSelected"
  40280. };
  40281. var UL = {
  40282. type: "value",
  40283. areaSelectStyle: {
  40284. width: 20,
  40285. borderWidth: 1,
  40286. borderColor: "rgba(160,197,232)",
  40287. color: "rgba(160,197,232)",
  40288. opacity: .3
  40289. },
  40290. realtime: !0,
  40291. z: 10
  40292. };
  40293. function ZL(t) {
  40294. t.registerComponentView(Pk),
  40295. t.registerComponentModel(Nk),
  40296. t.registerCoordinateSystem("parallel", $k),
  40297. t.registerPreprocessor(Lk),
  40298. t.registerComponentModel(Jk),
  40299. t.registerComponentView(YL),
  40300. KM(t, "parallel", Jk, UL),
  40301. function(t) {
  40302. t.registerAction(XL, (function(t, e) {
  40303. e.eachComponent({
  40304. mainType: "parallelAxis",
  40305. query: t
  40306. }, (function(e) {
  40307. e.axis.model.setActiveIntervals(t.intervals)
  40308. }
  40309. ))
  40310. }
  40311. )),
  40312. t.registerAction("parallelAxisExpand", (function(t, e) {
  40313. e.eachComponent({
  40314. mainType: "parallel",
  40315. query: t
  40316. }, (function(e) {
  40317. e.setAxisExpand(t)
  40318. }
  40319. ))
  40320. }
  40321. ))
  40322. }(t)
  40323. }
  40324. var jL = function() {
  40325. this.x1 = 0,
  40326. this.y1 = 0,
  40327. this.x2 = 0,
  40328. this.y2 = 0,
  40329. this.cpx1 = 0,
  40330. this.cpy1 = 0,
  40331. this.cpx2 = 0,
  40332. this.cpy2 = 0,
  40333. this.extent = 0
  40334. }
  40335. , qL = function(t) {
  40336. function e(e) {
  40337. return t.call(this, e) || this
  40338. }
  40339. return n(e, t),
  40340. e.prototype.getDefaultShape = function() {
  40341. return new jL
  40342. }
  40343. ,
  40344. e.prototype.buildPath = function(t, e) {
  40345. var n = e.extent;
  40346. t.moveTo(e.x1, e.y1),
  40347. t.bezierCurveTo(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2),
  40348. "vertical" === e.orient ? (t.lineTo(e.x2 + n, e.y2),
  40349. t.bezierCurveTo(e.cpx2 + n, e.cpy2, e.cpx1 + n, e.cpy1, e.x1 + n, e.y1)) : (t.lineTo(e.x2, e.y2 + n),
  40350. t.bezierCurveTo(e.cpx2, e.cpy2 + n, e.cpx1, e.cpy1 + n, e.x1, e.y1 + n)),
  40351. t.closePath()
  40352. }
  40353. ,
  40354. e.prototype.highlight = function() {
  40355. Ol(this)
  40356. }
  40357. ,
  40358. e.prototype.downplay = function() {
  40359. Rl(this)
  40360. }
  40361. ,
  40362. e
  40363. }(ks)
  40364. , KL = function(t) {
  40365. function e() {
  40366. var n = null !== t && t.apply(this, arguments) || this;
  40367. return n.type = e.type,
  40368. n._focusAdjacencyDisabled = !1,
  40369. n
  40370. }
  40371. return n(e, t),
  40372. e.prototype.render = function(t, e, n) {
  40373. var i = this
  40374. , r = t.getGraph()
  40375. , o = this.group
  40376. , a = t.layoutInfo
  40377. , s = a.width
  40378. , l = a.height
  40379. , u = t.getData()
  40380. , h = t.getData("edge")
  40381. , c = t.get("orient");
  40382. this._model = t,
  40383. o.removeAll(),
  40384. o.x = a.x,
  40385. o.y = a.y,
  40386. r.eachEdge((function(e) {
  40387. var n = new qL
  40388. , i = rl(n);
  40389. i.dataIndex = e.dataIndex,
  40390. i.seriesIndex = t.seriesIndex,
  40391. i.dataType = "edge";
  40392. var r, a, u, p, d, f, g, y, v = e.getModel(), m = v.getModel("lineStyle"), x = m.get("curveness"), _ = e.node1.getLayout(), b = e.node1.getModel(), w = b.get("localX"), S = b.get("localY"), M = e.node2.getLayout(), I = e.node2.getModel(), T = I.get("localX"), C = I.get("localY"), D = e.getLayout();
  40393. n.shape.extent = Math.max(1, D.dy),
  40394. n.shape.orient = c,
  40395. "vertical" === c ? (r = (null != w ? w * s : _.x) + D.sy,
  40396. a = (null != S ? S * l : _.y) + _.dy,
  40397. u = (null != T ? T * s : M.x) + D.ty,
  40398. d = r,
  40399. f = a * (1 - x) + (p = null != C ? C * l : M.y) * x,
  40400. g = u,
  40401. y = a * x + p * (1 - x)) : (r = (null != w ? w * s : _.x) + _.dx,
  40402. a = (null != S ? S * l : _.y) + D.sy,
  40403. d = r * (1 - x) + (u = null != T ? T * s : M.x) * x,
  40404. f = a,
  40405. g = r * x + u * (1 - x),
  40406. y = p = (null != C ? C * l : M.y) + D.ty),
  40407. n.setShape({
  40408. x1: r,
  40409. y1: a,
  40410. x2: u,
  40411. y2: p,
  40412. cpx1: d,
  40413. cpy1: f,
  40414. cpx2: g,
  40415. cpy2: y
  40416. }),
  40417. n.useStyle(m.getItemStyle()),
  40418. $L(n.style, c, e);
  40419. var A = "" + v.get("value")
  40420. , k = rc(v, "edgeLabel");
  40421. ic(n, k, {
  40422. labelFetcher: {
  40423. getFormattedLabel: function(e, n, i, r, o, a) {
  40424. return t.getFormattedLabel(e, n, "edge", r, ot(o, k.normal && k.normal.get("formatter"), A), a)
  40425. }
  40426. },
  40427. labelDataIndex: e.dataIndex,
  40428. defaultText: A
  40429. }),
  40430. n.setTextConfig({
  40431. position: "inside"
  40432. });
  40433. var L = v.getModel("emphasis");
  40434. $l(n, v, "lineStyle", (function(t) {
  40435. var n = t.getItemStyle();
  40436. return $L(n, c, e),
  40437. n
  40438. }
  40439. )),
  40440. o.add(n),
  40441. h.setItemGraphicEl(e.dataIndex, n);
  40442. var P = L.get("focus");
  40443. Zl(n, "adjacency" === P ? e.getAdjacentDataIndices() : "trajectory" === P ? e.getTrajectoryDataIndices() : P, L.get("blurScope"), L.get("disabled"))
  40444. }
  40445. )),
  40446. r.eachNode((function(e) {
  40447. var n = e.getLayout()
  40448. , i = e.getModel()
  40449. , r = i.get("localX")
  40450. , a = i.get("localY")
  40451. , h = i.getModel("emphasis")
  40452. , c = i.get(["itemStyle", "borderRadius"]) || 0
  40453. , p = new Ws({
  40454. shape: {
  40455. x: null != r ? r * s : n.x,
  40456. y: null != a ? a * l : n.y,
  40457. width: n.dx,
  40458. height: n.dy,
  40459. r: c
  40460. },
  40461. style: i.getModel("itemStyle").getItemStyle(),
  40462. z2: 10
  40463. });
  40464. ic(p, rc(i), {
  40465. labelFetcher: {
  40466. getFormattedLabel: function(e, n) {
  40467. return t.getFormattedLabel(e, n, "node")
  40468. }
  40469. },
  40470. labelDataIndex: e.dataIndex,
  40471. defaultText: e.id
  40472. }),
  40473. p.disableLabelAnimation = !0,
  40474. p.setStyle("fill", e.getVisual("color")),
  40475. p.setStyle("decal", e.getVisual("style").decal),
  40476. $l(p, i),
  40477. o.add(p),
  40478. u.setItemGraphicEl(e.dataIndex, p),
  40479. rl(p).dataType = "node";
  40480. var d = h.get("focus");
  40481. Zl(p, "adjacency" === d ? e.getAdjacentDataIndices() : "trajectory" === d ? e.getTrajectoryDataIndices() : d, h.get("blurScope"), h.get("disabled"))
  40482. }
  40483. )),
  40484. u.eachItemGraphicEl((function(e, r) {
  40485. u.getItemModel(r).get("draggable") && (e.drift = function(e, o) {
  40486. i._focusAdjacencyDisabled = !0,
  40487. this.shape.x += e,
  40488. this.shape.y += o,
  40489. this.dirty(),
  40490. n.dispatchAction({
  40491. type: "dragNode",
  40492. seriesId: t.id,
  40493. dataIndex: u.getRawIndex(r),
  40494. localX: this.shape.x / s,
  40495. localY: this.shape.y / l
  40496. })
  40497. }
  40498. ,
  40499. e.ondragend = function() {
  40500. i._focusAdjacencyDisabled = !1
  40501. }
  40502. ,
  40503. e.draggable = !0,
  40504. e.cursor = "move")
  40505. }
  40506. )),
  40507. !this._data && t.isAnimationEnabled() && o.setClipPath(function(t, e, n) {
  40508. var i = new Ws({
  40509. shape: {
  40510. x: t.x - 10,
  40511. y: t.y - 10,
  40512. width: 0,
  40513. height: t.height + 20
  40514. }
  40515. });
  40516. return mh(i, {
  40517. shape: {
  40518. width: t.width + 20
  40519. }
  40520. }, e, n),
  40521. i
  40522. }(o.getBoundingRect(), t, (function() {
  40523. o.removeClipPath()
  40524. }
  40525. ))),
  40526. this._data = t.getData()
  40527. }
  40528. ,
  40529. e.prototype.dispose = function() {}
  40530. ,
  40531. e.type = "sankey",
  40532. e
  40533. }(Og);
  40534. function $L(t, e, n) {
  40535. switch (t.fill) {
  40536. case "source":
  40537. t.fill = n.node1.getVisual("color"),
  40538. t.decal = n.node1.getVisual("style").decal;
  40539. break;
  40540. case "target":
  40541. t.fill = n.node2.getVisual("color"),
  40542. t.decal = n.node2.getVisual("style").decal;
  40543. break;
  40544. case "gradient":
  40545. var i = n.node1.getVisual("color")
  40546. , r = n.node2.getVisual("color");
  40547. U(i) && U(r) && (t.fill = new oh(0,0,+("horizontal" === e),+("vertical" === e),[{
  40548. color: i,
  40549. offset: 0
  40550. }, {
  40551. color: r,
  40552. offset: 1
  40553. }]))
  40554. }
  40555. }
  40556. var JL = function(t) {
  40557. function e() {
  40558. var n = null !== t && t.apply(this, arguments) || this;
  40559. return n.type = e.type,
  40560. n
  40561. }
  40562. return n(e, t),
  40563. e.prototype.getInitialData = function(t, e) {
  40564. var n = t.edges || t.links || []
  40565. , i = t.data || t.nodes || []
  40566. , r = t.levels || [];
  40567. this.levelModels = [];
  40568. for (var o = this.levelModels, a = 0; a < r.length; a++)
  40569. null != r[a].depth && r[a].depth >= 0 && (o[r[a].depth] = new Cc(r[a],this,e));
  40570. var s = uk(i, n, this, !0, (function(t, e) {
  40571. t.wrapMethod("getItemModel", (function(t, e) {
  40572. var n = t.parentModel
  40573. , i = n.getData().getItemLayout(e);
  40574. if (i) {
  40575. var r = i.depth
  40576. , o = n.levelModels[r];
  40577. o && (t.parentModel = o)
  40578. }
  40579. return t
  40580. }
  40581. )),
  40582. e.wrapMethod("getItemModel", (function(t, e) {
  40583. var n = t.parentModel
  40584. , i = n.getGraph().getEdgeByIndex(e).node1.getLayout();
  40585. if (i) {
  40586. var r = i.depth
  40587. , o = n.levelModels[r];
  40588. o && (t.parentModel = o)
  40589. }
  40590. return t
  40591. }
  40592. ))
  40593. }
  40594. ));
  40595. return s.data
  40596. }
  40597. ,
  40598. e.prototype.setNodePosition = function(t, e) {
  40599. var n = (this.option.data || this.option.nodes)[t];
  40600. n.localX = e[0],
  40601. n.localY = e[1]
  40602. }
  40603. ,
  40604. e.prototype.getGraph = function() {
  40605. return this.getData().graph
  40606. }
  40607. ,
  40608. e.prototype.getEdgeData = function() {
  40609. return this.getGraph().edgeData
  40610. }
  40611. ,
  40612. e.prototype.formatTooltip = function(t, e, n) {
  40613. function i(t) {
  40614. return isNaN(t) || null == t
  40615. }
  40616. if ("edge" === n) {
  40617. var r = this.getDataParams(t, n)
  40618. , o = r.data
  40619. , a = r.value;
  40620. return og("nameValue", {
  40621. name: o.source + " -- " + o.target,
  40622. value: a,
  40623. noValue: i(a)
  40624. })
  40625. }
  40626. var s = this.getGraph().getNodeByIndex(t).getLayout().value
  40627. , l = this.getDataParams(t, n).data.name;
  40628. return og("nameValue", {
  40629. name: null != l ? l + "" : null,
  40630. value: s,
  40631. noValue: i(s)
  40632. })
  40633. }
  40634. ,
  40635. e.prototype.optionUpdated = function() {}
  40636. ,
  40637. e.prototype.getDataParams = function(e, n) {
  40638. var i = t.prototype.getDataParams.call(this, e, n);
  40639. if (null == i.value && "node" === n) {
  40640. var r = this.getGraph().getNodeByIndex(e).getLayout().value;
  40641. i.value = r
  40642. }
  40643. return i
  40644. }
  40645. ,
  40646. e.type = "series.sankey",
  40647. e.defaultOption = {
  40648. z: 2,
  40649. coordinateSystem: "view",
  40650. left: "5%",
  40651. top: "5%",
  40652. right: "20%",
  40653. bottom: "5%",
  40654. orient: "horizontal",
  40655. nodeWidth: 20,
  40656. nodeGap: 8,
  40657. draggable: !0,
  40658. layoutIterations: 32,
  40659. label: {
  40660. show: !0,
  40661. position: "right",
  40662. fontSize: 12
  40663. },
  40664. edgeLabel: {
  40665. show: !1,
  40666. fontSize: 12
  40667. },
  40668. levels: [],
  40669. nodeAlign: "justify",
  40670. lineStyle: {
  40671. color: "#314656",
  40672. opacity: .2,
  40673. curveness: .5
  40674. },
  40675. emphasis: {
  40676. label: {
  40677. show: !0
  40678. },
  40679. lineStyle: {
  40680. opacity: .5
  40681. }
  40682. },
  40683. select: {
  40684. itemStyle: {
  40685. borderColor: "#212121"
  40686. }
  40687. },
  40688. animationEasing: "linear",
  40689. animationDuration: 1e3
  40690. },
  40691. e
  40692. }(bg);
  40693. function QL(t, e) {
  40694. t.eachSeriesByType("sankey", (function(t) {
  40695. var n = t.get("nodeWidth")
  40696. , i = t.get("nodeGap")
  40697. , r = function(t, e) {
  40698. return kp(t.getBoxLayoutParams(), {
  40699. width: e.getWidth(),
  40700. height: e.getHeight()
  40701. })
  40702. }(t, e);
  40703. t.layoutInfo = r;
  40704. var o = r.width
  40705. , a = r.height
  40706. , s = t.getGraph()
  40707. , l = s.nodes
  40708. , u = s.edges;
  40709. !function(t) {
  40710. E(t, (function(t) {
  40711. var e = uP(t.outEdges, lP)
  40712. , n = uP(t.inEdges, lP)
  40713. , i = t.getValue() || 0
  40714. , r = Math.max(e, n, i);
  40715. t.setLayout({
  40716. value: r
  40717. }, !0)
  40718. }
  40719. ))
  40720. }(l),
  40721. function(t, e, n, i, r, o, a, s, l) {
  40722. (function(t, e, n, i, r, o, a) {
  40723. for (var s = [], l = [], u = [], h = [], c = 0, p = 0; p < e.length; p++)
  40724. s[p] = 1;
  40725. for (p = 0; p < t.length; p++)
  40726. l[p] = t[p].inEdges.length,
  40727. 0 === l[p] && u.push(t[p]);
  40728. var d = -1;
  40729. for (; u.length; ) {
  40730. for (var f = 0; f < u.length; f++) {
  40731. var g = u[f]
  40732. , y = g.hostGraph.data.getRawDataItem(g.dataIndex)
  40733. , v = null != y.depth && y.depth >= 0;
  40734. v && y.depth > d && (d = y.depth),
  40735. g.setLayout({
  40736. depth: v ? y.depth : c
  40737. }, !0),
  40738. "vertical" === o ? g.setLayout({
  40739. dy: n
  40740. }, !0) : g.setLayout({
  40741. dx: n
  40742. }, !0);
  40743. for (var m = 0; m < g.outEdges.length; m++) {
  40744. var x = g.outEdges[m];
  40745. s[e.indexOf(x)] = 0;
  40746. var _ = x.node2;
  40747. 0 == --l[t.indexOf(_)] && h.indexOf(_) < 0 && h.push(_)
  40748. }
  40749. }
  40750. ++c,
  40751. u = h,
  40752. h = []
  40753. }
  40754. for (p = 0; p < s.length; p++)
  40755. if (1 === s[p])
  40756. throw new Error("Sankey is a DAG, the original data has cycle!");
  40757. var b = d > c - 1 ? d : c - 1;
  40758. a && "left" !== a && function(t, e, n, i) {
  40759. if ("right" === e) {
  40760. for (var r = [], o = t, a = 0; o.length; ) {
  40761. for (var s = 0; s < o.length; s++) {
  40762. var l = o[s];
  40763. l.setLayout({
  40764. skNodeHeight: a
  40765. }, !0);
  40766. for (var u = 0; u < l.inEdges.length; u++) {
  40767. var h = l.inEdges[u];
  40768. r.indexOf(h.node1) < 0 && r.push(h.node1)
  40769. }
  40770. }
  40771. o = r,
  40772. r = [],
  40773. ++a
  40774. }
  40775. E(t, (function(t) {
  40776. tP(t) || t.setLayout({
  40777. depth: Math.max(0, i - t.getLayout().skNodeHeight)
  40778. }, !0)
  40779. }
  40780. ))
  40781. } else
  40782. "justify" === e && function(t, e) {
  40783. E(t, (function(t) {
  40784. tP(t) || t.outEdges.length || t.setLayout({
  40785. depth: e
  40786. }, !0)
  40787. }
  40788. ))
  40789. }(t, i)
  40790. }(t, a, 0, b);
  40791. var w = "vertical" === o ? (r - n) / b : (i - n) / b;
  40792. !function(t, e, n) {
  40793. E(t, (function(t) {
  40794. var i = t.getLayout().depth * e;
  40795. "vertical" === n ? t.setLayout({
  40796. y: i
  40797. }, !0) : t.setLayout({
  40798. x: i
  40799. }, !0)
  40800. }
  40801. ))
  40802. }(t, w, o)
  40803. }
  40804. )(t, e, n, r, o, s, l),
  40805. function(t, e, n, i, r, o, a) {
  40806. var s = function(t, e) {
  40807. var n = []
  40808. , i = "vertical" === e ? "y" : "x"
  40809. , r = Uo(t, (function(t) {
  40810. return t.getLayout()[i]
  40811. }
  40812. ));
  40813. return r.keys.sort((function(t, e) {
  40814. return t - e
  40815. }
  40816. )),
  40817. E(r.keys, (function(t) {
  40818. n.push(r.buckets.get(t))
  40819. }
  40820. )),
  40821. n
  40822. }(t, a);
  40823. (function(t, e, n, i, r, o) {
  40824. var a = 1 / 0;
  40825. E(t, (function(t) {
  40826. var e = t.length
  40827. , s = 0;
  40828. E(t, (function(t) {
  40829. s += t.getLayout().value
  40830. }
  40831. ));
  40832. var l = "vertical" === o ? (i - (e - 1) * r) / s : (n - (e - 1) * r) / s;
  40833. l < a && (a = l)
  40834. }
  40835. )),
  40836. E(t, (function(t) {
  40837. E(t, (function(t, e) {
  40838. var n = t.getLayout().value * a;
  40839. "vertical" === o ? (t.setLayout({
  40840. x: e
  40841. }, !0),
  40842. t.setLayout({
  40843. dx: n
  40844. }, !0)) : (t.setLayout({
  40845. y: e
  40846. }, !0),
  40847. t.setLayout({
  40848. dy: n
  40849. }, !0))
  40850. }
  40851. ))
  40852. }
  40853. )),
  40854. E(e, (function(t) {
  40855. var e = +t.getValue() * a;
  40856. t.setLayout({
  40857. dy: e
  40858. }, !0)
  40859. }
  40860. ))
  40861. }
  40862. )(s, e, n, i, r, a),
  40863. eP(s, r, n, i, a);
  40864. for (var l = 1; o > 0; o--)
  40865. nP(s, l *= .99, a),
  40866. eP(s, r, n, i, a),
  40867. hP(s, l, a),
  40868. eP(s, r, n, i, a)
  40869. }(t, e, o, r, i, a, s),
  40870. function(t, e) {
  40871. var n = "vertical" === e ? "x" : "y";
  40872. E(t, (function(t) {
  40873. t.outEdges.sort((function(t, e) {
  40874. return t.node2.getLayout()[n] - e.node2.getLayout()[n]
  40875. }
  40876. )),
  40877. t.inEdges.sort((function(t, e) {
  40878. return t.node1.getLayout()[n] - e.node1.getLayout()[n]
  40879. }
  40880. ))
  40881. }
  40882. )),
  40883. E(t, (function(t) {
  40884. var e = 0
  40885. , n = 0;
  40886. E(t.outEdges, (function(t) {
  40887. t.setLayout({
  40888. sy: e
  40889. }, !0),
  40890. e += t.getLayout().dy
  40891. }
  40892. )),
  40893. E(t.inEdges, (function(t) {
  40894. t.setLayout({
  40895. ty: n
  40896. }, !0),
  40897. n += t.getLayout().dy
  40898. }
  40899. ))
  40900. }
  40901. ))
  40902. }(t, s)
  40903. }(l, u, n, i, o, a, 0 !== B(l, (function(t) {
  40904. return 0 === t.getLayout().value
  40905. }
  40906. )).length ? 0 : t.get("layoutIterations"), t.get("orient"), t.get("nodeAlign"))
  40907. }
  40908. ))
  40909. }
  40910. function tP(t) {
  40911. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  40912. return null != e.depth && e.depth >= 0
  40913. }
  40914. function eP(t, e, n, i, r) {
  40915. var o = "vertical" === r ? "x" : "y";
  40916. E(t, (function(t) {
  40917. var a, s, l;
  40918. t.sort((function(t, e) {
  40919. return t.getLayout()[o] - e.getLayout()[o]
  40920. }
  40921. ));
  40922. for (var u = 0, h = t.length, c = "vertical" === r ? "dx" : "dy", p = 0; p < h; p++)
  40923. (l = u - (s = t[p]).getLayout()[o]) > 0 && (a = s.getLayout()[o] + l,
  40924. "vertical" === r ? s.setLayout({
  40925. x: a
  40926. }, !0) : s.setLayout({
  40927. y: a
  40928. }, !0)),
  40929. u = s.getLayout()[o] + s.getLayout()[c] + e;
  40930. if ((l = u - e - ("vertical" === r ? i : n)) > 0) {
  40931. a = s.getLayout()[o] - l,
  40932. "vertical" === r ? s.setLayout({
  40933. x: a
  40934. }, !0) : s.setLayout({
  40935. y: a
  40936. }, !0),
  40937. u = a;
  40938. for (p = h - 2; p >= 0; --p)
  40939. (l = (s = t[p]).getLayout()[o] + s.getLayout()[c] + e - u) > 0 && (a = s.getLayout()[o] - l,
  40940. "vertical" === r ? s.setLayout({
  40941. x: a
  40942. }, !0) : s.setLayout({
  40943. y: a
  40944. }, !0)),
  40945. u = s.getLayout()[o]
  40946. }
  40947. }
  40948. ))
  40949. }
  40950. function nP(t, e, n) {
  40951. E(t.slice().reverse(), (function(t) {
  40952. E(t, (function(t) {
  40953. if (t.outEdges.length) {
  40954. var i = uP(t.outEdges, iP, n) / uP(t.outEdges, lP);
  40955. if (isNaN(i)) {
  40956. var r = t.outEdges.length;
  40957. i = r ? uP(t.outEdges, rP, n) / r : 0
  40958. }
  40959. if ("vertical" === n) {
  40960. var o = t.getLayout().x + (i - sP(t, n)) * e;
  40961. t.setLayout({
  40962. x: o
  40963. }, !0)
  40964. } else {
  40965. var a = t.getLayout().y + (i - sP(t, n)) * e;
  40966. t.setLayout({
  40967. y: a
  40968. }, !0)
  40969. }
  40970. }
  40971. }
  40972. ))
  40973. }
  40974. ))
  40975. }
  40976. function iP(t, e) {
  40977. return sP(t.node2, e) * t.getValue()
  40978. }
  40979. function rP(t, e) {
  40980. return sP(t.node2, e)
  40981. }
  40982. function oP(t, e) {
  40983. return sP(t.node1, e) * t.getValue()
  40984. }
  40985. function aP(t, e) {
  40986. return sP(t.node1, e)
  40987. }
  40988. function sP(t, e) {
  40989. return "vertical" === e ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2
  40990. }
  40991. function lP(t) {
  40992. return t.getValue()
  40993. }
  40994. function uP(t, e, n) {
  40995. for (var i = 0, r = t.length, o = -1; ++o < r; ) {
  40996. var a = +e(t[o], n);
  40997. isNaN(a) || (i += a)
  40998. }
  40999. return i
  41000. }
  41001. function hP(t, e, n) {
  41002. E(t, (function(t) {
  41003. E(t, (function(t) {
  41004. if (t.inEdges.length) {
  41005. var i = uP(t.inEdges, oP, n) / uP(t.inEdges, lP);
  41006. if (isNaN(i)) {
  41007. var r = t.inEdges.length;
  41008. i = r ? uP(t.inEdges, aP, n) / r : 0
  41009. }
  41010. if ("vertical" === n) {
  41011. var o = t.getLayout().x + (i - sP(t, n)) * e;
  41012. t.setLayout({
  41013. x: o
  41014. }, !0)
  41015. } else {
  41016. var a = t.getLayout().y + (i - sP(t, n)) * e;
  41017. t.setLayout({
  41018. y: a
  41019. }, !0)
  41020. }
  41021. }
  41022. }
  41023. ))
  41024. }
  41025. ))
  41026. }
  41027. function cP(t) {
  41028. t.eachSeriesByType("sankey", (function(t) {
  41029. var e = t.getGraph()
  41030. , n = e.nodes
  41031. , i = e.edges;
  41032. if (n.length) {
  41033. var r = 1 / 0
  41034. , o = -1 / 0;
  41035. E(n, (function(t) {
  41036. var e = t.getLayout().value;
  41037. e < r && (r = e),
  41038. e > o && (o = e)
  41039. }
  41040. )),
  41041. E(n, (function(e) {
  41042. var n = new kD({
  41043. type: "color",
  41044. mappingMethod: "linear",
  41045. dataExtent: [r, o],
  41046. visual: t.get("color")
  41047. }).mapValueToVisual(e.getLayout().value)
  41048. , i = e.getModel().get(["itemStyle", "color"]);
  41049. null != i ? (e.setVisual("color", i),
  41050. e.setVisual("style", {
  41051. fill: i
  41052. })) : (e.setVisual("color", n),
  41053. e.setVisual("style", {
  41054. fill: n
  41055. }))
  41056. }
  41057. ))
  41058. }
  41059. i.length && E(i, (function(t) {
  41060. var e = t.getModel().get("lineStyle");
  41061. t.setVisual("style", e)
  41062. }
  41063. ))
  41064. }
  41065. ))
  41066. }
  41067. var pP = function() {
  41068. function t() {}
  41069. return t.prototype._hasEncodeRule = function(t) {
  41070. var e = this.getEncode();
  41071. return e && null != e.get(t)
  41072. }
  41073. ,
  41074. t.prototype.getInitialData = function(t, e) {
  41075. var n, i, r = e.getComponent("xAxis", this.get("xAxisIndex")), o = e.getComponent("yAxis", this.get("yAxisIndex")), a = r.get("type"), s = o.get("type");
  41076. "category" === a ? (t.layout = "horizontal",
  41077. n = r.getOrdinalMeta(),
  41078. i = !this._hasEncodeRule("x")) : "category" === s ? (t.layout = "vertical",
  41079. n = o.getOrdinalMeta(),
  41080. i = !this._hasEncodeRule("y")) : t.layout = t.layout || "horizontal";
  41081. var l = ["x", "y"]
  41082. , u = "horizontal" === t.layout ? 0 : 1
  41083. , h = this._baseAxisDim = l[u]
  41084. , c = l[1 - u]
  41085. , p = [r, o]
  41086. , d = p[u].get("type")
  41087. , f = p[1 - u].get("type")
  41088. , g = t.data;
  41089. if (g && i) {
  41090. var y = [];
  41091. E(g, (function(t, e) {
  41092. var n;
  41093. Y(t) ? (n = t.slice(),
  41094. t.unshift(e)) : Y(t.value) ? ((n = A({}, t)).value = n.value.slice(),
  41095. t.value.unshift(e)) : n = t,
  41096. y.push(n)
  41097. }
  41098. )),
  41099. t.data = y
  41100. }
  41101. var v = this.defaultValueDimensions
  41102. , m = [{
  41103. name: h,
  41104. type: Ym(d),
  41105. ordinalMeta: n,
  41106. otherDims: {
  41107. tooltip: !1,
  41108. itemName: 0
  41109. },
  41110. dimsDef: ["base"]
  41111. }, {
  41112. name: c,
  41113. type: Ym(f),
  41114. dimsDef: v.slice()
  41115. }];
  41116. return RM(this, {
  41117. coordDimensions: m,
  41118. dimensionsCount: v.length + 1,
  41119. encodeDefaulter: H(td, m, this)
  41120. })
  41121. }
  41122. ,
  41123. t.prototype.getBaseAxis = function() {
  41124. var t = this._baseAxisDim;
  41125. return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis
  41126. }
  41127. ,
  41128. t
  41129. }()
  41130. , dP = function(t) {
  41131. function e() {
  41132. var n = null !== t && t.apply(this, arguments) || this;
  41133. return n.type = e.type,
  41134. n.defaultValueDimensions = [{
  41135. name: "min",
  41136. defaultTooltip: !0
  41137. }, {
  41138. name: "Q1",
  41139. defaultTooltip: !0
  41140. }, {
  41141. name: "median",
  41142. defaultTooltip: !0
  41143. }, {
  41144. name: "Q3",
  41145. defaultTooltip: !0
  41146. }, {
  41147. name: "max",
  41148. defaultTooltip: !0
  41149. }],
  41150. n.visualDrawType = "stroke",
  41151. n
  41152. }
  41153. return n(e, t),
  41154. e.type = "series.boxplot",
  41155. e.dependencies = ["xAxis", "yAxis", "grid"],
  41156. e.defaultOption = {
  41157. z: 2,
  41158. coordinateSystem: "cartesian2d",
  41159. legendHoverLink: !0,
  41160. layout: null,
  41161. boxWidth: [7, 50],
  41162. itemStyle: {
  41163. color: "#fff",
  41164. borderWidth: 1
  41165. },
  41166. emphasis: {
  41167. scale: !0,
  41168. itemStyle: {
  41169. borderWidth: 2,
  41170. shadowBlur: 5,
  41171. shadowOffsetX: 1,
  41172. shadowOffsetY: 1,
  41173. shadowColor: "rgba(0,0,0,0.2)"
  41174. }
  41175. },
  41176. animationDuration: 800
  41177. },
  41178. e
  41179. }(bg);
  41180. R(dP, pP, !0);
  41181. var fP = function(t) {
  41182. function e() {
  41183. var n = null !== t && t.apply(this, arguments) || this;
  41184. return n.type = e.type,
  41185. n
  41186. }
  41187. return n(e, t),
  41188. e.prototype.render = function(t, e, n) {
  41189. var i = t.getData()
  41190. , r = this.group
  41191. , o = this._data;
  41192. this._data || r.removeAll();
  41193. var a = "horizontal" === t.get("layout") ? 1 : 0;
  41194. i.diff(o).add((function(t) {
  41195. if (i.hasValue(t)) {
  41196. var e = vP(i.getItemLayout(t), i, t, a, !0);
  41197. i.setItemGraphicEl(t, e),
  41198. r.add(e)
  41199. }
  41200. }
  41201. )).update((function(t, e) {
  41202. var n = o.getItemGraphicEl(e);
  41203. if (i.hasValue(t)) {
  41204. var s = i.getItemLayout(t);
  41205. n ? (Sh(n),
  41206. mP(s, n, i, t)) : n = vP(s, i, t, a),
  41207. r.add(n),
  41208. i.setItemGraphicEl(t, n)
  41209. } else
  41210. r.remove(n)
  41211. }
  41212. )).remove((function(t) {
  41213. var e = o.getItemGraphicEl(t);
  41214. e && r.remove(e)
  41215. }
  41216. )).execute(),
  41217. this._data = i
  41218. }
  41219. ,
  41220. e.prototype.remove = function(t) {
  41221. var e = this.group
  41222. , n = this._data;
  41223. this._data = null,
  41224. n && n.eachItemGraphicEl((function(t) {
  41225. t && e.remove(t)
  41226. }
  41227. ))
  41228. }
  41229. ,
  41230. e.type = "boxplot",
  41231. e
  41232. }(Og)
  41233. , gP = function() {}
  41234. , yP = function(t) {
  41235. function e(e) {
  41236. var n = t.call(this, e) || this;
  41237. return n.type = "boxplotBoxPath",
  41238. n
  41239. }
  41240. return n(e, t),
  41241. e.prototype.getDefaultShape = function() {
  41242. return new gP
  41243. }
  41244. ,
  41245. e.prototype.buildPath = function(t, e) {
  41246. var n = e.points
  41247. , i = 0;
  41248. for (t.moveTo(n[i][0], n[i][1]),
  41249. i++; i < 4; i++)
  41250. t.lineTo(n[i][0], n[i][1]);
  41251. for (t.closePath(); i < n.length; i++)
  41252. t.moveTo(n[i][0], n[i][1]),
  41253. i++,
  41254. t.lineTo(n[i][0], n[i][1])
  41255. }
  41256. ,
  41257. e
  41258. }(ks);
  41259. function vP(t, e, n, i, r) {
  41260. var o = t.ends
  41261. , a = new yP({
  41262. shape: {
  41263. points: r ? xP(o, i, t) : o
  41264. }
  41265. });
  41266. return mP(t, a, e, n, r),
  41267. a
  41268. }
  41269. function mP(t, e, n, i, r) {
  41270. var o = n.hostModel;
  41271. (0,
  41272. Qh[r ? "initProps" : "updateProps"])(e, {
  41273. shape: {
  41274. points: t.ends
  41275. }
  41276. }, o, i),
  41277. e.useStyle(n.getItemVisual(i, "style")),
  41278. e.style.strokeNoScale = !0,
  41279. e.z2 = 100;
  41280. var a = n.getItemModel(i)
  41281. , s = a.getModel("emphasis");
  41282. $l(e, a),
  41283. Zl(e, s.get("focus"), s.get("blurScope"), s.get("disabled"))
  41284. }
  41285. function xP(t, e, n) {
  41286. return z(t, (function(t) {
  41287. return (t = t.slice())[e] = n.initBaseline,
  41288. t
  41289. }
  41290. ))
  41291. }
  41292. var _P = E;
  41293. function bP(t) {
  41294. var e = function(t) {
  41295. var e = []
  41296. , n = [];
  41297. return t.eachSeriesByType("boxplot", (function(t) {
  41298. var i = t.getBaseAxis()
  41299. , r = P(n, i);
  41300. r < 0 && (r = n.length,
  41301. n[r] = i,
  41302. e[r] = {
  41303. axis: i,
  41304. seriesModels: []
  41305. }),
  41306. e[r].seriesModels.push(t)
  41307. }
  41308. )),
  41309. e
  41310. }(t);
  41311. _P(e, (function(t) {
  41312. var e = t.seriesModels;
  41313. e.length && (!function(t) {
  41314. var e, n = t.axis, i = t.seriesModels, r = i.length, o = t.boxWidthList = [], a = t.boxOffsetList = [], s = [];
  41315. if ("category" === n.type)
  41316. e = n.getBandWidth();
  41317. else {
  41318. var l = 0;
  41319. _P(i, (function(t) {
  41320. l = Math.max(l, t.getData().count())
  41321. }
  41322. ));
  41323. var u = n.getExtent();
  41324. e = Math.abs(u[1] - u[0]) / l
  41325. }
  41326. _P(i, (function(t) {
  41327. var n = t.get("boxWidth");
  41328. Y(n) || (n = [n, n]),
  41329. s.push([$r(n[0], e) || 0, $r(n[1], e) || 0])
  41330. }
  41331. ));
  41332. var h = .8 * e - 2
  41333. , c = h / r * .3
  41334. , p = (h - c * (r - 1)) / r
  41335. , d = p / 2 - h / 2;
  41336. _P(i, (function(t, e) {
  41337. a.push(d),
  41338. d += c + p,
  41339. o.push(Math.min(Math.max(p, s[e][0]), s[e][1]))
  41340. }
  41341. ))
  41342. }(t),
  41343. _P(e, (function(e, n) {
  41344. !function(t, e, n) {
  41345. var i = t.coordinateSystem
  41346. , r = t.getData()
  41347. , o = n / 2
  41348. , a = "horizontal" === t.get("layout") ? 0 : 1
  41349. , s = 1 - a
  41350. , l = ["x", "y"]
  41351. , u = r.mapDimension(l[a])
  41352. , h = r.mapDimensionsAll(l[s]);
  41353. if (null == u || h.length < 5)
  41354. return;
  41355. for (var c = 0; c < r.count(); c++) {
  41356. var p = r.get(u, c)
  41357. , d = x(p, h[2], c)
  41358. , f = x(p, h[0], c)
  41359. , g = x(p, h[1], c)
  41360. , y = x(p, h[3], c)
  41361. , v = x(p, h[4], c)
  41362. , m = [];
  41363. _(m, g, !1),
  41364. _(m, y, !0),
  41365. m.push(f, g, v, y),
  41366. b(m, f),
  41367. b(m, v),
  41368. b(m, d),
  41369. r.setItemLayout(c, {
  41370. initBaseline: d[s],
  41371. ends: m
  41372. })
  41373. }
  41374. function x(t, n, o) {
  41375. var l, u = r.get(n, o), h = [];
  41376. return h[a] = t,
  41377. h[s] = u,
  41378. isNaN(t) || isNaN(u) ? l = [NaN, NaN] : (l = i.dataToPoint(h))[a] += e,
  41379. l
  41380. }
  41381. function _(t, e, n) {
  41382. var i = e.slice()
  41383. , r = e.slice();
  41384. i[a] += o,
  41385. r[a] -= o,
  41386. n ? t.push(i, r) : t.push(r, i)
  41387. }
  41388. function b(t, e) {
  41389. var n = e.slice()
  41390. , i = e.slice();
  41391. n[a] -= o,
  41392. i[a] += o,
  41393. t.push(n, i)
  41394. }
  41395. }(e, t.boxOffsetList[n], t.boxWidthList[n])
  41396. }
  41397. )))
  41398. }
  41399. ))
  41400. }
  41401. var wP = {
  41402. type: "echarts:boxplot",
  41403. transform: function(t) {
  41404. var e = t.upstream;
  41405. if (e.sourceFormat !== Hp) {
  41406. var n = "";
  41407. 0,
  41408. wo(n)
  41409. }
  41410. var i = function(t, e) {
  41411. for (var n = [], i = [], r = (e = e || {}).boundIQR, o = "none" === r || 0 === r, a = 0; a < t.length; a++) {
  41412. var s = Qr(t[a].slice())
  41413. , l = fo(s, .25)
  41414. , u = fo(s, .5)
  41415. , h = fo(s, .75)
  41416. , c = s[0]
  41417. , p = s[s.length - 1]
  41418. , d = (null == r ? 1.5 : r) * (h - l)
  41419. , f = o ? c : Math.max(c, l - d)
  41420. , g = o ? p : Math.min(p, h + d)
  41421. , y = e.itemNameFormatter
  41422. , v = X(y) ? y({
  41423. value: a
  41424. }) : U(y) ? y.replace("{value}", a + "") : a + "";
  41425. n.push([v, f, l, u, h, g]);
  41426. for (var m = 0; m < s.length; m++) {
  41427. var x = s[m];
  41428. if (x < f || x > g) {
  41429. var _ = [v, x];
  41430. i.push(_)
  41431. }
  41432. }
  41433. }
  41434. return {
  41435. boxData: n,
  41436. outliers: i
  41437. }
  41438. }(e.getRawData(), t.config);
  41439. return [{
  41440. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  41441. data: i.boxData
  41442. }, {
  41443. data: i.outliers
  41444. }]
  41445. }
  41446. };
  41447. var SP = ["itemStyle", "borderColor"]
  41448. , MP = ["itemStyle", "borderColor0"]
  41449. , IP = ["itemStyle", "borderColorDoji"]
  41450. , TP = ["itemStyle", "color"]
  41451. , CP = ["itemStyle", "color0"];
  41452. function DP(t, e) {
  41453. return e.get(t > 0 ? TP : CP)
  41454. }
  41455. function AP(t, e) {
  41456. return e.get(0 === t ? IP : t > 0 ? SP : MP)
  41457. }
  41458. var kP = {
  41459. seriesType: "candlestick",
  41460. plan: kg(),
  41461. performRawSeries: !0,
  41462. reset: function(t, e) {
  41463. if (!e.isSeriesFiltered(t))
  41464. return !t.pipelineContext.large && {
  41465. progress: function(t, e) {
  41466. for (var n; null != (n = t.next()); ) {
  41467. var i = e.getItemModel(n)
  41468. , r = e.getItemLayout(n).sign
  41469. , o = i.getItemStyle();
  41470. o.fill = DP(r, i),
  41471. o.stroke = AP(r, i) || o.fill,
  41472. A(e.ensureUniqueItemVisual(n, "style"), o)
  41473. }
  41474. }
  41475. }
  41476. }
  41477. }
  41478. , LP = ["color", "borderColor"]
  41479. , PP = function(t) {
  41480. function e() {
  41481. var n = null !== t && t.apply(this, arguments) || this;
  41482. return n.type = e.type,
  41483. n
  41484. }
  41485. return n(e, t),
  41486. e.prototype.render = function(t, e, n) {
  41487. this.group.removeClipPath(),
  41488. this._progressiveEls = null,
  41489. this._updateDrawMode(t),
  41490. this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t)
  41491. }
  41492. ,
  41493. e.prototype.incrementalPrepareRender = function(t, e, n) {
  41494. this._clear(),
  41495. this._updateDrawMode(t)
  41496. }
  41497. ,
  41498. e.prototype.incrementalRender = function(t, e, n, i) {
  41499. this._progressiveEls = [],
  41500. this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e)
  41501. }
  41502. ,
  41503. e.prototype.eachRendered = function(t) {
  41504. Jh(this._progressiveEls || this.group, t)
  41505. }
  41506. ,
  41507. e.prototype._updateDrawMode = function(t) {
  41508. var e = t.pipelineContext.large;
  41509. null != this._isLargeDraw && e === this._isLargeDraw || (this._isLargeDraw = e,
  41510. this._clear())
  41511. }
  41512. ,
  41513. e.prototype._renderNormal = function(t) {
  41514. var e = t.getData()
  41515. , n = this._data
  41516. , i = this.group
  41517. , r = e.getLayout("isSimpleBox")
  41518. , o = t.get("clip", !0)
  41519. , a = t.coordinateSystem
  41520. , s = a.getArea && a.getArea();
  41521. this._data || i.removeAll(),
  41522. e.diff(n).add((function(n) {
  41523. if (e.hasValue(n)) {
  41524. var a = e.getItemLayout(n);
  41525. if (o && EP(s, a))
  41526. return;
  41527. var l = NP(a, n, !0);
  41528. mh(l, {
  41529. shape: {
  41530. points: a.ends
  41531. }
  41532. }, t, n),
  41533. zP(l, e, n, r),
  41534. i.add(l),
  41535. e.setItemGraphicEl(n, l)
  41536. }
  41537. }
  41538. )).update((function(a, l) {
  41539. var u = n.getItemGraphicEl(l);
  41540. if (e.hasValue(a)) {
  41541. var h = e.getItemLayout(a);
  41542. o && EP(s, h) ? i.remove(u) : (u ? (vh(u, {
  41543. shape: {
  41544. points: h.ends
  41545. }
  41546. }, t, a),
  41547. Sh(u)) : u = NP(h),
  41548. zP(u, e, a, r),
  41549. i.add(u),
  41550. e.setItemGraphicEl(a, u))
  41551. } else
  41552. i.remove(u)
  41553. }
  41554. )).remove((function(t) {
  41555. var e = n.getItemGraphicEl(t);
  41556. e && i.remove(e)
  41557. }
  41558. )).execute(),
  41559. this._data = e
  41560. }
  41561. ,
  41562. e.prototype._renderLarge = function(t) {
  41563. this._clear(),
  41564. GP(t, this.group);
  41565. var e = t.get("clip", !0) ? PS(t.coordinateSystem, !1, t) : null;
  41566. e ? this.group.setClipPath(e) : this.group.removeClipPath()
  41567. }
  41568. ,
  41569. e.prototype._incrementalRenderNormal = function(t, e) {
  41570. for (var n, i = e.getData(), r = i.getLayout("isSimpleBox"); null != (n = t.next()); ) {
  41571. var o = NP(i.getItemLayout(n));
  41572. zP(o, i, n, r),
  41573. o.incremental = !0,
  41574. this.group.add(o),
  41575. this._progressiveEls.push(o)
  41576. }
  41577. }
  41578. ,
  41579. e.prototype._incrementalRenderLarge = function(t, e) {
  41580. GP(e, this.group, this._progressiveEls, !0)
  41581. }
  41582. ,
  41583. e.prototype.remove = function(t) {
  41584. this._clear()
  41585. }
  41586. ,
  41587. e.prototype._clear = function() {
  41588. this.group.removeAll(),
  41589. this._data = null
  41590. }
  41591. ,
  41592. e.type = "candlestick",
  41593. e
  41594. }(Og)
  41595. , OP = function() {}
  41596. , RP = function(t) {
  41597. function e(e) {
  41598. var n = t.call(this, e) || this;
  41599. return n.type = "normalCandlestickBox",
  41600. n
  41601. }
  41602. return n(e, t),
  41603. e.prototype.getDefaultShape = function() {
  41604. return new OP
  41605. }
  41606. ,
  41607. e.prototype.buildPath = function(t, e) {
  41608. var n = e.points;
  41609. this.__simpleBox ? (t.moveTo(n[4][0], n[4][1]),
  41610. t.lineTo(n[6][0], n[6][1])) : (t.moveTo(n[0][0], n[0][1]),
  41611. t.lineTo(n[1][0], n[1][1]),
  41612. t.lineTo(n[2][0], n[2][1]),
  41613. t.lineTo(n[3][0], n[3][1]),
  41614. t.closePath(),
  41615. t.moveTo(n[4][0], n[4][1]),
  41616. t.lineTo(n[5][0], n[5][1]),
  41617. t.moveTo(n[6][0], n[6][1]),
  41618. t.lineTo(n[7][0], n[7][1]))
  41619. }
  41620. ,
  41621. e
  41622. }(ks);
  41623. function NP(t, e, n) {
  41624. var i = t.ends;
  41625. return new RP({
  41626. shape: {
  41627. points: n ? VP(i, t) : i
  41628. },
  41629. z2: 100
  41630. })
  41631. }
  41632. function EP(t, e) {
  41633. for (var n = !0, i = 0; i < e.ends.length; i++)
  41634. if (t.contain(e.ends[i][0], e.ends[i][1])) {
  41635. n = !1;
  41636. break
  41637. }
  41638. return n
  41639. }
  41640. function zP(t, e, n, i) {
  41641. var r = e.getItemModel(n);
  41642. t.useStyle(e.getItemVisual(n, "style")),
  41643. t.style.strokeNoScale = !0,
  41644. t.__simpleBox = i,
  41645. $l(t, r);
  41646. var o = e.getItemLayout(n).sign;
  41647. E(t.states, (function(t, e) {
  41648. var n = r.getModel(e)
  41649. , i = DP(o, n)
  41650. , a = AP(o, n) || i
  41651. , s = t.style || (t.style = {});
  41652. i && (s.fill = i),
  41653. a && (s.stroke = a)
  41654. }
  41655. ));
  41656. var a = r.getModel("emphasis");
  41657. Zl(t, a.get("focus"), a.get("blurScope"), a.get("disabled"))
  41658. }
  41659. function VP(t, e) {
  41660. return z(t, (function(t) {
  41661. return (t = t.slice())[1] = e.initBaseline,
  41662. t
  41663. }
  41664. ))
  41665. }
  41666. var BP = function() {}
  41667. , FP = function(t) {
  41668. function e(e) {
  41669. var n = t.call(this, e) || this;
  41670. return n.type = "largeCandlestickBox",
  41671. n
  41672. }
  41673. return n(e, t),
  41674. e.prototype.getDefaultShape = function() {
  41675. return new BP
  41676. }
  41677. ,
  41678. e.prototype.buildPath = function(t, e) {
  41679. for (var n = e.points, i = 0; i < n.length; )
  41680. if (this.__sign === n[i++]) {
  41681. var r = n[i++];
  41682. t.moveTo(r, n[i++]),
  41683. t.lineTo(r, n[i++])
  41684. } else
  41685. i += 3
  41686. }
  41687. ,
  41688. e
  41689. }(ks);
  41690. function GP(t, e, n, i) {
  41691. var r = t.getData().getLayout("largePoints")
  41692. , o = new FP({
  41693. shape: {
  41694. points: r
  41695. },
  41696. __sign: 1,
  41697. ignoreCoarsePointer: !0
  41698. });
  41699. e.add(o);
  41700. var a = new FP({
  41701. shape: {
  41702. points: r
  41703. },
  41704. __sign: -1,
  41705. ignoreCoarsePointer: !0
  41706. });
  41707. e.add(a);
  41708. var s = new FP({
  41709. shape: {
  41710. points: r
  41711. },
  41712. __sign: 0,
  41713. ignoreCoarsePointer: !0
  41714. });
  41715. e.add(s),
  41716. WP(1, o, t),
  41717. WP(-1, a, t),
  41718. WP(0, s, t),
  41719. i && (o.incremental = !0,
  41720. a.incremental = !0),
  41721. n && n.push(o, a)
  41722. }
  41723. function WP(t, e, n, i) {
  41724. var r = AP(t, n) || DP(t, n)
  41725. , o = n.getModel("itemStyle").getItemStyle(LP);
  41726. e.useStyle(o),
  41727. e.style.fill = null,
  41728. e.style.stroke = r
  41729. }
  41730. var HP = function(t) {
  41731. function e() {
  41732. var n = null !== t && t.apply(this, arguments) || this;
  41733. return n.type = e.type,
  41734. n.defaultValueDimensions = [{
  41735. name: "open",
  41736. defaultTooltip: !0
  41737. }, {
  41738. name: "close",
  41739. defaultTooltip: !0
  41740. }, {
  41741. name: "lowest",
  41742. defaultTooltip: !0
  41743. }, {
  41744. name: "highest",
  41745. defaultTooltip: !0
  41746. }],
  41747. n
  41748. }
  41749. return n(e, t),
  41750. e.prototype.getShadowDim = function() {
  41751. return "open"
  41752. }
  41753. ,
  41754. e.prototype.brushSelector = function(t, e, n) {
  41755. var i = e.getItemLayout(t);
  41756. return i && n.rect(i.brushRect)
  41757. }
  41758. ,
  41759. e.type = "series.candlestick",
  41760. e.dependencies = ["xAxis", "yAxis", "grid"],
  41761. e.defaultOption = {
  41762. z: 2,
  41763. coordinateSystem: "cartesian2d",
  41764. legendHoverLink: !0,
  41765. layout: null,
  41766. clip: !0,
  41767. itemStyle: {
  41768. color: "#eb5454",
  41769. color0: "#47b262",
  41770. borderColor: "#eb5454",
  41771. borderColor0: "#47b262",
  41772. borderColorDoji: null,
  41773. borderWidth: 1
  41774. },
  41775. emphasis: {
  41776. itemStyle: {
  41777. borderWidth: 2
  41778. }
  41779. },
  41780. barMaxWidth: null,
  41781. barMinWidth: null,
  41782. barWidth: null,
  41783. large: !0,
  41784. largeThreshold: 600,
  41785. progressive: 3e3,
  41786. progressiveThreshold: 1e4,
  41787. progressiveChunkMode: "mod",
  41788. animationEasing: "linear",
  41789. animationDuration: 300
  41790. },
  41791. e
  41792. }(bg);
  41793. function YP(t) {
  41794. t && Y(t.series) && E(t.series, (function(t) {
  41795. q(t) && "k" === t.type && (t.type = "candlestick")
  41796. }
  41797. ))
  41798. }
  41799. R(HP, pP, !0);
  41800. var XP = {
  41801. seriesType: "candlestick",
  41802. plan: kg(),
  41803. reset: function(t) {
  41804. var e = t.coordinateSystem
  41805. , n = t.getData()
  41806. , i = function(t, e) {
  41807. var n, i = t.getBaseAxis(), r = "category" === i.type ? i.getBandWidth() : (n = i.getExtent(),
  41808. Math.abs(n[1] - n[0]) / e.count()), o = $r(rt(t.get("barMaxWidth"), r), r), a = $r(rt(t.get("barMinWidth"), 1), r), s = t.get("barWidth");
  41809. return null != s ? $r(s, r) : Math.max(Math.min(r / 2, o), a)
  41810. }(t, n)
  41811. , r = ["x", "y"]
  41812. , o = n.getDimensionIndex(n.mapDimension(r[0]))
  41813. , a = z(n.mapDimensionsAll(r[1]), n.getDimensionIndex, n)
  41814. , s = a[0]
  41815. , l = a[1]
  41816. , u = a[2]
  41817. , h = a[3];
  41818. if (n.setLayout({
  41819. candleWidth: i,
  41820. isSimpleBox: i <= 1.3
  41821. }),
  41822. !(o < 0 || a.length < 4))
  41823. return {
  41824. progress: t.pipelineContext.large ? function(n, i) {
  41825. var r, a, c = Bx(4 * n.count), p = 0, d = [], f = [], g = i.getStore(), y = !!t.get(["itemStyle", "borderColorDoji"]);
  41826. for (; null != (a = n.next()); ) {
  41827. var v = g.get(o, a)
  41828. , m = g.get(s, a)
  41829. , x = g.get(l, a)
  41830. , _ = g.get(u, a)
  41831. , b = g.get(h, a);
  41832. isNaN(v) || isNaN(_) || isNaN(b) ? (c[p++] = NaN,
  41833. p += 3) : (c[p++] = UP(g, a, m, x, l, y),
  41834. d[0] = v,
  41835. d[1] = _,
  41836. r = e.dataToPoint(d, null, f),
  41837. c[p++] = r ? r[0] : NaN,
  41838. c[p++] = r ? r[1] : NaN,
  41839. d[1] = b,
  41840. r = e.dataToPoint(d, null, f),
  41841. c[p++] = r ? r[1] : NaN)
  41842. }
  41843. i.setLayout("largePoints", c)
  41844. }
  41845. : function(t, n) {
  41846. var r, a = n.getStore();
  41847. for (; null != (r = t.next()); ) {
  41848. var c = a.get(o, r)
  41849. , p = a.get(s, r)
  41850. , d = a.get(l, r)
  41851. , f = a.get(u, r)
  41852. , g = a.get(h, r)
  41853. , y = Math.min(p, d)
  41854. , v = Math.max(p, d)
  41855. , m = M(y, c)
  41856. , x = M(v, c)
  41857. , _ = M(f, c)
  41858. , b = M(g, c)
  41859. , w = [];
  41860. I(w, x, 0),
  41861. I(w, m, 1),
  41862. w.push(C(b), C(x), C(_), C(m));
  41863. var S = !!n.getItemModel(r).get(["itemStyle", "borderColorDoji"]);
  41864. n.setItemLayout(r, {
  41865. sign: UP(a, r, p, d, l, S),
  41866. initBaseline: p > d ? x[1] : m[1],
  41867. ends: w,
  41868. brushRect: T(f, g, c)
  41869. })
  41870. }
  41871. function M(t, n) {
  41872. var i = [];
  41873. return i[0] = n,
  41874. i[1] = t,
  41875. isNaN(n) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(i)
  41876. }
  41877. function I(t, e, n) {
  41878. var r = e.slice()
  41879. , o = e.slice();
  41880. r[0] = Vh(r[0] + i / 2, 1, !1),
  41881. o[0] = Vh(o[0] - i / 2, 1, !0),
  41882. n ? t.push(r, o) : t.push(o, r)
  41883. }
  41884. function T(t, e, n) {
  41885. var r = M(t, n)
  41886. , o = M(e, n);
  41887. return r[0] -= i / 2,
  41888. o[0] -= i / 2,
  41889. {
  41890. x: r[0],
  41891. y: r[1],
  41892. width: i,
  41893. height: o[1] - r[1]
  41894. }
  41895. }
  41896. function C(t) {
  41897. return t[0] = Vh(t[0], 1),
  41898. t
  41899. }
  41900. }
  41901. }
  41902. }
  41903. };
  41904. function UP(t, e, n, i, r, o) {
  41905. return n > i ? -1 : n < i ? 1 : o ? 0 : e > 0 ? t.get(r, e - 1) <= i ? 1 : -1 : 1
  41906. }
  41907. function ZP(t, e) {
  41908. var n = e.rippleEffectColor || e.color;
  41909. t.eachChild((function(t) {
  41910. t.attr({
  41911. z: e.z,
  41912. zlevel: e.zlevel,
  41913. style: {
  41914. stroke: "stroke" === e.brushType ? n : null,
  41915. fill: "fill" === e.brushType ? n : null
  41916. }
  41917. })
  41918. }
  41919. ))
  41920. }
  41921. var jP = function(t) {
  41922. function e(e, n) {
  41923. var i = t.call(this) || this
  41924. , r = new fS(e,n)
  41925. , o = new Br;
  41926. return i.add(r),
  41927. i.add(o),
  41928. i.updateData(e, n),
  41929. i
  41930. }
  41931. return n(e, t),
  41932. e.prototype.stopEffectAnimation = function() {
  41933. this.childAt(1).removeAll()
  41934. }
  41935. ,
  41936. e.prototype.startEffectAnimation = function(t) {
  41937. for (var e = t.symbolType, n = t.color, i = t.rippleNumber, r = this.childAt(1), o = 0; o < i; o++) {
  41938. var a = Xy(e, -1, -1, 2, 2, n);
  41939. a.attr({
  41940. style: {
  41941. strokeNoScale: !0
  41942. },
  41943. z2: 99,
  41944. silent: !0,
  41945. scaleX: .5,
  41946. scaleY: .5
  41947. });
  41948. var s = -o / i * t.period + t.effectOffset;
  41949. a.animate("", !0).when(t.period, {
  41950. scaleX: t.rippleScale / 2,
  41951. scaleY: t.rippleScale / 2
  41952. }).delay(s).start(),
  41953. a.animateStyle(!0).when(t.period, {
  41954. opacity: 0
  41955. }).delay(s).start(),
  41956. r.add(a)
  41957. }
  41958. ZP(r, t)
  41959. }
  41960. ,
  41961. e.prototype.updateEffectAnimation = function(t) {
  41962. for (var e = this._effectCfg, n = this.childAt(1), i = ["symbolType", "period", "rippleScale", "rippleNumber"], r = 0; r < i.length; r++) {
  41963. var o = i[r];
  41964. if (e[o] !== t[o])
  41965. return this.stopEffectAnimation(),
  41966. void this.startEffectAnimation(t)
  41967. }
  41968. ZP(n, t)
  41969. }
  41970. ,
  41971. e.prototype.highlight = function() {
  41972. Ol(this)
  41973. }
  41974. ,
  41975. e.prototype.downplay = function() {
  41976. Rl(this)
  41977. }
  41978. ,
  41979. e.prototype.getSymbolType = function() {
  41980. var t = this.childAt(0);
  41981. return t && t.getSymbolType()
  41982. }
  41983. ,
  41984. e.prototype.updateData = function(t, e) {
  41985. var n = this
  41986. , i = t.hostModel;
  41987. this.childAt(0).updateData(t, e);
  41988. var r = this.childAt(1)
  41989. , o = t.getItemModel(e)
  41990. , a = t.getItemVisual(e, "symbol")
  41991. , s = Uy(t.getItemVisual(e, "symbolSize"))
  41992. , l = t.getItemVisual(e, "style")
  41993. , u = l && l.fill
  41994. , h = o.getModel("emphasis");
  41995. r.setScale(s),
  41996. r.traverse((function(t) {
  41997. t.setStyle("fill", u)
  41998. }
  41999. ));
  42000. var c = Zy(t.getItemVisual(e, "symbolOffset"), s);
  42001. c && (r.x = c[0],
  42002. r.y = c[1]);
  42003. var p = t.getItemVisual(e, "symbolRotate");
  42004. r.rotation = (p || 0) * Math.PI / 180 || 0;
  42005. var d = {};
  42006. d.showEffectOn = i.get("showEffectOn"),
  42007. d.rippleScale = o.get(["rippleEffect", "scale"]),
  42008. d.brushType = o.get(["rippleEffect", "brushType"]),
  42009. d.period = 1e3 * o.get(["rippleEffect", "period"]),
  42010. d.effectOffset = e / t.count(),
  42011. d.z = i.getShallow("z") || 0,
  42012. d.zlevel = i.getShallow("zlevel") || 0,
  42013. d.symbolType = a,
  42014. d.color = u,
  42015. d.rippleEffectColor = o.get(["rippleEffect", "color"]),
  42016. d.rippleNumber = o.get(["rippleEffect", "number"]),
  42017. "render" === d.showEffectOn ? (this._effectCfg ? this.updateEffectAnimation(d) : this.startEffectAnimation(d),
  42018. this._effectCfg = d) : (this._effectCfg = null,
  42019. this.stopEffectAnimation(),
  42020. this.onHoverStateChange = function(t) {
  42021. "emphasis" === t ? "render" !== d.showEffectOn && n.startEffectAnimation(d) : "normal" === t && "render" !== d.showEffectOn && n.stopEffectAnimation()
  42022. }
  42023. ),
  42024. this._effectCfg = d,
  42025. Zl(this, h.get("focus"), h.get("blurScope"), h.get("disabled"))
  42026. }
  42027. ,
  42028. e.prototype.fadeOut = function(t) {
  42029. t && t()
  42030. }
  42031. ,
  42032. e
  42033. }(Br)
  42034. , qP = function(t) {
  42035. function e() {
  42036. var n = null !== t && t.apply(this, arguments) || this;
  42037. return n.type = e.type,
  42038. n
  42039. }
  42040. return n(e, t),
  42041. e.prototype.init = function() {
  42042. this._symbolDraw = new xS(jP)
  42043. }
  42044. ,
  42045. e.prototype.render = function(t, e, n) {
  42046. var i = t.getData()
  42047. , r = this._symbolDraw;
  42048. r.updateData(i, {
  42049. clipShape: this._getClipShape(t)
  42050. }),
  42051. this.group.add(r.group)
  42052. }
  42053. ,
  42054. e.prototype._getClipShape = function(t) {
  42055. var e = t.coordinateSystem
  42056. , n = e && e.getArea && e.getArea();
  42057. return t.get("clip", !0) ? n : null
  42058. }
  42059. ,
  42060. e.prototype.updateTransform = function(t, e, n) {
  42061. var i = t.getData();
  42062. this.group.dirty();
  42063. var r = XS("").reset(t, e, n);
  42064. r.progress && r.progress({
  42065. start: 0,
  42066. end: i.count(),
  42067. count: i.count()
  42068. }, i),
  42069. this._symbolDraw.updateLayout()
  42070. }
  42071. ,
  42072. e.prototype._updateGroupTransform = function(t) {
  42073. var e = t.coordinateSystem;
  42074. e && e.getRoamTransform && (this.group.transform = Te(e.getRoamTransform()),
  42075. this.group.decomposeTransform())
  42076. }
  42077. ,
  42078. e.prototype.remove = function(t, e) {
  42079. this._symbolDraw && this._symbolDraw.remove(!0)
  42080. }
  42081. ,
  42082. e.type = "effectScatter",
  42083. e
  42084. }(Og)
  42085. , KP = function(t) {
  42086. function e() {
  42087. var n = null !== t && t.apply(this, arguments) || this;
  42088. return n.type = e.type,
  42089. n.hasSymbolVisual = !0,
  42090. n
  42091. }
  42092. return n(e, t),
  42093. e.prototype.getInitialData = function(t, e) {
  42094. return _x(null, this, {
  42095. useEncodeDefaulter: !0
  42096. })
  42097. }
  42098. ,
  42099. e.prototype.brushSelector = function(t, e, n) {
  42100. return n.point(e.getItemLayout(t))
  42101. }
  42102. ,
  42103. e.type = "series.effectScatter",
  42104. e.dependencies = ["grid", "polar"],
  42105. e.defaultOption = {
  42106. coordinateSystem: "cartesian2d",
  42107. z: 2,
  42108. legendHoverLink: !0,
  42109. effectType: "ripple",
  42110. progressive: 0,
  42111. showEffectOn: "render",
  42112. clip: !0,
  42113. rippleEffect: {
  42114. period: 4,
  42115. scale: 2.5,
  42116. brushType: "fill",
  42117. number: 3
  42118. },
  42119. universalTransition: {
  42120. divideShape: "clone"
  42121. },
  42122. symbolSize: 10
  42123. },
  42124. e
  42125. }(bg);
  42126. var $P = function(t) {
  42127. function e(e, n, i) {
  42128. var r = t.call(this) || this;
  42129. return r.add(r.createLine(e, n, i)),
  42130. r._updateEffectSymbol(e, n),
  42131. r
  42132. }
  42133. return n(e, t),
  42134. e.prototype.createLine = function(t, e, n) {
  42135. return new HA(t,e,n)
  42136. }
  42137. ,
  42138. e.prototype._updateEffectSymbol = function(t, e) {
  42139. var n = t.getItemModel(e).getModel("effect")
  42140. , i = n.get("symbolSize")
  42141. , r = n.get("symbol");
  42142. Y(i) || (i = [i, i]);
  42143. var o = t.getItemVisual(e, "style")
  42144. , a = n.get("color") || o && o.stroke
  42145. , s = this.childAt(1);
  42146. this._symbolType !== r && (this.remove(s),
  42147. (s = Xy(r, -.5, -.5, 1, 1, a)).z2 = 100,
  42148. s.culling = !0,
  42149. this.add(s)),
  42150. s && (s.setStyle("shadowColor", a),
  42151. s.setStyle(n.getItemStyle(["color"])),
  42152. s.scaleX = i[0],
  42153. s.scaleY = i[1],
  42154. s.setColor(a),
  42155. this._symbolType = r,
  42156. this._symbolScale = i,
  42157. this._updateEffectAnimation(t, n, e))
  42158. }
  42159. ,
  42160. e.prototype._updateEffectAnimation = function(t, e, n) {
  42161. var i = this.childAt(1);
  42162. if (i) {
  42163. var r = t.getItemLayout(n)
  42164. , o = 1e3 * e.get("period")
  42165. , a = e.get("loop")
  42166. , s = e.get("roundTrip")
  42167. , l = e.get("constantSpeed")
  42168. , u = it(e.get("delay"), (function(e) {
  42169. return e / t.count() * o / 3
  42170. }
  42171. ));
  42172. if (i.ignore = !0,
  42173. this._updateAnimationPoints(i, r),
  42174. l > 0 && (o = this._getLineLength(i) / l * 1e3),
  42175. o !== this._period || a !== this._loop || s !== this._roundTrip) {
  42176. i.stopAnimation();
  42177. var h = void 0;
  42178. h = X(u) ? u(n) : u,
  42179. i.__t > 0 && (h = -o * i.__t),
  42180. this._animateSymbol(i, o, h, a, s)
  42181. }
  42182. this._period = o,
  42183. this._loop = a,
  42184. this._roundTrip = s
  42185. }
  42186. }
  42187. ,
  42188. e.prototype._animateSymbol = function(t, e, n, i, r) {
  42189. if (e > 0) {
  42190. t.__t = 0;
  42191. var o = this
  42192. , a = t.animate("", i).when(r ? 2 * e : e, {
  42193. __t: r ? 2 : 1
  42194. }).delay(n).during((function() {
  42195. o._updateSymbolPosition(t)
  42196. }
  42197. ));
  42198. i || a.done((function() {
  42199. o.remove(t)
  42200. }
  42201. )),
  42202. a.start()
  42203. }
  42204. }
  42205. ,
  42206. e.prototype._getLineLength = function(t) {
  42207. return Vt(t.__p1, t.__cp1) + Vt(t.__cp1, t.__p2)
  42208. }
  42209. ,
  42210. e.prototype._updateAnimationPoints = function(t, e) {
  42211. t.__p1 = e[0],
  42212. t.__p2 = e[1],
  42213. t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
  42214. }
  42215. ,
  42216. e.prototype.updateData = function(t, e, n) {
  42217. this.childAt(0).updateData(t, e, n),
  42218. this._updateEffectSymbol(t, e)
  42219. }
  42220. ,
  42221. e.prototype._updateSymbolPosition = function(t) {
  42222. var e = t.__p1
  42223. , n = t.__p2
  42224. , i = t.__cp1
  42225. , r = t.__t < 1 ? t.__t : 2 - t.__t
  42226. , o = [t.x, t.y]
  42227. , a = o.slice()
  42228. , s = In
  42229. , l = Tn;
  42230. o[0] = s(e[0], i[0], n[0], r),
  42231. o[1] = s(e[1], i[1], n[1], r);
  42232. var u = t.__t < 1 ? l(e[0], i[0], n[0], r) : l(n[0], i[0], e[0], 1 - r)
  42233. , h = t.__t < 1 ? l(e[1], i[1], n[1], r) : l(n[1], i[1], e[1], 1 - r);
  42234. t.rotation = -Math.atan2(h, u) - Math.PI / 2,
  42235. "line" !== this._symbolType && "rect" !== this._symbolType && "roundRect" !== this._symbolType || (void 0 !== t.__lastT && t.__lastT < t.__t ? (t.scaleY = 1.05 * Vt(a, o),
  42236. 1 === r && (o[0] = a[0] + (o[0] - a[0]) / 2,
  42237. o[1] = a[1] + (o[1] - a[1]) / 2)) : 1 === t.__lastT ? t.scaleY = 2 * Vt(e, o) : t.scaleY = this._symbolScale[1]),
  42238. t.__lastT = t.__t,
  42239. t.ignore = !1,
  42240. t.x = o[0],
  42241. t.y = o[1]
  42242. }
  42243. ,
  42244. e.prototype.updateLayout = function(t, e) {
  42245. this.childAt(0).updateLayout(t, e);
  42246. var n = t.getItemModel(e).getModel("effect");
  42247. this._updateEffectAnimation(t, n, e)
  42248. }
  42249. ,
  42250. e
  42251. }(Br)
  42252. , JP = function(t) {
  42253. function e(e, n, i) {
  42254. var r = t.call(this) || this;
  42255. return r._createPolyline(e, n, i),
  42256. r
  42257. }
  42258. return n(e, t),
  42259. e.prototype._createPolyline = function(t, e, n) {
  42260. var i = t.getItemLayout(e)
  42261. , r = new Zu({
  42262. shape: {
  42263. points: i
  42264. }
  42265. });
  42266. this.add(r),
  42267. this._updateCommonStl(t, e, n)
  42268. }
  42269. ,
  42270. e.prototype.updateData = function(t, e, n) {
  42271. var i = t.hostModel;
  42272. vh(this.childAt(0), {
  42273. shape: {
  42274. points: t.getItemLayout(e)
  42275. }
  42276. }, i, e),
  42277. this._updateCommonStl(t, e, n)
  42278. }
  42279. ,
  42280. e.prototype._updateCommonStl = function(t, e, n) {
  42281. var i = this.childAt(0)
  42282. , r = t.getItemModel(e)
  42283. , o = n && n.emphasisLineStyle
  42284. , a = n && n.focus
  42285. , s = n && n.blurScope
  42286. , l = n && n.emphasisDisabled;
  42287. if (!n || t.hasItemOption) {
  42288. var u = r.getModel("emphasis");
  42289. o = u.getModel("lineStyle").getLineStyle(),
  42290. l = u.get("disabled"),
  42291. a = u.get("focus"),
  42292. s = u.get("blurScope")
  42293. }
  42294. i.useStyle(t.getItemVisual(e, "style")),
  42295. i.style.fill = null,
  42296. i.style.strokeNoScale = !0,
  42297. i.ensureState("emphasis").style = o,
  42298. Zl(this, a, s, l)
  42299. }
  42300. ,
  42301. e.prototype.updateLayout = function(t, e) {
  42302. this.childAt(0).setShape("points", t.getItemLayout(e))
  42303. }
  42304. ,
  42305. e
  42306. }(Br)
  42307. , QP = function(t) {
  42308. function e() {
  42309. var e = null !== t && t.apply(this, arguments) || this;
  42310. return e._lastFrame = 0,
  42311. e._lastFramePercent = 0,
  42312. e
  42313. }
  42314. return n(e, t),
  42315. e.prototype.createLine = function(t, e, n) {
  42316. return new JP(t,e,n)
  42317. }
  42318. ,
  42319. e.prototype._updateAnimationPoints = function(t, e) {
  42320. this._points = e;
  42321. for (var n = [0], i = 0, r = 1; r < e.length; r++) {
  42322. var o = e[r - 1]
  42323. , a = e[r];
  42324. i += Vt(o, a),
  42325. n.push(i)
  42326. }
  42327. if (0 !== i) {
  42328. for (r = 0; r < n.length; r++)
  42329. n[r] /= i;
  42330. this._offsets = n,
  42331. this._length = i
  42332. } else
  42333. this._length = 0
  42334. }
  42335. ,
  42336. e.prototype._getLineLength = function() {
  42337. return this._length
  42338. }
  42339. ,
  42340. e.prototype._updateSymbolPosition = function(t) {
  42341. var e = t.__t < 1 ? t.__t : 2 - t.__t
  42342. , n = this._points
  42343. , i = this._offsets
  42344. , r = n.length;
  42345. if (i) {
  42346. var o, a = this._lastFrame;
  42347. if (e < this._lastFramePercent) {
  42348. for (o = Math.min(a + 1, r - 1); o >= 0 && !(i[o] <= e); o--)
  42349. ;
  42350. o = Math.min(o, r - 2)
  42351. } else {
  42352. for (o = a; o < r && !(i[o] > e); o++)
  42353. ;
  42354. o = Math.min(o - 1, r - 2)
  42355. }
  42356. var s = (e - i[o]) / (i[o + 1] - i[o])
  42357. , l = n[o]
  42358. , u = n[o + 1];
  42359. t.x = l[0] * (1 - s) + s * u[0],
  42360. t.y = l[1] * (1 - s) + s * u[1];
  42361. var h = t.__t < 1 ? u[0] - l[0] : l[0] - u[0]
  42362. , c = t.__t < 1 ? u[1] - l[1] : l[1] - u[1];
  42363. t.rotation = -Math.atan2(c, h) - Math.PI / 2,
  42364. this._lastFrame = o,
  42365. this._lastFramePercent = e,
  42366. t.ignore = !1
  42367. }
  42368. }
  42369. ,
  42370. e
  42371. }($P)
  42372. , tO = function() {
  42373. this.polyline = !1,
  42374. this.curveness = 0,
  42375. this.segs = []
  42376. }
  42377. , eO = function(t) {
  42378. function e(e) {
  42379. var n = t.call(this, e) || this;
  42380. return n._off = 0,
  42381. n.hoverDataIdx = -1,
  42382. n
  42383. }
  42384. return n(e, t),
  42385. e.prototype.reset = function() {
  42386. this.notClear = !1,
  42387. this._off = 0
  42388. }
  42389. ,
  42390. e.prototype.getDefaultStyle = function() {
  42391. return {
  42392. stroke: "#000",
  42393. fill: null
  42394. }
  42395. }
  42396. ,
  42397. e.prototype.getDefaultShape = function() {
  42398. return new tO
  42399. }
  42400. ,
  42401. e.prototype.buildPath = function(t, e) {
  42402. var n, i = e.segs, r = e.curveness;
  42403. if (e.polyline)
  42404. for (n = this._off; n < i.length; ) {
  42405. var o = i[n++];
  42406. if (o > 0) {
  42407. t.moveTo(i[n++], i[n++]);
  42408. for (var a = 1; a < o; a++)
  42409. t.lineTo(i[n++], i[n++])
  42410. }
  42411. }
  42412. else
  42413. for (n = this._off; n < i.length; ) {
  42414. var s = i[n++]
  42415. , l = i[n++]
  42416. , u = i[n++]
  42417. , h = i[n++];
  42418. if (t.moveTo(s, l),
  42419. r > 0) {
  42420. var c = (s + u) / 2 - (l - h) * r
  42421. , p = (l + h) / 2 - (u - s) * r;
  42422. t.quadraticCurveTo(c, p, u, h)
  42423. } else
  42424. t.lineTo(u, h)
  42425. }
  42426. this.incremental && (this._off = n,
  42427. this.notClear = !0)
  42428. }
  42429. ,
  42430. e.prototype.findDataIndex = function(t, e) {
  42431. var n = this.shape
  42432. , i = n.segs
  42433. , r = n.curveness
  42434. , o = this.style.lineWidth;
  42435. if (n.polyline)
  42436. for (var a = 0, s = 0; s < i.length; ) {
  42437. var l = i[s++];
  42438. if (l > 0)
  42439. for (var u = i[s++], h = i[s++], c = 1; c < l; c++) {
  42440. if (cs(u, h, p = i[s++], d = i[s++], o, t, e))
  42441. return a
  42442. }
  42443. a++
  42444. }
  42445. else
  42446. for (a = 0,
  42447. s = 0; s < i.length; ) {
  42448. u = i[s++],
  42449. h = i[s++];
  42450. var p = i[s++]
  42451. , d = i[s++];
  42452. if (r > 0) {
  42453. if (ds(u, h, (u + p) / 2 - (h - d) * r, (h + d) / 2 - (p - u) * r, p, d, o, t, e))
  42454. return a
  42455. } else if (cs(u, h, p, d, o, t, e))
  42456. return a;
  42457. a++
  42458. }
  42459. return -1
  42460. }
  42461. ,
  42462. e.prototype.contain = function(t, e) {
  42463. var n = this.transformCoordToLocal(t, e)
  42464. , i = this.getBoundingRect();
  42465. return t = n[0],
  42466. e = n[1],
  42467. i.contain(t, e) ? (this.hoverDataIdx = this.findDataIndex(t, e)) >= 0 : (this.hoverDataIdx = -1,
  42468. !1)
  42469. }
  42470. ,
  42471. e.prototype.getBoundingRect = function() {
  42472. var t = this._rect;
  42473. if (!t) {
  42474. for (var e = this.shape.segs, n = 1 / 0, i = 1 / 0, r = -1 / 0, o = -1 / 0, a = 0; a < e.length; ) {
  42475. var s = e[a++]
  42476. , l = e[a++];
  42477. n = Math.min(s, n),
  42478. r = Math.max(s, r),
  42479. i = Math.min(l, i),
  42480. o = Math.max(l, o)
  42481. }
  42482. t = this._rect = new ze(n,i,r,o)
  42483. }
  42484. return t
  42485. }
  42486. ,
  42487. e
  42488. }(ks)
  42489. , nO = function() {
  42490. function t() {
  42491. this.group = new Br
  42492. }
  42493. return t.prototype.updateData = function(t) {
  42494. this._clear();
  42495. var e = this._create();
  42496. e.setShape({
  42497. segs: t.getLayout("linesPoints")
  42498. }),
  42499. this._setCommon(e, t)
  42500. }
  42501. ,
  42502. t.prototype.incrementalPrepareUpdate = function(t) {
  42503. this.group.removeAll(),
  42504. this._clear()
  42505. }
  42506. ,
  42507. t.prototype.incrementalUpdate = function(t, e) {
  42508. var n = this._newAdded[0]
  42509. , i = e.getLayout("linesPoints")
  42510. , r = n && n.shape.segs;
  42511. if (r && r.length < 2e4) {
  42512. var o = r.length
  42513. , a = new Float32Array(o + i.length);
  42514. a.set(r),
  42515. a.set(i, o),
  42516. n.setShape({
  42517. segs: a
  42518. })
  42519. } else {
  42520. this._newAdded = [];
  42521. var s = this._create();
  42522. s.incremental = !0,
  42523. s.setShape({
  42524. segs: i
  42525. }),
  42526. this._setCommon(s, e),
  42527. s.__startIndex = t.start
  42528. }
  42529. }
  42530. ,
  42531. t.prototype.remove = function() {
  42532. this._clear()
  42533. }
  42534. ,
  42535. t.prototype.eachRendered = function(t) {
  42536. this._newAdded[0] && t(this._newAdded[0])
  42537. }
  42538. ,
  42539. t.prototype._create = function() {
  42540. var t = new eO({
  42541. cursor: "default",
  42542. ignoreCoarsePointer: !0
  42543. });
  42544. return this._newAdded.push(t),
  42545. this.group.add(t),
  42546. t
  42547. }
  42548. ,
  42549. t.prototype._setCommon = function(t, e, n) {
  42550. var i = e.hostModel;
  42551. t.setShape({
  42552. polyline: i.get("polyline"),
  42553. curveness: i.get(["lineStyle", "curveness"])
  42554. }),
  42555. t.useStyle(i.getModel("lineStyle").getLineStyle()),
  42556. t.style.strokeNoScale = !0;
  42557. var r = e.getVisual("style");
  42558. r && r.stroke && t.setStyle("stroke", r.stroke),
  42559. t.setStyle("fill", null);
  42560. var o = rl(t);
  42561. o.seriesIndex = i.seriesIndex,
  42562. t.on("mousemove", (function(e) {
  42563. o.dataIndex = null;
  42564. var n = t.hoverDataIdx;
  42565. n > 0 && (o.dataIndex = n + t.__startIndex)
  42566. }
  42567. ))
  42568. }
  42569. ,
  42570. t.prototype._clear = function() {
  42571. this._newAdded = [],
  42572. this.group.removeAll()
  42573. }
  42574. ,
  42575. t
  42576. }()
  42577. , iO = {
  42578. seriesType: "lines",
  42579. plan: kg(),
  42580. reset: function(t) {
  42581. var e = t.coordinateSystem;
  42582. if (e) {
  42583. var n = t.get("polyline")
  42584. , i = t.pipelineContext.large;
  42585. return {
  42586. progress: function(r, o) {
  42587. var a = [];
  42588. if (i) {
  42589. var s = void 0
  42590. , l = r.end - r.start;
  42591. if (n) {
  42592. for (var u = 0, h = r.start; h < r.end; h++)
  42593. u += t.getLineCoordsCount(h);
  42594. s = new Float32Array(l + 2 * u)
  42595. } else
  42596. s = new Float32Array(4 * l);
  42597. var c = 0
  42598. , p = [];
  42599. for (h = r.start; h < r.end; h++) {
  42600. var d = t.getLineCoords(h, a);
  42601. n && (s[c++] = d);
  42602. for (var f = 0; f < d; f++)
  42603. p = e.dataToPoint(a[f], !1, p),
  42604. s[c++] = p[0],
  42605. s[c++] = p[1]
  42606. }
  42607. o.setLayout("linesPoints", s)
  42608. } else
  42609. for (h = r.start; h < r.end; h++) {
  42610. var g = o.getItemModel(h)
  42611. , y = (d = t.getLineCoords(h, a),
  42612. []);
  42613. if (n)
  42614. for (var v = 0; v < d; v++)
  42615. y.push(e.dataToPoint(a[v]));
  42616. else {
  42617. y[0] = e.dataToPoint(a[0]),
  42618. y[1] = e.dataToPoint(a[1]);
  42619. var m = g.get(["lineStyle", "curveness"]);
  42620. +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])
  42621. }
  42622. o.setItemLayout(h, y)
  42623. }
  42624. }
  42625. }
  42626. }
  42627. }
  42628. }
  42629. , rO = function(t) {
  42630. function e() {
  42631. var n = null !== t && t.apply(this, arguments) || this;
  42632. return n.type = e.type,
  42633. n
  42634. }
  42635. return n(e, t),
  42636. e.prototype.render = function(t, e, n) {
  42637. var i = t.getData()
  42638. , r = this._updateLineDraw(i, t)
  42639. , o = t.get("zlevel")
  42640. , a = t.get(["effect", "trailLength"])
  42641. , s = n.getZr()
  42642. , l = "svg" === s.painter.getType();
  42643. l || s.painter.getLayer(o).clear(!0),
  42644. null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {
  42645. motionBlur: !1
  42646. }),
  42647. this._showEffect(t) && a > 0 && (l || s.configLayer(o, {
  42648. motionBlur: !0,
  42649. lastFrameAlpha: Math.max(Math.min(a / 10 + .9, 1), 0)
  42650. })),
  42651. r.updateData(i);
  42652. var u = t.get("clip", !0) && PS(t.coordinateSystem, !1, t);
  42653. u ? this.group.setClipPath(u) : this.group.removeClipPath(),
  42654. this._lastZlevel = o,
  42655. this._finished = !0
  42656. }
  42657. ,
  42658. e.prototype.incrementalPrepareRender = function(t, e, n) {
  42659. var i = t.getData();
  42660. this._updateLineDraw(i, t).incrementalPrepareUpdate(i),
  42661. this._clearLayer(n),
  42662. this._finished = !1
  42663. }
  42664. ,
  42665. e.prototype.incrementalRender = function(t, e, n) {
  42666. this._lineDraw.incrementalUpdate(t, e.getData()),
  42667. this._finished = t.end === e.getData().count()
  42668. }
  42669. ,
  42670. e.prototype.eachRendered = function(t) {
  42671. this._lineDraw && this._lineDraw.eachRendered(t)
  42672. }
  42673. ,
  42674. e.prototype.updateTransform = function(t, e, n) {
  42675. var i = t.getData()
  42676. , r = t.pipelineContext;
  42677. if (!this._finished || r.large || r.progressiveRender)
  42678. return {
  42679. update: !0
  42680. };
  42681. var o = iO.reset(t, e, n);
  42682. o.progress && o.progress({
  42683. start: 0,
  42684. end: i.count(),
  42685. count: i.count()
  42686. }, i),
  42687. this._lineDraw.updateLayout(),
  42688. this._clearLayer(n)
  42689. }
  42690. ,
  42691. e.prototype._updateLineDraw = function(t, e) {
  42692. var n = this._lineDraw
  42693. , i = this._showEffect(e)
  42694. , r = !!e.get("polyline")
  42695. , o = e.pipelineContext.large;
  42696. return n && i === this._hasEffet && r === this._isPolyline && o === this._isLargeDraw || (n && n.remove(),
  42697. n = this._lineDraw = o ? new nO : new YA(r ? i ? QP : JP : i ? $P : HA),
  42698. this._hasEffet = i,
  42699. this._isPolyline = r,
  42700. this._isLargeDraw = o),
  42701. this.group.add(n.group),
  42702. n
  42703. }
  42704. ,
  42705. e.prototype._showEffect = function(t) {
  42706. return !!t.get(["effect", "show"])
  42707. }
  42708. ,
  42709. e.prototype._clearLayer = function(t) {
  42710. var e = t.getZr();
  42711. "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0)
  42712. }
  42713. ,
  42714. e.prototype.remove = function(t, e) {
  42715. this._lineDraw && this._lineDraw.remove(),
  42716. this._lineDraw = null,
  42717. this._clearLayer(e)
  42718. }
  42719. ,
  42720. e.prototype.dispose = function(t, e) {
  42721. this.remove(t, e)
  42722. }
  42723. ,
  42724. e.type = "lines",
  42725. e
  42726. }(Og)
  42727. , oO = "undefined" == typeof Uint32Array ? Array : Uint32Array
  42728. , aO = "undefined" == typeof Float64Array ? Array : Float64Array;
  42729. function sO(t) {
  42730. var e = t.data;
  42731. e && e[0] && e[0][0] && e[0][0].coord && (t.data = z(e, (function(t) {
  42732. var e = {
  42733. coords: [t[0].coord, t[1].coord]
  42734. };
  42735. return t[0].name && (e.fromName = t[0].name),
  42736. t[1].name && (e.toName = t[1].name),
  42737. D([e, t[0], t[1]])
  42738. }
  42739. )))
  42740. }
  42741. var lO = function(t) {
  42742. function e() {
  42743. var n = null !== t && t.apply(this, arguments) || this;
  42744. return n.type = e.type,
  42745. n.visualStyleAccessPath = "lineStyle",
  42746. n.visualDrawType = "stroke",
  42747. n
  42748. }
  42749. return n(e, t),
  42750. e.prototype.init = function(e) {
  42751. e.data = e.data || [],
  42752. sO(e);
  42753. var n = this._processFlatCoordsArray(e.data);
  42754. this._flatCoords = n.flatCoords,
  42755. this._flatCoordsOffset = n.flatCoordsOffset,
  42756. n.flatCoords && (e.data = new Float32Array(n.count)),
  42757. t.prototype.init.apply(this, arguments)
  42758. }
  42759. ,
  42760. e.prototype.mergeOption = function(e) {
  42761. if (sO(e),
  42762. e.data) {
  42763. var n = this._processFlatCoordsArray(e.data);
  42764. this._flatCoords = n.flatCoords,
  42765. this._flatCoordsOffset = n.flatCoordsOffset,
  42766. n.flatCoords && (e.data = new Float32Array(n.count))
  42767. }
  42768. t.prototype.mergeOption.apply(this, arguments)
  42769. }
  42770. ,
  42771. e.prototype.appendData = function(t) {
  42772. var e = this._processFlatCoordsArray(t.data);
  42773. e.flatCoords && (this._flatCoords ? (this._flatCoords = vt(this._flatCoords, e.flatCoords),
  42774. this._flatCoordsOffset = vt(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords,
  42775. this._flatCoordsOffset = e.flatCoordsOffset),
  42776. t.data = new Float32Array(e.count)),
  42777. this.getRawData().appendData(t.data)
  42778. }
  42779. ,
  42780. e.prototype._getCoordsFromItemModel = function(t) {
  42781. var e = this.getData().getItemModel(t)
  42782. , n = e.option instanceof Array ? e.option : e.getShallow("coords");
  42783. return n
  42784. }
  42785. ,
  42786. e.prototype.getLineCoordsCount = function(t) {
  42787. return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length
  42788. }
  42789. ,
  42790. e.prototype.getLineCoords = function(t, e) {
  42791. if (this._flatCoordsOffset) {
  42792. for (var n = this._flatCoordsOffset[2 * t], i = this._flatCoordsOffset[2 * t + 1], r = 0; r < i; r++)
  42793. e[r] = e[r] || [],
  42794. e[r][0] = this._flatCoords[n + 2 * r],
  42795. e[r][1] = this._flatCoords[n + 2 * r + 1];
  42796. return i
  42797. }
  42798. var o = this._getCoordsFromItemModel(t);
  42799. for (r = 0; r < o.length; r++)
  42800. e[r] = e[r] || [],
  42801. e[r][0] = o[r][0],
  42802. e[r][1] = o[r][1];
  42803. return o.length
  42804. }
  42805. ,
  42806. e.prototype._processFlatCoordsArray = function(t) {
  42807. var e = 0;
  42808. if (this._flatCoords && (e = this._flatCoords.length),
  42809. j(t[0])) {
  42810. for (var n = t.length, i = new oO(n), r = new aO(n), o = 0, a = 0, s = 0, l = 0; l < n; ) {
  42811. s++;
  42812. var u = t[l++];
  42813. i[a++] = o + e,
  42814. i[a++] = u;
  42815. for (var h = 0; h < u; h++) {
  42816. var c = t[l++]
  42817. , p = t[l++];
  42818. r[o++] = c,
  42819. r[o++] = p
  42820. }
  42821. }
  42822. return {
  42823. flatCoordsOffset: new Uint32Array(i.buffer,0,a),
  42824. flatCoords: r,
  42825. count: s
  42826. }
  42827. }
  42828. return {
  42829. flatCoordsOffset: null,
  42830. flatCoords: null,
  42831. count: t.length
  42832. }
  42833. }
  42834. ,
  42835. e.prototype.getInitialData = function(t, e) {
  42836. var n = new cx(["value"],this);
  42837. return n.hasItemOption = !1,
  42838. n.initData(t.data, [], (function(t, e, i, r) {
  42839. if (t instanceof Array)
  42840. return NaN;
  42841. n.hasItemOption = !0;
  42842. var o = t.value;
  42843. return null != o ? o instanceof Array ? o[r] : o : void 0
  42844. }
  42845. )),
  42846. n
  42847. }
  42848. ,
  42849. e.prototype.formatTooltip = function(t, e, n) {
  42850. var i = this.getData().getItemModel(t)
  42851. , r = i.get("name");
  42852. if (r)
  42853. return r;
  42854. var o = i.get("fromName")
  42855. , a = i.get("toName")
  42856. , s = [];
  42857. return null != o && s.push(o),
  42858. null != a && s.push(a),
  42859. og("nameValue", {
  42860. name: s.join(" > ")
  42861. })
  42862. }
  42863. ,
  42864. e.prototype.preventIncremental = function() {
  42865. return !!this.get(["effect", "show"])
  42866. }
  42867. ,
  42868. e.prototype.getProgressive = function() {
  42869. var t = this.option.progressive;
  42870. return null == t ? this.option.large ? 1e4 : this.get("progressive") : t
  42871. }
  42872. ,
  42873. e.prototype.getProgressiveThreshold = function() {
  42874. var t = this.option.progressiveThreshold;
  42875. return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t
  42876. }
  42877. ,
  42878. e.prototype.getZLevelKey = function() {
  42879. var t = this.getModel("effect")
  42880. , e = t.get("trailLength");
  42881. return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && e > 0 ? e + "" : ""
  42882. }
  42883. ,
  42884. e.type = "series.lines",
  42885. e.dependencies = ["grid", "polar", "geo", "calendar"],
  42886. e.defaultOption = {
  42887. coordinateSystem: "geo",
  42888. z: 2,
  42889. legendHoverLink: !0,
  42890. xAxisIndex: 0,
  42891. yAxisIndex: 0,
  42892. symbol: ["none", "none"],
  42893. symbolSize: [10, 10],
  42894. geoIndex: 0,
  42895. effect: {
  42896. show: !1,
  42897. period: 4,
  42898. constantSpeed: 0,
  42899. symbol: "circle",
  42900. symbolSize: 3,
  42901. loop: !0,
  42902. trailLength: .2
  42903. },
  42904. large: !1,
  42905. largeThreshold: 2e3,
  42906. polyline: !1,
  42907. clip: !0,
  42908. label: {
  42909. show: !1,
  42910. position: "end"
  42911. },
  42912. lineStyle: {
  42913. opacity: .5
  42914. }
  42915. },
  42916. e
  42917. }(bg);
  42918. function uO(t) {
  42919. return t instanceof Array || (t = [t, t]),
  42920. t
  42921. }
  42922. var hO = {
  42923. seriesType: "lines",
  42924. reset: function(t) {
  42925. var e = uO(t.get("symbol"))
  42926. , n = uO(t.get("symbolSize"))
  42927. , i = t.getData();
  42928. return i.setVisual("fromSymbol", e && e[0]),
  42929. i.setVisual("toSymbol", e && e[1]),
  42930. i.setVisual("fromSymbolSize", n && n[0]),
  42931. i.setVisual("toSymbolSize", n && n[1]),
  42932. {
  42933. dataEach: i.hasItemOption ? function(t, e) {
  42934. var n = t.getItemModel(e)
  42935. , i = uO(n.getShallow("symbol", !0))
  42936. , r = uO(n.getShallow("symbolSize", !0));
  42937. i[0] && t.setItemVisual(e, "fromSymbol", i[0]),
  42938. i[1] && t.setItemVisual(e, "toSymbol", i[1]),
  42939. r[0] && t.setItemVisual(e, "fromSymbolSize", r[0]),
  42940. r[1] && t.setItemVisual(e, "toSymbolSize", r[1])
  42941. }
  42942. : null
  42943. }
  42944. }
  42945. };
  42946. var cO = function() {
  42947. function t() {
  42948. this.blurSize = 30,
  42949. this.pointSize = 20,
  42950. this.maxOpacity = 1,
  42951. this.minOpacity = 0,
  42952. this._gradientPixels = {
  42953. inRange: null,
  42954. outOfRange: null
  42955. };
  42956. var t = h.createCanvas();
  42957. this.canvas = t
  42958. }
  42959. return t.prototype.update = function(t, e, n, i, r, o) {
  42960. var a = this._getBrush()
  42961. , s = this._getGradient(r, "inRange")
  42962. , l = this._getGradient(r, "outOfRange")
  42963. , u = this.pointSize + this.blurSize
  42964. , h = this.canvas
  42965. , c = h.getContext("2d")
  42966. , p = t.length;
  42967. h.width = e,
  42968. h.height = n;
  42969. for (var d = 0; d < p; ++d) {
  42970. var f = t[d]
  42971. , g = f[0]
  42972. , y = f[1]
  42973. , v = i(f[2]);
  42974. c.globalAlpha = v,
  42975. c.drawImage(a, g - u, y - u)
  42976. }
  42977. if (!h.width || !h.height)
  42978. return h;
  42979. 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; ) {
  42980. v = x[_ + 3] / 256;
  42981. var M = 4 * Math.floor(255 * v);
  42982. if (v > 0) {
  42983. var I = o(v) ? s : l;
  42984. v > 0 && (v = v * S + w),
  42985. x[_++] = I[M],
  42986. x[_++] = I[M + 1],
  42987. x[_++] = I[M + 2],
  42988. x[_++] = I[M + 3] * v * 256
  42989. } else
  42990. _ += 4
  42991. }
  42992. return c.putImageData(m, 0, 0),
  42993. h
  42994. }
  42995. ,
  42996. t.prototype._getBrush = function() {
  42997. var t = this._brushCanvas || (this._brushCanvas = h.createCanvas())
  42998. , e = this.pointSize + this.blurSize
  42999. , n = 2 * e;
  43000. t.width = n,
  43001. t.height = n;
  43002. var i = t.getContext("2d");
  43003. return i.clearRect(0, 0, n, n),
  43004. i.shadowOffsetX = n,
  43005. i.shadowBlur = this.blurSize,
  43006. i.shadowColor = "#000",
  43007. i.beginPath(),
  43008. i.arc(-e, e, this.pointSize, 0, 2 * Math.PI, !0),
  43009. i.closePath(),
  43010. i.fill(),
  43011. t
  43012. }
  43013. ,
  43014. t.prototype._getGradient = function(t, e) {
  43015. 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++)
  43016. t[e](a / 255, !0, r),
  43017. i[o++] = r[0],
  43018. i[o++] = r[1],
  43019. i[o++] = r[2],
  43020. i[o++] = r[3];
  43021. return i
  43022. }
  43023. ,
  43024. t
  43025. }();
  43026. function pO(t) {
  43027. var e = t.dimensions;
  43028. return "lng" === e[0] && "lat" === e[1]
  43029. }
  43030. var dO = function(t) {
  43031. function e() {
  43032. var n = null !== t && t.apply(this, arguments) || this;
  43033. return n.type = e.type,
  43034. n
  43035. }
  43036. return n(e, t),
  43037. e.prototype.render = function(t, e, n) {
  43038. var i;
  43039. e.eachComponent("visualMap", (function(e) {
  43040. e.eachTargetSeries((function(n) {
  43041. n === t && (i = e)
  43042. }
  43043. ))
  43044. }
  43045. )),
  43046. this._progressiveEls = null,
  43047. this.group.removeAll();
  43048. var r = t.coordinateSystem;
  43049. "cartesian2d" === r.type || "calendar" === r.type ? this._renderOnCartesianAndCalendar(t, n, 0, t.getData().count()) : pO(r) && this._renderOnGeo(r, t, i, n)
  43050. }
  43051. ,
  43052. e.prototype.incrementalPrepareRender = function(t, e, n) {
  43053. this.group.removeAll()
  43054. }
  43055. ,
  43056. e.prototype.incrementalRender = function(t, e, n, i) {
  43057. var r = e.coordinateSystem;
  43058. r && (pO(r) ? this.render(e, n, i) : (this._progressiveEls = [],
  43059. this._renderOnCartesianAndCalendar(e, i, t.start, t.end, !0)))
  43060. }
  43061. ,
  43062. e.prototype.eachRendered = function(t) {
  43063. Jh(this._progressiveEls || this.group, t)
  43064. }
  43065. ,
  43066. e.prototype._renderOnCartesianAndCalendar = function(t, e, n, i, r) {
  43067. var o, a, s, l, u = t.coordinateSystem, h = OS(u, "cartesian2d");
  43068. if (h) {
  43069. var c = u.getAxis("x")
  43070. , p = u.getAxis("y");
  43071. 0,
  43072. o = c.getBandWidth() + .5,
  43073. a = p.getBandWidth() + .5,
  43074. s = c.scale.getExtent(),
  43075. l = p.scale.getExtent()
  43076. }
  43077. 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++) {
  43078. var T = void 0
  43079. , C = f.getItemVisual(I, "style");
  43080. if (h) {
  43081. var D = f.get(M[0], I)
  43082. , A = f.get(M[1], I);
  43083. if (isNaN(f.get(M[2], I)) || isNaN(D) || isNaN(A) || D < s[0] || D > s[1] || A < l[0] || A > l[1])
  43084. continue;
  43085. var k = u.dataToPoint([D, A]);
  43086. T = new Ws({
  43087. shape: {
  43088. x: k[0] - o / 2,
  43089. y: k[1] - a / 2,
  43090. width: o,
  43091. height: a
  43092. },
  43093. style: C
  43094. })
  43095. } else {
  43096. if (isNaN(f.get(M[1], I)))
  43097. continue;
  43098. T = new Ws({
  43099. z2: 1,
  43100. shape: u.dataToRect([f.get(M[0], I)]).contentShape,
  43101. style: C
  43102. })
  43103. }
  43104. if (f.hasItemOption) {
  43105. var L = f.getItemModel(I)
  43106. , P = L.getModel("emphasis");
  43107. g = P.getModel("itemStyle").getItemStyle(),
  43108. y = L.getModel(["blur", "itemStyle"]).getItemStyle(),
  43109. v = L.getModel(["select", "itemStyle"]).getItemStyle(),
  43110. m = L.get(["itemStyle", "borderRadius"]),
  43111. b = P.get("focus"),
  43112. w = P.get("blurScope"),
  43113. S = P.get("disabled"),
  43114. x = rc(L)
  43115. }
  43116. T.shape.r = m;
  43117. var O = t.getRawValue(I)
  43118. , R = "-";
  43119. O && null != O[2] && (R = O[2] + ""),
  43120. ic(T, x, {
  43121. labelFetcher: t,
  43122. labelDataIndex: I,
  43123. defaultOpacity: C.opacity,
  43124. defaultText: R
  43125. }),
  43126. T.ensureState("emphasis").style = g,
  43127. T.ensureState("blur").style = y,
  43128. T.ensureState("select").style = v,
  43129. Zl(T, b, w, S),
  43130. T.incremental = r,
  43131. r && (T.states.emphasis.hoverLayer = !0),
  43132. d.add(T),
  43133. f.setItemGraphicEl(I, T),
  43134. this._progressiveEls && this._progressiveEls.push(T)
  43135. }
  43136. }
  43137. ,
  43138. e.prototype._renderOnGeo = function(t, e, n, i) {
  43139. var r = n.targetVisuals.inRange
  43140. , o = n.targetVisuals.outOfRange
  43141. , a = e.getData()
  43142. , s = this._hmLayer || this._hmLayer || new cO;
  43143. s.blurSize = e.get("blurSize"),
  43144. s.pointSize = e.get("pointSize"),
  43145. s.minOpacity = e.get("minOpacity"),
  43146. s.maxOpacity = e.get("maxOpacity");
  43147. var l = t.getViewRect().clone()
  43148. , u = t.getRoamTransform();
  43149. l.applyTransform(u);
  43150. var h = Math.max(l.x, 0)
  43151. , c = Math.max(l.y, 0)
  43152. , p = Math.min(l.width + l.x, i.getWidth())
  43153. , d = Math.min(l.height + l.y, i.getHeight())
  43154. , f = p - h
  43155. , g = d - c
  43156. , y = [a.mapDimension("lng"), a.mapDimension("lat"), a.mapDimension("value")]
  43157. , v = a.mapArray(y, (function(e, n, i) {
  43158. var r = t.dataToPoint([e, n]);
  43159. return r[0] -= h,
  43160. r[1] -= c,
  43161. r.push(i),
  43162. r
  43163. }
  43164. ))
  43165. , m = n.getExtent()
  43166. , x = "visualMap.continuous" === n.type ? function(t, e) {
  43167. var n = t[1] - t[0];
  43168. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n],
  43169. function(t) {
  43170. return t >= e[0] && t <= e[1]
  43171. }
  43172. }(m, n.option.range) : function(t, e, n) {
  43173. var i = t[1] - t[0]
  43174. , r = (e = z(e, (function(e) {
  43175. return {
  43176. interval: [(e.interval[0] - t[0]) / i, (e.interval[1] - t[0]) / i]
  43177. }
  43178. }
  43179. ))).length
  43180. , o = 0;
  43181. return function(t) {
  43182. var i;
  43183. for (i = o; i < r; i++)
  43184. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  43185. o = i;
  43186. break
  43187. }
  43188. if (i === r)
  43189. for (i = o - 1; i >= 0; i--) {
  43190. var a;
  43191. if ((a = e[i].interval)[0] <= t && t <= a[1]) {
  43192. o = i;
  43193. break
  43194. }
  43195. }
  43196. return i >= 0 && i < r && n[i]
  43197. }
  43198. }(m, n.getPieceList(), n.option.selected);
  43199. s.update(v, f, g, r.color.getNormalizer(), {
  43200. inRange: r.color.getColorMapper(),
  43201. outOfRange: o.color.getColorMapper()
  43202. }, x);
  43203. var _ = new Ns({
  43204. style: {
  43205. width: f,
  43206. height: g,
  43207. x: h,
  43208. y: c,
  43209. image: s.canvas
  43210. },
  43211. silent: !0
  43212. });
  43213. this.group.add(_)
  43214. }
  43215. ,
  43216. e.type = "heatmap",
  43217. e
  43218. }(Og)
  43219. , fO = function(t) {
  43220. function e() {
  43221. var n = null !== t && t.apply(this, arguments) || this;
  43222. return n.type = e.type,
  43223. n
  43224. }
  43225. return n(e, t),
  43226. e.prototype.getInitialData = function(t, e) {
  43227. return _x(null, this, {
  43228. generateCoord: "value"
  43229. })
  43230. }
  43231. ,
  43232. e.prototype.preventIncremental = function() {
  43233. var t = wd.get(this.get("coordinateSystem"));
  43234. if (t && t.dimensions)
  43235. return "lng" === t.dimensions[0] && "lat" === t.dimensions[1]
  43236. }
  43237. ,
  43238. e.type = "series.heatmap",
  43239. e.dependencies = ["grid", "geo", "calendar"],
  43240. e.defaultOption = {
  43241. coordinateSystem: "cartesian2d",
  43242. z: 2,
  43243. geoIndex: 0,
  43244. blurSize: 30,
  43245. pointSize: 20,
  43246. maxOpacity: 1,
  43247. minOpacity: 0,
  43248. select: {
  43249. itemStyle: {
  43250. borderColor: "#212121"
  43251. }
  43252. }
  43253. },
  43254. e
  43255. }(bg);
  43256. var gO = ["itemStyle", "borderWidth"]
  43257. , yO = [{
  43258. xy: "x",
  43259. wh: "width",
  43260. index: 0,
  43261. posDesc: ["left", "right"]
  43262. }, {
  43263. xy: "y",
  43264. wh: "height",
  43265. index: 1,
  43266. posDesc: ["top", "bottom"]
  43267. }]
  43268. , vO = new Su
  43269. , mO = function(t) {
  43270. function e() {
  43271. var n = null !== t && t.apply(this, arguments) || this;
  43272. return n.type = e.type,
  43273. n
  43274. }
  43275. return n(e, t),
  43276. e.prototype.render = function(t, e, n) {
  43277. var i = this.group
  43278. , r = t.getData()
  43279. , o = this._data
  43280. , a = t.coordinateSystem
  43281. , s = a.getBaseAxis().isHorizontal()
  43282. , l = a.master.getRect()
  43283. , u = {
  43284. ecSize: {
  43285. width: n.getWidth(),
  43286. height: n.getHeight()
  43287. },
  43288. seriesModel: t,
  43289. coordSys: a,
  43290. coordSysExtent: [[l.x, l.x + l.width], [l.y, l.y + l.height]],
  43291. isHorizontal: s,
  43292. valueDim: yO[+s],
  43293. categoryDim: yO[1 - +s]
  43294. };
  43295. r.diff(o).add((function(t) {
  43296. if (r.hasValue(t)) {
  43297. var e = TO(r, t)
  43298. , n = xO(r, t, e, u)
  43299. , o = AO(r, u, n);
  43300. r.setItemGraphicEl(t, o),
  43301. i.add(o),
  43302. RO(o, u, n)
  43303. }
  43304. }
  43305. )).update((function(t, e) {
  43306. var n = o.getItemGraphicEl(e);
  43307. if (r.hasValue(t)) {
  43308. var a = TO(r, t)
  43309. , s = xO(r, t, a, u)
  43310. , l = LO(r, s);
  43311. n && l !== n.__pictorialShapeStr && (i.remove(n),
  43312. r.setItemGraphicEl(t, null),
  43313. n = null),
  43314. n ? function(t, e, n) {
  43315. var i = n.animationModel
  43316. , r = n.dataIndex
  43317. , o = t.__pictorialBundle;
  43318. vh(o, {
  43319. x: n.bundlePosition[0],
  43320. y: n.bundlePosition[1]
  43321. }, i, r),
  43322. n.symbolRepeat ? wO(t, e, n, !0) : SO(t, e, n, !0);
  43323. MO(t, n, !0),
  43324. IO(t, e, n, !0)
  43325. }(n, u, s) : n = AO(r, u, s, !0),
  43326. r.setItemGraphicEl(t, n),
  43327. n.__pictorialSymbolMeta = s,
  43328. i.add(n),
  43329. RO(n, u, s)
  43330. } else
  43331. i.remove(n)
  43332. }
  43333. )).remove((function(t) {
  43334. var e = o.getItemGraphicEl(t);
  43335. e && kO(o, t, e.__pictorialSymbolMeta.animationModel, e)
  43336. }
  43337. )).execute();
  43338. var h = t.get("clip", !0) ? PS(t.coordinateSystem, !1, t) : null;
  43339. return h ? i.setClipPath(h) : i.removeClipPath(),
  43340. this._data = r,
  43341. this.group
  43342. }
  43343. ,
  43344. e.prototype.remove = function(t, e) {
  43345. var n = this.group
  43346. , i = this._data;
  43347. t.get("animation") ? i && i.eachItemGraphicEl((function(e) {
  43348. kO(i, rl(e).dataIndex, t, e)
  43349. }
  43350. )) : n.removeAll()
  43351. }
  43352. ,
  43353. e.type = "pictorialBar",
  43354. e
  43355. }(Og);
  43356. function xO(t, e, n, i) {
  43357. var r = t.getItemLayout(e)
  43358. , o = n.get("symbolRepeat")
  43359. , a = n.get("symbolClip")
  43360. , s = n.get("symbolPosition") || "start"
  43361. , l = (n.get("symbolRotate") || 0) * Math.PI / 180 || 0
  43362. , u = n.get("symbolPatternSize") || 2
  43363. , h = n.isAnimationEnabled()
  43364. , c = {
  43365. dataIndex: e,
  43366. layout: r,
  43367. itemModel: n,
  43368. symbolType: t.getItemVisual(e, "symbol") || "circle",
  43369. style: t.getItemVisual(e, "style"),
  43370. symbolClip: a,
  43371. symbolRepeat: o,
  43372. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  43373. symbolPatternSize: u,
  43374. rotation: l,
  43375. animationModel: h ? n : null,
  43376. hoverScale: h && n.get(["emphasis", "scale"]),
  43377. z2: n.getShallow("z", !0) || 0
  43378. };
  43379. !function(t, e, n, i, r) {
  43380. var o, a = i.valueDim, s = t.get("symbolBoundingData"), l = i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()), u = l.toGlobalCoord(l.dataToCoord(0)), h = 1 - +(n[a.wh] <= 0);
  43381. if (Y(s)) {
  43382. var c = [_O(l, s[0]) - u, _O(l, s[1]) - u];
  43383. c[1] < c[0] && c.reverse(),
  43384. o = c[h]
  43385. } else
  43386. o = null != s ? _O(l, s) - u : e ? i.coordSysExtent[a.index][h] - u : n[a.wh];
  43387. r.boundingLength = o,
  43388. e && (r.repeatCutLength = n[a.wh]);
  43389. var p = "x" === a.xy
  43390. , d = l.inverse;
  43391. r.pxSign = p && !d || !p && d ? o >= 0 ? 1 : -1 : o > 0 ? 1 : -1
  43392. }(n, o, r, i, c),
  43393. function(t, e, n, i, r, o, a, s, l, u) {
  43394. var h, c = l.valueDim, p = l.categoryDim, d = Math.abs(n[p.wh]), f = t.getItemVisual(e, "symbolSize");
  43395. h = Y(f) ? f.slice() : null == f ? ["100%", "100%"] : [f, f];
  43396. h[p.index] = $r(h[p.index], d),
  43397. h[c.index] = $r(h[c.index], i ? d : Math.abs(o)),
  43398. u.symbolSize = h;
  43399. var g = u.symbolScale = [h[0] / s, h[1] / s];
  43400. g[c.index] *= (l.isHorizontal ? -1 : 1) * a
  43401. }(t, e, r, o, 0, c.boundingLength, c.pxSign, u, i, c),
  43402. function(t, e, n, i, r) {
  43403. var o = t.get(gO) || 0;
  43404. o && (vO.attr({
  43405. scaleX: e[0],
  43406. scaleY: e[1],
  43407. rotation: n
  43408. }),
  43409. vO.updateTransform(),
  43410. o /= vO.getLineScale(),
  43411. o *= e[i.valueDim.index]);
  43412. r.valueLineWidth = o || 0
  43413. }(n, c.symbolScale, l, i, c);
  43414. var p = c.symbolSize
  43415. , d = Zy(n.get("symbolOffset"), p);
  43416. return function(t, e, n, i, r, o, a, s, l, u, h, c) {
  43417. var p = h.categoryDim
  43418. , d = h.valueDim
  43419. , f = c.pxSign
  43420. , g = Math.max(e[d.index] + s, 0)
  43421. , y = g;
  43422. if (i) {
  43423. var v = Math.abs(l)
  43424. , m = it(t.get("symbolMargin"), "15%") + ""
  43425. , x = !1;
  43426. m.lastIndexOf("!") === m.length - 1 && (x = !0,
  43427. m = m.slice(0, m.length - 1));
  43428. var _ = $r(m, e[d.index])
  43429. , b = Math.max(g + 2 * _, 0)
  43430. , w = x ? 0 : 2 * _
  43431. , S = vo(i)
  43432. , M = S ? i : NO((v + w) / b);
  43433. b = g + 2 * (_ = (v - M * g) / 2 / (x ? M : Math.max(M - 1, 1))),
  43434. w = x ? 0 : 2 * _,
  43435. S || "fixed" === i || (M = u ? NO((Math.abs(u) + w) / b) : 0),
  43436. y = M * b - w,
  43437. c.repeatTimes = M,
  43438. c.symbolMargin = _
  43439. }
  43440. var I = f * (y / 2)
  43441. , T = c.pathPosition = [];
  43442. T[p.index] = n[p.wh] / 2,
  43443. T[d.index] = "start" === a ? I : "end" === a ? l - I : l / 2,
  43444. o && (T[0] += o[0],
  43445. T[1] += o[1]);
  43446. var C = c.bundlePosition = [];
  43447. C[p.index] = n[p.xy],
  43448. C[d.index] = n[d.xy];
  43449. var D = c.barRectShape = A({}, n);
  43450. D[d.wh] = f * Math.max(Math.abs(n[d.wh]), Math.abs(T[d.index] + I)),
  43451. D[p.wh] = n[p.wh];
  43452. var k = c.clipShape = {};
  43453. k[p.xy] = -n[p.xy],
  43454. k[p.wh] = h.ecSize[p.wh],
  43455. k[d.xy] = 0,
  43456. k[d.wh] = n[d.wh]
  43457. }(n, p, r, o, 0, d, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, i, c),
  43458. c
  43459. }
  43460. function _O(t, e) {
  43461. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))
  43462. }
  43463. function bO(t) {
  43464. var e = t.symbolPatternSize
  43465. , n = Xy(t.symbolType, -e / 2, -e / 2, e, e);
  43466. return n.attr({
  43467. culling: !0
  43468. }),
  43469. "image" !== n.type && n.setStyle({
  43470. strokeNoScale: !0
  43471. }),
  43472. n
  43473. }
  43474. function wO(t, e, n, i) {
  43475. var r = t.__pictorialBundle
  43476. , o = n.symbolSize
  43477. , a = n.valueLineWidth
  43478. , s = n.pathPosition
  43479. , l = e.valueDim
  43480. , u = n.repeatTimes || 0
  43481. , h = 0
  43482. , c = o[e.valueDim.index] + a + 2 * n.symbolMargin;
  43483. for (PO(t, (function(t) {
  43484. t.__pictorialAnimationIndex = h,
  43485. t.__pictorialRepeatTimes = u,
  43486. h < u ? OO(t, null, f(h), n, i) : OO(t, null, {
  43487. scaleX: 0,
  43488. scaleY: 0
  43489. }, n, i, (function() {
  43490. r.remove(t)
  43491. }
  43492. )),
  43493. h++
  43494. }
  43495. )); h < u; h++) {
  43496. var p = bO(n);
  43497. p.__pictorialAnimationIndex = h,
  43498. p.__pictorialRepeatTimes = u,
  43499. r.add(p);
  43500. var d = f(h);
  43501. OO(p, {
  43502. x: d.x,
  43503. y: d.y,
  43504. scaleX: 0,
  43505. scaleY: 0
  43506. }, {
  43507. scaleX: d.scaleX,
  43508. scaleY: d.scaleY,
  43509. rotation: d.rotation
  43510. }, n, i)
  43511. }
  43512. function f(t) {
  43513. var e = s.slice()
  43514. , i = n.pxSign
  43515. , r = t;
  43516. return ("start" === n.symbolRepeatDirection ? i > 0 : i < 0) && (r = u - 1 - t),
  43517. e[l.index] = c * (r - u / 2 + .5) + s[l.index],
  43518. {
  43519. x: e[0],
  43520. y: e[1],
  43521. scaleX: n.symbolScale[0],
  43522. scaleY: n.symbolScale[1],
  43523. rotation: n.rotation
  43524. }
  43525. }
  43526. }
  43527. function SO(t, e, n, i) {
  43528. var r = t.__pictorialBundle
  43529. , o = t.__pictorialMainPath;
  43530. o ? OO(o, null, {
  43531. x: n.pathPosition[0],
  43532. y: n.pathPosition[1],
  43533. scaleX: n.symbolScale[0],
  43534. scaleY: n.symbolScale[1],
  43535. rotation: n.rotation
  43536. }, n, i) : (o = t.__pictorialMainPath = bO(n),
  43537. r.add(o),
  43538. OO(o, {
  43539. x: n.pathPosition[0],
  43540. y: n.pathPosition[1],
  43541. scaleX: 0,
  43542. scaleY: 0,
  43543. rotation: n.rotation
  43544. }, {
  43545. scaleX: n.symbolScale[0],
  43546. scaleY: n.symbolScale[1]
  43547. }, n, i))
  43548. }
  43549. function MO(t, e, n) {
  43550. var i = A({}, e.barRectShape)
  43551. , r = t.__pictorialBarRect;
  43552. r ? OO(r, null, {
  43553. shape: i
  43554. }, e, n) : ((r = t.__pictorialBarRect = new Ws({
  43555. z2: 2,
  43556. shape: i,
  43557. silent: !0,
  43558. style: {
  43559. stroke: "transparent",
  43560. fill: "transparent",
  43561. lineWidth: 0
  43562. }
  43563. })).disableMorphing = !0,
  43564. t.add(r))
  43565. }
  43566. function IO(t, e, n, i) {
  43567. if (n.symbolClip) {
  43568. var r = t.__pictorialClipPath
  43569. , o = A({}, n.clipShape)
  43570. , a = e.valueDim
  43571. , s = n.animationModel
  43572. , l = n.dataIndex;
  43573. if (r)
  43574. vh(r, {
  43575. shape: o
  43576. }, s, l);
  43577. else {
  43578. o[a.wh] = 0,
  43579. r = new Ws({
  43580. shape: o
  43581. }),
  43582. t.__pictorialBundle.setClipPath(r),
  43583. t.__pictorialClipPath = r;
  43584. var u = {};
  43585. u[a.wh] = n.clipShape[a.wh],
  43586. Qh[i ? "updateProps" : "initProps"](r, {
  43587. shape: u
  43588. }, s, l)
  43589. }
  43590. }
  43591. }
  43592. function TO(t, e) {
  43593. var n = t.getItemModel(e);
  43594. return n.getAnimationDelayParams = CO,
  43595. n.isAnimationEnabled = DO,
  43596. n
  43597. }
  43598. function CO(t) {
  43599. return {
  43600. index: t.__pictorialAnimationIndex,
  43601. count: t.__pictorialRepeatTimes
  43602. }
  43603. }
  43604. function DO() {
  43605. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
  43606. }
  43607. function AO(t, e, n, i) {
  43608. var r = new Br
  43609. , o = new Br;
  43610. return r.add(o),
  43611. r.__pictorialBundle = o,
  43612. o.x = n.bundlePosition[0],
  43613. o.y = n.bundlePosition[1],
  43614. n.symbolRepeat ? wO(r, e, n) : SO(r, 0, n),
  43615. MO(r, n, i),
  43616. IO(r, e, n, i),
  43617. r.__pictorialShapeStr = LO(t, n),
  43618. r.__pictorialSymbolMeta = n,
  43619. r
  43620. }
  43621. function kO(t, e, n, i) {
  43622. var r = i.__pictorialBarRect;
  43623. r && r.removeTextContent();
  43624. var o = [];
  43625. PO(i, (function(t) {
  43626. o.push(t)
  43627. }
  43628. )),
  43629. i.__pictorialMainPath && o.push(i.__pictorialMainPath),
  43630. i.__pictorialClipPath && (n = null),
  43631. E(o, (function(t) {
  43632. _h(t, {
  43633. scaleX: 0,
  43634. scaleY: 0
  43635. }, n, e, (function() {
  43636. i.parent && i.parent.remove(i)
  43637. }
  43638. ))
  43639. }
  43640. )),
  43641. t.setItemGraphicEl(e, null)
  43642. }
  43643. function LO(t, e) {
  43644. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":")
  43645. }
  43646. function PO(t, e, n) {
  43647. E(t.__pictorialBundle.children(), (function(i) {
  43648. i !== t.__pictorialBarRect && e.call(n, i)
  43649. }
  43650. ))
  43651. }
  43652. function OO(t, e, n, i, r, o) {
  43653. e && t.attr(e),
  43654. i.symbolClip && !r ? n && t.attr(n) : n && Qh[r ? "updateProps" : "initProps"](t, n, i.animationModel, i.dataIndex, o)
  43655. }
  43656. function RO(t, e, n) {
  43657. var i = n.dataIndex
  43658. , r = n.itemModel
  43659. , o = r.getModel("emphasis")
  43660. , a = o.getModel("itemStyle").getItemStyle()
  43661. , s = r.getModel(["blur", "itemStyle"]).getItemStyle()
  43662. , l = r.getModel(["select", "itemStyle"]).getItemStyle()
  43663. , u = r.getShallow("cursor")
  43664. , h = o.get("focus")
  43665. , c = o.get("blurScope")
  43666. , p = o.get("scale");
  43667. PO(t, (function(t) {
  43668. if (t instanceof Ns) {
  43669. var e = t.style;
  43670. t.useStyle(A({
  43671. image: e.image,
  43672. x: e.x,
  43673. y: e.y,
  43674. width: e.width,
  43675. height: e.height
  43676. }, n.style))
  43677. } else
  43678. t.useStyle(n.style);
  43679. var i = t.ensureState("emphasis");
  43680. i.style = a,
  43681. p && (i.scaleX = 1.1 * t.scaleX,
  43682. i.scaleY = 1.1 * t.scaleY),
  43683. t.ensureState("blur").style = s,
  43684. t.ensureState("select").style = l,
  43685. u && (t.cursor = u),
  43686. t.z2 = n.z2
  43687. }
  43688. ));
  43689. var d = e.valueDim.posDesc[+(n.boundingLength > 0)]
  43690. , f = t.__pictorialBarRect;
  43691. f.ignoreClip = !0,
  43692. ic(f, rc(r), {
  43693. labelFetcher: e.seriesModel,
  43694. labelDataIndex: i,
  43695. defaultText: pS(e.seriesModel.getData(), i),
  43696. inheritColor: n.style.fill,
  43697. defaultOpacity: n.style.opacity,
  43698. defaultOutsidePosition: d
  43699. }),
  43700. Zl(t, h, c, o.get("disabled"))
  43701. }
  43702. function NO(t) {
  43703. var e = Math.round(t);
  43704. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t)
  43705. }
  43706. var EO = function(t) {
  43707. function e() {
  43708. var n = null !== t && t.apply(this, arguments) || this;
  43709. return n.type = e.type,
  43710. n.hasSymbolVisual = !0,
  43711. n.defaultSymbol = "roundRect",
  43712. n
  43713. }
  43714. return n(e, t),
  43715. e.prototype.getInitialData = function(e) {
  43716. return e.stack = null,
  43717. t.prototype.getInitialData.apply(this, arguments)
  43718. }
  43719. ,
  43720. e.type = "series.pictorialBar",
  43721. e.dependencies = ["grid"],
  43722. e.defaultOption = kc(qS.defaultOption, {
  43723. symbol: "circle",
  43724. symbolSize: null,
  43725. symbolRotate: null,
  43726. symbolPosition: null,
  43727. symbolOffset: null,
  43728. symbolMargin: null,
  43729. symbolRepeat: !1,
  43730. symbolRepeatDirection: "end",
  43731. symbolClip: !1,
  43732. symbolBoundingData: null,
  43733. symbolPatternSize: 400,
  43734. barGap: "-100%",
  43735. clip: !1,
  43736. progressive: 0,
  43737. emphasis: {
  43738. scale: !1
  43739. },
  43740. select: {
  43741. itemStyle: {
  43742. borderColor: "#212121"
  43743. }
  43744. }
  43745. }),
  43746. e
  43747. }(qS);
  43748. var zO = function(t) {
  43749. function e() {
  43750. var n = null !== t && t.apply(this, arguments) || this;
  43751. return n.type = e.type,
  43752. n._layers = [],
  43753. n
  43754. }
  43755. return n(e, t),
  43756. e.prototype.render = function(t, e, n) {
  43757. var i = t.getData()
  43758. , r = this
  43759. , o = this.group
  43760. , a = t.getLayerSeries()
  43761. , s = i.getLayout("layoutInfo")
  43762. , l = s.rect
  43763. , u = s.boundaryGap;
  43764. function h(t) {
  43765. return t.name
  43766. }
  43767. o.x = 0,
  43768. o.y = l.y + u[0];
  43769. var c = new Gm(this._layersSeries || [],a,h,h)
  43770. , p = [];
  43771. function d(e, n, s) {
  43772. var l = r._layers;
  43773. if ("remove" !== e) {
  43774. for (var u, h, c = [], d = [], f = a[n].indices, g = 0; g < f.length; g++) {
  43775. var y = i.getItemLayout(f[g])
  43776. , v = y.x
  43777. , m = y.y0
  43778. , x = y.y;
  43779. c.push(v, m),
  43780. d.push(v, m + x),
  43781. u = i.getItemVisual(f[g], "style")
  43782. }
  43783. var _ = i.getItemLayout(f[0])
  43784. , b = t.getModel("label").get("margin")
  43785. , w = t.getModel("emphasis");
  43786. if ("add" === e) {
  43787. var S = p[n] = new Br;
  43788. h = new AS({
  43789. shape: {
  43790. points: c,
  43791. stackedOnPoints: d,
  43792. smooth: .4,
  43793. stackedOnSmooth: .4,
  43794. smoothConstraint: !1
  43795. },
  43796. z2: 0
  43797. }),
  43798. S.add(h),
  43799. o.add(S),
  43800. t.isAnimationEnabled() && h.setClipPath(function(t, e, n) {
  43801. var i = new Ws({
  43802. shape: {
  43803. x: t.x - 10,
  43804. y: t.y - 10,
  43805. width: 0,
  43806. height: t.height + 20
  43807. }
  43808. });
  43809. return mh(i, {
  43810. shape: {
  43811. x: t.x - 50,
  43812. width: t.width + 100,
  43813. height: t.height + 20
  43814. }
  43815. }, e, n),
  43816. i
  43817. }(h.getBoundingRect(), t, (function() {
  43818. h.removeClipPath()
  43819. }
  43820. )))
  43821. } else {
  43822. S = l[s];
  43823. h = S.childAt(0),
  43824. o.add(S),
  43825. p[n] = S,
  43826. vh(h, {
  43827. shape: {
  43828. points: c,
  43829. stackedOnPoints: d
  43830. }
  43831. }, t),
  43832. Sh(h)
  43833. }
  43834. ic(h, rc(t), {
  43835. labelDataIndex: f[g - 1],
  43836. defaultText: i.getName(f[g - 1]),
  43837. inheritColor: u.fill
  43838. }, {
  43839. normal: {
  43840. verticalAlign: "middle"
  43841. }
  43842. }),
  43843. h.setTextConfig({
  43844. position: null,
  43845. local: !0
  43846. });
  43847. var M = h.getTextContent();
  43848. M && (M.x = _.x - b,
  43849. M.y = _.y0 + _.y / 2),
  43850. h.useStyle(u),
  43851. i.setItemGraphicEl(n, h),
  43852. $l(h, t),
  43853. Zl(h, w.get("focus"), w.get("blurScope"), w.get("disabled"))
  43854. } else
  43855. o.remove(l[n])
  43856. }
  43857. c.add(W(d, this, "add")).update(W(d, this, "update")).remove(W(d, this, "remove")).execute(),
  43858. this._layersSeries = a,
  43859. this._layers = p
  43860. }
  43861. ,
  43862. e.type = "themeRiver",
  43863. e
  43864. }(Og);
  43865. var VO = function(t) {
  43866. function e() {
  43867. var n = null !== t && t.apply(this, arguments) || this;
  43868. return n.type = e.type,
  43869. n
  43870. }
  43871. return n(e, t),
  43872. e.prototype.init = function(e) {
  43873. t.prototype.init.apply(this, arguments),
  43874. this.legendVisualProvider = new NM(W(this.getData, this),W(this.getRawData, this))
  43875. }
  43876. ,
  43877. e.prototype.fixData = function(t) {
  43878. var e = t.length
  43879. , n = {}
  43880. , i = Uo(t, (function(t) {
  43881. return n.hasOwnProperty(t[0] + "") || (n[t[0] + ""] = -1),
  43882. t[2]
  43883. }
  43884. ))
  43885. , r = [];
  43886. i.buckets.each((function(t, e) {
  43887. r.push({
  43888. name: e,
  43889. dataList: t
  43890. })
  43891. }
  43892. ));
  43893. for (var o = r.length, a = 0; a < o; ++a) {
  43894. for (var s = r[a].name, l = 0; l < r[a].dataList.length; ++l) {
  43895. var u = r[a].dataList[l][0] + "";
  43896. n[u] = a
  43897. }
  43898. for (var u in n)
  43899. n.hasOwnProperty(u) && n[u] !== a && (n[u] = a,
  43900. t[e] = [u, 0, s],
  43901. e++)
  43902. }
  43903. return t
  43904. }
  43905. ,
  43906. e.prototype.getInitialData = function(t, e) {
  43907. for (var n = this.getReferringComponents("singleAxis", Wo).models[0].get("type"), i = B(t.data, (function(t) {
  43908. return void 0 !== t[2]
  43909. }
  43910. )), r = this.fixData(i || []), o = [], a = this.nameMap = yt(), s = 0, l = 0; l < r.length; ++l)
  43911. o.push(r[l][2]),
  43912. a.get(r[l][2]) || (a.set(r[l][2], s),
  43913. s++);
  43914. var u = px(r, {
  43915. coordDimensions: ["single"],
  43916. dimensionsDefine: [{
  43917. name: "time",
  43918. type: Ym(n)
  43919. }, {
  43920. name: "value",
  43921. type: "float"
  43922. }, {
  43923. name: "name",
  43924. type: "ordinal"
  43925. }],
  43926. encodeDefine: {
  43927. single: 0,
  43928. value: 1,
  43929. itemName: 2
  43930. }
  43931. }).dimensions
  43932. , h = new cx(u,this);
  43933. return h.initData(r),
  43934. h
  43935. }
  43936. ,
  43937. e.prototype.getLayerSeries = function() {
  43938. for (var t = this.getData(), e = t.count(), n = [], i = 0; i < e; ++i)
  43939. n[i] = i;
  43940. var r = t.mapDimension("single")
  43941. , o = Uo(n, (function(e) {
  43942. return t.get("name", e)
  43943. }
  43944. ))
  43945. , a = [];
  43946. return o.buckets.each((function(e, n) {
  43947. e.sort((function(e, n) {
  43948. return t.get(r, e) - t.get(r, n)
  43949. }
  43950. )),
  43951. a.push({
  43952. name: n,
  43953. indices: e
  43954. })
  43955. }
  43956. )),
  43957. a
  43958. }
  43959. ,
  43960. e.prototype.getAxisTooltipData = function(t, e, n) {
  43961. Y(t) || (t = t ? [t] : []);
  43962. for (var i, r = this.getData(), o = this.getLayerSeries(), a = [], s = o.length, l = 0; l < s; ++l) {
  43963. for (var u = Number.MAX_VALUE, h = -1, c = o[l].indices.length, p = 0; p < c; ++p) {
  43964. var d = r.get(t[0], o[l].indices[p])
  43965. , f = Math.abs(d - e);
  43966. f <= u && (i = d,
  43967. u = f,
  43968. h = o[l].indices[p])
  43969. }
  43970. a.push(h)
  43971. }
  43972. return {
  43973. dataIndices: a,
  43974. nestestValue: i
  43975. }
  43976. }
  43977. ,
  43978. e.prototype.formatTooltip = function(t, e, n) {
  43979. var i = this.getData();
  43980. return og("nameValue", {
  43981. name: i.getName(t),
  43982. value: i.get(i.mapDimension("value"), t)
  43983. })
  43984. }
  43985. ,
  43986. e.type = "series.themeRiver",
  43987. e.dependencies = ["singleAxis"],
  43988. e.defaultOption = {
  43989. z: 2,
  43990. colorBy: "data",
  43991. coordinateSystem: "singleAxis",
  43992. boundaryGap: ["10%", "10%"],
  43993. singleAxisIndex: 0,
  43994. animationEasing: "linear",
  43995. label: {
  43996. margin: 4,
  43997. show: !0,
  43998. position: "left",
  43999. fontSize: 11
  44000. },
  44001. emphasis: {
  44002. label: {
  44003. show: !0
  44004. }
  44005. }
  44006. },
  44007. e
  44008. }(bg);
  44009. function BO(t, e) {
  44010. t.eachSeriesByType("themeRiver", (function(t) {
  44011. var e = t.getData()
  44012. , n = t.coordinateSystem
  44013. , i = {}
  44014. , r = n.getRect();
  44015. i.rect = r;
  44016. var o = t.get("boundaryGap")
  44017. , a = n.getAxis();
  44018. (i.boundaryGap = o,
  44019. "horizontal" === a.orient) ? (o[0] = $r(o[0], r.height),
  44020. o[1] = $r(o[1], r.height),
  44021. FO(e, t, r.height - o[0] - o[1])) : (o[0] = $r(o[0], r.width),
  44022. o[1] = $r(o[1], r.width),
  44023. FO(e, t, r.width - o[0] - o[1]));
  44024. e.setLayout("layoutInfo", i)
  44025. }
  44026. ))
  44027. }
  44028. function FO(t, e, n) {
  44029. if (t.count())
  44030. for (var i, r = e.coordinateSystem, o = e.getLayerSeries(), a = t.mapDimension("single"), s = t.mapDimension("value"), l = z(o, (function(e) {
  44031. return z(e.indices, (function(e) {
  44032. var n = r.dataToPoint(t.get(a, e));
  44033. return n[1] = t.get(s, e),
  44034. n
  44035. }
  44036. ))
  44037. }
  44038. )), u = function(t) {
  44039. for (var e = t.length, n = t[0].length, i = [], r = [], o = 0, a = 0; a < n; ++a) {
  44040. for (var s = 0, l = 0; l < e; ++l)
  44041. s += t[l][a][1];
  44042. s > o && (o = s),
  44043. i.push(s)
  44044. }
  44045. for (var u = 0; u < n; ++u)
  44046. r[u] = (o - i[u]) / 2;
  44047. o = 0;
  44048. for (var h = 0; h < n; ++h) {
  44049. var c = i[h] + r[h];
  44050. c > o && (o = c)
  44051. }
  44052. return {
  44053. y0: r,
  44054. max: o
  44055. }
  44056. }(l), h = u.y0, c = n / u.max, p = o.length, d = o[0].indices.length, f = 0; f < d; ++f) {
  44057. i = h[f] * c,
  44058. t.setItemLayout(o[0].indices[f], {
  44059. layerIndex: 0,
  44060. x: l[0][f][0],
  44061. y0: i,
  44062. y: l[0][f][1] * c
  44063. });
  44064. for (var g = 1; g < p; ++g)
  44065. i += l[g - 1][f][1] * c,
  44066. t.setItemLayout(o[g].indices[f], {
  44067. layerIndex: g,
  44068. x: l[g][f][0],
  44069. y0: i,
  44070. y: l[g][f][1] * c
  44071. })
  44072. }
  44073. }
  44074. var GO = function(t) {
  44075. function e(e, n, i, r) {
  44076. var o = t.call(this) || this;
  44077. o.z2 = 2,
  44078. o.textConfig = {
  44079. inside: !0
  44080. },
  44081. rl(o).seriesIndex = n.seriesIndex;
  44082. var a = new Xs({
  44083. z2: 4,
  44084. silent: e.getModel().get(["label", "silent"])
  44085. });
  44086. return o.setTextContent(a),
  44087. o.updateData(!0, e, n, i, r),
  44088. o
  44089. }
  44090. return n(e, t),
  44091. e.prototype.updateData = function(t, e, n, i, r) {
  44092. this.node = e,
  44093. e.piece = this,
  44094. n = n || this._seriesModel,
  44095. i = i || this._ecModel;
  44096. var o = this;
  44097. rl(o).dataIndex = e.dataIndex;
  44098. var a = e.getModel()
  44099. , s = a.getModel("emphasis")
  44100. , l = e.getLayout()
  44101. , u = A({}, l);
  44102. u.label = null;
  44103. var h = e.getVisual("style");
  44104. h.lineJoin = "bevel";
  44105. var c = e.getVisual("decal");
  44106. c && (h.decal = mv(c, r));
  44107. var p = eM(a.getModel("itemStyle"), u, !0);
  44108. A(u, p),
  44109. E(hl, (function(t) {
  44110. var e = o.ensureState(t)
  44111. , n = a.getModel([t, "itemStyle"]);
  44112. e.style = n.getItemStyle();
  44113. var i = eM(n, u);
  44114. i && (e.shape = i)
  44115. }
  44116. )),
  44117. t ? (o.setShape(u),
  44118. o.shape.r = l.r0,
  44119. mh(o, {
  44120. shape: {
  44121. r: l.r
  44122. }
  44123. }, n, e.dataIndex)) : (vh(o, {
  44124. shape: u
  44125. }, n),
  44126. Sh(o)),
  44127. o.useStyle(h),
  44128. this._updateLabel(n);
  44129. var d = a.getShallow("cursor");
  44130. d && o.attr("cursor", d),
  44131. this._seriesModel = n || this._seriesModel,
  44132. this._ecModel = i || this._ecModel;
  44133. var f = s.get("focus");
  44134. Zl(this, "relative" === f ? vt(e.getAncestorsIndices(), e.getDescendantIndices()) : "ancestor" === f ? e.getAncestorsIndices() : "descendant" === f ? e.getDescendantIndices() : f, s.get("blurScope"), s.get("disabled"))
  44135. }
  44136. ,
  44137. e.prototype._updateLabel = function(t) {
  44138. var e = this
  44139. , n = this.node.getModel()
  44140. , i = n.getModel("label")
  44141. , r = this.node.getLayout()
  44142. , o = r.endAngle - r.startAngle
  44143. , a = (r.startAngle + r.endAngle) / 2
  44144. , s = Math.cos(a)
  44145. , l = Math.sin(a)
  44146. , u = this
  44147. , h = u.getTextContent()
  44148. , c = this.node.dataIndex
  44149. , p = i.get("minAngle") / 180 * Math.PI
  44150. , d = i.get("show") && !(null != p && Math.abs(o) < p);
  44151. function f(t, e) {
  44152. var n = t.get(e);
  44153. return null == n ? i.get(e) : n
  44154. }
  44155. h.ignore = !d,
  44156. E(cl, (function(i) {
  44157. var p = "normal" === i ? n.getModel("label") : n.getModel([i, "label"])
  44158. , d = "normal" === i
  44159. , g = d ? h : h.ensureState(i)
  44160. , y = t.getFormattedLabel(c, i);
  44161. d && (y = y || e.node.name),
  44162. g.style = oc(p, {}, null, "normal" !== i, !0),
  44163. y && (g.style.text = y);
  44164. var v = p.get("show");
  44165. null == v || d || (g.ignore = !v);
  44166. var m, x = f(p, "position"), _ = d ? u : u.states[i], b = _.style.fill;
  44167. _.textConfig = {
  44168. outsideFill: "inherit" === p.get("color") ? b : null,
  44169. inside: "outside" !== x
  44170. };
  44171. var w = f(p, "distance") || 0
  44172. , S = f(p, "align")
  44173. , M = f(p, "rotate")
  44174. , I = .5 * Math.PI
  44175. , T = 1.5 * Math.PI
  44176. , C = gs("tangential" === M ? Math.PI / 2 - a : a)
  44177. , D = C > I && !so(C - I) && C < T;
  44178. "outside" === x ? (m = r.r + w,
  44179. S = D ? "right" : "left") : S && "center" !== S ? "left" === S ? (m = r.r0 + w,
  44180. S = D ? "right" : "left") : "right" === S && (m = r.r - w,
  44181. S = D ? "left" : "right") : (m = o === 2 * Math.PI && 0 === r.r0 ? 0 : (r.r + r.r0) / 2,
  44182. S = "center"),
  44183. g.style.align = S,
  44184. g.style.verticalAlign = f(p, "verticalAlign") || "middle",
  44185. g.x = m * s + r.cx,
  44186. g.y = m * l + r.cy;
  44187. var A = 0;
  44188. "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),
  44189. g.rotation = gs(A)
  44190. }
  44191. )),
  44192. h.dirtyStyle()
  44193. }
  44194. ,
  44195. e
  44196. }(Fu)
  44197. , WO = "sunburstRootToNode"
  44198. , HO = "sunburstHighlight";
  44199. var YO = function(t) {
  44200. function e() {
  44201. var n = null !== t && t.apply(this, arguments) || this;
  44202. return n.type = e.type,
  44203. n
  44204. }
  44205. return n(e, t),
  44206. e.prototype.render = function(t, e, n, i) {
  44207. var r = this;
  44208. this.seriesModel = t,
  44209. this.api = n,
  44210. this.ecModel = e;
  44211. var o = t.getData()
  44212. , a = o.tree.root
  44213. , s = t.getViewRoot()
  44214. , l = this.group
  44215. , u = t.get("renderLabelForZeroData")
  44216. , h = [];
  44217. s.eachNode((function(t) {
  44218. h.push(t)
  44219. }
  44220. ));
  44221. var c = this._oldChildren || [];
  44222. !function(i, r) {
  44223. if (0 === i.length && 0 === r.length)
  44224. return;
  44225. function s(t) {
  44226. return t.getId()
  44227. }
  44228. function h(s, h) {
  44229. !function(i, r) {
  44230. u || !i || i.getValue() || (i = null);
  44231. if (i !== a && r !== a)
  44232. if (r && r.piece)
  44233. i ? (r.piece.updateData(!1, i, t, e, n),
  44234. o.setItemGraphicEl(i.dataIndex, r.piece)) : function(t) {
  44235. if (!t)
  44236. return;
  44237. t.piece && (l.remove(t.piece),
  44238. t.piece = null)
  44239. }(r);
  44240. else if (i) {
  44241. var s = new GO(i,t,e,n);
  44242. l.add(s),
  44243. o.setItemGraphicEl(i.dataIndex, s)
  44244. }
  44245. }(null == s ? null : i[s], null == h ? null : r[h])
  44246. }
  44247. new Gm(r,i,s,s).add(h).update(h).remove(H(h, null)).execute()
  44248. }(h, c),
  44249. function(i, o) {
  44250. o.depth > 0 ? (r.virtualPiece ? r.virtualPiece.updateData(!1, i, t, e, n) : (r.virtualPiece = new GO(i,t,e,n),
  44251. l.add(r.virtualPiece)),
  44252. o.piece.off("click"),
  44253. r.virtualPiece.on("click", (function(t) {
  44254. r._rootToNode(o.parentNode)
  44255. }
  44256. ))) : r.virtualPiece && (l.remove(r.virtualPiece),
  44257. r.virtualPiece = null)
  44258. }(a, s),
  44259. this._initEvents(),
  44260. this._oldChildren = h
  44261. }
  44262. ,
  44263. e.prototype._initEvents = function() {
  44264. var t = this;
  44265. this.group.off("click"),
  44266. this.group.on("click", (function(e) {
  44267. var n = !1;
  44268. t.seriesModel.getViewRoot().eachNode((function(i) {
  44269. if (!n && i.piece && i.piece === e.target) {
  44270. var r = i.getModel().get("nodeClick");
  44271. if ("rootToNode" === r)
  44272. t._rootToNode(i);
  44273. else if ("link" === r) {
  44274. var o = i.getModel()
  44275. , a = o.get("link");
  44276. if (a)
  44277. Mp(a, o.get("target", !0) || "_blank")
  44278. }
  44279. n = !0
  44280. }
  44281. }
  44282. ))
  44283. }
  44284. ))
  44285. }
  44286. ,
  44287. e.prototype._rootToNode = function(t) {
  44288. t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  44289. type: WO,
  44290. from: this.uid,
  44291. seriesId: this.seriesModel.id,
  44292. targetNode: t
  44293. })
  44294. }
  44295. ,
  44296. e.prototype.containPoint = function(t, e) {
  44297. var n = e.getData().getItemLayout(0);
  44298. if (n) {
  44299. var i = t[0] - n.cx
  44300. , r = t[1] - n.cy
  44301. , o = Math.sqrt(i * i + r * r);
  44302. return o <= n.r && o >= n.r0
  44303. }
  44304. }
  44305. ,
  44306. e.type = "sunburst",
  44307. e
  44308. }(Og)
  44309. , XO = function(t) {
  44310. function e() {
  44311. var n = null !== t && t.apply(this, arguments) || this;
  44312. return n.type = e.type,
  44313. n.ignoreStyleOnData = !0,
  44314. n
  44315. }
  44316. return n(e, t),
  44317. e.prototype.getInitialData = function(t, e) {
  44318. var n = {
  44319. name: t.name,
  44320. children: t.data
  44321. };
  44322. UO(n);
  44323. var i = this._levelModels = z(t.levels || [], (function(t) {
  44324. return new Cc(t,this,e)
  44325. }
  44326. ), this)
  44327. , r = nD.createTree(n, this, (function(t) {
  44328. t.wrapMethod("getItemModel", (function(t, e) {
  44329. var n = r.getNodeByDataIndex(e)
  44330. , o = i[n.depth];
  44331. return o && (t.parentModel = o),
  44332. t
  44333. }
  44334. ))
  44335. }
  44336. ));
  44337. return r.data
  44338. }
  44339. ,
  44340. e.prototype.optionUpdated = function() {
  44341. this.resetViewRoot()
  44342. }
  44343. ,
  44344. e.prototype.getDataParams = function(e) {
  44345. var n = t.prototype.getDataParams.apply(this, arguments)
  44346. , i = this.getData().tree.getNodeByDataIndex(e);
  44347. return n.treePathInfo = aD(i, this),
  44348. n
  44349. }
  44350. ,
  44351. e.prototype.getLevelModel = function(t) {
  44352. return this._levelModels && this._levelModels[t.depth]
  44353. }
  44354. ,
  44355. e.prototype.getViewRoot = function() {
  44356. return this._viewRoot
  44357. }
  44358. ,
  44359. e.prototype.resetViewRoot = function(t) {
  44360. t ? this._viewRoot = t : t = this._viewRoot;
  44361. var e = this.getRawData().tree.root;
  44362. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  44363. }
  44364. ,
  44365. e.prototype.enableAriaDecal = function() {
  44366. pD(this)
  44367. }
  44368. ,
  44369. e.type = "series.sunburst",
  44370. e.defaultOption = {
  44371. z: 2,
  44372. center: ["50%", "50%"],
  44373. radius: [0, "75%"],
  44374. clockwise: !0,
  44375. startAngle: 90,
  44376. minAngle: 0,
  44377. stillShowZeroSum: !0,
  44378. nodeClick: "rootToNode",
  44379. renderLabelForZeroData: !1,
  44380. label: {
  44381. rotate: "radial",
  44382. show: !0,
  44383. opacity: 1,
  44384. align: "center",
  44385. position: "inside",
  44386. distance: 5,
  44387. silent: !0
  44388. },
  44389. itemStyle: {
  44390. borderWidth: 1,
  44391. borderColor: "white",
  44392. borderType: "solid",
  44393. shadowBlur: 0,
  44394. shadowColor: "rgba(0, 0, 0, 0.2)",
  44395. shadowOffsetX: 0,
  44396. shadowOffsetY: 0,
  44397. opacity: 1
  44398. },
  44399. emphasis: {
  44400. focus: "descendant"
  44401. },
  44402. blur: {
  44403. itemStyle: {
  44404. opacity: .2
  44405. },
  44406. label: {
  44407. opacity: .1
  44408. }
  44409. },
  44410. animationType: "expansion",
  44411. animationDuration: 1e3,
  44412. animationDurationUpdate: 500,
  44413. data: [],
  44414. sort: "desc"
  44415. },
  44416. e
  44417. }(bg);
  44418. function UO(t) {
  44419. var e = 0;
  44420. E(t.children, (function(t) {
  44421. UO(t);
  44422. var n = t.value;
  44423. Y(n) && (n = n[0]),
  44424. e += n
  44425. }
  44426. ));
  44427. var n = t.value;
  44428. Y(n) && (n = n[0]),
  44429. (null == n || isNaN(n)) && (n = e),
  44430. n < 0 && (n = 0),
  44431. Y(t.value) ? t.value[0] = n : t.value = n
  44432. }
  44433. var ZO = Math.PI / 180;
  44434. function jO(t, e, n) {
  44435. e.eachSeriesByType(t, (function(t) {
  44436. var e = t.get("center")
  44437. , i = t.get("radius");
  44438. Y(i) || (i = [0, i]),
  44439. Y(e) || (e = [e, e]);
  44440. var r = n.getWidth()
  44441. , o = n.getHeight()
  44442. , a = Math.min(r, o)
  44443. , s = $r(e[0], r)
  44444. , l = $r(e[1], o)
  44445. , u = $r(i[0], a / 2)
  44446. , h = $r(i[1], a / 2)
  44447. , c = -t.get("startAngle") * ZO
  44448. , p = t.get("minAngle") * ZO
  44449. , d = t.getData().tree.root
  44450. , f = t.getViewRoot()
  44451. , g = f.depth
  44452. , y = t.get("sort");
  44453. null != y && qO(f, y);
  44454. var v = 0;
  44455. E(f.children, (function(t) {
  44456. !isNaN(t.getValue()) && v++
  44457. }
  44458. ));
  44459. var m = f.getValue()
  44460. , x = Math.PI / (m || v) * 2
  44461. , _ = f.depth > 0
  44462. , b = f.height - (_ ? -1 : 1)
  44463. , w = (h - u) / (b || 1)
  44464. , S = t.get("clockwise")
  44465. , M = t.get("stillShowZeroSum")
  44466. , I = S ? 1 : -1
  44467. , T = function(e, n) {
  44468. if (e) {
  44469. var i = n;
  44470. if (e !== d) {
  44471. var r = e.getValue()
  44472. , o = 0 === m && M ? x : r * x;
  44473. o < p && (o = p),
  44474. i = n + I * o;
  44475. var h = e.depth - g - (_ ? -1 : 1)
  44476. , c = u + w * h
  44477. , f = u + w * (h + 1)
  44478. , y = t.getLevelModel(e);
  44479. if (y) {
  44480. var v = y.get("r0", !0)
  44481. , b = y.get("r", !0)
  44482. , C = y.get("radius", !0);
  44483. null != C && (v = C[0],
  44484. b = C[1]),
  44485. null != v && (c = $r(v, a / 2)),
  44486. null != b && (f = $r(b, a / 2))
  44487. }
  44488. e.setLayout({
  44489. angle: o,
  44490. startAngle: n,
  44491. endAngle: i,
  44492. clockwise: S,
  44493. cx: s,
  44494. cy: l,
  44495. r0: c,
  44496. r: f
  44497. })
  44498. }
  44499. if (e.children && e.children.length) {
  44500. var D = 0;
  44501. E(e.children, (function(t) {
  44502. D += T(t, n + D)
  44503. }
  44504. ))
  44505. }
  44506. return i - n
  44507. }
  44508. };
  44509. if (_) {
  44510. var C = u
  44511. , D = u + w
  44512. , A = 2 * Math.PI;
  44513. d.setLayout({
  44514. angle: A,
  44515. startAngle: c,
  44516. endAngle: c + A,
  44517. clockwise: S,
  44518. cx: s,
  44519. cy: l,
  44520. r0: C,
  44521. r: D
  44522. })
  44523. }
  44524. T(f, c)
  44525. }
  44526. ))
  44527. }
  44528. function qO(t, e) {
  44529. var n = t.children || [];
  44530. t.children = function(t, e) {
  44531. if (X(e)) {
  44532. var n = z(t, (function(t, e) {
  44533. var n = t.getValue();
  44534. return {
  44535. params: {
  44536. depth: t.depth,
  44537. height: t.height,
  44538. dataIndex: t.dataIndex,
  44539. getValue: function() {
  44540. return n
  44541. }
  44542. },
  44543. index: e
  44544. }
  44545. }
  44546. ));
  44547. return n.sort((function(t, n) {
  44548. return e(t.params, n.params)
  44549. }
  44550. )),
  44551. z(n, (function(e) {
  44552. return t[e.index]
  44553. }
  44554. ))
  44555. }
  44556. var i = "asc" === e;
  44557. return t.sort((function(t, e) {
  44558. var n = (t.getValue() - e.getValue()) * (i ? 1 : -1);
  44559. return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n
  44560. }
  44561. ))
  44562. }(n, e),
  44563. n.length && E(t.children, (function(t) {
  44564. qO(t, e)
  44565. }
  44566. ))
  44567. }
  44568. function KO(t) {
  44569. var e = {};
  44570. t.eachSeriesByType("sunburst", (function(t) {
  44571. var n = t.getData()
  44572. , i = n.tree;
  44573. i.eachNode((function(r) {
  44574. var o = r.getModel().getModel("itemStyle").getItemStyle();
  44575. o.fill || (o.fill = function(t, n, i) {
  44576. for (var r = t; r && r.depth > 1; )
  44577. r = r.parentNode;
  44578. var o = n.getColorFromPalette(r.name || r.dataIndex + "", e);
  44579. return t.depth > 1 && U(o) && (o = $n(o, (t.depth - 1) / (i - 1) * .5)),
  44580. o
  44581. }(r, t, i.root.height)),
  44582. A(n.ensureUniqueItemVisual(r.dataIndex, "style"), o)
  44583. }
  44584. ))
  44585. }
  44586. ))
  44587. }
  44588. var $O = {
  44589. color: "fill",
  44590. borderColor: "stroke"
  44591. }
  44592. , JO = {
  44593. symbol: 1,
  44594. symbolSize: 1,
  44595. symbolKeepAspect: 1,
  44596. legendIcon: 1,
  44597. visualMeta: 1,
  44598. liftZ: 1,
  44599. decal: 1
  44600. }
  44601. , QO = Vo()
  44602. , tR = function(t) {
  44603. function e() {
  44604. var n = null !== t && t.apply(this, arguments) || this;
  44605. return n.type = e.type,
  44606. n
  44607. }
  44608. return n(e, t),
  44609. e.prototype.optionUpdated = function() {
  44610. this.currentZLevel = this.get("zlevel", !0),
  44611. this.currentZ = this.get("z", !0)
  44612. }
  44613. ,
  44614. e.prototype.getInitialData = function(t, e) {
  44615. return _x(null, this)
  44616. }
  44617. ,
  44618. e.prototype.getDataParams = function(e, n, i) {
  44619. var r = t.prototype.getDataParams.call(this, e, n);
  44620. return i && (r.info = QO(i).info),
  44621. r
  44622. }
  44623. ,
  44624. e.type = "series.custom",
  44625. e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"],
  44626. e.defaultOption = {
  44627. coordinateSystem: "cartesian2d",
  44628. z: 2,
  44629. legendHoverLink: !0,
  44630. clip: !1
  44631. },
  44632. e
  44633. }(bg);
  44634. function eR(t, e) {
  44635. return e = e || [0, 0],
  44636. z(["x", "y"], (function(n, i) {
  44637. var r = this.getAxis(n)
  44638. , o = e[i]
  44639. , a = t[i] / 2;
  44640. return "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a))
  44641. }
  44642. ), this)
  44643. }
  44644. function nR(t, e) {
  44645. return e = e || [0, 0],
  44646. z([0, 1], (function(n) {
  44647. var i = e[n]
  44648. , r = t[n] / 2
  44649. , o = []
  44650. , a = [];
  44651. return o[n] = i - r,
  44652. a[n] = i + r,
  44653. o[1 - n] = a[1 - n] = e[1 - n],
  44654. Math.abs(this.dataToPoint(o)[n] - this.dataToPoint(a)[n])
  44655. }
  44656. ), this)
  44657. }
  44658. function iR(t, e) {
  44659. var n = this.getAxis()
  44660. , i = e instanceof Array ? e[0] : e
  44661. , r = (t instanceof Array ? t[0] : t) / 2;
  44662. return "category" === n.type ? n.getBandWidth() : Math.abs(n.dataToCoord(i - r) - n.dataToCoord(i + r))
  44663. }
  44664. function rR(t, e) {
  44665. return e = e || [0, 0],
  44666. z(["Radius", "Angle"], (function(n, i) {
  44667. var r = this["get" + n + "Axis"]()
  44668. , o = e[i]
  44669. , a = t[i] / 2
  44670. , s = "category" === r.type ? r.getBandWidth() : Math.abs(r.dataToCoord(o - a) - r.dataToCoord(o + a));
  44671. return "Angle" === n && (s = s * Math.PI / 180),
  44672. s
  44673. }
  44674. ), this)
  44675. }
  44676. function oR(t, e, n, i) {
  44677. return t && (t.legacy || !1 !== t.legacy && !n && !i && "tspan" !== e && ("text" === e || _t(t, "text")))
  44678. }
  44679. function aR(t, e, n) {
  44680. var i, r, o, a = t;
  44681. if ("text" === e)
  44682. o = a;
  44683. else {
  44684. o = {},
  44685. _t(a, "text") && (o.text = a.text),
  44686. _t(a, "rich") && (o.rich = a.rich),
  44687. _t(a, "textFill") && (o.fill = a.textFill),
  44688. _t(a, "textStroke") && (o.stroke = a.textStroke),
  44689. _t(a, "fontFamily") && (o.fontFamily = a.fontFamily),
  44690. _t(a, "fontSize") && (o.fontSize = a.fontSize),
  44691. _t(a, "fontStyle") && (o.fontStyle = a.fontStyle),
  44692. _t(a, "fontWeight") && (o.fontWeight = a.fontWeight),
  44693. r = {
  44694. type: "text",
  44695. style: o,
  44696. silent: !0
  44697. },
  44698. i = {};
  44699. var s = _t(a, "textPosition");
  44700. n ? i.position = s ? a.textPosition : "inside" : s && (i.position = a.textPosition),
  44701. _t(a, "textPosition") && (i.position = a.textPosition),
  44702. _t(a, "textOffset") && (i.offset = a.textOffset),
  44703. _t(a, "textRotation") && (i.rotation = a.textRotation),
  44704. _t(a, "textDistance") && (i.distance = a.textDistance)
  44705. }
  44706. return sR(o, t),
  44707. E(o.rich, (function(t) {
  44708. sR(t, t)
  44709. }
  44710. )),
  44711. {
  44712. textConfig: i,
  44713. textContent: r
  44714. }
  44715. }
  44716. function sR(t, e) {
  44717. e && (e.font = e.textFont || e.font,
  44718. _t(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth),
  44719. _t(e, "textAlign") && (t.align = e.textAlign),
  44720. _t(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign),
  44721. _t(e, "textLineHeight") && (t.lineHeight = e.textLineHeight),
  44722. _t(e, "textWidth") && (t.width = e.textWidth),
  44723. _t(e, "textHeight") && (t.height = e.textHeight),
  44724. _t(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor),
  44725. _t(e, "textPadding") && (t.padding = e.textPadding),
  44726. _t(e, "textBorderColor") && (t.borderColor = e.textBorderColor),
  44727. _t(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth),
  44728. _t(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius),
  44729. _t(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor),
  44730. _t(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur),
  44731. _t(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX),
  44732. _t(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY))
  44733. }
  44734. function lR(t, e, n) {
  44735. var i = t;
  44736. i.textPosition = i.textPosition || n.position || "inside",
  44737. null != n.offset && (i.textOffset = n.offset),
  44738. null != n.rotation && (i.textRotation = n.rotation),
  44739. null != n.distance && (i.textDistance = n.distance);
  44740. var r = i.textPosition.indexOf("inside") >= 0
  44741. , o = t.fill || "#000";
  44742. uR(i, e);
  44743. var a = null == i.textFill;
  44744. return r ? a && (i.textFill = n.insideFill || "#fff",
  44745. !i.textStroke && n.insideStroke && (i.textStroke = n.insideStroke),
  44746. !i.textStroke && (i.textStroke = o),
  44747. null == i.textStrokeWidth && (i.textStrokeWidth = 2)) : (a && (i.textFill = t.fill || n.outsideFill || "#000"),
  44748. !i.textStroke && n.outsideStroke && (i.textStroke = n.outsideStroke)),
  44749. i.text = e.text,
  44750. i.rich = e.rich,
  44751. E(e.rich, (function(t) {
  44752. uR(t, t)
  44753. }
  44754. )),
  44755. i
  44756. }
  44757. function uR(t, e) {
  44758. e && (_t(e, "fill") && (t.textFill = e.fill),
  44759. _t(e, "stroke") && (t.textStroke = e.fill),
  44760. _t(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth),
  44761. _t(e, "font") && (t.font = e.font),
  44762. _t(e, "fontStyle") && (t.fontStyle = e.fontStyle),
  44763. _t(e, "fontWeight") && (t.fontWeight = e.fontWeight),
  44764. _t(e, "fontSize") && (t.fontSize = e.fontSize),
  44765. _t(e, "fontFamily") && (t.fontFamily = e.fontFamily),
  44766. _t(e, "align") && (t.textAlign = e.align),
  44767. _t(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign),
  44768. _t(e, "lineHeight") && (t.textLineHeight = e.lineHeight),
  44769. _t(e, "width") && (t.textWidth = e.width),
  44770. _t(e, "height") && (t.textHeight = e.height),
  44771. _t(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor),
  44772. _t(e, "padding") && (t.textPadding = e.padding),
  44773. _t(e, "borderColor") && (t.textBorderColor = e.borderColor),
  44774. _t(e, "borderWidth") && (t.textBorderWidth = e.borderWidth),
  44775. _t(e, "borderRadius") && (t.textBorderRadius = e.borderRadius),
  44776. _t(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor),
  44777. _t(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur),
  44778. _t(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX),
  44779. _t(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY),
  44780. _t(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor),
  44781. _t(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur),
  44782. _t(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX),
  44783. _t(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY))
  44784. }
  44785. var hR = {
  44786. position: ["x", "y"],
  44787. scale: ["scaleX", "scaleY"],
  44788. origin: ["originX", "originY"]
  44789. }
  44790. , cR = G(hR)
  44791. , pR = (V(mr, (function(t, e) {
  44792. return t[e] = 1,
  44793. t
  44794. }
  44795. ), {}),
  44796. mr.join(", "),
  44797. ["", "style", "shape", "extra"])
  44798. , dR = Vo();
  44799. function fR(t, e, n, i, r) {
  44800. var o = t + "Animation"
  44801. , a = gh(t, i, r) || {}
  44802. , s = dR(e).userDuring;
  44803. return a.duration > 0 && (a.during = s ? W(bR, {
  44804. el: e,
  44805. userDuring: s
  44806. }) : null,
  44807. a.setToFinal = !0,
  44808. a.scope = t),
  44809. A(a, n[o]),
  44810. a
  44811. }
  44812. function gR(t, e, n, i) {
  44813. var r = (i = i || {}).dataIndex
  44814. , o = i.isInit
  44815. , a = i.clearStyle
  44816. , s = n.isAnimationEnabled()
  44817. , l = dR(t)
  44818. , u = e.style;
  44819. l.userDuring = e.during;
  44820. var h = {}
  44821. , c = {};
  44822. if (function(t, e, n) {
  44823. for (var i = 0; i < cR.length; i++) {
  44824. var r = cR[i]
  44825. , o = hR[r]
  44826. , a = e[r];
  44827. a && (n[o[0]] = a[0],
  44828. n[o[1]] = a[1])
  44829. }
  44830. for (i = 0; i < mr.length; i++) {
  44831. var s = mr[i];
  44832. null != e[s] && (n[s] = e[s])
  44833. }
  44834. }(0, e, c),
  44835. SR("shape", e, c),
  44836. SR("extra", e, c),
  44837. !o && s && (function(t, e, n) {
  44838. for (var i = e.transition, r = mR(i) ? mr : To(i || []), o = 0; o < r.length; o++) {
  44839. var a = r[o];
  44840. if ("style" !== a && "shape" !== a && "extra" !== a) {
  44841. var s = t[a];
  44842. 0,
  44843. n[a] = s
  44844. }
  44845. }
  44846. }(t, e, h),
  44847. wR("shape", t, e, h),
  44848. wR("extra", t, e, h),
  44849. function(t, e, n, i) {
  44850. if (!n)
  44851. return;
  44852. var r, o = t.style;
  44853. if (o) {
  44854. var a = n.transition
  44855. , s = e.transition;
  44856. if (a && !mR(a)) {
  44857. var l = To(a);
  44858. !r && (r = i.style = {});
  44859. for (var u = 0; u < l.length; u++) {
  44860. var h = o[f = l[u]];
  44861. r[f] = h
  44862. }
  44863. } else if (t.getAnimationStyleProps && (mR(s) || mR(a) || P(s, "style") >= 0)) {
  44864. var c = t.getAnimationStyleProps()
  44865. , p = c ? c.style : null;
  44866. if (p) {
  44867. !r && (r = i.style = {});
  44868. var d = G(n);
  44869. for (u = 0; u < d.length; u++) {
  44870. var f;
  44871. if (p[f = d[u]]) {
  44872. h = o[f];
  44873. r[f] = h
  44874. }
  44875. }
  44876. }
  44877. }
  44878. }
  44879. }(t, e, u, h)),
  44880. c.style = u,
  44881. function(t, e, n) {
  44882. var i = e.style;
  44883. if (!t.isGroup && i) {
  44884. if (n) {
  44885. t.useStyle({});
  44886. for (var r = t.animators, o = 0; o < r.length; o++) {
  44887. var a = r[o];
  44888. "style" === a.targetName && a.changeTarget(t.style)
  44889. }
  44890. }
  44891. t.setStyle(i)
  44892. }
  44893. e && (e.style = null,
  44894. e && t.attr(e),
  44895. e.style = i)
  44896. }(t, c, a),
  44897. function(t, e) {
  44898. _t(e, "silent") && (t.silent = e.silent),
  44899. _t(e, "ignore") && (t.ignore = e.ignore),
  44900. t instanceof Da && _t(e, "invisible") && (t.invisible = e.invisible);
  44901. t instanceof ks && _t(e, "autoBatch") && (t.autoBatch = e.autoBatch)
  44902. }(t, e),
  44903. s)
  44904. if (o) {
  44905. var p = {};
  44906. E(pR, (function(t) {
  44907. var n = t ? e[t] : e;
  44908. n && n.enterFrom && (t && (p[t] = p[t] || {}),
  44909. A(t ? p[t] : p, n.enterFrom))
  44910. }
  44911. ));
  44912. var d = fR("enter", t, e, n, r);
  44913. d.duration > 0 && t.animateFrom(p, d)
  44914. } else
  44915. !function(t, e, n, i, r) {
  44916. if (r) {
  44917. var o = fR("update", t, e, i, n);
  44918. o.duration > 0 && t.animateFrom(r, o)
  44919. }
  44920. }(t, e, r || 0, n, h);
  44921. yR(t, e),
  44922. u ? t.dirty() : t.markRedraw()
  44923. }
  44924. function yR(t, e) {
  44925. for (var n = dR(t).leaveToProps, i = 0; i < pR.length; i++) {
  44926. var r = pR[i]
  44927. , o = r ? e[r] : e;
  44928. o && o.leaveTo && (n || (n = dR(t).leaveToProps = {}),
  44929. r && (n[r] = n[r] || {}),
  44930. A(r ? n[r] : n, o.leaveTo))
  44931. }
  44932. }
  44933. function vR(t, e, n, i) {
  44934. if (t) {
  44935. var r = t.parent
  44936. , o = dR(t).leaveToProps;
  44937. if (o) {
  44938. var a = fR("update", t, e, n, 0);
  44939. a.done = function() {
  44940. r.remove(t),
  44941. i && i()
  44942. }
  44943. ,
  44944. t.animateTo(o, a)
  44945. } else
  44946. r.remove(t),
  44947. i && i()
  44948. }
  44949. }
  44950. function mR(t) {
  44951. return "all" === t
  44952. }
  44953. var xR = {}
  44954. , _R = {
  44955. setTransform: function(t, e) {
  44956. return xR.el[t] = e,
  44957. this
  44958. },
  44959. getTransform: function(t) {
  44960. return xR.el[t]
  44961. },
  44962. setShape: function(t, e) {
  44963. var n = xR.el;
  44964. return (n.shape || (n.shape = {}))[t] = e,
  44965. n.dirtyShape && n.dirtyShape(),
  44966. this
  44967. },
  44968. getShape: function(t) {
  44969. var e = xR.el.shape;
  44970. if (e)
  44971. return e[t]
  44972. },
  44973. setStyle: function(t, e) {
  44974. var n = xR.el
  44975. , i = n.style;
  44976. return i && (i[t] = e,
  44977. n.dirtyStyle && n.dirtyStyle()),
  44978. this
  44979. },
  44980. getStyle: function(t) {
  44981. var e = xR.el.style;
  44982. if (e)
  44983. return e[t]
  44984. },
  44985. setExtra: function(t, e) {
  44986. return (xR.el.extra || (xR.el.extra = {}))[t] = e,
  44987. this
  44988. },
  44989. getExtra: function(t) {
  44990. var e = xR.el.extra;
  44991. if (e)
  44992. return e[t]
  44993. }
  44994. };
  44995. function bR() {
  44996. var t = this
  44997. , e = t.el;
  44998. if (e) {
  44999. var n = dR(e).userDuring
  45000. , i = t.userDuring;
  45001. n === i ? (xR.el = e,
  45002. i(_R)) : t.el = t.userDuring = null
  45003. }
  45004. }
  45005. function wR(t, e, n, i) {
  45006. var r = n[t];
  45007. if (r) {
  45008. var o, a = e[t];
  45009. if (a) {
  45010. var s = n.transition
  45011. , l = r.transition;
  45012. if (l)
  45013. if (!o && (o = i[t] = {}),
  45014. mR(l))
  45015. A(o, a);
  45016. else
  45017. for (var u = To(l), h = 0; h < u.length; h++) {
  45018. var c = a[d = u[h]];
  45019. o[d] = c
  45020. }
  45021. else if (mR(s) || P(s, t) >= 0) {
  45022. !o && (o = i[t] = {});
  45023. var p = G(a);
  45024. for (h = 0; h < p.length; h++) {
  45025. var d;
  45026. c = a[d = p[h]];
  45027. MR(r[d], c) && (o[d] = c)
  45028. }
  45029. }
  45030. }
  45031. }
  45032. }
  45033. function SR(t, e, n) {
  45034. var i = e[t];
  45035. if (i)
  45036. for (var r = n[t] = {}, o = G(i), a = 0; a < o.length; a++) {
  45037. var s = o[a];
  45038. r[s] = Pi(i[s])
  45039. }
  45040. }
  45041. function MR(t, e) {
  45042. return N(t) ? t !== e : null != t && isFinite(t)
  45043. }
  45044. var IR = Vo()
  45045. , TR = ["percent", "easing", "shape", "style", "extra"];
  45046. function CR(t) {
  45047. t.stopAnimation("keyframe"),
  45048. t.attr(IR(t))
  45049. }
  45050. function DR(t, e, n) {
  45051. if (n.isAnimationEnabled() && e)
  45052. if (Y(e))
  45053. E(e, (function(e) {
  45054. DR(t, e, n)
  45055. }
  45056. ));
  45057. else {
  45058. var i = e.keyframes
  45059. , r = e.duration;
  45060. if (n && null == r) {
  45061. var o = gh("enter", n, 0);
  45062. r = o && o.duration
  45063. }
  45064. if (i && r) {
  45065. var a = IR(t);
  45066. E(pR, (function(n) {
  45067. if (!n || t[n]) {
  45068. var o;
  45069. i.sort((function(t, e) {
  45070. return t.percent - e.percent
  45071. }
  45072. )),
  45073. E(i, (function(i) {
  45074. var s = t.animators
  45075. , l = n ? i[n] : i;
  45076. if (l) {
  45077. var u = G(l);
  45078. if (n || (u = B(u, (function(t) {
  45079. return P(TR, t) < 0
  45080. }
  45081. ))),
  45082. u.length) {
  45083. o || ((o = t.animate(n, e.loop, !0)).scope = "keyframe");
  45084. for (var h = 0; h < s.length; h++)
  45085. s[h] !== o && s[h].targetName === o.targetName && s[h].stopTracks(u);
  45086. n && (a[n] = a[n] || {});
  45087. var c = n ? a[n] : a;
  45088. E(u, (function(e) {
  45089. c[e] = ((n ? t[n] : t) || {})[e]
  45090. }
  45091. )),
  45092. o.whenWithKeys(r * i.percent, l, u, i.easing)
  45093. }
  45094. }
  45095. }
  45096. )),
  45097. o && o.delay(e.delay || 0).duration(r).start(e.easing)
  45098. }
  45099. }
  45100. ))
  45101. }
  45102. }
  45103. }
  45104. var AR = "emphasis"
  45105. , kR = "normal"
  45106. , LR = "blur"
  45107. , PR = "select"
  45108. , OR = [kR, AR, LR, PR]
  45109. , RR = {
  45110. normal: ["itemStyle"],
  45111. emphasis: [AR, "itemStyle"],
  45112. blur: [LR, "itemStyle"],
  45113. select: [PR, "itemStyle"]
  45114. }
  45115. , NR = {
  45116. normal: ["label"],
  45117. emphasis: [AR, "label"],
  45118. blur: [LR, "label"],
  45119. select: [PR, "label"]
  45120. }
  45121. , ER = ["x", "y"]
  45122. , zR = {
  45123. normal: {},
  45124. emphasis: {},
  45125. blur: {},
  45126. select: {}
  45127. }
  45128. , VR = {
  45129. cartesian2d: function(t) {
  45130. var e = t.master.getRect();
  45131. return {
  45132. coordSys: {
  45133. type: "cartesian2d",
  45134. x: e.x,
  45135. y: e.y,
  45136. width: e.width,
  45137. height: e.height
  45138. },
  45139. api: {
  45140. coord: function(e) {
  45141. return t.dataToPoint(e)
  45142. },
  45143. size: W(eR, t)
  45144. }
  45145. }
  45146. },
  45147. geo: function(t) {
  45148. var e = t.getBoundingRect();
  45149. return {
  45150. coordSys: {
  45151. type: "geo",
  45152. x: e.x,
  45153. y: e.y,
  45154. width: e.width,
  45155. height: e.height,
  45156. zoom: t.getZoom()
  45157. },
  45158. api: {
  45159. coord: function(e) {
  45160. return t.dataToPoint(e)
  45161. },
  45162. size: W(nR, t)
  45163. }
  45164. }
  45165. },
  45166. single: function(t) {
  45167. var e = t.getRect();
  45168. return {
  45169. coordSys: {
  45170. type: "singleAxis",
  45171. x: e.x,
  45172. y: e.y,
  45173. width: e.width,
  45174. height: e.height
  45175. },
  45176. api: {
  45177. coord: function(e) {
  45178. return t.dataToPoint(e)
  45179. },
  45180. size: W(iR, t)
  45181. }
  45182. }
  45183. },
  45184. polar: function(t) {
  45185. var e = t.getRadiusAxis()
  45186. , n = t.getAngleAxis()
  45187. , i = e.getExtent();
  45188. return i[0] > i[1] && i.reverse(),
  45189. {
  45190. coordSys: {
  45191. type: "polar",
  45192. cx: t.cx,
  45193. cy: t.cy,
  45194. r: i[1],
  45195. r0: i[0]
  45196. },
  45197. api: {
  45198. coord: function(i) {
  45199. var r = e.dataToRadius(i[0])
  45200. , o = n.dataToAngle(i[1])
  45201. , a = t.coordToPoint([r, o]);
  45202. return a.push(r, o * Math.PI / 180),
  45203. a
  45204. },
  45205. size: W(rR, t)
  45206. }
  45207. }
  45208. },
  45209. calendar: function(t) {
  45210. var e = t.getRect()
  45211. , n = t.getRangeInfo();
  45212. return {
  45213. coordSys: {
  45214. type: "calendar",
  45215. x: e.x,
  45216. y: e.y,
  45217. width: e.width,
  45218. height: e.height,
  45219. cellWidth: t.getCellWidth(),
  45220. cellHeight: t.getCellHeight(),
  45221. rangeInfo: {
  45222. start: n.start,
  45223. end: n.end,
  45224. weeks: n.weeks,
  45225. dayCount: n.allDay
  45226. }
  45227. },
  45228. api: {
  45229. coord: function(e, n) {
  45230. return t.dataToPoint(e, n)
  45231. }
  45232. }
  45233. }
  45234. }
  45235. };
  45236. function BR(t) {
  45237. return t instanceof ks
  45238. }
  45239. function FR(t) {
  45240. return t instanceof Da
  45241. }
  45242. var GR = function(t) {
  45243. function e() {
  45244. var n = null !== t && t.apply(this, arguments) || this;
  45245. return n.type = e.type,
  45246. n
  45247. }
  45248. return n(e, t),
  45249. e.prototype.render = function(t, e, n, i) {
  45250. this._progressiveEls = null;
  45251. var r = this._data
  45252. , o = t.getData()
  45253. , a = this.group
  45254. , s = UR(t, o, e, n);
  45255. r || a.removeAll(),
  45256. o.diff(r).add((function(e) {
  45257. jR(n, null, e, s(e, i), t, a, o)
  45258. }
  45259. )).remove((function(e) {
  45260. var n = r.getItemGraphicEl(e);
  45261. n && vR(n, QO(n).option, t)
  45262. }
  45263. )).update((function(e, l) {
  45264. var u = r.getItemGraphicEl(l);
  45265. jR(n, u, e, s(e, i), t, a, o)
  45266. }
  45267. )).execute();
  45268. var l = t.get("clip", !0) ? PS(t.coordinateSystem, !1, t) : null;
  45269. l ? a.setClipPath(l) : a.removeClipPath(),
  45270. this._data = o
  45271. }
  45272. ,
  45273. e.prototype.incrementalPrepareRender = function(t, e, n) {
  45274. this.group.removeAll(),
  45275. this._data = null
  45276. }
  45277. ,
  45278. e.prototype.incrementalRender = function(t, e, n, i, r) {
  45279. var o = e.getData()
  45280. , a = UR(e, o, n, i)
  45281. , s = this._progressiveEls = [];
  45282. function l(t) {
  45283. t.isGroup || (t.incremental = !0,
  45284. t.ensureState("emphasis").hoverLayer = !0)
  45285. }
  45286. for (var u = t.start; u < t.end; u++) {
  45287. var h = jR(null, null, u, a(u, r), e, this.group, o);
  45288. h && (h.traverse(l),
  45289. s.push(h))
  45290. }
  45291. }
  45292. ,
  45293. e.prototype.eachRendered = function(t) {
  45294. Jh(this._progressiveEls || this.group, t)
  45295. }
  45296. ,
  45297. e.prototype.filterForExposedEvent = function(t, e, n, i) {
  45298. var r = e.element;
  45299. if (null == r || n.name === r)
  45300. return !0;
  45301. for (; (n = n.__hostTarget || n.parent) && n !== this.group; )
  45302. if (n.name === r)
  45303. return !0;
  45304. return !1
  45305. }
  45306. ,
  45307. e.type = "custom",
  45308. e
  45309. }(Og);
  45310. function WR(t) {
  45311. var e, n = t.type;
  45312. if ("path" === n) {
  45313. var i = t.shape
  45314. , r = null != i.width && null != i.height ? {
  45315. x: i.x || 0,
  45316. y: i.y || 0,
  45317. width: i.width,
  45318. height: i.height
  45319. } : null
  45320. , o = rN(i);
  45321. e = Ph(o, null, r, i.layout || "center"),
  45322. QO(e).customPathData = o
  45323. } else if ("image" === n)
  45324. e = new Ns({}),
  45325. QO(e).customImagePath = t.style.image;
  45326. else if ("text" === n)
  45327. e = new Xs({});
  45328. else if ("group" === n)
  45329. e = new Br;
  45330. else {
  45331. if ("compoundPath" === n)
  45332. throw new Error('"compoundPath" is not supported yet.');
  45333. var a = Lh(n);
  45334. if (!a) {
  45335. var s = "";
  45336. 0,
  45337. wo(s)
  45338. }
  45339. e = new a
  45340. }
  45341. return QO(e).customGraphicType = n,
  45342. e.name = t.name,
  45343. e.z2EmphasisLift = 1,
  45344. e.z2SelectLift = 1,
  45345. e
  45346. }
  45347. function HR(t, e, n, i, r, o, a) {
  45348. CR(e);
  45349. var s = r && r.normal.cfg;
  45350. s && e.setTextConfig(s),
  45351. i && null == i.transition && (i.transition = ER);
  45352. var l = i && i.style;
  45353. if (l) {
  45354. if ("text" === e.type) {
  45355. var u = l;
  45356. _t(u, "textFill") && (u.fill = u.textFill),
  45357. _t(u, "textStroke") && (u.stroke = u.textStroke)
  45358. }
  45359. var h = void 0
  45360. , c = BR(e) ? l.decal : null;
  45361. t && c && (c.dirty = !0,
  45362. h = mv(c, t)),
  45363. l.__decalPattern = h
  45364. }
  45365. FR(e) && (l && (h = l.__decalPattern) && (l.decal = h));
  45366. gR(e, i, o, {
  45367. dataIndex: n,
  45368. isInit: a,
  45369. clearStyle: !0
  45370. }),
  45371. DR(e, i.keyframeAnimation, o)
  45372. }
  45373. function YR(t, e, n, i, r) {
  45374. var o = e.isGroup ? null : e
  45375. , a = r && r[t].cfg;
  45376. if (o) {
  45377. var s = o.ensureState(t);
  45378. if (!1 === i) {
  45379. var l = o.getState(t);
  45380. l && (l.style = null)
  45381. } else
  45382. s.style = i || null;
  45383. a && (s.textConfig = a),
  45384. kl(o)
  45385. }
  45386. }
  45387. function XR(t, e, n) {
  45388. var i = n === kR
  45389. , r = i ? e : JR(e, n)
  45390. , o = r ? r.z2 : null;
  45391. null != o && ((i ? t : t.ensureState(n)).z2 = o || 0)
  45392. }
  45393. function UR(t, e, n, i) {
  45394. var r = t.get("renderItem")
  45395. , o = t.coordinateSystem
  45396. , a = {};
  45397. o && (a = o.prepareCustoms ? o.prepareCustoms(o) : VR[o.type](o));
  45398. for (var s, l, u = k({
  45399. getWidth: i.getWidth,
  45400. getHeight: i.getHeight,
  45401. getZr: i.getZr,
  45402. getDevicePixelRatio: i.getDevicePixelRatio,
  45403. value: function(t, n) {
  45404. return null == n && (n = s),
  45405. e.getStore().get(e.getDimensionIndex(t || 0), n)
  45406. },
  45407. style: function(n, i) {
  45408. 0;
  45409. null == i && (i = s);
  45410. var r = e.getItemVisual(i, "style")
  45411. , o = r && r.fill
  45412. , a = r && r.opacity
  45413. , l = m(i, kR).getItemStyle();
  45414. null != o && (l.fill = o),
  45415. null != a && (l.opacity = a);
  45416. var u = {
  45417. inheritColor: U(o) ? o : "#000"
  45418. }
  45419. , h = x(i, kR)
  45420. , c = oc(h, null, u, !1, !0);
  45421. c.text = h.getShallow("show") ? rt(t.getFormattedLabel(i, kR), pS(e, i)) : null;
  45422. var p = ac(h, u, !1);
  45423. return b(n, l),
  45424. l = lR(l, c, p),
  45425. n && _(l, n),
  45426. l.legacy = !0,
  45427. l
  45428. },
  45429. ordinalRawValue: function(t, n) {
  45430. null == n && (n = s),
  45431. t = t || 0;
  45432. var i = e.getDimensionInfo(t);
  45433. if (!i) {
  45434. var r = e.getDimensionIndex(t);
  45435. return r >= 0 ? e.getStore().get(r, n) : void 0
  45436. }
  45437. var o = e.get(i.name, n)
  45438. , a = i && i.ordinalMeta;
  45439. return a ? a.categories[o] : o
  45440. },
  45441. styleEmphasis: function(n, i) {
  45442. 0;
  45443. null == i && (i = s);
  45444. var r = m(i, AR).getItemStyle()
  45445. , o = x(i, AR)
  45446. , a = oc(o, null, null, !0, !0);
  45447. a.text = o.getShallow("show") ? ot(t.getFormattedLabel(i, AR), t.getFormattedLabel(i, kR), pS(e, i)) : null;
  45448. var l = ac(o, null, !0);
  45449. return b(n, r),
  45450. r = lR(r, a, l),
  45451. n && _(r, n),
  45452. r.legacy = !0,
  45453. r
  45454. },
  45455. visual: function(t, n) {
  45456. if (null == n && (n = s),
  45457. _t($O, t)) {
  45458. var i = e.getItemVisual(n, "style");
  45459. return i ? i[$O[t]] : null
  45460. }
  45461. if (_t(JO, t))
  45462. return e.getItemVisual(n, t)
  45463. },
  45464. barLayout: function(t) {
  45465. if ("cartesian2d" === o.type) {
  45466. return function(t) {
  45467. var e = []
  45468. , n = t.axis
  45469. , i = "axis0";
  45470. if ("category" === n.type) {
  45471. for (var r = n.getBandWidth(), o = 0; o < t.count; o++)
  45472. e.push(k({
  45473. bandWidth: r,
  45474. axisKey: i,
  45475. stackId: Fx + o
  45476. }, t));
  45477. var a = Xx(e)
  45478. , s = [];
  45479. for (o = 0; o < t.count; o++) {
  45480. var l = a[i][Fx + o];
  45481. l.offsetCenter = l.offset + l.width / 2,
  45482. s.push(l)
  45483. }
  45484. return s
  45485. }
  45486. }(k({
  45487. axis: o.getBaseAxis()
  45488. }, t))
  45489. }
  45490. },
  45491. currentSeriesIndices: function() {
  45492. return n.getCurrentSeriesIndices()
  45493. },
  45494. font: function(t) {
  45495. return cc(t, n)
  45496. }
  45497. }, a.api || {}), h = {
  45498. context: {},
  45499. seriesId: t.id,
  45500. seriesName: t.name,
  45501. seriesIndex: t.seriesIndex,
  45502. coordSys: a.coordSys,
  45503. dataInsideLength: e.count(),
  45504. encode: ZR(t.getData())
  45505. }, c = {}, p = {}, d = {}, f = {}, g = 0; g < OR.length; g++) {
  45506. var y = OR[g];
  45507. d[y] = t.getModel(RR[y]),
  45508. f[y] = t.getModel(NR[y])
  45509. }
  45510. function v(t) {
  45511. return t === s ? l || (l = e.getItemModel(t)) : e.getItemModel(t)
  45512. }
  45513. function m(t, n) {
  45514. return e.hasItemOption ? t === s ? c[n] || (c[n] = v(t).getModel(RR[n])) : v(t).getModel(RR[n]) : d[n]
  45515. }
  45516. function x(t, n) {
  45517. return e.hasItemOption ? t === s ? p[n] || (p[n] = v(t).getModel(NR[n])) : v(t).getModel(NR[n]) : f[n]
  45518. }
  45519. return function(t, n) {
  45520. return s = t,
  45521. l = null,
  45522. c = {},
  45523. p = {},
  45524. r && r(k({
  45525. dataIndexInside: t,
  45526. dataIndex: e.getRawIndex(t),
  45527. actionType: n ? n.type : null
  45528. }, h), u)
  45529. }
  45530. ;
  45531. function _(t, e) {
  45532. for (var n in e)
  45533. _t(e, n) && (t[n] = e[n])
  45534. }
  45535. function b(t, e) {
  45536. t && (t.textFill && (e.textFill = t.textFill),
  45537. t.textPosition && (e.textPosition = t.textPosition))
  45538. }
  45539. }
  45540. function ZR(t) {
  45541. var e = {};
  45542. return E(t.dimensions, (function(n) {
  45543. var i = t.getDimensionInfo(n);
  45544. if (!i.isExtraCoord) {
  45545. var r = i.coordDim;
  45546. (e[r] = e[r] || [])[i.coordDimIndex] = t.getDimensionIndex(n)
  45547. }
  45548. }
  45549. )),
  45550. e
  45551. }
  45552. function jR(t, e, n, i, r, o, a) {
  45553. if (i) {
  45554. var s = qR(t, e, n, i, r, o);
  45555. return s && a.setItemGraphicEl(n, s),
  45556. s && Zl(s, i.focus, i.blurScope, i.emphasisDisabled),
  45557. s
  45558. }
  45559. o.remove(e)
  45560. }
  45561. function qR(t, e, n, i, r, o) {
  45562. var a = -1
  45563. , s = e;
  45564. e && KR(e, i, r) && (a = P(o.childrenRef(), e),
  45565. e = null);
  45566. var l, u, h = !e, c = e;
  45567. c ? c.clearStates() : (c = WR(i),
  45568. s && (l = s,
  45569. (u = c).copyTransform(l),
  45570. FR(u) && FR(l) && (u.setStyle(l.style),
  45571. u.z = l.z,
  45572. u.z2 = l.z2,
  45573. u.zlevel = l.zlevel,
  45574. u.invisible = l.invisible,
  45575. u.ignore = l.ignore,
  45576. BR(u) && BR(l) && u.setShape(l.shape)))),
  45577. !1 === i.morph ? c.disableMorphing = !0 : c.disableMorphing && (c.disableMorphing = !1),
  45578. zR.normal.cfg = zR.normal.conOpt = zR.emphasis.cfg = zR.emphasis.conOpt = zR.blur.cfg = zR.blur.conOpt = zR.select.cfg = zR.select.conOpt = null,
  45579. zR.isLegacy = !1,
  45580. function(t, e, n, i, r, o) {
  45581. if (t.isGroup)
  45582. return;
  45583. $R(n, null, o),
  45584. $R(n, AR, o);
  45585. var a = o.normal.conOpt
  45586. , s = o.emphasis.conOpt
  45587. , l = o.blur.conOpt
  45588. , u = o.select.conOpt;
  45589. if (null != a || null != s || null != u || null != l) {
  45590. var h = t.getTextContent();
  45591. if (!1 === a)
  45592. h && t.removeTextContent();
  45593. else {
  45594. a = o.normal.conOpt = a || {
  45595. type: "text"
  45596. },
  45597. h ? h.clearStates() : (h = WR(a),
  45598. t.setTextContent(h)),
  45599. HR(null, h, e, a, null, i, r);
  45600. for (var c = a && a.style, p = 0; p < OR.length; p++) {
  45601. var d = OR[p];
  45602. if (d !== kR) {
  45603. var f = o[d].conOpt;
  45604. YR(d, h, 0, QR(a, f, d), null)
  45605. }
  45606. }
  45607. c ? h.dirty() : h.markRedraw()
  45608. }
  45609. }
  45610. }(c, n, i, r, h, zR),
  45611. function(t, e, n, i, r) {
  45612. var o = n.clipPath;
  45613. if (!1 === o)
  45614. t && t.getClipPath() && t.removeClipPath();
  45615. else if (o) {
  45616. var a = t.getClipPath();
  45617. a && KR(a, o, i) && (a = null),
  45618. a || (a = WR(o),
  45619. t.setClipPath(a)),
  45620. HR(null, a, e, o, null, i, r)
  45621. }
  45622. }(c, n, i, r, h),
  45623. HR(t, c, n, i, zR, r, h),
  45624. _t(i, "info") && (QO(c).info = i.info);
  45625. for (var p = 0; p < OR.length; p++) {
  45626. var d = OR[p];
  45627. if (d !== kR) {
  45628. var f = JR(i, d);
  45629. YR(d, c, 0, QR(i, f, d), zR)
  45630. }
  45631. }
  45632. return function(t, e, n) {
  45633. if (!t.isGroup) {
  45634. var i = t
  45635. , r = n.currentZ
  45636. , o = n.currentZLevel;
  45637. i.z = r,
  45638. i.zlevel = o;
  45639. var a = e.z2;
  45640. null != a && (i.z2 = a || 0);
  45641. for (var s = 0; s < OR.length; s++)
  45642. XR(i, e, OR[s])
  45643. }
  45644. }(c, i, r),
  45645. "group" === i.type && function(t, e, n, i, r) {
  45646. var o = i.children
  45647. , a = o ? o.length : 0
  45648. , s = i.$mergeChildren
  45649. , l = "byName" === s || i.diffChildrenByName
  45650. , u = !1 === s;
  45651. if (!a && !l && !u)
  45652. return;
  45653. if (l)
  45654. return h = {
  45655. api: t,
  45656. oldChildren: e.children() || [],
  45657. newChildren: o || [],
  45658. dataIndex: n,
  45659. seriesModel: r,
  45660. group: e
  45661. },
  45662. void new Gm(h.oldChildren,h.newChildren,eN,eN,h).add(nN).update(nN).remove(iN).execute();
  45663. var h;
  45664. u && e.removeAll();
  45665. for (var c = 0; c < a; c++) {
  45666. var p = o[c]
  45667. , d = e.childAt(c);
  45668. p ? (null == p.ignore && (p.ignore = !1),
  45669. qR(t, d, n, p, r, e)) : d.ignore = !0
  45670. }
  45671. for (var f = e.childCount() - 1; f >= c; f--) {
  45672. var g = e.childAt(f);
  45673. tN(e, g, r)
  45674. }
  45675. }(t, c, n, i, r),
  45676. a >= 0 ? o.replaceAt(c, a) : o.add(c),
  45677. c
  45678. }
  45679. function KR(t, e, n) {
  45680. var i, r = QO(t), o = e.type, a = e.shape, s = e.style;
  45681. return n.isUniversalTransitionEnabled() || null != o && o !== r.customGraphicType || "path" === o && ((i = a) && (_t(i, "pathData") || _t(i, "d"))) && rN(a) !== r.customPathData || "image" === o && _t(s, "image") && s.image !== r.customImagePath
  45682. }
  45683. function $R(t, e, n) {
  45684. var i = e ? JR(t, e) : t
  45685. , r = e ? QR(t, i, AR) : t.style
  45686. , o = t.type
  45687. , a = i ? i.textConfig : null
  45688. , s = t.textContent
  45689. , l = s ? e ? JR(s, e) : s : null;
  45690. if (r && (n.isLegacy || oR(r, o, !!a, !!l))) {
  45691. n.isLegacy = !0;
  45692. var u = aR(r, o, !e);
  45693. !a && u.textConfig && (a = u.textConfig),
  45694. !l && u.textContent && (l = u.textContent)
  45695. }
  45696. if (!e && l) {
  45697. var h = l;
  45698. !h.type && (h.type = "text")
  45699. }
  45700. var c = e ? n[e] : n.normal;
  45701. c.cfg = a,
  45702. c.conOpt = l
  45703. }
  45704. function JR(t, e) {
  45705. return e ? t ? t[e] : null : t
  45706. }
  45707. function QR(t, e, n) {
  45708. var i = e && e.style;
  45709. return null == i && n === AR && t && (i = t.styleEmphasis),
  45710. i
  45711. }
  45712. function tN(t, e, n) {
  45713. e && vR(e, QO(t).option, n)
  45714. }
  45715. function eN(t, e) {
  45716. var n = t && t.name;
  45717. return null != n ? n : "e\0\0" + e
  45718. }
  45719. function nN(t, e) {
  45720. var n = this.context
  45721. , i = null != t ? n.newChildren[t] : null
  45722. , r = null != e ? n.oldChildren[e] : null;
  45723. qR(n.api, r, n.dataIndex, i, n.seriesModel, n.group)
  45724. }
  45725. function iN(t) {
  45726. var e = this.context
  45727. , n = e.oldChildren[t];
  45728. n && vR(n, QO(n).option, e.seriesModel)
  45729. }
  45730. function rN(t) {
  45731. return t && (t.pathData || t.d)
  45732. }
  45733. var oN = Vo()
  45734. , aN = T
  45735. , sN = W
  45736. , lN = function() {
  45737. function t() {
  45738. this._dragging = !1,
  45739. this.animationThreshold = 15
  45740. }
  45741. return t.prototype.render = function(t, e, n, i) {
  45742. var r = e.get("value")
  45743. , o = e.get("status");
  45744. if (this._axisModel = t,
  45745. this._axisPointerModel = e,
  45746. this._api = n,
  45747. i || this._lastValue !== r || this._lastStatus !== o) {
  45748. this._lastValue = r,
  45749. this._lastStatus = o;
  45750. var a = this._group
  45751. , s = this._handle;
  45752. if (!o || "hide" === o)
  45753. return a && a.hide(),
  45754. void (s && s.hide());
  45755. a && a.show(),
  45756. s && s.show();
  45757. var l = {};
  45758. this.makeElOption(l, r, t, e, n);
  45759. var u = l.graphicKey;
  45760. u !== this._lastGraphicKey && this.clear(n),
  45761. this._lastGraphicKey = u;
  45762. var h = this._moveAnimation = this.determineAnimation(t, e);
  45763. if (a) {
  45764. var c = H(uN, e, h);
  45765. this.updatePointerEl(a, l, c),
  45766. this.updateLabelEl(a, l, c, e)
  45767. } else
  45768. a = this._group = new Br,
  45769. this.createPointerEl(a, l, t, e),
  45770. this.createLabelEl(a, l, t, e),
  45771. n.getZr().add(a);
  45772. dN(a, e, !0),
  45773. this._renderHandle(r)
  45774. }
  45775. }
  45776. ,
  45777. t.prototype.remove = function(t) {
  45778. this.clear(t)
  45779. }
  45780. ,
  45781. t.prototype.dispose = function(t) {
  45782. this.clear(t)
  45783. }
  45784. ,
  45785. t.prototype.determineAnimation = function(t, e) {
  45786. var n = e.get("animation")
  45787. , i = t.axis
  45788. , r = "category" === i.type
  45789. , o = e.get("snap");
  45790. if (!o && !r)
  45791. return !1;
  45792. if ("auto" === n || null == n) {
  45793. var a = this.animationThreshold;
  45794. if (r && i.getBandWidth() > a)
  45795. return !0;
  45796. if (o) {
  45797. var s = wI(t).seriesDataCount
  45798. , l = i.getExtent();
  45799. return Math.abs(l[0] - l[1]) / s > a
  45800. }
  45801. return !1
  45802. }
  45803. return !0 === n
  45804. }
  45805. ,
  45806. t.prototype.makeElOption = function(t, e, n, i, r) {}
  45807. ,
  45808. t.prototype.createPointerEl = function(t, e, n, i) {
  45809. var r = e.pointer;
  45810. if (r) {
  45811. var o = oN(t).pointerEl = new Qh[r.type](aN(e.pointer));
  45812. t.add(o)
  45813. }
  45814. }
  45815. ,
  45816. t.prototype.createLabelEl = function(t, e, n, i) {
  45817. if (e.label) {
  45818. var r = oN(t).labelEl = new Xs(aN(e.label));
  45819. t.add(r),
  45820. cN(r, i)
  45821. }
  45822. }
  45823. ,
  45824. t.prototype.updatePointerEl = function(t, e, n) {
  45825. var i = oN(t).pointerEl;
  45826. i && e.pointer && (i.setStyle(e.pointer.style),
  45827. n(i, {
  45828. shape: e.pointer.shape
  45829. }))
  45830. }
  45831. ,
  45832. t.prototype.updateLabelEl = function(t, e, n, i) {
  45833. var r = oN(t).labelEl;
  45834. r && (r.setStyle(e.label.style),
  45835. n(r, {
  45836. x: e.label.x,
  45837. y: e.label.y
  45838. }),
  45839. cN(r, i))
  45840. }
  45841. ,
  45842. t.prototype._renderHandle = function(t) {
  45843. if (!this._dragging && this.updateHandleTransform) {
  45844. var e, n = this._axisPointerModel, i = this._api.getZr(), r = this._handle, o = n.getModel("handle"), a = n.get("status");
  45845. if (!o.get("show") || !a || "hide" === a)
  45846. return r && i.remove(r),
  45847. void (this._handle = null);
  45848. this._handle || (e = !0,
  45849. r = this._handle = Uh(o.get("icon"), {
  45850. cursor: "move",
  45851. draggable: !0,
  45852. onmousemove: function(t) {
  45853. de(t.event)
  45854. },
  45855. onmousedown: sN(this._onHandleDragMove, this, 0, 0),
  45856. drift: sN(this._onHandleDragMove, this),
  45857. ondragend: sN(this._onHandleDragEnd, this)
  45858. }),
  45859. i.add(r)),
  45860. dN(r, n, !1),
  45861. r.setStyle(o.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  45862. var s = o.get("size");
  45863. Y(s) || (s = [s, s]),
  45864. r.scaleX = s[0] / 2,
  45865. r.scaleY = s[1] / 2,
  45866. Hg(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"),
  45867. this._moveHandleToValue(t, e)
  45868. }
  45869. }
  45870. ,
  45871. t.prototype._moveHandleToValue = function(t, e) {
  45872. uN(this._axisPointerModel, !e && this._moveAnimation, this._handle, pN(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)))
  45873. }
  45874. ,
  45875. t.prototype._onHandleDragMove = function(t, e) {
  45876. var n = this._handle;
  45877. if (n) {
  45878. this._dragging = !0;
  45879. var i = this.updateHandleTransform(pN(n), [t, e], this._axisModel, this._axisPointerModel);
  45880. this._payloadInfo = i,
  45881. n.stopAnimation(),
  45882. n.attr(pN(i)),
  45883. oN(n).lastProp = null,
  45884. this._doDispatchAxisPointer()
  45885. }
  45886. }
  45887. ,
  45888. t.prototype._doDispatchAxisPointer = function() {
  45889. if (this._handle) {
  45890. var t = this._payloadInfo
  45891. , e = this._axisModel;
  45892. this._api.dispatchAction({
  45893. type: "updateAxisPointer",
  45894. x: t.cursorPoint[0],
  45895. y: t.cursorPoint[1],
  45896. tooltipOption: t.tooltipOption,
  45897. axesInfo: [{
  45898. axisDim: e.axis.dim,
  45899. axisIndex: e.componentIndex
  45900. }]
  45901. })
  45902. }
  45903. }
  45904. ,
  45905. t.prototype._onHandleDragEnd = function() {
  45906. if (this._dragging = !1,
  45907. this._handle) {
  45908. var t = this._axisPointerModel.get("value");
  45909. this._moveHandleToValue(t),
  45910. this._api.dispatchAction({
  45911. type: "hideTip"
  45912. })
  45913. }
  45914. }
  45915. ,
  45916. t.prototype.clear = function(t) {
  45917. this._lastValue = null,
  45918. this._lastStatus = null;
  45919. var e = t.getZr()
  45920. , n = this._group
  45921. , i = this._handle;
  45922. e && n && (this._lastGraphicKey = null,
  45923. n && e.remove(n),
  45924. i && e.remove(i),
  45925. this._group = null,
  45926. this._handle = null,
  45927. this._payloadInfo = null),
  45928. Yg(this, "_doDispatchAxisPointer")
  45929. }
  45930. ,
  45931. t.prototype.doClear = function() {}
  45932. ,
  45933. t.prototype.buildLabel = function(t, e, n) {
  45934. return {
  45935. x: t[n = n || 0],
  45936. y: t[1 - n],
  45937. width: e[n],
  45938. height: e[1 - n]
  45939. }
  45940. }
  45941. ,
  45942. t
  45943. }();
  45944. function uN(t, e, n, i) {
  45945. hN(oN(n).lastProp, i) || (oN(n).lastProp = i,
  45946. e ? vh(n, i, t) : (n.stopAnimation(),
  45947. n.attr(i)))
  45948. }
  45949. function hN(t, e) {
  45950. if (q(t) && q(e)) {
  45951. var n = !0;
  45952. return E(e, (function(e, i) {
  45953. n = n && hN(t[i], e)
  45954. }
  45955. )),
  45956. !!n
  45957. }
  45958. return t === e
  45959. }
  45960. function cN(t, e) {
  45961. t[e.get(["label", "show"]) ? "show" : "hide"]()
  45962. }
  45963. function pN(t) {
  45964. return {
  45965. x: t.x || 0,
  45966. y: t.y || 0,
  45967. rotation: t.rotation || 0
  45968. }
  45969. }
  45970. function dN(t, e, n) {
  45971. var i = e.get("z")
  45972. , r = e.get("zlevel");
  45973. t && t.traverse((function(t) {
  45974. "group" !== t.type && (null != i && (t.z = i),
  45975. null != r && (t.zlevel = r),
  45976. t.silent = n)
  45977. }
  45978. ))
  45979. }
  45980. function fN(t) {
  45981. var e, n = t.get("type"), i = t.getModel(n + "Style");
  45982. return "line" === n ? (e = i.getLineStyle()).fill = null : "shadow" === n && ((e = i.getAreaStyle()).stroke = null),
  45983. e
  45984. }
  45985. function gN(t, e, n, i, r) {
  45986. var o = yN(n.get("value"), e.axis, e.ecModel, n.get("seriesDataIndices"), {
  45987. precision: n.get(["label", "precision"]),
  45988. formatter: n.get(["label", "formatter"])
  45989. })
  45990. , a = n.getModel("label")
  45991. , s = vp(a.get("padding") || 0)
  45992. , l = a.getFont()
  45993. , u = Sr(o, l)
  45994. , h = r.position
  45995. , c = u.width + s[1] + s[3]
  45996. , p = u.height + s[0] + s[2]
  45997. , d = r.align;
  45998. "right" === d && (h[0] -= c),
  45999. "center" === d && (h[0] -= c / 2);
  46000. var f = r.verticalAlign;
  46001. "bottom" === f && (h[1] -= p),
  46002. "middle" === f && (h[1] -= p / 2),
  46003. function(t, e, n, i) {
  46004. var r = i.getWidth()
  46005. , o = i.getHeight();
  46006. t[0] = Math.min(t[0] + e, r) - e,
  46007. t[1] = Math.min(t[1] + n, o) - n,
  46008. t[0] = Math.max(t[0], 0),
  46009. t[1] = Math.max(t[1], 0)
  46010. }(h, c, p, i);
  46011. var g = a.get("backgroundColor");
  46012. g && "auto" !== g || (g = e.get(["axisLine", "lineStyle", "color"])),
  46013. t.label = {
  46014. x: h[0],
  46015. y: h[1],
  46016. style: oc(a, {
  46017. text: o,
  46018. font: l,
  46019. fill: a.getTextColor(),
  46020. padding: s,
  46021. backgroundColor: g
  46022. }),
  46023. z2: 10
  46024. }
  46025. }
  46026. function yN(t, e, n, i, r) {
  46027. t = e.scale.parse(t);
  46028. var o = e.scale.getLabel({
  46029. value: t
  46030. }, {
  46031. precision: r.precision
  46032. })
  46033. , a = r.formatter;
  46034. if (a) {
  46035. var s = {
  46036. value: S_(e, {
  46037. value: t
  46038. }),
  46039. axisDimension: e.dim,
  46040. axisIndex: e.index,
  46041. seriesData: []
  46042. };
  46043. E(i, (function(t) {
  46044. var e = n.getSeriesByIndex(t.seriesIndex)
  46045. , i = t.dataIndexInside
  46046. , r = e && e.getDataParams(i);
  46047. r && s.seriesData.push(r)
  46048. }
  46049. )),
  46050. U(a) ? o = a.replace("{value}", o) : X(a) && (o = a(s))
  46051. }
  46052. return o
  46053. }
  46054. function vN(t, e, n) {
  46055. var i = [1, 0, 0, 1, 0, 0];
  46056. return Se(i, i, n.rotation),
  46057. we(i, i, n.position),
  46058. Fh([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], i)
  46059. }
  46060. function mN(t, e, n, i, r, o) {
  46061. var a = dI.innerTextLayout(n.rotation, 0, n.labelDirection);
  46062. n.labelMargin = r.get(["label", "margin"]),
  46063. gN(e, i, r, o, {
  46064. position: vN(i.axis, t, n),
  46065. align: a.textAlign,
  46066. verticalAlign: a.textVerticalAlign
  46067. })
  46068. }
  46069. function xN(t, e, n) {
  46070. return {
  46071. x1: t[n = n || 0],
  46072. y1: t[1 - n],
  46073. x2: e[n],
  46074. y2: e[1 - n]
  46075. }
  46076. }
  46077. function _N(t, e, n) {
  46078. return {
  46079. x: t[n = n || 0],
  46080. y: t[1 - n],
  46081. width: e[n],
  46082. height: e[1 - n]
  46083. }
  46084. }
  46085. function bN(t, e, n, i, r, o) {
  46086. return {
  46087. cx: t,
  46088. cy: e,
  46089. r0: n,
  46090. r: i,
  46091. startAngle: r,
  46092. endAngle: o,
  46093. clockwise: !0
  46094. }
  46095. }
  46096. var wN = function(t) {
  46097. function e() {
  46098. return null !== t && t.apply(this, arguments) || this
  46099. }
  46100. return n(e, t),
  46101. e.prototype.makeElOption = function(t, e, n, i, r) {
  46102. var o = n.axis
  46103. , a = o.grid
  46104. , s = i.get("type")
  46105. , l = SN(a, o).getOtherAxis(o).getGlobalExtent()
  46106. , u = o.toGlobalCoord(o.dataToCoord(e, !0));
  46107. if (s && "none" !== s) {
  46108. var h = fN(i)
  46109. , c = MN[s](o, u, l);
  46110. c.style = h,
  46111. t.graphicKey = c.type,
  46112. t.pointer = c
  46113. }
  46114. mN(e, t, iI(a.model, n), n, i, r)
  46115. }
  46116. ,
  46117. e.prototype.getHandleTransform = function(t, e, n) {
  46118. var i = iI(e.axis.grid.model, e, {
  46119. labelInside: !1
  46120. });
  46121. i.labelMargin = n.get(["handle", "margin"]);
  46122. var r = vN(e.axis, t, i);
  46123. return {
  46124. x: r[0],
  46125. y: r[1],
  46126. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  46127. }
  46128. }
  46129. ,
  46130. e.prototype.updateHandleTransform = function(t, e, n, i) {
  46131. var r = n.axis
  46132. , o = r.grid
  46133. , a = r.getGlobalExtent(!0)
  46134. , s = SN(o, r).getOtherAxis(r).getGlobalExtent()
  46135. , l = "x" === r.dim ? 0 : 1
  46136. , u = [t.x, t.y];
  46137. u[l] += e[l],
  46138. u[l] = Math.min(a[1], u[l]),
  46139. u[l] = Math.max(a[0], u[l]);
  46140. var h = (s[1] + s[0]) / 2
  46141. , c = [h, h];
  46142. c[l] = u[l];
  46143. return {
  46144. x: u[0],
  46145. y: u[1],
  46146. rotation: t.rotation,
  46147. cursorPoint: c,
  46148. tooltipOption: [{
  46149. verticalAlign: "middle"
  46150. }, {
  46151. align: "center"
  46152. }][l]
  46153. }
  46154. }
  46155. ,
  46156. e
  46157. }(lN);
  46158. function SN(t, e) {
  46159. var n = {};
  46160. return n[e.dim + "AxisIndex"] = e.index,
  46161. t.getCartesian(n)
  46162. }
  46163. var MN = {
  46164. line: function(t, e, n) {
  46165. return {
  46166. type: "Line",
  46167. subPixelOptimize: !0,
  46168. shape: xN([e, n[0]], [e, n[1]], IN(t))
  46169. }
  46170. },
  46171. shadow: function(t, e, n) {
  46172. var i = Math.max(1, t.getBandWidth())
  46173. , r = n[1] - n[0];
  46174. return {
  46175. type: "Rect",
  46176. shape: _N([e - i / 2, n[0]], [i, r], IN(t))
  46177. }
  46178. }
  46179. };
  46180. function IN(t) {
  46181. return "x" === t.dim ? 0 : 1
  46182. }
  46183. var TN = function(t) {
  46184. function e() {
  46185. var n = null !== t && t.apply(this, arguments) || this;
  46186. return n.type = e.type,
  46187. n
  46188. }
  46189. return n(e, t),
  46190. e.type = "axisPointer",
  46191. e.defaultOption = {
  46192. show: "auto",
  46193. z: 50,
  46194. type: "line",
  46195. snap: !1,
  46196. triggerTooltip: !0,
  46197. triggerEmphasis: !0,
  46198. value: null,
  46199. status: null,
  46200. link: [],
  46201. animation: null,
  46202. animationDurationUpdate: 200,
  46203. lineStyle: {
  46204. color: "#B9BEC9",
  46205. width: 1,
  46206. type: "dashed"
  46207. },
  46208. shadowStyle: {
  46209. color: "rgba(210,219,238,0.2)"
  46210. },
  46211. label: {
  46212. show: !0,
  46213. formatter: null,
  46214. precision: "auto",
  46215. margin: 3,
  46216. color: "#fff",
  46217. padding: [5, 7, 5, 7],
  46218. backgroundColor: "auto",
  46219. borderColor: null,
  46220. borderWidth: 0,
  46221. borderRadius: 3
  46222. },
  46223. handle: {
  46224. show: !1,
  46225. 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",
  46226. size: 45,
  46227. margin: 50,
  46228. color: "#333",
  46229. shadowBlur: 3,
  46230. shadowColor: "#aaa",
  46231. shadowOffsetX: 0,
  46232. shadowOffsetY: 2,
  46233. throttle: 40
  46234. }
  46235. },
  46236. e
  46237. }(zp)
  46238. , CN = Vo()
  46239. , DN = E;
  46240. function AN(t, e, n) {
  46241. if (!r.node) {
  46242. var i = e.getZr();
  46243. CN(i).records || (CN(i).records = {}),
  46244. function(t, e) {
  46245. if (CN(t).initialized)
  46246. return;
  46247. function n(n, i) {
  46248. t.on(n, (function(n) {
  46249. var r = function(t) {
  46250. var e = {
  46251. showTip: [],
  46252. hideTip: []
  46253. }
  46254. , n = function(i) {
  46255. var r = e[i.type];
  46256. r ? r.push(i) : (i.dispatchAction = n,
  46257. t.dispatchAction(i))
  46258. };
  46259. return {
  46260. dispatchAction: n,
  46261. pendings: e
  46262. }
  46263. }(e);
  46264. DN(CN(t).records, (function(t) {
  46265. t && i(t, n, r.dispatchAction)
  46266. }
  46267. )),
  46268. function(t, e) {
  46269. var n, i = t.showTip.length, r = t.hideTip.length;
  46270. i ? n = t.showTip[i - 1] : r && (n = t.hideTip[r - 1]);
  46271. n && (n.dispatchAction = null,
  46272. e.dispatchAction(n))
  46273. }(r.pendings, e)
  46274. }
  46275. ))
  46276. }
  46277. CN(t).initialized = !0,
  46278. n("click", H(LN, "click")),
  46279. n("mousemove", H(LN, "mousemove")),
  46280. n("globalout", kN)
  46281. }(i, e),
  46282. (CN(i).records[t] || (CN(i).records[t] = {})).handler = n
  46283. }
  46284. }
  46285. function kN(t, e, n) {
  46286. t.handler("leave", null, n)
  46287. }
  46288. function LN(t, e, n, i) {
  46289. e.handler(t, n, i)
  46290. }
  46291. function PN(t, e) {
  46292. if (!r.node) {
  46293. var n = e.getZr();
  46294. (CN(n).records || {})[t] && (CN(n).records[t] = null)
  46295. }
  46296. }
  46297. var ON = function(t) {
  46298. function e() {
  46299. var n = null !== t && t.apply(this, arguments) || this;
  46300. return n.type = e.type,
  46301. n
  46302. }
  46303. return n(e, t),
  46304. e.prototype.render = function(t, e, n) {
  46305. var i = e.getComponent("tooltip")
  46306. , r = t.get("triggerOn") || i && i.get("triggerOn") || "mousemove|click";
  46307. AN("axisPointer", n, (function(t, e, n) {
  46308. "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && n({
  46309. type: "updateAxisPointer",
  46310. currTrigger: t,
  46311. x: e && e.offsetX,
  46312. y: e && e.offsetY
  46313. })
  46314. }
  46315. ))
  46316. }
  46317. ,
  46318. e.prototype.remove = function(t, e) {
  46319. PN("axisPointer", e)
  46320. }
  46321. ,
  46322. e.prototype.dispose = function(t, e) {
  46323. PN("axisPointer", e)
  46324. }
  46325. ,
  46326. e.type = "axisPointer",
  46327. e
  46328. }(Ag);
  46329. function RN(t, e) {
  46330. var n, i = [], r = t.seriesIndex;
  46331. if (null == r || !(n = e.getSeriesByIndex(r)))
  46332. return {
  46333. point: []
  46334. };
  46335. var o = n.getData()
  46336. , a = zo(o, t);
  46337. if (null == a || a < 0 || Y(a))
  46338. return {
  46339. point: []
  46340. };
  46341. var s = o.getItemGraphicEl(a)
  46342. , l = n.coordinateSystem;
  46343. if (n.getTooltipPosition)
  46344. i = n.getTooltipPosition(a) || [];
  46345. else if (l && l.dataToPoint)
  46346. if (t.isStacked) {
  46347. var u = l.getBaseAxis()
  46348. , h = l.getOtherAxis(u).dim
  46349. , c = u.dim
  46350. , p = "x" === h || "radius" === h ? 1 : 0
  46351. , d = o.mapDimension(c)
  46352. , f = [];
  46353. f[p] = o.get(d, a),
  46354. f[1 - p] = o.get(o.getCalculationInfo("stackResultDimension"), a),
  46355. i = l.dataToPoint(f) || []
  46356. } else
  46357. i = l.dataToPoint(o.getValues(z(l.dimensions, (function(t) {
  46358. return o.mapDimension(t)
  46359. }
  46360. )), a)) || [];
  46361. else if (s) {
  46362. var g = s.getBoundingRect().clone();
  46363. g.applyTransform(s.transform),
  46364. i = [g.x + g.width / 2, g.y + g.height / 2]
  46365. }
  46366. return {
  46367. point: i,
  46368. el: s
  46369. }
  46370. }
  46371. var NN = Vo();
  46372. function EN(t, e, n) {
  46373. var i = t.currTrigger
  46374. , r = [t.x, t.y]
  46375. , o = t
  46376. , a = t.dispatchAction || W(n.dispatchAction, n)
  46377. , s = e.getComponent("axisPointer").coordSysAxesInfo;
  46378. if (s) {
  46379. GN(r) && (r = RN({
  46380. seriesIndex: o.seriesIndex,
  46381. dataIndex: o.dataIndex
  46382. }, e).point);
  46383. var l = GN(r)
  46384. , u = o.axesInfo
  46385. , h = s.axesInfo
  46386. , c = "leave" === i || GN(r)
  46387. , p = {}
  46388. , d = {}
  46389. , f = {
  46390. list: [],
  46391. map: {}
  46392. }
  46393. , g = {
  46394. showPointer: H(VN, d),
  46395. showTooltip: H(BN, f)
  46396. };
  46397. E(s.coordSysMap, (function(t, e) {
  46398. var n = l || t.containPoint(r);
  46399. E(s.coordSysAxesInfo[e], (function(t, e) {
  46400. var i = t.axis
  46401. , o = function(t, e) {
  46402. for (var n = 0; n < (t || []).length; n++) {
  46403. var i = t[n];
  46404. if (e.axis.dim === i.axisDim && e.axis.model.componentIndex === i.axisIndex)
  46405. return i
  46406. }
  46407. }(u, t);
  46408. if (!c && n && (!u || o)) {
  46409. var a = o && o.value;
  46410. null != a || l || (a = i.pointToData(r)),
  46411. null != a && zN(t, a, g, !1, p)
  46412. }
  46413. }
  46414. ))
  46415. }
  46416. ));
  46417. var y = {};
  46418. return E(h, (function(t, e) {
  46419. var n = t.linkGroup;
  46420. n && !d[e] && E(n.axesInfo, (function(e, i) {
  46421. var r = d[i];
  46422. if (e !== t && r) {
  46423. var o = r.value;
  46424. n.mapper && (o = t.axis.scale.parse(n.mapper(o, FN(e), FN(t)))),
  46425. y[t.key] = o
  46426. }
  46427. }
  46428. ))
  46429. }
  46430. )),
  46431. E(y, (function(t, e) {
  46432. zN(h[e], t, g, !0, p)
  46433. }
  46434. )),
  46435. function(t, e, n) {
  46436. var i = n.axesInfo = [];
  46437. E(e, (function(e, n) {
  46438. var r = e.axisPointerModel.option
  46439. , o = t[n];
  46440. o ? (!e.useHandle && (r.status = "show"),
  46441. r.value = o.value,
  46442. r.seriesDataIndices = (o.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"),
  46443. "show" === r.status && i.push({
  46444. axisDim: e.axis.dim,
  46445. axisIndex: e.axis.model.componentIndex,
  46446. value: r.value
  46447. })
  46448. }
  46449. ))
  46450. }(d, h, p),
  46451. function(t, e, n, i) {
  46452. if (GN(e) || !t.list.length)
  46453. return void i({
  46454. type: "hideTip"
  46455. });
  46456. var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  46457. i({
  46458. type: "showTip",
  46459. escapeConnect: !0,
  46460. x: e[0],
  46461. y: e[1],
  46462. tooltipOption: n.tooltipOption,
  46463. position: n.position,
  46464. dataIndexInside: r.dataIndexInside,
  46465. dataIndex: r.dataIndex,
  46466. seriesIndex: r.seriesIndex,
  46467. dataByCoordSys: t.list
  46468. })
  46469. }(f, r, t, a),
  46470. function(t, e, n) {
  46471. var i = n.getZr()
  46472. , r = "axisPointerLastHighlights"
  46473. , o = NN(i)[r] || {}
  46474. , a = NN(i)[r] = {};
  46475. E(t, (function(t, e) {
  46476. var n = t.axisPointerModel.option;
  46477. "show" === n.status && t.triggerEmphasis && E(n.seriesDataIndices, (function(t) {
  46478. var e = t.seriesIndex + " | " + t.dataIndex;
  46479. a[e] = t
  46480. }
  46481. ))
  46482. }
  46483. ));
  46484. var s = []
  46485. , l = [];
  46486. E(o, (function(t, e) {
  46487. !a[e] && l.push(t)
  46488. }
  46489. )),
  46490. E(a, (function(t, e) {
  46491. !o[e] && s.push(t)
  46492. }
  46493. )),
  46494. l.length && n.dispatchAction({
  46495. type: "downplay",
  46496. escapeConnect: !0,
  46497. notBlur: !0,
  46498. batch: l
  46499. }),
  46500. s.length && n.dispatchAction({
  46501. type: "highlight",
  46502. escapeConnect: !0,
  46503. notBlur: !0,
  46504. batch: s
  46505. })
  46506. }(h, 0, n),
  46507. p
  46508. }
  46509. }
  46510. function zN(t, e, n, i, r) {
  46511. var o = t.axis;
  46512. if (!o.scale.isBlank() && o.containData(e))
  46513. if (t.involveSeries) {
  46514. var a = function(t, e) {
  46515. var n = e.axis
  46516. , i = n.dim
  46517. , r = t
  46518. , o = []
  46519. , a = Number.MAX_VALUE
  46520. , s = -1;
  46521. return E(e.seriesModels, (function(e, l) {
  46522. var u, h, c = e.getData().mapDimensionsAll(i);
  46523. if (e.getAxisTooltipData) {
  46524. var p = e.getAxisTooltipData(c, t, n);
  46525. h = p.dataIndices,
  46526. u = p.nestestValue
  46527. } else {
  46528. if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === n.type ? .5 : null)).length)
  46529. return;
  46530. u = e.getData().get(c[0], h[0])
  46531. }
  46532. if (null != u && isFinite(u)) {
  46533. var d = t - u
  46534. , f = Math.abs(d);
  46535. f <= a && ((f < a || d >= 0 && s < 0) && (a = f,
  46536. s = d,
  46537. r = u,
  46538. o.length = 0),
  46539. E(h, (function(t) {
  46540. o.push({
  46541. seriesIndex: e.seriesIndex,
  46542. dataIndexInside: t,
  46543. dataIndex: e.getData().getRawIndex(t)
  46544. })
  46545. }
  46546. )))
  46547. }
  46548. }
  46549. )),
  46550. {
  46551. payloadBatch: o,
  46552. snapToValue: r
  46553. }
  46554. }(e, t)
  46555. , s = a.payloadBatch
  46556. , l = a.snapToValue;
  46557. s[0] && null == r.seriesIndex && A(r, s[0]),
  46558. !i && t.snap && o.containData(l) && null != l && (e = l),
  46559. n.showPointer(t, e, s),
  46560. n.showTooltip(t, a, l)
  46561. } else
  46562. n.showPointer(t, e)
  46563. }
  46564. function VN(t, e, n, i) {
  46565. t[e.key] = {
  46566. value: n,
  46567. payloadBatch: i
  46568. }
  46569. }
  46570. function BN(t, e, n, i) {
  46571. var r = n.payloadBatch
  46572. , o = e.axis
  46573. , a = o.model
  46574. , s = e.axisPointerModel;
  46575. if (e.triggerTooltip && r.length) {
  46576. var l = e.coordSys.model
  46577. , u = MI(l)
  46578. , h = t.map[u];
  46579. h || (h = t.map[u] = {
  46580. coordSysId: l.id,
  46581. coordSysIndex: l.componentIndex,
  46582. coordSysType: l.type,
  46583. coordSysMainType: l.mainType,
  46584. dataByAxis: []
  46585. },
  46586. t.list.push(h)),
  46587. h.dataByAxis.push({
  46588. axisDim: o.dim,
  46589. axisIndex: a.componentIndex,
  46590. axisType: a.type,
  46591. axisId: a.id,
  46592. value: i,
  46593. valueLabelOpt: {
  46594. precision: s.get(["label", "precision"]),
  46595. formatter: s.get(["label", "formatter"])
  46596. },
  46597. seriesDataIndices: r.slice()
  46598. })
  46599. }
  46600. }
  46601. function FN(t) {
  46602. var e = t.axis.model
  46603. , n = {}
  46604. , i = n.axisDim = t.axis.dim;
  46605. return n.axisIndex = n[i + "AxisIndex"] = e.componentIndex,
  46606. n.axisName = n[i + "AxisName"] = e.name,
  46607. n.axisId = n[i + "AxisId"] = e.id,
  46608. n
  46609. }
  46610. function GN(t) {
  46611. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
  46612. }
  46613. function WN(t) {
  46614. TI.registerAxisPointerClass("CartesianAxisPointer", wN),
  46615. t.registerComponentModel(TN),
  46616. t.registerComponentView(ON),
  46617. t.registerPreprocessor((function(t) {
  46618. if (t) {
  46619. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  46620. var e = t.axisPointer.link;
  46621. e && !Y(e) && (t.axisPointer.link = [e])
  46622. }
  46623. }
  46624. )),
  46625. t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, (function(t, e) {
  46626. t.getComponent("axisPointer").coordSysAxesInfo = xI(t, e)
  46627. }
  46628. )),
  46629. t.registerAction({
  46630. type: "updateAxisPointer",
  46631. event: "updateAxisPointer",
  46632. update: ":updateAxisPointer"
  46633. }, EN)
  46634. }
  46635. var HN = function(t) {
  46636. function e() {
  46637. return null !== t && t.apply(this, arguments) || this
  46638. }
  46639. return n(e, t),
  46640. e.prototype.makeElOption = function(t, e, n, i, r) {
  46641. var o = n.axis;
  46642. "angle" === o.dim && (this.animationThreshold = Math.PI / 18);
  46643. var a = o.polar
  46644. , s = a.getOtherAxis(o).getExtent()
  46645. , l = o.dataToCoord(e)
  46646. , u = i.get("type");
  46647. if (u && "none" !== u) {
  46648. var h = fN(i)
  46649. , c = YN[u](o, a, l, s);
  46650. c.style = h,
  46651. t.graphicKey = c.type,
  46652. t.pointer = c
  46653. }
  46654. var p = function(t, e, n, i, r) {
  46655. var o = e.axis
  46656. , a = o.dataToCoord(t)
  46657. , s = i.getAngleAxis().getExtent()[0];
  46658. s = s / 180 * Math.PI;
  46659. var l, u, h, c = i.getRadiusAxis().getExtent();
  46660. if ("radius" === o.dim) {
  46661. var p = [1, 0, 0, 1, 0, 0];
  46662. Se(p, p, s),
  46663. we(p, p, [i.cx, i.cy]),
  46664. l = Fh([a, -r], p);
  46665. var d = e.getModel("axisLabel").get("rotate") || 0
  46666. , f = dI.innerTextLayout(s, d * Math.PI / 180, -1);
  46667. u = f.textAlign,
  46668. h = f.textVerticalAlign
  46669. } else {
  46670. var g = c[1];
  46671. l = i.coordToPoint([g + r, a]);
  46672. var y = i.cx
  46673. , v = i.cy;
  46674. u = Math.abs(l[0] - y) / g < .3 ? "center" : l[0] > y ? "left" : "right",
  46675. h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom"
  46676. }
  46677. return {
  46678. position: l,
  46679. align: u,
  46680. verticalAlign: h
  46681. }
  46682. }(e, n, 0, a, i.get(["label", "margin"]));
  46683. gN(t, n, i, r, p)
  46684. }
  46685. ,
  46686. e
  46687. }(lN);
  46688. var YN = {
  46689. line: function(t, e, n, i) {
  46690. return "angle" === t.dim ? {
  46691. type: "Line",
  46692. shape: xN(e.coordToPoint([i[0], n]), e.coordToPoint([i[1], n]))
  46693. } : {
  46694. type: "Circle",
  46695. shape: {
  46696. cx: e.cx,
  46697. cy: e.cy,
  46698. r: n
  46699. }
  46700. }
  46701. },
  46702. shadow: function(t, e, n, i) {
  46703. var r = Math.max(1, t.getBandWidth())
  46704. , o = Math.PI / 180;
  46705. return "angle" === t.dim ? {
  46706. type: "Sector",
  46707. shape: bN(e.cx, e.cy, i[0], i[1], (-n - r / 2) * o, (r / 2 - n) * o)
  46708. } : {
  46709. type: "Sector",
  46710. shape: bN(e.cx, e.cy, n - r / 2, n + r / 2, 0, 2 * Math.PI)
  46711. }
  46712. }
  46713. }
  46714. , XN = function(t) {
  46715. function e() {
  46716. var n = null !== t && t.apply(this, arguments) || this;
  46717. return n.type = e.type,
  46718. n
  46719. }
  46720. return n(e, t),
  46721. e.prototype.findAxisModel = function(t) {
  46722. var e;
  46723. return this.ecModel.eachComponent(t, (function(t) {
  46724. t.getCoordSysModel() === this && (e = t)
  46725. }
  46726. ), this),
  46727. e
  46728. }
  46729. ,
  46730. e.type = "polar",
  46731. e.dependencies = ["radiusAxis", "angleAxis"],
  46732. e.defaultOption = {
  46733. z: 0,
  46734. center: ["50%", "50%"],
  46735. radius: "80%"
  46736. },
  46737. e
  46738. }(zp)
  46739. , UN = function(t) {
  46740. function e() {
  46741. return null !== t && t.apply(this, arguments) || this
  46742. }
  46743. return n(e, t),
  46744. e.prototype.getCoordSysModel = function() {
  46745. return this.getReferringComponents("polar", Wo).models[0]
  46746. }
  46747. ,
  46748. e.type = "polarAxis",
  46749. e
  46750. }(zp);
  46751. R(UN, D_);
  46752. var ZN = function(t) {
  46753. function e() {
  46754. var n = null !== t && t.apply(this, arguments) || this;
  46755. return n.type = e.type,
  46756. n
  46757. }
  46758. return n(e, t),
  46759. e.type = "angleAxis",
  46760. e
  46761. }(UN)
  46762. , jN = function(t) {
  46763. function e() {
  46764. var n = null !== t && t.apply(this, arguments) || this;
  46765. return n.type = e.type,
  46766. n
  46767. }
  46768. return n(e, t),
  46769. e.type = "radiusAxis",
  46770. e
  46771. }(UN)
  46772. , qN = function(t) {
  46773. function e(e, n) {
  46774. return t.call(this, "radius", e, n) || this
  46775. }
  46776. return n(e, t),
  46777. e.prototype.pointToData = function(t, e) {
  46778. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  46779. }
  46780. ,
  46781. e
  46782. }(ab);
  46783. qN.prototype.dataToRadius = ab.prototype.dataToCoord,
  46784. qN.prototype.radiusToData = ab.prototype.coordToData;
  46785. var KN = Vo()
  46786. , $N = function(t) {
  46787. function e(e, n) {
  46788. return t.call(this, "angle", e, n || [0, 360]) || this
  46789. }
  46790. return n(e, t),
  46791. e.prototype.pointToData = function(t, e) {
  46792. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  46793. }
  46794. ,
  46795. e.prototype.calculateCategoryInterval = function() {
  46796. var t = this
  46797. , e = t.getLabelModel()
  46798. , n = t.scale
  46799. , i = n.getExtent()
  46800. , r = n.count();
  46801. if (i[1] - i[0] < 1)
  46802. return 0;
  46803. var o = i[0]
  46804. , a = t.dataToCoord(o + 1) - t.dataToCoord(o)
  46805. , s = Math.abs(a)
  46806. , l = Sr(null == o ? "" : o + "", e.getFont(), "center", "top")
  46807. , u = Math.max(l.height, 7) / s;
  46808. isNaN(u) && (u = 1 / 0);
  46809. var h = Math.max(0, Math.floor(u))
  46810. , c = KN(t.model)
  46811. , p = c.lastAutoInterval
  46812. , d = c.lastTickCount;
  46813. return null != p && null != d && Math.abs(p - h) <= 1 && Math.abs(d - r) <= 1 && p > h ? h = p : (c.lastTickCount = r,
  46814. c.lastAutoInterval = h),
  46815. h
  46816. }
  46817. ,
  46818. e
  46819. }(ab);
  46820. $N.prototype.dataToAngle = ab.prototype.dataToCoord,
  46821. $N.prototype.angleToData = ab.prototype.coordToData;
  46822. var JN = ["radius", "angle"]
  46823. , QN = function() {
  46824. function t(t) {
  46825. this.dimensions = JN,
  46826. this.type = "polar",
  46827. this.cx = 0,
  46828. this.cy = 0,
  46829. this._radiusAxis = new qN,
  46830. this._angleAxis = new $N,
  46831. this.axisPointerEnabled = !0,
  46832. this.name = t || "",
  46833. this._radiusAxis.polar = this._angleAxis.polar = this
  46834. }
  46835. return t.prototype.containPoint = function(t) {
  46836. var e = this.pointToCoord(t);
  46837. return this._radiusAxis.contain(e[0]) && this._angleAxis.contain(e[1])
  46838. }
  46839. ,
  46840. t.prototype.containData = function(t) {
  46841. return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1])
  46842. }
  46843. ,
  46844. t.prototype.getAxis = function(t) {
  46845. return this["_" + t + "Axis"]
  46846. }
  46847. ,
  46848. t.prototype.getAxes = function() {
  46849. return [this._radiusAxis, this._angleAxis]
  46850. }
  46851. ,
  46852. t.prototype.getAxesByScale = function(t) {
  46853. var e = []
  46854. , n = this._angleAxis
  46855. , i = this._radiusAxis;
  46856. return n.scale.type === t && e.push(n),
  46857. i.scale.type === t && e.push(i),
  46858. e
  46859. }
  46860. ,
  46861. t.prototype.getAngleAxis = function() {
  46862. return this._angleAxis
  46863. }
  46864. ,
  46865. t.prototype.getRadiusAxis = function() {
  46866. return this._radiusAxis
  46867. }
  46868. ,
  46869. t.prototype.getOtherAxis = function(t) {
  46870. var e = this._angleAxis;
  46871. return t === e ? this._radiusAxis : e
  46872. }
  46873. ,
  46874. t.prototype.getBaseAxis = function() {
  46875. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
  46876. }
  46877. ,
  46878. t.prototype.getTooltipAxes = function(t) {
  46879. var e = null != t && "auto" !== t ? this.getAxis(t) : this.getBaseAxis();
  46880. return {
  46881. baseAxes: [e],
  46882. otherAxes: [this.getOtherAxis(e)]
  46883. }
  46884. }
  46885. ,
  46886. t.prototype.dataToPoint = function(t, e) {
  46887. return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], e), this._angleAxis.dataToAngle(t[1], e)])
  46888. }
  46889. ,
  46890. t.prototype.pointToData = function(t, e) {
  46891. var n = this.pointToCoord(t);
  46892. return [this._radiusAxis.radiusToData(n[0], e), this._angleAxis.angleToData(n[1], e)]
  46893. }
  46894. ,
  46895. t.prototype.pointToCoord = function(t) {
  46896. var e = t[0] - this.cx
  46897. , n = t[1] - this.cy
  46898. , i = this.getAngleAxis()
  46899. , r = i.getExtent()
  46900. , o = Math.min(r[0], r[1])
  46901. , a = Math.max(r[0], r[1]);
  46902. i.inverse ? o = a - 360 : a = o + 360;
  46903. var s = Math.sqrt(e * e + n * n);
  46904. e /= s,
  46905. n /= s;
  46906. for (var l = Math.atan2(-n, e) / Math.PI * 180, u = l < o ? 1 : -1; l < o || l > a; )
  46907. l += 360 * u;
  46908. return [s, l]
  46909. }
  46910. ,
  46911. t.prototype.coordToPoint = function(t) {
  46912. var e = t[0]
  46913. , n = t[1] / 180 * Math.PI;
  46914. return [Math.cos(n) * e + this.cx, -Math.sin(n) * e + this.cy]
  46915. }
  46916. ,
  46917. t.prototype.getArea = function() {
  46918. var t = this.getAngleAxis()
  46919. , e = this.getRadiusAxis().getExtent().slice();
  46920. e[0] > e[1] && e.reverse();
  46921. var n = t.getExtent()
  46922. , i = Math.PI / 180
  46923. , r = 1e-4;
  46924. return {
  46925. cx: this.cx,
  46926. cy: this.cy,
  46927. r0: e[0],
  46928. r: e[1],
  46929. startAngle: -n[0] * i,
  46930. endAngle: -n[1] * i,
  46931. clockwise: t.inverse,
  46932. contain: function(t, e) {
  46933. var n = t - this.cx
  46934. , i = e - this.cy
  46935. , o = n * n + i * i
  46936. , a = this.r
  46937. , s = this.r0;
  46938. return a !== s && o - r <= a * a && o + r >= s * s
  46939. }
  46940. }
  46941. }
  46942. ,
  46943. t.prototype.convertToPixel = function(t, e, n) {
  46944. return tE(e) === this ? this.dataToPoint(n) : null
  46945. }
  46946. ,
  46947. t.prototype.convertFromPixel = function(t, e, n) {
  46948. return tE(e) === this ? this.pointToData(n) : null
  46949. }
  46950. ,
  46951. t
  46952. }();
  46953. function tE(t) {
  46954. var e = t.seriesModel
  46955. , n = t.polarModel;
  46956. return n && n.coordinateSystem || e && e.coordinateSystem
  46957. }
  46958. function eE(t, e) {
  46959. var n = this
  46960. , i = n.getAngleAxis()
  46961. , r = n.getRadiusAxis();
  46962. if (i.scale.setExtent(1 / 0, -1 / 0),
  46963. r.scale.setExtent(1 / 0, -1 / 0),
  46964. t.eachSeries((function(t) {
  46965. if (t.coordinateSystem === n) {
  46966. var e = t.getData();
  46967. E(C_(e, "radius"), (function(t) {
  46968. r.scale.unionExtentFromData(e, t)
  46969. }
  46970. )),
  46971. E(C_(e, "angle"), (function(t) {
  46972. i.scale.unionExtentFromData(e, t)
  46973. }
  46974. ))
  46975. }
  46976. }
  46977. )),
  46978. __(i.scale, i.model),
  46979. __(r.scale, r.model),
  46980. "category" === i.type && !i.onBand) {
  46981. var o = i.getExtent()
  46982. , a = 360 / i.scale.count();
  46983. i.inverse ? o[1] += a : o[1] -= a,
  46984. i.setExtent(o[0], o[1])
  46985. }
  46986. }
  46987. function nE(t, e) {
  46988. var n;
  46989. if (t.type = e.get("type"),
  46990. t.scale = b_(e),
  46991. t.onBand = e.get("boundaryGap") && "category" === t.type,
  46992. t.inverse = e.get("inverse"),
  46993. function(t) {
  46994. return "angleAxis" === t.mainType
  46995. }(e)) {
  46996. t.inverse = t.inverse !== e.get("clockwise");
  46997. var i = e.get("startAngle")
  46998. , r = null !== (n = e.get("endAngle")) && void 0 !== n ? n : i + (t.inverse ? -360 : 360);
  46999. t.setExtent(i, r)
  47000. }
  47001. e.axis = t,
  47002. t.model = e
  47003. }
  47004. var iE = {
  47005. dimensions: JN,
  47006. create: function(t, e) {
  47007. var n = [];
  47008. return t.eachComponent("polar", (function(t, i) {
  47009. var r = new QN(i + "");
  47010. r.update = eE;
  47011. var o = r.getRadiusAxis()
  47012. , a = r.getAngleAxis()
  47013. , s = t.findAxisModel("radiusAxis")
  47014. , l = t.findAxisModel("angleAxis");
  47015. nE(o, s),
  47016. nE(a, l),
  47017. function(t, e, n) {
  47018. var i = e.get("center")
  47019. , r = n.getWidth()
  47020. , o = n.getHeight();
  47021. t.cx = $r(i[0], r),
  47022. t.cy = $r(i[1], o);
  47023. var a = t.getRadiusAxis()
  47024. , s = Math.min(r, o) / 2
  47025. , l = e.get("radius");
  47026. null == l ? l = [0, "100%"] : Y(l) || (l = [0, l]);
  47027. var u = [$r(l[0], s), $r(l[1], s)];
  47028. a.inverse ? a.setExtent(u[1], u[0]) : a.setExtent(u[0], u[1])
  47029. }(r, t, e),
  47030. n.push(r),
  47031. t.coordinateSystem = r,
  47032. r.model = t
  47033. }
  47034. )),
  47035. t.eachSeries((function(t) {
  47036. if ("polar" === t.get("coordinateSystem")) {
  47037. var e = t.getReferringComponents("polar", Wo).models[0];
  47038. 0,
  47039. t.coordinateSystem = e.coordinateSystem
  47040. }
  47041. }
  47042. )),
  47043. n
  47044. }
  47045. }
  47046. , rE = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  47047. function oE(t, e, n) {
  47048. e[1] > e[0] && (e = e.slice().reverse());
  47049. var i = t.coordToPoint([e[0], n])
  47050. , r = t.coordToPoint([e[1], n]);
  47051. return {
  47052. x1: i[0],
  47053. y1: i[1],
  47054. x2: r[0],
  47055. y2: r[1]
  47056. }
  47057. }
  47058. function aE(t) {
  47059. return t.getRadiusAxis().inverse ? 0 : 1
  47060. }
  47061. function sE(t) {
  47062. var e = t[0]
  47063. , n = t[t.length - 1];
  47064. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop()
  47065. }
  47066. var lE = function(t) {
  47067. function e() {
  47068. var n = null !== t && t.apply(this, arguments) || this;
  47069. return n.type = e.type,
  47070. n.axisPointerClass = "PolarAxisPointer",
  47071. n
  47072. }
  47073. return n(e, t),
  47074. e.prototype.render = function(t, e) {
  47075. if (this.group.removeAll(),
  47076. t.get("show")) {
  47077. var n = t.axis
  47078. , i = n.polar
  47079. , r = i.getRadiusAxis().getExtent()
  47080. , o = n.getTicksCoords()
  47081. , a = n.getMinorTicksCoords()
  47082. , s = z(n.getViewLabels(), (function(t) {
  47083. t = T(t);
  47084. var e = n.scale
  47085. , i = "ordinal" === e.type ? e.getRawOrdinalNumber(t.tickValue) : t.tickValue;
  47086. return t.coord = n.dataToCoord(i),
  47087. t
  47088. }
  47089. ));
  47090. sE(s),
  47091. sE(o),
  47092. E(rE, (function(e) {
  47093. !t.get([e, "show"]) || n.scale.isBlank() && "axisLine" !== e || uE[e](this.group, t, i, o, a, r, s)
  47094. }
  47095. ), this)
  47096. }
  47097. }
  47098. ,
  47099. e.type = "angleAxis",
  47100. e
  47101. }(TI)
  47102. , uE = {
  47103. axisLine: function(t, e, n, i, r, o) {
  47104. var a, s = e.getModel(["axisLine", "lineStyle"]), l = n.getAngleAxis(), u = Math.PI / 180, h = l.getExtent(), c = aE(n), p = c ? 0 : 1, d = 360 === Math.abs(h[1] - h[0]) ? "Circle" : "Arc";
  47105. (a = 0 === o[p] ? new Qh[d]({
  47106. shape: {
  47107. cx: n.cx,
  47108. cy: n.cy,
  47109. r: o[c],
  47110. startAngle: -h[0] * u,
  47111. endAngle: -h[1] * u,
  47112. clockwise: l.inverse
  47113. },
  47114. style: s.getLineStyle(),
  47115. z2: 1,
  47116. silent: !0
  47117. }) : new Wu({
  47118. shape: {
  47119. cx: n.cx,
  47120. cy: n.cy,
  47121. r: o[c],
  47122. r0: o[p]
  47123. },
  47124. style: s.getLineStyle(),
  47125. z2: 1,
  47126. silent: !0
  47127. })).style.fill = null,
  47128. t.add(a)
  47129. },
  47130. axisTick: function(t, e, n, i, r, o) {
  47131. var a = e.getModel("axisTick")
  47132. , s = (a.get("inside") ? -1 : 1) * a.get("length")
  47133. , l = o[aE(n)]
  47134. , u = z(i, (function(t) {
  47135. return new Ku({
  47136. shape: oE(n, [l, l + s], t.coord)
  47137. })
  47138. }
  47139. ));
  47140. t.add(Nh(u, {
  47141. style: k(a.getModel("lineStyle").getLineStyle(), {
  47142. stroke: e.get(["axisLine", "lineStyle", "color"])
  47143. })
  47144. }))
  47145. },
  47146. minorTick: function(t, e, n, i, r, o) {
  47147. if (r.length) {
  47148. for (var a = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (a.get("inside") ? -1 : 1) * s.get("length"), u = o[aE(n)], h = [], c = 0; c < r.length; c++)
  47149. for (var p = 0; p < r[c].length; p++)
  47150. h.push(new Ku({
  47151. shape: oE(n, [u, u + l], r[c][p].coord)
  47152. }));
  47153. t.add(Nh(h, {
  47154. style: k(s.getModel("lineStyle").getLineStyle(), k(a.getLineStyle(), {
  47155. stroke: e.get(["axisLine", "lineStyle", "color"])
  47156. }))
  47157. }))
  47158. }
  47159. },
  47160. axisLabel: function(t, e, n, i, r, o, a) {
  47161. var s = e.getCategories(!0)
  47162. , l = e.getModel("axisLabel")
  47163. , u = l.get("margin")
  47164. , h = e.get("triggerEvent");
  47165. E(a, (function(i, r) {
  47166. var a = l
  47167. , c = i.tickValue
  47168. , p = o[aE(n)]
  47169. , d = n.coordToPoint([p + u, i.coord])
  47170. , f = n.cx
  47171. , g = n.cy
  47172. , y = Math.abs(d[0] - f) / p < .3 ? "center" : d[0] > f ? "left" : "right"
  47173. , v = Math.abs(d[1] - g) / p < .3 ? "middle" : d[1] > g ? "top" : "bottom";
  47174. if (s && s[c]) {
  47175. var m = s[c];
  47176. q(m) && m.textStyle && (a = new Cc(m.textStyle,l,l.ecModel))
  47177. }
  47178. var x = new Xs({
  47179. silent: dI.isLabelSilent(e),
  47180. style: oc(a, {
  47181. x: d[0],
  47182. y: d[1],
  47183. fill: a.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  47184. text: i.formattedLabel,
  47185. align: y,
  47186. verticalAlign: v
  47187. })
  47188. });
  47189. if (t.add(x),
  47190. h) {
  47191. var _ = dI.makeAxisEventDataBase(e);
  47192. _.targetType = "axisLabel",
  47193. _.value = i.rawLabel,
  47194. rl(x).eventData = _
  47195. }
  47196. }
  47197. ), this)
  47198. },
  47199. splitLine: function(t, e, n, i, r, o) {
  47200. var a = e.getModel("splitLine").getModel("lineStyle")
  47201. , s = a.get("color")
  47202. , l = 0;
  47203. s = s instanceof Array ? s : [s];
  47204. for (var u = [], h = 0; h < i.length; h++) {
  47205. var c = l++ % s.length;
  47206. u[c] = u[c] || [],
  47207. u[c].push(new Ku({
  47208. shape: oE(n, o, i[h].coord)
  47209. }))
  47210. }
  47211. for (h = 0; h < u.length; h++)
  47212. t.add(Nh(u[h], {
  47213. style: k({
  47214. stroke: s[h % s.length]
  47215. }, a.getLineStyle()),
  47216. silent: !0,
  47217. z: e.get("z")
  47218. }))
  47219. },
  47220. minorSplitLine: function(t, e, n, i, r, o) {
  47221. if (r.length) {
  47222. for (var a = e.getModel("minorSplitLine").getModel("lineStyle"), s = [], l = 0; l < r.length; l++)
  47223. for (var u = 0; u < r[l].length; u++)
  47224. s.push(new Ku({
  47225. shape: oE(n, o, r[l][u].coord)
  47226. }));
  47227. t.add(Nh(s, {
  47228. style: a.getLineStyle(),
  47229. silent: !0,
  47230. z: e.get("z")
  47231. }))
  47232. }
  47233. },
  47234. splitArea: function(t, e, n, i, r, o) {
  47235. if (i.length) {
  47236. var a = e.getModel("splitArea").getModel("areaStyle")
  47237. , s = a.get("color")
  47238. , l = 0;
  47239. s = s instanceof Array ? s : [s];
  47240. 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++) {
  47241. var v = g === y ? i[0].coord : i[g].coord
  47242. , m = l++ % s.length;
  47243. u[m] = u[m] || [],
  47244. u[m].push(new Fu({
  47245. shape: {
  47246. cx: n.cx,
  47247. cy: n.cy,
  47248. r0: p,
  47249. r: d,
  47250. startAngle: c,
  47251. endAngle: -v * h,
  47252. clockwise: f
  47253. },
  47254. silent: !0
  47255. })),
  47256. c = -v * h
  47257. }
  47258. for (g = 0; g < u.length; g++)
  47259. t.add(Nh(u[g], {
  47260. style: k({
  47261. fill: s[g % s.length]
  47262. }, a.getAreaStyle()),
  47263. silent: !0
  47264. }))
  47265. }
  47266. }
  47267. }
  47268. , hE = ["axisLine", "axisTickLabel", "axisName"]
  47269. , cE = ["splitLine", "splitArea", "minorSplitLine"]
  47270. , pE = function(t) {
  47271. function e() {
  47272. var n = null !== t && t.apply(this, arguments) || this;
  47273. return n.type = e.type,
  47274. n.axisPointerClass = "PolarAxisPointer",
  47275. n
  47276. }
  47277. return n(e, t),
  47278. e.prototype.render = function(t, e) {
  47279. if (this.group.removeAll(),
  47280. t.get("show")) {
  47281. var n = this._axisGroup
  47282. , i = this._axisGroup = new Br;
  47283. this.group.add(i);
  47284. var r = t.axis
  47285. , o = r.polar
  47286. , a = o.getAngleAxis()
  47287. , s = r.getTicksCoords()
  47288. , l = r.getMinorTicksCoords()
  47289. , u = a.getExtent()[0]
  47290. , h = r.getExtent()
  47291. , c = function(t, e, n) {
  47292. return {
  47293. position: [t.cx, t.cy],
  47294. rotation: n / 180 * Math.PI,
  47295. labelDirection: -1,
  47296. tickDirection: -1,
  47297. nameDirection: 1,
  47298. labelRotate: e.getModel("axisLabel").get("rotate"),
  47299. z2: 1
  47300. }
  47301. }(o, t, u)
  47302. , p = new dI(t,c);
  47303. E(hE, p.add, p),
  47304. i.add(p.getGroup()),
  47305. Hh(n, i, t),
  47306. E(cE, (function(e) {
  47307. t.get([e, "show"]) && !r.scale.isBlank() && dE[e](this.group, t, o, u, h, s, l)
  47308. }
  47309. ), this)
  47310. }
  47311. }
  47312. ,
  47313. e.type = "radiusAxis",
  47314. e
  47315. }(TI)
  47316. , dE = {
  47317. splitLine: function(t, e, n, i, r, o) {
  47318. var a = e.getModel("splitLine").getModel("lineStyle")
  47319. , s = a.get("color")
  47320. , l = 0
  47321. , u = n.getAngleAxis()
  47322. , h = Math.PI / 180
  47323. , c = u.getExtent()
  47324. , p = 360 === Math.abs(c[1] - c[0]) ? "Circle" : "Arc";
  47325. s = s instanceof Array ? s : [s];
  47326. for (var d = [], f = 0; f < o.length; f++) {
  47327. var g = l++ % s.length;
  47328. d[g] = d[g] || [],
  47329. d[g].push(new Qh[p]({
  47330. shape: {
  47331. cx: n.cx,
  47332. cy: n.cy,
  47333. r: Math.max(o[f].coord, 0),
  47334. startAngle: -c[0] * h,
  47335. endAngle: -c[1] * h,
  47336. clockwise: u.inverse
  47337. }
  47338. }))
  47339. }
  47340. for (f = 0; f < d.length; f++)
  47341. t.add(Nh(d[f], {
  47342. style: k({
  47343. stroke: s[f % s.length],
  47344. fill: null
  47345. }, a.getLineStyle()),
  47346. silent: !0
  47347. }))
  47348. },
  47349. minorSplitLine: function(t, e, n, i, r, o, a) {
  47350. if (a.length) {
  47351. for (var s = e.getModel("minorSplitLine").getModel("lineStyle"), l = [], u = 0; u < a.length; u++)
  47352. for (var h = 0; h < a[u].length; h++)
  47353. l.push(new Su({
  47354. shape: {
  47355. cx: n.cx,
  47356. cy: n.cy,
  47357. r: a[u][h].coord
  47358. }
  47359. }));
  47360. t.add(Nh(l, {
  47361. style: k({
  47362. fill: null
  47363. }, s.getLineStyle()),
  47364. silent: !0
  47365. }))
  47366. }
  47367. },
  47368. splitArea: function(t, e, n, i, r, o) {
  47369. if (o.length) {
  47370. var a = e.getModel("splitArea").getModel("areaStyle")
  47371. , s = a.get("color")
  47372. , l = 0;
  47373. s = s instanceof Array ? s : [s];
  47374. for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) {
  47375. var p = l++ % s.length;
  47376. u[p] = u[p] || [],
  47377. u[p].push(new Fu({
  47378. shape: {
  47379. cx: n.cx,
  47380. cy: n.cy,
  47381. r0: h,
  47382. r: o[c].coord,
  47383. startAngle: 0,
  47384. endAngle: 2 * Math.PI
  47385. },
  47386. silent: !0
  47387. })),
  47388. h = o[c].coord
  47389. }
  47390. for (c = 0; c < u.length; c++)
  47391. t.add(Nh(u[c], {
  47392. style: k({
  47393. fill: s[c % s.length]
  47394. }, a.getAreaStyle()),
  47395. silent: !0
  47396. }))
  47397. }
  47398. }
  47399. };
  47400. function fE(t) {
  47401. return t.get("stack") || "__ec_stack_" + t.seriesIndex
  47402. }
  47403. function gE(t, e) {
  47404. return e.dim + t.model.componentIndex
  47405. }
  47406. function yE(t, e, n) {
  47407. var i = {}
  47408. , r = function(t) {
  47409. var e = {};
  47410. E(t, (function(t, n) {
  47411. var i = t.getData()
  47412. , r = t.coordinateSystem
  47413. , o = r.getBaseAxis()
  47414. , a = gE(r, o)
  47415. , s = o.getExtent()
  47416. , l = "category" === o.type ? o.getBandWidth() : Math.abs(s[1] - s[0]) / i.count()
  47417. , u = e[a] || {
  47418. bandWidth: l,
  47419. remainedWidth: l,
  47420. autoWidthCount: 0,
  47421. categoryGap: "20%",
  47422. gap: "30%",
  47423. stacks: {}
  47424. }
  47425. , h = u.stacks;
  47426. e[a] = u;
  47427. var c = fE(t);
  47428. h[c] || u.autoWidthCount++,
  47429. h[c] = h[c] || {
  47430. width: 0,
  47431. maxWidth: 0
  47432. };
  47433. var p = $r(t.get("barWidth"), l)
  47434. , d = $r(t.get("barMaxWidth"), l)
  47435. , f = t.get("barGap")
  47436. , g = t.get("barCategoryGap");
  47437. p && !h[c].width && (p = Math.min(u.remainedWidth, p),
  47438. h[c].width = p,
  47439. u.remainedWidth -= p),
  47440. d && (h[c].maxWidth = d),
  47441. null != f && (u.gap = f),
  47442. null != g && (u.categoryGap = g)
  47443. }
  47444. ));
  47445. var n = {};
  47446. return E(e, (function(t, e) {
  47447. n[e] = {};
  47448. var i = t.stacks
  47449. , r = t.bandWidth
  47450. , o = $r(t.categoryGap, r)
  47451. , a = $r(t.gap, 1)
  47452. , s = t.remainedWidth
  47453. , l = t.autoWidthCount
  47454. , u = (s - o) / (l + (l - 1) * a);
  47455. u = Math.max(u, 0),
  47456. E(i, (function(t, e) {
  47457. var n = t.maxWidth;
  47458. n && n < u && (n = Math.min(n, s),
  47459. t.width && (n = Math.min(n, t.width)),
  47460. s -= n,
  47461. t.width = n,
  47462. l--)
  47463. }
  47464. )),
  47465. u = (s - o) / (l + (l - 1) * a),
  47466. u = Math.max(u, 0);
  47467. var h, c = 0;
  47468. E(i, (function(t, e) {
  47469. t.width || (t.width = u),
  47470. h = t,
  47471. c += t.width * (1 + a)
  47472. }
  47473. )),
  47474. h && (c -= h.width * a);
  47475. var p = -c / 2;
  47476. E(i, (function(t, i) {
  47477. n[e][i] = n[e][i] || {
  47478. offset: p,
  47479. width: t.width
  47480. },
  47481. p += t.width * (1 + a)
  47482. }
  47483. ))
  47484. }
  47485. )),
  47486. n
  47487. }(B(e.getSeriesByType(t), (function(t) {
  47488. return !e.isSeriesFiltered(t) && t.coordinateSystem && "polar" === t.coordinateSystem.type
  47489. }
  47490. )));
  47491. e.eachSeriesByType(t, (function(t) {
  47492. if ("polar" === t.coordinateSystem.type) {
  47493. var e = t.getData()
  47494. , n = t.coordinateSystem
  47495. , o = n.getBaseAxis()
  47496. , a = gE(n, o)
  47497. , s = fE(t)
  47498. , l = r[a][s]
  47499. , u = l.offset
  47500. , h = l.width
  47501. , c = n.getOtherAxis(o)
  47502. , p = t.coordinateSystem.cx
  47503. , d = t.coordinateSystem.cy
  47504. , f = t.get("barMinHeight") || 0
  47505. , g = t.get("barMinAngle") || 0;
  47506. i[s] = i[s] || [];
  47507. 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.model.get("startValue"), b = c.dataToCoord(_ || 0), w = 0, S = e.count(); w < S; w++) {
  47508. var M = e.get(y, w)
  47509. , I = e.get(v, w)
  47510. , T = M >= 0 ? "p" : "n"
  47511. , C = b;
  47512. m && (i[s][I] || (i[s][I] = {
  47513. p: b,
  47514. n: b
  47515. }),
  47516. C = i[s][I][T]);
  47517. var D = void 0
  47518. , A = void 0
  47519. , k = void 0
  47520. , L = void 0;
  47521. if ("radius" === c.dim) {
  47522. var P = c.dataToCoord(M) - b
  47523. , O = o.dataToCoord(I);
  47524. Math.abs(P) < f && (P = (P < 0 ? -1 : 1) * f),
  47525. D = C,
  47526. A = C + P,
  47527. L = (k = O - u) - h,
  47528. m && (i[s][I][T] = A)
  47529. } else {
  47530. var R = c.dataToCoord(M, x) - b
  47531. , N = o.dataToCoord(I);
  47532. Math.abs(R) < g && (R = (R < 0 ? -1 : 1) * g),
  47533. A = (D = N + u) + h,
  47534. k = C,
  47535. L = C + R,
  47536. m && (i[s][I][T] = L)
  47537. }
  47538. e.setItemLayout(w, {
  47539. cx: p,
  47540. cy: d,
  47541. r0: D,
  47542. r: A,
  47543. startAngle: -k * Math.PI / 180,
  47544. endAngle: -L * Math.PI / 180,
  47545. clockwise: k >= L
  47546. })
  47547. }
  47548. }
  47549. }
  47550. ))
  47551. }
  47552. var vE = {
  47553. startAngle: 90,
  47554. clockwise: !0,
  47555. splitNumber: 12,
  47556. axisLabel: {
  47557. rotate: 0
  47558. }
  47559. }
  47560. , mE = {
  47561. splitNumber: 5
  47562. }
  47563. , xE = function(t) {
  47564. function e() {
  47565. var n = null !== t && t.apply(this, arguments) || this;
  47566. return n.type = e.type,
  47567. n
  47568. }
  47569. return n(e, t),
  47570. e.type = "polar",
  47571. e
  47572. }(Ag);
  47573. function _E(t, e) {
  47574. e = e || {};
  47575. var n = t.coordinateSystem
  47576. , i = t.axis
  47577. , r = {}
  47578. , o = i.position
  47579. , a = i.orient
  47580. , s = n.getRect()
  47581. , l = [s.x, s.x + s.width, s.y, s.y + s.height]
  47582. , u = {
  47583. horizontal: {
  47584. top: l[2],
  47585. bottom: l[3]
  47586. },
  47587. vertical: {
  47588. left: l[0],
  47589. right: l[1]
  47590. }
  47591. };
  47592. r.position = ["vertical" === a ? u.vertical[o] : l[0], "horizontal" === a ? u.horizontal[o] : l[3]];
  47593. r.rotation = Math.PI / 2 * {
  47594. horizontal: 0,
  47595. vertical: 1
  47596. }[a];
  47597. r.labelDirection = r.tickDirection = r.nameDirection = {
  47598. top: -1,
  47599. bottom: 1,
  47600. right: 1,
  47601. left: -1
  47602. }[o],
  47603. t.get(["axisTick", "inside"]) && (r.tickDirection = -r.tickDirection),
  47604. it(e.labelInside, t.get(["axisLabel", "inside"])) && (r.labelDirection = -r.labelDirection);
  47605. var h = e.rotate;
  47606. return null == h && (h = t.get(["axisLabel", "rotate"])),
  47607. r.labelRotation = "top" === o ? -h : h,
  47608. r.z2 = 1,
  47609. r
  47610. }
  47611. var bE = ["axisLine", "axisTickLabel", "axisName"]
  47612. , wE = ["splitArea", "splitLine"]
  47613. , SE = function(t) {
  47614. function e() {
  47615. var n = null !== t && t.apply(this, arguments) || this;
  47616. return n.type = e.type,
  47617. n.axisPointerClass = "SingleAxisPointer",
  47618. n
  47619. }
  47620. return n(e, t),
  47621. e.prototype.render = function(e, n, i, r) {
  47622. var o = this.group;
  47623. o.removeAll();
  47624. var a = this._axisGroup;
  47625. this._axisGroup = new Br;
  47626. var s = _E(e)
  47627. , l = new dI(e,s);
  47628. E(bE, l.add, l),
  47629. o.add(this._axisGroup),
  47630. o.add(l.getGroup()),
  47631. E(wE, (function(t) {
  47632. e.get([t, "show"]) && ME[t](this, this.group, this._axisGroup, e)
  47633. }
  47634. ), this),
  47635. Hh(a, this._axisGroup, e),
  47636. t.prototype.render.call(this, e, n, i, r)
  47637. }
  47638. ,
  47639. e.prototype.remove = function() {
  47640. AI(this)
  47641. }
  47642. ,
  47643. e.type = "singleAxis",
  47644. e
  47645. }(TI)
  47646. , ME = {
  47647. splitLine: function(t, e, n, i) {
  47648. var r = i.axis;
  47649. if (!r.scale.isBlank()) {
  47650. var o = i.getModel("splitLine")
  47651. , a = o.getModel("lineStyle")
  47652. , s = a.get("color");
  47653. s = s instanceof Array ? s : [s];
  47654. for (var l = a.get("width"), u = i.coordinateSystem.getRect(), h = r.isHorizontal(), c = [], p = 0, d = r.getTicksCoords({
  47655. tickModel: o
  47656. }), f = [], g = [], y = 0; y < d.length; ++y) {
  47657. var v = r.toGlobalCoord(d[y].coord);
  47658. h ? (f[0] = v,
  47659. f[1] = u.y,
  47660. g[0] = v,
  47661. g[1] = u.y + u.height) : (f[0] = u.x,
  47662. f[1] = v,
  47663. g[0] = u.x + u.width,
  47664. g[1] = v);
  47665. var m = new Ku({
  47666. shape: {
  47667. x1: f[0],
  47668. y1: f[1],
  47669. x2: g[0],
  47670. y2: g[1]
  47671. },
  47672. silent: !0
  47673. });
  47674. zh(m.shape, l);
  47675. var x = p++ % s.length;
  47676. c[x] = c[x] || [],
  47677. c[x].push(m)
  47678. }
  47679. var _ = a.getLineStyle(["color"]);
  47680. for (y = 0; y < c.length; ++y)
  47681. e.add(Nh(c[y], {
  47682. style: k({
  47683. stroke: s[y % s.length]
  47684. }, _),
  47685. silent: !0
  47686. }))
  47687. }
  47688. },
  47689. splitArea: function(t, e, n, i) {
  47690. DI(t, n, i, i)
  47691. }
  47692. }
  47693. , IE = function(t) {
  47694. function e() {
  47695. var n = null !== t && t.apply(this, arguments) || this;
  47696. return n.type = e.type,
  47697. n
  47698. }
  47699. return n(e, t),
  47700. e.prototype.getCoordSysModel = function() {
  47701. return this
  47702. }
  47703. ,
  47704. e.type = "singleAxis",
  47705. e.layoutMode = "box",
  47706. e.defaultOption = {
  47707. left: "5%",
  47708. top: "5%",
  47709. right: "5%",
  47710. bottom: "5%",
  47711. type: "value",
  47712. position: "bottom",
  47713. orient: "horizontal",
  47714. axisLine: {
  47715. show: !0,
  47716. lineStyle: {
  47717. width: 1,
  47718. type: "solid"
  47719. }
  47720. },
  47721. tooltip: {
  47722. show: !0
  47723. },
  47724. axisTick: {
  47725. show: !0,
  47726. length: 6,
  47727. lineStyle: {
  47728. width: 1
  47729. }
  47730. },
  47731. axisLabel: {
  47732. show: !0,
  47733. interval: "auto"
  47734. },
  47735. splitLine: {
  47736. show: !0,
  47737. lineStyle: {
  47738. type: "dashed",
  47739. opacity: .2
  47740. }
  47741. }
  47742. },
  47743. e
  47744. }(zp);
  47745. R(IE, D_.prototype);
  47746. var TE = function(t) {
  47747. function e(e, n, i, r, o) {
  47748. var a = t.call(this, e, n, i) || this;
  47749. return a.type = r || "value",
  47750. a.position = o || "bottom",
  47751. a
  47752. }
  47753. return n(e, t),
  47754. e.prototype.isHorizontal = function() {
  47755. var t = this.position;
  47756. return "top" === t || "bottom" === t
  47757. }
  47758. ,
  47759. e.prototype.pointToData = function(t, e) {
  47760. return this.coordinateSystem.pointToData(t)[0]
  47761. }
  47762. ,
  47763. e
  47764. }(ab)
  47765. , CE = ["single"]
  47766. , DE = function() {
  47767. function t(t, e, n) {
  47768. this.type = "single",
  47769. this.dimension = "single",
  47770. this.dimensions = CE,
  47771. this.axisPointerEnabled = !0,
  47772. this.model = t,
  47773. this._init(t, e, n)
  47774. }
  47775. return t.prototype._init = function(t, e, n) {
  47776. var i = this.dimension
  47777. , r = new TE(i,b_(t),[0, 0],t.get("type"),t.get("position"))
  47778. , o = "category" === r.type;
  47779. r.onBand = o && t.get("boundaryGap"),
  47780. r.inverse = t.get("inverse"),
  47781. r.orient = t.get("orient"),
  47782. t.axis = r,
  47783. r.model = t,
  47784. r.coordinateSystem = this,
  47785. this._axis = r
  47786. }
  47787. ,
  47788. t.prototype.update = function(t, e) {
  47789. t.eachSeries((function(t) {
  47790. if (t.coordinateSystem === this) {
  47791. var e = t.getData();
  47792. E(e.mapDimensionsAll(this.dimension), (function(t) {
  47793. this._axis.scale.unionExtentFromData(e, t)
  47794. }
  47795. ), this),
  47796. __(this._axis.scale, this._axis.model)
  47797. }
  47798. }
  47799. ), this)
  47800. }
  47801. ,
  47802. t.prototype.resize = function(t, e) {
  47803. this._rect = kp({
  47804. left: t.get("left"),
  47805. top: t.get("top"),
  47806. right: t.get("right"),
  47807. bottom: t.get("bottom"),
  47808. width: t.get("width"),
  47809. height: t.get("height")
  47810. }, {
  47811. width: e.getWidth(),
  47812. height: e.getHeight()
  47813. }),
  47814. this._adjustAxis()
  47815. }
  47816. ,
  47817. t.prototype.getRect = function() {
  47818. return this._rect
  47819. }
  47820. ,
  47821. t.prototype._adjustAxis = function() {
  47822. var t = this._rect
  47823. , e = this._axis
  47824. , n = e.isHorizontal()
  47825. , i = n ? [0, t.width] : [0, t.height]
  47826. , r = e.inverse ? 1 : 0;
  47827. e.setExtent(i[r], i[1 - r]),
  47828. this._updateAxisTransform(e, n ? t.x : t.y)
  47829. }
  47830. ,
  47831. t.prototype._updateAxisTransform = function(t, e) {
  47832. var n = t.getExtent()
  47833. , i = n[0] + n[1]
  47834. , r = t.isHorizontal();
  47835. t.toGlobalCoord = r ? function(t) {
  47836. return t + e
  47837. }
  47838. : function(t) {
  47839. return i - t + e
  47840. }
  47841. ,
  47842. t.toLocalCoord = r ? function(t) {
  47843. return t - e
  47844. }
  47845. : function(t) {
  47846. return i - t + e
  47847. }
  47848. }
  47849. ,
  47850. t.prototype.getAxis = function() {
  47851. return this._axis
  47852. }
  47853. ,
  47854. t.prototype.getBaseAxis = function() {
  47855. return this._axis
  47856. }
  47857. ,
  47858. t.prototype.getAxes = function() {
  47859. return [this._axis]
  47860. }
  47861. ,
  47862. t.prototype.getTooltipAxes = function() {
  47863. return {
  47864. baseAxes: [this.getAxis()],
  47865. otherAxes: []
  47866. }
  47867. }
  47868. ,
  47869. t.prototype.containPoint = function(t) {
  47870. var e = this.getRect()
  47871. , n = this.getAxis();
  47872. 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
  47873. }
  47874. ,
  47875. t.prototype.pointToData = function(t) {
  47876. var e = this.getAxis();
  47877. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))]
  47878. }
  47879. ,
  47880. t.prototype.dataToPoint = function(t) {
  47881. var e = this.getAxis()
  47882. , n = this.getRect()
  47883. , i = []
  47884. , r = "horizontal" === e.orient ? 0 : 1;
  47885. return t instanceof Array && (t = t[0]),
  47886. i[r] = e.toGlobalCoord(e.dataToCoord(+t)),
  47887. i[1 - r] = 0 === r ? n.y + n.height / 2 : n.x + n.width / 2,
  47888. i
  47889. }
  47890. ,
  47891. t.prototype.convertToPixel = function(t, e, n) {
  47892. return AE(e) === this ? this.dataToPoint(n) : null
  47893. }
  47894. ,
  47895. t.prototype.convertFromPixel = function(t, e, n) {
  47896. return AE(e) === this ? this.pointToData(n) : null
  47897. }
  47898. ,
  47899. t
  47900. }();
  47901. function AE(t) {
  47902. var e = t.seriesModel
  47903. , n = t.singleAxisModel;
  47904. return n && n.coordinateSystem || e && e.coordinateSystem
  47905. }
  47906. var kE = {
  47907. create: function(t, e) {
  47908. var n = [];
  47909. return t.eachComponent("singleAxis", (function(i, r) {
  47910. var o = new DE(i,t,e);
  47911. o.name = "single_" + r,
  47912. o.resize(i, e),
  47913. i.coordinateSystem = o,
  47914. n.push(o)
  47915. }
  47916. )),
  47917. t.eachSeries((function(t) {
  47918. if ("singleAxis" === t.get("coordinateSystem")) {
  47919. var e = t.getReferringComponents("singleAxis", Wo).models[0];
  47920. t.coordinateSystem = e && e.coordinateSystem
  47921. }
  47922. }
  47923. )),
  47924. n
  47925. },
  47926. dimensions: CE
  47927. }
  47928. , LE = ["x", "y"]
  47929. , PE = ["width", "height"]
  47930. , OE = function(t) {
  47931. function e() {
  47932. return null !== t && t.apply(this, arguments) || this
  47933. }
  47934. return n(e, t),
  47935. e.prototype.makeElOption = function(t, e, n, i, r) {
  47936. var o = n.axis
  47937. , a = o.coordinateSystem
  47938. , s = EE(a, 1 - NE(o))
  47939. , l = a.dataToPoint(e)[0]
  47940. , u = i.get("type");
  47941. if (u && "none" !== u) {
  47942. var h = fN(i)
  47943. , c = RE[u](o, l, s);
  47944. c.style = h,
  47945. t.graphicKey = c.type,
  47946. t.pointer = c
  47947. }
  47948. mN(e, t, _E(n), n, i, r)
  47949. }
  47950. ,
  47951. e.prototype.getHandleTransform = function(t, e, n) {
  47952. var i = _E(e, {
  47953. labelInside: !1
  47954. });
  47955. i.labelMargin = n.get(["handle", "margin"]);
  47956. var r = vN(e.axis, t, i);
  47957. return {
  47958. x: r[0],
  47959. y: r[1],
  47960. rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
  47961. }
  47962. }
  47963. ,
  47964. e.prototype.updateHandleTransform = function(t, e, n, i) {
  47965. var r = n.axis
  47966. , o = r.coordinateSystem
  47967. , a = NE(r)
  47968. , s = EE(o, a)
  47969. , l = [t.x, t.y];
  47970. l[a] += e[a],
  47971. l[a] = Math.min(s[1], l[a]),
  47972. l[a] = Math.max(s[0], l[a]);
  47973. var u = EE(o, 1 - a)
  47974. , h = (u[1] + u[0]) / 2
  47975. , c = [h, h];
  47976. return c[a] = l[a],
  47977. {
  47978. x: l[0],
  47979. y: l[1],
  47980. rotation: t.rotation,
  47981. cursorPoint: c,
  47982. tooltipOption: {
  47983. verticalAlign: "middle"
  47984. }
  47985. }
  47986. }
  47987. ,
  47988. e
  47989. }(lN)
  47990. , RE = {
  47991. line: function(t, e, n) {
  47992. return {
  47993. type: "Line",
  47994. subPixelOptimize: !0,
  47995. shape: xN([e, n[0]], [e, n[1]], NE(t))
  47996. }
  47997. },
  47998. shadow: function(t, e, n) {
  47999. var i = t.getBandWidth()
  48000. , r = n[1] - n[0];
  48001. return {
  48002. type: "Rect",
  48003. shape: _N([e - i / 2, n[0]], [i, r], NE(t))
  48004. }
  48005. }
  48006. };
  48007. function NE(t) {
  48008. return t.isHorizontal() ? 0 : 1
  48009. }
  48010. function EE(t, e) {
  48011. var n = t.getRect();
  48012. return [n[LE[e]], n[LE[e]] + n[PE[e]]]
  48013. }
  48014. var zE = function(t) {
  48015. function e() {
  48016. var n = null !== t && t.apply(this, arguments) || this;
  48017. return n.type = e.type,
  48018. n
  48019. }
  48020. return n(e, t),
  48021. e.type = "single",
  48022. e
  48023. }(Ag);
  48024. var VE = function(t) {
  48025. function e() {
  48026. var n = null !== t && t.apply(this, arguments) || this;
  48027. return n.type = e.type,
  48028. n
  48029. }
  48030. return n(e, t),
  48031. e.prototype.init = function(e, n, i) {
  48032. var r = Rp(e);
  48033. t.prototype.init.apply(this, arguments),
  48034. BE(e, r)
  48035. }
  48036. ,
  48037. e.prototype.mergeOption = function(e) {
  48038. t.prototype.mergeOption.apply(this, arguments),
  48039. BE(this.option, e)
  48040. }
  48041. ,
  48042. e.prototype.getCellSize = function() {
  48043. return this.option.cellSize
  48044. }
  48045. ,
  48046. e.type = "calendar",
  48047. e.defaultOption = {
  48048. z: 2,
  48049. left: 80,
  48050. top: 60,
  48051. cellSize: 20,
  48052. orient: "horizontal",
  48053. splitLine: {
  48054. show: !0,
  48055. lineStyle: {
  48056. color: "#000",
  48057. width: 1,
  48058. type: "solid"
  48059. }
  48060. },
  48061. itemStyle: {
  48062. color: "#fff",
  48063. borderWidth: 1,
  48064. borderColor: "#ccc"
  48065. },
  48066. dayLabel: {
  48067. show: !0,
  48068. firstDay: 0,
  48069. position: "start",
  48070. margin: "50%",
  48071. color: "#000"
  48072. },
  48073. monthLabel: {
  48074. show: !0,
  48075. position: "start",
  48076. margin: 5,
  48077. align: "center",
  48078. formatter: null,
  48079. color: "#000"
  48080. },
  48081. yearLabel: {
  48082. show: !0,
  48083. position: null,
  48084. margin: 30,
  48085. formatter: null,
  48086. color: "#ccc",
  48087. fontFamily: "sans-serif",
  48088. fontWeight: "bolder",
  48089. fontSize: 20
  48090. }
  48091. },
  48092. e
  48093. }(zp);
  48094. function BE(t, e) {
  48095. var n, i = t.cellSize;
  48096. 1 === (n = Y(i) ? i : t.cellSize = [i, i]).length && (n[1] = n[0]);
  48097. var r = z([0, 1], (function(t) {
  48098. return function(t, e) {
  48099. return null != t[Cp[e][0]] || null != t[Cp[e][1]] && null != t[Cp[e][2]]
  48100. }(e, t) && (n[t] = "auto"),
  48101. null != n[t] && "auto" !== n[t]
  48102. }
  48103. ));
  48104. Op(t, e, {
  48105. type: "box",
  48106. ignoreSize: r
  48107. })
  48108. }
  48109. var FE = function(t) {
  48110. function e() {
  48111. var n = null !== t && t.apply(this, arguments) || this;
  48112. return n.type = e.type,
  48113. n
  48114. }
  48115. return n(e, t),
  48116. e.prototype.render = function(t, e, n) {
  48117. var i = this.group;
  48118. i.removeAll();
  48119. var r = t.coordinateSystem
  48120. , o = r.getRangeInfo()
  48121. , a = r.getOrient()
  48122. , s = e.getLocaleModel();
  48123. this._renderDayRect(t, o, i),
  48124. this._renderLines(t, o, a, i),
  48125. this._renderYearText(t, o, a, i),
  48126. this._renderMonthText(t, s, a, i),
  48127. this._renderWeekText(t, s, o, a, i)
  48128. }
  48129. ,
  48130. e.prototype._renderDayRect = function(t, e, n) {
  48131. 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) {
  48132. var l = i.dataToRect([s], !1).tl
  48133. , u = new Ws({
  48134. shape: {
  48135. x: l[0],
  48136. y: l[1],
  48137. width: o,
  48138. height: a
  48139. },
  48140. cursor: "default",
  48141. style: r
  48142. });
  48143. n.add(u)
  48144. }
  48145. }
  48146. ,
  48147. e.prototype._renderLines = function(t, e, n, i) {
  48148. var r = this
  48149. , o = t.coordinateSystem
  48150. , a = t.getModel(["splitLine", "lineStyle"]).getLineStyle()
  48151. , s = t.get(["splitLine", "show"])
  48152. , l = a.lineWidth;
  48153. this._tlpoints = [],
  48154. this._blpoints = [],
  48155. this._firstDayOfMonth = [],
  48156. this._firstDayPoints = [];
  48157. for (var u = e.start, h = 0; u.time <= e.end.time; h++) {
  48158. p(u.formatedDate),
  48159. 0 === h && (u = o.getDateInfo(e.start.y + "-" + e.start.m));
  48160. var c = u.date;
  48161. c.setMonth(c.getMonth() + 1),
  48162. u = o.getDateInfo(c)
  48163. }
  48164. function p(e) {
  48165. r._firstDayOfMonth.push(o.getDateInfo(e)),
  48166. r._firstDayPoints.push(o.dataToRect([e], !1).tl);
  48167. var l = r._getLinePointsOfOneWeek(t, e, n);
  48168. r._tlpoints.push(l[0]),
  48169. r._blpoints.push(l[l.length - 1]),
  48170. s && r._drawSplitline(l, a, i)
  48171. }
  48172. p(o.getNextNDay(e.end.time, 1).formatedDate),
  48173. s && this._drawSplitline(r._getEdgesPoints(r._tlpoints, l, n), a, i),
  48174. s && this._drawSplitline(r._getEdgesPoints(r._blpoints, l, n), a, i)
  48175. }
  48176. ,
  48177. e.prototype._getEdgesPoints = function(t, e, n) {
  48178. var i = [t[0].slice(), t[t.length - 1].slice()]
  48179. , r = "horizontal" === n ? 0 : 1;
  48180. return i[0][r] = i[0][r] - e / 2,
  48181. i[1][r] = i[1][r] + e / 2,
  48182. i
  48183. }
  48184. ,
  48185. e.prototype._drawSplitline = function(t, e, n) {
  48186. var i = new Zu({
  48187. z2: 20,
  48188. shape: {
  48189. points: t
  48190. },
  48191. style: e
  48192. });
  48193. n.add(i)
  48194. }
  48195. ,
  48196. e.prototype._getLinePointsOfOneWeek = function(t, e, n) {
  48197. for (var i = t.coordinateSystem, r = i.getDateInfo(e), o = [], a = 0; a < 7; a++) {
  48198. var s = i.getNextNDay(r.time, a)
  48199. , l = i.dataToRect([s.time], !1);
  48200. o[2 * s.day] = l.tl,
  48201. o[2 * s.day + 1] = l["horizontal" === n ? "bl" : "tr"]
  48202. }
  48203. return o
  48204. }
  48205. ,
  48206. e.prototype._formatterLabel = function(t, e) {
  48207. return U(t) && t ? (n = t,
  48208. E(e, (function(t, e) {
  48209. n = n.replace("{" + e + "}", i ? re(t) : t)
  48210. }
  48211. )),
  48212. n) : X(t) ? t(e) : e.nameMap;
  48213. var n, i
  48214. }
  48215. ,
  48216. e.prototype._yearTextPositionControl = function(t, e, n, i, r) {
  48217. var o = e[0]
  48218. , a = e[1]
  48219. , s = ["center", "bottom"];
  48220. "bottom" === i ? (a += r,
  48221. s = ["center", "top"]) : "left" === i ? o -= r : "right" === i ? (o += r,
  48222. s = ["center", "top"]) : a -= r;
  48223. var l = 0;
  48224. return "left" !== i && "right" !== i || (l = Math.PI / 2),
  48225. {
  48226. rotation: l,
  48227. x: o,
  48228. y: a,
  48229. style: {
  48230. align: s[0],
  48231. verticalAlign: s[1]
  48232. }
  48233. }
  48234. }
  48235. ,
  48236. e.prototype._renderYearText = function(t, e, n, i) {
  48237. var r = t.getModel("yearLabel");
  48238. if (r.get("show")) {
  48239. var o = r.get("margin")
  48240. , a = r.get("position");
  48241. a || (a = "horizontal" !== n ? "top" : "left");
  48242. var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]]
  48243. , l = (s[0][0] + s[1][0]) / 2
  48244. , u = (s[0][1] + s[1][1]) / 2
  48245. , h = "horizontal" === n ? 0 : 1
  48246. , c = {
  48247. top: [l, s[h][1]],
  48248. bottom: [l, s[1 - h][1]],
  48249. left: [s[1 - h][0], u],
  48250. right: [s[h][0], u]
  48251. }
  48252. , p = e.start.y;
  48253. +e.end.y > +e.start.y && (p = p + "-" + e.end.y);
  48254. var d = r.get("formatter")
  48255. , f = {
  48256. start: e.start.y,
  48257. end: e.end.y,
  48258. nameMap: p
  48259. }
  48260. , g = this._formatterLabel(d, f)
  48261. , y = new Xs({
  48262. z2: 30,
  48263. style: oc(r, {
  48264. text: g
  48265. }),
  48266. silent: r.get("silent")
  48267. });
  48268. y.attr(this._yearTextPositionControl(y, c[a], n, a, o)),
  48269. i.add(y)
  48270. }
  48271. }
  48272. ,
  48273. e.prototype._monthTextPositionControl = function(t, e, n, i, r) {
  48274. var o = "left"
  48275. , a = "top"
  48276. , s = t[0]
  48277. , l = t[1];
  48278. return "horizontal" === n ? (l += r,
  48279. e && (o = "center"),
  48280. "start" === i && (a = "bottom")) : (s += r,
  48281. e && (a = "middle"),
  48282. "start" === i && (o = "right")),
  48283. {
  48284. x: s,
  48285. y: l,
  48286. align: o,
  48287. verticalAlign: a
  48288. }
  48289. }
  48290. ,
  48291. e.prototype._renderMonthText = function(t, e, n, i) {
  48292. var r = t.getModel("monthLabel");
  48293. if (r.get("show")) {
  48294. var o = r.get("nameMap")
  48295. , a = r.get("margin")
  48296. , s = r.get("position")
  48297. , l = r.get("align")
  48298. , u = [this._tlpoints, this._blpoints];
  48299. o && !U(o) || (o && (e = Vc(o) || e),
  48300. o = e.get(["time", "monthAbbr"]) || []);
  48301. var h = "start" === s ? 0 : 1
  48302. , c = "horizontal" === n ? 0 : 1;
  48303. a = "start" === s ? -a : a;
  48304. for (var p = "center" === l, d = r.get("silent"), f = 0; f < u[h].length - 1; f++) {
  48305. var g = u[h][f].slice()
  48306. , y = this._firstDayOfMonth[f];
  48307. if (p) {
  48308. var v = this._firstDayPoints[f];
  48309. g[c] = (v[c] + u[0][f + 1][c]) / 2
  48310. }
  48311. var m = r.get("formatter")
  48312. , x = o[+y.m - 1]
  48313. , _ = {
  48314. yyyy: y.y,
  48315. yy: (y.y + "").slice(2),
  48316. MM: y.m,
  48317. M: +y.m,
  48318. nameMap: x
  48319. }
  48320. , b = this._formatterLabel(m, _)
  48321. , w = new Xs({
  48322. z2: 30,
  48323. style: A(oc(r, {
  48324. text: b
  48325. }), this._monthTextPositionControl(g, p, n, s, a)),
  48326. silent: d
  48327. });
  48328. i.add(w)
  48329. }
  48330. }
  48331. }
  48332. ,
  48333. e.prototype._weekTextPositionControl = function(t, e, n, i, r) {
  48334. var o = "center"
  48335. , a = "middle"
  48336. , s = t[0]
  48337. , l = t[1]
  48338. , u = "start" === n;
  48339. return "horizontal" === e ? (s = s + i + (u ? 1 : -1) * r[0] / 2,
  48340. o = u ? "right" : "left") : (l = l + i + (u ? 1 : -1) * r[1] / 2,
  48341. a = u ? "bottom" : "top"),
  48342. {
  48343. x: s,
  48344. y: l,
  48345. align: o,
  48346. verticalAlign: a
  48347. }
  48348. }
  48349. ,
  48350. e.prototype._renderWeekText = function(t, e, n, i, r) {
  48351. var o = t.getModel("dayLabel");
  48352. if (o.get("show")) {
  48353. var a = t.coordinateSystem
  48354. , s = o.get("position")
  48355. , l = o.get("nameMap")
  48356. , u = o.get("margin")
  48357. , h = a.getFirstDayOfWeek();
  48358. if (!l || U(l))
  48359. l && (e = Vc(l) || e),
  48360. l = e.get(["time", "dayOfWeekShort"]) || z(e.get(["time", "dayOfWeekAbbr"]), (function(t) {
  48361. return t[0]
  48362. }
  48363. ));
  48364. var c = a.getNextNDay(n.end.time, 7 - n.lweek).time
  48365. , p = [a.getCellWidth(), a.getCellHeight()];
  48366. u = $r(u, Math.min(p[1], p[0])),
  48367. "start" === s && (c = a.getNextNDay(n.start.time, -(7 + n.fweek)).time,
  48368. u = -u);
  48369. for (var d = o.get("silent"), f = 0; f < 7; f++) {
  48370. var g, y = a.getNextNDay(c, f), v = a.dataToRect([y.time], !1).center;
  48371. g = Math.abs((f + h) % 7);
  48372. var m = new Xs({
  48373. z2: 30,
  48374. style: A(oc(o, {
  48375. text: l[g]
  48376. }), this._weekTextPositionControl(v, i, s, u, p)),
  48377. silent: d
  48378. });
  48379. r.add(m)
  48380. }
  48381. }
  48382. }
  48383. ,
  48384. e.type = "calendar",
  48385. e
  48386. }(Ag)
  48387. , GE = 864e5
  48388. , WE = function() {
  48389. function t(e, n, i) {
  48390. this.type = "calendar",
  48391. this.dimensions = t.dimensions,
  48392. this.getDimensionsInfo = t.getDimensionsInfo,
  48393. this._model = e
  48394. }
  48395. return t.getDimensionsInfo = function() {
  48396. return [{
  48397. name: "time",
  48398. type: "time"
  48399. }, "value"]
  48400. }
  48401. ,
  48402. t.prototype.getRangeInfo = function() {
  48403. return this._rangeInfo
  48404. }
  48405. ,
  48406. t.prototype.getModel = function() {
  48407. return this._model
  48408. }
  48409. ,
  48410. t.prototype.getRect = function() {
  48411. return this._rect
  48412. }
  48413. ,
  48414. t.prototype.getCellWidth = function() {
  48415. return this._sw
  48416. }
  48417. ,
  48418. t.prototype.getCellHeight = function() {
  48419. return this._sh
  48420. }
  48421. ,
  48422. t.prototype.getOrient = function() {
  48423. return this._orient
  48424. }
  48425. ,
  48426. t.prototype.getFirstDayOfWeek = function() {
  48427. return this._firstDayOfWeek
  48428. }
  48429. ,
  48430. t.prototype.getDateInfo = function(t) {
  48431. var e = (t = uo(t)).getFullYear()
  48432. , n = t.getMonth() + 1
  48433. , i = n < 10 ? "0" + n : "" + n
  48434. , r = t.getDate()
  48435. , o = r < 10 ? "0" + r : "" + r
  48436. , a = t.getDay();
  48437. return {
  48438. y: e + "",
  48439. m: i,
  48440. d: o,
  48441. day: a = Math.abs((a + 7 - this.getFirstDayOfWeek()) % 7),
  48442. time: t.getTime(),
  48443. formatedDate: e + "-" + i + "-" + o,
  48444. date: t
  48445. }
  48446. }
  48447. ,
  48448. t.prototype.getNextNDay = function(t, e) {
  48449. return 0 === (e = e || 0) || (t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e),
  48450. this.getDateInfo(t)
  48451. }
  48452. ,
  48453. t.prototype.update = function(t, e) {
  48454. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"),
  48455. this._orient = this._model.get("orient"),
  48456. this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0,
  48457. this._rangeInfo = this._getRangeInfo(this._initRangeOption());
  48458. var n = this._rangeInfo.weeks || 1
  48459. , i = ["width", "height"]
  48460. , r = this._model.getCellSize().slice()
  48461. , o = this._model.getBoxLayoutParams()
  48462. , a = "horizontal" === this._orient ? [n, 7] : [7, n];
  48463. E([0, 1], (function(t) {
  48464. u(r, t) && (o[i[t]] = r[t] * a[t])
  48465. }
  48466. ));
  48467. var s = {
  48468. width: e.getWidth(),
  48469. height: e.getHeight()
  48470. }
  48471. , l = this._rect = kp(o, s);
  48472. function u(t, e) {
  48473. return null != t[e] && "auto" !== t[e]
  48474. }
  48475. E([0, 1], (function(t) {
  48476. u(r, t) || (r[t] = l[i[t]] / a[t])
  48477. }
  48478. )),
  48479. this._sw = r[0],
  48480. this._sh = r[1]
  48481. }
  48482. ,
  48483. t.prototype.dataToPoint = function(t, e) {
  48484. Y(t) && (t = t[0]),
  48485. null == e && (e = !0);
  48486. var n = this.getDateInfo(t)
  48487. , i = this._rangeInfo
  48488. , r = n.formatedDate;
  48489. if (e && !(n.time >= i.start.time && n.time < i.end.time + GE))
  48490. return [NaN, NaN];
  48491. var o = n.day
  48492. , a = this._getRangeInfo([i.start.time, r]).nthWeek;
  48493. 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]
  48494. }
  48495. ,
  48496. t.prototype.pointToData = function(t) {
  48497. var e = this.pointToDate(t);
  48498. return e && e.time
  48499. }
  48500. ,
  48501. t.prototype.dataToRect = function(t, e) {
  48502. var n = this.dataToPoint(t, e);
  48503. return {
  48504. contentShape: {
  48505. x: n[0] - (this._sw - this._lineWidth) / 2,
  48506. y: n[1] - (this._sh - this._lineWidth) / 2,
  48507. width: this._sw - this._lineWidth,
  48508. height: this._sh - this._lineWidth
  48509. },
  48510. center: n,
  48511. tl: [n[0] - this._sw / 2, n[1] - this._sh / 2],
  48512. tr: [n[0] + this._sw / 2, n[1] - this._sh / 2],
  48513. br: [n[0] + this._sw / 2, n[1] + this._sh / 2],
  48514. bl: [n[0] - this._sw / 2, n[1] + this._sh / 2]
  48515. }
  48516. }
  48517. ,
  48518. t.prototype.pointToDate = function(t) {
  48519. var e = Math.floor((t[0] - this._rect.x) / this._sw) + 1
  48520. , n = Math.floor((t[1] - this._rect.y) / this._sh) + 1
  48521. , i = this._rangeInfo.range;
  48522. return "vertical" === this._orient ? this._getDateByWeeksAndDay(n, e - 1, i) : this._getDateByWeeksAndDay(e, n - 1, i)
  48523. }
  48524. ,
  48525. t.prototype.convertToPixel = function(t, e, n) {
  48526. var i = HE(e);
  48527. return i === this ? i.dataToPoint(n) : null
  48528. }
  48529. ,
  48530. t.prototype.convertFromPixel = function(t, e, n) {
  48531. var i = HE(e);
  48532. return i === this ? i.pointToData(n) : null
  48533. }
  48534. ,
  48535. t.prototype.containPoint = function(t) {
  48536. return console.warn("Not implemented."),
  48537. !1
  48538. }
  48539. ,
  48540. t.prototype._initRangeOption = function() {
  48541. var t, e = this._model.get("range");
  48542. if (Y(e) && 1 === e.length && (e = e[0]),
  48543. Y(e))
  48544. t = e;
  48545. else {
  48546. var n = e.toString();
  48547. if (/^\d{4}$/.test(n) && (t = [n + "-01-01", n + "-12-31"]),
  48548. /^\d{4}[\/|-]\d{1,2}$/.test(n)) {
  48549. var i = this.getDateInfo(n)
  48550. , r = i.date;
  48551. r.setMonth(r.getMonth() + 1);
  48552. var o = this.getNextNDay(r, -1);
  48553. t = [i.formatedDate, o.formatedDate]
  48554. }
  48555. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n) && (t = [n, n])
  48556. }
  48557. if (!t)
  48558. return e;
  48559. var a = this._getRangeInfo(t);
  48560. return a.start.time > a.end.time && t.reverse(),
  48561. t
  48562. }
  48563. ,
  48564. t.prototype._getRangeInfo = function(t) {
  48565. var e, n = [this.getDateInfo(t[0]), this.getDateInfo(t[1])];
  48566. n[0].time > n[1].time && (e = !0,
  48567. n.reverse());
  48568. var i = Math.floor(n[1].time / GE) - Math.floor(n[0].time / GE) + 1
  48569. , r = new Date(n[0].time)
  48570. , o = r.getDate()
  48571. , a = n[1].date.getDate();
  48572. r.setDate(o + i - 1);
  48573. var s = r.getDate();
  48574. if (s !== a)
  48575. for (var l = r.getTime() - n[1].time > 0 ? 1 : -1; (s = r.getDate()) !== a && (r.getTime() - n[1].time) * l > 0; )
  48576. i -= l,
  48577. r.setDate(s - l);
  48578. var u = Math.floor((i + n[0].day + 6) / 7)
  48579. , h = e ? 1 - u : u - 1;
  48580. return e && n.reverse(),
  48581. {
  48582. range: [n[0].formatedDate, n[1].formatedDate],
  48583. start: n[0],
  48584. end: n[1],
  48585. allDay: i,
  48586. weeks: u,
  48587. nthWeek: h,
  48588. fweek: n[0].day,
  48589. lweek: n[1].day
  48590. }
  48591. }
  48592. ,
  48593. t.prototype._getDateByWeeksAndDay = function(t, e, n) {
  48594. var i = this._getRangeInfo(n);
  48595. if (t > i.weeks || 0 === t && e < i.fweek || t === i.weeks && e > i.lweek)
  48596. return null;
  48597. var r = 7 * (t - 1) - i.fweek + e
  48598. , o = new Date(i.start.time);
  48599. return o.setDate(+i.start.d + r),
  48600. this.getDateInfo(o)
  48601. }
  48602. ,
  48603. t.create = function(e, n) {
  48604. var i = [];
  48605. return e.eachComponent("calendar", (function(r) {
  48606. var o = new t(r,e,n);
  48607. i.push(o),
  48608. r.coordinateSystem = o
  48609. }
  48610. )),
  48611. e.eachSeries((function(t) {
  48612. "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0])
  48613. }
  48614. )),
  48615. i
  48616. }
  48617. ,
  48618. t.dimensions = ["time", "value"],
  48619. t
  48620. }();
  48621. function HE(t) {
  48622. var e = t.calendarModel
  48623. , n = t.seriesModel;
  48624. return e ? e.coordinateSystem : n ? n.coordinateSystem : null
  48625. }
  48626. function YE(t, e) {
  48627. var n;
  48628. return E(e, (function(e) {
  48629. null != t[e] && "auto" !== t[e] && (n = !0)
  48630. }
  48631. )),
  48632. n
  48633. }
  48634. var XE = ["transition", "enterFrom", "leaveTo"]
  48635. , UE = XE.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  48636. function ZE(t, e, n) {
  48637. if (n && (!t[n] && e[n] && (t[n] = {}),
  48638. t = t[n],
  48639. e = e[n]),
  48640. t && e)
  48641. for (var i = n ? XE : UE, r = 0; r < i.length; r++) {
  48642. var o = i[r];
  48643. null == t[o] && null != e[o] && (t[o] = e[o])
  48644. }
  48645. }
  48646. var jE = function(t) {
  48647. function e() {
  48648. var n = null !== t && t.apply(this, arguments) || this;
  48649. return n.type = e.type,
  48650. n.preventAutoZ = !0,
  48651. n
  48652. }
  48653. return n(e, t),
  48654. e.prototype.mergeOption = function(e, n) {
  48655. var i = this.option.elements;
  48656. this.option.elements = null,
  48657. t.prototype.mergeOption.call(this, e, n),
  48658. this.option.elements = i
  48659. }
  48660. ,
  48661. e.prototype.optionUpdated = function(t, e) {
  48662. var n = this.option
  48663. , i = (e ? n : t).elements
  48664. , r = n.elements = e ? [] : n.elements
  48665. , o = [];
  48666. this._flatten(i, o, null);
  48667. var a = Lo(r, o, "normalMerge")
  48668. , s = this._elOptionsToUpdate = [];
  48669. E(a, (function(t, e) {
  48670. var n = t.newOption;
  48671. n && (s.push(n),
  48672. function(t, e) {
  48673. var n = t.existing;
  48674. if (e.id = t.keyInfo.id,
  48675. !e.type && n && (e.type = n.type),
  48676. null == e.parentId) {
  48677. var i = e.parentOption;
  48678. i ? e.parentId = i.id : n && (e.parentId = n.parentId)
  48679. }
  48680. e.parentOption = null
  48681. }(t, n),
  48682. function(t, e, n) {
  48683. var i = A({}, n)
  48684. , r = t[e]
  48685. , o = n.$action || "merge";
  48686. "merge" === o ? r ? (C(r, i, !0),
  48687. Op(r, i, {
  48688. ignoreSize: !0
  48689. }),
  48690. Np(n, r),
  48691. ZE(n, r),
  48692. ZE(n, r, "shape"),
  48693. ZE(n, r, "style"),
  48694. ZE(n, r, "extra"),
  48695. n.clipPath = r.clipPath) : t[e] = i : "replace" === o ? t[e] = i : "remove" === o && r && (t[e] = null)
  48696. }(r, e, n),
  48697. function(t, e) {
  48698. if (t && (t.hv = e.hv = [YE(e, ["left", "right"]), YE(e, ["top", "bottom"])],
  48699. "group" === t.type)) {
  48700. var n = t
  48701. , i = e;
  48702. null == n.width && (n.width = i.width = 0),
  48703. null == n.height && (n.height = i.height = 0)
  48704. }
  48705. }(r[e], n))
  48706. }
  48707. ), this),
  48708. n.elements = B(r, (function(t) {
  48709. return t && delete t.$action,
  48710. null != t
  48711. }
  48712. ))
  48713. }
  48714. ,
  48715. e.prototype._flatten = function(t, e, n) {
  48716. E(t, (function(t) {
  48717. if (t) {
  48718. n && (t.parentOption = n),
  48719. e.push(t);
  48720. var i = t.children;
  48721. i && i.length && this._flatten(i, e, t),
  48722. delete t.children
  48723. }
  48724. }
  48725. ), this)
  48726. }
  48727. ,
  48728. e.prototype.useElOptionsToUpdate = function() {
  48729. var t = this._elOptionsToUpdate;
  48730. return this._elOptionsToUpdate = null,
  48731. t
  48732. }
  48733. ,
  48734. e.type = "graphic",
  48735. e.defaultOption = {
  48736. elements: []
  48737. },
  48738. e
  48739. }(zp)
  48740. , qE = {
  48741. path: null,
  48742. compoundPath: null,
  48743. group: Br,
  48744. image: Ns,
  48745. text: Xs
  48746. }
  48747. , KE = Vo()
  48748. , $E = function(t) {
  48749. function e() {
  48750. var n = null !== t && t.apply(this, arguments) || this;
  48751. return n.type = e.type,
  48752. n
  48753. }
  48754. return n(e, t),
  48755. e.prototype.init = function() {
  48756. this._elMap = yt()
  48757. }
  48758. ,
  48759. e.prototype.render = function(t, e, n) {
  48760. t !== this._lastGraphicModel && this._clear(),
  48761. this._lastGraphicModel = t,
  48762. this._updateElements(t),
  48763. this._relocate(t, n)
  48764. }
  48765. ,
  48766. e.prototype._updateElements = function(t) {
  48767. var e = t.useElOptionsToUpdate();
  48768. if (e) {
  48769. var n = this._elMap
  48770. , i = this.group
  48771. , r = t.get("z")
  48772. , o = t.get("zlevel");
  48773. E(e, (function(e) {
  48774. var a = Ro(e.id, null)
  48775. , s = null != a ? n.get(a) : null
  48776. , l = Ro(e.parentId, null)
  48777. , u = null != l ? n.get(l) : i
  48778. , h = e.type
  48779. , c = e.style;
  48780. "text" === h && c && e.hv && e.hv[1] && (c.textVerticalAlign = c.textBaseline = c.verticalAlign = c.align = null);
  48781. var p = e.textContent
  48782. , d = e.textConfig;
  48783. if (c && oR(c, h, !!d, !!p)) {
  48784. var f = aR(c, h, !0);
  48785. !d && f.textConfig && (d = e.textConfig = f.textConfig),
  48786. !p && f.textContent && (p = f.textContent)
  48787. }
  48788. var g = function(t) {
  48789. return t = A({}, t),
  48790. E(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(Tp), (function(e) {
  48791. delete t[e]
  48792. }
  48793. )),
  48794. t
  48795. }(e);
  48796. var y = e.$action || "merge"
  48797. , v = "merge" === y
  48798. , m = "replace" === y;
  48799. if (v) {
  48800. var x = s;
  48801. (T = !s) ? x = QE(a, u, e.type, n) : (x && (KE(x).isNew = !1),
  48802. CR(x)),
  48803. x && (gR(x, g, t, {
  48804. isInit: T
  48805. }),
  48806. ez(x, e, r, o))
  48807. } else if (m) {
  48808. tz(s, e, n, t);
  48809. var _ = QE(a, u, e.type, n);
  48810. _ && (gR(_, g, t, {
  48811. isInit: !0
  48812. }),
  48813. ez(_, e, r, o))
  48814. } else
  48815. "remove" === y && (yR(s, e),
  48816. tz(s, e, n, t));
  48817. var b = n.get(a);
  48818. if (b && p)
  48819. if (v) {
  48820. var w = b.getTextContent();
  48821. w ? w.attr(p) : b.setTextContent(new Xs(p))
  48822. } else
  48823. m && b.setTextContent(new Xs(p));
  48824. if (b) {
  48825. var S = e.clipPath;
  48826. if (S) {
  48827. var M = S.type
  48828. , I = void 0
  48829. , T = !1;
  48830. if (v) {
  48831. var C = b.getClipPath();
  48832. I = (T = !C || KE(C).type !== M) ? JE(M) : C
  48833. } else
  48834. m && (T = !0,
  48835. I = JE(M));
  48836. b.setClipPath(I),
  48837. gR(I, S, t, {
  48838. isInit: T
  48839. }),
  48840. DR(I, S.keyframeAnimation, t)
  48841. }
  48842. var D = KE(b);
  48843. b.setTextConfig(d),
  48844. D.option = e,
  48845. function(t, e, n) {
  48846. var i = rl(t).eventData;
  48847. t.silent || t.ignore || i || (i = rl(t).eventData = {
  48848. componentType: "graphic",
  48849. componentIndex: e.componentIndex,
  48850. name: t.name
  48851. });
  48852. i && (i.info = n.info)
  48853. }(b, t, e),
  48854. Kh({
  48855. el: b,
  48856. componentModel: t,
  48857. itemName: b.name,
  48858. itemTooltipOption: e.tooltip
  48859. }),
  48860. DR(b, e.keyframeAnimation, t)
  48861. }
  48862. }
  48863. ))
  48864. }
  48865. }
  48866. ,
  48867. e.prototype._relocate = function(t, e) {
  48868. 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++) {
  48869. if ((f = null != (d = Ro((p = n[l]).id, null)) ? r.get(d) : null) && f.isGroup) {
  48870. var u = (g = f.parent) === i
  48871. , h = KE(f)
  48872. , c = KE(g);
  48873. h.width = $r(h.option.width, u ? o : c.width) || 0,
  48874. h.height = $r(h.option.height, u ? a : c.height) || 0
  48875. }
  48876. }
  48877. for (l = n.length - 1; l >= 0; l--) {
  48878. var p, d, f;
  48879. if (f = null != (d = Ro((p = n[l]).id, null)) ? r.get(d) : null) {
  48880. var g = f.parent
  48881. , y = (c = KE(g),
  48882. {})
  48883. , v = Lp(f, p, g === i ? {
  48884. width: o,
  48885. height: a
  48886. } : {
  48887. width: c.width,
  48888. height: c.height
  48889. }, null, {
  48890. hv: p.hv,
  48891. boundingMode: p.bounding
  48892. }, y);
  48893. if (!KE(f).isNew && v) {
  48894. for (var m = p.transition, x = {}, _ = 0; _ < s.length; _++) {
  48895. var b = s[_]
  48896. , w = y[b];
  48897. m && (mR(m) || P(m, b) >= 0) ? x[b] = w : f[b] = w
  48898. }
  48899. vh(f, x, t, 0)
  48900. } else
  48901. f.attr(y)
  48902. }
  48903. }
  48904. }
  48905. ,
  48906. e.prototype._clear = function() {
  48907. var t = this
  48908. , e = this._elMap;
  48909. e.each((function(n) {
  48910. tz(n, KE(n).option, e, t._lastGraphicModel)
  48911. }
  48912. )),
  48913. this._elMap = yt()
  48914. }
  48915. ,
  48916. e.prototype.dispose = function() {
  48917. this._clear()
  48918. }
  48919. ,
  48920. e.type = "graphic",
  48921. e
  48922. }(Ag);
  48923. function JE(t) {
  48924. var e = _t(qE, t) ? qE[t] : Lh(t);
  48925. var n = new e({});
  48926. return KE(n).type = t,
  48927. n
  48928. }
  48929. function QE(t, e, n, i) {
  48930. var r = JE(n);
  48931. return e.add(r),
  48932. i.set(t, r),
  48933. KE(r).id = t,
  48934. KE(r).isNew = !0,
  48935. r
  48936. }
  48937. function tz(t, e, n, i) {
  48938. t && t.parent && ("group" === t.type && t.traverse((function(t) {
  48939. tz(t, e, n, i)
  48940. }
  48941. )),
  48942. vR(t, e, i),
  48943. n.removeKey(KE(t).id))
  48944. }
  48945. function ez(t, e, n, i) {
  48946. t.isGroup || E([["cursor", Da.prototype.cursor], ["zlevel", i || 0], ["z", n || 0], ["z2", 0]], (function(n) {
  48947. var i = n[0];
  48948. _t(e, i) ? t[i] = rt(e[i], n[1]) : null == t[i] && (t[i] = n[1])
  48949. }
  48950. )),
  48951. E(G(e), (function(n) {
  48952. if (0 === n.indexOf("on")) {
  48953. var i = e[n];
  48954. t[n] = X(i) ? i : null
  48955. }
  48956. }
  48957. )),
  48958. _t(e, "draggable") && (t.draggable = e.draggable),
  48959. null != e.name && (t.name = e.name),
  48960. null != e.id && (t.id = e.id)
  48961. }
  48962. var nz = ["x", "y", "radius", "angle", "single"]
  48963. , iz = ["cartesian2d", "polar", "singleAxis"];
  48964. function rz(t) {
  48965. return t + "Axis"
  48966. }
  48967. function oz(t, e) {
  48968. var n, i = yt(), r = [], o = yt();
  48969. t.eachComponent({
  48970. mainType: "dataZoom",
  48971. query: e
  48972. }, (function(t) {
  48973. o.get(t.uid) || s(t)
  48974. }
  48975. ));
  48976. do {
  48977. n = !1,
  48978. t.eachComponent("dataZoom", a)
  48979. } while (n);
  48980. function a(t) {
  48981. !o.get(t.uid) && function(t) {
  48982. var e = !1;
  48983. return t.eachTargetAxis((function(t, n) {
  48984. var r = i.get(t);
  48985. r && r[n] && (e = !0)
  48986. }
  48987. )),
  48988. e
  48989. }(t) && (s(t),
  48990. n = !0)
  48991. }
  48992. function s(t) {
  48993. o.set(t.uid, !0),
  48994. r.push(t),
  48995. t.eachTargetAxis((function(t, e) {
  48996. (i.get(t) || i.set(t, []))[e] = !0
  48997. }
  48998. ))
  48999. }
  49000. return r
  49001. }
  49002. function az(t) {
  49003. var e = t.ecModel
  49004. , n = {
  49005. infoList: [],
  49006. infoMap: yt()
  49007. };
  49008. return t.eachTargetAxis((function(t, i) {
  49009. var r = e.getComponent(rz(t), i);
  49010. if (r) {
  49011. var o = r.getCoordSysModel();
  49012. if (o) {
  49013. var a = o.uid
  49014. , s = n.infoMap.get(a);
  49015. s || (s = {
  49016. model: o,
  49017. axisModels: []
  49018. },
  49019. n.infoList.push(s),
  49020. n.infoMap.set(a, s)),
  49021. s.axisModels.push(r)
  49022. }
  49023. }
  49024. }
  49025. )),
  49026. n
  49027. }
  49028. var sz = function() {
  49029. function t() {
  49030. this.indexList = [],
  49031. this.indexMap = []
  49032. }
  49033. return t.prototype.add = function(t) {
  49034. this.indexMap[t] || (this.indexList.push(t),
  49035. this.indexMap[t] = !0)
  49036. }
  49037. ,
  49038. t
  49039. }()
  49040. , lz = function(t) {
  49041. function e() {
  49042. var n = null !== t && t.apply(this, arguments) || this;
  49043. return n.type = e.type,
  49044. n._autoThrottle = !0,
  49045. n._noTarget = !0,
  49046. n._rangePropMode = ["percent", "percent"],
  49047. n
  49048. }
  49049. return n(e, t),
  49050. e.prototype.init = function(t, e, n) {
  49051. var i = uz(t);
  49052. this.settledOption = i,
  49053. this.mergeDefaultAndTheme(t, n),
  49054. this._doInit(i)
  49055. }
  49056. ,
  49057. e.prototype.mergeOption = function(t) {
  49058. var e = uz(t);
  49059. C(this.option, t, !0),
  49060. C(this.settledOption, e, !0),
  49061. this._doInit(e)
  49062. }
  49063. ,
  49064. e.prototype._doInit = function(t) {
  49065. var e = this.option;
  49066. this._setDefaultThrottle(t),
  49067. this._updateRangeUse(t);
  49068. var n = this.settledOption;
  49069. E([["start", "startValue"], ["end", "endValue"]], (function(t, i) {
  49070. "value" === this._rangePropMode[i] && (e[t[0]] = n[t[0]] = null)
  49071. }
  49072. ), this),
  49073. this._resetTarget()
  49074. }
  49075. ,
  49076. e.prototype._resetTarget = function() {
  49077. var t = this.get("orient", !0)
  49078. , e = this._targetAxisInfoMap = yt();
  49079. this._fillSpecifiedTargetAxis(e) ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal",
  49080. this._fillAutoTargetAxisByOrient(e, this._orient)),
  49081. this._noTarget = !0,
  49082. e.each((function(t) {
  49083. t.indexList.length && (this._noTarget = !1)
  49084. }
  49085. ), this)
  49086. }
  49087. ,
  49088. e.prototype._fillSpecifiedTargetAxis = function(t) {
  49089. var e = !1;
  49090. return E(nz, (function(n) {
  49091. var i = this.getReferringComponents(rz(n), Ho);
  49092. if (i.specified) {
  49093. e = !0;
  49094. var r = new sz;
  49095. E(i.models, (function(t) {
  49096. r.add(t.componentIndex)
  49097. }
  49098. )),
  49099. t.set(n, r)
  49100. }
  49101. }
  49102. ), this),
  49103. e
  49104. }
  49105. ,
  49106. e.prototype._fillAutoTargetAxisByOrient = function(t, e) {
  49107. var n = this.ecModel
  49108. , i = !0;
  49109. if (i) {
  49110. var r = "vertical" === e ? "y" : "x";
  49111. o(n.findComponents({
  49112. mainType: r + "Axis"
  49113. }), r)
  49114. }
  49115. i && o(n.findComponents({
  49116. mainType: "singleAxis",
  49117. filter: function(t) {
  49118. return t.get("orient", !0) === e
  49119. }
  49120. }), "single");
  49121. function o(e, n) {
  49122. var r = e[0];
  49123. if (r) {
  49124. var o = new sz;
  49125. if (o.add(r.componentIndex),
  49126. t.set(n, o),
  49127. i = !1,
  49128. "x" === n || "y" === n) {
  49129. var a = r.getReferringComponents("grid", Wo).models[0];
  49130. a && E(e, (function(t) {
  49131. r.componentIndex !== t.componentIndex && a === t.getReferringComponents("grid", Wo).models[0] && o.add(t.componentIndex)
  49132. }
  49133. ))
  49134. }
  49135. }
  49136. }
  49137. i && E(nz, (function(e) {
  49138. if (i) {
  49139. var r = n.findComponents({
  49140. mainType: rz(e),
  49141. filter: function(t) {
  49142. return "category" === t.get("type", !0)
  49143. }
  49144. });
  49145. if (r[0]) {
  49146. var o = new sz;
  49147. o.add(r[0].componentIndex),
  49148. t.set(e, o),
  49149. i = !1
  49150. }
  49151. }
  49152. }
  49153. ), this)
  49154. }
  49155. ,
  49156. e.prototype._makeAutoOrientByTargetAxis = function() {
  49157. var t;
  49158. return this.eachTargetAxis((function(e) {
  49159. !t && (t = e)
  49160. }
  49161. ), this),
  49162. "y" === t ? "vertical" : "horizontal"
  49163. }
  49164. ,
  49165. e.prototype._setDefaultThrottle = function(t) {
  49166. if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1),
  49167. this._autoThrottle) {
  49168. var e = this.ecModel.option;
  49169. this.option.throttle = e.animation && e.animationDurationUpdate > 0 ? 100 : 20
  49170. }
  49171. }
  49172. ,
  49173. e.prototype._updateRangeUse = function(t) {
  49174. var e = this._rangePropMode
  49175. , n = this.get("rangeMode");
  49176. E([["start", "startValue"], ["end", "endValue"]], (function(i, r) {
  49177. var o = null != t[i[0]]
  49178. , a = null != t[i[1]];
  49179. o && !a ? e[r] = "percent" : !o && a ? e[r] = "value" : n ? e[r] = n[r] : o && (e[r] = "percent")
  49180. }
  49181. ))
  49182. }
  49183. ,
  49184. e.prototype.noTarget = function() {
  49185. return this._noTarget
  49186. }
  49187. ,
  49188. e.prototype.getFirstTargetAxisModel = function() {
  49189. var t;
  49190. return this.eachTargetAxis((function(e, n) {
  49191. null == t && (t = this.ecModel.getComponent(rz(e), n))
  49192. }
  49193. ), this),
  49194. t
  49195. }
  49196. ,
  49197. e.prototype.eachTargetAxis = function(t, e) {
  49198. this._targetAxisInfoMap.each((function(n, i) {
  49199. E(n.indexList, (function(n) {
  49200. t.call(e, i, n)
  49201. }
  49202. ))
  49203. }
  49204. ))
  49205. }
  49206. ,
  49207. e.prototype.getAxisProxy = function(t, e) {
  49208. var n = this.getAxisModel(t, e);
  49209. if (n)
  49210. return n.__dzAxisProxy
  49211. }
  49212. ,
  49213. e.prototype.getAxisModel = function(t, e) {
  49214. var n = this._targetAxisInfoMap.get(t);
  49215. if (n && n.indexMap[e])
  49216. return this.ecModel.getComponent(rz(t), e)
  49217. }
  49218. ,
  49219. e.prototype.setRawRange = function(t) {
  49220. var e = this.option
  49221. , n = this.settledOption;
  49222. E([["start", "startValue"], ["end", "endValue"]], (function(i) {
  49223. null == t[i[0]] && null == t[i[1]] || (e[i[0]] = n[i[0]] = t[i[0]],
  49224. e[i[1]] = n[i[1]] = t[i[1]])
  49225. }
  49226. ), this),
  49227. this._updateRangeUse(t)
  49228. }
  49229. ,
  49230. e.prototype.setCalculatedRange = function(t) {
  49231. var e = this.option;
  49232. E(["start", "startValue", "end", "endValue"], (function(n) {
  49233. e[n] = t[n]
  49234. }
  49235. ))
  49236. }
  49237. ,
  49238. e.prototype.getPercentRange = function() {
  49239. var t = this.findRepresentativeAxisProxy();
  49240. if (t)
  49241. return t.getDataPercentWindow()
  49242. }
  49243. ,
  49244. e.prototype.getValueRange = function(t, e) {
  49245. if (null != t || null != e)
  49246. return this.getAxisProxy(t, e).getDataValueWindow();
  49247. var n = this.findRepresentativeAxisProxy();
  49248. return n ? n.getDataValueWindow() : void 0
  49249. }
  49250. ,
  49251. e.prototype.findRepresentativeAxisProxy = function(t) {
  49252. if (t)
  49253. return t.__dzAxisProxy;
  49254. for (var e, n = this._targetAxisInfoMap.keys(), i = 0; i < n.length; i++)
  49255. for (var r = n[i], o = this._targetAxisInfoMap.get(r), a = 0; a < o.indexList.length; a++) {
  49256. var s = this.getAxisProxy(r, o.indexList[a]);
  49257. if (s.hostedBy(this))
  49258. return s;
  49259. e || (e = s)
  49260. }
  49261. return e
  49262. }
  49263. ,
  49264. e.prototype.getRangePropMode = function() {
  49265. return this._rangePropMode.slice()
  49266. }
  49267. ,
  49268. e.prototype.getOrient = function() {
  49269. return this._orient
  49270. }
  49271. ,
  49272. e.type = "dataZoom",
  49273. e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"],
  49274. e.defaultOption = {
  49275. z: 4,
  49276. filterMode: "filter",
  49277. start: 0,
  49278. end: 100
  49279. },
  49280. e
  49281. }(zp);
  49282. function uz(t) {
  49283. var e = {};
  49284. return E(["start", "end", "startValue", "endValue", "throttle"], (function(n) {
  49285. t.hasOwnProperty(n) && (e[n] = t[n])
  49286. }
  49287. )),
  49288. e
  49289. }
  49290. var hz = function(t) {
  49291. function e() {
  49292. var n = null !== t && t.apply(this, arguments) || this;
  49293. return n.type = e.type,
  49294. n
  49295. }
  49296. return n(e, t),
  49297. e.type = "dataZoom.select",
  49298. e
  49299. }(lz)
  49300. , cz = function(t) {
  49301. function e() {
  49302. var n = null !== t && t.apply(this, arguments) || this;
  49303. return n.type = e.type,
  49304. n
  49305. }
  49306. return n(e, t),
  49307. e.prototype.render = function(t, e, n, i) {
  49308. this.dataZoomModel = t,
  49309. this.ecModel = e,
  49310. this.api = n
  49311. }
  49312. ,
  49313. e.type = "dataZoom",
  49314. e
  49315. }(Ag)
  49316. , pz = function(t) {
  49317. function e() {
  49318. var n = null !== t && t.apply(this, arguments) || this;
  49319. return n.type = e.type,
  49320. n
  49321. }
  49322. return n(e, t),
  49323. e.type = "dataZoom.select",
  49324. e
  49325. }(cz)
  49326. , dz = E
  49327. , fz = Qr
  49328. , gz = function() {
  49329. function t(t, e, n, i) {
  49330. this._dimName = t,
  49331. this._axisIndex = e,
  49332. this.ecModel = i,
  49333. this._dataZoomModel = n
  49334. }
  49335. return t.prototype.hostedBy = function(t) {
  49336. return this._dataZoomModel === t
  49337. }
  49338. ,
  49339. t.prototype.getDataValueWindow = function() {
  49340. return this._valueWindow.slice()
  49341. }
  49342. ,
  49343. t.prototype.getDataPercentWindow = function() {
  49344. return this._percentWindow.slice()
  49345. }
  49346. ,
  49347. t.prototype.getTargetSeriesModels = function() {
  49348. var t = [];
  49349. return this.ecModel.eachSeries((function(e) {
  49350. if (function(t) {
  49351. var e = t.get("coordinateSystem");
  49352. return P(iz, e) >= 0
  49353. }(e)) {
  49354. var n = rz(this._dimName)
  49355. , i = e.getReferringComponents(n, Wo).models[0];
  49356. i && this._axisIndex === i.componentIndex && t.push(e)
  49357. }
  49358. }
  49359. ), this),
  49360. t
  49361. }
  49362. ,
  49363. t.prototype.getAxisModel = function() {
  49364. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
  49365. }
  49366. ,
  49367. t.prototype.getMinMaxSpan = function() {
  49368. return T(this._minMaxSpan)
  49369. }
  49370. ,
  49371. t.prototype.calculateDataWindow = function(t) {
  49372. var e, n = this._dataExtent, i = this.getAxisModel().axis.scale, r = this._dataZoomModel.getRangePropMode(), o = [0, 100], a = [], s = [];
  49373. dz(["start", "end"], (function(l, u) {
  49374. var h = t[l]
  49375. , c = t[l + "Value"];
  49376. "percent" === r[u] ? (null == h && (h = o[u]),
  49377. c = i.parse(Kr(h, o, n))) : (e = !0,
  49378. h = Kr(c = null == c ? n[u] : i.parse(c), n, o)),
  49379. s[u] = null == c || isNaN(c) ? n[u] : c,
  49380. a[u] = null == h || isNaN(h) ? o[u] : h
  49381. }
  49382. )),
  49383. fz(s),
  49384. fz(a);
  49385. var l = this._minMaxSpan;
  49386. function u(t, e, n, r, o) {
  49387. var a = o ? "Span" : "ValueSpan";
  49388. zk(0, t, n, "all", l["min" + a], l["max" + a]);
  49389. for (var s = 0; s < 2; s++)
  49390. e[s] = Kr(t[s], n, r, !0),
  49391. o && (e[s] = i.parse(e[s]))
  49392. }
  49393. return e ? u(s, a, n, o, !1) : u(a, s, o, n, !0),
  49394. {
  49395. valueWindow: s,
  49396. percentWindow: a
  49397. }
  49398. }
  49399. ,
  49400. t.prototype.reset = function(t) {
  49401. if (t === this._dataZoomModel) {
  49402. var e = this.getTargetSeriesModels();
  49403. this._dataExtent = function(t, e, n) {
  49404. var i = [1 / 0, -1 / 0];
  49405. dz(n, (function(t) {
  49406. !function(t, e, n) {
  49407. e && E(C_(e, n), (function(n) {
  49408. var i = e.getApproximateExtent(n);
  49409. i[0] < t[0] && (t[0] = i[0]),
  49410. i[1] > t[1] && (t[1] = i[1])
  49411. }
  49412. ))
  49413. }(i, t.getData(), e)
  49414. }
  49415. ));
  49416. var r = t.getAxisModel()
  49417. , o = v_(r.axis.scale, r, i).calculate();
  49418. return [o.min, o.max]
  49419. }(this, this._dimName, e),
  49420. this._updateMinMaxSpan();
  49421. var n = this.calculateDataWindow(t.settledOption);
  49422. this._valueWindow = n.valueWindow,
  49423. this._percentWindow = n.percentWindow,
  49424. this._setAxisModel()
  49425. }
  49426. }
  49427. ,
  49428. t.prototype.filterData = function(t, e) {
  49429. if (t === this._dataZoomModel) {
  49430. var n = this._dimName
  49431. , i = this.getTargetSeriesModels()
  49432. , r = t.get("filterMode")
  49433. , o = this._valueWindow;
  49434. "none" !== r && dz(i, (function(t) {
  49435. var e = t.getData()
  49436. , i = e.mapDimensionsAll(n);
  49437. if (i.length) {
  49438. if ("weakFilter" === r) {
  49439. var a = e.getStore()
  49440. , s = z(i, (function(t) {
  49441. return e.getDimensionIndex(t)
  49442. }
  49443. ), e);
  49444. e.filterSelf((function(t) {
  49445. for (var e, n, r, l = 0; l < i.length; l++) {
  49446. var u = a.get(s[l], t)
  49447. , h = !isNaN(u)
  49448. , c = u < o[0]
  49449. , p = u > o[1];
  49450. if (h && !c && !p)
  49451. return !0;
  49452. h && (r = !0),
  49453. c && (e = !0),
  49454. p && (n = !0)
  49455. }
  49456. return r && e && n
  49457. }
  49458. ))
  49459. } else
  49460. dz(i, (function(n) {
  49461. if ("empty" === r)
  49462. t.setData(e = e.map(n, (function(t) {
  49463. return function(t) {
  49464. return t >= o[0] && t <= o[1]
  49465. }(t) ? t : NaN
  49466. }
  49467. )));
  49468. else {
  49469. var i = {};
  49470. i[n] = o,
  49471. e.selectRange(i)
  49472. }
  49473. }
  49474. ));
  49475. dz(i, (function(t) {
  49476. e.setApproximateExtent(o, t)
  49477. }
  49478. ))
  49479. }
  49480. }
  49481. ))
  49482. }
  49483. }
  49484. ,
  49485. t.prototype._updateMinMaxSpan = function() {
  49486. var t = this._minMaxSpan = {}
  49487. , e = this._dataZoomModel
  49488. , n = this._dataExtent;
  49489. dz(["min", "max"], (function(i) {
  49490. var r = e.get(i + "Span")
  49491. , o = e.get(i + "ValueSpan");
  49492. null != o && (o = this.getAxisModel().axis.scale.parse(o)),
  49493. null != o ? r = Kr(n[0] + o, n, [0, 100], !0) : null != r && (o = Kr(r, [0, 100], n, !0) - n[0]),
  49494. t[i + "Span"] = r,
  49495. t[i + "ValueSpan"] = o
  49496. }
  49497. ), this)
  49498. }
  49499. ,
  49500. t.prototype._setAxisModel = function() {
  49501. var t = this.getAxisModel()
  49502. , e = this._percentWindow
  49503. , n = this._valueWindow;
  49504. if (e) {
  49505. var i = no(n, [0, 500]);
  49506. i = Math.min(i, 20);
  49507. var r = t.axis.scale.rawExtentInfo;
  49508. 0 !== e[0] && r.setDeterminedMinMax("min", +n[0].toFixed(i)),
  49509. 100 !== e[1] && r.setDeterminedMinMax("max", +n[1].toFixed(i)),
  49510. r.freeze()
  49511. }
  49512. }
  49513. ,
  49514. t
  49515. }();
  49516. var yz = {
  49517. getTargetSeries: function(t) {
  49518. function e(e) {
  49519. t.eachComponent("dataZoom", (function(n) {
  49520. n.eachTargetAxis((function(i, r) {
  49521. var o = t.getComponent(rz(i), r);
  49522. e(i, r, o, n)
  49523. }
  49524. ))
  49525. }
  49526. ))
  49527. }
  49528. e((function(t, e, n, i) {
  49529. n.__dzAxisProxy = null
  49530. }
  49531. ));
  49532. var n = [];
  49533. e((function(e, i, r, o) {
  49534. r.__dzAxisProxy || (r.__dzAxisProxy = new gz(e,i,o,t),
  49535. n.push(r.__dzAxisProxy))
  49536. }
  49537. ));
  49538. var i = yt();
  49539. return E(n, (function(t) {
  49540. E(t.getTargetSeriesModels(), (function(t) {
  49541. i.set(t.uid, t)
  49542. }
  49543. ))
  49544. }
  49545. )),
  49546. i
  49547. },
  49548. overallReset: function(t, e) {
  49549. t.eachComponent("dataZoom", (function(t) {
  49550. t.eachTargetAxis((function(e, n) {
  49551. t.getAxisProxy(e, n).reset(t)
  49552. }
  49553. )),
  49554. t.eachTargetAxis((function(n, i) {
  49555. t.getAxisProxy(n, i).filterData(t, e)
  49556. }
  49557. ))
  49558. }
  49559. )),
  49560. t.eachComponent("dataZoom", (function(t) {
  49561. var e = t.findRepresentativeAxisProxy();
  49562. if (e) {
  49563. var n = e.getDataPercentWindow()
  49564. , i = e.getDataValueWindow();
  49565. t.setCalculatedRange({
  49566. start: n[0],
  49567. end: n[1],
  49568. startValue: i[0],
  49569. endValue: i[1]
  49570. })
  49571. }
  49572. }
  49573. ))
  49574. }
  49575. };
  49576. var vz = !1;
  49577. function mz(t) {
  49578. vz || (vz = !0,
  49579. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, yz),
  49580. function(t) {
  49581. t.registerAction("dataZoom", (function(t, e) {
  49582. E(oz(e, t), (function(e) {
  49583. e.setRawRange({
  49584. start: t.start,
  49585. end: t.end,
  49586. startValue: t.startValue,
  49587. endValue: t.endValue
  49588. })
  49589. }
  49590. ))
  49591. }
  49592. ))
  49593. }(t),
  49594. t.registerSubTypeDefaulter("dataZoom", (function() {
  49595. return "slider"
  49596. }
  49597. )))
  49598. }
  49599. function xz(t) {
  49600. t.registerComponentModel(hz),
  49601. t.registerComponentView(pz),
  49602. mz(t)
  49603. }
  49604. var _z = function() {}
  49605. , bz = {};
  49606. function wz(t, e) {
  49607. bz[t] = e
  49608. }
  49609. function Sz(t) {
  49610. return bz[t]
  49611. }
  49612. var Mz = function(t) {
  49613. function e() {
  49614. var n = null !== t && t.apply(this, arguments) || this;
  49615. return n.type = e.type,
  49616. n
  49617. }
  49618. return n(e, t),
  49619. e.prototype.optionUpdated = function() {
  49620. t.prototype.optionUpdated.apply(this, arguments);
  49621. var e = this.ecModel;
  49622. E(this.option.feature, (function(t, n) {
  49623. var i = Sz(n);
  49624. i && (i.getDefaultOption && (i.defaultOption = i.getDefaultOption(e)),
  49625. C(t, i.defaultOption))
  49626. }
  49627. ))
  49628. }
  49629. ,
  49630. e.type = "toolbox",
  49631. e.layoutMode = {
  49632. type: "box",
  49633. ignoreSize: !0
  49634. },
  49635. e.defaultOption = {
  49636. show: !0,
  49637. z: 6,
  49638. orient: "horizontal",
  49639. left: "right",
  49640. top: "top",
  49641. backgroundColor: "transparent",
  49642. borderColor: "#ccc",
  49643. borderRadius: 0,
  49644. borderWidth: 0,
  49645. padding: 5,
  49646. itemSize: 15,
  49647. itemGap: 8,
  49648. showTitle: !0,
  49649. iconStyle: {
  49650. borderColor: "#666",
  49651. color: "none"
  49652. },
  49653. emphasis: {
  49654. iconStyle: {
  49655. borderColor: "#3E98C5"
  49656. }
  49657. },
  49658. tooltip: {
  49659. show: !1,
  49660. position: "bottom"
  49661. }
  49662. },
  49663. e
  49664. }(zp);
  49665. function Iz(t, e) {
  49666. var n = vp(e.get("padding"))
  49667. , i = e.getItemStyle(["color", "opacity"]);
  49668. return i.fill = e.get("backgroundColor"),
  49669. t = new Ws({
  49670. shape: {
  49671. x: t.x - n[3],
  49672. y: t.y - n[0],
  49673. width: t.width + n[1] + n[3],
  49674. height: t.height + n[0] + n[2],
  49675. r: e.get("borderRadius")
  49676. },
  49677. style: i,
  49678. silent: !0,
  49679. z2: -1
  49680. })
  49681. }
  49682. var Tz = function(t) {
  49683. function e() {
  49684. return null !== t && t.apply(this, arguments) || this
  49685. }
  49686. return n(e, t),
  49687. e.prototype.render = function(t, e, n, i) {
  49688. var r = this.group;
  49689. if (r.removeAll(),
  49690. t.get("show")) {
  49691. var o = +t.get("itemSize")
  49692. , a = "vertical" === t.get("orient")
  49693. , s = t.get("feature") || {}
  49694. , l = this._features || (this._features = {})
  49695. , u = [];
  49696. E(s, (function(t, e) {
  49697. u.push(e)
  49698. }
  49699. )),
  49700. new Gm(this._featureNames || [],u).add(h).update(h).remove(H(h, null)).execute(),
  49701. this._featureNames = u,
  49702. function(t, e, n) {
  49703. var i = e.getBoxLayoutParams()
  49704. , r = e.get("padding")
  49705. , o = {
  49706. width: n.getWidth(),
  49707. height: n.getHeight()
  49708. }
  49709. , a = kp(i, o, r);
  49710. Ap(e.get("orient"), t, e.get("itemGap"), a.width, a.height),
  49711. Lp(t, i, o, r)
  49712. }(r, t, n),
  49713. r.add(Iz(r.getBoundingRect(), t)),
  49714. a || r.eachChild((function(t) {
  49715. var e = t.__title
  49716. , i = t.ensureState("emphasis")
  49717. , a = i.textConfig || (i.textConfig = {})
  49718. , s = t.getTextContent()
  49719. , l = s && s.ensureState("emphasis");
  49720. if (l && !X(l) && e) {
  49721. var u = l.style || (l.style = {})
  49722. , h = Sr(e, Xs.makeFont(u))
  49723. , c = t.x + r.x
  49724. , p = !1;
  49725. t.y + r.y + o + h.height > n.getHeight() && (a.position = "top",
  49726. p = !0);
  49727. var d = p ? -5 - h.height : o + 10;
  49728. c + h.width / 2 > n.getWidth() ? (a.position = ["100%", d],
  49729. u.align = "right") : c - h.width / 2 < 0 && (a.position = [0, d],
  49730. u.align = "left")
  49731. }
  49732. }
  49733. ))
  49734. }
  49735. function h(h, c) {
  49736. var p, d = u[h], f = u[c], g = s[d], y = new Cc(g,t,t.ecModel);
  49737. if (i && null != i.newTitle && i.featureName === d && (g.title = i.newTitle),
  49738. d && !f) {
  49739. if (function(t) {
  49740. return 0 === t.indexOf("my")
  49741. }(d))
  49742. p = {
  49743. onclick: y.option.onclick,
  49744. featureName: d
  49745. };
  49746. else {
  49747. var v = Sz(d);
  49748. if (!v)
  49749. return;
  49750. p = new v
  49751. }
  49752. l[d] = p
  49753. } else if (!(p = l[f]))
  49754. return;
  49755. p.uid = Ac("toolbox-feature"),
  49756. p.model = y,
  49757. p.ecModel = e,
  49758. p.api = n;
  49759. var m = p instanceof _z;
  49760. d || !f ? !y.get("show") || m && p.unusable ? m && p.remove && p.remove(e, n) : (!function(i, s, l) {
  49761. var u, h, c = i.getModel("iconStyle"), p = i.getModel(["emphasis", "iconStyle"]), d = s instanceof _z && s.getIcons ? s.getIcons() : i.get("icon"), f = i.get("title") || {};
  49762. U(d) ? (u = {})[l] = d : u = d;
  49763. U(f) ? (h = {})[l] = f : h = f;
  49764. var g = i.iconPaths = {};
  49765. E(u, (function(l, u) {
  49766. var d = Uh(l, {}, {
  49767. x: -o / 2,
  49768. y: -o / 2,
  49769. width: o,
  49770. height: o
  49771. });
  49772. d.setStyle(c.getItemStyle()),
  49773. d.ensureState("emphasis").style = p.getItemStyle();
  49774. var f = new Xs({
  49775. style: {
  49776. text: h[u],
  49777. align: p.get("textAlign"),
  49778. borderRadius: p.get("textBorderRadius"),
  49779. padding: p.get("textPadding"),
  49780. fill: null,
  49781. font: cc({
  49782. fontStyle: p.get("textFontStyle"),
  49783. fontFamily: p.get("textFontFamily"),
  49784. fontSize: p.get("textFontSize"),
  49785. fontWeight: p.get("textFontWeight")
  49786. }, e)
  49787. },
  49788. ignore: !0
  49789. });
  49790. d.setTextContent(f),
  49791. Kh({
  49792. el: d,
  49793. componentModel: t,
  49794. itemName: u,
  49795. formatterParamsExtra: {
  49796. title: h[u]
  49797. }
  49798. }),
  49799. d.__title = h[u],
  49800. d.on("mouseover", (function() {
  49801. var e = p.getItemStyle()
  49802. , i = a ? null == t.get("right") && "right" !== t.get("left") ? "right" : "left" : null == t.get("bottom") && "bottom" !== t.get("top") ? "bottom" : "top";
  49803. f.setStyle({
  49804. fill: p.get("textFill") || e.fill || e.stroke || "#000",
  49805. backgroundColor: p.get("textBackgroundColor")
  49806. }),
  49807. d.setTextConfig({
  49808. position: p.get("textPosition") || i
  49809. }),
  49810. f.ignore = !t.get("showTitle"),
  49811. n.enterEmphasis(this)
  49812. }
  49813. )).on("mouseout", (function() {
  49814. "emphasis" !== i.get(["iconStatus", u]) && n.leaveEmphasis(this),
  49815. f.hide()
  49816. }
  49817. )),
  49818. ("emphasis" === i.get(["iconStatus", u]) ? Ol : Rl)(d),
  49819. r.add(d),
  49820. d.on("click", W(s.onclick, s, e, n, u)),
  49821. g[u] = d
  49822. }
  49823. ))
  49824. }(y, p, d),
  49825. y.setIconStatus = function(t, e) {
  49826. var n = this.option
  49827. , i = this.iconPaths;
  49828. n.iconStatus = n.iconStatus || {},
  49829. n.iconStatus[t] = e,
  49830. i[t] && ("emphasis" === e ? Ol : Rl)(i[t])
  49831. }
  49832. ,
  49833. p instanceof _z && p.render && p.render(y, e, n, i)) : m && p.dispose && p.dispose(e, n)
  49834. }
  49835. }
  49836. ,
  49837. e.prototype.updateView = function(t, e, n, i) {
  49838. E(this._features, (function(t) {
  49839. t instanceof _z && t.updateView && t.updateView(t.model, e, n, i)
  49840. }
  49841. ))
  49842. }
  49843. ,
  49844. e.prototype.remove = function(t, e) {
  49845. E(this._features, (function(n) {
  49846. n instanceof _z && n.remove && n.remove(t, e)
  49847. }
  49848. )),
  49849. this.group.removeAll()
  49850. }
  49851. ,
  49852. e.prototype.dispose = function(t, e) {
  49853. E(this._features, (function(n) {
  49854. n instanceof _z && n.dispose && n.dispose(t, e)
  49855. }
  49856. ))
  49857. }
  49858. ,
  49859. e.type = "toolbox",
  49860. e
  49861. }(Ag);
  49862. var Cz = function(t) {
  49863. function e() {
  49864. return null !== t && t.apply(this, arguments) || this
  49865. }
  49866. return n(e, t),
  49867. e.prototype.onclick = function(t, e) {
  49868. var n = this.model
  49869. , i = n.get("name") || t.get("title.0.text") || "echarts"
  49870. , o = "svg" === e.getZr().painter.getType()
  49871. , a = o ? "svg" : n.get("type", !0) || "png"
  49872. , s = e.getConnectedDataURL({
  49873. type: a,
  49874. backgroundColor: n.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
  49875. connectedBackgroundColor: n.get("connectedBackgroundColor"),
  49876. excludeComponents: n.get("excludeComponents"),
  49877. pixelRatio: n.get("pixelRatio")
  49878. })
  49879. , l = r.browser;
  49880. if ("function" != typeof MouseEvent || !l.newEdge && (l.ie || l.edge))
  49881. if (window.navigator.msSaveOrOpenBlob || o) {
  49882. var u = s.split(",")
  49883. , h = u[0].indexOf("base64") > -1
  49884. , c = o ? decodeURIComponent(u[1]) : u[1];
  49885. h && (c = window.atob(c));
  49886. var p = i + "." + a;
  49887. if (window.navigator.msSaveOrOpenBlob) {
  49888. for (var d = c.length, f = new Uint8Array(d); d--; )
  49889. f[d] = c.charCodeAt(d);
  49890. var g = new Blob([f]);
  49891. window.navigator.msSaveOrOpenBlob(g, p)
  49892. } else {
  49893. var y = document.createElement("iframe");
  49894. document.body.appendChild(y);
  49895. var v = y.contentWindow
  49896. , m = v.document;
  49897. m.open("image/svg+xml", "replace"),
  49898. m.write(c),
  49899. m.close(),
  49900. v.focus(),
  49901. m.execCommand("SaveAs", !0, p),
  49902. document.body.removeChild(y)
  49903. }
  49904. } else {
  49905. var x = n.get("lang")
  49906. , _ = '<body style="margin:0;"><img src="' + s + '" style="max-width:100%;" title="' + (x && x[0] || "") + '" /></body>'
  49907. , b = window.open();
  49908. b.document.write(_),
  49909. b.document.title = i
  49910. }
  49911. else {
  49912. var w = document.createElement("a");
  49913. w.download = i + "." + a,
  49914. w.target = "_blank",
  49915. w.href = s;
  49916. var S = new MouseEvent("click",{
  49917. view: document.defaultView,
  49918. bubbles: !0,
  49919. cancelable: !1
  49920. });
  49921. w.dispatchEvent(S)
  49922. }
  49923. }
  49924. ,
  49925. e.getDefaultOption = function(t) {
  49926. return {
  49927. show: !0,
  49928. 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",
  49929. title: t.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  49930. type: "png",
  49931. connectedBackgroundColor: "#fff",
  49932. name: "",
  49933. excludeComponents: ["toolbox"],
  49934. lang: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  49935. }
  49936. }
  49937. ,
  49938. e
  49939. }(_z)
  49940. , Dz = "__ec_magicType_stack__"
  49941. , Az = [["line", "bar"], ["stack"]]
  49942. , kz = function(t) {
  49943. function e() {
  49944. return null !== t && t.apply(this, arguments) || this
  49945. }
  49946. return n(e, t),
  49947. e.prototype.getIcons = function() {
  49948. var t = this.model
  49949. , e = t.get("icon")
  49950. , n = {};
  49951. return E(t.get("type"), (function(t) {
  49952. e[t] && (n[t] = e[t])
  49953. }
  49954. )),
  49955. n
  49956. }
  49957. ,
  49958. e.getDefaultOption = function(t) {
  49959. return {
  49960. show: !0,
  49961. type: [],
  49962. icon: {
  49963. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  49964. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  49965. 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"
  49966. },
  49967. title: t.getLocaleModel().get(["toolbox", "magicType", "title"]),
  49968. option: {},
  49969. seriesIndex: {}
  49970. }
  49971. }
  49972. ,
  49973. e.prototype.onclick = function(t, e, n) {
  49974. var i = this.model
  49975. , r = i.get(["seriesIndex", n]);
  49976. if (Lz[n]) {
  49977. var o, a = {
  49978. series: []
  49979. };
  49980. E(Az, (function(t) {
  49981. P(t, n) >= 0 && E(t, (function(t) {
  49982. i.setIconStatus(t, "normal")
  49983. }
  49984. ))
  49985. }
  49986. )),
  49987. i.setIconStatus(n, "emphasis"),
  49988. t.eachComponent({
  49989. mainType: "series",
  49990. query: null == r ? null : {
  49991. seriesIndex: r
  49992. }
  49993. }, (function(t) {
  49994. var e = t.subType
  49995. , r = t.id
  49996. , o = Lz[n](e, r, t, i);
  49997. o && (k(o, t.option),
  49998. a.series.push(o));
  49999. var s = t.coordinateSystem;
  50000. if (s && "cartesian2d" === s.type && ("line" === n || "bar" === n)) {
  50001. var l = s.getAxesByScale("ordinal")[0];
  50002. if (l) {
  50003. var u = l.dim + "Axis"
  50004. , h = t.getReferringComponents(u, Wo).models[0].componentIndex;
  50005. a[u] = a[u] || [];
  50006. for (var c = 0; c <= h; c++)
  50007. a[u][h] = a[u][h] || {};
  50008. a[u][h].boundaryGap = "bar" === n
  50009. }
  50010. }
  50011. }
  50012. ));
  50013. var s = n;
  50014. "stack" === n && (o = C({
  50015. stack: i.option.title.tiled,
  50016. tiled: i.option.title.stack
  50017. }, i.option.title),
  50018. "emphasis" !== i.get(["iconStatus", n]) && (s = "tiled")),
  50019. e.dispatchAction({
  50020. type: "changeMagicType",
  50021. currentType: s,
  50022. newOption: a,
  50023. newTitle: o,
  50024. featureName: "magicType"
  50025. })
  50026. }
  50027. }
  50028. ,
  50029. e
  50030. }(_z)
  50031. , Lz = {
  50032. line: function(t, e, n, i) {
  50033. if ("bar" === t)
  50034. return C({
  50035. id: e,
  50036. type: "line",
  50037. data: n.get("data"),
  50038. stack: n.get("stack"),
  50039. markPoint: n.get("markPoint"),
  50040. markLine: n.get("markLine")
  50041. }, i.get(["option", "line"]) || {}, !0)
  50042. },
  50043. bar: function(t, e, n, i) {
  50044. if ("line" === t)
  50045. return C({
  50046. id: e,
  50047. type: "bar",
  50048. data: n.get("data"),
  50049. stack: n.get("stack"),
  50050. markPoint: n.get("markPoint"),
  50051. markLine: n.get("markLine")
  50052. }, i.get(["option", "bar"]) || {}, !0)
  50053. },
  50054. stack: function(t, e, n, i) {
  50055. var r = n.get("stack") === Dz;
  50056. if ("line" === t || "bar" === t)
  50057. return i.setIconStatus("stack", r ? "normal" : "emphasis"),
  50058. C({
  50059. id: e,
  50060. stack: r ? "" : Dz
  50061. }, i.get(["option", "stack"]) || {}, !0)
  50062. }
  50063. };
  50064. Cm({
  50065. type: "changeMagicType",
  50066. event: "magicTypeChanged",
  50067. update: "prepareAndUpdate"
  50068. }, (function(t, e) {
  50069. e.mergeOption(t.newOption)
  50070. }
  50071. ));
  50072. var Pz = new Array(60).join("-")
  50073. , Oz = "\t";
  50074. function Rz(t) {
  50075. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
  50076. }
  50077. var Nz = new RegExp("[\t]+","g");
  50078. function Ez(t, e) {
  50079. var n = t.split(new RegExp("\n*" + Pz + "\n*","g"))
  50080. , i = {
  50081. series: []
  50082. };
  50083. return E(n, (function(t, n) {
  50084. if (function(t) {
  50085. if (t.slice(0, t.indexOf("\n")).indexOf(Oz) >= 0)
  50086. return !0
  50087. }(t)) {
  50088. var r = function(t) {
  50089. for (var e = t.split(/\n+/g), n = [], i = z(Rz(e.shift()).split(Nz), (function(t) {
  50090. return {
  50091. name: t,
  50092. data: []
  50093. }
  50094. }
  50095. )), r = 0; r < e.length; r++) {
  50096. var o = Rz(e[r]).split(Nz);
  50097. n.push(o.shift());
  50098. for (var a = 0; a < o.length; a++)
  50099. i[a] && (i[a].data[r] = o[a])
  50100. }
  50101. return {
  50102. series: i,
  50103. categories: n
  50104. }
  50105. }(t)
  50106. , o = e[n]
  50107. , a = o.axisDim + "Axis";
  50108. o && (i[a] = i[a] || [],
  50109. i[a][o.axisIndex] = {
  50110. data: r.categories
  50111. },
  50112. i.series = i.series.concat(r.series))
  50113. } else {
  50114. r = function(t) {
  50115. for (var e = t.split(/\n+/g), n = Rz(e.shift()), i = [], r = 0; r < e.length; r++) {
  50116. var o = Rz(e[r]);
  50117. if (o) {
  50118. var a = o.split(Nz)
  50119. , s = ""
  50120. , l = void 0
  50121. , u = !1;
  50122. isNaN(a[0]) ? (u = !0,
  50123. s = a[0],
  50124. a = a.slice(1),
  50125. i[r] = {
  50126. name: s,
  50127. value: []
  50128. },
  50129. l = i[r].value) : l = i[r] = [];
  50130. for (var h = 0; h < a.length; h++)
  50131. l.push(+a[h]);
  50132. 1 === l.length && (u ? i[r].value = l[0] : i[r] = l[0])
  50133. }
  50134. }
  50135. return {
  50136. name: n,
  50137. data: i
  50138. }
  50139. }(t);
  50140. i.series.push(r)
  50141. }
  50142. }
  50143. )),
  50144. i
  50145. }
  50146. var zz = function(t) {
  50147. function e() {
  50148. return null !== t && t.apply(this, arguments) || this
  50149. }
  50150. return n(e, t),
  50151. e.prototype.onclick = function(t, e) {
  50152. setTimeout((function() {
  50153. e.dispatchAction({
  50154. type: "hideTip"
  50155. })
  50156. }
  50157. ));
  50158. var n = e.getDom()
  50159. , i = this.model;
  50160. this._dom && n.removeChild(this._dom);
  50161. var r = document.createElement("div");
  50162. r.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",
  50163. r.style.backgroundColor = i.get("backgroundColor") || "#fff";
  50164. var o = document.createElement("h4")
  50165. , a = i.get("lang") || [];
  50166. o.innerHTML = a[0] || i.get("title"),
  50167. o.style.cssText = "margin:10px 20px",
  50168. o.style.color = i.get("textColor");
  50169. var s = document.createElement("div")
  50170. , l = document.createElement("textarea");
  50171. s.style.cssText = "overflow:auto";
  50172. var u = i.get("optionToContent")
  50173. , h = i.get("contentToOption")
  50174. , c = function(t) {
  50175. var e, n, i, r = function(t) {
  50176. var e = {}
  50177. , n = []
  50178. , i = [];
  50179. return t.eachRawSeries((function(t) {
  50180. var r = t.coordinateSystem;
  50181. if (!r || "cartesian2d" !== r.type && "polar" !== r.type)
  50182. n.push(t);
  50183. else {
  50184. var o = r.getBaseAxis();
  50185. if ("category" === o.type) {
  50186. var a = o.dim + "_" + o.index;
  50187. e[a] || (e[a] = {
  50188. categoryAxis: o,
  50189. valueAxis: r.getOtherAxis(o),
  50190. series: []
  50191. },
  50192. i.push({
  50193. axisDim: o.dim,
  50194. axisIndex: o.index
  50195. })),
  50196. e[a].series.push(t)
  50197. } else
  50198. n.push(t)
  50199. }
  50200. }
  50201. )),
  50202. {
  50203. seriesGroupByCategoryAxis: e,
  50204. other: n,
  50205. meta: i
  50206. }
  50207. }(t);
  50208. return {
  50209. value: B([(n = r.seriesGroupByCategoryAxis,
  50210. i = [],
  50211. E(n, (function(t, e) {
  50212. var n = t.categoryAxis
  50213. , r = t.valueAxis.dim
  50214. , o = [" "].concat(z(t.series, (function(t) {
  50215. return t.name
  50216. }
  50217. )))
  50218. , a = [n.model.getCategories()];
  50219. E(t.series, (function(t) {
  50220. var e = t.getRawData();
  50221. a.push(t.getRawData().mapArray(e.mapDimension(r), (function(t) {
  50222. return t
  50223. }
  50224. )))
  50225. }
  50226. ));
  50227. for (var s = [o.join(Oz)], l = 0; l < a[0].length; l++) {
  50228. for (var u = [], h = 0; h < a.length; h++)
  50229. u.push(a[h][l]);
  50230. s.push(u.join(Oz))
  50231. }
  50232. i.push(s.join("\n"))
  50233. }
  50234. )),
  50235. i.join("\n\n" + Pz + "\n\n")), (e = r.other,
  50236. z(e, (function(t) {
  50237. var e = t.getRawData()
  50238. , n = [t.name]
  50239. , i = [];
  50240. return e.each(e.dimensions, (function() {
  50241. for (var t = arguments.length, r = arguments[t - 1], o = e.getName(r), a = 0; a < t - 1; a++)
  50242. i[a] = arguments[a];
  50243. n.push((o ? o + Oz : "") + i.join(Oz))
  50244. }
  50245. )),
  50246. n.join("\n")
  50247. }
  50248. )).join("\n\n" + Pz + "\n\n"))], (function(t) {
  50249. return !!t.replace(/[\n\t\s]/g, "")
  50250. }
  50251. )).join("\n\n" + Pz + "\n\n"),
  50252. meta: r.meta
  50253. }
  50254. }(t);
  50255. if (X(u)) {
  50256. var p = u(e.getOption());
  50257. U(p) ? s.innerHTML = p : J(p) && s.appendChild(p)
  50258. } else {
  50259. l.readOnly = i.get("readOnly");
  50260. var d = l.style;
  50261. 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",
  50262. d.color = i.get("textColor"),
  50263. d.borderColor = i.get("textareaBorderColor"),
  50264. d.backgroundColor = i.get("textareaColor"),
  50265. l.value = c.value,
  50266. s.appendChild(l)
  50267. }
  50268. var f = c.meta
  50269. , g = document.createElement("div");
  50270. g.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  50271. var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px"
  50272. , v = document.createElement("div")
  50273. , m = document.createElement("div");
  50274. y += ";background-color:" + i.get("buttonColor"),
  50275. y += ";color:" + i.get("buttonTextColor");
  50276. var x = this;
  50277. function _() {
  50278. n.removeChild(r),
  50279. x._dom = null
  50280. }
  50281. pe(v, "click", _),
  50282. pe(m, "click", (function() {
  50283. if (null == h && null != u || null != h && null == u)
  50284. _();
  50285. else {
  50286. var t;
  50287. try {
  50288. t = X(h) ? h(s, e.getOption()) : Ez(l.value, f)
  50289. } catch (t) {
  50290. throw _(),
  50291. new Error("Data view format error " + t)
  50292. }
  50293. t && e.dispatchAction({
  50294. type: "changeDataView",
  50295. newOption: t
  50296. }),
  50297. _()
  50298. }
  50299. }
  50300. )),
  50301. v.innerHTML = a[1],
  50302. m.innerHTML = a[2],
  50303. m.style.cssText = v.style.cssText = y,
  50304. !i.get("readOnly") && g.appendChild(m),
  50305. g.appendChild(v),
  50306. r.appendChild(o),
  50307. r.appendChild(s),
  50308. r.appendChild(g),
  50309. s.style.height = n.clientHeight - 80 + "px",
  50310. n.appendChild(r),
  50311. this._dom = r
  50312. }
  50313. ,
  50314. e.prototype.remove = function(t, e) {
  50315. this._dom && e.getDom().removeChild(this._dom)
  50316. }
  50317. ,
  50318. e.prototype.dispose = function(t, e) {
  50319. this.remove(t, e)
  50320. }
  50321. ,
  50322. e.getDefaultOption = function(t) {
  50323. return {
  50324. show: !0,
  50325. readOnly: !1,
  50326. optionToContent: null,
  50327. contentToOption: null,
  50328. 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",
  50329. title: t.getLocaleModel().get(["toolbox", "dataView", "title"]),
  50330. lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  50331. backgroundColor: "#fff",
  50332. textColor: "#000",
  50333. textareaColor: "#fff",
  50334. textareaBorderColor: "#333",
  50335. buttonColor: "#c23531",
  50336. buttonTextColor: "#fff"
  50337. }
  50338. }
  50339. ,
  50340. e
  50341. }(_z);
  50342. function Vz(t, e) {
  50343. return z(t, (function(t, n) {
  50344. var i = e && e[n];
  50345. if (q(i) && !Y(i)) {
  50346. q(t) && !Y(t) || (t = {
  50347. value: t
  50348. });
  50349. var r = null != i.name && null == t.name;
  50350. return t = k(t, i),
  50351. r && delete t.name,
  50352. t
  50353. }
  50354. return t
  50355. }
  50356. ))
  50357. }
  50358. Cm({
  50359. type: "changeDataView",
  50360. event: "dataViewChanged",
  50361. update: "prepareAndUpdate"
  50362. }, (function(t, e) {
  50363. var n = [];
  50364. E(t.newOption.series, (function(t) {
  50365. var i = e.getSeriesByName(t.name)[0];
  50366. if (i) {
  50367. var r = i.get("data");
  50368. n.push({
  50369. name: t.name,
  50370. data: Vz(t.data, r)
  50371. })
  50372. } else
  50373. n.push(A({
  50374. type: "scatter"
  50375. }, t))
  50376. }
  50377. )),
  50378. e.mergeOption(k({
  50379. series: n
  50380. }, t.newOption))
  50381. }
  50382. ));
  50383. var Bz = E
  50384. , Fz = Vo();
  50385. function Gz(t) {
  50386. var e = Fz(t);
  50387. return e.snapshots || (e.snapshots = [{}]),
  50388. e.snapshots
  50389. }
  50390. var Wz = function(t) {
  50391. function e() {
  50392. return null !== t && t.apply(this, arguments) || this
  50393. }
  50394. return n(e, t),
  50395. e.prototype.onclick = function(t, e) {
  50396. !function(t) {
  50397. Fz(t).snapshots = null
  50398. }(t),
  50399. e.dispatchAction({
  50400. type: "restore",
  50401. from: this.uid
  50402. })
  50403. }
  50404. ,
  50405. e.getDefaultOption = function(t) {
  50406. return {
  50407. show: !0,
  50408. 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",
  50409. title: t.getLocaleModel().get(["toolbox", "restore", "title"])
  50410. }
  50411. }
  50412. ,
  50413. e
  50414. }(_z);
  50415. Cm({
  50416. type: "restore",
  50417. event: "restore",
  50418. update: "prepareAndUpdate"
  50419. }, (function(t, e) {
  50420. e.resetOption("recreate")
  50421. }
  50422. ));
  50423. var Hz = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"]
  50424. , Yz = function() {
  50425. function t(t, e, n) {
  50426. var i = this;
  50427. this._targetInfoList = [];
  50428. var r = Uz(e, t);
  50429. E(Zz, (function(t, e) {
  50430. (!n || !n.include || P(n.include, e) >= 0) && t(r, i._targetInfoList)
  50431. }
  50432. ))
  50433. }
  50434. return t.prototype.setOutputRanges = function(t, e) {
  50435. return this.matchOutputRanges(t, e, (function(t, e, n) {
  50436. if ((t.coordRanges || (t.coordRanges = [])).push(e),
  50437. !t.coordRange) {
  50438. t.coordRange = e;
  50439. var i = Kz[t.brushType](0, n, e);
  50440. t.__rangeOffset = {
  50441. offset: Jz[t.brushType](i.values, t.range, [1, 1]),
  50442. xyMinMax: i.xyMinMax
  50443. }
  50444. }
  50445. }
  50446. )),
  50447. t
  50448. }
  50449. ,
  50450. t.prototype.matchOutputRanges = function(t, e, n) {
  50451. E(t, (function(t) {
  50452. var i = this.findTargetInfo(t, e);
  50453. i && !0 !== i && E(i.coordSyses, (function(i) {
  50454. var r = Kz[t.brushType](1, i, t.range, !0);
  50455. n(t, r.values, i, e)
  50456. }
  50457. ))
  50458. }
  50459. ), this)
  50460. }
  50461. ,
  50462. t.prototype.setInputRanges = function(t, e) {
  50463. E(t, (function(t) {
  50464. var n, i, r, o, a, s = this.findTargetInfo(t, e);
  50465. if (t.range = t.range || [],
  50466. s && !0 !== s) {
  50467. t.panelId = s.panelId;
  50468. var l = Kz[t.brushType](0, s.coordSys, t.coordRange)
  50469. , u = t.__rangeOffset;
  50470. t.range = u ? Jz[t.brushType](l.values, u.offset, (n = l.xyMinMax,
  50471. i = u.xyMinMax,
  50472. r = tV(n),
  50473. o = tV(i),
  50474. a = [r[0] / o[0], r[1] / o[1]],
  50475. isNaN(a[0]) && (a[0] = 1),
  50476. isNaN(a[1]) && (a[1] = 1),
  50477. a)) : l.values
  50478. }
  50479. }
  50480. ), this)
  50481. }
  50482. ,
  50483. t.prototype.makePanelOpts = function(t, e) {
  50484. return z(this._targetInfoList, (function(n) {
  50485. var i = n.getPanelRect();
  50486. return {
  50487. panelId: n.panelId,
  50488. defaultBrushType: e ? e(n) : null,
  50489. clipPath: BL(i),
  50490. isTargetByCursor: GL(i, t, n.coordSysModel),
  50491. getLinearBrushOtherExtent: FL(i)
  50492. }
  50493. }
  50494. ))
  50495. }
  50496. ,
  50497. t.prototype.controlSeries = function(t, e, n) {
  50498. var i = this.findTargetInfo(t, n);
  50499. return !0 === i || i && P(i.coordSyses, e.coordinateSystem) >= 0
  50500. }
  50501. ,
  50502. t.prototype.findTargetInfo = function(t, e) {
  50503. for (var n = this._targetInfoList, i = Uz(e, t), r = 0; r < n.length; r++) {
  50504. var o = n[r]
  50505. , a = t.panelId;
  50506. if (a) {
  50507. if (o.panelId === a)
  50508. return o
  50509. } else
  50510. for (var s = 0; s < jz.length; s++)
  50511. if (jz[s](i, o))
  50512. return o
  50513. }
  50514. return !0
  50515. }
  50516. ,
  50517. t
  50518. }();
  50519. function Xz(t) {
  50520. return t[0] > t[1] && t.reverse(),
  50521. t
  50522. }
  50523. function Uz(t, e) {
  50524. return Fo(t, e, {
  50525. includeMainTypes: Hz
  50526. })
  50527. }
  50528. var Zz = {
  50529. grid: function(t, e) {
  50530. var n = t.xAxisModels
  50531. , i = t.yAxisModels
  50532. , r = t.gridModels
  50533. , o = yt()
  50534. , a = {}
  50535. , s = {};
  50536. (n || i || r) && (E(n, (function(t) {
  50537. var e = t.axis.grid.model;
  50538. o.set(e.id, e),
  50539. a[e.id] = !0
  50540. }
  50541. )),
  50542. E(i, (function(t) {
  50543. var e = t.axis.grid.model;
  50544. o.set(e.id, e),
  50545. s[e.id] = !0
  50546. }
  50547. )),
  50548. E(r, (function(t) {
  50549. o.set(t.id, t),
  50550. a[t.id] = !0,
  50551. s[t.id] = !0
  50552. }
  50553. )),
  50554. o.each((function(t) {
  50555. var r = t.coordinateSystem
  50556. , o = [];
  50557. E(r.getCartesians(), (function(t, e) {
  50558. (P(n, t.getAxis("x").model) >= 0 || P(i, t.getAxis("y").model) >= 0) && o.push(t)
  50559. }
  50560. )),
  50561. e.push({
  50562. panelId: "grid--" + t.id,
  50563. gridModel: t,
  50564. coordSysModel: t,
  50565. coordSys: o[0],
  50566. coordSyses: o,
  50567. getPanelRect: qz.grid,
  50568. xAxisDeclared: a[t.id],
  50569. yAxisDeclared: s[t.id]
  50570. })
  50571. }
  50572. )))
  50573. },
  50574. geo: function(t, e) {
  50575. E(t.geoModels, (function(t) {
  50576. var n = t.coordinateSystem;
  50577. e.push({
  50578. panelId: "geo--" + t.id,
  50579. geoModel: t,
  50580. coordSysModel: t,
  50581. coordSys: n,
  50582. coordSyses: [n],
  50583. getPanelRect: qz.geo
  50584. })
  50585. }
  50586. ))
  50587. }
  50588. }
  50589. , jz = [function(t, e) {
  50590. var n = t.xAxisModel
  50591. , i = t.yAxisModel
  50592. , r = t.gridModel;
  50593. return !r && n && (r = n.axis.grid.model),
  50594. !r && i && (r = i.axis.grid.model),
  50595. r && r === e.gridModel
  50596. }
  50597. , function(t, e) {
  50598. var n = t.geoModel;
  50599. return n && n === e.geoModel
  50600. }
  50601. ]
  50602. , qz = {
  50603. grid: function() {
  50604. return this.coordSys.master.getRect().clone()
  50605. },
  50606. geo: function() {
  50607. var t = this.coordSys
  50608. , e = t.getBoundingRect().clone();
  50609. return e.applyTransform(Bh(t)),
  50610. e
  50611. }
  50612. }
  50613. , Kz = {
  50614. lineX: H($z, 0),
  50615. lineY: H($z, 1),
  50616. rect: function(t, e, n, i) {
  50617. var r = t ? e.pointToData([n[0][0], n[1][0]], i) : e.dataToPoint([n[0][0], n[1][0]], i)
  50618. , o = t ? e.pointToData([n[0][1], n[1][1]], i) : e.dataToPoint([n[0][1], n[1][1]], i)
  50619. , a = [Xz([r[0], o[0]]), Xz([r[1], o[1]])];
  50620. return {
  50621. values: a,
  50622. xyMinMax: a
  50623. }
  50624. },
  50625. polygon: function(t, e, n, i) {
  50626. var r = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  50627. return {
  50628. values: z(n, (function(n) {
  50629. var o = t ? e.pointToData(n, i) : e.dataToPoint(n, i);
  50630. return r[0][0] = Math.min(r[0][0], o[0]),
  50631. r[1][0] = Math.min(r[1][0], o[1]),
  50632. r[0][1] = Math.max(r[0][1], o[0]),
  50633. r[1][1] = Math.max(r[1][1], o[1]),
  50634. o
  50635. }
  50636. )),
  50637. xyMinMax: r
  50638. }
  50639. }
  50640. };
  50641. function $z(t, e, n, i) {
  50642. var r = n.getAxis(["x", "y"][t])
  50643. , o = Xz(z([0, 1], (function(t) {
  50644. return e ? r.coordToData(r.toLocalCoord(i[t]), !0) : r.toGlobalCoord(r.dataToCoord(i[t]))
  50645. }
  50646. )))
  50647. , a = [];
  50648. return a[t] = o,
  50649. a[1 - t] = [NaN, NaN],
  50650. {
  50651. values: o,
  50652. xyMinMax: a
  50653. }
  50654. }
  50655. var Jz = {
  50656. lineX: H(Qz, 0),
  50657. lineY: H(Qz, 1),
  50658. rect: function(t, e, n) {
  50659. return [[t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]], [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]]
  50660. },
  50661. polygon: function(t, e, n) {
  50662. return z(t, (function(t, i) {
  50663. return [t[0] - n[0] * e[i][0], t[1] - n[1] * e[i][1]]
  50664. }
  50665. ))
  50666. }
  50667. };
  50668. function Qz(t, e, n, i) {
  50669. return [e[0] - i[t] * n[0], e[1] - i[t] * n[1]]
  50670. }
  50671. function tV(t) {
  50672. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN]
  50673. }
  50674. var eV, nV, iV = E, rV = Io + "toolbox-dataZoom_", oV = function(t) {
  50675. function e() {
  50676. return null !== t && t.apply(this, arguments) || this
  50677. }
  50678. return n(e, t),
  50679. e.prototype.render = function(t, e, n, i) {
  50680. this._brushController || (this._brushController = new lL(n.getZr()),
  50681. this._brushController.on("brush", W(this._onBrush, this)).mount()),
  50682. function(t, e, n, i, r) {
  50683. var o = n._isZoomActive;
  50684. i && "takeGlobalCursor" === i.type && (o = "dataZoomSelect" === i.key && i.dataZoomSelectActive);
  50685. n._isZoomActive = o,
  50686. t.setIconStatus("zoom", o ? "emphasis" : "normal");
  50687. var a = new Yz(sV(t),e,{
  50688. include: ["grid"]
  50689. })
  50690. , s = a.makePanelOpts(r, (function(t) {
  50691. return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect"
  50692. }
  50693. ));
  50694. n._brushController.setPanels(s).enableBrush(!(!o || !s.length) && {
  50695. brushType: "auto",
  50696. brushStyle: t.getModel("brushStyle").getItemStyle()
  50697. })
  50698. }(t, e, this, i, n),
  50699. function(t, e) {
  50700. t.setIconStatus("back", function(t) {
  50701. return Gz(t).length
  50702. }(e) > 1 ? "emphasis" : "normal")
  50703. }(t, e)
  50704. }
  50705. ,
  50706. e.prototype.onclick = function(t, e, n) {
  50707. aV[n].call(this)
  50708. }
  50709. ,
  50710. e.prototype.remove = function(t, e) {
  50711. this._brushController && this._brushController.unmount()
  50712. }
  50713. ,
  50714. e.prototype.dispose = function(t, e) {
  50715. this._brushController && this._brushController.dispose()
  50716. }
  50717. ,
  50718. e.prototype._onBrush = function(t) {
  50719. var e = t.areas;
  50720. if (t.isEnd && e.length) {
  50721. var n = {}
  50722. , i = this.ecModel;
  50723. this._brushController.updateCovers([]),
  50724. new Yz(sV(this.model),i,{
  50725. include: ["grid"]
  50726. }).matchOutputRanges(e, i, (function(t, e, n) {
  50727. if ("cartesian2d" === n.type) {
  50728. var i = t.brushType;
  50729. "rect" === i ? (r("x", n, e[0]),
  50730. r("y", n, e[1])) : r({
  50731. lineX: "x",
  50732. lineY: "y"
  50733. }[i], n, e)
  50734. }
  50735. }
  50736. )),
  50737. function(t, e) {
  50738. var n = Gz(t);
  50739. Bz(e, (function(e, i) {
  50740. for (var r = n.length - 1; r >= 0 && !n[r][i]; r--)
  50741. ;
  50742. if (r < 0) {
  50743. var o = t.queryComponents({
  50744. mainType: "dataZoom",
  50745. subType: "select",
  50746. id: i
  50747. })[0];
  50748. if (o) {
  50749. var a = o.getPercentRange();
  50750. n[0][i] = {
  50751. dataZoomId: i,
  50752. start: a[0],
  50753. end: a[1]
  50754. }
  50755. }
  50756. }
  50757. }
  50758. )),
  50759. n.push(e)
  50760. }(i, n),
  50761. this._dispatchZoomAction(n)
  50762. }
  50763. function r(t, e, r) {
  50764. var o = e.getAxis(t)
  50765. , a = o.model
  50766. , s = function(t, e, n) {
  50767. var i;
  50768. return n.eachComponent({
  50769. mainType: "dataZoom",
  50770. subType: "select"
  50771. }, (function(n) {
  50772. n.getAxisModel(t, e.componentIndex) && (i = n)
  50773. }
  50774. )),
  50775. i
  50776. }(t, a, i)
  50777. , l = s.findRepresentativeAxisProxy(a).getMinMaxSpan();
  50778. null == l.minValueSpan && null == l.maxValueSpan || (r = zk(0, r.slice(), o.scale.getExtent(), 0, l.minValueSpan, l.maxValueSpan)),
  50779. s && (n[s.id] = {
  50780. dataZoomId: s.id,
  50781. startValue: r[0],
  50782. endValue: r[1]
  50783. })
  50784. }
  50785. }
  50786. ,
  50787. e.prototype._dispatchZoomAction = function(t) {
  50788. var e = [];
  50789. iV(t, (function(t, n) {
  50790. e.push(T(t))
  50791. }
  50792. )),
  50793. e.length && this.api.dispatchAction({
  50794. type: "dataZoom",
  50795. from: this.uid,
  50796. batch: e
  50797. })
  50798. }
  50799. ,
  50800. e.getDefaultOption = function(t) {
  50801. return {
  50802. show: !0,
  50803. filterMode: "filter",
  50804. icon: {
  50805. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  50806. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  50807. },
  50808. title: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  50809. brushStyle: {
  50810. borderWidth: 0,
  50811. color: "rgba(210,219,238,0.2)"
  50812. }
  50813. }
  50814. }
  50815. ,
  50816. e
  50817. }(_z), aV = {
  50818. zoom: function() {
  50819. var t = !this._isZoomActive;
  50820. this.api.dispatchAction({
  50821. type: "takeGlobalCursor",
  50822. key: "dataZoomSelect",
  50823. dataZoomSelectActive: t
  50824. })
  50825. },
  50826. back: function() {
  50827. this._dispatchZoomAction(function(t) {
  50828. var e = Gz(t)
  50829. , n = e[e.length - 1];
  50830. e.length > 1 && e.pop();
  50831. var i = {};
  50832. return Bz(n, (function(t, n) {
  50833. for (var r = e.length - 1; r >= 0; r--)
  50834. if (t = e[r][n]) {
  50835. i[n] = t;
  50836. break
  50837. }
  50838. }
  50839. )),
  50840. i
  50841. }(this.ecModel))
  50842. }
  50843. };
  50844. function sV(t) {
  50845. var e = {
  50846. xAxisIndex: t.get("xAxisIndex", !0),
  50847. yAxisIndex: t.get("yAxisIndex", !0),
  50848. xAxisId: t.get("xAxisId", !0),
  50849. yAxisId: t.get("yAxisId", !0)
  50850. };
  50851. return null == e.xAxisIndex && null == e.xAxisId && (e.xAxisIndex = "all"),
  50852. null == e.yAxisIndex && null == e.yAxisId && (e.yAxisIndex = "all"),
  50853. e
  50854. }
  50855. eV = "dataZoom",
  50856. nV = function(t) {
  50857. var e = t.getComponent("toolbox", 0)
  50858. , n = ["feature", "dataZoom"];
  50859. if (e && null != e.get(n)) {
  50860. var i = e.getModel(n)
  50861. , r = []
  50862. , o = Fo(t, sV(i));
  50863. return iV(o.xAxisModels, (function(t) {
  50864. return a(t, "xAxis", "xAxisIndex")
  50865. }
  50866. )),
  50867. iV(o.yAxisModels, (function(t) {
  50868. return a(t, "yAxis", "yAxisIndex")
  50869. }
  50870. )),
  50871. r
  50872. }
  50873. function a(t, e, n) {
  50874. var o = t.componentIndex
  50875. , a = {
  50876. type: "select",
  50877. $fromToolbox: !0,
  50878. filterMode: i.get("filterMode", !0) || "filter",
  50879. id: rV + e + o
  50880. };
  50881. a[n] = o,
  50882. r.push(a)
  50883. }
  50884. }
  50885. ,
  50886. lt(null == od.get(eV) && nV),
  50887. od.set(eV, nV);
  50888. var lV = function(t) {
  50889. function e() {
  50890. var n = null !== t && t.apply(this, arguments) || this;
  50891. return n.type = e.type,
  50892. n
  50893. }
  50894. return n(e, t),
  50895. e.type = "tooltip",
  50896. e.dependencies = ["axisPointer"],
  50897. e.defaultOption = {
  50898. z: 60,
  50899. show: !0,
  50900. showContent: !0,
  50901. trigger: "item",
  50902. triggerOn: "mousemove|click",
  50903. alwaysShowContent: !1,
  50904. displayMode: "single",
  50905. renderMode: "auto",
  50906. confine: null,
  50907. showDelay: 0,
  50908. hideDelay: 100,
  50909. transitionDuration: .4,
  50910. enterable: !1,
  50911. backgroundColor: "#fff",
  50912. shadowBlur: 10,
  50913. shadowColor: "rgba(0, 0, 0, .2)",
  50914. shadowOffsetX: 1,
  50915. shadowOffsetY: 2,
  50916. borderRadius: 4,
  50917. borderWidth: 1,
  50918. padding: null,
  50919. extraCssText: "",
  50920. axisPointer: {
  50921. type: "line",
  50922. axis: "auto",
  50923. animation: "auto",
  50924. animationDurationUpdate: 200,
  50925. animationEasingUpdate: "exponentialOut",
  50926. crossStyle: {
  50927. color: "#999",
  50928. width: 1,
  50929. type: "dashed",
  50930. textStyle: {}
  50931. }
  50932. },
  50933. textStyle: {
  50934. color: "#666",
  50935. fontSize: 14
  50936. }
  50937. },
  50938. e
  50939. }(zp);
  50940. function uV(t) {
  50941. var e = t.get("confine");
  50942. return null != e ? !!e : "richText" === t.get("renderMode")
  50943. }
  50944. function hV(t) {
  50945. if (r.domSupported)
  50946. for (var e = document.documentElement.style, n = 0, i = t.length; n < i; n++)
  50947. if (t[n]in e)
  50948. return t[n]
  50949. }
  50950. var cV = hV(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]);
  50951. function pV(t, e) {
  50952. if (!t)
  50953. return e;
  50954. e = yp(e, !0);
  50955. var n = t.indexOf(e);
  50956. return (t = -1 === n ? e : "-" + t.slice(0, n) + "-" + e).toLowerCase()
  50957. }
  50958. var dV = pV(hV(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), "transition")
  50959. , fV = pV(cV, "transform")
  50960. , gV = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (r.transform3dSupported ? "will-change:transform;" : "");
  50961. function yV(t, e, n) {
  50962. var i = t.toFixed(0) + "px"
  50963. , o = e.toFixed(0) + "px";
  50964. if (!r.transformSupported)
  50965. return n ? "top:" + o + ";left:" + i + ";" : [["top", o], ["left", i]];
  50966. var a = r.transform3dSupported
  50967. , s = "translate" + (a ? "3d" : "") + "(" + i + "," + o + (a ? ",0" : "") + ")";
  50968. return n ? "top:0;left:0;" + fV + ":" + s + ";" : [["top", 0], ["left", 0], [cV, s]]
  50969. }
  50970. function vV(t, e, n) {
  50971. var i = []
  50972. , o = t.get("transitionDuration")
  50973. , a = t.get("backgroundColor")
  50974. , s = t.get("shadowBlur")
  50975. , l = t.get("shadowColor")
  50976. , u = t.get("shadowOffsetX")
  50977. , h = t.get("shadowOffsetY")
  50978. , c = t.getModel("textStyle")
  50979. , p = gg(t, "html")
  50980. , d = u + "px " + h + "px " + s + "px " + l;
  50981. return i.push("box-shadow:" + d),
  50982. e && o && i.push(function(t, e) {
  50983. var n = "cubic-bezier(0.23,1,0.32,1)"
  50984. , i = " " + t / 2 + "s " + n
  50985. , o = "opacity" + i + ",visibility" + i;
  50986. return e || (i = " " + t + "s " + n,
  50987. o += r.transformSupported ? "," + fV + i : ",left" + i + ",top" + i),
  50988. dV + ":" + o
  50989. }(o, n)),
  50990. a && i.push("background-color:" + a),
  50991. E(["width", "color", "radius"], (function(e) {
  50992. var n = "border-" + e
  50993. , r = yp(n)
  50994. , o = t.get(r);
  50995. null != o && i.push(n + ":" + o + ("color" === e ? "" : "px"))
  50996. }
  50997. )),
  50998. i.push(function(t) {
  50999. var e = []
  51000. , n = t.get("fontSize")
  51001. , i = t.getTextColor();
  51002. i && e.push("color:" + i),
  51003. e.push("font:" + t.getFont());
  51004. var r = rt(t.get("lineHeight"), Math.round(3 * n / 2));
  51005. n && e.push("line-height:" + r + "px");
  51006. var o = t.get("textShadowColor")
  51007. , a = t.get("textShadowBlur") || 0
  51008. , s = t.get("textShadowOffsetX") || 0
  51009. , l = t.get("textShadowOffsetY") || 0;
  51010. return o && a && e.push("text-shadow:" + s + "px " + l + "px " + a + "px " + o),
  51011. E(["decoration", "align"], (function(n) {
  51012. var i = t.get(n);
  51013. i && e.push("text-" + n + ":" + i)
  51014. }
  51015. )),
  51016. e.join(";")
  51017. }(c)),
  51018. null != p && i.push("padding:" + vp(p).join("px ") + "px"),
  51019. i.join(";") + ";"
  51020. }
  51021. function mV(t, e, n, i, r) {
  51022. var o = e && e.painter;
  51023. if (n) {
  51024. var a = o && o.getViewportRoot();
  51025. a && function(t, e, n, i, r) {
  51026. te(Qt, e, i, r, !0) && te(t, n, Qt[0], Qt[1])
  51027. }(t, a, n, i, r)
  51028. } else {
  51029. t[0] = i,
  51030. t[1] = r;
  51031. var s = o && o.getViewportRootOffset();
  51032. s && (t[0] += s.offsetLeft,
  51033. t[1] += s.offsetTop)
  51034. }
  51035. t[2] = t[0] / e.getWidth(),
  51036. t[3] = t[1] / e.getHeight()
  51037. }
  51038. var xV = function() {
  51039. function t(t, e) {
  51040. if (this._show = !1,
  51041. this._styleCoord = [0, 0, 0, 0],
  51042. this._enterable = !0,
  51043. this._alwaysShowContent = !1,
  51044. this._firstShow = !0,
  51045. this._longHide = !0,
  51046. r.wxa)
  51047. return null;
  51048. var n = document.createElement("div");
  51049. n.domBelongToZr = !0,
  51050. this.el = n;
  51051. var i = this._zr = t.getZr()
  51052. , o = e.appendTo
  51053. , a = o && (U(o) ? document.querySelector(o) : J(o) ? o : X(o) && o(t.getDom()));
  51054. mV(this._styleCoord, i, a, t.getWidth() / 2, t.getHeight() / 2),
  51055. (a || t.getDom()).appendChild(n),
  51056. this._api = t,
  51057. this._container = a;
  51058. var s = this;
  51059. n.onmouseenter = function() {
  51060. s._enterable && (clearTimeout(s._hideTimeout),
  51061. s._show = !0),
  51062. s._inContent = !0
  51063. }
  51064. ,
  51065. n.onmousemove = function(t) {
  51066. if (t = t || window.event,
  51067. !s._enterable) {
  51068. var e = i.handler;
  51069. ce(i.painter.getViewportRoot(), t, !0),
  51070. e.dispatch("mousemove", t)
  51071. }
  51072. }
  51073. ,
  51074. n.onmouseleave = function() {
  51075. s._inContent = !1,
  51076. s._enterable && s._show && s.hideLater(s._hideDelay)
  51077. }
  51078. }
  51079. return t.prototype.update = function(t) {
  51080. if (!this._container) {
  51081. var e = this._api.getDom()
  51082. , n = (o = "position",
  51083. (a = (r = e).currentStyle || document.defaultView && document.defaultView.getComputedStyle(r)) ? o ? a[o] : a : null)
  51084. , i = e.style;
  51085. "absolute" !== i.position && "absolute" !== n && (i.position = "relative")
  51086. }
  51087. var r, o, a, s = t.get("alwaysShowContent");
  51088. s && this._moveIfResized(),
  51089. this._alwaysShowContent = s,
  51090. this.el.className = t.get("className") || ""
  51091. }
  51092. ,
  51093. t.prototype.show = function(t, e) {
  51094. clearTimeout(this._hideTimeout),
  51095. clearTimeout(this._longHideTimeout);
  51096. var n = this.el
  51097. , i = n.style
  51098. , r = this._styleCoord;
  51099. n.innerHTML ? i.cssText = gV + vV(t, !this._firstShow, this._longHide) + yV(r[0], r[1], !0) + "border-color:" + Sp(e) + ";" + (t.get("extraCssText") || "") + ";pointer-events:" + (this._enterable ? "auto" : "none") : i.display = "none",
  51100. this._show = !0,
  51101. this._firstShow = !1,
  51102. this._longHide = !1
  51103. }
  51104. ,
  51105. t.prototype.setContent = function(t, e, n, i, r) {
  51106. var o = this.el;
  51107. if (null != t) {
  51108. var a = "";
  51109. if (U(r) && "item" === n.get("trigger") && !uV(n) && (a = function(t, e, n) {
  51110. if (!U(n) || "inside" === n)
  51111. return "";
  51112. var i = t.get("backgroundColor")
  51113. , r = t.get("borderWidth");
  51114. e = Sp(e);
  51115. var o, a, s = "left" === (o = n) ? "right" : "right" === o ? "left" : "top" === o ? "bottom" : "top", l = Math.max(1.5 * Math.round(r), 6), u = "", h = fV + ":";
  51116. P(["left", "right"], s) > -1 ? (u += "top:50%",
  51117. h += "translateY(-50%) rotate(" + (a = "left" === s ? -225 : -45) + "deg)") : (u += "left:50%",
  51118. h += "translateX(-50%) rotate(" + (a = "top" === s ? 225 : 45) + "deg)");
  51119. var c = a * Math.PI / 180
  51120. , p = l + r
  51121. , d = p * Math.abs(Math.cos(c)) + p * Math.abs(Math.sin(c))
  51122. , f = e + " solid " + r + "px;";
  51123. 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>'
  51124. }(n, i, r)),
  51125. U(t))
  51126. o.innerHTML = t + a;
  51127. else if (t) {
  51128. o.innerHTML = "",
  51129. Y(t) || (t = [t]);
  51130. for (var s = 0; s < t.length; s++)
  51131. J(t[s]) && t[s].parentNode !== o && o.appendChild(t[s]);
  51132. if (a && o.childNodes.length) {
  51133. var l = document.createElement("div");
  51134. l.innerHTML = a,
  51135. o.appendChild(l)
  51136. }
  51137. }
  51138. } else
  51139. o.innerHTML = ""
  51140. }
  51141. ,
  51142. t.prototype.setEnterable = function(t) {
  51143. this._enterable = t
  51144. }
  51145. ,
  51146. t.prototype.getSize = function() {
  51147. var t = this.el;
  51148. return t ? [t.offsetWidth, t.offsetHeight] : [0, 0]
  51149. }
  51150. ,
  51151. t.prototype.moveTo = function(t, e) {
  51152. if (this.el) {
  51153. var n = this._styleCoord;
  51154. if (mV(n, this._zr, this._container, t, e),
  51155. null != n[0] && null != n[1]) {
  51156. var i = this.el.style;
  51157. E(yV(n[0], n[1]), (function(t) {
  51158. i[t[0]] = t[1]
  51159. }
  51160. ))
  51161. }
  51162. }
  51163. }
  51164. ,
  51165. t.prototype._moveIfResized = function() {
  51166. var t = this._styleCoord[2]
  51167. , e = this._styleCoord[3];
  51168. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  51169. }
  51170. ,
  51171. t.prototype.hide = function() {
  51172. var t = this
  51173. , e = this.el.style;
  51174. e.visibility = "hidden",
  51175. e.opacity = "0",
  51176. r.transform3dSupported && (e.willChange = ""),
  51177. this._show = !1,
  51178. this._longHideTimeout = setTimeout((function() {
  51179. return t._longHide = !0
  51180. }
  51181. ), 500)
  51182. }
  51183. ,
  51184. t.prototype.hideLater = function(t) {
  51185. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t,
  51186. this._show = !1,
  51187. this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  51188. }
  51189. ,
  51190. t.prototype.isShow = function() {
  51191. return this._show
  51192. }
  51193. ,
  51194. t.prototype.dispose = function() {
  51195. clearTimeout(this._hideTimeout),
  51196. clearTimeout(this._longHideTimeout);
  51197. var t = this.el.parentNode;
  51198. t && t.removeChild(this.el),
  51199. this.el = this._container = null
  51200. }
  51201. ,
  51202. t
  51203. }()
  51204. , _V = function() {
  51205. function t(t) {
  51206. this._show = !1,
  51207. this._styleCoord = [0, 0, 0, 0],
  51208. this._alwaysShowContent = !1,
  51209. this._enterable = !0,
  51210. this._zr = t.getZr(),
  51211. SV(this._styleCoord, this._zr, t.getWidth() / 2, t.getHeight() / 2)
  51212. }
  51213. return t.prototype.update = function(t) {
  51214. var e = t.get("alwaysShowContent");
  51215. e && this._moveIfResized(),
  51216. this._alwaysShowContent = e
  51217. }
  51218. ,
  51219. t.prototype.show = function() {
  51220. this._hideTimeout && clearTimeout(this._hideTimeout),
  51221. this.el.show(),
  51222. this._show = !0
  51223. }
  51224. ,
  51225. t.prototype.setContent = function(t, e, n, i, r) {
  51226. var o = this;
  51227. q(t) && wo(""),
  51228. this.el && this._zr.remove(this.el);
  51229. var a = n.getModel("textStyle");
  51230. this.el = new Xs({
  51231. style: {
  51232. rich: e.richTextStyles,
  51233. text: t,
  51234. lineHeight: 22,
  51235. borderWidth: 1,
  51236. borderColor: i,
  51237. textShadowColor: a.get("textShadowColor"),
  51238. fill: n.get(["textStyle", "color"]),
  51239. padding: gg(n, "richText"),
  51240. verticalAlign: "top",
  51241. align: "left"
  51242. },
  51243. z: n.get("z")
  51244. }),
  51245. E(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], (function(t) {
  51246. o.el.style[t] = n.get(t)
  51247. }
  51248. )),
  51249. E(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], (function(t) {
  51250. o.el.style[t] = a.get(t) || 0
  51251. }
  51252. )),
  51253. this._zr.add(this.el);
  51254. var s = this;
  51255. this.el.on("mouseover", (function() {
  51256. s._enterable && (clearTimeout(s._hideTimeout),
  51257. s._show = !0),
  51258. s._inContent = !0
  51259. }
  51260. )),
  51261. this.el.on("mouseout", (function() {
  51262. s._enterable && s._show && s.hideLater(s._hideDelay),
  51263. s._inContent = !1
  51264. }
  51265. ))
  51266. }
  51267. ,
  51268. t.prototype.setEnterable = function(t) {
  51269. this._enterable = t
  51270. }
  51271. ,
  51272. t.prototype.getSize = function() {
  51273. var t = this.el
  51274. , e = this.el.getBoundingRect()
  51275. , n = wV(t.style);
  51276. return [e.width + n.left + n.right, e.height + n.top + n.bottom]
  51277. }
  51278. ,
  51279. t.prototype.moveTo = function(t, e) {
  51280. var n = this.el;
  51281. if (n) {
  51282. var i = this._styleCoord;
  51283. SV(i, this._zr, t, e),
  51284. t = i[0],
  51285. e = i[1];
  51286. var r = n.style
  51287. , o = bV(r.borderWidth || 0)
  51288. , a = wV(r);
  51289. n.x = t + o + a.left,
  51290. n.y = e + o + a.top,
  51291. n.markRedraw()
  51292. }
  51293. }
  51294. ,
  51295. t.prototype._moveIfResized = function() {
  51296. var t = this._styleCoord[2]
  51297. , e = this._styleCoord[3];
  51298. this.moveTo(t * this._zr.getWidth(), e * this._zr.getHeight())
  51299. }
  51300. ,
  51301. t.prototype.hide = function() {
  51302. this.el && this.el.hide(),
  51303. this._show = !1
  51304. }
  51305. ,
  51306. t.prototype.hideLater = function(t) {
  51307. !this._show || this._inContent && this._enterable || this._alwaysShowContent || (t ? (this._hideDelay = t,
  51308. this._show = !1,
  51309. this._hideTimeout = setTimeout(W(this.hide, this), t)) : this.hide())
  51310. }
  51311. ,
  51312. t.prototype.isShow = function() {
  51313. return this._show
  51314. }
  51315. ,
  51316. t.prototype.dispose = function() {
  51317. this._zr.remove(this.el)
  51318. }
  51319. ,
  51320. t
  51321. }();
  51322. function bV(t) {
  51323. return Math.max(0, t)
  51324. }
  51325. function wV(t) {
  51326. var e = bV(t.shadowBlur || 0)
  51327. , n = bV(t.shadowOffsetX || 0)
  51328. , i = bV(t.shadowOffsetY || 0);
  51329. return {
  51330. left: bV(e - n),
  51331. right: bV(e + n),
  51332. top: bV(e - i),
  51333. bottom: bV(e + i)
  51334. }
  51335. }
  51336. function SV(t, e, n, i) {
  51337. t[0] = n,
  51338. t[1] = i,
  51339. t[2] = t[0] / e.getWidth(),
  51340. t[3] = t[1] / e.getHeight()
  51341. }
  51342. var MV = new Ws({
  51343. shape: {
  51344. x: -1,
  51345. y: -1,
  51346. width: 2,
  51347. height: 2
  51348. }
  51349. })
  51350. , IV = function(t) {
  51351. function e() {
  51352. var n = null !== t && t.apply(this, arguments) || this;
  51353. return n.type = e.type,
  51354. n
  51355. }
  51356. return n(e, t),
  51357. e.prototype.init = function(t, e) {
  51358. if (!r.node && e.getDom()) {
  51359. var n, i = t.getComponent("tooltip"), o = this._renderMode = "auto" === (n = i.get("renderMode")) ? r.domSupported ? "html" : "richText" : n || "html";
  51360. this._tooltipContent = "richText" === o ? new _V(e) : new xV(e,{
  51361. appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
  51362. })
  51363. }
  51364. }
  51365. ,
  51366. e.prototype.render = function(t, e, n) {
  51367. if (!r.node && n.getDom()) {
  51368. this.group.removeAll(),
  51369. this._tooltipModel = t,
  51370. this._ecModel = e,
  51371. this._api = n;
  51372. var i = this._tooltipContent;
  51373. i.update(t),
  51374. i.setEnterable(t.get("enterable")),
  51375. this._initGlobalListener(),
  51376. this._keepShow(),
  51377. "richText" !== this._renderMode && t.get("transitionDuration") ? Hg(this, "_updatePosition", 50, "fixRate") : Yg(this, "_updatePosition")
  51378. }
  51379. }
  51380. ,
  51381. e.prototype._initGlobalListener = function() {
  51382. var t = this._tooltipModel.get("triggerOn");
  51383. AN("itemTooltip", this._api, W((function(e, n, i) {
  51384. "none" !== t && (t.indexOf(e) >= 0 ? this._tryShow(n, i) : "leave" === e && this._hide(i))
  51385. }
  51386. ), this))
  51387. }
  51388. ,
  51389. e.prototype._keepShow = function() {
  51390. var t = this._tooltipModel
  51391. , e = this._ecModel
  51392. , n = this._api
  51393. , i = t.get("triggerOn");
  51394. if (null != this._lastX && null != this._lastY && "none" !== i && "click" !== i) {
  51395. var r = this;
  51396. clearTimeout(this._refreshUpdateTimeout),
  51397. this._refreshUpdateTimeout = setTimeout((function() {
  51398. !n.isDisposed() && r.manuallyShowTip(t, e, n, {
  51399. x: r._lastX,
  51400. y: r._lastY,
  51401. dataByCoordSys: r._lastDataByCoordSys
  51402. })
  51403. }
  51404. ))
  51405. }
  51406. }
  51407. ,
  51408. e.prototype.manuallyShowTip = function(t, e, n, i) {
  51409. if (i.from !== this.uid && !r.node && n.getDom()) {
  51410. var o = CV(i, n);
  51411. this._ticket = "";
  51412. var a = i.dataByCoordSys
  51413. , s = function(t, e, n) {
  51414. var i = Go(t).queryOptionMap
  51415. , r = i.keys()[0];
  51416. if (!r || "series" === r)
  51417. return;
  51418. var o = Yo(e, r, i.get(r), {
  51419. useDefault: !1,
  51420. enableAll: !1,
  51421. enableNone: !1
  51422. })
  51423. , a = o.models[0];
  51424. if (!a)
  51425. return;
  51426. var s, l = n.getViewOfComponentModel(a);
  51427. if (l.group.traverse((function(e) {
  51428. var n = rl(e).tooltipConfig;
  51429. if (n && n.name === t.name)
  51430. return s = e,
  51431. !0
  51432. }
  51433. )),
  51434. s)
  51435. return {
  51436. componentMainType: r,
  51437. componentIndex: a.componentIndex,
  51438. el: s
  51439. }
  51440. }(i, e, n);
  51441. if (s) {
  51442. var l = s.el.getBoundingRect().clone();
  51443. l.applyTransform(s.el.transform),
  51444. this._tryShow({
  51445. offsetX: l.x + l.width / 2,
  51446. offsetY: l.y + l.height / 2,
  51447. target: s.el,
  51448. position: i.position,
  51449. positionDefault: "bottom"
  51450. }, o)
  51451. } else if (i.tooltip && null != i.x && null != i.y) {
  51452. var u = MV;
  51453. u.x = i.x,
  51454. u.y = i.y,
  51455. u.update(),
  51456. rl(u).tooltipConfig = {
  51457. name: null,
  51458. option: i.tooltip
  51459. },
  51460. this._tryShow({
  51461. offsetX: i.x,
  51462. offsetY: i.y,
  51463. target: u
  51464. }, o)
  51465. } else if (a)
  51466. this._tryShow({
  51467. offsetX: i.x,
  51468. offsetY: i.y,
  51469. position: i.position,
  51470. dataByCoordSys: a,
  51471. tooltipOption: i.tooltipOption
  51472. }, o);
  51473. else if (null != i.seriesIndex) {
  51474. if (this._manuallyAxisShowTip(t, e, n, i))
  51475. return;
  51476. var h = RN(i, e)
  51477. , c = h.point[0]
  51478. , p = h.point[1];
  51479. null != c && null != p && this._tryShow({
  51480. offsetX: c,
  51481. offsetY: p,
  51482. target: h.el,
  51483. position: i.position,
  51484. positionDefault: "bottom"
  51485. }, o)
  51486. } else
  51487. null != i.x && null != i.y && (n.dispatchAction({
  51488. type: "updateAxisPointer",
  51489. x: i.x,
  51490. y: i.y
  51491. }),
  51492. this._tryShow({
  51493. offsetX: i.x,
  51494. offsetY: i.y,
  51495. position: i.position,
  51496. target: n.getZr().findHover(i.x, i.y).target
  51497. }, o))
  51498. }
  51499. }
  51500. ,
  51501. e.prototype.manuallyHideTip = function(t, e, n, i) {
  51502. var r = this._tooltipContent;
  51503. this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")),
  51504. this._lastX = this._lastY = this._lastDataByCoordSys = null,
  51505. i.from !== this.uid && this._hide(CV(i, n))
  51506. }
  51507. ,
  51508. e.prototype._manuallyAxisShowTip = function(t, e, n, i) {
  51509. var r = i.seriesIndex
  51510. , o = i.dataIndex
  51511. , a = e.getComponent("axisPointer").coordSysAxesInfo;
  51512. if (null != r && null != o && null != a) {
  51513. var s = e.getSeriesByIndex(r);
  51514. if (s)
  51515. if ("axis" === TV([s.getData().getItemModel(o), s, (s.coordinateSystem || {}).model], this._tooltipModel).get("trigger"))
  51516. return n.dispatchAction({
  51517. type: "updateAxisPointer",
  51518. seriesIndex: r,
  51519. dataIndex: o,
  51520. position: i.position
  51521. }),
  51522. !0
  51523. }
  51524. }
  51525. ,
  51526. e.prototype._tryShow = function(t, e) {
  51527. var n = t.target;
  51528. if (this._tooltipModel) {
  51529. this._lastX = t.offsetX,
  51530. this._lastY = t.offsetY;
  51531. var i = t.dataByCoordSys;
  51532. if (i && i.length)
  51533. this._showAxisTooltip(i, t);
  51534. else if (n) {
  51535. var r, o;
  51536. if ("legend" === rl(n).ssrType)
  51537. return;
  51538. this._lastDataByCoordSys = null,
  51539. Oy(n, (function(t) {
  51540. return null != rl(t).dataIndex ? (r = t,
  51541. !0) : null != rl(t).tooltipConfig ? (o = t,
  51542. !0) : void 0
  51543. }
  51544. ), !0),
  51545. r ? this._showSeriesItemTooltip(t, r, e) : o ? this._showComponentItemTooltip(t, o, e) : this._hide(e)
  51546. } else
  51547. this._lastDataByCoordSys = null,
  51548. this._hide(e)
  51549. }
  51550. }
  51551. ,
  51552. e.prototype._showOrMove = function(t, e) {
  51553. var n = t.get("showDelay");
  51554. e = W(e, this),
  51555. clearTimeout(this._showTimout),
  51556. n > 0 ? this._showTimout = setTimeout(e, n) : e()
  51557. }
  51558. ,
  51559. e.prototype._showAxisTooltip = function(t, e) {
  51560. var n = this._ecModel
  51561. , i = this._tooltipModel
  51562. , r = [e.offsetX, e.offsetY]
  51563. , o = TV([e.tooltipOption], i)
  51564. , a = this._renderMode
  51565. , s = []
  51566. , l = og("section", {
  51567. blocks: [],
  51568. noHeader: !0
  51569. })
  51570. , u = []
  51571. , h = new yg;
  51572. E(t, (function(t) {
  51573. E(t.dataByAxis, (function(t) {
  51574. var e = n.getComponent(t.axisDim + "Axis", t.axisIndex)
  51575. , r = t.value;
  51576. if (e && null != r) {
  51577. var o = yN(r, e.axis, n, t.seriesDataIndices, t.valueLabelOpt)
  51578. , c = og("section", {
  51579. header: o,
  51580. noHeader: !ut(o),
  51581. sortBlocks: !0,
  51582. blocks: []
  51583. });
  51584. l.blocks.push(c),
  51585. E(t.seriesDataIndices, (function(l) {
  51586. var p = n.getSeriesByIndex(l.seriesIndex)
  51587. , d = l.dataIndexInside
  51588. , f = p.getDataParams(d);
  51589. if (!(f.dataIndex < 0)) {
  51590. f.axisDim = t.axisDim,
  51591. f.axisIndex = t.axisIndex,
  51592. f.axisType = t.axisType,
  51593. f.axisId = t.axisId,
  51594. f.axisValue = S_(e.axis, {
  51595. value: r
  51596. }),
  51597. f.axisValueLabel = o,
  51598. f.marker = h.makeTooltipMarker("item", Sp(f.color), a);
  51599. var g = bf(p.formatTooltip(d, !0, null))
  51600. , y = g.frag;
  51601. if (y) {
  51602. var v = TV([p], i).get("valueFormatter");
  51603. c.blocks.push(v ? A({
  51604. valueFormatter: v
  51605. }, y) : y)
  51606. }
  51607. g.text && u.push(g.text),
  51608. s.push(f)
  51609. }
  51610. }
  51611. ))
  51612. }
  51613. }
  51614. ))
  51615. }
  51616. )),
  51617. l.blocks.reverse(),
  51618. u.reverse();
  51619. var c = e.position
  51620. , p = o.get("order")
  51621. , d = cg(l, h, a, p, n.get("useUTC"), o.get("textStyle"));
  51622. d && u.unshift(d);
  51623. var f = "richText" === a ? "\n\n" : "<br/>"
  51624. , g = u.join(f);
  51625. this._showOrMove(o, (function() {
  51626. 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)
  51627. }
  51628. ))
  51629. }
  51630. ,
  51631. e.prototype._showSeriesItemTooltip = function(t, e, n) {
  51632. var i = this._ecModel
  51633. , r = rl(e)
  51634. , o = r.seriesIndex
  51635. , a = i.getSeriesByIndex(o)
  51636. , s = r.dataModel || a
  51637. , l = r.dataIndex
  51638. , u = r.dataType
  51639. , h = s.getData(u)
  51640. , c = this._renderMode
  51641. , p = t.positionDefault
  51642. , d = TV([h.getItemModel(l), s, a && (a.coordinateSystem || {}).model], this._tooltipModel, p ? {
  51643. position: p
  51644. } : null)
  51645. , f = d.get("trigger");
  51646. if (null == f || "item" === f) {
  51647. var g = s.getDataParams(l, u)
  51648. , y = new yg;
  51649. g.marker = y.makeTooltipMarker("item", Sp(g.color), c);
  51650. var v = bf(s.formatTooltip(l, !1, u))
  51651. , m = d.get("order")
  51652. , x = d.get("valueFormatter")
  51653. , _ = v.frag
  51654. , b = _ ? cg(x ? A({
  51655. valueFormatter: x
  51656. }, _) : _, y, c, m, i.get("useUTC"), d.get("textStyle")) : v.text
  51657. , w = "item_" + s.name + "_" + l;
  51658. this._showOrMove(d, (function() {
  51659. this._showTooltipContent(d, b, g, w, t.offsetX, t.offsetY, t.position, t.target, y)
  51660. }
  51661. )),
  51662. n({
  51663. type: "showTip",
  51664. dataIndexInside: l,
  51665. dataIndex: h.getRawIndex(l),
  51666. seriesIndex: o,
  51667. from: this.uid
  51668. })
  51669. }
  51670. }
  51671. ,
  51672. e.prototype._showComponentItemTooltip = function(t, e, n) {
  51673. var i = "html" === this._renderMode
  51674. , r = rl(e)
  51675. , o = r.tooltipConfig.option || {}
  51676. , a = o.encodeHTMLContent;
  51677. if (U(o)) {
  51678. o = {
  51679. content: o,
  51680. formatter: o
  51681. },
  51682. a = !0
  51683. }
  51684. a && i && o.content && ((o = T(o)).content = re(o.content));
  51685. var s = [o]
  51686. , l = this._ecModel.getComponent(r.componentMainType, r.componentIndex);
  51687. l && s.push(l),
  51688. s.push({
  51689. formatter: o.content
  51690. });
  51691. var u = t.positionDefault
  51692. , h = TV(s, this._tooltipModel, u ? {
  51693. position: u
  51694. } : null)
  51695. , c = h.get("content")
  51696. , p = Math.random() + ""
  51697. , d = new yg;
  51698. this._showOrMove(h, (function() {
  51699. var n = T(h.get("formatterParams") || {});
  51700. this._showTooltipContent(h, c, n, p, t.offsetX, t.offsetY, t.position, e, d)
  51701. }
  51702. )),
  51703. n({
  51704. type: "showTip",
  51705. from: this.uid
  51706. })
  51707. }
  51708. ,
  51709. e.prototype._showTooltipContent = function(t, e, n, i, r, o, a, s, l) {
  51710. if (this._ticket = "",
  51711. t.get("showContent") && t.get("show")) {
  51712. var u = this._tooltipContent;
  51713. u.setEnterable(t.get("enterable"));
  51714. var h = t.get("formatter");
  51715. a = a || t.get("position");
  51716. var c = e
  51717. , p = this._getNearestPoint([r, o], n, t.get("trigger"), t.get("borderColor")).color;
  51718. if (h)
  51719. if (U(h)) {
  51720. var d = t.ecModel.get("useUTC")
  51721. , f = Y(n) ? n[0] : n;
  51722. c = h,
  51723. f && f.axisType && f.axisType.indexOf("time") >= 0 && (c = Jc(f.axisValue, c, d)),
  51724. c = bp(c, n, !0)
  51725. } else if (X(h)) {
  51726. var g = W((function(e, i) {
  51727. e === this._ticket && (u.setContent(i, l, t, p, a),
  51728. this._updatePosition(t, a, r, o, u, n, s))
  51729. }
  51730. ), this);
  51731. this._ticket = i,
  51732. c = h(n, i, g)
  51733. } else
  51734. c = h;
  51735. u.setContent(c, l, t, p, a),
  51736. u.show(t, p),
  51737. this._updatePosition(t, a, r, o, u, n, s)
  51738. }
  51739. }
  51740. ,
  51741. e.prototype._getNearestPoint = function(t, e, n, i) {
  51742. return "axis" === n || Y(e) ? {
  51743. color: i || ("html" === this._renderMode ? "#fff" : "none")
  51744. } : Y(e) ? void 0 : {
  51745. color: i || e.color || e.borderColor
  51746. }
  51747. }
  51748. ,
  51749. e.prototype._updatePosition = function(t, e, n, i, r, o, a) {
  51750. var s = this._api.getWidth()
  51751. , l = this._api.getHeight();
  51752. e = e || t.get("position");
  51753. var u = r.getSize()
  51754. , h = t.get("align")
  51755. , c = t.get("verticalAlign")
  51756. , p = a && a.getBoundingRect().clone();
  51757. if (a && p.applyTransform(a.transform),
  51758. X(e) && (e = e([n, i], o, r.el, p, {
  51759. viewSize: [s, l],
  51760. contentSize: u.slice()
  51761. })),
  51762. Y(e))
  51763. n = $r(e[0], s),
  51764. i = $r(e[1], l);
  51765. else if (q(e)) {
  51766. var d = e;
  51767. d.width = u[0],
  51768. d.height = u[1];
  51769. var f = kp(d, {
  51770. width: s,
  51771. height: l
  51772. });
  51773. n = f.x,
  51774. i = f.y,
  51775. h = null,
  51776. c = null
  51777. } else if (U(e) && a) {
  51778. var g = function(t, e, n, i) {
  51779. var r = n[0]
  51780. , o = n[1]
  51781. , a = Math.ceil(Math.SQRT2 * i) + 8
  51782. , s = 0
  51783. , l = 0
  51784. , u = e.width
  51785. , h = e.height;
  51786. switch (t) {
  51787. case "inside":
  51788. s = e.x + u / 2 - r / 2,
  51789. l = e.y + h / 2 - o / 2;
  51790. break;
  51791. case "top":
  51792. s = e.x + u / 2 - r / 2,
  51793. l = e.y - o - a;
  51794. break;
  51795. case "bottom":
  51796. s = e.x + u / 2 - r / 2,
  51797. l = e.y + h + a;
  51798. break;
  51799. case "left":
  51800. s = e.x - r - a,
  51801. l = e.y + h / 2 - o / 2;
  51802. break;
  51803. case "right":
  51804. s = e.x + u + a,
  51805. l = e.y + h / 2 - o / 2
  51806. }
  51807. return [s, l]
  51808. }(e, p, u, t.get("borderWidth"));
  51809. n = g[0],
  51810. i = g[1]
  51811. } else {
  51812. g = function(t, e, n, i, r, o, a) {
  51813. var s = n.getSize()
  51814. , l = s[0]
  51815. , u = s[1];
  51816. null != o && (t + l + o + 2 > i ? t -= l + o : t += o);
  51817. null != a && (e + u + a > r ? e -= u + a : e += a);
  51818. return [t, e]
  51819. }(n, i, r, s, l, h ? null : 20, c ? null : 20);
  51820. n = g[0],
  51821. i = g[1]
  51822. }
  51823. if (h && (n -= DV(h) ? u[0] / 2 : "right" === h ? u[0] : 0),
  51824. c && (i -= DV(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0),
  51825. uV(t)) {
  51826. g = function(t, e, n, i, r) {
  51827. var o = n.getSize()
  51828. , a = o[0]
  51829. , s = o[1];
  51830. return t = Math.min(t + a, i) - a,
  51831. e = Math.min(e + s, r) - s,
  51832. t = Math.max(t, 0),
  51833. e = Math.max(e, 0),
  51834. [t, e]
  51835. }(n, i, r, s, l);
  51836. n = g[0],
  51837. i = g[1]
  51838. }
  51839. r.moveTo(n, i)
  51840. }
  51841. ,
  51842. e.prototype._updateContentNotChangedOnAxis = function(t, e) {
  51843. var n = this._lastDataByCoordSys
  51844. , i = this._cbParamsList
  51845. , r = !!n && n.length === t.length;
  51846. return r && E(n, (function(n, o) {
  51847. var a = n.dataByAxis || []
  51848. , s = (t[o] || {}).dataByAxis || [];
  51849. (r = r && a.length === s.length) && E(a, (function(t, n) {
  51850. var o = s[n] || {}
  51851. , a = t.seriesDataIndices || []
  51852. , l = o.seriesDataIndices || [];
  51853. (r = r && t.value === o.value && t.axisType === o.axisType && t.axisId === o.axisId && a.length === l.length) && E(a, (function(t, e) {
  51854. var n = l[e];
  51855. r = r && t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
  51856. }
  51857. )),
  51858. i && E(t.seriesDataIndices, (function(t) {
  51859. var n = t.seriesIndex
  51860. , o = e[n]
  51861. , a = i[n];
  51862. o && a && a.data !== o.data && (r = !1)
  51863. }
  51864. ))
  51865. }
  51866. ))
  51867. }
  51868. )),
  51869. this._lastDataByCoordSys = t,
  51870. this._cbParamsList = e,
  51871. !!r
  51872. }
  51873. ,
  51874. e.prototype._hide = function(t) {
  51875. this._lastDataByCoordSys = null,
  51876. t({
  51877. type: "hideTip",
  51878. from: this.uid
  51879. })
  51880. }
  51881. ,
  51882. e.prototype.dispose = function(t, e) {
  51883. !r.node && e.getDom() && (Yg(this, "_updatePosition"),
  51884. this._tooltipContent.dispose(),
  51885. PN("itemTooltip", e))
  51886. }
  51887. ,
  51888. e.type = "tooltip",
  51889. e
  51890. }(Ag);
  51891. function TV(t, e, n) {
  51892. var i, r = e.ecModel;
  51893. n ? (i = new Cc(n,r,r),
  51894. i = new Cc(e.option,i,r)) : i = e;
  51895. for (var o = t.length - 1; o >= 0; o--) {
  51896. var a = t[o];
  51897. a && (a instanceof Cc && (a = a.get("tooltip", !0)),
  51898. U(a) && (a = {
  51899. formatter: a
  51900. }),
  51901. a && (i = new Cc(a,i,r)))
  51902. }
  51903. return i
  51904. }
  51905. function CV(t, e) {
  51906. return t.dispatchAction || W(e.dispatchAction, e)
  51907. }
  51908. function DV(t) {
  51909. return "center" === t || "middle" === t
  51910. }
  51911. var AV = ["rect", "polygon", "keep", "clear"];
  51912. function kV(t, e) {
  51913. var n = To(t ? t.brush : []);
  51914. if (n.length) {
  51915. var i = [];
  51916. E(n, (function(t) {
  51917. var e = t.hasOwnProperty("toolbox") ? t.toolbox : [];
  51918. e instanceof Array && (i = i.concat(e))
  51919. }
  51920. ));
  51921. var r = t && t.toolbox;
  51922. Y(r) && (r = r[0]),
  51923. r || (r = {
  51924. feature: {}
  51925. },
  51926. t.toolbox = [r]);
  51927. var o = r.feature || (r.feature = {})
  51928. , a = o.brush || (o.brush = {})
  51929. , s = a.type || (a.type = []);
  51930. s.push.apply(s, i),
  51931. function(t) {
  51932. var e = {};
  51933. E(t, (function(t) {
  51934. e[t] = 1
  51935. }
  51936. )),
  51937. t.length = 0,
  51938. E(e, (function(e, n) {
  51939. t.push(n)
  51940. }
  51941. ))
  51942. }(s),
  51943. e && !s.length && s.push.apply(s, AV)
  51944. }
  51945. }
  51946. var LV = E;
  51947. function PV(t) {
  51948. if (t)
  51949. for (var e in t)
  51950. if (t.hasOwnProperty(e))
  51951. return !0
  51952. }
  51953. function OV(t, e, n) {
  51954. var i = {};
  51955. return LV(e, (function(e) {
  51956. var r, o = i[e] = ((r = function() {}
  51957. ).prototype.__hidden = r.prototype,
  51958. new r);
  51959. LV(t[e], (function(t, i) {
  51960. if (kD.isValidType(i)) {
  51961. var r = {
  51962. type: i,
  51963. visual: t
  51964. };
  51965. n && n(r, e),
  51966. o[i] = new kD(r),
  51967. "opacity" === i && ((r = T(r)).type = "colorAlpha",
  51968. o.__hidden.__alphaForOpacity = new kD(r))
  51969. }
  51970. }
  51971. ))
  51972. }
  51973. )),
  51974. i
  51975. }
  51976. function RV(t, e, n) {
  51977. var i;
  51978. E(n, (function(t) {
  51979. e.hasOwnProperty(t) && PV(e[t]) && (i = !0)
  51980. }
  51981. )),
  51982. i && E(n, (function(n) {
  51983. e.hasOwnProperty(n) && PV(e[n]) ? t[n] = T(e[n]) : delete t[n]
  51984. }
  51985. ))
  51986. }
  51987. var NV = {
  51988. lineX: EV(0),
  51989. lineY: EV(1),
  51990. rect: {
  51991. point: function(t, e, n) {
  51992. return t && n.boundingRect.contain(t[0], t[1])
  51993. },
  51994. rect: function(t, e, n) {
  51995. return t && n.boundingRect.intersect(t)
  51996. }
  51997. },
  51998. polygon: {
  51999. point: function(t, e, n) {
  52000. return t && n.boundingRect.contain(t[0], t[1]) && P_(n.range, t[0], t[1])
  52001. },
  52002. rect: function(t, e, n) {
  52003. var i = n.range;
  52004. if (!t || i.length <= 1)
  52005. return !1;
  52006. var r = t.x
  52007. , o = t.y
  52008. , a = t.width
  52009. , s = t.height
  52010. , l = i[0];
  52011. 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
  52012. }
  52013. }
  52014. };
  52015. function EV(t) {
  52016. var e = ["x", "y"]
  52017. , n = ["width", "height"];
  52018. return {
  52019. point: function(e, n, i) {
  52020. if (e) {
  52021. var r = i.range;
  52022. return zV(e[t], r)
  52023. }
  52024. },
  52025. rect: function(i, r, o) {
  52026. if (i) {
  52027. var a = o.range
  52028. , s = [i[e[t]], i[e[t]] + i[n[t]]];
  52029. return s[1] < s[0] && s.reverse(),
  52030. zV(s[0], a) || zV(s[1], a) || zV(a[0], s) || zV(a[1], s)
  52031. }
  52032. }
  52033. }
  52034. }
  52035. function zV(t, e) {
  52036. return e[0] <= t && t <= e[1]
  52037. }
  52038. var VV = ["inBrush", "outOfBrush"]
  52039. , BV = "__ecBrushSelect"
  52040. , FV = "__ecInBrushSelectEvent";
  52041. function GV(t) {
  52042. t.eachComponent({
  52043. mainType: "brush"
  52044. }, (function(e) {
  52045. (e.brushTargetManager = new Yz(e.option,t)).setInputRanges(e.areas, t)
  52046. }
  52047. ))
  52048. }
  52049. function WV(t, e, n) {
  52050. var i, r, o = [];
  52051. t.eachComponent({
  52052. mainType: "brush"
  52053. }, (function(t) {
  52054. n && "takeGlobalCursor" === n.type && t.setBrushOption("brush" === n.key ? n.brushOption : {
  52055. brushType: !1
  52056. })
  52057. }
  52058. )),
  52059. GV(t),
  52060. t.eachComponent({
  52061. mainType: "brush"
  52062. }, (function(e, n) {
  52063. var a = {
  52064. brushId: e.id,
  52065. brushIndex: n,
  52066. brushName: e.name,
  52067. areas: T(e.areas),
  52068. selected: []
  52069. };
  52070. o.push(a);
  52071. var s = e.option
  52072. , l = s.brushLink
  52073. , u = []
  52074. , h = []
  52075. , c = []
  52076. , p = !1;
  52077. n || (i = s.throttleType,
  52078. r = s.throttleDelay);
  52079. var d = z(e.areas, (function(t) {
  52080. var e = XV[t.brushType]
  52081. , n = k({
  52082. boundingRect: e ? e(t) : void 0
  52083. }, t);
  52084. return n.selectors = function(t) {
  52085. var e = t.brushType
  52086. , n = {
  52087. point: function(i) {
  52088. return NV[e].point(i, n, t)
  52089. },
  52090. rect: function(i) {
  52091. return NV[e].rect(i, n, t)
  52092. }
  52093. };
  52094. return n
  52095. }(n),
  52096. n
  52097. }
  52098. ))
  52099. , f = OV(e.option, VV, (function(t) {
  52100. t.mappingMethod = "fixed"
  52101. }
  52102. ));
  52103. function g(t) {
  52104. return "all" === l || !!u[t]
  52105. }
  52106. function y(t) {
  52107. return !!t.length
  52108. }
  52109. Y(l) && E(l, (function(t) {
  52110. u[t] = 1
  52111. }
  52112. )),
  52113. t.eachSeries((function(n, i) {
  52114. var r = c[i] = [];
  52115. "parallel" === n.subType ? function(t, e) {
  52116. var n = t.coordinateSystem;
  52117. p = p || n.hasAxisBrushed(),
  52118. g(e) && n.eachActiveState(t.getData(), (function(t, e) {
  52119. "active" === t && (h[e] = 1)
  52120. }
  52121. ))
  52122. }(n, i) : function(n, i, r) {
  52123. if (!n.brushSelector || function(t, e) {
  52124. var n = t.option.seriesIndex;
  52125. return null != n && "all" !== n && (Y(n) ? P(n, e) < 0 : e !== n)
  52126. }(e, i))
  52127. return;
  52128. if (E(d, (function(i) {
  52129. e.brushTargetManager.controlSeries(i, n, t) && r.push(i),
  52130. p = p || y(r)
  52131. }
  52132. )),
  52133. g(i) && y(r)) {
  52134. var o = n.getData();
  52135. o.each((function(t) {
  52136. YV(n, r, o, t) && (h[t] = 1)
  52137. }
  52138. ))
  52139. }
  52140. }(n, i, r)
  52141. }
  52142. )),
  52143. t.eachSeries((function(t, e) {
  52144. var n = {
  52145. seriesId: t.id,
  52146. seriesIndex: e,
  52147. seriesName: t.name,
  52148. dataIndex: []
  52149. };
  52150. a.selected.push(n);
  52151. var i = c[e]
  52152. , r = t.getData()
  52153. , o = g(e) ? function(t) {
  52154. return h[t] ? (n.dataIndex.push(r.getRawIndex(t)),
  52155. "inBrush") : "outOfBrush"
  52156. }
  52157. : function(e) {
  52158. return YV(t, i, r, e) ? (n.dataIndex.push(r.getRawIndex(e)),
  52159. "inBrush") : "outOfBrush"
  52160. }
  52161. ;
  52162. (g(e) ? p : y(i)) && function(t, e, n, i, r, o) {
  52163. var a, s = {};
  52164. function l(t) {
  52165. return Dy(n, a, t)
  52166. }
  52167. function u(t, e) {
  52168. ky(n, a, t, e)
  52169. }
  52170. function h(t, h) {
  52171. a = null == o ? t : h;
  52172. var c = n.getRawDataItem(a);
  52173. if (!c || !1 !== c.visualMap)
  52174. for (var p = i.call(r, t), d = e[p], f = s[p], g = 0, y = f.length; g < y; g++) {
  52175. var v = f[g];
  52176. d[v] && d[v].applyVisual(t, l, u)
  52177. }
  52178. }
  52179. E(t, (function(t) {
  52180. var n = kD.prepareVisualTypes(e[t]);
  52181. s[t] = n
  52182. }
  52183. )),
  52184. null == o ? n.each(h) : n.each([o], h)
  52185. }(VV, f, r, o)
  52186. }
  52187. ))
  52188. }
  52189. )),
  52190. function(t, e, n, i, r) {
  52191. if (!r)
  52192. return;
  52193. var o = t.getZr();
  52194. if (o[FV])
  52195. return;
  52196. o[BV] || (o[BV] = HV);
  52197. var a = Hg(o, BV, n, e);
  52198. a(t, i)
  52199. }(e, i, r, o, n)
  52200. }
  52201. function HV(t, e) {
  52202. if (!t.isDisposed()) {
  52203. var n = t.getZr();
  52204. n[FV] = !0,
  52205. t.dispatchAction({
  52206. type: "brushSelect",
  52207. batch: e
  52208. }),
  52209. n[FV] = !1
  52210. }
  52211. }
  52212. function YV(t, e, n, i) {
  52213. for (var r = 0, o = e.length; r < o; r++) {
  52214. var a = e[r];
  52215. if (t.brushSelector(i, n, a.selectors, a))
  52216. return !0
  52217. }
  52218. }
  52219. var XV = {
  52220. rect: function(t) {
  52221. return UV(t.range)
  52222. },
  52223. polygon: function(t) {
  52224. for (var e, n = t.range, i = 0, r = n.length; i < r; i++) {
  52225. e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  52226. var o = n[i];
  52227. o[0] < e[0][0] && (e[0][0] = o[0]),
  52228. o[0] > e[0][1] && (e[0][1] = o[0]),
  52229. o[1] < e[1][0] && (e[1][0] = o[1]),
  52230. o[1] > e[1][1] && (e[1][1] = o[1])
  52231. }
  52232. return e && UV(e)
  52233. }
  52234. };
  52235. function UV(t) {
  52236. return new ze(t[0][0],t[1][0],t[0][1] - t[0][0],t[1][1] - t[1][0])
  52237. }
  52238. var ZV = function(t) {
  52239. function e() {
  52240. var n = null !== t && t.apply(this, arguments) || this;
  52241. return n.type = e.type,
  52242. n
  52243. }
  52244. return n(e, t),
  52245. e.prototype.init = function(t, e) {
  52246. this.ecModel = t,
  52247. this.api = e,
  52248. this.model,
  52249. (this._brushController = new lL(e.getZr())).on("brush", W(this._onBrush, this)).mount()
  52250. }
  52251. ,
  52252. e.prototype.render = function(t, e, n, i) {
  52253. this.model = t,
  52254. this._updateController(t, e, n, i)
  52255. }
  52256. ,
  52257. e.prototype.updateTransform = function(t, e, n, i) {
  52258. GV(e),
  52259. this._updateController(t, e, n, i)
  52260. }
  52261. ,
  52262. e.prototype.updateVisual = function(t, e, n, i) {
  52263. this.updateTransform(t, e, n, i)
  52264. }
  52265. ,
  52266. e.prototype.updateView = function(t, e, n, i) {
  52267. this._updateController(t, e, n, i)
  52268. }
  52269. ,
  52270. e.prototype._updateController = function(t, e, n, i) {
  52271. (!i || i.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())
  52272. }
  52273. ,
  52274. e.prototype.dispose = function() {
  52275. this._brushController.dispose()
  52276. }
  52277. ,
  52278. e.prototype._onBrush = function(t) {
  52279. var e = this.model.id
  52280. , n = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel);
  52281. (!t.isEnd || t.removeOnClick) && this.api.dispatchAction({
  52282. type: "brush",
  52283. brushId: e,
  52284. areas: T(n),
  52285. $from: e
  52286. }),
  52287. t.isEnd && this.api.dispatchAction({
  52288. type: "brushEnd",
  52289. brushId: e,
  52290. areas: T(n),
  52291. $from: e
  52292. })
  52293. }
  52294. ,
  52295. e.type = "brush",
  52296. e
  52297. }(Ag)
  52298. , jV = function(t) {
  52299. function e() {
  52300. var n = null !== t && t.apply(this, arguments) || this;
  52301. return n.type = e.type,
  52302. n.areas = [],
  52303. n.brushOption = {},
  52304. n
  52305. }
  52306. return n(e, t),
  52307. e.prototype.optionUpdated = function(t, e) {
  52308. var n = this.option;
  52309. !e && RV(n, t, ["inBrush", "outOfBrush"]);
  52310. var i = n.inBrush = n.inBrush || {};
  52311. n.outOfBrush = n.outOfBrush || {
  52312. color: "#ddd"
  52313. },
  52314. i.hasOwnProperty("liftZ") || (i.liftZ = 5)
  52315. }
  52316. ,
  52317. e.prototype.setAreas = function(t) {
  52318. t && (this.areas = z(t, (function(t) {
  52319. return qV(this.option, t)
  52320. }
  52321. ), this))
  52322. }
  52323. ,
  52324. e.prototype.setBrushOption = function(t) {
  52325. this.brushOption = qV(this.option, t),
  52326. this.brushType = this.brushOption.brushType
  52327. }
  52328. ,
  52329. e.type = "brush",
  52330. e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"],
  52331. e.defaultOption = {
  52332. seriesIndex: "all",
  52333. brushType: "rect",
  52334. brushMode: "single",
  52335. transformable: !0,
  52336. brushStyle: {
  52337. borderWidth: 1,
  52338. color: "rgba(210,219,238,0.3)",
  52339. borderColor: "#D2DBEE"
  52340. },
  52341. throttleType: "fixRate",
  52342. throttleDelay: 0,
  52343. removeOnClick: !0,
  52344. z: 1e4
  52345. },
  52346. e
  52347. }(zp);
  52348. function qV(t, e) {
  52349. return C({
  52350. brushType: t.brushType,
  52351. brushMode: t.brushMode,
  52352. transformable: t.transformable,
  52353. brushStyle: new Cc(t.brushStyle).getItemStyle(),
  52354. removeOnClick: t.removeOnClick,
  52355. z: t.z
  52356. }, e, !0)
  52357. }
  52358. var KV = ["rect", "polygon", "lineX", "lineY", "keep", "clear"]
  52359. , $V = function(t) {
  52360. function e() {
  52361. return null !== t && t.apply(this, arguments) || this
  52362. }
  52363. return n(e, t),
  52364. e.prototype.render = function(t, e, n) {
  52365. var i, r, o;
  52366. e.eachComponent({
  52367. mainType: "brush"
  52368. }, (function(t) {
  52369. i = t.brushType,
  52370. r = t.brushOption.brushMode || "single",
  52371. o = o || !!t.areas.length
  52372. }
  52373. )),
  52374. this._brushType = i,
  52375. this._brushMode = r,
  52376. E(t.get("type", !0), (function(e) {
  52377. t.setIconStatus(e, ("keep" === e ? "multiple" === r : "clear" === e ? o : e === i) ? "emphasis" : "normal")
  52378. }
  52379. ))
  52380. }
  52381. ,
  52382. e.prototype.updateView = function(t, e, n) {
  52383. this.render(t, e, n)
  52384. }
  52385. ,
  52386. e.prototype.getIcons = function() {
  52387. var t = this.model
  52388. , e = t.get("icon", !0)
  52389. , n = {};
  52390. return E(t.get("type", !0), (function(t) {
  52391. e[t] && (n[t] = e[t])
  52392. }
  52393. )),
  52394. n
  52395. }
  52396. ,
  52397. e.prototype.onclick = function(t, e, n) {
  52398. var i = this._brushType
  52399. , r = this._brushMode;
  52400. "clear" === n ? (e.dispatchAction({
  52401. type: "axisAreaSelect",
  52402. intervals: []
  52403. }),
  52404. e.dispatchAction({
  52405. type: "brush",
  52406. command: "clear",
  52407. areas: []
  52408. })) : e.dispatchAction({
  52409. type: "takeGlobalCursor",
  52410. key: "brush",
  52411. brushOption: {
  52412. brushType: "keep" === n ? i : i !== n && n,
  52413. brushMode: "keep" === n ? "multiple" === r ? "single" : "multiple" : r
  52414. }
  52415. })
  52416. }
  52417. ,
  52418. e.getDefaultOption = function(t) {
  52419. return {
  52420. show: !0,
  52421. type: KV.slice(),
  52422. icon: {
  52423. 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",
  52424. 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",
  52425. 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",
  52426. 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",
  52427. 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",
  52428. 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"
  52429. },
  52430. title: t.getLocaleModel().get(["toolbox", "brush", "title"])
  52431. }
  52432. }
  52433. ,
  52434. e
  52435. }(_z);
  52436. var JV = function(t) {
  52437. function e() {
  52438. var n = null !== t && t.apply(this, arguments) || this;
  52439. return n.type = e.type,
  52440. n.layoutMode = {
  52441. type: "box",
  52442. ignoreSize: !0
  52443. },
  52444. n
  52445. }
  52446. return n(e, t),
  52447. e.type = "title",
  52448. e.defaultOption = {
  52449. z: 6,
  52450. show: !0,
  52451. text: "",
  52452. target: "blank",
  52453. subtext: "",
  52454. subtarget: "blank",
  52455. left: 0,
  52456. top: 0,
  52457. backgroundColor: "rgba(0,0,0,0)",
  52458. borderColor: "#ccc",
  52459. borderWidth: 0,
  52460. padding: 5,
  52461. itemGap: 10,
  52462. textStyle: {
  52463. fontSize: 18,
  52464. fontWeight: "bold",
  52465. color: "#464646"
  52466. },
  52467. subtextStyle: {
  52468. fontSize: 12,
  52469. color: "#6E7079"
  52470. }
  52471. },
  52472. e
  52473. }(zp)
  52474. , QV = function(t) {
  52475. function e() {
  52476. var n = null !== t && t.apply(this, arguments) || this;
  52477. return n.type = e.type,
  52478. n
  52479. }
  52480. return n(e, t),
  52481. e.prototype.render = function(t, e, n) {
  52482. if (this.group.removeAll(),
  52483. t.get("show")) {
  52484. var i = this.group
  52485. , r = t.getModel("textStyle")
  52486. , o = t.getModel("subtextStyle")
  52487. , a = t.get("textAlign")
  52488. , s = rt(t.get("textBaseline"), t.get("textVerticalAlign"))
  52489. , l = new Xs({
  52490. style: oc(r, {
  52491. text: t.get("text"),
  52492. fill: r.getTextColor()
  52493. }, {
  52494. disableBox: !0
  52495. }),
  52496. z2: 10
  52497. })
  52498. , u = l.getBoundingRect()
  52499. , h = t.get("subtext")
  52500. , c = new Xs({
  52501. style: oc(o, {
  52502. text: h,
  52503. fill: o.getTextColor(),
  52504. y: u.height + t.get("itemGap"),
  52505. verticalAlign: "top"
  52506. }, {
  52507. disableBox: !0
  52508. }),
  52509. z2: 10
  52510. })
  52511. , p = t.get("link")
  52512. , d = t.get("sublink")
  52513. , f = t.get("triggerEvent", !0);
  52514. l.silent = !p && !f,
  52515. c.silent = !d && !f,
  52516. p && l.on("click", (function() {
  52517. Mp(p, "_" + t.get("target"))
  52518. }
  52519. )),
  52520. d && c.on("click", (function() {
  52521. Mp(d, "_" + t.get("subtarget"))
  52522. }
  52523. )),
  52524. rl(l).eventData = rl(c).eventData = f ? {
  52525. componentType: "title",
  52526. componentIndex: t.componentIndex
  52527. } : null,
  52528. i.add(l),
  52529. h && i.add(c);
  52530. var g = i.getBoundingRect()
  52531. , y = t.getBoxLayoutParams();
  52532. y.width = g.width,
  52533. y.height = g.height;
  52534. var v = kp(y, {
  52535. width: n.getWidth(),
  52536. height: n.getHeight()
  52537. }, t.get("padding"));
  52538. a || ("middle" === (a = t.get("left") || t.get("right")) && (a = "center"),
  52539. "right" === a ? v.x += v.width : "center" === a && (v.x += v.width / 2)),
  52540. s || ("center" === (s = t.get("top") || t.get("bottom")) && (s = "middle"),
  52541. "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2),
  52542. s = s || "top"),
  52543. i.x = v.x,
  52544. i.y = v.y,
  52545. i.markRedraw();
  52546. var m = {
  52547. align: a,
  52548. verticalAlign: s
  52549. };
  52550. l.setStyle(m),
  52551. c.setStyle(m),
  52552. g = i.getBoundingRect();
  52553. var x = v.margin
  52554. , _ = t.getItemStyle(["color", "opacity"]);
  52555. _.fill = t.get("backgroundColor");
  52556. var b = new Ws({
  52557. shape: {
  52558. x: g.x - x[3],
  52559. y: g.y - x[0],
  52560. width: g.width + x[1] + x[3],
  52561. height: g.height + x[0] + x[2],
  52562. r: t.get("borderRadius")
  52563. },
  52564. style: _,
  52565. subPixelOptimize: !0,
  52566. silent: !0
  52567. });
  52568. i.add(b)
  52569. }
  52570. }
  52571. ,
  52572. e.type = "title",
  52573. e
  52574. }(Ag);
  52575. var tB = function(t) {
  52576. function e() {
  52577. var n = null !== t && t.apply(this, arguments) || this;
  52578. return n.type = e.type,
  52579. n.layoutMode = "box",
  52580. n
  52581. }
  52582. return n(e, t),
  52583. e.prototype.init = function(t, e, n) {
  52584. this.mergeDefaultAndTheme(t, n),
  52585. this._initData()
  52586. }
  52587. ,
  52588. e.prototype.mergeOption = function(e) {
  52589. t.prototype.mergeOption.apply(this, arguments),
  52590. this._initData()
  52591. }
  52592. ,
  52593. e.prototype.setCurrentIndex = function(t) {
  52594. null == t && (t = this.option.currentIndex);
  52595. var e = this._data.count();
  52596. this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1),
  52597. t < 0 && (t = 0)),
  52598. this.option.currentIndex = t
  52599. }
  52600. ,
  52601. e.prototype.getCurrentIndex = function() {
  52602. return this.option.currentIndex
  52603. }
  52604. ,
  52605. e.prototype.isIndexMax = function() {
  52606. return this.getCurrentIndex() >= this._data.count() - 1
  52607. }
  52608. ,
  52609. e.prototype.setPlayState = function(t) {
  52610. this.option.autoPlay = !!t
  52611. }
  52612. ,
  52613. e.prototype.getPlayState = function() {
  52614. return !!this.option.autoPlay
  52615. }
  52616. ,
  52617. e.prototype._initData = function() {
  52618. var t, e = this.option, n = e.data || [], i = e.axisType, r = this._names = [];
  52619. "category" === i ? (t = [],
  52620. E(n, (function(e, n) {
  52621. var i, o = Ro(Ao(e), "");
  52622. q(e) ? (i = T(e)).value = n : i = n,
  52623. t.push(i),
  52624. r.push(o)
  52625. }
  52626. ))) : t = n;
  52627. var o = {
  52628. category: "ordinal",
  52629. time: "time",
  52630. value: "number"
  52631. }[i] || "number";
  52632. (this._data = new cx([{
  52633. name: "value",
  52634. type: o
  52635. }],this)).initData(t, r)
  52636. }
  52637. ,
  52638. e.prototype.getData = function() {
  52639. return this._data
  52640. }
  52641. ,
  52642. e.prototype.getCategories = function() {
  52643. if ("category" === this.get("axisType"))
  52644. return this._names.slice()
  52645. }
  52646. ,
  52647. e.type = "timeline",
  52648. e.defaultOption = {
  52649. z: 4,
  52650. show: !0,
  52651. axisType: "time",
  52652. realtime: !0,
  52653. left: "20%",
  52654. top: null,
  52655. right: "20%",
  52656. bottom: 0,
  52657. width: null,
  52658. height: 40,
  52659. padding: 5,
  52660. controlPosition: "left",
  52661. autoPlay: !1,
  52662. rewind: !1,
  52663. loop: !0,
  52664. playInterval: 2e3,
  52665. currentIndex: 0,
  52666. itemStyle: {},
  52667. label: {
  52668. color: "#000"
  52669. },
  52670. data: []
  52671. },
  52672. e
  52673. }(zp)
  52674. , eB = function(t) {
  52675. function e() {
  52676. var n = null !== t && t.apply(this, arguments) || this;
  52677. return n.type = e.type,
  52678. n
  52679. }
  52680. return n(e, t),
  52681. e.type = "timeline.slider",
  52682. e.defaultOption = kc(tB.defaultOption, {
  52683. backgroundColor: "rgba(0,0,0,0)",
  52684. borderColor: "#ccc",
  52685. borderWidth: 0,
  52686. orient: "horizontal",
  52687. inverse: !1,
  52688. tooltip: {
  52689. trigger: "item"
  52690. },
  52691. symbol: "circle",
  52692. symbolSize: 12,
  52693. lineStyle: {
  52694. show: !0,
  52695. width: 2,
  52696. color: "#DAE1F5"
  52697. },
  52698. label: {
  52699. position: "auto",
  52700. show: !0,
  52701. interval: "auto",
  52702. rotate: 0,
  52703. color: "#A4B1D7"
  52704. },
  52705. itemStyle: {
  52706. color: "#A4B1D7",
  52707. borderWidth: 1
  52708. },
  52709. checkpointStyle: {
  52710. symbol: "circle",
  52711. symbolSize: 15,
  52712. color: "#316bf3",
  52713. borderColor: "#fff",
  52714. borderWidth: 2,
  52715. shadowBlur: 2,
  52716. shadowOffsetX: 1,
  52717. shadowOffsetY: 1,
  52718. shadowColor: "rgba(0, 0, 0, 0.3)",
  52719. animation: !0,
  52720. animationDuration: 300,
  52721. animationEasing: "quinticInOut"
  52722. },
  52723. controlStyle: {
  52724. show: !0,
  52725. showPlayBtn: !0,
  52726. showPrevBtn: !0,
  52727. showNextBtn: !0,
  52728. itemSize: 24,
  52729. itemGap: 12,
  52730. position: "left",
  52731. 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",
  52732. 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",
  52733. 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",
  52734. 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",
  52735. prevBtnSize: 18,
  52736. nextBtnSize: 18,
  52737. color: "#A4B1D7",
  52738. borderColor: "#A4B1D7",
  52739. borderWidth: 1
  52740. },
  52741. emphasis: {
  52742. label: {
  52743. show: !0,
  52744. color: "#6f778d"
  52745. },
  52746. itemStyle: {
  52747. color: "#316BF3"
  52748. },
  52749. controlStyle: {
  52750. color: "#316BF3",
  52751. borderColor: "#316BF3",
  52752. borderWidth: 2
  52753. }
  52754. },
  52755. progress: {
  52756. lineStyle: {
  52757. color: "#316BF3"
  52758. },
  52759. itemStyle: {
  52760. color: "#316BF3"
  52761. },
  52762. label: {
  52763. color: "#6f778d"
  52764. }
  52765. },
  52766. data: []
  52767. }),
  52768. e
  52769. }(tB);
  52770. R(eB, _f.prototype);
  52771. var nB = function(t) {
  52772. function e() {
  52773. var n = null !== t && t.apply(this, arguments) || this;
  52774. return n.type = e.type,
  52775. n
  52776. }
  52777. return n(e, t),
  52778. e.type = "timeline",
  52779. e
  52780. }(Ag)
  52781. , iB = function(t) {
  52782. function e(e, n, i, r) {
  52783. var o = t.call(this, e, n, i) || this;
  52784. return o.type = r || "value",
  52785. o
  52786. }
  52787. return n(e, t),
  52788. e.prototype.getLabelModel = function() {
  52789. return this.model.getModel("label")
  52790. }
  52791. ,
  52792. e.prototype.isHorizontal = function() {
  52793. return "horizontal" === this.model.get("orient")
  52794. }
  52795. ,
  52796. e
  52797. }(ab)
  52798. , rB = Math.PI
  52799. , oB = Vo()
  52800. , aB = function(t) {
  52801. function e() {
  52802. var n = null !== t && t.apply(this, arguments) || this;
  52803. return n.type = e.type,
  52804. n
  52805. }
  52806. return n(e, t),
  52807. e.prototype.init = function(t, e) {
  52808. this.api = e
  52809. }
  52810. ,
  52811. e.prototype.render = function(t, e, n) {
  52812. if (this.model = t,
  52813. this.api = n,
  52814. this.ecModel = e,
  52815. this.group.removeAll(),
  52816. t.get("show", !0)) {
  52817. var i = this._layout(t, n)
  52818. , r = this._createGroup("_mainGroup")
  52819. , o = this._createGroup("_labelGroup")
  52820. , a = this._axis = this._createAxis(i, t);
  52821. t.formatTooltip = function(t) {
  52822. return og("nameValue", {
  52823. noName: !0,
  52824. value: a.scale.getLabel({
  52825. value: t
  52826. })
  52827. })
  52828. }
  52829. ,
  52830. E(["AxisLine", "AxisTick", "Control", "CurrentPointer"], (function(e) {
  52831. this["_render" + e](i, r, a, t)
  52832. }
  52833. ), this),
  52834. this._renderAxisLabel(i, o, a, t),
  52835. this._position(i, t)
  52836. }
  52837. this._doPlayStop(),
  52838. this._updateTicksStatus()
  52839. }
  52840. ,
  52841. e.prototype.remove = function() {
  52842. this._clearTimer(),
  52843. this.group.removeAll()
  52844. }
  52845. ,
  52846. e.prototype.dispose = function() {
  52847. this._clearTimer()
  52848. }
  52849. ,
  52850. e.prototype._layout = function(t, e) {
  52851. var n, i, r, o, a = t.get(["label", "position"]), s = t.get("orient"), l = function(t, e) {
  52852. return kp(t.getBoxLayoutParams(), {
  52853. width: e.getWidth(),
  52854. height: e.getHeight()
  52855. }, t.get("padding"))
  52856. }(t, e), u = {
  52857. horizontal: "center",
  52858. 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) ? {
  52859. horizontal: {
  52860. top: "-",
  52861. bottom: "+"
  52862. },
  52863. vertical: {
  52864. left: "-",
  52865. right: "+"
  52866. }
  52867. }[s][a] : a) >= 0 || "+" === n ? "left" : "right"
  52868. }, h = {
  52869. horizontal: n >= 0 || "+" === n ? "top" : "bottom",
  52870. vertical: "middle"
  52871. }, c = {
  52872. horizontal: 0,
  52873. vertical: rB / 2
  52874. }, p = "vertical" === s ? l.height : l.width, d = t.getModel("controlStyle"), f = d.get("show", !0), g = f ? d.get("itemSize") : 0, y = f ? d.get("itemGap") : 0, v = g + y, m = t.get(["label", "rotate"]) || 0;
  52875. m = m * rB / 180;
  52876. var x = d.get("position", !0)
  52877. , _ = f && d.get("showPlayBtn", !0)
  52878. , b = f && d.get("showPrevBtn", !0)
  52879. , w = f && d.get("showNextBtn", !0)
  52880. , S = 0
  52881. , M = p;
  52882. "left" === x || "bottom" === x ? (_ && (i = [0, 0],
  52883. S += v),
  52884. b && (r = [S, 0],
  52885. S += v),
  52886. w && (o = [M - g, 0],
  52887. M -= v)) : (_ && (i = [M - g, 0],
  52888. M -= v),
  52889. b && (r = [0, 0],
  52890. S += v),
  52891. w && (o = [M - g, 0],
  52892. M -= v));
  52893. var I = [S, M];
  52894. return t.get("inverse") && I.reverse(),
  52895. {
  52896. viewRect: l,
  52897. mainLength: p,
  52898. orient: s,
  52899. rotation: c[s],
  52900. labelRotation: m,
  52901. labelPosOpt: n,
  52902. labelAlign: t.get(["label", "align"]) || u[s],
  52903. labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || h[s],
  52904. playPosition: i,
  52905. prevBtnPosition: r,
  52906. nextBtnPosition: o,
  52907. axisExtent: I,
  52908. controlSize: g,
  52909. controlGap: y
  52910. }
  52911. }
  52912. ,
  52913. e.prototype._position = function(t, e) {
  52914. var n = this._mainGroup
  52915. , i = this._labelGroup
  52916. , r = t.viewRect;
  52917. if ("vertical" === t.orient) {
  52918. var o = [1, 0, 0, 1, 0, 0]
  52919. , a = r.x
  52920. , s = r.y + r.height;
  52921. we(o, o, [-a, -s]),
  52922. Se(o, o, -rB / 2),
  52923. we(o, o, [a, s]),
  52924. (r = r.clone()).applyTransform(o)
  52925. }
  52926. var l = y(r)
  52927. , u = y(n.getBoundingRect())
  52928. , h = y(i.getBoundingRect())
  52929. , c = [n.x, n.y]
  52930. , p = [i.x, i.y];
  52931. p[0] = c[0] = l[0][0];
  52932. var d, f = t.labelPosOpt;
  52933. null == f || U(f) ? (v(c, u, l, 1, d = "+" === f ? 0 : 1),
  52934. v(p, h, l, 1, 1 - d)) : (v(c, u, l, 1, d = f >= 0 ? 0 : 1),
  52935. p[1] = c[1] + f);
  52936. function g(t) {
  52937. t.originX = l[0][0] - t.x,
  52938. t.originY = l[1][0] - t.y
  52939. }
  52940. function y(t) {
  52941. return [[t.x, t.x + t.width], [t.y, t.y + t.height]]
  52942. }
  52943. function v(t, e, n, i, r) {
  52944. t[i] += n[i][r] - e[i][r]
  52945. }
  52946. n.setPosition(c),
  52947. i.setPosition(p),
  52948. n.rotation = i.rotation = t.rotation,
  52949. g(n),
  52950. g(i)
  52951. }
  52952. ,
  52953. e.prototype._createAxis = function(t, e) {
  52954. var n = e.getData()
  52955. , i = e.get("axisType")
  52956. , r = function(t, e) {
  52957. if (e = e || t.get("type"),
  52958. e)
  52959. switch (e) {
  52960. case "category":
  52961. return new Rx({
  52962. ordinalMeta: t.getCategories(),
  52963. extent: [1 / 0, -1 / 0]
  52964. });
  52965. case "time":
  52966. return new Kx({
  52967. locale: t.ecModel.getLocaleModel(),
  52968. useUTC: t.ecModel.get("useUTC")
  52969. });
  52970. default:
  52971. return new Ex
  52972. }
  52973. }(e, i);
  52974. r.getTicks = function() {
  52975. return n.mapArray(["value"], (function(t) {
  52976. return {
  52977. value: t
  52978. }
  52979. }
  52980. ))
  52981. }
  52982. ;
  52983. var o = n.getDataExtent("value");
  52984. r.setExtent(o[0], o[1]),
  52985. r.calcNiceTicks();
  52986. var a = new iB("value",r,t.axisExtent,i);
  52987. return a.model = e,
  52988. a
  52989. }
  52990. ,
  52991. e.prototype._createGroup = function(t) {
  52992. var e = this[t] = new Br;
  52993. return this.group.add(e),
  52994. e
  52995. }
  52996. ,
  52997. e.prototype._renderAxisLine = function(t, e, n, i) {
  52998. var r = n.getExtent();
  52999. if (i.get(["lineStyle", "show"])) {
  53000. var o = new Ku({
  53001. shape: {
  53002. x1: r[0],
  53003. y1: 0,
  53004. x2: r[1],
  53005. y2: 0
  53006. },
  53007. style: A({
  53008. lineCap: "round"
  53009. }, i.getModel("lineStyle").getLineStyle()),
  53010. silent: !0,
  53011. z2: 1
  53012. });
  53013. e.add(o);
  53014. var a = this._progressLine = new Ku({
  53015. shape: {
  53016. x1: r[0],
  53017. x2: this._currentPointer ? this._currentPointer.x : r[0],
  53018. y1: 0,
  53019. y2: 0
  53020. },
  53021. style: k({
  53022. lineCap: "round",
  53023. lineWidth: o.style.lineWidth
  53024. }, i.getModel(["progress", "lineStyle"]).getLineStyle()),
  53025. silent: !0,
  53026. z2: 1
  53027. });
  53028. e.add(a)
  53029. }
  53030. }
  53031. ,
  53032. e.prototype._renderAxisTick = function(t, e, n, i) {
  53033. var r = this
  53034. , o = i.getData()
  53035. , a = n.scale.getTicks();
  53036. this._tickSymbols = [],
  53037. E(a, (function(t) {
  53038. var a = n.dataToCoord(t.value)
  53039. , s = o.getItemModel(t.value)
  53040. , l = s.getModel("itemStyle")
  53041. , u = s.getModel(["emphasis", "itemStyle"])
  53042. , h = s.getModel(["progress", "itemStyle"])
  53043. , c = {
  53044. x: a,
  53045. y: 0,
  53046. onclick: W(r._changeTimeline, r, t.value)
  53047. }
  53048. , p = sB(s, l, e, c);
  53049. p.ensureState("emphasis").style = u.getItemStyle(),
  53050. p.ensureState("progress").style = h.getItemStyle(),
  53051. Ul(p);
  53052. var d = rl(p);
  53053. s.get("tooltip") ? (d.dataIndex = t.value,
  53054. d.dataModel = i) : d.dataIndex = d.dataModel = null,
  53055. r._tickSymbols.push(p)
  53056. }
  53057. ))
  53058. }
  53059. ,
  53060. e.prototype._renderAxisLabel = function(t, e, n, i) {
  53061. var r = this;
  53062. if (n.getLabelModel().get("show")) {
  53063. var o = i.getData()
  53064. , a = n.getViewLabels();
  53065. this._tickLabels = [],
  53066. E(a, (function(i) {
  53067. var a = i.tickValue
  53068. , s = o.getItemModel(a)
  53069. , l = s.getModel("label")
  53070. , u = s.getModel(["emphasis", "label"])
  53071. , h = s.getModel(["progress", "label"])
  53072. , c = n.dataToCoord(i.tickValue)
  53073. , p = new Xs({
  53074. x: c,
  53075. y: 0,
  53076. rotation: t.labelRotation - t.rotation,
  53077. onclick: W(r._changeTimeline, r, a),
  53078. silent: !1,
  53079. style: oc(l, {
  53080. text: i.formattedLabel,
  53081. align: t.labelAlign,
  53082. verticalAlign: t.labelBaseline
  53083. })
  53084. });
  53085. p.ensureState("emphasis").style = oc(u),
  53086. p.ensureState("progress").style = oc(h),
  53087. e.add(p),
  53088. Ul(p),
  53089. oB(p).dataIndex = a,
  53090. r._tickLabels.push(p)
  53091. }
  53092. ))
  53093. }
  53094. }
  53095. ,
  53096. e.prototype._renderControl = function(t, e, n, i) {
  53097. var r = t.controlSize
  53098. , o = t.rotation
  53099. , a = i.getModel("controlStyle").getItemStyle()
  53100. , s = i.getModel(["emphasis", "controlStyle"]).getItemStyle()
  53101. , l = i.getPlayState()
  53102. , u = i.get("inverse", !0);
  53103. function h(t, n, l, u) {
  53104. if (t) {
  53105. var h = Cr(rt(i.get(["controlStyle", n + "BtnSize"]), r), r)
  53106. , c = function(t, e, n, i) {
  53107. var r = i.style
  53108. , o = Uh(t.get(["controlStyle", e]), i || {}, new ze(n[0],n[1],n[2],n[3]));
  53109. r && o.setStyle(r);
  53110. return o
  53111. }(i, n + "Icon", [0, -h / 2, h, h], {
  53112. x: t[0],
  53113. y: t[1],
  53114. originX: r / 2,
  53115. originY: 0,
  53116. rotation: u ? -o : 0,
  53117. rectHover: !0,
  53118. style: a,
  53119. onclick: l
  53120. });
  53121. c.ensureState("emphasis").style = s,
  53122. e.add(c),
  53123. Ul(c)
  53124. }
  53125. }
  53126. h(t.nextBtnPosition, "next", W(this._changeTimeline, this, u ? "-" : "+")),
  53127. h(t.prevBtnPosition, "prev", W(this._changeTimeline, this, u ? "+" : "-")),
  53128. h(t.playPosition, l ? "stop" : "play", W(this._handlePlayClick, this, !l), !0)
  53129. }
  53130. ,
  53131. e.prototype._renderCurrentPointer = function(t, e, n, i) {
  53132. var r = i.getData()
  53133. , o = i.getCurrentIndex()
  53134. , a = r.getItemModel(o).getModel("checkpointStyle")
  53135. , s = this
  53136. , l = {
  53137. onCreate: function(t) {
  53138. t.draggable = !0,
  53139. t.drift = W(s._handlePointerDrag, s),
  53140. t.ondragend = W(s._handlePointerDragend, s),
  53141. lB(t, s._progressLine, o, n, i, !0)
  53142. },
  53143. onUpdate: function(t) {
  53144. lB(t, s._progressLine, o, n, i)
  53145. }
  53146. };
  53147. this._currentPointer = sB(a, a, this._mainGroup, {}, this._currentPointer, l)
  53148. }
  53149. ,
  53150. e.prototype._handlePlayClick = function(t) {
  53151. this._clearTimer(),
  53152. this.api.dispatchAction({
  53153. type: "timelinePlayChange",
  53154. playState: t,
  53155. from: this.uid
  53156. })
  53157. }
  53158. ,
  53159. e.prototype._handlePointerDrag = function(t, e, n) {
  53160. this._clearTimer(),
  53161. this._pointerChangeTimeline([n.offsetX, n.offsetY])
  53162. }
  53163. ,
  53164. e.prototype._handlePointerDragend = function(t) {
  53165. this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
  53166. }
  53167. ,
  53168. e.prototype._pointerChangeTimeline = function(t, e) {
  53169. var n = this._toAxisCoord(t)[0]
  53170. , i = Qr(this._axis.getExtent().slice());
  53171. n > i[1] && (n = i[1]),
  53172. n < i[0] && (n = i[0]),
  53173. this._currentPointer.x = n,
  53174. this._currentPointer.markRedraw();
  53175. var r = this._progressLine;
  53176. r && (r.shape.x2 = n,
  53177. r.dirty());
  53178. var o = this._findNearestTick(n)
  53179. , a = this.model;
  53180. (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
  53181. }
  53182. ,
  53183. e.prototype._doPlayStop = function() {
  53184. var t = this;
  53185. this._clearTimer(),
  53186. this.model.getPlayState() && (this._timer = setTimeout((function() {
  53187. var e = t.model;
  53188. t._changeTimeline(e.getCurrentIndex() + (e.get("rewind", !0) ? -1 : 1))
  53189. }
  53190. ), this.model.get("playInterval")))
  53191. }
  53192. ,
  53193. e.prototype._toAxisCoord = function(t) {
  53194. return Fh(t, this._mainGroup.getLocalTransform(), !0)
  53195. }
  53196. ,
  53197. e.prototype._findNearestTick = function(t) {
  53198. var e, n = this.model.getData(), i = 1 / 0, r = this._axis;
  53199. return n.each(["value"], (function(n, o) {
  53200. var a = r.dataToCoord(n)
  53201. , s = Math.abs(a - t);
  53202. s < i && (i = s,
  53203. e = o)
  53204. }
  53205. )),
  53206. e
  53207. }
  53208. ,
  53209. e.prototype._clearTimer = function() {
  53210. this._timer && (clearTimeout(this._timer),
  53211. this._timer = null)
  53212. }
  53213. ,
  53214. e.prototype._changeTimeline = function(t) {
  53215. var e = this.model.getCurrentIndex();
  53216. "+" === t ? t = e + 1 : "-" === t && (t = e - 1),
  53217. this.api.dispatchAction({
  53218. type: "timelineChange",
  53219. currentIndex: t,
  53220. from: this.uid
  53221. })
  53222. }
  53223. ,
  53224. e.prototype._updateTicksStatus = function() {
  53225. var t = this.model.getCurrentIndex()
  53226. , e = this._tickSymbols
  53227. , n = this._tickLabels;
  53228. if (e)
  53229. for (var i = 0; i < e.length; i++)
  53230. e && e[i] && e[i].toggleState("progress", i < t);
  53231. if (n)
  53232. for (i = 0; i < n.length; i++)
  53233. n && n[i] && n[i].toggleState("progress", oB(n[i]).dataIndex <= t)
  53234. }
  53235. ,
  53236. e.type = "timeline.slider",
  53237. e
  53238. }(nB);
  53239. function sB(t, e, n, i, r, o) {
  53240. var a = e.get("color");
  53241. r ? (r.setColor(a),
  53242. n.add(r),
  53243. o && o.onUpdate(r)) : ((r = Xy(t.get("symbol"), -1, -1, 2, 2, a)).setStyle("strokeNoScale", !0),
  53244. n.add(r),
  53245. o && o.onCreate(r));
  53246. var s = e.getItemStyle(["color"]);
  53247. r.setStyle(s),
  53248. i = C({
  53249. rectHover: !0,
  53250. z2: 100
  53251. }, i, !0);
  53252. var l = Uy(t.get("symbolSize"));
  53253. i.scaleX = l[0] / 2,
  53254. i.scaleY = l[1] / 2;
  53255. var u = Zy(t.get("symbolOffset"), l);
  53256. u && (i.x = (i.x || 0) + u[0],
  53257. i.y = (i.y || 0) + u[1]);
  53258. var h = t.get("symbolRotate");
  53259. return i.rotation = (h || 0) * Math.PI / 180 || 0,
  53260. r.attr(i),
  53261. r.updateTransform(),
  53262. r
  53263. }
  53264. function lB(t, e, n, i, r, o) {
  53265. if (!t.dragging) {
  53266. var a = r.getModel("checkpointStyle")
  53267. , s = i.dataToCoord(r.getData().get("value", n));
  53268. if (o || !a.get("animation", !0))
  53269. t.attr({
  53270. x: s,
  53271. y: 0
  53272. }),
  53273. e && e.attr({
  53274. shape: {
  53275. x2: s
  53276. }
  53277. });
  53278. else {
  53279. var l = {
  53280. duration: a.get("animationDuration", !0),
  53281. easing: a.get("animationEasing", !0)
  53282. };
  53283. t.stopAnimation(null, !0),
  53284. t.animateTo({
  53285. x: s,
  53286. y: 0
  53287. }, l),
  53288. e && e.animateTo({
  53289. shape: {
  53290. x2: s
  53291. }
  53292. }, l)
  53293. }
  53294. }
  53295. }
  53296. function uB(t) {
  53297. var e = t && t.timeline;
  53298. Y(e) || (e = e ? [e] : []),
  53299. E(e, (function(t) {
  53300. t && function(t) {
  53301. var e = t.type
  53302. , n = {
  53303. number: "value",
  53304. time: "time"
  53305. };
  53306. n[e] && (t.axisType = n[e],
  53307. delete t.type);
  53308. if (hB(t),
  53309. cB(t, "controlPosition")) {
  53310. var i = t.controlStyle || (t.controlStyle = {});
  53311. cB(i, "position") || (i.position = t.controlPosition),
  53312. "none" !== i.position || cB(i, "show") || (i.show = !1,
  53313. delete i.position),
  53314. delete t.controlPosition
  53315. }
  53316. E(t.data || [], (function(t) {
  53317. q(t) && !Y(t) && (!cB(t, "value") && cB(t, "name") && (t.value = t.name),
  53318. hB(t))
  53319. }
  53320. ))
  53321. }(t)
  53322. }
  53323. ))
  53324. }
  53325. function hB(t) {
  53326. var e = t.itemStyle || (t.itemStyle = {})
  53327. , n = e.emphasis || (e.emphasis = {})
  53328. , i = t.label || t.label || {}
  53329. , r = i.normal || (i.normal = {})
  53330. , o = {
  53331. normal: 1,
  53332. emphasis: 1
  53333. };
  53334. E(i, (function(t, e) {
  53335. o[e] || cB(r, e) || (r[e] = t)
  53336. }
  53337. )),
  53338. n.label && !cB(i, "emphasis") && (i.emphasis = n.label,
  53339. delete n.label)
  53340. }
  53341. function cB(t, e) {
  53342. return t.hasOwnProperty(e)
  53343. }
  53344. function pB(t, e) {
  53345. if (!t)
  53346. return !1;
  53347. for (var n = Y(t) ? t : [t], i = 0; i < n.length; i++)
  53348. if (n[i] && n[i][e])
  53349. return !0;
  53350. return !1
  53351. }
  53352. function dB(t) {
  53353. Co(t, "label", ["show"])
  53354. }
  53355. var fB = Vo()
  53356. , gB = function(t) {
  53357. function e() {
  53358. var n = null !== t && t.apply(this, arguments) || this;
  53359. return n.type = e.type,
  53360. n.createdBySelf = !1,
  53361. n
  53362. }
  53363. return n(e, t),
  53364. e.prototype.init = function(t, e, n) {
  53365. this.mergeDefaultAndTheme(t, n),
  53366. this._mergeOption(t, n, !1, !0)
  53367. }
  53368. ,
  53369. e.prototype.isAnimationEnabled = function() {
  53370. if (r.node)
  53371. return !1;
  53372. var t = this.__hostSeries;
  53373. return this.getShallow("animation") && t && t.isAnimationEnabled()
  53374. }
  53375. ,
  53376. e.prototype.mergeOption = function(t, e) {
  53377. this._mergeOption(t, e, !1, !1)
  53378. }
  53379. ,
  53380. e.prototype._mergeOption = function(t, e, n, i) {
  53381. var r = this.mainType;
  53382. n || e.eachSeries((function(t) {
  53383. var n = t.get(this.mainType, !0)
  53384. , o = fB(t)[r];
  53385. n && n.data ? (o ? o._mergeOption(n, e, !0) : (i && dB(n),
  53386. E(n.data, (function(t) {
  53387. t instanceof Array ? (dB(t[0]),
  53388. dB(t[1])) : dB(t)
  53389. }
  53390. )),
  53391. A(o = this.createMarkerModelFromSeries(n, this, e), {
  53392. mainType: this.mainType,
  53393. seriesIndex: t.seriesIndex,
  53394. name: t.name,
  53395. createdBySelf: !0
  53396. }),
  53397. o.__hostSeries = t),
  53398. fB(t)[r] = o) : fB(t)[r] = null
  53399. }
  53400. ), this)
  53401. }
  53402. ,
  53403. e.prototype.formatTooltip = function(t, e, n) {
  53404. var i = this.getData()
  53405. , r = this.getRawValue(t)
  53406. , o = i.getName(t);
  53407. return og("section", {
  53408. header: this.name,
  53409. blocks: [og("nameValue", {
  53410. name: o,
  53411. value: r,
  53412. noName: !o,
  53413. noValue: null == r
  53414. })]
  53415. })
  53416. }
  53417. ,
  53418. e.prototype.getData = function() {
  53419. return this._data
  53420. }
  53421. ,
  53422. e.prototype.setData = function(t) {
  53423. this._data = t
  53424. }
  53425. ,
  53426. e.prototype.getDataParams = function(t, e) {
  53427. var n = _f.prototype.getDataParams.call(this, t, e)
  53428. , i = this.__hostSeries;
  53429. return i && (n.seriesId = i.id,
  53430. n.seriesName = i.name,
  53431. n.seriesType = i.subType),
  53432. n
  53433. }
  53434. ,
  53435. e.getMarkerModelFromSeries = function(t, e) {
  53436. return fB(t)[e]
  53437. }
  53438. ,
  53439. e.type = "marker",
  53440. e.dependencies = ["series", "grid", "polar", "geo"],
  53441. e
  53442. }(zp);
  53443. R(gB, _f.prototype);
  53444. var yB = function(t) {
  53445. function e() {
  53446. var n = null !== t && t.apply(this, arguments) || this;
  53447. return n.type = e.type,
  53448. n
  53449. }
  53450. return n(e, t),
  53451. e.prototype.createMarkerModelFromSeries = function(t, n, i) {
  53452. return new e(t,n,i)
  53453. }
  53454. ,
  53455. e.type = "markPoint",
  53456. e.defaultOption = {
  53457. z: 5,
  53458. symbol: "pin",
  53459. symbolSize: 50,
  53460. tooltip: {
  53461. trigger: "item"
  53462. },
  53463. label: {
  53464. show: !0,
  53465. position: "inside"
  53466. },
  53467. itemStyle: {
  53468. borderWidth: 2
  53469. },
  53470. emphasis: {
  53471. label: {
  53472. show: !0
  53473. }
  53474. }
  53475. },
  53476. e
  53477. }(gB);
  53478. function vB(t) {
  53479. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
  53480. }
  53481. function mB(t, e, n, i, r, o) {
  53482. var a = []
  53483. , s = mx(e, i) ? e.getCalculationInfo("stackResultDimension") : i
  53484. , l = MB(e, s, t)
  53485. , u = e.indicesOfNearest(s, l)[0];
  53486. a[r] = e.get(n, u),
  53487. a[o] = e.get(s, u);
  53488. var h = e.get(i, u)
  53489. , c = to(e.get(i, u));
  53490. return (c = Math.min(c, 20)) >= 0 && (a[o] = +a[o].toFixed(c)),
  53491. [a, h]
  53492. }
  53493. var xB = {
  53494. min: H(mB, "min"),
  53495. max: H(mB, "max"),
  53496. average: H(mB, "average"),
  53497. median: H(mB, "median")
  53498. };
  53499. function _B(t, e) {
  53500. if (e) {
  53501. var n = t.getData()
  53502. , i = t.coordinateSystem
  53503. , r = i && i.dimensions;
  53504. if (!function(t) {
  53505. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
  53506. }(e) && !Y(e.coord) && Y(r)) {
  53507. var o = bB(e, n, i, t);
  53508. if ((e = T(e)).type && xB[e.type] && o.baseAxis && o.valueAxis) {
  53509. var a = P(r, o.baseAxis.dim)
  53510. , s = P(r, o.valueAxis.dim)
  53511. , l = xB[e.type](n, o.baseDataDim, o.valueDataDim, a, s);
  53512. e.coord = l[0],
  53513. e.value = l[1]
  53514. } else
  53515. e.coord = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis]
  53516. }
  53517. if (null != e.coord && Y(r))
  53518. for (var u = e.coord, h = 0; h < 2; h++)
  53519. xB[u[h]] && (u[h] = MB(n, n.mapDimension(r[h]), u[h]));
  53520. else
  53521. e.coord = [];
  53522. return e
  53523. }
  53524. }
  53525. function bB(t, e, n, i) {
  53526. var r = {};
  53527. return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim,
  53528. r.valueAxis = n.getAxis(function(t, e) {
  53529. var n = t.getData().getDimensionInfo(e);
  53530. return n && n.coordDim
  53531. }(i, r.valueDataDim)),
  53532. r.baseAxis = n.getOtherAxis(r.valueAxis),
  53533. r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = i.getBaseAxis(),
  53534. r.valueAxis = n.getOtherAxis(r.baseAxis),
  53535. r.baseDataDim = e.mapDimension(r.baseAxis.dim),
  53536. r.valueDataDim = e.mapDimension(r.valueAxis.dim)),
  53537. r
  53538. }
  53539. function wB(t, e) {
  53540. return !(t && t.containData && e.coord && !vB(e)) || t.containData(e.coord)
  53541. }
  53542. function SB(t, e) {
  53543. return t ? function(t, n, i, r) {
  53544. return If(r < 2 ? t.coord && t.coord[r] : t.value, e[r])
  53545. }
  53546. : function(t, n, i, r) {
  53547. return If(t.value, e[r])
  53548. }
  53549. }
  53550. function MB(t, e, n) {
  53551. if ("average" === n) {
  53552. var i = 0
  53553. , r = 0;
  53554. return t.each(e, (function(t, e) {
  53555. isNaN(t) || (i += t,
  53556. r++)
  53557. }
  53558. )),
  53559. i / r
  53560. }
  53561. return "median" === n ? t.getMedian(e) : t.getDataExtent(e)["max" === n ? 1 : 0]
  53562. }
  53563. var IB = Vo()
  53564. , TB = function(t) {
  53565. function e() {
  53566. var n = null !== t && t.apply(this, arguments) || this;
  53567. return n.type = e.type,
  53568. n
  53569. }
  53570. return n(e, t),
  53571. e.prototype.init = function() {
  53572. this.markerGroupMap = yt()
  53573. }
  53574. ,
  53575. e.prototype.render = function(t, e, n) {
  53576. var i = this
  53577. , r = this.markerGroupMap;
  53578. r.each((function(t) {
  53579. IB(t).keep = !1
  53580. }
  53581. )),
  53582. e.eachSeries((function(t) {
  53583. var r = gB.getMarkerModelFromSeries(t, i.type);
  53584. r && i.renderSeries(t, r, e, n)
  53585. }
  53586. )),
  53587. r.each((function(t) {
  53588. !IB(t).keep && i.group.remove(t.group)
  53589. }
  53590. ))
  53591. }
  53592. ,
  53593. e.prototype.markKeep = function(t) {
  53594. IB(t).keep = !0
  53595. }
  53596. ,
  53597. e.prototype.toggleBlurSeries = function(t, e) {
  53598. var n = this;
  53599. E(t, (function(t) {
  53600. var i = gB.getMarkerModelFromSeries(t, n.type);
  53601. i && i.getData().eachItemGraphicEl((function(t) {
  53602. t && (e ? Nl(t) : El(t))
  53603. }
  53604. ))
  53605. }
  53606. ))
  53607. }
  53608. ,
  53609. e.type = "marker",
  53610. e
  53611. }(Ag);
  53612. function CB(t, e, n) {
  53613. var i = e.coordinateSystem;
  53614. t.each((function(r) {
  53615. var o, a = t.getItemModel(r), s = $r(a.get("x"), n.getWidth()), l = $r(a.get("y"), n.getHeight());
  53616. if (isNaN(s) || isNaN(l)) {
  53617. if (e.getMarkerPosition)
  53618. o = e.getMarkerPosition(t.getValues(t.dimensions, r));
  53619. else if (i) {
  53620. var u = t.get(i.dimensions[0], r)
  53621. , h = t.get(i.dimensions[1], r);
  53622. o = i.dataToPoint([u, h])
  53623. }
  53624. } else
  53625. o = [s, l];
  53626. isNaN(s) || (o[0] = s),
  53627. isNaN(l) || (o[1] = l),
  53628. t.setItemLayout(r, o)
  53629. }
  53630. ))
  53631. }
  53632. var DB = function(t) {
  53633. function e() {
  53634. var n = null !== t && t.apply(this, arguments) || this;
  53635. return n.type = e.type,
  53636. n
  53637. }
  53638. return n(e, t),
  53639. e.prototype.updateTransform = function(t, e, n) {
  53640. e.eachSeries((function(t) {
  53641. var e = gB.getMarkerModelFromSeries(t, "markPoint");
  53642. e && (CB(e.getData(), t, n),
  53643. this.markerGroupMap.get(t.id).updateLayout())
  53644. }
  53645. ), this)
  53646. }
  53647. ,
  53648. e.prototype.renderSeries = function(t, e, n, i) {
  53649. var r = t.coordinateSystem
  53650. , o = t.id
  53651. , a = t.getData()
  53652. , s = this.markerGroupMap
  53653. , l = s.get(o) || s.set(o, new xS)
  53654. , u = function(t, e, n) {
  53655. var i;
  53656. i = t ? z(t && t.dimensions, (function(t) {
  53657. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  53658. name: t,
  53659. ordinalMeta: null
  53660. })
  53661. }
  53662. )) : [{
  53663. name: "value",
  53664. type: "float"
  53665. }];
  53666. var r = new cx(i,n)
  53667. , o = z(n.get("data"), H(_B, e));
  53668. t && (o = B(o, H(wB, t)));
  53669. var a = SB(!!t, i);
  53670. return r.initData(o, null, a),
  53671. r
  53672. }(r, t, e);
  53673. e.setData(u),
  53674. CB(e.getData(), t, i),
  53675. u.each((function(t) {
  53676. var n = u.getItemModel(t)
  53677. , i = n.getShallow("symbol")
  53678. , r = n.getShallow("symbolSize")
  53679. , o = n.getShallow("symbolRotate")
  53680. , s = n.getShallow("symbolOffset")
  53681. , l = n.getShallow("symbolKeepAspect");
  53682. if (X(i) || X(r) || X(o) || X(s)) {
  53683. var h = e.getRawValue(t)
  53684. , c = e.getDataParams(t);
  53685. X(i) && (i = i(h, c)),
  53686. X(r) && (r = r(h, c)),
  53687. X(o) && (o = o(h, c)),
  53688. X(s) && (s = s(h, c))
  53689. }
  53690. var p = n.getModel("itemStyle").getItemStyle()
  53691. , d = Ay(a, "color");
  53692. p.fill || (p.fill = d),
  53693. u.setItemVisual(t, {
  53694. symbol: i,
  53695. symbolSize: r,
  53696. symbolRotate: o,
  53697. symbolOffset: s,
  53698. symbolKeepAspect: l,
  53699. style: p
  53700. })
  53701. }
  53702. )),
  53703. l.updateData(u),
  53704. this.group.add(l.group),
  53705. u.eachItemGraphicEl((function(t) {
  53706. t.traverse((function(t) {
  53707. rl(t).dataModel = e
  53708. }
  53709. ))
  53710. }
  53711. )),
  53712. this.markKeep(l),
  53713. l.group.silent = e.get("silent") || t.get("silent")
  53714. }
  53715. ,
  53716. e.type = "markPoint",
  53717. e
  53718. }(TB);
  53719. var AB = function(t) {
  53720. function e() {
  53721. var n = null !== t && t.apply(this, arguments) || this;
  53722. return n.type = e.type,
  53723. n
  53724. }
  53725. return n(e, t),
  53726. e.prototype.createMarkerModelFromSeries = function(t, n, i) {
  53727. return new e(t,n,i)
  53728. }
  53729. ,
  53730. e.type = "markLine",
  53731. e.defaultOption = {
  53732. z: 5,
  53733. symbol: ["circle", "arrow"],
  53734. symbolSize: [8, 16],
  53735. symbolOffset: 0,
  53736. precision: 2,
  53737. tooltip: {
  53738. trigger: "item"
  53739. },
  53740. label: {
  53741. show: !0,
  53742. position: "end",
  53743. distance: 5
  53744. },
  53745. lineStyle: {
  53746. type: "dashed"
  53747. },
  53748. emphasis: {
  53749. label: {
  53750. show: !0
  53751. },
  53752. lineStyle: {
  53753. width: 3
  53754. }
  53755. },
  53756. animationEasing: "linear"
  53757. },
  53758. e
  53759. }(gB)
  53760. , kB = Vo()
  53761. , LB = function(t, e, n, i) {
  53762. var r, o = t.getData();
  53763. if (Y(i))
  53764. r = i;
  53765. else {
  53766. var a = i.type;
  53767. if ("min" === a || "max" === a || "average" === a || "median" === a || null != i.xAxis || null != i.yAxis) {
  53768. var s = void 0
  53769. , l = void 0;
  53770. if (null != i.yAxis || null != i.xAxis)
  53771. s = e.getAxis(null != i.yAxis ? "y" : "x"),
  53772. l = it(i.yAxis, i.xAxis);
  53773. else {
  53774. var u = bB(i, o, e, t);
  53775. s = u.valueAxis,
  53776. l = MB(o, xx(o, u.valueDataDim), a)
  53777. }
  53778. var h = "x" === s.dim ? 0 : 1
  53779. , c = 1 - h
  53780. , p = T(i)
  53781. , d = {
  53782. coord: []
  53783. };
  53784. p.type = null,
  53785. p.coord = [],
  53786. p.coord[c] = -1 / 0,
  53787. d.coord[c] = 1 / 0;
  53788. var f = n.get("precision");
  53789. f >= 0 && j(l) && (l = +l.toFixed(Math.min(f, 20))),
  53790. p.coord[h] = d.coord[h] = l,
  53791. r = [p, d, {
  53792. type: a,
  53793. valueIndex: i.valueIndex,
  53794. value: l
  53795. }]
  53796. } else
  53797. r = []
  53798. }
  53799. var g = [_B(t, r[0]), _B(t, r[1]), A({}, r[2])];
  53800. return g[2].type = g[2].type || null,
  53801. C(g[2], g[0]),
  53802. C(g[2], g[1]),
  53803. g
  53804. };
  53805. function PB(t) {
  53806. return !isNaN(t) && !isFinite(t)
  53807. }
  53808. function OB(t, e, n, i) {
  53809. var r = 1 - t
  53810. , o = i.dimensions[t];
  53811. return PB(e[r]) && PB(n[r]) && e[t] === n[t] && i.getAxis(o).containData(e[t])
  53812. }
  53813. function RB(t, e) {
  53814. if ("cartesian2d" === t.type) {
  53815. var n = e[0].coord
  53816. , i = e[1].coord;
  53817. if (n && i && (OB(1, n, i, t) || OB(0, n, i, t)))
  53818. return !0
  53819. }
  53820. return wB(t, e[0]) && wB(t, e[1])
  53821. }
  53822. function NB(t, e, n, i, r) {
  53823. var o, a = i.coordinateSystem, s = t.getItemModel(e), l = $r(s.get("x"), r.getWidth()), u = $r(s.get("y"), r.getHeight());
  53824. if (isNaN(l) || isNaN(u)) {
  53825. if (i.getMarkerPosition)
  53826. o = i.getMarkerPosition(t.getValues(t.dimensions, e));
  53827. else {
  53828. var h = a.dimensions
  53829. , c = t.get(h[0], e)
  53830. , p = t.get(h[1], e);
  53831. o = a.dataToPoint([c, p])
  53832. }
  53833. if (OS(a, "cartesian2d")) {
  53834. var d = a.getAxis("x")
  53835. , f = a.getAxis("y");
  53836. h = a.dimensions;
  53837. PB(t.get(h[0], e)) ? o[0] = d.toGlobalCoord(d.getExtent()[n ? 0 : 1]) : PB(t.get(h[1], e)) && (o[1] = f.toGlobalCoord(f.getExtent()[n ? 0 : 1]))
  53838. }
  53839. isNaN(l) || (o[0] = l),
  53840. isNaN(u) || (o[1] = u)
  53841. } else
  53842. o = [l, u];
  53843. t.setItemLayout(e, o)
  53844. }
  53845. var EB = function(t) {
  53846. function e() {
  53847. var n = null !== t && t.apply(this, arguments) || this;
  53848. return n.type = e.type,
  53849. n
  53850. }
  53851. return n(e, t),
  53852. e.prototype.updateTransform = function(t, e, n) {
  53853. e.eachSeries((function(t) {
  53854. var e = gB.getMarkerModelFromSeries(t, "markLine");
  53855. if (e) {
  53856. var i = e.getData()
  53857. , r = kB(e).from
  53858. , o = kB(e).to;
  53859. r.each((function(e) {
  53860. NB(r, e, !0, t, n),
  53861. NB(o, e, !1, t, n)
  53862. }
  53863. )),
  53864. i.each((function(t) {
  53865. i.setItemLayout(t, [r.getItemLayout(t), o.getItemLayout(t)])
  53866. }
  53867. )),
  53868. this.markerGroupMap.get(t.id).updateLayout()
  53869. }
  53870. }
  53871. ), this)
  53872. }
  53873. ,
  53874. e.prototype.renderSeries = function(t, e, n, i) {
  53875. var r = t.coordinateSystem
  53876. , o = t.id
  53877. , a = t.getData()
  53878. , s = this.markerGroupMap
  53879. , l = s.get(o) || s.set(o, new YA);
  53880. this.group.add(l.group);
  53881. var u = function(t, e, n) {
  53882. var i;
  53883. i = t ? z(t && t.dimensions, (function(t) {
  53884. return A(A({}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}), {
  53885. name: t,
  53886. ordinalMeta: null
  53887. })
  53888. }
  53889. )) : [{
  53890. name: "value",
  53891. type: "float"
  53892. }];
  53893. var r = new cx(i,n)
  53894. , o = new cx(i,n)
  53895. , a = new cx([],n)
  53896. , s = z(n.get("data"), H(LB, e, t, n));
  53897. t && (s = B(s, H(RB, t)));
  53898. var l = SB(!!t, i);
  53899. return r.initData(z(s, (function(t) {
  53900. return t[0]
  53901. }
  53902. )), null, l),
  53903. o.initData(z(s, (function(t) {
  53904. return t[1]
  53905. }
  53906. )), null, l),
  53907. a.initData(z(s, (function(t) {
  53908. return t[2]
  53909. }
  53910. ))),
  53911. a.hasItemOption = !0,
  53912. {
  53913. from: r,
  53914. to: o,
  53915. line: a
  53916. }
  53917. }(r, t, e)
  53918. , h = u.from
  53919. , c = u.to
  53920. , p = u.line;
  53921. kB(e).from = h,
  53922. kB(e).to = c,
  53923. e.setData(p);
  53924. var d = e.get("symbol")
  53925. , f = e.get("symbolSize")
  53926. , g = e.get("symbolRotate")
  53927. , y = e.get("symbolOffset");
  53928. function v(e, n, r) {
  53929. var o = e.getItemModel(n);
  53930. NB(e, n, r, t, i);
  53931. var s = o.getModel("itemStyle").getItemStyle();
  53932. null == s.fill && (s.fill = Ay(a, "color")),
  53933. e.setItemVisual(n, {
  53934. symbolKeepAspect: o.get("symbolKeepAspect"),
  53935. symbolOffset: rt(o.get("symbolOffset", !0), y[r ? 0 : 1]),
  53936. symbolRotate: rt(o.get("symbolRotate", !0), g[r ? 0 : 1]),
  53937. symbolSize: rt(o.get("symbolSize"), f[r ? 0 : 1]),
  53938. symbol: rt(o.get("symbol", !0), d[r ? 0 : 1]),
  53939. style: s
  53940. })
  53941. }
  53942. Y(d) || (d = [d, d]),
  53943. Y(f) || (f = [f, f]),
  53944. Y(g) || (g = [g, g]),
  53945. Y(y) || (y = [y, y]),
  53946. u.from.each((function(t) {
  53947. v(h, t, !0),
  53948. v(c, t, !1)
  53949. }
  53950. )),
  53951. p.each((function(t) {
  53952. var e = p.getItemModel(t).getModel("lineStyle").getLineStyle();
  53953. p.setItemLayout(t, [h.getItemLayout(t), c.getItemLayout(t)]),
  53954. null == e.stroke && (e.stroke = h.getItemVisual(t, "style").fill),
  53955. p.setItemVisual(t, {
  53956. fromSymbolKeepAspect: h.getItemVisual(t, "symbolKeepAspect"),
  53957. fromSymbolOffset: h.getItemVisual(t, "symbolOffset"),
  53958. fromSymbolRotate: h.getItemVisual(t, "symbolRotate"),
  53959. fromSymbolSize: h.getItemVisual(t, "symbolSize"),
  53960. fromSymbol: h.getItemVisual(t, "symbol"),
  53961. toSymbolKeepAspect: c.getItemVisual(t, "symbolKeepAspect"),
  53962. toSymbolOffset: c.getItemVisual(t, "symbolOffset"),
  53963. toSymbolRotate: c.getItemVisual(t, "symbolRotate"),
  53964. toSymbolSize: c.getItemVisual(t, "symbolSize"),
  53965. toSymbol: c.getItemVisual(t, "symbol"),
  53966. style: e
  53967. })
  53968. }
  53969. )),
  53970. l.updateData(p),
  53971. u.line.eachItemGraphicEl((function(t) {
  53972. rl(t).dataModel = e,
  53973. t.traverse((function(t) {
  53974. rl(t).dataModel = e
  53975. }
  53976. ))
  53977. }
  53978. )),
  53979. this.markKeep(l),
  53980. l.group.silent = e.get("silent") || t.get("silent")
  53981. }
  53982. ,
  53983. e.type = "markLine",
  53984. e
  53985. }(TB);
  53986. var zB = function(t) {
  53987. function e() {
  53988. var n = null !== t && t.apply(this, arguments) || this;
  53989. return n.type = e.type,
  53990. n
  53991. }
  53992. return n(e, t),
  53993. e.prototype.createMarkerModelFromSeries = function(t, n, i) {
  53994. return new e(t,n,i)
  53995. }
  53996. ,
  53997. e.type = "markArea",
  53998. e.defaultOption = {
  53999. z: 1,
  54000. tooltip: {
  54001. trigger: "item"
  54002. },
  54003. animation: !1,
  54004. label: {
  54005. show: !0,
  54006. position: "top"
  54007. },
  54008. itemStyle: {
  54009. borderWidth: 0
  54010. },
  54011. emphasis: {
  54012. label: {
  54013. show: !0,
  54014. position: "top"
  54015. }
  54016. }
  54017. },
  54018. e
  54019. }(gB)
  54020. , VB = Vo()
  54021. , BB = function(t, e, n, i) {
  54022. var r = i[0]
  54023. , o = i[1];
  54024. if (r && o) {
  54025. var a = _B(t, r)
  54026. , s = _B(t, o)
  54027. , l = a.coord
  54028. , u = s.coord;
  54029. l[0] = it(l[0], -1 / 0),
  54030. l[1] = it(l[1], -1 / 0),
  54031. u[0] = it(u[0], 1 / 0),
  54032. u[1] = it(u[1], 1 / 0);
  54033. var h = D([{}, a, s]);
  54034. return h.coord = [a.coord, s.coord],
  54035. h.x0 = a.x,
  54036. h.y0 = a.y,
  54037. h.x1 = s.x,
  54038. h.y1 = s.y,
  54039. h
  54040. }
  54041. };
  54042. function FB(t) {
  54043. return !isNaN(t) && !isFinite(t)
  54044. }
  54045. function GB(t, e, n, i) {
  54046. var r = 1 - t;
  54047. return FB(e[r]) && FB(n[r])
  54048. }
  54049. function WB(t, e) {
  54050. var n = e.coord[0]
  54051. , i = e.coord[1]
  54052. , r = {
  54053. coord: n,
  54054. x: e.x0,
  54055. y: e.y0
  54056. }
  54057. , o = {
  54058. coord: i,
  54059. x: e.x1,
  54060. y: e.y1
  54061. };
  54062. return OS(t, "cartesian2d") ? !(!n || !i || !GB(1, n, i) && !GB(0, n, i)) || function(t, e, n) {
  54063. return !(t && t.containZone && e.coord && n.coord && !vB(e) && !vB(n)) || t.containZone(e.coord, n.coord)
  54064. }(t, r, o) : wB(t, r) || wB(t, o)
  54065. }
  54066. function HB(t, e, n, i, r) {
  54067. var o, a = i.coordinateSystem, s = t.getItemModel(e), l = $r(s.get(n[0]), r.getWidth()), u = $r(s.get(n[1]), r.getHeight());
  54068. if (isNaN(l) || isNaN(u)) {
  54069. if (i.getMarkerPosition) {
  54070. var h = t.getValues(["x0", "y0"], e)
  54071. , c = t.getValues(["x1", "y1"], e)
  54072. , p = a.clampData(h)
  54073. , d = a.clampData(c)
  54074. , f = [];
  54075. "x0" === n[0] ? f[0] = p[0] > d[0] ? c[0] : h[0] : f[0] = p[0] > d[0] ? h[0] : c[0],
  54076. "y0" === n[1] ? f[1] = p[1] > d[1] ? c[1] : h[1] : f[1] = p[1] > d[1] ? h[1] : c[1],
  54077. o = i.getMarkerPosition(f, n, !0)
  54078. } else {
  54079. var g = [m = t.get(n[0], e), x = t.get(n[1], e)];
  54080. a.clampData && a.clampData(g, g),
  54081. o = a.dataToPoint(g, !0)
  54082. }
  54083. if (OS(a, "cartesian2d")) {
  54084. var y = a.getAxis("x")
  54085. , v = a.getAxis("y")
  54086. , m = t.get(n[0], e)
  54087. , x = t.get(n[1], e);
  54088. FB(m) ? o[0] = y.toGlobalCoord(y.getExtent()["x0" === n[0] ? 0 : 1]) : FB(x) && (o[1] = v.toGlobalCoord(v.getExtent()["y0" === n[1] ? 0 : 1]))
  54089. }
  54090. isNaN(l) || (o[0] = l),
  54091. isNaN(u) || (o[1] = u)
  54092. } else
  54093. o = [l, u];
  54094. return o
  54095. }
  54096. var YB = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]]
  54097. , XB = function(t) {
  54098. function e() {
  54099. var n = null !== t && t.apply(this, arguments) || this;
  54100. return n.type = e.type,
  54101. n
  54102. }
  54103. return n(e, t),
  54104. e.prototype.updateTransform = function(t, e, n) {
  54105. e.eachSeries((function(t) {
  54106. var e = gB.getMarkerModelFromSeries(t, "markArea");
  54107. if (e) {
  54108. var i = e.getData();
  54109. i.each((function(e) {
  54110. var r = z(YB, (function(r) {
  54111. return HB(i, e, r, t, n)
  54112. }
  54113. ));
  54114. i.setItemLayout(e, r),
  54115. i.getItemGraphicEl(e).setShape("points", r)
  54116. }
  54117. ))
  54118. }
  54119. }
  54120. ), this)
  54121. }
  54122. ,
  54123. e.prototype.renderSeries = function(t, e, n, i) {
  54124. var r = t.coordinateSystem
  54125. , o = t.id
  54126. , a = t.getData()
  54127. , s = this.markerGroupMap
  54128. , l = s.get(o) || s.set(o, {
  54129. group: new Br
  54130. });
  54131. this.group.add(l.group),
  54132. this.markKeep(l);
  54133. var u = function(t, e, n) {
  54134. var i, r, o = ["x0", "y0", "x1", "y1"];
  54135. if (t) {
  54136. var a = z(t && t.dimensions, (function(t) {
  54137. var n = e.getData();
  54138. return A(A({}, n.getDimensionInfo(n.mapDimension(t)) || {}), {
  54139. name: t,
  54140. ordinalMeta: null
  54141. })
  54142. }
  54143. ));
  54144. r = z(o, (function(t, e) {
  54145. return {
  54146. name: t,
  54147. type: a[e % 2].type
  54148. }
  54149. }
  54150. )),
  54151. i = new cx(r,n)
  54152. } else
  54153. i = new cx(r = [{
  54154. name: "value",
  54155. type: "float"
  54156. }],n);
  54157. var s = z(n.get("data"), H(BB, e, t, n));
  54158. t && (s = B(s, H(WB, t)));
  54159. var l = t ? function(t, e, n, i) {
  54160. return If(t.coord[Math.floor(i / 2)][i % 2], r[i])
  54161. }
  54162. : function(t, e, n, i) {
  54163. return If(t.value, r[i])
  54164. }
  54165. ;
  54166. return i.initData(s, null, l),
  54167. i.hasItemOption = !0,
  54168. i
  54169. }(r, t, e);
  54170. e.setData(u),
  54171. u.each((function(e) {
  54172. var n = z(YB, (function(n) {
  54173. return HB(u, e, n, t, i)
  54174. }
  54175. ))
  54176. , o = r.getAxis("x").scale
  54177. , s = r.getAxis("y").scale
  54178. , l = o.getExtent()
  54179. , h = s.getExtent()
  54180. , c = [o.parse(u.get("x0", e)), o.parse(u.get("x1", e))]
  54181. , p = [s.parse(u.get("y0", e)), s.parse(u.get("y1", e))];
  54182. Qr(c),
  54183. Qr(p);
  54184. var d = !!(l[0] > c[1] || l[1] < c[0] || h[0] > p[1] || h[1] < p[0]);
  54185. u.setItemLayout(e, {
  54186. points: n,
  54187. allClipped: d
  54188. });
  54189. var f = u.getItemModel(e).getModel("itemStyle").getItemStyle()
  54190. , g = Ay(a, "color");
  54191. f.fill || (f.fill = g,
  54192. U(f.fill) && (f.fill = ii(f.fill, .4))),
  54193. f.stroke || (f.stroke = g),
  54194. u.setItemVisual(e, "style", f)
  54195. }
  54196. )),
  54197. u.diff(VB(l).data).add((function(t) {
  54198. var e = u.getItemLayout(t);
  54199. if (!e.allClipped) {
  54200. var n = new Xu({
  54201. shape: {
  54202. points: e.points
  54203. }
  54204. });
  54205. u.setItemGraphicEl(t, n),
  54206. l.group.add(n)
  54207. }
  54208. }
  54209. )).update((function(t, n) {
  54210. var i = VB(l).data.getItemGraphicEl(n)
  54211. , r = u.getItemLayout(t);
  54212. r.allClipped ? i && l.group.remove(i) : (i ? vh(i, {
  54213. shape: {
  54214. points: r.points
  54215. }
  54216. }, e, t) : i = new Xu({
  54217. shape: {
  54218. points: r.points
  54219. }
  54220. }),
  54221. u.setItemGraphicEl(t, i),
  54222. l.group.add(i))
  54223. }
  54224. )).remove((function(t) {
  54225. var e = VB(l).data.getItemGraphicEl(t);
  54226. l.group.remove(e)
  54227. }
  54228. )).execute(),
  54229. u.eachItemGraphicEl((function(t, n) {
  54230. var i = u.getItemModel(n)
  54231. , r = u.getItemVisual(n, "style");
  54232. t.useStyle(u.getItemVisual(n, "style")),
  54233. ic(t, rc(i), {
  54234. labelFetcher: e,
  54235. labelDataIndex: n,
  54236. defaultText: u.getName(n) || "",
  54237. inheritColor: U(r.fill) ? ii(r.fill, 1) : "#000"
  54238. }),
  54239. $l(t, i),
  54240. Zl(t, null, null, i.get(["emphasis", "disabled"])),
  54241. rl(t).dataModel = e
  54242. }
  54243. )),
  54244. VB(l).data = u,
  54245. l.group.silent = e.get("silent") || t.get("silent")
  54246. }
  54247. ,
  54248. e.type = "markArea",
  54249. e
  54250. }(TB);
  54251. var UB = function(t) {
  54252. function e() {
  54253. var n = null !== t && t.apply(this, arguments) || this;
  54254. return n.type = e.type,
  54255. n.layoutMode = {
  54256. type: "box",
  54257. ignoreSize: !0
  54258. },
  54259. n
  54260. }
  54261. return n(e, t),
  54262. e.prototype.init = function(t, e, n) {
  54263. this.mergeDefaultAndTheme(t, n),
  54264. t.selected = t.selected || {},
  54265. this._updateSelector(t)
  54266. }
  54267. ,
  54268. e.prototype.mergeOption = function(e, n) {
  54269. t.prototype.mergeOption.call(this, e, n),
  54270. this._updateSelector(e)
  54271. }
  54272. ,
  54273. e.prototype._updateSelector = function(t) {
  54274. var e = t.selector
  54275. , n = this.ecModel;
  54276. !0 === e && (e = t.selector = ["all", "inverse"]),
  54277. Y(e) && E(e, (function(t, i) {
  54278. U(t) && (t = {
  54279. type: t
  54280. }),
  54281. e[i] = C(t, function(t, e) {
  54282. return "all" === e ? {
  54283. type: "all",
  54284. title: t.getLocaleModel().get(["legend", "selector", "all"])
  54285. } : "inverse" === e ? {
  54286. type: "inverse",
  54287. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  54288. } : void 0
  54289. }(n, t.type))
  54290. }
  54291. ))
  54292. }
  54293. ,
  54294. e.prototype.optionUpdated = function() {
  54295. this._updateData(this.ecModel);
  54296. var t = this._data;
  54297. if (t[0] && "single" === this.get("selectedMode")) {
  54298. for (var e = !1, n = 0; n < t.length; n++) {
  54299. var i = t[n].get("name");
  54300. if (this.isSelected(i)) {
  54301. this.select(i),
  54302. e = !0;
  54303. break
  54304. }
  54305. }
  54306. !e && this.select(t[0].get("name"))
  54307. }
  54308. }
  54309. ,
  54310. e.prototype._updateData = function(t) {
  54311. var e = []
  54312. , n = [];
  54313. t.eachRawSeries((function(i) {
  54314. var r, o = i.name;
  54315. if (n.push(o),
  54316. i.legendVisualProvider) {
  54317. var a = i.legendVisualProvider.getAllNames();
  54318. t.isSeriesFiltered(i) || (n = n.concat(a)),
  54319. a.length ? e = e.concat(a) : r = !0
  54320. } else
  54321. r = !0;
  54322. r && No(i) && e.push(i.name)
  54323. }
  54324. )),
  54325. this._availableNames = n;
  54326. var i = this.get("data") || e
  54327. , r = yt()
  54328. , o = z(i, (function(t) {
  54329. return (U(t) || j(t)) && (t = {
  54330. name: t
  54331. }),
  54332. r.get(t.name) ? null : (r.set(t.name, !0),
  54333. new Cc(t,this,this.ecModel))
  54334. }
  54335. ), this);
  54336. this._data = B(o, (function(t) {
  54337. return !!t
  54338. }
  54339. ))
  54340. }
  54341. ,
  54342. e.prototype.getData = function() {
  54343. return this._data
  54344. }
  54345. ,
  54346. e.prototype.select = function(t) {
  54347. var e = this.option.selected;
  54348. "single" === this.get("selectedMode") && E(this._data, (function(t) {
  54349. e[t.get("name")] = !1
  54350. }
  54351. ));
  54352. e[t] = !0
  54353. }
  54354. ,
  54355. e.prototype.unSelect = function(t) {
  54356. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
  54357. }
  54358. ,
  54359. e.prototype.toggleSelected = function(t) {
  54360. var e = this.option.selected;
  54361. e.hasOwnProperty(t) || (e[t] = !0),
  54362. this[e[t] ? "unSelect" : "select"](t)
  54363. }
  54364. ,
  54365. e.prototype.allSelect = function() {
  54366. var t = this._data
  54367. , e = this.option.selected;
  54368. E(t, (function(t) {
  54369. e[t.get("name", !0)] = !0
  54370. }
  54371. ))
  54372. }
  54373. ,
  54374. e.prototype.inverseSelect = function() {
  54375. var t = this._data
  54376. , e = this.option.selected;
  54377. E(t, (function(t) {
  54378. var n = t.get("name", !0);
  54379. e.hasOwnProperty(n) || (e[n] = !0),
  54380. e[n] = !e[n]
  54381. }
  54382. ))
  54383. }
  54384. ,
  54385. e.prototype.isSelected = function(t) {
  54386. var e = this.option.selected;
  54387. return !(e.hasOwnProperty(t) && !e[t]) && P(this._availableNames, t) >= 0
  54388. }
  54389. ,
  54390. e.prototype.getOrient = function() {
  54391. return "vertical" === this.get("orient") ? {
  54392. index: 1,
  54393. name: "vertical"
  54394. } : {
  54395. index: 0,
  54396. name: "horizontal"
  54397. }
  54398. }
  54399. ,
  54400. e.type = "legend.plain",
  54401. e.dependencies = ["series"],
  54402. e.defaultOption = {
  54403. z: 4,
  54404. show: !0,
  54405. orient: "horizontal",
  54406. left: "center",
  54407. top: 0,
  54408. align: "auto",
  54409. backgroundColor: "rgba(0,0,0,0)",
  54410. borderColor: "#ccc",
  54411. borderRadius: 0,
  54412. borderWidth: 0,
  54413. padding: 5,
  54414. itemGap: 10,
  54415. itemWidth: 25,
  54416. itemHeight: 14,
  54417. symbolRotate: "inherit",
  54418. symbolKeepAspect: !0,
  54419. inactiveColor: "#ccc",
  54420. inactiveBorderColor: "#ccc",
  54421. inactiveBorderWidth: "auto",
  54422. itemStyle: {
  54423. color: "inherit",
  54424. opacity: "inherit",
  54425. borderColor: "inherit",
  54426. borderWidth: "auto",
  54427. borderCap: "inherit",
  54428. borderJoin: "inherit",
  54429. borderDashOffset: "inherit",
  54430. borderMiterLimit: "inherit"
  54431. },
  54432. lineStyle: {
  54433. width: "auto",
  54434. color: "inherit",
  54435. inactiveColor: "#ccc",
  54436. inactiveWidth: 2,
  54437. opacity: "inherit",
  54438. type: "inherit",
  54439. cap: "inherit",
  54440. join: "inherit",
  54441. dashOffset: "inherit",
  54442. miterLimit: "inherit"
  54443. },
  54444. textStyle: {
  54445. color: "#333"
  54446. },
  54447. selectedMode: !0,
  54448. selector: !1,
  54449. selectorLabel: {
  54450. show: !0,
  54451. borderRadius: 10,
  54452. padding: [3, 5, 3, 5],
  54453. fontSize: 12,
  54454. fontFamily: "sans-serif",
  54455. color: "#666",
  54456. borderWidth: 1,
  54457. borderColor: "#666"
  54458. },
  54459. emphasis: {
  54460. selectorLabel: {
  54461. show: !0,
  54462. color: "#eee",
  54463. backgroundColor: "#666"
  54464. }
  54465. },
  54466. selectorPosition: "auto",
  54467. selectorItemGap: 7,
  54468. selectorButtonGap: 10,
  54469. tooltip: {
  54470. show: !1
  54471. }
  54472. },
  54473. e
  54474. }(zp)
  54475. , ZB = H
  54476. , jB = E
  54477. , qB = Br
  54478. , KB = function(t) {
  54479. function e() {
  54480. var n = null !== t && t.apply(this, arguments) || this;
  54481. return n.type = e.type,
  54482. n.newlineDisabled = !1,
  54483. n
  54484. }
  54485. return n(e, t),
  54486. e.prototype.init = function() {
  54487. this.group.add(this._contentGroup = new qB),
  54488. this.group.add(this._selectorGroup = new qB),
  54489. this._isFirstRender = !0
  54490. }
  54491. ,
  54492. e.prototype.getContentGroup = function() {
  54493. return this._contentGroup
  54494. }
  54495. ,
  54496. e.prototype.getSelectorGroup = function() {
  54497. return this._selectorGroup
  54498. }
  54499. ,
  54500. e.prototype.render = function(t, e, n) {
  54501. var i = this._isFirstRender;
  54502. if (this._isFirstRender = !1,
  54503. this.resetInner(),
  54504. t.get("show", !0)) {
  54505. var r = t.get("align")
  54506. , o = t.get("orient");
  54507. r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === o ? "right" : "left");
  54508. var a = t.get("selector", !0)
  54509. , s = t.get("selectorPosition", !0);
  54510. !a || s && "auto" !== s || (s = "horizontal" === o ? "end" : "start"),
  54511. this.renderInner(r, t, e, n, a, o, s);
  54512. var l = t.getBoxLayoutParams()
  54513. , u = {
  54514. width: n.getWidth(),
  54515. height: n.getHeight()
  54516. }
  54517. , h = t.get("padding")
  54518. , c = kp(l, u, h)
  54519. , p = this.layoutInner(t, r, c, i, a, s)
  54520. , d = kp(k({
  54521. width: p.width,
  54522. height: p.height
  54523. }, l), u, h);
  54524. this.group.x = d.x - p.x,
  54525. this.group.y = d.y - p.y,
  54526. this.group.markRedraw(),
  54527. this.group.add(this._backgroundEl = Iz(p, t))
  54528. }
  54529. }
  54530. ,
  54531. e.prototype.resetInner = function() {
  54532. this.getContentGroup().removeAll(),
  54533. this._backgroundEl && this.group.remove(this._backgroundEl),
  54534. this.getSelectorGroup().removeAll()
  54535. }
  54536. ,
  54537. e.prototype.renderInner = function(t, e, n, i, r, o, a) {
  54538. var s = this.getContentGroup()
  54539. , l = yt()
  54540. , u = e.get("selectedMode")
  54541. , h = [];
  54542. n.eachRawSeries((function(t) {
  54543. !t.get("legendHoverLink") && h.push(t.id)
  54544. }
  54545. )),
  54546. jB(e.getData(), (function(r, o) {
  54547. var a = r.get("name");
  54548. if (!this.newlineDisabled && ("" === a || "\n" === a)) {
  54549. var c = new qB;
  54550. return c.newline = !0,
  54551. void s.add(c)
  54552. }
  54553. var p = n.getSeriesByName(a)[0];
  54554. if (!l.get(a)) {
  54555. if (p) {
  54556. var d = p.getData()
  54557. , f = d.getVisual("legendLineStyle") || {}
  54558. , g = d.getVisual("legendIcon")
  54559. , y = d.getVisual("style")
  54560. , v = this._createItem(p, a, o, r, e, t, f, y, g, u, i);
  54561. v.on("click", ZB($B, a, null, i, h)).on("mouseover", ZB(QB, p.name, null, i, h)).on("mouseout", ZB(tF, p.name, null, i, h)),
  54562. n.ssr && v.eachChild((function(t) {
  54563. var e = rl(t);
  54564. e.seriesIndex = p.seriesIndex,
  54565. e.dataIndex = o,
  54566. e.ssrType = "legend"
  54567. }
  54568. )),
  54569. l.set(a, !0)
  54570. } else
  54571. n.eachRawSeries((function(s) {
  54572. if (!l.get(a) && s.legendVisualProvider) {
  54573. var c = s.legendVisualProvider;
  54574. if (!c.containName(a))
  54575. return;
  54576. var p = c.indexOfName(a)
  54577. , d = c.getItemVisual(p, "style")
  54578. , f = c.getItemVisual(p, "legendIcon")
  54579. , g = qn(d.fill);
  54580. g && 0 === g[3] && (g[3] = .2,
  54581. d = A(A({}, d), {
  54582. fill: ri(g, "rgba")
  54583. }));
  54584. var y = this._createItem(s, a, o, r, e, t, {}, d, f, u, i);
  54585. y.on("click", ZB($B, null, a, i, h)).on("mouseover", ZB(QB, null, a, i, h)).on("mouseout", ZB(tF, null, a, i, h)),
  54586. n.ssr && y.eachChild((function(t) {
  54587. var e = rl(t);
  54588. e.seriesIndex = s.seriesIndex,
  54589. e.dataIndex = o,
  54590. e.ssrType = "legend"
  54591. }
  54592. )),
  54593. l.set(a, !0)
  54594. }
  54595. }
  54596. ), this);
  54597. 0
  54598. }
  54599. }
  54600. ), this),
  54601. r && this._createSelector(r, e, i, o, a)
  54602. }
  54603. ,
  54604. e.prototype._createSelector = function(t, e, n, i, r) {
  54605. var o = this.getSelectorGroup();
  54606. jB(t, (function(t) {
  54607. var i = t.type
  54608. , r = new Xs({
  54609. style: {
  54610. x: 0,
  54611. y: 0,
  54612. align: "center",
  54613. verticalAlign: "middle"
  54614. },
  54615. onclick: function() {
  54616. n.dispatchAction({
  54617. type: "all" === i ? "legendAllSelect" : "legendInverseSelect",
  54618. legendId: e.id
  54619. })
  54620. }
  54621. });
  54622. o.add(r),
  54623. ic(r, {
  54624. normal: e.getModel("selectorLabel"),
  54625. emphasis: e.getModel(["emphasis", "selectorLabel"])
  54626. }, {
  54627. defaultText: t.title
  54628. }),
  54629. Ul(r)
  54630. }
  54631. ))
  54632. }
  54633. ,
  54634. e.prototype._createItem = function(t, e, n, i, r, o, a, s, l, u, h) {
  54635. var c = t.visualDrawType
  54636. , p = r.get("itemWidth")
  54637. , d = r.get("itemHeight")
  54638. , f = r.isSelected(e)
  54639. , g = i.get("symbolRotate")
  54640. , y = i.get("symbolKeepAspect")
  54641. , v = i.get("icon")
  54642. , m = function(t, e, n, i, r, o, a) {
  54643. function s(t, e) {
  54644. "auto" === t.lineWidth && (t.lineWidth = e.lineWidth > 0 ? 2 : 0),
  54645. jB(t, (function(n, i) {
  54646. "inherit" === t[i] && (t[i] = e[i])
  54647. }
  54648. ))
  54649. }
  54650. var l = e.getModel("itemStyle")
  54651. , u = l.getItemStyle()
  54652. , h = 0 === t.lastIndexOf("empty", 0) ? "fill" : "stroke"
  54653. , c = l.getShallow("decal");
  54654. u.decal = c && "inherit" !== c ? mv(c, a) : i.decal,
  54655. "inherit" === u.fill && (u.fill = i[r]);
  54656. "inherit" === u.stroke && (u.stroke = i[h]);
  54657. "inherit" === u.opacity && (u.opacity = ("fill" === r ? i : n).opacity);
  54658. s(u, i);
  54659. var p = e.getModel("lineStyle")
  54660. , d = p.getLineStyle();
  54661. if (s(d, n),
  54662. "auto" === u.fill && (u.fill = i.fill),
  54663. "auto" === u.stroke && (u.stroke = i.fill),
  54664. "auto" === d.stroke && (d.stroke = i.fill),
  54665. !o) {
  54666. var f = e.get("inactiveBorderWidth")
  54667. , g = u[h];
  54668. u.lineWidth = "auto" === f ? i.lineWidth > 0 && g ? 2 : 0 : u.lineWidth,
  54669. u.fill = e.get("inactiveColor"),
  54670. u.stroke = e.get("inactiveBorderColor"),
  54671. d.stroke = p.get("inactiveColor"),
  54672. d.lineWidth = p.get("inactiveWidth")
  54673. }
  54674. return {
  54675. itemStyle: u,
  54676. lineStyle: d
  54677. }
  54678. }(l = v || l || "roundRect", i, a, s, c, f, h)
  54679. , x = new qB
  54680. , _ = i.getModel("textStyle");
  54681. if (!X(t.getLegendIcon) || v && "inherit" !== v) {
  54682. var b = "inherit" === v && t.getData().getVisual("symbol") ? "inherit" === g ? t.getData().getVisual("symbolRotate") : g : 0;
  54683. x.add(function(t) {
  54684. var e = t.icon || "roundRect"
  54685. , n = Xy(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  54686. n.setStyle(t.itemStyle),
  54687. n.rotation = (t.iconRotate || 0) * Math.PI / 180,
  54688. n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]),
  54689. e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill,
  54690. n.style.fill = "#fff",
  54691. n.style.lineWidth = 2);
  54692. return n
  54693. }({
  54694. itemWidth: p,
  54695. itemHeight: d,
  54696. icon: l,
  54697. iconRotate: b,
  54698. itemStyle: m.itemStyle,
  54699. lineStyle: m.lineStyle,
  54700. symbolKeepAspect: y
  54701. }))
  54702. } else
  54703. x.add(t.getLegendIcon({
  54704. itemWidth: p,
  54705. itemHeight: d,
  54706. icon: l,
  54707. iconRotate: g,
  54708. itemStyle: m.itemStyle,
  54709. lineStyle: m.lineStyle,
  54710. symbolKeepAspect: y
  54711. }));
  54712. var w = "left" === o ? p + 5 : -5
  54713. , S = o
  54714. , M = r.get("formatter")
  54715. , I = e;
  54716. U(M) && M ? I = M.replace("{name}", null != e ? e : "") : X(M) && (I = M(e));
  54717. var T = f ? _.getTextColor() : i.get("inactiveColor");
  54718. x.add(new Xs({
  54719. style: oc(_, {
  54720. text: I,
  54721. x: w,
  54722. y: d / 2,
  54723. fill: T,
  54724. align: S,
  54725. verticalAlign: "middle"
  54726. }, {
  54727. inheritColor: T
  54728. })
  54729. }));
  54730. var C = new Ws({
  54731. shape: x.getBoundingRect(),
  54732. style: {
  54733. fill: "transparent"
  54734. }
  54735. })
  54736. , D = i.getModel("tooltip");
  54737. return D.get("show") && Kh({
  54738. el: C,
  54739. componentModel: r,
  54740. itemName: e,
  54741. itemTooltipOption: D.option
  54742. }),
  54743. x.add(C),
  54744. x.eachChild((function(t) {
  54745. t.silent = !0
  54746. }
  54747. )),
  54748. C.silent = !u,
  54749. this.getContentGroup().add(x),
  54750. Ul(x),
  54751. x.__legendDataIndex = n,
  54752. x
  54753. }
  54754. ,
  54755. e.prototype.layoutInner = function(t, e, n, i, r, o) {
  54756. var a = this.getContentGroup()
  54757. , s = this.getSelectorGroup();
  54758. Ap(t.get("orient"), a, t.get("itemGap"), n.width, n.height);
  54759. var l = a.getBoundingRect()
  54760. , u = [-l.x, -l.y];
  54761. if (s.markRedraw(),
  54762. a.markRedraw(),
  54763. r) {
  54764. Ap("horizontal", s, t.get("selectorItemGap", !0));
  54765. var h = s.getBoundingRect()
  54766. , c = [-h.x, -h.y]
  54767. , p = t.get("selectorButtonGap", !0)
  54768. , d = t.getOrient().index
  54769. , f = 0 === d ? "width" : "height"
  54770. , g = 0 === d ? "height" : "width"
  54771. , y = 0 === d ? "y" : "x";
  54772. "end" === o ? c[d] += l[f] + p : u[d] += h[f] + p,
  54773. c[1 - d] += l[g] / 2 - h[g] / 2,
  54774. s.x = c[0],
  54775. s.y = c[1],
  54776. a.x = u[0],
  54777. a.y = u[1];
  54778. var v = {
  54779. x: 0,
  54780. y: 0
  54781. };
  54782. return v[f] = l[f] + p + h[f],
  54783. v[g] = Math.max(l[g], h[g]),
  54784. v[y] = Math.min(0, h[y] + c[1 - d]),
  54785. v
  54786. }
  54787. return a.x = u[0],
  54788. a.y = u[1],
  54789. this.group.getBoundingRect()
  54790. }
  54791. ,
  54792. e.prototype.remove = function() {
  54793. this.getContentGroup().removeAll(),
  54794. this._isFirstRender = !0
  54795. }
  54796. ,
  54797. e.type = "legend.plain",
  54798. e
  54799. }(Ag);
  54800. function $B(t, e, n, i) {
  54801. tF(t, e, n, i),
  54802. n.dispatchAction({
  54803. type: "legendToggleSelect",
  54804. name: null != t ? t : e
  54805. }),
  54806. QB(t, e, n, i)
  54807. }
  54808. function JB(t) {
  54809. for (var e, n = t.getZr().storage.getDisplayList(), i = 0, r = n.length; i < r && !(e = n[i].states.emphasis); )
  54810. i++;
  54811. return e && e.hoverLayer
  54812. }
  54813. function QB(t, e, n, i) {
  54814. JB(n) || n.dispatchAction({
  54815. type: "highlight",
  54816. seriesName: t,
  54817. name: e,
  54818. excludeSeriesId: i
  54819. })
  54820. }
  54821. function tF(t, e, n, i) {
  54822. JB(n) || n.dispatchAction({
  54823. type: "downplay",
  54824. seriesName: t,
  54825. name: e,
  54826. excludeSeriesId: i
  54827. })
  54828. }
  54829. function eF(t) {
  54830. var e = t.findComponents({
  54831. mainType: "legend"
  54832. });
  54833. e && e.length && t.filterSeries((function(t) {
  54834. for (var n = 0; n < e.length; n++)
  54835. if (!e[n].isSelected(t.name))
  54836. return !1;
  54837. return !0
  54838. }
  54839. ))
  54840. }
  54841. function nF(t, e, n) {
  54842. var i = "allSelect" === t || "inverseSelect" === t
  54843. , r = {}
  54844. , o = [];
  54845. n.eachComponent({
  54846. mainType: "legend",
  54847. query: e
  54848. }, (function(n) {
  54849. i ? n[t]() : n[t](e.name),
  54850. iF(n, r),
  54851. o.push(n.componentIndex)
  54852. }
  54853. ));
  54854. var a = {};
  54855. return n.eachComponent("legend", (function(t) {
  54856. E(r, (function(e, n) {
  54857. t[e ? "select" : "unSelect"](n)
  54858. }
  54859. )),
  54860. iF(t, a)
  54861. }
  54862. )),
  54863. i ? {
  54864. selected: a,
  54865. legendIndex: o
  54866. } : {
  54867. name: e.name,
  54868. selected: a
  54869. }
  54870. }
  54871. function iF(t, e) {
  54872. var n = e || {};
  54873. return E(t.getData(), (function(e) {
  54874. var i = e.get("name");
  54875. if ("\n" !== i && "" !== i) {
  54876. var r = t.isSelected(i);
  54877. _t(n, i) ? n[i] = n[i] && r : n[i] = r
  54878. }
  54879. }
  54880. )),
  54881. n
  54882. }
  54883. function rF(t) {
  54884. t.registerComponentModel(UB),
  54885. t.registerComponentView(KB),
  54886. t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, eF),
  54887. t.registerSubTypeDefaulter("legend", (function() {
  54888. return "plain"
  54889. }
  54890. )),
  54891. function(t) {
  54892. t.registerAction("legendToggleSelect", "legendselectchanged", H(nF, "toggleSelected")),
  54893. t.registerAction("legendAllSelect", "legendselectall", H(nF, "allSelect")),
  54894. t.registerAction("legendInverseSelect", "legendinverseselect", H(nF, "inverseSelect")),
  54895. t.registerAction("legendSelect", "legendselected", H(nF, "select")),
  54896. t.registerAction("legendUnSelect", "legendunselected", H(nF, "unSelect"))
  54897. }(t)
  54898. }
  54899. var oF = function(t) {
  54900. function e() {
  54901. var n = null !== t && t.apply(this, arguments) || this;
  54902. return n.type = e.type,
  54903. n
  54904. }
  54905. return n(e, t),
  54906. e.prototype.setScrollDataIndex = function(t) {
  54907. this.option.scrollDataIndex = t
  54908. }
  54909. ,
  54910. e.prototype.init = function(e, n, i) {
  54911. var r = Rp(e);
  54912. t.prototype.init.call(this, e, n, i),
  54913. aF(this, e, r)
  54914. }
  54915. ,
  54916. e.prototype.mergeOption = function(e, n) {
  54917. t.prototype.mergeOption.call(this, e, n),
  54918. aF(this, this.option, e)
  54919. }
  54920. ,
  54921. e.type = "legend.scroll",
  54922. e.defaultOption = kc(UB.defaultOption, {
  54923. scrollDataIndex: 0,
  54924. pageButtonItemGap: 5,
  54925. pageButtonGap: null,
  54926. pageButtonPosition: "end",
  54927. pageFormatter: "{current}/{total}",
  54928. pageIcons: {
  54929. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  54930. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  54931. },
  54932. pageIconColor: "#2f4554",
  54933. pageIconInactiveColor: "#aaa",
  54934. pageIconSize: 15,
  54935. pageTextStyle: {
  54936. color: "#333"
  54937. },
  54938. animationDurationUpdate: 800
  54939. }),
  54940. e
  54941. }(UB);
  54942. function aF(t, e, n) {
  54943. var i = [1, 1];
  54944. i[t.getOrient().index] = 0,
  54945. Op(e, n, {
  54946. type: "box",
  54947. ignoreSize: !!i
  54948. })
  54949. }
  54950. var sF = Br
  54951. , lF = ["width", "height"]
  54952. , uF = ["x", "y"]
  54953. , hF = function(t) {
  54954. function e() {
  54955. var n = null !== t && t.apply(this, arguments) || this;
  54956. return n.type = e.type,
  54957. n.newlineDisabled = !0,
  54958. n._currentIndex = 0,
  54959. n
  54960. }
  54961. return n(e, t),
  54962. e.prototype.init = function() {
  54963. t.prototype.init.call(this),
  54964. this.group.add(this._containerGroup = new sF),
  54965. this._containerGroup.add(this.getContentGroup()),
  54966. this.group.add(this._controllerGroup = new sF)
  54967. }
  54968. ,
  54969. e.prototype.resetInner = function() {
  54970. t.prototype.resetInner.call(this),
  54971. this._controllerGroup.removeAll(),
  54972. this._containerGroup.removeClipPath(),
  54973. this._containerGroup.__rectSize = null
  54974. }
  54975. ,
  54976. e.prototype.renderInner = function(e, n, i, r, o, a, s) {
  54977. var l = this;
  54978. t.prototype.renderInner.call(this, e, n, i, r, o, a, s);
  54979. var u = this._controllerGroup
  54980. , h = n.get("pageIconSize", !0)
  54981. , c = Y(h) ? h : [h, h];
  54982. d("pagePrev", 0);
  54983. var p = n.getModel("pageTextStyle");
  54984. function d(t, e) {
  54985. var i = t + "DataIndex"
  54986. , o = Uh(n.get("pageIcons", !0)[n.getOrient().name][e], {
  54987. onclick: W(l._pageGo, l, i, n, r)
  54988. }, {
  54989. x: -c[0] / 2,
  54990. y: -c[1] / 2,
  54991. width: c[0],
  54992. height: c[1]
  54993. });
  54994. o.name = t,
  54995. u.add(o)
  54996. }
  54997. u.add(new Xs({
  54998. name: "pageText",
  54999. style: {
  55000. text: "xx/xx",
  55001. fill: p.getTextColor(),
  55002. font: p.getFont(),
  55003. verticalAlign: "middle",
  55004. align: "center"
  55005. },
  55006. silent: !0
  55007. })),
  55008. d("pageNext", 1)
  55009. }
  55010. ,
  55011. e.prototype.layoutInner = function(t, e, n, i, r, o) {
  55012. var a = this.getSelectorGroup()
  55013. , s = t.getOrient().index
  55014. , l = lF[s]
  55015. , u = uF[s]
  55016. , h = lF[1 - s]
  55017. , c = uF[1 - s];
  55018. r && Ap("horizontal", a, t.get("selectorItemGap", !0));
  55019. var p = t.get("selectorButtonGap", !0)
  55020. , d = a.getBoundingRect()
  55021. , f = [-d.x, -d.y]
  55022. , g = T(n);
  55023. r && (g[l] = n[l] - d[l] - p);
  55024. var y = this._layoutContentAndController(t, i, g, s, l, h, c, u);
  55025. if (r) {
  55026. if ("end" === o)
  55027. f[s] += y[l] + p;
  55028. else {
  55029. var v = d[l] + p;
  55030. f[s] -= v,
  55031. y[u] -= v
  55032. }
  55033. y[l] += d[l] + p,
  55034. f[1 - s] += y[c] + y[h] / 2 - d[h] / 2,
  55035. y[h] = Math.max(y[h], d[h]),
  55036. y[c] = Math.min(y[c], d[c] + f[1 - s]),
  55037. a.x = f[0],
  55038. a.y = f[1],
  55039. a.markRedraw()
  55040. }
  55041. return y
  55042. }
  55043. ,
  55044. e.prototype._layoutContentAndController = function(t, e, n, i, r, o, a, s) {
  55045. var l = this.getContentGroup()
  55046. , u = this._containerGroup
  55047. , h = this._controllerGroup;
  55048. Ap(t.get("orient"), l, t.get("itemGap"), i ? n.width : null, i ? null : n.height),
  55049. Ap("horizontal", h, t.get("pageButtonItemGap", !0));
  55050. var c = l.getBoundingRect()
  55051. , p = h.getBoundingRect()
  55052. , d = this._showController = c[r] > n[r]
  55053. , f = [-c.x, -c.y];
  55054. e || (f[i] = l[s]);
  55055. var g = [0, 0]
  55056. , y = [-p.x, -p.y]
  55057. , v = rt(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  55058. d && ("end" === t.get("pageButtonPosition", !0) ? y[i] += n[r] - p[r] : g[i] += p[r] + v);
  55059. y[1 - i] += c[o] / 2 - p[o] / 2,
  55060. l.setPosition(f),
  55061. u.setPosition(g),
  55062. h.setPosition(y);
  55063. var m = {
  55064. x: 0,
  55065. y: 0
  55066. };
  55067. if (m[r] = d ? n[r] : c[r],
  55068. m[o] = Math.max(c[o], p[o]),
  55069. m[a] = Math.min(0, p[a] + y[1 - i]),
  55070. u.__rectSize = n[r],
  55071. d) {
  55072. var x = {
  55073. x: 0,
  55074. y: 0
  55075. };
  55076. x[r] = Math.max(n[r] - p[r] - v, 0),
  55077. x[o] = m[o],
  55078. u.setClipPath(new Ws({
  55079. shape: x
  55080. })),
  55081. u.__rectSize = x[r]
  55082. } else
  55083. h.eachChild((function(t) {
  55084. t.attr({
  55085. invisible: !0,
  55086. silent: !0
  55087. })
  55088. }
  55089. ));
  55090. var _ = this._getPageInfo(t);
  55091. return null != _.pageIndex && vh(l, {
  55092. x: _.contentPosition[0],
  55093. y: _.contentPosition[1]
  55094. }, d ? t : null),
  55095. this._updatePageInfoView(t, _),
  55096. m
  55097. }
  55098. ,
  55099. e.prototype._pageGo = function(t, e, n) {
  55100. var i = this._getPageInfo(e)[t];
  55101. null != i && n.dispatchAction({
  55102. type: "legendScroll",
  55103. scrollDataIndex: i,
  55104. legendId: e.id
  55105. })
  55106. }
  55107. ,
  55108. e.prototype._updatePageInfoView = function(t, e) {
  55109. var n = this._controllerGroup;
  55110. E(["pagePrev", "pageNext"], (function(i) {
  55111. var r = null != e[i + "DataIndex"]
  55112. , o = n.childOfName(i);
  55113. o && (o.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)),
  55114. o.cursor = r ? "pointer" : "default")
  55115. }
  55116. ));
  55117. var i = n.childOfName("pageText")
  55118. , r = t.get("pageFormatter")
  55119. , o = e.pageIndex
  55120. , a = null != o ? o + 1 : 0
  55121. , s = e.pageCount;
  55122. i && r && i.setStyle("text", U(r) ? r.replace("{current}", null == a ? "" : a + "").replace("{total}", null == s ? "" : s + "") : r({
  55123. current: a,
  55124. total: s
  55125. }))
  55126. }
  55127. ,
  55128. e.prototype._getPageInfo = function(t) {
  55129. var e = t.get("scrollDataIndex", !0)
  55130. , n = this.getContentGroup()
  55131. , i = this._containerGroup.__rectSize
  55132. , r = t.getOrient().index
  55133. , o = lF[r]
  55134. , a = uF[r]
  55135. , s = this._findTargetItemIndex(e)
  55136. , l = n.children()
  55137. , u = l[s]
  55138. , h = l.length
  55139. , c = h ? 1 : 0
  55140. , p = {
  55141. contentPosition: [n.x, n.y],
  55142. pageCount: c,
  55143. pageIndex: c - 1,
  55144. pagePrevDataIndex: null,
  55145. pageNextDataIndex: null
  55146. };
  55147. if (!u)
  55148. return p;
  55149. var d = m(u);
  55150. p.contentPosition[r] = -d.s;
  55151. for (var f = s + 1, g = d, y = d, v = null; f <= h; ++f)
  55152. (!(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),
  55153. ++p.pageCount),
  55154. y = v;
  55155. for (f = s - 1,
  55156. g = d,
  55157. y = d,
  55158. v = null; f >= -1; --f)
  55159. (v = m(l[f])) && x(y, v.s) || !(g.i < y.i) || (y = g,
  55160. null == p.pagePrevDataIndex && (p.pagePrevDataIndex = g.i),
  55161. ++p.pageCount,
  55162. ++p.pageIndex),
  55163. g = v;
  55164. return p;
  55165. function m(t) {
  55166. if (t) {
  55167. var e = t.getBoundingRect()
  55168. , n = e[a] + t[a];
  55169. return {
  55170. s: n,
  55171. e: n + e[o],
  55172. i: t.__legendDataIndex
  55173. }
  55174. }
  55175. }
  55176. function x(t, e) {
  55177. return t.e >= e && t.s <= e + i
  55178. }
  55179. }
  55180. ,
  55181. e.prototype._findTargetItemIndex = function(t) {
  55182. return this._showController ? (this.getContentGroup().eachChild((function(i, r) {
  55183. var o = i.__legendDataIndex;
  55184. null == n && null != o && (n = r),
  55185. o === t && (e = r)
  55186. }
  55187. )),
  55188. null != e ? e : n) : 0;
  55189. var e, n
  55190. }
  55191. ,
  55192. e.type = "legend.scroll",
  55193. e
  55194. }(KB);
  55195. function cF(t) {
  55196. Vm(rF),
  55197. t.registerComponentModel(oF),
  55198. t.registerComponentView(hF),
  55199. function(t) {
  55200. t.registerAction("legendScroll", "legendscroll", (function(t, e) {
  55201. var n = t.scrollDataIndex;
  55202. null != n && e.eachComponent({
  55203. mainType: "legend",
  55204. subType: "scroll",
  55205. query: t
  55206. }, (function(t) {
  55207. t.setScrollDataIndex(n)
  55208. }
  55209. ))
  55210. }
  55211. ))
  55212. }(t)
  55213. }
  55214. var pF = function(t) {
  55215. function e() {
  55216. var n = null !== t && t.apply(this, arguments) || this;
  55217. return n.type = e.type,
  55218. n
  55219. }
  55220. return n(e, t),
  55221. e.type = "dataZoom.inside",
  55222. e.defaultOption = kc(lz.defaultOption, {
  55223. disabled: !1,
  55224. zoomLock: !1,
  55225. zoomOnMouseWheel: !0,
  55226. moveOnMouseMove: !0,
  55227. moveOnMouseWheel: !1,
  55228. preventDefaultMouseMove: !0
  55229. }),
  55230. e
  55231. }(lz)
  55232. , dF = Vo();
  55233. function fF(t, e, n) {
  55234. dF(t).coordSysRecordMap.each((function(t) {
  55235. var i = t.dataZoomInfoMap.get(e.uid);
  55236. i && (i.getRange = n)
  55237. }
  55238. ))
  55239. }
  55240. function gF(t, e) {
  55241. if (e) {
  55242. t.removeKey(e.model.uid);
  55243. var n = e.controller;
  55244. n && n.dispose()
  55245. }
  55246. }
  55247. function yF(t, e) {
  55248. t.isDisposed() || t.dispatchAction({
  55249. type: "dataZoom",
  55250. animation: {
  55251. easing: "cubicOut",
  55252. duration: 100
  55253. },
  55254. batch: e
  55255. })
  55256. }
  55257. function vF(t, e, n, i) {
  55258. return t.coordinateSystem.containPoint([n, i])
  55259. }
  55260. function mF(t) {
  55261. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, (function(t, e) {
  55262. var n = dF(e)
  55263. , i = n.coordSysRecordMap || (n.coordSysRecordMap = yt());
  55264. i.each((function(t) {
  55265. t.dataZoomInfoMap = null
  55266. }
  55267. )),
  55268. t.eachComponent({
  55269. mainType: "dataZoom",
  55270. subType: "inside"
  55271. }, (function(t) {
  55272. E(az(t).infoList, (function(n) {
  55273. var r = n.model.uid
  55274. , o = i.get(r) || i.set(r, function(t, e) {
  55275. var n = {
  55276. model: e,
  55277. containsPoint: H(vF, e),
  55278. dispatchAction: H(yF, t),
  55279. dataZoomInfoMap: null,
  55280. controller: null
  55281. }
  55282. , i = n.controller = new nT(t.getZr());
  55283. return E(["pan", "zoom", "scrollMove"], (function(t) {
  55284. i.on(t, (function(e) {
  55285. var i = [];
  55286. n.dataZoomInfoMap.each((function(r) {
  55287. if (e.isAvailableBehavior(r.model.option)) {
  55288. var o = (r.getRange || {})[t]
  55289. , a = o && o(r.dzReferCoordSysInfo, n.model.mainType, n.controller, e);
  55290. !r.model.get("disabled", !0) && a && i.push({
  55291. dataZoomId: r.model.id,
  55292. start: a[0],
  55293. end: a[1]
  55294. })
  55295. }
  55296. }
  55297. )),
  55298. i.length && n.dispatchAction(i)
  55299. }
  55300. ))
  55301. }
  55302. )),
  55303. n
  55304. }(e, n.model));
  55305. (o.dataZoomInfoMap || (o.dataZoomInfoMap = yt())).set(t.uid, {
  55306. dzReferCoordSysInfo: n,
  55307. model: t,
  55308. getRange: null
  55309. })
  55310. }
  55311. ))
  55312. }
  55313. )),
  55314. i.each((function(t) {
  55315. var e, n = t.controller, r = t.dataZoomInfoMap;
  55316. if (r) {
  55317. var o = r.keys()[0];
  55318. null != o && (e = r.get(o))
  55319. }
  55320. if (e) {
  55321. var a = function(t) {
  55322. var e, n = "type_", i = {
  55323. type_true: 2,
  55324. type_move: 1,
  55325. type_false: 0,
  55326. type_undefined: -1
  55327. }, r = !0;
  55328. return t.each((function(t) {
  55329. var o = t.model
  55330. , a = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
  55331. i[n + a] > i[n + e] && (e = a),
  55332. r = r && o.get("preventDefaultMouseMove", !0)
  55333. }
  55334. )),
  55335. {
  55336. controlType: e,
  55337. opt: {
  55338. zoomOnMouseWheel: !0,
  55339. moveOnMouseMove: !0,
  55340. moveOnMouseWheel: !0,
  55341. preventDefaultMouseMove: !!r
  55342. }
  55343. }
  55344. }(r);
  55345. n.enable(a.controlType, a.opt),
  55346. n.setPointerChecker(t.containsPoint),
  55347. Hg(t, "dispatchAction", e.model.get("throttle", !0), "fixRate")
  55348. } else
  55349. gF(i, t)
  55350. }
  55351. ))
  55352. }
  55353. ))
  55354. }
  55355. var xF = function(t) {
  55356. function e() {
  55357. var e = null !== t && t.apply(this, arguments) || this;
  55358. return e.type = "dataZoom.inside",
  55359. e
  55360. }
  55361. return n(e, t),
  55362. e.prototype.render = function(e, n, i) {
  55363. t.prototype.render.apply(this, arguments),
  55364. e.noTarget() ? this._clear() : (this.range = e.getPercentRange(),
  55365. fF(i, e, {
  55366. pan: W(_F.pan, this),
  55367. zoom: W(_F.zoom, this),
  55368. scrollMove: W(_F.scrollMove, this)
  55369. }))
  55370. }
  55371. ,
  55372. e.prototype.dispose = function() {
  55373. this._clear(),
  55374. t.prototype.dispose.apply(this, arguments)
  55375. }
  55376. ,
  55377. e.prototype._clear = function() {
  55378. !function(t, e) {
  55379. for (var n = dF(t).coordSysRecordMap, i = n.keys(), r = 0; r < i.length; r++) {
  55380. var o = i[r]
  55381. , a = n.get(o)
  55382. , s = a.dataZoomInfoMap;
  55383. if (s) {
  55384. var l = e.uid;
  55385. s.get(l) && (s.removeKey(l),
  55386. s.keys().length || gF(n, a))
  55387. }
  55388. }
  55389. }(this.api, this.dataZoomModel),
  55390. this.range = null
  55391. }
  55392. ,
  55393. e.type = "dataZoom.inside",
  55394. e
  55395. }(cz)
  55396. , _F = {
  55397. zoom: function(t, e, n, i) {
  55398. var r = this.range
  55399. , o = r.slice()
  55400. , a = t.axisModels[0];
  55401. if (a) {
  55402. var s = wF[e](null, [i.originX, i.originY], a, n, t)
  55403. , l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (o[1] - o[0]) + o[0]
  55404. , u = Math.max(1 / i.scale, 0);
  55405. o[0] = (o[0] - l) * u + l,
  55406. o[1] = (o[1] - l) * u + l;
  55407. var h = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  55408. return zk(0, o, [0, 100], 0, h.minSpan, h.maxSpan),
  55409. this.range = o,
  55410. r[0] !== o[0] || r[1] !== o[1] ? o : void 0
  55411. }
  55412. },
  55413. pan: bF((function(t, e, n, i, r, o) {
  55414. var a = wF[i]([o.oldX, o.oldY], [o.newX, o.newY], e, r, n);
  55415. return a.signal * (t[1] - t[0]) * a.pixel / a.pixelLength
  55416. }
  55417. )),
  55418. scrollMove: bF((function(t, e, n, i, r, o) {
  55419. return wF[i]([0, 0], [o.scrollDelta, o.scrollDelta], e, r, n).signal * (t[1] - t[0]) * o.scrollDelta
  55420. }
  55421. ))
  55422. };
  55423. function bF(t) {
  55424. return function(e, n, i, r) {
  55425. var o = this.range
  55426. , a = o.slice()
  55427. , s = e.axisModels[0];
  55428. if (s)
  55429. return zk(t(a, s, e, n, i, r), a, [0, 100], "all"),
  55430. this.range = a,
  55431. o[0] !== a[0] || o[1] !== a[1] ? a : void 0
  55432. }
  55433. }
  55434. var wF = {
  55435. grid: function(t, e, n, i, r) {
  55436. var o = n.axis
  55437. , a = {}
  55438. , s = r.model.coordinateSystem.getRect();
  55439. return t = t || [0, 0],
  55440. "x" === o.dim ? (a.pixel = e[0] - t[0],
  55441. a.pixelLength = s.width,
  55442. a.pixelStart = s.x,
  55443. a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1],
  55444. a.pixelLength = s.height,
  55445. a.pixelStart = s.y,
  55446. a.signal = o.inverse ? -1 : 1),
  55447. a
  55448. },
  55449. polar: function(t, e, n, i, r) {
  55450. var o = n.axis
  55451. , a = {}
  55452. , s = r.model.coordinateSystem
  55453. , l = s.getRadiusAxis().getExtent()
  55454. , u = s.getAngleAxis().getExtent();
  55455. return t = t ? s.pointToCoord(t) : [0, 0],
  55456. e = s.pointToCoord(e),
  55457. "radiusAxis" === n.mainType ? (a.pixel = e[0] - t[0],
  55458. a.pixelLength = l[1] - l[0],
  55459. a.pixelStart = l[0],
  55460. a.signal = o.inverse ? 1 : -1) : (a.pixel = e[1] - t[1],
  55461. a.pixelLength = u[1] - u[0],
  55462. a.pixelStart = u[0],
  55463. a.signal = o.inverse ? -1 : 1),
  55464. a
  55465. },
  55466. singleAxis: function(t, e, n, i, r) {
  55467. var o = n.axis
  55468. , a = r.model.coordinateSystem.getRect()
  55469. , s = {};
  55470. return t = t || [0, 0],
  55471. "horizontal" === o.orient ? (s.pixel = e[0] - t[0],
  55472. s.pixelLength = a.width,
  55473. s.pixelStart = a.x,
  55474. s.signal = o.inverse ? 1 : -1) : (s.pixel = e[1] - t[1],
  55475. s.pixelLength = a.height,
  55476. s.pixelStart = a.y,
  55477. s.signal = o.inverse ? -1 : 1),
  55478. s
  55479. }
  55480. };
  55481. function SF(t) {
  55482. mz(t),
  55483. t.registerComponentModel(pF),
  55484. t.registerComponentView(xF),
  55485. mF(t)
  55486. }
  55487. var MF = function(t) {
  55488. function e() {
  55489. var n = null !== t && t.apply(this, arguments) || this;
  55490. return n.type = e.type,
  55491. n
  55492. }
  55493. return n(e, t),
  55494. e.type = "dataZoom.slider",
  55495. e.layoutMode = "box",
  55496. e.defaultOption = kc(lz.defaultOption, {
  55497. show: !0,
  55498. right: "ph",
  55499. top: "ph",
  55500. width: "ph",
  55501. height: "ph",
  55502. left: null,
  55503. bottom: null,
  55504. borderColor: "#d2dbee",
  55505. borderRadius: 3,
  55506. backgroundColor: "rgba(47,69,84,0)",
  55507. dataBackground: {
  55508. lineStyle: {
  55509. color: "#d2dbee",
  55510. width: .5
  55511. },
  55512. areaStyle: {
  55513. color: "#d2dbee",
  55514. opacity: .2
  55515. }
  55516. },
  55517. selectedDataBackground: {
  55518. lineStyle: {
  55519. color: "#8fb0f7",
  55520. width: .5
  55521. },
  55522. areaStyle: {
  55523. color: "#8fb0f7",
  55524. opacity: .2
  55525. }
  55526. },
  55527. fillerColor: "rgba(135,175,274,0.2)",
  55528. 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",
  55529. handleSize: "100%",
  55530. handleStyle: {
  55531. color: "#fff",
  55532. borderColor: "#ACB8D1"
  55533. },
  55534. moveHandleSize: 7,
  55535. 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",
  55536. moveHandleStyle: {
  55537. color: "#D2DBEE",
  55538. opacity: .7
  55539. },
  55540. showDetail: !0,
  55541. showDataShadow: "auto",
  55542. realtime: !0,
  55543. zoomLock: !1,
  55544. textStyle: {
  55545. color: "#6E7079"
  55546. },
  55547. brushSelect: !0,
  55548. brushStyle: {
  55549. color: "rgba(135,175,274,0.15)"
  55550. },
  55551. emphasis: {
  55552. handleLabel: {
  55553. show: !0
  55554. },
  55555. handleStyle: {
  55556. borderColor: "#8FB0F7"
  55557. },
  55558. moveHandleStyle: {
  55559. color: "#8FB0F7"
  55560. }
  55561. }
  55562. }),
  55563. e
  55564. }(lz)
  55565. , IF = Ws
  55566. , TF = "horizontal"
  55567. , CF = "vertical"
  55568. , DF = ["line", "bar", "candlestick", "scatter"]
  55569. , AF = {
  55570. easing: "cubicOut",
  55571. duration: 100,
  55572. delay: 0
  55573. }
  55574. , kF = function(t) {
  55575. function e() {
  55576. var n = null !== t && t.apply(this, arguments) || this;
  55577. return n.type = e.type,
  55578. n._displayables = {},
  55579. n
  55580. }
  55581. return n(e, t),
  55582. e.prototype.init = function(t, e) {
  55583. this.api = e,
  55584. this._onBrush = W(this._onBrush, this),
  55585. this._onBrushEnd = W(this._onBrushEnd, this)
  55586. }
  55587. ,
  55588. e.prototype.render = function(e, n, i, r) {
  55589. if (t.prototype.render.apply(this, arguments),
  55590. Hg(this, "_dispatchZoomAction", e.get("throttle"), "fixRate"),
  55591. this._orient = e.getOrient(),
  55592. !1 !== e.get("show")) {
  55593. if (e.noTarget())
  55594. return this._clear(),
  55595. void this.group.removeAll();
  55596. r && "dataZoom" === r.type && r.from === this.uid || this._buildView(),
  55597. this._updateView()
  55598. } else
  55599. this.group.removeAll()
  55600. }
  55601. ,
  55602. e.prototype.dispose = function() {
  55603. this._clear(),
  55604. t.prototype.dispose.apply(this, arguments)
  55605. }
  55606. ,
  55607. e.prototype._clear = function() {
  55608. Yg(this, "_dispatchZoomAction");
  55609. var t = this.api.getZr();
  55610. t.off("mousemove", this._onBrush),
  55611. t.off("mouseup", this._onBrushEnd)
  55612. }
  55613. ,
  55614. e.prototype._buildView = function() {
  55615. var t = this.group;
  55616. t.removeAll(),
  55617. this._brushing = !1,
  55618. this._displayables.brushRect = null,
  55619. this._resetLocation(),
  55620. this._resetInterval();
  55621. var e = this._displayables.sliderGroup = new Br;
  55622. this._renderBackground(),
  55623. this._renderHandle(),
  55624. this._renderDataShadow(),
  55625. t.add(e),
  55626. this._positionGroup()
  55627. }
  55628. ,
  55629. e.prototype._resetLocation = function() {
  55630. var t = this.dataZoomModel
  55631. , e = this.api
  55632. , n = t.get("brushSelect") ? 7 : 0
  55633. , i = this._findCoordRect()
  55634. , r = {
  55635. width: e.getWidth(),
  55636. height: e.getHeight()
  55637. }
  55638. , o = this._orient === TF ? {
  55639. right: r.width - i.x - i.width,
  55640. top: r.height - 30 - 7 - n,
  55641. width: i.width,
  55642. height: 30
  55643. } : {
  55644. right: 7,
  55645. top: i.y,
  55646. width: 30,
  55647. height: i.height
  55648. }
  55649. , a = Rp(t.option);
  55650. E(["right", "top", "width", "height"], (function(t) {
  55651. "ph" === a[t] && (a[t] = o[t])
  55652. }
  55653. ));
  55654. var s = kp(a, r);
  55655. this._location = {
  55656. x: s.x,
  55657. y: s.y
  55658. },
  55659. this._size = [s.width, s.height],
  55660. this._orient === CF && this._size.reverse()
  55661. }
  55662. ,
  55663. e.prototype._positionGroup = function() {
  55664. var t = this.group
  55665. , e = this._location
  55666. , n = this._orient
  55667. , i = this.dataZoomModel.getFirstTargetAxisModel()
  55668. , r = i && i.get("inverse")
  55669. , o = this._displayables.sliderGroup
  55670. , a = (this._dataShadowInfo || {}).otherAxisInverse;
  55671. o.attr(n !== TF || r ? n === TF && r ? {
  55672. scaleY: a ? 1 : -1,
  55673. scaleX: -1
  55674. } : n !== CF || r ? {
  55675. scaleY: a ? -1 : 1,
  55676. scaleX: -1,
  55677. rotation: Math.PI / 2
  55678. } : {
  55679. scaleY: a ? -1 : 1,
  55680. scaleX: 1,
  55681. rotation: Math.PI / 2
  55682. } : {
  55683. scaleY: a ? 1 : -1,
  55684. scaleX: 1
  55685. });
  55686. var s = t.getBoundingRect([o]);
  55687. t.x = e.x - s.x,
  55688. t.y = e.y - s.y,
  55689. t.markRedraw()
  55690. }
  55691. ,
  55692. e.prototype._getViewExtent = function() {
  55693. return [0, this._size[0]]
  55694. }
  55695. ,
  55696. e.prototype._renderBackground = function() {
  55697. var t = this.dataZoomModel
  55698. , e = this._size
  55699. , n = this._displayables.sliderGroup
  55700. , i = t.get("brushSelect");
  55701. n.add(new IF({
  55702. silent: !0,
  55703. shape: {
  55704. x: 0,
  55705. y: 0,
  55706. width: e[0],
  55707. height: e[1]
  55708. },
  55709. style: {
  55710. fill: t.get("backgroundColor")
  55711. },
  55712. z2: -40
  55713. }));
  55714. var r = new IF({
  55715. shape: {
  55716. x: 0,
  55717. y: 0,
  55718. width: e[0],
  55719. height: e[1]
  55720. },
  55721. style: {
  55722. fill: "transparent"
  55723. },
  55724. z2: 0,
  55725. onclick: W(this._onClickPanel, this)
  55726. })
  55727. , o = this.api.getZr();
  55728. i ? (r.on("mousedown", this._onBrushStart, this),
  55729. r.cursor = "crosshair",
  55730. o.on("mousemove", this._onBrush),
  55731. o.on("mouseup", this._onBrushEnd)) : (o.off("mousemove", this._onBrush),
  55732. o.off("mouseup", this._onBrushEnd)),
  55733. n.add(r)
  55734. }
  55735. ,
  55736. e.prototype._renderDataShadow = function() {
  55737. var t = this._dataShadowInfo = this._prepareDataShadowInfo();
  55738. if (this._displayables.dataShadowSegs = [],
  55739. t) {
  55740. var e = this._size
  55741. , n = this._shadowSize || []
  55742. , i = t.series
  55743. , r = i.getRawData()
  55744. , o = i.getShadowDim && i.getShadowDim()
  55745. , a = o && r.getDimensionInfo(o) ? i.getShadowDim() : t.otherDim;
  55746. if (null != a) {
  55747. var s = this._shadowPolygonPts
  55748. , l = this._shadowPolylinePts;
  55749. if (r !== this._shadowData || a !== this._shadowDim || e[0] !== n[0] || e[1] !== n[1]) {
  55750. var u = r.getDataExtent(a)
  55751. , h = .3 * (u[1] - u[0]);
  55752. u = [u[0] - h, u[1] + h];
  55753. var c, p = [0, e[1]], d = [0, e[0]], f = [[e[0], 0], [0, 0]], g = [], y = d[1] / (r.count() - 1), v = 0, m = Math.round(r.count() / e[0]);
  55754. r.each([a], (function(t, e) {
  55755. if (m > 0 && e % m)
  55756. v += y;
  55757. else {
  55758. var n = null == t || isNaN(t) || "" === t
  55759. , i = n ? 0 : Kr(t, u, p, !0);
  55760. n && !c && e ? (f.push([f[f.length - 1][0], 0]),
  55761. g.push([g[g.length - 1][0], 0])) : !n && c && (f.push([v, 0]),
  55762. g.push([v, 0])),
  55763. f.push([v, i]),
  55764. g.push([v, i]),
  55765. v += y,
  55766. c = n
  55767. }
  55768. }
  55769. )),
  55770. s = this._shadowPolygonPts = f,
  55771. l = this._shadowPolylinePts = g
  55772. }
  55773. this._shadowData = r,
  55774. this._shadowDim = a,
  55775. this._shadowSize = [e[0], e[1]];
  55776. for (var x = this.dataZoomModel, _ = 0; _ < 3; _++) {
  55777. var b = w(1 === _);
  55778. this._displayables.sliderGroup.add(b),
  55779. this._displayables.dataShadowSegs.push(b)
  55780. }
  55781. }
  55782. }
  55783. function w(t) {
  55784. var e = x.getModel(t ? "selectedDataBackground" : "dataBackground")
  55785. , n = new Br
  55786. , i = new Xu({
  55787. shape: {
  55788. points: s
  55789. },
  55790. segmentIgnoreThreshold: 1,
  55791. style: e.getModel("areaStyle").getAreaStyle(),
  55792. silent: !0,
  55793. z2: -20
  55794. })
  55795. , r = new Zu({
  55796. shape: {
  55797. points: l
  55798. },
  55799. segmentIgnoreThreshold: 1,
  55800. style: e.getModel("lineStyle").getLineStyle(),
  55801. silent: !0,
  55802. z2: -19
  55803. });
  55804. return n.add(i),
  55805. n.add(r),
  55806. n
  55807. }
  55808. }
  55809. ,
  55810. e.prototype._prepareDataShadowInfo = function() {
  55811. var t = this.dataZoomModel
  55812. , e = t.get("showDataShadow");
  55813. if (!1 !== e) {
  55814. var n, i = this.ecModel;
  55815. return t.eachTargetAxis((function(r, o) {
  55816. E(t.getAxisProxy(r, o).getTargetSeriesModels(), (function(t) {
  55817. if (!(n || !0 !== e && P(DF, t.get("type")) < 0)) {
  55818. var a, s = i.getComponent(rz(r), o).axis, l = function(t) {
  55819. var e = {
  55820. x: "y",
  55821. y: "x",
  55822. radius: "angle",
  55823. angle: "radius"
  55824. };
  55825. return e[t]
  55826. }(r), u = t.coordinateSystem;
  55827. null != l && u.getOtherAxis && (a = u.getOtherAxis(s).inverse),
  55828. l = t.getData().mapDimension(l),
  55829. n = {
  55830. thisAxis: s,
  55831. series: t,
  55832. thisDim: r,
  55833. otherDim: l,
  55834. otherAxisInverse: a
  55835. }
  55836. }
  55837. }
  55838. ), this)
  55839. }
  55840. ), this),
  55841. n
  55842. }
  55843. }
  55844. ,
  55845. e.prototype._renderHandle = function() {
  55846. var t = this.group
  55847. , e = this._displayables
  55848. , n = e.handles = [null, null]
  55849. , i = e.handleLabels = [null, null]
  55850. , r = this._displayables.sliderGroup
  55851. , o = this._size
  55852. , a = this.dataZoomModel
  55853. , s = this.api
  55854. , l = a.get("borderRadius") || 0
  55855. , u = a.get("brushSelect")
  55856. , h = e.filler = new IF({
  55857. silent: u,
  55858. style: {
  55859. fill: a.get("fillerColor")
  55860. },
  55861. textConfig: {
  55862. position: "inside"
  55863. }
  55864. });
  55865. r.add(h),
  55866. r.add(new IF({
  55867. silent: !0,
  55868. subPixelOptimize: !0,
  55869. shape: {
  55870. x: 0,
  55871. y: 0,
  55872. width: o[0],
  55873. height: o[1],
  55874. r: l
  55875. },
  55876. style: {
  55877. stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
  55878. lineWidth: 1,
  55879. fill: "rgba(0,0,0,0)"
  55880. }
  55881. })),
  55882. E([0, 1], (function(e) {
  55883. var o = a.get("handleIcon");
  55884. !Wy[o] && o.indexOf("path://") < 0 && o.indexOf("image://") < 0 && (o = "path://" + o);
  55885. var s = Xy(o, -1, 0, 2, 2, null, !0);
  55886. s.attr({
  55887. cursor: LF(this._orient),
  55888. draggable: !0,
  55889. drift: W(this._onDragMove, this, e),
  55890. ondragend: W(this._onDragEnd, this),
  55891. onmouseover: W(this._showDataInfo, this, !0),
  55892. onmouseout: W(this._showDataInfo, this, !1),
  55893. z2: 5
  55894. });
  55895. var l = s.getBoundingRect()
  55896. , u = a.get("handleSize");
  55897. this._handleHeight = $r(u, this._size[1]),
  55898. this._handleWidth = l.width / l.height * this._handleHeight,
  55899. s.setStyle(a.getModel("handleStyle").getItemStyle()),
  55900. s.style.strokeNoScale = !0,
  55901. s.rectHover = !0,
  55902. s.ensureState("emphasis").style = a.getModel(["emphasis", "handleStyle"]).getItemStyle(),
  55903. Ul(s);
  55904. var h = a.get("handleColor");
  55905. null != h && (s.style.fill = h),
  55906. r.add(n[e] = s);
  55907. var c = a.getModel("textStyle")
  55908. , p = (a.get("handleLabel") || {}).show || !1;
  55909. t.add(i[e] = new Xs({
  55910. silent: !0,
  55911. invisible: !p,
  55912. style: oc(c, {
  55913. x: 0,
  55914. y: 0,
  55915. text: "",
  55916. verticalAlign: "middle",
  55917. align: "center",
  55918. fill: c.getTextColor(),
  55919. font: c.getFont()
  55920. }),
  55921. z2: 10
  55922. }))
  55923. }
  55924. ), this);
  55925. var c = h;
  55926. if (u) {
  55927. var p = $r(a.get("moveHandleSize"), o[1])
  55928. , d = e.moveHandle = new Ws({
  55929. style: a.getModel("moveHandleStyle").getItemStyle(),
  55930. silent: !0,
  55931. shape: {
  55932. r: [0, 0, 2, 2],
  55933. y: o[1] - .5,
  55934. height: p
  55935. }
  55936. })
  55937. , f = .8 * p
  55938. , g = e.moveHandleIcon = Xy(a.get("moveHandleIcon"), -f / 2, -f / 2, f, f, "#fff", !0);
  55939. g.silent = !0,
  55940. g.y = o[1] + p / 2 - .5,
  55941. d.ensureState("emphasis").style = a.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  55942. var y = Math.min(o[1] / 2, Math.max(p, 10));
  55943. (c = e.moveZone = new Ws({
  55944. invisible: !0,
  55945. shape: {
  55946. y: o[1] - y,
  55947. height: p + y
  55948. }
  55949. })).on("mouseover", (function() {
  55950. s.enterEmphasis(d)
  55951. }
  55952. )).on("mouseout", (function() {
  55953. s.leaveEmphasis(d)
  55954. }
  55955. )),
  55956. r.add(d),
  55957. r.add(g),
  55958. r.add(c)
  55959. }
  55960. c.attr({
  55961. draggable: !0,
  55962. cursor: LF(this._orient),
  55963. drift: W(this._onDragMove, this, "all"),
  55964. ondragstart: W(this._showDataInfo, this, !0),
  55965. ondragend: W(this._onDragEnd, this),
  55966. onmouseover: W(this._showDataInfo, this, !0),
  55967. onmouseout: W(this._showDataInfo, this, !1)
  55968. })
  55969. }
  55970. ,
  55971. e.prototype._resetInterval = function() {
  55972. var t = this._range = this.dataZoomModel.getPercentRange()
  55973. , e = this._getViewExtent();
  55974. this._handleEnds = [Kr(t[0], [0, 100], e, !0), Kr(t[1], [0, 100], e, !0)]
  55975. }
  55976. ,
  55977. e.prototype._updateInterval = function(t, e) {
  55978. var n = this.dataZoomModel
  55979. , i = this._handleEnds
  55980. , r = this._getViewExtent()
  55981. , o = n.findRepresentativeAxisProxy().getMinMaxSpan()
  55982. , a = [0, 100];
  55983. zk(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);
  55984. var s = this._range
  55985. , l = this._range = Qr([Kr(i[0], r, a, !0), Kr(i[1], r, a, !0)]);
  55986. return !s || s[0] !== l[0] || s[1] !== l[1]
  55987. }
  55988. ,
  55989. e.prototype._updateView = function(t) {
  55990. var e = this._displayables
  55991. , n = this._handleEnds
  55992. , i = Qr(n.slice())
  55993. , r = this._size;
  55994. E([0, 1], (function(t) {
  55995. var i = e.handles[t]
  55996. , o = this._handleHeight;
  55997. i.attr({
  55998. scaleX: o / 2,
  55999. scaleY: o / 2,
  56000. x: n[t] + (t ? -1 : 1),
  56001. y: r[1] / 2 - o / 2
  56002. })
  56003. }
  56004. ), this),
  56005. e.filler.setShape({
  56006. x: i[0],
  56007. y: 0,
  56008. width: i[1] - i[0],
  56009. height: r[1]
  56010. });
  56011. var o = {
  56012. x: i[0],
  56013. width: i[1] - i[0]
  56014. };
  56015. e.moveHandle && (e.moveHandle.setShape(o),
  56016. e.moveZone.setShape(o),
  56017. e.moveZone.getBoundingRect(),
  56018. e.moveHandleIcon && e.moveHandleIcon.attr("x", o.x + o.width / 2));
  56019. for (var a = e.dataShadowSegs, s = [0, i[0], i[1], r[0]], l = 0; l < a.length; l++) {
  56020. var u = a[l]
  56021. , h = u.getClipPath();
  56022. h || (h = new Ws,
  56023. u.setClipPath(h)),
  56024. h.setShape({
  56025. x: s[l],
  56026. y: 0,
  56027. width: s[l + 1] - s[l],
  56028. height: r[1]
  56029. })
  56030. }
  56031. this._updateDataInfo(t)
  56032. }
  56033. ,
  56034. e.prototype._updateDataInfo = function(t) {
  56035. var e = this.dataZoomModel
  56036. , n = this._displayables
  56037. , i = n.handleLabels
  56038. , r = this._orient
  56039. , o = ["", ""];
  56040. if (e.get("showDetail")) {
  56041. var a = e.findRepresentativeAxisProxy();
  56042. if (a) {
  56043. var s = a.getAxisModel().axis
  56044. , l = this._range
  56045. , u = t ? a.calculateDataWindow({
  56046. start: l[0],
  56047. end: l[1]
  56048. }).valueWindow : a.getDataValueWindow();
  56049. o = [this._formatLabel(u[0], s), this._formatLabel(u[1], s)]
  56050. }
  56051. }
  56052. var h = Qr(this._handleEnds.slice());
  56053. function c(t) {
  56054. var e = Bh(n.handles[t].parent, this.group)
  56055. , a = Gh(0 === t ? "right" : "left", e)
  56056. , s = this._handleWidth / 2 + 5
  56057. , l = Fh([h[t] + (0 === t ? -s : s), this._size[1] / 2], e);
  56058. i[t].setStyle({
  56059. x: l[0],
  56060. y: l[1],
  56061. verticalAlign: r === TF ? "middle" : a,
  56062. align: r === TF ? a : "center",
  56063. text: o[t]
  56064. })
  56065. }
  56066. c.call(this, 0),
  56067. c.call(this, 1)
  56068. }
  56069. ,
  56070. e.prototype._formatLabel = function(t, e) {
  56071. var n = this.dataZoomModel
  56072. , i = n.get("labelFormatter")
  56073. , r = n.get("labelPrecision");
  56074. null != r && "auto" !== r || (r = e.getPixelPrecision());
  56075. var o = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel({
  56076. value: Math.round(t)
  56077. }) : t.toFixed(Math.min(r, 20));
  56078. return X(i) ? i(t, o) : U(i) ? i.replace("{value}", o) : o
  56079. }
  56080. ,
  56081. e.prototype._showDataInfo = function(t) {
  56082. var e = (this.dataZoomModel.get("handleLabel") || {}).show || !1
  56083. , n = this.dataZoomModel.getModel(["emphasis", "handleLabel"]).get("show") || !1
  56084. , i = t || this._dragging ? n : e
  56085. , r = this._displayables
  56086. , o = r.handleLabels;
  56087. o[0].attr("invisible", !i),
  56088. o[1].attr("invisible", !i),
  56089. r.moveHandle && this.api[i ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1)
  56090. }
  56091. ,
  56092. e.prototype._onDragMove = function(t, e, n, i) {
  56093. this._dragging = !0,
  56094. de(i.event);
  56095. var r = Fh([e, n], this._displayables.sliderGroup.getLocalTransform(), !0)
  56096. , o = this._updateInterval(t, r[0])
  56097. , a = this.dataZoomModel.get("realtime");
  56098. this._updateView(!a),
  56099. o && a && this._dispatchZoomAction(!0)
  56100. }
  56101. ,
  56102. e.prototype._onDragEnd = function() {
  56103. this._dragging = !1,
  56104. this._showDataInfo(!1),
  56105. !this.dataZoomModel.get("realtime") && this._dispatchZoomAction(!1)
  56106. }
  56107. ,
  56108. e.prototype._onClickPanel = function(t) {
  56109. var e = this._size
  56110. , n = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY);
  56111. if (!(n[0] < 0 || n[0] > e[0] || n[1] < 0 || n[1] > e[1])) {
  56112. var i = this._handleEnds
  56113. , r = (i[0] + i[1]) / 2
  56114. , o = this._updateInterval("all", n[0] - r);
  56115. this._updateView(),
  56116. o && this._dispatchZoomAction(!1)
  56117. }
  56118. }
  56119. ,
  56120. e.prototype._onBrushStart = function(t) {
  56121. var e = t.offsetX
  56122. , n = t.offsetY;
  56123. this._brushStart = new De(e,n),
  56124. this._brushing = !0,
  56125. this._brushStartTime = +new Date
  56126. }
  56127. ,
  56128. e.prototype._onBrushEnd = function(t) {
  56129. if (this._brushing) {
  56130. var e = this._displayables.brushRect;
  56131. if (this._brushing = !1,
  56132. e) {
  56133. e.attr("ignore", !0);
  56134. var n = e.shape;
  56135. if (!(+new Date - this._brushStartTime < 200 && Math.abs(n.width) < 5)) {
  56136. var i = this._getViewExtent()
  56137. , r = [0, 100];
  56138. this._range = Qr([Kr(n.x, i, r, !0), Kr(n.x + n.width, i, r, !0)]),
  56139. this._handleEnds = [n.x, n.x + n.width],
  56140. this._updateView(),
  56141. this._dispatchZoomAction(!1)
  56142. }
  56143. }
  56144. }
  56145. }
  56146. ,
  56147. e.prototype._onBrush = function(t) {
  56148. this._brushing && (de(t.event),
  56149. this._updateBrushRect(t.offsetX, t.offsetY))
  56150. }
  56151. ,
  56152. e.prototype._updateBrushRect = function(t, e) {
  56153. var n = this._displayables
  56154. , i = this.dataZoomModel
  56155. , r = n.brushRect;
  56156. r || (r = n.brushRect = new IF({
  56157. silent: !0,
  56158. style: i.getModel("brushStyle").getItemStyle()
  56159. }),
  56160. n.sliderGroup.add(r)),
  56161. r.attr("ignore", !1);
  56162. var o = this._brushStart
  56163. , a = this._displayables.sliderGroup
  56164. , s = a.transformCoordToLocal(t, e)
  56165. , l = a.transformCoordToLocal(o.x, o.y)
  56166. , u = this._size;
  56167. s[0] = Math.max(Math.min(u[0], s[0]), 0),
  56168. r.setShape({
  56169. x: l[0],
  56170. y: 0,
  56171. width: s[0] - l[0],
  56172. height: u[1]
  56173. })
  56174. }
  56175. ,
  56176. e.prototype._dispatchZoomAction = function(t) {
  56177. var e = this._range;
  56178. this.api.dispatchAction({
  56179. type: "dataZoom",
  56180. from: this.uid,
  56181. dataZoomId: this.dataZoomModel.id,
  56182. animation: t ? AF : null,
  56183. start: e[0],
  56184. end: e[1]
  56185. })
  56186. }
  56187. ,
  56188. e.prototype._findCoordRect = function() {
  56189. var t, e = az(this.dataZoomModel).infoList;
  56190. if (!t && e.length) {
  56191. var n = e[0].model.coordinateSystem;
  56192. t = n.getRect && n.getRect()
  56193. }
  56194. if (!t) {
  56195. var i = this.api.getWidth()
  56196. , r = this.api.getHeight();
  56197. t = {
  56198. x: .2 * i,
  56199. y: .2 * r,
  56200. width: .6 * i,
  56201. height: .6 * r
  56202. }
  56203. }
  56204. return t
  56205. }
  56206. ,
  56207. e.type = "dataZoom.slider",
  56208. e
  56209. }(cz);
  56210. function LF(t) {
  56211. return "vertical" === t ? "ns-resize" : "ew-resize"
  56212. }
  56213. function PF(t) {
  56214. t.registerComponentModel(MF),
  56215. t.registerComponentView(kF),
  56216. mz(t)
  56217. }
  56218. var OF = function(t, e, n) {
  56219. var i = T((RF[t] || {})[e]);
  56220. return n && Y(i) ? i[i.length - 1] : i
  56221. }
  56222. , RF = {
  56223. color: {
  56224. active: ["#006edd", "#e0ffff"],
  56225. inactive: ["rgba(0,0,0,0)"]
  56226. },
  56227. colorHue: {
  56228. active: [0, 360],
  56229. inactive: [0, 0]
  56230. },
  56231. colorSaturation: {
  56232. active: [.3, 1],
  56233. inactive: [0, 0]
  56234. },
  56235. colorLightness: {
  56236. active: [.9, .5],
  56237. inactive: [0, 0]
  56238. },
  56239. colorAlpha: {
  56240. active: [.3, 1],
  56241. inactive: [0, 0]
  56242. },
  56243. opacity: {
  56244. active: [.3, 1],
  56245. inactive: [0, 0]
  56246. },
  56247. symbol: {
  56248. active: ["circle", "roundRect", "diamond"],
  56249. inactive: ["none"]
  56250. },
  56251. symbolSize: {
  56252. active: [10, 50],
  56253. inactive: [0, 0]
  56254. }
  56255. }
  56256. , NF = kD.mapVisual
  56257. , EF = kD.eachVisual
  56258. , zF = Y
  56259. , VF = E
  56260. , BF = Qr
  56261. , FF = Kr
  56262. , GF = function(t) {
  56263. function e() {
  56264. var n = null !== t && t.apply(this, arguments) || this;
  56265. return n.type = e.type,
  56266. n.stateList = ["inRange", "outOfRange"],
  56267. n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"],
  56268. n.layoutMode = {
  56269. type: "box",
  56270. ignoreSize: !0
  56271. },
  56272. n.dataBound = [-1 / 0, 1 / 0],
  56273. n.targetVisuals = {},
  56274. n.controllerVisuals = {},
  56275. n
  56276. }
  56277. return n(e, t),
  56278. e.prototype.init = function(t, e, n) {
  56279. this.mergeDefaultAndTheme(t, n)
  56280. }
  56281. ,
  56282. e.prototype.optionUpdated = function(t, e) {
  56283. var n = this.option;
  56284. !e && RV(n, t, this.replacableOptionKeys),
  56285. this.textStyleModel = this.getModel("textStyle"),
  56286. this.resetItemSize(),
  56287. this.completeVisualOption()
  56288. }
  56289. ,
  56290. e.prototype.resetVisual = function(t) {
  56291. var e = this.stateList;
  56292. t = W(t, this),
  56293. this.controllerVisuals = OV(this.option.controller, e, t),
  56294. this.targetVisuals = OV(this.option.target, e, t)
  56295. }
  56296. ,
  56297. e.prototype.getItemSymbol = function() {
  56298. return null
  56299. }
  56300. ,
  56301. e.prototype.getTargetSeriesIndices = function() {
  56302. var t = this.option.seriesIndex
  56303. , e = [];
  56304. return null == t || "all" === t ? this.ecModel.eachSeries((function(t, n) {
  56305. e.push(n)
  56306. }
  56307. )) : e = To(t),
  56308. e
  56309. }
  56310. ,
  56311. e.prototype.eachTargetSeries = function(t, e) {
  56312. E(this.getTargetSeriesIndices(), (function(n) {
  56313. var i = this.ecModel.getSeriesByIndex(n);
  56314. i && t.call(e, i)
  56315. }
  56316. ), this)
  56317. }
  56318. ,
  56319. e.prototype.isTargetSeries = function(t) {
  56320. var e = !1;
  56321. return this.eachTargetSeries((function(n) {
  56322. n === t && (e = !0)
  56323. }
  56324. )),
  56325. e
  56326. }
  56327. ,
  56328. e.prototype.formatValueText = function(t, e, n) {
  56329. var i, r = this.option, o = r.precision, a = this.dataBound, s = r.formatter;
  56330. n = n || ["<", ">"],
  56331. Y(t) && (t = t.slice(),
  56332. i = !0);
  56333. var l = e ? t : i ? [u(t[0]), u(t[1])] : u(t);
  56334. 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;
  56335. function u(t) {
  56336. return t === a[0] ? "min" : t === a[1] ? "max" : (+t).toFixed(Math.min(o, 20))
  56337. }
  56338. }
  56339. ,
  56340. e.prototype.resetExtent = function() {
  56341. var t = this.option
  56342. , e = BF([t.min, t.max]);
  56343. this._dataExtent = e
  56344. }
  56345. ,
  56346. e.prototype.getDataDimensionIndex = function(t) {
  56347. var e = this.option.dimension;
  56348. if (null != e)
  56349. return t.getDimensionIndex(e);
  56350. for (var n = t.dimensions, i = n.length - 1; i >= 0; i--) {
  56351. var r = n[i]
  56352. , o = t.getDimensionInfo(r);
  56353. if (!o.isCalculationCoord)
  56354. return o.storeDimIndex
  56355. }
  56356. }
  56357. ,
  56358. e.prototype.getExtent = function() {
  56359. return this._dataExtent.slice()
  56360. }
  56361. ,
  56362. e.prototype.completeVisualOption = function() {
  56363. var t = this.ecModel
  56364. , e = this.option
  56365. , n = {
  56366. inRange: e.inRange,
  56367. outOfRange: e.outOfRange
  56368. }
  56369. , i = e.target || (e.target = {})
  56370. , r = e.controller || (e.controller = {});
  56371. C(i, n),
  56372. C(r, n);
  56373. var o = this.isCategory();
  56374. function a(n) {
  56375. zF(e.color) && !n.inRange && (n.inRange = {
  56376. color: e.color.slice().reverse()
  56377. }),
  56378. n.inRange = n.inRange || {
  56379. color: t.get("gradientColor")
  56380. }
  56381. }
  56382. a.call(this, i),
  56383. a.call(this, r),
  56384. function(t, e, n) {
  56385. var i = t[e]
  56386. , r = t[n];
  56387. i && !r && (r = t[n] = {},
  56388. VF(i, (function(t, e) {
  56389. if (kD.isValidType(e)) {
  56390. var n = OF(e, "inactive", o);
  56391. null != n && (r[e] = n,
  56392. "color" !== e || r.hasOwnProperty("opacity") || r.hasOwnProperty("colorAlpha") || (r.opacity = [0, 0]))
  56393. }
  56394. }
  56395. )))
  56396. }
  56397. .call(this, i, "inRange", "outOfRange"),
  56398. function(t) {
  56399. var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol
  56400. , n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize
  56401. , i = this.get("inactiveColor")
  56402. , r = this.getItemSymbol() || "roundRect";
  56403. VF(this.stateList, (function(a) {
  56404. var s = this.itemSize
  56405. , l = t[a];
  56406. l || (l = t[a] = {
  56407. color: o ? i : [i]
  56408. }),
  56409. null == l.symbol && (l.symbol = e && T(e) || (o ? r : [r])),
  56410. null == l.symbolSize && (l.symbolSize = n && T(n) || (o ? s[0] : [s[0], s[0]])),
  56411. l.symbol = NF(l.symbol, (function(t) {
  56412. return "none" === t ? r : t
  56413. }
  56414. ));
  56415. var u = l.symbolSize;
  56416. if (null != u) {
  56417. var h = -1 / 0;
  56418. EF(u, (function(t) {
  56419. t > h && (h = t)
  56420. }
  56421. )),
  56422. l.symbolSize = NF(u, (function(t) {
  56423. return FF(t, [0, h], [0, s[0]], !0)
  56424. }
  56425. ))
  56426. }
  56427. }
  56428. ), this)
  56429. }
  56430. .call(this, r)
  56431. }
  56432. ,
  56433. e.prototype.resetItemSize = function() {
  56434. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
  56435. }
  56436. ,
  56437. e.prototype.isCategory = function() {
  56438. return !!this.option.categories
  56439. }
  56440. ,
  56441. e.prototype.setSelected = function(t) {}
  56442. ,
  56443. e.prototype.getSelected = function() {
  56444. return null
  56445. }
  56446. ,
  56447. e.prototype.getValueState = function(t) {
  56448. return null
  56449. }
  56450. ,
  56451. e.prototype.getVisualMeta = function(t) {
  56452. return null
  56453. }
  56454. ,
  56455. e.type = "visualMap",
  56456. e.dependencies = ["series"],
  56457. e.defaultOption = {
  56458. show: !0,
  56459. z: 4,
  56460. seriesIndex: "all",
  56461. min: 0,
  56462. max: 200,
  56463. left: 0,
  56464. right: null,
  56465. top: null,
  56466. bottom: 0,
  56467. itemWidth: null,
  56468. itemHeight: null,
  56469. inverse: !1,
  56470. orient: "vertical",
  56471. backgroundColor: "rgba(0,0,0,0)",
  56472. borderColor: "#ccc",
  56473. contentColor: "#5793f3",
  56474. inactiveColor: "#aaa",
  56475. borderWidth: 0,
  56476. padding: 5,
  56477. textGap: 10,
  56478. precision: 0,
  56479. textStyle: {
  56480. color: "#333"
  56481. }
  56482. },
  56483. e
  56484. }(zp)
  56485. , WF = [20, 140]
  56486. , HF = function(t) {
  56487. function e() {
  56488. var n = null !== t && t.apply(this, arguments) || this;
  56489. return n.type = e.type,
  56490. n
  56491. }
  56492. return n(e, t),
  56493. e.prototype.optionUpdated = function(e, n) {
  56494. t.prototype.optionUpdated.apply(this, arguments),
  56495. this.resetExtent(),
  56496. this.resetVisual((function(t) {
  56497. t.mappingMethod = "linear",
  56498. t.dataExtent = this.getExtent()
  56499. }
  56500. )),
  56501. this._resetRange()
  56502. }
  56503. ,
  56504. e.prototype.resetItemSize = function() {
  56505. t.prototype.resetItemSize.apply(this, arguments);
  56506. var e = this.itemSize;
  56507. (null == e[0] || isNaN(e[0])) && (e[0] = WF[0]),
  56508. (null == e[1] || isNaN(e[1])) && (e[1] = WF[1])
  56509. }
  56510. ,
  56511. e.prototype._resetRange = function() {
  56512. var t = this.getExtent()
  56513. , e = this.option.range;
  56514. !e || e.auto ? (t.auto = 1,
  56515. this.option.range = t) : Y(e) && (e[0] > e[1] && e.reverse(),
  56516. e[0] = Math.max(e[0], t[0]),
  56517. e[1] = Math.min(e[1], t[1]))
  56518. }
  56519. ,
  56520. e.prototype.completeVisualOption = function() {
  56521. t.prototype.completeVisualOption.apply(this, arguments),
  56522. E(this.stateList, (function(t) {
  56523. var e = this.option.controller[t].symbolSize;
  56524. e && e[0] !== e[1] && (e[0] = e[1] / 3)
  56525. }
  56526. ), this)
  56527. }
  56528. ,
  56529. e.prototype.setSelected = function(t) {
  56530. this.option.range = t.slice(),
  56531. this._resetRange()
  56532. }
  56533. ,
  56534. e.prototype.getSelected = function() {
  56535. var t = this.getExtent()
  56536. , e = Qr((this.get("range") || []).slice());
  56537. return e[0] > t[1] && (e[0] = t[1]),
  56538. e[1] > t[1] && (e[1] = t[1]),
  56539. e[0] < t[0] && (e[0] = t[0]),
  56540. e[1] < t[0] && (e[1] = t[0]),
  56541. e
  56542. }
  56543. ,
  56544. e.prototype.getValueState = function(t) {
  56545. var e = this.option.range
  56546. , n = this.getExtent();
  56547. return (e[0] <= n[0] || e[0] <= t) && (e[1] >= n[1] || t <= e[1]) ? "inRange" : "outOfRange"
  56548. }
  56549. ,
  56550. e.prototype.findTargetDataIndices = function(t) {
  56551. var e = [];
  56552. return this.eachTargetSeries((function(n) {
  56553. var i = []
  56554. , r = n.getData();
  56555. r.each(this.getDataDimensionIndex(r), (function(e, n) {
  56556. t[0] <= e && e <= t[1] && i.push(n)
  56557. }
  56558. ), this),
  56559. e.push({
  56560. seriesId: n.id,
  56561. dataIndex: i
  56562. })
  56563. }
  56564. ), this),
  56565. e
  56566. }
  56567. ,
  56568. e.prototype.getVisualMeta = function(t) {
  56569. var e = YF(this, "outOfRange", this.getExtent())
  56570. , n = YF(this, "inRange", this.option.range.slice())
  56571. , i = [];
  56572. function r(e, n) {
  56573. i.push({
  56574. value: e,
  56575. color: t(e, n)
  56576. })
  56577. }
  56578. for (var o = 0, a = 0, s = n.length, l = e.length; a < l && (!n.length || e[a] <= n[0]); a++)
  56579. e[a] < n[o] && r(e[a], "outOfRange");
  56580. for (var u = 1; o < s; o++,
  56581. u = 0)
  56582. u && i.length && r(n[o], "outOfRange"),
  56583. r(n[o], "inRange");
  56584. for (u = 1; a < l; a++)
  56585. (!n.length || n[n.length - 1] < e[a]) && (u && (i.length && r(i[i.length - 1].value, "outOfRange"),
  56586. u = 0),
  56587. r(e[a], "outOfRange"));
  56588. var h = i.length;
  56589. return {
  56590. stops: i,
  56591. outerColors: [h ? i[0].color : "transparent", h ? i[h - 1].color : "transparent"]
  56592. }
  56593. }
  56594. ,
  56595. e.type = "visualMap.continuous",
  56596. e.defaultOption = kc(GF.defaultOption, {
  56597. align: "auto",
  56598. calculable: !1,
  56599. hoverLink: !0,
  56600. realtime: !0,
  56601. 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",
  56602. handleSize: "120%",
  56603. handleStyle: {
  56604. borderColor: "#fff",
  56605. borderWidth: 1
  56606. },
  56607. indicatorIcon: "circle",
  56608. indicatorSize: "50%",
  56609. indicatorStyle: {
  56610. borderColor: "#fff",
  56611. borderWidth: 2,
  56612. shadowBlur: 2,
  56613. shadowOffsetX: 1,
  56614. shadowOffsetY: 1,
  56615. shadowColor: "rgba(0,0,0,0.2)"
  56616. }
  56617. }),
  56618. e
  56619. }(GF);
  56620. function YF(t, e, n) {
  56621. if (n[0] === n[1])
  56622. return n.slice();
  56623. for (var i = (n[1] - n[0]) / 200, r = n[0], o = [], a = 0; a <= 200 && r < n[1]; a++)
  56624. o.push(r),
  56625. r += i;
  56626. return o.push(n[1]),
  56627. o
  56628. }
  56629. var XF = function(t) {
  56630. function e() {
  56631. var n = null !== t && t.apply(this, arguments) || this;
  56632. return n.type = e.type,
  56633. n.autoPositionValues = {
  56634. left: 1,
  56635. right: 1,
  56636. top: 1,
  56637. bottom: 1
  56638. },
  56639. n
  56640. }
  56641. return n(e, t),
  56642. e.prototype.init = function(t, e) {
  56643. this.ecModel = t,
  56644. this.api = e
  56645. }
  56646. ,
  56647. e.prototype.render = function(t, e, n, i) {
  56648. this.visualMapModel = t,
  56649. !1 !== t.get("show") ? this.doRender(t, e, n, i) : this.group.removeAll()
  56650. }
  56651. ,
  56652. e.prototype.renderBackground = function(t) {
  56653. var e = this.visualMapModel
  56654. , n = vp(e.get("padding") || 0)
  56655. , i = t.getBoundingRect();
  56656. t.add(new Ws({
  56657. z2: -1,
  56658. silent: !0,
  56659. shape: {
  56660. x: i.x - n[3],
  56661. y: i.y - n[0],
  56662. width: i.width + n[3] + n[1],
  56663. height: i.height + n[0] + n[2]
  56664. },
  56665. style: {
  56666. fill: e.get("backgroundColor"),
  56667. stroke: e.get("borderColor"),
  56668. lineWidth: e.get("borderWidth")
  56669. }
  56670. }))
  56671. }
  56672. ,
  56673. e.prototype.getControllerVisual = function(t, e, n) {
  56674. var i = (n = n || {}).forceState
  56675. , r = this.visualMapModel
  56676. , o = {};
  56677. if ("color" === e) {
  56678. var a = r.get("contentColor");
  56679. o.color = a
  56680. }
  56681. function s(t) {
  56682. return o[t]
  56683. }
  56684. function l(t, e) {
  56685. o[t] = e
  56686. }
  56687. var u = r.controllerVisuals[i || r.getValueState(t)];
  56688. return E(kD.prepareVisualTypes(u), (function(i) {
  56689. var r = u[i];
  56690. n.convertOpacityToAlpha && "opacity" === i && (i = "colorAlpha",
  56691. r = u.__alphaForOpacity),
  56692. kD.dependsOn(i, e) && r && r.applyVisual(t, s, l)
  56693. }
  56694. )),
  56695. o[e]
  56696. }
  56697. ,
  56698. e.prototype.positionGroup = function(t) {
  56699. var e = this.visualMapModel
  56700. , n = this.api;
  56701. Lp(t, e.getBoxLayoutParams(), {
  56702. width: n.getWidth(),
  56703. height: n.getHeight()
  56704. })
  56705. }
  56706. ,
  56707. e.prototype.doRender = function(t, e, n, i) {}
  56708. ,
  56709. e.type = "visualMap",
  56710. e
  56711. }(Ag)
  56712. , UF = [["left", "right", "width"], ["top", "bottom", "height"]];
  56713. function ZF(t, e, n) {
  56714. var i = t.option
  56715. , r = i.align;
  56716. if (null != r && "auto" !== r)
  56717. return r;
  56718. for (var o = {
  56719. width: e.getWidth(),
  56720. height: e.getHeight()
  56721. }, a = "horizontal" === i.orient ? 1 : 0, s = UF[a], l = [0, null, 10], u = {}, h = 0; h < 3; h++)
  56722. u[UF[1 - a][h]] = l[h],
  56723. u[s[h]] = 2 === h ? n[0] : i[s[h]];
  56724. var c = [["x", "width", 3], ["y", "height", 0]][a]
  56725. , p = kp(u, o, i.padding);
  56726. return s[(p.margin[c[2]] || 0) + p[c[0]] + .5 * p[c[1]] < .5 * o[c[1]] ? 0 : 1]
  56727. }
  56728. function jF(t, e) {
  56729. return E(t || [], (function(t) {
  56730. null != t.dataIndex && (t.dataIndexInside = t.dataIndex,
  56731. t.dataIndex = null),
  56732. t.highlightKey = "visualMap" + (e ? e.componentIndex : "")
  56733. }
  56734. )),
  56735. t
  56736. }
  56737. var qF = Kr
  56738. , KF = E
  56739. , $F = Math.min
  56740. , JF = Math.max
  56741. , QF = function(t) {
  56742. function e() {
  56743. var n = null !== t && t.apply(this, arguments) || this;
  56744. return n.type = e.type,
  56745. n._shapes = {},
  56746. n._dataInterval = [],
  56747. n._handleEnds = [],
  56748. n._hoverLinkDataIndices = [],
  56749. n
  56750. }
  56751. return n(e, t),
  56752. e.prototype.init = function(e, n) {
  56753. t.prototype.init.call(this, e, n),
  56754. this._hoverLinkFromSeriesMouseOver = W(this._hoverLinkFromSeriesMouseOver, this),
  56755. this._hideIndicator = W(this._hideIndicator, this)
  56756. }
  56757. ,
  56758. e.prototype.doRender = function(t, e, n, i) {
  56759. i && "selectDataRange" === i.type && i.from === this.uid || this._buildView()
  56760. }
  56761. ,
  56762. e.prototype._buildView = function() {
  56763. this.group.removeAll();
  56764. var t = this.visualMapModel
  56765. , e = this.group;
  56766. this._orient = t.get("orient"),
  56767. this._useHandle = t.get("calculable"),
  56768. this._resetInterval(),
  56769. this._renderBar(e);
  56770. var n = t.get("text");
  56771. this._renderEndsText(e, n, 0),
  56772. this._renderEndsText(e, n, 1),
  56773. this._updateView(!0),
  56774. this.renderBackground(e),
  56775. this._updateView(),
  56776. this._enableHoverLinkToSeries(),
  56777. this._enableHoverLinkFromSeries(),
  56778. this.positionGroup(e)
  56779. }
  56780. ,
  56781. e.prototype._renderEndsText = function(t, e, n) {
  56782. if (e) {
  56783. var i = e[1 - n];
  56784. i = null != i ? i + "" : "";
  56785. var r = this.visualMapModel
  56786. , o = r.get("textGap")
  56787. , a = r.itemSize
  56788. , s = this._shapes.mainGroup
  56789. , l = this._applyTransform([a[0] / 2, 0 === n ? -o : a[1] + o], s)
  56790. , u = this._applyTransform(0 === n ? "bottom" : "top", s)
  56791. , h = this._orient
  56792. , c = this.visualMapModel.textStyleModel;
  56793. this.group.add(new Xs({
  56794. style: oc(c, {
  56795. x: l[0],
  56796. y: l[1],
  56797. verticalAlign: "horizontal" === h ? "middle" : u,
  56798. align: "horizontal" === h ? u : "center",
  56799. text: i
  56800. })
  56801. }))
  56802. }
  56803. }
  56804. ,
  56805. e.prototype._renderBar = function(t) {
  56806. var e = this.visualMapModel
  56807. , n = this._shapes
  56808. , i = e.itemSize
  56809. , r = this._orient
  56810. , o = this._useHandle
  56811. , a = ZF(e, this.api, i)
  56812. , s = n.mainGroup = this._createBarGroup(a)
  56813. , l = new Br;
  56814. s.add(l),
  56815. l.add(n.outOfRange = tG()),
  56816. l.add(n.inRange = tG(null, o ? nG(this._orient) : null, W(this._dragHandle, this, "all", !1), W(this._dragHandle, this, "all", !0))),
  56817. l.setClipPath(new Ws({
  56818. shape: {
  56819. x: 0,
  56820. y: 0,
  56821. width: i[0],
  56822. height: i[1],
  56823. r: 3
  56824. }
  56825. }));
  56826. var u = e.textStyleModel.getTextRect("国")
  56827. , h = JF(u.width, u.height);
  56828. o && (n.handleThumbs = [],
  56829. n.handleLabels = [],
  56830. n.handleLabelPoints = [],
  56831. this._createHandle(e, s, 0, i, h, r),
  56832. this._createHandle(e, s, 1, i, h, r)),
  56833. this._createIndicator(e, s, i, h, r),
  56834. t.add(s)
  56835. }
  56836. ,
  56837. e.prototype._createHandle = function(t, e, n, i, r, o) {
  56838. var a = W(this._dragHandle, this, n, !1)
  56839. , s = W(this._dragHandle, this, n, !0)
  56840. , l = Cr(t.get("handleSize"), i[0])
  56841. , u = Xy(t.get("handleIcon"), -l / 2, -l / 2, l, l, null, !0)
  56842. , h = nG(this._orient);
  56843. u.attr({
  56844. cursor: h,
  56845. draggable: !0,
  56846. drift: a,
  56847. ondragend: s,
  56848. onmousemove: function(t) {
  56849. de(t.event)
  56850. }
  56851. }),
  56852. u.x = i[0] / 2,
  56853. u.useStyle(t.getModel("handleStyle").getItemStyle()),
  56854. u.setStyle({
  56855. strokeNoScale: !0,
  56856. strokeFirst: !0
  56857. }),
  56858. u.style.lineWidth *= 2,
  56859. u.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(),
  56860. Jl(u, !0),
  56861. e.add(u);
  56862. var c = this.visualMapModel.textStyleModel
  56863. , p = new Xs({
  56864. cursor: h,
  56865. draggable: !0,
  56866. drift: a,
  56867. onmousemove: function(t) {
  56868. de(t.event)
  56869. },
  56870. ondragend: s,
  56871. style: oc(c, {
  56872. x: 0,
  56873. y: 0,
  56874. text: ""
  56875. })
  56876. });
  56877. p.ensureState("blur").style = {
  56878. opacity: .1
  56879. },
  56880. p.stateTransition = {
  56881. duration: 200
  56882. },
  56883. this.group.add(p);
  56884. var d = [l, 0]
  56885. , f = this._shapes;
  56886. f.handleThumbs[n] = u,
  56887. f.handleLabelPoints[n] = d,
  56888. f.handleLabels[n] = p
  56889. }
  56890. ,
  56891. e.prototype._createIndicator = function(t, e, n, i, r) {
  56892. var o = Cr(t.get("indicatorSize"), n[0])
  56893. , a = Xy(t.get("indicatorIcon"), -o / 2, -o / 2, o, o, null, !0);
  56894. a.attr({
  56895. cursor: "move",
  56896. invisible: !0,
  56897. silent: !0,
  56898. x: n[0] / 2
  56899. });
  56900. var s = t.getModel("indicatorStyle").getItemStyle();
  56901. if (a instanceof Ns) {
  56902. var l = a.style;
  56903. a.useStyle(A({
  56904. image: l.image,
  56905. x: l.x,
  56906. y: l.y,
  56907. width: l.width,
  56908. height: l.height
  56909. }, s))
  56910. } else
  56911. a.useStyle(s);
  56912. e.add(a);
  56913. var u = this.visualMapModel.textStyleModel
  56914. , h = new Xs({
  56915. silent: !0,
  56916. invisible: !0,
  56917. style: oc(u, {
  56918. x: 0,
  56919. y: 0,
  56920. text: ""
  56921. })
  56922. });
  56923. this.group.add(h);
  56924. var c = [("horizontal" === r ? i / 2 : 6) + n[0] / 2, 0]
  56925. , p = this._shapes;
  56926. p.indicator = a,
  56927. p.indicatorLabel = h,
  56928. p.indicatorLabelPoint = c,
  56929. this._firstShowIndicator = !0
  56930. }
  56931. ,
  56932. e.prototype._dragHandle = function(t, e, n, i) {
  56933. if (this._useHandle) {
  56934. if (this._dragging = !e,
  56935. !e) {
  56936. var r = this._applyTransform([n, i], this._shapes.mainGroup, !0);
  56937. this._updateInterval(t, r[1]),
  56938. this._hideIndicator(),
  56939. this._updateView()
  56940. }
  56941. e === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  56942. type: "selectDataRange",
  56943. from: this.uid,
  56944. visualMapId: this.visualMapModel.id,
  56945. selected: this._dataInterval.slice()
  56946. }),
  56947. e ? !this._hovering && this._clearHoverLinkToSeries() : eG(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1)
  56948. }
  56949. }
  56950. ,
  56951. e.prototype._resetInterval = function() {
  56952. var t = this.visualMapModel
  56953. , e = this._dataInterval = t.getSelected()
  56954. , n = t.getExtent()
  56955. , i = [0, t.itemSize[1]];
  56956. this._handleEnds = [qF(e[0], n, i, !0), qF(e[1], n, i, !0)]
  56957. }
  56958. ,
  56959. e.prototype._updateInterval = function(t, e) {
  56960. e = e || 0;
  56961. var n = this.visualMapModel
  56962. , i = this._handleEnds
  56963. , r = [0, n.itemSize[1]];
  56964. zk(e, i, r, t, 0);
  56965. var o = n.getExtent();
  56966. this._dataInterval = [qF(i[0], r, o, !0), qF(i[1], r, o, !0)]
  56967. }
  56968. ,
  56969. e.prototype._updateView = function(t) {
  56970. var e = this.visualMapModel
  56971. , n = e.getExtent()
  56972. , i = this._shapes
  56973. , r = [0, e.itemSize[1]]
  56974. , o = t ? r : this._handleEnds
  56975. , a = this._createBarVisual(this._dataInterval, n, o, "inRange")
  56976. , s = this._createBarVisual(n, n, r, "outOfRange");
  56977. i.inRange.setStyle({
  56978. fill: a.barColor
  56979. }).setShape("points", a.barPoints),
  56980. i.outOfRange.setStyle({
  56981. fill: s.barColor
  56982. }).setShape("points", s.barPoints),
  56983. this._updateHandle(o, a)
  56984. }
  56985. ,
  56986. e.prototype._createBarVisual = function(t, e, n, i) {
  56987. var r = {
  56988. forceState: i,
  56989. convertOpacityToAlpha: !0
  56990. }
  56991. , o = this._makeColorGradient(t, r)
  56992. , a = [this.getControllerVisual(t[0], "symbolSize", r), this.getControllerVisual(t[1], "symbolSize", r)]
  56993. , s = this._createBarPoints(n, a);
  56994. return {
  56995. barColor: new oh(0,0,0,1,o),
  56996. barPoints: s,
  56997. handlesColor: [o[0].color, o[o.length - 1].color]
  56998. }
  56999. }
  57000. ,
  57001. e.prototype._makeColorGradient = function(t, e) {
  57002. var n = []
  57003. , i = (t[1] - t[0]) / 100;
  57004. n.push({
  57005. color: this.getControllerVisual(t[0], "color", e),
  57006. offset: 0
  57007. });
  57008. for (var r = 1; r < 100; r++) {
  57009. var o = t[0] + i * r;
  57010. if (o > t[1])
  57011. break;
  57012. n.push({
  57013. color: this.getControllerVisual(o, "color", e),
  57014. offset: r / 100
  57015. })
  57016. }
  57017. return n.push({
  57018. color: this.getControllerVisual(t[1], "color", e),
  57019. offset: 1
  57020. }),
  57021. n
  57022. }
  57023. ,
  57024. e.prototype._createBarPoints = function(t, e) {
  57025. var n = this.visualMapModel.itemSize;
  57026. return [[n[0] - e[0], t[0]], [n[0], t[0]], [n[0], t[1]], [n[0] - e[1], t[1]]]
  57027. }
  57028. ,
  57029. e.prototype._createBarGroup = function(t) {
  57030. var e = this._orient
  57031. , n = this.visualMapModel.get("inverse");
  57032. return new Br("horizontal" !== e || n ? "horizontal" === e && n ? {
  57033. scaleX: "bottom" === t ? -1 : 1,
  57034. rotation: -Math.PI / 2
  57035. } : "vertical" !== e || n ? {
  57036. scaleX: "left" === t ? 1 : -1
  57037. } : {
  57038. scaleX: "left" === t ? 1 : -1,
  57039. scaleY: -1
  57040. } : {
  57041. scaleX: "bottom" === t ? 1 : -1,
  57042. rotation: Math.PI / 2
  57043. })
  57044. }
  57045. ,
  57046. e.prototype._updateHandle = function(t, e) {
  57047. if (this._useHandle) {
  57048. var n = this._shapes
  57049. , i = this.visualMapModel
  57050. , r = n.handleThumbs
  57051. , o = n.handleLabels
  57052. , a = i.itemSize
  57053. , s = i.getExtent()
  57054. , l = this._applyTransform("left", n.mainGroup);
  57055. KF([0, 1], (function(u) {
  57056. var h = r[u];
  57057. h.setStyle("fill", e.handlesColor[u]),
  57058. h.y = t[u];
  57059. var c = qF(t[u], [0, a[1]], s, !0)
  57060. , p = this.getControllerVisual(c, "symbolSize");
  57061. h.scaleX = h.scaleY = p / a[0],
  57062. h.x = a[0] - p / 2;
  57063. var d = Fh(n.handleLabelPoints[u], Bh(h, this.group));
  57064. if ("horizontal" === this._orient) {
  57065. var f = "left" === l || "top" === l ? (a[0] - p) / 2 : (a[0] - p) / -2;
  57066. d[1] += f
  57067. }
  57068. o[u].setStyle({
  57069. x: d[0],
  57070. y: d[1],
  57071. text: i.formatValueText(this._dataInterval[u]),
  57072. verticalAlign: "middle",
  57073. align: "vertical" === this._orient ? this._applyTransform("left", n.mainGroup) : "center"
  57074. })
  57075. }
  57076. ), this)
  57077. }
  57078. }
  57079. ,
  57080. e.prototype._showIndicator = function(t, e, n, i) {
  57081. var r = this.visualMapModel
  57082. , o = r.getExtent()
  57083. , a = r.itemSize
  57084. , s = [0, a[1]]
  57085. , l = this._shapes
  57086. , u = l.indicator;
  57087. if (u) {
  57088. u.attr("invisible", !1);
  57089. var h = this.getControllerVisual(t, "color", {
  57090. convertOpacityToAlpha: !0
  57091. })
  57092. , c = this.getControllerVisual(t, "symbolSize")
  57093. , p = qF(t, o, s, !0)
  57094. , d = a[0] - c / 2
  57095. , f = {
  57096. x: u.x,
  57097. y: u.y
  57098. };
  57099. u.y = p,
  57100. u.x = d;
  57101. var g = Fh(l.indicatorLabelPoint, Bh(u, this.group))
  57102. , y = l.indicatorLabel;
  57103. y.attr("invisible", !1);
  57104. var v = this._applyTransform("left", l.mainGroup)
  57105. , m = "horizontal" === this._orient;
  57106. y.setStyle({
  57107. text: (n || "") + r.formatValueText(e),
  57108. verticalAlign: m ? v : "middle",
  57109. align: m ? "center" : v
  57110. });
  57111. var x = {
  57112. x: d,
  57113. y: p,
  57114. style: {
  57115. fill: h
  57116. }
  57117. }
  57118. , _ = {
  57119. style: {
  57120. x: g[0],
  57121. y: g[1]
  57122. }
  57123. };
  57124. if (r.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  57125. var b = {
  57126. duration: 100,
  57127. easing: "cubicInOut",
  57128. additive: !0
  57129. };
  57130. u.x = f.x,
  57131. u.y = f.y,
  57132. u.animateTo(x, b),
  57133. y.animateTo(_, b)
  57134. } else
  57135. u.attr(x),
  57136. y.attr(_);
  57137. this._firstShowIndicator = !1;
  57138. var w = this._shapes.handleLabels;
  57139. if (w)
  57140. for (var S = 0; S < w.length; S++)
  57141. this.api.enterBlur(w[S])
  57142. }
  57143. }
  57144. ,
  57145. e.prototype._enableHoverLinkToSeries = function() {
  57146. var t = this;
  57147. this._shapes.mainGroup.on("mousemove", (function(e) {
  57148. if (t._hovering = !0,
  57149. !t._dragging) {
  57150. var n = t.visualMapModel.itemSize
  57151. , i = t._applyTransform([e.offsetX, e.offsetY], t._shapes.mainGroup, !0, !0);
  57152. i[1] = $F(JF(0, i[1]), n[1]),
  57153. t._doHoverLinkToSeries(i[1], 0 <= i[0] && i[0] <= n[0])
  57154. }
  57155. }
  57156. )).on("mouseout", (function() {
  57157. t._hovering = !1,
  57158. !t._dragging && t._clearHoverLinkToSeries()
  57159. }
  57160. ))
  57161. }
  57162. ,
  57163. e.prototype._enableHoverLinkFromSeries = function() {
  57164. var t = this.api.getZr();
  57165. this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this),
  57166. t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
  57167. }
  57168. ,
  57169. e.prototype._doHoverLinkToSeries = function(t, e) {
  57170. var n = this.visualMapModel
  57171. , i = n.itemSize;
  57172. if (n.option.hoverLink) {
  57173. var r = [0, i[1]]
  57174. , o = n.getExtent();
  57175. t = $F(JF(r[0], t), r[1]);
  57176. var a = function(t, e, n) {
  57177. var i = 6
  57178. , r = t.get("hoverLinkDataSize");
  57179. r && (i = qF(r, e, n, !0) / 2);
  57180. return i
  57181. }(n, o, r)
  57182. , s = [t - a, t + a]
  57183. , l = qF(t, r, o, !0)
  57184. , u = [qF(s[0], r, o, !0), qF(s[1], r, o, !0)];
  57185. s[0] < r[0] && (u[0] = -1 / 0),
  57186. s[1] > r[1] && (u[1] = 1 / 0),
  57187. 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));
  57188. var h = this._hoverLinkDataIndices
  57189. , c = [];
  57190. (e || eG(n)) && (c = this._hoverLinkDataIndices = n.findTargetDataIndices(u));
  57191. var p = function(t, e) {
  57192. var n = {}
  57193. , i = {};
  57194. return r(t || [], n),
  57195. r(e || [], i, n),
  57196. [o(n), o(i)];
  57197. function r(t, e, n) {
  57198. for (var i = 0, r = t.length; i < r; i++) {
  57199. var o = Ro(t[i].seriesId, null);
  57200. if (null == o)
  57201. return;
  57202. for (var a = To(t[i].dataIndex), s = n && n[o], l = 0, u = a.length; l < u; l++) {
  57203. var h = a[l];
  57204. s && s[h] ? s[h] = null : (e[o] || (e[o] = {}))[h] = 1
  57205. }
  57206. }
  57207. }
  57208. function o(t, e) {
  57209. var n = [];
  57210. for (var i in t)
  57211. if (t.hasOwnProperty(i) && null != t[i])
  57212. if (e)
  57213. n.push(+i);
  57214. else {
  57215. var r = o(t[i], !0);
  57216. r.length && n.push({
  57217. seriesId: i,
  57218. dataIndex: r
  57219. })
  57220. }
  57221. return n
  57222. }
  57223. }(h, c);
  57224. this._dispatchHighDown("downplay", jF(p[0], n)),
  57225. this._dispatchHighDown("highlight", jF(p[1], n))
  57226. }
  57227. }
  57228. ,
  57229. e.prototype._hoverLinkFromSeriesMouseOver = function(t) {
  57230. var e;
  57231. if (Oy(t.target, (function(t) {
  57232. var n = rl(t);
  57233. if (null != n.dataIndex)
  57234. return e = n,
  57235. !0
  57236. }
  57237. ), !0),
  57238. e) {
  57239. var n = this.ecModel.getSeriesByIndex(e.seriesIndex)
  57240. , i = this.visualMapModel;
  57241. if (i.isTargetSeries(n)) {
  57242. var r = n.getData(e.dataType)
  57243. , o = r.getStore().get(i.getDataDimensionIndex(r), e.dataIndex);
  57244. isNaN(o) || this._showIndicator(o, o)
  57245. }
  57246. }
  57247. }
  57248. ,
  57249. e.prototype._hideIndicator = function() {
  57250. var t = this._shapes;
  57251. t.indicator && t.indicator.attr("invisible", !0),
  57252. t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
  57253. var e = this._shapes.handleLabels;
  57254. if (e)
  57255. for (var n = 0; n < e.length; n++)
  57256. this.api.leaveBlur(e[n])
  57257. }
  57258. ,
  57259. e.prototype._clearHoverLinkToSeries = function() {
  57260. this._hideIndicator();
  57261. var t = this._hoverLinkDataIndices;
  57262. this._dispatchHighDown("downplay", jF(t, this.visualMapModel)),
  57263. t.length = 0
  57264. }
  57265. ,
  57266. e.prototype._clearHoverLinkFromSeries = function() {
  57267. this._hideIndicator();
  57268. var t = this.api.getZr();
  57269. t.off("mouseover", this._hoverLinkFromSeriesMouseOver),
  57270. t.off("mouseout", this._hideIndicator)
  57271. }
  57272. ,
  57273. e.prototype._applyTransform = function(t, e, n, i) {
  57274. var r = Bh(e, i ? null : this.group);
  57275. return Y(t) ? Fh(t, r, n) : Gh(t, r, n)
  57276. }
  57277. ,
  57278. e.prototype._dispatchHighDown = function(t, e) {
  57279. e && e.length && this.api.dispatchAction({
  57280. type: t,
  57281. batch: e
  57282. })
  57283. }
  57284. ,
  57285. e.prototype.dispose = function() {
  57286. this._clearHoverLinkFromSeries(),
  57287. this._clearHoverLinkToSeries()
  57288. }
  57289. ,
  57290. e.type = "visualMap.continuous",
  57291. e
  57292. }(XF);
  57293. function tG(t, e, n, i) {
  57294. return new Xu({
  57295. shape: {
  57296. points: t
  57297. },
  57298. draggable: !!n,
  57299. cursor: e,
  57300. drift: n,
  57301. onmousemove: function(t) {
  57302. de(t.event)
  57303. },
  57304. ondragend: i
  57305. })
  57306. }
  57307. function eG(t) {
  57308. var e = t.get("hoverLinkOnHandle");
  57309. return !!(null == e ? t.get("realtime") : e)
  57310. }
  57311. function nG(t) {
  57312. return "vertical" === t ? "ns-resize" : "ew-resize"
  57313. }
  57314. var iG = {
  57315. type: "selectDataRange",
  57316. event: "dataRangeSelected",
  57317. update: "update"
  57318. }
  57319. , rG = function(t, e) {
  57320. e.eachComponent({
  57321. mainType: "visualMap",
  57322. query: t
  57323. }, (function(e) {
  57324. e.setSelected(t.selected)
  57325. }
  57326. ))
  57327. }
  57328. , oG = [{
  57329. createOnAllSeries: !0,
  57330. reset: function(t, e) {
  57331. var n = [];
  57332. return e.eachComponent("visualMap", (function(e) {
  57333. var i, r, o, a, s, l = t.pipelineContext;
  57334. !e.isTargetSeries(t) || l && l.large || n.push((i = e.stateList,
  57335. r = e.targetVisuals,
  57336. o = W(e.getValueState, e),
  57337. a = e.getDataDimensionIndex(t.getData()),
  57338. s = {},
  57339. E(i, (function(t) {
  57340. var e = kD.prepareVisualTypes(r[t]);
  57341. s[t] = e
  57342. }
  57343. )),
  57344. {
  57345. progress: function(t, e) {
  57346. var n, i;
  57347. function l(t) {
  57348. return Dy(e, i, t)
  57349. }
  57350. function u(t, n) {
  57351. ky(e, i, t, n)
  57352. }
  57353. null != a && (n = e.getDimensionIndex(a));
  57354. for (var h = e.getStore(); null != (i = t.next()); ) {
  57355. var c = e.getRawDataItem(i);
  57356. if (!c || !1 !== c.visualMap)
  57357. 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++) {
  57358. var m = g[y];
  57359. f[m] && f[m].applyVisual(p, l, u)
  57360. }
  57361. }
  57362. }
  57363. }))
  57364. }
  57365. )),
  57366. n
  57367. }
  57368. }, {
  57369. createOnAllSeries: !0,
  57370. reset: function(t, e) {
  57371. var n = t.getData()
  57372. , i = [];
  57373. e.eachComponent("visualMap", (function(e) {
  57374. if (e.isTargetSeries(t)) {
  57375. var r = e.getVisualMeta(W(aG, null, t, e)) || {
  57376. stops: [],
  57377. outerColors: []
  57378. }
  57379. , o = e.getDataDimensionIndex(n);
  57380. o >= 0 && (r.dimension = o,
  57381. i.push(r))
  57382. }
  57383. }
  57384. )),
  57385. t.getData().setVisual("visualMeta", i)
  57386. }
  57387. }];
  57388. function aG(t, e, n, i) {
  57389. for (var r = e.targetVisuals[i], o = kD.prepareVisualTypes(r), a = {
  57390. color: Ay(t.getData(), "color")
  57391. }, s = 0, l = o.length; s < l; s++) {
  57392. var u = o[s]
  57393. , h = r["opacity" === u ? "__alphaForOpacity" : u];
  57394. h && h.applyVisual(n, c, p)
  57395. }
  57396. return a.color;
  57397. function c(t) {
  57398. return a[t]
  57399. }
  57400. function p(t, e) {
  57401. a[t] = e
  57402. }
  57403. }
  57404. var sG = E;
  57405. function lG(t) {
  57406. var e = t && t.visualMap;
  57407. Y(e) || (e = e ? [e] : []),
  57408. sG(e, (function(t) {
  57409. if (t) {
  57410. uG(t, "splitList") && !uG(t, "pieces") && (t.pieces = t.splitList,
  57411. delete t.splitList);
  57412. var e = t.pieces;
  57413. e && Y(e) && sG(e, (function(t) {
  57414. q(t) && (uG(t, "start") && !uG(t, "min") && (t.min = t.start),
  57415. uG(t, "end") && !uG(t, "max") && (t.max = t.end))
  57416. }
  57417. ))
  57418. }
  57419. }
  57420. ))
  57421. }
  57422. function uG(t, e) {
  57423. return t && t.hasOwnProperty && t.hasOwnProperty(e)
  57424. }
  57425. var hG = !1;
  57426. function cG(t) {
  57427. hG || (hG = !0,
  57428. t.registerSubTypeDefaulter("visualMap", (function(t) {
  57429. return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous"
  57430. }
  57431. )),
  57432. t.registerAction(iG, rG),
  57433. E(oG, (function(e) {
  57434. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e)
  57435. }
  57436. )),
  57437. t.registerPreprocessor(lG))
  57438. }
  57439. function pG(t) {
  57440. t.registerComponentModel(HF),
  57441. t.registerComponentView(QF),
  57442. cG(t)
  57443. }
  57444. var dG = function(t) {
  57445. function e() {
  57446. var n = null !== t && t.apply(this, arguments) || this;
  57447. return n.type = e.type,
  57448. n._pieceList = [],
  57449. n
  57450. }
  57451. return n(e, t),
  57452. e.prototype.optionUpdated = function(e, n) {
  57453. t.prototype.optionUpdated.apply(this, arguments),
  57454. this.resetExtent();
  57455. var i = this._mode = this._determineMode();
  57456. this._pieceList = [],
  57457. fG[this._mode].call(this, this._pieceList),
  57458. this._resetSelected(e, n);
  57459. var r = this.option.categories;
  57460. this.resetVisual((function(t, e) {
  57461. "categories" === i ? (t.mappingMethod = "category",
  57462. t.categories = T(r)) : (t.dataExtent = this.getExtent(),
  57463. t.mappingMethod = "piecewise",
  57464. t.pieceList = z(this._pieceList, (function(t) {
  57465. return t = T(t),
  57466. "inRange" !== e && (t.visual = null),
  57467. t
  57468. }
  57469. )))
  57470. }
  57471. ))
  57472. }
  57473. ,
  57474. e.prototype.completeVisualOption = function() {
  57475. var e = this.option
  57476. , n = {}
  57477. , i = kD.listVisualTypes()
  57478. , r = this.isCategory();
  57479. function o(t, e, n) {
  57480. return t && t[e] && t[e].hasOwnProperty(n)
  57481. }
  57482. E(e.pieces, (function(t) {
  57483. E(i, (function(e) {
  57484. t.hasOwnProperty(e) && (n[e] = 1)
  57485. }
  57486. ))
  57487. }
  57488. )),
  57489. E(n, (function(t, n) {
  57490. var i = !1;
  57491. E(this.stateList, (function(t) {
  57492. i = i || o(e, t, n) || o(e.target, t, n)
  57493. }
  57494. ), this),
  57495. !i && E(this.stateList, (function(t) {
  57496. (e[t] || (e[t] = {}))[n] = OF(n, "inRange" === t ? "active" : "inactive", r)
  57497. }
  57498. ))
  57499. }
  57500. ), this),
  57501. t.prototype.completeVisualOption.apply(this, arguments)
  57502. }
  57503. ,
  57504. e.prototype._resetSelected = function(t, e) {
  57505. var n = this.option
  57506. , i = this._pieceList
  57507. , r = (e ? n : t).selected || {};
  57508. if (n.selected = r,
  57509. E(i, (function(t, e) {
  57510. var n = this.getSelectedMapKey(t);
  57511. r.hasOwnProperty(n) || (r[n] = !0)
  57512. }
  57513. ), this),
  57514. "single" === n.selectedMode) {
  57515. var o = !1;
  57516. E(i, (function(t, e) {
  57517. var n = this.getSelectedMapKey(t);
  57518. r[n] && (o ? r[n] = !1 : o = !0)
  57519. }
  57520. ), this)
  57521. }
  57522. }
  57523. ,
  57524. e.prototype.getItemSymbol = function() {
  57525. return this.get("itemSymbol")
  57526. }
  57527. ,
  57528. e.prototype.getSelectedMapKey = function(t) {
  57529. return "categories" === this._mode ? t.value + "" : t.index + ""
  57530. }
  57531. ,
  57532. e.prototype.getPieceList = function() {
  57533. return this._pieceList
  57534. }
  57535. ,
  57536. e.prototype._determineMode = function() {
  57537. var t = this.option;
  57538. return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"
  57539. }
  57540. ,
  57541. e.prototype.setSelected = function(t) {
  57542. this.option.selected = T(t)
  57543. }
  57544. ,
  57545. e.prototype.getValueState = function(t) {
  57546. var e = kD.findPieceIndex(t, this._pieceList);
  57547. return null != e && this.option.selected[this.getSelectedMapKey(this._pieceList[e])] ? "inRange" : "outOfRange"
  57548. }
  57549. ,
  57550. e.prototype.findTargetDataIndices = function(t) {
  57551. var e = []
  57552. , n = this._pieceList;
  57553. return this.eachTargetSeries((function(i) {
  57554. var r = []
  57555. , o = i.getData();
  57556. o.each(this.getDataDimensionIndex(o), (function(e, i) {
  57557. kD.findPieceIndex(e, n) === t && r.push(i)
  57558. }
  57559. ), this),
  57560. e.push({
  57561. seriesId: i.id,
  57562. dataIndex: r
  57563. })
  57564. }
  57565. ), this),
  57566. e
  57567. }
  57568. ,
  57569. e.prototype.getRepresentValue = function(t) {
  57570. var e;
  57571. if (this.isCategory())
  57572. e = t.value;
  57573. else if (null != t.value)
  57574. e = t.value;
  57575. else {
  57576. var n = t.interval || [];
  57577. e = n[0] === -1 / 0 && n[1] === 1 / 0 ? 0 : (n[0] + n[1]) / 2
  57578. }
  57579. return e
  57580. }
  57581. ,
  57582. e.prototype.getVisualMeta = function(t) {
  57583. if (!this.isCategory()) {
  57584. var e = []
  57585. , n = ["", ""]
  57586. , i = this
  57587. , r = this._pieceList.slice();
  57588. if (r.length) {
  57589. var o = r[0].interval[0];
  57590. o !== -1 / 0 && r.unshift({
  57591. interval: [-1 / 0, o]
  57592. }),
  57593. (o = r[r.length - 1].interval[1]) !== 1 / 0 && r.push({
  57594. interval: [o, 1 / 0]
  57595. })
  57596. } else
  57597. r.push({
  57598. interval: [-1 / 0, 1 / 0]
  57599. });
  57600. var a = -1 / 0;
  57601. return E(r, (function(t) {
  57602. var e = t.interval;
  57603. e && (e[0] > a && s([a, e[0]], "outOfRange"),
  57604. s(e.slice()),
  57605. a = e[1])
  57606. }
  57607. ), this),
  57608. {
  57609. stops: e,
  57610. outerColors: n
  57611. }
  57612. }
  57613. function s(r, o) {
  57614. var a = i.getRepresentValue({
  57615. interval: r
  57616. });
  57617. o || (o = i.getValueState(a));
  57618. var s = t(a, o);
  57619. r[0] === -1 / 0 ? n[0] = s : r[1] === 1 / 0 ? n[1] = s : e.push({
  57620. value: r[0],
  57621. color: s
  57622. }, {
  57623. value: r[1],
  57624. color: s
  57625. })
  57626. }
  57627. }
  57628. ,
  57629. e.type = "visualMap.piecewise",
  57630. e.defaultOption = kc(GF.defaultOption, {
  57631. selected: null,
  57632. minOpen: !1,
  57633. maxOpen: !1,
  57634. align: "auto",
  57635. itemWidth: 20,
  57636. itemHeight: 14,
  57637. itemSymbol: "roundRect",
  57638. pieces: null,
  57639. categories: null,
  57640. splitNumber: 5,
  57641. selectedMode: "multiple",
  57642. itemGap: 10,
  57643. hoverLink: !0
  57644. }),
  57645. e
  57646. }(GF)
  57647. , fG = {
  57648. splitNumber: function(t) {
  57649. var e = this.option
  57650. , n = Math.min(e.precision, 20)
  57651. , i = this.getExtent()
  57652. , r = e.splitNumber;
  57653. r = Math.max(parseInt(r, 10), 1),
  57654. e.splitNumber = r;
  57655. for (var o = (i[1] - i[0]) / r; +o.toFixed(n) !== o && n < 5; )
  57656. n++;
  57657. e.precision = n,
  57658. o = +o.toFixed(n),
  57659. e.minOpen && t.push({
  57660. interval: [-1 / 0, i[0]],
  57661. close: [0, 0]
  57662. });
  57663. for (var a = 0, s = i[0]; a < r; s += o,
  57664. a++) {
  57665. var l = a === r - 1 ? i[1] : s + o;
  57666. t.push({
  57667. interval: [s, l],
  57668. close: [1, 1]
  57669. })
  57670. }
  57671. e.maxOpen && t.push({
  57672. interval: [i[1], 1 / 0],
  57673. close: [0, 0]
  57674. }),
  57675. go(t),
  57676. E(t, (function(t, e) {
  57677. t.index = e,
  57678. t.text = this.formatValueText(t.interval)
  57679. }
  57680. ), this)
  57681. },
  57682. categories: function(t) {
  57683. var e = this.option;
  57684. E(e.categories, (function(e) {
  57685. t.push({
  57686. text: this.formatValueText(e, !0),
  57687. value: e
  57688. })
  57689. }
  57690. ), this),
  57691. gG(e, t)
  57692. },
  57693. pieces: function(t) {
  57694. var e = this.option;
  57695. E(e.pieces, (function(e, n) {
  57696. q(e) || (e = {
  57697. value: e
  57698. });
  57699. var i = {
  57700. text: "",
  57701. index: n
  57702. };
  57703. if (null != e.label && (i.text = e.label),
  57704. e.hasOwnProperty("value")) {
  57705. var r = i.value = e.value;
  57706. i.interval = [r, r],
  57707. i.close = [1, 1]
  57708. } else {
  57709. 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++) {
  57710. for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], p = 0; p < 3 && null == o[h]; p++)
  57711. o[h] = e[c[p]],
  57712. a[h] = s[p],
  57713. u[h] = 2 === p;
  57714. null == o[h] && (o[h] = l[h])
  57715. }
  57716. u[0] && o[1] === 1 / 0 && (a[0] = 0),
  57717. u[1] && o[0] === -1 / 0 && (a[1] = 0),
  57718. o[0] === o[1] && a[0] && a[1] && (i.value = o[0])
  57719. }
  57720. i.visual = kD.retrieveVisuals(e),
  57721. t.push(i)
  57722. }
  57723. ), this),
  57724. gG(e, t),
  57725. go(t),
  57726. E(t, (function(t) {
  57727. var e = t.close
  57728. , n = [["<", "≤"][e[1]], [">", "≥"][e[0]]];
  57729. t.text = t.text || this.formatValueText(null != t.value ? t.value : t.interval, !1, n)
  57730. }
  57731. ), this)
  57732. }
  57733. };
  57734. function gG(t, e) {
  57735. var n = t.inverse;
  57736. ("vertical" === t.orient ? !n : n) && e.reverse()
  57737. }
  57738. var yG = function(t) {
  57739. function e() {
  57740. var n = null !== t && t.apply(this, arguments) || this;
  57741. return n.type = e.type,
  57742. n
  57743. }
  57744. return n(e, t),
  57745. e.prototype.doRender = function() {
  57746. var t = this.group;
  57747. t.removeAll();
  57748. var e = this.visualMapModel
  57749. , n = e.get("textGap")
  57750. , i = e.textStyleModel
  57751. , r = i.getFont()
  57752. , o = i.getTextColor()
  57753. , a = this._getItemAlign()
  57754. , s = e.itemSize
  57755. , l = this._getViewData()
  57756. , u = l.endsText
  57757. , h = it(e.get("showLabel", !0), !u)
  57758. , c = !e.get("selectedMode");
  57759. u && this._renderEndsText(t, u[0], s, h, a),
  57760. E(l.viewPieceList, (function(i) {
  57761. var l = i.piece
  57762. , u = new Br;
  57763. u.onclick = W(this._onItemClick, this, l),
  57764. this._enableHoverLink(u, i.indexInModelPieceList);
  57765. var p = e.getRepresentValue(l);
  57766. if (this._createItemSymbol(u, p, [0, 0, s[0], s[1]], c),
  57767. h) {
  57768. var d = this.visualMapModel.getValueState(p);
  57769. u.add(new Xs({
  57770. style: {
  57771. x: "right" === a ? -n : s[0] + n,
  57772. y: s[1] / 2,
  57773. text: l.text,
  57774. verticalAlign: "middle",
  57775. align: a,
  57776. font: r,
  57777. fill: o,
  57778. opacity: "outOfRange" === d ? .5 : 1
  57779. },
  57780. silent: c
  57781. }))
  57782. }
  57783. t.add(u)
  57784. }
  57785. ), this),
  57786. u && this._renderEndsText(t, u[1], s, h, a),
  57787. Ap(e.get("orient"), t, e.get("itemGap")),
  57788. this.renderBackground(t),
  57789. this.positionGroup(t)
  57790. }
  57791. ,
  57792. e.prototype._enableHoverLink = function(t, e) {
  57793. var n = this;
  57794. t.on("mouseover", (function() {
  57795. return i("highlight")
  57796. }
  57797. )).on("mouseout", (function() {
  57798. return i("downplay")
  57799. }
  57800. ));
  57801. var i = function(t) {
  57802. var i = n.visualMapModel;
  57803. i.option.hoverLink && n.api.dispatchAction({
  57804. type: t,
  57805. batch: jF(i.findTargetDataIndices(e), i)
  57806. })
  57807. }
  57808. }
  57809. ,
  57810. e.prototype._getItemAlign = function() {
  57811. var t = this.visualMapModel
  57812. , e = t.option;
  57813. if ("vertical" === e.orient)
  57814. return ZF(t, this.api, t.itemSize);
  57815. var n = e.align;
  57816. return n && "auto" !== n || (n = "left"),
  57817. n
  57818. }
  57819. ,
  57820. e.prototype._renderEndsText = function(t, e, n, i, r) {
  57821. if (e) {
  57822. var o = new Br
  57823. , a = this.visualMapModel.textStyleModel;
  57824. o.add(new Xs({
  57825. style: oc(a, {
  57826. x: i ? "right" === r ? n[0] : 0 : n[0] / 2,
  57827. y: n[1] / 2,
  57828. verticalAlign: "middle",
  57829. align: i ? r : "center",
  57830. text: e
  57831. })
  57832. })),
  57833. t.add(o)
  57834. }
  57835. }
  57836. ,
  57837. e.prototype._getViewData = function() {
  57838. var t = this.visualMapModel
  57839. , e = z(t.getPieceList(), (function(t, e) {
  57840. return {
  57841. piece: t,
  57842. indexInModelPieceList: e
  57843. }
  57844. }
  57845. ))
  57846. , n = t.get("text")
  57847. , i = t.get("orient")
  57848. , r = t.get("inverse");
  57849. return ("horizontal" === i ? r : !r) ? e.reverse() : n && (n = n.slice().reverse()),
  57850. {
  57851. viewPieceList: e,
  57852. endsText: n
  57853. }
  57854. }
  57855. ,
  57856. e.prototype._createItemSymbol = function(t, e, n, i) {
  57857. var r = Xy(this.getControllerVisual(e, "symbol"), n[0], n[1], n[2], n[3], this.getControllerVisual(e, "color"));
  57858. r.silent = i,
  57859. t.add(r)
  57860. }
  57861. ,
  57862. e.prototype._onItemClick = function(t) {
  57863. var e = this.visualMapModel
  57864. , n = e.option
  57865. , i = n.selectedMode;
  57866. if (i) {
  57867. var r = T(n.selected)
  57868. , o = e.getSelectedMapKey(t);
  57869. "single" === i || !0 === i ? (r[o] = !0,
  57870. E(r, (function(t, e) {
  57871. r[e] = e === o
  57872. }
  57873. ))) : r[o] = !r[o],
  57874. this.api.dispatchAction({
  57875. type: "selectDataRange",
  57876. from: this.uid,
  57877. visualMapId: this.visualMapModel.id,
  57878. selected: r
  57879. })
  57880. }
  57881. }
  57882. ,
  57883. e.type = "visualMap.piecewise",
  57884. e
  57885. }(XF);
  57886. function vG(t) {
  57887. t.registerComponentModel(dG),
  57888. t.registerComponentView(yG),
  57889. cG(t)
  57890. }
  57891. var mG = {
  57892. label: {
  57893. enabled: !0
  57894. },
  57895. decal: {
  57896. show: !1
  57897. }
  57898. }
  57899. , xG = Vo()
  57900. , _G = {};
  57901. function bG(t, e) {
  57902. var n = t.getModel("aria");
  57903. if (n.get("enabled")) {
  57904. var i = T(mG);
  57905. C(i.label, t.getLocaleModel().get("aria"), !1),
  57906. C(n.option, i, !1),
  57907. function() {
  57908. if (n.getModel("decal").get("show")) {
  57909. var e = yt();
  57910. t.eachSeries((function(t) {
  57911. if (!t.isColorBySeries()) {
  57912. var n = e.get(t.type);
  57913. n || (n = {},
  57914. e.set(t.type, n)),
  57915. xG(t).scope = n
  57916. }
  57917. }
  57918. )),
  57919. t.eachRawSeries((function(e) {
  57920. if (!t.isSeriesFiltered(e))
  57921. if (X(e.enableAriaDecal))
  57922. e.enableAriaDecal();
  57923. else {
  57924. var n = e.getData();
  57925. if (e.isColorBySeries()) {
  57926. var i = pd(e.ecModel, e.name, _G, t.getSeriesCount())
  57927. , r = n.getVisual("decal");
  57928. n.setVisual("decal", u(r, i))
  57929. } else {
  57930. var o = e.getRawData()
  57931. , a = {}
  57932. , s = xG(e).scope;
  57933. n.each((function(t) {
  57934. var e = n.getRawIndex(t);
  57935. a[e] = t
  57936. }
  57937. ));
  57938. var l = o.count();
  57939. o.each((function(t) {
  57940. var i = a[t]
  57941. , r = o.getName(t) || t + ""
  57942. , h = pd(e.ecModel, r, s, l)
  57943. , c = n.getItemVisual(i, "decal");
  57944. n.setItemVisual(i, "decal", u(c, h))
  57945. }
  57946. ))
  57947. }
  57948. }
  57949. function u(t, e) {
  57950. var n = t ? A(A({}, e), t) : e;
  57951. return n.dirty = !0,
  57952. n
  57953. }
  57954. }
  57955. ))
  57956. }
  57957. }(),
  57958. function() {
  57959. var i = e.getZr().dom;
  57960. if (!i)
  57961. return;
  57962. var o = t.getLocaleModel().get("aria")
  57963. , a = n.getModel("label");
  57964. if (a.option = k(a.option, o),
  57965. !a.get("enabled"))
  57966. return;
  57967. if (i.setAttribute("role", "img"),
  57968. a.get("description"))
  57969. return void i.setAttribute("aria-label", a.get("description"));
  57970. var s, l = t.getSeriesCount(), u = a.get(["data", "maxCount"]) || 10, h = a.get(["series", "maxCount"]) || 10, c = Math.min(l, h);
  57971. if (l < 1)
  57972. return;
  57973. var p = function() {
  57974. var e = t.get("title");
  57975. e && e.length && (e = e[0]);
  57976. return e && e.text
  57977. }();
  57978. s = p ? r(a.get(["general", "withTitle"]), {
  57979. title: p
  57980. }) : a.get(["general", "withoutTitle"]);
  57981. var d = [];
  57982. s += r(l > 1 ? a.get(["series", "multiple", "prefix"]) : a.get(["series", "single", "prefix"]), {
  57983. seriesCount: l
  57984. }),
  57985. t.eachSeries((function(e, n) {
  57986. if (n < c) {
  57987. var i = void 0
  57988. , o = e.get("name") ? "withName" : "withoutName";
  57989. i = r(i = l > 1 ? a.get(["series", "multiple", o]) : a.get(["series", "single", o]), {
  57990. seriesId: e.seriesIndex,
  57991. seriesName: e.get("name"),
  57992. seriesType: (_ = e.subType,
  57993. b = t.getLocaleModel().get(["series", "typeNames"]),
  57994. b[_] || b.chart)
  57995. });
  57996. var s = e.getData();
  57997. if (s.count() > u)
  57998. i += r(a.get(["data", "partialData"]), {
  57999. displayCnt: u
  58000. });
  58001. else
  58002. i += a.get(["data", "allData"]);
  58003. for (var h = a.get(["data", "separator", "middle"]), p = a.get(["data", "separator", "end"]), f = a.get(["data", "excludeDimensionId"]), g = [], y = 0; y < s.count(); y++)
  58004. if (y < u) {
  58005. var v = s.getName(y)
  58006. , m = f ? B(s.getValues(y), (function(t, e) {
  58007. return -1 === P(f, e)
  58008. }
  58009. )) : s.getValues(y)
  58010. , x = a.get(["data", v ? "withName" : "withoutName"]);
  58011. g.push(r(x, {
  58012. name: v,
  58013. value: m.join(h)
  58014. }))
  58015. }
  58016. i += g.join(h) + p,
  58017. d.push(i)
  58018. }
  58019. var _, b
  58020. }
  58021. ));
  58022. var f = a.getModel(["series", "multiple", "separator"])
  58023. , g = f.get("middle")
  58024. , y = f.get("end");
  58025. s += d.join(g) + y,
  58026. i.setAttribute("aria-label", s)
  58027. }()
  58028. }
  58029. function r(t, e) {
  58030. if (!U(t))
  58031. return t;
  58032. var n = t;
  58033. return E(e, (function(t, e) {
  58034. n = n.replace(new RegExp("\\{\\s*" + e + "\\s*\\}","g"), t)
  58035. }
  58036. )),
  58037. n
  58038. }
  58039. }
  58040. function wG(t) {
  58041. if (t && t.aria) {
  58042. var e = t.aria;
  58043. null != e.show && (e.enabled = e.show),
  58044. e.label = e.label || {},
  58045. E(["description", "general", "series", "data"], (function(t) {
  58046. null != e[t] && (e.label[t] = e[t])
  58047. }
  58048. ))
  58049. }
  58050. }
  58051. var SG = {
  58052. value: "eq",
  58053. "<": "lt",
  58054. "<=": "lte",
  58055. ">": "gt",
  58056. ">=": "gte",
  58057. "=": "eq",
  58058. "!=": "ne",
  58059. "<>": "ne"
  58060. }
  58061. , MG = function() {
  58062. function t(t) {
  58063. if (null == (this._condVal = U(t) ? new RegExp(t) : et(t) ? t : null)) {
  58064. var e = "";
  58065. 0,
  58066. wo(e)
  58067. }
  58068. }
  58069. return t.prototype.evaluate = function(t) {
  58070. var e = typeof t;
  58071. return U(e) ? this._condVal.test(t) : !!j(e) && this._condVal.test(t + "")
  58072. }
  58073. ,
  58074. t
  58075. }()
  58076. , IG = function() {
  58077. function t() {}
  58078. return t.prototype.evaluate = function() {
  58079. return this.value
  58080. }
  58081. ,
  58082. t
  58083. }()
  58084. , TG = function() {
  58085. function t() {}
  58086. return t.prototype.evaluate = function() {
  58087. for (var t = this.children, e = 0; e < t.length; e++)
  58088. if (!t[e].evaluate())
  58089. return !1;
  58090. return !0
  58091. }
  58092. ,
  58093. t
  58094. }()
  58095. , CG = function() {
  58096. function t() {}
  58097. return t.prototype.evaluate = function() {
  58098. for (var t = this.children, e = 0; e < t.length; e++)
  58099. if (t[e].evaluate())
  58100. return !0;
  58101. return !1
  58102. }
  58103. ,
  58104. t
  58105. }()
  58106. , DG = function() {
  58107. function t() {}
  58108. return t.prototype.evaluate = function() {
  58109. return !this.child.evaluate()
  58110. }
  58111. ,
  58112. t
  58113. }()
  58114. , AG = function() {
  58115. function t() {}
  58116. return t.prototype.evaluate = function() {
  58117. for (var t = !!this.valueParser, e = (0,
  58118. this.getValue)(this.valueGetterParam), n = t ? this.valueParser(e) : null, i = 0; i < this.subCondList.length; i++)
  58119. if (!this.subCondList[i].evaluate(t ? n : e))
  58120. return !1;
  58121. return !0
  58122. }
  58123. ,
  58124. t
  58125. }();
  58126. function kG(t, e) {
  58127. if (!0 === t || !1 === t) {
  58128. var n = new IG;
  58129. return n.value = t,
  58130. n
  58131. }
  58132. var i = "";
  58133. return PG(t) || wo(i),
  58134. t.and ? LG("and", t, e) : t.or ? LG("or", t, e) : t.not ? function(t, e) {
  58135. var n = t.not
  58136. , i = "";
  58137. 0;
  58138. PG(n) || wo(i);
  58139. var r = new DG;
  58140. r.child = kG(n, e),
  58141. r.child || wo(i);
  58142. return r
  58143. }(t, e) : function(t, e) {
  58144. 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++) {
  58145. var u = o[l];
  58146. if ("parser" !== u && !e.valueGetterAttrMap.get(u)) {
  58147. var h = _t(SG, u) ? SG[u] : u
  58148. , c = t[u]
  58149. , p = s ? s(c) : c
  58150. , d = Pf(h, p) || "reg" === h && new MG(p);
  58151. d || wo(n),
  58152. r.push(d)
  58153. }
  58154. }
  58155. r.length || wo(n);
  58156. var f = new AG;
  58157. return f.valueGetterParam = i,
  58158. f.valueParser = s,
  58159. f.getValue = e.getValue,
  58160. f.subCondList = r,
  58161. f
  58162. }(t, e)
  58163. }
  58164. function LG(t, e, n) {
  58165. var i = e[t]
  58166. , r = "";
  58167. Y(i) || wo(r),
  58168. i.length || wo(r);
  58169. var o = "and" === t ? new TG : new CG;
  58170. return o.children = z(i, (function(t) {
  58171. return kG(t, n)
  58172. }
  58173. )),
  58174. o.children.length || wo(r),
  58175. o
  58176. }
  58177. function PG(t) {
  58178. return q(t) && !N(t)
  58179. }
  58180. var OG = function() {
  58181. function t(t, e) {
  58182. this._cond = kG(t, e)
  58183. }
  58184. return t.prototype.evaluate = function() {
  58185. return this._cond.evaluate()
  58186. }
  58187. ,
  58188. t
  58189. }();
  58190. var RG = {
  58191. type: "echarts:filter",
  58192. transform: function(t) {
  58193. for (var e, n, i, r = t.upstream, o = (n = t.config,
  58194. i = {
  58195. valueGetterAttrMap: yt({
  58196. dimension: !0
  58197. }),
  58198. prepareGetValue: function(t) {
  58199. var e = ""
  58200. , n = t.dimension;
  58201. _t(t, "dimension") || wo(e);
  58202. var i = r.getDimensionInfo(n);
  58203. return i || wo(e),
  58204. {
  58205. dimIdx: i.index
  58206. }
  58207. },
  58208. getValue: function(t) {
  58209. return r.retrieveValueFromItem(e, t.dimIdx)
  58210. }
  58211. },
  58212. new OG(n,i)), a = [], s = 0, l = r.count(); s < l; s++)
  58213. e = r.getRawDataItem(s),
  58214. o.evaluate() && a.push(e);
  58215. return {
  58216. data: a
  58217. }
  58218. }
  58219. };
  58220. var NG = {
  58221. type: "echarts:sort",
  58222. transform: function(t) {
  58223. var e = t.upstream
  58224. , n = t.config
  58225. , i = ""
  58226. , r = To(n);
  58227. r.length || wo(i);
  58228. var o = [];
  58229. E(r, (function(t) {
  58230. var n = t.dimension
  58231. , r = t.order
  58232. , a = t.parser
  58233. , s = t.incomparable;
  58234. if (null == n && wo(i),
  58235. "asc" !== r && "desc" !== r && wo(i),
  58236. s && "min" !== s && "max" !== s) {
  58237. var l = "";
  58238. 0,
  58239. wo(l)
  58240. }
  58241. if ("asc" !== r && "desc" !== r) {
  58242. var u = "";
  58243. 0,
  58244. wo(u)
  58245. }
  58246. var h = e.getDimensionInfo(n);
  58247. h || wo(i);
  58248. var c = a ? Cf(a) : null;
  58249. a && !c && wo(i),
  58250. o.push({
  58251. dimIdx: h.index,
  58252. parser: c,
  58253. comparator: new kf(r,s)
  58254. })
  58255. }
  58256. ));
  58257. var a = e.sourceFormat;
  58258. a !== Hp && a !== Yp && wo(i);
  58259. for (var s = [], l = 0, u = e.count(); l < u; l++)
  58260. s.push(e.getRawDataItem(l));
  58261. return s.sort((function(t, n) {
  58262. for (var i = 0; i < o.length; i++) {
  58263. var r = o[i]
  58264. , a = e.retrieveValueFromItem(t, r.dimIdx)
  58265. , s = e.retrieveValueFromItem(n, r.dimIdx);
  58266. r.parser && (a = r.parser(a),
  58267. s = r.parser(s));
  58268. var l = r.comparator.evaluate(a, s);
  58269. if (0 !== l)
  58270. return l
  58271. }
  58272. return 0
  58273. }
  58274. )),
  58275. {
  58276. data: s
  58277. }
  58278. }
  58279. };
  58280. var EG = function(t) {
  58281. function e() {
  58282. var e = null !== t && t.apply(this, arguments) || this;
  58283. return e.type = "dataset",
  58284. e
  58285. }
  58286. return n(e, t),
  58287. e.prototype.init = function(e, n, i) {
  58288. t.prototype.init.call(this, e, n, i),
  58289. this._sourceManager = new $f(this),
  58290. Jf(this)
  58291. }
  58292. ,
  58293. e.prototype.mergeOption = function(e, n) {
  58294. t.prototype.mergeOption.call(this, e, n),
  58295. Jf(this)
  58296. }
  58297. ,
  58298. e.prototype.optionUpdated = function() {
  58299. this._sourceManager.dirty()
  58300. }
  58301. ,
  58302. e.prototype.getSourceManager = function() {
  58303. return this._sourceManager
  58304. }
  58305. ,
  58306. e.type = "dataset",
  58307. e.defaultOption = {
  58308. seriesLayoutBy: jp
  58309. },
  58310. e
  58311. }(zp)
  58312. , zG = function(t) {
  58313. function e() {
  58314. var e = null !== t && t.apply(this, arguments) || this;
  58315. return e.type = "dataset",
  58316. e
  58317. }
  58318. return n(e, t),
  58319. e.type = "dataset",
  58320. e
  58321. }(Ag);
  58322. var VG = hs.CMD;
  58323. function BG(t, e) {
  58324. return Math.abs(t - e) < 1e-5
  58325. }
  58326. function FG(t) {
  58327. var e, n, i, r, o, a = t.data, s = t.len(), l = [], u = 0, h = 0, c = 0, p = 0;
  58328. function d(t, n) {
  58329. e && e.length > 2 && l.push(e),
  58330. e = [t, n]
  58331. }
  58332. function f(t, n, i, r) {
  58333. BG(t, i) && BG(n, r) || e.push(t, n, i, r, i, r)
  58334. }
  58335. function g(t, n, i, r, o, a) {
  58336. var s = Math.abs(n - t)
  58337. , l = 4 * Math.tan(s / 4) / 3
  58338. , u = n < t ? -1 : 1
  58339. , h = Math.cos(t)
  58340. , c = Math.sin(t)
  58341. , p = Math.cos(n)
  58342. , d = Math.sin(n)
  58343. , f = h * o + i
  58344. , g = c * a + r
  58345. , y = p * o + i
  58346. , v = d * a + r
  58347. , m = o * l * u
  58348. , x = a * l * u;
  58349. e.push(f - m * c, g + x * h, y + m * d, v - x * p, y, v)
  58350. }
  58351. for (var y = 0; y < s; ) {
  58352. var v = a[y++]
  58353. , m = 1 === y;
  58354. switch (m && (c = u = a[y],
  58355. p = h = a[y + 1],
  58356. v !== VG.L && v !== VG.C && v !== VG.Q || (e = [c, p])),
  58357. v) {
  58358. case VG.M:
  58359. u = c = a[y++],
  58360. h = p = a[y++],
  58361. d(c, p);
  58362. break;
  58363. case VG.L:
  58364. f(u, h, n = a[y++], i = a[y++]),
  58365. u = n,
  58366. h = i;
  58367. break;
  58368. case VG.C:
  58369. e.push(a[y++], a[y++], a[y++], a[y++], u = a[y++], h = a[y++]);
  58370. break;
  58371. case VG.Q:
  58372. n = a[y++],
  58373. i = a[y++],
  58374. r = a[y++],
  58375. o = a[y++],
  58376. e.push(u + 2 / 3 * (n - u), h + 2 / 3 * (i - h), r + 2 / 3 * (n - r), o + 2 / 3 * (i - o), r, o),
  58377. u = r,
  58378. h = o;
  58379. break;
  58380. case VG.A:
  58381. var x = a[y++]
  58382. , _ = a[y++]
  58383. , b = a[y++]
  58384. , w = a[y++]
  58385. , S = a[y++]
  58386. , M = a[y++] + S;
  58387. y += 1;
  58388. var I = !a[y++];
  58389. n = Math.cos(S) * b + x,
  58390. i = Math.sin(S) * w + _,
  58391. m ? d(c = n, p = i) : f(u, h, n, i),
  58392. u = Math.cos(M) * b + x,
  58393. h = Math.sin(M) * w + _;
  58394. for (var T = (I ? -1 : 1) * Math.PI / 2, C = S; I ? C > M : C < M; C += T) {
  58395. g(C, I ? Math.max(C + T, M) : Math.min(C + T, M), x, _, b, w)
  58396. }
  58397. break;
  58398. case VG.R:
  58399. c = u = a[y++],
  58400. p = h = a[y++],
  58401. n = c + a[y++],
  58402. i = p + a[y++],
  58403. d(n, p),
  58404. f(n, p, n, i),
  58405. f(n, i, c, i),
  58406. f(c, i, c, p),
  58407. f(c, p, n, p);
  58408. break;
  58409. case VG.Z:
  58410. e && f(u, h, c, p),
  58411. u = c,
  58412. h = p
  58413. }
  58414. }
  58415. return e && e.length > 2 && l.push(e),
  58416. l
  58417. }
  58418. function GG(t, e, n, i, r, o, a, s, l, u) {
  58419. if (BG(t, n) && BG(e, i) && BG(r, a) && BG(o, s))
  58420. l.push(a, s);
  58421. else {
  58422. var h = 2 / u
  58423. , c = h * h
  58424. , p = a - t
  58425. , d = s - e
  58426. , f = Math.sqrt(p * p + d * d);
  58427. p /= f,
  58428. d /= f;
  58429. var g = n - t
  58430. , y = i - e
  58431. , v = r - a
  58432. , m = o - s
  58433. , x = g * g + y * y
  58434. , _ = v * v + m * m;
  58435. if (x < c && _ < c)
  58436. l.push(a, s);
  58437. else {
  58438. var b = p * g + d * y
  58439. , w = -p * v - d * m;
  58440. if (x - b * b < c && b >= 0 && _ - w * w < c && w >= 0)
  58441. l.push(a, s);
  58442. else {
  58443. var S = []
  58444. , M = [];
  58445. wn(t, n, r, a, .5, S),
  58446. wn(e, i, o, s, .5, M),
  58447. GG(S[0], M[0], S[1], M[1], S[2], M[2], S[3], M[3], l, u),
  58448. GG(S[4], M[4], S[5], M[5], S[6], M[6], S[7], M[7], l, u)
  58449. }
  58450. }
  58451. }
  58452. }
  58453. function WG(t, e, n) {
  58454. var i = t[e]
  58455. , r = t[1 - e]
  58456. , o = Math.abs(i / r)
  58457. , a = Math.ceil(Math.sqrt(o * n))
  58458. , s = Math.floor(n / a);
  58459. 0 === s && (s = 1,
  58460. a = n);
  58461. for (var l = [], u = 0; u < a; u++)
  58462. l.push(s);
  58463. var h = n - a * s;
  58464. if (h > 0)
  58465. for (u = 0; u < h; u++)
  58466. l[u % a] += 1;
  58467. return l
  58468. }
  58469. function HG(t, e, n) {
  58470. 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 = WG([l, u], h ? 0 : 1, e), p = (h ? s : u) / c.length, d = 0; d < c.length; d++)
  58471. for (var f = (h ? u : s) / c[d], g = 0; g < c[d]; g++) {
  58472. var y = {};
  58473. h ? (y.startAngle = o + p * d,
  58474. y.endAngle = o + p * (d + 1),
  58475. y.r0 = i + f * g,
  58476. y.r = i + f * (g + 1)) : (y.startAngle = o + f * g,
  58477. y.endAngle = o + f * (g + 1),
  58478. y.r0 = i + p * d,
  58479. y.r = i + p * (d + 1)),
  58480. y.clockwise = t.clockwise,
  58481. y.cx = t.cx,
  58482. y.cy = t.cy,
  58483. n.push(y)
  58484. }
  58485. }
  58486. function YG(t, e, n, i) {
  58487. return t * i - n * e
  58488. }
  58489. function XG(t, e, n, i, r, o, a, s) {
  58490. var l = n - t
  58491. , u = i - e
  58492. , h = a - r
  58493. , c = s - o
  58494. , p = YG(h, c, l, u);
  58495. if (Math.abs(p) < 1e-6)
  58496. return null;
  58497. var d = YG(t - r, e - o, h, c) / p;
  58498. return d < 0 || d > 1 ? null : new De(d * l + t,d * u + e)
  58499. }
  58500. function UG(t, e, n) {
  58501. var i = new De;
  58502. De.sub(i, n, e),
  58503. i.normalize();
  58504. var r = new De;
  58505. return De.sub(r, t, e),
  58506. r.dot(i)
  58507. }
  58508. function ZG(t, e) {
  58509. var n = t[t.length - 1];
  58510. n && n[0] === e[0] && n[1] === e[1] || t.push(e)
  58511. }
  58512. function jG(t) {
  58513. var e = t.points
  58514. , n = []
  58515. , i = [];
  58516. Ba(e, n, i);
  58517. var r = new ze(n[0],n[1],i[0] - n[0],i[1] - n[1])
  58518. , o = r.width
  58519. , a = r.height
  58520. , s = r.x
  58521. , l = r.y
  58522. , u = new De
  58523. , h = new De;
  58524. return o > a ? (u.x = h.x = s + o / 2,
  58525. u.y = l,
  58526. h.y = l + a) : (u.y = h.y = l + a / 2,
  58527. u.x = s,
  58528. h.x = s + o),
  58529. function(t, e, n) {
  58530. for (var i = t.length, r = [], o = 0; o < i; o++) {
  58531. var a = t[o]
  58532. , s = t[(o + 1) % i]
  58533. , l = XG(a[0], a[1], s[0], s[1], e.x, e.y, n.x, n.y);
  58534. l && r.push({
  58535. projPt: UG(l, e, n),
  58536. pt: l,
  58537. idx: o
  58538. })
  58539. }
  58540. if (r.length < 2)
  58541. return [{
  58542. points: t
  58543. }, {
  58544. points: t
  58545. }];
  58546. r.sort((function(t, e) {
  58547. return t.projPt - e.projPt
  58548. }
  58549. ));
  58550. var u = r[0]
  58551. , h = r[r.length - 1];
  58552. if (h.idx < u.idx) {
  58553. var c = u;
  58554. u = h,
  58555. h = c
  58556. }
  58557. var p = [u.pt.x, u.pt.y]
  58558. , d = [h.pt.x, h.pt.y]
  58559. , f = [p]
  58560. , g = [d];
  58561. for (o = u.idx + 1; o <= h.idx; o++)
  58562. ZG(f, t[o].slice());
  58563. for (ZG(f, d),
  58564. ZG(f, p),
  58565. o = h.idx + 1; o <= u.idx + i; o++)
  58566. ZG(g, t[o % i].slice());
  58567. return ZG(g, p),
  58568. ZG(g, d),
  58569. [{
  58570. points: f
  58571. }, {
  58572. points: g
  58573. }]
  58574. }(e, u, h)
  58575. }
  58576. function qG(t, e, n, i) {
  58577. if (1 === n)
  58578. i.push(e);
  58579. else {
  58580. var r = Math.floor(n / 2)
  58581. , o = t(e);
  58582. qG(t, o[0], r, i),
  58583. qG(t, o[1], n - r, i)
  58584. }
  58585. return i
  58586. }
  58587. function KG(t, e) {
  58588. e.setStyle(t.style),
  58589. e.z = t.z,
  58590. e.z2 = t.z2,
  58591. e.zlevel = t.zlevel
  58592. }
  58593. function $G(t, e) {
  58594. var n, i = [], r = t.shape;
  58595. switch (t.type) {
  58596. case "rect":
  58597. !function(t, e, n) {
  58598. for (var i = t.width, r = t.height, o = i > r, a = WG([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++)
  58599. for (var d = t[l] / a[p], f = 0; f < a[p]; f++) {
  58600. var g = {};
  58601. g[u] = p * c,
  58602. g[h] = f * d,
  58603. g[s] = c,
  58604. g[l] = d,
  58605. g.x += t.x,
  58606. g.y += t.y,
  58607. n.push(g)
  58608. }
  58609. }(r, e, i),
  58610. n = Ws;
  58611. break;
  58612. case "sector":
  58613. HG(r, e, i),
  58614. n = Fu;
  58615. break;
  58616. case "circle":
  58617. HG({
  58618. r0: 0,
  58619. r: r.r,
  58620. startAngle: 0,
  58621. endAngle: 2 * Math.PI,
  58622. cx: r.cx,
  58623. cy: r.cy
  58624. }, e, i),
  58625. n = Fu;
  58626. break;
  58627. default:
  58628. var o = t.getComputedTransform()
  58629. , a = o ? Math.sqrt(Math.max(o[0] * o[0] + o[1] * o[1], o[2] * o[2] + o[3] * o[3])) : 1
  58630. , s = z(function(t, e) {
  58631. var n = FG(t)
  58632. , i = [];
  58633. e = e || 1;
  58634. for (var r = 0; r < n.length; r++) {
  58635. var o = n[r]
  58636. , a = []
  58637. , s = o[0]
  58638. , l = o[1];
  58639. a.push(s, l);
  58640. for (var u = 2; u < o.length; ) {
  58641. var h = o[u++]
  58642. , c = o[u++]
  58643. , p = o[u++]
  58644. , d = o[u++]
  58645. , f = o[u++]
  58646. , g = o[u++];
  58647. GG(s, l, h, c, p, d, f, g, a, e),
  58648. s = f,
  58649. l = g
  58650. }
  58651. i.push(a)
  58652. }
  58653. return i
  58654. }(t.getUpdatedPathProxy(), a), (function(t) {
  58655. return function(t) {
  58656. for (var e = [], n = 0; n < t.length; )
  58657. e.push([t[n++], t[n++]]);
  58658. return e
  58659. }(t)
  58660. }
  58661. ))
  58662. , l = s.length;
  58663. if (0 === l)
  58664. qG(jG, {
  58665. points: s[0]
  58666. }, e, i);
  58667. else if (l === e)
  58668. for (var u = 0; u < l; u++)
  58669. i.push({
  58670. points: s[u]
  58671. });
  58672. else {
  58673. var h = 0
  58674. , c = z(s, (function(t) {
  58675. var e = []
  58676. , n = [];
  58677. Ba(t, e, n);
  58678. var i = (n[1] - e[1]) * (n[0] - e[0]);
  58679. return h += i,
  58680. {
  58681. poly: t,
  58682. area: i
  58683. }
  58684. }
  58685. ));
  58686. c.sort((function(t, e) {
  58687. return e.area - t.area
  58688. }
  58689. ));
  58690. var p = e;
  58691. for (u = 0; u < l; u++) {
  58692. var d = c[u];
  58693. if (p <= 0)
  58694. break;
  58695. var f = u === l - 1 ? p : Math.ceil(d.area / h * e);
  58696. f < 0 || (qG(jG, {
  58697. points: d.poly
  58698. }, f, i),
  58699. p -= f)
  58700. }
  58701. }
  58702. n = Xu
  58703. }
  58704. if (!n)
  58705. return function(t, e) {
  58706. for (var n = [], i = 0; i < e; i++)
  58707. n.push(bu(t));
  58708. return n
  58709. }(t, e);
  58710. var g = [];
  58711. for (u = 0; u < i.length; u++) {
  58712. var y = new n;
  58713. y.setShape(i[u]),
  58714. KG(t, y),
  58715. g.push(y)
  58716. }
  58717. return g
  58718. }
  58719. function JG(t, e) {
  58720. var n = t.length
  58721. , i = e.length;
  58722. if (n === i)
  58723. return [t, e];
  58724. 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; ) {
  58725. var f = a[d - 2]
  58726. , g = a[d - 1]
  58727. , y = a[d++]
  58728. , v = a[d++]
  58729. , m = a[d++]
  58730. , x = a[d++]
  58731. , _ = a[d++]
  58732. , b = a[d++];
  58733. if (p <= 0)
  58734. c.push(y, v, m, x, _, b);
  58735. else {
  58736. for (var w = Math.min(p, h - 1) + 1, S = 1; S <= w; S++) {
  58737. var M = S / w;
  58738. wn(f, y, m, _, M, r),
  58739. wn(g, v, x, b, M, o),
  58740. f = r[3],
  58741. g = o[3],
  58742. c.push(r[1], o[1], r[2], o[2], f, g),
  58743. y = r[5],
  58744. v = o[5],
  58745. m = r[6],
  58746. x = o[6]
  58747. }
  58748. p -= w - 1
  58749. }
  58750. }
  58751. return a === t ? [c, e] : [t, c]
  58752. }
  58753. function QG(t, e) {
  58754. for (var n = t.length, i = t[n - 2], r = t[n - 1], o = [], a = 0; a < e.length; )
  58755. o[a++] = i,
  58756. o[a++] = r;
  58757. return o
  58758. }
  58759. function tW(t) {
  58760. for (var e = 0, n = 0, i = 0, r = t.length, o = 0, a = r - 2; o < r; a = o,
  58761. o += 2) {
  58762. var s = t[a]
  58763. , l = t[a + 1]
  58764. , u = t[o]
  58765. , h = t[o + 1]
  58766. , c = s * h - u * l;
  58767. e += c,
  58768. n += (s + u) * c,
  58769. i += (l + h) * c
  58770. }
  58771. return 0 === e ? [t[0] || 0, t[1] || 0] : [n / e / 3, i / e / 3, e]
  58772. }
  58773. function eW(t, e, n, i) {
  58774. for (var r = (t.length - 2) / 6, o = 1 / 0, a = 0, s = t.length, l = s - 2, u = 0; u < r; u++) {
  58775. for (var h = 6 * u, c = 0, p = 0; p < s; p += 2) {
  58776. var d = 0 === p ? h : (h + p - 2) % l + 2
  58777. , f = t[d] - n[0]
  58778. , g = t[d + 1] - n[1]
  58779. , y = e[p] - i[0] - f
  58780. , v = e[p + 1] - i[1] - g;
  58781. c += y * y + v * v
  58782. }
  58783. c < o && (o = c,
  58784. a = u)
  58785. }
  58786. return a
  58787. }
  58788. function nW(t) {
  58789. for (var e = [], n = t.length, i = 0; i < n; i += 2)
  58790. e[i] = t[n - i - 2],
  58791. e[i + 1] = t[n - i - 1];
  58792. return e
  58793. }
  58794. function iW(t) {
  58795. return t.__isCombineMorphing
  58796. }
  58797. var rW = "__mOriginal_";
  58798. function oW(t, e, n) {
  58799. var i = rW + e
  58800. , r = t[i] || t[e];
  58801. t[i] || (t[i] = t[e]);
  58802. var o = n.replace
  58803. , a = n.after
  58804. , s = n.before;
  58805. t[e] = function() {
  58806. var t, e = arguments;
  58807. return s && s.apply(this, e),
  58808. t = o ? o.apply(this, e) : r.apply(this, e),
  58809. a && a.apply(this, e),
  58810. t
  58811. }
  58812. }
  58813. function aW(t, e) {
  58814. var n = rW + e;
  58815. t[n] && (t[e] = t[n],
  58816. t[n] = null)
  58817. }
  58818. function sW(t, e) {
  58819. for (var n = 0; n < t.length; n++)
  58820. for (var i = t[n], r = 0; r < i.length; ) {
  58821. var o = i[r]
  58822. , a = i[r + 1];
  58823. i[r++] = e[0] * o + e[2] * a + e[4],
  58824. i[r++] = e[1] * o + e[3] * a + e[5]
  58825. }
  58826. }
  58827. function lW(t, e) {
  58828. var n = t.getUpdatedPathProxy()
  58829. , i = e.getUpdatedPathProxy()
  58830. , r = function(t, e) {
  58831. for (var n, i, r, o = [], a = [], s = 0; s < Math.max(t.length, e.length); s++) {
  58832. var l = t[s]
  58833. , u = e[s]
  58834. , h = void 0
  58835. , c = void 0;
  58836. l ? u ? (i = h = (n = JG(l, u))[0],
  58837. r = c = n[1]) : (c = QG(r || l, l),
  58838. h = l) : (h = QG(i || u, u),
  58839. c = u),
  58840. o.push(h),
  58841. a.push(c)
  58842. }
  58843. return [o, a]
  58844. }(FG(n), FG(i))
  58845. , o = r[0]
  58846. , a = r[1]
  58847. , s = t.getComputedTransform()
  58848. , l = e.getComputedTransform();
  58849. s && sW(o, s),
  58850. l && sW(a, l),
  58851. oW(e, "updateTransform", {
  58852. replace: function() {
  58853. this.transform = null
  58854. }
  58855. }),
  58856. e.transform = null;
  58857. var u = function(t, e, n, i) {
  58858. for (var r, o = [], a = 0; a < t.length; a++) {
  58859. var s = t[a]
  58860. , l = e[a]
  58861. , u = tW(s)
  58862. , h = tW(l);
  58863. null == r && (r = u[2] < 0 != h[2] < 0);
  58864. var c = []
  58865. , p = []
  58866. , d = 0
  58867. , f = 1 / 0
  58868. , g = []
  58869. , y = s.length;
  58870. r && (s = nW(s));
  58871. for (var v = 6 * eW(s, l, u, h), m = y - 2, x = 0; x < m; x += 2) {
  58872. var _ = (v + x) % m + 2;
  58873. c[x + 2] = s[_] - u[0],
  58874. c[x + 3] = s[_ + 1] - u[1]
  58875. }
  58876. if (c[0] = s[v] - u[0],
  58877. c[1] = s[v + 1] - u[1],
  58878. n > 0)
  58879. for (var b = i / n, w = -i / 2; w <= i / 2; w += b) {
  58880. var S = Math.sin(w)
  58881. , M = Math.cos(w)
  58882. , I = 0;
  58883. for (x = 0; x < s.length; x += 2) {
  58884. var T = c[x]
  58885. , C = c[x + 1]
  58886. , D = l[x] - h[0]
  58887. , A = l[x + 1] - h[1]
  58888. , k = D * M - A * S
  58889. , L = D * S + A * M;
  58890. g[x] = k,
  58891. g[x + 1] = L;
  58892. var P = k - T
  58893. , O = L - C;
  58894. I += P * P + O * O
  58895. }
  58896. if (I < f) {
  58897. f = I,
  58898. d = w;
  58899. for (var R = 0; R < g.length; R++)
  58900. p[R] = g[R]
  58901. }
  58902. }
  58903. else
  58904. for (var N = 0; N < y; N += 2)
  58905. p[N] = l[N] - h[0],
  58906. p[N + 1] = l[N + 1] - h[1];
  58907. o.push({
  58908. from: c,
  58909. to: p,
  58910. fromCp: u,
  58911. toCp: h,
  58912. rotation: -d
  58913. })
  58914. }
  58915. return o
  58916. }(o, a, 10, Math.PI)
  58917. , h = [];
  58918. oW(e, "buildPath", {
  58919. replace: function(t) {
  58920. for (var n = e.__morphT, i = 1 - n, r = [], o = 0; o < u.length; o++) {
  58921. var a = u[o]
  58922. , s = a.from
  58923. , l = a.to
  58924. , c = a.rotation * n
  58925. , p = a.fromCp
  58926. , d = a.toCp
  58927. , f = Math.sin(c)
  58928. , g = Math.cos(c);
  58929. Gt(r, p, d, n);
  58930. for (var y = 0; y < s.length; y += 2) {
  58931. var v = s[y]
  58932. , m = s[y + 1]
  58933. , x = v * i + (S = l[y]) * n
  58934. , _ = m * i + (M = l[y + 1]) * n;
  58935. h[y] = x * g - _ * f + r[0],
  58936. h[y + 1] = x * f + _ * g + r[1]
  58937. }
  58938. var b = h[0]
  58939. , w = h[1];
  58940. t.moveTo(b, w);
  58941. for (y = 2; y < s.length; ) {
  58942. var S = h[y++]
  58943. , M = h[y++]
  58944. , I = h[y++]
  58945. , T = h[y++]
  58946. , C = h[y++]
  58947. , D = h[y++];
  58948. b === S && w === M && I === C && T === D ? t.lineTo(C, D) : t.bezierCurveTo(S, M, I, T, C, D),
  58949. b = C,
  58950. w = D
  58951. }
  58952. }
  58953. }
  58954. })
  58955. }
  58956. function uW(t, e, n) {
  58957. if (!t || !e)
  58958. return e;
  58959. var i = n.done
  58960. , r = n.during;
  58961. return lW(t, e),
  58962. e.__morphT = 0,
  58963. e.animateTo({
  58964. __morphT: 1
  58965. }, k({
  58966. during: function(t) {
  58967. e.dirtyShape(),
  58968. r && r(t)
  58969. },
  58970. done: function() {
  58971. aW(e, "buildPath"),
  58972. aW(e, "updateTransform"),
  58973. e.__morphT = -1,
  58974. e.createPathProxy(),
  58975. e.dirtyShape(),
  58976. i && i()
  58977. }
  58978. }, n)),
  58979. e
  58980. }
  58981. function hW(t, e, n, i, r, o) {
  58982. t = r === n ? 0 : Math.round(32767 * (t - n) / (r - n)),
  58983. e = o === i ? 0 : Math.round(32767 * (e - i) / (o - i));
  58984. for (var a, s = 0, l = 32768; l > 0; l /= 2) {
  58985. var u = 0
  58986. , h = 0;
  58987. (t & l) > 0 && (u = 1),
  58988. (e & l) > 0 && (h = 1),
  58989. s += l * l * (3 * u ^ h),
  58990. 0 === h && (1 === u && (t = l - 1 - t,
  58991. e = l - 1 - e),
  58992. a = t,
  58993. t = e,
  58994. e = a)
  58995. }
  58996. return s
  58997. }
  58998. function cW(t) {
  58999. var e = 1 / 0
  59000. , n = 1 / 0
  59001. , i = -1 / 0
  59002. , r = -1 / 0
  59003. , o = z(t, (function(t) {
  59004. var o = t.getBoundingRect()
  59005. , a = t.getComputedTransform()
  59006. , s = o.x + o.width / 2 + (a ? a[4] : 0)
  59007. , l = o.y + o.height / 2 + (a ? a[5] : 0);
  59008. return e = Math.min(s, e),
  59009. n = Math.min(l, n),
  59010. i = Math.max(s, i),
  59011. r = Math.max(l, r),
  59012. [s, l]
  59013. }
  59014. ));
  59015. return z(o, (function(o, a) {
  59016. return {
  59017. cp: o,
  59018. z: hW(o[0], o[1], e, n, i, r),
  59019. path: t[a]
  59020. }
  59021. }
  59022. )).sort((function(t, e) {
  59023. return t.z - e.z
  59024. }
  59025. )).map((function(t) {
  59026. return t.path
  59027. }
  59028. ))
  59029. }
  59030. function pW(t) {
  59031. return $G(t.path, t.count)
  59032. }
  59033. function dW(t) {
  59034. return Y(t[0])
  59035. }
  59036. function fW(t, e) {
  59037. for (var n = [], i = t.length, r = 0; r < i; r++)
  59038. n.push({
  59039. one: t[r],
  59040. many: []
  59041. });
  59042. for (r = 0; r < e.length; r++) {
  59043. var o = e[r].length
  59044. , a = void 0;
  59045. for (a = 0; a < o; a++)
  59046. n[a % i].many.push(e[r][a])
  59047. }
  59048. var s = 0;
  59049. for (r = i - 1; r >= 0; r--)
  59050. if (!n[r].many.length) {
  59051. var l = n[s].many;
  59052. if (l.length <= 1) {
  59053. if (!s)
  59054. return n;
  59055. s = 0
  59056. }
  59057. o = l.length;
  59058. var u = Math.ceil(o / 2);
  59059. n[r].many = l.slice(u, o),
  59060. n[s].many = l.slice(0, u),
  59061. s++
  59062. }
  59063. return n
  59064. }
  59065. var gW = {
  59066. clone: function(t) {
  59067. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), i = 0; i < t.count; i++) {
  59068. var r = bu(t.path);
  59069. r.setStyle("opacity", n),
  59070. e.push(r)
  59071. }
  59072. return e
  59073. },
  59074. split: null
  59075. };
  59076. function yW(t, e, n, i, r, o) {
  59077. if (t.length && e.length) {
  59078. var a = gh("update", i, r);
  59079. if (a && a.duration > 0) {
  59080. var s, l, u = i.getModel("universalTransition").get("delay"), h = Object.assign({
  59081. setToFinal: !0
  59082. }, a);
  59083. dW(t) && (s = t,
  59084. l = e),
  59085. dW(e) && (s = e,
  59086. l = t);
  59087. for (var c = s ? s === t : t.length > e.length, p = s ? fW(l, s) : fW(c ? e : t, [c ? t : e]), d = 0, f = 0; f < p.length; f++)
  59088. d += p[f].many.length;
  59089. var g = 0;
  59090. for (f = 0; f < p.length; f++)
  59091. y(p[f], c, g, d),
  59092. g += p[f].many.length
  59093. }
  59094. }
  59095. function y(t, e, i, r, a) {
  59096. var s = t.many
  59097. , l = t.one;
  59098. if (1 !== s.length || a)
  59099. for (var c = k({
  59100. dividePath: gW[n],
  59101. individualDelay: u && function(t, e, n, o) {
  59102. return u(t + i, r)
  59103. }
  59104. }, h), p = e ? function(t, e, n) {
  59105. var i = [];
  59106. !function t(e) {
  59107. for (var n = 0; n < e.length; n++) {
  59108. var r = e[n];
  59109. iW(r) ? t(r.childrenRef()) : r instanceof ks && i.push(r)
  59110. }
  59111. }(t);
  59112. var r = i.length;
  59113. if (!r)
  59114. return {
  59115. fromIndividuals: [],
  59116. toIndividuals: [],
  59117. count: 0
  59118. };
  59119. var o = (n.dividePath || pW)({
  59120. path: e,
  59121. count: r
  59122. });
  59123. if (o.length !== r)
  59124. return console.error("Invalid morphing: unmatched splitted path"),
  59125. {
  59126. fromIndividuals: [],
  59127. toIndividuals: [],
  59128. count: 0
  59129. };
  59130. i = cW(i),
  59131. o = cW(o);
  59132. for (var a = n.done, s = n.during, l = n.individualDelay, u = new vr, h = 0; h < r; h++) {
  59133. var c = i[h]
  59134. , p = o[h];
  59135. p.parent = e,
  59136. p.copyTransform(u),
  59137. l || lW(c, p)
  59138. }
  59139. function d(t) {
  59140. for (var e = 0; e < o.length; e++)
  59141. o[e].addSelfToZr(t)
  59142. }
  59143. function f() {
  59144. e.__isCombineMorphing = !1,
  59145. e.__morphT = -1,
  59146. e.childrenRef = null,
  59147. aW(e, "addSelfToZr"),
  59148. aW(e, "removeSelfFromZr")
  59149. }
  59150. e.__isCombineMorphing = !0,
  59151. e.childrenRef = function() {
  59152. return o
  59153. }
  59154. ,
  59155. oW(e, "addSelfToZr", {
  59156. after: function(t) {
  59157. d(t)
  59158. }
  59159. }),
  59160. oW(e, "removeSelfFromZr", {
  59161. after: function(t) {
  59162. for (var e = 0; e < o.length; e++)
  59163. o[e].removeSelfFromZr(t)
  59164. }
  59165. });
  59166. var g = o.length;
  59167. if (l) {
  59168. var y = g
  59169. , v = function() {
  59170. 0 == --y && (f(),
  59171. a && a())
  59172. };
  59173. for (h = 0; h < g; h++) {
  59174. var m = l ? k({
  59175. delay: (n.delay || 0) + l(h, g, i[h], o[h]),
  59176. done: v
  59177. }, n) : n;
  59178. uW(i[h], o[h], m)
  59179. }
  59180. } else
  59181. e.__morphT = 0,
  59182. e.animateTo({
  59183. __morphT: 1
  59184. }, k({
  59185. during: function(t) {
  59186. for (var n = 0; n < g; n++) {
  59187. var i = o[n];
  59188. i.__morphT = e.__morphT,
  59189. i.dirtyShape()
  59190. }
  59191. s && s(t)
  59192. },
  59193. done: function() {
  59194. f();
  59195. for (var e = 0; e < t.length; e++)
  59196. aW(t[e], "updateTransform");
  59197. a && a()
  59198. }
  59199. }, n));
  59200. return e.__zr && d(e.__zr),
  59201. {
  59202. fromIndividuals: i,
  59203. toIndividuals: o,
  59204. count: g
  59205. }
  59206. }(s, l, c) : function(t, e, n) {
  59207. var i = e.length
  59208. , r = []
  59209. , o = n.dividePath || pW;
  59210. if (iW(t)) {
  59211. !function t(e) {
  59212. for (var n = 0; n < e.length; n++) {
  59213. var i = e[n];
  59214. iW(i) ? t(i.childrenRef()) : i instanceof ks && r.push(i)
  59215. }
  59216. }(t.childrenRef());
  59217. var a = r.length;
  59218. if (a < i)
  59219. for (var s = 0, l = a; l < i; l++)
  59220. r.push(bu(r[s++ % a]));
  59221. r.length = i
  59222. } else {
  59223. r = o({
  59224. path: t,
  59225. count: i
  59226. });
  59227. var u = t.getComputedTransform();
  59228. for (l = 0; l < r.length; l++)
  59229. r[l].setLocalTransform(u);
  59230. if (r.length !== i)
  59231. return console.error("Invalid morphing: unmatched splitted path"),
  59232. {
  59233. fromIndividuals: [],
  59234. toIndividuals: [],
  59235. count: 0
  59236. }
  59237. }
  59238. r = cW(r),
  59239. e = cW(e);
  59240. var h = n.individualDelay;
  59241. for (l = 0; l < i; l++) {
  59242. var c = h ? k({
  59243. delay: (n.delay || 0) + h(l, i, r[l], e[l])
  59244. }, n) : n;
  59245. uW(r[l], e[l], c)
  59246. }
  59247. return {
  59248. fromIndividuals: r,
  59249. toIndividuals: e,
  59250. count: e.length
  59251. }
  59252. }(l, s, c), d = p.fromIndividuals, f = p.toIndividuals, g = d.length, v = 0; v < g; v++) {
  59253. m = u ? k({
  59254. delay: u(v, g)
  59255. }, h) : h;
  59256. o(d[v], f[v], e ? s[v] : t.one, e ? t.one : s[v], m)
  59257. }
  59258. else {
  59259. var m, x = e ? s[0] : l, _ = e ? l : s[0];
  59260. if (iW(x))
  59261. y({
  59262. many: [x],
  59263. one: _
  59264. }, !0, i, r, !0);
  59265. else
  59266. uW(x, _, m = u ? k({
  59267. delay: u(i, r)
  59268. }, h) : h),
  59269. o(x, _, x, _, m)
  59270. }
  59271. }
  59272. }
  59273. function vW(t) {
  59274. if (!t)
  59275. return [];
  59276. if (Y(t)) {
  59277. for (var e = [], n = 0; n < t.length; n++)
  59278. e.push(vW(t[n]));
  59279. return e
  59280. }
  59281. var i = [];
  59282. return t.traverse((function(t) {
  59283. t instanceof ks && !t.disableMorphing && !t.invisible && !t.ignore && i.push(t)
  59284. }
  59285. )),
  59286. i
  59287. }
  59288. var mW = Vo();
  59289. function xW(t, e, n, i) {
  59290. var r = function(t, e) {
  59291. for (var n = t.dimensions, i = 0; i < n.length; i++) {
  59292. var r = t.getDimensionInfo(n[i]);
  59293. if (r && 0 === r.otherDims[e])
  59294. return n[i]
  59295. }
  59296. }(t, i ? "itemChildGroupId" : "itemGroupId");
  59297. if (r) {
  59298. var o = function(t, e, n) {
  59299. var i = t.getDimensionInfo(n)
  59300. , r = i && i.ordinalMeta;
  59301. if (i) {
  59302. var o = t.get(i.name, e);
  59303. return r && r.categories[o] || o + ""
  59304. }
  59305. }(t, e, r);
  59306. return o
  59307. }
  59308. var a = t.getRawDataItem(e)
  59309. , s = i ? "childGroupId" : "groupId";
  59310. return a && a[s] ? a[s] + "" : i ? void 0 : n || t.getId(e)
  59311. }
  59312. function _W(t) {
  59313. var e = [];
  59314. return E(t, (function(t) {
  59315. var n = t.data
  59316. , i = t.dataGroupId;
  59317. if (!(n.count() > 1e4))
  59318. for (var r = n.getIndices(), o = 0; o < r.length; o++)
  59319. e.push({
  59320. data: n,
  59321. groupId: xW(n, o, i, !1),
  59322. childGroupId: xW(n, o, i, !0),
  59323. divide: t.divide,
  59324. dataIndex: o
  59325. })
  59326. }
  59327. )),
  59328. e
  59329. }
  59330. function bW(t, e, n) {
  59331. t.traverse((function(t) {
  59332. t instanceof ks && mh(t, {
  59333. style: {
  59334. opacity: 0
  59335. }
  59336. }, e, {
  59337. dataIndex: n,
  59338. isFrom: !0
  59339. })
  59340. }
  59341. ))
  59342. }
  59343. function wW(t) {
  59344. if (t.parent) {
  59345. var e = t.getComputedTransform();
  59346. t.setLocalTransform(e),
  59347. t.parent.remove(t)
  59348. }
  59349. }
  59350. function SW(t) {
  59351. t.stopAnimation(),
  59352. t.isGroup && t.traverse((function(t) {
  59353. t.stopAnimation()
  59354. }
  59355. ))
  59356. }
  59357. function MW(t, e, n) {
  59358. var i = gh("update", n, e);
  59359. i && t.traverse((function(t) {
  59360. if (t instanceof Da) {
  59361. var e = function(t) {
  59362. return fh(t).oldStyle
  59363. }(t);
  59364. e && t.animateFrom({
  59365. style: e
  59366. }, i)
  59367. }
  59368. }
  59369. ))
  59370. }
  59371. function IW(t, e, n) {
  59372. var i = _W(t)
  59373. , r = _W(e);
  59374. function o(t, e, n, i, r) {
  59375. (n || t) && e.animateFrom({
  59376. style: n && n !== t ? A(A({}, n.style), t.style) : t.style
  59377. }, r)
  59378. }
  59379. var a = !1
  59380. , s = 0
  59381. , l = yt()
  59382. , u = yt();
  59383. i.forEach((function(t) {
  59384. t.groupId && l.set(t.groupId, !0),
  59385. t.childGroupId && u.set(t.childGroupId, !0)
  59386. }
  59387. ));
  59388. for (var h = 0; h < r.length; h++) {
  59389. var c = r[h].groupId;
  59390. if (u.get(c)) {
  59391. s = 1;
  59392. break
  59393. }
  59394. var p = r[h].childGroupId;
  59395. if (p && l.get(p)) {
  59396. s = 2;
  59397. break
  59398. }
  59399. }
  59400. function d(t, e) {
  59401. return function(n) {
  59402. var i = n.data
  59403. , r = n.dataIndex;
  59404. return e ? i.getId(r) : t ? 1 === s ? n.childGroupId : n.groupId : 2 === s ? n.childGroupId : n.groupId
  59405. }
  59406. }
  59407. var f = function(t, e) {
  59408. var n = t.length;
  59409. if (n !== e.length)
  59410. return !1;
  59411. for (var i = 0; i < n; i++) {
  59412. var r = t[i]
  59413. , o = e[i];
  59414. if (r.data.getId(r.dataIndex) !== o.data.getId(o.dataIndex))
  59415. return !1
  59416. }
  59417. return !0
  59418. }(i, r)
  59419. , g = {};
  59420. if (!f)
  59421. for (h = 0; h < r.length; h++) {
  59422. var y = r[h]
  59423. , v = y.data.getItemGraphicEl(y.dataIndex);
  59424. v && (g[v.id] = !0)
  59425. }
  59426. function m(t, e) {
  59427. var n = i[e]
  59428. , s = r[t]
  59429. , l = s.data.hostModel
  59430. , u = n.data.getItemGraphicEl(n.dataIndex)
  59431. , h = s.data.getItemGraphicEl(s.dataIndex);
  59432. u !== h ? u && g[u.id] || h && (SW(h),
  59433. u ? (SW(u),
  59434. wW(u),
  59435. a = !0,
  59436. yW(vW(u), vW(h), s.divide, l, t, o)) : bW(h, l, t)) : h && MW(h, s.dataIndex, l)
  59437. }
  59438. new Gm(i,r,d(!0, f),d(!1, f),null,"multiple").update(m).updateManyToOne((function(t, e) {
  59439. var n = r[t]
  59440. , s = n.data
  59441. , l = s.hostModel
  59442. , u = s.getItemGraphicEl(n.dataIndex)
  59443. , h = B(z(e, (function(t) {
  59444. return i[t].data.getItemGraphicEl(i[t].dataIndex)
  59445. }
  59446. )), (function(t) {
  59447. return t && t !== u && !g[t.id]
  59448. }
  59449. ));
  59450. u && (SW(u),
  59451. h.length ? (E(h, (function(t) {
  59452. SW(t),
  59453. wW(t)
  59454. }
  59455. )),
  59456. a = !0,
  59457. yW(vW(h), vW(u), n.divide, l, t, o)) : bW(u, l, n.dataIndex))
  59458. }
  59459. )).updateOneToMany((function(t, e) {
  59460. var n = i[e]
  59461. , s = n.data.getItemGraphicEl(n.dataIndex);
  59462. if (!s || !g[s.id]) {
  59463. var l = B(z(t, (function(t) {
  59464. return r[t].data.getItemGraphicEl(r[t].dataIndex)
  59465. }
  59466. )), (function(t) {
  59467. return t && t !== s
  59468. }
  59469. ))
  59470. , u = r[t[0]].data.hostModel;
  59471. l.length && (E(l, (function(t) {
  59472. return SW(t)
  59473. }
  59474. )),
  59475. s ? (SW(s),
  59476. wW(s),
  59477. a = !0,
  59478. yW(vW(s), vW(l), n.divide, u, t[0], o)) : E(l, (function(e) {
  59479. return bW(e, u, t[0])
  59480. }
  59481. )))
  59482. }
  59483. }
  59484. )).updateManyToMany((function(t, e) {
  59485. new Gm(e,t,(function(t) {
  59486. return i[t].data.getId(i[t].dataIndex)
  59487. }
  59488. ),(function(t) {
  59489. return r[t].data.getId(r[t].dataIndex)
  59490. }
  59491. )).update((function(n, i) {
  59492. m(t[n], e[i])
  59493. }
  59494. )).execute()
  59495. }
  59496. )).execute(),
  59497. a && E(e, (function(t) {
  59498. var e = t.data.hostModel
  59499. , i = e && n.getViewOfSeriesModel(e)
  59500. , r = gh("update", e, 0);
  59501. i && e.isAnimationEnabled() && r && r.duration > 0 && i.group.traverse((function(t) {
  59502. t instanceof ks && !t.animators.length && t.animateFrom({
  59503. style: {
  59504. opacity: 0
  59505. }
  59506. }, r)
  59507. }
  59508. ))
  59509. }
  59510. ))
  59511. }
  59512. function TW(t) {
  59513. var e = t.getModel("universalTransition").get("seriesKey");
  59514. return e || t.id
  59515. }
  59516. function CW(t) {
  59517. return Y(t) ? t.sort().join(",") : t
  59518. }
  59519. function DW(t) {
  59520. if (t.hostModel)
  59521. return t.hostModel.getModel("universalTransition").get("divideShape")
  59522. }
  59523. function AW(t, e) {
  59524. for (var n = 0; n < t.length; n++) {
  59525. if (null != e.seriesIndex && e.seriesIndex === t[n].seriesIndex || null != e.seriesId && e.seriesId === t[n].id)
  59526. return n
  59527. }
  59528. }
  59529. Vm([function(t) {
  59530. t.registerPainter("canvas", hS)
  59531. }
  59532. ]),
  59533. Vm([function(t) {
  59534. t.registerPainter("svg", iS)
  59535. }
  59536. ]),
  59537. Vm([function(t) {
  59538. t.registerChartView(YS),
  59539. t.registerSeriesModel(cS),
  59540. t.registerLayout(XS("line", !0)),
  59541. t.registerVisual({
  59542. seriesType: "line",
  59543. reset: function(t) {
  59544. var e = t.getData()
  59545. , n = t.getModel("lineStyle").getLineStyle();
  59546. n && !n.stroke && (n.stroke = e.getVisual("style").fill),
  59547. e.setVisual("legendLineStyle", n)
  59548. }
  59549. }),
  59550. t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, jS("line"))
  59551. }
  59552. , function(t) {
  59553. t.registerChartView(rM),
  59554. t.registerSeriesModel(KS),
  59555. t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Ux, "bar")),
  59556. t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Zx("bar")),
  59557. t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, jS("bar")),
  59558. t.registerAction({
  59559. type: "changeAxisOrder",
  59560. event: "changeAxisOrder",
  59561. update: "update"
  59562. }, (function(t, e) {
  59563. var n = t.componentType || "series";
  59564. e.eachComponent({
  59565. mainType: n,
  59566. query: t
  59567. }, (function(e) {
  59568. t.sortInfo && e.axis.setCategorySortInfo(t.sortInfo)
  59569. }
  59570. ))
  59571. }
  59572. ))
  59573. }
  59574. , function(t) {
  59575. t.registerChartView(OM),
  59576. t.registerSeriesModel(zM),
  59577. Ly("pie", t.registerAction),
  59578. t.registerLayout(H(MM, "pie")),
  59579. t.registerProcessor(TM("pie")),
  59580. t.registerProcessor(function(t) {
  59581. return {
  59582. seriesType: t,
  59583. reset: function(t, e) {
  59584. var n = t.getData();
  59585. n.filterSelf((function(t) {
  59586. var e = n.mapDimension("value")
  59587. , i = n.get(e, t);
  59588. return !(j(i) && !isNaN(i) && i < 0)
  59589. }
  59590. ))
  59591. }
  59592. }
  59593. }("pie"))
  59594. }
  59595. , function(t) {
  59596. Vm(VI),
  59597. t.registerSeriesModel(VM),
  59598. t.registerChartView(WM),
  59599. t.registerLayout(XS("scatter"))
  59600. }
  59601. , function(t) {
  59602. Vm(JI),
  59603. t.registerChartView(HI),
  59604. t.registerSeriesModel(YI),
  59605. t.registerLayout(BI),
  59606. t.registerProcessor(TM("radar")),
  59607. t.registerPreprocessor(WI)
  59608. }
  59609. , function(t) {
  59610. Vm(CC),
  59611. t.registerChartView(lC),
  59612. t.registerSeriesModel(uC),
  59613. t.registerLayout(cC),
  59614. t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, hC),
  59615. Ly("map", t.registerAction)
  59616. }
  59617. , function(t) {
  59618. t.registerChartView(BC),
  59619. t.registerSeriesModel(sD),
  59620. t.registerLayout(uD),
  59621. t.registerVisual(hD),
  59622. function(t) {
  59623. t.registerAction({
  59624. type: "treeExpandAndCollapse",
  59625. event: "treeExpandAndCollapse",
  59626. update: "update"
  59627. }, (function(t, e) {
  59628. e.eachComponent({
  59629. mainType: "series",
  59630. subType: "tree",
  59631. query: t
  59632. }, (function(e) {
  59633. var n = t.dataIndex
  59634. , i = e.getData().tree.getNodeByDataIndex(n);
  59635. i.isExpand = !i.isExpand
  59636. }
  59637. ))
  59638. }
  59639. )),
  59640. t.registerAction({
  59641. type: "treeRoam",
  59642. event: "treeRoam",
  59643. update: "none"
  59644. }, (function(t, e, n) {
  59645. e.eachComponent({
  59646. mainType: "series",
  59647. subType: "tree",
  59648. query: t
  59649. }, (function(e) {
  59650. var i = MC(e.coordinateSystem, t, void 0, n);
  59651. e.setCenter && e.setCenter(i.center),
  59652. e.setZoom && e.setZoom(i.zoom)
  59653. }
  59654. ))
  59655. }
  59656. ))
  59657. }(t)
  59658. }
  59659. , function(t) {
  59660. t.registerSeriesModel(dD),
  59661. t.registerChartView(TD),
  59662. t.registerVisual(HD),
  59663. t.registerLayout(nA),
  59664. function(t) {
  59665. for (var e = 0; e < cD.length; e++)
  59666. t.registerAction({
  59667. type: cD[e],
  59668. update: "updateView"
  59669. }, bt);
  59670. t.registerAction({
  59671. type: "treemapRootToNode",
  59672. update: "updateView"
  59673. }, (function(t, e) {
  59674. e.eachComponent({
  59675. mainType: "series",
  59676. subType: "treemap",
  59677. query: t
  59678. }, (function(e, n) {
  59679. var i = iD(t, ["treemapZoomToNode", "treemapRootToNode"], e);
  59680. if (i) {
  59681. var r = e.getViewRoot();
  59682. r && (t.direction = oD(r, i.node) ? "rollUp" : "drillDown"),
  59683. e.resetViewRoot(i.node)
  59684. }
  59685. }
  59686. ))
  59687. }
  59688. ))
  59689. }(t)
  59690. }
  59691. , function(t) {
  59692. t.registerChartView(ik),
  59693. t.registerSeriesModel(hk),
  59694. t.registerProcessor(lA),
  59695. t.registerVisual(uA),
  59696. t.registerVisual(cA),
  59697. t.registerLayout(bA),
  59698. t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, AA),
  59699. t.registerLayout(LA),
  59700. t.registerCoordinateSystem("graphView", {
  59701. dimensions: dC.dimensions,
  59702. create: PA
  59703. }),
  59704. t.registerAction({
  59705. type: "focusNodeAdjacency",
  59706. event: "focusNodeAdjacency",
  59707. update: "series:focusNodeAdjacency"
  59708. }, bt),
  59709. t.registerAction({
  59710. type: "unfocusNodeAdjacency",
  59711. event: "unfocusNodeAdjacency",
  59712. update: "series:unfocusNodeAdjacency"
  59713. }, bt),
  59714. t.registerAction(ck, (function(t, e, n) {
  59715. e.eachComponent({
  59716. mainType: "series",
  59717. query: t
  59718. }, (function(e) {
  59719. var i = MC(e.coordinateSystem, t, void 0, n);
  59720. e.setCenter && e.setCenter(i.center),
  59721. e.setZoom && e.setZoom(i.zoom)
  59722. }
  59723. ))
  59724. }
  59725. ))
  59726. }
  59727. , function(t) {
  59728. t.registerChartView(gk),
  59729. t.registerSeriesModel(yk)
  59730. }
  59731. , function(t) {
  59732. t.registerChartView(xk),
  59733. t.registerSeriesModel(_k),
  59734. t.registerLayout(bk),
  59735. t.registerProcessor(TM("funnel"))
  59736. }
  59737. , function(t) {
  59738. Vm(ZL),
  59739. t.registerChartView(wk),
  59740. t.registerSeriesModel(Ck),
  59741. t.registerVisual(t.PRIORITY.VISUAL.BRUSH, kk)
  59742. }
  59743. , function(t) {
  59744. t.registerChartView(KL),
  59745. t.registerSeriesModel(JL),
  59746. t.registerLayout(QL),
  59747. t.registerVisual(cP),
  59748. t.registerAction({
  59749. type: "dragNode",
  59750. event: "dragnode",
  59751. update: "update"
  59752. }, (function(t, e) {
  59753. e.eachComponent({
  59754. mainType: "series",
  59755. subType: "sankey",
  59756. query: t
  59757. }, (function(e) {
  59758. e.setNodePosition(t.dataIndex, [t.localX, t.localY])
  59759. }
  59760. ))
  59761. }
  59762. ))
  59763. }
  59764. , function(t) {
  59765. t.registerSeriesModel(dP),
  59766. t.registerChartView(fP),
  59767. t.registerLayout(bP),
  59768. t.registerTransform(wP)
  59769. }
  59770. , function(t) {
  59771. t.registerChartView(PP),
  59772. t.registerSeriesModel(HP),
  59773. t.registerPreprocessor(YP),
  59774. t.registerVisual(kP),
  59775. t.registerLayout(XP)
  59776. }
  59777. , function(t) {
  59778. t.registerChartView(qP),
  59779. t.registerSeriesModel(KP),
  59780. t.registerLayout(XS("effectScatter"))
  59781. }
  59782. , function(t) {
  59783. t.registerChartView(rO),
  59784. t.registerSeriesModel(lO),
  59785. t.registerLayout(iO),
  59786. t.registerVisual(hO)
  59787. }
  59788. , function(t) {
  59789. t.registerChartView(dO),
  59790. t.registerSeriesModel(fO)
  59791. }
  59792. , function(t) {
  59793. t.registerChartView(mO),
  59794. t.registerSeriesModel(EO),
  59795. t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, H(Ux, "pictorialBar")),
  59796. t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Zx("pictorialBar"))
  59797. }
  59798. , function(t) {
  59799. t.registerChartView(zO),
  59800. t.registerSeriesModel(VO),
  59801. t.registerLayout(BO),
  59802. t.registerProcessor(TM("themeRiver"))
  59803. }
  59804. , function(t) {
  59805. t.registerChartView(YO),
  59806. t.registerSeriesModel(XO),
  59807. t.registerLayout(H(jO, "sunburst")),
  59808. t.registerProcessor(H(TM, "sunburst")),
  59809. t.registerVisual(KO),
  59810. function(t) {
  59811. t.registerAction({
  59812. type: WO,
  59813. update: "updateView"
  59814. }, (function(t, e) {
  59815. e.eachComponent({
  59816. mainType: "series",
  59817. subType: "sunburst",
  59818. query: t
  59819. }, (function(e, n) {
  59820. var i = iD(t, [WO], e);
  59821. if (i) {
  59822. var r = e.getViewRoot();
  59823. r && (t.direction = oD(r, i.node) ? "rollUp" : "drillDown"),
  59824. e.resetViewRoot(i.node)
  59825. }
  59826. }
  59827. ))
  59828. }
  59829. )),
  59830. t.registerAction({
  59831. type: HO,
  59832. update: "none"
  59833. }, (function(t, e, n) {
  59834. t = A({}, t),
  59835. e.eachComponent({
  59836. mainType: "series",
  59837. subType: "sunburst",
  59838. query: t
  59839. }, (function(e) {
  59840. var n = iD(t, [HO], e);
  59841. n && (t.dataIndex = n.node.dataIndex)
  59842. }
  59843. )),
  59844. n.dispatchAction(A(t, {
  59845. type: "highlight"
  59846. }))
  59847. }
  59848. )),
  59849. t.registerAction({
  59850. type: "sunburstUnhighlight",
  59851. update: "updateView"
  59852. }, (function(t, e, n) {
  59853. t = A({}, t),
  59854. n.dispatchAction(A(t, {
  59855. type: "downplay"
  59856. }))
  59857. }
  59858. ))
  59859. }(t)
  59860. }
  59861. , function(t) {
  59862. t.registerChartView(GR),
  59863. t.registerSeriesModel(tR)
  59864. }
  59865. ]),
  59866. Vm((function(t) {
  59867. Vm(VI),
  59868. Vm(WN)
  59869. }
  59870. )),
  59871. Vm((function(t) {
  59872. Vm(WN),
  59873. TI.registerAxisPointerClass("PolarAxisPointer", HN),
  59874. t.registerCoordinateSystem("polar", iE),
  59875. t.registerComponentModel(XN),
  59876. t.registerComponentView(xE),
  59877. KM(t, "angle", ZN, vE),
  59878. KM(t, "radius", jN, mE),
  59879. t.registerComponentView(lE),
  59880. t.registerComponentView(pE),
  59881. t.registerLayout(H(yE, "bar"))
  59882. }
  59883. )),
  59884. Vm(CC),
  59885. Vm((function(t) {
  59886. Vm(WN),
  59887. TI.registerAxisPointerClass("SingleAxisPointer", OE),
  59888. t.registerComponentView(zE),
  59889. t.registerComponentView(SE),
  59890. t.registerComponentModel(IE),
  59891. KM(t, "single", IE, IE.defaultOption),
  59892. t.registerCoordinateSystem("single", kE)
  59893. }
  59894. )),
  59895. Vm(ZL),
  59896. Vm((function(t) {
  59897. t.registerComponentModel(VE),
  59898. t.registerComponentView(FE),
  59899. t.registerCoordinateSystem("calendar", WE)
  59900. }
  59901. )),
  59902. Vm((function(t) {
  59903. t.registerComponentModel(jE),
  59904. t.registerComponentView($E),
  59905. t.registerPreprocessor((function(t) {
  59906. var e = t.graphic;
  59907. Y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
  59908. elements: e
  59909. }] : e && !e.elements && (t.graphic = [{
  59910. elements: [e]
  59911. }])
  59912. }
  59913. ))
  59914. }
  59915. )),
  59916. Vm((function(t) {
  59917. t.registerComponentModel(Mz),
  59918. t.registerComponentView(Tz),
  59919. wz("saveAsImage", Cz),
  59920. wz("magicType", kz),
  59921. wz("dataView", zz),
  59922. wz("dataZoom", oV),
  59923. wz("restore", Wz),
  59924. Vm(xz)
  59925. }
  59926. )),
  59927. Vm((function(t) {
  59928. Vm(WN),
  59929. t.registerComponentModel(lV),
  59930. t.registerComponentView(IV),
  59931. t.registerAction({
  59932. type: "showTip",
  59933. event: "showTip",
  59934. update: "tooltip:manuallyShowTip"
  59935. }, bt),
  59936. t.registerAction({
  59937. type: "hideTip",
  59938. event: "hideTip",
  59939. update: "tooltip:manuallyHideTip"
  59940. }, bt)
  59941. }
  59942. )),
  59943. Vm(WN),
  59944. Vm((function(t) {
  59945. t.registerComponentView(ZV),
  59946. t.registerComponentModel(jV),
  59947. t.registerPreprocessor(kV),
  59948. t.registerVisual(t.PRIORITY.VISUAL.BRUSH, WV),
  59949. t.registerAction({
  59950. type: "brush",
  59951. event: "brush",
  59952. update: "updateVisual"
  59953. }, (function(t, e) {
  59954. e.eachComponent({
  59955. mainType: "brush",
  59956. query: t
  59957. }, (function(e) {
  59958. e.setAreas(t.areas)
  59959. }
  59960. ))
  59961. }
  59962. )),
  59963. t.registerAction({
  59964. type: "brushSelect",
  59965. event: "brushSelected",
  59966. update: "none"
  59967. }, bt),
  59968. t.registerAction({
  59969. type: "brushEnd",
  59970. event: "brushEnd",
  59971. update: "none"
  59972. }, bt),
  59973. wz("brush", $V)
  59974. }
  59975. )),
  59976. Vm((function(t) {
  59977. t.registerComponentModel(JV),
  59978. t.registerComponentView(QV)
  59979. }
  59980. )),
  59981. Vm((function(t) {
  59982. t.registerComponentModel(eB),
  59983. t.registerComponentView(aB),
  59984. t.registerSubTypeDefaulter("timeline", (function() {
  59985. return "slider"
  59986. }
  59987. )),
  59988. function(t) {
  59989. t.registerAction({
  59990. type: "timelineChange",
  59991. event: "timelineChanged",
  59992. update: "prepareAndUpdate"
  59993. }, (function(t, e, n) {
  59994. var i = e.getComponent("timeline");
  59995. return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex),
  59996. !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1),
  59997. n.dispatchAction({
  59998. type: "timelinePlayChange",
  59999. playState: !1,
  60000. from: t.from
  60001. }))),
  60002. e.resetOption("timeline", {
  60003. replaceMerge: i.get("replaceMerge", !0)
  60004. }),
  60005. k({
  60006. currentIndex: i.option.currentIndex
  60007. }, t)
  60008. }
  60009. )),
  60010. t.registerAction({
  60011. type: "timelinePlayChange",
  60012. event: "timelinePlayChanged",
  60013. update: "update"
  60014. }, (function(t, e) {
  60015. var n = e.getComponent("timeline");
  60016. n && null != t.playState && n.setPlayState(t.playState)
  60017. }
  60018. ))
  60019. }(t),
  60020. t.registerPreprocessor(uB)
  60021. }
  60022. )),
  60023. Vm((function(t) {
  60024. t.registerComponentModel(yB),
  60025. t.registerComponentView(DB),
  60026. t.registerPreprocessor((function(t) {
  60027. pB(t.series, "markPoint") && (t.markPoint = t.markPoint || {})
  60028. }
  60029. ))
  60030. }
  60031. )),
  60032. Vm((function(t) {
  60033. t.registerComponentModel(AB),
  60034. t.registerComponentView(EB),
  60035. t.registerPreprocessor((function(t) {
  60036. pB(t.series, "markLine") && (t.markLine = t.markLine || {})
  60037. }
  60038. ))
  60039. }
  60040. )),
  60041. Vm((function(t) {
  60042. t.registerComponentModel(zB),
  60043. t.registerComponentView(XB),
  60044. t.registerPreprocessor((function(t) {
  60045. pB(t.series, "markArea") && (t.markArea = t.markArea || {})
  60046. }
  60047. ))
  60048. }
  60049. )),
  60050. Vm((function(t) {
  60051. Vm(rF),
  60052. Vm(cF)
  60053. }
  60054. )),
  60055. Vm((function(t) {
  60056. Vm(SF),
  60057. Vm(PF)
  60058. }
  60059. )),
  60060. Vm(SF),
  60061. Vm(PF),
  60062. Vm((function(t) {
  60063. Vm(pG),
  60064. Vm(vG)
  60065. }
  60066. )),
  60067. Vm(pG),
  60068. Vm(vG),
  60069. Vm((function(t) {
  60070. t.registerPreprocessor(wG),
  60071. t.registerVisual(t.PRIORITY.VISUAL.ARIA, bG)
  60072. }
  60073. )),
  60074. Vm((function(t) {
  60075. t.registerTransform(RG),
  60076. t.registerTransform(NG)
  60077. }
  60078. )),
  60079. Vm((function(t) {
  60080. t.registerComponentModel(EG),
  60081. t.registerComponentView(zG)
  60082. }
  60083. )),
  60084. Vm((function(t) {
  60085. t.registerUpdateLifecycle("series:beforeupdate", (function(t, e, n) {
  60086. E(To(n.seriesTransition), (function(t) {
  60087. E(To(t.to), (function(t) {
  60088. for (var e = n.updatedSeries, i = 0; i < e.length; i++)
  60089. (null != t.seriesIndex && t.seriesIndex === e[i].seriesIndex || null != t.seriesId && t.seriesId === e[i].id) && (e[i][_g] = !0)
  60090. }
  60091. ))
  60092. }
  60093. ))
  60094. }
  60095. )),
  60096. t.registerUpdateLifecycle("series:transition", (function(t, e, n) {
  60097. var i = mW(e);
  60098. if (i.oldSeries && n.updatedSeries && n.optionChanged) {
  60099. var r = n.seriesTransition;
  60100. if (r)
  60101. E(To(r), (function(t) {
  60102. !function(t, e, n, i) {
  60103. var r = []
  60104. , o = [];
  60105. E(To(t.from), (function(t) {
  60106. var n = AW(e.oldSeries, t);
  60107. n >= 0 && r.push({
  60108. dataGroupId: e.oldDataGroupIds[n],
  60109. data: e.oldData[n],
  60110. divide: DW(e.oldData[n]),
  60111. groupIdDim: t.dimension
  60112. })
  60113. }
  60114. )),
  60115. E(To(t.to), (function(t) {
  60116. var i = AW(n.updatedSeries, t);
  60117. if (i >= 0) {
  60118. var r = n.updatedSeries[i].getData();
  60119. o.push({
  60120. dataGroupId: e.oldDataGroupIds[i],
  60121. data: r,
  60122. divide: DW(r),
  60123. groupIdDim: t.dimension
  60124. })
  60125. }
  60126. }
  60127. )),
  60128. r.length > 0 && o.length > 0 && IW(r, o, i)
  60129. }(t, i, n, e)
  60130. }
  60131. ));
  60132. else {
  60133. var o = function(t, e) {
  60134. var n = yt()
  60135. , i = yt()
  60136. , r = yt();
  60137. return E(t.oldSeries, (function(e, n) {
  60138. var o = t.oldDataGroupIds[n]
  60139. , a = t.oldData[n]
  60140. , s = TW(e)
  60141. , l = CW(s);
  60142. i.set(l, {
  60143. dataGroupId: o,
  60144. data: a
  60145. }),
  60146. Y(s) && E(s, (function(t) {
  60147. r.set(t, {
  60148. key: l,
  60149. dataGroupId: o,
  60150. data: a
  60151. })
  60152. }
  60153. ))
  60154. }
  60155. )),
  60156. E(e.updatedSeries, (function(t) {
  60157. if (t.isUniversalTransitionEnabled() && t.isAnimationEnabled()) {
  60158. var e = t.get("dataGroupId")
  60159. , o = t.getData()
  60160. , a = TW(t)
  60161. , s = CW(a)
  60162. , l = i.get(s);
  60163. if (l)
  60164. n.set(s, {
  60165. oldSeries: [{
  60166. dataGroupId: l.dataGroupId,
  60167. divide: DW(l.data),
  60168. data: l.data
  60169. }],
  60170. newSeries: [{
  60171. dataGroupId: e,
  60172. divide: DW(o),
  60173. data: o
  60174. }]
  60175. });
  60176. else if (Y(a)) {
  60177. var u = [];
  60178. E(a, (function(t) {
  60179. var e = i.get(t);
  60180. e.data && u.push({
  60181. dataGroupId: e.dataGroupId,
  60182. divide: DW(e.data),
  60183. data: e.data
  60184. })
  60185. }
  60186. )),
  60187. u.length && n.set(s, {
  60188. oldSeries: u,
  60189. newSeries: [{
  60190. dataGroupId: e,
  60191. data: o,
  60192. divide: DW(o)
  60193. }]
  60194. })
  60195. } else {
  60196. var h = r.get(a);
  60197. if (h) {
  60198. var c = n.get(h.key);
  60199. c || (c = {
  60200. oldSeries: [{
  60201. dataGroupId: h.dataGroupId,
  60202. data: h.data,
  60203. divide: DW(h.data)
  60204. }],
  60205. newSeries: []
  60206. },
  60207. n.set(h.key, c)),
  60208. c.newSeries.push({
  60209. dataGroupId: e,
  60210. data: o,
  60211. divide: DW(o)
  60212. })
  60213. }
  60214. }
  60215. }
  60216. }
  60217. )),
  60218. n
  60219. }(i, n);
  60220. E(o.keys(), (function(t) {
  60221. var n = o.get(t);
  60222. IW(n.oldSeries, n.newSeries, e)
  60223. }
  60224. ))
  60225. }
  60226. E(n.updatedSeries, (function(t) {
  60227. t[_g] && (t[_g] = !1)
  60228. }
  60229. ))
  60230. }
  60231. for (var a = t.getSeries(), s = i.oldSeries = [], l = i.oldDataGroupIds = [], u = i.oldData = [], h = 0; h < a.length; h++) {
  60232. var c = a[h].getData();
  60233. c.count() < 1e4 && (s.push(a[h]),
  60234. l.push(a[h].get("dataGroupId")),
  60235. u.push(c))
  60236. }
  60237. }
  60238. ))
  60239. }
  60240. )),
  60241. Vm((function(t) {
  60242. t.registerUpdateLifecycle("series:beforeupdate", (function(t, e, n) {
  60243. var i = Xb(e).labelManager;
  60244. i || (i = Xb(e).labelManager = new Yb),
  60245. i.clearLabels()
  60246. }
  60247. )),
  60248. t.registerUpdateLifecycle("series:layoutlabels", (function(t, e, n) {
  60249. var i = Xb(e).labelManager;
  60250. n.updatedSeries.forEach((function(t) {
  60251. i.addLabelsOfSeries(e.getViewOfSeriesModel(t))
  60252. }
  60253. )),
  60254. i.updateLayoutConfig(e),
  60255. i.layout(e),
  60256. i.processLabelsOverall()
  60257. }
  60258. ))
  60259. }
  60260. )),
  60261. t.Axis = ab,
  60262. t.ChartView = Og,
  60263. t.ComponentModel = zp,
  60264. t.ComponentView = Ag,
  60265. t.List = cx,
  60266. t.Model = Cc,
  60267. t.PRIORITY = Cv,
  60268. t.SeriesModel = bg,
  60269. t.color = li,
  60270. t.connect = function(t) {
  60271. if (Y(t)) {
  60272. var e = t;
  60273. t = null,
  60274. E(e, (function(e) {
  60275. null != e.group && (t = e.group)
  60276. }
  60277. )),
  60278. t = t || "g_" + ym++,
  60279. E(e, (function(e) {
  60280. e.group = t
  60281. }
  60282. ))
  60283. }
  60284. return fm[t] = !0,
  60285. t
  60286. }
  60287. ,
  60288. t.dataTool = {},
  60289. t.dependencies = {
  60290. zrender: "5.6.1"
  60291. },
  60292. t.disConnect = xm,
  60293. t.disconnect = mm,
  60294. t.dispose = function(t) {
  60295. U(t) ? t = dm[t] : t instanceof nm || (t = _m(t)),
  60296. t instanceof nm && !t.isDisposed() && t.dispose()
  60297. }
  60298. ,
  60299. t.env = r,
  60300. t.extendChartView = function(t) {
  60301. var e = Og.extend(t);
  60302. return Og.registerClass(e),
  60303. e
  60304. }
  60305. ,
  60306. t.extendComponentModel = function(t) {
  60307. var e = zp.extend(t);
  60308. return zp.registerClass(e),
  60309. e
  60310. }
  60311. ,
  60312. t.extendComponentView = function(t) {
  60313. var e = Ag.extend(t);
  60314. return Ag.registerClass(e),
  60315. e
  60316. }
  60317. ,
  60318. t.extendSeriesModel = function(t) {
  60319. var e = bg.extend(t);
  60320. return bg.registerClass(e),
  60321. e
  60322. }
  60323. ,
  60324. t.format = Z_,
  60325. t.getCoordinateSystemDimensions = function(t) {
  60326. var e = wd.get(t);
  60327. if (e)
  60328. return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()
  60329. }
  60330. ,
  60331. t.getInstanceByDom = _m,
  60332. t.getInstanceById = function(t) {
  60333. return dm[t]
  60334. }
  60335. ,
  60336. t.getMap = function(t) {
  60337. var e = Mv("getMap");
  60338. return e && e(t)
  60339. }
  60340. ,
  60341. t.graphic = U_,
  60342. t.helper = k_,
  60343. t.init = function(t, e, n) {
  60344. var i = !(n && n.ssr);
  60345. if (i) {
  60346. 0;
  60347. var r = _m(t);
  60348. if (r)
  60349. return r;
  60350. 0
  60351. }
  60352. var o = new nm(t,e,n);
  60353. return o.id = "ec_" + gm++,
  60354. dm[o.id] = o,
  60355. i && Xo(t, vm, o.id),
  60356. $v(o),
  60357. wv.trigger("afterinit", o),
  60358. o
  60359. }
  60360. ,
  60361. t.innerDrawElementOnCanvas = dv,
  60362. t.matrix = Ce,
  60363. t.number = Y_,
  60364. t.parseGeoJSON = H_,
  60365. t.parseGeoJson = H_,
  60366. t.registerAction = Cm,
  60367. t.registerCoordinateSystem = Dm,
  60368. t.registerLayout = Am,
  60369. t.registerLoading = Om,
  60370. t.registerLocale = zc,
  60371. t.registerMap = Rm,
  60372. t.registerPostInit = Mm,
  60373. t.registerPostUpdate = Im,
  60374. t.registerPreprocessor = wm,
  60375. t.registerProcessor = Sm,
  60376. t.registerTheme = bm,
  60377. t.registerTransform = Nm,
  60378. t.registerUpdateLifecycle = Tm,
  60379. t.registerVisual = km,
  60380. t.setCanvasCreator = function(t) {
  60381. c({
  60382. createCanvas: t
  60383. })
  60384. }
  60385. ,
  60386. t.setPlatformAPI = c,
  60387. t.throttle = Wg,
  60388. t.time = X_,
  60389. t.use = Vm,
  60390. t.util = j_,
  60391. t.vector = Xt,
  60392. t.version = "5.6.0",
  60393. t.zrUtil = St,
  60394. t.zrender = jr,
  60395. Object.defineProperty(t, "__esModule", {
  60396. value: !0
  60397. })
  60398. }
  60399. ));